]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
[bison.git] / ChangeLog
1 2003-02-04 Akim Demaille <akim@epita.fr>
2
3 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
4 Location as is defined.
5
6 2003-02-04 Akim Demaille <akim@epita.fr>
7
8 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9 name_ being defined.
10
11 2003-02-03 Paul Eggert <eggert@twinsun.com>
12
13 * src/gram.h (start_symbol): Remove unused decl.
14
15 Use more-consistent naming conventions for local vars.
16
17 * src/derives.c (derives_compute): Change type of local var from
18 int to rule_number.
19 * src/gram.c (grammar_rules_partial_print): Likewise.
20 * src/print.c (print_core): Likewise.
21 * src/reduce.c (reduce_grammar_tables): Likewise.
22
23 * src/gram.c (grammar_dump): Change name of item_number *
24 local var from r to rp.
25 * src/nullable.c (nullable_compute): Likewise.
26
27 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
28
29 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
30 for symbol or symbol_number var.
31 * src/reader.c (grammar_start_symbol_set): Likewise.
32 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
33 Likewise.
34 * src/state.c (transitions_to): Likewise.
35 * src/state.h: Likewise.
36 * src/tables.c (symbol_number_to_vector_number): Likewise.
37
38 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
39 char * var.
40
41 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
42 var.
43
44 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
45 var.
46
47 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
48 Use str, not s, for char * var. Use ch, not c, for character var.
49 Use size for size var.
50
51 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
52 char * var.
53 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
54 uniqstr var.
55 * src/uniqstr.h: Likewise.
56
57 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
58 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
59 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
60 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
61 param to have same name as that of enum, so that we don't use
62 "s" to stand for a non-state.
63
64 2003-02-02 Akim Demaille <akim@epita.fr>
65
66 * src/scan-skel.l: Scan more than one inert character per yylex
67 invocation.
68
69 2003-02-01 Paul Eggert <eggert@twinsun.com>
70
71 Version 1.875a.
72
73 * po/LINGUAS: Add ms.
74
75 2003-01-30 Akim Demaille <akim@epita.fr>
76
77 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
78
79 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
80
81 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
82 of $1.
83
84 Changes in response to error report by S. Eken: GLR mode does not
85 handle negative $ indices or $ indices in embedded rules correctly.
86 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
87
88 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
89 (b4_rhs_location): Ditto.
90 (yyfill): New function to copy from stack tree into array
91 incrementally.
92 (yyuserAction): Modify to allow incremental move of semantic values
93 to rhs array when in GLR mode.
94 Define YYFILL to use in user-defined actions to fill semantic array
95 as needed.
96 Remove dummy use of yystack, as there is now a guaranteed use.
97 (yydoAction): Modify to allow incremental move of semantic values
98 to rhs array when in GLR mode.
99 (yyresolveAction): Ditto.
100 (yyglrShiftDefer): Update comment.
101 (yyresolveStates): Use X == NULL for pointers, not !X.
102 (yyglrReduce): Ditto.
103 (yydoAction): Ditto
104
105 * tests/glr-regr1.at: Rename to ...
106 * tests/glr-regression.at: Add new regression test for the problems
107 described above (adapted from S. Eken).
108 Update copyright notice.
109 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
110 * tests/Makefile.am: Ditto.
111
112 2003-01-28 Paul Eggert <eggert@twinsun.com>
113
114 * data/lalr1.cc: Do not use @output_header_name@ unless
115 b4_defines_flag is set. This fixes two bugs reported by
116 Tim Van Holder in
117 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
118 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
119
120 2003-01-21 Paul Eggert <eggert@twinsun.com>
121
122 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
123 we don't need to worry about yyerrlab1 being reported as an
124 "unused label" by non-GCC C compilers. The downside is that if
125 locations are used then a couple of statements are duplicated each
126 time YYERROR is invoked, but the upside is that the warnings
127 should vanish.
128 (yyerrlab1): Move code to YERROR.
129 (yyerrlab2): Remove. Change uses back to yyerrlab1.
130 This reverts some of the 2002-12-27 change.
131
132 2003-01-17 Paul Eggert <eggert@twinsun.com>
133
134 * src/output.c (symbol_printers_output): Fix typo that led
135 to core dump. Problem reported by Antonio Rus in
136 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
137
138 2003-01-13 Akim Demaille <akim@epita.fr>,
139 Quoc Peyrot <chojin@lrde.epita.fr>,
140 Robert Anisko <anisko_r@lrde.epita.fr>
141
142 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
143 when the stacks contain one element, as the loop would otherwise
144 free the last state, and then use the top state (the one we just
145 popped). This means that the initial elements will not be freed
146 explicitly, as is the case in yacc.c; it is not a problem, as
147 these elements have fake values.
148
149 2003-01-11 Paul Eggert <eggert@twinsun.com>
150
151 * NEWS: %expect-violations are now just warnings, reverting
152 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
153 bootstrapping problem reported by Matthias Klose; see
154 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
155 * src/conflicts.c (conflicts_print): Likewise.
156 * tests/conflicts.at (%expect not enough, %expect too much,
157 %expect with reduce conflicts): Likewise.
158 * doc/bison.texinfo (Expect Decl): Document this. Also mention
159 that the warning is enabled if the number of conflicts changes
160 (not necessarily increases).
161
162 * src/getargs.c (version): Update copyright year.
163
164 2003-01-09 Akim Demaille <akim@epita.fr>
165
166 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
167
168 2003-01-08 Paul Eggert <eggert@twinsun.com>
169
170 * Makefile.maint (WGETFLAGS):
171 New macro, containing "-C off" to disable proxy caches.
172 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
173 (rel-check): Use $(WGET) instead of wget.
174
175 2003-01-06 Paul Eggert <eggert@twinsun.com>
176
177 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
178 the GLR paper of Scott, Johnstone and Hussain.
179
180 2003-01-04 Paul Eggert <eggert@twinsun.com>
181
182 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
183 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
184 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
185 (EXTRA_LIBRARIES): New var, for liby.a.
186 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
187 (EXTRA_SCRIPTS): New var, for yacc.
188
189 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
190 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
191 Problem reported by Nelson H. F. Beebe.
192
193 2003-01-03 Paul Eggert <eggert@twinsun.com>
194
195 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
196 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
197 when compiling Bison 1.875's `bitset bset = obstack_alloc
198 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
199
200 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
201 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
202 grow to a huge size with typical invocation.
203
204 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
205 Use the pattern recommended by Autoconf 2.57, except also protect
206 against double-definition.
207 * src/system.h: Likewise.
208 Portability issues reported by Nelson H. F. Beebe.
209
210 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
211 All uses changed. Provide a definition in both C and C++.
212 (yytrue, yyfalse): Define even if defined (__cplusplus).
213
214 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
215 Reported by Nelson H. F. Beebe.
216
217 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
218
219 2003-01-02 Paul Eggert <eggert@twinsun.com>
220
221 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
222 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
223 Bug reported by Nelson H. F. Beebe.
224
225 2003-01-01 Paul Eggert <eggert@twinsun.com>
226
227 * Version 1.875.
228
229 2002-12-30 Paul Eggert <eggert@twinsun.com>
230
231 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
232 Moved here from...
233 (<INITIAL>","): Here. This causes stray "," to be treated
234 more uniformly.
235
236 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
237 last brace in braced code when not in Yacc mode, for compatibility
238 with Bison 1.35. This resurrects the 2001-12-15 patch to
239 src/reader.c.
240
241 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
242 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
243
244 2002-12-28 Paul Eggert <eggert@twinsun.com>
245
246 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
247 that of SYM's type. This fixes Debian bug 168069, reported by
248 Thomas Olsson.
249
250 2002-12-28 Paul Eggert <eggert@twinsun.com>
251
252 Version 1.75f.
253
254 Switch back to the Yacc style of conflict reports, undoing some
255 of the 2002-07-30 change.
256 * doc/bison.texinfo (Understanding): Use Yacc style for
257 conflict reports. Also, use new way of locating rules.
258 * src/conflicts.c (conflict_report):
259 Renamed from conflict_report_yacc, removing the old
260 'conflict_report'. Translate the entire conflict report at once,
261 so that we don't assume that "," has the same interpretation in
262 all languages.
263 (conflicts_output): Use Yacc-style conflict report for each state,
264 instead of our more-complicated style.
265 (conflicts_print): Use Yacc-style conflict report, except print
266 the input file name when not emulating Yacc.
267 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
268 Conflicted Reduction, %expect not enough, %expect too much,
269 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
270 * tests/existing.at (GNU Cim Grammar): Likewise.
271 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
272
273 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
274 fatal): Don't invoke fflush; it's not needed and it might even be
275 harmful for stdout, as stdout might not be open.
276 * src/reduce.c (reduce_print): Likewise.
277
278 2002-12-27 Paul Eggert <eggert@twinsun.com>
279
280 Fix a bug where error locations were not being recorded correctly.
281 This problem was originally reported by Paul Hilfinger in
282 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
283
284 * data/yacc.c (yyparse): New local var yylerrsp, to record the
285 top of the location stack's error locations.
286 (yyerrlab): Set it. When discarding a token, push its location
287 onto yylerrsp so that we don't lose track of the error's end.
288 (yyerrlab1): Now is only the target of YYERROR, so that we can
289 properly record the location of the action that failed. For GCC
290 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
291 GCC warning about yyerrlab1 being unused if YYERROR is unused.
292 (yyerrlab2): New label, which yyerrlab now falls through to.
293 Compute the error's location by applying YYLLOC_DEFAULT to
294 the locations of all the symbols that went into the error.
295 * doc/bison.texinfo (Location Default Action): Mention that
296 YYLLOC_DEFAULT is also invoked for syntax errors.
297 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
298 Error locations include the locations of all the tokens that were
299 discarded, not just the last token.
300
301 2002-12-26 Paul Eggert <eggert@twinsun.com>
302
303 * src/files.c: Include quote.h.
304 (compute_output_file_names): Warn if we detect conflicting
305 outputs to the same file. This should catch the misunderstanding
306 exemplified by Debian Bug 165349, reported by Bruce Stephens..
307
308 * src/conflicts.c (conflicts_print): If the user specifies
309 "%expect N", report an error if there are any reduce/reduce
310 conflicts. This is what the manual says should happen.
311 This fixes Debian bug 130890, reported by Anthony DeRobertis.
312 * tests/conflicts.at (%expect with reduce conflicts): New test.
313
314 Don't use m4_include on relative file names, as it doesn't work as
315 desired if there happens to be a file with that name under ".".
316
317 * m4sugar/version.m4: Remove; it was included but it wasn't used.
318 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
319 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
320 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
321 * src/output.c (output_skeleton): Use full path names when
322 specifying a file to include; don't rely on include path, as
323 it's unreliable when the working file contains a file with
324 that name.
325
326 2002-12-25 Paul Eggert <eggert@twinsun.com>
327
328 Remove obsolete references to bison.simple and bison.hairy.
329 Problem mentioned by Aubin Mahe in
330 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
331 * data/glr.c: Comment fix.
332 * doc/bison.1: Remove references. Also, mention "yacc".
333
334 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
335 with -g option.
336
337 * src/parse-gram.y (declaration): Use enum "report_states" rather
338 than its numeric value 1.
339
340 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
341 opening a new one. This fixes Debian bug 165349, reported by
342 Bruce Stephens.
343
344 2002-12-24 Paul Eggert <eggert@twinsun.com>
345
346 Version 1.75e.
347
348 * Makefile.maint (cvs-update): Don't assume that the shell
349 supports $(...), as Solaris sh doesn't.
350
351 * src/parse-gram.y (lloc_default): Remove test for empty
352 nonterminals at the end, since it didn't change the result.
353
354 2002-12-24 Paul Eggert <eggert@twinsun.com>
355
356 If the user does not define YYSTYPE as a macro, Bison now declares it
357 using typedef instead of defining it as a macro. POSIX requires this.
358 For consistency, YYLTYPE is also declared instead of defined.
359
360 %union directives can now have a tag before the `{', e.g., the
361 directive `%union foo {...}' now generates the C code
362 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
363 The default union tag is `YYSTYPE', for compatibility with Solaris 9
364 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
365 instead of `yyltype'.
366
367 `yystype' and `yyltype' are now obsolescent macros instead of being
368 typedefs or tags; they are no longer documented and will be
369 withdrawn in a future release.
370
371 * data/glr.c (b4_location_type): Remove.
372 (YYSTYPE): Renamed from yystype.
373 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
374 (struct YYLTYPE): Renamed from struct yyltype.
375 (YYLTYPE): Renamed from yyltype.
376 (yyltype, yystype): New (and obsolescent) macros,
377 for backward compatibility.
378 * data/yacc.c: Likewise.
379
380 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
381 does not specify a union tag. This is for compatibility with
382 Solaris 9 yacc.
383
384 * src/parse-gram.y (add_param): 2nd arg is now char * not char
385 const *, since it is now modified by stripping surrounding { }.
386 (current_braced_code): Remove.
387 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
388 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
389 trailing " {...}". Now of type <chars>.
390 (grammar_declaration): Adjust to bundled tokens.
391 (code_content): Remove; stripping is now done by add_param.
392 (print_token_value): Print contents of bundled tokens.
393 (token_name): New function.
394
395 * src/reader.h (braced_code, current_braced_code): Remove.
396 (token_name): New decl.
397
398 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
399 token_type, not braced_code code_kind. All uses changed.
400 (SC_PRE_CODE): New state, for scanning after a keyword that
401 has (or usually has) an immediately-following braced code.
402 (token_type): New local var, to keep track of which token type
403 to return when scanning braced code.
404 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
405 <INITIAL>"%parse-param", <INITIAL>"%printer",
406 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
407 instead of returning a token type immediately.
408 (<INITIAL>"{"): Set token type.
409 (<SC_BRACED_CODE>"}"): Use it.
410 (handle_action_dollar, handle_action_at): Now returns bool
411 indicating success. Fail if ! current_rule; this prevents a core dump.
412 (handle_symbol_code_dollar, handle_symbol_code_at):
413 Remove; merge body into caller.
414 (handle_dollar, handle_at): Complain in invalid contexts.
415
416 * NEWS, doc/bison.texinfo: Document the above.
417 * NEWS: Fix years and program names in copyright notice.
418
419 2002-12-17 Paul Eggert <eggert@twinsun.com>
420
421 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
422 Reporting, Table of Symbols): Omit mentions of %lex-param and
423 %parse-param from the documentation for now.
424
425 2002-12-15 Paul Eggert <eggert@twinsun.com>
426
427 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
428 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
429 lookahead symbol, and which sets yychar in parser actions) and it
430 disagreed with the Bison documentation. Bug
431 reported by Andrew Walrond.
432
433 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
434 as the caller now does that.
435 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
436 (YYEMPTY): Parenthesize right hand side, since others use it.
437 (yyparse): Don't assume that our generated code is the only code
438 that sets yychar.
439
440 2002-12-13 Paul Eggert <eggert@twinsun.com>
441
442 Version 1.75d.
443
444 POSIX requires a "yacc" command.
445 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
446 (MOSTLYCLEANFILES): Add yacc.
447 (yacc): New rule.
448 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
449 as an alias for bison y.
450
451 * po/LINGUAS: Add da.
452
453 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
454 problem with latest <getopt.h>.
455 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
456
457 * doc/fdl.texi: Upgrade to 1.2.
458 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
459 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
460 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
461 gnulib.
462 * config/install-sh: Sync with autotools.
463
464 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
465 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
466 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
467 locations are requested.
468 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
469 locations are requested.
470
471 2002-12-12 Paul Eggert <eggert@twinsun.com>
472
473 Remove unportable casts and storage allocation tricks.
474 While we're at it, remove almost all casts, since they
475 usually aren't needed and are a sign of trouble.
476
477 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
478
479 * src/derives.c (derives_compute): Do not subtract NTOKENS from
480 the pointer DSET returned by malloc; this isn't portable.
481 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
482 Similarly for DERIVES.
483 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
484 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
485 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
486
487 * src/derives.c (derives_compute): Do not bother invoking
488 int_of_rule_number, since rule numbers are integers.
489
490 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
491 rather than XMALLOC (char, N).
492
493 * src/files.c (filename_split): Rewrite to avoid cast.
494
495 * src/gram.h (symbol_number_as_item_number,
496 item_number_as_symbol_number, rule_number_as_item_number,
497 item_number_as_rule_number):
498 Now inline functions rather than macros, to avoid casts.
499 * src/state.h (state_number_as_int): Likewise.
500 * src/tables.c (state_number_to_vector_number,
501 symbol_number_to_vector_number): Likewise.
502
503 * src/gram.h (int_of_rule_number): Remove; no longer used.
504
505 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
506 since the resulting storage is always stored into.
507
508 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
509 where it's needed.
510
511 * src/muscle_tab.c (muscle_m4_output):
512 Now inline. Return bool, not int.
513 * src/state.c (state_compare): Likewise.
514 * src/symtab.c (symbol_check_defined,
515 symbol_check_alias_consistency, symbol_pack, symbol_translation,
516 hash_compare_symbol, hash_symbol):
517 Likewise.
518 * src/uniqstr.c (uniqstr_print): Likewise.
519 * src/muscle_tab.c (muscle_m4_output_processor):
520 New function, to avoid casts.
521 * src/state.c (state_comparator, stage_hasher): Likewise.
522 * src/symtab.c (symbol_check_defined_processor,
523 symbol_check_alias_consistency_processor, symbol_pack_processor,
524 symbol_translation_processor, hash_symbol_comparator,
525 hash_symbol_hasher): Likewise.
526 * src/uniqstr.c (uniqstr_print_processor): Likewise.
527 * src/muscle_tab.c (muscles_m4_output):
528 Use new functions instead of casting old functions unportably.
529 * src/state.c (state_hash_new): Likewise.
530 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
531 symbols_token_translations_init):
532 Likewise.
533 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
534
535 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
536 var instead of casting to long, to avoid casts.
537 (prepare_states): Use MALLOC rather than alloca, so that we don't
538 have to worry about alloca.
539 * src/state.c (state_hash_lookup): Likewise.
540
541 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
542 local var instead of casting to unsigned char, to avoid casts.
543
544 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
545 STATE_ALLOC): Remove.
546 (transitions_new, errs_new, reductions_new, state_new): Use malloc
547 rather than calloc, and use offsetof to avoid allocating slightly
548 too much storage.
549 (state_new): Initialize all members.
550
551 * src/state.c (state_hash): Use unsigned accumulator, not signed.
552
553 * src/symtab.c (symbol_free): Remove; unused.
554 (symbol_get): Remove cast in lhs of assignment.
555 (symbols_do): Now static. Accept generic arguments, not
556 hashing-related ones.
557
558 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
559 (symbol_processor): Remove.
560 (symbols_do): Remove decl; now static.
561
562 * src/system.h (alloca): Remove; decl no longer needed.
563 (<stddef.h>): Include, for offsetof.
564 (<inttypes.>, <stdint.h>): Include if available.
565 (uintptr_t): New type, if system lacks it.
566 (CALLOC, MALLOC, REALLOC): New macros.
567 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
568 new macros.
569
570 * src/tables.c (table_size): Now int, to pacify GCC.
571 (table_grow, table_ninf_remap): Use signed table size.
572 (save_row): Don't bother initializing locals when not needed.
573 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
574 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
575
576 * src/vcg.h: Correct misspellings.
577
578 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
579
580
581 * src/getargs.c (getargs): Don't assume EOF == -1.
582
583 2002-12-09 Paul Eggert <eggert@twinsun.com>
584
585 Change identifier spellings to avoid collisions with names
586 that are reserved by POSIX.
587
588 Don't use names ending in _t, since POSIX reserves them.
589 For consistency, remove _e and _s endings -- they're weren't
590 needed to remove ambiguity. All uses changed.
591 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
592 turn was just renamed from struniq_t.
593 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
594 which in turn was just renamed from struniq_processor_t.
595 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
596 in turn was renamed from hash_compare_struniq_t.
597 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
598 (state_list): Renamed from state_list_t.
599 * src/assoc.h (assoc): Renamed from assoc_t.
600 * src/conflicts.c (enum conflict_resolution): Renamed from
601 enum conflict_resolution_e.
602 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
603 (rule_list): Renamed from rule_list_t.
604 * src/getargs.h (enum trace): Renamed from enum trace_e.
605 (enum report): Renamed from enum report_e.
606 * src/gram.h (item_number): Renamed from item_number_t.
607 (rule_number): Renamed from rule_number_t.
608 (struct rule_s): Remove the "rule_s" part; not used.
609 (rule): Renamed from rule_t.
610 (rule_filter): Renamed from rule_filter_t.
611 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
612 (goto_list): Renamed from goto_list_t.
613 * src/lalr.h (goto_number): Renamed from goto_number_t.
614 * src/location.h (location): Renamed from location_t.
615 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
616 and moved here from:
617 * src/muscle_tab.h (muscle_entry_t): here.
618 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
619 (rule_list): Renamed from rule_list_t.
620 * src/print_graph.c (static_graph): Renamed from graph.
621 * src/reader.h (braced_code): Renamed from braced_code_t.
622 Remove brace_code_e tag.
623 * src/relation.h (relation_node): Renamed from relation_node_t.
624 (relation_nodes): Renamed from relation_nodes_t.
625 (relation): Renamed from relation_t.
626 * src/state.h (state_number): Renamed from state_number_t.
627 (struct state): Renamed from struct state_s.
628 (state): Renamed from state_t.
629 (transitions): Renamed from transitions_t. Unused (and
630 misspelled) transtion_s tag removed.
631 (errs): Renamed from errs_t. Unused errs_s tag removed.
632 (reductions): Renamed from reductions_t. Unused tag
633 reductions_s removed.
634 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
635 (struct symbol_list): Renamed from struct symbol_list_s.
636 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
637 (struct symbol): Renamed from struct symbol_s.
638 (symbol): Renamed from symbol_t.
639 * src/tables.c (vector_number): Renamed from vector_number_t.
640 (action_number): Renamed from action_t.
641 * src/tables.h (base_number): Renamed from base_t.
642 * src/vcg.h (enum color): Renamed from enum color_e.
643 (enum textmode): Renamed from enum textmode_e.
644 (enum shape): Renamed from enum shape_e.
645 (struct colorentry): Renamed from struct colorentry_s.
646 (struct classname): Renamed from struct classname_s.
647 (struct infoname): Renamed from struct infoname_s.
648 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
649 (enum decision): Renamed from enum decision_e.
650 (enum orientation): Renamed from enum orientation_e.
651 (enum alignment): Renamed from enum alignment_e.
652 (enum arrow_mode): Renamed from enum arrow_mode_e.
653 (enum crossing_type): Renamed from enum crossing_type_e.
654 (enum view): Renamed from enum view_e.
655 (struct node): Renamed from struct node_s.
656 (node): Renamed from node_t.
657 (enum linestyle): Renamed from enum linestyle_e.
658 (enum arrowstyle): Renamed from enum arrowstyle_e.
659 (struct edge): Renamed from struct edge.
660 (edge): Renamed from edge_t.
661 (struct graph): Renamed from struct graph_s.
662 (graph): Renamed from graph_t.
663 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
664 Rename value_t -> value.
665 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
666 value_t_as_yystype -> value_as_yystype.
667
668 Don't include <errno.h> in the mainstream code, since it
669 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
670 * lib/get-errno.c, lib/get-errno.h: New files.
671 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
672 get-errno.c.
673 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
674 * src/output.c (output_skeleton): Likewise.
675 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
676 instead of errno.
677 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
678 Likewise.
679 (handle_action_dollar, handle_action_at): Likewise.
680 * src/system.h: Do not include <errno.h>.
681 (TAB_EXT): Renamed from EXT_TAB.
682 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
683
684 Avoid str[a-z]*, since <string.h> reserves that name space.
685 Change all instances of "struniq" in names to "uniqstr", and
686 likewise for "STRUNIQ" and "UNIQSTR".
687 * src/uniqstr.c: Renamed from src/struniq.c.
688 * src/uniqstr.h: Renamed from src/struniq.h.
689 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
690 * src/files.c (strsuffix): Remove; unused.
691 (concat2): Renamed from stringappend. Now static.
692 * src/files.h (strsuffix, stringappend): Remove; unused.
693 * src/parse-gram.y (<chars>): Renamed from <string>.
694 (<uniqstr>): Renamed from <struniq>.
695 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
696 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
697 (struct graph_s.expand): Renamed from struct graph_s.stretch.
698 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
699 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
700 (N_EXPAND): Renamed from N_STRETCH.
701
702 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
703 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
704 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
705 Remove; unused.
706 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
707 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
708 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
709 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
710 (BASE_MAXIMUM): Renamed from BASE_MAX.
711 (BASE_MINIMUM): Renamed from BASE_MIN.
712 (ACTION_MAX): Remove; unused.
713 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
714 Unnecessary casts removed from above defines.
715
716
717 Fix misspelling in names.
718 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
719 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
720 G_NODE_ALIGNEMENT.
721
722
723 * lib/timevar.c (timevar_report): Renamed from time_report,
724 for consistency with other names.
725 * lib/timevar.h (timevar_report): New decl.
726 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
727
728
729 Sort include-file uses.
730
731 Reorder all include files under src to be in the order "system.h".
732 then the ../lib include files in angle brackets (alphabetized),
733 then the . include files in double-quotes (alphabetized). Fix
734 dependency breakages encountered in this process, as follows:
735 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
736 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
737 * src/state.h: Include "symtab.h".
738
739 2002-12-08 Paul Eggert <eggert@twinsun.com>
740
741 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
742 since this causes problems when __file__ contains character
743 sequences like "@" that are treated specially by src/scan-skel.l.
744 Instead, just use the file's basename. This fixes the bug
745 reported by Martin Mokrejs in
746 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
747
748 2002-12-06 Paul Eggert <eggert@twinsun.com>
749
750 Add support for rules that do not have trailing semicolons, as
751 POSIX requires. Improve the quality of locations in Bison
752 diagnostics.
753
754 * src/location.c: Include <quotearg.h>.
755 (empty_location): Now const.
756 (location_print): New function. Follow the recommendation of the
757 GNU Coding Standards for locations that span file boundaries.
758 * src/location.h: Do not include <quotearg.h>; no longer needed.
759 (boundary): New type.
760 (location_t): Use it. This allows locations to span file boundaries.
761 All member uses changed: file -> start.file or end.file (as needed),
762 first_line -> start.line, first_column -> start.column,
763 last_line -> end.line, last_column -> end.column.
764 (equal_boundaries): New function.
765 (LOCATION_RESET, LOCATION_STEP): Remove.
766 (LOCATION_PRINT): Remove. All callers changed to use location_print.
767 (empty_location): Now const.
768 (location_print): New decl.
769 * src/parse-gram.y (lloc_default): New function, which handles
770 empty locations more accurately.
771 (YYLLOC_DEFAULT): Use it.
772 (%token COLON): Remove.
773 (%token ID_COLON): New token.
774 (rules): Use it.
775 (declarations, rules): Remove trailing semicolon.
776 (declaration, rules_or_grammar_declaration):
777 Allow empty (";") declaration.
778 (symbol_def): Remove empty actions; no longer needed.
779 (rules_or_grammar_declaration): Remove trailing semicolon.
780 (semi_colon.opt): Remove.
781 * src/reader.h: Include location.h.
782 (scanner_cursor): New decl.
783 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
784 rolling our own.
785 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
786 of *loc.
787 (STEP): Remove. No longer needed, now that adjust_location does
788 the work. All uses removed.
789 (scanner_cursor): New var.
790 (adjust_location): Renamed from extend_location. It now sets
791 *loc and adjusts the scanner cursor. All uses changed.
792 Don't bother testing for CR.
793 (handle_syncline): Remove location arg; now updates scanner cursor.
794 All callers changed.
795 (unexpected_end_of_file): Now accepts start boundary of token or
796 comment, not location. All callers changed. Update scanner cursor,
797 not the location.
798 (SC_AFTER_IDENTIFIER): New state.
799 (context_state): Renamed from c_context. All uses changed.
800 (id_loc, code_start, token_start): New local vars.
801 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
802 processing of Yacc white space and equivalents here.
803 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
804 instead of returning ID immediately, since we need to search for
805 a subsequent colon.
806 (<INITIAL>"'", "\""): Save token_start.
807 (<INITIAL>"%{", "{", "%%"): Save code_start.
808 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
809 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
810 BEGIN context_state at end, not INITIAL.
811 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
812 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
813 Return correct token start.
814 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
815 the start of a character, string or multiline comment is found.
816 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
817 Reduction): Adjust reported locations to match the more-precise
818 results now expected.
819 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
820 * tests/reduce.at (Useless Rules, Reduced Automaton,
821 Underivable Rules): Likewise.
822 * tests/regression.at (Invalid inputs): No longer `expecting ";"
823 or "|"' now that so many other tokens are allowed by the new grammar.
824
825 * src/complain.h (current_file): Remove duplicate decl;
826 current_file is now owned by files.h.
827 * src/complain.c, src/scan-gram.l: Include files.h.
828
829 2002-12-06 Paul Eggert <eggert@twinsun.com>
830
831 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
832 promotes to int; it might be unsigned int.
833 * data/yacc.c (yy_reduce_print): Likewise.
834
835 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
836 be #defined in the prologue, not in the Bison declarations.
837 This fixes Debian Bug 102878, reported by Shaul Karl.
838
839 2002-12-02 Paul Eggert <eggert@twinsun.com>
840
841 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
842 * lib/strtoul.c: New file, from gnulib.
843 This fixes a porting bug reported by Peter Klein in
844 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
845
846 2002-11-30 Paul Eggert <eggert@twinsun.com>
847
848 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
849 and put only a forward declaration in the prologue. This is for
850 consistency with the other scanner helper functions.
851
852 Type clashes now generate warnings, not errors, since it
853 appears that POSIX may allow some grammars with type clashes.
854 * src/reader.c (grammar_current_rule_check): Warn about
855 type clashes instead of complaining.
856 * tests/input.at (Type Clashes): Expect warnings, not complaints.
857
858 Add Yacc library, since POSIX requires it.
859 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
860 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
861 * lib/main.c, lib/yyerror.c: New files.
862
863 gram_error can be static; it need not be extern.
864 * src/reader.h (gram_error): Remove decl.
865 * src/parse-gram.y (gram_error): Now static. Add static decl.
866 (print_token_value): Omit parameter names from forward decl,
867 for consistency.
868
869 2002-11-29 Paul Eggert <eggert@twinsun.com>
870
871 * doc/bison.texinfo: Emphasize that yylex and yyerror must
872 be declared before being used. E.g., one should typically
873 declare them in the prologue. Use GNU coding style in examples.
874 Put "const" consistently after the type it modifies. Mention
875 that C99 supports "inline". Mention that yyerror traditionally
876 returns "int".
877
878 %parse-param and %lex-param now take just one argument, the
879 declaration; the argument name is deduced from the declaration.
880
881 * doc/bison.texinfo (Parser Function, Pure Calling, Error
882 Reporting, Table of Symbols): Document this.
883 * src/parse-gram.y (add_param): New function.
884 (COMMA): Remove.
885 (declaration): Implement new rule for %parse-param and %lex-param.
886 * src/scan-gram.l: "," now elicits a warning, rather than being
887 a token; this is more compatible with byacc.
888 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
889
890 2002-11-27 Paul Eggert <eggert@twinsun.com>
891
892 Rename identifiers to avoid real and potential collisions.
893
894 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
895 to avoid collision with lex macro described by Bruce Lilly in
896 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
897 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
898 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
899 * src/parse-gram.y (print_token_value): Renamed from yyprint.
900 All uses changed.
901 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
902 The name "yycontrol" violates the name space rules, and this stuff
903 wasn't being used anyway.
904 (input): Remove action; this stuff wasn't being used.
905 (gram_error): Rename local variable yylloc -> loc.
906 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
907 (YY_DECL): Don't use "yy" at start of local variables.
908 All uses changed, e.g., yylloc -> loc.
909 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
910 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
911 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
912 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
913
914 * src/parse-gram.y (gram_error): loc is now const *.
915 * src/reader.h (gram_error): Likewise.
916
917 2002-11-24 Paul Eggert <eggert@twinsun.com>
918
919 Version 1.75c.
920
921 * tests/actions.at (Actions after errors): Use an output format
922 more similar to that of the Printers and Destructors test.
923 Test the position of the ';' token too.
924 (Printers and Destructors): Likewise.
925 (Printers and Destructors: %glr-parser): Remove for now, to avoid
926 unnecessarily alarming people when the test fails.
927
928 * data/yacc.c (yyerrlab1): Move this label down, so that the
929 parser does not discard the lookahead token if the user code
930 invokes YYERROR. This change is required for POSIX conformance.
931
932 * lib/error.c: Sync with gnulib.
933
934 2002-11-22 Paul Eggert <eggert@twinsun.com>
935
936 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
937 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
938 * lib/xmalloc.c: Likewise.
939
940 2002-11-20 Paul Eggert <eggert@twinsun.com>
941
942 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
943
944 2002-11-20 Paul Eggert <eggert@twinsun.com>
945
946 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
947 should use `if (! x) abort ();' rather than `assert (x);', and
948 anyway it's one less thing to worry about configuring.
949
950 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
951 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
952 and replace all instances of assert with abort.
953 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
954 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
955
956 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
957 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
958 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
959 hash_find_entry, hash_rehash, hash_insert): Likewise.
960 * src/conflicts.c (resolve_sr_conflict): Likewise.
961 * src/lalr.c (set_goto_map, map_goto): Likewise.
962 * src/nullable.c (nullable_compute): Likewise.
963 * src/output.c (prepare_rules, token_definitions_output): Likewise.
964 * src/reader.c (packgram, reader): Likewise.
965 * src/state.c (state_new, state_free, state_transitions_set,
966 state_reduction_find): Likewise.
967 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
968 symbol_pack): Likewise.
969 * src/tables.c (conflict_row, pack_vector): Likewise.
970 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
971 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
972 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
973 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
974
975 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
976 (ARGMATCH_CONSTRAINT): New macro.
977 (ARGMATCH_ASSERT): Use it.
978
979 * src/system.h (verify): New macro.
980 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
981 rather than assert.
982 * src/tables.c (tables_generate): Likewise.
983
984 * src/struniq.c (struniq_assert): Now returns void, and aborts
985 if the assertion is false.
986 (struniq_assert_p): Remove.
987 * src/struniq.h: Likewise.
988
989 2002-11-18 Paul Eggert <eggert@twinsun.com>
990
991 * data/glr.c (yygetLRActions): Replace `yyindex' with
992 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
993 This fixes the regression with Sun ONE Studio 7 cc that I reported in
994 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
995
996 2002-11-18 Akim Demaille <akim@epita.fr>
997
998 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
999 space.
1000 From Tim Van Holder.
1001
1002 2002-11-17 Paul Eggert <eggert@twinsun.com>
1003
1004 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1005 to "SyntaxError" for consistency with my 2002-11-15 change.
1006
1007 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1008 not define to {}, since this breaks the common use of `YYDPRINTF
1009 ((...));' if a single statement is desired (e.g. before `else').
1010 Work around GCC warnings by surrounding corresponding calls with
1011 {} if needed.
1012 (yyhasResolvedValue): Remove unused function.
1013 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1014 loop body.
1015 (yyreportSyntaxError): Renamed from yyreportParseError.
1016 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1017 All uses changed.
1018 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1019 extern when possible. Remove unused initializations.
1020
1021 2002-11-16 Akim Demaille <akim@epita.fr>
1022
1023 Augment the similarity between GLR and LALR traces.
1024
1025 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1026 (YY_REDUCE_PRINT): New.
1027 (yyparse): Use them.
1028 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1029 YYDPRINT here.
1030 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1031 state reached after the reduction/recovery, since...
1032 (yyparse, yyprocessOneStack): Report the state we are entering in.
1033
1034 2002-11-16 Akim Demaille <akim@epita.fr>
1035
1036 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1037 Add support for --trace=skeleton.
1038 * src/scan-skel.l: %option debug.
1039 Scan strings of non-@ or \n instead of character by character.
1040 (scan_skel): Handle trace_skeleton.
1041 (QPUTS): New.
1042 (@output_parser_name@, @output_header_name@): ``Restore'' their
1043 support (used to be M4 macros).
1044 * data/yacc.c: Quote larger chunks, a la glr.c.
1045 * data/lalr1.cc: Likewise.
1046 The header guards are no longer available, so use some other
1047 string than `YYLSP_NEEDED'.
1048
1049 2002-11-16 Akim Demaille <akim@epita.fr>
1050
1051 Make the ``Printers and Destructors'' test more verbose, taking
1052 `yacc.c''s behavior as (possibly wrong) reference.
1053
1054 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1055 instead of fprint on stdout.
1056 Set and report the last_line of the symbols.
1057 Consistently display values and locations.
1058
1059 2002-11-16 Paul Eggert <eggert@twinsun.com>
1060
1061 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1062
1063 2002-11-15 Paul Eggert <eggert@twinsun.com>
1064
1065 * tests/actions.at (Actions after errors): New test case.
1066
1067 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1068 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1069 tests/action.at, tests/calc.at, tests/conflicts.at,
1070 tests/cxx-type.at, tests/regression.at:
1071 "parse error" -> "syntax error" for POSIX compatibility.
1072 "parsing stack overflow..." -> "parser stack overflow" so
1073 that code matches Bison documentation.
1074
1075 2002-11-15 Akim Demaille <akim@epita.fr>
1076
1077 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1078 take two BRACED_CODE, not two string_content.
1079 Free the scanner's obstack when we are done.
1080 (code_content): New.
1081 * tests/calc.at: Adjust.
1082 * doc/bison.texinfo: Adjust.
1083 Also, make sure to include the `,' for these declarations.
1084
1085 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1086
1087 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1088 definition; avoids potential autoreconf problems.
1089
1090 2002-11-15 Akim Demaille <akim@epita.fr>
1091
1092 Always check the value returned by yyparse.
1093
1094 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1095 returned by yyparse.
1096 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1097 Adjust calls.
1098 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1099 returned by yyparse.
1100
1101 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1102
1103 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1104 on input.at test.
1105
1106 2002-11-14 Paul Eggert <eggert@twinsun.com>
1107
1108 * src/output.c (output_skeleton): Call xfopen instead of
1109 duplicating xfopen's body.
1110
1111 Fix bugs reported by Nelson H. F. Beebe in
1112 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1113
1114 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1115 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1116 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1117 file twice in the grammar, as an extra check.
1118
1119 * tests/input.at (Torturing the Scanner): Surround the
1120 backslash-newline tests with "#if 0", to make it less likely that
1121 we'll run into compiler bugs. Bring back solitary \ inside
1122 comment, but add a closing comment to work around HP C bug. Don't
1123 test backslash-newline in C character constant.
1124
1125 2002-11-14 Akim Demaille <akim@epita.fr>
1126
1127 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1128 status of the compiler.
1129 Calling `exit 1' is no longer needed.
1130 Reported by Nelson H. F. Beebe.
1131
1132 2002-11-14 Akim Demaille <akim@epita.fr>
1133
1134 * tests/atlocal.in (CPPFLAGS): We have config.h.
1135 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1136 New.
1137 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1138 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1139 * tests/regression.at, tests/torture.at: Use them for all the
1140 grammars that are to be compiled.
1141 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1142 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1143 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1144
1145 2002-11-14 Akim Demaille <akim@epita.fr>
1146
1147 * doc/bison.texinfo: Various formatting changes (alignments in
1148 samples, additional @group/@end group, GCS in samples.
1149 Use @deffn instead of simple @table to define the directives,
1150 macros, variables etc.
1151
1152 2002-11-13 Paul Eggert <eggert@twinsun.com>
1153
1154 Fix some bugs reported by Albert Chin-A-Young in
1155 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1156
1157 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1158 -o c"; the HP C compiler chatters during compilation.
1159 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1160 * tests/headers.at (export YYLTYPE): Likewise.
1161
1162 * tests/input.at (Torturing the Scanner): Remove lines containing
1163 solitary backslashes, as they tickle a bug in the HP C compiler.
1164
1165 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1166 comments, since they're not portable. Use GNU coding style.
1167
1168 2002-11-13 Akim Demaille <akim@epita.fr>
1169
1170 * data/yacc.c: Leave bigger chunks of quoted text.
1171 (YYDSYMPRINTF): New.
1172 Use it to report symbol activities.
1173 * data/glr.c (YYDSYMPRINTF): New.
1174 Use it.
1175
1176 2002-11-12 Paul Eggert <eggert@twinsun.com>
1177
1178 Version 1.75b.
1179
1180 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1181 (yyglrReduce): Return yyok, not 0.
1182 This should avoid the enumerated-type warnings reported
1183 by Nelson H. F. Beebe in
1184 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1185
1186 * lib/bbitset.h (BITSET_INLINE): Remove.
1187 * lib/bitset.h [! BITSET_INLINE]: Remove.
1188 (bitset_set, bitset_reset, bitset_test): Rename local vars
1189 to avoid shadowing warnings by GCC.
1190
1191 * data/glr.c (inline): Remove #define. It's the user's
1192 responsibility to #define it away, just like 'const'.
1193 This fixes one of the bugs reported by Nelson H. F. Beebe in
1194 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1195
1196 * Makefile.maint (po-check): Scan .l and .y files instead of the
1197 .c and the .h files that they generate. This fixes the bug
1198 reported by Tim Van Holder in:
1199 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1200 Look for N_ as well as for _. Try to avoid matching #define for
1201 N_ and _.
1202 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1203 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1204 * src/scan-gram.l: Revamp regular expressions so that " and '
1205 do not confuse xgettext.
1206
1207 * src/struniq.h (struniq_new): Do not declare the return type
1208 to be 'const'; this violates the C standard.
1209 * src/struniq.c (struniq_new): Likewise.
1210
1211 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1212
1213 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1214 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1215 linker.
1216
1217 2002-11-12 Akim Demaille <akim@epita.fr>
1218
1219 * Makefile.maint: Sync with Autoconf:
1220 (local_updates): New.
1221
1222 2002-11-12 Akim Demaille <akim@epita.fr>
1223
1224 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1225
1226 2002-11-12 Akim Demaille <akim@epita.fr>
1227
1228 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1229 locations.
1230
1231 2002-11-12 Akim Demaille <akim@epita.fr>
1232
1233 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1234 not yyvalue.
1235
1236 2002-11-12 Akim Demaille <akim@epita.fr>
1237
1238 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1239 Use it to test the GLR parser.
1240
1241 2002-11-12 Akim Demaille <akim@epita.fr>
1242
1243 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1244 defines it.
1245 * data/glr.c (yystos): New.
1246 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1247 (YYDSYMPRINT): New.
1248 (yyval): Don't define it, it is handled via M4.
1249 (yyrecoverParseError): Free verbosely the discarded symbols.
1250 * data/yacc.c (yysymprint): Remove, rather...
1251 (b4_yysymprint_generate): invoke.
1252 * data/c.m4 (b4_yysymprint_generate): New.
1253 Accept pointers as arguments, as opposed to the version from
1254 yacc.c.
1255 (b4_yydestruct_generate): Likewise.
1256 * tests/cations.at (Printers and Destructors): Use Bison directives
1257 instead of CPP macros.
1258 Don't rely on internal details.
1259
1260 2002-11-12 Akim Demaille <akim@epita.fr>
1261
1262 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1263 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1264 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1265 it against YYEMPTY and so forth), work on yytoken (i.e., set
1266 it to YYEMPTY etc.).
1267 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1268 (b4_symbol_actions): Remove.
1269 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1270 for 0, end-of-input.
1271
1272 2002-11-12 Akim Demaille <akim@epita.fr>
1273
1274 * doc/bison.texinfo (Destructor Decl): New.
1275
1276 2002-11-12 Akim Demaille <akim@epita.fr>
1277
1278 * src/tables.c (tables_generate): Use free for pointers that
1279 cannot be NULL, not XFREE.
1280 (pack_vector): Use assert, not fatal, for bound violations.
1281 * src/state.c (state_new): Likewise.
1282 * src/reader.c (reader): Likewise.
1283 * src/lalr.c (set_goto_map): Likewise.
1284 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1285 the file name.
1286
1287 2002-11-12 Akim Demaille <akim@epita.fr>
1288
1289 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1290 Restore.
1291 * src/scan-gram.l (last_string): Is global to the file, not to
1292 yylex.
1293 * src/parse-gram.y (input): Don't append the epilogue here,
1294 (epilogue.opt): do it here, and free the scanner's obstack.
1295 * src/reader.c (epilogue_set): Rename as...
1296 (epilogue_augment): this.
1297 * data/c.m4 (b4_epilogue): Defaults to empty.
1298
1299 2002-11-12 Akim Demaille <akim@epita.fr>
1300
1301 * src/getargs.c (long_options): Remove duplicates.
1302 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1303 Remove.
1304 * doc/bison.rnh: Remove.
1305 * doc/bison.texinfo (VMS Invocation): Remove.
1306
1307 2002-11-12 Akim Demaille <akim@epita.fr>
1308
1309 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1310 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1311
1312 Use struniq for symbols.
1313
1314 * src/symtab.h (symbol_t): The tag member is a struniq.
1315 (symbol_type_set): Adjust.
1316 * src/symtab.c (symbol_new): Takes a struniq.
1317 (symbol_free): Don't free the tag member.
1318 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1319 (hash_compare_symbol, hash_symbol): these.
1320 Use the fact that tags as struniqs.
1321 (symbol_get): Use struniq_new.
1322 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1323 Returns a strniq.
1324 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1325 and type members are struniqs.
1326 * src/reader.c (get_merge_function)
1327 (grammar_current_rule_merge_set): Adjust.
1328 (TYPE, current_type): Are struniq.
1329
1330 Use struniq for file names.
1331
1332 * src/files.h, src/files.c (infile): Split into...
1333 (grammar_file, current_file): these.
1334 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1335 * src/reduce.c (reduce_print): Likewise.
1336 * src/getargs.c (getargs): Likewise.
1337 * src/complain.h, src/complain.c: Likewise.
1338 * src/main.c (main): Call struniqs_new early enough to use it for
1339 file names.
1340 Don't free the input file name.
1341
1342 2002-11-12 Akim Demaille <akim@epita.fr>
1343
1344 * src/symtab.c (symbol_free): Remove dead deactivated code:
1345 type_name are properly removed.
1346 Don't use XFREE to free items that cannot be NULL.
1347 * src/struniq.h, src/struniq.c: New.
1348 * src/main.c (main): Initialize/free struniqs.
1349 * src/parse-gram.y (%union): Add astruniq member.
1350 (yyprint): Adjust.
1351 * src/scan-gram.l (<{tag}>): Return a struniq.
1352 Free the obstack bit that used to store it.
1353 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1354
1355 2002-11-11 Paul Eggert <eggert@twinsun.com>
1356
1357 Revamp to fix many (but not all) of the C- and M4-related quoting
1358 problems. Among other things, this fixes the Bison bug reported
1359 by Jan Hubicka when processing the Bash grammar; see:
1360 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1361
1362 Use new @ escapes consistently. Represent brackets with @{ and @}
1363 rather than @<:@ and @:>@, since this works a bit better with dumb
1364 editors like vi. Represent @ with @@, since @ is now consistently
1365 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1366 __ofile__, to avoid unexpected expansions. Similarly, use @output
1367 rather than #output.
1368
1369 * data/c.m4 (b4_copyright): Omit file name from comment, since
1370 the file name could contain "*/".
1371 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1372 be quoted. All uses changed.
1373
1374 * data/glr.c: Use new @ escapes consistently.
1375 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1376 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1377 Remove, since they couldn't handle arbitrary characters in file
1378 names.
1379 * data/lalr1.cc: Likewise.
1380 * data/yacc.c: Likewise.
1381
1382 * src/files.c (output_infix): Remove; all uses removed.
1383 * src/files.h: Likewise.
1384
1385 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1386 mishandled funny characters in file names, and anyway it isn't
1387 needed any more.
1388 * data/yacc.c: Likewise.
1389 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1390
1391 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1392 * data/yacc.c: Likewise.
1393
1394 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1395 strings now.
1396 (muscle_init): Quote filename as a C string.
1397 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1398 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1399 * src/output.c (escaped_file_name_output): New function.
1400 (prepare_symbols): Quote tokens for M4.
1401 (prepare): Don't insert output_infix, output_prefix,
1402 output_parser_name, output_header_name; this is now down by scan-skel.
1403 Insert skeleton as a C string.
1404
1405 * src/output.c (user_actions_output, symbol_destructors_output,
1406 symbol_printers_output): Quote filenames for C and M4.
1407 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1408
1409 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1410 escapes other than \\ and \'; this simplifies the code.
1411 (<SC_STRING>): Likewise, for \\ and \".
1412 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1413 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1414 Use new escapes @{ and @} for [ and ].
1415
1416 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1417 them with auto vars.
1418 Switch to new escape scheme, where @ is the escape character uniformly.
1419 Abort if a stray escape character is found. Avoid unbounded input
1420 buffer when parsing non-escaped text.
1421
1422 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1423 __oline__, #output, $@, and @{ do not have unintended meanings.
1424
1425 2002-11-09 Paul Eggert <eggert@twinsun.com>
1426
1427 Fix the test failure due to GCC warnings described in
1428 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1429 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1430 evaluate to 0 if it's impossible for NINF to be in the respective
1431 table.
1432 (yygetLRActions, yyrecoverParseError): Use them.
1433
1434 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1435 counted in the token inserted at end of file. Now takes
1436 location_t *, not location_t, so that the location can be
1437 adjusted. All uses changed.
1438
1439 * tests/regression.at (Invalid inputs): Adjust wording in
1440 diagnostic to match the new behavior.
1441
1442 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1443 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1444 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1445 abort ();'. This reduces the runtime of the "Many lookaheads"
1446 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1447 GCC 3.2.
1448
1449 2002-11-07 Paul Eggert <eggert@twinsun.com>
1450
1451 * src/parse-gram.y (CHARACTER): Remove unused token.
1452 All uses removed.
1453
1454 * src/scan-gram.l: Remove stack option. We no longer use the
1455 stack, since the stack was never deeper than 1; instead, use the
1456 new auto var c_context to record the stacked value.
1457
1458 Remove nounput option. At an unexpected end of file, we now unput
1459 the minimal input necessary to end cleanly; this simplifies the
1460 code.
1461
1462 Avoid unbounded token sizes where this is easy.
1463
1464 (unexpected_end_of_file): New function.
1465 Use it to systematize the error message on unexpected EOF.
1466 (last-string): Now auto, not static.
1467 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1468 (scanner_last_string_free): Remove; not used.
1469 (percent_percent_count): Move decl to just before use.
1470 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1471 not the (never otherwised-used) CHARACTER.
1472
1473 2002-11-07 Akim Demaille <akim@epita.fr>
1474
1475 Let yyerror always receive the msg as last argument, so that
1476 yyerror can be variadic.
1477
1478 * data/yacc.c (b4_yyerror_args): New.
1479 Use it when calling yyerror.
1480 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1481 Use it when calling yyerror.
1482 * doc/bison.texinfo (Error Reporting): Adjust.
1483 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1484 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1485
1486 2002-11-06 Akim Demaille <akim@epita.fr>
1487
1488 #line should have quoted strings.
1489 Ideally, this should be done by m4_quotearg.
1490
1491 * src/scan-skel.l: Include quotearg.h.
1492 Quote __ofile__.
1493 * src/output.c (symbol_printers_output)
1494 (symbol_destructors_output): Quote the file name.
1495
1496 2002-11-06 Akim Demaille <akim@epita.fr>
1497
1498 * tests/regression.at (Invalid inputs): Adjust to the recent
1499 messages.
1500
1501 2002-11-06 Akim Demaille <akim@epita.fr>
1502
1503 Restore --no-lines.
1504 Reported by Jim Kent.
1505
1506 * data/c.m4 (b4_syncline): New.
1507 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1508 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1509 * src/output.c (user_actions_output): Likewise.
1510 (prepare): Define 'b4_synclines_flag'.
1511 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1512
1513 2002-11-06 Akim Demaille <akim@epita.fr>
1514
1515 * src/main.c (main): Free `infile'.
1516 * src/scan-gram.l (handle_syncline): New.
1517 Recognize `#line'.
1518 * src/output.c (user_actions_output, symbol_destructors_output)
1519 (symbol_printers_output): Use the location's file name, not
1520 infile.
1521 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1522
1523 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1524
1525 * src/tables.c (matching_state): Don't allow states to match if
1526 either has GLR conflict entries.
1527
1528 2002-11-05 Paul Eggert <eggert@twinsun.com>
1529
1530 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1531 "integer out of range" rather than "invalid value".
1532 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1533 accordingly.
1534
1535 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1536 Also, remove one static variable in the scanner.
1537
1538 * src/scan-gram.l (braces_level): Now auto, not static.
1539 Initialize to zero if the compiler is being picky.
1540 (INITIAL): Clear braces_level instead of incrementing it.
1541 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1542 as POSIX 1003.1-2001 requires.
1543 * src/system.h (IF_LINT): New macro, taken from coreutils.
1544 * configure.ac: Define "lint" if --enable-gcc-warnings.
1545
1546 2002-11-05 Akim Demaille <akim@epita.fr>
1547
1548 * src/scan-gram.l: When it starts with `%', complain about the
1549 whole directive, not just that `invalid character: %'.
1550
1551 2002-11-04 Akim Demaille <akim@epita.fr>
1552
1553 * Makefile.maint: Update from Autoconf.
1554 (update, cvs-update, po-update, do-po-update): New.
1555
1556 2002-11-04 Akim Demaille <akim@epita.fr>
1557
1558 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1559 and yyerror.
1560 Have yyerror `use' its arguments.
1561 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1562 returns true when location & yacc & pure & parse-param.
1563 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1564
1565 2002-11-04 Akim Demaille <akim@epita.fr>
1566
1567 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1568 clashes.
1569 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1570 font-lock-mode.
1571 Use complain_at.
1572 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1573 slot 0.
1574
1575 2002-11-03 Paul Eggert <eggert@twinsun.com>
1576
1577 * src/reader.c (get_merge_function, grammar_current_rule_check):
1578 Use consistent diagnostics for reporting type name clashes.
1579 Quote the types with <>, for consistency with Yacc.
1580 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1581
1582 2002-11-03 Akim Demaille <akim@epita.fr>
1583
1584 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1585 New.
1586 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1587 (b4_parse_param): Remove.
1588 Use b4_identification.
1589 Propagate b4_pure_args where needed to pass them to yyerror.
1590 * data/glr.m4 (b4_parse_param): Remove.
1591 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1592 (b4_lpure_formals): New.
1593 Use b4_identification.
1594 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1595 b4_user_formals and b4_user_args.
1596 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1597 (yyreportAmbiguity): When using a pure parser, also need
1598 the location, and the parse-params.
1599 Adjust callers.
1600 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1601 When using a pure parser, also need the parse-params.
1602 Adjust callers.
1603 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1604 (%pure-parser + %parse-param) LALR and GLR parsers.
1605 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1606 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1607 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1608 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1609 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1610 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1611 * doc/bison.texinfo: Untabify the whole file.
1612 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1613 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1614 (Error Reporting): Adjust to these new directives.
1615 Document %error-verbose, deprecate YYERROR_VERBOSE.
1616
1617 2002-11-03 Akim Demaille <akim@epita.fr>
1618
1619 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1620 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1621 command line options.
1622 * tests/cxx-type.at: Formatting changes.
1623
1624 2002-11-03 Paul Eggert <eggert@twinsun.com>
1625
1626 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1627 to count columns correctly, and to check for invalid inputs.
1628
1629 Use mbsnwidth to count columns correctly. Account for tabs, too.
1630 Include mbswidth.h.
1631 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1632 (extend_location): New function.
1633 (YY_LINES): Remove.
1634
1635 Handle CRLF in C code rather than in Lex code.
1636 (YY_INPUT): New macro.
1637 (no_cr_read): New function.
1638
1639 Scan UCNs, even though we don't fully handle them yet.
1640 (convert_ucn_to_byte): New function.
1641
1642 Handle backslash-newline correctly in C code.
1643 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1644 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1645 all uses changed.
1646 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1647 Use {splice} wherever C allows backslash-newline.
1648 YY_STEP after space, newline, vertical-tab.
1649 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1650
1651 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1652
1653 ({int}, handle_action_dollar, handle_action_at): Check for integer
1654 overflow.
1655
1656 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1657
1658 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1659 as well as \000. Check for UCHAR_MAX, not 255.
1660 Allow \x with an arbitrary positive number of digits, as in C.
1661 Check for overflow here.
1662 Allow \? and UCNs, for compatibility with C.
1663
1664 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1665 with quote slot used by complain_at.
1666
1667 * tests/input.at: Add tests for backslash-newline, m4 quotes
1668 in symbols, long literals, and funny escapes in strings.
1669
1670 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1671 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1672 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1673 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1674 * m4/mbswidth.m4: New file, from GNU coreutils.
1675
1676 * doc/bison.texinfo (Grammar Outline): Document // comments.
1677 (Symbols): Document that trigraphs have no special meaning in Bison,
1678 nor is backslash-newline allowed.
1679 (Actions): Document that trigraphs have no special meaning.
1680
1681 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1682 no longer used.
1683
1684 2002-11-02 Paul Eggert <eggert@twinsun.com>
1685
1686 * src/reader.c: Don't include quote.h; not needed.
1687 (get_merge_function): Reword warning to be consistent with
1688 type clash diagnostic in grammar_current_rule_check.
1689
1690 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1691 bug in trigraph handling.
1692
1693 * src/output.c (prepare_symbols): When printing token names,
1694 escape "[" as "@<:@" and likewise for "]".
1695
1696 * src/system.h (errno): Remove declaration, as we are now
1697 assuming C89 or better, and C89 guarantees errno.
1698
1699 2002-10-30 Paul Eggert <eggert@twinsun.com>
1700
1701 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1702 Check for close failures.
1703 * src/files.h (xfclose): Return void, not int, since it always
1704 returned zero.
1705 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1706 indicates one.
1707 * src/output.c (output_skeleton): Use xfclose rather than fclose
1708 and ferror. xfclose now checks ferror.
1709
1710 * data/glr.c (YYLEFTMOST_STATE): Remove.
1711 (yyreportTree): Use a stack-based leftmost state. This avoids
1712 our continuing battles with bogus warnings about initializers.
1713
1714 2002-10-30 Akim Demaille <akim@epita.fr>
1715
1716 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1717 #if.
1718
1719 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1720
1721 * tests/glr-regr1.at: New test for reported regressions.
1722 * tests/testsuite.at: Add glr-regr1.at test.
1723 * tests/Makefile.am: Add glr-regr1.at test.
1724
1725 2002-10-24 Paul Eggert <eggert@twinsun.com>
1726
1727 Version 1.75a.
1728
1729 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1730 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1731 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1732 Don't assume strdup exists; POSIX says its an XSI extension.
1733 Check for buffer overflow on input.
1734
1735 2002-10-24 Akim Demaille <akim@epita.fr>
1736
1737 * src/output.c (output_skeleton): Don't disable M4sugar comments
1738 too soon: it results in comments being expanded.
1739 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1740 first output.
1741
1742 2002-10-24 Akim Demaille <akim@epita.fr>
1743
1744 * data/yacc.c (m4_int_type): New.
1745 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1746 char' as only yacc.c wants K&R portability.
1747 * data/glr.c (yysigned_char): Remove.
1748 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1749 Reported by Quoc Peyrot.
1750
1751 2002-10-23 Paul Eggert <eggert@twinsun.com>
1752
1753 * src/main.c (main): With --trace=time, report times even if a
1754 non-fatal error occurs. Formerly, the times were reported in some
1755 such cases but not in others.
1756 * src/reader.c (reader): Just return if a complaint has been issued,
1757 instead of exiting, so that 'main' can report times.
1758
1759 2002-10-22 Akim Demaille <akim@epita.fr>
1760
1761 * src/system.h: Include sys/types.
1762 Reported by Bert Deknuydt.
1763
1764 2002-10-23 Paul Eggert <eggert@twinsun.com>
1765
1766 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1767 Suggested by Art Haas.
1768
1769 2002-10-22 Paul Eggert <eggert@twinsun.com>
1770
1771 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1772 decl; not needed any more.
1773 * src/main.c (main): Use return to exit, undoing yesterday's change.
1774 The last OS that we could find where this wouldn't work is
1775 SunOS 3.5, and that's too old to worry about now.
1776
1777 * data/glr.c (struct yyltype): Define members even when not
1778 doing locations. This is more consistent with yacc.c, and it
1779 works around the following bug reports:
1780 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
1781 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
1782
1783 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1784 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1785 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1786
1787 2002-10-22 Akim Demaille <akim@epita.fr>
1788
1789 * data/README: New.
1790
1791 2002-10-21 Paul Eggert <eggert@twinsun.com>
1792
1793 Be consistent about 'bool'; the old code used an enum in one
1794 module and an int in another, and this violates the C standard.
1795 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1796 * configure.ac (AC_HEADER_STDBOOL): Add.
1797 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1798 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1799 * src/symtab.c (hash_compare_symbol_t): Likewise.
1800 * src/system.h (bool, false, true): Use a definition consistent
1801 with ../lib/hash.c. All uses changed.
1802
1803 * src/complain.c (warning_issued): Renamed from warn_message_count,
1804 so that we needn't worry about integer overflow (!).
1805 Now of type bool. All uses changed.
1806 (complaint_issued): Renamed from complain_message_count; likewise.
1807
1808 * src/main.c (main): Use exit to exit with failure.
1809
1810 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
1811 rather than 1 and 0.
1812 * src/main.c (main): Likewise.
1813 * src/getargs.c (getargs): Likewise.
1814 * src/reader.c (reader): Likewise.
1815
1816 * src/getarg.c (getargs): Remove duplicate code for
1817 "Try `bison --help'".
1818
1819 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
1820 What was that "2" for?
1821
1822 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
1823 * src/getargs.c (usage): Likewise.
1824
1825 * src/getargs.c (getargs): When there are too few operands, report
1826 the last one. When there are too many, report the first extra
1827 one. This is how diffutils does it.
1828
1829 2002-10-20 Paul Eggert <eggert@twinsun.com>
1830
1831 Remove K&R vestiges.
1832 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
1833 * src/complain.c (VA_START): Remove. Assume prototypes.
1834 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
1835 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
1836 fatal): Assume prototypes.
1837 * src/complain.h: Assume prototypes.
1838 * src/system.h (PARAMS): Remove.
1839 Include <limits.h> unconditionally, since it's guaranteeed even
1840 for a freestanding C89 compiler.
1841 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
1842 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
1843
1844 2002-10-20 Akim Demaille <akim@epita.fr>
1845
1846 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
1847 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
1848 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
1849 (yyresolveStates, yyresolveAction, yyresolveStack)
1850 (yyprocessOneStack): Use them.
1851 (yy_reduce_print): New.
1852 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
1853
1854 2002-10-20 Akim Demaille <akim@epita.fr>
1855
1856 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
1857 arguments and output `void'.
1858 (b4_c_function): Rename as...
1859 (b4_c_function_def): this.
1860 (b4_c_function_decl, b4_c_ansi_function_def)
1861 (b4_c_ansi_function_decl): New.
1862 Change the interpretation of the arguments: before `int, foo', now
1863 `int foo, foo'.
1864 * data/yacc.c (yyparse): Prototype and define thanks to these.
1865 Adjust b4_c_function_def uses.
1866 * data/glr.c (yyparse): Likewise, but ANSI only.
1867
1868 2002-10-20 Akim Demaille <akim@epita.fr>
1869
1870 * src/output.c (prepare): Move the definition of `tokens_number',
1871 `nterms_number', `undef_token_number', `user_token_number_max'
1872 to...
1873 (prepare_tokens): Here.
1874 (prepare_tokens): Rename as...
1875 (prepare_symbols): this.
1876 (prepare): Move the definition of `rules_number' to...
1877 (prepare_rules): here.
1878 (prepare): Move the definition of `last', `final_state_number',
1879 `states_number' to...
1880 (prepare_states): here.
1881 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
1882
1883 2002-10-20 Akim Demaille <akim@epita.fr>
1884
1885 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1886
1887 2002-10-20 Akim Demaille <akim@epita.fr>
1888
1889 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
1890 * data/c.m4: here.
1891
1892 2002-10-20 Akim Demaille <akim@epita.fr>
1893
1894 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
1895 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
1896 `pair'.
1897 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
1898 `name' to...
1899 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
1900 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
1901 These.
1902
1903 2002-10-19 Paul Eggert <eggert@twinsun.com>
1904
1905 Do not create a temporary file, as that involves security and
1906 cleanup headaches. Instead, use a pair of pipes.
1907 Derived from a suggestion by Florian Krohm.
1908 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
1909 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
1910 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
1911 (BISON_PREREQ_SUBPIPE): Add.
1912 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
1913 Add subpipe.h, subpipe.c.
1914 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
1915 * po/POTFILES.in: Add lib/subpipe.c.
1916 * src/output.c: Include "subpipe.h".
1917 (m4_invoke): Remove decl.
1918 (scan_skel): New decl.
1919 (output_skeleton): Use pipe rather than temporary file for m4 input.
1920 Check that m4sugar.m4 is readable, to avoid deadlock.
1921 Check for pipe I/O error.
1922 * src/scan-skel.l (readpipe): Remove decl.
1923 (scan_skel): New function, to be used in place of m4_invoke.
1924 Read from stream rather than file.
1925
1926 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
1927 float, as this generates a warning on Solaris 8 + GCC 3.2 with
1928 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
1929 this generates a more-accurate value anyway.
1930
1931 * lib/timevar.c (timervar_accumulate): Rename locals to
1932 avoid confusion with similarly-named more-global.
1933 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
1934
1935 * src/output.c (prepare): Use xstrdup to convert char const *
1936 to char *, to avoid GCC warning.
1937
1938 2002-10-19 Akim Demaille <akim@epita.fr>
1939
1940 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
1941 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
1942 Use them to have `calc.y' ready for %pure-parser.
1943 * data/yacc.c (YYLEX): Pass a yylex return type to
1944 b4_c_function_call.
1945
1946 2002-10-19 Akim Demaille <akim@epita.fr>
1947
1948 Prototype support of %lex-param and %parse-param.
1949
1950 * src/parse-gram.y: Add the definition of the %lex-param and
1951 %parse-param tokens, plus their rules.
1952 Drop the `_' version of %glr-parser.
1953 Add the "," token.
1954 * src/scan-gram.l (INITIAL): Scan them.
1955 * src/muscle_tab.c: Comment changes.
1956 (muscle_insert, muscle_find): Rename `pair' as `probe'.
1957 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
1958 (muscle_entry_s): The `value' member is no longer const.
1959 Adjust all dependencies.
1960 * src/muscle_tab.c (muscle_init): Adjust: use
1961 MUSCLE_INSERT_STRING.
1962 Initialize the obstack earlier.
1963 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
1964 (muscle_pair_list_grow): New.
1965 * data/c.m4 (b4_c_function_call, b4_c_args): New.
1966 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
1967 * tests/calc.at: Use %locations, not --locations.
1968 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
1969
1970 2002-10-19 Akim Demaille <akim@epita.fr>
1971
1972 * src/getargs.c (usage): Take status as argument and exit
1973 accordingly.
1974 Report the traditional `Try ... --help' message when status != 0.
1975 (usage, version): Don't take a FILE * as arg, it is pointless.
1976 (getargs): When there is an incorrect number of arguments, make it
1977 an error, and report it GNUlically thanks to `usage ()'.
1978
1979 2002-10-18 Paul Eggert <eggert@twinsun.com>
1980
1981 * data/glr.c (yyreportParseError): Don't assume that sprintf
1982 yields the length of the printed string, as this is not true
1983 on SunOS 4.1.4. Reported by Peter Klein.
1984
1985 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
1986 * tests/conflicts.at (%nonassoc and eof): Likewise.
1987 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
1988
1989 2002-10-17 Akim Demaille <akim@epita.fr>
1990
1991 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
1992 * src/getargs.c (trace_types, trace_args): Adjust.
1993 * src/reader.c (grammar_current_rule_prec_set)
1994 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
1995 Standardize error messages.
1996 And s/@prec/%prec/!
1997 (reader): Use trace_flag to enable scanner/parser debugging,
1998 instead of an adhoc scheme.
1999 * src/scan-gram.l: Remove trailing debugging code.
2000
2001 2002-10-16 Paul Eggert <eggert@twinsun.com>
2002
2003 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2004 MUSCLE_TAB_H.
2005
2006 * NEWS: Officially drop support for building Bison with K&R C,
2007 since it didn't work anyway and it's not worth worrying about.
2008 * Makefile.maint (wget_files): Remove ansi2knr.c.
2009 (ansi2knr.c-url_prefix): Remove.
2010 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2011 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2012 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2013
2014 2002-10-15 Paul Eggert <eggert@twinsun.com>
2015
2016 Stop using the "enum_" trick for K&R-style function definitions;
2017 it confused me, and I was the author! Instead, assume that people
2018 who want to use K&R C compilers (when using these modules in GCC,
2019 perhaps?) will run ansi2knr.
2020
2021 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2022 All uses of "enum_" changed to "enum ".
2023 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2024 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2025
2026 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2027 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2028 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2029 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2030 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2031 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2032 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2033 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2034 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2035 Use function prototypes; this removes the need for declaring
2036 static functions simply to provide their prototypes.
2037 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2038 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2039 bitset_count_, bitset_create, bitset_dump, bitset_first,
2040 bitset_free, bitset_init, bitset_last, bitset_next,
2041 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2042 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2043 bitset_print, bitset_release_memory, bitset_toggle_,
2044 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2045 debug_bitset): Likewise.
2046 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2047 * lib/bitset_stats.c (bitset_log_histogram_print,
2048 bitset_percent_histogram_print, bitset_stats_and,
2049 bitset_stats_and_cmp, bitset_stats_and_or,
2050 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2051 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2052 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2053 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2054 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2055 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2056 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2057 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2058 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2059 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2060 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2061 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2062 bitset_stats_zero): Likewise.
2063 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2064 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2065 bitsetv_dump, debug_bitsetv): Likewise.
2066 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2067 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2068 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2069 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2070 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2071 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2072 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2073 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2074 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2075 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2076 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2077 Likewise.
2078 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2079 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2080 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2081 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2082 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2083 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2084 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2085 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2086 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2087 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2088 lbitset_xor_cmp, lbitset_zero): Likewise.
2089
2090 2002-10-14 Akim Demaille <akim@epita.fr>
2091
2092 Version 1.75.
2093
2094 2002-10-14 Akim Demaille <akim@epita.fr>
2095
2096 * tests/Makefile.am (maintainer-check-posix): New.
2097
2098 2002-10-14 Akim Demaille <akim@epita.fr>
2099
2100 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2101 member.
2102
2103 2002-10-14 Akim Demaille <akim@epita.fr>
2104
2105 * src/tables.c (table_ninf_remap): base -> tab.
2106 Reported by Matt Rosing.
2107
2108 2002-10-14 Paul Eggert <eggert@twinsun.com>
2109
2110 * tests/action.at, tests/calc.at, tests/conflicts.at,
2111 tests/cxx-type.at, tests/headers.at, tests/input.at,
2112 tests/regression.at, tests/synclines.at, tests/torture.at:
2113 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2114 so that the tests still work even if POSIXLY_CORRECT is set.
2115 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2116
2117 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2118 for portability to K&R hosts. Fix typo: signed char is guaranteed
2119 only to 127, not to 128.
2120 * data/glr.c (yysigned_char): New type.
2121 * data/yacc.c (yysigned_char): Likewise.
2122 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2123
2124 2002-10-13 Paul Eggert <eggert@twinsun.com>
2125
2126 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2127 true due to limited range of data type" warning from GCC.
2128
2129 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2130 by wrapping enum yytokentype's definition inside #ifndef
2131 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2132
2133 2002-10-13 Akim Demaille <akim@epita.fr>
2134
2135 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2136 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2137
2138 2002-10-13 Akim Demaille <akim@epita.fr>
2139
2140 * Makefile.maint: Update from Autoconf 2.54.
2141 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2142
2143 2002-10-13 Akim Demaille <akim@epita.fr>
2144
2145 * src/print.c (print_state): Separate the list of solved conflicts
2146 from the other items.
2147 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2148
2149 2002-10-13 Akim Demaille <akim@epita.fr>
2150
2151 Let nondeterministic skeletons be usable with deterministic
2152 tables.
2153
2154 With the patch, GAWK compiled by GCC without -O2 passes its test
2155 suite using a GLR parser driven by LALR tables. It fails with -O2
2156 because `struct stat' gives two different answers on my machine:
2157 88 (definition of an auto var) and later 96 (memset on this var).
2158 Hence the stack is badly corrumpted. The headers inclusion is to
2159 blame: if I move the awk.h inclusion before GLR's system header
2160 inclusion, the two struct stat have the same size.
2161
2162 * src/tables.c (pack_table): Always create conflict_table.
2163 (token_actions): Always create conflict_list.
2164 * data/glr.c (YYFLAG): Remove, unused.
2165
2166 2002-10-13 Akim Demaille <akim@epita.fr>
2167
2168 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2169 (O0FLAGS): New.
2170 (VALGRIND, GXX): New.
2171 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2172 * tests/bison.in: Run $PREBISON a pre-command.
2173 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2174 (maintainer-check-g++): New.
2175 * Makefile.am (maintainer-check): New.
2176
2177 2002-10-13 Akim Demaille <akim@epita.fr>
2178
2179 * data/glr.c: Formatting changes.
2180 Tweak some trace messages to match yacc.c's.
2181
2182 2002-10-13 Akim Demaille <akim@epita.fr>
2183
2184 GLR parsers sometimes raise parse errors instead of performing the
2185 default reduction.
2186 Reported by Charles-Henry de Boysson.
2187
2188 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2189 check the length of the traces when %glr.
2190 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2191 GLR's traces.
2192 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2193 Test GLR parsers.
2194 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2195 (yyltype): Remove the yy prefix from the member names.
2196 (yytable): Complete its comment.
2197 (yygetLRActions): Map error action number from YYTABLE from
2198 YYTABLE_NINF to 0.
2199 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2200 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2201 not satisfying as we could compare an YYACTION computed from
2202 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2203 only value for error actions.
2204 (yyreportParseError): In verbose parse error messages, don't issue
2205 `error' in the list of expected tokens.
2206 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2207 next action to perform to match glr.c's decoding.
2208 (yytable): Complete its comment.
2209
2210 2002-10-13 Paul Eggert <eggert@twinsun.com>
2211
2212 Fix problem reported by Henrik Grubbstroem in
2213 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2214 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2215 because the Bison parser reads the second action before reducing
2216 the first one.
2217 * src/scan-gram.l (rule_length): New static var.
2218 Use it to keep track of the rule length in the scanner, since
2219 we can't expect the parser to be in lock-step sync with the scanner.
2220 (handle_action_dollar, handle_action_at): Use this var.
2221 * tests/actions.at (Exotic Dollars): Test for the problem.
2222
2223 2002-10-12 Paul Eggert <eggert@twinsun.com>
2224
2225 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2226 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2227 Include <sys/time.h> when checking for clock_t and struct tms.
2228 Use same include order as source.
2229 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2230 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2231
2232 * lib/timevar.c: Update copyright date and clarify comments.
2233 (get_time) [IN_GCC]: Keep the GCC version for reference.
2234
2235 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2236 GCC version as of today, then merge Bison's changes.
2237 Change "GCC" to "Bison" in copyright notice. timevar.def's
2238 author is Akim, so change that too.
2239
2240 * src/reader.c (grammar_current_rule_check):
2241 Don't worry about the default action if $$ is untyped.
2242 Prevents bogus warnings reported by Jim Gifford in
2243 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2244
2245 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2246 * data/glr.c, data/lalr1.cc, data/yacc.c:
2247 Output token definitions before the first part of user declarations.
2248 Fixes compatibility problem reported by Jim Gifford for kbd in
2249 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2250
2251 2002-10-11 Paul Eggert <eggert@twinsun.com>
2252
2253 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2254 (yyparse): here. This undoes some of the 2002-07-25 change.
2255 Compatibility problem reported by Ralf S. Engelschall with
2256 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2257
2258 2002-10-11 Akim Demaille <akim@epita.fr>
2259
2260 * tests/regression.at Characters Escapes): New.
2261 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2262 characters.
2263 Reported by Jan Nieuwenhuizen.
2264
2265 2002-10-11 Akim Demaille <akim@epita.fr>
2266
2267 * po/id.po: New.
2268
2269 2002-10-10 Paul Eggert <eggert@twinsun.com>
2270
2271 Portability fixes for bitsets; this also avoids several GCC
2272 warnings.
2273
2274 * lib/abitset.c: Include <stddef.h>, for offsetof.
2275 * lib/lbitset.c: Likewise.
2276
2277 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2278 properly for vectors of objects. Do not assume that adding a
2279 header size to a multiple of a word size yields a value that is
2280 properly aligned for the whole union.
2281 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2282
2283 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2284 unique names for structures.
2285 * lib/ebitset.c (ebitset_bytes): Likewise.
2286 * lib/lbitset.c (lbitset_bytes): Likewise.
2287
2288 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2289 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2290 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2291 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2292 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2293 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2294 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2295 to improve the type-checking that GCC can do.
2296 * lib/bitset.c (bitset_op4_cmp): Likewise.
2297 * lib/bitset_stats.c (bitset_stats_count,
2298 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2299 bitset_stats_copy, bitset_stats_disjoint_p,
2300 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2301 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2302 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2303 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2304 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2305 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2306 bitset_stats_or_and_cmp): Likewise.
2307 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2308 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2309 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2310 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2311
2312 * lib/abitset.h: Include bitset.h, not bbitset.h.
2313 * lib/ebitset.h: Likewise.
2314 * lib/lbitset.h: Likewise.
2315
2316 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2317 All instances of parameters of type enum bitset_opts are now of
2318 type enum_bitset_opts, to conform to the C Standard, and similarly
2319 for enum_bitset_type.
2320 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2321 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2322
2323 Do not use "struct bitset_struct" to mean different things in
2324 different modules. Not only is this confusing, it violates
2325 the C Standard, which requires that structure types in different
2326 modules must be compatible if one is to be passed to the other.
2327 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2328 All instances of "struct bitset_struct *" replaced with "bitset".
2329 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2330 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2331 struct lbitset_struct, struct bitset_stats_struct): New types.
2332 All uses of struct bitset_struct changed to union bitset_union,
2333 etc.
2334 * lib/abitset.c (struct abitset_struct, abitset,
2335 struct bitset_struct): Remove.
2336 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2337 struct bitset_struct): Remove.
2338 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2339 bitset_struct): Remove.
2340 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2341 Likewise.
2342
2343 Do not call a function of type T using a call that assumes the
2344 function is of a different type U. Standard C requires that a
2345 function must be called with a type that is compatible with its
2346 definition.
2347 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2348 New decls.
2349 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2350 New functions.
2351 * lib/ebitset.c (PFV): Remove.
2352 * lib/lbitset.c (PFV): Likewise.
2353 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2354 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2355 decls.
2356 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2357 (ebitset_vtable): Use them.
2358 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2359 lbitset_xor): New functions.
2360 (lbitset_vtable): Use them.
2361
2362 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2363 Declare.
2364
2365 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2366 GCC warning.
2367 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2368 Use offsetof, for simplicity.
2369
2370 2002-10-06 Paul Eggert <eggert@twinsun.com>
2371
2372 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2373 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2374 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2375 which was inadvertently undone by the 2002-09-30 patch.
2376 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2377 the same width as int.
2378
2379 2002-10-04 Paul Eggert <eggert@twinsun.com>
2380
2381 Version 1.50.
2382
2383 * configure.ac (AC_INIT), NEWS: Increment version number.
2384
2385 * doc/bison.texinfo: Minor spelling, grammar, and white space
2386 fixes.
2387 (Symbols): Mention that any negative value returned from yylex
2388 signifies end-of-input. Warn about negative chars. Mention
2389 the portable Standard C character set.
2390
2391 The GNU coding standard says CFLAGS and YFLAGS are reserved
2392 for the installer to set.
2393 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2394 * src/Makefile.am (AM_CFLAGS): Likewise.
2395 (AM_YFLAGS): Renamed from YFLAGS.
2396
2397 Fix some MAX and MIN problems.
2398 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2399 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2400 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2401 * src/reader.c (reader): Use it.
2402
2403 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2404 POSIX 1003.1-2001 has removed fgrep.
2405
2406 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2407
2408 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2409 interpreted as signed.
2410 * lib/ebitset.c (ebitset_list): Fix bug.
2411
2412 2002-10-01 Paul Eggert <eggert@twinsun.com>
2413
2414 More fixes for 64-bit hosts and large bitsets.
2415
2416 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2417 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2418 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2419 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2420 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2421 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2422 bitset_count_): Likewise.
2423 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2424 bitset_first, bitset_last): Likewise.
2425 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2426 bitset_stats_list_reverse, bitset_stats_size,
2427 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2428 Likewise.
2429 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2430 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2431 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2432 bitsetv_reflexive_transitive_closure): Likewise.
2433 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2434 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2435 Likewise.
2436 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2437 Likewise.
2438
2439 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2440 Use size_t, not unsigned int, to count bytes.
2441 * lib/abitset.h (abitset_bytes): Likewise.
2442 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2443 Likewise.
2444 * lib/bitset.h (bitset_bytes): Likewise.
2445 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2446 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2447 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2448 * lib/ebitset.c (ebitset_bytes): Likewise.
2449 * lib/ebitset.h (ebitset_bytes): Likewise.
2450 * lib/lbitset.c (lbitset_bytes): Likewise.
2451 * lib/lbitset.h (lbitset_bytes): Likewise.
2452
2453 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2454 abitset_subset_p, abitset_disjoint_p, abitset_and,
2455 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2456 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2457 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2458 abitset_or_and, abitset_or_and_cmp):
2459 Use bitset_windex instead of unsigned int.
2460 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2461 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2462 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2463 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2464 Likewise.
2465 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2466
2467 * lib/bitset.c (bitset_print):
2468 Use proper printf formats for widths of integer types.
2469 * lib/bitset_stats.c (bitset_percent_histogram_print,
2470 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2471 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2472 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2473 * lib/lbitset.c (lbitset_bytes): Likewise.
2474
2475 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2476 BITSET_SIZE_MAX): New macros.
2477 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2478 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2479 to BITSET_WINDEX_MAX.
2480
2481 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2482 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2483 since we now return the bitset_bindex type (not int).
2484
2485 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2486 when computing sizes.
2487 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2488
2489 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2490 and avoid cast to unsigned.
2491
2492 2002-09-30 Akim Demaille <akim@epita.fr>
2493
2494 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2495 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2496 Updates from Michael Hayes.
2497
2498 2002-09-30 Art Haas <ahaas@neosoft.com>
2499
2500 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2501 invocations.
2502 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2503 defined.
2504
2505 2002-09-27 Akim Demaille <akim@epita.fr>
2506
2507 Version 1.49c.
2508
2509 2002-09-27 Akim Demaille <akim@epita.fr>
2510
2511 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2512 (Because of AC_LIBSOURCE).
2513
2514 2002-09-27 Akim Demaille <akim@epita.fr>
2515
2516 Playing with Autoscan.
2517
2518 * configure.ac: Remove the old LIBOBJ tweaks.
2519 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2520 * lib/strrchr.c: New.
2521 * lib/strtol.c: New, from the Coreutils 4.5.1.
2522
2523 2002-09-27 Akim Demaille <akim@epita.fr>
2524
2525 Playing with Autoscan.
2526
2527 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2528 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2529 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2530 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2531 Coreutils 4.5.1.
2532
2533 2002-09-24 Akim Demaille <akim@epita.fr>
2534
2535 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2536 (Frequently Asked Questions, Parser Stack Overflow): New.
2537
2538 2002-09-13 Akim Demaille <akim@epita.fr>
2539
2540 Playing with autoscan.
2541
2542 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2543 * src/files.c (skeleton_find): Remove, unused.
2544 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2545 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2546
2547 2002-09-13 Akim Demaille <akim@epita.fr>
2548
2549 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2550 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2551
2552 2002-09-13 Akim Demaille <akim@epita.fr>
2553
2554 * configure.ac: Require 2.54.
2555 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2556 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2557 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2558 Remove, provided by Autoconf macros.
2559
2560 2002-09-12 Akim Demaille <akim@epita.fr>
2561
2562 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2563
2564 2002-09-12 Akim Demaille <akim@epita.fr>
2565
2566 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2567 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2568 Reported by Martin Mokrejs.
2569
2570 2002-09-10 Akim Demaille <akim@epita.fr>
2571
2572 * src/parse-gram.y: Associate a human readable string to each
2573 token type.
2574 * tests/regression.at (Invalid inputs): Adjust.
2575
2576 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2577
2578 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2579 with an Autoconf-2.5x style configure.ac.
2580
2581 2002-09-06 Paul Eggert <eggert@twinsun.com>
2582
2583 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2584 exception applies only to yacc.c. This is a modification of a
2585 patch originally suggested by Akim Demaille.
2586
2587 2002-09-06 Akim Demaille <akim@epita.fr>
2588
2589 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2590 here to...
2591 * data/yacc.c: here.
2592
2593 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2594 LocationType.
2595 (b4_ltype): Default to yy::Location from location.hh.
2596
2597 2002-09-04 Jim Meyering <jim@meyering.net>
2598
2599 * data/yacc.c: Guard the declaration of yytoknum also with
2600 `#ifdef YYPRINT', so it is declared only when used.
2601
2602 2002-09-04 Akim Demaille <akim@epita.fr>
2603
2604 * configure.in: Rename as...
2605 * configure.ac: this.
2606 Bump to 1.49c.
2607
2608 2002-09-04 Akim Demaille <akim@epita.fr>
2609
2610 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2611 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2612 translate maintainer only messages.
2613
2614 2002-08-12 Paul Eggert <eggert@twinsun.com>
2615
2616 Version 1.49b.
2617
2618 * Makefile.am (SUBDIRS): Remove intl.
2619 (DISTCLEANFILES): Remove.
2620 * NEWS: Mention that GNU M4 is now required. Clarify what is
2621 meant by "larger grammars". Mention the pt_BR translation.
2622 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2623 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2624 Bump version from 0.11.2 to 0.11.5.
2625 (BISON_PREREQ_STAGE): Remove.
2626 (AM_GNU_GETTEXT): Use external gettext.
2627 (AC_OUTPUT): Remove intl/Makefile.
2628
2629 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2630
2631 * data/glr.c: Include string.h, for strlen.
2632 (yyreportParseError): Use size_t for yysize.
2633 (yy_yypstack): No longer nested inside yypstates, as nested
2634 functions are not portable. Do not assume size_t is the
2635 same width as int.
2636 (yypstates): Do not assume that ptrdiff_t is the same width
2637 as int, and similarly for yyposn and YYINDEX.
2638
2639 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2640
2641 * lib/Makefile.am (INCLUDES): Do not include from the intl
2642 directory, which has been removed.
2643 * src/Makefile.am (INCLUDES): Likewise.
2644
2645 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2646 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2647 New vars.
2648
2649 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2650 * tests/Makefile.am (EXTRA_DIST): Likewise.
2651
2652 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2653 Do not assume that bitset_windex is the same width as unsigned.
2654
2655 * lib/abitset.c (abitset_unused_clear): Do not assume that
2656 bitset_word is the same width as int.
2657 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2658 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2659 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2660 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2661 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2662
2663 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2664 portability to one's complement hosts!).
2665 * lib/ebitset.c (ebitset_op1): Likewise.
2666 * lib/lbitset.c (lbitset_op1): Likewise.
2667
2668 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2669 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2670 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2671 Sync with fileutils.
2672 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2673 lib/gettext.h: Sync with diffutils.
2674
2675 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2676 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2677
2678 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2679 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2680 check for void *.
2681
2682 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2683 size_t; the old version tried to do this but casted improperly.
2684 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2685 (bitset_test): Now returns int, not unsigned long.
2686
2687 * lib/bitset_stats.c: Include "gettext.h".
2688 (_): New macro.
2689 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2690 name locals "index", as it generates unnecessary warnings on some
2691 hosts that have an "index" function.
2692
2693 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2694 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2695 they need translation.
2696 * src/LR0.c (state_list_append, new_itemsets, get_state,
2697 append_states, generate_states): Likewise.
2698 * src/assoc.c (assoc_to_string): Likewise.
2699 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2700 * src/gram.c (grammar_dump): Likewise.
2701 * src/injections.c (injections_compute): Likewise.
2702 * src/lalr.c (lookaheads_print): Likewise.
2703 * src/relation.c (relation_transpose): Likewise.
2704 * src/scan-gram.l: Likewise.
2705 * src/tables.c (table_grow, pack_vector): Likewise.
2706
2707 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2708 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2709 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2710 * m4/mbstate_t.m4: Sync with fileutils.
2711 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2712
2713 * po/LINGUAS: Add pt_BR.
2714 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2715 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2716 lib/timevar.c.
2717 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2718 manual recommends.
2719 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2720
2721 * src/complain.c (strerror_r): Remove decl; not needed.
2722 (strerror): Use same pattern as ../lib/error.c.
2723
2724 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2725
2726 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2727
2728 * src/main.c (main): Cast result of bindtextdomain and textdomain
2729 to void, to avoid a GCC warning when --disable-nls is in effect.
2730
2731 * src/scan-gram.l: Use strings rather than escapes when possible,
2732 to minimize the number of warnings from xgettext.
2733 (handle_action_dollar, handle_action_at): Don't use isdigit,
2734 as it mishandles negative chars and it may not work as expected
2735 outside the C locale.
2736
2737 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2738 this is a GCC extension and is not portable to other compilers.
2739
2740 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2741 Do not include <ctype.h>; no longer needed.
2742 Do not include <malloc.h>; no longer needed (and generates
2743 warnings on OpenBSD 3.0).
2744
2745 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2746 it's not portable.
2747
2748 * tests/regression.at: Do not use 'cc -c input.c -o input';
2749 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2750
2751 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2752 exit status as failure, not just exit status 1. Sun C exits
2753 with status 2 sometimes.
2754
2755 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2756 Use it for the two large tests.
2757
2758 2002-08-02 Akim Demaille <akim@epita.fr>
2759
2760 * src/conflicts.c (conflicts_output): Don't output rules never
2761 reduced here, since anyway that computation doesn't work.
2762 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2763 (rule_useless_p, rule_never_reduced_p): New.
2764 (grammar_rules_partial_print): Use a filter instead of a range.
2765 Display the title only if needed.
2766 (grammar_rules_print): Adjust.
2767 (grammar_rules_never_reduced_report): New.
2768 * src/tables.c (action_row): Move the computation of rules never
2769 reduced to...
2770 (token_actions): here.
2771 * src/main.c (main): Make the parser before making the report, so
2772 that rules never reduced are computed.
2773 Call grammar_rules_never_reduced_report.
2774 * src/print.c (print_results): Report rules never reduced.
2775 * tests/conflicts.at, tests/reduce.at: Adjust.
2776
2777 2002-08-01 Akim Demaille <akim@epita.fr>
2778
2779 Instead of attaching lookaheads and duplicating the rules being
2780 reduced by a state, attach the lookaheads to the reductions.
2781
2782 * src/state.h (state_t): Remove the `lookaheads',
2783 `lookaheads_rule' member.
2784 (reductions_t): Add a `lookaheads' member.
2785 Use a regular array for the `rules'.
2786 * src/state.c (reductions_new): Initialize the lookaheads member
2787 to 0.
2788 (state_rule_lookaheads_print): Adjust.
2789 * src/state.h, src/state.c (state_reductions_find): New.
2790 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2791 (count_rr_conflicts): Adjust.
2792 * src/lalr.c (LArule): Remove.
2793 (add_lookback_edge): Adjust.
2794 (state_lookaheads_count): New.
2795 (states_lookaheads_initialize): Merge into...
2796 (initialize_LA): this.
2797 (lalr_free): Adjust.
2798 * src/main.c (main): Don't free nullable and derives too early: it
2799 is used by --verbose.
2800 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2801
2802 2002-08-01 Akim Demaille <akim@epita.fr>
2803
2804 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
2805 `rule_number_t**'.
2806 (set_derives, free_derives): Rename as...
2807 (derives_compute, derives_free): this.
2808 Adjust all dependencies.
2809 * src/nullable.c (set_nullable, free_nullable): Rename as...
2810 (nullable_compute, nullable_free): these.
2811 (rule_list_t): Store rule_t *, not rule_number_t.
2812 * src/state.c (state_rule_lookaheads_print): Directly compare rule
2813 pointers, instead of their numbers.
2814 * src/main.c (main): Call nullable_free, and derives_free earlier,
2815 as they were lo longer used.
2816
2817 2002-08-01 Akim Demaille <akim@epita.fr>
2818
2819 * lib/timevar.c (get_time): Include children time.
2820 * src/lalr.h (LA, LArule): Don't export them: used with the
2821 state_t.
2822 * src/lalr.c (LA, LArule): Static.
2823 * src/lalr.h, src/lalr.c (lalr_free): New.
2824 * src/main.c (main): Call it.
2825 * src/tables.c (pack_vector): Check whether loc is >= to the
2826 table_size, not >.
2827 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
2828 (tables_generate): do it, since that's also it which allocates
2829 them.
2830 Don't free LA and LArule, main does.
2831
2832 2002-07-31 Akim Demaille <akim@epita.fr>
2833
2834 Separate parser tables computation and output.
2835
2836 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
2837 (conflict_list, conflict_list_cnt, table, check, table_ninf)
2838 (yydefgoto, yydefact, high): Move to...
2839 * src/tables.h, src/tables.c: here.
2840 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2841 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2842 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
2843 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
2844 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
2845 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
2846 (action_row, save_row, token_actions, save_column, default_goto)
2847 (goto_actions, sort_actions, matching_state, pack_vector)
2848 (table_ninf_remap, pack_table, prepare_actions): Move to...
2849 * src/tables.c: here.
2850 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
2851 * src/output.c (token_actions, output_base, output_conflicts)
2852 (output_check): Merge into...
2853 (prepare_actions): this.
2854 (actions_output): Rename as...
2855 (user_actions_output): this.
2856 * src/main.c (main): Call tables_generate and tables_free.
2857
2858 2002-07-31 Akim Demaille <akim@epita.fr>
2859
2860 Steal GCC's --time-report support.
2861
2862 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
2863 stolen/adjusted from GCC.
2864 * m4/stage.m4: Remove time related checks.
2865 * m4/timevar.m4: New.
2866 * configure.in: Adjust.
2867 * src/system.h: Adjust to using timevar.h.
2868 * src/getargs.h, src/getargs.c: Support trace_time for
2869 --trace=time.
2870 * src/main.c (stage): Remove.
2871 (main): Replace `stage' invocations with timevar calls.
2872 * src/output.c: Insert pertinent timevar calls.
2873
2874 2002-07-31 Akim Demaille <akim@epita.fr>
2875
2876 Let --trace have arguments.
2877
2878 * src/getargs.h (enum trace_e): New.
2879 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
2880 (long_options, short_options): --trace/-T takes an optional
2881 argument.
2882 Change all the uses of trace_flag to reflect the new flags.
2883 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
2884
2885 Strengthen `stage' portability.
2886
2887 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
2888 * configure.in: Use it.
2889 Don't check for malloc.h and sys/times.h.
2890 * src/system.h: Include them when appropriate.
2891 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
2892 times and struct tms are available.
2893
2894 2002-07-30 Akim Demaille <akim@epita.fr>
2895
2896 In verbose parse error message, don't report `error' as an
2897 expected token.
2898 * tests/actions.at (Printers and Destructors): Adjust.
2899 * tests/calc.at (Calculator $1): Adjust.
2900 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
2901 error message, do not report the parser accepts the error token in
2902 that state.
2903
2904 2002-07-30 Akim Demaille <akim@epita.fr>
2905
2906 Normalize conflict related messages.
2907
2908 * src/complain.h, src/complain.c (warn, complain): New.
2909 * src/conflicts.c (conflicts_print): Use them.
2910 (conflict_report_yacc): New, extracted from...
2911 (conflicts_print): here.
2912 * tests/conflicts.at, tests/existing.at: Adjust.
2913
2914 2002-07-30 Akim Demaille <akim@epita.fr>
2915
2916 Report rules which are never reduced by the parser: those hidden
2917 by conflicts.
2918
2919 * src/LR0.c (save_reductions): Don't make the final state too
2920 different: save its reduction (accept) instead of having a state
2921 without any action (no shift or goto, no reduce).
2922 Note: the final state is now a ``regular'' state, i.e., the
2923 parsers now contain `reduce 0' as default reduction.
2924 Nevertheless, since they decide to `accept' when yystate =
2925 final_state, they still will not reduce rule 0.
2926 * src/print.c (print_actions, print_reduction): Adjust.
2927 * src/output.c (action_row): Track reduced rules.
2928 (token_actions): Report rules never reduced.
2929 * tests/conflicts.at, tests/regression.at: Adjust.
2930
2931 2002-07-30 Akim Demaille <akim@epita.fr>
2932
2933 `stage' was accidently included in a previous patch.
2934 Initiate its autoconfiscation.
2935
2936 * configure.in: Look for malloc.h and sys/times.h.
2937 * src/main.c (stage): Adjust.
2938 Report only when trace_flag.
2939
2940 2002-07-29 Akim Demaille <akim@epita.fr>
2941
2942 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
2943 state_number_t.
2944 (errs_t): symbol_t*, not symbol_number_t.
2945 (reductions_t): rule_t*, not rule_number_t.
2946 (FOR_EACH_SHIFT): New.
2947 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
2948 * src/print.c, src/print_graph.c: Adjust.
2949
2950 2002-07-29 Akim Demaille <akim@epita.fr>
2951
2952 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
2953
2954 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
2955 (endtoken, accept): these.
2956 * src/reader.c (reader): Set endtoken's default tag to "$end".
2957 Set undeftoken's tag to "$undefined" instead of "$undefined.".
2958 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
2959 Adjust.
2960
2961 2002-07-29 Akim Demaille <akim@epita.fr>
2962
2963 * src/reduce.c (reduce_grammar): When the language is empty,
2964 complain about the start symbol, not the axiom.
2965 Use its location.
2966 * tests/reduce.at (Empty Language): New.
2967
2968 2002-07-26 Akim Demaille <akim@epita.fr>
2969
2970 * src/reader.h, src/reader.c (gram_error): ... can't get
2971 yycontrol without making too strong assumptions on the parser
2972 itself.
2973 * src/output.c (prepare_tokens): Use the real 0th value of
2974 token_translations instead of `0'.
2975 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
2976 visible here.
2977 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
2978 for the time being: %locations ought to provide it to yyerror.
2979
2980 2002-07-25 Akim Demaille <akim@epita.fr>
2981
2982 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
2983 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
2984 * tests/regression.at (Web2c Actions): Adjust.
2985
2986 2002-07-25 Akim Demaille <akim@epita.fr>
2987
2988 Stop storing rules from 1 to nrules + 1.
2989
2990 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
2991 * src/nullable.c, src/output.c, src/print.c, src/reader.c
2992 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
2993 Iterate from 0 to nrules.
2994 Use rule_number_as_item_number and item_number_as_rule_number.
2995 Adjust to `derive' now containing possibly 0.
2996 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
2997 Handle the `- 1' part in rule numbers from/to item numbers.
2998 * src/conflicts.c (log_resolution): Fix the message which reversed
2999 shift and reduce.
3000 * src/output.c (action_row): Initialize default_rule to -1.
3001 (token_actions): Adjust.
3002 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3003 expected output.
3004 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3005
3006 2002-07-25 Akim Demaille <akim@epita.fr>
3007
3008 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3009 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3010 (b4_c_knr_arg_decl): New.
3011 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3012 yyreport_parse_error.
3013
3014 2002-07-25 Akim Demaille <akim@epita.fr>
3015
3016 * data/yacc.c (yyreport_parse_error): New, extracted from...
3017 (yyparse): here.
3018 (yydestruct, yysymprint): Move above yyparse.
3019 Be K&R compliant.
3020
3021 2002-07-25 Akim Demaille <akim@epita.fr>
3022
3023 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3024 replace...
3025 (b4_sint_type, b4_uint_type): these.
3026 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3027 * tests/regression.at (Web2c Actions): Adjust.
3028
3029 2002-07-25 Akim Demaille <akim@epita.fr>
3030
3031 * src/gram.h (TIEM_NUMBER_MAX): New.
3032 (item_number_of_rule_number, rule_number_of_item_number): Rename
3033 as...
3034 (rule_number_as_item_number, item_number_as_rule_number): these.
3035 Adjust dependencies.
3036 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3037 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3038 (symbol_number_to_vector_number): New.
3039 (order): Of vector_number_t* type.
3040 (base_t, BASE_MAX, BASE_MIN): New.
3041 (froms, tos, width, pos, check): Of base_t type.
3042 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3043 (actrow): Of action_number_t type.
3044 (conflrow): Of unsigned int type.
3045 (table_ninf, base_ninf): New.
3046 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3047 (muscle_insert_int_table, muscle_insert_base_table)
3048 (muscle_insert_rule_number_table): New.
3049 (prepare_tokens): Output `toknum' as int_table.
3050 (action_row): Returns a rule_number_t.
3051 Use ACTION_MIN, not SHRT_MIN.
3052 (token_actions): yydefact is rule_number_t*.
3053 (table_ninf_remap): New.
3054 (pack_table): Use it for `base' and `table'.
3055 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3056 replaced with...
3057 (YYPACT_NINF, YYTABLE_NINF): these.
3058 (yypact, yytable): Compute their types instead of hard-coded
3059 `short'.
3060 * tests/regression.at (Web2c Actions): Adjust.
3061
3062 2002-07-19 Akim Demaille <akim@epita.fr>
3063
3064 * src/scan-gram.l (id): Can start with an underscore.
3065
3066 2002-07-16 Akim Demaille <akim@epita.fr>
3067
3068 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3069 Adjust all former `associativity' dependencies.
3070 * src/symtab.c (symbol_new): Default associativity is `undef', not
3071 `right'.
3072 (symbol_check_alias_consistence): Adjust.
3073
3074 2002-07-09 Akim Demaille <akim@epita.fr>
3075
3076 * doc/bison.texinfo: Properly set the ``header'' part.
3077 Use @dircategory ``GNU programming tools'' as per Texinfo's
3078 documentation.
3079 Use @copying.
3080
3081 2002-07-09 Akim Demaille <akim@epita.fr>
3082
3083 * lib/quotearg.h: Protect against multiple inclusions.
3084 * src/location.h (location_t): Add a `file' member.
3085 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3086 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3087 `error_one_per_line' support.
3088
3089 2002-07-09 Akim Demaille <akim@epita.fr>
3090
3091 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3092 * src/reader.c (lineno): Remove.
3093 Adjust all dependencies.
3094 (get_merge_function): Take a location and use complain_at.
3095 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3096 * tests/regression.at (Invalid inputs, Mixing %token styles):
3097 Adjust.
3098
3099 2002-07-09 Akim Demaille <akim@epita.fr>
3100
3101 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3102 recovery rule, and forbid extensions when --yacc.
3103 (gram_error): Use complain_at.
3104 * src/reader.c (reader): Exit if there were parse errors.
3105
3106 2002-07-09 Akim Demaille <akim@epita.fr>
3107
3108 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3109 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3110 Reported by R Blake <blakers@mac.com>.
3111
3112 2002-07-09 Akim Demaille <akim@epita.fr>
3113
3114 * data/yacc.c: Output the copyright notive in the header.
3115
3116 2002-07-03 Akim Demaille <akim@epita.fr>
3117
3118 * src/output.c (froms, tos): Are state_number_t.
3119 (save_column): sp, sp1, and sp2 are state_number_t.
3120 (prepare): Rename `final' as `final_state_number', `nnts' as
3121 `nterms_number', `nrules' as `rules_number', `nstates' as
3122 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3123 unused.
3124 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3125 * data/lalr1.cc (nsym_): Remove, unused.
3126
3127 2002-07-03 Akim Demaille <akim@epita.fr>
3128
3129 * src/lalr.h, src/lalr.c (goto_number_t): New.
3130 * src/lalr.c (goto_list_t): New.
3131 Propagate them.
3132 * src/nullable.c (rule_list_t): New.
3133 Propagate.
3134 * src/types.h: Remove.
3135
3136 2002-07-03 Akim Demaille <akim@epita.fr>
3137
3138 * src/closure.c (print_fderives): Use rule_rhs_print.
3139 * src/derives.c (print_derives): Use rule_rhs_print.
3140 (rule_list_t): New, replaces `shorts'.
3141 (set_derives): Add comments.
3142 * tests/sets.at (Nullable, Firsts): Adjust.
3143
3144 2002-07-03 Akim Demaille <akim@epita.fr>
3145
3146 * src/output.c (prepare_actions): Free `tally' and `width'.
3147 (prepare_actions): Allocate and free `order'.
3148 * src/symtab.c (symbols_free): Free `symbols'.
3149 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3150 * src/output.c (m4_invoke): Move to...
3151 * src/scan-skel.l: here.
3152 (<<EOF>>): Close yyout, and free its name.
3153
3154 2002-07-03 Akim Demaille <akim@epita.fr>
3155
3156 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3157
3158 * src/LR0.c (new_state): Merge into...
3159 (state_list_append): this.
3160 (new_states): Merge into...
3161 (generate_states): here.
3162 (set_states): Don't ensure a proper `errs' state member here, do it...
3163 * src/conflicts.c (conflicts_solve): here.
3164 * src/state.h, src/state.c: Comment changes.
3165 (state_t): Rename member `shifts' as `transitions'.
3166 Adjust all dependencies.
3167 (errs_new): For consistency, also take the values as argument.
3168 (errs_dup): Remove.
3169 (state_errs_set): New.
3170 (state_reductions_set, state_transitions_set): Assert that no
3171 previous value was assigned.
3172 (state_free): New.
3173 (states_free): Use it.
3174 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3175 temporary storage: use `errs' and `nerrs' as elsewhere.
3176 (set_conflicts): Allocate and free this `errs'.
3177
3178 2002-07-02 Akim Demaille <akim@epita.fr>
3179
3180 * lib/libiberty.h: New.
3181 * lib: Update the bitset implementation from upstream.
3182 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3183 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3184 * src/main.c: Adjust bitset stats calls.
3185
3186 2002-07-01 Paul Eggert <eggert@twinsun.com>
3187
3188 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3189 char, so that negative chars don't collide with $.
3190
3191 2002-06-30 Akim Demaille <akim@epita.fr>
3192
3193 Have the GLR tests be `warning' checked, and fix the warnings.
3194
3195 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3196 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3197 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3198 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3199 (yyaddDeferredAction): static.
3200 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3201 (yyreportParseError): yyprefix is const.
3202 yytokenp is used only when verbose.
3203 (yy__GNUC__): Replace with __GNUC__.
3204 (yypdumpstack): yyi is size_t.
3205 (yypreference): Un-yy local variables and arguments, to avoid
3206 clashes with `yyr1'. Anyway, we are not in the user name space.
3207 (yytname_size): be an int, as is compared with ints.
3208 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3209 Use them.
3210 * tests/cxx-gram.at: Use quotation to protect $1.
3211 Use AT_COMPILE to enable warnings hunts.
3212 Prototype yylex and yyerror.
3213 `Use' argc.
3214 Include `string.h', not `strings.h'.
3215 Produce and prototype stmtMerge only when used.
3216 yylex takes a location.
3217
3218 2002-06-30 Akim Demaille <akim@epita.fr>
3219
3220 We spend a lot of time in quotearg, in particular when --verbose.
3221
3222 * src/symtab.c (symbol_get): Store a quoted version of the key.
3223 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3224 Adjust all callers.
3225
3226 2002-06-30 Akim Demaille <akim@epita.fr>
3227
3228 * src/state.h (reductions_t): Rename member `nreds' as num.
3229 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3230 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3231
3232 2002-06-30 Akim Demaille <akim@epita.fr>
3233
3234 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3235 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3236 (shifts_to): Rename as...
3237 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3238 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3239 (TRANSITION_IS_DISABLED, transitions_to): these.
3240
3241 2002-06-30 Akim Demaille <akim@epita.fr>
3242
3243 * src/print.c (print_shifts, print_gotos): Merge into...
3244 (print_transitions): this.
3245 (print_transitions, print_errs, print_reductions): Align the
3246 lookaheads columns.
3247 (print_core, print_transitions, print_errs, print_state,
3248 print_grammar): Output empty lines separator before, not after.
3249 (state_default_rule_compute): Rename as...
3250 (state_default_rule): this.
3251 * tests/conflicts.at (Defaulted Conflicted Reduction),
3252 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3253 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3254
3255 2002-06-30 Akim Demaille <akim@epita.fr>
3256
3257 Display items as we display rules.
3258
3259 * src/gram.h, src/gram.c (rule_lhs_print): New.
3260 * src/gram.c (grammar_rules_partial_print): Use it.
3261 * src/print.c (print_core): Likewise.
3262 * tests/conflicts.at (Defaulted Conflicted Reduction),
3263 (Unresolved SR Conflicts): Adjust.
3264 (Unresolved SR Conflicts): Adjust and rename as...
3265 (Resolved SR Conflicts): this, as was meant.
3266 * tests/regression.at (Web2c Report): Adjust.
3267
3268 2002-06-30 Akim Demaille <akim@epita.fr>
3269
3270 * src/print.c (state_default_rule_compute): New, extracted from...
3271 (print_reductions): here.
3272 Pessimize, but clarify the code.
3273 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3274
3275 2002-06-30 Akim Demaille <akim@epita.fr>
3276
3277 * src/output.c (action_row): Let default_rule be always a rule
3278 number.
3279
3280 2002-06-30 Akim Demaille <akim@epita.fr>
3281
3282 * src/closure.c (print_firsts, print_fderives, closure):
3283 Use BITSET_EXECUTE.
3284 * src/lalr.c (lookaheads_print): Likewise.
3285 * src/state.c (state_rule_lookaheads_print): Likewise.
3286 * src/print_graph.c (print_core): Likewise.
3287 * src/print.c (print_reductions): Likewise.
3288 * src/output.c (action_row): Likewise.
3289 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3290
3291 2002-06-30 Akim Demaille <akim@epita.fr>
3292
3293 * src/print_graph.c: Use report_flag.
3294
3295 2002-06-30 Akim Demaille <akim@epita.fr>
3296
3297 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3298 to...
3299 * src/relation.h, src/relation.c (traverse, relation_digraph)
3300 (relation_print, relation_transpose): New.
3301
3302 2002-06-30 Akim Demaille <akim@epita.fr>
3303
3304 * src/state.h, src/state.c (shifts_to): New.
3305 * src/lalr.c (build_relations): Use it.
3306
3307 2002-06-30 Akim Demaille <akim@epita.fr>
3308
3309 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3310 (item_number_of_rule_number, rule_number_of_item_number): New.
3311 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3312 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3313 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3314 Propagate their use.
3315 Much remains to be done, in particular wrt `shorts' from types.h.
3316
3317 2002-06-30 Akim Demaille <akim@epita.fr>
3318
3319 * src/symtab.c (symbol_new): Initialize the `printer' member.
3320
3321 2002-06-30 Akim Demaille <akim@epita.fr>
3322
3323 * src/LR0.c (save_reductions): Remove, replaced by...
3324 * src/state.h, src/state.c (state_reductions_set): New.
3325 (reductions, errs): Rename as...
3326 (reductions_t, errs_t): these.
3327 Adjust all dependencies.
3328
3329 2002-06-30 Akim Demaille <akim@epita.fr>
3330
3331 * src/LR0.c (state_list_t, state_list_append): New.
3332 (first_state, last_state): Now symbol_list_t.
3333 (this_state): Remove.
3334 (new_itemsets, append_states, save_reductions): Take a state_t as
3335 argument.
3336 (set_states, generate_states): Adjust.
3337 (save_shifts): Remove, replaced by...
3338 * src/state.h, src/state.c (state_shifts_set): New.
3339 (shifts): Rename as...
3340 (shifts_t): this.
3341 Adjust all dependencies.
3342 * src/state.h (state_t): Remove the `next' member.
3343
3344 2002-06-30 Akim Demaille <akim@epita.fr>
3345
3346 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3347 escaped in slot 0.
3348
3349 2002-06-30 Akim Demaille <akim@epita.fr>
3350
3351 Use hash.h for the state hash table.
3352
3353 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3354 (allocate_storage): Use state_hash_new.
3355 (free_storage): Use state_hash_free.
3356 (new_state, get_state): Adjust.
3357 * src/lalr.h, src/lalr.c (states): Move to...
3358 * src/states.h (state_t): Remove the `link' member, no longer
3359 used.
3360 * src/states.h, src/states.c: here.
3361 (state_hash_new, state_hash_free, state_hash_lookup)
3362 (state_hash_insert, states_free): New.
3363 * src/states.c (state_table, state_compare, state_hash): New.
3364 * src/output.c (output_actions): Do not free states now, since we
3365 still need to know the final_state number in `prepare', called
3366 afterwards. Do it...
3367 * src/main.c (main): here: call states_free after `output'.
3368
3369 2002-06-30 Akim Demaille <akim@epita.fr>
3370
3371 * src/state.h, src/state.c (state_new): New, extracted from...
3372 * src/LR0.c (new_state): here.
3373 * src/state.h (STATE_ALLOC): Move to...
3374 * src/state.c: here.
3375 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3376 * src/state.h, src/state.c: here.
3377
3378 2002-06-30 Akim Demaille <akim@epita.fr>
3379
3380 * src/reader.c (gensym): Rename as...
3381 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3382 (getsym): Rename as...
3383 (symbol_get): this.
3384
3385 2002-06-30 Akim Demaille <akim@epita.fr>
3386
3387 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3388 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3389 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3390 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3391
3392 2002-06-30 Akim Demaille <akim@epita.fr>
3393
3394 Make the test suite pass with warnings checked.
3395
3396 * tests/actions.at (Printers and Destructors): Improve.
3397 Avoid unsigned vs. signed issues.
3398 * tests/calc.at: Don't exercise the scanner here, do it...
3399 * tests/input.at (Torturing the Scanner): here.
3400
3401 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3402
3403 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3404 reorganize first lines parallel to yacc.c.
3405
3406 2002-06-28 Akim Demaille <akim@epita.fr>
3407
3408 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3409 (b4_token_enum, b4_token_defines): New, factored from...
3410 * data/lalr1.cc, data/yacc.c, glr.c: here.
3411
3412 2002-06-28 Akim Demaille <akim@epita.fr>
3413
3414 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3415 unused variables.
3416 * src/output.c (merger_output): static.
3417
3418 2002-06-28 Akim Demaille <akim@epita.fr>
3419
3420 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3421 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3422 pacify GCC.
3423 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3424
3425 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3426
3427 Accumulated changelog for new GLR parsing features.
3428
3429 * src/conflicts.c (count_total_conflicts): Change name to
3430 conflicts_total_count.
3431 * src/conflicts.h: Ditto.
3432 * src/output.c (token_actions): Use the new name.
3433 (output_conflicts): Change conflp => conflict_list_heads, and
3434 confl => conflict_list for better readability.
3435 * data/glr.c: Use the new names.
3436 * NEWS: Add self to GLR announcement.
3437
3438 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3439
3440 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3441 Akim Demaille.
3442
3443 * data/bison.glr: Change name to glr.c
3444 * data/glr.c: Renamed from bison.glr.
3445 * data/Makefile.am: Add glr.c
3446
3447 * src/getargs.c:
3448
3449 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3450 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3451
3452 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3453
3454 * data/bison.glr: Be sure to restore the
3455 current #line when returning to the skeleton contents after having
3456 exposed the input file's #line.
3457
3458 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3459
3460 * data/bison.glr: Bring up to date with changes to bison.simple.
3461
3462 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3463
3464 * data/bison.glr: Correct definitions that use b4_prefix.
3465 Various reformatting.
3466 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3467 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3468 yytokenp argument; now part of stack.
3469 (yychar): Define to behave as documented.
3470 (yyclearin): Ditto.
3471
3472 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3473
3474 * src/reader.h: Add declaration for free_merger_functions.
3475
3476 * src/reader.c (merge_functions): New variable.
3477 (get_merge_function): New function.
3478 (free_merger_functions): New function.
3479 (readgram): Check for %prec that is not followed by a symbol.
3480 Handle %dprec and %merge declarations.
3481 (packgram): Initialize dprec and merger fields in rules array.
3482
3483 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3484 conflict_list_cnt, conflict_list_free): New variables.
3485 (table_grow): Also grow conflict_table.
3486 (prepare_rules): Output dprec and merger tables.
3487 (conflict_row): New function.
3488 (action_row): Output conflict lists for GLR parser. Don't use
3489 default reduction in conflicted states for GLR parser so that there
3490 are spaces for the conflict lists.
3491 (save_row): Also save conflict information.
3492 (token_actions): Allocate conflict list.
3493 (merger_output): New function.
3494 (pack_vector): Pack conflict table, too.
3495 (output_conflicts): New function to output yyconflp and yyconfl.
3496 (output_check): Allocate conflict_tos.
3497 (output_actions): Output conflict tables, also.
3498 (output_skeleton): Output b4_mergers definition.
3499 (prepare): Output b4_max_rhs_length definition.
3500 Use 'bison.glr' as default skeleton for GLR parsers.
3501
3502 * src/gram.c (glr_parser): New flag.
3503 (grammar_free): Call free_merger_functions.
3504
3505 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3506 all pairs of conflicting reductions, rather than just all tokens
3507 causing conflicts. Needed to size conflict tables.
3508 (conflicts_output): Modify call to count_rr_conflicts for new
3509 interface.
3510 (conflicts_print): Ditto.
3511 (count_total_conflicts): New function.
3512
3513 * src/reader.h (merger_list): New type.
3514 (merge_functions): New variable.
3515
3516 * src/lex.h (tok_dprec, tok_merge): New token types.
3517
3518 * src/gram.h (rule_s): Add dprec and merger fields.
3519 (glr_parser): New flag.
3520
3521 * src/conflicts.h (count_total_conflicts): New function.
3522
3523 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3524
3525 * doc/bison.texinfo (Generalized LR Parsing): New section.
3526 (GLR Parsers): New section.
3527 (Language and Grammar): Mention GLR parsing.
3528 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3529 Correct typo ("tge" -> "the").
3530
3531 * data/bison.glr: New skeleton for GLR parsing.
3532
3533 * tests/cxx-gram.at: New tests for GLR parsing.
3534
3535 * tests/testsuite.at: Include cxx-gram.at.
3536
3537 * tests/Makefile.am: Add cxx-gram.at.
3538
3539 * src/parse-gram.y:
3540
3541 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3542
3543 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3544
3545 2002-06-27 Akim Demaille <akim@epita.fr>
3546
3547 * src/options.h, src/options.c: Remove.
3548 * src/getargs.c (short_options, long_options): New.
3549
3550 2002-06-27 Akim Demaille <akim@epita.fr>
3551
3552 * data/bison.simple, data/bison.c++: Rename as...
3553 * data/yacc.c, data/lalr1.cc: these.
3554 * doc/bison.texinfo (Environment Variables): Remove.
3555
3556 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3557
3558 * src/getargs.c (report_argmatch): Initialize strtok().
3559
3560 2002-06-20 Akim Demaille <akim@epita.fr>
3561
3562 * data/bison.simple (b4_symbol_actions): New, replaces...
3563 (b4_symbol_destructor, b4_symbol_printer): these.
3564 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3565 user token numbers.
3566
3567 2002-06-20 Akim Demaille <akim@epita.fr>
3568
3569 * data/bison.simple (yydestructor): Rename as...
3570 (yydestruct): this.
3571
3572 2002-06-20 Akim Demaille <akim@epita.fr>
3573
3574 * src/symtab.h, src/symtab.c (symbol_type_set)
3575 (symbol_destructor_set, symbol_precedence_set): The location is
3576 the last argument.
3577 Adjust all callers.
3578
3579 2002-06-20 Akim Demaille <akim@epita.fr>
3580
3581 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3582 internals.
3583 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3584 Takes a location.
3585 * src/symtab.h, src/symtab.c (symbol_class_set)
3586 (symbol_user_token_number_set): Likewise.
3587 Adjust all callers.
3588 Promote complain_at.
3589 * tests/input.at (Type Clashes): Adjust.
3590
3591 2002-06-20 Akim Demaille <akim@epita.fr>
3592
3593 * data/bison.simple (YYLEX): Fix the declaration when
3594 %pure-parser.
3595
3596 2002-06-20 Akim Demaille <akim@epita.fr>
3597
3598 * data/bison.simple (yysymprint): Don't print the token number,
3599 just its name.
3600 * tests/actions.at (Destructors): Rename as...
3601 (Printers and Destructors): this.
3602 Also exercise %printer.
3603
3604 2002-06-20 Akim Demaille <akim@epita.fr>
3605
3606 * data/bison.simple (YYDSYMPRINT): New.
3607 Use it to remove many of the #if YYDEBUG/if (yydebug).
3608
3609 2002-06-20 Akim Demaille <akim@epita.fr>
3610
3611 * src/symtab.h, src/symtab.c (symbol_t): printer and
3612 printer_location are new members.
3613 (symbol_printer_set): New.
3614 * src/parse-gram.y (PERCENT_PRINTER): New token.
3615 Handle its associated rule.
3616 * src/scan-gram.l: Adjust.
3617 (handle_destructor_at, handle_destructor_dollar): Rename as...
3618 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3619 * src/output.c (symbol_printers_output): New.
3620 (output_skeleton): Call it.
3621 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3622 since there are already many grammar files with a user `yyprint'.
3623 Replace the calls to YYPRINT to calls to yysymprint.
3624 * tests/calc.at: Adjust.
3625 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3626 taking advantage of parser very internal details (stack size!).
3627
3628 2002-06-20 Akim Demaille <akim@epita.fr>
3629
3630 * src/scan-gram.l: Complete the scanner with the missing patterns
3631 to pacify Flex.
3632 Use `quote' and `symbol_tag_get' where appropriate.
3633
3634 2002-06-19 Akim Demaille <akim@epita.fr>
3635
3636 * tests/actions.at (Destructors): Augment to test locations.
3637 * data/bison.simple (yydestructor): Pass it the current location
3638 if locations are enabled.
3639 Prototype only when __STDC__ or C++.
3640 Change the argument names to move into the yy name space: there is
3641 user code here.
3642
3643 2002-06-19 Akim Demaille <akim@epita.fr>
3644
3645 * data/bison.simple (b4_pure_if): New.
3646 Use it instead of #ifdef YYPURE.
3647
3648 2002-06-19 Akim Demaille <akim@epita.fr>
3649
3650 * data/bison.simple (b4_location_if): New.
3651 Use it instead of #ifdef YYLSP_NEEDED.
3652
3653 2002-06-19 Akim Demaille <akim@epita.fr>
3654
3655 Prepare @$ in %destructor, but currently don't bind it in the
3656 skeleton, as %location use is not cleaned up yet.
3657
3658 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3659 (handle_action_at): New.
3660 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3661 a braced_code_t and a location as additional arguments.
3662 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3663 unquote one when outputting `b4_dollar_dollar'.
3664 Adjust callers.
3665 * data/bison.simple (b4_eval): Remove.
3666 (b4_symbol_destructor): Adjust.
3667 * tests/input.at (Invalid @n): Adjust.
3668
3669 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3670
3671 * doc/bison.texinfo: Document ability to have multiple
3672 prologue sections.
3673
3674 2002-06-18 Akim Demaille <akim@epita.fr>
3675
3676 * src/files.c (compute_base_names): When computing the output file
3677 names from the input file name, strip the directory part.
3678
3679 2002-06-18 Akim Demaille <akim@epita.fr>
3680
3681 * data/bison.simple.new: Comment changes.
3682 Reported by Andreas Schwab.
3683
3684 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3685
3686 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3687 there are no `label `yyoverflowlab' defined but not used' warnings
3688 when yyoverflow is defined.
3689
3690 2002-06-18 Akim Demaille <akim@epita.fr>
3691
3692 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3693 new member.
3694 (symbol_destructor_set): Adjust.
3695 * src/output.c (symbol_destructors_output): Output the destructor
3696 locations.
3697 Output the symbol name.
3698 * data/bison.simple (b4_symbol_destructor): Adjust.
3699
3700 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3701 and Akim Demaille <akim@epita.fr>
3702
3703 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3704 what's left on the stack when the error recovery hits EOF.
3705 * tests/actions.at (Destructors): Complete to exercise this case.
3706
3707 2002-06-17 Akim Demaille <akim@epita.fr>
3708
3709 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3710 arguments is really empty, not only equal to `[]'.
3711 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3712 member.
3713 (symbol_destructor_set): New.
3714 * src/output.c (symbol_destructors_output): New.
3715 * src/reader.h (brace_code_t, current_braced_code): New.
3716 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3717 (handle_dollar): Rename as...
3718 (handle_action_dollar): this.
3719 (handle_destructor_dollar): New.
3720 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3721 (grammar_declaration): Use it.
3722 * data/bison.simple (yystos): Is always defined.
3723 (yydestructor): New.
3724 * tests/actions.at (Destructors): New.
3725 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3726
3727 2002-06-17 Akim Demaille <akim@epita.fr>
3728
3729 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3730 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3731 rule_length only when needed.
3732 * src/output.c (actions_output, token_definitions_output): Output
3733 the full M4 block.
3734 * src/symtab.c: Don't access directly to the symbol tag, use
3735 symbol_tag_get.
3736 * src/parse-gram.y: Use symbol_list_free.
3737
3738 2002-06-17 Akim Demaille <akim@epita.fr>
3739
3740 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3741 (symbol_list_prepend, get_type_name): Move to...
3742 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3743 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3744 Adjust all callers.
3745 (symbol_list_free): New.
3746 * src/scan-gram.l (handle_dollar): Takes a location.
3747 * tests/input.at (Invalid $n): Adjust.
3748
3749 2002-06-17 Akim Demaille <akim@epita.fr>
3750
3751 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3752 (symbol_list_prepend): New.
3753 * src/parse-gram.y (%union): `list' is a new member.
3754 (symbols.1): New, replaces...
3755 (terms_to_prec.1, nterms_to_type.1): these.
3756 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3757 Take a location as additional argument.
3758 Adjust all callers.
3759
3760 2002-06-15 Akim Demaille <akim@epita.fr>
3761
3762 * src/parse-gram.y: Move %token in the declaration section so that
3763 we don't depend upon CVS Bison.
3764
3765 2002-06-15 Akim Demaille <akim@epita.fr>
3766
3767 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3768 * src/print.c (print_core): Use it.
3769
3770 2002-06-15 Akim Demaille <akim@epita.fr>
3771
3772 * src/conflicts.c (log_resolution): Accept the rule involved in
3773 the sr conflicts instead of the lookahead number that points to
3774 that rule.
3775 (flush_reduce): Accept the current lookahead vector as argument,
3776 instead of the index in LA.
3777 (resolve_sr_conflict): Accept the current number of lookahead
3778 bitset to consider for the STATE, instead of the index in LA.
3779 (set_conflicts): Adjust.
3780 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3781
3782 2002-06-15 Akim Demaille <akim@epita.fr>
3783
3784 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3785 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3786 Adjust all dependencies.
3787 * src/lalr.c (initialize_lookaheads): Split into...
3788 (states_lookaheads_count, states_lookaheads_initialize): these.
3789 (lalr): Adjust.
3790
3791 2002-06-15 Akim Demaille <akim@epita.fr>
3792
3793 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3794 out of...
3795 (grammar_rules_print): here.
3796 * src/reduce.c (reduce_output): Use it.
3797 * tests/reduce.at (Useless Rules, Reduced Automaton)
3798 (Underivable Rules): Adjust.
3799
3800 2002-06-15 Akim Demaille <akim@epita.fr>
3801
3802 Copy BYacc's nice way to report the grammar.
3803
3804 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
3805 New.
3806 Don't print the rules' location, it is confusing and useless.
3807 (rule_print): Use grammar_rhs_print.
3808 * src/print.c (print_grammar): Use grammar_rules_print.
3809
3810 2002-06-15 Akim Demaille <akim@epita.fr>
3811
3812 Complete and rationalize `useless thing' warnings.
3813
3814 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
3815 (symbol_tag_print): New.
3816 Use them everywhere in place of accessing directly the tag member.
3817 * src/gram.h, src/gram.c (rule_print): New.
3818 Use it where a rule used to be printed `by hand'.
3819 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
3820 (reduce_grammar_tables): Report the useless rules.
3821 (reduce_print): Useless things are a warning, not an error.
3822 Report it as such.
3823 * tests/reduce.at (Useless Nonterminals, Useless Rules):
3824 (Reduced Automaton, Underivable Rules): Adjust.
3825 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
3826 * tests/conflicts.at (Unresolved SR Conflicts)
3827 (Solved SR Conflicts): Adjust.
3828
3829 2002-06-15 Akim Demaille <akim@epita.fr>
3830
3831 Let symbols have a location.
3832
3833 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
3834 (getsym): Adjust.
3835 Adjust all callers.
3836 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
3837 Use location_t, not int.
3838 * src/symtab.c (symbol_check_defined): Take advantage of the
3839 location.
3840 * tests/regression.at (Invalid inputs): Adjust.
3841
3842 2002-06-15 Akim Demaille <akim@epita.fr>
3843
3844 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
3845 (input): Don't try to initialize yylloc here, do it in the
3846 scanner.
3847 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
3848 * src/gram.h (rule_t): Change line and action_line into location
3849 and action_location, of location_t type.
3850 Adjust all dependencies.
3851 * src/location.h, src/location.c (empty_location): New.
3852 * src/reader.h, src/reader.c (grammar_start_symbol_set)
3853 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
3854 (grammar_current_rule_symbol_append)
3855 (grammar_current_rule_action_append): Expect a location as argument.
3856 * src/reader.c (grammar_midrule_action): Adjust to attach an
3857 action's location as dummy symbol location.
3858 * src/symtab.h, src/symtab.c (startsymbol_location): New.
3859 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
3860 the line numbers.
3861
3862 2002-06-14 Akim Demaille <akim@epita.fr>
3863
3864 Grammar declarations may be found in the grammar section.
3865
3866 * src/parse-gram.y (rules_or_grammar_declaration): New.
3867 (declarations): Each declaration may end with a semicolon, not
3868 just...
3869 (grammar_declaration): `"%union"'.
3870 (grammar): Branch to rules_or_grammar_declaration.
3871
3872 2002-06-14 Akim Demaille <akim@epita.fr>
3873
3874 * src/main.c (main): Invoke scanner_free.
3875
3876 2002-06-14 Akim Demaille <akim@epita.fr>
3877
3878 * src/output.c (m4_invoke): Extracted from...
3879 (output_skeleton): here.
3880 Free tempfile.
3881
3882 2002-06-14 Akim Demaille <akim@epita.fr>
3883
3884 * src/parse-gram.y (directives, directive, gram)
3885 (grammar_directives, precedence_directives, precedence_directive):
3886 Rename as...
3887 (declarations, declaration, grammar, grammar_declaration)
3888 (precedence_declaration, precedence_declarator): these.
3889 (symbol_declaration): New.
3890
3891 2002-06-14 Akim Demaille <akim@epita.fr>
3892
3893 * src/files.c (action_obstack): Remove, unused.
3894 (output_obstack): Remove it, and all its dependencies, as it is no
3895 longer needed.
3896 * src/reader.c (epilogue_set): Build the epilogue in the
3897 muscle_obstack.
3898 * src/output.h, src/output.c (muscle_obstack): Move to...
3899 * src/muscle_tab.h, src/muscle_tab.h: here.
3900 (muscle_init): Initialize muscle_obstack.
3901 (muscle_free): New.
3902 * src/main.c (main): Call it.
3903
3904 2002-06-14 Akim Demaille <akim@epita.fr>
3905
3906 * src/location.h: New, extracted from...
3907 * src/reader.h: here.
3908 * src/Makefile.am (noinst_HEADERS): Merge into
3909 (bison_SOURCES): this.
3910 Add location.h.
3911 * src/parse-gram.y: Use location_t instead of Bison's.
3912 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
3913 Use location_t instead of ints.
3914
3915 2002-06-14 Akim Demaille <akim@epita.fr>
3916
3917 * data/bison.simple, data/bison.c++: Be sure to restore the
3918 current #line when returning to the skeleton contents after having
3919 exposed the input file's #line.
3920
3921 2002-06-12 Akim Demaille <akim@epita.fr>
3922
3923 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
3924 eager.
3925 * tests/actions.at (Exotic Dollars): New.
3926
3927 2002-06-12 Akim Demaille <akim@epita.fr>
3928
3929 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
3930 ['"/] too eagerly.
3931 * tests/input.at (Torturing the Scanner): New.
3932
3933 2002-06-11 Akim Demaille <akim@epita.fr>
3934
3935 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
3936 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
3937 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
3938 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
3939 * src/reader.c (reader): Use it.
3940
3941 2002-06-11 Akim Demaille <akim@epita.fr>
3942
3943 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
3944 Adjust all callers.
3945 (scanner_last_string_free): New.
3946
3947 2002-06-11 Akim Demaille <akim@epita.fr>
3948
3949 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
3950 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
3951 (last_string, YY_OBS_FREE): New.
3952 Use them when returning an ID.
3953
3954 2002-06-11 Akim Demaille <akim@epita.fr>
3955
3956 Have Bison grammars parsed by a Bison grammar.
3957
3958 * src/reader.c, src/reader.h (prologue_augment): New.
3959 * src/reader.c (copy_definition): Remove.
3960
3961 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
3962 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
3963 (grammar_current_rule_prec_set, grammar_current_rule_check)
3964 (grammar_current_rule_symbol_append)
3965 (grammar_current_rule_action_append): Export.
3966 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
3967 (symbol_list_action_append): Remove.
3968 Hook the routines from reader.
3969 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
3970 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
3971
3972 * src/reader.c (read_declarations): Remove, unused.
3973
3974 * src/parse-gram.y: Handle the epilogue.
3975 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
3976 (grammar_start_symbol_set): this.
3977 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
3978 * src/reader.c (readgram): Remove, unused.
3979 (reader): Adjust to insert eoftoken and axiom where appropriate.
3980
3981 * src/reader.c (copy_dollar): Replace with...
3982 * src/scan-gram.h (handle_dollar): this.
3983 * src/parse-gram.y: Remove `%thong'.
3984
3985 * src/reader.c (copy_at): Replace with...
3986 * src/scan-gram.h (handle_at): this.
3987
3988 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
3989 New.
3990
3991 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
3992 time being.
3993
3994 * src/reader.h, src/reader.c (grammar_rule_end): New.
3995
3996 * src/parse.y (current_type, current_class): New.
3997 Implement `%nterm', `%token' support.
3998 Merge `%term' into `%token'.
3999 (string_as_id): New.
4000 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4001 type name.
4002
4003 * src/parse-gram.y: Be sure to handle properly the beginning of
4004 rules.
4005
4006 * src/parse-gram.y: Handle %type.
4007 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4008
4009 * src/parse-gram.y: More directives support.
4010 * src/options.c: No longer handle source directives.
4011
4012 * src/parse-gram.y: Fix %output.
4013
4014 * src/parse-gram.y: Handle %union.
4015 Use the prologue locations.
4016 * src/reader.c (parse_union_decl): Remove.
4017
4018 * src/reader.h, src/reader.c (epilogue_set): New.
4019 * src/parse-gram.y: Use it.
4020
4021 * data/bison.simple, data/bison.c++: b4_stype is now either not
4022 defined, then default to int, or to the contents of %union,
4023 without `union' itself.
4024 Adjust.
4025 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4026
4027 * src/output.c (actions_output): Don't output braces, as they are
4028 already handled by the scanner.
4029
4030 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4031 characters to themselves.
4032
4033 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4034 that the epilogue has a proper #line.
4035
4036 * src/parse-gram.y: Handle precedence/associativity.
4037
4038 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4039 a terminal.
4040 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4041 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4042 at all to define terminals that cannot be emitted.
4043
4044 * src/scan-gram.l: Escape M4 characters.
4045
4046 * src/scan-gram.l: Working properly with escapes in user
4047 strings/characters.
4048
4049 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4050 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4051 grammar.
4052 Use more modest sizes, as for the time being the parser does not
4053 release memory, and therefore the process swallows a huge amount
4054 of memory.
4055
4056 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4057 stricter %token grammar.
4058
4059 * src/symtab.h (associativity): Add `undef_assoc'.
4060 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4061 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4062
4063 * tests/regression.at (Invalid %directive): Remove, as it is now
4064 meaningless.
4065 (Invalid inputs): Adjust to the new error messages.
4066 (Token definitions): The new grammar doesn't allow too many
4067 eccentricities.
4068
4069 * src/lex.h, src/lex.c: Remove.
4070 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4071 (copy_character, copy_string2, copy_string, copy_identifier)
4072 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4073 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4074 (parse_action): Remove.
4075 * po/POTFILES.in: Adjust.
4076
4077 2002-06-11 Akim Demaille <akim@epita.fr>
4078
4079 * src/reader.c (parse_action): Don't store directly into the
4080 rule's action member: return the action as a string.
4081 Don't require `rule_length' as an argument: compute it.
4082 (grammar_current_rule_symbol_append)
4083 (grammar_current_rule_action_append): New, eved out from
4084 (readgram): here.
4085 Remove `action_flag', `rulelength', unused now.
4086
4087 2002-06-11 Akim Demaille <akim@epita.fr>
4088
4089 * src/reader.c (grammar_current_rule_prec_set).
4090 (grammar_current_rule_check): New, eved out from...
4091 (readgram): here.
4092 Remove `xaction', `first_rhs': useless.
4093 * tests/input.at (Type clashes): New.
4094 * tests/existing.at (GNU Cim Grammar): Adjust.
4095
4096 2002-06-11 Akim Demaille <akim@epita.fr>
4097
4098 * src/reader.c (grammar_midrule_action): New, Eved out from
4099 (readgram): here.
4100
4101 2002-06-11 Akim Demaille <akim@epita.fr>
4102
4103 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4104 New.
4105 (readgram): Use them as replacement of inlined code, crule and
4106 crule1.
4107
4108 2002-06-11 Akim Demaille <akim@epita.fr>
4109
4110 * src/reader.c (grammar_end, grammar_symbol_append): New.
4111 (readgram): Use them.
4112 Make the use of `p' as local as possible.
4113
4114 2002-06-10 Akim Demaille <akim@epita.fr>
4115
4116 GCJ's parser requires the tokens to be defined before the prologue.
4117
4118 * data/bison.simple: Output the token definition before the user's
4119 prologue.
4120 * tests/regression.at (Braces parsing, Duplicate string)
4121 (Mixing %token styles): Check the output from bison.
4122 (Early token definitions): New.
4123
4124 2002-06-10 Akim Demaille <akim@epita.fr>
4125
4126 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4127 assigning twice the same user number to a token, so that we can
4128 use it in...
4129 * src/lex.c (lex): here.
4130 Also use `symbol_class_set' instead of hand written code.
4131 * src/reader.c (parse_assoc_decl): Likewise.
4132
4133 2002-06-10 Akim Demaille <akim@epita.fr>
4134
4135 * src/symtab.c, src/symtab.c (symbol_class_set)
4136 (symbol_user_token_number_set): New.
4137 * src/reader.c (parse_token_decl): Use them.
4138 Use a switch instead of ifs.
4139 Use a single argument.
4140
4141 2002-06-10 Akim Demaille <akim@epita.fr>
4142
4143 Remove `%thong' support as it is undocumented, unused, duplicates
4144 `%token's job, and creates useless e-mail traffic with people who
4145 want to know what it is, why it is undocumented, unused, and
4146 duplicates `%token's job.
4147
4148 * src/reader.c (parse_thong_decl): Remove.
4149 * src/options.c (option_table): Remove "thong".
4150 * src/lex.h (tok_thong): Remove.
4151
4152 2002-06-10 Akim Demaille <akim@epita.fr>
4153
4154 * src/symtab.c, src/symtab.c (symbol_type_set)
4155 (symbol_precedence_set): New.
4156 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4157 (value_components_used): Remove, unused.
4158
4159 2002-06-09 Akim Demaille <akim@epita.fr>
4160
4161 Move symbols handling code out of the reader.
4162
4163 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4164 (axiom): Move to...
4165 * src/symtab.h, src/symtab.c: here.
4166
4167 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4168 * src/reader.c (startval): Rename as...
4169 * src/symtab.h, src/symtab.c (startsymbol): this.
4170 * src/reader.c: Adjust.
4171
4172 * src/reader.c (symbol_check_defined, symbol_make_alias)
4173 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4174 (token_translations_init)
4175 Move to...
4176 * src/symtab.c: here.
4177 * src/reader.c (packsymbols): Move to...
4178 * src/symtab.h, src/symtab.c (symbols_pack): here.
4179 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4180 argument.
4181
4182 2002-06-03 Akim Demaille <akim@epita.fr>
4183
4184 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4185 then statements.
4186
4187 2002-06-03 Akim Demaille <akim@epita.fr>
4188
4189 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4190 structs with non literals.
4191 * src/scan-skel.l: never-interactive.
4192 * src/conflicts.c (enum conflict_resolution_e): No trailing
4193 comma.
4194 * src/getargs.c (usage): Split long literal strings.
4195 Reported by Hans Aberg.
4196
4197 2002-05-28 Akim Demaille <akim@epita.fr>
4198
4199 * data/bison.c++: Use C++ ostreams.
4200 (cdebug_): New member.
4201
4202 2002-05-28 Akim Demaille <akim@epita.fr>
4203
4204 * src/output.c (output_skeleton): Be sure to allocate enough room
4205 for `/' _and_ for `\0' in full_skeleton.
4206
4207 2002-05-28 Akim Demaille <akim@epita.fr>
4208
4209 * data/bison.c++: Catch up with bison.simple:
4210 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4211 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4212 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4213 and popping traces.
4214
4215 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4216
4217 * src/output.c (output_skeleton): Put an explicit path in front of
4218 the skeleton file name, rather than relying on the -I directory,
4219 to partially alleviate effects of having a skeleton file lying around
4220 in the current directory.
4221
4222 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4223
4224 * src/conflicts.c (log_resolution): Correct typo:
4225 obstack_printf should be obstack_fgrow1.
4226
4227 2002-05-26 Akim Demaille <akim@epita.fr>
4228
4229 * src/state.h (state_t): `solved_conflicts' is a new member.
4230 * src/LR0.c (new_state): Set it to 0.
4231 * src/conflicts.h, src/conflicts.c (print_conflicts)
4232 (free_conflicts, solve_conflicts): Rename as...
4233 (conflicts_print, conflicts_free, conflicts_solve): these.
4234 Adjust callers.
4235 * src/conflicts.c (enum conflict_resolution_e)
4236 (solved_conflicts_obstack): New, used by...
4237 (log_resolution): this.
4238 Adjust to attach the conflict resolution to each state.
4239 Complete the description with the precedence/associativity
4240 information.
4241 (resolve_sr_conflict): Adjust.
4242 * src/print.c (print_state): Output its solved_conflicts.
4243 * tests/conflicts.at (Unresolved SR Conflicts)
4244 (Solved SR Conflicts): Exercise --report=all.
4245
4246 2002-05-26 Akim Demaille <akim@epita.fr>
4247
4248 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4249 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4250 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4251 (token_number_t, item_number_as_token_number)
4252 (token_number_as_item_number, muscle_insert_token_number_table):
4253 Rename as...
4254 (symbol_number_t, item_number_as_symbol_number)
4255 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4256 these, since it is more appropriate.
4257
4258 2002-05-26 Akim Demaille <akim@epita.fr>
4259
4260 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4261 `Error:' lines.
4262 * data/bison.simple (yystos) [YYDEBUG]: New.
4263 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4264 error recovery.
4265 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4266
4267 2002-05-25 Akim Demaille <akim@epita.fr>
4268
4269 * doc/bison.texinfo (Debugging): Split into...
4270 (Tracing): this new section, its former contents, and...
4271 (Understanding): this new section.
4272 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4273 by...
4274 (report_flag): this.
4275 Adjust all dependencies.
4276 (report_args, report_types, report_argmatch): New.
4277 (usage, getargs): Report/support -r, --report.
4278 * src/options.h
4279 (struct option_table_struct): Rename as..,
4280 (struct option_table_s): this.
4281 Rename the `set_flag' member to `flag' to match with getopt_long's
4282 struct.
4283 * src/options.c (option_table): Split verbose into an entry for
4284 %verbose, and another for --verbose.
4285 Support --report/-r, so remove -r from the obsolete --raw.
4286 * src/print.c: Attach full item sets and lookaheads reports to
4287 report_flag instead of trace_flag.
4288 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4289
4290 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4291 and Paul Eggert <eggert@twinsun.com>
4292
4293 * data/bison.simple (yyparse): Correct error handling to conform to
4294 POSIX and yacc. Specifically, after syntax error is discovered,
4295 do not reduce further before shifting the error token.
4296 Clean up the code a bit by removing the labels yyerrdefault,
4297 yyerrhandle, yyerrpop.
4298 * NEWS: Document the above.
4299
4300 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4301
4302 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4303 type; it isn't always big enough, since it doesn't necessarily
4304 include non-terminals.
4305 (yytranslate): Expand definition of yy_token_number_type, so that
4306 the latter can be removed.
4307 (yy_token_number_type): Remove, only one use.
4308 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4309 don't use TokenNumberType as element type.
4310
4311 * tests/regression.at: Modify expected output to agree with change
4312 to yyr1 and yytranslate.
4313
4314 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4315
4316 * src/reader.c (parse_action): Use copy_character instead of
4317 obstack_1grow.
4318
4319 2002-05-13 Akim Demaille <akim@epita.fr>
4320
4321 * tests/regression.at (Token definitions): Prototype yylex and
4322 yyerror.
4323
4324 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4325
4326 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4327 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4328 32-bit arithmetic.
4329 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4330
4331 2002-05-07 Akim Demaille <akim@epita.fr>
4332
4333 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4334 avoid GCC warnings.
4335
4336 2002-05-07 Akim Demaille <akim@epita.fr>
4337
4338 Kill GCC warnings.
4339
4340 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4341 over the RHS of each rule.
4342 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4343 * src/state.h (state_t): Member `nitems' is unsigned short.
4344 * src/LR0.c (get_state): Adjust.
4345 * src/reader.c (packgram): Likewise.
4346 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4347 `Type'.
4348 (muscle_insert_int_table): Remove, unused.
4349 (prepare_rules): Remove `max'.
4350
4351 2002-05-06 Akim Demaille <akim@epita.fr>
4352
4353 * src/closure.c (print_firsts): Display of the symbol tags.
4354 (bitmatrix_print): Move to...
4355 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4356 here.
4357 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4358
4359 2002-05-06 Akim Demaille <akim@epita.fr>
4360
4361 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4362 hash_do_for_each.
4363
4364 2002-05-06 Akim Demaille <akim@epita.fr>
4365
4366 * src/LR0.c (new_state, get_state): Instead of using the global
4367 `kernel_size' and `kernel_base', have two new arguments:
4368 `core_size' and `core'.
4369 Adjust callers.
4370
4371 2002-05-06 Akim Demaille <akim@epita.fr>
4372
4373 * src/reader.c (packgram): No longer end `ritem' with a 0
4374 sentinel: it is not used.
4375
4376 2002-05-05 Akim Demaille <akim@epita.fr>
4377
4378 New experimental feature: display the lookaheads in the report and
4379 graph.
4380
4381 * src/print (print_core): When --trace-flag, display the rules
4382 lookaheads.
4383 * src/print_graph.c (print_core): Likewise.
4384 Swap the arguments.
4385 Adjust caller.
4386
4387 2002-05-05 Akim Demaille <akim@epita.fr>
4388
4389 * tests/torture.at (Many lookaheads): New test.
4390
4391 2002-05-05 Akim Demaille <akim@epita.fr>
4392
4393 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4394 (GENERATE_MUSCLE_INSERT_TABLE): this.
4395 (output_int_table, output_unsigned_int_table, output_short_table)
4396 (output_token_number_table, output_item_number_table): Replace with...
4397 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4398 (muscle_insert_short_table, muscle_insert_token_number_table)
4399 (muscle_insert_item_number_table): these.
4400 Adjust all callers.
4401 (prepare_tokens): Don't free `translations', since...
4402 * src/reader.h, src/reader.c (grammar_free): do it.
4403 Move to...
4404 * src/gram.h, src/gram.c (grammar_free): here.
4405 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4406 b4_translate_max.
4407
4408 2002-05-05 Akim Demaille <akim@epita.fr>
4409
4410 * src/output.c (output_unsigned_int_table): New.
4411 (prepare_rules): `i' is unsigned.
4412 `prhs', `rline', `r2' are unsigned int.
4413 Rename muscle `rhs_number_max' as `rhs_max'.
4414 Output muscles `prhs_max', `rline_max', and `r2_max'.
4415 Free rline and r1.
4416 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4417 to compute types instead of constant types.
4418 * tests/regression.at (Web2c Actions): Adjust.
4419
4420 2002-05-04 Akim Demaille <akim@epita.fr>
4421
4422 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4423 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4424 Adjust dependencies.
4425 * src/output.c (token_definitions_output): Be sure not to output a
4426 `#define 'a'' when fed with `%token 'a' "a"'.
4427 * tests/regression.at (Token definitions): New.
4428
4429 2002-05-03 Paul Eggert <eggert@twinsun.com>
4430
4431 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4432 for K&R C.
4433
4434 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4435
4436 * Makefile.am (SUBDIRS): Remove intl.
4437 (EXTRA_DIST): Add config/config.rpath.
4438
4439 2002-05-03 Akim Demaille <akim@epita.fr>
4440
4441 * data/bison.simple (m4_if): Don't output empty enums.
4442 And actually, output valid enum definitions :(.
4443
4444 2002-05-03 Akim Demaille <akim@epita.fr>
4445
4446 * configure.bat: Remove, completely obsolete.
4447 * Makefile.am (EXTRA_DIST): Adjust.
4448 Don't distribute config.rpath...
4449 * config/Makefile.am (EXTRA_DIST): Do it.
4450
4451 2002-05-03 Akim Demaille <akim@epita.fr>
4452
4453 * configure.in (GETTEXT_VERSION): New.
4454 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4455
4456 2002-05-03 Akim Demaille <akim@epita.fr>
4457
4458 * data/bison.simple (b4_token_enum): New.
4459 (b4_token_defines): Use it to output tokens both as #define and
4460 enums.
4461 Suggested by Paul Eggert.
4462 * src/output.c (token_definitions_output): Don't output spurious
4463 white spaces.
4464
4465 2002-05-03 Akim Demaille <akim@epita.fr>
4466
4467 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4468
4469 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4470
4471 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4472 Update the stack class, give a try to deque as the default container.
4473
4474 2002-05-02 Akim Demaille <akim@epita.fr>
4475
4476 * data/bison.simple (yyparse): Do not implement @$ = @1.
4477 (YYLLOC_DEFAULT): Adjust to do it.
4478 * doc/bison.texinfo (Location Default Action): Fix.
4479
4480 2002-05-02 Akim Demaille <akim@epita.fr>
4481
4482 * src/reader.c (parse_braces): Merge into...
4483 (parse_action): this.
4484
4485 2002-05-02 Akim Demaille <akim@epita.fr>
4486
4487 * configure.in (ALL_LINGUAS): Remove.
4488 * po/LINGUAS, hr.po: New.
4489
4490 2002-05-02 Akim Demaille <akim@epita.fr>
4491
4492 Remove the so called hairy (semantic) parsers.
4493
4494 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4495 * src/gram.h, src/gram.c (semantic_parser): Remove.
4496 (rule_t): Remove the guard and guard_line members.
4497 * src/lex.h (token_t): remove tok_guard.
4498 * src/options.c (option_table): Remove %guard and %semantic_parser
4499 support.
4500 * src/output.c, src/output.h (guards_output): Remove.
4501 (prepare): Adjust.
4502 (token_definitions_output): Don't output the `T'
4503 tokens (???).
4504 (output_skeleton): Don't output the guards.
4505 * src/files.c, src/files.c (attrsfile): Remove.
4506 * src/reader.c (symbol_list): Remove the guard and guard_line
4507 members.
4508 Adjust dependencies.
4509 (parse_guard): Remove.
4510 * data/bison.hairy: Remove.
4511 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4512 BISON_HAIRY.
4513
4514 2002-05-02 Akim Demaille <akim@epita.fr>
4515
4516 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4517 (parse_guard): Rename the formal argument `stack_offset' as
4518 `rule_length', which is more readable.
4519 Adjust callers.
4520 (copy_at, copy_dollar): Instead of outputting the hard coded
4521 values of $$, $n and so forth, output invocation to b4_lhs_value,
4522 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4523 Note: this patch partially drops `semantic-parser' support: it
4524 always does `rule_length - n', where semantic parsers ought to
4525 always use `-n'.
4526 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4527 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4528
4529 2002-05-02 Akim Demaille <akim@epita.fr>
4530
4531 * configure.in (AC_INIT): Bump to 1.49b.
4532 (AM_INIT_AUTOMAKE): Short invocation.
4533
4534 2002-05-02 Akim Demaille <akim@epita.fr>
4535
4536 Version 1.49a.
4537
4538 2002-05-01 Akim Demaille <akim@epita.fr>
4539
4540 * src/skeleton.h: Remove.
4541
4542 2002-05-01 Akim Demaille <akim@epita.fr>
4543
4544 * src/skeleton.h: Fix the #endif.
4545 Reported by Magnus Fromreide.
4546
4547 2002-04-26 Paul Eggert <eggert@twinsun.com>
4548
4549 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4550 Define if we define YYSTYPE and YYLTYPE, respectively.
4551 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4552
4553 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4554
4555 * src/scan-skel.l: Postprocess quadrigraphs.
4556
4557 * src/reader.c (copy_character): New function, used to output
4558 single characters while replacing `[' and `]' with quadrigraphs, to
4559 avoid troubles with M4 quotes.
4560 (copy_comment): Output characters with copy_character.
4561 (read_additionnal_code): Likewise.
4562 (copy_string2): Likewise.
4563 (copy_definition): Likewise.
4564
4565 * tests/calc.at: Exercise M4 quoting.
4566
4567 2002-04-25 Akim Demaille <akim@epita.fr>
4568
4569 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4570 between `!' and the command.
4571 Reported by Paul Eggert.
4572
4573 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4574
4575 * tests/calc.at: Exercise prologue splitting.
4576
4577 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4578 `b4_post_prologue' instead of `b4_prologue'.
4579
4580 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4581 muscles.
4582 (output): Free pre_prologue_obstack and post_prologue_obstack.
4583 * src/files.h, src/files.c (attrs_obstack): Remove.
4584 (pre_prologue_obstack, post_prologue_obstack): New.
4585 * src/reader.c (copy_definition): Add a parameter to specify the
4586 obstack to fill, instead of using attrs_obstack unconditionally.
4587 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4588 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4589
4590 2002-04-23 Paul Eggert <eggert@twinsun.com>
4591
4592 * data/bison.simple: Remove unnecessary commentary and white
4593 space differences from 1_29-branch.
4594 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4595
4596 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4597 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4598 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4599 constructors or destructors.
4600
4601 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4602
4603 2002-04-23 Akim Demaille <akim@epita.fr>
4604
4605 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4606 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4607 location with columns.
4608 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4609 All reported by Paul Eggert.
4610
4611 2002-04-22 Akim Demaille <akim@epita.fr>
4612
4613 * src/reduce.c (dump_grammar): Move to...
4614 * src/gram.h, src/gram.c (grammar_dump): here.
4615 Be sure to separate long item numbers.
4616 Don't read the members of a rule's prec if its nil.
4617
4618 2002-04-22 Akim Demaille <akim@epita.fr>
4619
4620 * src/output.c (table_size, table_grow): New.
4621 (MAXTABLE): Remove, replace uses with table_size.
4622 (pack_vector): Instead of dying when the table is too big, grow it.
4623
4624 2002-04-22 Akim Demaille <akim@epita.fr>
4625
4626 * data/bison.simple (yyr1): Its type is that of a token number.
4627 * data/bison.c++ (r1_): Likewise.
4628 * tests/regression.at (Web2c Actions): Adjust.
4629
4630 2002-04-22 Akim Demaille <akim@epita.fr>
4631
4632 * src/reader.c (token_translations_init): 256 is now the default
4633 value for the error token, i.e., it will be assigned another
4634 number if the user assigned 256 to one of her tokens.
4635 (reader): Don't force 256 to error.
4636 * doc/bison.texinfo (Symbols): Adjust.
4637 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4638 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4639 etc. instead of 10, 20, 30 (which was used to `jump' over error
4640 (256) and undefined (2)).
4641
4642 2002-04-22 Akim Demaille <akim@epita.fr>
4643
4644 Propagate more token_number_t.
4645
4646 * src/gram.h (token_number_as_item_number)
4647 (item_number_as_token_number): New.
4648 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4649 Use it to create output_item_number_table and
4650 output_token_number_table.
4651 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4652 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4653 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4654 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4655
4656 2002-04-22 Akim Demaille <akim@epita.fr>
4657
4658 * src/output.h, src/output.c (get_lines_number): Remove.
4659
4660 2002-04-19 Akim Demaille <akim@epita.fr>
4661
4662 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4663 as Lex/Flex'.
4664 (Debugging): More details about enabling the debugging features.
4665 (Table of Symbols): Describe $$, $n, @$, and @n.
4666 Suggested by Tim Josling.
4667
4668 2002-04-19 Akim Demaille <akim@epita.fr>
4669
4670 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4671
4672 2002-04-10 Akim Demaille <akim@epita.fr>
4673
4674 * src/system.h: Rely on HAVE_LIMITS_H.
4675 Suggested by Paul Eggert.
4676
4677 2002-04-09 Akim Demaille <akim@epita.fr>
4678
4679 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4680 full stderr, and strip it according to the bison options, instead
4681 of composing the error message from different bits.
4682 This makes it easier to check for several error messages.
4683 Adjust all the invocations.
4684 Add an invocation exercising the error token.
4685 Add an invocation demonstrating a stupid error message.
4686 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4687 Adjust the tests.
4688 Error message are for stderr, not stdout.
4689
4690 2002-04-09 Akim Demaille <akim@epita.fr>
4691
4692 * src/gram.h, src/gram.c (error_token_number): Remove, use
4693 errtoken->number.
4694 * src/reader.c (reader): Don't specify the user token number (2)
4695 for $undefined, as it uselessly prevents using it.
4696 * src/gram.h (token_number_t): Move to...
4697 * src/symtab.h: here.
4698 (state_t.number): Is a token_number_t.
4699 * src/print.c, src/reader.c: Use undeftoken->number instead of
4700 hard coded 2.
4701 (Even though this 2 is not the same as above: the number of the
4702 undeftoken remains being 2, it is its user token number which
4703 might not be 2).
4704 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4705 `user_token_number_max'.
4706 Output `undef_token_number'.
4707 * data/bison.simple, data/bison.c++: Use them.
4708 Be sure to map invalid yylex return values to
4709 `undef_token_number'. This saves us from gratuitous SEGV.
4710
4711 * tests/conflicts.at (Solved SR Conflicts)
4712 (Unresolved SR Conflicts): Adjust.
4713 * tests/regression.at (Web2c Actions): Adjust.
4714
4715 2002-04-08 Akim Demaille <akim@epita.fr>
4716
4717 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4718 Adding #line.
4719 Remove the duplicate `typedefs'.
4720 (RhsNumberType): Fix the declaration and various other typos.
4721 Use __ofile__.
4722 * data/bison.simple: Use __ofile__.
4723 * src/scan-skel.l: Handle __ofile__.
4724
4725 2002-04-08 Akim Demaille <akim@epita.fr>
4726
4727 * src/gram.h (item_number_t): New, the type of item numbers in
4728 RITEM. Note that it must be able to code symbol numbers as
4729 positive number, and the negation of rule numbers as negative
4730 numbers.
4731 Adjust all dependencies (pretty many).
4732 * src/reduce.c (rule): Remove this `short *' pointer: use
4733 item_number_t.
4734 * src/system.h (MINSHORT, MAXSHORT): Remove.
4735 Include `limits.h'.
4736 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4737 (shortcpy): Remove.
4738 (MAXTABLE): Move to...
4739 * src/output.c (MAXTABLE): here.
4740 (prepare_rules): Use output_int_table to output rhs.
4741 * data/bison.simple, data/bison.c++: Adjust.
4742 * tests/torture.at (Big triangle): Move the limit from 254 to
4743 500.
4744 * tests/regression.at (Web2c Actions): Ajust.
4745
4746 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4747 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4748 passes, but produces negative #line number, once fixed, GCC is
4749 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4750 C), it passes.
4751 * src/state.h (state_h): Code input lines on ints, not shorts.
4752
4753 2002-04-08 Akim Demaille <akim@epita.fr>
4754
4755 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4756 and then the grammar.
4757
4758 2002-04-08 Akim Demaille <akim@epita.fr>
4759
4760 * src/system.h: No longer using strndup.
4761
4762 2002-04-07 Akim Demaille <akim@epita.fr>
4763
4764 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4765 * src/output.c (output_table_data): Return the longest number.
4766 (prepare_tokens): Output `token_number_max').
4767 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4768 New.
4769 Use them to define yy_token_number_type/TokenNumberType.
4770 Use this type for yytranslate.
4771 * tests/torture.at (Big triangle): Push the limit from 124 to
4772 253.
4773 * tests/regression.at (Web2c Actions): Adjust.
4774
4775 2002-04-07 Akim Demaille <akim@epita.fr>
4776
4777 * tests/torture.at (Big triangle): New.
4778 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4779 * tests/existing.at: here.
4780
4781 2002-04-07 Akim Demaille <akim@epita.fr>
4782
4783 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4784 nritems.
4785 Adjust dependencies.
4786
4787 2002-04-07 Akim Demaille <akim@epita.fr>
4788
4789 * src/reader.c: Normalize increments to prefix form.
4790
4791 2002-04-07 Akim Demaille <akim@epita.fr>
4792
4793 * src/reader.c, symtab.c: Remove debugging code.
4794
4795 2002-04-07 Akim Demaille <akim@epita.fr>
4796
4797 Rename all the `bucket's as `symbol_t'.
4798
4799 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4800 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4801 * src/symtab.c, src/symtab.h (bucket): Rename as...
4802 (symbol_t): this.
4803 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4804 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
4805 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4806 (buckets_new, buckets_free, buckets_do): Rename as...
4807 (symbol_list_new, symbol_check_defined, symbol_make_alias)
4808 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4809 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
4810 (symbols_new, symbols_free, symbols_do): these.
4811
4812 2002-04-07 Akim Demaille <akim@epita.fr>
4813
4814 Use lib/hash for the symbol table.
4815
4816 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
4817 EOF.
4818 * src/lex.c (lex): Set the `number' member of new terminals.
4819 * src/reader.c (bucket_check_defined, bucket_make_alias)
4820 (bucket_check_alias_consistence, bucket_translation): New.
4821 (reader, grammar_free, readgram, token_translations_init)
4822 (packsymbols): Adjust.
4823 (reader): Number the predefined tokens.
4824 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
4825 for predefined tokens.
4826 * src/symtab.h (bucket): Remove all the hash table related
4827 members.
4828 * src/symtab.c (symtab): Replace by...
4829 (bucket_table): this.
4830 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4831 (buckets_new, buckets_do): New.
4832
4833 2002-04-07 Akim Demaille <akim@epita.fr>
4834
4835 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
4836 (start_symbol, max_user_token_number, semantic_parser)
4837 (error_token_number): Initialize.
4838 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
4839 Initialize.
4840 (reader): Don't.
4841 (errtoken, eoftoken, undeftoken, axiom): Extern.
4842
4843 2002-04-07 Akim Demaille <akim@epita.fr>
4844
4845 * src/gram.h (rule_s): prec and precsym are now pointers
4846 to the bucket giving the priority/associativity.
4847 Member `associativity' removed: useless.
4848 * src/reduce.c, src/conflicts.c: Adjust.
4849
4850 2002-04-07 Akim Demaille <akim@epita.fr>
4851
4852 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
4853 Properly escape the symbols' TAG when outputting them.
4854
4855 2002-04-07 Akim Demaille <akim@epita.fr>
4856
4857 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4858
4859 2002-04-07 Akim Demaille <akim@epita.fr>
4860
4861 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
4862 (LArule): this, which is an array to rule_t*.
4863 * src/print.c, src/conflicts.c: Adjust.
4864
4865 2002-04-07 Akim Demaille <akim@epita.fr>
4866
4867 * src/gram.h (rule_t): Rename `number' as `user_number'.
4868 `number' is a new member.
4869 Adjust dependencies.
4870 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
4871
4872 2002-04-07 Akim Demaille <akim@epita.fr>
4873
4874 As a result of the previous patch, it is no longer needed
4875 to reorder ritem itself.
4876
4877 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
4878
4879 2002-04-07 Akim Demaille <akim@epita.fr>
4880
4881 Be sure never to walk through RITEMS, but use only data related to
4882 the rules themselves. RITEMS should be banished.
4883
4884 * src/output.c (output_token_translations): Rename as...
4885 (prepare_tokens): this.
4886 In addition to `translate', prepare the muscles `tname' and
4887 `toknum', which were handled by...
4888 (output_rule_data): this.
4889 Remove, and move the remainder of its outputs into...
4890 (prepare_rules): this new routines, which also merges content from
4891 (output_gram): this.
4892 (prepare_rules): Be sure never to walk through RITEMS.
4893 (output_stos): Rename as...
4894 (prepare_stos): this.
4895 (output): Always invoke prepare_states, after all, just don't use it
4896 in the output if you don't need it.
4897
4898 2002-04-07 Akim Demaille <akim@epita.fr>
4899
4900 * src/LR0.c (new_state): Display `nstates' as the name of the
4901 newly created state.
4902 Adjust to initialize first_state and last_state if needed.
4903 Be sure to distinguish the initial from the final state.
4904 (new_states): Create the itemset of the initial state, and use
4905 new_state.
4906 * src/closure.c (closure): Now that the initial state has its
4907 items properly set, there is no need for a special case when
4908 creating `ruleset'.
4909
4910 As a result, now the rule 0, reducing to $axiom, is visible in the
4911 outputs. Adjust the test suite.
4912
4913 * tests/conflicts.at (Solved SR Conflicts)
4914 (Unresolved SR Conflicts): Adjust.
4915 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
4916 * tests/conflicts.at (S/R in initial): New.
4917
4918 2002-04-07 Akim Demaille <akim@epita.fr>
4919
4920 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
4921 the RHS of the rules.
4922 * src/output.c (output_gram): Likewise.
4923
4924 2002-04-07 Akim Demaille <akim@epita.fr>
4925
4926 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
4927 bucket.
4928 Adjust all dependencies.
4929 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
4930 `number' of the buckets too.
4931 * src/gram.h: Include `symtab.h'.
4932 (associativity): Move to...
4933 * src/symtab.h: here.
4934 No longer include `gram.h'.
4935
4936 2002-04-07 Akim Demaille <akim@epita.fr>
4937
4938 * src/gram.h, src/gram.c (rules_rhs_length): New.
4939 (ritem_longest_rhs): Use it.
4940 * src/gram.h (rule_t): `number' is a new member.
4941 * src/reader.c (packgram): Set it.
4942 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
4943 the end of `rules', and count them out of `nrules'.
4944 (reduce_output, dump_grammar): Adjust.
4945 * src/print.c (print_grammar): It is no longer needed to check for
4946 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
4947 * tests/reduce.at (Reduced Automaton): New test.
4948
4949 2002-04-07 Akim Demaille <akim@epita.fr>
4950
4951 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
4952 lacking `+ 1' to nrules, Bison reported as useless a token if it
4953 was used solely to set the precedence of the last rule...
4954
4955 2002-04-07 Akim Demaille <akim@epita.fr>
4956
4957 * data/bison.c++, data/bison.simple: Don't output the current file
4958 name in #line, to avoid useless diffs between two identical
4959 outputs under different names.
4960
4961 2002-04-07 Akim Demaille <akim@epita.fr>
4962
4963 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
4964 Normalize loops to using `< nrules + 1', not `<= nrules'.
4965
4966 2002-04-07 Akim Demaille <akim@epita.fr>
4967
4968 * TODO: Update.
4969
4970 2002-04-07 Akim Demaille <akim@epita.fr>
4971
4972 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
4973 bucket.value as bucket.number.
4974
4975 2002-04-07 Akim Demaille <akim@epita.fr>
4976
4977 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
4978 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4979 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
4980 RHS, instead of being an index in RITEMS.
4981
4982 2002-04-04 Paul Eggert <eggert@twinsun.com>
4983
4984 * doc/bison.texinfo: Update copyright date.
4985 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
4986 (Symbols): Warn about running Bison in one character set,
4987 but compiling and/or running in an incompatible one.
4988 Warn about character code 256, too.
4989
4990 2002-04-03 Paul Eggert <eggert@twinsun.com>
4991
4992 * src/bison.data (YYSTACK_ALLOC): Depend on whether
4993 YYERROR_VERBOSE is nonzero, not whether it is defined.
4994
4995 Merge changes from bison-1_29-branch.
4996
4997 2002-03-20 Paul Eggert <eggert@twinsun.com>
4998
4999 Merge fixes from Debian bison_1.34-1.diff.
5000
5001 * configure.in (AC_PREREQ): 2.53.
5002
5003 2002-03-20 Akim Demaille <akim@epita.fr>
5004
5005 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5006
5007 2002-03-19 Paul Eggert <eggert@twinsun.com>
5008
5009 * src/bison.simple (YYCOPY): New macro.
5010 (YYSTACK_RELOCATE): Use it.
5011 Remove Type arg; no longer needed. All callers changed.
5012 (yymemcpy): Remove; no longer needed.
5013
5014 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5015 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5016
5017 2002-03-19 Akim Demaille <akim@epita.fr>
5018
5019 Test and fix the #line outputs.
5020
5021 * tests/atlocal.at (GCC): New.
5022 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5023 (Prologue synch line, ,%union synch line, Postprologue synch line)
5024 (Action synch line, Epilogue synch line): New tests.
5025 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5026 * data/bison.simple, data/bison.c++: Use it.
5027
5028 2002-03-19 Akim Demaille <akim@epita.fr>
5029
5030 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5031 (Solved SR Conflicts, %expect not enough, %expect right)
5032 (%expect too much): Move to...
5033 * tests/conflicts.at: this new file.
5034
5035 2002-03-19 Akim Demaille <akim@epita.fr>
5036
5037 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5038 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5039 that we can move to enums for instance.
5040 * src/output.c (token_definitions_output): Output a list of
5041 `token-name, token-number' instead of the #define.
5042 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5043
5044 2002-03-14 Akim Demaille <akim@epita.fr>
5045
5046 Use Gettext 0.11.1.
5047
5048 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5049
5050 * data/bison.c++: Make the user able to add members to the generated
5051 parser by subclassing.
5052
5053 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5054
5055 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5056 a character.
5057 Reported by Nicolas Tisserand and Nicolas Burrus.
5058
5059 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5060
5061 * src/reader.c: Warn about lacking semi-colons, do not complain.
5062
5063 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5064
5065 * data/bison.c++: Remove a debug line.
5066
5067 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5068
5069 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5070 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5071 provide a default implementation.
5072
5073 2002-03-04 Akim Demaille <akim@epita.fr>
5074
5075 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5076 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5077 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5078 * tests/semantic.at (Parsing Guards): Similarly.
5079 * src/reader.at (readgram): Complain if the last rule is not ended
5080 with a semi-colon.
5081
5082 2002-03-04 Akim Demaille <akim@epita.fr>
5083
5084 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5085 * src/closure.c: here.
5086 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5087 RTC.
5088 * src/warshall.h, src/warshall.c: Remove.
5089 * tests/sets.at (Broken Closure): Adjust.
5090
5091 2002-03-04 Akim Demaille <akim@epita.fr>
5092
5093 * src/output.c (output_skeleton): tempdir is const.
5094 bytes_read is unused.
5095
5096 2002-03-04 Akim Demaille <akim@epita.fr>
5097
5098 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5099 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5100 Update.
5101 From Michael Hayes.
5102
5103 2002-03-04 Akim Demaille <akim@epita.fr>
5104
5105 * src/closure.c (closure): `r' is unused.
5106
5107 2002-03-04 Akim Demaille <akim@epita.fr>
5108
5109 * tests/sets.at (Broken Closure): Add the ending `;'.
5110 * src/reader.at (readgram): Complain if a rule is not ended with a
5111 semi-colon.
5112
5113 2002-03-04 Akim Demaille <akim@epita.fr>
5114
5115 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5116 (count_sr_conflicts): Use bitset_count.
5117 * src/reduce.c (inaccessable_symbols): Ditto.
5118 (bits_size): Remove.
5119 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5120
5121 2002-03-04 Akim Demaille <akim@epita.fr>
5122
5123 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5124 * src/reduce.c: Remove the `bitset_zero's following the
5125 `bitset_create's, as now it is performed by the latter.
5126
5127 2002-03-04 Akim Demaille <akim@epita.fr>
5128
5129 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5130 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5131 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5132 latest sources from Michael.
5133
5134 2002-03-04 Akim Demaille <akim@epita.fr>
5135
5136 * src/output.c (output): Don't free the grammar.
5137 * src/reader.c (grammar_free): New.
5138 * src/main.c (main): Call it and don't free symtab here.
5139
5140 2002-03-04 Akim Demaille <akim@epita.fr>
5141
5142 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5143 before returning.
5144 Reported by Benoit Perrot.
5145
5146 2002-03-04 Akim Demaille <akim@epita.fr>
5147
5148 Use bitset operations when possible, not loops over bits.
5149
5150 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5151 bitset_or.
5152 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5153 * src/reduce.c (useless_nonterminals): Formatting changes.
5154 * src/warshall.c (TC): Use bitset_or.
5155
5156 2002-03-04 Akim Demaille <akim@epita.fr>
5157
5158 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5159 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5160 Ditto.
5161
5162 2002-03-04 Akim Demaille <akim@epita.fr>
5163
5164 * src/lalr.c (F): Now a bitset*.
5165 Adjust all dependencies.
5166
5167 2002-03-04 Akim Demaille <akim@epita.fr>
5168
5169 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5170 Adjust all dependencies.
5171
5172 2002-03-04 Akim Demaille <akim@epita.fr>
5173
5174 * src/L0.c, src/LR0.h (nstates): Be size_t.
5175 Adjust comparisons (signed vs unsigned).
5176 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5177 bitset*.
5178 Adjust all dependencies.
5179
5180 2002-03-04 Akim Demaille <akim@epita.fr>
5181
5182 * src/closure.c (firsts): Now, also a bitset.
5183 Adjust all dependencies.
5184 (varsetsize): Remove, now unused.
5185 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5186
5187 2002-03-04 Akim Demaille <akim@epita.fr>
5188
5189 * src/print.c: Convert to use bitset.h, not hand coded iterations
5190 over ints.
5191
5192 2002-03-04 Akim Demaille <akim@epita.fr>
5193
5194 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5195
5196 2002-03-04 Akim Demaille <akim@epita.fr>
5197
5198 * src/closure.c (ruleset): Be a bitset.
5199 (rulesetsize): Remove.
5200
5201 2002-03-04 Akim Demaille <akim@epita.fr>
5202
5203 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5204 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5205 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5206 * src/closure.c (fderives): Be an array of bitsets.
5207
5208 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5209
5210 * data/bison.c++: Merge the two generated headers. Insert a copyright
5211 notice in each output file.
5212
5213 2002-02-28 Akim Demaille <akim@epita.fr>
5214
5215 * data/bison.c++: Copy the prologue of bison.simple to fetch
5216 useful M4 definitions, such as b4_header_guard.
5217
5218 2002-02-25 Akim Demaille <akim@epita.fr>
5219
5220 * src/getargs.c (version): Give the name of the authors, and use a
5221 translator friendly scheme for the bgr
5222 copyright notice.
5223
5224 2002-02-25 Akim Demaille <akim@epita.fr>
5225
5226 * src/output.c (header_output): Remove, now handled completely via
5227 M4.
5228
5229 2002-02-25 Akim Demaille <akim@epita.fr>
5230
5231 * m4/m4.m4: New, from CVS Autoconf.
5232 * configure.in: Invoke it.
5233 * src/output.c (output_skeleton): Use its result instead of the
5234 hard coded name.
5235
5236 2002-02-25 Akim Demaille <akim@epita.fr>
5237
5238 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5239 Fileutils 4.1.5.
5240 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5241 * src/output.c (output_skeleton): Use mkstemp to create a real
5242 temporary file.
5243 Move the filling of `skeleton' and its muscle to...
5244 (prepare): here.
5245 (output): Move the definition of the prologue muscle to...
5246 (prepare): here.
5247 * src/system.h (DEFAULT_TMPDIR): New.
5248
5249 2002-02-14 Paul Eggert <eggert@twinsun.com>
5250
5251 Remove the support for C++ namespace cleanliness; it was
5252 causing more problems than it was curing, since it didn't work
5253 properly on some nonstandard C++ compilers. This can wait
5254 for a proper C++ parser.
5255
5256 * NEWS: Document this.
5257 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5258 of C++, as it's treated like C now.
5259 * src/bison.simple (YYSTD): Remove.
5260 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5261 Treat C++ just like Standard C instead of trying to support
5262 namespace cleanliness.
5263
5264 2002-02-14 Akim Demaille <akim@epita.fr>
5265
5266 * tests/regression.at (else): Adjust to Andreas' change.
5267
5268 2002-02-14 Akim Demaille <akim@epita.fr>
5269
5270 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5271
5272 2002-02-13 Andreas Schwab <schwab@suse.de>
5273
5274 * src/output.c (output_rule_data): Don't output NULL, it might
5275 not be defined yet.
5276
5277 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5278
5279 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5280 (Copyright notice): Update.
5281
5282 2002-02-11 Akim Demaille <akim@epita.fr>
5283
5284 * tests/regression.at (%nonassoc and eof): Don't include
5285 nonportable headers.
5286
5287 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5288
5289 * data/bison.c++: Correct error recovery. Make the user able to
5290 initialize the starting location.
5291
5292 2002-02-07 Akim Demaille <akim@epita.fr>
5293
5294 * tests/input.at: New.
5295
5296 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5297
5298 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5299 more consistent when naming methods and variables. Put preprocessor
5300 directives around tables only needed for debugging.
5301
5302 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5303
5304 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5305 C++ parsers.
5306 (yy::b4_name::parse): Use print_.
5307
5308 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5309
5310 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5311
5312 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5313
5314 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5315 C++ parsers.
5316 (yy::b4_name::parse): Build verbose error messages, and use error_.
5317
5318 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5319
5320 * data/bison.c++: Fix m4 quoting in comments.
5321
5322 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5323
5324 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5325 not expanded by m4.
5326
5327 2002-02-05 Akim Demaille <akim@epita.fr>
5328
5329 * data/bison.c++: Adjust to the M4 back end.
5330 More is certainly needed.
5331
5332 2002-02-05 Akim Demaille <akim@epita.fr>
5333
5334 Give a try to M4 as a back end.
5335
5336 * lib/readpipe.c: New, from wdiff.
5337 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5338 BISON_HAIRY.
5339 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5340 specific values. Now it is m4 that performs the lookup.
5341 * src/parse-skel.y: Remove.
5342 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5343 * src/output.c (actions_output, guards_output)
5344 (token_definitions_output): No longer keeps track of the output
5345 line number, hence remove the second argument.
5346 (guards_output): Check against the guard member of a rule, not the
5347 action member.
5348 Adjust callers.
5349 (output_skeleton): Don't look for the skeleton location, let m4 do
5350 that.
5351 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5352 file will be used.
5353 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5354 (prepare): Given that for the time being changesyntax is not
5355 usable in M4, rename the muscles using `-' to `_'.
5356 Define `defines_flag', `output_parser_name' and `output_header_name'.
5357 * src/output.h (actions_output, guards_output)
5358 (token_definitions_output): Adjust prototypes.
5359 * src/scan-skel.l: Instead of scanning the skeletons, it now
5360 processes the output of m4: `__oline__' and `#output'.
5361 * data/bison.simple: Adjust to be used by M4(sugar).
5362 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5363 to date.
5364 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5365 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5366 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5367 shamelessly stolen from CVS Autoconf.
5368
5369 2002-02-05 Akim Demaille <akim@epita.fr>
5370
5371 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5372 * configure.in: Check for the declarations of free and malloc.
5373 * src/muscle_tab.c: Adjust.
5374
5375 2002-02-05 Akim Demaille <akim@epita.fr>
5376
5377 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5378 which have no values.
5379
5380 2002-02-05 Akim Demaille <akim@epita.fr>
5381
5382 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5383 * data/: here.
5384
5385 2002-01-29 Paul Eggert <eggert@twinsun.com>
5386
5387 * src/bison.simple (YYSIZE_T): Do not define merely because
5388 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5389 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5390
5391 2002-01-27 Akim Demaille <akim@epita.fr>
5392
5393 Fix `%nonassoc and eof'.
5394
5395 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5396 which were not properly copied! Replace
5397 memcpy (res->errs, src->errs, src->nerrs);
5398 with
5399 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5400 !!!
5401 * tests/regression.at (%nonassoc and eof): Adjust to newest
5402 Autotest: `.' is not in the PATH.
5403
5404 2002-01-27 Akim Demaille <akim@epita.fr>
5405
5406 * tests/sets.at (AT_EXTRACT_SETS): New.
5407 (Nullable): Use it.
5408 (Firsts): New.
5409
5410 2002-01-26 Akim Demaille <akim@epita.fr>
5411
5412 * tests/actions.at, tests/calc.at, tests/headers.at,
5413 * tests/torture.at: Adjust to the newest Autotest which no longer
5414 forces `.' in the PATH.
5415
5416 2002-01-25 Akim Demaille <akim@epita.fr>
5417
5418 * tests/regression.at (%nonassoc and eof): New.
5419 Suggested by Robert Anisko.
5420
5421 2002-01-24 Akim Demaille <akim@epita.fr>
5422
5423 Bison dumps core when trying to complain about broken input files.
5424 Reported by Cris van Pelt.
5425
5426 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5427 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5428 into...
5429 (Invalid inputs): Strengthen: exercise parse_percent_token.
5430
5431 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5432
5433 * src/Makefile.am: Add bison.c++.
5434 * src/bison.c++: New skeleton.
5435
5436 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5437
5438 * po/it.po: New.
5439
5440 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5441
5442 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5443
5444 2002-01-20 Marc Autret <marc@gnu.org>
5445
5446 * src/files.c (compute_output_file_names): Fix
5447
5448 2002-01-20 Marc Autret <marc@gnu.org>
5449
5450 * tests/output.at: New test.
5451 * src/files.c (compute_base_names): Don't map extensions when
5452 the YACC flag is set, use defaults.
5453 Reported by Evgeny Stambulchik.
5454
5455 2002-01-20 Marc Autret <marc@gnu.org>
5456
5457 * src/system.h: Need to define __attribute__ away for non-GCC
5458 compilers as well (i.e. the vendor C compiler).
5459 Suggested by Albert Chin-A-Young.
5460
5461 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5462
5463 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5464 canonical definition.
5465 * src/system.h: Use the canonical definition for PARAMS (avoids
5466 a conflict with the macro from lib/hash.h).
5467
5468 2002-01-11 Akim Demaille <akim@epita.fr>
5469
5470 * configure.in: Use AC_FUNC_STRNLEN.
5471 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5472
5473 2002-01-09 Akim Demaille <akim@epita.fr>
5474
5475 * src/files.c, src/files.h (output_infix): New.
5476 (tab_extension): Remove.
5477 (compute_base_names): Compute the former, drop the latter.
5478 * src/output.c (prepare): Insert the muscles `output-infix', and
5479 `output-suffix'.
5480 * src/parse-skel.y (string, string.1): New.
5481 (section.header): Use it.
5482 (section.yacc): Remove.
5483 (prefix): Remove too.
5484 * src/scan-skel.l: Adjust.
5485 * src/bison.simple, src/bison.hairy: Adjust.
5486
5487 2002-01-09 Akim Demaille <akim@epita.fr>
5488
5489 * configure.in (WERROR_CFLAGS): Compute it.
5490 * src/Makefile.am (CFLAGS): Pass it.
5491 * tests/atlocal.in (CFLAGS): Idem.
5492 * src/files.c: Fix a few warnings.
5493 (get_extension_index): Remove, unused.
5494
5495 2002-01-08 Akim Demaille <akim@epita.fr>
5496
5497 * src/getargs.c (AS_FILE_NAME): New.
5498 (getargs): Use it to convert DOSish file names.
5499 * src/files.c (base_name): Rename as full_base_name to avoid
5500 clashes with `base_name ()'.
5501 (filename_split): New.
5502 (compute_base_names): N-th rewrite, using filename_split.
5503
5504 2002-01-08 Akim Demaille <akim@epita.fr>
5505
5506 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5507 New, stolen from the Fileutils 4.1.
5508 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5509 * configure.in: Check for the presence of memrchr, and of its
5510 prototype.
5511
5512 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5513
5514 * lib/hash.h (__P): Added definition for this macro.
5515 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5516 BUILT_SOURCES, to ensure they are generated first.
5517 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5518 %error-verbose to allow bootstrapping with bison 1.30x.
5519
5520 2002-01-06 Akim Demaille <akim@epita.fr>
5521
5522 * src/reader.c (parse_braces): Don't fetch the next char, the
5523 convention is to fetch on entry.
5524 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5525 'switch' without a following semicolon.
5526 * tests/regression.at (braces parsing): New.
5527
5528 2002-01-06 Akim Demaille <akim@epita.fr>
5529
5530 Bison is dead wrong in its RR conflict reports.
5531
5532 * tests/torture.at (GNU Cim Grammar): New.
5533 * src/conflicts.c (count_rr_conflicts): Fix.
5534
5535 2002-01-06 Akim Demaille <akim@epita.fr>
5536
5537 Creating package.m4 from configure.ac causes too many problems.
5538
5539 * tests/Makefile.am (package.m4): Create it by hand,
5540 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5541
5542 2002-01-06 Akim Demaille <akim@epita.fr>
5543
5544 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5545 skeleton.h.
5546
5547 2002-01-04 Paul Eggert <eggert@twinsun.com>
5548
5549 * doc/bison.texinfo (Debugging):
5550 Remove YYSTDERR; it's no longer defined or used.
5551 Also, s/cstdio.h/cstdio/.
5552
5553 2002-01-03 Akim Demaille <akim@epita.fr>
5554
5555 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5556
5557 2002-01-03 Akim Demaille <akim@epita.fr>
5558
5559 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5560 tracing code to --trace, wait for a better --trace option, with
5561 args.
5562
5563 2002-01-03 Akim Demaille <akim@epita.fr>
5564
5565 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5566 The ISO C++ standard is extremely clear about it: stderr is
5567 considered a macro, not a regular symbol (see table 94 `Header
5568 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5569 Therefore std:: does not apply to it. It still does with fprintf.
5570 Also, s/cstdio.h/cstdio/.
5571
5572 2002-01-03 Akim Demaille <akim@epita.fr>
5573
5574 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5575 for non system headers.
5576
5577 2002-01-02 Akim Demaille <akim@epita.fr>
5578
5579 Equip the skeleton chain with location tracking, runtime trace,
5580 pure parser and scanner.
5581
5582 * src/parse-skel.y: Request a pure parser, locations, and prefix
5583 renaming.
5584 (%union): Having several members with the same type does not help
5585 type mismatches, simplify.
5586 (YYPRINT, yyprint): New.
5587 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5588 (skel_error): this.
5589 Handle locations.
5590 * src/scan-skel.l: Adjust to these changes.
5591 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5592 (LOCATION_PRINT, skel_control_t): New.
5593
5594 2001-12-30 Akim Demaille <akim@epita.fr>
5595
5596 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5597 replace `gb' with BLANKS.
5598 * src/scan-skel.l: Adjust.
5599
5600 2001-12-30 Akim Demaille <akim@epita.fr>
5601
5602 * src/system.h: We don't need nor want bcopy.
5603 Throw away MS-DOS crap: we don't need getpid.
5604 * configure.in: We don't need strndup. It was even causing
5605 problems: because Flex includes the headers *before* us,
5606 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5607 not visible.
5608 * lib/xstrndup.c: New.
5609 * src/scan-skel.l: Use it.
5610 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5611 * src/parse-skel.y: Use %directives instead of #defines.
5612
5613 2001-12-30 Akim Demaille <akim@epita.fr>
5614
5615 * src/skeleton.h: New.
5616 * src/output.c (output_parser, output_master_parser): Remove, dead
5617 code.
5618 * src/output.h (get_lines_number, actions_output, guards_output)
5619 (token_definitions_output): Prototype them.
5620 * src/parse-skel.y: Add the license notice.
5621 Include output.h and skeleton.h.
5622 (process_skeleton): Returns void, and takes a single parameter.
5623 * src/scan-skel.l: Add the license notice.
5624 Include skeleton.h.
5625 Don't use %option yylineno: it seems that then Flex imagines
5626 REJECT has been used, and therefore it won't reallocate its
5627 buffers (which makes no other sense to me than a bug). It results
5628 in warnings for `unused: yy_flex_realloc'.
5629
5630 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5631
5632 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5633 (MUSCLE_INSERT_PREFIX): ...to there.
5634 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5635 (MUSCLE_INSERT_PREFIX): Move from here...
5636
5637 * src/bison.hairy: Add a section directive. Put braces around muscle
5638 names. This parser skeleton is still broken, but Bison should not
5639 choke on a bad muscle 'syntax'.
5640 * src/bison.simple: Add a section directive. Put braces around muscle
5641 names.
5642
5643 * src/files.h (strsuffix, stringappend): Add declarations.
5644 (tab_extension): Add declaration.
5645 (short_base_name): Add declaration.
5646
5647 * src/files.c (strsuffix, stringappend): No longer static. These
5648 functions are used in the skeleton parser.
5649 (tab_extension): New.
5650 (compute_base_names): Use the computations done in this function
5651 to guess if the generated parsers should have '.tab' in their
5652 names.
5653 (short_base_name): No longer static.
5654
5655 * src/output.c (output_skeleton): New.
5656 (output): Disable call to output_master_parser, and give a try to
5657 a new skeleton handling system.
5658 (guards_output, actions_output): No longer static.
5659 (token_definitions_output, get_lines_number): No longer static.
5660
5661 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5662
5663 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5664 parse-skel.y.
5665
5666 * src/parse-skel.y: New file.
5667 * src/scan-skel.l: New file.
5668
5669 2001-12-29 Akim Demaille <akim@epita.fr>
5670
5671 %name-prefix is broken.
5672
5673 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5674 Adjust all dependencies.
5675 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5676 %name-prefix.
5677
5678 Renaming yylval but not yylloc is not consistent. Now we do.
5679
5680 * src/bison.simple: Prefix yylloc if used.
5681 * doc/bison.texinfo (Decl Summary): Document that.
5682
5683 2001-12-29 Akim Demaille <akim@epita.fr>
5684
5685 * doc/bison.texinfo: Promote `%long-directive' over
5686 `%long_directive'.
5687 Remove all references to fixed-output-files, yacc is enough.
5688
5689 2001-12-29 Akim Demaille <akim@epita.fr>
5690
5691 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5692 user prologue. These are defaults.
5693 * tests/actions.at (Mid-rule actions): Make sure the user can
5694 define YYDEBUG and YYERROR_VERBOSE.
5695
5696 2001-12-29 Akim Demaille <akim@epita.fr>
5697
5698 * src/output.c (header_output): Don't forget to export YYLTYPE and
5699 yylloc.
5700 * tests/headers.at (export YYLTYPE): New, make sure it does.
5701 * tests/regression.at (%union and --defines, Invalid CPP headers):
5702 Move to...
5703 * tests/headers.at: here.
5704
5705 2001-12-29 Akim Demaille <akim@epita.fr>
5706
5707 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5708
5709 2001-12-29 Akim Demaille <akim@epita.fr>
5710
5711 * tests/actions.at (Mid-rule actions): Output on a single line
5712 instead of several.
5713
5714 2001-12-29 Akim Demaille <akim@epita.fr>
5715
5716 * doc/bison.texinfo: Formatting changes.
5717
5718 2001-12-29 Akim Demaille <akim@epita.fr>
5719
5720 Don't store the token defs in a muscle, just be ready to output it
5721 on command. Now possible via `symbols'. Fixes a memory leak.
5722
5723 * src/output.c (token_definitions_output): New.
5724 (output_parser, header_output): Use it.
5725 * src/reader.c (symbols_save): Remove.
5726
5727 2001-12-29 Akim Demaille <akim@epita.fr>
5728
5729 * src/bison.simple: Do not provide a default for YYSTYPE and
5730 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5731 default.
5732
5733 2001-12-29 Akim Demaille <akim@epita.fr>
5734
5735 Mid-rule actions are simply... ignored!
5736
5737 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5738 the empty-rule associated to the dummy symbol, not to the host
5739 rule.
5740 * tests/actions.at (Mid-rule actions): New.
5741
5742 2001-12-29 Akim Demaille <akim@epita.fr>
5743
5744 Memory leak.
5745
5746 * src/reader.c (reader): Free grammar.
5747
5748 2001-12-29 Akim Demaille <akim@epita.fr>
5749
5750 Memory leak.
5751
5752 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5753 since it allocates it for each state, although only one is needed.
5754 (allocate_storage): Do it here.
5755
5756 2001-12-29 Akim Demaille <akim@epita.fr>
5757
5758 * src/options.h, src/options.c (create_long_option_table): Rename
5759 as...
5760 (long_option_table_new): this, with a clearer prototype.
5761 (percent_table): Remove, unused,
5762 * src/getargs.c (getargs): Adjust.
5763
5764 2001-12-29 Akim Demaille <akim@epita.fr>
5765
5766 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5767 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5768 as states.
5769
5770 2001-12-29 Akim Demaille <akim@epita.fr>
5771
5772 * src/lalr.c (build_relations): Rename `states' as `states1'.
5773 Sorry, I don't understand exactly what it is, no better name...
5774
5775 2001-12-29 Akim Demaille <akim@epita.fr>
5776
5777 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5778 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5779 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5780 as rules.
5781
5782 2001-12-29 Akim Demaille <akim@epita.fr>
5783
5784 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5785 ago.
5786
5787 2001-12-29 Akim Demaille <akim@epita.fr>
5788
5789 * src/reader.c, src/reader.h (user_toknums): Remove.
5790 Adjust all users to use symbols[i]->user_token_number.
5791
5792 2001-12-29 Akim Demaille <akim@epita.fr>
5793
5794 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5795 Adjust all users to use symbols[i]->prec or ->assoc.
5796
5797 2001-12-29 Akim Demaille <akim@epita.fr>
5798
5799 * src/reader.c, src/reader.h (tags): Remove.
5800 Adjust all users to use symbols[i]->tag.
5801
5802 2001-12-29 Akim Demaille <akim@epita.fr>
5803
5804 * src/gram.h, src/gram.c (symbols): New, similar to state_table
5805 and rule_table.
5806 * src/reader.c (packsymbols): Fill this table.
5807 Drop sprec.
5808 * src/conflicts.c (resolve_sr_conflict): Adjust.
5809 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
5810 single table.
5811 Use symbols[i]->tag instead of tags[i].
5812
5813 2001-12-29 Akim Demaille <akim@epita.fr>
5814
5815 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
5816 In addition, put a comment in there, to replace...
5817 * tests/regression.at (%union and C comments): Remove.
5818
5819 2001-12-29 Akim Demaille <akim@epita.fr>
5820
5821 * tests/regression.at (Web2c Actions): Blindly move the actual
5822 output as expected output. The contents *seem* right to me, but I
5823 can't pretend reading perfectly parser tables... Nonetheless, all
5824 the other tests pass correctly, the table look OK, even though the
5825 presence of `$axiom' is to be noted: AFAICS it is useless (but
5826 harmless).
5827
5828 2001-12-29 Akim Demaille <akim@epita.fr>
5829
5830 * src/reader.c (readgram): Don't add the rule 0 if there were no
5831 rules read. In other words, add it _after_ having performed
5832 grammar sanity checks.
5833 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
5834
5835 2001-12-29 Akim Demaille <akim@epita.fr>
5836
5837 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
5838 visible, and some states have now a different number.
5839
5840 2001-12-29 Akim Demaille <akim@epita.fr>
5841
5842 * src/reader.c (readgram): Bind the initial rule's lineno to that
5843 of the first rule.
5844 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
5845 (Solved SR Conflicts): Adjust rule 0's line number.
5846
5847 2001-12-29 Akim Demaille <akim@epita.fr>
5848
5849 Fix the `GAWK Grammar' failure.
5850
5851 * src/LR0.c (final_state): Initialize to -1 so that we do compute
5852 the reductions of the first state which was mistakenly confused
5853 with the final state because precisely final_state was initialized
5854 to 0.
5855 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
5856 now noticed by Bison.
5857 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
5858 have a reduction on $default.
5859
5860 2001-12-29 Akim Demaille <akim@epita.fr>
5861
5862 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
5863 rule line numbers.
5864 * src/closure.c (print_closure): Likewise.
5865 * src/derives.c (print_derives): Likewise.
5866 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
5867 now.
5868
5869 2001-12-29 Akim Demaille <akim@epita.fr>
5870
5871 * src/lalr.c (lookaheads_print): New.
5872 (lalr): Call it when --trace-flag.
5873 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
5874 are dumped.
5875
5876 2001-12-29 Akim Demaille <akim@epita.fr>
5877
5878 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
5879 when walking through ritem, even via rule->rhs.
5880 * src/reduce.c (dump_grammar, useful_production, reduce_output)
5881 (useful_production, useless_nonterminals): Likewise.
5882 (reduce_grammar_tables): Likewise, plus update nritems.
5883 * src/nullable.c (set_nullable): Likewise.
5884 * src/lalr.c (build_relations): Likewise.
5885 * tests/sets.at (Nullable): Adjust.
5886 Fortunately, now, the $axiom is no longer nullable.
5887
5888 2001-12-29 Akim Demaille <akim@epita.fr>
5889
5890 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
5891 the 0-sentinel.
5892 * src/gram.c (ritem_longest_rhs): Likewise.
5893 * src/reduce.c (nonterminals_reduce): Likewise.
5894 * src/print_graph.c (print_graph): Likewise.
5895 * src/output.c (output_rule_data): Likewise.
5896 * src/nullable.c (set_nullable): Likewise.
5897
5898 2001-12-29 Akim Demaille <akim@epita.fr>
5899
5900 * src/output.c: Comment changes.
5901
5902 2001-12-27 Paul Eggert <eggert@twinsun.com>
5903
5904 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
5905 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
5906 Sparc, as they were causing more porting problems than the
5907 (minor) performance improvement was worth.
5908
5909 Also, catch up with 1.31's YYSTD.
5910
5911 2001-12-27 Akim Demaille <akim@epita.fr>
5912
5913 * src/output.c (output_gram): Rely on nritems, not the
5914 0-sentinel. See below.
5915 Use -1 as separator, not 0.
5916 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
5917 Rely on -1 as separator in yyrhs, instead of 0.
5918 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
5919 twice `Now at end of input', therefore there are two lines less to
5920 expect.
5921
5922 2001-12-27 Akim Demaille <akim@epita.fr>
5923
5924 * tests/regression.at (Unresolved SR Conflicts):
5925 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
5926 below.
5927
5928 2001-12-27 Akim Demaille <akim@epita.fr>
5929
5930 * src/LR0.c (new_state): Recognize the final state by the fact it
5931 is reached by eoftoken.
5932 (insert_start_shifting_state, insert_eof_shifting_state)
5933 (insert_accepting_state, augment_automaton): Remove, since now
5934 these states are automatically computed from the initial state.
5935 (generate_states): Adjust.
5936 * src/print.c: When reporting a rule number to the user, substract
5937 1, so that the axiom rule is rule 0, and the first user rule is 1.
5938 * src/reduce.c: Likewise.
5939 * src/print_graph.c (print_core): For the time being, just as for
5940 the report, depend upon --trace-flags to dump the full set of
5941 items.
5942 * src/reader.c (readgram): Once the grammar read, insert the rule
5943 0: `$axiom: START-SYMBOL $'.
5944 * tests/set.at: Adjust: rule 0 is now displayed, and since the
5945 number of the states has changed (the final state is no longer
5946 necessarily the last), catch up.
5947
5948 2001-12-27 Akim Demaille <akim@epita.fr>
5949
5950 Try to make the use of the eoftoken valid. Given that its value
5951 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
5952 is used instead of > 0 where appropriate, (ii), depend upon nritems
5953 instead of the 0-sentinel.
5954
5955 * src/gram.h, src/gram.c (nritems): New.
5956 Expected to be duplication of nitems, but for the time being...
5957 * src/reader.c (packgram): Assert nritems and nitems are equal.
5958 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
5959 * src/closure.c (print_closure, print_fderives): Likewise.
5960 * src/gram.c (ritem_print): Likewise.
5961 * src/print.c (print_core, print_grammar): Likewise.
5962 * src/print_graph.c: Likewise.
5963
5964 2001-12-27 Akim Demaille <akim@epita.fr>
5965
5966 * src/main.c (main): If there are complains after grammar
5967 reductions, then output the report anyway if requested, then die.
5968 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
5969 * src/reader.c (eoftoken): New.
5970 (parse_token_decl): If the token being defined has value `0', it
5971 is the eoftoken.
5972 (packsymbols): No longer hack `tags' to insert `$' by hand.
5973 Be sure to preserve the value of the eoftoken.
5974 (reader): Make sure eoftoken is defined.
5975 Initialize nsyms to 0: now eoftoken is created just like the others.
5976 * src/print.c (print_grammar): Don't special case the eof token.
5977 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
5978 lie anyway, albeit pleasant.
5979 * tests/calc.at: Exercise error messages with eoftoken.
5980 Change the grammar so that empty input is invalid.
5981 Adjust expectations.
5982 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
5983
5984 2001-12-27 Akim Demaille <akim@epita.fr>
5985
5986 * configure.in: Check the protos of strchr ans strspn.
5987 Replace strchr if needed.
5988 * src/system.h: Provide the protos of strchr, strspn and memchr if
5989 missing.
5990 * lib/strchr.c: New.
5991 * src/reader.c (symbols_save): Use strchr.
5992
5993 2001-12-27 Akim Demaille <akim@epita.fr>
5994
5995 * src/print.c, src/print_graph.c (escape): New.
5996 Use it to quote the TAGS outputs.
5997 * src/print_graph.c (print_state): Now errors are in red, and
5998 reductions in green.
5999 Prefer high to wide: output the state number on a line of its own.
6000
6001 2001-12-27 Akim Demaille <akim@epita.fr>
6002
6003 * src/state.h, src/state.c (reductions_new): New.
6004 * src/LR0.c (set_state_table): Let all the states have a
6005 `reductions', even if reduced to 0.
6006 (save_reductions): Adjust.
6007 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6008 * src/print.c (print_reductions, print_actions): Adjust.
6009 * src/output.c (action_row): Adjust.
6010
6011 2001-12-27 Akim Demaille <akim@epita.fr>
6012
6013 * src/state.h, src/state.c (errs_new, errs_dup): New.
6014 * src/LR0.c (set_state_table): Let all the states have an errs,
6015 even if reduced to 0.
6016 * src/print.c (print_errs, print_reductions): Adjust.
6017 * src/output.c (output_actions, action_row): Adjust.
6018 * src/conflicts.c (resolve_sr_conflict): Adjust.
6019
6020 2001-12-27 Akim Demaille <akim@epita.fr>
6021
6022 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6023
6024 2001-12-27 Akim Demaille <akim@epita.fr>
6025
6026 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6027 * src/print.c: here.
6028 (lookaheadset, shiftset): New, used as additional storage by
6029 print_reductions.
6030 (print_results): Adjust.
6031 (print_shifts, print_gotos, print_errs): New, extracted from...
6032 (print_actions): here.
6033 * src/print_graph.c (print_actions): Remove dead code.
6034
6035 2001-12-27 Akim Demaille <akim@epita.fr>
6036
6037 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6038 `$n' and `@n'.
6039
6040 2001-12-27 Akim Demaille <akim@epita.fr>
6041
6042 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6043 (build_relations): Adjust.
6044
6045 2001-12-27 Akim Demaille <akim@epita.fr>
6046
6047 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6048 duplication.
6049
6050 2001-12-27 Akim Demaille <akim@epita.fr>
6051
6052 * src/reader.c (packgram): Catch nitems overflows.
6053
6054 2001-12-27 Akim Demaille <akim@epita.fr>
6055
6056 * src/files.c, src/files.h (guard_obstack): Remove.
6057 * src/output.c (output): Adjust.
6058 * src/reader.c (parse_braces): New, factoring...
6059 (copy_action, copy_guard): these two which are renamed as...
6060 (parse_action, parse_guard): these.
6061 As a voluntary consequence, using braces around guards is now
6062 mandatory.
6063
6064 2001-12-27 Akim Demaille <akim@epita.fr>
6065
6066 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6067 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6068 members.
6069 (symbol_list_new): Adjust.
6070 (copy_action): action_line is the first line, not the last.
6071 (copy_guard): Just as for actions, store the `action' only, not
6072 the switch/case/break flesh.
6073 Don't parse the user action that might follow the guard, let...
6074 (readgram): do it, i.e., now, there can be an action after a
6075 guard.
6076 In other words the guard is just explicitly optional.
6077 (packgram): Adjust.
6078 * src/output.c (guards_output): New.
6079 (output_parser): Call it when needed.
6080 (output): Also free the guard and attrs obstacks.
6081 * src/files.c, src/files.h (obstack_save): Remove.
6082 (output_files): Remove.
6083 As a result, if one needs the former `.act' file, using an
6084 appropriate skeleton which requires actions and guards is now
6085 required.
6086 * src/main.c (main): Adjust.
6087 * tests/semantic.at: New.
6088 * tests/regression.at: Use `input.y' as input file name.
6089 Avoid 8+3 problems by requiring input.c when the test needs the
6090 parser.
6091
6092 2001-12-27 Akim Demaille <akim@epita.fr>
6093
6094 * src/reader.c (symbol_list_new): Be sure to initialize all the
6095 fields.
6096
6097 2001-12-27 Akim Demaille <akim@epita.fr>
6098
6099 All the hacks using a final pseudo state are now useless.
6100
6101 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6102 * src/lalr.c (nLA): New.
6103 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6104 instead of lookaheadsp from the pseudo state (nstate + 1).
6105
6106 2001-12-27 Akim Demaille <akim@epita.fr>
6107
6108 * src/output.c (action_row, token_actions): Use a state_t instead
6109 of a integer, and nlookaheads instead of the following state's
6110 lookaheadsp.
6111
6112 2001-12-27 Akim Demaille <akim@epita.fr>
6113
6114 * src/conflicts.c (log_resolution, flush_shift)
6115 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6116 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6117 (conflicts_print, print_reductions): Use a state_t instead of an
6118 integer when referring to a state.
6119 As much as possible, depend upon nlookaheads, instead of the
6120 `lookaheadsp' member of the following state (since lookaheads of
6121 successive states are successive, the difference between state n + 1
6122 and n served as the number of lookaheads for state n).
6123 * src/lalr.c (add_lookback_edge): Likewise.
6124 * src/print.c (print_core, print_actions, print_state)
6125 (print_results): Likewise.
6126 * src/print_graph.c (print_core, print_actions, print_state)
6127 (print_graph): Likewise.
6128 * src/conflicts.h: Adjust.
6129
6130 2001-12-27 Akim Demaille <akim@epita.fr>
6131
6132 * src/bison.hairy: Formatting/comment changes.
6133 ANSIfy.
6134 Remove `register' indications.
6135 Add plenty of `static'.
6136
6137 2001-12-27 Akim Demaille <akim@epita.fr>
6138
6139 * src/output.c (prepare): Drop the muscle `ntbase' which
6140 duplicates ntokens.
6141 * src/bison.simple: Formatting/comment changes.
6142 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6143 is an undocumented synonym.
6144
6145 2001-12-22 Akim Demaille <akim@epita.fr>
6146
6147 * src/output.c (output_table_data): Change the prototype to use
6148 `int' for array ranges: some invocations do pass an int, not a
6149 short.
6150 Reported by Wayne Green.
6151
6152 2001-12-22 Akim Demaille <akim@epita.fr>
6153
6154 Some actions of web2c.y are improperly triggered.
6155 Reported by Mike Castle.
6156
6157 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6158 * tests/regression.at (Web2c): Rename as...
6159 (Web2c Report): this.
6160 (Web2c Actions): New.
6161
6162 2001-12-22 Akim Demaille <akim@epita.fr>
6163
6164 Reductions in web2c.y are improperly reported.
6165 Reported by Mike Castle.
6166
6167 * src/conflicts.c (print_reductions): Fix.
6168 * tests/regression.at (Web2c): New.
6169
6170 2001-12-18 Akim Demaille <akim@epita.fr>
6171
6172 Some host fail on `assert (!"foo")', which expands to
6173 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6174 Reported by Nelson Beebee.
6175
6176 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6177 `#define it_succeeded 0' and `assert (it_succeeded)'.
6178
6179 2001-12-17 Marc Autret <autret_m@epita.fr>
6180
6181 * src/bison.simple: Don't hard code the skeleton line and filename.
6182 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6183 New line counter 'skeleton_line' (skeleton-line muscle).
6184
6185 2001-12-17 Paul Eggert <eggert@twinsun.com>
6186
6187 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6188 YYDEBUG must be defined to a nonzero value.
6189
6190 * src/bison.simple (yytname): Do not assume that the user defines
6191 YYDEBUG to a properly parenthesized expression.
6192
6193 2001-12-17 Akim Demaille <akim@epita.fr>
6194
6195 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6196 nlookaheads is a new member.
6197 Adjust all users.
6198 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6199 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6200 state.
6201
6202 2001-12-17 Akim Demaille <akim@epita.fr>
6203
6204 * src/files.h, src/files.c (open_files, close_files): Remove.
6205 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6206 let...
6207 * src/reader.c (reader): Do it.
6208
6209 2001-12-17 Akim Demaille <akim@epita.fr>
6210
6211 * src/conflicts.c (print_reductions): Formatting changes.
6212
6213 2001-12-17 Akim Demaille <akim@epita.fr>
6214
6215 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6216 (flush_reduce): New.
6217 (resolve_sr_conflict): Adjust.
6218
6219 2001-12-17 Akim Demaille <akim@epita.fr>
6220
6221 * src/output.c (output_obstack): Be static and rename as...
6222 (format_obstack): this, to avoid any confusion with files.c's
6223 output_obstack.
6224 * src/reader.h (muscle_obstack): Move to...
6225 * src/output.h: here, since it's defined in output.c.
6226
6227 2001-12-17 Akim Demaille <akim@epita.fr>
6228
6229 * src/output.c (action_row, save_column, default_goto)
6230 (sort_actions, matching_state, pack_vector): Better variable
6231 locality.
6232
6233 2001-12-17 Akim Demaille <akim@epita.fr>
6234
6235 * src/output.c: Various formatting changes.
6236
6237 2001-12-17 Akim Demaille <akim@epita.fr>
6238
6239 * src/files.c (output_files): Free the output_obstack.
6240 * src/main.c (main): Call print and print_graph conditionally.
6241 * src/print.c (print): Work unconditionally.
6242 * src/print_graph.c (print_graph): Work unconditionally.
6243 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6244
6245 2001-12-16 Marc Autret <autret_m@epita.fr>
6246
6247 * src/output.c (actions_output): Fix. When we use %no-lines,
6248 there is one less line per action.
6249
6250 2001-12-16 Marc Autret <autret_m@epita.fr>
6251
6252 * src/bison.simple: Remove a useless #line directive.
6253 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6254 * src/output.c (get_lines_number): New.
6255 (output_parser): Adjust, now takes care about the lines of a
6256 output muscles.
6257 Fix line numbering.
6258 (actions_output): Computes the number of lines taken by actions.
6259 (output_master_parser): Insert new skeleton which is the name of
6260 the output parser file name.
6261
6262 2001-12-15 Marc Autret <autret_m@epita.fr>
6263
6264 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6265
6266 2001-12-15 Marc Autret <autret_m@epita.fr>
6267
6268 * src/output.c (output_gram): Keep track of the hairy one.
6269
6270 2001-12-15 Akim Demaille <akim@epita.fr>
6271
6272 Make `make distcheck' work.
6273
6274 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6275 system.h which uses libgettext.h.
6276
6277 2001-12-15 Akim Demaille <akim@epita.fr>
6278
6279 * src/nullable.c (set_nullable): Useless rules must be skipped,
6280 otherwise, since we range over their symbols, we might look at a
6281 nonterminal which no longer ``exists'', i.e., it is not counted in
6282 `nvars', hence we overflow our arrays.
6283
6284 2001-12-15 Akim Demaille <akim@epita.fr>
6285
6286 The header can also be produced directly, without any obstack!
6287 Yahoo!
6288
6289 * src/files.c, src/files.h (defines_obstack): Remove.
6290 (compute_header_macro): Global.
6291 (defines_obstack_save): Remove.
6292 * src/reader.c (parse_union_decl): No longer output to
6293 defines_obstack: its content can be found in the `stype' muscle
6294 anyway.
6295 (output_token_translations): Merge into...
6296 (symbols_output): this.
6297 Rename as...
6298 (symbols_save): this.
6299 (reader): Adjust.
6300 * src/output.c (header_output): New.
6301 (output): Call it.
6302
6303 2001-12-15 Akim Demaille <akim@epita.fr>
6304
6305 * src/reader.c (parse_union_decl): Instead of handling two obstack
6306 simultaneously, use one to define the `stype' muscle, and use the
6307 value of the latter to fill defines_obstack.
6308 (copy_comment): Remove.
6309 (copy_comment2): Work for a single obstack.
6310 Rename as...
6311 (copy_comment): this.
6312
6313 2001-12-15 Akim Demaille <akim@epita.fr>
6314
6315 * src/lex.c, src/lex.h (xgetc): No longer static.
6316 * src/reader.c (parse_union_decl): Revamp.
6317
6318 2001-12-15 Akim Demaille <akim@epita.fr>
6319
6320 Still making progress in separating Bison into (i) input, (ii)
6321 process, (iii) output: now we can directly output the parser file
6322 without using table_obstack at all.
6323
6324 * src/files.c, src/files.h (table_obstack): Bye bye.
6325 (parser_file_name): New.
6326 * src/files.c (compute_output_file_names): Compute it.
6327 * src/output.c (actions_output, output_parser)
6328 (output_master_parser): To a file instead of an obstack.
6329
6330 2001-12-15 Akim Demaille <akim@epita.fr>
6331
6332 Attach actions to rules, instead of pre-outputting them to
6333 actions_obstack.
6334
6335 * src/gram.h (rule_t): action and action_line are new members.
6336 * src/reader.c (symbol_list): Likewise.
6337 (copy_action): Save the actions within the rule.
6338 (packgram): Save them in rule_table.
6339 * src/output.c (actions_output): New.
6340 (output_parser): Use it on `%%actions'.
6341 (output_rule_data): Don't free rule_table.
6342 (output): Do it.
6343 (prepare): Don't save the `action' muscle.
6344 * src/bison.simple: s/%%action/%%actions/.
6345
6346 2001-12-15 Akim Demaille <akim@epita.fr>
6347
6348 * src/reader.c (copy_action): When --yacc, don't append a `;'
6349 to the user action: let it fail if lacking.
6350 Suggested by Arnold Robbins and Tom Tromey.
6351
6352 2001-12-14 Akim Demaille <akim@epita.fr>
6353
6354 * src/lex.c (literalchar): Simply return the char you decoded, non
6355 longer mess around with obstacks and int pointers.
6356 Adjust all callers.
6357
6358 2001-12-14 Akim Demaille <akim@epita.fr>
6359
6360 * src/lex.c (literalchar): Don't escape the special characters,
6361 just decode them, and keep them as char (before, eol was output as
6362 the 2 char string `\n' etc.).
6363 * src/output.c (output_rule_data): Use quotearg to output the
6364 token strings.
6365
6366 2001-12-13 Paul Eggert <eggert@twinsun.com>
6367
6368 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6369 Do not infringe on the global user namespace when using C++.
6370 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6371 All uses of `fprintf' and `stderr' changed.
6372
6373 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6374
6375 2001-12-13 Akim Demaille <akim@epita.fr>
6376
6377 The computation of nullable is broken: it doesn't handle empty
6378 RHS's properly.
6379
6380 * tests/torture.at (GNU AWK Grammar): New.
6381 * tests/sets.at (Nullable): New.
6382 * src/nullable.c (set_nullable): Instead of blindly looping over
6383 `ritems', loop over the rules, and then over their rhs's.
6384
6385 Work around Autotest bugs.
6386
6387 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6388 frame, because Autotest understand lines starting with a `+' as
6389 traces from the shell. Then, they are not processed properly.
6390 Admittedly an Autotest bug, but we don't have time to wait for
6391 Autotest to catch up.
6392 * tests/regression.at (Broken Closure): Adjust to the new table
6393 frames.
6394 Move to...
6395 * tests/sets.at: here.
6396
6397 2001-12-13 Akim Demaille <akim@epita.fr>
6398
6399 * src/closure.c (closure): Use nrules instead of playing tricks
6400 with BITS_PER_WORD.
6401
6402 2001-12-13 Akim Demaille <akim@epita.fr>
6403
6404 * src/print.c (print_actions): Output the handling of `$' as the
6405 traces do: shifting the token EOF. Before EOF was treated as a
6406 nonterminal.
6407 * tests/regression.at: Adjust some tests.
6408 * src/print_graph.c (print_core): Complete the set of items via
6409 closure. The next-to-final and final states are still unsatisfying,
6410 but that's to be addressed elsewhere.
6411 No longer output the rule numbers, but do output the state number.
6412 A single loop for the shifts + gotos is enough, but picked a
6413 distinct color for each.
6414 (print_graph): Initialize and finalize closure.
6415
6416 2001-12-13 Akim Demaille <akim@epita.fr>
6417
6418 * src/reader.c (readgram): Remove dead code, an strip useless
6419 braces.
6420 (get_type): Remove, unused.
6421
6422 2001-12-12 Akim Demaille <akim@epita.fr>
6423
6424 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6425 on that of lib/error.c.
6426
6427 2001-12-12 Akim Demaille <akim@epita.fr>
6428
6429 Some hosts don't like `/' in includes.
6430
6431 * src/system.h: Include libgettext.h without qualifying the path.
6432 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6433 $(top_srcdir).
6434
6435 2001-12-11 Marc Autret <autret_m@epita.fr>
6436
6437 * src/output.c (output_parser): Remove useless muscle.
6438
6439 2001-12-11 Marc Autret <autret_m@epita.fr>
6440
6441 * src/bison.simple: Remove #line just before %%epilogue. It
6442 is now handled in ...
6443 * src/reader.c (read_additionnal_code): Add the output of a
6444 #line for the epilogue.
6445
6446 2001-12-10 Marc Autret <autret_m@epita.fr>
6447
6448 * src/reader.c (copy_definition): Re-use CPP-outed code which
6449 replace precedent remove.
6450 * src/bison.simple: Remove #line before %%prologue because
6451 %%input-line is wrong at this time.
6452
6453 2001-12-10 Marc Autret <autret_m@epita.fr>
6454
6455 * src/reader.c (symbols_output): Clean up.
6456 * src/output.c (output_gram, output): Clean up.
6457
6458 2001-12-10 Akim Demaille <akim@epita.fr>
6459
6460 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6461 * src/LR0.c (set_state_table): here.
6462 * src/lalr.c (lalr): Call it.
6463
6464 2001-12-10 Akim Demaille <akim@epita.fr>
6465
6466 * src/state.h (shifts): Remove the `number' member: shifts are
6467 attached to state, hence no longer need to be labelled with a
6468 state number.
6469
6470 2001-12-10 Akim Demaille <akim@epita.fr>
6471
6472 Now that states have a complete set of members, the linked list of
6473 shifts is useless: just fill directly the state's shifts member.
6474
6475 * src/state.h (shifts): Remove the `next' member.
6476 * src/LR0.c (first_state, last_state): Remove.
6477 Adjust the callers.
6478 (augment_automaton): Don't look for the shifts that must be added
6479 a shift on EOF: it is those of the state we looked for! But now,
6480 since shifts are attached, it is no longer needed to looking
6481 merely by its id: its number.
6482
6483 2001-12-10 Akim Demaille <akim@epita.fr>
6484
6485 * src/LR0.c (augment_automaton): Better variable locality.
6486 Remove an impossible branch: if there is a state corresponding to
6487 the start symbol being shifted, then there is shift for the start
6488 symbol from the initial state.
6489
6490 2001-12-10 Akim Demaille <akim@epita.fr>
6491
6492 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6493 only when appropriate: when insert_start_shifting_state' is not
6494 invoked.
6495 * tests/regression.at (Rule Line Numbers): Adjust.
6496
6497 2001-12-10 Akim Demaille <akim@epita.fr>
6498
6499 * src/LR0.c (augment_automaton): Now that all states have shifts,
6500 merge the two cases addition shifts to the initial state.
6501
6502 2001-12-10 Akim Demaille <akim@epita.fr>
6503
6504 * src/lalr.c (set_state_table): Move to...
6505 * src/LR0.c: here.
6506 * src/lalr.c (lalr): Don't call it...
6507 * src/LR0.c (generate_states): do it.
6508 * src/LR0.h (first_state): Remove, only the table is used.
6509
6510 2001-12-10 Akim Demaille <akim@epita.fr>
6511
6512 * src/LR0.h (first_shift, first_reduction): Remove.
6513 * src/lalr.c: Don't use first_shift: find shifts through the
6514 states.
6515
6516 2001-12-10 Akim Demaille <akim@epita.fr>
6517
6518 * src/LR0.c: Attach shifts to states as soon as they are
6519 computed.
6520 * src/lalr.c (set_state_table): Instead of assigning shifts to
6521 state, just assert that the mapping was properly done.
6522
6523 2001-12-10 Akim Demaille <akim@epita.fr>
6524
6525 * src/LR0.c (insert_start_shift): Rename as...
6526 (insert_start_shifting_state): this.
6527 (insert_eof_shifting_state, insert_accepting_state): New.
6528 (augment_automaton): Adjust.
6529 Better locality of the variables.
6530 When looking if the start_symbol is shifted from the initial
6531 state, using `while (... symbol != start_symbol ...)' sounds
6532 better than `while (... symbol < start_symbol ...)': If fail
6533 to see how the order between symbols could be relevant!
6534
6535 2001-12-10 Akim Demaille <akim@epita.fr>
6536
6537 * src/getargs.h: Don't declare `spec_name_prefix' and
6538 `spec_file_prefix', declared by src/files.h.
6539 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6540 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6541 * src/output.c (prepare): Adjust.
6542 * src/reader.c (symbols_output): Likewise.
6543 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6544
6545 2001-12-10 Akim Demaille <akim@epita.fr>
6546
6547 * src/muscle_tab.c (muscle_init): NULL is a better default than
6548 `"0"'.
6549
6550 2001-12-10 Akim Demaille <akim@epita.fr>
6551
6552 * src/reader.c (reader): Calling symbols_output once is enough.
6553
6554 2001-12-10 Akim Demaille <akim@epita.fr>
6555
6556 Now that states have a complete set of members, the linked list of
6557 reductions is useless: just fill directly the state's reductions
6558 member.
6559
6560 * src/state.h (struct reductions): Remove member `number' and
6561 `next'.
6562 * src/LR0.c (first_reduction, last_reduction): Remove.
6563 (save_reductions): Don't link the new reductions, store them in
6564 this_state.
6565 * src/lalr.c (set_state_table): No need to attach reductions to
6566 states, it's already done.
6567 * src/output.c (output_actions): No longer free the shifts, then
6568 the reductions, then the states: free all the states and their
6569 members.
6570
6571 2001-12-10 Akim Demaille <akim@epita.fr>
6572
6573 * src/options.c (OPTN, DRTV, BOTH): New.
6574 (option_table): Use them.
6575
6576 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6577 the job of system.h.
6578 * src/options.c: Don't include stdio.h and xalloc.h for the same
6579 reasons.
6580
6581 2001-12-10 Akim Demaille <akim@epita.fr>
6582
6583 * src/output.c (output, prepare): Make sure the values of the
6584 muscles `action' and `prologue' are 0-terminated.
6585
6586 2001-12-10 Akim Demaille <akim@epita.fr>
6587
6588 Clean up GCC warnings.
6589
6590 * src/reader.c (copy_action): `buf' is not used.
6591 (parse_skel_decl): Be static.
6592 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6593 * src/options.h (create_long_option_table): Have a real prototype.
6594 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6595 (hash_delete_at): Return const void *.
6596 Adjust casts to preserve the const.
6597
6598 2001-12-10 Akim Demaille <akim@epita.fr>
6599
6600 * configure.in: Require 2.52g.
6601 M4 is not needed, but AUTOM4TE is.
6602 * m4/m4.m4: Remove.
6603 * tests/Makefile.am: Adjust.
6604
6605 2001-12-10 Akim Demaille <akim@epita.fr>
6606
6607 One structure for states is enough, even though theoretically
6608 there are LR(0) states and LALR(1) states.
6609
6610 * src/lalr.h (state_t): Remove.
6611 (state_table): Be state_t **, not state_t *.
6612 * src/state.h (core, CORE_ALLOC): Rename as...
6613 (state_t, STATE_ALLOC): this.
6614 Add the LALR(1) members: shifts, reductions, errs.
6615 * src/LR0.c (state_table): Rename as...
6616 (state_hash): this, to avoid name clashes with the global
6617 `state_table'.
6618 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6619 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6620
6621 2001-12-10 Akim Demaille <akim@epita.fr>
6622
6623 Bison dumps core on bash.y.
6624 Reported by Pascal Bart.
6625
6626 * src/warshall.c (bitmatrix_print): New.
6627 (TC): Use it.
6628 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6629 j must be the outer loop.
6630 * tests/regression.at (Broken Closure): New.
6631
6632 2001-12-05 Akim Demaille <akim@epita.fr>
6633
6634 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6635 its argument.
6636 Reported by Peter Hámorský.
6637
6638 2001-12-05 Akim Demaille <akim@epita.fr>
6639
6640 * src/conflicts.c (err_table): Remove.
6641 (resolve_sr_conflict): Adjust.
6642 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6643 Rename as...
6644 (state_t.reductions, state_t.shifts): this.
6645
6646 2001-12-05 Akim Demaille <akim@epita.fr>
6647
6648 * src/reduce.c (reduce_grammar_tables): No longer disable the
6649 removal of useless rules via CPP but via `if (0)', so that the
6650 compiler still check the code is valid.
6651 For instance, it should have noticed `rline' no longer exists: use
6652 the `line' member of rule_t.
6653 * src/gram.c (dummy, rline): Remove, unused.
6654
6655 2001-12-05 Akim Demaille <akim@epita.fr>
6656
6657 * src/output.c (pack_vector): Use assert, not berror.
6658 * src/main.c (berror): Remove, unused.
6659
6660 2001-12-05 Akim Demaille <akim@epita.fr>
6661
6662 New experimental feature: if --verbose --trace output all the
6663 items of a state, not only its kernel.
6664
6665 * src/print.c (print_core): If `trace_flag', then invoke closure
6666 before outputting the items of the state (print_core is no longer
6667 a correct name them).
6668 (print_results): Invoke new_closure/free_closure if needed.
6669
6670 2001-12-05 Akim Demaille <akim@epita.fr>
6671
6672 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6673 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6674 (nitemset): for consistency with the rest of the project.
6675
6676 2001-12-05 Akim Demaille <akim@epita.fr>
6677
6678 * src/closure.c (print_closure): Improve.
6679 (closure): Use it for printing input and output.
6680
6681 2001-12-05 Akim Demaille <akim@epita.fr>
6682
6683 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6684 indexed by nonterminals.
6685
6686 2001-12-05 Akim Demaille <akim@epita.fr>
6687
6688 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6689 what it was!).
6690 * src/warshall.h: Remove accidental duplication of the content.
6691
6692 2001-12-05 Akim Demaille <akim@epita.fr>
6693
6694 * src/closure.c (set_fderives): De-obfuscate.
6695
6696 2001-12-05 Akim Demaille <akim@epita.fr>
6697
6698 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6699
6700 2001-12-05 Akim Demaille <akim@epita.fr>
6701
6702 * src/closure.c (set_firsts): De-obfuscate.
6703
6704 2001-12-05 Akim Demaille <akim@epita.fr>
6705
6706 * src/output.c (action_row): De-obfuscate
6707 using the good o' techniques: arrays not pointers, variable
6708 locality, BITISSET, RESETBIT etc.
6709
6710 2001-12-05 Akim Demaille <akim@epita.fr>
6711
6712 Pessimize the code to simplify it: from now on, all the states
6713 have a valid SHIFTS, which NSHIFTS is possibly 0.
6714
6715 * src/LR0.c (shifts_new): Be global and move to..
6716 * src/state.c, src/state.h: here.
6717 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6718 * src/print_graph: Adjust.
6719
6720 2001-12-05 Akim Demaille <akim@epita.fr>
6721
6722 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6723 * src/conflicts.c: Use it.
6724 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6725 incorrectly ``simplified''.
6726
6727 2001-12-05 Akim Demaille <akim@epita.fr>
6728
6729 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6730 using the good o' techniques: arrays not pointers, variable
6731 locality, BITISSET, RESETBIT etc.
6732
6733 2001-12-05 Akim Demaille <akim@epita.fr>
6734
6735 * src/state.h (SHIFT_SYMBOL): New.
6736 * src/conflicts.c: Use it to deobfuscate.
6737
6738 2001-12-05 Akim Demaille <akim@epita.fr>
6739
6740 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6741 (print_reductions): De-obfuscate using the good o' techniques:
6742 arrays not pointers, variable locality, BITISSET.
6743
6744 2001-12-05 Akim Demaille <akim@epita.fr>
6745
6746 * src/conflicts.c (print_reductions): Arrays, not pointers.
6747 Use BITISSET.
6748
6749 2001-12-05 Akim Demaille <akim@epita.fr>
6750
6751 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6752
6753 2001-12-05 Akim Demaille <akim@epita.fr>
6754
6755 * src/conflicts.c (print_reductions): Improve variable locality.
6756
6757 2001-12-05 Akim Demaille <akim@epita.fr>
6758
6759 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6760
6761 2001-12-05 Akim Demaille <akim@epita.fr>
6762
6763 * src/conflicts.c (print_reductions): Improve variable locality.
6764
6765 2001-12-05 Akim Demaille <akim@epita.fr>
6766
6767 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6768 * src/lalr.c: Use them.
6769
6770 2001-12-05 Akim Demaille <akim@epita.fr>
6771
6772 * src/LR0.c (augment_automaton): Formatting changes.
6773 Better variable locality.
6774
6775 2001-12-05 Akim Demaille <akim@epita.fr>
6776
6777 * src/lalr.c (matrix_print): New.
6778 (transpose): Use it.
6779 Use arrays instead of pointers.
6780
6781 2001-12-05 Akim Demaille <akim@epita.fr>
6782
6783 * src/lalr.c (maxrhs): Move to...
6784 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6785 * src/lalr.c (build_relations): Adjust.
6786
6787 2001-12-05 Akim Demaille <akim@epita.fr>
6788
6789 * src/lalr.c (transpose): Free the memory allocated to the
6790 argument, as it is replaced by the results by the unique caller.
6791 (build_relations): Merely invoke transpose: it handles the memory
6792 deallocation.
6793 Improve variable locality.
6794 Avoid variables used as mere abbreviations.
6795 (compute_lookaheads): Use arrays instead of pointers.
6796
6797 2001-12-05 Akim Demaille <akim@epita.fr>
6798
6799 * src/lalr.c (initialize_F): Improve variable locality.
6800 Avoid variables used as mere abbreviations.
6801
6802 2001-12-05 Akim Demaille <akim@epita.fr>
6803
6804 * src/derives.c (print_derives): Display the ruleno.
6805 * src/lalr.c (initialize_F, transpose): Better variable locality
6806 to improve readability.
6807 Avoid variables used as mere abbreviations.
6808
6809 2001-12-05 Akim Demaille <akim@epita.fr>
6810
6811 * src/lalr.c (traverse): Use arrays instead of pointers.
6812
6813 2001-12-05 Akim Demaille <akim@epita.fr>
6814
6815 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
6816 the handling of squeue.
6817 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6818
6819 2001-12-05 Akim Demaille <akim@epita.fr>
6820
6821 Because useless nonterminals are now kept alive (instead of being
6822 `destroyed'), we now sometimes examine them, and store information
6823 related to them. Hence we need to know their number, and adjust
6824 memory allocations.
6825
6826 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
6827 static.
6828 * src/LR0.c (allocate_itemsets): The memory allocated to
6829 `symbol_count' was used for two different purpose: once to count
6830 the number of occurrences of each symbol, and later reassigned to
6831 `shift_symbol', containing the symbol that can be shifted from a
6832 given state.
6833 Deobfuscate, i.e., allocate, use and free `symbol_count' here
6834 only, and...
6835 (new_itemsets): Allocate `shift_symbol' here.
6836 (allocate_itemsets): symbol_count includes useless nonterminals.
6837 Make room for them.
6838 (free_storage): Use `free', not `XFREE', for pointers that cannot
6839 be null.
6840
6841 2001-12-05 Akim Demaille <akim@epita.fr>
6842
6843 * src/nullable.c (set_nullable): Deobfuscate the handling of
6844 ritem.
6845 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6846
6847 2001-12-05 Akim Demaille <akim@epita.fr>
6848
6849 * src/gram.c, src/gram.h (ritem_print): New.
6850 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
6851 (This useless function was defined only to work around VMS linkers
6852 that can't handle compilation units with variables only).
6853 * src/reduce.c (dump_grammar): Use it to trace the construction of
6854 ritem.
6855
6856 2001-12-04 Paul Eggert <eggert@twinsun.com>
6857
6858 * src/bison.simple (union yyalloc): Change member names
6859 to be the same as the stack names.
6860 (yyparse): yyptr is now union yyalloc *, not char *.
6861 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
6862 and may generate better code on some machines.
6863 (yystpcpy): Use prototype if __STDC__ is defined, not just
6864 if __cplusplus is defined.
6865
6866 2001-11-30 Akim Demaille <akim@epita.fr>
6867
6868 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
6869 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
6870 Gettext doesn't compile cleanly, and dies with -Werror.
6871 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
6872 Include WARNING_CFLAGS here.
6873 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
6874 before being defined.
6875
6876 2001-11-27 Paul Eggert <eggert@twinsun.com>
6877
6878 * lib/quotearg.h (quotearg_n, quotearg_n_style):
6879 First arg is int, not unsigned.
6880 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
6881 (SIZE_MAX, UINT_MAX): New macros.
6882 (quotearg_n_options): Abort if N is negative.
6883 Avoid overflow check on hosts where size_t is 64 bits and int
6884 is 32 bits, as overflow is impossible there.
6885 Fix off-by-one typo that caused unnecessary reallocation.
6886
6887 2001-11-29 Paul Eggert <eggert@twinsun.com>
6888
6889 Name space cleanup in generated parser.
6890
6891 * doc/bison.texinfo (Bison Parser): Discuss system headers
6892 and their effect on the user name space.
6893
6894 * src/bison.simple:
6895 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
6896 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
6897 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
6898
6899 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
6900 on user names when possible.
6901
6902 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
6903 Simplify test for whather <alloca.h> exists.
6904
6905 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
6906
6907 (<stdio.h>): Include if YYDEBUG.
6908
6909 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
6910 ! defined (yyoverflow) && ! defined (yymemcpy).
6911
6912 (yymemcpy, yyparse): Rename local variables as needed so that
6913 they all begin with 'yy'.
6914
6915 (yystrlen, yystpcpy): New functions.
6916
6917 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
6918 All uses changed.
6919
6920 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
6921 instead of relying on string.h functions. Use YYSTACK_ALLOC
6922 and YYSTACK_FREE instead of malloc and free.
6923
6924 2001-11-30 Akim Demaille <akim@epita.fr>
6925
6926 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
6927 before their first uses.
6928 (YYBISON, YYPURE): Move to the top of the output.
6929
6930 2001-11-30 Akim Demaille <akim@epita.fr>
6931
6932 * tests/reduce.at (Useless Nonterminals): Fix.
6933
6934 2001-11-30 Akim Demaille <akim@epita.fr>
6935
6936 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
6937 if body instead of `;' to pacify GCC's warnings.
6938
6939 2001-11-30 Akim Demaille <akim@epita.fr>
6940
6941 Instead of mapping the LHS of unused rules to -1, keep the LHS
6942 valid, but flag the rules as invalid.
6943
6944 * src/gram.h (rule_t): `useful' is a new member.
6945 * src/print.c (print_grammar): Adjust.
6946 * src/derives.c (set_derives): Likewise.
6947 * src/reader.c (packgram, reduce_output): Likewise.
6948 * src/reduce.c (reduce_grammar_tables): Likewise.
6949 * tests/reduce.at (Underivable Rules, Useless Rules): New.
6950
6951 2001-11-30 Akim Demaille <akim@epita.fr>
6952
6953 * src/reduce.c (reduce_output): Formatting changes.
6954 * src/print.c (print_results, print_grammar): Likewise.
6955 * tests/regression.at (Rule Line Numbers)
6956 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
6957
6958 2001-11-30 Akim Demaille <akim@epita.fr>
6959
6960 * src/reduce.c (nonterminals_reduce): Instead of throwing away
6961 useless nonterminals, move them at the end of the symbol arrays.
6962 (reduce_output): Adjust.
6963 * tests/reduce.at (Useless Nonterminals): Adjust.
6964
6965 2001-11-30 Akim Demaille <akim@epita.fr>
6966
6967 * src/reduce.c: Various comment/formatting changes.
6968 (nonterminals_reduce): New, extracted from...
6969 (reduce_grammar_tables): here.
6970 (reduce_grammar): Call nonterminals_reduce.
6971
6972 2001-11-29 Paul Eggert <eggert@twinsun.com>
6973
6974 * src/bison.simple (YYSTACK_REALLOC): Remove.
6975 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
6976 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
6977 New macros.
6978 (union yyalloc): New type.
6979 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
6980 an arbitrary restriction on hosts where size_t is wider than int.
6981
6982 (yyparse): Don't dump core if alloca or malloc fails; instead, report
6983 a parser stack overflow. Allocate just one block of memory for all
6984 three stacks, instead of allocating three blocks; this typically is
6985 faster and reduces fragmentation.
6986
6987 Do not limit the number of items in the stack to a value that fits
6988 in 'int', as this is an arbitrary limit on hosts with 64-bit
6989 size_t and 32-bit int.
6990
6991 2001-11-29 Marc Autret <autret_m@epita.fr>
6992
6993 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
6994 of defining YYERROR_VERBOSE.
6995 [AT_DATA]: $4 is now out of C declarations in the prologue.
6996
6997 2001-11-28 Marc Autret <autret_m@epita.fr>
6998
6999 * src/reader.c (parse_dquoted_param): New.
7000 (parse_skel_decl): Use it.
7001 * src/lex.h: Add its prototype.
7002 * src/lex.c (literalchar): Become not static.
7003
7004 2001-11-28 Marc Autret <autret_m@epita.fr>
7005
7006 * src/output.h: And put its extern declaration here.
7007 * src/output.c (error_verbose): Define here.
7008 (prepare): Echo name modification.
7009 * src/getargs.h: Clean its extern declaration.
7010 * src/getargs.c (error_verbose_flag): Remove.
7011 (getargs): Remove case 'e'.
7012 * src/options.c (option_table): 'error-verbose' is now seen as simple
7013 percent option.
7014 Include output.h.
7015
7016 * src/reader.c (read_declarations): Remove case tok_include.
7017 (parse_include_decl): Remove.
7018 * src/lex.h (token_t): Remove tok_include.
7019 * src/options.c (option_table): 'include' is now a simple command line
7020 option.
7021
7022 2001-11-28 Marc Autret <autret_m@epita.fr>
7023
7024 * src/bison.simple: Adjust muscle names.
7025 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7026 * src/output.c (prepare): s/_/-/ for the muscles names.
7027 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7028
7029 2001-11-28 Marc Autret <autret_m@epita.fr>
7030
7031 * src/bison.simple: Fix debug.
7032 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7033
7034 2001-11-28 Akim Demaille <akim@epita.fr>
7035
7036 * src/LR0.c (shifts_new): New.
7037 (save_shifts, insert_start_shift, augment_automaton): Use it.
7038
7039 2001-11-28 Akim Demaille <akim@epita.fr>
7040
7041 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7042 keep ruleno only.
7043
7044 2001-11-28 Akim Demaille <akim@epita.fr>
7045
7046 * src/closure.c (closure): Instead of looping over word in array
7047 then bits in words, loop over bits in array.
7048
7049 2001-11-28 Akim Demaille <akim@epita.fr>
7050
7051 * src/closure.c (closure): No longer optimize the special case
7052 where all the bits of `ruleset[r]' are set to 0, to make the code
7053 clearer.
7054
7055 2001-11-28 Akim Demaille <akim@epita.fr>
7056
7057 * src/closure.c (closure): `r' and `c' are new variables, used to
7058 de-obfuscate accesses to RULESET and CORE.
7059
7060 2001-11-28 Akim Demaille <akim@epita.fr>
7061
7062 * src/reduce.c (reduce_print): Use ngettext.
7063 (dump_grammar): Improve the trace accuracy.
7064
7065 2001-11-28 Akim Demaille <akim@epita.fr>
7066
7067 * src/reduce.c (dump_grammar): Don't translate trace messages.
7068
7069 2001-11-28 Akim Demaille <akim@epita.fr>
7070
7071 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7072 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7073 as all tags are free'ed afterwards.
7074 From Enrico Scholz.
7075
7076 2001-11-27 Paul Eggert <eggert@twinsun.com>
7077
7078 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7079 use alloca when we didn't want to, and vice versa.
7080
7081 2001-11-27 Marc Autret <autret_m@epita.fr>
7082
7083 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7084 initialization.
7085 * src/output.c (prepare): Remove its update.
7086
7087 2001-11-27 Marc Autret <autret_m@epita.fr>
7088
7089 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7090 Use %error-verbose.
7091
7092 2001-11-27 Marc Autret <autret_m@epita.fr>
7093
7094 * src/bison.simple: Remove YYERROR_VERBOSE using.
7095 Use %%error_verbose.
7096 (yyparse): Likewise.
7097 * src/output.c (prepare): Give its final value.
7098 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7099 * src/getargs.h: Add its extern declaration.
7100 * src/getargs.c (error_verbose_flag): New int.
7101 (getargs): Update to catch new case.
7102 * src/options.c (option_table): 'error-verbose' is a new option.
7103 (shortopts): Update.
7104
7105 2001-11-27 Akim Demaille <akim@epita.fr>
7106
7107 * src/system.h: Use intl/libgettext.h.
7108 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7109
7110 2001-11-27 Akim Demaille <akim@epita.fr>
7111
7112 * tests/torture.at (Exploding the Stack Size with Malloc):
7113 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7114
7115 2001-11-27 Akim Demaille <akim@epita.fr>
7116
7117 * src/files.c: Include error.h.
7118 Reported by Hans Aberg.
7119
7120 2001-11-26 Marc Autret <autret_m@epita.fr>
7121
7122 * src/reader.c (parse_include_decl): New, not yet implemented.
7123 (read_declarations): Add case tok_include.
7124 * src/getargs.h (include): Add its extern definition.
7125 * src/getargs.c (include): New const char *.
7126 (getargs): Add case '-I'.
7127 * src/options.c (option_table): Add include as command line and
7128 percent option.
7129 * src/lex.h (token_t): Add tok_include.
7130
7131 2001-11-26 Akim Demaille <akim@epita.fr>
7132
7133 * src/reader.c (readgram): Make sure rules for mid-rule actions
7134 have a lineno equal to that of their host rule.
7135 Reported by Hans Aberg.
7136 * tests/regression.at (Rule Line Numbers): New.
7137
7138 2001-11-26 Akim Demaille <akim@epita.fr>
7139
7140 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7141 size_ts.
7142
7143 2001-11-26 Akim Demaille <akim@epita.fr>
7144
7145 * src/complain.c, src/complain.h (error): Remove, provided by
7146 lib/error.[ch].
7147
7148 2001-11-26 Akim Demaille <akim@epita.fr>
7149
7150 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7151 issue an error message.
7152 * tests/regression.at (Invalid %directive): New.
7153 Reported by Hans Aberg.
7154
7155 2001-11-26 Akim Demaille <akim@epita.fr>
7156
7157 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7158 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7159
7160 2001-11-26 Akim Demaille <akim@epita.fr>
7161
7162 * src/conflicts.c (conflicts_print): Don't complain at all when
7163 there are no reduce/reduce conflicts, and as many shift/reduce
7164 conflicts as expected.
7165 * tests/regression.at (%expect right): Adjust.
7166
7167 2001-11-23 Akim Demaille <akim@epita.fr>
7168
7169 * lib/alloca.c: Update, from fileutils.
7170
7171 2001-11-23 Akim Demaille <akim@epita.fr>
7172
7173 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7174
7175 2001-11-23 Akim Demaille <akim@epita.fr>
7176
7177 * src/system.h: Include alloca.h.
7178 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7179
7180 2001-11-23 Akim Demaille <akim@epita.fr>
7181
7182 * src/print_graph.c (print_actions): Remove `rule', unused.
7183 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7184 pacify GCC's signed < unsigned warnings.
7185 * src/closure.c (itemsetsize): Likewise.
7186 * src/reader.c (symbol_list_new): Static.
7187
7188 2001-11-23 Akim Demaille <akim@epita.fr>
7189
7190 Attaching lineno to buckets is stupid, since only one copy of each
7191 symbol is kept, only the line of the first occurrence is kept too.
7192
7193 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7194 * src/reader.c (rline_allocated): Remove, unused.
7195 (symbol_list): Have a `line' member.
7196 (symbol_list_new): New.
7197 (readgram): Use it.
7198 * src/print.c (print_grammar): Output the rule line numbers.
7199 * tests/regression.at (Solved SR Conflicts)
7200 (Unresolved SR Conflicts): Adjust.
7201 Reported by Hans Aberg.
7202
7203 2001-11-22 Marc Autret <autret_m@epita.fr>
7204
7205 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7206
7207 2001-11-22 Marc Autret <autret_m@epita.fr>
7208
7209 * src/muscle_tab.c (muscle_init): Remove initialization of
7210 skeleton muscle.
7211 * src/output.c (output_master_parser): Do it here.
7212
7213 2001-11-20 Akim Demaille <akim@epita.fr>
7214
7215 * po/sv.po: New.
7216 * configure.in (ALL_LINGUAS): Adjust.
7217 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7218 longer contains strings to translate.
7219
7220 2001-11-19 Akim Demaille <akim@epita.fr>
7221
7222 * src/conflicts.c (conflicts_print): Add a missing \n.
7223
7224 2001-11-19 Akim Demaille <akim@epita.fr>
7225
7226 * src/nullable.c (nullable_print): New.
7227 (set_nullable): Call it when tracing.
7228 Better locality of variables.
7229
7230 2001-11-19 Akim Demaille <akim@epita.fr>
7231
7232 * src/print.c (print_actions): Better locality of variables.
7233
7234 2001-11-19 Akim Demaille <akim@epita.fr>
7235
7236 * src/derives.c (print_derives): Fix and enrich.
7237 * src/closure.c (print_fderives): Likewise.
7238
7239 2001-11-19 Akim Demaille <akim@epita.fr>
7240
7241 * src/closure.c (itemsetend): Remove, replaced with...
7242 (itemsetsize): new.
7243
7244 2001-11-19 Akim Demaille <akim@epita.fr>
7245
7246 * src/LR0.c (kernel_end): Remove, replaced with...
7247 (kernel_size): new.
7248
7249 2001-11-19 Akim Demaille <akim@epita.fr>
7250
7251 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7252 to clarify.
7253
7254 2001-11-19 Akim Demaille <akim@epita.fr>
7255
7256 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7257
7258 2001-11-19 Akim Demaille <akim@epita.fr>
7259
7260 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7261 trace messages.
7262 * src/LR0.c: Likewise.
7263 (allocate_itemsets): Use arrays instead of pointers to clarify.
7264
7265 2001-11-19 Akim Demaille <akim@epita.fr>
7266
7267 * src/getargs.c (statistics_flag): Replace with...
7268 (trace_flag): New.
7269 (longopts): Accept --trace instead of --statistics.
7270 * src/getargs.h, src/options.c: Adjust.
7271 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7272 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7273
7274 2001-11-19 Akim Demaille <akim@epita.fr>
7275
7276 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7277 pointers to clarify the code.
7278 (save_reductions, save_shifts): Factor common parts of alternatives.
7279
7280 2001-11-19 Akim Demaille <akim@epita.fr>
7281
7282 * src/LR0.c (new_state, get_state): Complete TRACE code.
7283 * src/closure.c: Include `reader.h' to get `tags', needed by the
7284 trace code.
7285 Rename the conditional DEBUG as TRACE.
7286 Output consistently TRACEs to stderr, not stdout.
7287 * src/derives.c: Likewise.
7288 * src/reduce.c: (inaccessable_symbols): Using if is better style
7289 than goto.
7290 Use `#if TRACE' instead of `#if 0' for tracing code.
7291
7292 2001-11-19 Akim Demaille <akim@epita.fr>
7293
7294 * src/system.h (LIST_FREE, shortcpy): New.
7295 * src/LR0.c: Use them.
7296 * src/output.c (free_itemsets, free_reductions, free_shifts):
7297 Remove, replaced by LIST_FREE.
7298
7299 2001-11-19 Akim Demaille <akim@epita.fr>
7300
7301 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7302 (REDUCTIONS_ALLOC): New.
7303 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7304 allocation.
7305
7306 2001-11-19 Akim Demaille <akim@epita.fr>
7307
7308 * src/LR0.c (new_state): Complete trace code.
7309 * src/nullable.c (set_nullable): Don't translate traces.
7310
7311 2001-11-19 Akim Demaille <akim@epita.fr>
7312
7313 * src/print_graph.c (print_core): Better locality of variables.
7314 * src/print.c (print_core): Likewise.
7315
7316 2001-11-19 Akim Demaille <akim@epita.fr>
7317
7318 * src/vcg.c: You do the output, so you are responsible of the
7319 handling of VCG syntax, in particular: use quotearg.
7320 * src/print_graph.c: Don't.
7321 (print_actions): Don't output the actions as part of the nodes,
7322 since that's the job of the edges.
7323 (print_state): Don't output by hand: fill the node description,
7324 and ask for its output.
7325
7326 2001-11-19 Akim Demaille <akim@epita.fr>
7327
7328 * src/bison.simple (yyparse): When verbosely reporting an error,
7329 no longer put additional quotes around token names.
7330 * tests/calc.at: Adjust.
7331
7332 2001-11-19 Akim Demaille <akim@epita.fr>
7333
7334 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7335 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7336 * src/output.c: Adjust.
7337
7338 2001-11-19 Akim Demaille <akim@epita.fr>
7339
7340 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7341 (rule_t): this.
7342 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7343
7344 2001-11-19 Akim Demaille <akim@epita.fr>
7345
7346 * src/gram.h (rule_t): New.
7347 (rule_table): New.
7348 (rrhs, rlhs): Remove, part of state_t.
7349 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7350 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7351 * src/reader.c, src/reduce.c: Adjust.
7352
7353 2001-11-19 Akim Demaille <akim@epita.fr>
7354
7355 * src/reader.c (symbols_output): New, extracted from...
7356 (packsymbols): Here.
7357 (reader): Call it.
7358
7359 2001-11-19 Akim Demaille <akim@epita.fr>
7360
7361 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7362 (maxrhs): this new function.
7363
7364 2001-11-19 Akim Demaille <akim@epita.fr>
7365
7366 * src/lalr.c (F): New macro to access the variable F.
7367 Adjust.
7368
7369 2001-11-19 Akim Demaille <akim@epita.fr>
7370
7371 * src/lalr.h (LA): New macro to access the variable LA.
7372 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7373 * src/lalr.c: Adjust.
7374
7375 2001-11-19 Akim Demaille <akim@epita.fr>
7376
7377 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7378 (set_state_table): handle the `lookaheads' members.
7379
7380 2001-11-19 Akim Demaille <akim@epita.fr>
7381
7382 * src/lalr.h (lookaheads): Removed array, whose contents is now
7383 a member of...
7384 (state_t): this structure.
7385 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7386 Adjust.
7387
7388 2001-11-19 Akim Demaille <akim@epita.fr>
7389
7390 * src/lalr.h (consistent): Removed array, whose contents is now
7391 a member of...
7392 (state_t): this structure.
7393 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7394 Adjust.
7395
7396 2001-11-19 Akim Demaille <akim@epita.fr>
7397
7398 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7399 contents are now members of...
7400 (state_t): this structure.
7401 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7402 Adjust.
7403
7404 2001-11-19 Akim Demaille <akim@epita.fr>
7405
7406 * src/lalr.h (state_t): New.
7407 (state_table): Be a state_t * instead of a core **.
7408 (accessing_symbol): Remove, part of state_t.
7409 * src/lalr.c: Adjust.
7410 (set_accessing_symbol): Merge into...
7411 (set_state_table): this.
7412 * src/print_graph.c, src/conflicts.c: Adjust.
7413
7414 2001-11-14 Akim Demaille <akim@epita.fr>
7415
7416 * tests/calc.at, tests/output.at, tests/regression.at,
7417 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7418 now the tests are run in private dirs, therefore AC_CLEANUP and
7419 family can be simplified to 0-ary.
7420 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7421 use abs. path to find config.h.
7422 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7423 stderr, there can be way too much random noise.
7424 Instead pass -Werror to GCC and rely on the exit status.
7425 Reported by Wolfram Wagner.
7426
7427 2001-11-14 Akim Demaille <akim@epita.fr>
7428
7429 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7430 defined only if yyoverflow is defined, to avoid `warning: unused
7431 variable `yyvs1''.
7432 Reported by The Test Suite.
7433
7434 2001-11-14 Akim Demaille <akim@epita.fr>
7435
7436 * src/print.c: Include reduce.h.
7437 Reported by Hans Aberg.
7438
7439 2001-11-14 Akim Demaille <akim@epita.fr>
7440
7441 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7442 Revert a previous patch: these are really const.
7443 * src/conflicts.c (conflict_report): Additional useless pair of
7444 braces to pacify GCC's warnings for `if () if () {} else {}'.
7445 * src/lex.c (parse_percent_token): Replace equal_offset with
7446 arg_offset.
7447 arg is const.
7448 Be sure to strdup `arg' when used, since there is no reason for
7449 token_buffer not to change.
7450
7451 2001-11-14 Akim Demaille <akim@epita.fr>
7452
7453 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7454 definition.
7455 * src/main.c (main): Use them.
7456 Suggested by Hans Aberg.
7457
7458 2001-11-12 Akim Demaille <akim@epita.fr>
7459
7460 * src/system.h (ngettext): Now that we use ngettext, be sure to
7461 provide a default definition when NLS are not used.
7462
7463 2001-11-12 Akim Demaille <akim@epita.fr>
7464
7465 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7466 Use @kbd to denote user input.
7467 (Language and Grammar): ANSIfy the example.
7468 Adjust its layout for info/notinfo.
7469 (Location Tracking Calc): Output error messages to stderr.
7470 Output locations in a more GNUtically correct way.
7471 Fix a couple of Englishos.
7472 Adjust @group/@end group pairs.
7473
7474 2001-11-12 Akim Demaille <akim@epita.fr>
7475
7476 %expect was not functioning at all.
7477
7478 * src/conflicts.c (expected_conflicts): Set to -1.
7479 (conflict_report): Use ngettext.
7480 (conflicts_print): Check %expect and make its violation an error.
7481 * doc/bison.texinfo (Expect Decl): Adjust.
7482 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7483 * tests/regression.at (%expect not enough, %expect right)
7484 (%expect too much): New.
7485
7486 2001-11-12 Akim Demaille <akim@epita.fr>
7487
7488 * tests/regression.at (Conflicts): Rename as...
7489 (Unresolved SR Conflicts): this.
7490 (Solved SR Conflicts): New.
7491
7492 2001-11-12 Akim Demaille <akim@epita.fr>
7493
7494 * src/reduce.c (print_results): Rename as...
7495 (reduce_output): This.
7496 Output to OUT, passed as argument, instead of output_obstack.
7497 (dump_grammar): Likewise.
7498 (reduce_free): New.
7499 Also free V1.
7500 (reduce_grammar): No longer call reduce_output, since...
7501 * src/print.c (print_results): do it.
7502 * src/main.c (main): Call reduce_free;
7503
7504 2001-11-12 Akim Demaille <akim@epita.fr>
7505
7506 * src/conflicts.c (print_reductions): Accept OUT as argument.
7507 Output to it, not to output_obstack.
7508 * src/print.c (print_actions): Adjust.
7509
7510 2001-11-12 Akim Demaille <akim@epita.fr>
7511
7512 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7513 the result instead of using...
7514 (src_total, rrc_total, src_count, rrc_count): Remove.
7515 (any_conflicts): Remove.
7516 (print_conflicts): Split into...
7517 (conflicts_print, conflicts_output): New.
7518 * src/conflicts.h: Adjust.
7519 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7520 * src/print.c (print_grammar): Issue `\n' between two rules.
7521 * tests/regression.at (Conflicts): New.
7522 Reported by Tom Lane.
7523
7524 2001-11-12 Akim Demaille <akim@epita.fr>
7525
7526 * tests/regression.at (Invalid input): Remove, duplicate with
7527 ``Invalid input: 1''.
7528
7529 2001-11-12 Akim Demaille <akim@epita.fr>
7530
7531 * tests/torture.at (AT_DATA_STACK_TORTURE)
7532 (Exploding the Stack Size with Alloca)
7533 (Exploding the Stack Size with Malloc): New.
7534
7535 2001-11-12 Akim Demaille <akim@epita.fr>
7536
7537 * src/bison.simple (YYSTACK_REALLOC): New.
7538 (yyparse) [!yyoverflow]: Use it and free the old stack.
7539 Reported by Per Allansson.
7540
7541 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7542
7543 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7544 define CPP macro, which substitute YYSTYPE by yystype.
7545 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7546 with yyltype/YYLTYPE. This allows inclusion of the generated
7547 header within the parser if the compiler, such as GGC, accepts
7548 multiple equivalent #defines.
7549 From Akim.
7550
7551 2001-11-05 Akim Demaille <akim@epita.fr>
7552
7553 * src/reader.c (symbols_output): New, extracted from...
7554 (packsymbols): here.
7555 (reader): Adjust.
7556
7557 2001-11-05 Akim Demaille <akim@epita.fr>
7558
7559 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7560
7561 2001-11-05 Akim Demaille <akim@epita.fr>
7562
7563 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7564 pattern.
7565
7566 2001-11-05 Akim Demaille <akim@epita.fr>
7567
7568 * src/options.h (struct option_table_struct): set_flags is void*.
7569 * src/options.c (longopts): Support `--output' and `%output'.
7570 (usage): Adjust.
7571 * src/lex.h (tok_setopt): Remove, replaced with...
7572 (tok_intopt, tok_stropt): these new guys.
7573 * src/lex.c (getopt.h): Not needed.
7574 (token_buffer, unlexed_token_buffer): Not const.
7575 (percent_table): Promote `-' over `_' in directive names.
7576 Active `%name-prefix', `file-prefix', and `output'.
7577 (parse_percent_token): Accept possible arguments to directives.
7578 Promote `-' over `_' in directive names.
7579
7580 2001-11-04 Akim Demaille <akim@epita.fr>
7581
7582 * doc/bison.texinfo (Decl Summary): Split the list into
7583 `directives for grammars' and `directives for bison'.
7584 Sort'em.
7585 Add description of `%name-prefix', `file-prefix', and `output'.
7586 Promote `-' over `_' in directive names.
7587 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7588 Simplify the description of `--name-prefix'.
7589 Promote `-' over `_' in directive names.
7590 Promote `--output' over `--output-file'.
7591 Fix the description of `--defines'.
7592 * tests/output.at: Exercise %file-prefix and %output.
7593
7594 2001-11-02 Akim Demaille <akim@epita.fr>
7595
7596 * doc/refcard.tex: Update.
7597
7598 2001-11-02 Akim Demaille <akim@epita.fr>
7599
7600 * src/symtab.h (SUNDEF): New.
7601 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7602 stand for `uninitialized', instead of 0.
7603 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7604 * src/lex.c (lex): Adjust.
7605
7606 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7607 Number it 0.
7608 Let yylex return it instead of a plain 0.
7609 Reported by Dick Streefland.
7610
7611 2001-11-02 Akim Demaille <akim@epita.fr>
7612
7613 * tests/regression.at (Mixing %token styles): New test.
7614
7615 2001-11-02 Akim Demaille <akim@epita.fr>
7616
7617 * src/reader.c (parse_thong_decl): Formatting changes.
7618 (token_translations_init): New, extracted from...
7619 (packsymbols): Here.
7620 Adjust.
7621
7622 2001-11-01 Akim Demaille <akim@epita.fr>
7623
7624 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7625 Check that `9foo.y' produces correct cpp guards.
7626 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7627 guards.
7628 Reported by Wwp.
7629
7630 2001-11-01 Akim Demaille <akim@epita.fr>
7631
7632 * tests/regression.at (Invalid input: 2): New.
7633 * src/lex.c (unlexed_token_buffer): New.
7634 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7635 too.
7636 Reported by Wwp.
7637
7638 2001-11-01 Akim Demaille <akim@epita.fr>
7639
7640 * tests/calc.at: Catch up with 1.30.
7641 * configure.in: Bump to 1.49a.
7642 Adjust to newer Autotest.
7643
7644 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7645
7646 * src/conflicts.c: Move global variables rrc_total and src_total ...
7647 (print_conflicts): here.
7648 * src/output.c (output): Free global variable user_toknums.
7649 * src/lex.c (token_obstack): Become static.
7650
7651 2001-10-18 Akim Demaille <akim@epita.fr>
7652
7653 * tests/atlocal.in (GCC): Add.
7654 * tests/calc.at: s/m4_match/m4_bmatch/.
7655 s/m4_patsubst/m4_bpatsubst/.
7656 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7657 * configure.in: AC_SUBST(GCC).
7658
7659 2001-10-14 Marc Autret <autret_m@epita.fr>
7660
7661 * src/options.c (create_long_option_table): Fix.
7662
7663 2001-10-10 Akim Demaille <akim@epita.fr>
7664
7665 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7666
7667 2001-10-04 Akim Demaille <akim@epita.fr>
7668
7669 * src/reader.c (parse_union_decl): Push the caracters in
7670 union_obstack, not attrs_obstack.
7671
7672 2001-10-04 Akim Demaille <akim@epita.fr>
7673
7674 Merge in the branch 1.29.
7675
7676 * src/reader.c (packsymbols): Use a temporary obstack for
7677 `%%tokendef', since output_stack is already used elsewhere.
7678
7679 2001-10-02 Akim Demaille <akim@epita.fr>
7680
7681 Bump 1.29d.
7682
7683 2001-10-02 Akim Demaille <akim@epita.fr>
7684
7685 Version 1.29c.
7686
7687 2001-10-02 Akim Demaille <akim@epita.fr>
7688
7689 * tests/regression.at (Invalid CPP headers): New.
7690 From Alexander Belopolsky.
7691 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7692
7693 2001-10-02 Akim Demaille <akim@epita.fr>
7694
7695 * tests/regression.at (Invalid input): New.
7696 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7697 Reported by Shura.
7698
7699 2001-10-02 Akim Demaille <akim@epita.fr>
7700
7701 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7702
7703 2001-10-02 Akim Demaille <akim@epita.fr>
7704
7705 * src/output.c (output_parser): Assert `skeleton'.
7706 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7707 systems.
7708 From Shura.
7709
7710 2001-10-01 Marc Autret <autret_m@epita.fr>
7711
7712 * src/lex.h: Echo modifications.
7713 * src/lex.c (unlex): Parameter is now token_t.
7714 From Hans Aberg.
7715
7716 2001-10-01 Marc Autret <autret_m@epita.fr>
7717
7718 * src/main.c: Include lex.h.
7719 From Hans Aberg.
7720
7721 2001-09-29 Akim Demaille <akim@epita.fr>
7722
7723 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7724
7725 2001-09-28 Akim Demaille <akim@epita.fr>
7726
7727 * tests/testsuite.at: Update to newer Autotest.
7728 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7729
7730 2001-09-27 Akim Demaille <akim@epita.fr>
7731
7732 Position independent wrapper.
7733
7734 * tests/bison: Remove.
7735 * tests/bison.in: New.
7736 * configure.in: Adjust.
7737
7738 2001-09-27 Paul Eggert <eggert@twinsun.com>
7739
7740 Port quotearg fixes from tar 1.13.24.
7741
7742 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7743 tm to be declared.
7744 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7745 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7746
7747 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7748 * m4/mbrtowc.m4: New file.
7749 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7750 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7751
7752 2001-09-27 Akim Demaille <akim@epita.fr>
7753
7754 Bump to 1.29c.
7755
7756 2001-09-27 Akim Demaille <akim@epita.fr>
7757
7758 Version 1.29b.
7759
7760 2001-09-25 Akim Demaille <akim@epita.fr>
7761
7762 * src/system.h: Include `xalloc.h'.
7763 Remove it from the C files.
7764 * src/files.c (output_files): Free the obstacks.
7765 * src/lex.c (init_lex): Rename as...
7766 (lex_init): this.
7767 (lex_free): New.
7768 * src/main.c (main): Use it.
7769
7770 2001-09-24 Marc Autret <autret_m@epita.fr>
7771
7772 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7773 to output informations in fout (FILE*).
7774 (open_graph, close_graph): Likewise.
7775 (output_graph, output_edge, output_node): Likewise.
7776 * src/vcg.h: Update function prototypes.
7777 * src/print_graph.c (print_graph): Open output graph file.
7778 (print_actions): Adjust.
7779 * src/files.h: Remove extern declaration.
7780 * src/files.c: Remove graph_obstack declaration.
7781 (open_files): Remove graph_obstack initialization.
7782 (output_files): Remove graph_obstack saving.
7783
7784 2001-09-24 Marc Autret <autret_m@epita.fr>
7785
7786 * src/files.c (compute_output_file_names): Fix.
7787
7788 2001-09-24 Marc Autret <autret_m@epita.fr>,
7789 Akim Demaille <akim@epita.fr>
7790
7791 * src/reader.c (reader): Remove call to free_symtab ().
7792 * src/main.c (main): Call it here.
7793 Include symtab.h.
7794 * src/conflicts.c (initialize_conflicts): Rename as...
7795 (solve_conflicts): this.
7796 * src/print.c (print_core, print_actions, print_state)
7797 (print_grammar): Dump to a file instead a `output_obstack'.
7798 (print_results): Dump `output_obstack', and then proceed with the
7799 FILE *.
7800 * src/files.c (compute_output_file_names, close_files): New.
7801 (output_files): Adjust.
7802 * src/main.c (main): Adjust.
7803
7804 2001-09-23 Marc Autret <autret_m@epita.fr>
7805
7806 * src/files.c (compute_header_macro): Computes header macro name
7807 from spec_defines_file when given.
7808
7809 2001-09-23 Marc Autret <autret_m@epita.fr>
7810
7811 * src/files.c (output_files): Add default extensions.
7812
7813 2001-09-22 Akim Demaille <akim@epita.fr>
7814
7815 * src/conflicts.c (finalize_conflicts): Rename as...
7816 (free_conflicts): this.
7817
7818 2001-09-22 Akim Demaille <akim@epita.fr>
7819
7820 * src/gram.c (gram_free): Rename back as...
7821 (dummy): this.
7822 (output_token_translations): Free `token_translations'.
7823 * src/symtab.c (free_symtab): Free the tag field.
7824
7825 2001-09-22 Akim Demaille <akim@epita.fr>
7826
7827 Remove `translations' as it is always set to true.
7828
7829 * src/gram.h: Adjust.
7830 * src/reader.c (packsymbols, parse_token_decl): Adjust
7831 * src/print.c (print_grammar): Adjust.
7832 * src/output.c (output_token_translations): Adjust.
7833 * src/lex.c (lex): Adjust.
7834 * src/gram.c: Be sure the set pointers to NULL.
7835 (dummy): Rename as...
7836 (gram_free): this.
7837
7838 2001-09-22 Akim Demaille <akim@epita.fr>
7839
7840 * configure.in: Invoke AM_LIB_DMALLOC.
7841 * src/system.h: Use dmalloc.
7842 * src/LR0.c: Be sure to have pointers initialized to NULL.
7843 (allocate_itemsets): Allocate kernel_items only if needed.
7844
7845 2001-09-22 Akim Demaille <akim@epita.fr>
7846
7847 * configure.in: Bump to 1.29b.
7848 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
7849 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
7850 need xmalloc.c in calc.y.
7851 From Pascal Bart.
7852
7853 2001-09-21 Akim Demaille <akim@epita.fr>
7854
7855 Version 1.29a.
7856 * Makefile.maint, config/config.guess, config/config.sub,
7857 * config/missing: Update from masters.
7858 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
7859 upon package.m4.
7860 * configure.in (ALL_LINGUAS): Add `tr'.
7861
7862 2001-09-21 Akim Demaille <akim@epita.fr>
7863
7864 * tests/Makefile.am (package.m4): Move to...
7865 ($(srcdir)/$(TESTSUITE)): here.
7866
7867 2001-09-20 Akim Demaille <akim@epita.fr>
7868
7869 * src/complain.c: No longer try to be standalone: use system.h.
7870 Don't assume __STDC__ is defined to 1. Just test if it is defined.
7871 * src/complain.h: Likewise.
7872 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
7873 Remove the unused variable `n'.
7874 From Albert Chin-A-Young.
7875
7876 2001-09-18 Marc Autret <autret_m@epita.fr>
7877
7878 * doc/bison.1: Update.
7879 * doc/bison.texinfo (Bison Options): Update --defines and --graph
7880 descriptions.
7881 (Option Cross Key): Update.
7882 Add --graph.
7883
7884 2001-09-18 Marc Autret <autret_m@epita.fr>
7885
7886 * tests/regression.at: New test (comment in %union).
7887
7888 2001-09-18 Marc Autret <autret_m@epita.fr>
7889
7890 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
7891 do that.
7892 Reported by Keith Browne.
7893
7894 2001-09-18 Marc Autret <autret_m@epita.fr>
7895
7896 * tests/output.at: Add tests for --defines and --graph.
7897
7898 2001-09-18 Marc Autret <autret_m@epita.fr>
7899
7900 * tests/output.at: Removes tests of %{header,src}_extension features.
7901
7902 2001-09-18 Akim Demaille <akim@epita.fr>
7903
7904 * tests/Makefile.am (package.m4): New.
7905 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
7906 (_AT_CHECK_CALC_ERROR): Likewise.
7907 Factor the `, ' part of verbose error messages.
7908
7909 2001-09-18 Marc Autret <autret_m@epita.fr>
7910
7911 * src/getargs.c (longopts): Declare --defines and --graph as options
7912 with optional arguments.
7913 * src/files.h: Add extern declarations.
7914 * src/files.c (spec_graph_file, spec_defines_file): New.
7915 (output_files): Update.
7916 Remove CPP-outed code.
7917
7918 2001-09-18 Marc Autret <autret_m@epita.fr>
7919
7920 Turn off %{source,header}_extension feature.
7921
7922 * src/files.c (compute_exts_from_gf): Update.
7923 (compute_exts_from_src): Update.
7924 (output_files): CPP-out useless code.
7925 * src/files.h: Remove {header,source}_extension extern declarations.
7926 * src/reader.c (parse_dquoted_param): CPP-out.
7927 (parse_header_extension_decl): Remove.
7928 (parse_source_extension_decl): Remove.
7929 (read_declarations): Remove cases tok_{hdrext,srcext}.
7930 * src/lex.c (percent_table): Remove {header,source}_extension entries.
7931 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
7932
7933 2001-09-10 Akim Demaille <akim@epita.fr>
7934
7935 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
7936 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
7937 (AT_CHECK_OUTPUT): this.
7938 Merely check ls' exit status, its output is useless.
7939
7940 2001-09-10 Akim Demaille <akim@epita.fr>
7941
7942 * tests/calc.at: Use m4_match.
7943 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
7944
7945 2001-09-10 Marc Autret <autret_m@epita.fr>,
7946 Akim Demaille <akim@epita.fr>
7947
7948 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
7949 enum color_e.
7950 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
7951 to `normal'.
7952 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
7953 * src/lex.h: Adjust prototype.
7954 (token_t): Add `tok_undef'.
7955 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
7956 (parse_percent_token): Now returns token_t.
7957 Add default statement in switch.
7958 (lex): Separate `c' as an input variable, from the token_t result
7959 part.
7960 (unlexed): Is a token_t.
7961
7962 2001-09-10 Akim Demaille <akim@epita.fr>
7963
7964 * configure.in: Bump to 1.29a.
7965
7966 2001-09-07 Akim Demaille <akim@epita.fr>
7967
7968 Version 1.29.
7969
7970 2001-08-30 Akim Demaille <akim@epita.fr>
7971
7972 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
7973 * m4/atconfig.m4: Remove.
7974 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
7975 * tests/bison: New.
7976 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
7977 m4_if, m4_patsubst, and m4_regexp.
7978 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
7979 `input' file instead of echo.
7980
7981 2001-08-29 Akim Demaille <akim@epita.fr>
7982
7983 Bump to 1.28e.
7984
7985 2001-08-29 Akim Demaille <akim@epita.fr>
7986
7987 Version 1.28d.
7988
7989 2001-08-29 Paul Eggert <eggert@twinsun.com>
7990
7991 * src/bison.simple (yyparse): Don't take the address of an
7992 item before the start of an array, as that doesn't conform to
7993 the C Standard.
7994
7995 2001-08-29 Robert Anisko <anisko_r@epita.fr>
7996
7997 * doc/bison.texinfo (Location Tracking Calc): New node.
7998
7999 2001-08-29 Paul Eggert <eggert@twinsun.com>
8000
8001 * src/output.c (output): Do not define const, as this now
8002 causes more problems than it cures.
8003
8004 2001-08-29 Akim Demaille <akim@epita.fr>
8005
8006 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8007 the nodes.
8008 Be sure to tag the `detailmenu'.
8009
8010 2001-08-29 Akim Demaille <akim@epita.fr>
8011
8012 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8013 download in a tmp dir.
8014
8015 2001-08-28 Marc Autret <autret_m@epita.fr>
8016
8017 * config/depcomp: New file.
8018
8019 2001-08-28 Marc Autret <autret_m@epita.fr>
8020
8021 * doc/bison.1 (mandoc): Adjust.
8022 From Juan Manuel Guerrero.
8023
8024 2001-08-28 Marc Autret <autret_m@epita.fr>
8025
8026 * src/print_graph.c (print_state): Fix.
8027
8028 2001-08-27 Marc Autret <autret_m@epita.fr>
8029
8030 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8031 char * members.
8032 Echo modifications to the functions prototypes.
8033 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8034
8035 2001-08-27 Marc Autret <autret_m@epita.fr>
8036
8037 * src/vcg.c: Include `xalloc.h'.
8038 (add_colorentry): New.
8039 (add_classname): New.
8040 (add_infoname): New.
8041 * src/vcg.h: Add new prototypes.
8042
8043 2001-08-27 Akim Demaille <akim@epita.fr>
8044
8045 * Makefile.maint: Sync. again with CVS Autoconf.
8046
8047 2001-08-27 Akim Demaille <akim@epita.fr>
8048
8049 * Makefile.maint: Formatting changes.
8050 (po-update, cvs-update, update): New targets.
8051 (AMTAR): Remove.
8052
8053 2001-08-27 Akim Demaille <akim@epita.fr>
8054
8055 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8056 * Makefile.maint: Sync. with CVS Autoconf.
8057
8058 2001-08-27 Marc Autret <autret_m@epita.fr>
8059
8060 * src/vcg.h (struct infoname_s): New.
8061 (struct colorentry_s): New.
8062 (graph_s): New fields {vertical,horizontal}_order in structure.
8063 Add `infoname' field.
8064 Add `colorentry' field;
8065 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8066 (G_HORIZONTAL_ORDER): New.
8067 (G_INFONAME): New.
8068 (G_COLORENTRY): New.
8069 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8070 Add output of `infoname'.
8071 Add output of `colorentry'.
8072
8073 2001-08-27 Marc Autret <autret_m@epita.fr>
8074
8075 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8076 This one shadowed a global parameter.
8077
8078 2001-08-24 Marc Autret <autret_m@epita.fr>
8079
8080 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8081 instead of `unsigned'.
8082 (print_state): Do not call obstack_object_size () in obstack_grow ()
8083 to avoid macro variables shadowing.
8084
8085 2001-08-23 Marc Autret <autret_m@epita.fr>
8086
8087 * src/lex.c (percent_table): Typo: s/naem/name/.
8088 Add graph option.
8089 Normalize new options declarations.
8090
8091 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8092
8093 * tests/suite.at: Exercise %header_extension and %source_extension.
8094
8095 2001-08-16 Marc Autret <autret_m@epita.fr>
8096
8097 * src/reader.c (parse_dquoted_param): New.
8098 (parse_header_extension_decl): Use it.
8099 (parse_source_extension_decl): Likewise.
8100
8101 2001-08-16 Marc Autret <autret_m@epita.fr>
8102
8103 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8104 (get_xxxx_str): Use assert () instead of complain ().
8105 Remove return invokations in default cases.
8106 (get_decision_str): Modify default behaviour. Remove second argument.
8107 Echo modifications on calls.
8108 (output_graph): Fix.
8109
8110 2001-08-16 Marc Autret <autret_m@epita.fr>
8111
8112 * src/getargs.c (usage): Update with ``-g, --graph''.
8113
8114 2001-08-16 Marc Autret <autret_m@epita.fr>
8115
8116 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8117 (Option Cross Key): Likewise.
8118 * doc/bison.1: Update.
8119
8120 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8121
8122 * src/output.c (output_master_parser): Don't finish action_obstack.
8123 (output_parser): Don't care about the muscle action, here.
8124 (prepare): Copy the action_obstack in the action muscle.
8125 (output): Free action_obstack.
8126
8127 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8128
8129 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8130 will contain `%union' declaration.
8131 (parse_union_decl): Delete #line directive output.
8132 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8133 informations about %union.
8134 (parse_union_decl): Copy the union_obstack in the muscle stype.
8135 * src/bison.simple: Add new #line directive.
8136 Add typdef %%stype YYSTYPE.
8137
8138 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8139
8140 * src/bison.simple: Add new `#line' directive.
8141
8142 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8143
8144 * src/bison.simple: New `#line' directive.
8145 * src/output.c (output_parser): Support new dynamic muscle input_line.
8146
8147 2001-09-22 Marc Autret <autret_m@epita.fr>
8148
8149 * src/output.c (output_master_parser): New.
8150 (output_parser): Be more re-entrant.
8151
8152 2001-09-21 Marc Autret <autret_m@epita.fr>
8153
8154 * src/reader.c (copy_definition, parse_union_decl): Update and use
8155 `linef' muscle.
8156 (copy_action): Likewise.
8157 Use obstack_1grow ().
8158 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8159
8160 2001-09-21 Marc Autret <autret_m@epita.fr>
8161
8162 * src/options.c (option_table): Adjust.
8163 * src/lex.c (parse_percent_token): Fix.
8164
8165 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8166
8167 * src/options.c (symtab.h): Include it, need by lex.h.
8168
8169 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8170
8171 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8172 is now an option_table_struct*.
8173 (option_strcmp): New function option_strcmp.
8174 (parse_percent_token): Call option_strcmp.
8175 * src/getargs.c (xalloc.h, options.h): Include it.
8176 (getargs): Call create_long_option_table.
8177 (getargs): Free longopts at the end of the function.
8178 (shortopts): Move in options.c.
8179 * src/options.c (create_long_option_table): New function. Convert
8180 information from option_table to option structure.
8181 * src/reader.c (options.h): Include it.
8182
8183 * src/Makefile.am: Adjust.
8184 * src/options.c (option_table): Create from longopts and percent_table.
8185 * src/getargs.c (longopts): Delete.
8186 * src/lex.c (struct percent_table_struct): Delete.
8187 (percent_table): Delete.
8188 (options.h): Include it.
8189 * src/options.c: Create.
8190 * src/options.h: Create.
8191 Declare enum opt_access_e.
8192 Define struct option_table_struct.
8193
8194 2001-09-20 Marc Autret <autret_m@epita.fr>
8195
8196 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8197 sections of Bison.
8198
8199 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8200
8201 * src/bison.simple: s/%%filename/%%skeleton.
8202 * src/muscle_tab.c (getargs.h): Include it.
8203 (muscle_init): Insert new muscle skeleton.
8204
8205 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8206
8207 * src/output.c (output_parser): Delete unused variable actions_dumped.
8208
8209 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8210
8211 * src/output.c (output): Delete call to reader_output_yylsp.
8212 * src/reader.c (reader): Likewise.
8213 * src/reader.h: Delete declaration of reader_output_yylsp.
8214
8215 2001-09-02 Marc Autret <autret_m@epita.fr>
8216
8217 * src/reader.c: Include muscle_tab.h.
8218 (parse_union_decl): Update.
8219 (parse_macro_decl): Rename parse_muscle_decl.
8220 Update to use renamed functions and variable.
8221 (read_declarations, copy_action, read_additionnal_code, : Updated
8222 with correct variables and functions names.
8223 (packsymbols, reader): Likewise.
8224
8225 * src/reader.h (muscle_obstack): Extern declaration update.
8226
8227 * src/output.c: Include muscle_tab.h
8228 In all functions using macro_insert, change by using muscle_insert ().
8229 (macro_obstack): Rename muscle_obstack.
8230 Echo modifications in the whole file.
8231 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8232 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8233 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8234
8235 * src/muscle_tab.h: Update double inclusion macros.
8236 (macro_entry_s): Rename muscle_entry_s.
8237 Update prototypes.
8238
8239 * src/muscle_tab.c: Include muscle_tab.h.
8240 Rename macro_tabble to muscle_table.
8241 (mhash1, mhash2, mcmp): Use muscle_entry.
8242 (macro_init): Rename muscle_init. Update.
8243 (macro_insert): Rename muscle_insert. Update.
8244 (macro_find): Rename muscle_find. Update.
8245
8246 * src/main.c: Include muscle_tab.h.
8247 (main): Call muscle_init ().
8248 * src/Makefile.am (bison_SOURCES): Echo modifications.
8249
8250 2001-09-02 Marc Autret <autret_m@epita.fr>
8251
8252 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8253
8254 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8255
8256 2001-09-02 Marc Autret <autret_m@epita.fr>
8257
8258 * src/macrotab.c, src/macrotab.h: Remove.
8259
8260 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8261
8262 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8263 filename.
8264
8265 2001-09-01 Marc Autret <autret_m@epita.fr>
8266
8267 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8268 to an explicit value to activate the feature. We do it here.
8269
8270 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8271
8272 * src/output.c (prepare): Delete the `filename' muscule insertion.
8273 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8274 (parse_union_decl): Likewise.
8275 * src/macrotab.c (macro_init): Initialize filename by infile.
8276
8277 2001-08-31 Marc Autret <autret_m@epita.fr>
8278
8279 * src/bison.simple (YYLSP_NEEDED): New definition.
8280 * src/output.c (prepare): Add macro insertion of `locations_flag'
8281
8282 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8283
8284 * src/output.c (prepare): Delete insertion of previous muscles,
8285 and insert the `prefix' muscles.
8286 * src/macrotab.c (macro_init): Likewise.
8287 (macro_init): Initialization prefix directive by `yy'.
8288 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8289 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8290 yylval, yydebug, yyerror, yynerrs and yyparse.
8291 New directive `#define' to substitute yydebug, ... with option
8292 name_prefix.
8293
8294 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8295
8296 * src/main.c (main): Standardize.
8297 * src/output.c (output_table_data, output_parser): Likewise.
8298 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8299
8300 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8301
8302 * src/reader.c (read_additionnal_code): Rename %%user_code to
8303 %%epilogue.
8304 * src/output.c (output): Rename %%declarations to %%prologue.
8305 * src/bison.simple: Echo modifications.
8306
8307 2001-08-31 Marc Autret <autret_m@epita.fr>
8308
8309 * src/reader.c (readgram): CleanUp.
8310 (output_token_defines): Likewise.
8311 (packsymbols): Likewise.
8312 (reader): Likewise.
8313 * src/output.c (output): CPP-out useless code.
8314
8315 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8316
8317 * src/reader.c (reader): Delete obsolete call to function
8318 output_trailers and output_headers.
8319 * src/output.h: Remove obsolete functions prototypes of output_headers
8320 and output_trailers.
8321
8322 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8323
8324 * src/main.c: Include macrotab.h.
8325 * src/macrotab.h (macro_entry_s): Constify fields.
8326 Adjust functions prototypes.
8327 * src/macrotab.c (macro_insert): Constify key and value.
8328 (macro_find): Constify key.
8329 (macro_insert): Include 'xalloc.h'
8330 (macro_insert): Use XMALLOC.
8331 (macro_find): Constify return value.
8332 * src/output.c (output_table_data): Rename table to table_data.
8333 (output_parser): Constify macro_key, macro_value.
8334
8335 2001-08-30 Marc Autret <autret_m@epita.fr>
8336
8337 * src/reader.c (parse_skel_decl): New.
8338 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8339 * src/lex.h (token_t): New token `tok_skel'.
8340 * src/lex.c (percent_table): Add skeleton option entry.
8341 Standardize.
8342
8343 2001-08-29 Marc Autret <autret_m@epita.fr>
8344
8345 * src/bison.simple: Add %%user_code directive at the end.
8346 * src/reader.c (read_additionnal_code): New.
8347 (reader): Use it.
8348 * src/output.c (output_program): Remove.
8349 (output): Update.
8350
8351 2001-08-28 Marc Autret <autret_m@epita.fr>
8352
8353 * src/output.c (output_actions): Clean up.
8354 (output_gram): CPP-out useless code.
8355 * src/reader.c (reader): Clean up, CPP-out useless code.
8356
8357 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8358
8359 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8360 directive.
8361 * src/bison.simple: Add `%%definitions'.
8362
8363 2001-08-28 Marc Autret <autret_m@epita.fr>
8364
8365 * config/depcomp: New file.
8366
8367 2001-08-27 Paul Eggert <eggert@twinsun.com>
8368
8369 * src/bison.simple (yyparse): Don't take the address of an
8370 item before the start of an array, as that doesn't conform to
8371 the C Standard.
8372
8373 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8374
8375 * src/output.c (output): Remove the initialization of the macro
8376 obstack. It was done too late here.
8377
8378 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8379 completely wrong.
8380 (reader): Initialize the macro obstack here, since we need it to grow
8381 '%define' directives.
8382
8383 * src/reader.h: Declare the macro obstack as extern.
8384
8385 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8386
8387 * src/output.c (output_parser): Fix. Store single '%' characters in
8388 the output obstack instead of throwing them away.
8389
8390 2001-08-27 Akim Demaille <akim@epita.fr>
8391
8392 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8393
8394 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8395
8396 * lib/Makefile.am: Adjust.
8397
8398 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8399
8400 * src/bison.simple: Update and add '%%' directives.
8401
8402 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8403
8404 * src/reader.c (reader): Remove calls to 'output_headers' and
8405 'output_trailers'. Remove some C output.
8406 (readgram): Disable a piece of code that was writing a default
8407 definition for 'YYSTYPE'.
8408 (reader_output_yylsp): Remove.
8409 (packsymbols): Output token defintions to a macro.
8410 (copy_definition): Disable C output.
8411
8412 * src/reader.c (parse_macro_decl): New function used to parse macro
8413 declarations.
8414 (copy_string2): Put the body of copy_string into this new function.
8415 Add a parameter to let the caller choose whether he wants to copy the
8416 string delimiters or not.
8417 (copy_string): Be a simple call to copy_string2 with the last argument
8418 bound to true.
8419 (read_declarations): Add case for macro definition.
8420 (copy_identifier): New.
8421 (parse_macro_decl): Read macro identifiers using copy_identifier
8422 rather than lex.
8423
8424 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8425
8426 * src/output.c (prepare): Add prefixed names.
8427 (output_parser): Output semantic actions.
8428 (output_parser): Fix bug on '%%line' directives.
8429
8430 * src/output.c (output_headers): Remove. The C code printed by this
8431 function should now be in the skeletons.
8432 (output_trailers): Remove.
8433 (output): Disable call to 'reader_output_yylsp'.
8434 (output_rule_data): Do not output tables to the table obstack.
8435
8436 * src/output.c: Remove some C dedicated output.
8437 Improve the use of macro and output obstacks.
8438 (output_defines): Remove.
8439
8440 * src/output.c (output_token_translations): Associate 'translate'
8441 table with a macro. No output to the table obstack.
8442 (output_gram): Same for 'rhs' and 'prhs'.
8443 (output_stos): Same for 'stos'.
8444 (output_rule_data): Same for 'r1' and 'r2'.
8445 (token_actions): Same for 'defact'.
8446 (goto_actions): Same for 'defgoto'.
8447 (output_base): Same for 'pact' and 'pgoto'.
8448 (output_table): Same for 'table'.
8449 (output_check): Same for 'check'.
8450
8451 * src/output.c (output_table_data): New function.
8452 (output_short_table): Remove.
8453 (output_short_or_char_table): Remove.
8454
8455 * src/output.c (output_parser): Replace most of the skeleton copy code
8456 with something new. Skeletons are now processed character by character
8457 rather than line by line, and Bison looks for '%%' macros. This is the
8458 first step in making Bison's output process (a lot) more flexible.
8459 (output_parser): Use the macro table.
8460
8461 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8462
8463 * src/main.c (main): Initialize the macro table.
8464
8465 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8466
8467 * src/lex.c (percent_table): Add tok_define.
8468 * src/lex.h: Add tok_define.
8469
8470 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8471
8472 * src/macrotab.c: New file.
8473 * src/macrotab.h: New file.
8474 * src/Makefile.am: Update.
8475
8476 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8477
8478 * lib/hash.c: New file.
8479 * lib/hash.h: New file.
8480 * lib/Makefile.am: Update.
8481
8482 2001-08-15 Akim Demaille <akim@epita.fr>
8483
8484 Version 1.28c.
8485
8486 2001-08-15 Marc Autret <autret_m@epita.fr>
8487
8488 * src/reader.c (readgram): Indent output macro YYSTYPE.
8489 (packsymbols): Likewise.
8490 (output_token_defines): Likewise.
8491 * src/files.c: Standardize.
8492 (compute_header_macro): New.
8493 (defines_obstack_save): New. Use compute_header_macro.
8494 (output_files): Update. Use defines_obstack_save.
8495
8496 2001-08-15 Akim Demaille <akim@epita.fr>
8497
8498 * doc/bison.texinfo (Table of Symbols): Document
8499 YYSTACK_USE_ALLOCA.
8500
8501 2001-08-15 Akim Demaille <akim@epita.fr>
8502
8503 * missing: Update from CVS Automake.
8504 * config/config.guess, config/config.sub, config/texinfo.tex:
8505 Update from gnu.org.
8506
8507 2001-08-15 Akim Demaille <akim@epita.fr>
8508
8509 * Makefile.maint: Sync with CVS Autoconf.
8510
8511 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8512
8513 * doc/bison.texinfo: Include GNU Free Documentation License from
8514 `fdl.texi'.
8515 * doc/fdl.texi: Add to package.
8516
8517 2001-08-14 Marc Autret <autret_m@epita.fr>
8518
8519 Turn on %{source,header}_extension features.
8520
8521 * src/lex.c (percent_table): Un-CPP out header_extension and
8522 source_extension.
8523 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8524 (compute_exts_from_src): Remove conditions. It restores priorities
8525 between options.
8526
8527 2001-08-14 Marc Autret <autret_m@epita.fr>
8528
8529 * src/files.c (compute_base_names): Add extensions computing when
8530 `--file-prefix' used.
8531 Standardize function calls.
8532
8533 2001-08-13 Marc Autret <autret_m@epita.fr>
8534
8535 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8536 defining it (defined but null disables alloca).
8537
8538 2001-08-13 Marc Autret <autret_m@epita.fr>
8539
8540 * src/bison.simple (_yy_memcpy): CPP reformat.
8541
8542 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8543
8544 * tests/atconfig.in (CPPFLAGS): Fix.
8545
8546 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8547
8548 * doc/bison.texinfo: Include GNU General Public License from
8549 `gpl.texi'.
8550 * doc/gpl.texi: Add to package.
8551
8552 2001-08-10 Marc Autret <autret_m@epita.fr>
8553
8554 * src/print_graph.h: Fix.
8555 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8556
8557 2001-08-10 Akim Demaille <akim@epita.fr>
8558
8559 * src/system.h: Provide default declarations for stpcpy, strndup,
8560 and strnlen.
8561
8562 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8563
8564 * doc/bison.texinfo (Locations): Update @$ stuff.
8565
8566 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8567
8568 * src/bison.simple (YYLLOC_DEFAULT): Update.
8569 (yyparse): Adjust.
8570
8571 2001-08-08 Marc Autret <autret_m@epita.fr>
8572
8573 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8574 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8575 Reported by Fabrice Bauzac.
8576
8577 2001-08-08 Marc Autret <autret_m@epita.fr>
8578
8579 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8580 * src/vcg.c (output_node): Fix.
8581 * src/vcg.h: Cleanup.
8582 * src/print_graph.c: Add comments.
8583 (node_output_size): New global variable. Simplify the formatting of
8584 the VCG graph output.
8585 (print_actions): Unused code is now used. It notifies the final state
8586 and no action states in the VCG graph. It also give the reduce actions.
8587 The `shift and goto' edges are red and the `go to state' edges are
8588 blue.
8589 Get the current node name and node_obstack by argument.
8590 (node_obstack): New variable.
8591 (print_state): Manage node_obstack.
8592 (print_core): Use node_obstack given by argument.
8593 A node is not only computed here but in print_actions also.
8594 (print_graph): CPP out useless code instead of commenting it.
8595
8596 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8597
8598 * tests/atconfig.in (CPPFLAGS): Fix.
8599
8600 2001-08-07 Akim Demaille <akim@epita.fr>
8601
8602 * src/print_graph.c (quote): New.
8603 (print_core): Use it.
8604
8605 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8606
8607 * src/vcg.c (complain.h): Include it.
8608 Unepitaize `return' invocations.
8609 [NDEBUG] (main): Remove.
8610 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8611 * src/files.c (open_files): Initialize graph_obstack.
8612 * src/print_graph.c (print_actions): CPP out useless code.
8613 (print_core): Don't output the last `\n' in labels.
8614 Use `quote'.
8615 * src/files.c (output_files): Output the VCG file.
8616 * src/main.c (main): Invoke print_graph ();
8617
8618 2001-08-06 Marc Autret <autret_m@epita.fr>
8619
8620 Automaton VCG graph output.
8621 Using option ``-g'' or long option ``--graph'', you can generate
8622 a gram_filename.vcg file containing a VCG description of the LALR (1)
8623 automaton of your grammar.
8624
8625 * src/main.c: Call to print_graph() function.
8626 * src/getargs.h: Update.
8627 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8628 (graph_flag): New flag.
8629 (longopts): Update.
8630 (getargs): Add case `g'.
8631 * src/files.c (graph_obstack): New obstack struct.
8632 (open_files): Initialize new obstack.
8633 (output_files): Saves graph_obstack if required.
8634 * src/files.h (graph_obstack): New extern declaration.
8635 * src/Makefile.am: Add new source files.
8636
8637 2001-08-06 Marc Autret <autret_m@epita.fr>
8638
8639 * src/print_graph.c, src/print_graph.h (graph): New.
8640 * src/vcg.h: New file.
8641 * src/vcg.c: New file, VCG graph handling.
8642
8643 2001-08-06 Marc Autret <autret_m@epita.fr>
8644
8645 Add of %source_extension and %header_extension which specify
8646 the source or/and the header output file extension.
8647
8648 * src/files.c (compute_base_names): Remove initialisation of
8649 src_extension and header_extension.
8650 (compute_exts_from_gf): Update.
8651 (compute_exts_from_src): Update.
8652 (output_files): Update.
8653 * src/reader.c (parse_header_extension_decl): New.
8654 (parse_source_extension_decl): New.
8655 (read_declarations): New case statements for the new tokens.
8656 * src/lex.c (percent_table): Add entries for %source_extension
8657 and %header_extension.
8658 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8659
8660 2001-08-06 Marc Autret <autret_m@epita.fr>
8661
8662 * configure.in: Bump to 1.28c.
8663 * doc/bison.texinfo: Texinfo thingies.
8664
8665 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8666
8667 * tests/atconfig.in (CPPFLAGS): Add.
8668 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8669
8670 2001-08-03 Akim Demaille <akim@epita.fr>
8671
8672 Version 1.28b.
8673
8674 2001-08-03 Akim Demaille <akim@epita.fr>
8675
8676 * tests/Makefile.am (check-local): Ship testsuite.
8677 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8678 Include `string.h'.
8679
8680 2001-08-03 Akim Demaille <akim@epita.fr>
8681
8682 * configure.in: Try using -Wformat when compiling.
8683
8684 2001-08-03 Akim Demaille <akim@epita.fr>
8685
8686 * configure.in: Bump to 1.28b.
8687
8688 2001-08-03 Akim Demaille <akim@epita.fr>
8689
8690 * src/complain.c: Adjust strerror_r portability issues.
8691
8692 2001-08-03 Akim Demaille <akim@epita.fr>
8693
8694 Version 1.28a.
8695
8696 2001-08-03 Akim Demaille <akim@epita.fr>
8697
8698 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8699 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8700 * src/getargs.c: Include complain.h.
8701 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8702 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8703
8704 2001-08-03 Akim Demaille <akim@epita.fr>
8705
8706 * src/reader.c (readgram): Display hidden chars in error messages.
8707
8708 2001-08-03 Akim Demaille <akim@epita.fr>
8709
8710 Update to gettext 0.10.39.
8711
8712 2001-08-03 Akim Demaille <akim@epita.fr>
8713
8714 * lib/strspn.c: New.
8715
8716 2001-08-01 Marc Autret <autret_m@epita.fr>
8717
8718 * doc/bison.texinfo: Update.
8719 * doc/bison.1 (mandoc): Update.
8720 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8721 * src/files.c: Support output files extensions computing.
8722 (src_extension): New static variable.
8723 (header_extension): New static variable.
8724 (tr): New function.
8725 (get_extension_index): New function, gets the index of an extension
8726 filename in a string.
8727 (compute_exts_from_gf): New function, computes extensions from the
8728 grammar file extension.
8729 (compute_exts_from_src): New functions, computes extensions from the
8730 C source file extension, file given by ``-o'' option.
8731 (compute_base_names): Update.
8732 (output_files): Update.
8733
8734 2001-08-01 Robert Anisko <anisko_r@epita.fr>
8735
8736 * doc/bison.texi: Document @$.
8737 (Locations): New section.
8738
8739 2001-07-18 Akim Demaille <akim@epita.fr>
8740
8741 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8742 * config/prev-version.txt, config/move-if-change: New.
8743 * Makefile.am: Adjust.
8744
8745 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
8746
8747 * src/bison.simple (yyparse): Suppress warning `comparaison
8748 between signed and unsigned'.
8749
8750 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
8751
8752 * src/getargs.h (raw_flag): Remove.
8753 * src/getargs.c: Die on `-r'/`--raw'.
8754 * src/lex.c (parse_percent_token): Die on `%raw'.
8755 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8756 * tests/calc.at: Suppress test with option `--raw'.
8757
8758 2001-07-14 Akim Demaille <akim@epita.fr>
8759
8760 * config/: New.
8761 * configure.in: Require Autoconf 2.50.
8762 Update to gettext 0.10.38.
8763
8764 2001-03-16 Akim Demaille <akim@epita.fr>
8765
8766 * doc/bison.texinfo: ANSIfy the examples.
8767
8768 2001-03-16 Akim Demaille <akim@epita.fr>
8769
8770 * getargs.c (skeleton): New variable.
8771 (longopts): --skeleton is a new option.
8772 (shortopts, getargs): -S is a new option.
8773 * getargs.h: Declare skeleton.
8774 * output.c (output_parser): Use it.
8775
8776 2001-03-16 Akim Demaille <akim@epita.fr>
8777
8778 * m4/strerror_r.m4: New.
8779 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8780 * lib/error.h, lib/error.c: Update.
8781
8782 2001-03-16 Akim Demaille <akim@epita.fr>
8783
8784 * src/getargs.c (longopts): Clean up.
8785
8786 2001-02-21 Akim Demaille <akim@epita.fr>
8787
8788 * src/reader.c (gensym): `gensym_count' is your own.
8789 Use a static buf to create the symbol name, as token_buffer is no
8790 longer a buffer.
8791
8792 2001-02-08 Akim Demaille <akim@epita.fr>
8793
8794 * src/conflicts.c (conflict_report): Be sure not to append to res
8795 between two calls, which could happen if both first sprintf were
8796 skipped, but not the first cp += strlen.
8797
8798 2001-02-08 Akim Demaille <akim@epita.fr>
8799
8800 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8801 New, from fileutils 4.0.37.
8802 * configure.in: Require Autoconf 2.49c. I took some time before
8803 making this decision. This is the only way out for portability
8804 issues in Bison, it would mean way too much duplicate effort to
8805 import in Bison features implemented in 2.49c since 2.13.
8806 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
8807
8808 2001-02-02 Akim Demaille <akim@epita.fr>
8809
8810 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
8811 * lib/xalloc.h, lib/xmalloc.c: Update.
8812
8813 2001-01-19 Akim Demaille <akim@epita.fr>
8814
8815 Get rid of the ad hoc handling of token_buffer in the scanner: use
8816 the obstacks.
8817
8818 * src/lex.c (token_obstack): New.
8819 (init_lex): Initialize it. No longer call...
8820 (grow_token_buffer): this. Remove it.
8821 Adjust all the places which used it to use the obstack.
8822
8823 2001-01-19 Akim Demaille <akim@epita.fr>
8824
8825 * src/lex.h: Rename all the tokens:
8826 s/\bENDFILE\b/tok_eof/g;
8827 s/\bIDENTIFIER\b/tok_identifier/g;
8828 etc.
8829 Let them be enums, not #define, to ease debugging.
8830 Adjust all the code.
8831
8832 2001-01-18 Akim Demaille <akim@epita.fr>
8833
8834 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
8835 * src/lex.c (maxtoken, grow_token_buffer): Static.
8836
8837 2001-01-18 Akim Demaille <akim@epita.fr>
8838
8839 Since we now use obstacks, more % directives can be enabled.
8840
8841 * src/lex.c (percent_table): Also accept `%yacc',
8842 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
8843 `%debug'.
8844 Handle the actions for `%semantic_parser' and `%pure_parser' here,
8845 instead of returning a token.
8846 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
8847 * src/reader.c (read_declarations): Adjust.
8848 * src/files.c (open_files): Don't call `compute_base_names', don't
8849 compute `attrsfile' since they depend upon data which might be
8850 *in* the input file now.
8851 (output_files): Do it here.
8852 * src/output.c (output_headers): Document the fact that this patch
8853 introduces a guaranteed SEGV for semantic parsers.
8854 * doc/bison.texinfo: Document them.
8855 * tests/suite.at: Exercise these %options.
8856
8857 2000-12-20 Akim Demaille <akim@epita.fr>
8858
8859 Also handle the output file (--verbose) with obstacks.
8860
8861 * files.c (foutput): Remove.
8862 (output_obstack): New.
8863 Adjust all dependencies.
8864 * src/conflicts.c: Return a string.
8865 * src/system.h (obstack_grow_string): Rename as...
8866 (obstack_sgrow): this. Be ready to work with non literals.
8867 (obstack_fgrow4): New.
8868
8869 2000-12-20 Akim Demaille <akim@epita.fr>
8870
8871 * src/files.c (open_files): Fix the computation of short_base_name
8872 in the case of `-o foo.tab.c'.
8873
8874 2000-12-20 Akim Demaille <akim@epita.fr>
8875
8876 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
8877 (copy_dollar): Now that everything uses obstacks, get rid of the
8878 FILE * parameters.
8879
8880 2000-12-20 Akim Demaille <akim@epita.fr>
8881
8882 * src/files.c (open_files): Actually the `.output' file is based
8883 on the short_base_name, not base_name.
8884 * tests/suite.at (Checking output file names): Adjust.
8885
8886 2000-12-20 Akim Demaille <akim@epita.fr>
8887
8888 * src/bison.s1: Remove, we now use directly...
8889 * src/bison.simple: this.
8890 * src/Makefile.am: Use pkgdata instead of data.
8891
8892 2000-12-20 Akim Demaille <akim@epita.fr>
8893
8894 * src/files.c (guard_obstack): New.
8895 (open_files): Initialize it.
8896 (output_files): Dump it...
8897 * src/files.h: Export it.
8898 * src/reader.c (copy_guard): Use it.
8899
8900 2000-12-19 Akim Demaille <akim@epita.fr>
8901
8902 * src/files.c (outfile, defsfile, actfile): Removed as global
8903 vars.
8904 (open_files): Don't compute them.
8905 (output_files): Adjust.
8906 (base_name, short_base_name): Be global.
8907 Adjust dependencies.
8908
8909 2000-12-19 Akim Demaille <akim@epita.fr>
8910
8911 * src/files.c (strsuffix): New.
8912 (stringappend): Be just like strcat but allocate.
8913 (base_names): Eve out from open_files.
8914 Try to simplify the rather hairy computation of base_name and
8915 short_base_name.
8916 (open_files): Use it.
8917 * tests/suite.at (Checking output file names): New test.
8918
8919 2000-12-19 Akim Demaille <akim@epita.fr>
8920
8921 * src/system.h (obstack_grow_literal_string): Rename as...
8922 (obstack_grow_string): this.
8923 * src/output.c (output_parser): Recognize `%% actions' instead of
8924 `$'.
8925 * src/bison.s1: s/$/%% actions/.
8926 * src/bison.hairy: Likewise.
8927
8928 2000-12-19 Akim Demaille <akim@epita.fr>
8929
8930 * src/output.c (output_parser): Compute the `#line' lines when
8931 there are.
8932 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
8933 Suggested by Hans Aberg.
8934
8935 2000-12-19 Akim Demaille <akim@epita.fr>
8936
8937 Let the handling of the skeleton files be local to the procedures
8938 that use it.
8939
8940 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
8941 longer static.
8942 (fparser, open_extra_files): Remove.
8943 (open_files, output_files): Don't take care of fparser.
8944 * src/files.h: Adjust.
8945 * src/output.c (output_parser): Open and close the file to the
8946 skeleton.
8947 * src/reader.c (read_declarations): When %semantic_parser, open
8948 fguard.
8949
8950 2000-12-19 Akim Demaille <akim@epita.fr>
8951
8952 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
8953 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
8954
8955 2000-12-19 Akim Demaille <akim@epita.fr>
8956
8957 * src/files.c (open_files): Yipee! We no longer need all the code
8958 looking for `/tmp' since we have no tmp file.
8959
8960 2000-12-19 Akim Demaille <akim@epita.fr>
8961
8962 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
8963 New macros.
8964 * src/files.c (open_files): Less dependency on MSDOS etc.
8965
8966 2000-12-14 Akim Demaille <akim@epita.fr>
8967
8968 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
8969 Provide a default definition.
8970 Use it when executing the default @ action.
8971 * src/reader.c (reader_output_yylsp): No longer include
8972 `timestamp' and `text' in the default YYLTYPE.
8973
8974 2000-12-12 Akim Demaille <akim@epita.fr>
8975
8976 * src/reader.c (copy_definition, parse_union_decl, copy_action)
8977 (copy_guard): Quote the file names.
8978 Reported by Laurent Mascherpa.
8979
8980 2000-12-12 Akim Demaille <akim@epita.fr>
8981
8982 * src/output.c (output_headers, output_program, output): Be sure
8983 to escape special characters when outputting filenames.
8984 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
8985 (output_headers): Don't depend on them, Use ACTSTR.
8986
8987 2000-11-17 Akim Demaille <akim@epita.fr>
8988
8989 * lib/obstack.h: Formatting changes.
8990 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
8991 prevents type checking.
8992 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
8993 cast the value to (void *): assigning a `foo *' to a `void *'
8994 variable is valid.
8995 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
8996 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
8997 append characters.
8998
8999 2000-11-17 Akim Demaille <akim@epita.fr>
9000
9001 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9002 as...
9003 (suite.m4, regression.m4, calc.m4): these.
9004 * tests/atgeneral.m4: Update from CVS Autoconf.
9005
9006 2000-11-17 Akim Demaille <akim@epita.fr>
9007
9008 * tests/regression.m4 (%union and --defines): New test,
9009 demonstrating a current bug in the obstack implementation.
9010
9011 2000-11-17 Akim Demaille <akim@epita.fr>
9012
9013 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9014 macros.
9015 Use them to declare the variables which are global or local to
9016 `yyparse'.
9017
9018 2000-11-17 Akim Demaille <akim@epita.fr>
9019
9020 * acconfig.h: Remove, no longer used.
9021
9022 2000-11-07 Akim Demaille <akim@epita.fr>
9023
9024 * src: s/Copyright (C)/Copyright/g.
9025
9026 2000-11-07 Akim Demaille <akim@epita.fr>
9027
9028 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9029 defining.
9030 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9031
9032 2000-11-07 Akim Demaille <akim@epita.fr>
9033
9034 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9035 Merge in a single CPP if/else.
9036
9037 2000-11-07 Akim Demaille <akim@epita.fr>
9038
9039 * src/output.c (output): Remove useless variables.
9040 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9041 argument `data' for consistency with the prototypes.
9042 Qualify it `const'.
9043 (obstack_copy, obstack_copy0): Rename the second argument as
9044 `address' for consistency. Qualify it `const'.
9045 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9046 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9047 `const' their input argument (`data' or `address').
9048 Adjust the corresponding macros to include `const' in casts.
9049
9050 2000-11-03 Akim Demaille <akim@epita.fr>
9051
9052 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9053 s/PFILE1/BISON_HAIRY/.
9054 Adjust dependencies.
9055
9056 2000-11-03 Akim Demaille <akim@epita.fr>
9057
9058 For some reason, this was not applied.
9059
9060 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9061 `unlink': it's no longer used.
9062
9063 2000-11-03 Akim Demaille <akim@epita.fr>
9064
9065 * src/files.c (skeleton_find): New function, eved out of...
9066 (open_files, open_extra_files): here.
9067
9068 2000-11-03 Akim Demaille <akim@epita.fr>
9069
9070 Don't use `atexit'.
9071
9072 * src/files.c (obstack_save): New function.
9073 (done): Rename as...
9074 (output_files): this.
9075 Use `obstack_save'.
9076 * src/main.c (main): Don't use `atexit' to register `done', since
9077 it no longer has to remove tmp files, just call `output_files'
9078 when there are no errors.
9079
9080 2000-11-02 Akim Demaille <akim@epita.fr>
9081
9082 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9083 `unlink': it's no longer used.
9084 * src/files.h: Formatting changes.
9085
9086 2000-11-02 Akim Demaille <akim@epita.fr>
9087
9088 Remove the last uses of mktemp and unlink/delete.
9089
9090 * src/files.c (fdefines, ftable): Removed.
9091 (defines_ostack, table_obstack): New.
9092 Adjust dependencies of the former into uses of the latter.
9093 * src/output.c (output_short_or_char_table, output_short_table):
9094 Convert to using obstacks.
9095 * src/reader.c (copy_comment2): Accept one FILE * and two
9096 obstacks.
9097 (output_token_defines, reader_output_yylsp): Use obstacks.
9098 * src/system.h (obstack_fgrow3): New.
9099
9100 2000-11-01 Akim Demaille <akim@epita.fr>
9101
9102 Change each use of `fattrs' into a use of `attrs_obstack'.
9103
9104 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9105 * src/files.c (fattrs): Remove.
9106 (attrs_obstack): New.
9107 Adjust all dependencies.
9108 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9109
9110 2000-11-01 Akim Demaille <akim@epita.fr>
9111
9112 Introduce obstacks.
9113 Change each use of `faction' into a use of `action_obstack'.
9114
9115 * lib/obstack.h, lib/obstack.c: New files.
9116 * src/files.c (faction): Remove.
9117 (action_obstack): New.
9118 Adjust all dependencies.
9119
9120 2000-10-20 Akim Demaille <akim@epita.fr>
9121
9122 * lib/quote.h (PARAMS): New macro. Use it.
9123
9124 2000-10-16 Akim Demaille <akim@epita.fr>
9125
9126 * src/output.c (output_short_or_char_table): New function.
9127 (output_short_table, output_token_translations): Use it.
9128 (goto_actions): Use output_short_table.
9129
9130 2000-10-16 Akim Demaille <akim@epita.fr>
9131
9132 * src/symtab.c (bucket_new): New function.
9133 (getsym): Use it.
9134
9135 * src/output.c (output_short_table): New argument to display the
9136 comment associated with the table.
9137 Adjust dependencies.
9138 (output_gram): Use it.
9139 (output_rule_data): Nicer output layout for YYTNAME.
9140
9141 2000-10-16 Akim Demaille <akim@epita.fr>
9142
9143 * src/lex.c (read_typename): New function.
9144 (lex): Use it.
9145 * src/reader.c (copy_dollar): Likewise.
9146
9147 2000-10-16 Akim Demaille <akim@epita.fr>
9148
9149 * src/reader.c (copy_comment2): Expect the input stream to be on
9150 the `/' which is suspected to open a comment, instead of being
9151 called after `//' or `/*' was read.
9152 (copy_comment, copy_definition, parse_union_decl, copy_action)
9153 (copy_guard): Adjust.
9154
9155 2000-10-16 Akim Demaille <akim@epita.fr>
9156
9157 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9158 `read_signed_integer'.
9159
9160 2000-10-16 Akim Demaille <akim@epita.fr>
9161
9162 * src/reader.c (copy_dollar): New function.
9163 (copy_guard, copy_action): Use it.
9164
9165 2000-10-16 Akim Demaille <akim@epita.fr>
9166
9167 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9168 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9169 New files, from Fileutils 4.0.27.
9170 * src/main.c (printable_version): Remove.
9171 * src/lex.c, src/reader.c: Use `quote'.
9172
9173 2000-10-04 Akim Demaille <akim@epita.fr>
9174
9175 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9176
9177 2000-10-04 Akim Demaille <akim@epita.fr>
9178
9179 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9180
9181 2000-10-04 Akim Demaille <akim@epita.fr>
9182
9183 When a literal string is used to define two different tokens,
9184 `bison -v' segfaults.
9185 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9186
9187 * tests/regression.m4: New file.
9188 Include the core of the sample provided by Piotr Gackiewicz.
9189 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9190 properly.
9191
9192 2000-10-04 Akim Demaille <akim@epita.fr>
9193
9194 * src/reader.c (parse_expect_decl): Keep `count' within the size
9195 of `buffer'.
9196 From Neil Booth.
9197
9198 2000-10-02 Paul Eggert <eggert@twinsun.com>
9199
9200 * bison.s1 (yyparse): Assign the default value
9201 unconditionally, to avoid a GCC warning and make the parser a
9202 tad smaller.
9203
9204 2000-10-02 Akim Demaille <akim@epita.fr>
9205
9206 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9207 options.
9208
9209 2000-10-02 Akim Demaille <akim@epita.fr>
9210
9211 * src/derives.c, src/print.c, src/reduce.c: To ease the
9212 translation, move some `\n' out of the translated strings.
9213
9214 2000-10-02 Akim Demaille <akim@epita.fr>
9215
9216 The location tracking mechanism is precious for parse error
9217 messages. Nevertheless, it is enabled only when `@n' is used in
9218 the grammar, which is a different issue (you can use it in error
9219 message, but not in the grammar per se). Therefore, there should
9220 be another means to enable it.
9221
9222 * src/getargs.c (getargs): Support `--locations'.
9223 (usage): Report it.
9224 * src/getargs.h (locationsflag): Export it.
9225 * src/lex.c (percent_table): Support `%locations'.
9226 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9227 with `locationsflag'.
9228 * doc/bison.texinfo: Document `--locations' and `%locations'.
9229 Sort the options.
9230 * tests/calc.m4: Test it.
9231
9232 For regularity of the names, replace each
9233 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9234 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9235 In addition replace each `flag' with `_flag'.
9236
9237 2000-10-02 Akim Demaille <akim@epita.fr>
9238
9239 Also test parse error messages, including with YYERROR_VERBOSE.
9240
9241 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9242 associative).
9243 Use it to check the computations.
9244 Use it to check `nonassoc' is honored.
9245 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9246 `--yyerror-verbose'.
9247 (_AT_CHECK_CALC): Adjust to this option.
9248 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9249
9250 2000-10-02 Akim Demaille <akim@epita.fr>
9251
9252 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9253 the latter demonstrates a flaw in the handling of non debugging
9254 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9255 was used in order to simplify:
9256
9257 #if YYDEBUG
9258 if (yydebug)
9259 {
9260 ...
9261 }
9262 #endif
9263
9264 into
9265
9266 if (yydebug)
9267 {
9268 ...
9269 }
9270
9271 unfortunately this leads to a CPP conflict when
9272 `--name-prefix=foo' is used since it produces `#define yydebug
9273 foodebug'.
9274
9275 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9276 (YYDPRINTF): New macro.
9277 Spread its use.
9278 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9279 the bison options.
9280 Also test `--verbose', `--defines' and `--name-prefix'.
9281
9282 2000-10-02 Akim Demaille <akim@epita.fr>
9283
9284 Improve the readability of the produced parsers.
9285
9286 * src/bison.s1: Formatting changes.
9287 Improve the comment related to the `$' mark.
9288 (yydefault): Don't fall through to `yyresume': `goto' there.
9289 * src/output.c (output_parser): When the `$' is met, skip the end
9290 of its line.
9291 New variable, `number_of_dollar_signs', to check there's exactly
9292 one `$' in the parser skeleton.
9293
9294 2000-10-02 Akim Demaille <akim@epita.fr>
9295
9296 * lib/xstrdup.c: New file, from the fileutils.
9297 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9298 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9299 instead of strlen + xmalloc + strcpy.
9300 * src/symtab.c (copys): Remove, use xstrdup instead.
9301
9302 2000-10-02 Akim Demaille <akim@epita.fr>
9303
9304 * src/gram.h (associativity): New enum type which replaces the
9305 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9306 `right_assoc', `left_assoc' and `non_assoc'.
9307 Adjust all dependencies.
9308 * src/reader.c: Formatting changes.
9309 (LTYPESTR): Don't define it, use it as a literal in
9310 `reader_output_yylsp'.
9311 * src/symtab.h (symbol_class): New enum type which replaces the
9312 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9313 `sunknown', `stoken and `snterm'.
9314
9315 2000-10-02 Akim Demaille <akim@epita.fr>
9316
9317 * src/getargs.c (fixed_outfiles): Rename as...
9318 (yaccflag): for consistency and accuracy.
9319 Adjust dependencies.
9320
9321 2000-10-02 Akim Demaille <akim@epita.fr>
9322
9323 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9324 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9325 difficult and introduced a lot of core dump. It turns out that
9326 Bison used an implementation of `xmalloc' based on `calloc', and
9327 at various places it does depend upon the initialization to 0. I
9328 have not tried to isolate the pertinent places, and all the former
9329 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9330 someone should address this issue.
9331
9332 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9333 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9334 files.
9335 Adjust dependencies.
9336 * src/warshall.h: New file.
9337 Propagate.
9338
9339 2000-10-02 Akim Demaille <akim@epita.fr>
9340
9341 Various anti-`extern in *.c' changes.
9342
9343 * src/system.h: Include `assert.h'.
9344
9345 2000-10-02 Akim Demaille <akim@epita.fr>
9346
9347 * src/state.h (nstates, final_state, first_state, first_shift)
9348 (first_reduction): Move their exportation from here...
9349 * src/LR0.h: to here.
9350 Adjust dependencies.
9351 * src/getargs.c (statisticsflag): New variable.
9352 Add support for `--statistics'.
9353 Adjust dependencies.
9354
9355 Remove a lot of now useless `extern' statements in most files.
9356
9357 2000-10-02 Akim Demaille <akim@epita.fr>
9358
9359 * src/LR0.h: New file.
9360 Propagate its use.
9361
9362 2000-10-02 Akim Demaille <akim@epita.fr>
9363
9364 * src/print.h: New file.
9365 Propagate its use.
9366 * src/print.c: Formatting and ordering changes.
9367 (verbose, terse): Replace with...
9368 (print_results): this new function.
9369 Adjust dependencies.
9370
9371 2000-10-02 Akim Demaille <akim@epita.fr>
9372
9373 * src/conflicts.c (conflict_report): New function.
9374 (conflict_log, verbose_conflict_log): Replace with...
9375 (print_conflicts): this function.
9376 Adjust dependencies.
9377 * src/conflicts.h: New file.
9378 Propagate its inclusion.
9379
9380 2000-10-02 Akim Demaille <akim@epita.fr>
9381
9382 * src/nullable.h: New file.
9383 Propagate its inclusion.
9384 * src/nullable.c: Formatting changes.
9385
9386 2000-10-02 Akim Demaille <akim@epita.fr>
9387
9388 * src/reduce.h: New file.
9389 Propagate its inclusion.
9390 * src/reduce.c: Topological sort and other formatting changes.
9391 (bool, TRUE, FALSE): Move their definition to...
9392 * src/system.h: here.
9393
9394 2000-10-02 Akim Demaille <akim@epita.fr>
9395
9396 * src/files.c: Formatting changes.
9397 (tryopen, tryclose, openfiles): Rename as...
9398 (xfopen, xfclose, open_files): this.
9399 (stringappend): static.
9400 * src/files.h: Complete the list of exported symbols.
9401 Propagate its use.
9402
9403 2000-10-02 Akim Demaille <akim@epita.fr>
9404
9405 * src/reader.h: New file.
9406 Propagate its use instead of tedious list of `extern' and
9407 prototypes.
9408 * src/reader.c: Formatting changes, topological sort,
9409 s/register//.
9410
9411 2000-10-02 Akim Demaille <akim@epita.fr>
9412
9413 * src/lex.h: Prototype `lex.c' exported functions.
9414 * src/reader.c: Adjust.
9415 * src/lex.c: Formatting changes.
9416 (safegetc): Rename as...
9417 (xgetc): this.
9418
9419 2000-10-02 Akim Demaille <akim@epita.fr>
9420
9421 * src/lalr.h: New file.
9422 Propagate its inclusion instead of prototypes and `extern'.
9423 * src/lalr.c: Formatting changes, topological sorting etc.
9424
9425 2000-10-02 Akim Demaille <akim@epita.fr>
9426
9427 * src/output.c (token_actions): Introduce a temporary array,
9428 YYDEFACT, that makes it possible for this function to use
9429 output_short_table.
9430
9431 2000-10-02 Akim Demaille <akim@epita.fr>
9432
9433 `user_toknums' is output as a `short[]' in `output.c', while it is
9434 defined as a `int[]' in `reader.c'. For consistency with the
9435 other output tables, `user_toknums' is now defined as a table of
9436 shorts.
9437
9438 * src/reader.c (user_toknums): Be a short table instead of an int
9439 table.
9440 Adjust dependencies.
9441
9442 Factor the short table outputs.
9443
9444 * src/output.c (output_short_table): New function.
9445 * src/output.c (output_gram, output_stos, output_rule_data)
9446 (output_base, output_table, output_check): Use it.
9447
9448 2000-10-02 Akim Demaille <akim@epita.fr>
9449
9450 * src/output.c (output): Topological sort of the functions, in
9451 order to get rid of the `static' prototypes.
9452 No longer use `register'.
9453 * src/output.h: New file.
9454 Propagate its inclusion in files explicitly prototyping functions
9455 from output.c.
9456
9457 2000-09-21 Akim Demaille <akim@epita.fr>
9458
9459 * src/atgeneral.m4: Update from Autoconf.
9460
9461 2000-09-21 Akim Demaille <akim@epita.fr>
9462
9463 * src/closure.h: New file.
9464 * src/closure.c: Formatting changes, topological sort over the
9465 functions, use of closure.h.
9466 (initialize_closure, finalize_closure): Rename as...
9467 (new_closure, free_closure): these. Adjust dependencies.
9468 * src/LR0.c: Formatting changes, topological sort, use of
9469 cloture.h.
9470 (initialize_states): Rename as...
9471 (new_states): this.
9472 * src/Makefile.am (noinst_HEADERS): Adjust.
9473
9474 2000-09-20 Akim Demaille <akim@epita.fr>
9475
9476 * src/acconfig.h: Don't protect config.h against multiple
9477 inclusion.
9478 Don't define PARAMS.
9479 * src/system.h: Define PARAMS.
9480 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9481 purpose of config.h. system.h must not try to fix wrong
9482 definitions in config.h.
9483
9484 2000-09-20 Akim Demaille <akim@epita.fr>
9485
9486 * src/derives.h: New file.
9487 * src/main.c, src/derives.h: Use it.
9488 Formatting changes.
9489 * src/Makefile.am (noinst_HEADERS): Adjust.
9490
9491 2000-09-20 Akim Demaille <akim@epita.fr>
9492
9493 * tests/atgeneral.m4: Update from Autoconf.
9494 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9495 (AT_CHECK_CALC): New macros.
9496 Use these macros to test bison with options `', `--raw',
9497 `--debug', `--yacc', `--yacc --debug'.
9498
9499 2000-09-19 Akim Demaille <akim@epita.fr>
9500
9501 * src/output.c: Formatting changes.
9502 * src/machine.h: Remove, leaving its contents in...
9503 * src/system.h: here.
9504 Include stdio.h.
9505 Adjust all dependencies on stdio.h and machine.h.
9506 * src/getargs.h: New file.
9507 Let all `extern' declarations about getargs.c be replaced with
9508 inclusion of `getargs.h'.
9509 * src/Makefile.am (noinst_HEADERS): Adjust.
9510
9511 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9512 scope.
9513 (yyerror): Returns void, not int.
9514 * doc/bison.texinfo: Formatting changes.
9515
9516 2000-09-19 Akim Demaille <akim@epita.fr>
9517
9518 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9519 portable.
9520
9521 2000-09-18 Akim Demaille <akim@epita.fr>
9522
9523 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9524 * src/Makefile.am (INCLUDES): Don't.
9525 Be ready to fetch headers in lib/.
9526
9527 2000-09-18 Akim Demaille <akim@epita.fr>
9528
9529 * doc/bison.texinfo: Update the copyright.
9530 ANSIfy and GNUify the examples.
9531 Remove the old menu.
9532
9533 2000-09-18 Akim Demaille <akim@epita.fr>
9534
9535 First set of tests: use the `calc' example from the documentation.
9536
9537 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9538 is defined only when YYDEBUG is.
9539 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9540 * src/files.c (tryopen, tryclose): Formatting changes.
9541 Move to the top and be static.
9542 * src/reader.c (read_signed_integer): Likewise.
9543 * tests/calc.m4: New file.
9544 * Makefile.am, suite.m4: Adjust.
9545 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9546
9547 2000-09-18 Akim Demaille <akim@epita.fr>
9548
9549 Add support for an Autotest test suite for Bison.
9550
9551 * m4/m4.m4, m4/atconfig.m4: New files.
9552 * m4/Makefile.am (EXTRA_DIST): Adjust.
9553 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9554 files.
9555 * src/getargs.c: Display a more standard --version message.
9556 * src/reader.c (reader): Formatting changes.
9557 No longer depend upon VERSION_STRING.
9558 * configure.in: No longer use `dnl'.
9559 Set up the test suite and the new directory `tests/.
9560 (VERSION_STRING): Remove.
9561
9562 2000-04-14 Akim Demaille <akim@epita.fr>
9563
9564 * src/reader.c (copy_comment2): New function, same as former
9565 `copy_comment', but outputs into two FILE *.
9566 (copy_comment): Use it.
9567 (parse_union_decl): Use it.
9568 (get_type, parse_start_decl): Use the same `invalid' message.
9569 (parse_start_decl, parse_union_decl): Use the same `multiple'
9570 message.
9571 (parse_union_decl, copy_guard, copy_action): Use the same
9572 `unmatched' message.
9573 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9574
9575 2000-03-31 Akim Demaille <akim@epita.fr>
9576
9577 * src/files.c (tryopen, tryclose): Move to the top.
9578 Be static.
9579
9580 2000-03-31 Akim Demaille <akim@epita.fr>
9581
9582 * src/main.c (main): Don't call `done', exit does it.
9583
9584 2000-03-31 Akim Demaille <akim@epita.fr>
9585
9586 * allocate.c: s/return (foo)/return foo/.
9587 * lalr.c: Likewise.
9588 * LR0.c: Likewise.
9589 * output.c: Likewise.
9590 * reader.c: Likewise.
9591 * symtab.c: Likewise.
9592 * vmsgetargs.c: Likewise.
9593
9594 2000-03-31 Akim Demaille <akim@epita.fr>
9595
9596 Clean up the error reporting functions.
9597
9598 * src/report.c: New file.
9599 * src/report.h: Likewise.
9600 * src/Makefile.am: Adjust.
9601 * m4/error.m4: New file.
9602 * m4/Makefile.am: Adjust.
9603 * configure.in (jm_PREREQ_ERROR): Call it.
9604 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9605 Remove.
9606 (fatal, fatals): Remove. All callers use complain.c::fatal.
9607 (warn, warni, warns, warnss, warnss): Remove. All callers use
9608 complain.c::complain.
9609 (toomany): Remove, use fatal instead.
9610 * src/files.c (done): No argument, use complain_message_count.
9611 * src/main.c (main): Register `done' to `atexit'.
9612
9613 * src/getargs.c (usage): More `fputs', less `fprintf'.
9614
9615 2000-03-28 Akim Demaille <akim@epita.fr>
9616
9617 * lib/: New directory.
9618 * Makefile.am (SUBDIRS): Adjust.
9619 * configure.in: Adjust.
9620 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9621 useless.
9622 * src/alloca.c: Moved to lib/.
9623 * src/getopt.c: Likewise.
9624 * src/getopt1.c: Likewise.
9625 * src/getopt.h: Likewise.
9626 * src/ansi2knr.c: Likewise.
9627 * src/ansi2knr.1: Likewise.
9628 * src/Makefile.am: Adjust.
9629 * lib/Makefile.am: New file.
9630
9631 2000-03-28 Akim Demaille <akim@epita.fr>
9632
9633 * src/getargs.c (usage): Refresh the help message.
9634
9635 2000-03-17 Akim Demaille <akim@epita.fr>
9636
9637 * src/getopt1.c: Updated from textutils 2.0e
9638 * src/getopt.c: Likewise.
9639 * src/getopt.h: Likewise.
9640
9641 2000-03-17 Akim Demaille <akim@epita.fr>
9642
9643 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9644 the file name, not the whole `#line LINE FILE'.
9645
9646 2000-03-17 Akim Demaille <akim@epita.fr>
9647
9648 On syntax errors, report the token on which we choked.
9649
9650 * src/bison.s1 (yyparse): In the label yyerrlab, when
9651 YYERROR_VERBOSE, add yychar in msg.
9652
9653 2000-03-17 Akim Demaille <akim@epita.fr>
9654
9655 * src/reader.c (copy_at): New function.
9656 (copy_guard): Use it.
9657 (copy_action): Use it.
9658
9659 2000-03-17 Akim Demaille <akim@epita.fr>
9660
9661 Be kind to translators, save some useless translations.
9662
9663 * src/main.c (banner): New function.
9664 (fatal_banner): Use it.
9665 (warn_banner): Use it.
9666
9667 2000-03-17 Akim Demaille <akim@epita.fr>
9668
9669 * src/reader.c (copy_definition): Use copy_string and
9670 copy_comment. Removed now unused `match', `ended',
9671 `cplus_comment'.
9672 (copy_comment, copy_string): Moved, to be visible from
9673 copy_definition.
9674
9675 2000-03-17 Akim Demaille <akim@epita.fr>
9676
9677 * src/reader.c (copy_string): Declare `static inline'. No
9678 problems with inline, since it is checked by configure.
9679 (copy_comment): Likewise.
9680
9681 2000-03-17 Akim Demaille <akim@epita.fr>
9682
9683 * src/reader.c (packsymbols): Formatting changes.
9684
9685 2000-03-17 Akim Demaille <akim@epita.fr>
9686
9687 * src/reader.c (copy_comment): New function, factored out from:
9688 (copy_action): Use it. Removed now unused `match', `ended',
9689 `cplus_comment'.
9690 (copy_guard): Likewise.
9691
9692 2000-03-17 Akim Demaille <akim@epita.fr>
9693
9694 * src/reader.c (copy_string): New function, factored out from:
9695 (copy_action): Use it.
9696 (copy_guard): Likewise.
9697
9698 2000-03-17 Akim Demaille <akim@epita.fr>
9699
9700 Change the handling of @s so that they behave exactly like $s.
9701 There is now a pseudo variable @$ (readble and writable), location
9702 of the lhs of the rule (by default ranging from the location of
9703 the first symbol of the rhs, to the location of the last symbol,
9704 or, if the rhs is empty, YYLLOC).
9705
9706 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9707 yyval.
9708 (yyparse): When providing a default semantic action, provide a
9709 default location action.
9710 (after the $): No longer change `*YYLSP', just stack YYLOC the
9711 same way you stack YYVAL.
9712 * src/reader.c (read_declarations): Use warns.
9713 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9714 (copy_action, case '@'): Likewise.
9715 Use a standard error message, to save useless work from
9716 translators.
9717
9718 2000-03-17 Akim Demaille <akim@epita.fr>
9719
9720 * src/bison.s1: Formatting and cosmetics changes.
9721 * src/reader.c: Likewise.
9722 Update the Copyright notice.
9723
9724 2000-03-17 Akim Demaille <akim@epita.fr>
9725
9726 * src/bison.s1 (#line): All set to `#line' only, since the
9727 Makefile now handles them.
9728
9729 2000-03-16 Akim Demaille <akim@epita.fr>
9730
9731 * src/output.c (output_rule_data): Output the documentation of
9732 some of the tables.
9733 (Copyright notice): Update.
9734 Formatting changes.
9735
9736 2000-03-16 Akim Demaille <akim@epita.fr>
9737
9738 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9739 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9740 One `#if YYDEBUG' remains, since it uses variables which are
9741 defined only if `YYDEBUG != 0'.
9742
9743 2000-03-16 Akim Demaille <akim@epita.fr>
9744
9745 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9746 and related variables so that the similarities are highlighted.
9747
9748 2000-03-16 Akim Demaille <akim@epita.fr>
9749
9750 * src/bison.s1: Properly indent CPP directives.
9751
9752 2000-03-16 Akim Demaille <akim@epita.fr>
9753
9754 * src/bison.s1: Properly indent the `alloca' CPP section.
9755
9756 2000-03-16 Akim Demaille <akim@epita.fr>
9757
9758 Do not hard code values of directories in `configure.in'.
9759 Update the `configure' tool chain.
9760
9761 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9762 src/makefile.am.
9763 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9764 (AC_OUTPUT): Add m4/Makefile.
9765 Bump to bison 1.28a, 1.29 has never been released.
9766 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9767 handled via src/Makefile.am.
9768 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9769 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9770 autoheader.
9771 * Makefile.am (SUBDIRS): Add m4.
9772 (ACLOCAL_AM_FLAGS): New variable.
9773 (AUTOMAKE_OPTIONS): Add check-news.
9774 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9775 the proper line number and file name.
9776 (DEFS): Propagate the location of bison library files and of the
9777 locale files.
9778 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9779 builddir.
9780 * acinclude.m4: Remove, replaced by the directory m4.
9781 * m4/Makefile.am (EXTRA_DIST): New variable.
9782 * m4/gettext.m4: New file, from the fileutils.
9783 * m4/lcmessage.m4: Likewise
9784 * m4/progtest.m4: Likewise.
9785 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9786
9787 2000-03-10 Akim Demaille <akim@epita.fr>
9788
9789 * src/closure.c:
9790 Formatting changes of various comments.
9791 Respect the GNU coding standards at various places.
9792 Don't use `_()' when no translation is needed.
9793
9794 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9795
9796 * src/files.c:
9797 OS/2 honors TMPDIR environment variable.
9798
9799 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9800
9801 * doc/bison.texinfo: Tweaked spelling and grammar.
9802 Updated ISBN.
9803 Removed reference to price of printed copy.
9804 Mention BISON_SIMPLE and BISON_HAIRY.
9805
9806 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9807
9808 * configure.in, NEWS:
9809 Bison 1.29 released.
9810
9811 1999-10-27 Jesse Thilo <jthilo@gnu.org>
9812
9813 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
9814 Added reference card.
9815
9816 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9817
9818 * po/ru.po: Added Russian translation.
9819
9820 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9821
9822 * configure.in: Added Russian translation.
9823
9824 1999-07-06 Jesse Thilo <jthilo@gnu.org>
9825
9826 * configure.in, NEWS, README:
9827 Released version 1.28.
9828
9829 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9830
9831 * src/system.h:
9832 Squashed redefinition warning on some systems.
9833
9834 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
9835 Have configure build version string instead of relying on ANSI string
9836 concatentation.
9837
9838 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9839
9840 * po/POTFILES.in: Got rid of version.c.
9841
9842 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9843
9844 * acconfig.h, configure.in:
9845 Have configure build version string instead of relying on ANSI string
9846 concatentation.
9847
9848 1999-06-08 Jesse Thilo <jthilo@gnu.org>
9849
9850 * doc/bison.1:
9851 Dropped mention of `+' for long-named options.
9852
9853 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9854
9855 * src/files.c: Added <unistd.h> for unlink().
9856
9857 * src/Makefile.am, src/system.h:
9858 I18n fixes.
9859
9860 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9861
9862 * README: Added a FAQ list.
9863
9864 * configure.in, acconfig.h:
9865 I18n fixes.
9866
9867 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9868
9869 * doc/FAQ, doc/Makefile.am:
9870 Added a FAQ list.
9871
9872 1999-05-19 Jesse Thilo <jthilo@gnu.org>
9873
9874 * src/alloc.h, src/symtab.h, src/version.c:
9875 Protected inclusion of "config.h" with HAVE_CONFIG_H.
9876
9877 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9878
9879 * src/.cvsignore, src/Makefile.am:
9880 Reorganized: sources in `src', documentation in `doc'.
9881
9882 * src/lex.c (literalchar):
9883 fixed the code for escaping double quotes (thanks
9884 Jonathan Czisny.)
9885
9886 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9887
9888 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
9889 Adjusted paths to reflect directory reorganization.
9890
9891 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9892
9893 * doc/.cvsignore, doc/Makefile.am:
9894 Reorganized: sources in `src', documentation in `doc'.
9895
9896 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9897
9898 * configure.in:
9899 Updated AC_INIT file to reflect directory reorganization.
9900
9901 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
9902 Reorganized: sources in `src', documentation in `doc'.
9903
9904 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9905
9906 * src/allocate.c:
9907 Don't declare calloc() and realloc() if not necessary.
9908
9909 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9910
9911 * configure.in, acconfig.h, acinclude.m4:
9912 Don't declare calloc() and realloc() if not necessary.
9913
9914 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9915
9916 * po/.cvsignore: Added i18n support.
9917
9918 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9919
9920 * acconfig.h, configure.in, Makefile.am:
9921 Added i18n support.
9922
9923 1999-03-22 Jesse Thilo <jthilo@gnu.org>
9924
9925 * src/bison.s1: Fixed #line numbers.
9926
9927 1999-03-15 Jesse Thilo <jthilo@gnu.org>
9928
9929 * po/es.po, po/fr.po, po/nl.po, po/de.po:
9930 Added PO files from Translation Project.
9931
9932 1999-03-03 Jesse Thilo <jthilo@gnu.org>
9933
9934 * Makefile.am:
9935 Added support for non-ANSI compilers (ansi2knr).
9936
9937 1999-02-16 Jesse Thilo <jthilo@gnu.org>
9938
9939 * configure.in: Bumped version number to 1.27.
9940
9941 * Makefile.am:
9942 Added `bison.simple' to list of files removed by `make distclean'.
9943
9944 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9945
9946 * src/files.c, src/files.h:
9947 Defined locations of parser files in config.h instead of Makefile.
9948
9949 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9950
9951 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
9952 Defined locations of parser files in config.h instead of Makefile.
9953
9954 1999-02-09 Jesse Thilo <jthilo@gnu.org>
9955
9956 * Makefile.am:
9957 Removed inappropriate use of $< macro.
9958
9959 1999-02-05 Jesse Thilo <jthilo@gnu.org>
9960
9961 * po/Makefile.in.in, po/POTFILES.in:
9962 Add `po' directory skeleton.
9963
9964 1999-01-27 Jesse Thilo <jthilo@gnu.org>
9965
9966 * README: Document help-bison list.
9967
9968 * configure.in: Add check for mkstemp().
9969
9970 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9971
9972 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
9973 Hush a few compiler warnings.
9974
9975 * src/files.c:
9976 Add tryclose(), which verifies that fclose was successful.
9977 Hush a couple of compiler warnings.
9978
9979 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9980
9981 * Makefile.am, OChangeLog:
9982 ChangeLog is now automatically generated. Include the old version as
9983 OChangeLog.
9984
9985 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9986
9987 * 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:
9988 Update FSF address.
9989
9990 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9991
9992 * doc/bison.texinfo: Fix formatting glitch.
9993
9994 * doc/bison.texinfo: Update FSF address.
9995
9996 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9997
9998 * acconfig.h: Update FSF address.
9999
10000 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10001
10002 * src/system.h:
10003 Don't define PACKAGE here, since config.h defines it.
10004
10005 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10006
10007 * src/reader.c: Update copyright date.
10008
10009 * src/main.c:
10010 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10011 favor of output directly to stderr (avoids buffer overruns).
10012
10013 * src/reader.c: Some checks for premature EOF.
10014
10015 * 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:
10016 Use prototypes if the compiler understands them.
10017
10018 * src/files.c: Honor TMPDIR on Unix hosts.
10019 Use prototypes if the compiler understands them.
10020
10021 * src/reader.c:
10022 Fix a couple of buffer overrun bugs.
10023 Use prototypes if the compiler understands them.
10024
10025 * src/system.h: Include unistd.h and ctype.h.
10026 Use #ifdef instead of #if for NLS symbols.
10027
10028 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10029
10030 * doc/bison.texinfo:
10031 Delete comment "consider using @set for edition number, etc..." since
10032 we now are doing so.
10033
10034 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10035
10036 * configure.in:
10037 Use prototypes if the compiler understands them.
10038
10039 * NEWS: Document 1.26 highlights.
10040
10041 * Makefile.am: Require Automake 1.3 or later.
10042
10043 * acconfig.h:
10044 Use prototypes if the compiler understands them.
10045
10046 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10047
10048 * src/version.c:
10049 Use VERSION symbol from automake for version number.
10050
10051 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10052
10053 * acconfig.h, configure.in, version.cin:
10054 Use VERSION symbol from automake for version number.
10055
10056 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10057
10058 * Makefile.am:
10059 Distribute original version of simple parser (bison.s1), not built
10060 version (bison.simple).
10061
10062 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10063
10064 * doc/bison.texinfo: Add info dir entry.
10065
10066 * doc/bison.texinfo:
10067 Let automake put version number into documentation.
10068
10069 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10070
10071 * src/bison.cld, src/build.com, src/vmshlp.mar:
10072 Add non-RCS files from /gd/gnu/bison.
10073
10074 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10075
10076 * doc/bison.1:
10077 Document the BISON_HAIRY and BISON_SIMPLE variables.
10078
10079 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10080
10081 * src/version.c: Build version.c automatically.
10082
10083 * src/reader.c:
10084 Fix token numbering (used to start at 258, not 257).
10085
10086 * src/system.h: Include config.h.
10087
10088 * src/getargs.c: Update bug report address.
10089
10090 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10091 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10092
10093 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10094
10095 * Makefile.am:
10096 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10097
10098 * configure.in, version.cin:
10099 Build version.c automatically.
10100
10101 * AUTHORS: Add AUTHORS file.
10102
10103 * README: Update bug report address.
10104
10105 * bison.simple:
10106 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10107
10108 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10109 Add automake stuff.
10110
10111 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10112
10113 * doc/bison.texinfo: Clean up some formatting.
10114
10115 1998-05-05 Richard Stallman <rms@gnu.org>
10116
10117 * doc/bison.texinfo:
10118 Explain better why to make a pure parser.
10119
10120 1998-01-05 Richard Stallman <rms@gnu.org>
10121
10122 * src/files.c (openfiles):
10123 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10124 find a temporary directory, if possible. Do not unlink files while
10125 they are open.
10126
10127 1997-08-25 Richard Stallman <rms@gnu.org>
10128
10129 * src/reader.c (stack_offset;):
10130 Change some warni to warns.
10131
10132 * src/lex.c (literalchar): Use warns, not warni.
10133
10134 1997-06-28 Richard Stallman <rms@gnu.org>
10135
10136 * src/bison.s1: Add a Bison version comment.
10137
10138 * src/main.c (fatal, warn, berror):
10139 Use program_name.
10140
10141 1997-06-28 Richard Stallman <rms@gnu.org>
10142
10143 * Makefile.in (bison_version): New variable.
10144 (dist): Use that variable.
10145 (bison.s1): Substitute the Bison version into bison.simple.
10146
10147 * bison.simple: Add a Bison version comment.
10148
10149 1997-06-18 Richard Stallman <rms@gnu.org>
10150
10151 * src/main.c (fatal, warn, berror):
10152 Make error messages standard.
10153 (toomany): Improve error message text.
10154
10155 * 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:
10156 new.h renamed to alloc.h.
10157
10158 1997-06-18 Richard Stallman <rms@gnu.org>
10159
10160 * Makefile.in: new.h renamed to alloc.h.
10161
10162 1997-05-24 Richard Stallman <rms@gnu.org>
10163
10164 * src/lex.c (literalchar):
10165 Fix the code for escaping \, " and '.
10166
10167 (lex): Avoid trouble when there are many chars
10168 to discard in a char literal with just several chars in it.
10169
10170 1997-05-17 Richard Stallman <rms@gnu.org>
10171
10172 * src/bison.s1:
10173 Use malloc, if using alloca is troublesome.
10174 (YYSTACK_USE_ALLOCA): New flag macro.
10175 Define it for some systems and compilers.
10176 (YYSTACK_ALLOC): New macro.
10177 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10178 If it was malloc'd, free it.
10179
10180 1997-05-17 Richard Stallman <rms@gnu.org>
10181
10182 * bison.simple:
10183 Use malloc, if using alloca is troublesome.
10184 (YYSTACK_USE_ALLOCA): New flag macro.
10185 Define it for some systems and compilers.
10186 (YYSTACK_ALLOC): New macro.
10187 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10188 If it was malloc'd, free it.
10189
10190 1997-04-23 Richard Stallman <rms@gnu.org>
10191
10192 * src/bison.s1:
10193 (alloca) [__hpux]: Always define as __builtin_alloca.
10194
10195 1997-04-23 Richard Stallman <rms@gnu.org>
10196
10197 * bison.simple:
10198 (alloca) [__hpux]: Always define as __builtin_alloca.
10199
10200 1997-04-22 Richard Stallman <rms@gnu.org>
10201
10202 * src/bison.s1:
10203 [__hpux]: Include alloca.h (right for HPUX 10)
10204 instead of declaring alloca (right for HPUX 9).
10205
10206 * src/bison.s1 (__yy_memcpy):
10207 Declare arg `count' as unsigned int.
10208 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10209
10210 1997-04-22 Richard Stallman <rms@gnu.org>
10211
10212 * bison.simple:
10213 [__hpux]: Include alloca.h (right for HPUX 10)
10214 instead of declaring alloca (right for HPUX 9).
10215
10216 * bison.simple (__yy_memcpy):
10217 Declare arg `count' as unsigned int.
10218 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10219
10220 1997-01-03 Richard Stallman <rms@gnu.org>
10221
10222 * src/allocate.c: [__STDC__ or _MSC_VER]:
10223 Declare calloc and realloc to return void *.
10224
10225 1997-01-02 Richard Stallman <rms@gnu.org>
10226
10227 * src/system.h:
10228 [_MSC_VER]: Include stdlib.h and process.h.
10229 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10230
10231 * src/main.c (main): Return FAILURE as a value.
10232 (printable_version): Declare arg as int, not char.
10233
10234 1997-01-02 Richard Stallman <rms@gnu.org>
10235
10236 * Makefile.in (dist):
10237 Explicitly check for symlinks, and copy them.
10238
10239 1996-12-19 Richard Stallman <rms@gnu.org>
10240
10241 * src/files.c:
10242 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10243
10244 1996-12-18 Paul Eggert <eggert@gnu.org>
10245
10246 * src/bison.s1 (yyparse):
10247 If __GNUC__ and YYPARSE_PARAM are both defined,
10248 declare yyparse to have a void * argument.
10249
10250 1996-12-18 Paul Eggert <eggert@gnu.org>
10251
10252 * bison.simple (yyparse):
10253 If __GNUC__ and YYPARSE_PARAM are both defined,
10254 declare yyparse to have a void * argument.
10255
10256 1996-12-17 Richard Stallman <rms@gnu.org>
10257
10258 * src/reduce.c (nbits): Add some casts.
10259
10260 1996-08-12 Richard Stallman <rms@gnu.org>
10261
10262 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10263
10264 1996-08-12 Richard Stallman <rms@gnu.org>
10265
10266 * bison.simple: Test _MSDOS as well as _MSDOS_.
10267
10268 1996-07-31 Richard Stallman <rms@gnu.org>
10269
10270 * src/bison.s1:
10271 [__sun && __i386]: Include alloca.h.
10272
10273 1996-07-31 Richard Stallman <rms@gnu.org>
10274
10275 * bison.simple:
10276 [__sun && __i386]: Include alloca.h.
10277
10278 1996-07-30 Richard Stallman <rms@gnu.org>
10279
10280 * src/bison.s1: Comment change.
10281
10282 * src/bison.s1: Test _MSDOS_, not MSDOS.
10283
10284 1996-07-30 Richard Stallman <rms@gnu.org>
10285
10286 * bison.simple: Comment change.
10287
10288 * bison.simple: Test _MSDOS_, not MSDOS.
10289
10290 1996-06-01 Richard Stallman <rms@gnu.org>
10291
10292 * 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:
10293 Insert `_' macro around many string constants.
10294
10295 * src/main.c:
10296 Insert `_' macro around many string constants.
10297
10298 (main): Call setlocale, bindtextdomain and textdomain.
10299
10300 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10301 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10302 [ENABLE_NLS]: Include libintl.h.
10303 [ENABLE_NLS] (gettext): Define.
10304 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10305 (N_, PACKAGE, LOCALEDIR): New macros.
10306
10307 1996-06-01 Richard Stallman <rms@gnu.org>
10308
10309 * POTFILES.in: New file.
10310
10311 * Makefile.in (allocate.o):
10312 Define target explicitly.
10313
10314 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10315 (LDFLAGS): Set to @LDFLAGS@.
10316 (configure): Run autoconf only if preceding `cd' succeeds.
10317 (bison.s1): Redirect output to temporary file then move the
10318 temporary to the target, rather than redirecting directly to bison.s1.
10319 (clean): Remove config.status and config.log.
10320 (distclean): Don't remove config.status here.
10321
10322 1996-05-12 Richard Stallman <rms@gnu.org>
10323
10324 * src/bison.s1:
10325 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10326
10327 1996-05-12 Richard Stallman <rms@gnu.org>
10328
10329 * bison.simple:
10330 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10331
10332 1996-05-11 Richard Stallman <rms@gnu.org>
10333
10334 * src/bison.s1 (__yy_memcpy):
10335 Really reorder the args, as was supposedly done on Feb 14 1995.
10336 (yyparse): Calls changed accordingly.
10337
10338 1996-05-11 Richard Stallman <rms@gnu.org>
10339
10340 * Makefile.in (dist): Don't use $(srcdir).
10341
10342 * bison.simple (__yy_memcpy):
10343 Really reorder the args, as was supposedly done on Feb 14 1995.
10344 (yyparse): Calls changed accordingly.
10345
10346 1996-01-27 Richard Stallman <rms@gnu.org>
10347
10348 * src/output.c (output_rule_data):
10349 Test YYERROR_VERBOSE in the conditional
10350 around the definition of ttyname.
10351
10352 1995-12-29 Richard Stallman <rms@gnu.org>
10353
10354 * src/bison.s1:
10355 Fix line numbers in #line commands.
10356
10357 1995-12-29 Richard Stallman <rms@gnu.org>
10358
10359 * bison.simple:
10360 Fix line numbers in #line commands.
10361
10362 1995-12-27 Richard Stallman <rms@gnu.org>
10363
10364 * src/bison.s1 (YYPARSE_PARAM_DECL):
10365 In C++, make it always null.
10366 (YYPARSE_PARAM_ARG): New macro.
10367 (yyparse): Use YYPARSE_PARAM_ARG.
10368
10369 1995-12-27 Richard Stallman <rms@gnu.org>
10370
10371 * bison.simple (YYPARSE_PARAM_DECL):
10372 In C++, make it always null.
10373 (YYPARSE_PARAM_ARG): New macro.
10374 (yyparse): Use YYPARSE_PARAM_ARG.
10375
10376 1995-11-29 Richard Stallman <rms@gnu.org>
10377
10378 * doc/bison.texinfo:
10379 Describe literal string tokens, %raw, %no_lines, %token_table.
10380
10381 1995-11-29 Daniel Hagerty <hag@gnu.org>
10382
10383 * doc/bison.texinfo: Fixed update date
10384
10385 1995-10-16 Richard Stallman <rms@gnu.org>
10386
10387 * src/version.c: Version 1.25.
10388
10389 1995-10-16 Richard Stallman <rms@gnu.org>
10390
10391 * NEWS: *** empty log message ***
10392
10393 1995-10-16 Richard Stallman <rms@gnu.org>
10394
10395 * doc/bison.1, doc/bison.rnh:
10396 Add new options.
10397
10398 1995-10-15 Richard Stallman <rms@gnu.org>
10399
10400 * src/vmsgetargs.c, src/getargs.c:
10401 Added -n, -k, and -raw switches.
10402 (noparserflag, toknumflag, rawtoknumflag): New variables.
10403
10404 * src/symtab.h (SALIAS):
10405 New #define for adding aliases to %token.
10406 (struct bucket): Added `alias' field.
10407
10408 * src/reduce.c (reduce_grammar):
10409 Revise error message.
10410 (print_notices): Remove final `.' from error message.
10411
10412 * src/reader.c (reader_output_yylsp):
10413 New function.
10414 (readgram): Use `#if 0' around code that accepted %command
10415 inside grammar rules: The documentation doesn't allow it,
10416 and it will fail since the %command processors scan for the next %.
10417 (parse_token_decl): Extended the %token
10418 declaration to allow a multi-character symbol as an alias.
10419 (parse_thong_decl): New function.
10420 (read_declarations): Added %thong declarations.
10421 (read_declarations): Handle NOOP to deal with allowing
10422 % declarations as another means to specify the flags.
10423 (readgram): Allow %prec prior to semantics embedded in a rule.
10424 (skip_to_char, read_declarations, copy_definition)
10425 (parse_token_decl, parse_start_decl, parse_type_decl)
10426 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10427 (get_type_name, copy_guard, copy_action, readgram)
10428 (get_type, packsymbols): Revised most error messages.
10429 Changed `fatal' to `warnxxx' to avoid aborting for error.
10430 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10431 (read_declarations): Improve the error message for
10432 an invalid character. Do not abort.
10433 (read_declarations, copy_guard, copy_action): Use
10434 printable_version to avoid unprintable characters in printed output.
10435 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10436 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10437 Allow the type of a non-terminal can be given
10438 more than once, as long as all specifications give the same type.
10439
10440 * src/output.c:
10441 (output_headers, output_trailers, output, output_gram)
10442 (output_rule_data): Implement noparserflag variable.
10443 Implement toknumflag variable.
10444 (output): Call reader_output_yylsp to output LTYPESTR.
10445
10446 * src/main.c (main):
10447 If reader sees an error, don't process the grammar.
10448 (fatals): Updated to not use VARARGS1.
10449 (printable_version, int_to_string, warn, warni, warns, warnss)
10450 (warnsss): New error reporting functions. Avoid abort for error.
10451
10452 * src/lex.h:
10453 Added THONG and NOOP for alias processing.
10454 Added SETOPT for the new code that allows setting options with %flags.
10455
10456 * src/lex.c:
10457 Include getopt.h. Add some extern decls.
10458 (safegetc): New function to deal with EOF gracefully.
10459 (literalchar); new function to deal with reading \ escapes.
10460 (lex): Use literalchar.
10461 (lex): Implemented "..." tokens.
10462 (literalchar, lex, parse_percent_token): Made tokenbuffer
10463 always contain the token. This includes growing the token
10464 buffer while reading an integer.
10465 (parse_percent_token): Replaced if-else statement with percent_table.
10466 (parse_percent_token): Added % declarations as another
10467 way to specify the flags -n, -l, and -r. Also added hooks for
10468 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10469 major changes to files.c.
10470 (lex) Retain in the incoming stream a character following
10471 an incorrect '/'.
10472 (skip_white_space, lex): Revised most error messages
10473 and changed fatal to warn to avoid aborting.
10474 (percent_table): Added %thong declarations.
10475
10476 * src/gram.h: Comment changes.
10477
10478 * src/files.c (openfiles, open_extra_files, done):
10479 Add faction flag
10480 and actfile file. Handle noparserflag. Both for -n switch.
10481
10482 * src/conflicts.c (resolve_sr_conflict):
10483 Remove use of alloca.
10484
10485 1995-06-01 Jim Meyering <meyering@gnu.org>
10486
10487 * doc/bison.texinfo: *** empty log message ***
10488
10489 1995-05-06 Richard Stallman <rms@gnu.org>
10490
10491 * src/bison.s1: Comment change.
10492
10493 1995-05-06 Richard Stallman <rms@gnu.org>
10494
10495 * bison.simple: Comment change.
10496
10497 1995-05-03 Richard Stallman <rms@gnu.org>
10498
10499 * src/version.c: Version now 1.24.
10500
10501 * src/bison.s1: Change distribution terms.
10502
10503 * src/version.c: Version now 1.23.
10504
10505 1995-05-03 Richard Stallman <rms@gnu.org>
10506
10507 * doc/bison.texinfo:
10508 Rewrite "Conditions for Using Bison".
10509 Update version to 1.24.
10510
10511 1995-05-03 Richard Stallman <rms@gnu.org>
10512
10513 * bison.simple: Change distribution terms.
10514
10515 1995-02-23 Richard Stallman <rms@gnu.org>
10516
10517 * src/files.c: Test __VMS_POSIX as well as VMS.
10518
10519 1995-02-14 Jim Meyering <meyering@gnu.org>
10520
10521 * src/bison.s1 (__yy_memcpy):
10522 Renamed from __yy_bcopy to avoid
10523 confusion. Reverse FROM and TO arguments to be consistent with
10524 those of memcpy.
10525
10526 1995-02-14 Jim Meyering <meyering@gnu.org>
10527
10528 * bison.simple (__yy_memcpy):
10529 Renamed from __yy_bcopy to avoid
10530 confusion. Reverse FROM and TO arguments to be consistent with
10531 those of memcpy.
10532
10533 1994-11-10 David J. MacKenzie <djm@gnu.org>
10534
10535 * NEWS: reformat
10536
10537 * NEWS: New file.
10538
10539 * Makefile.in (DISTFILES): Include NEWS.
10540
10541 * Makefile.in (DISTFILES):
10542 Include install-sh, not install.sh.
10543
10544 * configure.in: Update to Autoconf v2 macro names.
10545
10546 1994-10-05 David J. MacKenzie <djm@gnu.org>
10547
10548 * Makefile.in: fix typo
10549
10550 * Makefile.in (prefix, exec_prefix):
10551 Let configure set them.
10552
10553 1994-09-28 David J. MacKenzie <djm@gnu.org>
10554
10555 * Makefile.in: Set datadir to $(prefix)/share.
10556
10557 1994-09-15 Richard Stallman <rms@gnu.org>
10558
10559 * src/bison.s1:
10560 Update copyright notice and GPL version.
10561
10562 1994-09-15 Richard Stallman <rms@gnu.org>
10563
10564 * bison.simple:
10565 Update copyright notice and GPL version.
10566
10567 1994-07-12 Richard Stallman <rms@gnu.org>
10568
10569 * src/reduce.c, src/reader.c:
10570 entered into RCS
10571
10572 1994-05-05 David J. MacKenzie <djm@gnu.org>
10573
10574 * Makefile.in: entered into RCS
10575
10576 1994-03-26 Richard Stallman <rms@gnu.org>
10577
10578 * src/bison.s1: entered into RCS
10579
10580 1994-03-26 Richard Stallman <rms@gnu.org>
10581
10582 * bison.simple: entered into RCS
10583
10584 1994-03-25 Richard Stallman <rms@gnu.org>
10585
10586 * src/main.c: entered into RCS
10587
10588 1994-03-24 Richard Stallman <rms@gnu.org>
10589
10590 * src/conflicts.c: entered into RCS
10591
10592 1994-01-02 Richard Stallman <rms@gnu.org>
10593
10594 * Makefile.in: *** empty log message ***
10595
10596 1993-11-21 Richard Stallman <rms@gnu.org>
10597
10598 * src/bison.s1: *** empty log message ***
10599
10600 1993-11-21 Richard Stallman <rms@gnu.org>
10601
10602 * doc/bison.texinfo: entered into RCS
10603
10604 * doc/bison.texinfo: *** empty log message ***
10605
10606 1993-11-21 Richard Stallman <rms@gnu.org>
10607
10608 * bison.simple: *** empty log message ***
10609
10610 1993-10-25 David J. MacKenzie <djm@gnu.org>
10611
10612 * doc/bison.texinfo: *** empty log message ***
10613
10614 1993-10-19 Richard Stallman <rms@gnu.org>
10615
10616 * src/bison.s1: *** empty log message ***
10617
10618 1993-10-19 Richard Stallman <rms@gnu.org>
10619
10620 * bison.simple: *** empty log message ***
10621
10622 1993-10-14 Richard Stallman <rms@gnu.org>
10623
10624 * src/bison.s1: *** empty log message ***
10625
10626 1993-10-14 Richard Stallman <rms@gnu.org>
10627
10628 * bison.simple: *** empty log message ***
10629
10630 1993-09-14 David J. MacKenzie <djm@gnu.org>
10631
10632 * doc/bison.texinfo: *** empty log message ***
10633
10634 1993-09-13 Noah Friedman <friedman@gnu.org>
10635
10636 * Makefile.in: *** empty log message ***
10637
10638 1993-09-10 Richard Stallman <rms@gnu.org>
10639
10640 * src/conflicts.c: *** empty log message ***
10641
10642 * src/system.h: entered into RCS
10643
10644 1993-09-10 Richard Stallman <rms@gnu.org>
10645
10646 * doc/bison.1: entered into RCS
10647
10648 1993-09-06 Noah Friedman <friedman@gnu.org>
10649
10650 * src/version.c: entered into RCS
10651
10652 1993-09-06 Noah Friedman <friedman@gnu.org>
10653
10654 * Makefile.in: *** empty log message ***
10655
10656 1993-07-30 David J. MacKenzie <djm@gnu.org>
10657
10658 * Makefile.in: *** empty log message ***
10659
10660 1993-07-24 Richard Stallman <rms@gnu.org>
10661
10662 * src/bison.s1: *** empty log message ***
10663
10664 1993-07-24 Richard Stallman <rms@gnu.org>
10665
10666 * bison.simple: *** empty log message ***
10667
10668 1993-07-08 David J. MacKenzie <djm@gnu.org>
10669
10670 * Makefile.in: *** empty log message ***
10671
10672 1993-07-04 Richard Stallman <rms@gnu.org>
10673
10674 * src/bison.s1: *** empty log message ***
10675
10676 1993-07-04 Richard Stallman <rms@gnu.org>
10677
10678 * bison.simple: *** empty log message ***
10679
10680 1993-06-26 David J. MacKenzie <djm@gnu.org>
10681
10682 * src/getargs.c: entered into RCS
10683
10684 1993-06-26 David J. MacKenzie <djm@gnu.org>
10685
10686 * doc/bison.texinfo: *** empty log message ***
10687
10688 * doc/bison.1: New file.
10689
10690 1993-06-25 Richard Stallman <rms@gnu.org>
10691
10692 * src/getargs.c: New file.
10693
10694 1993-06-16 Richard Stallman <rms@gnu.org>
10695
10696 * src/bison.s1: *** empty log message ***
10697
10698 1993-06-16 Richard Stallman <rms@gnu.org>
10699
10700 * bison.simple: *** empty log message ***
10701
10702 1993-06-03 Richard Stallman <rms@gnu.org>
10703
10704 * src/bison.s1: New file.
10705
10706 1993-06-03 Richard Stallman <rms@gnu.org>
10707
10708 * doc/bison.texinfo: *** empty log message ***
10709
10710 1993-06-03 Richard Stallman <rms@gnu.org>
10711
10712 * bison.simple: New file.
10713
10714 1993-05-19 Richard Stallman <rms@gnu.org>
10715
10716 * doc/bison.texinfo: New file.
10717
10718 1993-05-07 Noah Friedman <friedman@gnu.org>
10719
10720 * Makefile.in: *** empty log message ***
10721
10722 1993-04-28 Noah Friedman <friedman@gnu.org>
10723
10724 * src/reader.c: *** empty log message ***
10725
10726 1993-04-23 Noah Friedman <friedman@gnu.org>
10727
10728 * src/alloc.h: entered into RCS
10729
10730 1993-04-20 David J. MacKenzie <djm@gnu.org>
10731
10732 * src/version.c: *** empty log message ***
10733
10734 * src/files.c, src/allocate.c:
10735 entered into RCS
10736
10737 * src/reader.c: *** empty log message ***
10738
10739 * src/lex.c: entered into RCS
10740
10741 * src/conflicts.c: New file.
10742
10743 * src/symtab.c: entered into RCS
10744
10745 * src/alloc.h: New file.
10746
10747 * src/LR0.c: entered into RCS
10748
10749 1993-04-18 Noah Friedman <friedman@gnu.org>
10750
10751 * src/reader.c: New file.
10752
10753 * src/version.c: *** empty log message ***
10754
10755 1993-04-18 Noah Friedman <friedman@gnu.org>
10756
10757 * Makefile.in: *** empty log message ***
10758
10759 1993-04-17 Noah Friedman <friedman@gnu.org>
10760
10761 * Makefile.in: *** empty log message ***
10762
10763 1993-04-15 Richard Stallman <rms@gnu.org>
10764
10765 * src/main.c, src/files.c:
10766 New file.
10767
10768 1993-04-15 Noah Friedman <friedman@gnu.org>
10769
10770 * configure.in: entered into RCS
10771
10772 * configure.in: *** empty log message ***
10773
10774 * configure.in: New file.
10775
10776 1993-04-14 Richard Stallman <rms@gnu.org>
10777
10778 * Makefile.in: New file.
10779
10780 1993-04-13 Richard Stallman <rms@gnu.org>
10781
10782 * src/version.c: New file.
10783
10784 1993-03-25 Richard Stallman <rms@gnu.org>
10785
10786 * src/output.c: entered into RCS
10787
10788 1992-09-25 Richard Stallman <rms@gnu.org>
10789
10790 * configure.bat: entered into RCS
10791
10792 1992-06-22 Richard Stallman <rms@gnu.org>
10793
10794 * src/vmsgetargs.c: entered into RCS
10795
10796 1992-06-22 Richard Stallman <rms@gnu.org>
10797
10798 * doc/bison.rnh: entered into RCS
10799
10800 1992-04-20 David J. MacKenzie <djm@gnu.org>
10801
10802 * README: entered into RCS
10803
10804 1992-01-22 Richard Stallman <rms@gnu.org>
10805
10806 * src/machine.h: entered into RCS
10807
10808 1991-12-21 Richard Stallman <rms@gnu.org>
10809
10810 * src/lalr.c, src/closure.c:
10811 entered into RCS
10812
10813 1991-12-20 Richard Stallman <rms@gnu.org>
10814
10815 * src/state.h: entered into RCS
10816
10817 1991-12-18 Richard Stallman <rms@gnu.org>
10818
10819 * src/print.c, src/nullable.c, src/derives.c:
10820 entered into RCS
10821
10822 1991-11-03 David J. MacKenzie <djm@gnu.org>
10823
10824 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
10825 entered into RCS
10826
10827 1988-09-09 Richard Stallman <rms@gnu.org>
10828
10829 * src/bison.hairy: entered into RCS
10830
10831 1987-12-16 Richard Stallman <rms@gnu.org>
10832
10833 * REFERENCES: entered into RCS
10834
10835 -----
10836
10837 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
10838 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10839
10840 This file is part of Bison, the GNU Compiler Compiler.
10841
10842 Bison is free software; you can redistribute it and/or modify
10843 it under the terms of the GNU General Public License as published by
10844 the Free Software Foundation; either version 2, or (at your option)
10845 any later version.
10846
10847 Bison is distributed in the hope that it will be useful,
10848 but WITHOUT ANY WARRANTY; without even the implied warranty of
10849 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10850 GNU General Public License for more details.
10851
10852 You should have received a copy of the GNU General Public License
10853 along with Bison; see the file COPYING. If not, write to
10854 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
10855 Boston, MA 02111-1307, USA.