]> git.saurik.com Git - bison.git/blob - ChangeLog
Be a bit more systematic about using 'abort'.
[bison.git] / ChangeLog
1 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2
3 Be a bit more systematic about using 'abort'.
4 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
6 Put 'default: abort ();' before some other case, to satisfy older
7 pedantic compilers.
8 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
10 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
11 * src/conflicts.c (resolve_sr_conflict): Likewise.
12 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
13 (get_decision_str, get_orientation_str, get_node_alignment_str):
14 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
15 (get_linestyle_str, get_arrowstyle_str): Likewise.
16 * src/conflicts.c (resolve_sr_conflict):
17 Use a default case rather than one for the one remaining enum
18 value, to catch invalid enum values as well.
19 * src/lalr.c (set_goto_map, map_goto):
20 Prefer "assert (FOO);" to "if (!FOO) abort ();".
21 * src/nullable.c (nullable_compute, token_definitions_output):
22 Likewise.
23 * src/reader.c (packgram, reader): Likewise.
24 * src/state.c (transitions_to, state_new, state_reduction_find):
25 Likewise.
26 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
27 (symbol_pack): Likewise.
28 * src/tables.c (conflict_row, pack_vector): Likewise.
29 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
30 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
31 * src/system.h: Don't include <assert.h>.
32 (assert): New macro.
33
34 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
35 (Destructor Decl, Parser Function, Pure Calling):
36 Describe rules for braces inside C code more carefully.
37
38 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
39
40 Fix some porting glitches found by Nelson H. F. Beebe.
41 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
42 compilers that don't understand that abort () does not return.
43 * src/state.c (transitions_to): Likewise.
44 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
45 that '#include <cstdlib>' works.
46 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
47 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
48 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
49 for the benefit of some pre-C99 compilers.
50
51 * bootstrap: Undo changes to gnulib files that autoreconf made.
52
53 Minor fixups to get 'make maintainer-check' to work.
54 * configure.ac: Don't use -Wnested-externs, as it's incompatible
55 with the new verify.h implementation.
56 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
57 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
58 * data/yacc.c (YYUSE): Likewise.
59 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
60 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
61 * src/parse-gram.y (declaration): Don't pass a string constant
62 to a function that expects char *, since GCC might complain
63 about the constant value.
64 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
65 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
66 before #defining them.
67 * tests/glr-regression.at
68 (Incorrectly initialized location for empty right-hand side in GLR):
69 In yyerror, use the msg arg.
70 (Corrupted semantic options if user action cuts parse):
71 (Incorrect lookahead during deterministic GLR):
72 (Incorrect lookahead during nondeterministic GLR):
73 Don't name a local var 'index'; it shadows string.h's 'index'.
74
75 2006-01-19 Akim Demaille <akim@epita.fr>
76
77 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
78 location, not just parts of it.
79
80 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
81
82 * NEWS: Document the fact that multiple %unions are now allowed.
83 * doc/bison.texinfo (Union Decl): Likewise.
84 * TODO: This feature is now implemented, so remove it from
85 the wishlist.
86
87 * Makefile.maint: Merge with coreutils Makefile.maint.
88 (CVS_LIST): Use build-aux version if available.
89 (VERSION_REGEXP): New macro.
90 (syntax-check-rules): Add sc_no_if_have_config_h,
91 sc_prohibit_assert_without_use, sc_require_config_h,
92 sc_useless_cpp_parens.
93 (sc_obsolete_symbols): Check for O_NDELAY.
94 (sc_dd_max_sym_length): Track coreutils.
95 (sc_unmarked_diagnostics): Look in all files, not just *.c.
96 (sc_useless_cpp_parens): New rule.
97 (news-date-check): Look for version or today's date.
98 (changelog-check): Don't require version number near head.
99 (copyright-check): Use current year instead of hardwiring 2005.
100 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
101 (announcement): Add --gpg-key-ID.
102
103 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
104 with "file system".
105
106 Avoid undefined behavior that addressed just before the start of an
107 array. Problem reported by twlevo.
108 * src/reader.c (packgram): Prepend a new sentinel before ritem.
109 * src/lalr.c (build_relations): Rely on new sentinel.
110 * src/gram.c (gram_free): Adjust to new sentinel.
111
112 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
113
114 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
115 yylookaheadNeeds. All uses updated.
116 (yysplitStack): Rename local yynewLookaheadStatuses to
117 yynewLookaheadNeeds.
118 * data/glr-regression.at (Incorrect lookahead during nondeterministic
119 GLR): In comments, change `lookahead status' to `lookahead need'.
120
121 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
122
123 * data/glr.c (yysplitStack): A little stylistic rewrite.
124
125 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
126
127 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
128
129 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
130
131 * doc/bison.texinfo: Fix some typos.
132 (GLR Semantic Actions): New subsection discussing special
133 considerations because GLR semantic actions might be deferred.
134 (Actions): Mention look-ahead usage of yylval.
135 (Actions and Locations): Mention look-ahead usage of yylloc.
136 (Special Features for Use in Actions): Add YYEOF entry and mention it
137 in the yychar entry.
138 In the yychar entry, remove mention of the local yychar case (pure
139 parser) since this is irrelevant information when writing semantic
140 actions and since it's already discussed in `Bison Symbols' where
141 yychar is otherwise described as an external variable.
142 In the yychar entry, don't call it the `current' look-ahead since it
143 isn't when semantic actions are deferred.
144 In the yychar and yyclearin entries, add note about deferred semantic
145 actions.
146 Add yylloc and yylval entries discussing look-ahead usage.
147 (Look-Ahead Tokens): When discussing yychar, don't call it the
148 `current' look-ahead, and do mention yylval and yylloc.
149 (Error Recovery): Cross-reference `Action Features' when mentioning
150 yyclearin.
151 (Bison Symbols): In the yychar entry, don't call it the `current'
152 look-ahead.
153 In the yylloc and yylval entries, mention look-ahead usage.
154
155 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
156
157 * tests/glr-regression.at: Update copyright year to 2006.
158
159 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
160
161 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
162 use during nondeterministic operation to track which stacks have
163 actually needed the current lookahead.
164 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
165 Allocate, deallocate, resize, and otherwise shuffle space for
166 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
167 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
168 appropriately during nondeterministic operation.
169 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
170 members to store the current lookahead to be used by the deferred
171 user action.
172 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
173 from which the RHS is taken. Set the lookahead members of the new
174 yySemanticOption according to the lookahead status for stack yyk.
175 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
176 yyaddDeferredAction.
177 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
178 members of yySemanticOption before invoking yyuserAction, and then set
179 them back to their current values afterward.
180 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
181 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
182 * tests/glr-regression.at: Remove `.' from the ends of recent test case
183 titles for consistency.
184 (Leaked merged semantic value if user action cuts parse): In order to
185 suppress lint warnings, use arguments in merge function, and assign
186 char value < 128 in main.
187 (Incorrect lookahead during deterministic GLR): New test case.
188 (Incorrect lookahead during nondeterministic GLR): New test case.
189
190 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
191
192 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
193 !yyvaluep as signal that no semantic value is available to print.
194 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
195 to print a semantic value.
196
197 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
198
199 * tests/glr-regression.at: For consistency with my newer test cases,
200 don't thank myself.
201
202 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
203
204 * data/glr.c (yyresolveValue): When merging semantic options, if at
205 least one user action succeeds but a later one cuts the parse, then
206 destroy the semantic value before returning rather than leaking it.
207 (yyresolveStates): If a user action cuts the parse and thus
208 yyresolveValue fails, ignore the (unset) semantic value rather than
209 corrupting the yyGLRState, and empty the semantic options list since
210 the user actions should have called all necessary destructors.
211 Simplify code with YYCHK.
212 * tests/glr-regression.at (Corrupted semantic options if user action
213 cuts parse): New test case.
214 (Undesirable destructors if user action cuts parse): New test case.
215 Before applying any of this patch, this test case never actually failed
216 for me... but only because the corrupted semantic options usually
217 masked this bug.
218 (Leaked merged semantic value if user action cuts parse): New test
219 case.
220
221 2006-01-05 Akim Demaille <akim@epita.fr>
222
223 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
224
225 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
226
227 * data/c.m4 (b4_c_modern): New macro, with a new provision for
228 _MSC_VER. Problem reported by Cenzato Marco.
229 (b4_c_function_def): Use it.
230 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
231 b4_c_modern.
232 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
233 than rolling our own.
234
235 2006-01-04 Akim Demaille <akim@epita.fr>
236
237 Also warn about non-used mid-rule values.
238 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
239 member.
240 (symbol_list_new): Adjust.
241 * src/reader.c (symbol_typed_p): New.
242 (grammar_rule_check): Use it.
243 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
244 Check its rule.
245 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
246 Use it.
247 * tests/actions.at (Exotic Dollars): Adjust.
248
249 2006-01-04 Akim Demaille <akim@epita.fr>
250
251 * src/reader.c (grammar_midrule_action): If $$ is set in a
252 mid-rule, move the `used' bit to its lhs.
253 * tests/input.at (Unused values): New.
254 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
255
256 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
257
258 * doc/bison.texinfo (Bison Options): Say more accurately what
259 --yacc does.
260 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
261 about declarations in the grammar when in Yacc mode, as POSIX does
262 not require a diagnostic when the grammar uses extensions.
263
264 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
265
266 Warn about dubious constructions like "%token T T".
267 Reported by twlevo.
268 * src/symtab.h (struct symbol.declared): New member.
269 * src/symtab.c (symbol_new): Initialize it to false.
270 (symbol_class_set): New arg DECLARING, specifying whether
271 this is a declaration that we want to warn about, if there
272 is more than one of them. All uses changed.
273
274 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
275 Allow multiple %union directives, whose contents concatenate.
276 * src/parse-gram.y (grammar_declaration): Likewise.
277 Use muscle_code_grow, so that we don't need stype_line any more.
278 All uses changed.
279
280 * src/muscle_tab.c (muscle_grow): Fix comment.
281
282 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
283 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
284 Update copyright year to 2006.
285
286 2006-01-03 Akim Demaille <akim@epita.fr>
287
288 Have glr.cc pass (some of) the calc.at tests.
289 * data/glr.cc (b4_parse_param_orig): New.
290 (b4_parse_param): Improve its definition, and bound it more
291 clearly in the skeleton.
292 (b4_epilogue): Append, instead of prepending, in order to keep
293 #line consistency.
294 Simplify the generation of auxiliary functions: locations and
295 purity are mandated.
296 (b4_global_tokens_and_yystype): Honor it.
297 * data/location.cc (c++.m4): Don't include it.
298 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
299 and AT_SKEL_CC_IF.
300 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
301 AT_LALR1_CC_IF.
302 Be sure to initialize the first position's filename.
303 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
304 mandated anyway.
305 (AT_CHECK_CALC_GLR_CC): New.
306 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
307
308 2006-01-02 Akim Demaille <akim@epita.fr>
309
310 * src/output.c (output_skeleton): Don't hard wire the inclusion of
311 c.m4.
312 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
313 * data/glr.cc: Do not include stack.hh.
314
315 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
316
317 * data/glr.c: Reformat whitespace with tabs.
318 (b4_lpure_formals): Remove this unused m4 macro.
319 * tests/cxx-type.at: Reformat whitespace with tabs.
320 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
321 since it's a member. Rename type to isNterm for clarity.
322
323 2005-12-29 Akim <akim@sulaco.local>
324
325 Let glr.cc catch up with symbol_value_print.
326 * data/glr.cc (b4_yysymprint_generate): Replace by...
327 (b4_yy_symbol_print_generate): this.
328 (yy_symbol_print, yy_symbol_value_print): Declare them.
329
330 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
331
332 * src/location.h (boundary): Note that a line or column equal
333 to INT_MAX indicates an overflow.
334 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
335 (rule_length_overflow, increment_rule_length, add_column_width):
336 New functions.
337 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
338 (<SC_BRACED_CODE>"}"):
339 Use increment_rule_length rather than incrementing it by hand.
340 (adjust_location, handle_syncline): Diagnose overflow.
341 (handle_action_dollar, handle_action_at):
342 Fix bug with monstrosities like $-2147483648.
343 Remove now-unnecessary checks.
344 (scan_integer): Verify assumptions and remove now-unnecessary checks.
345 (convert_ucn_to_byte): Verify assumptions.
346 (handle_syncline): New arg LOC. All callers changed.
347 Don't store through a value derived from char const * pointer.
348
349 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
350 GCC warnings.
351
352 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
353
354 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
355 Remove unnecessary forward static decls.
356
357 2005-12-27 Akim Demaille <akim@epita.fr>
358
359 * src/reader.c (grammar_current_rule_check): Also check that $$
360 is used.
361 Take the rule to check as argument, hence rename as...
362 (grammar_rule_check): this.
363 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
364 Rename as...
365 (grammar_rule_begin, grammar_rule_end): these, for consistency.
366 (grammar_midrule_action, grammar_symbol_append): Now static.
367 * tests/torture.at (input): Don't rely on the default action
368 being always performed.
369 * tests/calc.at: "Set" $$ even when the action is "cut" with
370 YYERROR or other.
371 * tests/actions.at (Exotic Dollars): Instead of using unused
372 values, check that the warning is issued.
373
374 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
375
376 * NEWS: Improve wording for unused-value warnings.
377
378 2005-12-22 Akim Demaille <akim@epita.fr>
379
380 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
381 (b4_yysymprint_generate): Rename as...
382 (b4_yy_symbol_print_generate): this.
383 Generate yy_symbol_print instead of yysymprint.
384 Generate also yy_symbol_value_print, and use it.
385
386 2005-12-22 Akim Demaille <akim@epita.fr>
387
388 * NEWS: Warn about unused values.
389 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
390 a `used' member.
391 (symbol_list_n_get, symbol_list_n_used_set): New.
392 (symbol_list_n_type_name_get): Use symbol_list_n_get.
393 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
394 * src/reader.c (grammar_current_rule_check): Check that values are
395 used.
396 * src/symtab.c (symbol_print): Accept 0.
397 * tests/existing.at: Remove the type information.
398 Empty the actions.
399 Remove useless actions (beware of mid-rule actions: perl -000
400 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
401 * tests/actions.at (Exotic Dollars): Use unused values.
402 * tests/calc.at: Likewise.
403 * tests/glr-regression.at (No users destructors if stack 0 deleted):
404 Likewise.
405
406 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
407 rule_useful_p.
408
409 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
410
411 Undo 2005-12-01 tentative license wording change. The wording is
412 still being reviewed by the lawyers, and we don't want to wait for
413 them before publishing a test release. For now, revert to the
414 previous wording.
415 * NEWS: Undo 2005-12-01 change.
416 * data/glr.c: Revert to previous license wording.
417 * data/glr.cc: Likewise.
418 * data/lalr1.cc: Likewise.
419 * data/location.cc: Likewise.
420 * data/yacc.c: Likewise.
421
422 * NEWS: Reword %destructor vs YYABORT etc.
423 * data/glr.c: Use American spacing, for consistency.
424 * data/glr.cc: Likewise.
425 * data/lalr1.cc: Likewise.
426 * data/yacc.c: Likewise.
427 * data/yacc.c: Reformat comments slightly.
428 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
429 for consistency. Fix some spelling errors and reword recently-included
430 text slightly.
431 * tests/cxx-type.at: Cast results of malloc, for C++.
432
433 2005-12-21 Joel E. Denny <address@hidden>
434
435 * tests/cxx-type.at: Construct a tree, count the parents of shared
436 nodes, and free each node once and only once. Previously, the memory
437 for semantic values was leaked instead.
438
439 2005-12-21 Joel E. Denny <address@hidden>
440
441 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
442 (yylval, yylloc): If pure, #define to yystackp->yyval and
443 yystackp->yyloc similar to yychar and yynerrs.
444 (yyparse): If pure, remove local yylval and yylloc. Add local
445 yystackp to accommodate pure definitions of yylval and yylloc.
446 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
447 yylvalp and yyllocp to &yylval and &yylloc.
448 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
449 namespace. Previously, nerrs and char were missing, but lval and lloc
450 weren't necessary.
451 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
452 yylvalp and yyllocp parameters since, if pure, these are now always
453 accessible through yystackp. If not pure, they are still accessible
454 globally.
455 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
456 `if (YYID (N))' to pacify lint.
457
458 2005-12-21 Akim Demaille <akim@epita.fr>
459
460 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
461 destroy the RHS symbols of a rule.
462 * data/yacc.c (yylen): Initialize to 0.
463 Keep its value to the number of items to possibly shift.
464 In particular, a regular successful parse that ends on YYFINAL by
465 a (internal) YYACCEPT must not have yylen != 0.
466 (yyerrorlab, yyreturn): Pop the RHS.
467 Reorder a bit to emphasize the `shifting' bits of code.
468 (YYPOPSTACK): Now accept a number of items to pop.
469 * data/lalr1.cc: Likewise.
470 * data/glr.c: Formatting changes.
471 Use goto instead of fall through.
472 * doc/bison.texinfo (Destructor Decl): Complete.
473
474 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
475
476 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
477 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
478 * djgpp/config.bat: Replace every occurence of the file name
479 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
480 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
481 * djgpp/config.sed: Replace every occurence of the file name
482 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
483 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
484 * djgpp/djunpack.bat: DJGPP specific file.
485 * djgpp/fnchange.lst: DJGPP specific file.
486 * djgpp/README.in: Add new information about how to unpack the bison
487 source on MSDOS and other systems which have 8.3 file name restrictions
488 using djunpack.bat and fnchange.lst.
489
490 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
491
492 * bootstrap (build_cvs_prefix): Remove; unused.
493 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
494 when getting gnulib.
495
496 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
497
498 * data/glr.c: Reorder typedef declarations for structs to match order
499 of struct declarations.
500 Rename yystack everywhere to yystackp except in yyparse where it's not
501 a pointer.
502 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
503 consistency.
504 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
505 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
506 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
507 lint.
508
509 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
510
511 * tests/sets.at (Accept): Fix typos in regular expression used to
512 sed out the final state number.
513
514 Work around portability problem on Solaris 10: flex-generated
515 files include <stdio.h> before <config.h>, which messes up
516 because the latter defines __EXTENSIONS__. Address the problem
517 by creating two new little files that include <config.h> first,
518 then include the flex-generated files. Rewrite everyone else
519 to include <config.h> first, as well.
520 * lib/timevar.c: Always include "config.h".
521 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
522 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
523 (EXTRA_bison_SOURCES): New macro.
524 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
525 * src/system.h: Don't include config.h.
526 * src/LR0.c: Include <config.h> first.
527 * src/assoc.c: Likewise.
528 * src/closure.c: Likewise.
529 * src/complain.c: Likewise.
530 * src/conflicts.c: Likewise.
531 * src/derives.c: Likewise.
532 * src/files.c: Likewise.
533 * src/getargs.c: Likewise.
534 * src/gram.c: Likewise.
535 * src/lalr.c: Likewise.
536 * src/location.c: Likewise.
537 * src/main.c: Likewise.
538 * src/muscle_tab.c: Likewise.
539 * src/nullable.c: Likewise.
540 * src/output.c: Likewise.
541 * src/parse-gram.y: Likewise.
542 * src/print.c: Likewise.
543 * src/print_graph.c: Likewise.
544 * src/reader.c: Likewise.
545 * src/reduce.c: Likewise.
546 * src/relation.c: Likewise.
547 * src/state.c: Likewise.
548 * src/symlist.c: Likewise.
549 * src/symtab.c: Likewise.
550 * src/tables.c: Likewise.
551 * src/uniqstr.c: Likewise.
552 * src/vcg.c: Likewise.
553
554 * src/parse-gram.y: Fix minor problems uncovered by lint.
555 (current_lhs, current_lhs_location): Now static.
556 (current_assoc): Remove unused variable.
557
558 Cleanups so that Bison-generated parsers have less lint.
559 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
560 Prepend /*ARGSUSED*/, for lint's sake.
561 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
562 definition if 'lint' is defined.
563 (YYID): New macro (or function, if lint).
564 All uses of /*CONSTCOND*/0 replaced by YYID(0).
565 * data/yacc.c: Likewise.
566 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
567 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
568 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
569 is C++ only.
570 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
571 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
572 Use YYID(0) rather than 0, for lint.
573 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
574 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
575
576 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
577
578 * tests/glr-regression.at
579 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
580 Close memory leak reported by twlevo.
581
582 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
583
584 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
585 all stacks.
586 (yyparse): Iterate another stack in order to call user destructors.
587 * tests/glr-regression.at (No users destructors if stack 0 deleted):
588 New test case.
589 (Duplicated user destructor for lookahead): This test now is expected
590 to succeed.
591
592 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
593
594 * NEWS: Document the following change.
595 * data/yacc.c: Say "parser skeleton" rather than "file", since
596 it's no longer just a file.
597 * data/glr.c: Grant a special exception for C GLR parsers, that
598 reads like the already-existing exception for C LALR(1) parsers.
599 * data/glr.cc: Likewise.
600 * data/lalr1.cc: Likewise.
601 * data/location.cc: Likewise.
602 * data/yacc.c: Reword the "written by" statement to clarify that
603 it was the parser skeleton, not the entire output file.
604 * data/glr.c: Written by Paul Hilfinger.
605 * data/glr.cc: Written by Akim Demaille.
606 * data/lalr1.cc: Likewise.
607
608 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
609
610 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
611 Fix typos in previous change that broke 'make check'.
612 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
613 supported in C.
614 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
615 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
616 We can revert this once things settle down.
617
618 * src/conflicts.c (conflicts_print): Don't print file name twice
619 when %expect fails because there were no conflicts.
620 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
621 change.
622 * tests/conflicts.at (%expect not enough, %expect too much):
623 (%expect with reduce conflicts): Adjust to new behavior.
624
625 2005-11-18 Akim Demaille <akim@epita.fr>
626
627 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
628 errors.
629 * NEWS: Document this.
630 * doc/bison.texinfo (Expect Decl): Likewise.
631
632 2005-11-16 Akim Demaille <akim@epita.fr>
633
634 Generalize the display of semantic values and locations in traces.
635 * data/glr.c (yy_reduce_print): Fix indices (again).
636 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
637 literal integers.
638 * data/lalr1.cc (yyreduce_print): Rename as...
639 (yy_reduce_print): this.
640 Display values and locations.
641 * data/yacc.c (yy_reduce_print): Likewise.
642 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
643 (yysymprint): Move higher to be visible from yy_reduce_print).
644 (yyparse): Adjust.
645 * tests/calc.at: Adjust the expected length of the traces.
646
647 2005-11-14 Akim Demaille <akim@epita.fr>
648
649 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
650 from 1 to N, while values and location start at 0.
651 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
652
653 2005-11-14 Akim Demaille <akim@epita.fr>
654
655 * data/glr.c (yy_reduce_print): Fix the $ number.
656
657 2005-11-14 Akim Demaille <akim@epita.fr>
658
659 "Use" parse parameters.
660 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
661 * data/glr.c, data/glr.cc: Use them.
662 * data/glr.c (YYUSE): Have a C++ definition that supports
663 non-pointer types.
664
665 2005-11-14 Akim Demaille <akim@epita.fr>
666
667 * data/glr.c (yyexpandGLRStack): Declare only if defined.
668
669 2005-11-14 Akim Demaille <akim@epita.fr>
670
671 * data/glr.cc: New.
672 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
673
674 2005-11-12 Akim Demaille <akim@epita.fr>
675
676 Let position and location be PODs.
677 * data/location.cc (position::initialize, location::initialize): New.
678 (position::position, location::location): Define only if
679 b4_location_constructors is defined.
680 * data/lalr1.cc (b4_location_constructors): Define it for backward
681 compatibility.
682 * doc/bison.texinfo (Initial Action Decl): Use initialize.
683
684 2005-11-12 Akim Demaille <akim@epita.fr>
685
686 * data/lalr1.cc: Move the body of the ctor and dtor into the
687 parser file (instead of the header).
688 Wrap the implementations in a "namespace yy".
689
690 2005-11-12 Akim Demaille <akim@epita.fr>
691
692 Have glr.c include its header file when created.
693 * data/glr.c (b4_shared_declarations): New.
694 Output them verbatim in the parser if !%defines, otherwise
695 output then in the header file, and include it instead.
696
697 2005-11-11 Akim Demaille <akim@epita.fr>
698
699 * data/glr.c: Comment changes.
700
701 2005-11-11 Akim Demaille <akim@epita.fr>
702
703 When yydebug, report semantic and location values for reductions.
704 * data/glr.c (yy_reduce_print): Report the semantic values and the
705 locations.
706 (YY_REDUCE_PRINT): Adjust.
707 (yyglrReduce): Use them.
708 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
709 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
710 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
711 traces.
712
713 2005-11-10 Akim Demaille <akim@epita.fr>
714
715 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
716 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
717 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
718
719 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
720
721 * m4/cxx.m4, examples/Makefile.am: Don't build
722 examples/calc++ if no C++ compiler is available. (trivial change)
723
724 2005-11-09 Akim Demaille <akim@epita.fr>
725
726 * src/scan-skel.l: Use a couple of asserts.
727
728 2005-11-03 Akim Demaille <akim@epita.fr>
729
730 In some (weird) cases, the final state number is incorrect.
731 Reported by Alexandre Duret-Lutz.
732 * src/LR0.c (state_list_append): Remove the computation of
733 final_state.
734 (save_reductions): Do it here.
735 (get_state): Alpha conversion.
736 (generate_states): Use a for loop.
737 * src/gram.h (item_number_is_rule_number)
738 (item_number_is_symbol_number): New.
739 * src/state.c: Use assert.
740 * src/system.h: Include assert.h.
741 * tests/sets.at (Accept): New.
742
743 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
744
745 * data/glr.c (yyfill): Adjust comment.
746 (yyresolveAction): Initialize default location properly
747 for empty right-hand sides.
748 (yydoAction): Ditto.
749 Add comment explaining apparently dead code.
750 * tests/glr-regression.at
751 (Incorrectly initialized location for empty right-hand side in GLR):
752 New test.
753
754 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
755
756 * bootstrap (cleanup_gnulib): New function. Use it to clean up
757 gnulib when interrupted. This fixes some race conditions and
758 works around some portability problems (one noted by Paul
759 Hilfinger).
760
761 2005-10-22 Akim <akim@epita.fr>
762
763 * Makefile.cfg: Adjust to config -> build-aux.
764 Reported by twledo.
765
766 2005-10-21 Akim Demaille <akim@epita.fr>
767
768 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
769 the %parse-params.
770 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
771 * data/yacc.c (b4_Pure_if): Rename as...
772 (b4_yacc_pure_if): this.
773 (YY_SYMBOL_PRINT, yyparse): Adjust.
774 * doc/bison.texinfo: Formatting changes.
775
776 2005-10-21 Akim Demaille <akim@epita.fr>
777
778 Finish the transition config -> build-aux.
779 * configure.ac, Makefile.am: Use build-aux.
780 * config/prev-version, config/announce-gen, config/Makefile.am:
781 Move to...
782 * build-aux/prev-version, build-aux/announce-gen,
783 * build-aux/Makefile.am: here.
784
785 2005-10-14 Akim Demaille <akim@epita.fr>
786
787 * examples/calc++/test: Use set -x only when VERBOSE.
788
789 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
790
791 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
792 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
793
794 2005-10-13 Akim Demaille <akim@epita.fr>
795
796 * src/scan-skel.l: Output the base name parts of the parser and
797 header file names.
798 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
799 additional checks.
800 Use this to exercise C++ outputs in subdirs.
801 Reported by Oleg Smolsky.
802
803 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
804
805 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
806 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
807 Problem reported by John P. Hartmann.
808 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
809 already defined it.
810
811 2005-10-12 Akim Demaille <akim@epita.fr>
812
813 * src/parse-gram.y (version_check): Exit 63 to please missing
814 (stands for "version mismatch).
815 * tests/input.at, doc/bison.texinfo: Adjust.
816
817 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
818
819 Work around portability problems with Visual Age C compiler
820 (xlc and xlC_r) reported by John P. Hartmann.
821 * data/location.cc (initial_column, initial_line): Remove.
822 All uses replaced by 0 and 1.
823 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
824 that xlc complains about.
825 * src/scan-skel.l (skel_wrap): Likewise.
826 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
827 as __STDC__.
828 * data/yacc.c (YYMODERN_C): New macro, which also looks at
829 __STDC_VERSION__. Use it everywhere instead of looking at
830 __STDC__ and __cplusplus.
831
832 2005-10-10 Akim Demaille <akim@epita.fr>
833
834 * examples/calc++/test: Be quiet unless VERBOSE.
835
836 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
837
838 * data/c.m4 (yydestruct, yysymprint):
839 Use YYUSE instead of casting to void.
840 * data/glr.c (YYUSE): New macro.
841 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
842 Use it instead of rolling our own.
843 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
844 (YYCHK1):
845 Use /*CONSTCOND*/ to suppress lint warnings.
846 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
847 (YY_STACK_PRINT): Use 'false' not '0'.
848 (YYUSE): New macro.
849 (yysymprint_, yydestruct_): Use it instead of rolling our own.
850 * data/yacc.c (YYUSE): New macro.
851 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
852 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
853 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
854
855
856 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
857 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
858
859 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
860
861 Undo the parts of the unlocked-I/O change that substituted
862 putc or puts for printf. This might hurt performance a bit,
863 but some people prefer the printf style.
864 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
865 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
866 All uses replaced by YYFPRINTF and YYDPRINTF.
867 * data/yacc.c: Likewise.
868 * lib/bitset.c (bitset_print): Likewise.
869 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
870 putc and puts.
871 * lib/lbitset.c (debug_lbitset): Likewise.
872 * src/closure.c (print_firsts, print_fderives): Likewise.
873 * src/gram.c (grammar_dump): Likewise.
874 * src/lalr.c (look_ahead_tokens_print): Likewise.
875 * src/output.c (escaped_output): Likewise.
876 (user_actions_output): Break apart two printfs.
877 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
878 * src/reduce.c (reduce_print): Likewise.
879 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
880 * src/system.h: Include unlocked-io.h rathe than stdio.h.
881
882 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
883 Use assignments rather than casts-to-void to suppress
884 unused-variable warnings. This pacifies 'lint'.
885 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
886 unused-variable warnings.
887
888 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
889
890 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
891
892 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
893
894 Use unlocked I/O for a minor performance improvement on hosts like
895 GNU/Linux and Solaris that support unlocked I/O. The basic idea
896 is to use the gnlib unlocked-io module, and to prefer putc and
897 puts to printf when either will work (since the latter doesn't
898 come in an unlocked flavor).
899 * bootstrap (gnulib_modules): Add unlocked-io.
900 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
901 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
902 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
903 and similarly for puts and putc and printf.
904 * data/yacc.c: Likewise.
905 * lib/bitset.c (bitset_print): Likewise.
906 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
907 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
908 to printf.
909 * lib/lbitset.c (debug_lbitset): Likewise.
910 * src/closure.c (print_firsts, print_fderives): Likewise.
911 * src/gram.c (grammar_dump): Likewise.
912 * src/lalr.c (look_ahead_tokens_print): Likewise.
913 * src/output.c (escaped_output): Likewise.
914 (user_actions_output): Coalesce two printfs.
915 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
916 * src/reduce.c (reduce_print): Likewise.
917 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
918 * src/system.h: Include unlocked-io.h rather than stdio.h.
919
920 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
921 this confuses xgettext.
922
923 2005-10-02 Akim Demaille <akim@epita.fr>
924
925 * bootstrap (gnulib_modules): Add strverscmp.
926 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
927 * m4/.cvsignore: Add strverscmp.m4.
928 * src/parse-gram.y (%require): New token, new rule.
929 (version_check): New.
930 * src/scan-gram.l (%require): Adjust.
931 * tests/input.at (AT_REQUIRE): New.
932 Use it.
933 * doc/bison.texinfo (Require Decl): New.
934 (Calc++ Parser): Use %require.
935
936 2005-10-02 Akim Demaille <akim@epita.fr>
937
938 * data/location.cc: New.
939
940 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
941 Akim Demaille <akim@epita.fr>
942
943 Make sure -odir/foo.cc creates dir/location.hh etc.
944 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
945 (spec_file_prefix, spec_verbose_file, spec_graph_file)
946 (spec_defines_file): Now const.
947 (dir_prefix): New.
948 (short_base_name): Remove.
949 * src/files.c: Adjust.
950 (dirname.h): Include.
951 (base_name): Don't prototype it.
952 (finput): Remove, duplicates gram_in.
953 (full_base_name, short_base_name): Replace by...
954 (all_but_ext, all_but_tab_ext): these.
955 (compute_base_names): Rename as...
956 (compute_file_name_parts): this.
957 Update to compute the new variables, including dir_prefix.
958 Adjust dependencies.
959 * src/output.c (prepare): Output them.
960 * src/reader.c: Adjust to use gram_in, not finput.
961 * src/scan-skel.l (@dir_prefix@): New.
962
963 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
964
965 * lib/subpipe.c: New function end_of_output_subpipe() added
966 to allow support for non-posix systems. This is a no-op function
967 for posix systems.
968
969 * lib/subpipe.h: New function end_of_output_subpipe() added
970 to allow support for non-posix systems. This is a no-op function
971 for posix systems.
972
973 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
974 handle the lack of pipe/fork functionality on non-posix systems.
975
976 * djgpp/Makefile.maint: DJGPP specific file.
977
978 * djgpp/README.in: DJGPP specific file.
979
980 * djgpp/config.bat: DJGPP specific configuration file.
981
982 * djgpp/config.sed: DJGPP specific configuration file.
983
984 * djgpp/config.site: DJGPP specific configuration file.
985
986 * djgpp/config_h.sed: DJGPP specific configuration file.
987
988 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
989
990 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
991
992 2005-10-02 Akim Demaille <akim@epita.fr>
993
994 * data/location.cc: New, extract from...
995 * data/lalr1.cc: here.
996 (location.hh): Include it after the user prologue, in case the
997 filename type is defined by the user.
998 Forward declation location and position before the pre-prologue.
999 (yyresult_): Rename as...
1000 (yyresult): this, it's a local variable, not an attribute.
1001 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
1002
1003 2005-10-01 Akim Demaille <akim@epita.fr>
1004
1005 * examples/extexi: Restore the #line generation.
1006
1007 2005-09-30 Akim Demaille <akim@epita.fr>,
1008 Alexandre Duret-Lutz <adl@gnu.org>
1009
1010 Move the token type and YYSTYPE in the parser class.
1011 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
1012 (parser::token): New, from the moved free definition of tokens.
1013 (parser::semantic_value): Now a full definition instead of an
1014 indirection to YYSTYPE.
1015 (b4_post_prologue): No longer included in the header file, but
1016 in the implementation file.
1017 * doc/bison.texi (C+ Language Interface): Update.
1018 * src/parse-gram.y: Support unary %define.
1019 * tests/actions.at: Define global_tokens_and_yystype for backward
1020 compatibility until we update the tests.
1021 * tests/calc.at: Idem.
1022 (first_line, first_column, last_line, last_column): Define for lalr1.cc
1023 to simplify the code.
1024
1025 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
1026
1027 Port to SunOS 4.1.4, which lacks strtoul and strerror.
1028 Ah, the good old days! Problem reported by Peter Klein.
1029 * bootstrap (gnulib_modules): Add strerror, strtoul.
1030 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
1031 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
1032
1033 2005-09-29 Akim Demaille <akim@epita.fr>
1034
1035 * data/c.m4 (b4_error_verbose_if): New.
1036 * data/lalr1.cc: Use it.
1037 (YYERROR_VERBOSE_IF): Remove.
1038 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
1039 parser members, replaced by...
1040 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
1041 local variables.
1042 (yysyntax_error_): Takes the state number as argument.
1043 (yyreduce_print_): Use the argument yyrule, not the former
1044 attribute yyn_.
1045
1046 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
1047
1048 * bootstrap (gnulib_modules): Add verify.
1049 * lib/.cvsignore: Add verify.h.
1050 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
1051 * src/system.h (verify): Remove.
1052 Include verify.h instead.
1053 * src/tables.c (tables_generate): Use new API for 'verify'.
1054
1055 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
1056
1057 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
1058 local variables whose names begin with 'yy'.
1059 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1060 Trivial changes from Joel E. Denny.
1061
1062 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
1063 it itself.
1064 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
1065 don't use alloca any more.
1066
1067 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
1068 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
1069 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
1070 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
1071 to match yacc.c, to test more hosts.
1072
1073 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
1074
1075 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
1076 doesn't affect behavior.
1077 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
1078 Solaris, AIX, MSC.
1079 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
1080 This works a bit better with glibc, if user code has already included
1081 stdlib.h.
1082 * doc/bison.texinfo (Bison Parser): Document that users can't
1083 arbitrarily use malloc and free for other purposes. Document
1084 that <alloca.h> and <malloc.h> might be included.
1085 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
1086 user must declare alloca.
1087
1088 * HACKING (release): Forwarn the Translation Project about
1089 stable releses.
1090
1091 2005-09-20 Akim Demaille <akim@epita.fr>
1092
1093 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
1094
1095 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
1096
1097 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
1098 (YYSTACK_ALLOC_MAXIMUM): Use it.
1099 (yysyntax_error): New function.
1100 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
1101 multiple syntax errors are reported, and alloca is being used.
1102 Instead, reallocate buffers twice as big each time, so that
1103 we waste at most half the allocated memory. Start with a small
1104 (128-byte) buffer that will suffice in most cases anyway.
1105 Use yysyntax_error to do most of the work.
1106
1107 * doc/bison.texinfo (Error Reporting, Table of Symbols):
1108 yynerrs is the number of errors reported, not the number of
1109 errors encountered.
1110
1111 * tests/glr-regression.at (Duplicated user destructor for lookahead):
1112 Mark it as expected to fail.
1113 Cast result of malloc; problem reported by twlevo@xs4all.nl.
1114 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
1115 Don't start user-code symbols with "yy", to avoid name space problems.
1116
1117 2005-09-19 Akim Demaille <akim@epita.fr>
1118
1119 Remove the traits, failed experiment.
1120 It never proved useful, and anyway because of the current
1121 definition, it was not possible to have several specialization of
1122 this traits, making it useless.
1123 * data/lalr1.cc (yy:traits): Remove.
1124 Inline its definitions in the parser class.
1125
1126 2005-09-19 Akim Demaille <akim@epita.fr>
1127
1128 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
1129 least Mac OSX with a /usr/local install of gettext.
1130
1131 2005-09-19 Akim Demaille <akim@epita.fr>
1132
1133 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
1134 and yytoken for similarity with the other skeletons.
1135
1136 2005-09-19 Akim Demaille <akim@epita.fr>
1137
1138 * NEWS, configure.ac: Version 2.1a.
1139
1140 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1141
1142 * NEWS: Version 2.1.
1143
1144 * NEWS: Remove notice of yytname change, since it was never in an
1145 official release.
1146 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
1147 diagnostic.
1148 * src/output.c (prepare): Likewise.
1149 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
1150 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
1151 is not defined. This is an awful hack, but it's enough for now.
1152 All callers changed.
1153 * tests/glr-regression-at (make_value): Args are const pointers now,
1154 to avoid GCC warning.
1155 (Duplicated user destructor for lookahead): New test. Currently
1156 skipped. It fails on my host but I'm not sure it'll always fail.
1157
1158 2005-09-16 Akim Demaille <akim@epita.fr>
1159
1160 * src/symtab.h (struct symbol): Declare the printer and destructor
1161 as const, to avoid accidental calls to free.
1162 (symbol_destructor_set, symbol_printer_set): Adjust.
1163 * src/symtab.c: Adjust.
1164
1165 2005-09-16 Akim Demaille <akim@epita.fr>
1166
1167 * data/c.m4 (b4_token_enums): New.
1168 (b4_token_defines): Rename as...
1169 (b4_token_enums_defines): this.
1170 (b4_token_defines): New, output only the #defines.
1171 * data/yacc.c, data/glr.c: Adjust.
1172 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
1173 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
1174 as default values.
1175
1176 2005-09-16 Akim Demaille <akim@epita.fr>
1177
1178 * data/lalr1.cc (yylex_): Remove, inline its code.
1179 (yyreport_syntax_error_): Remove, replaced by...
1180 (yysyntax_error_): this which returns a string and leaves to the
1181 caller the call to the users' error function.
1182 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
1183 Move from members of the parser object...
1184 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
1185 to local variables of the parse function.
1186
1187 2005-09-16 Akim Demaille <akim@epita.fr>
1188
1189 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
1190 since it's in Bison's name space.
1191
1192 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
1193
1194 * data/glr.c (yyresolveValue): Add default case to pacify
1195 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
1196
1197 * NEWS: Document when yyparse started to return 2.
1198 * doc/bison.texinfo (Parser Function): Document when yyparse
1199 returns 2.
1200
1201 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
1202 (b4_filename_type): Renamed back from b4_file_name_type. All uses
1203 changed.
1204 (class position): file_name -> filename (reverting). All uses changed.
1205
1206 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
1207
1208 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
1209 do anything if $@ exists. This reverts part of the 2005-07-07
1210 patch.
1211
1212 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
1213
1214 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
1215 contains obsolete information and isn't worth distributing as a
1216 separate file anyway.
1217 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
1218 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
1219 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
1220 (yyparse): Abort if user code uses longjmp to throw an unexpected
1221 value.
1222
1223 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
1224
1225 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
1226 Suggested by twlevo@xs4all.nl.
1227
1228 * data/glr.c (YYCHK1): Do not assume YYE is in range.
1229 This avoids a diagnostic from gcc -Wswitch-enum.
1230 Problem reported by twlevo@xs4all.nl.
1231
1232 * doc/bison.texinfo: Don't use "filename", as per GNU coding
1233 standards. Use "file name" or "file" or "name", depending on
1234 the context.
1235 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
1236 not to hack/foo.tab.c.
1237 (Calc++ Top Level): 2nd arg of main is not const.
1238 * data/glr.c: b4_filename -> b4_file_name.
1239 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
1240 All uses changed.
1241 (class position): filename -> file_name. All uses changed.
1242 * data/yacc.c: b4_filename -> b4_file_name.
1243 * lib/bitset.h: filename -> file_name in local vars.
1244 * lib/bitset_stats.c: Likewise.
1245 * src/files.c: Likewise.
1246 * src/scan-skel.l ("@output ".*\n): Likewise.
1247 * src/files.c (file_name_split): Renamed from filename_split.
1248 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
1249
1250 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
1251
1252 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
1253 to accommodate latest gnulib.
1254
1255 * tests/glr-regression.at (Duplicate representation of merged trees):
1256 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
1257
1258 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
1259 needed.
1260
1261 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
1262
1263 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
1264 All uses changed. Invoke user destructor after an error during a
1265 split parse (trivial change from Joel E. Denny).
1266
1267 * tests/glr-regression.at
1268 (User destructor after an error during a split parse): New test case.
1269 Problem reported by Joel E. Denny in:
1270 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
1271
1272 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
1273
1274 * README-cvs: Give URLs for recommended tools.
1275 Mention Gzip version problem, and bootstrapping issues.
1276 Remove troubleshooting section, as it's somewhat obsolete.
1277
1278 * bootstrap (no_cache): New var, to accommodate different wget
1279 variants. Use it instead of '-C off'. Problem reported by
1280 twlevo@xs4all.nl.
1281
1282 * data/glr.c (yydestroyStackItem): New function.
1283 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
1284 debugging information. Problem reported by Joel E. Denny.
1285
1286 2005-08-25 Akim Demaille <akim@epita.fr>
1287
1288 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
1289
1290 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
1291
1292 * data/glr.c (yyrecoverSyntaxError, yyreturn):
1293 Don't invoke destructor on unresolved entries.
1294 * tests/glr-regression.at
1295 (User destructor for unresolved GLR semantic value): New test case.
1296 Problem reported by Joel E. Denny in:
1297 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
1298
1299 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
1300
1301 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
1302 Add strnlen.c.
1303 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
1304 lib-prefix.m4, po.m4.
1305
1306 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
1307 in yydestruct diagnostic, since it might not be an error.
1308 Problem reported by Joel Denny near end of
1309 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1310 * data/lalr1.cc (yyerturn): Likewise.
1311 * data/yacc.c (yyreturn): Likewise.
1312 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
1313
1314 * src/files.c: Remove obsolete FIXME comment.
1315
1316 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
1317 with the other templates, and to fix bogus run-on messages such
1318 as the one reported at the end of
1319 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1320 All callers changed to avoid the newline.
1321 (yyprocessOneStack): Output two lines rather than one, to accommodate
1322 the above change. This changes the debug output format slightly.
1323
1324 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
1325 reported by Joel E. Denny in
1326 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
1327 (trivial change).
1328 * tests/glr-regression.at (Duplicate representation of merged trees):
1329 New test, from Joel E. Denny in:
1330 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
1331 * THANKS: Add Joel E. Denny.
1332
1333 * configure.ac (AC_INIT): Bump to 2.0c.
1334
1335 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
1336
1337 * NEWS: Version 2.0b.
1338
1339 * Makefile.am (SUBDIRS): Put examples before tests, so that
1340 "make check" doesn't finish with "All 1 tests passed".
1341
1342 * tests/regression.at (Token definitions): Don't rely on
1343 AT_PARSER_CHECK for data that contains backslashes. It currently
1344 uses 'echo', and 'echo' isn't portable if its argument contains
1345 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
1346 that the byte '\0xff' is not printable in the C locale; it is,
1347 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
1348 not printable, so use '\0x81' to test.
1349
1350 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
1351 version of GCC, since the macro is used with non-GCC compilers.
1352
1353 Fix core dump reported by Pablo De Napoli in
1354 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
1355 * tests/regression.at (Invalid inputs with {}): New test.
1356 * src/parse-gram.y (token_name): Translate type before using
1357 it as an index.
1358
1359 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
1360 the user's name space. All uses changed to __attribute__
1361 ((__unused__)).
1362 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
1363 Add __attribute__ ((__noreturn__)).
1364
1365 * etc/clcommit: Remove. We weren't using it, and it failed
1366 "make maintainer-distcheck".
1367 * Makefile.maint: Merge from coreutils.
1368 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
1369 (syntax-check-rules): Change list of rules as described below.
1370 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
1371 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
1372 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
1373 (sc_trailing_space): New rules.
1374 (sc_xalloc_h_in_src): Remove.
1375 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
1376 (sc_space_tab, sc_error_exit_success, sc_changelog):
1377 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
1378 (makefile-check, po-check, author_mark_check):
1379 (makefile_path_separator_check, copyright-check):
1380 Use grep -n, to make it easier to find violations.
1381 Use CVS_LIST and CVS_LIST_EXCEPT.
1382 (header_regexp, h_re): Remove.
1383 (dd_c): New macro.
1384 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
1385 (my-distcheck): Use more-modern GCC flags.
1386 (signatures, %.asc): Remove.
1387 (rel-files, announcement): Remove signatures.
1388 Restore old updating code, even though we don't use it, so
1389 that we're the same as coreutils.
1390 (alpha, beta, major): Depend on news-date-check.
1391 Make the upload commands.
1392
1393 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
1394 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
1395 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
1396 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
1397 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
1398 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
1399 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
1400 * tests/sets.at: Likewise.
1401
1402 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
1403 we comment out the Autoconf version number.
1404 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
1405 it's error-prone and "make maintainer-distcheck" rejects it.
1406
1407 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
1408 Indent calls to "error" to pacify "make maintainer-distcheck",
1409 when the calls are not intended to be translated.
1410 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
1411
1412 * src/Makefile.am (DEFS): Use +=, to pacify
1413 "make maintainer-distcheck".
1414 (bison_SOURCES): Add scan-skel.h.
1415 (sc_tight_scope): New rule, from coreutils.
1416
1417 * src/files.c (src_extension, header_extension):
1418 Now static, not extern.
1419 * src/getargs.c (short_options): Likewise.
1420 * src/muscle_tab.c (muscle_table): Likewise.
1421 * src/parse-gram.y (current_class, current_type, current_prec):
1422 Likewise.
1423 * src/reader.c (grammar_end, previous_rule_end): Likewise.
1424 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
1425 * src/main.c (main): Cast bindtextdomain and textdomain calls to
1426 void, to avoid warning when NLS is disabled.
1427 * src/output.c: Include scan-skel.h.
1428 (scan_skel): Remove decl, since scan-skel.h does this.
1429 (output_skeleton):
1430 Indent calls to "error" to pacify "make maintainer-distcheck".
1431 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
1432 * src/reader.h (gram_end, gram_lineno): New decls to pacify
1433 "make maintainer-distcheck".
1434 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
1435 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
1436 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
1437 (skel_lex_destroy, scan_skel): Move these decls to...
1438 * src/scan-skel.h: New file.
1439 * src/uniqstr.c (uniqstr_assert):
1440 Indent calls to "error" to pacify "make maintainer-distcheck".
1441
1442 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
1443 not @VAR@.
1444
1445 * tests/torture.at: Revamp to avoid misuse of atoi that
1446 "make maintainer-distcheck" complained about.
1447
1448 * examples/extexi (message): Don't print a message more than once,
1449 and omit line-number decoration that makes Emacs compile think
1450 that informative messages are worth worrying about.
1451
1452 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
1453
1454 * configure.ac: Update version number.
1455
1456 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
1457 accidentally.
1458 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
1459 autogenerated by the maintainer.
1460 * examples/calc++/.cvsignore: Add *.yy.
1461
1462 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
1463 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1464 * lib/bitsetv.c (bitsetv_alloc): Likewise.
1465
1466 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
1467
1468 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
1469 from maintainer-distcheck about casting the argument of 'free'.
1470
1471 * NEWS: Mention recent yytname changes.
1472 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
1473
1474 * bootstrap: For translations that have not yet been upgraded to
1475 the new runtime-po domain, prime the pump by extracting the
1476 relevant strings from the obsolete translations. This code can be
1477 removed once the bison-runtime domain has been translated by each
1478 team.
1479
1480 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
1481 now that token names are already quoted.
1482
1483 Fix problem reported by Anthony Heading.
1484 * data/glr.c (YYTOKEN_TABLE): New macro.
1485 (yytname): Define if YYTOKEN_TABLE.
1486 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
1487 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
1488 (YYERROR_VERBOSE): Define the same way the other skeletons do.
1489 * src/output.c (prepare_symbols): Output token_table_flag.
1490
1491 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
1492
1493 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
1494 again if the first call fails.
1495
1496 * data/glr.c (yytnamerr): New function.
1497 (yyreportSyntaxError): Use it to dequote most string literals.
1498 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
1499 with other skeletons. All uses changed.
1500 (yytnameerr_): New function.
1501 (yyreport_syntax_error): Use it to dequote most string literals.
1502 * data/yacc.c (yytnamerr): New function.
1503 (yyerrlab): Use it to decode most string literals.
1504 * doc/bison.texinfo (Decl Summary, Calling Convention):
1505 Clarify quoting convention of yytname.
1506 * src/output.c (prepare_symbols): Quote all names. This undoes
1507 the 2005-04-17 change, which is now accomplished (mostly) via
1508 changes in the parsers as described above.
1509 * tests/regression.at (Token definitions, Web2c Actions):
1510 Undo most 2005-04-17 change here, too.
1511
1512 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
1513
1514 Fix more problems reported by twlevo@xs4all.nl.
1515 * tests/cxx-type.at: Don't pipe output of ./types through sed to
1516 remove trailing spaces. This loses the exit status of ./types,
1517 and isn't needed since ./types shouldn't be emitting trailing
1518 spaces.
1519 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
1520 as the stack isn't valid in that case.
1521
1522 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1523 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1524 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1525 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
1526 is used.
1527 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
1528 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1529 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1530 Likewise.
1531
1532 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
1533 overly-picky compilers that reject 'char *foo = "bar";'.
1534
1535 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
1536 to FILE * parameter, not to stderr. This fixes a typo introduced
1537 in the 2005-07-12 change.
1538
1539 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
1540 warnings from GCC 4.
1541
1542 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
1543 (yyglrShiftDefer, yysplitStack):
1544 Remove unused parameters b4_pure_formals. All uses changed.
1545 (yyglrShift): Remove unused parameters b4_user_formals.
1546 All uses changed.
1547 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
1548
1549 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
1550
1551 Destructor cleanups and regularization among the three skeletons.
1552 * NEWS: Document the behavior changes.
1553 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
1554 stack before failing, as the cleanup code will do it for us now.
1555 * data/lalr1.cc (yyerrlab): Likewise.
1556 * data/glr.c (yyparse): Pop everything off the stack before
1557 freeing it, so that destructors get called properly.
1558 * data/lalr1.cc (yyreturn): Likewise.
1559 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
1560 This is more consistent.
1561 * doc/bison.texinfo (Destructor Decl): Mention more reasons
1562 why destructors might be called. 1.875 -> 2.1.
1563 (Destructor Decl, Decl Summary, Table of Symbols):
1564 Some English-language cleanups for %destructor.
1565 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1566 Add output line for destructor of start symbol.
1567 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
1568 because of that same extra output line.
1569
1570 * NEWS: Document minor wording changes in diagnostics of
1571 Bison-generated parsers.
1572 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
1573 Remove unused formals. All uses changed.
1574 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
1575 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
1576 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
1577 Rename yyoverflowab to yyexhaustedlab.
1578 When memory exhaustion occurs during syntax-error reporting,
1579 report it separately rather than in a single diagnostic; this
1580 eases translation.
1581 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
1582 (Memory Exhausted): Renamed from Parser Stack Overflow.
1583 Revamp wording slightly to prefer "memory exhaustion".
1584 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
1585
1586 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
1587
1588 Add i18n support to the GLR skeleton. Partially fix the C++
1589 skeleton; a C++ expert needs to finish this. Remove debugging
1590 msgids; there's little point to having them translated, since they
1591 can be understood only by someone who can read the
1592 (English-language) source code.
1593
1594 Generate runtime-po/bison-runtime.pot automatically, so that we
1595 don't have to worry about garbage getting in that file. We'll
1596 make sure after the next official release that old msgids don't
1597 get lost. See
1598 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
1599
1600 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
1601 Now auto-generated.
1602 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
1603 Fix typos in explanations of the runtime file.
1604 * bootstrap: Change gettext keyword from YYI18N to YY_.
1605 Use standard Makefile.in.in in runtime-po, since we'll arrange
1606 for backward-compatible bison-runtime.po files in a different way.
1607 * data/glr.c (YY_): New macro, from yacc.c.
1608 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
1609 Translate messages intended for users.
1610 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
1611 the wording in the other skeletons. We don't know that the memory
1612 is virtual.
1613 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
1614 Use same method that yacc.c uses.
1615 Don't translate debugging messages.
1616 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
1617 it doesn't work (yet), and requires C++ expertise to fix.
1618 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
1619 Move defn to a more logical place, to be consistent with other
1620 skeletons.
1621 Don't translate debugging messages.
1622 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
1623 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
1624 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
1625 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
1626
1627 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
1628 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
1629 void, not int.
1630 * tests/glr-regression.at (Badly Collapsed GLR States):
1631 Likewise.
1632 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1633 yylex should return 0 at EOF rather than aborting.
1634
1635 Improve tests for stack overflow in GLR parser.
1636 Problem reported by twlevo@xs4all.nl.
1637 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
1638 All uses removed.
1639 (yyStackOverflow): Just longjmp, but with value 2 so that caller
1640 can handle the problem.
1641 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
1642 (yyparse): New local variable yyresult to record the result.
1643 Use result of setjmp to set it, rather than storing itinto
1644 struct.
1645 (yyDone): Remove label.
1646 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
1647 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
1648 if YYABORT is used).
1649 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
1650 yyparse status; put status > 1 into diagnostic.
1651 Check that status==2 works.
1652 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
1653 Use exit status 3 for failure to open (which shouldn't happen).
1654
1655 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
1656
1657 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
1658 1 on syntax error; just let yyparse do its thing.
1659 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
1660 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
1661 (Exploding the Stack Size with Alloca):
1662 (Exploding the Stack Size with Malloc):
1663 Expect exit status 2, not 1, since the parser is supposed to blow
1664 its stack. Problem reported by twlevo@xs4all.nl.
1665
1666 * data/glr.c (yyparse): Don't assume that the initial calls
1667 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
1668 Print a stack-overflow message and fail instead.
1669 Initialize the line-number information before creating the stack,
1670 so that the stack-overflow message can report line zero safely.
1671
1672 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
1673
1674 Fix problems reported by twlevo@xs4all.nl.
1675 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
1676 (yyuserMerge): Provide a default case if b4_mergers is empty.
1677 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
1678 * tests/glr-regression.at
1679 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1680 Add casts to pacify C++ compilers.
1681 * tests/glr-regression.at (Improper merging of GLR delayed action
1682 sets): Declare yylex before using it.
1683 * tests/Makefile.am (maintainer-check-g++): Fix a stray
1684 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
1685 test for valgrind; valgrind is independent of g++.
1686 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
1687 for compatibility with POSIX 1003.1-2001 (if running coreutils).
1688 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
1689 Use a destructor, so that we can expand the stack. Change
1690 YYSTYPE to char * so that we can free it. Cast result of malloc.
1691
1692 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1693
1694 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
1695 a valgrind failure. Problem reported by twlevo@xs4all.nl.
1696
1697 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
1698
1699 * PACKAGING: New file, suggested by Bruno Haible and taken from
1700 similar wording in gettext's PACKAGING file.
1701 * NEWS: Mention PACKAGING.
1702 * Makefile.am (EXTRA_DIST): Add PACKAGING.
1703
1704 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
1705
1706 * NEWS: Document recent i18n improvements.
1707 * bootstrap: Get runtime translations into runtime-po.
1708 Create runtime-po files automatically, if possible.
1709 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
1710 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
1711 does not infringe on the user's name space.
1712 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
1713 * doc/bison.texinfo (Internationalization): Revamp the English
1714 and Texinfo syntax a bit, to try to make it clearer.
1715 (Bison Options, Option Cross Key): Mention --print-localedir.
1716 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
1717 YYENABLE_NLS. Quote a bit more.
1718 * runtime-po/.cvsignore: New file.
1719 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
1720 * runtime-po/Rules-quot: Remove; now created by bootstrap.
1721 * runtime-po/quot.sed: Likewise.
1722 * runtime-po/boldquot.sed: Likewise.
1723 * runtime-po/en@quot.header: Likewise.
1724 * runtime-po/en@boldquot.header: Likewise.
1725 * runtime-po/insert-header.sin: Likewise.
1726 * runtime-po/remove-potcdate.sin: Likewise.
1727 * runtime-po/Makevars: Likewise.
1728 * runtime-po/LINGUAS: Likewise.
1729 * runtime-po/de.po: Likewise; we will rely on the translation project
1730 to maintain this, so "bootstrap" should get it.
1731 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
1732 its value.
1733 * src/main.c (main): Bind the bison-runtime domain, too.
1734
1735 2005-07-12 Bruno Haible <bruno@clisp.org>
1736
1737 * data/yacc.c: Include <libintl.h> when NLS is enabled.
1738 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
1739 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
1740 * runtime-po: New directory.
1741 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
1742 $(DOMAIN).pot-update rule, so that old messages are never dropped.
1743 * runtime-po/Rules-quot: New file, copied from po/.
1744 * runtime-po/quot.sed: Likewise.
1745 * runtime-po/boldquot.sed: Likewise.
1746 * runtime-po/en@quot.header: Likewise.
1747 * runtime-po/en@boldquot.header: Likewise.
1748 * runtime-po/insert-header.sin: Likewise.
1749 * runtime-po/remove-potcdate.sin: Likewise.
1750 * runtime-po/Makevars: New file.
1751 * runtime-po/POTFILES.in: New file.
1752 * runtime-po/LINGUAS: New file.
1753 * runtime-po/bison-runtime.pot: New file.
1754 * runtime-po/de.po: New file.
1755 * m4/bison.m4: New file.
1756 * Makefile.am (SUBDIRS): Add runtime-po.
1757 (aclocaldir, aclocal_DATA): New variables.
1758 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
1759 Define aclocaldir.
1760 * src/getargs.c (usage): Document --print-localedir option.
1761 (PRINT_LOCALEDIR_OPTION): New enum item.
1762 (long_options): Add --print-localedir option.
1763 (getargs): Handle --print-localedir option.
1764 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
1765 (Internationalization): New section.
1766
1767 2005-07-12 Akim Demaille <akim@epita.fr>
1768
1769 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
1770 for consistency with the rest of the code.
1771 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
1772 Add separators.
1773
1774 2005-07-12 Akim Demaille <akim@epita.fr>
1775
1776 * src/parse-gram.y: Use %printer instead of YYPRINT.
1777
1778 2005-07-12 Akim Demaille <akim@epita.fr>
1779
1780 * src/symtab.h, src/symtab.c (symbol_print): New.
1781 * src/symlist.h, src/symlist.c (symbol_list_print): New.
1782 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
1783
1784 2005-07-12 Akim Demaille <akim@epita.fr>
1785
1786 * data/glr.c (b4_syncline): Fix (swap) the definitions of
1787 b4_at_dollar and b4_dollar_dollar.
1788
1789 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
1790
1791 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
1792 and Pennello's paper.
1793
1794 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
1795
1796 * data/yacc.c (yyparse): Undo previous patch. Instead,
1797 set yylsp[0] and yyvsp[0] only if the initial action
1798 sets yylloc and yylval, respectively.
1799
1800 * data/yacc.c (yyparse): In the initial action, set
1801 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
1802 This avoids the use of undefined variables if the initial
1803 action does not set yylloc and/or yylval.
1804
1805 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
1806
1807 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
1808 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
1809 Remove from CVS. These files are automatically generated.
1810 * examples/extexi: Clarify that this file is now part of Bison,
1811 not GNU M4, and that it works with any POSIX-compatible Awk.
1812 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
1813 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
1814 so that we also get calc++-parser.yy. Geneate it.
1815 Use $(AWK), not gawk, since any conforming Awk will do.
1816 Put comment before action, since older 'make' can't handle comment
1817 in action.
1818 $(BUILT_SOURCES): List all built sources, not just some of them.
1819 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
1820 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
1821 $($(calc_sources_generated)): Remove unnecessary test for existence
1822 of target. (This had a shell syntax error anyway; a stray "x".)
1823 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
1824 calc++-parser.yy.
1825 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
1826
1827 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
1828 implied by the other modules.
1829
1830 2005-07-06 Akim Demaille <akim@epita.fr>
1831
1832 Bind examples/calc++ to the package.
1833 * examples/calc++/Makefile: Remove, replaced by...
1834 * examples/calc++/Makefile.am: ... this new file.
1835 * examples/calc++/test: Remove input.
1836 * examples/calc++/compile: Remove.
1837 * examples/Makefile.am: New.
1838 * configure.ac, Makefile.am: Adjust.
1839 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
1840
1841 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
1842
1843 * data/glr.c (yyFail): Drastically simplify; since the format argument
1844 never had any % directives, we can simply pass it to yyerror.
1845 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
1846 be modified later, as that is the usual style in glr.c.
1847 Problems reported by Paul Hilfinger.
1848
1849 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
1850 and size overflow errors.
1851 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
1852 in case the user prolog sets feature-test macros like _GNU_SOURCE.
1853 (YYSIZEMAX): New macro.
1854 (yystpcpy): New function, taken from yacc.c.
1855 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
1856 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
1857 so that we don't have to maintain their signatures.
1858 (yyFail): Check for buffer overflow, by using vsnprintf rather
1859 than vsprintf. Allocate a bigger buffer if possible.
1860 Report an error if buffer allocation fails.
1861 (yyStackOverflow): New function.
1862 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
1863 the initialization was successful. It might fail if storage was
1864 exhausted.
1865 (yyexpandGLRStack): Add more checks for storage allocation failure.
1866 Use yyStackOverflow to report failures.
1867 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
1868 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
1869 Don't assume stack number fits in int.
1870 (yysplitStack): Check for storage allocation failure.
1871 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
1872 can print diagnostics on storage allocation failure. All callers
1873 changed.
1874 (yyresolveValue): Use yybool for boolean.
1875 (yyreportSyntaxError): Check for size-calculation overflow.
1876 This code is taken from yacc.c.
1877 (yyparse): Check for storage allocation errors when allocating
1878 the initial stack.
1879
1880 2005-07-05 Akim Demaille <akim@epita.fr>
1881
1882 Extract calc++ from the documentation.
1883 * doc/bison.texinfo (Calc++): Add the extraction marks.
1884 * examples/extexi: New, from the aborted GNU Programming 2E.
1885 Separate the different paragraph of a file with empty lines.
1886 * examples/Makefile: Use it to extract the whole calc++ example.
1887
1888 2005-06-24 Akim Demaille <akim@epita.fr>
1889
1890 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
1891 class typedefs.
1892
1893 2005-06-22 Akim Demaille <akim@epita.fr>
1894
1895 * doc/bison.texinfo (C++ Language Interface): First stab.
1896 (C++ Parsers): Remove.
1897
1898 2005-06-22 Akim Demaille <akim@epita.fr>
1899
1900 * data/lalr1.cc (yylex_): Honor %lex-param.
1901
1902 2005-06-22 Akim Demaille <akim@epita.fr>
1903
1904 Start a set of simple examples.
1905 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
1906 * examples/calc++/calc++-driver.hh,
1907 * examples/calc++/calc++-parser.yy,
1908 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
1909 * examples/calc++/compile, examples/calc++/test: New.
1910
1911 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
1912
1913 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
1914 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
1915 which stems from the 2005-05-27 patch.
1916
1917 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1918
1919 * data/glr.c: Modify treatment of unused parameters to permit use
1920 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
1921
1922 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
1923
1924 Fix infringement on user name space reported by Janos Zoltan Szabo.
1925 * data/yacc.c (yyparse): strlen -> yystrlen.
1926
1927 2005-05-30 Akim Demaille <akim@epita.fr>
1928
1929 * data/lalr1.cc (_): New.
1930 Translate the various messages.
1931
1932 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
1933
1934 Fix infringement on user name space reported by Bruno Haible.
1935 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
1936 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
1937 the user's name space.
1938 (alloca): Include <stdlib.h> to get it, if it's not built in.
1939 (YYMALLOC, YYFREE): Define only if needed.
1940 (malloc, free): Declare, but only if needed, as this infringes on
1941 the user name space.
1942
1943 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
1944
1945 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
1946 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
1947 with %d format.
1948 * lib/ebitset.c (min, max): Undef before defining.
1949 * lib/vbitset.c (min, max): Likewise.
1950 * lib/subpipe.c (create_subpipe): Save local variables in case
1951 vfork clobbers them.
1952
1953 2005-05-24 Bruno Haible <bruno@clisp.org>
1954
1955 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
1956 error message syntax used by gcc-4.0.
1957
1958 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
1959
1960 * README: Mention m4 1.4.3. Remove obsolete advice about
1961 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
1962
1963 * bootstrap: Remove workaround for problem I encountered with
1964 gettext 0.14.1; it seems to be fixed now.
1965
1966 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
1967
1968 * NEWS: Version 2.0a.
1969
1970 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
1971 the previous change.
1972
1973 Various maintainer cleanups.
1974 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
1975 conftest*, for benefit of CVS commands run at the same time as
1976 "configure". Add build-aux, since "bootstrap" now creates it and
1977 its subfiles.
1978 * Makefile.cfg (move_if_change): Remove.
1979 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
1980 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
1981 (po_repo, do-po-update, po-update, wget_files, get-targets):
1982 (config.guess-url_prefix, config.sub-url_prefix):
1983 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
1984 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
1985 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
1986 Remove.
1987 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
1988 this is now the recommended name.
1989 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
1990 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
1991 ylwrap. These files now go into build-aux.
1992 * config/move-if-change: Remove.
1993 * config/prev-version.txt: Bump from 1.75 to 2.0.
1994
1995 * bootstrap: Add stdio-safer, unistd-safer modules.
1996 Remove m4/glibc2.m4 (introduced by latest gnulib, but
1997 we don't need it).
1998 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
1999 fopen-safer.c, stdio-safer.h, unistd-safer.h.
2000 * lib/subpipe.c: Include "unistd-safer.h".
2001 (create_subpipe): Make sure all the newly-created
2002 file descriptors are > 2, so that diagnostics don't
2003 get sent down them (which might cause Bison to hang, in theory).
2004 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
2005 * src/files.c (xfopen): Use fopen_safer, not fopen.
2006
2007 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
2008 yesterday's yacc.c fix.
2009
2010 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
2011
2012 * data/glr.c, data/lalr1.cc: Update copyright date.
2013
2014 Fix a destructor bug reported by Wolfgang Spraul in
2015 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
2016 * data/yacc.c (yyabortlab): Don't call destructor, and
2017 don't set yychar to EMPTY.
2018 (yyoverflowlab): Don't call destructor.
2019 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
2020 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
2021 since we no longer output the message "discarding lookahead token
2022 end of input ()".
2023
2024 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2025
2026 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
2027 fix a small glitch in debugging output.
2028 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
2029 after YY_SYMBOL_PRINT where needed.
2030
2031 (struct yyGLRState): Add some comments.
2032 (struct yySemanticOption): Add some comments.
2033 (union yyGLRStackItem): Add comment.
2034
2035 (yymergeOptionSets): Correct this to properly perform the union,
2036 avoiding infinite reported by Michael Rosien.
2037 Update comment.
2038
2039 * tests/glr-regression.at: Add test for GLR merging error reported
2040 by M. Rosien.
2041
2042 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
2043
2044 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
2045 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
2046 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
2047 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
2048 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
2049 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
2050 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
2051 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
2052 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
2053 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
2054 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
2055 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
2056 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
2057 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
2058 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
2059 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
2060 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
2061 src/derives.h, src/files.c, src/files.h, src/getargs.c,
2062 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
2063 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
2064 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
2065 src/output.h, src/parse-gram.c, src/parse-gram.h,
2066 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
2067 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
2068 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
2069 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
2070 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
2071 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
2072 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
2073 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
2074 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
2075 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
2076 tests/reduce.at, tests/regression.at, tests/sets.at,
2077 tests/synclines.at, tests/testsuite.at, tests/torture.at:
2078 Update FSF postal mail address.
2079
2080 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
2081
2082 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
2083 Problem reported by Ralf Menzel.
2084
2085 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
2086
2087 * tests/actions.at: Test that stack overflow invokes destructors.
2088 From Marcus Holland-Moritz.
2089 * data/yacc.c (yyerrlab): Move the code that destroys the stack
2090 from here....
2091 (yyreturn): to here. That way, destructors are called properly
2092 even if the stack overflows, or the user calls YYACCEPT or
2093 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
2094 (yyoverflowlab): Destroy the lookahead.
2095
2096 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
2097
2098 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
2099
2100 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
2101
2102 * NEWS: Bison-generated C parsers no longer quote literal strings
2103 associated with tokens.
2104 * src/output.c (prepare_symbols): Don't escape strings,
2105 since users don't want to see C escapes.
2106 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
2107 in diagnostics.
2108 * tests/input.at (Torturing the Scanner): Likewise.
2109 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
2110
2111 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
2112
2113 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
2114 the data size is known to be too small and we can't increase it.
2115 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
2116
2117 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
2118
2119 * src/parse-gram.y: Include quotearg.h.
2120 (string_as_id): Quote $1 before using it as a key, since the
2121 lexer no longer quotes it for us.
2122 (string_content): Don't strip quotes, since lexer no longer
2123 quotes it for us.
2124 * src/scan-gram.l: Include quotearg.h.
2125 ("\""): Omit quote.
2126 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
2127 a key, since the rest of the lexer doesn't quote it.
2128 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
2129 * tests/regression.at (Token definitions): Check for backslashes
2130 in token strings.
2131
2132 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
2133 (YYSIZE_T): Define to unsigned long int when using an older compiler.
2134 (yyparse): Revamp code to generate long syntax error message, to
2135 make it easier to translate, and to avoid problems with arithmetic
2136 overflow. Change "virtual memory" to "memory" in diagnostic, since
2137 we don't know whether the memory is virtual.
2138
2139 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
2140
2141 * NEWS: Bison-generated C parsers now use the _ macro to
2142 translate strings.
2143 * data/yacc.c (_) [!defined _]: New macro.
2144 All English strings wrapped inside this macro.
2145 * doc/bison.texinfo (Bison Parser): Document _.
2146 * po/POTFILES.in: Include src/parse-gram.c, since it now
2147 includes translateable strings that parse-gram.y doesn't.
2148
2149 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
2150
2151 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
2152 reverting the 2004-10-11 change to this function.
2153 (symbol_check_alias_consistency): Don't call symbol_type_set
2154 if the type name is already correct.
2155 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
2156
2157 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
2158
2159 * tests/regression.at (Token definitions): Don't use a token named
2160 c, as that generates a "#define c ..." that runs afoul of buggy
2161 stdlib.h that uses the identifier c as a member of struct
2162 drand48_data. Problem reported by Horst Wente.
2163
2164 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
2165
2166 * bootstrap: Change translation URL from
2167 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
2168 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
2169 redirection glitches. Problem reported by twlevo@xs4all.nl.
2170
2171 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
2172
2173 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
2174 after operands; POSIX says this isn't portable for the c99 command.
2175
2176 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
2177
2178 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
2179 immediately if a data overrun has occurred; this may help us track
2180 down what may be a spurious failure on MacOS.
2181
2182 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
2183
2184 Respond to problems reported by twlevo@xs4all.nl.
2185
2186 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
2187
2188 * src/vcg.h: Comment fix.
2189 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
2190 (G_CMAX): Change to -1 instead of INT_MAX.
2191
2192 * data/yacc.c (yyparse): Omit spaces before #line.
2193
2194 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
2195
2196 * src/tables.c (state_number_to_vector_number): Put it inside an
2197 "#if 0", since it's not currently used. Problem reported by
2198 Roland McGrath.
2199
2200 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
2201
2202 * src/output.c (escaped_output): Renamed from
2203 escaped_file_name_output, since we now use it for symbol tags as
2204 well. All uses changed.
2205 (symbol_destructors_output, symbol_printers_output):
2206 Escape symbol tags too.
2207 Problem reported by Matyas Forstner in
2208 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
2209
2210 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
2211 not needed.
2212 * src/output.c (user_actions_output, token_definitions_output,
2213 symbol_destructors_output, symbol_printers_output): Likewise.
2214 * src/reader.c (prologue_augment): Likewise.
2215 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
2216
2217 * src/vcg.c (output_edge): Don't quote linestyle arg.
2218 Problem reported by twlevo@xs4all.nl.
2219
2220 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
2221
2222 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
2223 example, reported by Derek M Jones. Also, make the example even
2224 more outrageous, to better illustrate how bad the problem is.
2225
2226 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
2227
2228 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
2229 putsym. Typo reported by Sebastian Piping.
2230
2231 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
2232
2233 * doc/bison.texinfo (Language and Grammar): some -> same
2234 (Epilogue): int he -> in the
2235 Typos reported by Sebastian Piping via Justin Pence.
2236
2237 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
2238
2239 * tests/glr-regression.at (Improper handling of embedded actions
2240 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
2241 embedded actions and $-N in GLR parsers", work around an Autoconf bug
2242 with dollar signs in test names.
2243 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
2244 for a similar reason.
2245
2246 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
2247
2248 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
2249 wants to redefine G_VIEW.
2250
2251 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
2252
2253 * src/vcg.c (get_view_str): Remove case for normal_view.
2254 Problem reported by twlevo@xs4all.nl.
2255
2256 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
2257
2258 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
2259 Problem reported by twlevo@xs4all.nl.
2260
2261 * doc/bison.texinfo: Change @dircategory from "GNU programming
2262 tools" to "Software development". Requested by Richard Stallman
2263 via Karl Berry.
2264
2265 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
2266
2267 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
2268 Problem reported by twlevo@xs4all.nl.
2269
2270 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
2271
2272 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
2273 keyword; it's not needed with modern compilers, and it doesn't
2274 affect correctness with older compilers. Suggested by
2275 twlevo@xs4all.nl.
2276
2277 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
2278
2279 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
2280 gcc -Wswitch-default.
2281 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
2282 * data/yacc.c (yyparse): Likewise.
2283
2284 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
2285
2286 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
2287 already. Let config.h define any nonstandard values.
2288
2289 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
2290
2291 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
2292 for the benefit of slower hosts. Problem reported by
2293 Nelson H. F. Beebe.
2294
2295 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
2296
2297 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
2298 being defined and not used.
2299 * data/lalr1.cc (yyparse): Likewise.
2300 Use "if (false)" rather than "if (0)".
2301
2302 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
2303
2304 * TODO: Mention that we should allow NUL bytes in tokens.
2305
2306 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
2307
2308 * src/scan-skel.l (<<EOF>>): Don't close standard output.
2309 Problem reported by Hans Aberg.
2310
2311 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
2312
2313 * src/getargs.c (version): Happy new year; update overall
2314 program copyright date from 2004 to 2005.
2315
2316 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
2317 Problem reported by Hans Aberg.
2318 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
2319 (Output file names.): Add a test for the case when standard output
2320 is closed.
2321
2322 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
2323
2324 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
2325 to fix an oversight in the Bison 2.0 manual.
2326
2327 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
2328
2329 * NEWS: Version 2.0. Reformat the existing news items since
2330 1.875, so that related items are grouped together.
2331 * configure.ac (AC_INIT): Bump version to 2.0.
2332 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
2333
2334 * tests/torture.at (Exploding the Stack Size with Alloca): Set
2335 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
2336 otherwise, we're not testing alloca. Unfortunately there's no
2337 simple way to consult HAVE_ALLOCA here.
2338
2339 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
2340 for yymsg, too.
2341
2342 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
2343 hand. This avoids a warning about comparing int to size_t when
2344 GCC warnings are enabled.
2345
2346 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
2347
2348 * NEWS: Bison-generated parsers no longer default to using the
2349 alloca function (when available) to extend the parser stack, due
2350 to widespread problems in unchecked stack-overflow detection.
2351 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
2352 responsibility to set it to a positive value. This lets the user
2353 specify a value that is not a preprocessor constant.
2354 * data/yacc.c (YYMAXDEPTH): Likewise.
2355 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
2356 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
2357 to be a compile-time constant. However, explain the constraints on it.
2358 Also, explain the constraints on YYINITDEPTH.
2359 (Table of Symbols): Explain that alloca is no longer the default.
2360 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
2361 to 1.
2362
2363 * doc/bison.texinfo (Location Default Action): Mention that n must
2364 be zero when k is zero. Suggested by Frank Heckenbach.
2365
2366 2004-12-22 Akim Demaille <akim@epita.fr>
2367
2368 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
2369 (parser::state_type, parser::semantic_type, parser::location_type):
2370 Private, not public.
2371 (parser::parse): Return ints, not bool.
2372 Returning a bool introduces a problem: 0 corresponds to false, and
2373 it seems weird to return false on success. Returning true changes
2374 the conventions for yyparse.
2375 Alternatively we could return void and send an exception.
2376 There is no clear consensus (yet?).
2377 (state_stack, semantic_stack, location_stack): Rename as...
2378 (state_stack_type, semantic_stack_type, location_stack_type): these.
2379 Private, not public.
2380 * tests/c++.at: New.
2381 * tests/testsuite.at, tests/Makefile.am: Adjust.
2382
2383 2004-12-21 Akim Demaille <akim@epita.fr>
2384
2385 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
2386
2387 2004-12-21 Akim Demaille <akim@epita.fr>
2388
2389 Don't impose std::string for filenames.
2390
2391 * data/lalr1.cc (b4_filename_type): New.
2392 (position::filename): Use it.
2393 (parser.hh): Move the inclusion of stack.hh and location.hh below
2394 the user code, so that needed headers for the filename type can be
2395 included first.
2396 Forward declare them before the user code.
2397 * tests/Makefile.am (check-local, installcheck-local): Pass
2398 TESTSUITEFLAGS to the TESTSUITE.
2399
2400 2004-12-20 Akim Demaille <akim@epita.fr>
2401
2402 Use more STL like names: my_class instead of MyClass.
2403
2404 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
2405 (SemanticStack, SemanticType, StateStack, StateType)
2406 (TokenNumberType, Stack, Slice, Traits, Parser::location)
2407 (Parser::value): Rename as...
2408 (location_stack, location_type, rhs_number_type, semantic_stack)
2409 (semantic_type, state_stack, state_type, token_number_type, stack)
2410 (slice, traits, parser::yylloc, parser::yylval): these.
2411
2412 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
2413
2414 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
2415
2416 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
2417 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2418
2419 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
2420
2421 Remove uses of 'short int' and 'unsigned short int'. This raises
2422 some arbitrary limits. It uses more memory but nowadays that's
2423 not much of an issue.
2424
2425 This change does not affect the generated parsers; that's a different
2426 task, as some users will want to conserve memory there.
2427
2428 Ideally we should use size_t to represent all object counts, and
2429 something like ptrdiff_t to represent signed differences of object
2430 counts; but that will require more code-cleanup than I have the
2431 time to do right now.
2432
2433 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
2434 Use size_t, not int or short int, to count objects.
2435 * src/closure.c (nritemset, closure): Likewise.
2436 * src/closure.h (nritemset, closure): Likewise.
2437 * src/nullable.c (nullable_compute): Likewise.
2438 * src/print.c (print_core): Likewise.
2439 * src/print_graph.c (print_core): Likewise.
2440 * src/state.c (state_compare, state_hash): Likewise.
2441 * src/state.h (struct state): Likewise.
2442 * src/tables.c (default_goto, goto_actions): Likewise.
2443
2444 * src/gram.h (rule_number, rule): Use int, not short int.
2445 * src/output.c (prepare_rules): Likewise.
2446 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
2447 errs, reductions): Likewise.
2448 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
2449 Likewise.
2450 * src/tables.c (vector_number, tally, action_number,
2451 ACTION_NUMBER_MINIMUM): Likewise.
2452 * src/output.c (muscle_insert_short_int_table): Remove.
2453
2454 2004-12-17 Akim Demaille <akim@epita.fr>
2455
2456 * data/lalr1.cc: Extensive Doxygenation.
2457 (error_): Rename as...
2458 (error): this, since it is visible to the user.
2459 Adjust callers.
2460 (Parser::message): Now an automatic variable from...
2461 (Parser::yyreport_syntax_error_): here.
2462 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
2463 Parser::error.
2464 * tests/input.at: Escape $.
2465
2466 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
2467
2468 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
2469 Parenthesize rhs to avoid obscure problems with mistakes like
2470 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
2471 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
2472 b4_rhs_location): Likewise.
2473 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
2474 b4_rhs_location): Likewise.
2475
2476 2004-12-16 Akim Demaille <akim@epita.fr>
2477
2478 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
2479 yacc.c: be sure to stay within yycheck_.
2480 * tests/actions.at: Re-enable C++ tests.
2481
2482 2004-12-16 Akim Demaille <akim@epita.fr>
2483
2484 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
2485 real.
2486
2487 2004-12-16 Akim Demaille <akim@epita.fr>
2488
2489 Use #define to handle the %name-prefix.
2490
2491 * data/glr.c, data/yacc.c: Comment changes.
2492 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
2493 so that one can refer to yylex in the parser file, and have it
2494 renamed, as is the case with other skeletons.
2495
2496 2004-12-16 Akim Demaille <akim@epita.fr>
2497
2498 Move lalr1.cc internals into yy*.
2499
2500 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
2501 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
2502 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
2503 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
2504 (empty_, final_, terror_, errcode_, ntokens_)
2505 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
2506 (looka_, ilooka_, error_range_, nerrs_):
2507 Rename as...
2508 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
2509 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
2510 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
2511 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
2512 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
2513 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
2514 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
2515 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
2516 these.
2517
2518 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
2519
2520 Fix some problems reported by twlevo at xs4all.
2521 * src/symtab.c (symbol_new): Report an error if the input grammar
2522 contains too many symbols. This is better than calling abort() later.
2523 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
2524 (struct node, struct graph):
2525 Rename member expand to stretch. All uses changed.
2526 (struct graph): Remove member layoutalgorithm. All uses removed.
2527 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
2528 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
2529 All uses changed.
2530 (N_STRETCH): Rename from N_EXPAND. All uses changed.
2531
2532 2004-12-15 Akim Demaille <akim@epita.fr>
2533
2534 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
2535 Add more Doxygen comments.
2536 (symprint_, stack_print_, reduce_print_, destruct_, pop)
2537 (report_syntax_error_, translate_): Rename as...
2538 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
2539 (yypop_, yyreport_syntax_error_, yytranslate_): this.
2540
2541 2004-12-15 Akim Demaille <akim@epita.fr>
2542
2543 * data/lalr1.cc (lex_): Rename as...
2544 (yylex_): this.
2545 Move the trace here.
2546 Take the %name-prefix into account.
2547 Reported by Alexandre Duret-Lutz.
2548
2549 2004-12-15 Akim Demaille <akim@epita.fr>
2550
2551 Simplify the C++ parser constructor.
2552
2553 * data/lalr1.cc (debug_): Rename as...
2554 (yydebug_): so that the parser's internals are always in the yy*
2555 pseudo namespace.
2556 Adjust uses.
2557 (b4_parse_param_decl): Remove the leading comma as it is now only
2558 called as unique argument list.
2559 (Parser::Parser): Remove the constructor accepting a location and
2560 an initial debugging level.
2561 Remove from the other ctor the argument for the debugging level.
2562 (debug_level_type, debug_level, set_debug_level): New.
2563
2564 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
2565 constructor calls.
2566
2567 2004-12-15 Akim Demaille <akim@epita.fr>
2568
2569 Remove b4_root related material: failure experiment
2570 (which goal was to allow to derive from a class).
2571
2572 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
2573 definitions and uses.
2574
2575 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
2576
2577 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
2578 not 2, since it's not portable to subtract 1 from the start of an
2579 array. The new item 0 is never set or used. All uses changed.
2580
2581 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
2582 the default definition of YYLLOC_DEFAULT. Problem reported
2583 by Frank Heckenbach.
2584
2585 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
2586
2587 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
2588 the normal case and one for the error case. Just use the
2589 first one uniformly. Problem reported by Frank Heckenbach.
2590 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
2591 use exactly the same macro in both places.
2592 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
2593 so that the normal-case YYRHSLOC works for the error case too.
2594 All uses changed.
2595 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
2596 (YYLLOC_DEFAULT): Use the same macro as glr.c.
2597 * doc/bison.texinfo (Location Default Action): Don't claim that
2598 we have an array of locations. Use the same macro for both glr
2599 and lalr parsers. Mention YYRHSLOC. Mention what happens when
2600 the index is 0.
2601
2602 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
2603
2604 * HACKING: Update email addresses to send announcements to.
2605
2606 * configure.ac (AC_INIT): Bump version to 1.875f.
2607
2608 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
2609
2610 * NEWS: Version 1.875e.
2611 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
2612
2613 * src/scan-skel.l: Include "complain.h", for "fatal".
2614
2615 * src/relation.h (relation_print, relation_digraph):
2616 Relation sizes are of type relation_node, not size_t (this is
2617 merely a doc fix, since the two types are equivalent).
2618 (relation_transpose): Relation sizes are of type relation_node,
2619 not int.
2620 * src/relation.c: Likewise.
2621 (top, infinity): Now of type relation_node, not int.
2622 (traverse, relation_transpose): Use relation_node, not int.
2623
2624 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
2625 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
2626 (yyparse): Remove unused local introduced in 2004-10-25 patch.
2627
2628 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
2629 specifying whether the test should be skipped. Use it tp
2630 specify that the [%defines %skeleton "lalr1.cc"] tests currently
2631 fail on some hosts, and should be skipped.
2632
2633 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
2634
2635 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
2636 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
2637 unless otherwise specified below.
2638
2639 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
2640 to allocate kernel_base, kernel_items, kernel_size, since
2641 they needn't be initialized to 0.
2642 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
2643 * src/closure.c (new_closure): Likewise, for itemset.
2644 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
2645 * src/lalr.c (set_goto_map): Likewise, for temp_map.
2646 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
2647 (build_relations): Likewise for edge, states1, includes.
2648 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
2649 * src/reader.c (packgram): Likewise, for ritem, rules.
2650 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
2651 * src/relation.c (relation_digraph): Likewise for VERTICES.
2652 (relation_transpose): Likewise for new_R, end_R.
2653 * src/symtab.c (symbols_token_translations_init): Likewise for
2654 token_translations.
2655 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
2656 (token_actions): Likewise for yydefact, actrow, conflrow,
2657 conflict_list.
2658 (save_column): Likewise for froms[symno], tos[symno].
2659 (goto_actions): Likewise for state_count.
2660 (pack_table): Likewise for base, pos, check.
2661 (tables_generate): Likewise for width.
2662
2663 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
2664 for initial core. Just have a separate core, so we needn't worry
2665 about whether kernel_size and kernel_base are initialized.
2666
2667 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
2668 kernel_size, kernel_items): Remove unnecessary initialization.
2669 * src/conflicts.c (conflicts): Likewise.
2670 * src/derives.c (derives): Likewise.
2671 * src/muscle_tablc (muscle_insert): Likewise.
2672 * src/relation.c (relation_digraph): Likewise.
2673 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
2674 conflrow, conflict_table, conflict_list, table, check):
2675 Likewise.
2676
2677 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
2678 This is because all callers pass unsigned int.
2679 * src/closure.h (new_closure): Likewise.
2680
2681 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
2682 (build_relations): Initialize includes[i] in all cases.
2683 * src/reader.c (packgram): Always initialize rules[ruleno].prec
2684 and rules[ruleno].precsym. Initialize members in order.
2685 * src/relation.c (relation_transpose): Always initialize new_R[i]
2686 and end_R[i].
2687 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
2688
2689 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
2690 conflict_list[0] was always 0, but now it isn't initialized.
2691
2692 * src/table.c (table_grow): When conflict_table grew, the grown
2693 area wasn't cleared. Fix this.
2694
2695 * lib/.cvsignore: Add strdup.c, strdup.h.
2696 * m4/.cvsignore: Add strdup.m4.
2697
2698 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
2699
2700 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
2701 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
2702 GOTO_NUMBER_MAXIMUM, since we occasionally compute
2703 ngotos + 1 without checking for overflow.
2704 (build_relations): Use END_NODE, not -1, to denote end of edges.
2705 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
2706 build_relations): Use goto_number, not int, for goto numbers.
2707 * src/tables.c (save_column, default_goto): Likewise.
2708
2709 2004-11-23 Akim Demaille <akim@epita.fr>
2710
2711 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
2712 of #defining from yystype.
2713 Don't typedef yystype, C++ does not need it.
2714 This lets it possible to forward declare it as union.
2715
2716 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
2717
2718 * bootstrap (gnulib_modules): Add extensions.
2719 Problem reported by Jim Meyering.
2720
2721 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
2722
2723 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
2724 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
2725 src/system.h, src/tables.c: XFREE -> free, to accommodate
2726 recent change to gnulib xalloc.h.
2727 Problem reported by Jim Meyering.
2728
2729 2004-11-17 Akim Demaille <akim@epita.fr>
2730
2731 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
2732
2733 2004-10-28 Akim Demaille <akim@epita.fr>,
2734 Alexandre Duret-Lutz <adl@gnu.org>
2735
2736 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
2737 changes.
2738 (YYCDEBUG): Adjust.
2739 Use it instead of cdebug_.
2740 (Parser::debug_stream, Parser::set_debug_stream): New.
2741 (Parser::symprint_): Define cdebug_ for temporary backward
2742 compatibility.
2743 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
2744 debug_stream ().
2745
2746 2004-11-17 Akim Demaille <akim@epita.fr>
2747
2748 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
2749 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
2750 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
2751 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2752
2753 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
2754
2755 * data/glr.c (yyloc_default): Remove; not used.
2756 Problem reported by Frank Heckenbach.
2757
2758 2004-10-25 Akim Demaille <akim@epita.fr>
2759
2760 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
2761 Introduce another definition to address simple location arrays.
2762 (yyGLRStack): New member: yyerror_range.
2763 (yyrecoverSyntaxError, yyparse): Update it.
2764 (yyrecoverSyntaxError): Use it when shifting the error token to
2765 have an accurate range, equivalent to the one computed by both
2766 yacc.c and lalr1.cc.
2767 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
2768 that column numbers start at column 0, as per GNU Coding
2769 Standards, the others tests, and the doc.
2770 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
2771 Adjust to the above change (first column is 0).
2772 And adjust the location of the "<error>", now covering the whole
2773 line.
2774
2775 2004-10-22 Akim Demaille <akim@epita.fr>
2776 and Paul Eggert <eggert@cs.ucla.edu>
2777
2778 Remove some arbitrary limits on goto numbers and relations.
2779 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
2780 initial values, since they're never used.
2781 (set_goto_map): ngotos is now unsigned, so test for overflow
2782 by seeing whether it wraps around to zero.
2783 * src/lalr.h (goto_number): Now size_t, not short int.
2784 (GOTO_NUMBER_MAXIMUM): Remove.
2785 * src/relation.c (relation_print, traverse, relation_transpose):
2786 Check for END_NODE rather than looking at sign.
2787 * src/relation.h (END_NODE): New macro.
2788 (relation_node): Now size_t, not short int.
2789
2790 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
2791
2792 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
2793 keyword, not an identifier. Problem reported by Baron Schwartz in
2794 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
2795
2796 2004-10-11 Akim Demaille <akim@epita.fr>
2797
2798 * src/symtab.c (symbol_check_alias_consistency): Also check
2799 type names, destructors, and printers.
2800 Reported by Alexandre Duret-Lutz.
2801 Recode the handling of associativity and precedence in terms
2802 of symbol_precedence_set.
2803 Accept no redeclaration at all, not even equal to the previous
2804 value.
2805 (redeclaration): New.
2806 Use it to factor redeclaration complaints.
2807 (symbol_make_alias): Don't set the type of the alias, let
2808 symbol_check_alias_consistency do it as for other features.
2809 * src/symtab.h (symbol): Add new member prec_location, and
2810 type_location.
2811 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
2812 * tests/input.at (Incompatible Aliases): New.
2813
2814 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
2815
2816 .cvsignore fixes to accommodate gnulib changes,
2817 and the practice of naming build directories "_build".
2818 * .cvsignore: Add "_*". Sort.
2819 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
2820 * m4/.cvsignore: Add "*_gl.m4".
2821
2822 2004-10-06 Akim Demaille <akim@epita.fr>
2823
2824 * src/parse-gram.y (add_param): Fix the truncation of trailing
2825 spaces.
2826
2827 2004-10-05 Akim Demaille <akim@epita.fr>
2828
2829 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
2830 whether the reducion was empty or not. This leaves room to
2831 improve the use of YYLLOC_DEFAULT in such a case.
2832 lalr1.cc is still experimental, so changing this is acceptable.
2833 And finally, there are probably not many users who changed the
2834 handling of locations in GLR, so changing is admissible too.
2835
2836 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
2837 empty reduction, set @$ to an empty location ending the previously
2838 stacked symbol.
2839 Adjust uses to make sure the code is triggered on empty
2840 reductions.
2841 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
2842 expected output: empty reductions have empty locations.
2843
2844 2004-09-29 Akim Demaille <akim@epita.fr>
2845
2846 * data/lalr1.cc: Move towards a more standard C++ coding style
2847 for templates: Class < T > -> Class<T>.
2848
2849 2004-09-29 Akim Demaille <akim@epita.fr>
2850
2851 * data/lalr1.cc: Reinstall the former ctor, for sake of
2852 compatibility, but warn it will be removed.
2853 Move towards a more standard C++ coding style (i.e., type *var ->
2854 type* var).
2855
2856 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
2857
2858 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
2859 since it's less likely to work if NULs are involved in the future.
2860
2861 2004-09-27 Akim Demaille <akim@epita.fr>
2862
2863 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
2864
2865 2004-09-27 Akim Demaille <akim@epita.fr>
2866
2867 * data/lalr1.cc (b4_parse_param_decl_1): New.
2868 (b4_parse_param_decl): Use it to have different names between attribute
2869 and argument names.
2870 (b4_cc_constructor_call): Likewise.
2871
2872 2004-09-24 Akim Demaille <akim@epita.fr>
2873
2874 * src/parse-gram.y (add_param): Strip the leading and trailing
2875 blanks from a formal argument declaration.
2876 (YY_LOCATION_PRINT): New.
2877
2878 2004-09-24 Akim Demaille <akim@epita.fr>
2879
2880 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
2881 after the location.
2882
2883 2004-09-24 Akim Demaille <akim@epita.fr>
2884
2885 * doc/bison.texinfo (Table of Symbols): Sort.
2886
2887 2004-09-21 Akim Demaille <akim@epita.fr>
2888
2889 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
2890 the useless parentheses.
2891 Suggested by Paul Eggert.
2892
2893 2004-09-20 Akim Demaille <akim@epita.fr>
2894
2895 Let the initial-action act on the look-ahead, and use it for the
2896 "initial push" (corresponding to an hypothetical beginning-of-file).
2897 And let lalr1.cc honor %initial-action.
2898
2899 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
2900 example.
2901 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
2902 (Parser::Parser): Remove the ctor that used to initialize it.
2903 (Parser::parse): Like in the other skeletons, issue the "starting
2904 parse" message before any action.
2905 Honor %initial-action.
2906 Initialize the stacks with the lookahead.
2907 * data/yacc.c: Let $$ and @$ in %initial-action designate the
2908 look-ahead.
2909 Push them in the stacks.
2910 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
2911
2912 2004-09-20 Akim Demaille <akim@epita.fr>
2913
2914 * doc/bison.texinfo (Initial Action Decl): New.
2915
2916 2004-09-20 Akim Demaille <akim@epita.fr>
2917
2918 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
2919 clearer criterion to define it.
2920 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
2921 When reducing on an empty RHS, use the latest stacked location as
2922 location.
2923 yylloc is not always available.
2924 * data/glr.c: Likewise.
2925 Also, honor initial-actions.
2926
2927 2004-09-20 Akim Demaille <akim@epita.fr>
2928
2929 * data/yacc.c (YY_LOCATION_PRINT): New.
2930 Define when we know YYLTYPE's structure, i.e., when the default
2931 YYLLOC_DEFAULT is used.
2932 * data/c.m4 (b4_yysymprint_generate): Use it.
2933 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
2934 value of the result.
2935 (error_start_): Replace with...
2936 (error_range_): this location array.
2937 This allows to replace code relying on the implementation of
2938 locations by portable code.
2939 * data/yacc.c (yylerrsp): Replace with...
2940 (yyerror_range): this.
2941 Every time a token is popped, update yyerror_range[0], to have an
2942 accurate location for the error token.
2943 * data/glr.c (YY_LOCATION_PRINT): New.
2944 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
2945 deference a pointer.
2946 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
2947 report the location in %printers.
2948
2949 * src/scan-skel.l: Instead of abort, report error messages to ease
2950 understanding skeleton scanning failures.
2951
2952 2004-09-16 Akim Demaille <akim@epita.fr>
2953
2954 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
2955 (iterator, const_iterator): these, to be more in the C++ spirit.
2956 Also, return reverse iterators so that when displaying the stack
2957 we display its bottom first.
2958 (Parser::stack_print_, Parser::reduce_print_): Match the messages
2959 from yacc.c.
2960 We should probably use vector here though.
2961
2962 2004-09-16 Akim Demaille <akim@epita.fr>
2963
2964 Have more complete shift traces.
2965
2966 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
2967 to report Shifts instead of ad hoc YYDPRINTF invocations,
2968 including for the error token.
2969 * data/lalr1.cc (symprint_): Output the location.
2970 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
2971 output the location within the %printer.
2972 Activate GLR tests, at least to make sure they compile properly.
2973 They still don't pass though.
2974 * tests/calc.at: Adjust expect verbose output, since now "Entering
2975 state..." is on a different line than the "Shifting" message.
2976
2977 2004-09-08 Akim Demaille <akim@epita.fr>
2978
2979 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
2980 Bison directive from the Bison file to the invocation of this
2981 macro, so that these directives are passed to
2982 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
2983 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
2984 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
2985 the extra Bison directives instead of the whole series.
2986 Change the grammar so that there are recoverable errors, and
2987 unrecoverable errors. Now we can have the parser give up before
2988 consuming the whole input. As a result we now can observe that
2989 the lookahead is freed when needed.
2990 Change the parser source to parse argv[1] instead of a hard coded
2991 string.
2992 Simplify yylex, and give a value and location to EOF.
2993 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
2994 passed directives already coded in the file.
2995 Add some tests to check the location of "error".
2996 For some tests, the C++ parser is correct, and not yacc.c.
2997 For other tests, they provide different, but unsatisfying, values,
2998 so keep the C++ value so that at least one parser is "correct"
2999 according to the test suite.
3000 (Actions after errors): Remove, this is subsumed by the
3001 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
3002
3003 2004-09-06 Akim Demaille <akim@epita.fr>
3004
3005 * data/lalr1.cc: Adjust the indentation of the labels.
3006 (Parser::pop): New.
3007 Use it.
3008
3009 2004-09-06 Akim Demaille <akim@epita.fr>
3010
3011 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
3012 argument, an informative message.
3013 Call YY_SYMBOL_PRINT.
3014 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
3015 * data/lalr1.cc (destruct_): Likewise.
3016 In addition, no longer depend on b4_yysymprint_generate and
3017 b4_yydestruct_generate to generate these functions, do it "by
3018 hand".
3019
3020 2004-09-03 Akim Demaille <akim@epita.fr>
3021
3022 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
3023 invoked, yydestruct the lookahead.
3024 * tests/calc.at (Calculator $1): Update the expected lengths of
3025 traces: there is an added line for the discarded lookahead.
3026 * doc/bison.texinfo (Destructor Decl): Some rewording.
3027 Define "discarded" symbols.
3028
3029 2004-09-02 Akim Demaille <akim@epita.fr>
3030
3031 * data/lalr1.cc (translate_, destruct_): No reason to be static.
3032
3033 2004-09-02 Akim Demaille <akim@epita.fr>
3034
3035 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
3036 (YYDSYMPRINTF): Rename as...
3037 (YY_SYMBOL_PRINT): this.
3038 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
3039 two.
3040 Use it instead of direct symprint_ calls.
3041 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
3042 one.
3043
3044 2004-09-02 Akim Demaille <akim@epita.fr>
3045
3046 * data/lalr1.cc (b4_yysymprint_generate): New.
3047 (symprint_): New member function, defined when YYDEBUG.
3048 Use it consistently instead of token/nterm debugging output by
3049 hand.
3050 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
3051 %printer calls to use cdebug_ when using lalr1.cc.
3052
3053 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
3054
3055 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
3056 with #ifdef YYDEBUG.
3057
3058 2004-08-26 Akim Demaille <akim@epita.fr>
3059
3060 * doc/bison.texinfo (Implementing Loops): Rename as...
3061 (Implementing Gotos/Loops): this.
3062
3063 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
3064
3065 Adjust to latest gnulib.
3066 * bootstrap (gnulib_modules): Add xalloc-die.
3067 Set LC_ALL=C so that file names sort consistently.
3068 Prefer the gnulib copies of gettext.m4, glibc21.m4,
3069 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
3070 uintmax_t.m4, ulonglong.m4.
3071 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
3072 po.m4 since we are now using _gl.m4 instead.
3073
3074 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
3075
3076 * src/scan-action.l: Remove. Scanning of semantic actions is
3077 handled in scan-gram.l.
3078
3079 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
3080
3081 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
3082
3083 * src/location.h (struct): The file member is a uniqstr.
3084 (equal_boundaries): Use UNIQSTR_EQ for comparison.
3085
3086 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
3087
3088 Fix bug with non-%union parsers that have printers or destructors,
3089 which led to a Bison core dump. Reported by Peter Fales in
3090 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
3091
3092 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
3093 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
3094 not to our own type.
3095 * src/output.c (symbol_destructors_output, symbol_printers_output):
3096 Don't assume %union.
3097 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
3098 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
3099 UNION-FLAG. All callers changed.
3100 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
3101 Use type char, not unsigned int, when declaring an array of char;
3102 this lets us remove a cast.
3103 (Printers and Destructors): Add non-%union test cases.
3104
3105 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3106
3107 * doc/bison.texinfo: Minor editorial changes, mostly to the new
3108 GLR writeups. E.g., avoid frenchspacing and the future tense,
3109 change "lookahead" to "look-ahead", and change "wrt" to "with
3110 respect to".
3111
3112 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3113
3114 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
3115 New sections, split off from the GLR Parsers section. Put the new
3116 Simple GLR Parser near the start of the GLR section, for clarity.
3117 Rewrite connective text.
3118
3119 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
3120
3121 * doc/bison.texinfo (Simple GLR Parsers): New section.
3122
3123 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3124
3125 * NEWS, TODO, doc/bison.texinfo:
3126 Use "look-ahead" instead of "lookahead", to be consistent.
3127 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
3128 while we're fixing "look-ahead".
3129 * src/conflicts.c (shift_set): Renamed from shiftset.
3130 (look_ahead_set): Renamed from lookaheadset.
3131 * src/print.c: Likewise.
3132 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
3133 name for "lookahead".
3134 (report_types, usage): Likewise.
3135 * src/getargs.h (report_look_ahead_tokens): Renamed from
3136 report_lookaheads.
3137 * src/lalr.c (compute_look_ahead_tokens): Renamed from
3138 compute_lookaheads.
3139 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
3140 (look_ahead_tokens_print): Renamed from lookaheads_print.
3141 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
3142 state_rule_lookaheads_print.
3143 * src/state.h: Likewise.
3144 (reductions.look_ahead_tokens): Renamed from lookaheads.
3145 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
3146 AT_DATA_LOOKAHEADS_GRAMMAR.
3147
3148 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
3149
3150 * README: Update location of patched M4 distribution.
3151
3152 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
3153
3154 Don't assume the C++ compiler takes the same arguments as the C compiler
3155 (trivial change).
3156 * configure.ac (O0CXXFLAGS): New var.
3157 * tests/atlocal.in (CXXFLAGS): Use it.
3158
3159 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
3160
3161 Fix some "make check" problems with C++ reported by
3162 Albert Chin-A-Young for Tru64 C++ in this thread:
3163 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
3164
3165 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
3166 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3167 Output to a .cc file for C++, not to a .c file.
3168 * tests/calc.at (AT_CHECK_CALC): Likewise.
3169 * tests/regression.at (AT_CHECK_DANCER): Likewise.
3170 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
3171
3172 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
3173
3174 * tests/calc.at, tests/actions.at: Workaround for SGI
3175 C++ compiler. (trivial change)
3176
3177 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
3178
3179 Spent a few hours checking out which prerequisite versions the
3180 current sources actually require. I went all the way back to
3181 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
3182 a seemingly endless set of combinations of versions more recent
3183 than that. The bottom line is that the current sources require
3184 fairly recent versions of the build tools, and it'll be some work
3185 to change this.
3186 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
3187 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
3188 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
3189 Add comments explaining why those particular versions are
3190 currently needed.
3191
3192 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
3193 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
3194 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
3195
3196 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
3197 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
3198
3199 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
3200
3201 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
3202 0.11.5. Suggested by Bruno Haible.
3203 * bootstrap: Remove gettext version checking.
3204
3205 * doc/bison.texinfo (Decl Summary): Also mention that %union
3206 can depend on prerequisite types. Problem reported by Tim
3207 Van Holder.
3208
3209 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
3210
3211 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
3212 * README-alpha: Don't tell people not to package this.
3213
3214 * bootstrap: Don't assume $(...) works; use `...` instead.
3215 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
3216 gettext better.
3217
3218 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
3219 put into the -d output file, and mention what to do if YYSTYPE is
3220 defined as a macro.
3221
3222 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
3223
3224 Undo change made earlier today: it caused autopoint to not bring
3225 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
3226 autopoint's.
3227
3228 * bootstrap: Check that gettext version matches what's in
3229 configure.ac. Warn users to ignore robots.txt ERROR 404.
3230 * bootstrap: Undo today's earlier change (logged below).
3231 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
3232
3233 The gettext version checking is causing more trouble than it's
3234 curing; remove it. Problem reported by Paul Hilfinger.
3235
3236 * bootstrap: Issue a warning that one can expect a message
3237 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
3238 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
3239
3240 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
3241
3242 Ensure that the C++ compiler used for testing actually works on a
3243 simple test program; if not, skip the C++-related tests. Problem
3244 reported by Vin Shelton in:
3245 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
3246
3247 * m4/cxx.m4: New file.
3248 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
3249 * tests/atlocal.in (BISON_CXX_WORKS): Add.
3250 * tests/local.at (AT_COMPILE_CXX): Use it.
3251
3252 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3253
3254 * data/glr.c (yylloc): Output this macro even if locations are not
3255 being generated, as the GLR parser needs it even in that case.
3256 Problem reported by Troy A. Johnson
3257 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
3258
3259 * configure.ac (AC_INIT): Update to 1.875e.
3260
3261 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3262
3263 * NEWS: Version 1.875d.
3264 * configure.ac (AC_INIT): Likewise.
3265 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
3266
3267 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
3268 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
3269 lalr1.cc runs afoul of the first, and the last two are no longer
3270 supported by GCC 3.4.0.
3271 * README: Mention GNU m4 1.4 or later; mention m4 patches.
3272 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
3273
3274 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
3275
3276 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
3277 unsigned int, for compatibility with latest gnulib hash module.
3278 * src/state.c (state_hash, state_hasher): Likewise.
3279 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
3280 * src/uniqstr.c (hash_uniqstr): Likewise.
3281
3282 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
3283
3284 * NEWS: Unescaped newlines are no longer allowed in char & strings.
3285
3286 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
3287 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
3288 character and string literals.
3289 (unexpected_end): New function.
3290 (unexpected_eof): Use it.
3291 (unexpected_newline): New function.
3292 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
3293 actions.
3294
3295 * NEWS: Document %expect-rr.
3296
3297 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
3298 Fix typo by replacing $1 with $option.
3299 Remove more 'intl'-related files.
3300 Don't DEFUN AM_INTL_SUBDIR twice.
3301
3302 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
3303 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
3304 strtoul.c.
3305 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
3306 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
3307 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
3308 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
3309 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
3310 * src/.cvsignore: Add *.output.
3311
3312 * src/parse-gram.y: Put copyright notice inside %{ %} so it
3313 gets copied to the output file.
3314
3315 2004-04-28 Paul Eggert <eggert@twinsun.com>
3316
3317 Get files from the gnulib and po repositories, instead of relying
3318 on them being in our CVS. Upgrade to latest versions of gnulib
3319 and Automake.
3320
3321 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
3322 * bootstrap: Bootstrap from gnulib and po repositories.
3323 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
3324 * README-cvs: Document these changes. Remove version numbers from
3325 mentions of build tools, since they change so often. Mention Flex.
3326
3327 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
3328 (gl_USE_SYSTEM_EXTENSIONS): Add.
3329 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
3330 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
3331 does this for us.
3332 (AC_ISC_POSIX): Remove; we no longer support this
3333 ancient OS, as it gets in the way of latest Autoconf & gnulib.
3334 (AC_HEADER_STDC): Remove: we now assume C89 or better.
3335 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
3336 Do not check for C89 headers, except for locale.h which is used
3337 by the Yacc library and must port to K&R hosts.
3338 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
3339 Do not check for C89 functions, except for setlocale which is
3340 used by the Yacc library.
3341 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
3342 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
3343 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
3344 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
3345 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
3346 AM_GNU_GETTEXT): Remove; now done by:
3347 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
3348 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
3349 for us.
3350
3351 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
3352 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
3353 Define to empty, as gnulib.mk will do the rest for us.
3354 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
3355 for us.
3356 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
3357 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
3358
3359 * src/files.c: Include gnulib's xstrndup.h.
3360
3361 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
3362 (REALLOC): Use xnrealloc, for likewise.
3363 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
3364 (strnlen, memrchr): Remove decls; functions no longer used.
3365 Include <stpcpy.h>.
3366
3367 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
3368 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3369 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
3370 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
3371 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
3372 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
3373 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
3374 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
3375 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
3376 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
3377 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
3378 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3379 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
3380 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
3381 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
3382 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
3383 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
3384 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
3385 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
3386 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
3387 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
3388 Remove, as these files are now generated automatically
3389 by bootstrap or automake.
3390
3391 * po/ChangeLog: Remove: all but one entry was a duplicate
3392 of this file, and I moved that 2000-11-02 entry here.
3393
3394 * config/.cvsignore: Add Makefile, depcomp, install-sh.
3395 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
3396 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
3397 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
3398 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
3399 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
3400 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
3401 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
3402 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
3403 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
3404 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
3405 xstrndup.h.
3406 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
3407 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
3408 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
3409 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
3410 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
3411 * src/.cvsignore: Remove *_.c.
3412
3413
3414 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
3415 support it. (The latest stable gzip doesn't.)
3416
3417 2004-04-27 Paul Eggert <eggert@twinsun.com>
3418
3419 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
3420 case, as stos_ is now used by destructors due to the 2004-02-09
3421 change.
3422
3423 Remove more K&R C support.
3424 * lib/libiberty.y (PARAMS): Remove. All uses removed.
3425 * lib/subpipe.c (errno): Remove decl.
3426 Include <stdlib.h> unconditionally.
3427 (EXIT_FAILURE): Remove macro.
3428 * src/complain.c (vfprintf, strerror): Remove.
3429 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
3430 unconditionally.
3431 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
3432 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
3433 (strchr, strspn, memchr): Remove decls.
3434 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
3435 unconditionally. Do not declare perror.
3436 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
3437 unconditionally.
3438
3439 * src/complain.c (_): Remove useless defn, as system.h defines this.
3440
3441 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
3442 with latest obstack.h.
3443 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
3444 to procedure types, as obstack.h now does that for us.
3445 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
3446
3447 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
3448 so that this include file can stand alone.
3449 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
3450 does this now. Include subpipe.h first after config.h, to
3451 test whether it can stand alone.
3452
3453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
3454 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
3455 unused declaration.
3456
3457 * tests/synclines.at (%union synch line): Put a dummy member in
3458 the union, because empty unions aren't allowed in C. Caught
3459 by GCC 3.4.0.
3460
3461 2004-04-13 Jim Meyering <jim@meyering.net>
3462
3463 * src/conflicts.c (conflicts_print): Correct format string typo:
3464 use `%%' to produce literal `%'. (trivial change)
3465
3466 2004-03-30 Paul Eggert <eggert@twinsun.com>
3467
3468 * src/getargs.c (version): Update copyright year to 2004.
3469
3470 * data/c.m4 (b4_int_type): Use 'short int' rather than
3471 'short', and similarly for 'long', 'unsigned', etc.
3472 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
3473 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
3474 yy_yypstack, yydumpstack): Likewise.
3475 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
3476 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
3477 Likewise.
3478 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
3479 yy_stack_print, yyparse): Likewise.
3480 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
3481 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
3482 * lib/bitset.c (bitset_print): Likewise.
3483 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
3484 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3485 * lib/bitsetv.c (bitsetv_dump): Likewise.
3486 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
3487 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
3488 Likewise.
3489 * src/LR0.c (allocate_itemsets): Likewise.
3490 * src/gram.h (rule_number, rule): Likewise.
3491 * src/lalr.h (goto_number): Likewise.
3492 * src/nullable.c (nullable_compute): Likewise.
3493 * src/output.c (prepare_rules): Likewise.
3494 * src/relation.c (relation_print, relation_digraph): Likewise.
3495 * src/relation.h (relation_node): Likewise.
3496 * src/state.h (state_number, transitions, errs, reductions,
3497 struct state): Likewise.
3498 * src/symtab.h (symbol_number, struct symbol): Likewise.
3499 * src/tables.c (vector_number, tally, action_number,
3500 default_goto, goto_actions): Likewise.
3501 * tests/existing.at (GNU Cim Grammar): Likewise.
3502 * tests/regression.at (Web2c Actions): Likewise.
3503
3504 * src/output.c (muscle_insert_short_int_table): Renamed from
3505 muscle_insert_short_table. All uses changed.
3506
3507 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3508
3509 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
3510 (declaration): Replace expected_conflicts with expected_sr_conflicts.
3511 Add %expect-rr rule.
3512
3513 * src/scan-gram.l: Recognize %expect-rr.
3514
3515 * src/conflicts.h (expected_sr_conflicts): Rename from
3516 expected_conflicts.
3517 (expected_rr_conflicts): Declare.
3518
3519 * src/conflicts.c (expected_sr_conflicts): Rename from
3520 expected_conflicts.
3521 (expected_rr_conflicts): Define.
3522 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
3523 for GLR parsers.
3524 Use expected_sr_conflicts in place of expected_conflicts.
3525 Warn if expected_rr_conflicts used in non-GLR parser.
3526
3527 * doc/bison.texinfo: Add documentation for %expect-rr.
3528
3529 2004-03-08 Paul Eggert <eggert@gnu.org>
3530
3531 Add support for hex token numbers. Suggested by Odd Arild Olsen in
3532 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
3533
3534 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
3535 in lalr1.cc.
3536 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
3537 * src/scan-gram.l (scan_integer): New function.
3538 ({int}): Use it.
3539 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
3540 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
3541 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
3542 Say "long int", not "long", for uniformity with GNU style.
3543
3544 2004-02-25 Paul Eggert <eggert@twinsun.com>
3545
3546 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
3547 compilers. This fixes a problem with Intel's C++ compiler being
3548 chatty, reported by Guido Trentalancia in
3549 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
3550
3551 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
3552
3553 Support %destructor and merge error locations in lalr1.cc.
3554
3555 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
3556 (Parser::stos_): Define unconditionally.
3557 (Parser::destruct_): New method. Generate its body with
3558 b4_yydestruct_generate.
3559 (Parser::error_start_): New attribute.
3560 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
3561 token which are discarded.
3562 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
3563 error_start_ when erroneous token are discarded.
3564 (Parser::parse) <yyerrlab1>: Compute the location of the error
3565 token so that it covers all the discarded tokens.
3566 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
3567 it can be called with `%skeleton "lalr1.cc"', and do that.
3568
3569 2004-02-02 Paul Eggert <eggert@twinsun.com>
3570
3571 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
3572 $(top_srcdir)/lib and ../lib. This fixes a bug reported
3573 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
3574 There's no need to mention top_builddir since Automake does that
3575 for us.
3576 (INCLUDES): Remove, as Automake says it's obsolescent.
3577 Contents migrated into AM_CPPFLAGS as described above.
3578 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
3579
3580 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3581
3582 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
3583 (yyreportSyntaxError): Handle case where lookahead token is
3584 YYEMPTY.
3585
3586 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3587
3588 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
3589 resulting parsers are compilable with C++.
3590
3591 2003-12-23 Paul Eggert <eggert@twinsun.com>
3592
3593 * config/depcomp, config/install-sh: Sync with Automake 1.8.
3594 * src/output.c (output_skeleton): Rename local var.
3595 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
3596 Bison tokens, as this runs afoul of the 2003-10-07 change that
3597 disallowed NUL bytes in character constants or string literals.
3598
3599 * tests/local.at: Require Autoconf 2.59's Autotest.
3600 * tests/testsuite.at: Don't include local.at, since we now assume
3601 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
3602 including it.
3603 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
3604 multiple inclusion warnings.
3605
3606 2003-12-02 Akim Demaille <akim@epita.fr>
3607
3608 * doc/bison.texinfo (How Can I Reset the Parser): More about start
3609 conditions.
3610 From Bruno Haible.
3611
3612 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
3613
3614 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
3615
3616 2003-10-07 Paul Eggert <eggert@twinsun.com>
3617
3618 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
3619 if testsuite doesn't exist.
3620
3621 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
3622 literals, unfortunately.
3623 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
3624 Complain about NUL bytes in character constants or string literals.
3625
3626 2003-10-05 Paul Eggert <eggert@twinsun.com>
3627
3628 * NEWS: Don't document %no-default-prec, as it's still
3629 too experimental.
3630 * doc/bison.texinfo: Document %no-default-prec only if
3631 the defaultprec flag is set. Normally it's not.
3632
3633 2003-10-04 Paul Eggert <eggert@twinsun.com>
3634
3635 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
3636 non-modifiable lvalue, instead of a modifiable one.
3637 * doc/bison.texinfo (Actions): Document that $$ can
3638 be assigned to. Do not claim that $$ and $N are
3639 array element references: user code should not rely on this.
3640
3641 2003-10-01 Paul Eggert <eggert@twinsun.com>
3642
3643 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
3644 (grammar_declaration): Use it.
3645 * src/scan-gram.l: New token %no-default-prec.
3646 * tests/conflicts.at: Revamp tests to use %no-default-prec.
3647 * NEWS, doc/bison.texinfo: Document the above.
3648
3649 2003-10-01 Akim Demaille <akim@epita.fr>
3650
3651 VCG no longer supports long_straight_phase.
3652
3653 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
3654 * src/print_graph.c (print_graph): Adjust.
3655
3656 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
3657 and Paul Eggert <eggert@twinsun.com>
3658
3659 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
3660 Table of Symbols): Document %default-prec.
3661 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
3662 (grammar_declaration): Set default_prec on %default-prec.
3663 * src/scan-gram.l (%default-prec): New token.
3664 * src/reader.h (default_prec): New flag.
3665 * src/reader.c: Likewise.
3666 (packgram): Handle it.
3667 * tests/conflicts.at (%default-prec without %prec,
3668 %default-prec with %prec, %default-prec 1): New tests.
3669
3670 2003-09-30 Paul Eggert <eggert@twinsun.com>
3671
3672 * tests/testsuite.at: Include local.at, not input.at, fixing
3673 a typo in the 2003-08-25 patch.
3674
3675 2003-08-27 Akim Demaille <akim@epita.fr>
3676
3677 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
3678 GCC warnings.
3679
3680 2003-08-26 Akim Demaille <akim@epita.fr>
3681
3682 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
3683 "<\#" to avoid magic from Gnus when posting parts of this script.
3684
3685 2003-08-26 Akim Demaille <akim@epita.fr>
3686
3687 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
3688 (Parser::parse): here.
3689 Adjust: nerrs and errstatus is now replaced by...
3690 (Parser::nerrs_, Parser::errstatus_): New.
3691
3692 2003-08-25 Akim Demaille <akim@epita.fr>
3693
3694 * config/announce-gen, Makefile.cfg: New.
3695 * Makefile.am: Adjust.
3696 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
3697 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
3698
3699 2003-08-25 Akim Demaille <akim@epita.fr>
3700
3701 When reducing initial empty rules, Bison parser read an initial
3702 location that is not defined. This results in garbage, and that
3703 affects Bison's own parser. Therefore we need (i) to extend Bison
3704 to support a means to initialize this location, and (ii) to use
3705 this CVS Bison to fix CVS Bison's parser.
3706
3707 * src/reader.h, reader.c (epilogue_augment): Remove, replace
3708 with...
3709 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
3710 * src/parse-gram.y: Adjust.
3711 (%initial-action): New.
3712 (%error-verbose): Since we require CVS Bison, there is no reason
3713 not to use it.
3714 * src/scan-gram.l: Adjust.
3715 * src/Makefile.am (YACC): New, to make sure we use our own parser.
3716 * data/yacc.c (yyparse): Use b4_initial_action.
3717
3718 2003-08-25 Akim Demaille <akim@epita.fr>
3719
3720 * doc/bison.texinfo: Don't promote stdout for error messages.
3721
3722 2003-08-25 Akim Demaille <akim@epita.fr>
3723
3724 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
3725 From Alexandre Duret-Lutz.
3726
3727 2003-08-25 Akim Demaille <akim@epita.fr>
3728
3729 Version 1.875c.
3730
3731 2003-08-25 Akim Demaille <akim@epita.fr>
3732
3733 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
3734 Use them.
3735
3736 2003-08-25 Akim Demaille <akim@epita.fr>
3737
3738 * data/lalr1.cc (Parser::reduce_print_): New.
3739 Use it.
3740
3741 2003-08-25 Akim Demaille <akim@epita.fr>
3742
3743 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
3744 error recovery loops. This patch is based on
3745 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
3746 Also, augment the similarity between lalr1.cc and yacc.c.
3747 Note: the locations of error recovery rules are not correct yet.
3748
3749 * data/lalr1.cc: Comment changes to augment the similarity between
3750 lalr1.cc and yacc.c.
3751 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
3752 (yyerrlab1): Remove, but where it used to be (now the bottom part of
3753 yyerrlab), when hitting EOF, pop the whole stack here instead of
3754 merely falling thru the default error handling mechanism.
3755 (yyerrorlab): New label, with the old contents of YYERROR,
3756 plus the following change: pop the stack of rhs corresponding
3757 to the production that invoked YYERROR. That is how Yacc
3758 behaves (required by POSIX).
3759 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
3760 fail.
3761
3762 2003-08-25 Akim Demaille <akim@epita.fr>
3763
3764 Tune local.at so that people can "autom4te -l autotest calc.at -o
3765 calc" for instance, to extract a sub test suite.
3766
3767 * tests/testsuite.at: Move the initialization, Autotest version
3768 requirement, and AT_TESTED invocation into...
3769 * tests/local.at: here.
3770 * tests/testsuite.at: Include it for compatibility with Autoconf
3771 2.57.
3772 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
3773 be ignore.
3774
3775 2003-08-04 Paul Eggert <eggert@twinsun.com>
3776
3777 Rework code slightly to avoid gcc -Wtraditional warnings.
3778 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
3779 The returned value is now stored in *YY0. All callers changed.
3780 * src/output.c (merge_output): Adjust to the above change.
3781
3782 2003-07-26 Paul Eggert <eggert@twinsun.com>
3783
3784 * data/glr.c (YYASSERT): New macro.
3785 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
3786 yyresolveStates, yyprocessOneStack):
3787 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
3788 Derived from a suggestion by Frank Heckenbach.
3789
3790 2003-07-25 Paul Eggert <eggert@twinsun.com>
3791
3792 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
3793 for portability to K&R C (after ansi2knr, presumably). See
3794 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
3795 by Frank Heckenbach, though I have omitted the structure-initialization
3796 part of his glr-knr.diff patch since I recall that the Portable
3797 C Compiler didn't require that change.
3798
3799 Let the user specify how to allocate and free memory.
3800 Derived from a suggestion by Frank Heckenbach in
3801 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
3802 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
3803 All uses of free, malloc, realloc changed to use these macros,
3804 and unnecessary casts removed.
3805 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
3806
3807 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
3808
3809 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
3810 use s.empty() rather than s == "" to test for empty string; see
3811 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
3812 (trivial change)
3813
3814 2003-06-25 Akim Demaille <akim@epita.fr>
3815
3816 * config/depcomp, config/install-sh: Update from masters.
3817
3818 2003-06-20 Paul Eggert <eggert@twinsun.com>
3819
3820 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
3821 and return properly parenthesized result.
3822 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
3823 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3824 Remove unnecessary parentheses from uses.
3825 * doc/bison.texinfo (Location Default Action): Describe the
3826 conventions for parentheses.
3827
3828 2003-06-19 Paul Eggert <eggert@twinsun.com>
3829
3830 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
3831 yyreportTree): Do not assume that size_t is the same width as int,
3832 when printing sizes. Print sizes using an unsigned format.
3833 Problem reported by Frank Heckenbach in
3834 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
3835
3836 Port to Forte Developer 7 C compiler.
3837 * data/glr.c (struct YYLTYPE): If locations are not being used,
3838 declare a single dummy member, as empty structs do not conform
3839 to the C standard.
3840 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
3841 the Forte Developer 7 C compiler complains that end-of-loop
3842 code is not reached.
3843
3844 2003-06-17 Paul Eggert <eggert@twinsun.com>
3845
3846 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
3847 avoid warnings from picky compilers about redefinition of PARAMS.
3848
3849 2003-06-17 Paul Eggert <eggert@twinsun.com>
3850
3851 Version 1.875b.
3852
3853 * NEWS: Document 1.875b.
3854
3855 * lib/bbitset.h: Do not include config.h; that's the includer's job.
3856 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
3857 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
3858 Don't use 'index' in comments, as it's a builtin fn on some hosts.
3859 * lib/bitset_stats.c: Include gettext.h unconditionally, as
3860 per recent gettext manual's suggestion.
3861 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
3862 Use prototypes, not old-style definitions.
3863 * lib/lbitset.c (lbitset_unused_clear): Likewise.
3864 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
3865 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
3866 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
3867 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
3868 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
3869 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
3870 vbitset_or_and_cmp, vbitset_copy): Likewise.
3871
3872 * lib/libiberty.h: Do not include config.h; that's the includer's job.
3873 Do not include <stdlib.h>.
3874 (PARAMS): Define unconditionally for C89.
3875 (ATTRIBUTE_NORETURN): Remove.
3876 (ATTRIBUTE_UNUSED): Define unconditionally.
3877
3878 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
3879 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
3880 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
3881 * lib/vbitset.c, lib/vbitset.h: New files.
3882 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3883 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
3884 from libbitset.
3885
3886 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
3887 `How Can I Reset @code{yyparse}', since texinfo does not allow
3888 arbitrary @ in node names.
3889
3890 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
3891 shouldn't be needed according to the gettext 0.12.1 documentation
3892 but which seem to be needed anyway: codeset.m4 glibc21.m4
3893 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
3894 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
3895 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
3896
3897 * lib/.cvsignore: Add stdbool.h.
3898 * m4/.cvsignore: Add nls.m4, po.m4.
3899
3900 Upgrade to CVS gnulib.
3901 * stdbool_.h: File renamed from stdbool.h.in.
3902 * configure.ac (AM_STDBOOL_H): Invoke this instead of
3903 AC_HEADER_STDBOOL.
3904 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
3905 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
3906 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
3907 (MOSTLYCLEANFILES): New var.
3908 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
3909 (stdbool.h): New rule.
3910 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
3911 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
3912 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
3913 m4/quote.m4: Upgrade to today's gnulib.
3914
3915 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
3916 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
3917 the tests right now.
3918 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
3919 yyerror are declared before use; C99 requires this.
3920
3921 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3922
3923 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
3924 first.
3925 (yyrecoverSyntaxError): Correct the logic for setting and testing
3926 yyerrState.
3927 Correct comment on handling EOF.
3928 Allow states with only a default reduction, rather than failing
3929 (I can't quite reconstruct why these were not allowed before).
3930
3931 Fixes to avoid problem that $-N rules in GLR parsers can cause
3932 buffer overruns, corrupting state.
3933
3934 * src/output.c (prepare_rules): Output max_left_semantic_context
3935 definition.
3936 * src/reader.h (max_left_semantic_context): New variable declaration.
3937 * src/scan-gram.l (max_left_semantic_context): Define.
3938 (handle_action_dollar): Update max_left_semantic_context.
3939 * data/glr.c (YYMAXLEFT): New definition.
3940 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
3941 (yyresolveAction): Ditto.
3942
3943 Fixes to problems with location handling in GLR parsers reported by
3944 Frank Heckenbach (2003/06/05).
3945
3946 * data/glr.c (YYLTYPE): Make trivial if locations not used.
3947 (YYRHSLOC): Add parentheses, and define only if locations used.
3948 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
3949 locations not used.
3950 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
3951 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
3952
3953 * tests/cxx-type.at: Exercise location information; update tests
3954 to differentiate output with and without locations.
3955 Remove forward declarations of yylex and yyerror---caused errors
3956 because default YYLTYPE not yet defined.
3957 Change semantic actions to compute strings, rather than printing
3958 them directly (to test proper passing of semantics values). Change
3959 output to prefix notation and update test data and expected results.
3960 (yylex): Track locations.
3961 (stmtMerge): Return value rather than printing, and include arguments
3962 in value.
3963
3964 2003-06-03 Paul Eggert <eggert@twinsun.com>
3965
3966 Avoid warnings generated by GCC 2.95.4 when Bison is
3967 configured with --enable-gcc-warnings.
3968 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
3969 yy::]b4_parser_class_name[::translate_,
3970 yy::Stack::operator[] (unsigned),
3971 yy::Stack::operator[] (unsigned) const,
3972 yy::Slice::operator[] (unsigned),
3973 yy::Slice::operator[] (unsigned) const):
3974 Rename local vars to avoid warnings.
3975 * tests/glr-regression.at (Improper handling of embedded actions
3976 and $-N in GLR parsers): Remove unused local variable from yylex.
3977 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
3978 (void) as arg when not pure, since we now assume C89 when building
3979 Bison. Pacify GCC by using parameter.
3980
3981 2003-06-02 Paul Eggert <eggert@twinsun.com>
3982
3983 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
3984 yy::Location::lines, yy::Location::columns): Rename arguments
3985 to avoid shadowing; this removes a warning generated by GCC 3.3.
3986
3987 2003-06-01 Paul Eggert <eggert@twinsun.com>
3988
3989 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
3990 to g++, as GCC 3.3 complains if you do it.
3991 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
3992 everything that WARNING_CFLAGS has, except omit warnings
3993 not suitable for C++.
3994 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
3995 * tests/atlocal.in (CXXFLAGS): New var.
3996 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
3997
3998 Fix a GLR parser bug I reported in February; see
3999 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
4000 The problem was that GLR parsers did not conform to the C standard,
4001 because actions like { $1 = $2 + $3; } expanded to expressions
4002 that invoked YYFILL in separate subexpressions, and YYFILL assigned
4003 to a local variable. The C standard says that expressions
4004 like (var = f ()) + (var = f ()) have undefined behavior.
4005 Another problem was that GCC sometimes issues warnings that
4006 yyfill and its parameters are unused.
4007
4008 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
4009 as possibly unused.
4010 (yyfill): New function.
4011 (YYFILL): Use it.
4012 (yyuserAction): Change type of yynormal to bool, so that it matches
4013 the new yyfill signature. Mark it as possibly unused.
4014
4015
4016 Follow up on a bug I reported in February, where a Bison-generated
4017 parser can loop. Provide a test case and a fix for yacc.c. I
4018 don't have a fix for lalr1.cc or for glr.c, unfortunately.
4019 The original bug report is in:
4020 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
4021
4022 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
4023 macro's size was becoming unwieldy.
4024 (yyerrlab): Do not discard an empty lookahead symbol, as this
4025 might destroy garbage.
4026 (yyerrorlab): New label, with the old contents of YYERROR,
4027 plus the following change: pop the stack of rhs corresponding
4028 to the production that invoked YYERROR. That is how Yacc
4029 behaves, and POSIX requires this behavior.
4030 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
4031 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
4032 Define 'alarm' to do nothing if unistd.h is not available.
4033 Add a new rule "exp: '-' error;" to test the above change to
4034 data/yacc.c. Use 'alarm' to abort any test taking longer than
4035 10 seconds, as it's probably looping.
4036 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
4037 Also, the new yacc.c generates two fewer diagnostics for an
4038 existing test.
4039
4040 2003-05-24 Paul Eggert <eggert@twinsun.com>
4041
4042 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
4043 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
4044 This fixes a problem reported by John Bowman when the Compaq/HP
4045 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
4046 -ansi -Wall -gall).
4047 * data/yacc.c (union yyalloc): Likewise.
4048 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
4049
4050 Switch from 'int' to 'bool' where that makes sense.
4051
4052 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
4053 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
4054 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
4055 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
4056 Return or accept bool, not int. All callers changed.
4057 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
4058 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
4059 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
4060 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
4061 bitset_or_and_cmp_): Likewise.
4062 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
4063 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
4064 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
4065 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
4066 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
4067 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
4068 bitset_stats_or_and_cmp): Likewise.
4069 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
4070 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
4071 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
4072 ebitset_xor_cmp): Likewise.
4073 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
4074 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
4075 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
4076 lbitset_xor_cmp): Likewise.
4077 * lib/bbitset.h: Include <stdbool.h>.
4078 (struct bitset_vtable): The following members now return bool, not
4079 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
4080 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
4081 or_and_cmp).
4082 * src/conflicts.c (count_rr_conflicts): Likewise.
4083 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
4084 All uses changed.
4085 * lib/ebitset.c (ebitset_obstack_init): Likewise.
4086 * lib/lbitset.c (lbitset_obstack_init): Likewise.
4087 * src/getargs.c (debug_flag, defines_flag, locations_flag,
4088 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4089 graph_flag): Likewise.
4090 * src/getargs.h (debug_flag, defines_flag, locations_flag,
4091 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
4092 graph_flag): Likewise.
4093 * src/output.c (error_verbose): Likewise.
4094 * src/output.h (error_verbose): Likewise.
4095 * src/reader.c (start_flag, typed): Likewise.
4096 * src/reader.h (typed): Likewise.
4097 * src/getargs.c (LOCATIONS_OPTION): New constant.
4098 (long_options, getargs): Use it.
4099 * src/lalr.c (build_relations): Use bool, not int.
4100 * src/nullable.c (nullable_compute): Likewise.
4101 * src/print.c (print_reductions): Likewise.
4102 * src/tables.c (action_row, pack_vector): Likewise.
4103 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
4104 * src/output.c (prepare): Use it.
4105 * src/output.c (token_definitions_output,
4106 symbol_destructors_output, symbol_destructors_output): Use string,
4107 not boolean integer, to keep track of whether to output separator.
4108 * src/print_graph.c (print_core): Likewise.
4109 * src/state.c (state_rule_lookaheads_print): Likewise.
4110
4111 * config/install-sh: Sync from automake 1.7.5.
4112
4113 2003-05-14 Paul Eggert <eggert@twinsun.com>
4114
4115 * src/parse-gram.y (rules_or_grammar_declaration): Require a
4116 semicolon after a grammar declaration, in the interest of possible
4117 future changes to the Bison input language.
4118 Do not allow a stray semicolon at the start of the grammar.
4119 (rhses.1): Allow one or more semicolons after any rule, including
4120 just before "|" as required by POSIX.
4121 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
4122 grammar.
4123
4124 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
4125
4126 %parse-param support for lalr1.cc.
4127
4128 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
4129 b4_cc_constructor_calls, b4_cc_constructor_call,
4130 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
4131 definitions.
4132 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
4133 parse-param arguments.
4134 (yy::b4_parser_class_name): Declare instance variables to
4135 hold parse-param arguments.
4136 * tests/calc.at: s/value/semantic_value/ because value clashes
4137 with a member of yy::b4_parser_class_name. Adjust C++ code
4138 to handle %parse-param. Enable %parse-param test in C++.
4139
4140 2003-05-12 Paul Eggert <eggert@twinsun.com>
4141
4142 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
4143 English a bit. Fix fclose typo. Change "const char" to "char
4144 const", and use ANSI C rather than K&R for "main". Suggest
4145 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
4146 and suggest yy_switch_to_buffer.
4147
4148 2003-05-05 Paul Eggert <eggert@twinsun.com>
4149
4150 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
4151 C89. This avoids a diagnostic on compilers that define __STDC__
4152 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
4153 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
4154
4155 2003-05-03 Paul Eggert <eggert@twinsun.com>
4156
4157 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
4158 Do not overrun array bounds.
4159 This should fix a bug reported today by Olatunji Oluwabukunmi in
4160 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
4161
4162 2003-04-29 Akim Demaille <akim@epita.fr>
4163
4164 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
4165 * src/getargs.c, src/getargs.h: here, as bool, not int.
4166 (nondeterministic_parser): New.
4167 * src/parse-gram.y, src/scan-gram.l: Support
4168 %nondeterministic-parser.
4169 * src/output.c (prepare): Use nondeterministic_parser instead
4170 of glr_parser where appropriate.
4171 * src/tables.c (conflict_row, action_row, save_row)
4172 (token_actions, token_actions, pack_vector): Ditto.
4173
4174 2003-04-29 Akim Demaille <akim@epita.fr>
4175
4176 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
4177
4178 2003-04-29 Akim Demaille <akim@epita.fr>
4179
4180 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
4181 with %pure-parser and %locations to exercise the patch from Yakov
4182 Markovitch below.
4183
4184 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
4185
4186 * data/yacc.c: (b4_lex_param): Corrected for the case where
4187 %lex-param is provided and %pure-parser isn't.
4188
4189 2003-04-27 Paul Eggert <eggert@twinsun.com>
4190
4191 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
4192 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
4193 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
4194 if it is not defined.
4195 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
4196
4197 2003-04-26 Paul Eggert <eggert@twinsun.com>
4198
4199 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
4200 Declare to be of type suitable for the ninf value itself, not of
4201 type suitable for the corresponding table, since the latter might
4202 be unsigned but the ninf value might be negative. This fixes a
4203 bug reported by Alexandre Duret-Lutz in
4204 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
4205
4206 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
4207 invokes it. We shouldn't invoke it twice because it will attempt
4208 to put error.o in the archive twice. This fixes a glitch reported
4209 by Martin Mokrejs in
4210 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
4211
4212 2003-04-21 Paul Eggert <eggert@twinsun.com>
4213
4214 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
4215 to gnulib.
4216
4217 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
4218
4219 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
4220 Fix obvious typo that results in uncompilable GLR parsers
4221 when both %pure-parser and %locations are used. (trivial change)
4222
4223 2003-04-17 Paul Eggert <eggert@twinsun.com>
4224
4225 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
4226 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
4227 Do not insert the expected token via unput, as this runs afoul
4228 of a POSIX-compatibility bug in flex 2.5.31.
4229 All uses changed to BEGIN the parent state,
4230 since we no longer insert the expected token via unput.
4231 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
4232 that is no longer emitted after the above change.
4233
4234 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
4235 the first one. This change is from Paul Hilfinger, and it fixes
4236 regression reported by Werner Lemberg in
4237 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4238
4239 (resolve_sr_conflict): Don't invoke state_errs_set
4240 unless one or more tokens have been explicitly made errors.
4241 Otherwise, the above change causes Bison to abort.
4242
4243 * tests/existing.at (GNU pic Grammar): New test case, taken from
4244 Lemberg's email.
4245
4246 2003-03-31 Akim Demaille <akim@epita.fr>
4247
4248 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
4249
4250 2003-03-31 Akim Demaille <akim@epita.fr>
4251
4252 * src/output.c (prepare_symbols): Avoid trailing spaces in the
4253 output.
4254
4255 2003-03-31 Akim Demaille <akim@epita.fr>
4256
4257 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
4258 From Paul Hilfinger.
4259
4260 2003-03-29 Akim Demaille <akim@epita.fr>
4261
4262 * m4/error.m4: Do not put under dynamic conditions some code which
4263 expansion is under static control.
4264
4265 2003-03-29 Akim Demaille <akim@epita.fr>
4266
4267 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
4268
4269 2003-03-29 Akim Demaille <akim@epita.fr>
4270
4271 * doc/bison.texinfo (Strings are Destroyed): New.
4272
4273 2003-03-13 Paul Eggert <eggert@twinsun.com>
4274
4275 * .cvsignore: Add configure.lineno.
4276 * src/.cvsignore: Add yacc.
4277 * tests/.cvsignore: Add testsuite.log.
4278 * doc/fdl.texi: Sync with latest FSF version.
4279
4280 2003-03-12 Paul Eggert <eggert@twinsun.com>
4281
4282 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
4283 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
4284 cursor, instead of leaving it undefined. This fixes a bug
4285 reported by Tim Van Holder in
4286 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
4287 * tests/input.at (Torturing the Scanner): Test the scanner on
4288 an empty input file, which was Tim Van Holder's test case.
4289
4290 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
4291 <sys/resource.h> can be included, include sys/time.h and
4292 sys/times.h first, if available. This works around the SunOS
4293 4.1.4 porting bug reported by Bruce Becker in
4294 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
4295
4296 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
4297 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
4298 AC_HEADER_SYS_WAIT.
4299
4300 Merge changes from gnulib. This was prompted because the CVS
4301 snapshot didn't build on Solaris 7 due to strnlen problems.
4302
4303 These changes need to be merged back into gnulib:
4304 * lib/hash.c: Include <stdbool.h> unconditionally.
4305 * m4/onceonly.m4 (m4_quote): New macro.
4306 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
4307 Quote AC_FOREACH variable-expansions properly.
4308 The 2003-01-03 obstack.h change also needs merging.
4309 {end of changes requiring merging}
4310
4311 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4312 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
4313 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
4314 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
4315 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
4316 New files, imported from gnulib.
4317 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
4318 above.
4319
4320 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
4321 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
4322 gnulib sources.
4323
4324 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
4325 Add.
4326 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
4327 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
4328 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
4329 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
4330 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
4331 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
4332 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
4333 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
4334 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
4335 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
4336 (jm_PREREQ_ARGMATCH): Remove.
4337 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
4338 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
4339
4340 * src/system.h: Include <stdbool.h> unconditionally.
4341
4342 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
4343 assuming at least C89 in the bitset code for some time now.
4344
4345 2003-03-03 Akim Demaille <akim@epita.fr>
4346
4347 * ro.po: New.
4348
4349 2003-03-02 Akim Demaille <akim@epita.fr>
4350
4351 * doc/bison.texinfo (Table of Symbols): Reactivate the
4352 documentation for %lex-param, and %parse-param.
4353
4354 2003-03-02 Akim Demaille <akim@epita.fr>
4355
4356 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
4357 generate verbose error messages.
4358 Use the number of tokens as an upper bound in yytname, as it
4359 cannot be a non terminal.
4360
4361 2003-03-02 Akim Demaille <akim@epita.fr>
4362
4363 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
4364 message.
4365
4366 2003-03-02 Akim Demaille <akim@epita.fr>
4367
4368 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
4369 Use them to exercise yycheck overrun.
4370 Based on Andrew Suffield's grammar.
4371
4372 2003-03-02 Akim Demaille <akim@epita.fr>
4373
4374 Create tests/local.at for Bison generic testing macros.
4375
4376 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
4377 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
4378 This new file.
4379 * tests/calc.at (AT_CHECK_CALC): Adjust.
4380 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
4381 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
4382 * tests/local.at: here.
4383 (AT_COMPILE_CXX): Tags the tests using it as c++.
4384 Ignore the test if CXX is not functional.
4385
4386 2003-03-01 Paul Eggert <eggert@twinsun.com>
4387
4388 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
4389 not loc->end, since loc->end might contain garbage and this leads
4390 to undefined behavior on some platforms.
4391 (id_loc, token_start): Use (IF_LINTed) initial values that do not
4392 depend on *loc, so that the reader doesn't give the the false
4393 impression that *loc is initialized.
4394 (<INITIAL>"%%"): Do not bother setting code_start, since its value
4395 does not survive the return.
4396
4397 2003-03-01 Akim Demaille <akim@epita.fr>
4398
4399 * src/scan-gram.l (code_start): Always initialize it when entering
4400 into yylex, as SC_EPILOGUE is activated *before* the corresponding
4401 yylex invocation. An alternative would be making it static, but
4402 then it starts with the second %%'s beginning, instead of its end.
4403
4404 2003-02-28 Paul Eggert <eggert@twinsun.com>
4405
4406 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
4407 around a UnixWare 7.1.1 porting bug reported by John Hughes in
4408 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
4409
4410 2003-02-26 Paul Eggert <eggert@twinsun.com>
4411
4412 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
4413 Remove Sequent/Pyramid discussion (nobody uses them any more).
4414 Merge VMS and MS-DOS discussion; these ports may well be dead
4415 but let's keep mentioning them for now. Put <> around email
4416 addresses. Add copyright notice.
4417
4418 2003-02-24 Paul Eggert <eggert@twinsun.com>
4419
4420 * data/glr.c (yy_reduce_print): yylineno -> yylno,
4421 to avoid collision with flex use of yylineno.
4422 Problem reported by Bruce Lilly in
4423 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
4424 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4425 * data/yacc.c (yy_reduce_print): Likewise.
4426
4427 * config/depcomp: Sync with Automake 1.7.3.
4428
4429 2003-02-21 Akim Demaille <akim@epita.fr>
4430
4431 * data/lalr1.cc: Use temporary variables instead of casts to
4432 change integer types.
4433 Suggested by Paul Eggert.
4434
4435 2003-02-21 Akim Demaille <akim@epita.fr>
4436
4437 * doc/bison.texinfo: Use "location" consistently to refer to @n,
4438 to avoid confusions with lalr1.cc's notion of Position.
4439 Suggested by Paul Eggert.
4440
4441 2003-02-20 Akim Demaille <akim@epita.fr>
4442
4443 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
4444 before initial_columns.
4445 (location.hh): Use consistent variable names when defining the
4446 operator<<.
4447 Use "last" so that we subtract from Positions, not from unsigned.
4448
4449 2003-02-20 Akim Demaille <akim@epita.fr>
4450
4451 * data/lalr1.cc (position.hh): New subfile, including the extended
4452 and Doxygen'ed documentation of class Position.
4453 (location.hh): Use it.
4454 Document a` la Doxygen.
4455 With the help of Benoit Perrot.
4456
4457 2003-02-20 Akim Demaille <akim@epita.fr>
4458
4459 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
4460 AT_YACC_IF.
4461 Redefine AT_YYERROR_SEES_LOC_IF using it.
4462 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
4463 not defined.
4464 Don't use the location in yy::Parser::error_ and
4465 yy::Parser::print_ when not %locations.
4466 Activate more lalr1.cc tests.
4467
4468 2003-02-19 Akim Demaille <akim@epita.fr>
4469
4470 * data/lalr1.cc: When displaying a line number, be sure to make it
4471 an int.
4472
4473 2003-02-19 Akim Demaille <akim@epita.fr>
4474
4475 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
4476 Remove, useless.
4477 (YYABORT, YYACCEPT, YYERROR): New.
4478 * tests/calc.at: Renable the lalr1.cc test.
4479
4480 2003-02-19 Akim Demaille <akim@epita.fr>
4481
4482 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
4483 error recovery, mixing with/without pops and discarding of the
4484 lookahead.
4485 Exercise YYERROR.
4486 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
4487
4488 2003-02-17 Paul Eggert <eggert@twinsun.com>
4489
4490 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
4491 * tests/testsuite.at (AT_COMPILE): Use them.
4492 This fixes the testsuite problem reported by Robert Lentz in
4493 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
4494
4495 2003-02-12 Paul Eggert <eggert@twinsun.com>
4496
4497 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
4498 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
4499 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
4500 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
4501 Check for malloc failure, for consistency with yacc.c.
4502 (yytname_size): Remove, for consistency with yacc.c.
4503
4504 The bug still remains in data/lalr1.cc, as I didn't have time
4505 to fix it there.
4506
4507 2003-02-06 Akim Demaille <akim@epita.fr>
4508
4509 * configure.ac (GXX): Rename as...
4510 (CXX): this, to keep the original Autoconf semantics.
4511 Require 2.57.
4512 * data/lalr1.cc: Fix b4_copyright invocations.
4513 If YYDEBUG is not defined, don't depend upon name_ being defined.
4514 (location.hh): Include string and iostream.
4515 (Position::filename): New member.
4516 (Position::Position ()): New.
4517 (operator<< (Position)): New.
4518 (operator- (Position, int)): New.
4519 (Location::first, Location::last): Rename as...
4520 (Location::begin, Location::end): these, to mock the conventional
4521 iterator names.
4522 (operator<< (Location)): New.
4523 * tests/atlocal.in (CXX): New.
4524 * tests/testsuite.at (AT_COMPILE_CXX): New.
4525 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
4526 locations in a more synthetic way.
4527 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
4528 lalr1.cc is used.
4529 Adjust the C locations to match those from Emacs: first column is
4530 column 0.
4531 Change all the expected results.
4532 Conform to the GCS: simplify the locations when applicable.
4533 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
4534 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
4535 these CPP macros with the m4 macros new defined by...
4536 (AT_CHECK_PUSHDEFS): this, i.e.:
4537 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
4538 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
4539 New macros.
4540 (AT_CHECK_POPDEFS): Undefine them.
4541 (AT_CHECK_CALC_LALR1_CC): New.
4542 Use it for the first lalr1.cc test.
4543
4544 2003-02-04 Akim Demaille <akim@epita.fr>
4545
4546 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
4547 Location as is defined.
4548
4549 2003-02-04 Akim Demaille <akim@epita.fr>
4550
4551 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
4552 name_ being defined.
4553
4554 2003-02-03 Paul Eggert <eggert@twinsun.com>
4555
4556 * src/gram.h (start_symbol): Remove unused decl.
4557
4558 Use more-consistent naming conventions for local vars.
4559
4560 * src/derives.c (derives_compute): Change type of local var from
4561 int to rule_number.
4562 * src/gram.c (grammar_rules_partial_print): Likewise.
4563 * src/print.c (print_core): Likewise.
4564 * src/reduce.c (reduce_grammar_tables): Likewise.
4565
4566 * src/gram.c (grammar_dump): Change name of item_number *
4567 local var from r to rp.
4568 * src/nullable.c (nullable_compute): Likewise.
4569
4570 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
4571
4572 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
4573 for symbol or symbol_number var.
4574 * src/reader.c (grammar_start_symbol_set): Likewise.
4575 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
4576 Likewise.
4577 * src/state.c (transitions_to): Likewise.
4578 * src/state.h: Likewise.
4579 * src/tables.c (symbol_number_to_vector_number): Likewise.
4580
4581 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
4582 char * var.
4583
4584 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
4585 var.
4586
4587 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
4588 var.
4589
4590 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
4591 Use str, not s, for char * var. Use ch, not c, for character var.
4592 Use size for size var.
4593
4594 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
4595 char * var.
4596 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
4597 uniqstr var.
4598 * src/uniqstr.h: Likewise.
4599
4600 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4601 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4602 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
4603 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
4604 param to have same name as that of enum, so that we don't use
4605 "s" to stand for a non-state.
4606
4607 2003-02-02 Akim Demaille <akim@epita.fr>
4608
4609 * src/scan-skel.l: Scan more than one inert character per yylex
4610 invocation.
4611
4612 2003-02-01 Paul Eggert <eggert@twinsun.com>
4613
4614 Version 1.875a.
4615
4616 * po/LINGUAS: Add ms.
4617
4618 2003-01-30 Akim Demaille <akim@epita.fr>
4619
4620 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
4621
4622 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4623
4624 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
4625 of $1.
4626
4627 Changes in response to error report by S. Eken: GLR mode does not
4628 handle negative $ indices or $ indices in embedded rules correctly.
4629 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
4630
4631 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
4632 (b4_rhs_location): Ditto.
4633 (yyfill): New function to copy from stack tree into array
4634 incrementally.
4635 (yyuserAction): Modify to allow incremental move of semantic values
4636 to rhs array when in GLR mode.
4637 Define YYFILL to use in user-defined actions to fill semantic array
4638 as needed.
4639 Remove dummy use of yystack, as there is now a guaranteed use.
4640 (yydoAction): Modify to allow incremental move of semantic values
4641 to rhs array when in GLR mode.
4642 (yyresolveAction): Ditto.
4643 (yyglrShiftDefer): Update comment.
4644 (yyresolveStates): Use X == NULL for pointers, not !X.
4645 (yyglrReduce): Ditto.
4646 (yydoAction): Ditto
4647
4648 * tests/glr-regr1.at: Rename to ...
4649 * tests/glr-regression.at: Add new regression test for the problems
4650 described above (adapted from S. Eken).
4651 Update copyright notice.
4652 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
4653 * tests/Makefile.am: Ditto.
4654
4655 2003-01-28 Paul Eggert <eggert@twinsun.com>
4656
4657 * data/lalr1.cc: Do not use @output_header_name@ unless
4658 b4_defines_flag is set. This fixes two bugs reported by
4659 Tim Van Holder in
4660 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
4661 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
4662
4663 2003-01-21 Paul Eggert <eggert@twinsun.com>
4664
4665 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
4666 we don't need to worry about yyerrlab1 being reported as an
4667 "unused label" by non-GCC C compilers. The downside is that if
4668 locations are used then a couple of statements are duplicated each
4669 time YYERROR is invoked, but the upside is that the warnings
4670 should vanish.
4671 (yyerrlab1): Move code to YERROR.
4672 (yyerrlab2): Remove. Change uses back to yyerrlab1.
4673 This reverts some of the 2002-12-27 change.
4674
4675 2003-01-17 Paul Eggert <eggert@twinsun.com>
4676
4677 * src/output.c (symbol_printers_output): Fix typo that led
4678 to core dump. Problem reported by Antonio Rus in
4679 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4680
4681 2003-01-13 Akim Demaille <akim@epita.fr>,
4682 Quoc Peyrot <chojin@lrde.epita.fr>,
4683 Robert Anisko <anisko_r@lrde.epita.fr>
4684
4685 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
4686 when the stacks contain one element, as the loop would otherwise
4687 free the last state, and then use the top state (the one we just
4688 popped). This means that the initial elements will not be freed
4689 explicitly, as is the case in yacc.c; it is not a problem, as
4690 these elements have fake values.
4691
4692 2003-01-11 Paul Eggert <eggert@twinsun.com>
4693
4694 * NEWS: %expect-violations are now just warnings, reverting
4695 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
4696 bootstrapping problem reported by Matthias Klose; see
4697 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
4698 * src/conflicts.c (conflicts_print): Likewise.
4699 * tests/conflicts.at (%expect not enough, %expect too much,
4700 %expect with reduce conflicts): Likewise.
4701 * doc/bison.texinfo (Expect Decl): Document this. Also mention
4702 that the warning is enabled if the number of conflicts changes
4703 (not necessarily increases).
4704
4705 * src/getargs.c (version): Update copyright year.
4706
4707 2003-01-09 Akim Demaille <akim@epita.fr>
4708
4709 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
4710
4711 2003-01-08 Paul Eggert <eggert@twinsun.com>
4712
4713 * Makefile.maint (WGETFLAGS):
4714 New macro, containing "-C off" to disable proxy caches.
4715 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
4716 (rel-check): Use $(WGET) instead of wget.
4717
4718 2003-01-06 Paul Eggert <eggert@twinsun.com>
4719
4720 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
4721 the GLR paper of Scott, Johnstone and Hussain.
4722
4723 2003-01-04 Paul Eggert <eggert@twinsun.com>
4724
4725 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
4726 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
4727 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
4728 (EXTRA_LIBRARIES): New var, for liby.a.
4729 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
4730 (EXTRA_SCRIPTS): New var, for yacc.
4731
4732 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
4733 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
4734 Problem reported by Nelson H. F. Beebe.
4735
4736 2003-01-03 Paul Eggert <eggert@twinsun.com>
4737
4738 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
4739 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
4740 when compiling Bison 1.875's `bitset bset = obstack_alloc
4741 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
4742
4743 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
4744 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
4745 grow to a huge size with typical invocation.
4746
4747 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
4748 Use the pattern recommended by Autoconf 2.57, except also protect
4749 against double-definition.
4750 * src/system.h: Likewise.
4751 Portability issues reported by Nelson H. F. Beebe.
4752
4753 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
4754 All uses changed. Provide a definition in both C and C++.
4755 (yytrue, yyfalse): Define even if defined (__cplusplus).
4756
4757 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
4758 Reported by Nelson H. F. Beebe.
4759
4760 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
4761
4762 2003-01-02 Paul Eggert <eggert@twinsun.com>
4763
4764 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
4765 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
4766 Bug reported by Nelson H. F. Beebe.
4767
4768 2003-01-01 Paul Eggert <eggert@twinsun.com>
4769
4770 * Version 1.875.
4771
4772 2002-12-30 Paul Eggert <eggert@twinsun.com>
4773
4774 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
4775 Moved here from...
4776 (<INITIAL>","): Here. This causes stray "," to be treated
4777 more uniformly.
4778
4779 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
4780 last brace in braced code when not in Yacc mode, for compatibility
4781 with Bison 1.35. This resurrects the 2001-12-15 patch to
4782 src/reader.c.
4783
4784 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
4785 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
4786
4787 2002-12-28 Paul Eggert <eggert@twinsun.com>
4788
4789 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
4790 that of SYM's type. This fixes Debian bug 168069, reported by
4791 Thomas Olsson.
4792
4793 2002-12-28 Paul Eggert <eggert@twinsun.com>
4794
4795 Version 1.75f.
4796
4797 Switch back to the Yacc style of conflict reports, undoing some
4798 of the 2002-07-30 change.
4799 * doc/bison.texinfo (Understanding): Use Yacc style for
4800 conflict reports. Also, use new way of locating rules.
4801 * src/conflicts.c (conflict_report):
4802 Renamed from conflict_report_yacc, removing the old
4803 'conflict_report'. Translate the entire conflict report at once,
4804 so that we don't assume that "," has the same interpretation in
4805 all languages.
4806 (conflicts_output): Use Yacc-style conflict report for each state,
4807 instead of our more-complicated style.
4808 (conflicts_print): Use Yacc-style conflict report, except print
4809 the input file name when not emulating Yacc.
4810 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
4811 Conflicted Reduction, %expect not enough, %expect too much,
4812 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
4813 * tests/existing.at (GNU Cim Grammar): Likewise.
4814 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
4815
4816 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
4817 fatal): Don't invoke fflush; it's not needed and it might even be
4818 harmful for stdout, as stdout might not be open.
4819 * src/reduce.c (reduce_print): Likewise.
4820
4821 2002-12-27 Paul Eggert <eggert@twinsun.com>
4822
4823 Fix a bug where error locations were not being recorded correctly.
4824 This problem was originally reported by Paul Hilfinger in
4825 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
4826
4827 * data/yacc.c (yyparse): New local var yylerrsp, to record the
4828 top of the location stack's error locations.
4829 (yyerrlab): Set it. When discarding a token, push its location
4830 onto yylerrsp so that we don't lose track of the error's end.
4831 (yyerrlab1): Now is only the target of YYERROR, so that we can
4832 properly record the location of the action that failed. For GCC
4833 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
4834 GCC warning about yyerrlab1 being unused if YYERROR is unused.
4835 (yyerrlab2): New label, which yyerrlab now falls through to.
4836 Compute the error's location by applying YYLLOC_DEFAULT to
4837 the locations of all the symbols that went into the error.
4838 * doc/bison.texinfo (Location Default Action): Mention that
4839 YYLLOC_DEFAULT is also invoked for syntax errors.
4840 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4841 Error locations include the locations of all the tokens that were
4842 discarded, not just the last token.
4843
4844 2002-12-26 Paul Eggert <eggert@twinsun.com>
4845
4846 * src/files.c: Include quote.h.
4847 (compute_output_file_names): Warn if we detect conflicting
4848 outputs to the same file. This should catch the misunderstanding
4849 exemplified by Debian Bug 165349, reported by Bruce Stephens..
4850
4851 * src/conflicts.c (conflicts_print): If the user specifies
4852 "%expect N", report an error if there are any reduce/reduce
4853 conflicts. This is what the manual says should happen.
4854 This fixes Debian bug 130890, reported by Anthony DeRobertis.
4855 * tests/conflicts.at (%expect with reduce conflicts): New test.
4856
4857 Don't use m4_include on relative file names, as it doesn't work as
4858 desired if there happens to be a file with that name under ".".
4859
4860 * m4sugar/version.m4: Remove; it was included but it wasn't used.
4861 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
4862 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
4863 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
4864 * src/output.c (output_skeleton): Use full path names when
4865 specifying a file to include; don't rely on include path, as
4866 it's unreliable when the working file contains a file with
4867 that name.
4868
4869 2002-12-25 Paul Eggert <eggert@twinsun.com>
4870
4871 Remove obsolete references to bison.simple and bison.hairy.
4872 Problem mentioned by Aubin Mahe in
4873 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
4874 * data/glr.c: Comment fix.
4875 * doc/bison.1: Remove references. Also, mention "yacc".
4876
4877 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
4878 with -g option.
4879
4880 * src/parse-gram.y (declaration): Use enum "report_states" rather
4881 than its numeric value 1.
4882
4883 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
4884 opening a new one. This fixes Debian bug 165349, reported by
4885 Bruce Stephens.
4886
4887 2002-12-24 Paul Eggert <eggert@twinsun.com>
4888
4889 Version 1.75e.
4890
4891 * Makefile.maint (cvs-update): Don't assume that the shell
4892 supports $(...), as Solaris sh doesn't.
4893
4894 * src/parse-gram.y (lloc_default): Remove test for empty
4895 nonterminals at the end, since it didn't change the result.
4896
4897 2002-12-24 Paul Eggert <eggert@twinsun.com>
4898
4899 If the user does not define YYSTYPE as a macro, Bison now declares it
4900 using typedef instead of defining it as a macro. POSIX requires this.
4901 For consistency, YYLTYPE is also declared instead of defined.
4902
4903 %union directives can now have a tag before the `{', e.g., the
4904 directive `%union foo {...}' now generates the C code
4905 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
4906 The default union tag is `YYSTYPE', for compatibility with Solaris 9
4907 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
4908 instead of `yyltype'.
4909
4910 `yystype' and `yyltype' are now obsolescent macros instead of being
4911 typedefs or tags; they are no longer documented and will be
4912 withdrawn in a future release.
4913
4914 * data/glr.c (b4_location_type): Remove.
4915 (YYSTYPE): Renamed from yystype.
4916 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
4917 (struct YYLTYPE): Renamed from struct yyltype.
4918 (YYLTYPE): Renamed from yyltype.
4919 (yyltype, yystype): New (and obsolescent) macros,
4920 for backward compatibility.
4921 * data/yacc.c: Likewise.
4922
4923 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
4924 does not specify a union tag. This is for compatibility with
4925 Solaris 9 yacc.
4926
4927 * src/parse-gram.y (add_param): 2nd arg is now char * not char
4928 const *, since it is now modified by stripping surrounding { }.
4929 (current_braced_code): Remove.
4930 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
4931 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
4932 trailing " {...}". Now of type <chars>.
4933 (grammar_declaration): Adjust to bundled tokens.
4934 (code_content): Remove; stripping is now done by add_param.
4935 (print_token_value): Print contents of bundled tokens.
4936 (token_name): New function.
4937
4938 * src/reader.h (braced_code, current_braced_code): Remove.
4939 (token_name): New decl.
4940
4941 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
4942 token_type, not braced_code code_kind. All uses changed.
4943 (SC_PRE_CODE): New state, for scanning after a keyword that
4944 has (or usually has) an immediately-following braced code.
4945 (token_type): New local var, to keep track of which token type
4946 to return when scanning braced code.
4947 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
4948 <INITIAL>"%parse-param", <INITIAL>"%printer",
4949 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
4950 instead of returning a token type immediately.
4951 (<INITIAL>"{"): Set token type.
4952 (<SC_BRACED_CODE>"}"): Use it.
4953 (handle_action_dollar, handle_action_at): Now returns bool
4954 indicating success. Fail if ! current_rule; this prevents a core dump.
4955 (handle_symbol_code_dollar, handle_symbol_code_at):
4956 Remove; merge body into caller.
4957 (handle_dollar, handle_at): Complain in invalid contexts.
4958
4959 * NEWS, doc/bison.texinfo: Document the above.
4960 * NEWS: Fix years and program names in copyright notice.
4961
4962 2002-12-17 Paul Eggert <eggert@twinsun.com>
4963
4964 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
4965 Reporting, Table of Symbols): Omit mentions of %lex-param and
4966 %parse-param from the documentation for now.
4967
4968 2002-12-15 Paul Eggert <eggert@twinsun.com>
4969
4970 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
4971 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
4972 lookahead symbol, and which sets yychar in parser actions) and it
4973 disagreed with the Bison documentation. Bug
4974 reported by Andrew Walrond.
4975
4976 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
4977 as the caller now does that.
4978 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
4979 (YYEMPTY): Parenthesize right hand side, since others use it.
4980 (yyparse): Don't assume that our generated code is the only code
4981 that sets yychar.
4982
4983 2002-12-13 Paul Eggert <eggert@twinsun.com>
4984
4985 Version 1.75d.
4986
4987 POSIX requires a "yacc" command.
4988 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
4989 (MOSTLYCLEANFILES): Add yacc.
4990 (yacc): New rule.
4991 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
4992 as an alias for bison y.
4993
4994 * po/LINGUAS: Add da.
4995
4996 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
4997 problem with latest <getopt.h>.
4998 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
4999
5000 * doc/fdl.texi: Upgrade to 1.2.
5001 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
5002 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
5003 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
5004 gnulib.
5005 * config/install-sh: Sync with autotools.
5006
5007 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
5008 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
5009 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
5010 locations are requested.
5011 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
5012 locations are requested.
5013
5014 2002-12-12 Paul Eggert <eggert@twinsun.com>
5015
5016 Remove unportable casts and storage allocation tricks.
5017 While we're at it, remove almost all casts, since they
5018 usually aren't needed and are a sign of trouble.
5019
5020 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
5021
5022 * src/derives.c (derives_compute): Do not subtract NTOKENS from
5023 the pointer DSET returned by malloc; this isn't portable.
5024 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
5025 Similarly for DERIVES.
5026 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
5027 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
5028 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
5029
5030 * src/derives.c (derives_compute): Do not bother invoking
5031 int_of_rule_number, since rule numbers are integers.
5032
5033 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
5034 rather than XMALLOC (char, N).
5035
5036 * src/files.c (filename_split): Rewrite to avoid cast.
5037
5038 * src/gram.h (symbol_number_as_item_number,
5039 item_number_as_symbol_number, rule_number_as_item_number,
5040 item_number_as_rule_number):
5041 Now inline functions rather than macros, to avoid casts.
5042 * src/state.h (state_number_as_int): Likewise.
5043 * src/tables.c (state_number_to_vector_number,
5044 symbol_number_to_vector_number): Likewise.
5045
5046 * src/gram.h (int_of_rule_number): Remove; no longer used.
5047
5048 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
5049 since the resulting storage is always stored into.
5050
5051 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
5052 where it's needed.
5053
5054 * src/muscle_tab.c (muscle_m4_output):
5055 Now inline. Return bool, not int.
5056 * src/state.c (state_compare): Likewise.
5057 * src/symtab.c (symbol_check_defined,
5058 symbol_check_alias_consistency, symbol_pack, symbol_translation,
5059 hash_compare_symbol, hash_symbol):
5060 Likewise.
5061 * src/uniqstr.c (uniqstr_print): Likewise.
5062 * src/muscle_tab.c (muscle_m4_output_processor):
5063 New function, to avoid casts.
5064 * src/state.c (state_comparator, stage_hasher): Likewise.
5065 * src/symtab.c (symbol_check_defined_processor,
5066 symbol_check_alias_consistency_processor, symbol_pack_processor,
5067 symbol_translation_processor, hash_symbol_comparator,
5068 hash_symbol_hasher): Likewise.
5069 * src/uniqstr.c (uniqstr_print_processor): Likewise.
5070 * src/muscle_tab.c (muscles_m4_output):
5071 Use new functions instead of casting old functions unportably.
5072 * src/state.c (state_hash_new): Likewise.
5073 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
5074 symbols_token_translations_init):
5075 Likewise.
5076 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
5077
5078 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
5079 var instead of casting to long, to avoid casts.
5080 (prepare_states): Use MALLOC rather than alloca, so that we don't
5081 have to worry about alloca.
5082 * src/state.c (state_hash_lookup): Likewise.
5083
5084 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
5085 local var instead of casting to unsigned char, to avoid casts.
5086
5087 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
5088 STATE_ALLOC): Remove.
5089 (transitions_new, errs_new, reductions_new, state_new): Use malloc
5090 rather than calloc, and use offsetof to avoid allocating slightly
5091 too much storage.
5092 (state_new): Initialize all members.
5093
5094 * src/state.c (state_hash): Use unsigned accumulator, not signed.
5095
5096 * src/symtab.c (symbol_free): Remove; unused.
5097 (symbol_get): Remove cast in lhs of assignment.
5098 (symbols_do): Now static. Accept generic arguments, not
5099 hashing-related ones.
5100
5101 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
5102 (symbol_processor): Remove.
5103 (symbols_do): Remove decl; now static.
5104
5105 * src/system.h (alloca): Remove; decl no longer needed.
5106 (<stddef.h>): Include, for offsetof.
5107 (<inttypes.>, <stdint.h>): Include if available.
5108 (uintptr_t): New type, if system lacks it.
5109 (CALLOC, MALLOC, REALLOC): New macros.
5110 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
5111 new macros.
5112
5113 * src/tables.c (table_size): Now int, to pacify GCC.
5114 (table_grow, table_ninf_remap): Use signed table size.
5115 (save_row): Don't bother initializing locals when not needed.
5116 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
5117 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
5118
5119 * src/vcg.h: Correct misspellings.
5120
5121 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
5122
5123
5124 * src/getargs.c (getargs): Don't assume EOF == -1.
5125
5126 2002-12-09 Paul Eggert <eggert@twinsun.com>
5127
5128 Change identifier spellings to avoid collisions with names
5129 that are reserved by POSIX.
5130
5131 Don't use names ending in _t, since POSIX reserves them.
5132 For consistency, remove _e and _s endings -- they're weren't
5133 needed to remove ambiguity. All uses changed.
5134 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
5135 turn was just renamed from struniq_t.
5136 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
5137 which in turn was just renamed from struniq_processor_t.
5138 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
5139 in turn was renamed from hash_compare_struniq_t.
5140 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
5141 (state_list): Renamed from state_list_t.
5142 * src/assoc.h (assoc): Renamed from assoc_t.
5143 * src/conflicts.c (enum conflict_resolution): Renamed from
5144 enum conflict_resolution_e.
5145 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
5146 (rule_list): Renamed from rule_list_t.
5147 * src/getargs.h (enum trace): Renamed from enum trace_e.
5148 (enum report): Renamed from enum report_e.
5149 * src/gram.h (item_number): Renamed from item_number_t.
5150 (rule_number): Renamed from rule_number_t.
5151 (struct rule_s): Remove the "rule_s" part; not used.
5152 (rule): Renamed from rule_t.
5153 (rule_filter): Renamed from rule_filter_t.
5154 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
5155 (goto_list): Renamed from goto_list_t.
5156 * src/lalr.h (goto_number): Renamed from goto_number_t.
5157 * src/location.h (location): Renamed from location_t.
5158 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
5159 and moved here from:
5160 * src/muscle_tab.h (muscle_entry_t): here.
5161 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
5162 (rule_list): Renamed from rule_list_t.
5163 * src/print_graph.c (static_graph): Renamed from graph.
5164 * src/reader.h (braced_code): Renamed from braced_code_t.
5165 Remove brace_code_e tag.
5166 * src/relation.h (relation_node): Renamed from relation_node_t.
5167 (relation_nodes): Renamed from relation_nodes_t.
5168 (relation): Renamed from relation_t.
5169 * src/state.h (state_number): Renamed from state_number_t.
5170 (struct state): Renamed from struct state_s.
5171 (state): Renamed from state_t.
5172 (transitions): Renamed from transitions_t. Unused (and
5173 misspelled) transtion_s tag removed.
5174 (errs): Renamed from errs_t. Unused errs_s tag removed.
5175 (reductions): Renamed from reductions_t. Unused tag
5176 reductions_s removed.
5177 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
5178 (struct symbol_list): Renamed from struct symbol_list_s.
5179 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
5180 (struct symbol): Renamed from struct symbol_s.
5181 (symbol): Renamed from symbol_t.
5182 * src/tables.c (vector_number): Renamed from vector_number_t.
5183 (action_number): Renamed from action_t.
5184 * src/tables.h (base_number): Renamed from base_t.
5185 * src/vcg.h (enum color): Renamed from enum color_e.
5186 (enum textmode): Renamed from enum textmode_e.
5187 (enum shape): Renamed from enum shape_e.
5188 (struct colorentry): Renamed from struct colorentry_s.
5189 (struct classname): Renamed from struct classname_s.
5190 (struct infoname): Renamed from struct infoname_s.
5191 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
5192 (enum decision): Renamed from enum decision_e.
5193 (enum orientation): Renamed from enum orientation_e.
5194 (enum alignment): Renamed from enum alignment_e.
5195 (enum arrow_mode): Renamed from enum arrow_mode_e.
5196 (enum crossing_type): Renamed from enum crossing_type_e.
5197 (enum view): Renamed from enum view_e.
5198 (struct node): Renamed from struct node_s.
5199 (node): Renamed from node_t.
5200 (enum linestyle): Renamed from enum linestyle_e.
5201 (enum arrowstyle): Renamed from enum arrowstyle_e.
5202 (struct edge): Renamed from struct edge.
5203 (edge): Renamed from edge_t.
5204 (struct graph): Renamed from struct graph_s.
5205 (graph): Renamed from graph_t.
5206 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
5207 Rename value_t -> value.
5208 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
5209 value_t_as_yystype -> value_as_yystype.
5210
5211 Don't include <errno.h> in the mainstream code, since it
5212 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
5213 * lib/get-errno.c, lib/get-errno.h: New files.
5214 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
5215 get-errno.c.
5216 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
5217 * src/output.c (output_skeleton): Likewise.
5218 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
5219 instead of errno.
5220 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
5221 Likewise.
5222 (handle_action_dollar, handle_action_at): Likewise.
5223 * src/system.h: Do not include <errno.h>.
5224 (TAB_EXT): Renamed from EXT_TAB.
5225 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
5226
5227 Avoid str[a-z]*, since <string.h> reserves that name space.
5228 Change all instances of "struniq" in names to "uniqstr", and
5229 likewise for "STRUNIQ" and "UNIQSTR".
5230 * src/uniqstr.c: Renamed from src/struniq.c.
5231 * src/uniqstr.h: Renamed from src/struniq.h.
5232 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
5233 * src/files.c (strsuffix): Remove; unused.
5234 (concat2): Renamed from stringappend. Now static.
5235 * src/files.h (strsuffix, stringappend): Remove; unused.
5236 * src/parse-gram.y (<chars>): Renamed from <string>.
5237 (<uniqstr>): Renamed from <struniq>.
5238 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
5239 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
5240 (struct graph_s.expand): Renamed from struct graph_s.stretch.
5241 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
5242 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
5243 (N_EXPAND): Renamed from N_STRETCH.
5244
5245 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
5246 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
5247 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
5248 Remove; unused.
5249 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
5250 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
5251 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
5252 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
5253 (BASE_MAXIMUM): Renamed from BASE_MAX.
5254 (BASE_MINIMUM): Renamed from BASE_MIN.
5255 (ACTION_MAX): Remove; unused.
5256 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
5257 Unnecessary casts removed from above defines.
5258
5259
5260 Fix misspelling in names.
5261 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
5262 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
5263 G_NODE_ALIGNEMENT.
5264
5265
5266 * lib/timevar.c (timevar_report): Renamed from time_report,
5267 for consistency with other names.
5268 * lib/timevar.h (timevar_report): New decl.
5269 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
5270
5271
5272 Sort include-file uses.
5273
5274 Reorder all include files under src to be in the order "system.h".
5275 then the ../lib include files in angle brackets (alphabetized),
5276 then the . include files in double-quotes (alphabetized). Fix
5277 dependency breakages encountered in this process, as follows:
5278 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
5279 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
5280 * src/state.h: Include "symtab.h".
5281
5282 2002-12-08 Paul Eggert <eggert@twinsun.com>
5283
5284 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
5285 since this causes problems when __file__ contains character
5286 sequences like "@" that are treated specially by src/scan-skel.l.
5287 Instead, just use the file's basename. This fixes the bug
5288 reported by Martin Mokrejs in
5289 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
5290
5291 2002-12-06 Paul Eggert <eggert@twinsun.com>
5292
5293 Add support for rules that do not have trailing semicolons, as
5294 POSIX requires. Improve the quality of locations in Bison
5295 diagnostics.
5296
5297 * src/location.c: Include <quotearg.h>.
5298 (empty_location): Now const.
5299 (location_print): New function. Follow the recommendation of the
5300 GNU Coding Standards for locations that span file boundaries.
5301 * src/location.h: Do not include <quotearg.h>; no longer needed.
5302 (boundary): New type.
5303 (location_t): Use it. This allows locations to span file boundaries.
5304 All member uses changed: file -> start.file or end.file (as needed),
5305 first_line -> start.line, first_column -> start.column,
5306 last_line -> end.line, last_column -> end.column.
5307 (equal_boundaries): New function.
5308 (LOCATION_RESET, LOCATION_STEP): Remove.
5309 (LOCATION_PRINT): Remove. All callers changed to use location_print.
5310 (empty_location): Now const.
5311 (location_print): New decl.
5312 * src/parse-gram.y (lloc_default): New function, which handles
5313 empty locations more accurately.
5314 (YYLLOC_DEFAULT): Use it.
5315 (%token COLON): Remove.
5316 (%token ID_COLON): New token.
5317 (rules): Use it.
5318 (declarations, rules): Remove trailing semicolon.
5319 (declaration, rules_or_grammar_declaration):
5320 Allow empty (";") declaration.
5321 (symbol_def): Remove empty actions; no longer needed.
5322 (rules_or_grammar_declaration): Remove trailing semicolon.
5323 (semi_colon.opt): Remove.
5324 * src/reader.h: Include location.h.
5325 (scanner_cursor): New decl.
5326 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
5327 rolling our own.
5328 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
5329 of *loc.
5330 (STEP): Remove. No longer needed, now that adjust_location does
5331 the work. All uses removed.
5332 (scanner_cursor): New var.
5333 (adjust_location): Renamed from extend_location. It now sets
5334 *loc and adjusts the scanner cursor. All uses changed.
5335 Don't bother testing for CR.
5336 (handle_syncline): Remove location arg; now updates scanner cursor.
5337 All callers changed.
5338 (unexpected_end_of_file): Now accepts start boundary of token or
5339 comment, not location. All callers changed. Update scanner cursor,
5340 not the location.
5341 (SC_AFTER_IDENTIFIER): New state.
5342 (context_state): Renamed from c_context. All uses changed.
5343 (id_loc, code_start, token_start): New local vars.
5344 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
5345 processing of Yacc white space and equivalents here.
5346 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
5347 instead of returning ID immediately, since we need to search for
5348 a subsequent colon.
5349 (<INITIAL>"'", "\""): Save token_start.
5350 (<INITIAL>"%{", "{", "%%"): Save code_start.
5351 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
5352 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
5353 BEGIN context_state at end, not INITIAL.
5354 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
5355 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
5356 Return correct token start.
5357 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
5358 the start of a character, string or multiline comment is found.
5359 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
5360 Reduction): Adjust reported locations to match the more-precise
5361 results now expected.
5362 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
5363 * tests/reduce.at (Useless Rules, Reduced Automaton,
5364 Underivable Rules): Likewise.
5365 * tests/regression.at (Invalid inputs): No longer `expecting ";"
5366 or "|"' now that so many other tokens are allowed by the new grammar.
5367
5368 * src/complain.h (current_file): Remove duplicate decl;
5369 current_file is now owned by files.h.
5370 * src/complain.c, src/scan-gram.l: Include files.h.
5371
5372 2002-12-06 Paul Eggert <eggert@twinsun.com>
5373
5374 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
5375 promotes to int; it might be unsigned int.
5376 * data/yacc.c (yy_reduce_print): Likewise.
5377
5378 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
5379 be #defined in the prologue, not in the Bison declarations.
5380 This fixes Debian Bug 102878, reported by Shaul Karl.
5381
5382 2002-12-02 Paul Eggert <eggert@twinsun.com>
5383
5384 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
5385 * lib/strtoul.c: New file, from gnulib.
5386 This fixes a porting bug reported by Peter Klein in
5387 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
5388
5389 2002-11-30 Paul Eggert <eggert@twinsun.com>
5390
5391 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
5392 and put only a forward declaration in the prologue. This is for
5393 consistency with the other scanner helper functions.
5394
5395 Type clashes now generate warnings, not errors, since it
5396 appears that POSIX may allow some grammars with type clashes.
5397 * src/reader.c (grammar_current_rule_check): Warn about
5398 type clashes instead of complaining.
5399 * tests/input.at (Type Clashes): Expect warnings, not complaints.
5400
5401 Add Yacc library, since POSIX requires it.
5402 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
5403 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
5404 * lib/main.c, lib/yyerror.c: New files.
5405
5406 gram_error can be static; it need not be extern.
5407 * src/reader.h (gram_error): Remove decl.
5408 * src/parse-gram.y (gram_error): Now static. Add static decl.
5409 (print_token_value): Omit parameter names from forward decl,
5410 for consistency.
5411
5412 2002-11-29 Paul Eggert <eggert@twinsun.com>
5413
5414 * doc/bison.texinfo: Emphasize that yylex and yyerror must
5415 be declared before being used. E.g., one should typically
5416 declare them in the prologue. Use GNU coding style in examples.
5417 Put "const" consistently after the type it modifies. Mention
5418 that C99 supports "inline". Mention that yyerror traditionally
5419 returns "int".
5420
5421 %parse-param and %lex-param now take just one argument, the
5422 declaration; the argument name is deduced from the declaration.
5423
5424 * doc/bison.texinfo (Parser Function, Pure Calling, Error
5425 Reporting, Table of Symbols): Document this.
5426 * src/parse-gram.y (add_param): New function.
5427 (COMMA): Remove.
5428 (declaration): Implement new rule for %parse-param and %lex-param.
5429 * src/scan-gram.l: "," now elicits a warning, rather than being
5430 a token; this is more compatible with byacc.
5431 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
5432
5433 2002-11-27 Paul Eggert <eggert@twinsun.com>
5434
5435 Rename identifiers to avoid real and potential collisions.
5436
5437 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
5438 to avoid collision with lex macro described by Bruce Lilly in
5439 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
5440 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5441 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
5442 * src/parse-gram.y (print_token_value): Renamed from yyprint.
5443 All uses changed.
5444 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
5445 The name "yycontrol" violates the name space rules, and this stuff
5446 wasn't being used anyway.
5447 (input): Remove action; this stuff wasn't being used.
5448 (gram_error): Rename local variable yylloc -> loc.
5449 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
5450 (YY_DECL): Don't use "yy" at start of local variables.
5451 All uses changed, e.g., yylloc -> loc.
5452 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
5453 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
5454 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
5455 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
5456
5457 * src/parse-gram.y (gram_error): loc is now const *.
5458 * src/reader.h (gram_error): Likewise.
5459
5460 2002-11-24 Paul Eggert <eggert@twinsun.com>
5461
5462 Version 1.75c.
5463
5464 * tests/actions.at (Actions after errors): Use an output format
5465 more similar to that of the Printers and Destructors test.
5466 Test the position of the ';' token too.
5467 (Printers and Destructors): Likewise.
5468 (Printers and Destructors: %glr-parser): Remove for now, to avoid
5469 unnecessarily alarming people when the test fails.
5470
5471 * data/yacc.c (yyerrlab1): Move this label down, so that the
5472 parser does not discard the lookahead token if the user code
5473 invokes YYERROR. This change is required for POSIX conformance.
5474
5475 * lib/error.c: Sync with gnulib.
5476
5477 2002-11-22 Paul Eggert <eggert@twinsun.com>
5478
5479 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
5480 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
5481 * lib/xmalloc.c: Likewise.
5482
5483 2002-11-20 Paul Eggert <eggert@twinsun.com>
5484
5485 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
5486
5487 2002-11-20 Paul Eggert <eggert@twinsun.com>
5488
5489 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
5490 should use `if (! x) abort ();' rather than `assert (x);', and
5491 anyway it's one less thing to worry about configuring.
5492
5493 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
5494 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
5495 and replace all instances of assert with abort.
5496 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
5497 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
5498
5499 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
5500 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
5501 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
5502 hash_find_entry, hash_rehash, hash_insert): Likewise.
5503 * src/conflicts.c (resolve_sr_conflict): Likewise.
5504 * src/lalr.c (set_goto_map, map_goto): Likewise.
5505 * src/nullable.c (nullable_compute): Likewise.
5506 * src/output.c (prepare_rules, token_definitions_output): Likewise.
5507 * src/reader.c (packgram, reader): Likewise.
5508 * src/state.c (state_new, state_free, state_transitions_set,
5509 state_reduction_find): Likewise.
5510 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
5511 symbol_pack): Likewise.
5512 * src/tables.c (conflict_row, pack_vector): Likewise.
5513 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5514 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5515 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
5516 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
5517
5518 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
5519 (ARGMATCH_CONSTRAINT): New macro.
5520 (ARGMATCH_ASSERT): Use it.
5521
5522 * src/system.h (verify): New macro.
5523 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
5524 rather than assert.
5525 * src/tables.c (tables_generate): Likewise.
5526
5527 * src/struniq.c (struniq_assert): Now returns void, and aborts
5528 if the assertion is false.
5529 (struniq_assert_p): Remove.
5530 * src/struniq.h: Likewise.
5531
5532 2002-11-18 Paul Eggert <eggert@twinsun.com>
5533
5534 * data/glr.c (yygetLRActions): Replace `yyindex' with
5535 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
5536 This fixes the regression with Sun ONE Studio 7 cc that I reported in
5537 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
5538
5539 2002-11-18 Akim Demaille <akim@epita.fr>
5540
5541 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
5542 space.
5543 From Tim Van Holder.
5544
5545 2002-11-17 Paul Eggert <eggert@twinsun.com>
5546
5547 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
5548 to "SyntaxError" for consistency with my 2002-11-15 change.
5549
5550 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
5551 not define to {}, since this breaks the common use of `YYDPRINTF
5552 ((...));' if a single statement is desired (e.g. before `else').
5553 Work around GCC warnings by surrounding corresponding calls with
5554 {} if needed.
5555 (yyhasResolvedValue): Remove unused function.
5556 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
5557 loop body.
5558 (yyreportSyntaxError): Renamed from yyreportParseError.
5559 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
5560 All uses changed.
5561 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
5562 extern when possible. Remove unused initializations.
5563
5564 2002-11-16 Akim Demaille <akim@epita.fr>
5565
5566 Augment the similarity between GLR and LALR traces.
5567
5568 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
5569 (YY_REDUCE_PRINT): New.
5570 (yyparse): Use them.
5571 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
5572 YYDPRINT here.
5573 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
5574 state reached after the reduction/recovery, since...
5575 (yyparse, yyprocessOneStack): Report the state we are entering in.
5576
5577 2002-11-16 Akim Demaille <akim@epita.fr>
5578
5579 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
5580 Add support for --trace=skeleton.
5581 * src/scan-skel.l: %option debug.
5582 Scan strings of non-@ or \n instead of character by character.
5583 (scan_skel): Handle trace_skeleton.
5584 (QPUTS): New.
5585 (@output_parser_name@, @output_header_name@): ``Restore'' their
5586 support (used to be M4 macros).
5587 * data/yacc.c: Quote larger chunks, a la glr.c.
5588 * data/lalr1.cc: Likewise.
5589 The header guards are no longer available, so use some other
5590 string than `YYLSP_NEEDED'.
5591
5592 2002-11-16 Akim Demaille <akim@epita.fr>
5593
5594 Make the ``Printers and Destructors'' test more verbose, taking
5595 `yacc.c''s behavior as (possibly wrong) reference.
5596
5597 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
5598 instead of fprint on stdout.
5599 Set and report the last_line of the symbols.
5600 Consistently display values and locations.
5601
5602 2002-11-16 Paul Eggert <eggert@twinsun.com>
5603
5604 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
5605
5606 2002-11-15 Paul Eggert <eggert@twinsun.com>
5607
5608 * tests/actions.at (Actions after errors): New test case.
5609
5610 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
5611 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
5612 tests/action.at, tests/calc.at, tests/conflicts.at,
5613 tests/cxx-type.at, tests/regression.at:
5614 "parse error" -> "syntax error" for POSIX compatibility.
5615 "parsing stack overflow..." -> "parser stack overflow" so
5616 that code matches Bison documentation.
5617
5618 2002-11-15 Akim Demaille <akim@epita.fr>
5619
5620 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
5621 take two BRACED_CODE, not two string_content.
5622 Free the scanner's obstack when we are done.
5623 (code_content): New.
5624 * tests/calc.at: Adjust.
5625 * doc/bison.texinfo: Adjust.
5626 Also, make sure to include the `,' for these declarations.
5627
5628 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
5629
5630 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
5631 definition; avoids potential autoreconf problems.
5632
5633 2002-11-15 Akim Demaille <akim@epita.fr>
5634
5635 Always check the value returned by yyparse.
5636
5637 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
5638 returned by yyparse.
5639 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
5640 Adjust calls.
5641 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
5642 returned by yyparse.
5643
5644 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5645
5646 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
5647 on input.at test.
5648
5649 2002-11-14 Paul Eggert <eggert@twinsun.com>
5650
5651 * src/output.c (output_skeleton): Call xfopen instead of
5652 duplicating xfopen's body.
5653
5654 Fix bugs reported by Nelson H. F. Beebe in
5655 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
5656
5657 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
5658 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
5659 Group compiler. Instead, use "$CC -E bar.c". Include the .h
5660 file twice in the grammar, as an extra check.
5661
5662 * tests/input.at (Torturing the Scanner): Surround the
5663 backslash-newline tests with "#if 0", to make it less likely that
5664 we'll run into compiler bugs. Bring back solitary \ inside
5665 comment, but add a closing comment to work around HP C bug. Don't
5666 test backslash-newline in C character constant.
5667
5668 2002-11-14 Akim Demaille <akim@epita.fr>
5669
5670 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
5671 status of the compiler.
5672 Calling `exit 1' is no longer needed.
5673 Reported by Nelson H. F. Beebe.
5674
5675 2002-11-14 Akim Demaille <akim@epita.fr>
5676
5677 * tests/atlocal.in (CPPFLAGS): We have config.h.
5678 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
5679 New.
5680 * tests/actions.at, tests/calc.at, tests/conflicts.at,
5681 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
5682 * tests/regression.at, tests/torture.at: Use them for all the
5683 grammars that are to be compiled.
5684 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
5685 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
5686 * doc/bison.texinfo (GLR Parsers): Document `inline'.
5687
5688 2002-11-14 Akim Demaille <akim@epita.fr>
5689
5690 * doc/bison.texinfo: Various formatting changes (alignments in
5691 samples, additional @group/@end group, GCS in samples.
5692 Use @deffn instead of simple @table to define the directives,
5693 macros, variables etc.
5694
5695 2002-11-13 Paul Eggert <eggert@twinsun.com>
5696
5697 Fix some bugs reported by Albert Chin-A-Young in
5698 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
5699
5700 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
5701 -o c"; the HP C compiler chatters during compilation.
5702 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
5703 * tests/headers.at (export YYLTYPE): Likewise.
5704
5705 * tests/input.at (Torturing the Scanner): Remove lines containing
5706 solitary backslashes, as they tickle a bug in the HP C compiler.
5707
5708 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
5709 comments, since they're not portable. Use GNU coding style.
5710
5711 2002-11-13 Akim Demaille <akim@epita.fr>
5712
5713 * data/yacc.c: Leave bigger chunks of quoted text.
5714 (YYDSYMPRINTF): New.
5715 Use it to report symbol activities.
5716 * data/glr.c (YYDSYMPRINTF): New.
5717 Use it.
5718
5719 2002-11-12 Paul Eggert <eggert@twinsun.com>
5720
5721 Version 1.75b.
5722
5723 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
5724 (yyglrReduce): Return yyok, not 0.
5725 This should avoid the enumerated-type warnings reported
5726 by Nelson H. F. Beebe in
5727 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
5728
5729 * lib/bbitset.h (BITSET_INLINE): Remove.
5730 * lib/bitset.h [! BITSET_INLINE]: Remove.
5731 (bitset_set, bitset_reset, bitset_test): Rename local vars
5732 to avoid shadowing warnings by GCC.
5733
5734 * data/glr.c (inline): Remove #define. It's the user's
5735 responsibility to #define it away, just like 'const'.
5736 This fixes one of the bugs reported by Nelson H. F. Beebe in
5737 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
5738
5739 * Makefile.maint (po-check): Scan .l and .y files instead of the
5740 .c and the .h files that they generate. This fixes the bug
5741 reported by Tim Van Holder in:
5742 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
5743 Look for N_ as well as for _. Try to avoid matching #define for
5744 N_ and _.
5745 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
5746 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
5747 * src/scan-gram.l: Revamp regular expressions so that " and '
5748 do not confuse xgettext.
5749
5750 * src/struniq.h (struniq_new): Do not declare the return type
5751 to be 'const'; this violates the C standard.
5752 * src/struniq.c (struniq_new): Likewise.
5753
5754 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
5755
5756 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
5757 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
5758 linker.
5759
5760 2002-11-12 Akim Demaille <akim@epita.fr>
5761
5762 * Makefile.maint: Sync with Autoconf:
5763 (local_updates): New.
5764
5765 2002-11-12 Akim Demaille <akim@epita.fr>
5766
5767 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
5768
5769 2002-11-12 Akim Demaille <akim@epita.fr>
5770
5771 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
5772 locations.
5773
5774 2002-11-12 Akim Demaille <akim@epita.fr>
5775
5776 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
5777 not yyvalue.
5778
5779 2002-11-12 Akim Demaille <akim@epita.fr>
5780
5781 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
5782 Use it to test the GLR parser.
5783
5784 2002-11-12 Akim Demaille <akim@epita.fr>
5785
5786 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
5787 defines it.
5788 * data/glr.c (yystos): New.
5789 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
5790 (YYDSYMPRINT): New.
5791 (yyval): Don't define it, it is handled via M4.
5792 (yyrecoverParseError): Free verbosely the discarded symbols.
5793 * data/yacc.c (yysymprint): Remove, rather...
5794 (b4_yysymprint_generate): invoke.
5795 * data/c.m4 (b4_yysymprint_generate): New.
5796 Accept pointers as arguments, as opposed to the version from
5797 yacc.c.
5798 (b4_yydestruct_generate): Likewise.
5799 * tests/cations.at (Printers and Destructors): Use Bison directives
5800 instead of CPP macros.
5801 Don't rely on internal details.
5802
5803 2002-11-12 Akim Demaille <akim@epita.fr>
5804
5805 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
5806 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
5807 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
5808 it against YYEMPTY and so forth), work on yytoken (i.e., set
5809 it to YYEMPTY etc.).
5810 (yydestruct): Replace with a b4_yydestruct_generate invocation.
5811 (b4_symbol_actions): Remove.
5812 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
5813 for 0, end-of-input.
5814
5815 2002-11-12 Akim Demaille <akim@epita.fr>
5816
5817 * doc/bison.texinfo (Destructor Decl): New.
5818
5819 2002-11-12 Akim Demaille <akim@epita.fr>
5820
5821 * src/tables.c (tables_generate): Use free for pointers that
5822 cannot be NULL, not XFREE.
5823 (pack_vector): Use assert, not fatal, for bound violations.
5824 * src/state.c (state_new): Likewise.
5825 * src/reader.c (reader): Likewise.
5826 * src/lalr.c (set_goto_map): Likewise.
5827 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
5828 the file name.
5829
5830 2002-11-12 Akim Demaille <akim@epita.fr>
5831
5832 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
5833 Restore.
5834 * src/scan-gram.l (last_string): Is global to the file, not to
5835 yylex.
5836 * src/parse-gram.y (input): Don't append the epilogue here,
5837 (epilogue.opt): do it here, and free the scanner's obstack.
5838 * src/reader.c (epilogue_set): Rename as...
5839 (epilogue_augment): this.
5840 * data/c.m4 (b4_epilogue): Defaults to empty.
5841
5842 2002-11-12 Akim Demaille <akim@epita.fr>
5843
5844 * src/getargs.c (long_options): Remove duplicates.
5845 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
5846 Remove.
5847 * doc/bison.rnh: Remove.
5848 * doc/bison.texinfo (VMS Invocation): Remove.
5849
5850 2002-11-12 Akim Demaille <akim@epita.fr>
5851
5852 * src/struniq.h, src/struniq.c (struniq_t): Is const.
5853 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
5854
5855 Use struniq for symbols.
5856
5857 * src/symtab.h (symbol_t): The tag member is a struniq.
5858 (symbol_type_set): Adjust.
5859 * src/symtab.c (symbol_new): Takes a struniq.
5860 (symbol_free): Don't free the tag member.
5861 (hash_compare_symbol_t, hash_symbol_t): Rename as...
5862 (hash_compare_symbol, hash_symbol): these.
5863 Use the fact that tags as struniqs.
5864 (symbol_get): Use struniq_new.
5865 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
5866 Returns a strniq.
5867 * src/reader.h (merger_list, grammar_currentmerge_set): The name
5868 and type members are struniqs.
5869 * src/reader.c (get_merge_function)
5870 (grammar_current_rule_merge_set): Adjust.
5871 (TYPE, current_type): Are struniq.
5872
5873 Use struniq for file names.
5874
5875 * src/files.h, src/files.c (infile): Split into...
5876 (grammar_file, current_file): these.
5877 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
5878 * src/reduce.c (reduce_print): Likewise.
5879 * src/getargs.c (getargs): Likewise.
5880 * src/complain.h, src/complain.c: Likewise.
5881 * src/main.c (main): Call struniqs_new early enough to use it for
5882 file names.
5883 Don't free the input file name.
5884
5885 2002-11-12 Akim Demaille <akim@epita.fr>
5886
5887 * src/symtab.c (symbol_free): Remove dead deactivated code:
5888 type_name are properly removed.
5889 Don't use XFREE to free items that cannot be NULL.
5890 * src/struniq.h, src/struniq.c: New.
5891 * src/main.c (main): Initialize/free struniqs.
5892 * src/parse-gram.y (%union): Add astruniq member.
5893 (yyprint): Adjust.
5894 * src/scan-gram.l (<{tag}>): Return a struniq.
5895 Free the obstack bit that used to store it.
5896 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
5897
5898 2002-11-11 Paul Eggert <eggert@twinsun.com>
5899
5900 Revamp to fix many (but not all) of the C- and M4-related quoting
5901 problems. Among other things, this fixes the Bison bug reported
5902 by Jan Hubicka when processing the Bash grammar; see:
5903 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
5904
5905 Use new @ escapes consistently. Represent brackets with @{ and @}
5906 rather than @<:@ and @:>@, since this works a bit better with dumb
5907 editors like vi. Represent @ with @@, since @ is now consistently
5908 an escape. Use @oline@ and @ofile@ rather than __oline__ and
5909 __ofile__, to avoid unexpected expansions. Similarly, use @output
5910 rather than #output.
5911
5912 * data/c.m4 (b4_copyright): Omit file name from comment, since
5913 the file name could contain "*/".
5914 (b4_synclines_flag): Don't quote the 2nd argument; it should already
5915 be quoted. All uses changed.
5916
5917 * data/glr.c: Use new @ escapes consistently.
5918 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
5919 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
5920 Remove, since they couldn't handle arbitrary characters in file
5921 names.
5922 * data/lalr1.cc: Likewise.
5923 * data/yacc.c: Likewise.
5924
5925 * src/files.c (output_infix): Remove; all uses removed.
5926 * src/files.h: Likewise.
5927
5928 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
5929 mishandled funny characters in file names, and anyway it isn't
5930 needed any more.
5931 * data/yacc.c: Likewise.
5932 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
5933
5934 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
5935 * data/yacc.c: Likewise.
5936
5937 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
5938 strings now.
5939 (muscle_init): Quote filename as a C string.
5940 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
5941 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
5942 * src/output.c (escaped_file_name_output): New function.
5943 (prepare_symbols): Quote tokens for M4.
5944 (prepare): Don't insert output_infix, output_prefix,
5945 output_parser_name, output_header_name; this is now down by scan-skel.
5946 Insert skeleton as a C string.
5947
5948 * src/output.c (user_actions_output, symbol_destructors_output,
5949 symbol_printers_output): Quote filenames for C and M4.
5950 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5951
5952 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
5953 escapes other than \\ and \'; this simplifies the code.
5954 (<SC_STRING>): Likewise, for \\ and \".
5955 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
5956 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
5957 Use new escapes @{ and @} for [ and ].
5958
5959 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
5960 them with auto vars.
5961 Switch to new escape scheme, where @ is the escape character uniformly.
5962 Abort if a stray escape character is found. Avoid unbounded input
5963 buffer when parsing non-escaped text.
5964
5965 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
5966 __oline__, #output, $@, and @{ do not have unintended meanings.
5967
5968 2002-11-09 Paul Eggert <eggert@twinsun.com>
5969
5970 Fix the test failure due to GCC warnings described in
5971 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
5972 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
5973 evaluate to 0 if it's impossible for NINF to be in the respective
5974 table.
5975 (yygetLRActions, yyrecoverParseError): Use them.
5976
5977 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
5978 counted in the token inserted at end of file. Now takes
5979 location_t *, not location_t, so that the location can be
5980 adjusted. All uses changed.
5981
5982 * tests/regression.at (Invalid inputs): Adjust wording in
5983 diagnostic to match the new behavior.
5984
5985 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
5986 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
5987 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
5988 abort ();'. This reduces the runtime of the "Many lookaheads"
5989 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
5990 GCC 3.2.
5991
5992 2002-11-07 Paul Eggert <eggert@twinsun.com>
5993
5994 * src/parse-gram.y (CHARACTER): Remove unused token.
5995 All uses removed.
5996
5997 * src/scan-gram.l: Remove stack option. We no longer use the
5998 stack, since the stack was never deeper than 1; instead, use the
5999 new auto var c_context to record the stacked value.
6000
6001 Remove nounput option. At an unexpected end of file, we now unput
6002 the minimal input necessary to end cleanly; this simplifies the
6003 code.
6004
6005 Avoid unbounded token sizes where this is easy.
6006
6007 (unexpected_end_of_file): New function.
6008 Use it to systematize the error message on unexpected EOF.
6009 (last-string): Now auto, not static.
6010 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
6011 (scanner_last_string_free): Remove; not used.
6012 (percent_percent_count): Move decl to just before use.
6013 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
6014 not the (never otherwised-used) CHARACTER.
6015
6016 2002-11-07 Akim Demaille <akim@epita.fr>
6017
6018 Let yyerror always receive the msg as last argument, so that
6019 yyerror can be variadic.
6020
6021 * data/yacc.c (b4_yyerror_args): New.
6022 Use it when calling yyerror.
6023 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
6024 Use it when calling yyerror.
6025 * doc/bison.texinfo (Error Reporting): Adjust.
6026 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
6027 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
6028
6029 2002-11-06 Akim Demaille <akim@epita.fr>
6030
6031 #line should have quoted strings.
6032 Ideally, this should be done by m4_quotearg.
6033
6034 * src/scan-skel.l: Include quotearg.h.
6035 Quote __ofile__.
6036 * src/output.c (symbol_printers_output)
6037 (symbol_destructors_output): Quote the file name.
6038
6039 2002-11-06 Akim Demaille <akim@epita.fr>
6040
6041 * tests/regression.at (Invalid inputs): Adjust to the recent
6042 messages.
6043
6044 2002-11-06 Akim Demaille <akim@epita.fr>
6045
6046 Restore --no-lines.
6047 Reported by Jim Kent.
6048
6049 * data/c.m4 (b4_syncline): New.
6050 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
6051 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
6052 * src/output.c (user_actions_output): Likewise.
6053 (prepare): Define 'b4_synclines_flag'.
6054 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
6055
6056 2002-11-06 Akim Demaille <akim@epita.fr>
6057
6058 * src/main.c (main): Free `infile'.
6059 * src/scan-gram.l (handle_syncline): New.
6060 Recognize `#line'.
6061 * src/output.c (user_actions_output, symbol_destructors_output)
6062 (symbol_printers_output): Use the location's file name, not
6063 infile.
6064 * src/reader.c (prologue_augment, epilogue_set): Likewise.
6065
6066 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6067
6068 * src/tables.c (matching_state): Don't allow states to match if
6069 either has GLR conflict entries.
6070
6071 2002-11-05 Paul Eggert <eggert@twinsun.com>
6072
6073 * src/scan-gram.l: Use more accurate diagnostics, e.g.
6074 "integer out of range" rather than "invalid value".
6075 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
6076 accordingly.
6077
6078 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
6079 Also, remove one static variable in the scanner.
6080
6081 * src/scan-gram.l (braces_level): Now auto, not static.
6082 Initialize to zero if the compiler is being picky.
6083 (INITIAL): Clear braces_level instead of incrementing it.
6084 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
6085 as POSIX 1003.1-2001 requires.
6086 * src/system.h (IF_LINT): New macro, taken from coreutils.
6087 * configure.ac: Define "lint" if --enable-gcc-warnings.
6088
6089 2002-11-05 Akim Demaille <akim@epita.fr>
6090
6091 * src/scan-gram.l: When it starts with `%', complain about the
6092 whole directive, not just that `invalid character: %'.
6093
6094 2002-11-04 Akim Demaille <akim@epita.fr>
6095
6096 * Makefile.maint: Update from Autoconf.
6097 (update, cvs-update, po-update, do-po-update): New.
6098
6099 2002-11-04 Akim Demaille <akim@epita.fr>
6100
6101 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
6102 and yyerror.
6103 Have yyerror `use' its arguments.
6104 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
6105 returns true when location & yacc & pure & parse-param.
6106 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
6107
6108 2002-11-04 Akim Demaille <akim@epita.fr>
6109
6110 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
6111 clashes.
6112 * src/scan-gram.l: Use [\'] instead of ['] to pacify
6113 font-lock-mode.
6114 Use complain_at.
6115 Use quote, not quote_n since LOCATION_PRINT no longer uses the
6116 slot 0.
6117
6118 2002-11-03 Paul Eggert <eggert@twinsun.com>
6119
6120 * src/reader.c (get_merge_function, grammar_current_rule_check):
6121 Use consistent diagnostics for reporting type name clashes.
6122 Quote the types with <>, for consistency with Yacc.
6123 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
6124
6125 2002-11-03 Akim Demaille <akim@epita.fr>
6126
6127 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
6128 New.
6129 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
6130 (b4_parse_param): Remove.
6131 Use b4_identification.
6132 Propagate b4_pure_args where needed to pass them to yyerror.
6133 * data/glr.m4 (b4_parse_param): Remove.
6134 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
6135 (b4_lpure_formals): New.
6136 Use b4_identification.
6137 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
6138 b4_user_formals and b4_user_args.
6139 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
6140 (yyreportAmbiguity): When using a pure parser, also need
6141 the location, and the parse-params.
6142 Adjust callers.
6143 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
6144 When using a pure parser, also need the parse-params.
6145 Adjust callers.
6146 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
6147 (%pure-parser + %parse-param) LALR and GLR parsers.
6148 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
6149 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
6150 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
6151 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
6152 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
6153 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
6154 * doc/bison.texinfo: Untabify the whole file.
6155 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
6156 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
6157 (Error Reporting): Adjust to these new directives.
6158 Document %error-verbose, deprecate YYERROR_VERBOSE.
6159
6160 2002-11-03 Akim Demaille <akim@epita.fr>
6161
6162 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
6163 AT_CHECK_CALC_GLR invocations to use % directives, instead of
6164 command line options.
6165 * tests/cxx-type.at: Formatting changes.
6166
6167 2002-11-03 Paul Eggert <eggert@twinsun.com>
6168
6169 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
6170 to count columns correctly, and to check for invalid inputs.
6171
6172 Use mbsnwidth to count columns correctly. Account for tabs, too.
6173 Include mbswidth.h.
6174 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
6175 (extend_location): New function.
6176 (YY_LINES): Remove.
6177
6178 Handle CRLF in C code rather than in Lex code.
6179 (YY_INPUT): New macro.
6180 (no_cr_read): New function.
6181
6182 Scan UCNs, even though we don't fully handle them yet.
6183 (convert_ucn_to_byte): New function.
6184
6185 Handle backslash-newline correctly in C code.
6186 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
6187 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
6188 all uses changed.
6189 (tag, splice): New EREs. Do not allow NUL or newline in tags.
6190 Use {splice} wherever C allows backslash-newline.
6191 YY_STEP after space, newline, vertical-tab.
6192 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
6193
6194 (letter, id): Don't assume ASCII; e.g., spell out a-z.
6195
6196 ({int}, handle_action_dollar, handle_action_at): Check for integer
6197 overflow.
6198
6199 (YY_STEP): Omit trailing semicolon, so that it's more like C.
6200
6201 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
6202 as well as \000. Check for UCHAR_MAX, not 255.
6203 Allow \x with an arbitrary positive number of digits, as in C.
6204 Check for overflow here.
6205 Allow \? and UCNs, for compatibility with C.
6206
6207 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
6208 with quote slot used by complain_at.
6209
6210 * tests/input.at: Add tests for backslash-newline, m4 quotes
6211 in symbols, long literals, and funny escapes in strings.
6212
6213 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
6214 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
6215 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
6216 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
6217 * m4/mbswidth.m4: New file, from GNU coreutils.
6218
6219 * doc/bison.texinfo (Grammar Outline): Document // comments.
6220 (Symbols): Document that trigraphs have no special meaning in Bison,
6221 nor is backslash-newline allowed.
6222 (Actions): Document that trigraphs have no special meaning.
6223
6224 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
6225 no longer used.
6226
6227 2002-11-02 Paul Eggert <eggert@twinsun.com>
6228
6229 * src/reader.c: Don't include quote.h; not needed.
6230 (get_merge_function): Reword warning to be consistent with
6231 type clash diagnostic in grammar_current_rule_check.
6232
6233 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
6234 bug in trigraph handling.
6235
6236 * src/output.c (prepare_symbols): When printing token names,
6237 escape "[" as "@<:@" and likewise for "]".
6238
6239 * src/system.h (errno): Remove declaration, as we are now
6240 assuming C89 or better, and C89 guarantees errno.
6241
6242 2002-10-30 Paul Eggert <eggert@twinsun.com>
6243
6244 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
6245 Check for close failures.
6246 * src/files.h (xfclose): Return void, not int, since it always
6247 returned zero.
6248 * src/files.c (xfclose): Likewise. Report I/O error if ferror
6249 indicates one.
6250 * src/output.c (output_skeleton): Use xfclose rather than fclose
6251 and ferror. xfclose now checks ferror.
6252
6253 * data/glr.c (YYLEFTMOST_STATE): Remove.
6254 (yyreportTree): Use a stack-based leftmost state. This avoids
6255 our continuing battles with bogus warnings about initializers.
6256
6257 2002-10-30 Akim Demaille <akim@epita.fr>
6258
6259 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
6260 #if.
6261
6262 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6263
6264 * tests/glr-regr1.at: New test for reported regressions.
6265 * tests/testsuite.at: Add glr-regr1.at test.
6266 * tests/Makefile.am: Add glr-regr1.at test.
6267
6268 2002-10-24 Paul Eggert <eggert@twinsun.com>
6269
6270 Version 1.75a.
6271
6272 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
6273 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
6274 we use malloc. Don't assume 'A' through 'Z' are contiguous.
6275 Don't assume strdup exists; POSIX says its an XSI extension.
6276 Check for buffer overflow on input.
6277
6278 2002-10-24 Akim Demaille <akim@epita.fr>
6279
6280 * src/output.c (output_skeleton): Don't disable M4sugar comments
6281 too soon: it results in comments being expanded.
6282 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
6283 first output.
6284
6285 2002-10-24 Akim Demaille <akim@epita.fr>
6286
6287 * data/yacc.c (m4_int_type): New.
6288 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
6289 char' as only yacc.c wants K&R portability.
6290 * data/glr.c (yysigned_char): Remove.
6291 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
6292 Reported by Quoc Peyrot.
6293
6294 2002-10-23 Paul Eggert <eggert@twinsun.com>
6295
6296 * src/main.c (main): With --trace=time, report times even if a
6297 non-fatal error occurs. Formerly, the times were reported in some
6298 such cases but not in others.
6299 * src/reader.c (reader): Just return if a complaint has been issued,
6300 instead of exiting, so that 'main' can report times.
6301
6302 2002-10-22 Akim Demaille <akim@epita.fr>
6303
6304 * src/system.h: Include sys/types.
6305 Reported by Bert Deknuydt.
6306
6307 2002-10-23 Paul Eggert <eggert@twinsun.com>
6308
6309 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
6310 Suggested by Art Haas.
6311
6312 2002-10-22 Paul Eggert <eggert@twinsun.com>
6313
6314 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
6315 decl; not needed any more.
6316 * src/main.c (main): Use return to exit, undoing yesterday's change.
6317 The last OS that we could find where this wouldn't work is
6318 SunOS 3.5, and that's too old to worry about now.
6319
6320 * data/glr.c (struct yyltype): Define members even when not
6321 doing locations. This is more consistent with yacc.c, and it
6322 works around the following bug reports:
6323 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
6324 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
6325
6326 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
6327 @acronym consistently. Standardize on "Yacc" instead of "YACC",
6328 "Algol" instead of "ALGOL". Give a bit more history about BNF.
6329
6330 2002-10-22 Akim Demaille <akim@epita.fr>
6331
6332 * data/README: New.
6333
6334 2002-10-21 Paul Eggert <eggert@twinsun.com>
6335
6336 Be consistent about 'bool'; the old code used an enum in one
6337 module and an int in another, and this violates the C standard.
6338 * m4/stdbool.m4: New file, from coreutils 4.5.3.
6339 * configure.ac (AC_HEADER_STDBOOL): Add.
6340 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
6341 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
6342 * src/symtab.c (hash_compare_symbol_t): Likewise.
6343 * src/system.h (bool, false, true): Use a definition consistent
6344 with ../lib/hash.c. All uses changed.
6345
6346 * src/complain.c (warning_issued): Renamed from warn_message_count,
6347 so that we needn't worry about integer overflow (!).
6348 Now of type bool. All uses changed.
6349 (complaint_issued): Renamed from complain_message_count; likewise.
6350
6351 * src/main.c (main): Use exit to exit with failure.
6352
6353 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
6354 rather than 1 and 0.
6355 * src/main.c (main): Likewise.
6356 * src/getargs.c (getargs): Likewise.
6357 * src/reader.c (reader): Likewise.
6358
6359 * src/getarg.c (getargs): Remove duplicate code for
6360 "Try `bison --help'".
6361
6362 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
6363 What was that "2" for?
6364
6365 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
6366 * src/getargs.c (usage): Likewise.
6367
6368 * src/getargs.c (getargs): When there are too few operands, report
6369 the last one. When there are too many, report the first extra
6370 one. This is how diffutils does it.
6371
6372 2002-10-20 Paul Eggert <eggert@twinsun.com>
6373
6374 Remove K&R vestiges.
6375 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
6376 * src/complain.c (VA_START): Remove. Assume prototypes.
6377 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
6378 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
6379 fatal): Assume prototypes.
6380 * src/complain.h: Assume prototypes.
6381 * src/system.h (PARAMS): Remove.
6382 Include <limits.h> unconditionally, since it's guaranteeed even
6383 for a freestanding C89 compiler.
6384 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
6385 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
6386
6387 2002-10-20 Akim Demaille <akim@epita.fr>
6388
6389 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
6390 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
6391 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
6392 (yyresolveStates, yyresolveAction, yyresolveStack)
6393 (yyprocessOneStack): Use them.
6394 (yy_reduce_print): New.
6395 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
6396
6397 2002-10-20 Akim Demaille <akim@epita.fr>
6398
6399 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
6400 arguments and output `void'.
6401 (b4_c_function): Rename as...
6402 (b4_c_function_def): this.
6403 (b4_c_function_decl, b4_c_ansi_function_def)
6404 (b4_c_ansi_function_decl): New.
6405 Change the interpretation of the arguments: before `int, foo', now
6406 `int foo, foo'.
6407 * data/yacc.c (yyparse): Prototype and define thanks to these.
6408 Adjust b4_c_function_def uses.
6409 * data/glr.c (yyparse): Likewise, but ANSI only.
6410
6411 2002-10-20 Akim Demaille <akim@epita.fr>
6412
6413 * src/output.c (prepare): Move the definition of `tokens_number',
6414 `nterms_number', `undef_token_number', `user_token_number_max'
6415 to...
6416 (prepare_tokens): Here.
6417 (prepare_tokens): Rename as...
6418 (prepare_symbols): this.
6419 (prepare): Move the definition of `rules_number' to...
6420 (prepare_rules): here.
6421 (prepare): Move the definition of `last', `final_state_number',
6422 `states_number' to...
6423 (prepare_states): here.
6424 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
6425
6426 2002-10-20 Akim Demaille <akim@epita.fr>
6427
6428 * src/tables.h, src/tables.c, src/output.c: Comment changes.
6429
6430 2002-10-20 Akim Demaille <akim@epita.fr>
6431
6432 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
6433 * data/c.m4: here.
6434
6435 2002-10-20 Akim Demaille <akim@epita.fr>
6436
6437 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
6438 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
6439 `pair'.
6440 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
6441 `name' to...
6442 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
6443 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
6444 These.
6445
6446 2002-10-19 Paul Eggert <eggert@twinsun.com>
6447
6448 Do not create a temporary file, as that involves security and
6449 cleanup headaches. Instead, use a pair of pipes.
6450 Derived from a suggestion by Florian Krohm.
6451 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
6452 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
6453 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
6454 (BISON_PREREQ_SUBPIPE): Add.
6455 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
6456 Add subpipe.h, subpipe.c.
6457 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
6458 * po/POTFILES.in: Add lib/subpipe.c.
6459 * src/output.c: Include "subpipe.h".
6460 (m4_invoke): Remove decl.
6461 (scan_skel): New decl.
6462 (output_skeleton): Use pipe rather than temporary file for m4 input.
6463 Check that m4sugar.m4 is readable, to avoid deadlock.
6464 Check for pipe I/O error.
6465 * src/scan-skel.l (readpipe): Remove decl.
6466 (scan_skel): New function, to be used in place of m4_invoke.
6467 Read from stream rather than file.
6468
6469 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
6470 float, as this generates a warning on Solaris 8 + GCC 3.2 with
6471 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
6472 this generates a more-accurate value anyway.
6473
6474 * lib/timevar.c (timervar_accumulate): Rename locals to
6475 avoid confusion with similarly-named more-global.
6476 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
6477
6478 * src/output.c (prepare): Use xstrdup to convert char const *
6479 to char *, to avoid GCC warning.
6480
6481 2002-10-19 Akim Demaille <akim@epita.fr>
6482
6483 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
6484 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
6485 Use them to have `calc.y' ready for %pure-parser.
6486 * data/yacc.c (YYLEX): Pass a yylex return type to
6487 b4_c_function_call.
6488
6489 2002-10-19 Akim Demaille <akim@epita.fr>
6490
6491 Prototype support of %lex-param and %parse-param.
6492
6493 * src/parse-gram.y: Add the definition of the %lex-param and
6494 %parse-param tokens, plus their rules.
6495 Drop the `_' version of %glr-parser.
6496 Add the "," token.
6497 * src/scan-gram.l (INITIAL): Scan them.
6498 * src/muscle_tab.c: Comment changes.
6499 (muscle_insert, muscle_find): Rename `pair' as `probe'.
6500 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
6501 (muscle_entry_s): The `value' member is no longer const.
6502 Adjust all dependencies.
6503 * src/muscle_tab.c (muscle_init): Adjust: use
6504 MUSCLE_INSERT_STRING.
6505 Initialize the obstack earlier.
6506 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
6507 (muscle_pair_list_grow): New.
6508 * data/c.m4 (b4_c_function_call, b4_c_args): New.
6509 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
6510 * tests/calc.at: Use %locations, not --locations.
6511 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
6512
6513 2002-10-19 Akim Demaille <akim@epita.fr>
6514
6515 * src/getargs.c (usage): Take status as argument and exit
6516 accordingly.
6517 Report the traditional `Try ... --help' message when status != 0.
6518 (usage, version): Don't take a FILE * as arg, it is pointless.
6519 (getargs): When there is an incorrect number of arguments, make it
6520 an error, and report it GNUlically thanks to `usage ()'.
6521
6522 2002-10-18 Paul Eggert <eggert@twinsun.com>
6523
6524 * data/glr.c (yyreportParseError): Don't assume that sprintf
6525 yields the length of the printed string, as this is not true
6526 on SunOS 4.1.4. Reported by Peter Klein.
6527
6528 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
6529 * tests/conflicts.at (%nonassoc and eof): Likewise.
6530 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
6531
6532 2002-10-17 Akim Demaille <akim@epita.fr>
6533
6534 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
6535 * src/getargs.c (trace_types, trace_args): Adjust.
6536 * src/reader.c (grammar_current_rule_prec_set)
6537 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
6538 Standardize error messages.
6539 And s/@prec/%prec/!
6540 (reader): Use trace_flag to enable scanner/parser debugging,
6541 instead of an adhoc scheme.
6542 * src/scan-gram.l: Remove trailing debugging code.
6543
6544 2002-10-16 Paul Eggert <eggert@twinsun.com>
6545
6546 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
6547 MUSCLE_TAB_H.
6548
6549 * NEWS: Officially drop support for building Bison with K&R C,
6550 since it didn't work anyway and it's not worth worrying about.
6551 * Makefile.maint (wget_files): Remove ansi2knr.c.
6552 (ansi2knr.c-url_prefix): Remove.
6553 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
6554 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6555 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6556
6557 2002-10-15 Paul Eggert <eggert@twinsun.com>
6558
6559 Stop using the "enum_" trick for K&R-style function definitions;
6560 it confused me, and I was the author! Instead, assume that people
6561 who want to use K&R C compilers (when using these modules in GCC,
6562 perhaps?) will run ansi2knr.
6563
6564 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
6565 All uses of "enum_" changed to "enum ".
6566 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6567 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6568
6569 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
6570 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
6571 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
6572 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
6573 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
6574 abitset_not, abitset_ones, abitset_or, abitset_or_and,
6575 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
6576 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
6577 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
6578 Use function prototypes; this removes the need for declaring
6579 static functions simply to provide their prototypes.
6580 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
6581 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
6582 bitset_count_, bitset_create, bitset_dump, bitset_first,
6583 bitset_free, bitset_init, bitset_last, bitset_next,
6584 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
6585 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
6586 bitset_print, bitset_release_memory, bitset_toggle_,
6587 bitset_type_choose, bitset_type_get, bitset_type_name_get,
6588 debug_bitset): Likewise.
6589 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
6590 * lib/bitset_stats.c (bitset_log_histogram_print,
6591 bitset_percent_histogram_print, bitset_stats_and,
6592 bitset_stats_and_cmp, bitset_stats_and_or,
6593 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
6594 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
6595 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
6596 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
6597 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
6598 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
6599 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
6600 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
6601 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
6602 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
6603 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
6604 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
6605 bitset_stats_zero): Likewise.
6606 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6607 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6608 bitsetv_dump, debug_bitsetv): Likewise.
6609 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
6610 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
6611 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
6612 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
6613 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
6614 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
6615 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
6616 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
6617 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
6618 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
6619 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
6620 Likewise.
6621 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
6622 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
6623 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
6624 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
6625 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
6626 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
6627 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
6628 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
6629 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
6630 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
6631 lbitset_xor_cmp, lbitset_zero): Likewise.
6632
6633 2002-10-14 Akim Demaille <akim@epita.fr>
6634
6635 Version 1.75.
6636
6637 2002-10-14 Akim Demaille <akim@epita.fr>
6638
6639 * tests/Makefile.am (maintainer-check-posix): New.
6640
6641 2002-10-14 Akim Demaille <akim@epita.fr>
6642
6643 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
6644 member.
6645
6646 2002-10-14 Akim Demaille <akim@epita.fr>
6647
6648 * src/tables.c (table_ninf_remap): base -> tab.
6649 Reported by Matt Rosing.
6650
6651 2002-10-14 Paul Eggert <eggert@twinsun.com>
6652
6653 * tests/action.at, tests/calc.at, tests/conflicts.at,
6654 tests/cxx-type.at, tests/headers.at, tests/input.at,
6655 tests/regression.at, tests/synclines.at, tests/torture.at:
6656 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
6657 so that the tests still work even if POSIXLY_CORRECT is set.
6658 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
6659
6660 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
6661 for portability to K&R hosts. Fix typo: signed char is guaranteed
6662 only to 127, not to 128.
6663 * data/glr.c (yysigned_char): New type.
6664 * data/yacc.c (yysigned_char): Likewise.
6665 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
6666
6667 2002-10-13 Paul Eggert <eggert@twinsun.com>
6668
6669 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
6670 true due to limited range of data type" warning from GCC.
6671
6672 * data/c.m4 (b4_token_defines): Protect against double-inclusion
6673 by wrapping enum yytokentype's definition inside #ifndef
6674 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
6675
6676 2002-10-13 Akim Demaille <akim@epita.fr>
6677
6678 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
6679 Un yy- yyrhs to avoid the name clash with the global YYRHS.
6680
6681 2002-10-13 Akim Demaille <akim@epita.fr>
6682
6683 * Makefile.maint: Update from Autoconf 2.54.
6684 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
6685
6686 2002-10-13 Akim Demaille <akim@epita.fr>
6687
6688 * src/print.c (print_state): Separate the list of solved conflicts
6689 from the other items.
6690 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
6691
6692 2002-10-13 Akim Demaille <akim@epita.fr>
6693
6694 Let nondeterministic skeletons be usable with deterministic
6695 tables.
6696
6697 With the patch, GAWK compiled by GCC without -O2 passes its test
6698 suite using a GLR parser driven by LALR tables. It fails with -O2
6699 because `struct stat' gives two different answers on my machine:
6700 88 (definition of an auto var) and later 96 (memset on this var).
6701 Hence the stack is badly corrumpted. The headers inclusion is to
6702 blame: if I move the awk.h inclusion before GLR's system header
6703 inclusion, the two struct stat have the same size.
6704
6705 * src/tables.c (pack_table): Always create conflict_table.
6706 (token_actions): Always create conflict_list.
6707 * data/glr.c (YYFLAG): Remove, unused.
6708
6709 2002-10-13 Akim Demaille <akim@epita.fr>
6710
6711 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
6712 (O0FLAGS): New.
6713 (VALGRIND, GXX): New.
6714 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
6715 * tests/bison.in: Run $PREBISON a pre-command.
6716 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
6717 (maintainer-check-g++): New.
6718 * Makefile.am (maintainer-check): New.
6719
6720 2002-10-13 Akim Demaille <akim@epita.fr>
6721
6722 * data/glr.c: Formatting changes.
6723 Tweak some trace messages to match yacc.c's.
6724
6725 2002-10-13 Akim Demaille <akim@epita.fr>
6726
6727 GLR parsers sometimes raise parse errors instead of performing the
6728 default reduction.
6729 Reported by Charles-Henry de Boysson.
6730
6731 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
6732 check the length of the traces when %glr.
6733 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
6734 GLR's traces.
6735 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
6736 Test GLR parsers.
6737 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
6738 (yyltype): Remove the yy prefix from the member names.
6739 (yytable): Complete its comment.
6740 (yygetLRActions): Map error action number from YYTABLE from
6741 YYTABLE_NINF to 0.
6742 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
6743 (which was a bug: it should have been YYTABEL_NINF, and yet it was
6744 not satisfying as we could compare an YYACTION computed from
6745 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
6746 only value for error actions.
6747 (yyreportParseError): In verbose parse error messages, don't issue
6748 `error' in the list of expected tokens.
6749 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
6750 next action to perform to match glr.c's decoding.
6751 (yytable): Complete its comment.
6752
6753 2002-10-13 Paul Eggert <eggert@twinsun.com>
6754
6755 Fix problem reported by Henrik Grubbstroem in
6756 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
6757 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
6758 because the Bison parser reads the second action before reducing
6759 the first one.
6760 * src/scan-gram.l (rule_length): New static var.
6761 Use it to keep track of the rule length in the scanner, since
6762 we can't expect the parser to be in lock-step sync with the scanner.
6763 (handle_action_dollar, handle_action_at): Use this var.
6764 * tests/actions.at (Exotic Dollars): Test for the problem.
6765
6766 2002-10-12 Paul Eggert <eggert@twinsun.com>
6767
6768 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
6769 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
6770 Include <sys/time.h> when checking for clock_t and struct tms.
6771 Use same include order as source.
6772 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
6773 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
6774
6775 * lib/timevar.c: Update copyright date and clarify comments.
6776 (get_time) [IN_GCC]: Keep the GCC version for reference.
6777
6778 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
6779 GCC version as of today, then merge Bison's changes.
6780 Change "GCC" to "Bison" in copyright notice. timevar.def's
6781 author is Akim, so change that too.
6782
6783 * src/reader.c (grammar_current_rule_check):
6784 Don't worry about the default action if $$ is untyped.
6785 Prevents bogus warnings reported by Jim Gifford in
6786 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
6787
6788 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
6789 * data/glr.c, data/lalr1.cc, data/yacc.c:
6790 Output token definitions before the first part of user declarations.
6791 Fixes compatibility problem reported by Jim Gifford for kbd in
6792 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
6793
6794 2002-10-11 Paul Eggert <eggert@twinsun.com>
6795
6796 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
6797 (yyparse): here. This undoes some of the 2002-07-25 change.
6798 Compatibility problem reported by Ralf S. Engelschall with
6799 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
6800
6801 2002-10-11 Akim Demaille <akim@epita.fr>
6802
6803 * tests/regression.at Characters Escapes): New.
6804 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
6805 characters.
6806 Reported by Jan Nieuwenhuizen.
6807
6808 2002-10-11 Akim Demaille <akim@epita.fr>
6809
6810 * po/id.po: New.
6811
6812 2002-10-10 Paul Eggert <eggert@twinsun.com>
6813
6814 Portability fixes for bitsets; this also avoids several GCC
6815 warnings.
6816
6817 * lib/abitset.c: Include <stddef.h>, for offsetof.
6818 * lib/lbitset.c: Likewise.
6819
6820 * lib/abitset.c (abitset_bytes): Return a size that is aligned
6821 properly for vectors of objects. Do not assume that adding a
6822 header size to a multiple of a word size yields a value that is
6823 properly aligned for the whole union.
6824 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6825
6826 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
6827 unique names for structures.
6828 * lib/ebitset.c (ebitset_bytes): Likewise.
6829 * lib/lbitset.c (lbitset_bytes): Likewise.
6830
6831 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
6832 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
6833 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
6834 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
6835 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
6836 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
6837 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
6838 to improve the type-checking that GCC can do.
6839 * lib/bitset.c (bitset_op4_cmp): Likewise.
6840 * lib/bitset_stats.c (bitset_stats_count,
6841 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
6842 bitset_stats_copy, bitset_stats_disjoint_p,
6843 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
6844 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
6845 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
6846 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
6847 bitset_stats_and_or_cmp, bitset_stats_andn_or,
6848 bitset_stats_andn_or_cmp, bitset_stats_or_and,
6849 bitset_stats_or_and_cmp): Likewise.
6850 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
6851 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
6852 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
6853 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
6854
6855 * lib/abitset.h: Include bitset.h, not bbitset.h.
6856 * lib/ebitset.h: Likewise.
6857 * lib/lbitset.h: Likewise.
6858
6859 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
6860 All instances of parameters of type enum bitset_opts are now of
6861 type enum_bitset_opts, to conform to the C Standard, and similarly
6862 for enum_bitset_type.
6863 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6864 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6865
6866 Do not use "struct bitset_struct" to mean different things in
6867 different modules. Not only is this confusing, it violates
6868 the C Standard, which requires that structure types in different
6869 modules must be compatible if one is to be passed to the other.
6870 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
6871 All instances of "struct bitset_struct *" replaced with "bitset".
6872 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
6873 (union bitset_union, struct abitset_struct, struct ebitset_struct,
6874 struct lbitset_struct, struct bitset_stats_struct): New types.
6875 All uses of struct bitset_struct changed to union bitset_union,
6876 etc.
6877 * lib/abitset.c (struct abitset_struct, abitset,
6878 struct bitset_struct): Remove.
6879 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
6880 struct bitset_struct): Remove.
6881 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
6882 bitset_struct): Remove.
6883 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
6884 Likewise.
6885
6886 Do not call a function of type T using a call that assumes the
6887 function is of a different type U. Standard C requires that a
6888 function must be called with a type that is compatible with its
6889 definition.
6890 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6891 New decls.
6892 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6893 New functions.
6894 * lib/ebitset.c (PFV): Remove.
6895 * lib/lbitset.c (PFV): Likewise.
6896 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
6897 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
6898 decls.
6899 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
6900 (ebitset_vtable): Use them.
6901 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
6902 lbitset_xor): New functions.
6903 (lbitset_vtable): Use them.
6904
6905 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
6906 Declare.
6907
6908 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
6909 GCC warning.
6910 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
6911 Use offsetof, for simplicity.
6912
6913 2002-10-06 Paul Eggert <eggert@twinsun.com>
6914
6915 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
6916 the same width as int. This reapplies a hunk of the 2002-08-12 patch
6917 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6918 which was inadvertently undone by the 2002-09-30 patch.
6919 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
6920 the same width as int.
6921
6922 2002-10-04 Paul Eggert <eggert@twinsun.com>
6923
6924 Version 1.50.
6925
6926 * configure.ac (AC_INIT), NEWS: Increment version number.
6927
6928 * doc/bison.texinfo: Minor spelling, grammar, and white space
6929 fixes.
6930 (Symbols): Mention that any negative value returned from yylex
6931 signifies end-of-input. Warn about negative chars. Mention
6932 the portable Standard C character set.
6933
6934 The GNU coding standard says CFLAGS and YFLAGS are reserved
6935 for the installer to set.
6936 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
6937 * src/Makefile.am (AM_CFLAGS): Likewise.
6938 (AM_YFLAGS): Renamed from YFLAGS.
6939
6940 Fix some MAX and MIN problems.
6941 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
6942 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
6943 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
6944 * src/reader.c (reader): Use it.
6945
6946 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
6947 POSIX 1003.1-2001 has removed fgrep.
6948
6949 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6950
6951 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
6952 interpreted as signed.
6953 * lib/ebitset.c (ebitset_list): Fix bug.
6954
6955 2002-10-01 Paul Eggert <eggert@twinsun.com>
6956
6957 More fixes for 64-bit hosts and large bitsets.
6958
6959 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
6960 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
6961 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
6962 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
6963 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
6964 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
6965 bitset_count_): Likewise.
6966 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
6967 bitset_first, bitset_last): Likewise.
6968 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
6969 bitset_stats_list_reverse, bitset_stats_size,
6970 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
6971 Likewise.
6972 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6973 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6974 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6975 bitsetv_reflexive_transitive_closure): Likewise.
6976 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
6977 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
6978 Likewise.
6979 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
6980 Likewise.
6981
6982 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
6983 Use size_t, not unsigned int, to count bytes.
6984 * lib/abitset.h (abitset_bytes): Likewise.
6985 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
6986 Likewise.
6987 * lib/bitset.h (bitset_bytes): Likewise.
6988 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
6989 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
6990 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6991 * lib/ebitset.c (ebitset_bytes): Likewise.
6992 * lib/ebitset.h (ebitset_bytes): Likewise.
6993 * lib/lbitset.c (lbitset_bytes): Likewise.
6994 * lib/lbitset.h (lbitset_bytes): Likewise.
6995
6996 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
6997 abitset_subset_p, abitset_disjoint_p, abitset_and,
6998 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
6999 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
7000 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
7001 abitset_or_and, abitset_or_and_cmp):
7002 Use bitset_windex instead of unsigned int.
7003 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7004 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
7005 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
7006 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
7007 Likewise.
7008 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
7009
7010 * lib/bitset.c (bitset_print):
7011 Use proper printf formats for widths of integer types.
7012 * lib/bitset_stats.c (bitset_percent_histogram_print,
7013 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
7014 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7015 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
7016 * lib/lbitset.c (lbitset_bytes): Likewise.
7017
7018 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
7019 BITSET_SIZE_MAX): New macros.
7020 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
7021 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
7022 to BITSET_WINDEX_MAX.
7023
7024 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
7025 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
7026 since we now return the bitset_bindex type (not int).
7027
7028 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
7029 when computing sizes.
7030 * lib/ebitset.c (ebitset_elts_grow): Likewise.
7031
7032 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
7033 and avoid cast to unsigned.
7034
7035 2002-09-30 Akim Demaille <akim@epita.fr>
7036
7037 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7038 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
7039 Updates from Michael Hayes.
7040
7041 2002-09-30 Art Haas <ahaas@neosoft.com>
7042
7043 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
7044 invocations.
7045 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
7046 defined.
7047
7048 2002-09-27 Akim Demaille <akim@epita.fr>
7049
7050 Version 1.49c.
7051
7052 2002-09-27 Akim Demaille <akim@epita.fr>
7053
7054 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
7055 (Because of AC_LIBSOURCE).
7056
7057 2002-09-27 Akim Demaille <akim@epita.fr>
7058
7059 Playing with Autoscan.
7060
7061 * configure.ac: Remove the old LIBOBJ tweaks.
7062 (AC_REPLACE_FUNCS): Add strrchr and strtol.
7063 * lib/strrchr.c: New.
7064 * lib/strtol.c: New, from the Coreutils 4.5.1.
7065
7066 2002-09-27 Akim Demaille <akim@epita.fr>
7067
7068 Playing with Autoscan.
7069
7070 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
7071 * lib/Makefile.am (libbison_a_SOURCES): No longer include
7072 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
7073 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
7074 Coreutils 4.5.1.
7075
7076 2002-09-24 Akim Demaille <akim@epita.fr>
7077
7078 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
7079 (Frequently Asked Questions, Parser Stack Overflow): New.
7080
7081 2002-09-13 Akim Demaille <akim@epita.fr>
7082
7083 Playing with autoscan.
7084
7085 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
7086 * src/files.c (skeleton_find): Remove, unused.
7087 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
7088 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
7089
7090 2002-09-13 Akim Demaille <akim@epita.fr>
7091
7092 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
7093 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
7094
7095 2002-09-13 Akim Demaille <akim@epita.fr>
7096
7097 * configure.ac: Require 2.54.
7098 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
7099 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
7100 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
7101 Remove, provided by Autoconf macros.
7102
7103 2002-09-12 Akim Demaille <akim@epita.fr>
7104
7105 * m4/prereq.m4: Update, from Coreutils 4.5.1.
7106
7107 2002-09-12 Akim Demaille <akim@epita.fr>
7108
7109 * m4/prereq.m4: Update, from Fileutils 4.1.5.
7110 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
7111 Reported by Martin Mokrejs.
7112
7113 2002-09-10 Akim Demaille <akim@epita.fr>
7114
7115 * src/parse-gram.y: Associate a human readable string to each
7116 token type.
7117 * tests/regression.at (Invalid inputs): Adjust.
7118
7119 2002-09-10 Gary V. Vaughan <gary@gnu.org>
7120
7121 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
7122 with an Autoconf-2.5x style configure.ac.
7123
7124 2002-09-06 Paul Eggert <eggert@twinsun.com>
7125
7126 * doc/bison.texinfo (Conditions): Make explicit that the GPL
7127 exception applies only to yacc.c. This is a modification of a
7128 patch originally suggested by Akim Demaille.
7129
7130 2002-09-06 Akim Demaille <akim@epita.fr>
7131
7132 * data/c.m4 (b4_copyright): Move the GPL exception comment from
7133 here to...
7134 * data/yacc.c: here.
7135
7136 * data/lalr1.cc (struct yyltype): Don't define it, since we use
7137 LocationType.
7138 (b4_ltype): Default to yy::Location from location.hh.
7139
7140 2002-09-04 Jim Meyering <jim@meyering.net>
7141
7142 * data/yacc.c: Guard the declaration of yytoknum also with
7143 `#ifdef YYPRINT', so it is declared only when used.
7144
7145 2002-09-04 Akim Demaille <akim@epita.fr>
7146
7147 * configure.in: Rename as...
7148 * configure.ac: this.
7149 Bump to 1.49c.
7150
7151 2002-09-04 Akim Demaille <akim@epita.fr>
7152
7153 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
7154 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
7155 translate maintainer only messages.
7156
7157 2002-08-12 Paul Eggert <eggert@twinsun.com>
7158
7159 Version 1.49b.
7160
7161 * Makefile.am (SUBDIRS): Remove intl.
7162 (DISTCLEANFILES): Remove.
7163 * NEWS: Mention that GNU M4 is now required. Clarify what is
7164 meant by "larger grammars". Mention the pt_BR translation.
7165 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
7166 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
7167 Bump version from 0.11.2 to 0.11.5.
7168 (BISON_PREREQ_STAGE): Remove.
7169 (AM_GNU_GETTEXT): Use external gettext.
7170 (AC_OUTPUT): Remove intl/Makefile.
7171
7172 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
7173
7174 * data/glr.c: Include string.h, for strlen.
7175 (yyreportParseError): Use size_t for yysize.
7176 (yy_yypstack): No longer nested inside yypstates, as nested
7177 functions are not portable. Do not assume size_t is the
7178 same width as int.
7179 (yypstates): Do not assume that ptrdiff_t is the same width
7180 as int, and similarly for yyposn and YYINDEX.
7181
7182 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
7183
7184 * lib/Makefile.am (INCLUDES): Do not include from the intl
7185 directory, which has been removed.
7186 * src/Makefile.am (INCLUDES): Likewise.
7187
7188 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
7189 (bitsets_sources, additional_bitsets_sources, timevars_sources):
7190 New vars.
7191
7192 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
7193 * tests/Makefile.am (EXTRA_DIST): Likewise.
7194
7195 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
7196 Do not assume that bitset_windex is the same width as unsigned.
7197
7198 * lib/abitset.c (abitset_unused_clear): Do not assume that
7199 bitset_word is the same width as int.
7200 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
7201 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
7202 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
7203 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
7204 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
7205
7206 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
7207 portability to one's complement hosts!).
7208 * lib/ebitset.c (ebitset_op1): Likewise.
7209 * lib/lbitset.c (lbitset_op1): Likewise.
7210
7211 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
7212 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7213 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
7214 Sync with fileutils.
7215 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
7216 lib/gettext.h: Sync with diffutils.
7217
7218 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
7219 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
7220
7221 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
7222 PROTOTYPES to check for prototypes, and "defined __STDC__" to
7223 check for void *.
7224
7225 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
7226 size_t; the old version tried to do this but casted improperly.
7227 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
7228 (bitset_test): Now returns int, not unsigned long.
7229
7230 * lib/bitset_stats.c: Include "gettext.h".
7231 (_): New macro.
7232 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
7233 name locals "index", as it generates unnecessary warnings on some
7234 hosts that have an "index" function.
7235
7236 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
7237 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
7238 they need translation.
7239 * src/LR0.c (state_list_append, new_itemsets, get_state,
7240 append_states, generate_states): Likewise.
7241 * src/assoc.c (assoc_to_string): Likewise.
7242 * src/closure.c (print_closure, set_firsts, closure): Likewise.
7243 * src/gram.c (grammar_dump): Likewise.
7244 * src/injections.c (injections_compute): Likewise.
7245 * src/lalr.c (lookaheads_print): Likewise.
7246 * src/relation.c (relation_transpose): Likewise.
7247 * src/scan-gram.l: Likewise.
7248 * src/tables.c (table_grow, pack_vector): Likewise.
7249
7250 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
7251 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
7252 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
7253 * m4/mbstate_t.m4: Sync with fileutils.
7254 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
7255
7256 * po/LINGUAS: Add pt_BR.
7257 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
7258 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
7259 lib/timevar.c.
7260 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
7261 manual recommends.
7262 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
7263
7264 * src/complain.c (strerror_r): Remove decl; not needed.
7265 (strerror): Use same pattern as ../lib/error.c.
7266
7267 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
7268
7269 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
7270
7271 * src/main.c (main): Cast result of bindtextdomain and textdomain
7272 to void, to avoid a GCC warning when --disable-nls is in effect.
7273
7274 * src/scan-gram.l: Use strings rather than escapes when possible,
7275 to minimize the number of warnings from xgettext.
7276 (handle_action_dollar, handle_action_at): Don't use isdigit,
7277 as it mishandles negative chars and it may not work as expected
7278 outside the C locale.
7279
7280 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
7281 this is a GCC extension and is not portable to other compilers.
7282
7283 * src/system.h (alloca): Use same pattern as ../lib/error.c.
7284 Do not include <ctype.h>; no longer needed.
7285 Do not include <malloc.h>; no longer needed (and generates
7286 warnings on OpenBSD 3.0).
7287
7288 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
7289 it's not portable.
7290
7291 * tests/regression.at: Do not use 'cc -c input.c -o input';
7292 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
7293
7294 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
7295 exit status as failure, not just exit status 1. Sun C exits
7296 with status 2 sometimes.
7297
7298 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
7299 Use it for the two large tests.
7300
7301 2002-08-02 Akim Demaille <akim@epita.fr>
7302
7303 * src/conflicts.c (conflicts_output): Don't output rules never
7304 reduced here, since anyway that computation doesn't work.
7305 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
7306 (rule_useless_p, rule_never_reduced_p): New.
7307 (grammar_rules_partial_print): Use a filter instead of a range.
7308 Display the title only if needed.
7309 (grammar_rules_print): Adjust.
7310 (grammar_rules_never_reduced_report): New.
7311 * src/tables.c (action_row): Move the computation of rules never
7312 reduced to...
7313 (token_actions): here.
7314 * src/main.c (main): Make the parser before making the report, so
7315 that rules never reduced are computed.
7316 Call grammar_rules_never_reduced_report.
7317 * src/print.c (print_results): Report rules never reduced.
7318 * tests/conflicts.at, tests/reduce.at: Adjust.
7319
7320 2002-08-01 Akim Demaille <akim@epita.fr>
7321
7322 Instead of attaching lookaheads and duplicating the rules being
7323 reduced by a state, attach the lookaheads to the reductions.
7324
7325 * src/state.h (state_t): Remove the `lookaheads',
7326 `lookaheads_rule' member.
7327 (reductions_t): Add a `lookaheads' member.
7328 Use a regular array for the `rules'.
7329 * src/state.c (reductions_new): Initialize the lookaheads member
7330 to 0.
7331 (state_rule_lookaheads_print): Adjust.
7332 * src/state.h, src/state.c (state_reductions_find): New.
7333 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
7334 (count_rr_conflicts): Adjust.
7335 * src/lalr.c (LArule): Remove.
7336 (add_lookback_edge): Adjust.
7337 (state_lookaheads_count): New.
7338 (states_lookaheads_initialize): Merge into...
7339 (initialize_LA): this.
7340 (lalr_free): Adjust.
7341 * src/main.c (main): Don't free nullable and derives too early: it
7342 is used by --verbose.
7343 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
7344
7345 2002-08-01 Akim Demaille <akim@epita.fr>
7346
7347 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
7348 `rule_number_t**'.
7349 (set_derives, free_derives): Rename as...
7350 (derives_compute, derives_free): this.
7351 Adjust all dependencies.
7352 * src/nullable.c (set_nullable, free_nullable): Rename as...
7353 (nullable_compute, nullable_free): these.
7354 (rule_list_t): Store rule_t *, not rule_number_t.
7355 * src/state.c (state_rule_lookaheads_print): Directly compare rule
7356 pointers, instead of their numbers.
7357 * src/main.c (main): Call nullable_free, and derives_free earlier,
7358 as they were lo longer used.
7359
7360 2002-08-01 Akim Demaille <akim@epita.fr>
7361
7362 * lib/timevar.c (get_time): Include children time.
7363 * src/lalr.h (LA, LArule): Don't export them: used with the
7364 state_t.
7365 * src/lalr.c (LA, LArule): Static.
7366 * src/lalr.h, src/lalr.c (lalr_free): New.
7367 * src/main.c (main): Call it.
7368 * src/tables.c (pack_vector): Check whether loc is >= to the
7369 table_size, not >.
7370 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
7371 (tables_generate): do it, since that's also it which allocates
7372 them.
7373 Don't free LA and LArule, main does.
7374
7375 2002-07-31 Akim Demaille <akim@epita.fr>
7376
7377 Separate parser tables computation and output.
7378
7379 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
7380 (conflict_list, conflict_list_cnt, table, check, table_ninf)
7381 (yydefgoto, yydefact, high): Move to...
7382 * src/tables.h, src/tables.c: here.
7383 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
7384 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
7385 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
7386 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
7387 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
7388 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
7389 (action_row, save_row, token_actions, save_column, default_goto)
7390 (goto_actions, sort_actions, matching_state, pack_vector)
7391 (table_ninf_remap, pack_table, prepare_actions): Move to...
7392 * src/tables.c: here.
7393 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
7394 * src/output.c (token_actions, output_base, output_conflicts)
7395 (output_check): Merge into...
7396 (prepare_actions): this.
7397 (actions_output): Rename as...
7398 (user_actions_output): this.
7399 * src/main.c (main): Call tables_generate and tables_free.
7400
7401 2002-07-31 Akim Demaille <akim@epita.fr>
7402
7403 Steal GCC's --time-report support.
7404
7405 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
7406 stolen/adjusted from GCC.
7407 * m4/stage.m4: Remove time related checks.
7408 * m4/timevar.m4: New.
7409 * configure.in: Adjust.
7410 * src/system.h: Adjust to using timevar.h.
7411 * src/getargs.h, src/getargs.c: Support trace_time for
7412 --trace=time.
7413 * src/main.c (stage): Remove.
7414 (main): Replace `stage' invocations with timevar calls.
7415 * src/output.c: Insert pertinent timevar calls.
7416
7417 2002-07-31 Akim Demaille <akim@epita.fr>
7418
7419 Let --trace have arguments.
7420
7421 * src/getargs.h (enum trace_e): New.
7422 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
7423 (long_options, short_options): --trace/-T takes an optional
7424 argument.
7425 Change all the uses of trace_flag to reflect the new flags.
7426 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
7427
7428 Strengthen `stage' portability.
7429
7430 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
7431 * configure.in: Use it.
7432 Don't check for malloc.h and sys/times.h.
7433 * src/system.h: Include them when appropriate.
7434 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
7435 times and struct tms are available.
7436
7437 2002-07-30 Akim Demaille <akim@epita.fr>
7438
7439 In verbose parse error message, don't report `error' as an
7440 expected token.
7441 * tests/actions.at (Printers and Destructors): Adjust.
7442 * tests/calc.at (Calculator $1): Adjust.
7443 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
7444 error message, do not report the parser accepts the error token in
7445 that state.
7446
7447 2002-07-30 Akim Demaille <akim@epita.fr>
7448
7449 Normalize conflict related messages.
7450
7451 * src/complain.h, src/complain.c (warn, complain): New.
7452 * src/conflicts.c (conflicts_print): Use them.
7453 (conflict_report_yacc): New, extracted from...
7454 (conflicts_print): here.
7455 * tests/conflicts.at, tests/existing.at: Adjust.
7456
7457 2002-07-30 Akim Demaille <akim@epita.fr>
7458
7459 Report rules which are never reduced by the parser: those hidden
7460 by conflicts.
7461
7462 * src/LR0.c (save_reductions): Don't make the final state too
7463 different: save its reduction (accept) instead of having a state
7464 without any action (no shift or goto, no reduce).
7465 Note: the final state is now a ``regular'' state, i.e., the
7466 parsers now contain `reduce 0' as default reduction.
7467 Nevertheless, since they decide to `accept' when yystate =
7468 final_state, they still will not reduce rule 0.
7469 * src/print.c (print_actions, print_reduction): Adjust.
7470 * src/output.c (action_row): Track reduced rules.
7471 (token_actions): Report rules never reduced.
7472 * tests/conflicts.at, tests/regression.at: Adjust.
7473
7474 2002-07-30 Akim Demaille <akim@epita.fr>
7475
7476 `stage' was accidently included in a previous patch.
7477 Initiate its autoconfiscation.
7478
7479 * configure.in: Look for malloc.h and sys/times.h.
7480 * src/main.c (stage): Adjust.
7481 Report only when trace_flag.
7482
7483 2002-07-29 Akim Demaille <akim@epita.fr>
7484
7485 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
7486 state_number_t.
7487 (errs_t): symbol_t*, not symbol_number_t.
7488 (reductions_t): rule_t*, not rule_number_t.
7489 (FOR_EACH_SHIFT): New.
7490 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
7491 * src/print.c, src/print_graph.c: Adjust.
7492
7493 2002-07-29 Akim Demaille <akim@epita.fr>
7494
7495 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
7496
7497 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
7498 (endtoken, accept): these.
7499 * src/reader.c (reader): Set endtoken's default tag to "$end".
7500 Set undeftoken's tag to "$undefined" instead of "$undefined.".
7501 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
7502 Adjust.
7503
7504 2002-07-29 Akim Demaille <akim@epita.fr>
7505
7506 * src/reduce.c (reduce_grammar): When the language is empty,
7507 complain about the start symbol, not the axiom.
7508 Use its location.
7509 * tests/reduce.at (Empty Language): New.
7510
7511 2002-07-26 Akim Demaille <akim@epita.fr>
7512
7513 * src/reader.h, src/reader.c (gram_error): ... can't get
7514 yycontrol without making too strong assumptions on the parser
7515 itself.
7516 * src/output.c (prepare_tokens): Use the real 0th value of
7517 token_translations instead of `0'.
7518 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
7519 visible here.
7520 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
7521 for the time being: %locations ought to provide it to yyerror.
7522
7523 2002-07-25 Akim Demaille <akim@epita.fr>
7524
7525 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
7526 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
7527 * tests/regression.at (Web2c Actions): Adjust.
7528
7529 2002-07-25 Akim Demaille <akim@epita.fr>
7530
7531 Stop storing rules from 1 to nrules + 1.
7532
7533 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
7534 * src/nullable.c, src/output.c, src/print.c, src/reader.c
7535 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
7536 Iterate from 0 to nrules.
7537 Use rule_number_as_item_number and item_number_as_rule_number.
7538 Adjust to `derive' now containing possibly 0.
7539 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
7540 Handle the `- 1' part in rule numbers from/to item numbers.
7541 * src/conflicts.c (log_resolution): Fix the message which reversed
7542 shift and reduce.
7543 * src/output.c (action_row): Initialize default_rule to -1.
7544 (token_actions): Adjust.
7545 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
7546 expected output.
7547 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
7548
7549 2002-07-25 Akim Demaille <akim@epita.fr>
7550
7551 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
7552 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
7553 (b4_c_knr_arg_decl): New.
7554 * data/yacc.c: Use it to define yysymprint, yydestruct, and
7555 yyreport_parse_error.
7556
7557 2002-07-25 Akim Demaille <akim@epita.fr>
7558
7559 * data/yacc.c (yyreport_parse_error): New, extracted from...
7560 (yyparse): here.
7561 (yydestruct, yysymprint): Move above yyparse.
7562 Be K&R compliant.
7563
7564 2002-07-25 Akim Demaille <akim@epita.fr>
7565
7566 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
7567 replace...
7568 (b4_sint_type, b4_uint_type): these.
7569 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
7570 * tests/regression.at (Web2c Actions): Adjust.
7571
7572 2002-07-25 Akim Demaille <akim@epita.fr>
7573
7574 * src/gram.h (TIEM_NUMBER_MAX): New.
7575 (item_number_of_rule_number, rule_number_of_item_number): Rename
7576 as...
7577 (rule_number_as_item_number, item_number_as_rule_number): these.
7578 Adjust dependencies.
7579 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
7580 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
7581 (symbol_number_to_vector_number): New.
7582 (order): Of vector_number_t* type.
7583 (base_t, BASE_MAX, BASE_MIN): New.
7584 (froms, tos, width, pos, check): Of base_t type.
7585 (action_number_t, ACTION_MIN, ACTION_MAX): New.
7586 (actrow): Of action_number_t type.
7587 (conflrow): Of unsigned int type.
7588 (table_ninf, base_ninf): New.
7589 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
7590 (muscle_insert_int_table, muscle_insert_base_table)
7591 (muscle_insert_rule_number_table): New.
7592 (prepare_tokens): Output `toknum' as int_table.
7593 (action_row): Returns a rule_number_t.
7594 Use ACTION_MIN, not SHRT_MIN.
7595 (token_actions): yydefact is rule_number_t*.
7596 (table_ninf_remap): New.
7597 (pack_table): Use it for `base' and `table'.
7598 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
7599 replaced with...
7600 (YYPACT_NINF, YYTABLE_NINF): these.
7601 (yypact, yytable): Compute their types instead of hard-coded
7602 `short'.
7603 * tests/regression.at (Web2c Actions): Adjust.
7604
7605 2002-07-19 Akim Demaille <akim@epita.fr>
7606
7607 * src/scan-gram.l (id): Can start with an underscore.
7608
7609 2002-07-16 Akim Demaille <akim@epita.fr>
7610
7611 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
7612 Adjust all former `associativity' dependencies.
7613 * src/symtab.c (symbol_new): Default associativity is `undef', not
7614 `right'.
7615 (symbol_check_alias_consistence): Adjust.
7616
7617 2002-07-09 Akim Demaille <akim@epita.fr>
7618
7619 * doc/bison.texinfo: Properly set the ``header'' part.
7620 Use @dircategory ``GNU programming tools'' as per Texinfo's
7621 documentation.
7622 Use @copying.
7623
7624 2002-07-09 Akim Demaille <akim@epita.fr>
7625
7626 * lib/quotearg.h: Protect against multiple inclusions.
7627 * src/location.h (location_t): Add a `file' member.
7628 (LOCATION_RESET, LOCATION_PRINT): Adjust.
7629 * src/complain.c (warn_at, complain_at, fatal_at): Drop
7630 `error_one_per_line' support.
7631
7632 2002-07-09 Akim Demaille <akim@epita.fr>
7633
7634 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
7635 * src/reader.c (lineno): Remove.
7636 Adjust all dependencies.
7637 (get_merge_function): Take a location and use complain_at.
7638 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
7639 * tests/regression.at (Invalid inputs, Mixing %token styles):
7640 Adjust.
7641
7642 2002-07-09 Akim Demaille <akim@epita.fr>
7643
7644 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
7645 recovery rule, and forbid extensions when --yacc.
7646 (gram_error): Use complain_at.
7647 * src/reader.c (reader): Exit if there were parse errors.
7648
7649 2002-07-09 Akim Demaille <akim@epita.fr>
7650
7651 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
7652 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
7653 Reported by R Blake <blakers@mac.com>.
7654
7655 2002-07-09 Akim Demaille <akim@epita.fr>
7656
7657 * data/yacc.c: Output the copyright notive in the header.
7658
7659 2002-07-03 Akim Demaille <akim@epita.fr>
7660
7661 * src/output.c (froms, tos): Are state_number_t.
7662 (save_column): sp, sp1, and sp2 are state_number_t.
7663 (prepare): Rename `final' as `final_state_number', `nnts' as
7664 `nterms_number', `nrules' as `rules_number', `nstates' as
7665 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
7666 unused.
7667 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
7668 * data/lalr1.cc (nsym_): Remove, unused.
7669
7670 2002-07-03 Akim Demaille <akim@epita.fr>
7671
7672 * src/lalr.h, src/lalr.c (goto_number_t): New.
7673 * src/lalr.c (goto_list_t): New.
7674 Propagate them.
7675 * src/nullable.c (rule_list_t): New.
7676 Propagate.
7677 * src/types.h: Remove.
7678
7679 2002-07-03 Akim Demaille <akim@epita.fr>
7680
7681 * src/closure.c (print_fderives): Use rule_rhs_print.
7682 * src/derives.c (print_derives): Use rule_rhs_print.
7683 (rule_list_t): New, replaces `shorts'.
7684 (set_derives): Add comments.
7685 * tests/sets.at (Nullable, Firsts): Adjust.
7686
7687 2002-07-03 Akim Demaille <akim@epita.fr>
7688
7689 * src/output.c (prepare_actions): Free `tally' and `width'.
7690 (prepare_actions): Allocate and free `order'.
7691 * src/symtab.c (symbols_free): Free `symbols'.
7692 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
7693 * src/output.c (m4_invoke): Move to...
7694 * src/scan-skel.l: here.
7695 (<<EOF>>): Close yyout, and free its name.
7696
7697 2002-07-03 Akim Demaille <akim@epita.fr>
7698
7699 Fix some memory leaks, and fix a bug: state 0 was examined twice.
7700
7701 * src/LR0.c (new_state): Merge into...
7702 (state_list_append): this.
7703 (new_states): Merge into...
7704 (generate_states): here.
7705 (set_states): Don't ensure a proper `errs' state member here, do it...
7706 * src/conflicts.c (conflicts_solve): here.
7707 * src/state.h, src/state.c: Comment changes.
7708 (state_t): Rename member `shifts' as `transitions'.
7709 Adjust all dependencies.
7710 (errs_new): For consistency, also take the values as argument.
7711 (errs_dup): Remove.
7712 (state_errs_set): New.
7713 (state_reductions_set, state_transitions_set): Assert that no
7714 previous value was assigned.
7715 (state_free): New.
7716 (states_free): Use it.
7717 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
7718 temporary storage: use `errs' and `nerrs' as elsewhere.
7719 (set_conflicts): Allocate and free this `errs'.
7720
7721 2002-07-02 Akim Demaille <akim@epita.fr>
7722
7723 * lib/libiberty.h: New.
7724 * lib: Update the bitset implementation from upstream.
7725 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
7726 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
7727 * src/main.c: Adjust bitset stats calls.
7728
7729 2002-07-01 Paul Eggert <eggert@twinsun.com>
7730
7731 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
7732 char, so that negative chars don't collide with $.
7733
7734 2002-06-30 Akim Demaille <akim@epita.fr>
7735
7736 Have the GLR tests be `warning' checked, and fix the warnings.
7737
7738 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
7739 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
7740 (yyremoveDeletes): `yyi' and `yyj' are size_t.
7741 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
7742 (yyaddDeferredAction): static.
7743 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
7744 (yyreportParseError): yyprefix is const.
7745 yytokenp is used only when verbose.
7746 (yy__GNUC__): Replace with __GNUC__.
7747 (yypdumpstack): yyi is size_t.
7748 (yypreference): Un-yy local variables and arguments, to avoid
7749 clashes with `yyr1'. Anyway, we are not in the user name space.
7750 (yytname_size): be an int, as is compared with ints.
7751 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
7752 Use them.
7753 * tests/cxx-gram.at: Use quotation to protect $1.
7754 Use AT_COMPILE to enable warnings hunts.
7755 Prototype yylex and yyerror.
7756 `Use' argc.
7757 Include `string.h', not `strings.h'.
7758 Produce and prototype stmtMerge only when used.
7759 yylex takes a location.
7760
7761 2002-06-30 Akim Demaille <akim@epita.fr>
7762
7763 We spend a lot of time in quotearg, in particular when --verbose.
7764
7765 * src/symtab.c (symbol_get): Store a quoted version of the key.
7766 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
7767 Adjust all callers.
7768
7769 2002-06-30 Akim Demaille <akim@epita.fr>
7770
7771 * src/state.h (reductions_t): Rename member `nreds' as num.
7772 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
7773 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
7774
7775 2002-06-30 Akim Demaille <akim@epita.fr>
7776
7777 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
7778 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
7779 (shifts_to): Rename as...
7780 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
7781 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
7782 (TRANSITION_IS_DISABLED, transitions_to): these.
7783
7784 2002-06-30 Akim Demaille <akim@epita.fr>
7785
7786 * src/print.c (print_shifts, print_gotos): Merge into...
7787 (print_transitions): this.
7788 (print_transitions, print_errs, print_reductions): Align the
7789 lookaheads columns.
7790 (print_core, print_transitions, print_errs, print_state,
7791 print_grammar): Output empty lines separator before, not after.
7792 (state_default_rule_compute): Rename as...
7793 (state_default_rule): this.
7794 * tests/conflicts.at (Defaulted Conflicted Reduction),
7795 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
7796 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
7797
7798 2002-06-30 Akim Demaille <akim@epita.fr>
7799
7800 Display items as we display rules.
7801
7802 * src/gram.h, src/gram.c (rule_lhs_print): New.
7803 * src/gram.c (grammar_rules_partial_print): Use it.
7804 * src/print.c (print_core): Likewise.
7805 * tests/conflicts.at (Defaulted Conflicted Reduction),
7806 (Unresolved SR Conflicts): Adjust.
7807 (Unresolved SR Conflicts): Adjust and rename as...
7808 (Resolved SR Conflicts): this, as was meant.
7809 * tests/regression.at (Web2c Report): Adjust.
7810
7811 2002-06-30 Akim Demaille <akim@epita.fr>
7812
7813 * src/print.c (state_default_rule_compute): New, extracted from...
7814 (print_reductions): here.
7815 Pessimize, but clarify the code.
7816 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
7817
7818 2002-06-30 Akim Demaille <akim@epita.fr>
7819
7820 * src/output.c (action_row): Let default_rule be always a rule
7821 number.
7822
7823 2002-06-30 Akim Demaille <akim@epita.fr>
7824
7825 * src/closure.c (print_firsts, print_fderives, closure):
7826 Use BITSET_EXECUTE.
7827 * src/lalr.c (lookaheads_print): Likewise.
7828 * src/state.c (state_rule_lookaheads_print): Likewise.
7829 * src/print_graph.c (print_core): Likewise.
7830 * src/print.c (print_reductions): Likewise.
7831 * src/output.c (action_row): Likewise.
7832 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
7833
7834 2002-06-30 Akim Demaille <akim@epita.fr>
7835
7836 * src/print_graph.c: Use report_flag.
7837
7838 2002-06-30 Akim Demaille <akim@epita.fr>
7839
7840 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
7841 to...
7842 * src/relation.h, src/relation.c (traverse, relation_digraph)
7843 (relation_print, relation_transpose): New.
7844
7845 2002-06-30 Akim Demaille <akim@epita.fr>
7846
7847 * src/state.h, src/state.c (shifts_to): New.
7848 * src/lalr.c (build_relations): Use it.
7849
7850 2002-06-30 Akim Demaille <akim@epita.fr>
7851
7852 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
7853 (item_number_of_rule_number, rule_number_of_item_number): New.
7854 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
7855 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7856 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
7857 Propagate their use.
7858 Much remains to be done, in particular wrt `shorts' from types.h.
7859
7860 2002-06-30 Akim Demaille <akim@epita.fr>
7861
7862 * src/symtab.c (symbol_new): Initialize the `printer' member.
7863
7864 2002-06-30 Akim Demaille <akim@epita.fr>
7865
7866 * src/LR0.c (save_reductions): Remove, replaced by...
7867 * src/state.h, src/state.c (state_reductions_set): New.
7868 (reductions, errs): Rename as...
7869 (reductions_t, errs_t): these.
7870 Adjust all dependencies.
7871
7872 2002-06-30 Akim Demaille <akim@epita.fr>
7873
7874 * src/LR0.c (state_list_t, state_list_append): New.
7875 (first_state, last_state): Now symbol_list_t.
7876 (this_state): Remove.
7877 (new_itemsets, append_states, save_reductions): Take a state_t as
7878 argument.
7879 (set_states, generate_states): Adjust.
7880 (save_shifts): Remove, replaced by...
7881 * src/state.h, src/state.c (state_shifts_set): New.
7882 (shifts): Rename as...
7883 (shifts_t): this.
7884 Adjust all dependencies.
7885 * src/state.h (state_t): Remove the `next' member.
7886
7887 2002-06-30 Akim Demaille <akim@epita.fr>
7888
7889 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
7890 escaped in slot 0.
7891
7892 2002-06-30 Akim Demaille <akim@epita.fr>
7893
7894 Use hash.h for the state hash table.
7895
7896 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
7897 (allocate_storage): Use state_hash_new.
7898 (free_storage): Use state_hash_free.
7899 (new_state, get_state): Adjust.
7900 * src/lalr.h, src/lalr.c (states): Move to...
7901 * src/states.h (state_t): Remove the `link' member, no longer
7902 used.
7903 * src/states.h, src/states.c: here.
7904 (state_hash_new, state_hash_free, state_hash_lookup)
7905 (state_hash_insert, states_free): New.
7906 * src/states.c (state_table, state_compare, state_hash): New.
7907 * src/output.c (output_actions): Do not free states now, since we
7908 still need to know the final_state number in `prepare', called
7909 afterwards. Do it...
7910 * src/main.c (main): here: call states_free after `output'.
7911
7912 2002-06-30 Akim Demaille <akim@epita.fr>
7913
7914 * src/state.h, src/state.c (state_new): New, extracted from...
7915 * src/LR0.c (new_state): here.
7916 * src/state.h (STATE_ALLOC): Move to...
7917 * src/state.c: here.
7918 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
7919 * src/state.h, src/state.c: here.
7920
7921 2002-06-30 Akim Demaille <akim@epita.fr>
7922
7923 * src/reader.c (gensym): Rename as...
7924 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
7925 (getsym): Rename as...
7926 (symbol_get): this.
7927
7928 2002-06-30 Akim Demaille <akim@epita.fr>
7929
7930 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
7931 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
7932 * src/output.c, src/print.c, src/print_graph.c: Propagate.
7933 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
7934
7935 2002-06-30 Akim Demaille <akim@epita.fr>
7936
7937 Make the test suite pass with warnings checked.
7938
7939 * tests/actions.at (Printers and Destructors): Improve.
7940 Avoid unsigned vs. signed issues.
7941 * tests/calc.at: Don't exercise the scanner here, do it...
7942 * tests/input.at (Torturing the Scanner): here.
7943
7944 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7945
7946 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
7947 reorganize first lines parallel to yacc.c.
7948
7949 2002-06-28 Akim Demaille <akim@epita.fr>
7950
7951 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
7952 (b4_token_enum, b4_token_defines): New, factored from...
7953 * data/lalr1.cc, data/yacc.c, glr.c: here.
7954
7955 2002-06-28 Akim Demaille <akim@epita.fr>
7956
7957 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
7958 unused variables.
7959 * src/output.c (merger_output): static.
7960
7961 2002-06-28 Akim Demaille <akim@epita.fr>
7962
7963 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
7964 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
7965 pacify GCC.
7966 * src/output.c (save_row): Initialize all the variables to pacify GCC.
7967
7968 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7969
7970 Accumulated changelog for new GLR parsing features.
7971
7972 * src/conflicts.c (count_total_conflicts): Change name to
7973 conflicts_total_count.
7974 * src/conflicts.h: Ditto.
7975 * src/output.c (token_actions): Use the new name.
7976 (output_conflicts): Change conflp => conflict_list_heads, and
7977 confl => conflict_list for better readability.
7978 * data/glr.c: Use the new names.
7979 * NEWS: Add self to GLR announcement.
7980
7981 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
7982
7983 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
7984 Akim Demaille.
7985
7986 * data/bison.glr: Change name to glr.c
7987 * data/glr.c: Renamed from bison.glr.
7988 * data/Makefile.am: Add glr.c
7989
7990 * src/getargs.c:
7991
7992 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
7993 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
7994
7995 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7996
7997 * data/bison.glr: Be sure to restore the
7998 current #line when returning to the skeleton contents after having
7999 exposed the input file's #line.
8000
8001 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8002
8003 * data/bison.glr: Bring up to date with changes to bison.simple.
8004
8005 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8006
8007 * data/bison.glr: Correct definitions that use b4_prefix.
8008 Various reformatting.
8009 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
8010 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
8011 yytokenp argument; now part of stack.
8012 (yychar): Define to behave as documented.
8013 (yyclearin): Ditto.
8014
8015 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8016
8017 * src/reader.h: Add declaration for free_merger_functions.
8018
8019 * src/reader.c (merge_functions): New variable.
8020 (get_merge_function): New function.
8021 (free_merger_functions): New function.
8022 (readgram): Check for %prec that is not followed by a symbol.
8023 Handle %dprec and %merge declarations.
8024 (packgram): Initialize dprec and merger fields in rules array.
8025
8026 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
8027 conflict_list_cnt, conflict_list_free): New variables.
8028 (table_grow): Also grow conflict_table.
8029 (prepare_rules): Output dprec and merger tables.
8030 (conflict_row): New function.
8031 (action_row): Output conflict lists for GLR parser. Don't use
8032 default reduction in conflicted states for GLR parser so that there
8033 are spaces for the conflict lists.
8034 (save_row): Also save conflict information.
8035 (token_actions): Allocate conflict list.
8036 (merger_output): New function.
8037 (pack_vector): Pack conflict table, too.
8038 (output_conflicts): New function to output yyconflp and yyconfl.
8039 (output_check): Allocate conflict_tos.
8040 (output_actions): Output conflict tables, also.
8041 (output_skeleton): Output b4_mergers definition.
8042 (prepare): Output b4_max_rhs_length definition.
8043 Use 'bison.glr' as default skeleton for GLR parsers.
8044
8045 * src/gram.c (glr_parser): New flag.
8046 (grammar_free): Call free_merger_functions.
8047
8048 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
8049 all pairs of conflicting reductions, rather than just all tokens
8050 causing conflicts. Needed to size conflict tables.
8051 (conflicts_output): Modify call to count_rr_conflicts for new
8052 interface.
8053 (conflicts_print): Ditto.
8054 (count_total_conflicts): New function.
8055
8056 * src/reader.h (merger_list): New type.
8057 (merge_functions): New variable.
8058
8059 * src/lex.h (tok_dprec, tok_merge): New token types.
8060
8061 * src/gram.h (rule_s): Add dprec and merger fields.
8062 (glr_parser): New flag.
8063
8064 * src/conflicts.h (count_total_conflicts): New function.
8065
8066 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
8067
8068 * doc/bison.texinfo (Generalized LR Parsing): New section.
8069 (GLR Parsers): New section.
8070 (Language and Grammar): Mention GLR parsing.
8071 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
8072 Correct typo ("tge" -> "the").
8073
8074 * data/bison.glr: New skeleton for GLR parsing.
8075
8076 * tests/cxx-gram.at: New tests for GLR parsing.
8077
8078 * tests/testsuite.at: Include cxx-gram.at.
8079
8080 * tests/Makefile.am: Add cxx-gram.at.
8081
8082 * src/parse-gram.y:
8083
8084 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
8085
8086 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
8087
8088 2002-06-27 Akim Demaille <akim@epita.fr>
8089
8090 * src/options.h, src/options.c: Remove.
8091 * src/getargs.c (short_options, long_options): New.
8092
8093 2002-06-27 Akim Demaille <akim@epita.fr>
8094
8095 * data/bison.simple, data/bison.c++: Rename as...
8096 * data/yacc.c, data/lalr1.cc: these.
8097 * doc/bison.texinfo (Environment Variables): Remove.
8098
8099 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
8100
8101 * src/getargs.c (report_argmatch): Initialize strtok().
8102
8103 2002-06-20 Akim Demaille <akim@epita.fr>
8104
8105 * data/bison.simple (b4_symbol_actions): New, replaces...
8106 (b4_symbol_destructor, b4_symbol_printer): these.
8107 (yysymprint): Be sure to call YYPRINT only for tokens, and using
8108 user token numbers.
8109
8110 2002-06-20 Akim Demaille <akim@epita.fr>
8111
8112 * data/bison.simple (yydestructor): Rename as...
8113 (yydestruct): this.
8114
8115 2002-06-20 Akim Demaille <akim@epita.fr>
8116
8117 * src/symtab.h, src/symtab.c (symbol_type_set)
8118 (symbol_destructor_set, symbol_precedence_set): The location is
8119 the last argument.
8120 Adjust all callers.
8121
8122 2002-06-20 Akim Demaille <akim@epita.fr>
8123
8124 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
8125 internals.
8126 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
8127 Takes a location.
8128 * src/symtab.h, src/symtab.c (symbol_class_set)
8129 (symbol_user_token_number_set): Likewise.
8130 Adjust all callers.
8131 Promote complain_at.
8132 * tests/input.at (Type Clashes): Adjust.
8133
8134 2002-06-20 Akim Demaille <akim@epita.fr>
8135
8136 * data/bison.simple (YYLEX): Fix the declaration when
8137 %pure-parser.
8138
8139 2002-06-20 Akim Demaille <akim@epita.fr>
8140
8141 * data/bison.simple (yysymprint): Don't print the token number,
8142 just its name.
8143 * tests/actions.at (Destructors): Rename as...
8144 (Printers and Destructors): this.
8145 Also exercise %printer.
8146
8147 2002-06-20 Akim Demaille <akim@epita.fr>
8148
8149 * data/bison.simple (YYDSYMPRINT): New.
8150 Use it to remove many of the #if YYDEBUG/if (yydebug).
8151
8152 2002-06-20 Akim Demaille <akim@epita.fr>
8153
8154 * src/symtab.h, src/symtab.c (symbol_t): printer and
8155 printer_location are new members.
8156 (symbol_printer_set): New.
8157 * src/parse-gram.y (PERCENT_PRINTER): New token.
8158 Handle its associated rule.
8159 * src/scan-gram.l: Adjust.
8160 (handle_destructor_at, handle_destructor_dollar): Rename as...
8161 (handle_symbol_code_at, handle_symbol_code_dollar): these.
8162 * src/output.c (symbol_printers_output): New.
8163 (output_skeleton): Call it.
8164 * data/bison.simple (yysymprint): New. Cannot be named yyprint
8165 since there are already many grammar files with a user `yyprint'.
8166 Replace the calls to YYPRINT to calls to yysymprint.
8167 * tests/calc.at: Adjust.
8168 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
8169 taking advantage of parser very internal details (stack size!).
8170
8171 2002-06-20 Akim Demaille <akim@epita.fr>
8172
8173 * src/scan-gram.l: Complete the scanner with the missing patterns
8174 to pacify Flex.
8175 Use `quote' and `symbol_tag_get' where appropriate.
8176
8177 2002-06-19 Akim Demaille <akim@epita.fr>
8178
8179 * tests/actions.at (Destructors): Augment to test locations.
8180 * data/bison.simple (yydestructor): Pass it the current location
8181 if locations are enabled.
8182 Prototype only when __STDC__ or C++.
8183 Change the argument names to move into the yy name space: there is
8184 user code here.
8185
8186 2002-06-19 Akim Demaille <akim@epita.fr>
8187
8188 * data/bison.simple (b4_pure_if): New.
8189 Use it instead of #ifdef YYPURE.
8190
8191 2002-06-19 Akim Demaille <akim@epita.fr>
8192
8193 * data/bison.simple (b4_location_if): New.
8194 Use it instead of #ifdef YYLSP_NEEDED.
8195
8196 2002-06-19 Akim Demaille <akim@epita.fr>
8197
8198 Prepare @$ in %destructor, but currently don't bind it in the
8199 skeleton, as %location use is not cleaned up yet.
8200
8201 * src/scan-gram.l (handle_dollar, handle_destructor_at)
8202 (handle_action_at): New.
8203 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
8204 a braced_code_t and a location as additional arguments.
8205 (handle_destructor_dollar): Instead of requiring `b4_eval', just
8206 unquote one when outputting `b4_dollar_dollar'.
8207 Adjust callers.
8208 * data/bison.simple (b4_eval): Remove.
8209 (b4_symbol_destructor): Adjust.
8210 * tests/input.at (Invalid @n): Adjust.
8211
8212 2002-06-19 Zack Weinberg <zack@codesourcery.com>
8213
8214 * doc/bison.texinfo: Document ability to have multiple
8215 prologue sections.
8216
8217 2002-06-18 Akim Demaille <akim@epita.fr>
8218
8219 * src/files.c (compute_base_names): When computing the output file
8220 names from the input file name, strip the directory part.
8221
8222 2002-06-18 Akim Demaille <akim@epita.fr>
8223
8224 * data/bison.simple.new: Comment changes.
8225 Reported by Andreas Schwab.
8226
8227 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
8228
8229 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
8230 there are no `label `yyoverflowlab' defined but not used' warnings
8231 when yyoverflow is defined.
8232
8233 2002-06-18 Akim Demaille <akim@epita.fr>
8234
8235 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
8236 new member.
8237 (symbol_destructor_set): Adjust.
8238 * src/output.c (symbol_destructors_output): Output the destructor
8239 locations.
8240 Output the symbol name.
8241 * data/bison.simple (b4_symbol_destructor): Adjust.
8242
8243 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
8244 and Akim Demaille <akim@epita.fr>
8245
8246 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
8247 what's left on the stack when the error recovery hits EOF.
8248 * tests/actions.at (Destructors): Complete to exercise this case.
8249
8250 2002-06-17 Akim Demaille <akim@epita.fr>
8251
8252 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
8253 arguments is really empty, not only equal to `[]'.
8254 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
8255 member.
8256 (symbol_destructor_set): New.
8257 * src/output.c (symbol_destructors_output): New.
8258 * src/reader.h (brace_code_t, current_braced_code): New.
8259 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
8260 (handle_dollar): Rename as...
8261 (handle_action_dollar): this.
8262 (handle_destructor_dollar): New.
8263 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
8264 (grammar_declaration): Use it.
8265 * data/bison.simple (yystos): Is always defined.
8266 (yydestructor): New.
8267 * tests/actions.at (Destructors): New.
8268 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
8269
8270 2002-06-17 Akim Demaille <akim@epita.fr>
8271
8272 * src/symlist.h, src/symlist.c (symbol_list_length): New.
8273 * src/scan-gram.l (handle_dollar, handle_at): Compute the
8274 rule_length only when needed.
8275 * src/output.c (actions_output, token_definitions_output): Output
8276 the full M4 block.
8277 * src/symtab.c: Don't access directly to the symbol tag, use
8278 symbol_tag_get.
8279 * src/parse-gram.y: Use symbol_list_free.
8280
8281 2002-06-17 Akim Demaille <akim@epita.fr>
8282
8283 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
8284 (symbol_list_prepend, get_type_name): Move to...
8285 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
8286 (symbol_list_prepend, symbol_list_n_type_name_get): here.
8287 Adjust all callers.
8288 (symbol_list_free): New.
8289 * src/scan-gram.l (handle_dollar): Takes a location.
8290 * tests/input.at (Invalid $n): Adjust.
8291
8292 2002-06-17 Akim Demaille <akim@epita.fr>
8293
8294 * src/reader.h, src/reader.c (symbol_list_new): Export it.
8295 (symbol_list_prepend): New.
8296 * src/parse-gram.y (%union): `list' is a new member.
8297 (symbols.1): New, replaces...
8298 (terms_to_prec.1, nterms_to_type.1): these.
8299 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
8300 Take a location as additional argument.
8301 Adjust all callers.
8302
8303 2002-06-15 Akim Demaille <akim@epita.fr>
8304
8305 * src/parse-gram.y: Move %token in the declaration section so that
8306 we don't depend upon CVS Bison.
8307
8308 2002-06-15 Akim Demaille <akim@epita.fr>
8309
8310 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
8311 * src/print.c (print_core): Use it.
8312
8313 2002-06-15 Akim Demaille <akim@epita.fr>
8314
8315 * src/conflicts.c (log_resolution): Accept the rule involved in
8316 the sr conflicts instead of the lookahead number that points to
8317 that rule.
8318 (flush_reduce): Accept the current lookahead vector as argument,
8319 instead of the index in LA.
8320 (resolve_sr_conflict): Accept the current number of lookahead
8321 bitset to consider for the STATE, instead of the index in LA.
8322 (set_conflicts): Adjust.
8323 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
8324
8325 2002-06-15 Akim Demaille <akim@epita.fr>
8326
8327 * src/state.h (state_t): Replace the `lookaheadsp' member, a
8328 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
8329 Adjust all dependencies.
8330 * src/lalr.c (initialize_lookaheads): Split into...
8331 (states_lookaheads_count, states_lookaheads_initialize): these.
8332 (lalr): Adjust.
8333
8334 2002-06-15 Akim Demaille <akim@epita.fr>
8335
8336 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
8337 out of...
8338 (grammar_rules_print): here.
8339 * src/reduce.c (reduce_output): Use it.
8340 * tests/reduce.at (Useless Rules, Reduced Automaton)
8341 (Underivable Rules): Adjust.
8342
8343 2002-06-15 Akim Demaille <akim@epita.fr>
8344
8345 Copy BYacc's nice way to report the grammar.
8346
8347 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
8348 New.
8349 Don't print the rules' location, it is confusing and useless.
8350 (rule_print): Use grammar_rhs_print.
8351 * src/print.c (print_grammar): Use grammar_rules_print.
8352
8353 2002-06-15 Akim Demaille <akim@epita.fr>
8354
8355 Complete and rationalize `useless thing' warnings.
8356
8357 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
8358 (symbol_tag_print): New.
8359 Use them everywhere in place of accessing directly the tag member.
8360 * src/gram.h, src/gram.c (rule_print): New.
8361 Use it where a rule used to be printed `by hand'.
8362 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
8363 (reduce_grammar_tables): Report the useless rules.
8364 (reduce_print): Useless things are a warning, not an error.
8365 Report it as such.
8366 * tests/reduce.at (Useless Nonterminals, Useless Rules):
8367 (Reduced Automaton, Underivable Rules): Adjust.
8368 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
8369 * tests/conflicts.at (Unresolved SR Conflicts)
8370 (Solved SR Conflicts): Adjust.
8371
8372 2002-06-15 Akim Demaille <akim@epita.fr>
8373
8374 Let symbols have a location.
8375
8376 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
8377 (getsym): Adjust.
8378 Adjust all callers.
8379 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
8380 Use location_t, not int.
8381 * src/symtab.c (symbol_check_defined): Take advantage of the
8382 location.
8383 * tests/regression.at (Invalid inputs): Adjust.
8384
8385 2002-06-15 Akim Demaille <akim@epita.fr>
8386
8387 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
8388 (input): Don't try to initialize yylloc here, do it in the
8389 scanner.
8390 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
8391 * src/gram.h (rule_t): Change line and action_line into location
8392 and action_location, of location_t type.
8393 Adjust all dependencies.
8394 * src/location.h, src/location.c (empty_location): New.
8395 * src/reader.h, src/reader.c (grammar_start_symbol_set)
8396 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
8397 (grammar_current_rule_symbol_append)
8398 (grammar_current_rule_action_append): Expect a location as argument.
8399 * src/reader.c (grammar_midrule_action): Adjust to attach an
8400 action's location as dummy symbol location.
8401 * src/symtab.h, src/symtab.c (startsymbol_location): New.
8402 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
8403 the line numbers.
8404
8405 2002-06-14 Akim Demaille <akim@epita.fr>
8406
8407 Grammar declarations may be found in the grammar section.
8408
8409 * src/parse-gram.y (rules_or_grammar_declaration): New.
8410 (declarations): Each declaration may end with a semicolon, not
8411 just...
8412 (grammar_declaration): `"%union"'.
8413 (grammar): Branch to rules_or_grammar_declaration.
8414
8415 2002-06-14 Akim Demaille <akim@epita.fr>
8416
8417 * src/main.c (main): Invoke scanner_free.
8418
8419 2002-06-14 Akim Demaille <akim@epita.fr>
8420
8421 * src/output.c (m4_invoke): Extracted from...
8422 (output_skeleton): here.
8423 Free tempfile.
8424
8425 2002-06-14 Akim Demaille <akim@epita.fr>
8426
8427 * src/parse-gram.y (directives, directive, gram)
8428 (grammar_directives, precedence_directives, precedence_directive):
8429 Rename as...
8430 (declarations, declaration, grammar, grammar_declaration)
8431 (precedence_declaration, precedence_declarator): these.
8432 (symbol_declaration): New.
8433
8434 2002-06-14 Akim Demaille <akim@epita.fr>
8435
8436 * src/files.c (action_obstack): Remove, unused.
8437 (output_obstack): Remove it, and all its dependencies, as it is no
8438 longer needed.
8439 * src/reader.c (epilogue_set): Build the epilogue in the
8440 muscle_obstack.
8441 * src/output.h, src/output.c (muscle_obstack): Move to...
8442 * src/muscle_tab.h, src/muscle_tab.h: here.
8443 (muscle_init): Initialize muscle_obstack.
8444 (muscle_free): New.
8445 * src/main.c (main): Call it.
8446
8447 2002-06-14 Akim Demaille <akim@epita.fr>
8448
8449 * src/location.h: New, extracted from...
8450 * src/reader.h: here.
8451 * src/Makefile.am (noinst_HEADERS): Merge into
8452 (bison_SOURCES): this.
8453 Add location.h.
8454 * src/parse-gram.y: Use location_t instead of Bison's.
8455 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
8456 Use location_t instead of ints.
8457
8458 2002-06-14 Akim Demaille <akim@epita.fr>
8459
8460 * data/bison.simple, data/bison.c++: Be sure to restore the
8461 current #line when returning to the skeleton contents after having
8462 exposed the input file's #line.
8463
8464 2002-06-12 Akim Demaille <akim@epita.fr>
8465
8466 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
8467 eager.
8468 * tests/actions.at (Exotic Dollars): New.
8469
8470 2002-06-12 Akim Demaille <akim@epita.fr>
8471
8472 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
8473 ['"/] too eagerly.
8474 * tests/input.at (Torturing the Scanner): New.
8475
8476 2002-06-11 Akim Demaille <akim@epita.fr>
8477
8478 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
8479 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
8480 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
8481 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
8482 * src/reader.c (reader): Use it.
8483
8484 2002-06-11 Akim Demaille <akim@epita.fr>
8485
8486 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
8487 Adjust all callers.
8488 (scanner_last_string_free): New.
8489
8490 2002-06-11 Akim Demaille <akim@epita.fr>
8491
8492 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
8493 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
8494 (last_string, YY_OBS_FREE): New.
8495 Use them when returning an ID.
8496
8497 2002-06-11 Akim Demaille <akim@epita.fr>
8498
8499 Have Bison grammars parsed by a Bison grammar.
8500
8501 * src/reader.c, src/reader.h (prologue_augment): New.
8502 * src/reader.c (copy_definition): Remove.
8503
8504 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
8505 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
8506 (grammar_current_rule_prec_set, grammar_current_rule_check)
8507 (grammar_current_rule_symbol_append)
8508 (grammar_current_rule_action_append): Export.
8509 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
8510 (symbol_list_action_append): Remove.
8511 Hook the routines from reader.
8512 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
8513 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
8514
8515 * src/reader.c (read_declarations): Remove, unused.
8516
8517 * src/parse-gram.y: Handle the epilogue.
8518 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
8519 (grammar_start_symbol_set): this.
8520 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
8521 * src/reader.c (readgram): Remove, unused.
8522 (reader): Adjust to insert eoftoken and axiom where appropriate.
8523
8524 * src/reader.c (copy_dollar): Replace with...
8525 * src/scan-gram.h (handle_dollar): this.
8526 * src/parse-gram.y: Remove `%thong'.
8527
8528 * src/reader.c (copy_at): Replace with...
8529 * src/scan-gram.h (handle_at): this.
8530
8531 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
8532 New.
8533
8534 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
8535 time being.
8536
8537 * src/reader.h, src/reader.c (grammar_rule_end): New.
8538
8539 * src/parse.y (current_type, current_class): New.
8540 Implement `%nterm', `%token' support.
8541 Merge `%term' into `%token'.
8542 (string_as_id): New.
8543 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
8544 type name.
8545
8546 * src/parse-gram.y: Be sure to handle properly the beginning of
8547 rules.
8548
8549 * src/parse-gram.y: Handle %type.
8550 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
8551
8552 * src/parse-gram.y: More directives support.
8553 * src/options.c: No longer handle source directives.
8554
8555 * src/parse-gram.y: Fix %output.
8556
8557 * src/parse-gram.y: Handle %union.
8558 Use the prologue locations.
8559 * src/reader.c (parse_union_decl): Remove.
8560
8561 * src/reader.h, src/reader.c (epilogue_set): New.
8562 * src/parse-gram.y: Use it.
8563
8564 * data/bison.simple, data/bison.c++: b4_stype is now either not
8565 defined, then default to int, or to the contents of %union,
8566 without `union' itself.
8567 Adjust.
8568 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
8569
8570 * src/output.c (actions_output): Don't output braces, as they are
8571 already handled by the scanner.
8572
8573 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
8574 characters to themselves.
8575
8576 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
8577 that the epilogue has a proper #line.
8578
8579 * src/parse-gram.y: Handle precedence/associativity.
8580
8581 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
8582 a terminal.
8583 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
8584 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
8585 at all to define terminals that cannot be emitted.
8586
8587 * src/scan-gram.l: Escape M4 characters.
8588
8589 * src/scan-gram.l: Working properly with escapes in user
8590 strings/characters.
8591
8592 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
8593 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
8594 grammar.
8595 Use more modest sizes, as for the time being the parser does not
8596 release memory, and therefore the process swallows a huge amount
8597 of memory.
8598
8599 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
8600 stricter %token grammar.
8601
8602 * src/symtab.h (associativity): Add `undef_assoc'.
8603 (symbol_precedence_set): Do nothing when passed an undef_assoc.
8604 * src/symtab.c (symbol_check_alias_consistence): Adjust.
8605
8606 * tests/regression.at (Invalid %directive): Remove, as it is now
8607 meaningless.
8608 (Invalid inputs): Adjust to the new error messages.
8609 (Token definitions): The new grammar doesn't allow too many
8610 eccentricities.
8611
8612 * src/lex.h, src/lex.c: Remove.
8613 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
8614 (copy_character, copy_string2, copy_string, copy_identifier)
8615 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
8616 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
8617 (parse_action): Remove.
8618 * po/POTFILES.in: Adjust.
8619
8620 2002-06-11 Akim Demaille <akim@epita.fr>
8621
8622 * src/reader.c (parse_action): Don't store directly into the
8623 rule's action member: return the action as a string.
8624 Don't require `rule_length' as an argument: compute it.
8625 (grammar_current_rule_symbol_append)
8626 (grammar_current_rule_action_append): New, eved out from
8627 (readgram): here.
8628 Remove `action_flag', `rulelength', unused now.
8629
8630 2002-06-11 Akim Demaille <akim@epita.fr>
8631
8632 * src/reader.c (grammar_current_rule_prec_set).
8633 (grammar_current_rule_check): New, eved out from...
8634 (readgram): here.
8635 Remove `xaction', `first_rhs': useless.
8636 * tests/input.at (Type clashes): New.
8637 * tests/existing.at (GNU Cim Grammar): Adjust.
8638
8639 2002-06-11 Akim Demaille <akim@epita.fr>
8640
8641 * src/reader.c (grammar_midrule_action): New, Eved out from
8642 (readgram): here.
8643
8644 2002-06-11 Akim Demaille <akim@epita.fr>
8645
8646 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
8647 New.
8648 (readgram): Use them as replacement of inlined code, crule and
8649 crule1.
8650
8651 2002-06-11 Akim Demaille <akim@epita.fr>
8652
8653 * src/reader.c (grammar_end, grammar_symbol_append): New.
8654 (readgram): Use them.
8655 Make the use of `p' as local as possible.
8656
8657 2002-06-10 Akim Demaille <akim@epita.fr>
8658
8659 GCJ's parser requires the tokens to be defined before the prologue.
8660
8661 * data/bison.simple: Output the token definition before the user's
8662 prologue.
8663 * tests/regression.at (Braces parsing, Duplicate string)
8664 (Mixing %token styles): Check the output from bison.
8665 (Early token definitions): New.
8666
8667 2002-06-10 Akim Demaille <akim@epita.fr>
8668
8669 * src/symtab.c (symbol_user_token_number_set): Don't complain when
8670 assigning twice the same user number to a token, so that we can
8671 use it in...
8672 * src/lex.c (lex): here.
8673 Also use `symbol_class_set' instead of hand written code.
8674 * src/reader.c (parse_assoc_decl): Likewise.
8675
8676 2002-06-10 Akim Demaille <akim@epita.fr>
8677
8678 * src/symtab.c, src/symtab.c (symbol_class_set)
8679 (symbol_user_token_number_set): New.
8680 * src/reader.c (parse_token_decl): Use them.
8681 Use a switch instead of ifs.
8682 Use a single argument.
8683
8684 2002-06-10 Akim Demaille <akim@epita.fr>
8685
8686 Remove `%thong' support as it is undocumented, unused, duplicates
8687 `%token's job, and creates useless e-mail traffic with people who
8688 want to know what it is, why it is undocumented, unused, and
8689 duplicates `%token's job.
8690
8691 * src/reader.c (parse_thong_decl): Remove.
8692 * src/options.c (option_table): Remove "thong".
8693 * src/lex.h (tok_thong): Remove.
8694
8695 2002-06-10 Akim Demaille <akim@epita.fr>
8696
8697 * src/symtab.c, src/symtab.c (symbol_type_set)
8698 (symbol_precedence_set): New.
8699 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
8700 (value_components_used): Remove, unused.
8701
8702 2002-06-09 Akim Demaille <akim@epita.fr>
8703
8704 Move symbols handling code out of the reader.
8705
8706 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
8707 (axiom): Move to...
8708 * src/symtab.h, src/symtab.c: here.
8709
8710 * src/gram.c (start_symbol): Remove: use startsymbol->number.
8711 * src/reader.c (startval): Rename as...
8712 * src/symtab.h, src/symtab.c (startsymbol): this.
8713 * src/reader.c: Adjust.
8714
8715 * src/reader.c (symbol_check_defined, symbol_make_alias)
8716 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8717 (token_translations_init)
8718 Move to...
8719 * src/symtab.c: here.
8720 * src/reader.c (packsymbols): Move to...
8721 * src/symtab.h, src/symtab.c (symbols_pack): here.
8722 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
8723 argument.
8724
8725 2002-06-03 Akim Demaille <akim@epita.fr>
8726
8727 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
8728 then statements.
8729
8730 2002-06-03 Akim Demaille <akim@epita.fr>
8731
8732 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
8733 structs with non literals.
8734 * src/scan-skel.l: never-interactive.
8735 * src/conflicts.c (enum conflict_resolution_e): No trailing
8736 comma.
8737 * src/getargs.c (usage): Split long literal strings.
8738 Reported by Hans Aberg.
8739
8740 2002-05-28 Akim Demaille <akim@epita.fr>
8741
8742 * data/bison.c++: Use C++ ostreams.
8743 (cdebug_): New member.
8744
8745 2002-05-28 Akim Demaille <akim@epita.fr>
8746
8747 * src/output.c (output_skeleton): Be sure to allocate enough room
8748 for `/' _and_ for `\0' in full_skeleton.
8749
8750 2002-05-28 Akim Demaille <akim@epita.fr>
8751
8752 * data/bison.c++: Catch up with bison.simple:
8753 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8754 and Paul Eggert <eggert@twinsun.com>: `error' handing.
8755 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
8756 and popping traces.
8757
8758 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8759
8760 * src/output.c (output_skeleton): Put an explicit path in front of
8761 the skeleton file name, rather than relying on the -I directory,
8762 to partially alleviate effects of having a skeleton file lying around
8763 in the current directory.
8764
8765 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8766
8767 * src/conflicts.c (log_resolution): Correct typo:
8768 obstack_printf should be obstack_fgrow1.
8769
8770 2002-05-26 Akim Demaille <akim@epita.fr>
8771
8772 * src/state.h (state_t): `solved_conflicts' is a new member.
8773 * src/LR0.c (new_state): Set it to 0.
8774 * src/conflicts.h, src/conflicts.c (print_conflicts)
8775 (free_conflicts, solve_conflicts): Rename as...
8776 (conflicts_print, conflicts_free, conflicts_solve): these.
8777 Adjust callers.
8778 * src/conflicts.c (enum conflict_resolution_e)
8779 (solved_conflicts_obstack): New, used by...
8780 (log_resolution): this.
8781 Adjust to attach the conflict resolution to each state.
8782 Complete the description with the precedence/associativity
8783 information.
8784 (resolve_sr_conflict): Adjust.
8785 * src/print.c (print_state): Output its solved_conflicts.
8786 * tests/conflicts.at (Unresolved SR Conflicts)
8787 (Solved SR Conflicts): Exercise --report=all.
8788
8789 2002-05-26 Akim Demaille <akim@epita.fr>
8790
8791 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8792 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8793 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
8794 (token_number_t, item_number_as_token_number)
8795 (token_number_as_item_number, muscle_insert_token_number_table):
8796 Rename as...
8797 (symbol_number_t, item_number_as_symbol_number)
8798 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
8799 these, since it is more appropriate.
8800
8801 2002-05-26 Akim Demaille <akim@epita.fr>
8802
8803 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
8804 `Error:' lines.
8805 * data/bison.simple (yystos) [YYDEBUG]: New.
8806 (yyparse) [YYDEBUG]: Display the symbols which are popped during
8807 error recovery.
8808 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
8809
8810 2002-05-25 Akim Demaille <akim@epita.fr>
8811
8812 * doc/bison.texinfo (Debugging): Split into...
8813 (Tracing): this new section, its former contents, and...
8814 (Understanding): this new section.
8815 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
8816 by...
8817 (report_flag): this.
8818 Adjust all dependencies.
8819 (report_args, report_types, report_argmatch): New.
8820 (usage, getargs): Report/support -r, --report.
8821 * src/options.h
8822 (struct option_table_struct): Rename as..,
8823 (struct option_table_s): this.
8824 Rename the `set_flag' member to `flag' to match with getopt_long's
8825 struct.
8826 * src/options.c (option_table): Split verbose into an entry for
8827 %verbose, and another for --verbose.
8828 Support --report/-r, so remove -r from the obsolete --raw.
8829 * src/print.c: Attach full item sets and lookaheads reports to
8830 report_flag instead of trace_flag.
8831 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
8832
8833 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8834 and Paul Eggert <eggert@twinsun.com>
8835
8836 * data/bison.simple (yyparse): Correct error handling to conform to
8837 POSIX and yacc. Specifically, after syntax error is discovered,
8838 do not reduce further before shifting the error token.
8839 Clean up the code a bit by removing the labels yyerrdefault,
8840 yyerrhandle, yyerrpop.
8841 * NEWS: Document the above.
8842
8843 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8844
8845 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
8846 type; it isn't always big enough, since it doesn't necessarily
8847 include non-terminals.
8848 (yytranslate): Expand definition of yy_token_number_type, so that
8849 the latter can be removed.
8850 (yy_token_number_type): Remove, only one use.
8851 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
8852 don't use TokenNumberType as element type.
8853
8854 * tests/regression.at: Modify expected output to agree with change
8855 to yyr1 and yytranslate.
8856
8857 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
8858
8859 * src/reader.c (parse_action): Use copy_character instead of
8860 obstack_1grow.
8861
8862 2002-05-13 Akim Demaille <akim@epita.fr>
8863
8864 * tests/regression.at (Token definitions): Prototype yylex and
8865 yyerror.
8866
8867 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8868
8869 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
8870 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
8871 32-bit arithmetic.
8872 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
8873
8874 2002-05-07 Akim Demaille <akim@epita.fr>
8875
8876 * tests/synclines.at: Be sure to prototype yylex and yyerror to
8877 avoid GCC warnings.
8878
8879 2002-05-07 Akim Demaille <akim@epita.fr>
8880
8881 Kill GCC warnings.
8882
8883 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
8884 over the RHS of each rule.
8885 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
8886 * src/state.h (state_t): Member `nitems' is unsigned short.
8887 * src/LR0.c (get_state): Adjust.
8888 * src/reader.c (packgram): Likewise.
8889 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
8890 `Type'.
8891 (muscle_insert_int_table): Remove, unused.
8892 (prepare_rules): Remove `max'.
8893
8894 2002-05-06 Akim Demaille <akim@epita.fr>
8895
8896 * src/closure.c (print_firsts): Display of the symbol tags.
8897 (bitmatrix_print): Move to...
8898 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
8899 here.
8900 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
8901
8902 2002-05-06 Akim Demaille <akim@epita.fr>
8903
8904 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
8905 hash_do_for_each.
8906
8907 2002-05-06 Akim Demaille <akim@epita.fr>
8908
8909 * src/LR0.c (new_state, get_state): Instead of using the global
8910 `kernel_size' and `kernel_base', have two new arguments:
8911 `core_size' and `core'.
8912 Adjust callers.
8913
8914 2002-05-06 Akim Demaille <akim@epita.fr>
8915
8916 * src/reader.c (packgram): No longer end `ritem' with a 0
8917 sentinel: it is not used.
8918
8919 2002-05-05 Akim Demaille <akim@epita.fr>
8920
8921 New experimental feature: display the lookaheads in the report and
8922 graph.
8923
8924 * src/print (print_core): When --trace-flag, display the rules
8925 lookaheads.
8926 * src/print_graph.c (print_core): Likewise.
8927 Swap the arguments.
8928 Adjust caller.
8929
8930 2002-05-05 Akim Demaille <akim@epita.fr>
8931
8932 * tests/torture.at (Many lookaheads): New test.
8933
8934 2002-05-05 Akim Demaille <akim@epita.fr>
8935
8936 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
8937 (GENERATE_MUSCLE_INSERT_TABLE): this.
8938 (output_int_table, output_unsigned_int_table, output_short_table)
8939 (output_token_number_table, output_item_number_table): Replace with...
8940 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8941 (muscle_insert_short_table, muscle_insert_token_number_table)
8942 (muscle_insert_item_number_table): these.
8943 Adjust all callers.
8944 (prepare_tokens): Don't free `translations', since...
8945 * src/reader.h, src/reader.c (grammar_free): do it.
8946 Move to...
8947 * src/gram.h, src/gram.c (grammar_free): here.
8948 * data/bison.simple, data/bison.c++: b4_token_number_max is now
8949 b4_translate_max.
8950
8951 2002-05-05 Akim Demaille <akim@epita.fr>
8952
8953 * src/output.c (output_unsigned_int_table): New.
8954 (prepare_rules): `i' is unsigned.
8955 `prhs', `rline', `r2' are unsigned int.
8956 Rename muscle `rhs_number_max' as `rhs_max'.
8957 Output muscles `prhs_max', `rline_max', and `r2_max'.
8958 Free rline and r1.
8959 * data/bison.simple, data/bison.c++: Adjust to use these muscles
8960 to compute types instead of constant types.
8961 * tests/regression.at (Web2c Actions): Adjust.
8962
8963 2002-05-04 Akim Demaille <akim@epita.fr>
8964
8965 * src/symtab.h (SALIAS, SUNDEF): Rename as...
8966 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
8967 Adjust dependencies.
8968 * src/output.c (token_definitions_output): Be sure not to output a
8969 `#define 'a'' when fed with `%token 'a' "a"'.
8970 * tests/regression.at (Token definitions): New.
8971
8972 2002-05-03 Paul Eggert <eggert@twinsun.com>
8973
8974 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
8975 for K&R C.
8976
8977 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
8978
8979 * Makefile.am (SUBDIRS): Remove intl.
8980 (EXTRA_DIST): Add config/config.rpath.
8981
8982 2002-05-03 Akim Demaille <akim@epita.fr>
8983
8984 * data/bison.simple (m4_if): Don't output empty enums.
8985 And actually, output valid enum definitions :(.
8986
8987 2002-05-03 Akim Demaille <akim@epita.fr>
8988
8989 * configure.bat: Remove, completely obsolete.
8990 * Makefile.am (EXTRA_DIST): Adjust.
8991 Don't distribute config.rpath...
8992 * config/Makefile.am (EXTRA_DIST): Do it.
8993
8994 2002-05-03 Akim Demaille <akim@epita.fr>
8995
8996 * configure.in (GETTEXT_VERSION): New.
8997 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
8998
8999 2002-05-03 Akim Demaille <akim@epita.fr>
9000
9001 * data/bison.simple (b4_token_enum): New.
9002 (b4_token_defines): Use it to output tokens both as #define and
9003 enums.
9004 Suggested by Paul Eggert.
9005 * src/output.c (token_definitions_output): Don't output spurious
9006 white spaces.
9007
9008 2002-05-03 Akim Demaille <akim@epita.fr>
9009
9010 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
9011
9012 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
9013
9014 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
9015 Update the stack class, give a try to deque as the default container.
9016
9017 2002-05-02 Akim Demaille <akim@epita.fr>
9018
9019 * data/bison.simple (yyparse): Do not implement @$ = @1.
9020 (YYLLOC_DEFAULT): Adjust to do it.
9021 * doc/bison.texinfo (Location Default Action): Fix.
9022
9023 2002-05-02 Akim Demaille <akim@epita.fr>
9024
9025 * src/reader.c (parse_braces): Merge into...
9026 (parse_action): this.
9027
9028 2002-05-02 Akim Demaille <akim@epita.fr>
9029
9030 * configure.in (ALL_LINGUAS): Remove.
9031 * po/LINGUAS, hr.po: New.
9032
9033 2002-05-02 Akim Demaille <akim@epita.fr>
9034
9035 Remove the so called hairy (semantic) parsers.
9036
9037 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
9038 * src/gram.h, src/gram.c (semantic_parser): Remove.
9039 (rule_t): Remove the guard and guard_line members.
9040 * src/lex.h (token_t): remove tok_guard.
9041 * src/options.c (option_table): Remove %guard and %semantic_parser
9042 support.
9043 * src/output.c, src/output.h (guards_output): Remove.
9044 (prepare): Adjust.
9045 (token_definitions_output): Don't output the `T'
9046 tokens (???).
9047 (output_skeleton): Don't output the guards.
9048 * src/files.c, src/files.c (attrsfile): Remove.
9049 * src/reader.c (symbol_list): Remove the guard and guard_line
9050 members.
9051 Adjust dependencies.
9052 (parse_guard): Remove.
9053 * data/bison.hairy: Remove.
9054 * doc/bison.texinfo (Environment Variables): Remove occurrences of
9055 BISON_HAIRY.
9056
9057 2002-05-02 Akim Demaille <akim@epita.fr>
9058
9059 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
9060 (parse_guard): Rename the formal argument `stack_offset' as
9061 `rule_length', which is more readable.
9062 Adjust callers.
9063 (copy_at, copy_dollar): Instead of outputting the hard coded
9064 values of $$, $n and so forth, output invocation to b4_lhs_value,
9065 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
9066 Note: this patch partially drops `semantic-parser' support: it
9067 always does `rule_length - n', where semantic parsers ought to
9068 always use `-n'.
9069 * data/bison.simple, data/bison.c++ (b4_lhs_value)
9070 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
9071
9072 2002-05-02 Akim Demaille <akim@epita.fr>
9073
9074 * configure.in (AC_INIT): Bump to 1.49b.
9075 (AM_INIT_AUTOMAKE): Short invocation.
9076
9077 2002-05-02 Akim Demaille <akim@epita.fr>
9078
9079 Version 1.49a.
9080
9081 2002-05-01 Akim Demaille <akim@epita.fr>
9082
9083 * src/skeleton.h: Remove.
9084
9085 2002-05-01 Akim Demaille <akim@epita.fr>
9086
9087 * src/skeleton.h: Fix the #endif.
9088 Reported by Magnus Fromreide.
9089
9090 2002-04-26 Paul Eggert <eggert@twinsun.com>
9091
9092 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
9093 Define if we define YYSTYPE and YYLTYPE, respectively.
9094 (YYCOPY): Fix [] quoting problem in the non-GCC case.
9095
9096 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
9097
9098 * src/scan-skel.l: Postprocess quadrigraphs.
9099
9100 * src/reader.c (copy_character): New function, used to output
9101 single characters while replacing `[' and `]' with quadrigraphs, to
9102 avoid troubles with M4 quotes.
9103 (copy_comment): Output characters with copy_character.
9104 (read_additionnal_code): Likewise.
9105 (copy_string2): Likewise.
9106 (copy_definition): Likewise.
9107
9108 * tests/calc.at: Exercise M4 quoting.
9109
9110 2002-04-25 Akim Demaille <akim@epita.fr>
9111
9112 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
9113 between `!' and the command.
9114 Reported by Paul Eggert.
9115
9116 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
9117
9118 * tests/calc.at: Exercise prologue splitting.
9119
9120 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
9121 `b4_post_prologue' instead of `b4_prologue'.
9122
9123 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
9124 muscles.
9125 (output): Free pre_prologue_obstack and post_prologue_obstack.
9126 * src/files.h, src/files.c (attrs_obstack): Remove.
9127 (pre_prologue_obstack, post_prologue_obstack): New.
9128 * src/reader.c (copy_definition): Add a parameter to specify the
9129 obstack to fill, instead of using attrs_obstack unconditionally.
9130 (read_declarations): Pass pre_prologue_obstack to copy_definition if
9131 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
9132
9133 2002-04-23 Paul Eggert <eggert@twinsun.com>
9134
9135 * data/bison.simple: Remove unnecessary commentary and white
9136 space differences from 1_29-branch.
9137 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
9138
9139 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
9140 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
9141 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
9142 constructors or destructors.
9143
9144 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
9145
9146 2002-04-23 Akim Demaille <akim@epita.fr>
9147
9148 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
9149 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
9150 location with columns.
9151 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
9152 All reported by Paul Eggert.
9153
9154 2002-04-22 Akim Demaille <akim@epita.fr>
9155
9156 * src/reduce.c (dump_grammar): Move to...
9157 * src/gram.h, src/gram.c (grammar_dump): here.
9158 Be sure to separate long item numbers.
9159 Don't read the members of a rule's prec if its nil.
9160
9161 2002-04-22 Akim Demaille <akim@epita.fr>
9162
9163 * src/output.c (table_size, table_grow): New.
9164 (MAXTABLE): Remove, replace uses with table_size.
9165 (pack_vector): Instead of dying when the table is too big, grow it.
9166
9167 2002-04-22 Akim Demaille <akim@epita.fr>
9168
9169 * data/bison.simple (yyr1): Its type is that of a token number.
9170 * data/bison.c++ (r1_): Likewise.
9171 * tests/regression.at (Web2c Actions): Adjust.
9172
9173 2002-04-22 Akim Demaille <akim@epita.fr>
9174
9175 * src/reader.c (token_translations_init): 256 is now the default
9176 value for the error token, i.e., it will be assigned another
9177 number if the user assigned 256 to one of her tokens.
9178 (reader): Don't force 256 to error.
9179 * doc/bison.texinfo (Symbols): Adjust.
9180 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
9181 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
9182 etc. instead of 10, 20, 30 (which was used to `jump' over error
9183 (256) and undefined (2)).
9184
9185 2002-04-22 Akim Demaille <akim@epita.fr>
9186
9187 Propagate more token_number_t.
9188
9189 * src/gram.h (token_number_as_item_number)
9190 (item_number_as_token_number): New.
9191 * src/output.c (GENERATE_OUTPUT_TABLE): New.
9192 Use it to create output_item_number_table and
9193 output_token_number_table.
9194 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9195 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
9196 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
9197 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
9198
9199 2002-04-22 Akim Demaille <akim@epita.fr>
9200
9201 * src/output.h, src/output.c (get_lines_number): Remove.
9202
9203 2002-04-19 Akim Demaille <akim@epita.fr>
9204
9205 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
9206 as Lex/Flex'.
9207 (Debugging): More details about enabling the debugging features.
9208 (Table of Symbols): Describe $$, $n, @$, and @n.
9209 Suggested by Tim Josling.
9210
9211 2002-04-19 Akim Demaille <akim@epita.fr>
9212
9213 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
9214
9215 2002-04-10 Akim Demaille <akim@epita.fr>
9216
9217 * src/system.h: Rely on HAVE_LIMITS_H.
9218 Suggested by Paul Eggert.
9219
9220 2002-04-09 Akim Demaille <akim@epita.fr>
9221
9222 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
9223 full stderr, and strip it according to the bison options, instead
9224 of composing the error message from different bits.
9225 This makes it easier to check for several error messages.
9226 Adjust all the invocations.
9227 Add an invocation exercising the error token.
9228 Add an invocation demonstrating a stupid error message.
9229 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
9230 Adjust the tests.
9231 Error message are for stderr, not stdout.
9232
9233 2002-04-09 Akim Demaille <akim@epita.fr>
9234
9235 * src/gram.h, src/gram.c (error_token_number): Remove, use
9236 errtoken->number.
9237 * src/reader.c (reader): Don't specify the user token number (2)
9238 for $undefined, as it uselessly prevents using it.
9239 * src/gram.h (token_number_t): Move to...
9240 * src/symtab.h: here.
9241 (state_t.number): Is a token_number_t.
9242 * src/print.c, src/reader.c: Use undeftoken->number instead of
9243 hard coded 2.
9244 (Even though this 2 is not the same as above: the number of the
9245 undeftoken remains being 2, it is its user token number which
9246 might not be 2).
9247 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
9248 `user_token_number_max'.
9249 Output `undef_token_number'.
9250 * data/bison.simple, data/bison.c++: Use them.
9251 Be sure to map invalid yylex return values to
9252 `undef_token_number'. This saves us from gratuitous SEGV.
9253
9254 * tests/conflicts.at (Solved SR Conflicts)
9255 (Unresolved SR Conflicts): Adjust.
9256 * tests/regression.at (Web2c Actions): Adjust.
9257
9258 2002-04-08 Akim Demaille <akim@epita.fr>
9259
9260 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
9261 Adding #line.
9262 Remove the duplicate `typedefs'.
9263 (RhsNumberType): Fix the declaration and various other typos.
9264 Use __ofile__.
9265 * data/bison.simple: Use __ofile__.
9266 * src/scan-skel.l: Handle __ofile__.
9267
9268 2002-04-08 Akim Demaille <akim@epita.fr>
9269
9270 * src/gram.h (item_number_t): New, the type of item numbers in
9271 RITEM. Note that it must be able to code symbol numbers as
9272 positive number, and the negation of rule numbers as negative
9273 numbers.
9274 Adjust all dependencies (pretty many).
9275 * src/reduce.c (rule): Remove this `short *' pointer: use
9276 item_number_t.
9277 * src/system.h (MINSHORT, MAXSHORT): Remove.
9278 Include `limits.h'.
9279 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
9280 (shortcpy): Remove.
9281 (MAXTABLE): Move to...
9282 * src/output.c (MAXTABLE): here.
9283 (prepare_rules): Use output_int_table to output rhs.
9284 * data/bison.simple, data/bison.c++: Adjust.
9285 * tests/torture.at (Big triangle): Move the limit from 254 to
9286 500.
9287 * tests/regression.at (Web2c Actions): Ajust.
9288
9289 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
9290 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
9291 passes, but produces negative #line number, once fixed, GCC is
9292 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
9293 C), it passes.
9294 * src/state.h (state_h): Code input lines on ints, not shorts.
9295
9296 2002-04-08 Akim Demaille <akim@epita.fr>
9297
9298 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
9299 and then the grammar.
9300
9301 2002-04-08 Akim Demaille <akim@epita.fr>
9302
9303 * src/system.h: No longer using strndup.
9304
9305 2002-04-07 Akim Demaille <akim@epita.fr>
9306
9307 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
9308 * src/output.c (output_table_data): Return the longest number.
9309 (prepare_tokens): Output `token_number_max').
9310 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
9311 New.
9312 Use them to define yy_token_number_type/TokenNumberType.
9313 Use this type for yytranslate.
9314 * tests/torture.at (Big triangle): Push the limit from 124 to
9315 253.
9316 * tests/regression.at (Web2c Actions): Adjust.
9317
9318 2002-04-07 Akim Demaille <akim@epita.fr>
9319
9320 * tests/torture.at (Big triangle): New.
9321 (GNU AWK Grammar, GNU Cim Grammar): Move to...
9322 * tests/existing.at: here.
9323
9324 2002-04-07 Akim Demaille <akim@epita.fr>
9325
9326 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
9327 nritems.
9328 Adjust dependencies.
9329
9330 2002-04-07 Akim Demaille <akim@epita.fr>
9331
9332 * src/reader.c: Normalize increments to prefix form.
9333
9334 2002-04-07 Akim Demaille <akim@epita.fr>
9335
9336 * src/reader.c, symtab.c: Remove debugging code.
9337
9338 2002-04-07 Akim Demaille <akim@epita.fr>
9339
9340 Rename all the `bucket's as `symbol_t'.
9341
9342 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
9343 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
9344 * src/symtab.c, src/symtab.h (bucket): Rename as...
9345 (symbol_t): this.
9346 (symbol_list_new, bucket_check_defined, bucket_make_alias)
9347 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
9348 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9349 (buckets_new, buckets_free, buckets_do): Rename as...
9350 (symbol_list_new, symbol_check_defined, symbol_make_alias)
9351 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9352 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
9353 (symbols_new, symbols_free, symbols_do): these.
9354
9355 2002-04-07 Akim Demaille <akim@epita.fr>
9356
9357 Use lib/hash for the symbol table.
9358
9359 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
9360 EOF.
9361 * src/lex.c (lex): Set the `number' member of new terminals.
9362 * src/reader.c (bucket_check_defined, bucket_make_alias)
9363 (bucket_check_alias_consistence, bucket_translation): New.
9364 (reader, grammar_free, readgram, token_translations_init)
9365 (packsymbols): Adjust.
9366 (reader): Number the predefined tokens.
9367 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
9368 for predefined tokens.
9369 * src/symtab.h (bucket): Remove all the hash table related
9370 members.
9371 * src/symtab.c (symtab): Replace by...
9372 (bucket_table): this.
9373 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9374 (buckets_new, buckets_do): New.
9375
9376 2002-04-07 Akim Demaille <akim@epita.fr>
9377
9378 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
9379 (start_symbol, max_user_token_number, semantic_parser)
9380 (error_token_number): Initialize.
9381 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
9382 Initialize.
9383 (reader): Don't.
9384 (errtoken, eoftoken, undeftoken, axiom): Extern.
9385
9386 2002-04-07 Akim Demaille <akim@epita.fr>
9387
9388 * src/gram.h (rule_s): prec and precsym are now pointers
9389 to the bucket giving the priority/associativity.
9390 Member `associativity' removed: useless.
9391 * src/reduce.c, src/conflicts.c: Adjust.
9392
9393 2002-04-07 Akim Demaille <akim@epita.fr>
9394
9395 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
9396 Properly escape the symbols' TAG when outputting them.
9397
9398 2002-04-07 Akim Demaille <akim@epita.fr>
9399
9400 * src/lalr.h (LA): Is a bitsetv, not bitset*.
9401
9402 2002-04-07 Akim Demaille <akim@epita.fr>
9403
9404 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
9405 (LArule): this, which is an array to rule_t*.
9406 * src/print.c, src/conflicts.c: Adjust.
9407
9408 2002-04-07 Akim Demaille <akim@epita.fr>
9409
9410 * src/gram.h (rule_t): Rename `number' as `user_number'.
9411 `number' is a new member.
9412 Adjust dependencies.
9413 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
9414
9415 2002-04-07 Akim Demaille <akim@epita.fr>
9416
9417 As a result of the previous patch, it is no longer needed
9418 to reorder ritem itself.
9419
9420 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
9421
9422 2002-04-07 Akim Demaille <akim@epita.fr>
9423
9424 Be sure never to walk through RITEMS, but use only data related to
9425 the rules themselves. RITEMS should be banished.
9426
9427 * src/output.c (output_token_translations): Rename as...
9428 (prepare_tokens): this.
9429 In addition to `translate', prepare the muscles `tname' and
9430 `toknum', which were handled by...
9431 (output_rule_data): this.
9432 Remove, and move the remainder of its outputs into...
9433 (prepare_rules): this new routines, which also merges content from
9434 (output_gram): this.
9435 (prepare_rules): Be sure never to walk through RITEMS.
9436 (output_stos): Rename as...
9437 (prepare_stos): this.
9438 (output): Always invoke prepare_states, after all, just don't use it
9439 in the output if you don't need it.
9440
9441 2002-04-07 Akim Demaille <akim@epita.fr>
9442
9443 * src/LR0.c (new_state): Display `nstates' as the name of the
9444 newly created state.
9445 Adjust to initialize first_state and last_state if needed.
9446 Be sure to distinguish the initial from the final state.
9447 (new_states): Create the itemset of the initial state, and use
9448 new_state.
9449 * src/closure.c (closure): Now that the initial state has its
9450 items properly set, there is no need for a special case when
9451 creating `ruleset'.
9452
9453 As a result, now the rule 0, reducing to $axiom, is visible in the
9454 outputs. Adjust the test suite.
9455
9456 * tests/conflicts.at (Solved SR Conflicts)
9457 (Unresolved SR Conflicts): Adjust.
9458 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
9459 * tests/conflicts.at (S/R in initial): New.
9460
9461 2002-04-07 Akim Demaille <akim@epita.fr>
9462
9463 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
9464 the RHS of the rules.
9465 * src/output.c (output_gram): Likewise.
9466
9467 2002-04-07 Akim Demaille <akim@epita.fr>
9468
9469 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
9470 bucket.
9471 Adjust all dependencies.
9472 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
9473 `number' of the buckets too.
9474 * src/gram.h: Include `symtab.h'.
9475 (associativity): Move to...
9476 * src/symtab.h: here.
9477 No longer include `gram.h'.
9478
9479 2002-04-07 Akim Demaille <akim@epita.fr>
9480
9481 * src/gram.h, src/gram.c (rules_rhs_length): New.
9482 (ritem_longest_rhs): Use it.
9483 * src/gram.h (rule_t): `number' is a new member.
9484 * src/reader.c (packgram): Set it.
9485 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
9486 the end of `rules', and count them out of `nrules'.
9487 (reduce_output, dump_grammar): Adjust.
9488 * src/print.c (print_grammar): It is no longer needed to check for
9489 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
9490 * tests/reduce.at (Reduced Automaton): New test.
9491
9492 2002-04-07 Akim Demaille <akim@epita.fr>
9493
9494 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
9495 lacking `+ 1' to nrules, Bison reported as useless a token if it
9496 was used solely to set the precedence of the last rule...
9497
9498 2002-04-07 Akim Demaille <akim@epita.fr>
9499
9500 * data/bison.c++, data/bison.simple: Don't output the current file
9501 name in #line, to avoid useless diffs between two identical
9502 outputs under different names.
9503
9504 2002-04-07 Akim Demaille <akim@epita.fr>
9505
9506 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
9507 Normalize loops to using `< nrules + 1', not `<= nrules'.
9508
9509 2002-04-07 Akim Demaille <akim@epita.fr>
9510
9511 * TODO: Update.
9512
9513 2002-04-07 Akim Demaille <akim@epita.fr>
9514
9515 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
9516 bucket.value as bucket.number.
9517
9518 2002-04-07 Akim Demaille <akim@epita.fr>
9519
9520 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
9521 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
9522 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
9523 RHS, instead of being an index in RITEMS.
9524
9525 2002-04-04 Paul Eggert <eggert@twinsun.com>
9526
9527 * doc/bison.texinfo: Update copyright date.
9528 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
9529 (Symbols): Warn about running Bison in one character set,
9530 but compiling and/or running in an incompatible one.
9531 Warn about character code 256, too.
9532
9533 2002-04-03 Paul Eggert <eggert@twinsun.com>
9534
9535 * src/bison.data (YYSTACK_ALLOC): Depend on whether
9536 YYERROR_VERBOSE is nonzero, not whether it is defined.
9537
9538 Merge changes from bison-1_29-branch.
9539
9540 2002-03-20 Paul Eggert <eggert@twinsun.com>
9541
9542 Merge fixes from Debian bison_1.34-1.diff.
9543
9544 * configure.in (AC_PREREQ): 2.53.
9545
9546 2002-03-20 Akim Demaille <akim@epita.fr>
9547
9548 * src/conflicts.c (log_resolution): Argument `resolution' is const.
9549
9550 2002-03-19 Paul Eggert <eggert@twinsun.com>
9551
9552 * src/bison.simple (YYCOPY): New macro.
9553 (YYSTACK_RELOCATE): Use it.
9554 Remove Type arg; no longer needed. All callers changed.
9555 (yymemcpy): Remove; no longer needed.
9556
9557 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
9558 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9559
9560 2002-03-19 Akim Demaille <akim@epita.fr>
9561
9562 Test and fix the #line outputs.
9563
9564 * tests/atlocal.at (GCC): New.
9565 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
9566 (Prologue synch line, %union synch line, Postprologue synch line)
9567 (Action synch line, Epilogue synch line): New tests.
9568 * src/reader.c (parse_union_decl): Define the muscle stype_line.
9569 * data/bison.simple, data/bison.c++: Use it.
9570
9571 2002-03-19 Akim Demaille <akim@epita.fr>
9572
9573 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
9574 (Solved SR Conflicts, %expect not enough, %expect right)
9575 (%expect too much): Move to...
9576 * tests/conflicts.at: this new file.
9577
9578 2002-03-19 Akim Demaille <akim@epita.fr>
9579
9580 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
9581 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
9582 that we can move to enums for instance.
9583 * src/output.c (token_definitions_output): Output a list of
9584 `token-name, token-number' instead of the #define.
9585 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
9586
9587 2002-03-14 Akim Demaille <akim@epita.fr>
9588
9589 Use Gettext 0.11.1.
9590
9591 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
9592
9593 * data/bison.c++: Make the user able to add members to the generated
9594 parser by subclassing.
9595
9596 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
9597
9598 * src/reader.c (read_additionnal_code): `c' should be an integer, not
9599 a character.
9600 Reported by Nicolas Tisserand and Nicolas Burrus.
9601
9602 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
9603
9604 * src/reader.c: Warn about lacking semi-colons, do not complain.
9605
9606 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
9607
9608 * data/bison.c++: Remove a debug line.
9609
9610 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
9611
9612 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
9613 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
9614 provide a default implementation.
9615
9616 2002-03-04 Akim Demaille <akim@epita.fr>
9617
9618 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
9619 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
9620 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
9621 * tests/semantic.at (Parsing Guards): Similarly.
9622 * src/reader.at (readgram): Complain if the last rule is not ended
9623 with a semi-colon.
9624
9625 2002-03-04 Akim Demaille <akim@epita.fr>
9626
9627 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
9628 * src/closure.c: here.
9629 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
9630 RTC.
9631 * src/warshall.h, src/warshall.c: Remove.
9632 * tests/sets.at (Broken Closure): Adjust.
9633
9634 2002-03-04 Akim Demaille <akim@epita.fr>
9635
9636 * src/output.c (output_skeleton): tempdir is const.
9637 bytes_read is unused.
9638
9639 2002-03-04 Akim Demaille <akim@epita.fr>
9640
9641 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9642 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
9643 Update.
9644 From Michael Hayes.
9645
9646 2002-03-04 Akim Demaille <akim@epita.fr>
9647
9648 * src/closure.c (closure): `r' is unused.
9649
9650 2002-03-04 Akim Demaille <akim@epita.fr>
9651
9652 * tests/sets.at (Broken Closure): Add the ending `;'.
9653 * src/reader.at (readgram): Complain if a rule is not ended with a
9654 semi-colon.
9655
9656 2002-03-04 Akim Demaille <akim@epita.fr>
9657
9658 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
9659 (count_sr_conflicts): Use bitset_count.
9660 * src/reduce.c (inaccessable_symbols): Ditto.
9661 (bits_size): Remove.
9662 * src/warshall.h, src/warshall.c: Convert to bitsetv.
9663
9664 2002-03-04 Akim Demaille <akim@epita.fr>
9665
9666 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
9667 * src/reduce.c: Remove the `bitset_zero's following the
9668 `bitset_create's, as now it is performed by the latter.
9669
9670 2002-03-04 Akim Demaille <akim@epita.fr>
9671
9672 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
9673 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
9674 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
9675 latest sources from Michael.
9676
9677 2002-03-04 Akim Demaille <akim@epita.fr>
9678
9679 * src/output.c (output): Don't free the grammar.
9680 * src/reader.c (grammar_free): New.
9681 * src/main.c (main): Call it and don't free symtab here.
9682
9683 2002-03-04 Akim Demaille <akim@epita.fr>
9684
9685 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
9686 before returning.
9687 Reported by Benoit Perrot.
9688
9689 2002-03-04 Akim Demaille <akim@epita.fr>
9690
9691 Use bitset operations when possible, not loops over bits.
9692
9693 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
9694 bitset_or.
9695 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
9696 * src/reduce.c (useless_nonterminals): Formatting changes.
9697 * src/warshall.c (TC): Use bitset_or.
9698
9699 2002-03-04 Akim Demaille <akim@epita.fr>
9700
9701 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
9702 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
9703 Ditto.
9704
9705 2002-03-04 Akim Demaille <akim@epita.fr>
9706
9707 * src/lalr.c (F): Now a bitset*.
9708 Adjust all dependencies.
9709
9710 2002-03-04 Akim Demaille <akim@epita.fr>
9711
9712 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
9713 Adjust all dependencies.
9714
9715 2002-03-04 Akim Demaille <akim@epita.fr>
9716
9717 * src/L0.c, src/LR0.h (nstates): Be size_t.
9718 Adjust comparisons (signed vs unsigned).
9719 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
9720 bitset*.
9721 Adjust all dependencies.
9722
9723 2002-03-04 Akim Demaille <akim@epita.fr>
9724
9725 * src/closure.c (firsts): Now, also a bitset.
9726 Adjust all dependencies.
9727 (varsetsize): Remove, now unused.
9728 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
9729
9730 2002-03-04 Akim Demaille <akim@epita.fr>
9731
9732 * src/print.c: Convert to use bitset.h, not hand coded iterations
9733 over ints.
9734
9735 2002-03-04 Akim Demaille <akim@epita.fr>
9736
9737 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
9738
9739 2002-03-04 Akim Demaille <akim@epita.fr>
9740
9741 * src/closure.c (ruleset): Be a bitset.
9742 (rulesetsize): Remove.
9743
9744 2002-03-04 Akim Demaille <akim@epita.fr>
9745
9746 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9747 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
9748 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
9749 * src/closure.c (fderives): Be an array of bitsets.
9750
9751 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
9752
9753 * data/bison.c++: Merge the two generated headers. Insert a copyright
9754 notice in each output file.
9755
9756 2002-02-28 Akim Demaille <akim@epita.fr>
9757
9758 * data/bison.c++: Copy the prologue of bison.simple to fetch
9759 useful M4 definitions, such as b4_header_guard.
9760
9761 2002-02-25 Akim Demaille <akim@epita.fr>
9762
9763 * src/getargs.c (version): Give the name of the authors, and use a
9764 translator friendly scheme for the bgr
9765 copyright notice.
9766
9767 2002-02-25 Akim Demaille <akim@epita.fr>
9768
9769 * src/output.c (header_output): Remove, now handled completely via
9770 M4.
9771
9772 2002-02-25 Akim Demaille <akim@epita.fr>
9773
9774 * m4/m4.m4: New, from CVS Autoconf.
9775 * configure.in: Invoke it.
9776 * src/output.c (output_skeleton): Use its result instead of the
9777 hard coded name.
9778
9779 2002-02-25 Akim Demaille <akim@epita.fr>
9780
9781 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
9782 Fileutils 4.1.5.
9783 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
9784 * src/output.c (output_skeleton): Use mkstemp to create a real
9785 temporary file.
9786 Move the filling of `skeleton' and its muscle to...
9787 (prepare): here.
9788 (output): Move the definition of the prologue muscle to...
9789 (prepare): here.
9790 * src/system.h (DEFAULT_TMPDIR): New.
9791
9792 2002-02-14 Paul Eggert <eggert@twinsun.com>
9793
9794 Remove the support for C++ namespace cleanliness; it was
9795 causing more problems than it was curing, since it didn't work
9796 properly on some nonstandard C++ compilers. This can wait
9797 for a proper C++ parser.
9798
9799 * NEWS: Document this.
9800 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
9801 of C++, as it's treated like C now.
9802 * src/bison.simple (YYSTD): Remove.
9803 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
9804 Treat C++ just like Standard C instead of trying to support
9805 namespace cleanliness.
9806
9807 2002-02-14 Akim Demaille <akim@epita.fr>
9808
9809 * tests/regression.at (else): Adjust to Andreas' change.
9810
9811 2002-02-14 Akim Demaille <akim@epita.fr>
9812
9813 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
9814
9815 2002-02-13 Andreas Schwab <schwab@suse.de>
9816
9817 * src/output.c (output_rule_data): Don't output NULL, it might
9818 not be defined yet.
9819
9820 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
9821
9822 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
9823 (Copyright notice): Update.
9824
9825 2002-02-11 Akim Demaille <akim@epita.fr>
9826
9827 * tests/regression.at (%nonassoc and eof): Don't include
9828 nonportable headers.
9829
9830 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
9831
9832 * data/bison.c++: Correct error recovery. Make the user able to
9833 initialize the starting location.
9834
9835 2002-02-07 Akim Demaille <akim@epita.fr>
9836
9837 * tests/input.at: New.
9838
9839 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9840
9841 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9842 more consistent when naming methods and variables. Put preprocessor
9843 directives around tables only needed for debugging.
9844
9845 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9846
9847 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
9848 C++ parsers.
9849 (yy::b4_name::parse): Use print_.
9850
9851 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9852
9853 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
9854
9855 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9856
9857 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
9858 C++ parsers.
9859 (yy::b4_name::parse): Build verbose error messages, and use error_.
9860
9861 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9862
9863 * data/bison.c++: Fix m4 quoting in comments.
9864
9865 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9866
9867 * data/bison.c++: Adjust the parser code. Fix some muscles that were
9868 not expanded by m4.
9869
9870 2002-02-05 Akim Demaille <akim@epita.fr>
9871
9872 * data/bison.c++: Adjust to the M4 back end.
9873 More is certainly needed.
9874
9875 2002-02-05 Akim Demaille <akim@epita.fr>
9876
9877 Give a try to M4 as a back end.
9878
9879 * lib/readpipe.c: New, from wdiff.
9880 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
9881 BISON_HAIRY.
9882 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
9883 specific values. Now it is m4 that performs the lookup.
9884 * src/parse-skel.y: Remove.
9885 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
9886 * src/output.c (actions_output, guards_output)
9887 (token_definitions_output): No longer keeps track of the output
9888 line number, hence remove the second argument.
9889 (guards_output): Check against the guard member of a rule, not the
9890 action member.
9891 Adjust callers.
9892 (output_skeleton): Don't look for the skeleton location, let m4 do
9893 that.
9894 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
9895 file will be used.
9896 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
9897 (prepare): Given that for the time being changesyntax is not
9898 usable in M4, rename the muscles using `-' to `_'.
9899 Define `defines_flag', `output_parser_name' and `output_header_name'.
9900 * src/output.h (actions_output, guards_output)
9901 (token_definitions_output): Adjust prototypes.
9902 * src/scan-skel.l: Instead of scanning the skeletons, it now
9903 processes the output of m4: `__oline__' and `#output'.
9904 * data/bison.simple: Adjust to be used by M4(sugar).
9905 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
9906 to date.
9907 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
9908 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
9909 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
9910 shamelessly stolen from CVS Autoconf.
9911
9912 2002-02-05 Akim Demaille <akim@epita.fr>
9913
9914 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
9915 * configure.in: Check for the declarations of free and malloc.
9916 * src/muscle_tab.c: Adjust.
9917
9918 2002-02-05 Akim Demaille <akim@epita.fr>
9919
9920 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
9921 which have no values.
9922
9923 2002-02-05 Akim Demaille <akim@epita.fr>
9924
9925 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
9926 * data/: here.
9927
9928 2002-01-29 Paul Eggert <eggert@twinsun.com>
9929
9930 * src/bison.simple (YYSIZE_T): Do not define merely because
9931 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
9932 On some platforms, <alloca.h> does not declare YYSTD (size_t).
9933
9934 2002-01-27 Akim Demaille <akim@epita.fr>
9935
9936 Fix `%nonassoc and eof'.
9937
9938 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
9939 which were not properly copied! Replace
9940 memcpy (res->errs, src->errs, src->nerrs);
9941 with
9942 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
9943 !!!
9944 * tests/regression.at (%nonassoc and eof): Adjust to newest
9945 Autotest: `.' is not in the PATH.
9946
9947 2002-01-27 Akim Demaille <akim@epita.fr>
9948
9949 * tests/sets.at (AT_EXTRACT_SETS): New.
9950 (Nullable): Use it.
9951 (Firsts): New.
9952
9953 2002-01-26 Akim Demaille <akim@epita.fr>
9954
9955 * tests/actions.at, tests/calc.at, tests/headers.at,
9956 * tests/torture.at: Adjust to the newest Autotest which no longer
9957 forces `.' in the PATH.
9958
9959 2002-01-25 Akim Demaille <akim@epita.fr>
9960
9961 * tests/regression.at (%nonassoc and eof): New.
9962 Suggested by Robert Anisko.
9963
9964 2002-01-24 Akim Demaille <akim@epita.fr>
9965
9966 Bison dumps core when trying to complain about broken input files.
9967 Reported by Cris van Pelt.
9968
9969 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
9970 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
9971 into...
9972 (Invalid inputs): Strengthen: exercise parse_percent_token.
9973
9974 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
9975
9976 * src/Makefile.am: Add bison.c++.
9977 * src/bison.c++: New skeleton.
9978
9979 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
9980
9981 * po/it.po: New.
9982
9983 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
9984
9985 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
9986
9987 2002-01-20 Marc Autret <marc@gnu.org>
9988
9989 * src/files.c (compute_output_file_names): Fix
9990
9991 2002-01-20 Marc Autret <marc@gnu.org>
9992
9993 * tests/output.at: New test.
9994 * src/files.c (compute_base_names): Don't map extensions when
9995 the YACC flag is set, use defaults.
9996 Reported by Evgeny Stambulchik.
9997
9998 2002-01-20 Marc Autret <marc@gnu.org>
9999
10000 * src/system.h: Need to define __attribute__ away for non-GCC
10001 compilers as well (i.e., the vendor C compiler).
10002 Suggested by Albert Chin-A-Young.
10003
10004 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
10005
10006 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
10007 canonical definition.
10008 * src/system.h: Use the canonical definition for PARAMS (avoids
10009 a conflict with the macro from lib/hash.h).
10010
10011 2002-01-11 Akim Demaille <akim@epita.fr>
10012
10013 * configure.in: Use AC_FUNC_STRNLEN.
10014 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
10015
10016 2002-01-09 Akim Demaille <akim@epita.fr>
10017
10018 * src/files.c, src/files.h (output_infix): New.
10019 (tab_extension): Remove.
10020 (compute_base_names): Compute the former, drop the latter.
10021 * src/output.c (prepare): Insert the muscles `output-infix', and
10022 `output-suffix'.
10023 * src/parse-skel.y (string, string.1): New.
10024 (section.header): Use it.
10025 (section.yacc): Remove.
10026 (prefix): Remove too.
10027 * src/scan-skel.l: Adjust.
10028 * src/bison.simple, src/bison.hairy: Adjust.
10029
10030 2002-01-09 Akim Demaille <akim@epita.fr>
10031
10032 * configure.in (WERROR_CFLAGS): Compute it.
10033 * src/Makefile.am (CFLAGS): Pass it.
10034 * tests/atlocal.in (CFLAGS): Idem.
10035 * src/files.c: Fix a few warnings.
10036 (get_extension_index): Remove, unused.
10037
10038 2002-01-08 Akim Demaille <akim@epita.fr>
10039
10040 * src/getargs.c (AS_FILE_NAME): New.
10041 (getargs): Use it to convert DOSish file names.
10042 * src/files.c (base_name): Rename as full_base_name to avoid
10043 clashes with `base_name ()'.
10044 (filename_split): New.
10045 (compute_base_names): N-th rewrite, using filename_split.
10046
10047 2002-01-08 Akim Demaille <akim@epita.fr>
10048
10049 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
10050 New, stolen from the Fileutils 4.1.
10051 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10052 * configure.in: Check for the presence of memrchr, and of its
10053 prototype.
10054
10055 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
10056
10057 * lib/hash.h (__P): Added definition for this macro.
10058 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
10059 BUILT_SOURCES, to ensure they are generated first.
10060 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
10061 %error-verbose to allow bootstrapping with bison 1.30x.
10062
10063 2002-01-06 Akim Demaille <akim@epita.fr>
10064
10065 * src/reader.c (parse_braces): Don't fetch the next char, the
10066 convention is to fetch on entry.
10067 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
10068 'switch' without a following semicolon.
10069 * tests/regression.at (braces parsing): New.
10070
10071 2002-01-06 Akim Demaille <akim@epita.fr>
10072
10073 Bison is dead wrong in its RR conflict reports.
10074
10075 * tests/torture.at (GNU Cim Grammar): New.
10076 * src/conflicts.c (count_rr_conflicts): Fix.
10077
10078 2002-01-06 Akim Demaille <akim@epita.fr>
10079
10080 Creating package.m4 from configure.ac causes too many problems.
10081
10082 * tests/Makefile.am (package.m4): Create it by hand,
10083 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
10084
10085 2002-01-06 Akim Demaille <akim@epita.fr>
10086
10087 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
10088 skeleton.h.
10089
10090 2002-01-04 Paul Eggert <eggert@twinsun.com>
10091
10092 * doc/bison.texinfo (Debugging):
10093 Remove YYSTDERR; it's no longer defined or used.
10094 Also, s/cstdio.h/cstdio/.
10095
10096 2002-01-03 Akim Demaille <akim@epita.fr>
10097
10098 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
10099
10100 2002-01-03 Akim Demaille <akim@epita.fr>
10101
10102 * src/parse-skel.y (process_skeleton): Don't bind the parser's
10103 tracing code to --trace, wait for a better --trace option, with
10104 args.
10105
10106 2002-01-03 Akim Demaille <akim@epita.fr>
10107
10108 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
10109 The ISO C++ standard is extremely clear about it: stderr is
10110 considered a macro, not a regular symbol (see table 94 `Header
10111 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
10112 Therefore std:: does not apply to it. It still does with fprintf.
10113 Also, s/cstdio.h/cstdio/.
10114
10115 2002-01-03 Akim Demaille <akim@epita.fr>
10116
10117 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
10118 for non system headers.
10119
10120 2002-01-02 Akim Demaille <akim@epita.fr>
10121
10122 Equip the skeleton chain with location tracking, runtime trace,
10123 pure parser and scanner.
10124
10125 * src/parse-skel.y: Request a pure parser, locations, and prefix
10126 renaming.
10127 (%union): Having several members with the same type does not help
10128 type mismatches, simplify.
10129 (YYPRINT, yyprint): New.
10130 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
10131 (skel_error): this.
10132 Handle locations.
10133 * src/scan-skel.l: Adjust to these changes.
10134 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
10135 (LOCATION_PRINT, skel_control_t): New.
10136
10137 2001-12-30 Akim Demaille <akim@epita.fr>
10138
10139 * src/parse-skel.y: Get rid of the shift/reduce conflict:
10140 replace `gb' with BLANKS.
10141 * src/scan-skel.l: Adjust.
10142
10143 2001-12-30 Akim Demaille <akim@epita.fr>
10144
10145 * src/system.h: We don't need nor want bcopy.
10146 Throw away MS-DOS crap: we don't need getpid.
10147 * configure.in: We don't need strndup. It was even causing
10148 problems: because Flex includes the headers *before* us,
10149 _GNU_SOURCE is not defined by config.h, and therefore strndup was
10150 not visible.
10151 * lib/xstrndup.c: New.
10152 * src/scan-skel.l: Use it.
10153 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
10154 * src/parse-skel.y: Use %directives instead of #defines.
10155
10156 2001-12-30 Akim Demaille <akim@epita.fr>
10157
10158 * src/skeleton.h: New.
10159 * src/output.c (output_parser, output_master_parser): Remove, dead
10160 code.
10161 * src/output.h (get_lines_number, actions_output, guards_output)
10162 (token_definitions_output): Prototype them.
10163 * src/parse-skel.y: Add the license notice.
10164 Include output.h and skeleton.h.
10165 (process_skeleton): Returns void, and takes a single parameter.
10166 * src/scan-skel.l: Add the license notice.
10167 Include skeleton.h.
10168 Don't use %option yylineno: it seems that then Flex imagines
10169 REJECT has been used, and therefore it won't reallocate its
10170 buffers (which makes no other sense to me than a bug). It results
10171 in warnings for `unused: yy_flex_realloc'.
10172
10173 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
10174
10175 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10176 (MUSCLE_INSERT_PREFIX): ...to there.
10177 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10178 (MUSCLE_INSERT_PREFIX): Move from here...
10179
10180 * src/bison.hairy: Add a section directive. Put braces around muscle
10181 names. This parser skeleton is still broken, but Bison should not
10182 choke on a bad muscle 'syntax'.
10183 * src/bison.simple: Add a section directive. Put braces around muscle
10184 names.
10185
10186 * src/files.h (strsuffix, stringappend): Add declarations.
10187 (tab_extension): Add declaration.
10188 (short_base_name): Add declaration.
10189
10190 * src/files.c (strsuffix, stringappend): No longer static. These
10191 functions are used in the skeleton parser.
10192 (tab_extension): New.
10193 (compute_base_names): Use the computations done in this function
10194 to guess if the generated parsers should have '.tab' in their
10195 names.
10196 (short_base_name): No longer static.
10197
10198 * src/output.c (output_skeleton): New.
10199 (output): Disable call to output_master_parser, and give a try to
10200 a new skeleton handling system.
10201 (guards_output, actions_output): No longer static.
10202 (token_definitions_output, get_lines_number): No longer static.
10203
10204 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
10205
10206 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
10207 parse-skel.y.
10208
10209 * src/parse-skel.y: New file.
10210 * src/scan-skel.l: New file.
10211
10212 2001-12-29 Akim Demaille <akim@epita.fr>
10213
10214 %name-prefix is broken.
10215
10216 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
10217 Adjust all dependencies.
10218 * tests/headers.at (export YYLTYPE): Strengthen this test: use
10219 %name-prefix.
10220
10221 Renaming yylval but not yylloc is not consistent. Now we do.
10222
10223 * src/bison.simple: Prefix yylloc if used.
10224 * doc/bison.texinfo (Decl Summary): Document that.
10225
10226 2001-12-29 Akim Demaille <akim@epita.fr>
10227
10228 * doc/bison.texinfo: Promote `%long-directive' over
10229 `%long_directive'.
10230 Remove all references to fixed-output-files, yacc is enough.
10231
10232 2001-12-29 Akim Demaille <akim@epita.fr>
10233
10234 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
10235 user prologue. These are defaults.
10236 * tests/actions.at (Mid-rule actions): Make sure the user can
10237 define YYDEBUG and YYERROR_VERBOSE.
10238
10239 2001-12-29 Akim Demaille <akim@epita.fr>
10240
10241 * src/output.c (header_output): Don't forget to export YYLTYPE and
10242 yylloc.
10243 * tests/headers.at (export YYLTYPE): New, make sure it does.
10244 * tests/regression.at (%union and --defines, Invalid CPP headers):
10245 Move to...
10246 * tests/headers.at: here.
10247
10248 2001-12-29 Akim Demaille <akim@epita.fr>
10249
10250 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
10251
10252 2001-12-29 Akim Demaille <akim@epita.fr>
10253
10254 * tests/actions.at (Mid-rule actions): Output on a single line
10255 instead of several.
10256
10257 2001-12-29 Akim Demaille <akim@epita.fr>
10258
10259 * doc/bison.texinfo: Formatting changes.
10260
10261 2001-12-29 Akim Demaille <akim@epita.fr>
10262
10263 Don't store the token defs in a muscle, just be ready to output it
10264 on command. Now possible via `symbols'. Fixes a memory leak.
10265
10266 * src/output.c (token_definitions_output): New.
10267 (output_parser, header_output): Use it.
10268 * src/reader.c (symbols_save): Remove.
10269
10270 2001-12-29 Akim Demaille <akim@epita.fr>
10271
10272 * src/bison.simple: Do not provide a default for YYSTYPE and
10273 YYLTYPE before the user's prologue. Otherwise it's hardly... a
10274 default.
10275
10276 2001-12-29 Akim Demaille <akim@epita.fr>
10277
10278 Mid-rule actions are simply... ignored!
10279
10280 * src/reader.c (readgram): Be sure to attach mid-rule actions to
10281 the empty-rule associated to the dummy symbol, not to the host
10282 rule.
10283 * tests/actions.at (Mid-rule actions): New.
10284
10285 2001-12-29 Akim Demaille <akim@epita.fr>
10286
10287 Memory leak.
10288
10289 * src/reader.c (reader): Free grammar.
10290
10291 2001-12-29 Akim Demaille <akim@epita.fr>
10292
10293 Memory leak.
10294
10295 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
10296 since it allocates it for each state, although only one is needed.
10297 (allocate_storage): Do it here.
10298
10299 2001-12-29 Akim Demaille <akim@epita.fr>
10300
10301 * src/options.h, src/options.c (create_long_option_table): Rename
10302 as...
10303 (long_option_table_new): this, with a clearer prototype.
10304 (percent_table): Remove, unused,
10305 * src/getargs.c (getargs): Adjust.
10306
10307 2001-12-29 Akim Demaille <akim@epita.fr>
10308
10309 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
10310 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
10311 as states.
10312
10313 2001-12-29 Akim Demaille <akim@epita.fr>
10314
10315 * src/lalr.c (build_relations): Rename `states' as `states1'.
10316 Sorry, I don't understand exactly what it is, no better name...
10317
10318 2001-12-29 Akim Demaille <akim@epita.fr>
10319
10320 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
10321 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
10322 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
10323 as rules.
10324
10325 2001-12-29 Akim Demaille <akim@epita.fr>
10326
10327 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
10328 ago.
10329
10330 2001-12-29 Akim Demaille <akim@epita.fr>
10331
10332 * src/reader.c, src/reader.h (user_toknums): Remove.
10333 Adjust all users to use symbols[i]->user_token_number.
10334
10335 2001-12-29 Akim Demaille <akim@epita.fr>
10336
10337 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
10338 Adjust all users to use symbols[i]->prec or ->assoc.
10339
10340 2001-12-29 Akim Demaille <akim@epita.fr>
10341
10342 * src/reader.c, src/reader.h (tags): Remove.
10343 Adjust all users to use symbols[i]->tag.
10344
10345 2001-12-29 Akim Demaille <akim@epita.fr>
10346
10347 * src/gram.h, src/gram.c (symbols): New, similar to state_table
10348 and rule_table.
10349 * src/reader.c (packsymbols): Fill this table.
10350 Drop sprec.
10351 * src/conflicts.c (resolve_sr_conflict): Adjust.
10352 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
10353 single table.
10354 Use symbols[i]->tag instead of tags[i].
10355
10356 2001-12-29 Akim Demaille <akim@epita.fr>
10357
10358 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
10359 In addition, put a comment in there, to replace...
10360 * tests/regression.at (%union and C comments): Remove.
10361
10362 2001-12-29 Akim Demaille <akim@epita.fr>
10363
10364 * tests/regression.at (Web2c Actions): Blindly move the actual
10365 output as expected output. The contents *seem* right to me, but I
10366 can't pretend reading perfectly parser tables... Nonetheless, all
10367 the other tests pass correctly, the table look OK, even though the
10368 presence of `$axiom' is to be noted: AFAICS it is useless (but
10369 harmless).
10370
10371 2001-12-29 Akim Demaille <akim@epita.fr>
10372
10373 * src/reader.c (readgram): Don't add the rule 0 if there were no
10374 rules read. In other words, add it _after_ having performed
10375 grammar sanity checks.
10376 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
10377
10378 2001-12-29 Akim Demaille <akim@epita.fr>
10379
10380 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
10381 visible, and some states have now a different number.
10382
10383 2001-12-29 Akim Demaille <akim@epita.fr>
10384
10385 * src/reader.c (readgram): Bind the initial rule's lineno to that
10386 of the first rule.
10387 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
10388 (Solved SR Conflicts): Adjust rule 0's line number.
10389
10390 2001-12-29 Akim Demaille <akim@epita.fr>
10391
10392 Fix the `GAWK Grammar' failure.
10393
10394 * src/LR0.c (final_state): Initialize to -1 so that we do compute
10395 the reductions of the first state which was mistakenly confused
10396 with the final state because precisely final_state was initialized
10397 to 0.
10398 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
10399 now noticed by Bison.
10400 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
10401 have a reduction on $default.
10402
10403 2001-12-29 Akim Demaille <akim@epita.fr>
10404
10405 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
10406 rule line numbers.
10407 * src/closure.c (print_closure): Likewise.
10408 * src/derives.c (print_derives): Likewise.
10409 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
10410 now.
10411
10412 2001-12-29 Akim Demaille <akim@epita.fr>
10413
10414 * src/lalr.c (lookaheads_print): New.
10415 (lalr): Call it when --trace-flag.
10416 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
10417 are dumped.
10418
10419 2001-12-29 Akim Demaille <akim@epita.fr>
10420
10421 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
10422 when walking through ritem, even via rule->rhs.
10423 * src/reduce.c (dump_grammar, useful_production, reduce_output)
10424 (useful_production, useless_nonterminals): Likewise.
10425 (reduce_grammar_tables): Likewise, plus update nritems.
10426 * src/nullable.c (set_nullable): Likewise.
10427 * src/lalr.c (build_relations): Likewise.
10428 * tests/sets.at (Nullable): Adjust.
10429 Fortunately, now, the $axiom is no longer nullable.
10430
10431 2001-12-29 Akim Demaille <akim@epita.fr>
10432
10433 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
10434 the 0-sentinel.
10435 * src/gram.c (ritem_longest_rhs): Likewise.
10436 * src/reduce.c (nonterminals_reduce): Likewise.
10437 * src/print_graph.c (print_graph): Likewise.
10438 * src/output.c (output_rule_data): Likewise.
10439 * src/nullable.c (set_nullable): Likewise.
10440
10441 2001-12-29 Akim Demaille <akim@epita.fr>
10442
10443 * src/output.c: Comment changes.
10444
10445 2001-12-27 Paul Eggert <eggert@twinsun.com>
10446
10447 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
10448 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
10449 Sparc, as they were causing more porting problems than the
10450 (minor) performance improvement was worth.
10451
10452 Also, catch up with 1.31's YYSTD.
10453
10454 2001-12-27 Akim Demaille <akim@epita.fr>
10455
10456 * src/output.c (output_gram): Rely on nritems, not the
10457 0-sentinel. See below.
10458 Use -1 as separator, not 0.
10459 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
10460 Rely on -1 as separator in yyrhs, instead of 0.
10461 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
10462 twice `Now at end of input', therefore there are two lines less to
10463 expect.
10464
10465 2001-12-27 Akim Demaille <akim@epita.fr>
10466
10467 * tests/regression.at (Unresolved SR Conflicts):
10468 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
10469 below.
10470
10471 2001-12-27 Akim Demaille <akim@epita.fr>
10472
10473 * src/LR0.c (new_state): Recognize the final state by the fact it
10474 is reached by eoftoken.
10475 (insert_start_shifting_state, insert_eof_shifting_state)
10476 (insert_accepting_state, augment_automaton): Remove, since now
10477 these states are automatically computed from the initial state.
10478 (generate_states): Adjust.
10479 * src/print.c: When reporting a rule number to the user, substract
10480 1, so that the axiom rule is rule 0, and the first user rule is 1.
10481 * src/reduce.c: Likewise.
10482 * src/print_graph.c (print_core): For the time being, just as for
10483 the report, depend upon --trace-flags to dump the full set of
10484 items.
10485 * src/reader.c (readgram): Once the grammar read, insert the rule
10486 0: `$axiom: START-SYMBOL $'.
10487 * tests/set.at: Adjust: rule 0 is now displayed, and since the
10488 number of the states has changed (the final state is no longer
10489 necessarily the last), catch up.
10490
10491 2001-12-27 Akim Demaille <akim@epita.fr>
10492
10493 Try to make the use of the eoftoken valid. Given that its value
10494 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
10495 is used instead of > 0 where appropriate, (ii), depend upon nritems
10496 instead of the 0-sentinel.
10497
10498 * src/gram.h, src/gram.c (nritems): New.
10499 Expected to be duplication of nitems, but for the time being...
10500 * src/reader.c (packgram): Assert nritems and nitems are equal.
10501 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
10502 * src/closure.c (print_closure, print_fderives): Likewise.
10503 * src/gram.c (ritem_print): Likewise.
10504 * src/print.c (print_core, print_grammar): Likewise.
10505 * src/print_graph.c: Likewise.
10506
10507 2001-12-27 Akim Demaille <akim@epita.fr>
10508
10509 * src/main.c (main): If there are complains after grammar
10510 reductions, then output the report anyway if requested, then die.
10511 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
10512 * src/reader.c (eoftoken): New.
10513 (parse_token_decl): If the token being defined has value `0', it
10514 is the eoftoken.
10515 (packsymbols): No longer hack `tags' to insert `$' by hand.
10516 Be sure to preserve the value of the eoftoken.
10517 (reader): Make sure eoftoken is defined.
10518 Initialize nsyms to 0: now eoftoken is created just like the others.
10519 * src/print.c (print_grammar): Don't special case the eof token.
10520 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
10521 lie anyway, albeit pleasant.
10522 * tests/calc.at: Exercise error messages with eoftoken.
10523 Change the grammar so that empty input is invalid.
10524 Adjust expectations.
10525 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
10526
10527 2001-12-27 Akim Demaille <akim@epita.fr>
10528
10529 * configure.in: Check the protos of strchr ans strspn.
10530 Replace strchr if needed.
10531 * src/system.h: Provide the protos of strchr, strspn and memchr if
10532 missing.
10533 * lib/strchr.c: New.
10534 * src/reader.c (symbols_save): Use strchr.
10535
10536 2001-12-27 Akim Demaille <akim@epita.fr>
10537
10538 * src/print.c, src/print_graph.c (escape): New.
10539 Use it to quote the TAGS outputs.
10540 * src/print_graph.c (print_state): Now errors are in red, and
10541 reductions in green.
10542 Prefer high to wide: output the state number on a line of its own.
10543
10544 2001-12-27 Akim Demaille <akim@epita.fr>
10545
10546 * src/state.h, src/state.c (reductions_new): New.
10547 * src/LR0.c (set_state_table): Let all the states have a
10548 `reductions', even if reduced to 0.
10549 (save_reductions): Adjust.
10550 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
10551 * src/print.c (print_reductions, print_actions): Adjust.
10552 * src/output.c (action_row): Adjust.
10553
10554 2001-12-27 Akim Demaille <akim@epita.fr>
10555
10556 * src/state.h, src/state.c (errs_new, errs_dup): New.
10557 * src/LR0.c (set_state_table): Let all the states have an errs,
10558 even if reduced to 0.
10559 * src/print.c (print_errs, print_reductions): Adjust.
10560 * src/output.c (output_actions, action_row): Adjust.
10561 * src/conflicts.c (resolve_sr_conflict): Adjust.
10562
10563 2001-12-27 Akim Demaille <akim@epita.fr>
10564
10565 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
10566
10567 2001-12-27 Akim Demaille <akim@epita.fr>
10568
10569 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
10570 * src/print.c: here.
10571 (lookaheadset, shiftset): New, used as additional storage by
10572 print_reductions.
10573 (print_results): Adjust.
10574 (print_shifts, print_gotos, print_errs): New, extracted from...
10575 (print_actions): here.
10576 * src/print_graph.c (print_actions): Remove dead code.
10577
10578 2001-12-27 Akim Demaille <akim@epita.fr>
10579
10580 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
10581 `$n' and `@n'.
10582
10583 2001-12-27 Akim Demaille <akim@epita.fr>
10584
10585 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
10586 (build_relations): Adjust.
10587
10588 2001-12-27 Akim Demaille <akim@epita.fr>
10589
10590 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
10591 duplication.
10592
10593 2001-12-27 Akim Demaille <akim@epita.fr>
10594
10595 * src/reader.c (packgram): Catch nitems overflows.
10596
10597 2001-12-27 Akim Demaille <akim@epita.fr>
10598
10599 * src/files.c, src/files.h (guard_obstack): Remove.
10600 * src/output.c (output): Adjust.
10601 * src/reader.c (parse_braces): New, factoring...
10602 (copy_action, copy_guard): these two which are renamed as...
10603 (parse_action, parse_guard): these.
10604 As a voluntary consequence, using braces around guards is now
10605 mandatory.
10606
10607 2001-12-27 Akim Demaille <akim@epita.fr>
10608
10609 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
10610 * src/reader.c (symbol_list): `guard' and `guard_line' are new
10611 members.
10612 (symbol_list_new): Adjust.
10613 (copy_action): action_line is the first line, not the last.
10614 (copy_guard): Just as for actions, store the `action' only, not
10615 the switch/case/break flesh.
10616 Don't parse the user action that might follow the guard, let...
10617 (readgram): do it, i.e., now, there can be an action after a
10618 guard.
10619 In other words the guard is just explicitly optional.
10620 (packgram): Adjust.
10621 * src/output.c (guards_output): New.
10622 (output_parser): Call it when needed.
10623 (output): Also free the guard and attrs obstacks.
10624 * src/files.c, src/files.h (obstack_save): Remove.
10625 (output_files): Remove.
10626 As a result, if one needs the former `.act' file, using an
10627 appropriate skeleton which requires actions and guards is now
10628 required.
10629 * src/main.c (main): Adjust.
10630 * tests/semantic.at: New.
10631 * tests/regression.at: Use `input.y' as input file name.
10632 Avoid 8+3 problems by requiring input.c when the test needs the
10633 parser.
10634
10635 2001-12-27 Akim Demaille <akim@epita.fr>
10636
10637 * src/reader.c (symbol_list_new): Be sure to initialize all the
10638 fields.
10639
10640 2001-12-27 Akim Demaille <akim@epita.fr>
10641
10642 All the hacks using a final pseudo state are now useless.
10643
10644 * src/LR0.c (set_state_table): state_table holds exactly nstates.
10645 * src/lalr.c (nLA): New.
10646 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
10647 instead of lookaheadsp from the pseudo state (nstate + 1).
10648
10649 2001-12-27 Akim Demaille <akim@epita.fr>
10650
10651 * src/output.c (action_row, token_actions): Use a state_t instead
10652 of a integer, and nlookaheads instead of the following state's
10653 lookaheadsp.
10654
10655 2001-12-27 Akim Demaille <akim@epita.fr>
10656
10657 * src/conflicts.c (log_resolution, flush_shift)
10658 (resolve_sr_conflict, set_conflicts, solve_conflicts)
10659 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
10660 (conflicts_print, print_reductions): Use a state_t instead of an
10661 integer when referring to a state.
10662 As much as possible, depend upon nlookaheads, instead of the
10663 `lookaheadsp' member of the following state (since lookaheads of
10664 successive states are successive, the difference between state n + 1
10665 and n served as the number of lookaheads for state n).
10666 * src/lalr.c (add_lookback_edge): Likewise.
10667 * src/print.c (print_core, print_actions, print_state)
10668 (print_results): Likewise.
10669 * src/print_graph.c (print_core, print_actions, print_state)
10670 (print_graph): Likewise.
10671 * src/conflicts.h: Adjust.
10672
10673 2001-12-27 Akim Demaille <akim@epita.fr>
10674
10675 * src/bison.hairy: Formatting/comment changes.
10676 ANSIfy.
10677 Remove `register' indications.
10678 Add plenty of `static'.
10679
10680 2001-12-27 Akim Demaille <akim@epita.fr>
10681
10682 * src/output.c (prepare): Drop the muscle `ntbase' which
10683 duplicates ntokens.
10684 * src/bison.simple: Formatting/comment changes.
10685 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
10686 is an undocumented synonym.
10687
10688 2001-12-22 Akim Demaille <akim@epita.fr>
10689
10690 * src/output.c (output_table_data): Change the prototype to use
10691 `int' for array ranges: some invocations do pass an int, not a
10692 short.
10693 Reported by Wayne Green.
10694
10695 2001-12-22 Akim Demaille <akim@epita.fr>
10696
10697 Some actions of web2c.y are improperly triggered.
10698 Reported by Mike Castle.
10699
10700 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
10701 * tests/regression.at (Web2c): Rename as...
10702 (Web2c Report): this.
10703 (Web2c Actions): New.
10704
10705 2001-12-22 Akim Demaille <akim@epita.fr>
10706
10707 Reductions in web2c.y are improperly reported.
10708 Reported by Mike Castle.
10709
10710 * src/conflicts.c (print_reductions): Fix.
10711 * tests/regression.at (Web2c): New.
10712
10713 2001-12-18 Akim Demaille <akim@epita.fr>
10714
10715 Some host fail on `assert (!"foo")', which expands to
10716 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
10717 Reported by Nelson Beebee.
10718
10719 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
10720 `#define it_succeeded 0' and `assert (it_succeeded)'.
10721
10722 2001-12-17 Marc Autret <autret_m@epita.fr>
10723
10724 * src/bison.simple: Don't hard code the skeleton line and filename.
10725 * src/output.c (output_parser): Rename 'line' as 'output_line'.
10726 New line counter 'skeleton_line' (skeleton-line muscle).
10727
10728 2001-12-17 Paul Eggert <eggert@twinsun.com>
10729
10730 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
10731 YYDEBUG must be defined to a nonzero value.
10732
10733 * src/bison.simple (yytname): Do not assume that the user defines
10734 YYDEBUG to a properly parenthesized expression.
10735
10736 2001-12-17 Akim Demaille <akim@epita.fr>
10737
10738 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
10739 nlookaheads is a new member.
10740 Adjust all users.
10741 * src/lalr.h (nlookaheads): Remove this orphan declaration.
10742 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
10743 state.
10744
10745 2001-12-17 Akim Demaille <akim@epita.fr>
10746
10747 * src/files.h, src/files.c (open_files, close_files): Remove.
10748 * src/main.c (main): Don't open/close files, nor invoke lex_free,
10749 let...
10750 * src/reader.c (reader): Do it.
10751
10752 2001-12-17 Akim Demaille <akim@epita.fr>
10753
10754 * src/conflicts.c (print_reductions): Formatting changes.
10755
10756 2001-12-17 Akim Demaille <akim@epita.fr>
10757
10758 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
10759 (flush_reduce): New.
10760 (resolve_sr_conflict): Adjust.
10761
10762 2001-12-17 Akim Demaille <akim@epita.fr>
10763
10764 * src/output.c (output_obstack): Be static and rename as...
10765 (format_obstack): this, to avoid any confusion with files.c's
10766 output_obstack.
10767 * src/reader.h (muscle_obstack): Move to...
10768 * src/output.h: here, since it's defined in output.c.
10769
10770 2001-12-17 Akim Demaille <akim@epita.fr>
10771
10772 * src/output.c (action_row, save_column, default_goto)
10773 (sort_actions, matching_state, pack_vector): Better variable
10774 locality.
10775
10776 2001-12-17 Akim Demaille <akim@epita.fr>
10777
10778 * src/output.c: Various formatting changes.
10779
10780 2001-12-17 Akim Demaille <akim@epita.fr>
10781
10782 * src/files.c (output_files): Free the output_obstack.
10783 * src/main.c (main): Call print and print_graph conditionally.
10784 * src/print.c (print): Work unconditionally.
10785 * src/print_graph.c (print_graph): Work unconditionally.
10786 * src/conflicts.c (log_resolution): Output only if verbose_flag.
10787
10788 2001-12-16 Marc Autret <autret_m@epita.fr>
10789
10790 * src/output.c (actions_output): Fix. When we use %no-lines,
10791 there is one less line per action.
10792
10793 2001-12-16 Marc Autret <autret_m@epita.fr>
10794
10795 * src/bison.simple: Remove a useless #line directive.
10796 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
10797 * src/output.c (get_lines_number): New.
10798 (output_parser): Adjust, now takes care about the lines of a
10799 output muscles.
10800 Fix line numbering.
10801 (actions_output): Computes the number of lines taken by actions.
10802 (output_master_parser): Insert new skeleton which is the name of
10803 the output parser file name.
10804
10805 2001-12-15 Marc Autret <autret_m@epita.fr>
10806
10807 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
10808
10809 2001-12-15 Marc Autret <autret_m@epita.fr>
10810
10811 * src/output.c (output_gram): Keep track of the hairy one.
10812
10813 2001-12-15 Akim Demaille <akim@epita.fr>
10814
10815 Make `make distcheck' work.
10816
10817 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
10818 system.h which uses libgettext.h.
10819
10820 2001-12-15 Akim Demaille <akim@epita.fr>
10821
10822 * src/nullable.c (set_nullable): Useless rules must be skipped,
10823 otherwise, since we range over their symbols, we might look at a
10824 nonterminal which no longer ``exists'', i.e., it is not counted in
10825 `nvars', hence we overflow our arrays.
10826
10827 2001-12-15 Akim Demaille <akim@epita.fr>
10828
10829 The header can also be produced directly, without any obstack!
10830 Yahoo!
10831
10832 * src/files.c, src/files.h (defines_obstack): Remove.
10833 (compute_header_macro): Global.
10834 (defines_obstack_save): Remove.
10835 * src/reader.c (parse_union_decl): No longer output to
10836 defines_obstack: its content can be found in the `stype' muscle
10837 anyway.
10838 (output_token_translations): Merge into...
10839 (symbols_output): this.
10840 Rename as...
10841 (symbols_save): this.
10842 (reader): Adjust.
10843 * src/output.c (header_output): New.
10844 (output): Call it.
10845
10846 2001-12-15 Akim Demaille <akim@epita.fr>
10847
10848 * src/reader.c (parse_union_decl): Instead of handling two obstack
10849 simultaneously, use one to define the `stype' muscle, and use the
10850 value of the latter to fill defines_obstack.
10851 (copy_comment): Remove.
10852 (copy_comment2): Work for a single obstack.
10853 Rename as...
10854 (copy_comment): this.
10855
10856 2001-12-15 Akim Demaille <akim@epita.fr>
10857
10858 * src/lex.c, src/lex.h (xgetc): No longer static.
10859 * src/reader.c (parse_union_decl): Revamp.
10860
10861 2001-12-15 Akim Demaille <akim@epita.fr>
10862
10863 Still making progress in separating Bison into (i) input, (ii)
10864 process, (iii) output: now we can directly output the parser file
10865 without using table_obstack at all.
10866
10867 * src/files.c, src/files.h (table_obstack): Bye bye.
10868 (parser_file_name): New.
10869 * src/files.c (compute_output_file_names): Compute it.
10870 * src/output.c (actions_output, output_parser)
10871 (output_master_parser): To a file instead of an obstack.
10872
10873 2001-12-15 Akim Demaille <akim@epita.fr>
10874
10875 Attach actions to rules, instead of pre-outputting them to
10876 actions_obstack.
10877
10878 * src/gram.h (rule_t): action and action_line are new members.
10879 * src/reader.c (symbol_list): Likewise.
10880 (copy_action): Save the actions within the rule.
10881 (packgram): Save them in rule_table.
10882 * src/output.c (actions_output): New.
10883 (output_parser): Use it on `%%actions'.
10884 (output_rule_data): Don't free rule_table.
10885 (output): Do it.
10886 (prepare): Don't save the `action' muscle.
10887 * src/bison.simple: s/%%action/%%actions/.
10888
10889 2001-12-15 Akim Demaille <akim@epita.fr>
10890
10891 * src/reader.c (copy_action): When --yacc, don't append a `;'
10892 to the user action: let it fail if lacking.
10893 Suggested by Arnold Robbins and Tom Tromey.
10894
10895 2001-12-14 Akim Demaille <akim@epita.fr>
10896
10897 * src/lex.c (literalchar): Simply return the char you decoded, non
10898 longer mess around with obstacks and int pointers.
10899 Adjust all callers.
10900
10901 2001-12-14 Akim Demaille <akim@epita.fr>
10902
10903 * src/lex.c (literalchar): Don't escape the special characters,
10904 just decode them, and keep them as char (before, eol was output as
10905 the 2 char string `\n' etc.).
10906 * src/output.c (output_rule_data): Use quotearg to output the
10907 token strings.
10908
10909 2001-12-13 Paul Eggert <eggert@twinsun.com>
10910
10911 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
10912 Do not infringe on the global user namespace when using C++.
10913 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
10914 All uses of `fprintf' and `stderr' changed.
10915
10916 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
10917
10918 2001-12-13 Akim Demaille <akim@epita.fr>
10919
10920 The computation of nullable is broken: it doesn't handle empty
10921 RHS's properly.
10922
10923 * tests/torture.at (GNU AWK Grammar): New.
10924 * tests/sets.at (Nullable): New.
10925 * src/nullable.c (set_nullable): Instead of blindly looping over
10926 `ritems', loop over the rules, and then over their rhs's.
10927
10928 Work around Autotest bugs.
10929
10930 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
10931 frame, because Autotest understand lines starting with a `+' as
10932 traces from the shell. Then, they are not processed properly.
10933 Admittedly an Autotest bug, but we don't have time to wait for
10934 Autotest to catch up.
10935 * tests/regression.at (Broken Closure): Adjust to the new table
10936 frames.
10937 Move to...
10938 * tests/sets.at: here.
10939
10940 2001-12-13 Akim Demaille <akim@epita.fr>
10941
10942 * src/closure.c (closure): Use nrules instead of playing tricks
10943 with BITS_PER_WORD.
10944
10945 2001-12-13 Akim Demaille <akim@epita.fr>
10946
10947 * src/print.c (print_actions): Output the handling of `$' as the
10948 traces do: shifting the token EOF. Before EOF was treated as a
10949 nonterminal.
10950 * tests/regression.at: Adjust some tests.
10951 * src/print_graph.c (print_core): Complete the set of items via
10952 closure. The next-to-final and final states are still unsatisfying,
10953 but that's to be addressed elsewhere.
10954 No longer output the rule numbers, but do output the state number.
10955 A single loop for the shifts + gotos is enough, but picked a
10956 distinct color for each.
10957 (print_graph): Initialize and finalize closure.
10958
10959 2001-12-13 Akim Demaille <akim@epita.fr>
10960
10961 * src/reader.c (readgram): Remove dead code, an strip useless
10962 braces.
10963 (get_type): Remove, unused.
10964
10965 2001-12-12 Akim Demaille <akim@epita.fr>
10966
10967 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
10968 on that of lib/error.c.
10969
10970 2001-12-12 Akim Demaille <akim@epita.fr>
10971
10972 Some hosts don't like `/' in includes.
10973
10974 * src/system.h: Include libgettext.h without qualifying the path.
10975 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
10976 $(top_srcdir).
10977
10978 2001-12-11 Marc Autret <autret_m@epita.fr>
10979
10980 * src/output.c (output_parser): Remove useless muscle.
10981
10982 2001-12-11 Marc Autret <autret_m@epita.fr>
10983
10984 * src/bison.simple: Remove #line just before %%epilogue. It
10985 is now handled in ...
10986 * src/reader.c (read_additionnal_code): Add the output of a
10987 #line for the epilogue.
10988
10989 2001-12-10 Marc Autret <autret_m@epita.fr>
10990
10991 * src/reader.c (copy_definition): Re-use CPP-outed code which
10992 replace precedent remove.
10993 * src/bison.simple: Remove #line before %%prologue because
10994 %%input-line is wrong at this time.
10995
10996 2001-12-10 Marc Autret <autret_m@epita.fr>
10997
10998 * src/reader.c (symbols_output): Clean up.
10999 * src/output.c (output_gram, output): Clean up.
11000
11001 2001-12-10 Akim Demaille <akim@epita.fr>
11002
11003 * src/lalr.c (initialize_lookaheads): New. Extracted from...
11004 * src/LR0.c (set_state_table): here.
11005 * src/lalr.c (lalr): Call it.
11006
11007 2001-12-10 Akim Demaille <akim@epita.fr>
11008
11009 * src/state.h (shifts): Remove the `number' member: shifts are
11010 attached to state, hence no longer need to be labelled with a
11011 state number.
11012
11013 2001-12-10 Akim Demaille <akim@epita.fr>
11014
11015 Now that states have a complete set of members, the linked list of
11016 shifts is useless: just fill directly the state's shifts member.
11017
11018 * src/state.h (shifts): Remove the `next' member.
11019 * src/LR0.c (first_state, last_state): Remove.
11020 Adjust the callers.
11021 (augment_automaton): Don't look for the shifts that must be added
11022 a shift on EOF: it is those of the state we looked for! But now,
11023 since shifts are attached, it is no longer needed to looking
11024 merely by its id: its number.
11025
11026 2001-12-10 Akim Demaille <akim@epita.fr>
11027
11028 * src/LR0.c (augment_automaton): Better variable locality.
11029 Remove an impossible branch: if there is a state corresponding to
11030 the start symbol being shifted, then there is shift for the start
11031 symbol from the initial state.
11032
11033 2001-12-10 Akim Demaille <akim@epita.fr>
11034
11035 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
11036 only when appropriate: when insert_start_shifting_state' is not
11037 invoked.
11038 * tests/regression.at (Rule Line Numbers): Adjust.
11039
11040 2001-12-10 Akim Demaille <akim@epita.fr>
11041
11042 * src/LR0.c (augment_automaton): Now that all states have shifts,
11043 merge the two cases addition shifts to the initial state.
11044
11045 2001-12-10 Akim Demaille <akim@epita.fr>
11046
11047 * src/lalr.c (set_state_table): Move to...
11048 * src/LR0.c: here.
11049 * src/lalr.c (lalr): Don't call it...
11050 * src/LR0.c (generate_states): do it.
11051 * src/LR0.h (first_state): Remove, only the table is used.
11052
11053 2001-12-10 Akim Demaille <akim@epita.fr>
11054
11055 * src/LR0.h (first_shift, first_reduction): Remove.
11056 * src/lalr.c: Don't use first_shift: find shifts through the
11057 states.
11058
11059 2001-12-10 Akim Demaille <akim@epita.fr>
11060
11061 * src/LR0.c: Attach shifts to states as soon as they are
11062 computed.
11063 * src/lalr.c (set_state_table): Instead of assigning shifts to
11064 state, just assert that the mapping was properly done.
11065
11066 2001-12-10 Akim Demaille <akim@epita.fr>
11067
11068 * src/LR0.c (insert_start_shift): Rename as...
11069 (insert_start_shifting_state): this.
11070 (insert_eof_shifting_state, insert_accepting_state): New.
11071 (augment_automaton): Adjust.
11072 Better locality of the variables.
11073 When looking if the start_symbol is shifted from the initial
11074 state, using `while (... symbol != start_symbol ...)' sounds
11075 better than `while (... symbol < start_symbol ...)': If fail
11076 to see how the order between symbols could be relevant!
11077
11078 2001-12-10 Akim Demaille <akim@epita.fr>
11079
11080 * src/getargs.h: Don't declare `spec_name_prefix' and
11081 `spec_file_prefix', declared by src/files.h.
11082 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
11083 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
11084 * src/output.c (prepare): Adjust.
11085 * src/reader.c (symbols_output): Likewise.
11086 * src/vmsgetargs.c: Vaguely adjust, but who cares?
11087
11088 2001-12-10 Akim Demaille <akim@epita.fr>
11089
11090 * src/muscle_tab.c (muscle_init): NULL is a better default than
11091 `"0"'.
11092
11093 2001-12-10 Akim Demaille <akim@epita.fr>
11094
11095 * src/reader.c (reader): Calling symbols_output once is enough.
11096
11097 2001-12-10 Akim Demaille <akim@epita.fr>
11098
11099 Now that states have a complete set of members, the linked list of
11100 reductions is useless: just fill directly the state's reductions
11101 member.
11102
11103 * src/state.h (struct reductions): Remove member `number' and
11104 `next'.
11105 * src/LR0.c (first_reduction, last_reduction): Remove.
11106 (save_reductions): Don't link the new reductions, store them in
11107 this_state.
11108 * src/lalr.c (set_state_table): No need to attach reductions to
11109 states, it's already done.
11110 * src/output.c (output_actions): No longer free the shifts, then
11111 the reductions, then the states: free all the states and their
11112 members.
11113
11114 2001-12-10 Akim Demaille <akim@epita.fr>
11115
11116 * src/options.c (OPTN, DRTV, BOTH): New.
11117 (option_table): Use them.
11118
11119 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
11120 the job of system.h.
11121 * src/options.c: Don't include stdio.h and xalloc.h for the same
11122 reasons.
11123
11124 2001-12-10 Akim Demaille <akim@epita.fr>
11125
11126 * src/output.c (output, prepare): Make sure the values of the
11127 muscles `action' and `prologue' are 0-terminated.
11128
11129 2001-12-10 Akim Demaille <akim@epita.fr>
11130
11131 Clean up GCC warnings.
11132
11133 * src/reader.c (copy_action): `buf' is not used.
11134 (parse_skel_decl): Be static.
11135 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
11136 * src/options.h (create_long_option_table): Have a real prototype.
11137 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
11138 (hash_delete_at): Return const void *.
11139 Adjust casts to preserve the const.
11140
11141 2001-12-10 Akim Demaille <akim@epita.fr>
11142
11143 * configure.in: Require 2.52g.
11144 M4 is not needed, but AUTOM4TE is.
11145 * m4/m4.m4: Remove.
11146 * tests/Makefile.am: Adjust.
11147
11148 2001-12-10 Akim Demaille <akim@epita.fr>
11149
11150 One structure for states is enough, even though theoretically
11151 there are LR(0) states and LALR(1) states.
11152
11153 * src/lalr.h (state_t): Remove.
11154 (state_table): Be state_t **, not state_t *.
11155 * src/state.h (core, CORE_ALLOC): Rename as...
11156 (state_t, STATE_ALLOC): this.
11157 Add the LALR(1) members: shifts, reductions, errs.
11158 * src/LR0.c (state_table): Rename as...
11159 (state_hash): this, to avoid name clashes with the global
11160 `state_table'.
11161 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
11162 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
11163
11164 2001-12-10 Akim Demaille <akim@epita.fr>
11165
11166 Bison dumps core on bash.y.
11167 Reported by Pascal Bart.
11168
11169 * src/warshall.c (bitmatrix_print): New.
11170 (TC): Use it.
11171 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
11172 j must be the outer loop.
11173 * tests/regression.at (Broken Closure): New.
11174
11175 2001-12-05 Akim Demaille <akim@epita.fr>
11176
11177 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
11178 its argument.
11179 Reported by Peter Hamorsky.
11180
11181 2001-12-05 Akim Demaille <akim@epita.fr>
11182
11183 * src/conflicts.c (err_table): Remove.
11184 (resolve_sr_conflict): Adjust.
11185 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
11186 Rename as...
11187 (state_t.reductions, state_t.shifts): this.
11188
11189 2001-12-05 Akim Demaille <akim@epita.fr>
11190
11191 * src/reduce.c (reduce_grammar_tables): No longer disable the
11192 removal of useless rules via CPP but via `if (0)', so that the
11193 compiler still check the code is valid.
11194 For instance, it should have noticed `rline' no longer exists: use
11195 the `line' member of rule_t.
11196 * src/gram.c (dummy, rline): Remove, unused.
11197
11198 2001-12-05 Akim Demaille <akim@epita.fr>
11199
11200 * src/output.c (pack_vector): Use assert, not berror.
11201 * src/main.c (berror): Remove, unused.
11202
11203 2001-12-05 Akim Demaille <akim@epita.fr>
11204
11205 New experimental feature: if --verbose --trace output all the
11206 items of a state, not only its kernel.
11207
11208 * src/print.c (print_core): If `trace_flag', then invoke closure
11209 before outputting the items of the state (print_core is no longer
11210 a correct name them).
11211 (print_results): Invoke new_closure/free_closure if needed.
11212
11213 2001-12-05 Akim Demaille <akim@epita.fr>
11214
11215 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
11216 * src/closure.c, src/closure.h (itemsetsize): Rename as...
11217 (nitemset): for consistency with the rest of the project.
11218
11219 2001-12-05 Akim Demaille <akim@epita.fr>
11220
11221 * src/closure.c (print_closure): Improve.
11222 (closure): Use it for printing input and output.
11223
11224 2001-12-05 Akim Demaille <akim@epita.fr>
11225
11226 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
11227 indexed by nonterminals.
11228
11229 2001-12-05 Akim Demaille <akim@epita.fr>
11230
11231 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
11232 what it was!).
11233 * src/warshall.h: Remove accidental duplication of the content.
11234
11235 2001-12-05 Akim Demaille <akim@epita.fr>
11236
11237 * src/closure.c (set_fderives): De-obfuscate.
11238
11239 2001-12-05 Akim Demaille <akim@epita.fr>
11240
11241 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
11242
11243 2001-12-05 Akim Demaille <akim@epita.fr>
11244
11245 * src/closure.c (set_firsts): De-obfuscate.
11246
11247 2001-12-05 Akim Demaille <akim@epita.fr>
11248
11249 * src/output.c (action_row): De-obfuscate
11250 using the good o' techniques: arrays not pointers, variable
11251 locality, BITISSET, RESETBIT etc.
11252
11253 2001-12-05 Akim Demaille <akim@epita.fr>
11254
11255 Pessimize the code to simplify it: from now on, all the states
11256 have a valid SHIFTS, which NSHIFTS is possibly 0.
11257
11258 * src/LR0.c (shifts_new): Be global and move to..
11259 * src/state.c, src/state.h: here.
11260 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
11261 * src/print_graph: Adjust.
11262
11263 2001-12-05 Akim Demaille <akim@epita.fr>
11264
11265 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
11266 * src/conflicts.c: Use it.
11267 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
11268 incorrectly ``simplified''.
11269
11270 2001-12-05 Akim Demaille <akim@epita.fr>
11271
11272 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
11273 using the good o' techniques: arrays not pointers, variable
11274 locality, BITISSET, RESETBIT etc.
11275
11276 2001-12-05 Akim Demaille <akim@epita.fr>
11277
11278 * src/state.h (SHIFT_SYMBOL): New.
11279 * src/conflicts.c: Use it to deobfuscate.
11280
11281 2001-12-05 Akim Demaille <akim@epita.fr>
11282
11283 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
11284 (print_reductions): De-obfuscate using the good o' techniques:
11285 arrays not pointers, variable locality, BITISSET.
11286
11287 2001-12-05 Akim Demaille <akim@epita.fr>
11288
11289 * src/conflicts.c (print_reductions): Arrays, not pointers.
11290 Use BITISSET.
11291
11292 2001-12-05 Akim Demaille <akim@epita.fr>
11293
11294 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11295
11296 2001-12-05 Akim Demaille <akim@epita.fr>
11297
11298 * src/conflicts.c (print_reductions): Improve variable locality.
11299
11300 2001-12-05 Akim Demaille <akim@epita.fr>
11301
11302 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11303
11304 2001-12-05 Akim Demaille <akim@epita.fr>
11305
11306 * src/conflicts.c (print_reductions): Improve variable locality.
11307
11308 2001-12-05 Akim Demaille <akim@epita.fr>
11309
11310 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
11311 * src/lalr.c: Use them.
11312
11313 2001-12-05 Akim Demaille <akim@epita.fr>
11314
11315 * src/LR0.c (augment_automaton): Formatting changes.
11316 Better variable locality.
11317
11318 2001-12-05 Akim Demaille <akim@epita.fr>
11319
11320 * src/lalr.c (matrix_print): New.
11321 (transpose): Use it.
11322 Use arrays instead of pointers.
11323
11324 2001-12-05 Akim Demaille <akim@epita.fr>
11325
11326 * src/lalr.c (maxrhs): Move to...
11327 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
11328 * src/lalr.c (build_relations): Adjust.
11329
11330 2001-12-05 Akim Demaille <akim@epita.fr>
11331
11332 * src/lalr.c (transpose): Free the memory allocated to the
11333 argument, as it is replaced by the results by the unique caller.
11334 (build_relations): Merely invoke transpose: it handles the memory
11335 deallocation.
11336 Improve variable locality.
11337 Avoid variables used as mere abbreviations.
11338 (compute_lookaheads): Use arrays instead of pointers.
11339
11340 2001-12-05 Akim Demaille <akim@epita.fr>
11341
11342 * src/lalr.c (initialize_F): Improve variable locality.
11343 Avoid variables used as mere abbreviations.
11344
11345 2001-12-05 Akim Demaille <akim@epita.fr>
11346
11347 * src/derives.c (print_derives): Display the ruleno.
11348 * src/lalr.c (initialize_F, transpose): Better variable locality
11349 to improve readability.
11350 Avoid variables used as mere abbreviations.
11351
11352 2001-12-05 Akim Demaille <akim@epita.fr>
11353
11354 * src/lalr.c (traverse): Use arrays instead of pointers.
11355
11356 2001-12-05 Akim Demaille <akim@epita.fr>
11357
11358 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
11359 the handling of squeue.
11360 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11361
11362 2001-12-05 Akim Demaille <akim@epita.fr>
11363
11364 Because useless nonterminals are now kept alive (instead of being
11365 `destroyed'), we now sometimes examine them, and store information
11366 related to them. Hence we need to know their number, and adjust
11367 memory allocations.
11368
11369 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
11370 static.
11371 * src/LR0.c (allocate_itemsets): The memory allocated to
11372 `symbol_count' was used for two different purpose: once to count
11373 the number of occurrences of each symbol, and later reassigned to
11374 `shift_symbol', containing the symbol that can be shifted from a
11375 given state.
11376 Deobfuscate, i.e., allocate, use and free `symbol_count' here
11377 only, and...
11378 (new_itemsets): Allocate `shift_symbol' here.
11379 (allocate_itemsets): symbol_count includes useless nonterminals.
11380 Make room for them.
11381 (free_storage): Use `free', not `XFREE', for pointers that cannot
11382 be null.
11383
11384 2001-12-05 Akim Demaille <akim@epita.fr>
11385
11386 * src/nullable.c (set_nullable): Deobfuscate the handling of
11387 ritem.
11388 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11389
11390 2001-12-05 Akim Demaille <akim@epita.fr>
11391
11392 * src/gram.c, src/gram.h (ritem_print): New.
11393 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
11394 (This useless function was defined only to work around VMS linkers
11395 that can't handle compilation units with variables only).
11396 * src/reduce.c (dump_grammar): Use it to trace the construction of
11397 ritem.
11398
11399 2001-12-04 Paul Eggert <eggert@twinsun.com>
11400
11401 * src/bison.simple (union yyalloc): Change member names
11402 to be the same as the stack names.
11403 (yyparse): yyptr is now union yyalloc *, not char *.
11404 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
11405 and may generate better code on some machines.
11406 (yystpcpy): Use prototype if __STDC__ is defined, not just
11407 if __cplusplus is defined.
11408
11409 2001-11-30 Akim Demaille <akim@epita.fr>
11410
11411 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
11412 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
11413 Gettext doesn't compile cleanly, and dies with -Werror.
11414 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
11415 Include WARNING_CFLAGS here.
11416 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
11417 before being defined.
11418
11419 2001-11-27 Paul Eggert <eggert@twinsun.com>
11420
11421 * lib/quotearg.h (quotearg_n, quotearg_n_style):
11422 First arg is int, not unsigned.
11423 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
11424 (SIZE_MAX, UINT_MAX): New macros.
11425 (quotearg_n_options): Abort if N is negative.
11426 Avoid overflow check on hosts where size_t is 64 bits and int
11427 is 32 bits, as overflow is impossible there.
11428 Fix off-by-one typo that caused unnecessary reallocation.
11429
11430 2001-11-29 Paul Eggert <eggert@twinsun.com>
11431
11432 Name space cleanup in generated parser.
11433
11434 * doc/bison.texinfo (Bison Parser): Discuss system headers
11435 and their effect on the user name space.
11436
11437 * src/bison.simple:
11438 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
11439 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
11440 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
11441
11442 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
11443 on user names when possible.
11444
11445 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
11446 Simplify test for whather <alloca.h> exists.
11447
11448 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
11449
11450 (<stdio.h>): Include if YYDEBUG.
11451
11452 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
11453 ! defined (yyoverflow) && ! defined (yymemcpy).
11454
11455 (yymemcpy, yyparse): Rename local variables as needed so that
11456 they all begin with 'yy'.
11457
11458 (yystrlen, yystpcpy): New functions.
11459
11460 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
11461 All uses changed.
11462
11463 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
11464 instead of relying on string.h functions. Use YYSTACK_ALLOC
11465 and YYSTACK_FREE instead of malloc and free.
11466
11467 2001-11-30 Akim Demaille <akim@epita.fr>
11468
11469 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
11470 before their first uses.
11471 (YYBISON, YYPURE): Move to the top of the output.
11472
11473 2001-11-30 Akim Demaille <akim@epita.fr>
11474
11475 * tests/reduce.at (Useless Nonterminals): Fix.
11476
11477 2001-11-30 Akim Demaille <akim@epita.fr>
11478
11479 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
11480 if body instead of `;' to pacify GCC's warnings.
11481
11482 2001-11-30 Akim Demaille <akim@epita.fr>
11483
11484 Instead of mapping the LHS of unused rules to -1, keep the LHS
11485 valid, but flag the rules as invalid.
11486
11487 * src/gram.h (rule_t): `useful' is a new member.
11488 * src/print.c (print_grammar): Adjust.
11489 * src/derives.c (set_derives): Likewise.
11490 * src/reader.c (packgram, reduce_output): Likewise.
11491 * src/reduce.c (reduce_grammar_tables): Likewise.
11492 * tests/reduce.at (Underivable Rules, Useless Rules): New.
11493
11494 2001-11-30 Akim Demaille <akim@epita.fr>
11495
11496 * src/reduce.c (reduce_output): Formatting changes.
11497 * src/print.c (print_results, print_grammar): Likewise.
11498 * tests/regression.at (Rule Line Numbers)
11499 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
11500
11501 2001-11-30 Akim Demaille <akim@epita.fr>
11502
11503 * src/reduce.c (nonterminals_reduce): Instead of throwing away
11504 useless nonterminals, move them at the end of the symbol arrays.
11505 (reduce_output): Adjust.
11506 * tests/reduce.at (Useless Nonterminals): Adjust.
11507
11508 2001-11-30 Akim Demaille <akim@epita.fr>
11509
11510 * src/reduce.c: Various comment/formatting changes.
11511 (nonterminals_reduce): New, extracted from...
11512 (reduce_grammar_tables): here.
11513 (reduce_grammar): Call nonterminals_reduce.
11514
11515 2001-11-29 Paul Eggert <eggert@twinsun.com>
11516
11517 * src/bison.simple (YYSTACK_REALLOC): Remove.
11518 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
11519 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
11520 New macros.
11521 (union yyalloc): New type.
11522 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
11523 an arbitrary restriction on hosts where size_t is wider than int.
11524
11525 (yyparse): Don't dump core if alloca or malloc fails; instead, report
11526 a parser stack overflow. Allocate just one block of memory for all
11527 three stacks, instead of allocating three blocks; this typically is
11528 faster and reduces fragmentation.
11529
11530 Do not limit the number of items in the stack to a value that fits
11531 in 'int', as this is an arbitrary limit on hosts with 64-bit
11532 size_t and 32-bit int.
11533
11534 2001-11-29 Marc Autret <autret_m@epita.fr>
11535
11536 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
11537 of defining YYERROR_VERBOSE.
11538 [AT_DATA]: $4 is now out of C declarations in the prologue.
11539
11540 2001-11-28 Marc Autret <autret_m@epita.fr>
11541
11542 * src/reader.c (parse_dquoted_param): New.
11543 (parse_skel_decl): Use it.
11544 * src/lex.h: Add its prototype.
11545 * src/lex.c (literalchar): Become not static.
11546
11547 2001-11-28 Marc Autret <autret_m@epita.fr>
11548
11549 * src/output.h: And put its extern declaration here.
11550 * src/output.c (error_verbose): Define here.
11551 (prepare): Echo name modification.
11552 * src/getargs.h: Clean its extern declaration.
11553 * src/getargs.c (error_verbose_flag): Remove.
11554 (getargs): Remove case 'e'.
11555 * src/options.c (option_table): 'error-verbose' is now seen as simple
11556 percent option.
11557 Include output.h.
11558
11559 * src/reader.c (read_declarations): Remove case tok_include.
11560 (parse_include_decl): Remove.
11561 * src/lex.h (token_t): Remove tok_include.
11562 * src/options.c (option_table): 'include' is now a simple command line
11563 option.
11564
11565 2001-11-28 Marc Autret <autret_m@epita.fr>
11566
11567 * src/bison.simple: Adjust muscle names.
11568 * src/muscle_tab.c (muscle_init): Also rename the muscles.
11569 * src/output.c (prepare): s/_/-/ for the muscles names.
11570 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
11571
11572 2001-11-28 Marc Autret <autret_m@epita.fr>
11573
11574 * src/bison.simple: Fix debug.
11575 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
11576
11577 2001-11-28 Akim Demaille <akim@epita.fr>
11578
11579 * src/LR0.c (shifts_new): New.
11580 (save_shifts, insert_start_shift, augment_automaton): Use it.
11581
11582 2001-11-28 Akim Demaille <akim@epita.fr>
11583
11584 * src/closure.c (closure): `b' and `ruleno' denote the same value:
11585 keep ruleno only.
11586
11587 2001-11-28 Akim Demaille <akim@epita.fr>
11588
11589 * src/closure.c (closure): Instead of looping over word in array
11590 then bits in words, loop over bits in array.
11591
11592 2001-11-28 Akim Demaille <akim@epita.fr>
11593
11594 * src/closure.c (closure): No longer optimize the special case
11595 where all the bits of `ruleset[r]' are set to 0, to make the code
11596 clearer.
11597
11598 2001-11-28 Akim Demaille <akim@epita.fr>
11599
11600 * src/closure.c (closure): `r' and `c' are new variables, used to
11601 de-obfuscate accesses to RULESET and CORE.
11602
11603 2001-11-28 Akim Demaille <akim@epita.fr>
11604
11605 * src/reduce.c (reduce_print): Use ngettext.
11606 (dump_grammar): Improve the trace accuracy.
11607
11608 2001-11-28 Akim Demaille <akim@epita.fr>
11609
11610 * src/reduce.c (dump_grammar): Don't translate trace messages.
11611
11612 2001-11-28 Akim Demaille <akim@epita.fr>
11613
11614 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
11615 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
11616 as all tags are free'ed afterwards.
11617 From Enrico Scholz.
11618
11619 2001-11-27 Paul Eggert <eggert@twinsun.com>
11620
11621 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
11622 use alloca when we didn't want to, and vice versa.
11623
11624 2001-11-27 Marc Autret <autret_m@epita.fr>
11625
11626 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
11627 initialization.
11628 * src/output.c (prepare): Remove its update.
11629
11630 2001-11-27 Marc Autret <autret_m@epita.fr>
11631
11632 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
11633 Use %error-verbose.
11634
11635 2001-11-27 Marc Autret <autret_m@epita.fr>
11636
11637 * src/bison.simple: Remove YYERROR_VERBOSE using.
11638 Use %%error_verbose.
11639 (yyparse): Likewise.
11640 * src/output.c (prepare): Give its final value.
11641 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
11642 * src/getargs.h: Add its extern declaration.
11643 * src/getargs.c (error_verbose_flag): New int.
11644 (getargs): Update to catch new case.
11645 * src/options.c (option_table): 'error-verbose' is a new option.
11646 (shortopts): Update.
11647
11648 2001-11-27 Akim Demaille <akim@epita.fr>
11649
11650 * src/system.h: Use intl/libgettext.h.
11651 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
11652
11653 2001-11-27 Akim Demaille <akim@epita.fr>
11654
11655 * tests/torture.at (Exploding the Stack Size with Malloc):
11656 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
11657
11658 2001-11-27 Akim Demaille <akim@epita.fr>
11659
11660 * src/files.c: Include error.h.
11661 Reported by Hans Aberg.
11662
11663 2001-11-26 Marc Autret <autret_m@epita.fr>
11664
11665 * src/reader.c (parse_include_decl): New, not yet implemented.
11666 (read_declarations): Add case tok_include.
11667 * src/getargs.h (include): Add its extern definition.
11668 * src/getargs.c (include): New const char *.
11669 (getargs): Add case '-I'.
11670 * src/options.c (option_table): Add include as command line and
11671 percent option.
11672 * src/lex.h (token_t): Add tok_include.
11673
11674 2001-11-26 Akim Demaille <akim@epita.fr>
11675
11676 * src/reader.c (readgram): Make sure rules for mid-rule actions
11677 have a lineno equal to that of their host rule.
11678 Reported by Hans Aberg.
11679 * tests/regression.at (Rule Line Numbers): New.
11680
11681 2001-11-26 Akim Demaille <akim@epita.fr>
11682
11683 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
11684 size_ts.
11685
11686 2001-11-26 Akim Demaille <akim@epita.fr>
11687
11688 * src/complain.c, src/complain.h (error): Remove, provided by
11689 lib/error.[ch].
11690
11691 2001-11-26 Akim Demaille <akim@epita.fr>
11692
11693 * src/reader.c (read_declarations): Don't abort on tok_illegal,
11694 issue an error message.
11695 * tests/regression.at (Invalid %directive): New.
11696 Reported by Hans Aberg.
11697
11698 2001-11-26 Akim Demaille <akim@epita.fr>
11699
11700 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
11701 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11702
11703 2001-11-26 Akim Demaille <akim@epita.fr>
11704
11705 * src/conflicts.c (conflicts_print): Don't complain at all when
11706 there are no reduce/reduce conflicts, and as many shift/reduce
11707 conflicts as expected.
11708 * tests/regression.at (%expect right): Adjust.
11709
11710 2001-11-23 Akim Demaille <akim@epita.fr>
11711
11712 * lib/alloca.c: Update, from fileutils.
11713
11714 2001-11-23 Akim Demaille <akim@epita.fr>
11715
11716 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
11717
11718 2001-11-23 Akim Demaille <akim@epita.fr>
11719
11720 * src/system.h: Include alloca.h.
11721 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
11722
11723 2001-11-23 Akim Demaille <akim@epita.fr>
11724
11725 * src/print_graph.c (print_actions): Remove `rule', unused.
11726 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
11727 pacify GCC's signed < unsigned warnings.
11728 * src/closure.c (itemsetsize): Likewise.
11729 * src/reader.c (symbol_list_new): Static.
11730
11731 2001-11-23 Akim Demaille <akim@epita.fr>
11732
11733 Attaching lineno to buckets is stupid, since only one copy of each
11734 symbol is kept, only the line of the first occurrence is kept too.
11735
11736 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
11737 * src/reader.c (rline_allocated): Remove, unused.
11738 (symbol_list): Have a `line' member.
11739 (symbol_list_new): New.
11740 (readgram): Use it.
11741 * src/print.c (print_grammar): Output the rule line numbers.
11742 * tests/regression.at (Solved SR Conflicts)
11743 (Unresolved SR Conflicts): Adjust.
11744 Reported by Hans Aberg.
11745
11746 2001-11-22 Marc Autret <autret_m@epita.fr>
11747
11748 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
11749
11750 2001-11-22 Marc Autret <autret_m@epita.fr>
11751
11752 * src/muscle_tab.c (muscle_init): Remove initialization of
11753 skeleton muscle.
11754 * src/output.c (output_master_parser): Do it here.
11755
11756 2001-11-20 Akim Demaille <akim@epita.fr>
11757
11758 * po/sv.po: New.
11759 * configure.in (ALL_LINGUAS): Adjust.
11760 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
11761 longer contains strings to translate.
11762
11763 2001-11-19 Akim Demaille <akim@epita.fr>
11764
11765 * src/conflicts.c (conflicts_print): Add a missing \n.
11766
11767 2001-11-19 Akim Demaille <akim@epita.fr>
11768
11769 * src/nullable.c (nullable_print): New.
11770 (set_nullable): Call it when tracing.
11771 Better locality of variables.
11772
11773 2001-11-19 Akim Demaille <akim@epita.fr>
11774
11775 * src/print.c (print_actions): Better locality of variables.
11776
11777 2001-11-19 Akim Demaille <akim@epita.fr>
11778
11779 * src/derives.c (print_derives): Fix and enrich.
11780 * src/closure.c (print_fderives): Likewise.
11781
11782 2001-11-19 Akim Demaille <akim@epita.fr>
11783
11784 * src/closure.c (itemsetend): Remove, replaced with...
11785 (itemsetsize): new.
11786
11787 2001-11-19 Akim Demaille <akim@epita.fr>
11788
11789 * src/LR0.c (kernel_end): Remove, replaced with...
11790 (kernel_size): new.
11791
11792 2001-11-19 Akim Demaille <akim@epita.fr>
11793
11794 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
11795 to clarify.
11796
11797 2001-11-19 Akim Demaille <akim@epita.fr>
11798
11799 * src/closure.c (closure): Use arrays instead of pointers to clarify.
11800
11801 2001-11-19 Akim Demaille <akim@epita.fr>
11802
11803 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
11804 trace messages.
11805 * src/LR0.c: Likewise.
11806 (allocate_itemsets): Use arrays instead of pointers to clarify.
11807
11808 2001-11-19 Akim Demaille <akim@epita.fr>
11809
11810 * src/getargs.c (statistics_flag): Replace with...
11811 (trace_flag): New.
11812 (longopts): Accept --trace instead of --statistics.
11813 * src/getargs.h, src/options.c: Adjust.
11814 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
11815 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
11816
11817 2001-11-19 Akim Demaille <akim@epita.fr>
11818
11819 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
11820 pointers to clarify the code.
11821 (save_reductions, save_shifts): Factor common parts of alternatives.
11822
11823 2001-11-19 Akim Demaille <akim@epita.fr>
11824
11825 * src/LR0.c (new_state, get_state): Complete TRACE code.
11826 * src/closure.c: Include `reader.h' to get `tags', needed by the
11827 trace code.
11828 Rename the conditional DEBUG as TRACE.
11829 Output consistently TRACEs to stderr, not stdout.
11830 * src/derives.c: Likewise.
11831 * src/reduce.c: (inaccessable_symbols): Using if is better style
11832 than goto.
11833 Use `#if TRACE' instead of `#if 0' for tracing code.
11834
11835 2001-11-19 Akim Demaille <akim@epita.fr>
11836
11837 * src/system.h (LIST_FREE, shortcpy): New.
11838 * src/LR0.c: Use them.
11839 * src/output.c (free_itemsets, free_reductions, free_shifts):
11840 Remove, replaced by LIST_FREE.
11841
11842 2001-11-19 Akim Demaille <akim@epita.fr>
11843
11844 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
11845 (REDUCTIONS_ALLOC): New.
11846 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
11847 allocation.
11848
11849 2001-11-19 Akim Demaille <akim@epita.fr>
11850
11851 * src/LR0.c (new_state): Complete trace code.
11852 * src/nullable.c (set_nullable): Don't translate traces.
11853
11854 2001-11-19 Akim Demaille <akim@epita.fr>
11855
11856 * src/print_graph.c (print_core): Better locality of variables.
11857 * src/print.c (print_core): Likewise.
11858
11859 2001-11-19 Akim Demaille <akim@epita.fr>
11860
11861 * src/vcg.c: You do the output, so you are responsible of the
11862 handling of VCG syntax, in particular: use quotearg.
11863 * src/print_graph.c: Don't.
11864 (print_actions): Don't output the actions as part of the nodes,
11865 since that's the job of the edges.
11866 (print_state): Don't output by hand: fill the node description,
11867 and ask for its output.
11868
11869 2001-11-19 Akim Demaille <akim@epita.fr>
11870
11871 * src/bison.simple (yyparse): When verbosely reporting an error,
11872 no longer put additional quotes around token names.
11873 * tests/calc.at: Adjust.
11874
11875 2001-11-19 Akim Demaille <akim@epita.fr>
11876
11877 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
11878 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
11879 * src/output.c: Adjust.
11880
11881 2001-11-19 Akim Demaille <akim@epita.fr>
11882
11883 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
11884 (rule_t): this.
11885 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
11886
11887 2001-11-19 Akim Demaille <akim@epita.fr>
11888
11889 * src/gram.h (rule_t): New.
11890 (rule_table): New.
11891 (rrhs, rlhs): Remove, part of state_t.
11892 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
11893 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11894 * src/reader.c, src/reduce.c: Adjust.
11895
11896 2001-11-19 Akim Demaille <akim@epita.fr>
11897
11898 * src/reader.c (symbols_output): New, extracted from...
11899 (packsymbols): Here.
11900 (reader): Call it.
11901
11902 2001-11-19 Akim Demaille <akim@epita.fr>
11903
11904 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
11905 (maxrhs): this new function.
11906
11907 2001-11-19 Akim Demaille <akim@epita.fr>
11908
11909 * src/lalr.c (F): New macro to access the variable F.
11910 Adjust.
11911
11912 2001-11-19 Akim Demaille <akim@epita.fr>
11913
11914 * src/lalr.h (LA): New macro to access the variable LA.
11915 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11916 * src/lalr.c: Adjust.
11917
11918 2001-11-19 Akim Demaille <akim@epita.fr>
11919
11920 * src/lalr.c (initialize_LA): Only initialize LA. Let...
11921 (set_state_table): handle the `lookaheads' members.
11922
11923 2001-11-19 Akim Demaille <akim@epita.fr>
11924
11925 * src/lalr.h (lookaheads): Removed array, whose contents is now
11926 a member of...
11927 (state_t): this structure.
11928 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11929 Adjust.
11930
11931 2001-11-19 Akim Demaille <akim@epita.fr>
11932
11933 * src/lalr.h (consistent): Removed array, whose contents is now
11934 a member of...
11935 (state_t): this structure.
11936 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11937 Adjust.
11938
11939 2001-11-19 Akim Demaille <akim@epita.fr>
11940
11941 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
11942 contents are now members of...
11943 (state_t): this structure.
11944 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11945 Adjust.
11946
11947 2001-11-19 Akim Demaille <akim@epita.fr>
11948
11949 * src/lalr.h (state_t): New.
11950 (state_table): Be a state_t * instead of a core **.
11951 (accessing_symbol): Remove, part of state_t.
11952 * src/lalr.c: Adjust.
11953 (set_accessing_symbol): Merge into...
11954 (set_state_table): this.
11955 * src/print_graph.c, src/conflicts.c: Adjust.
11956
11957 2001-11-14 Akim Demaille <akim@epita.fr>
11958
11959 * tests/calc.at, tests/output.at, tests/regression.at,
11960 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
11961 now the tests are run in private dirs, therefore AC_CLEANUP and
11962 family can be simplified to 0-ary.
11963 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
11964 use abs. path to find config.h.
11965 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
11966 stderr, there can be way too much random noise.
11967 Instead pass -Werror to GCC and rely on the exit status.
11968 Reported by Wolfram Wagner.
11969
11970 2001-11-14 Akim Demaille <akim@epita.fr>
11971
11972 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
11973 defined only if yyoverflow is defined, to avoid `warning: unused
11974 variable `yyvs1''.
11975 Reported by The Test Suite.
11976
11977 2001-11-14 Akim Demaille <akim@epita.fr>
11978
11979 * src/print.c: Include reduce.h.
11980 Reported by Hans Aberg.
11981
11982 2001-11-14 Akim Demaille <akim@epita.fr>
11983
11984 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
11985 Revert a previous patch: these are really const.
11986 * src/conflicts.c (conflict_report): Additional useless pair of
11987 braces to pacify GCC's warnings for `if () if () {} else {}'.
11988 * src/lex.c (parse_percent_token): Replace equal_offset with
11989 arg_offset.
11990 arg is const.
11991 Be sure to strdup `arg' when used, since there is no reason for
11992 token_buffer not to change.
11993
11994 2001-11-14 Akim Demaille <akim@epita.fr>
11995
11996 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
11997 definition.
11998 * src/main.c (main): Use them.
11999 Suggested by Hans Aberg.
12000
12001 2001-11-12 Akim Demaille <akim@epita.fr>
12002
12003 * src/system.h (ngettext): Now that we use ngettext, be sure to
12004 provide a default definition when NLS are not used.
12005
12006 2001-11-12 Akim Demaille <akim@epita.fr>
12007
12008 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
12009 Use @kbd to denote user input.
12010 (Language and Grammar): ANSIfy the example.
12011 Adjust its layout for info/notinfo.
12012 (Location Tracking Calc): Output error messages to stderr.
12013 Output locations in a more GNUtically correct way.
12014 Fix a couple of Englishos.
12015 Adjust @group/@end group pairs.
12016
12017 2001-11-12 Akim Demaille <akim@epita.fr>
12018
12019 %expect was not functioning at all.
12020
12021 * src/conflicts.c (expected_conflicts): Set to -1.
12022 (conflict_report): Use ngettext.
12023 (conflicts_print): Check %expect and make its violation an error.
12024 * doc/bison.texinfo (Expect Decl): Adjust.
12025 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
12026 * tests/regression.at (%expect not enough, %expect right)
12027 (%expect too much): New.
12028
12029 2001-11-12 Akim Demaille <akim@epita.fr>
12030
12031 * tests/regression.at (Conflicts): Rename as...
12032 (Unresolved SR Conflicts): this.
12033 (Solved SR Conflicts): New.
12034
12035 2001-11-12 Akim Demaille <akim@epita.fr>
12036
12037 * src/reduce.c (print_results): Rename as...
12038 (reduce_output): This.
12039 Output to OUT, passed as argument, instead of output_obstack.
12040 (dump_grammar): Likewise.
12041 (reduce_free): New.
12042 Also free V1.
12043 (reduce_grammar): No longer call reduce_output, since...
12044 * src/print.c (print_results): do it.
12045 * src/main.c (main): Call reduce_free;
12046
12047 2001-11-12 Akim Demaille <akim@epita.fr>
12048
12049 * src/conflicts.c (print_reductions): Accept OUT as argument.
12050 Output to it, not to output_obstack.
12051 * src/print.c (print_actions): Adjust.
12052
12053 2001-11-12 Akim Demaille <akim@epita.fr>
12054
12055 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
12056 the result instead of using...
12057 (src_total, rrc_total, src_count, rrc_count): Remove.
12058 (any_conflicts): Remove.
12059 (print_conflicts): Split into...
12060 (conflicts_print, conflicts_output): New.
12061 * src/conflicts.h: Adjust.
12062 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
12063 * src/print.c (print_grammar): Issue `\n' between two rules.
12064 * tests/regression.at (Conflicts): New.
12065 Reported by Tom Lane.
12066
12067 2001-11-12 Akim Demaille <akim@epita.fr>
12068
12069 * tests/regression.at (Invalid input): Remove, duplicate with
12070 ``Invalid input: 1''.
12071
12072 2001-11-12 Akim Demaille <akim@epita.fr>
12073
12074 * tests/torture.at (AT_DATA_STACK_TORTURE)
12075 (Exploding the Stack Size with Alloca)
12076 (Exploding the Stack Size with Malloc): New.
12077
12078 2001-11-12 Akim Demaille <akim@epita.fr>
12079
12080 * src/bison.simple (YYSTACK_REALLOC): New.
12081 (yyparse) [!yyoverflow]: Use it and free the old stack.
12082 Reported by Per Allansson.
12083
12084 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
12085
12086 * src/bison.simple: Define type yystype instead of YYSTYPE, and
12087 define CPP macro, which substitute YYSTYPE by yystype.
12088 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
12089 with yyltype/YYLTYPE. This allows inclusion of the generated
12090 header within the parser if the compiler, such as GGC, accepts
12091 multiple equivalent #defines.
12092 From Akim.
12093
12094 2001-11-05 Akim Demaille <akim@epita.fr>
12095
12096 * src/reader.c (symbols_output): New, extracted from...
12097 (packsymbols): here.
12098 (reader): Adjust.
12099
12100 2001-11-05 Akim Demaille <akim@epita.fr>
12101
12102 * src/lex.c (parse_percent_token): s/quotearg/quote/.
12103
12104 2001-11-05 Akim Demaille <akim@epita.fr>
12105
12106 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
12107 pattern.
12108
12109 2001-11-05 Akim Demaille <akim@epita.fr>
12110
12111 * src/options.h (struct option_table_struct): set_flags is void*.
12112 * src/options.c (longopts): Support `--output' and `%output'.
12113 (usage): Adjust.
12114 * src/lex.h (tok_setopt): Remove, replaced with...
12115 (tok_intopt, tok_stropt): these new guys.
12116 * src/lex.c (getopt.h): Not needed.
12117 (token_buffer, unlexed_token_buffer): Not const.
12118 (percent_table): Promote `-' over `_' in directive names.
12119 Active `%name-prefix', `file-prefix', and `output'.
12120 (parse_percent_token): Accept possible arguments to directives.
12121 Promote `-' over `_' in directive names.
12122
12123 2001-11-04 Akim Demaille <akim@epita.fr>
12124
12125 * doc/bison.texinfo (Decl Summary): Split the list into
12126 `directives for grammars' and `directives for bison'.
12127 Sort'em.
12128 Add description of `%name-prefix', `file-prefix', and `output'.
12129 Promote `-' over `_' in directive names.
12130 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
12131 Simplify the description of `--name-prefix'.
12132 Promote `-' over `_' in directive names.
12133 Promote `--output' over `--output-file'.
12134 Fix the description of `--defines'.
12135 * tests/output.at: Exercise %file-prefix and %output.
12136
12137 2001-11-02 Akim Demaille <akim@epita.fr>
12138
12139 * doc/refcard.tex: Update.
12140
12141 2001-11-02 Akim Demaille <akim@epita.fr>
12142
12143 * src/symtab.h (SUNDEF): New.
12144 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
12145 stand for `uninitialized', instead of 0.
12146 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
12147 * src/lex.c (lex): Adjust.
12148
12149 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
12150 Number it 0.
12151 Let yylex return it instead of a plain 0.
12152 Reported by Dick Streefland.
12153
12154 2001-11-02 Akim Demaille <akim@epita.fr>
12155
12156 * tests/regression.at (Mixing %token styles): New test.
12157
12158 2001-11-02 Akim Demaille <akim@epita.fr>
12159
12160 * src/reader.c (parse_thong_decl): Formatting changes.
12161 (token_translations_init): New, extracted from...
12162 (packsymbols): Here.
12163 Adjust.
12164
12165 2001-11-01 Akim Demaille <akim@epita.fr>
12166
12167 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
12168 Check that `9foo.y' produces correct cpp guards.
12169 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
12170 guards.
12171 Reported by Wwp.
12172
12173 2001-11-01 Akim Demaille <akim@epita.fr>
12174
12175 * tests/regression.at (Invalid input: 2): New.
12176 * src/lex.c (unlexed_token_buffer): New.
12177 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
12178 too.
12179 Reported by Wwp.
12180
12181 2001-11-01 Akim Demaille <akim@epita.fr>
12182
12183 * tests/calc.at: Catch up with 1.30.
12184 * configure.in: Bump to 1.49a.
12185 Adjust to newer Autotest.
12186
12187 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
12188
12189 * src/conflicts.c: Move global variables rrc_total and src_total ...
12190 (print_conflicts): here.
12191 * src/output.c (output): Free global variable user_toknums.
12192 * src/lex.c (token_obstack): Become static.
12193
12194 2001-10-18 Akim Demaille <akim@epita.fr>
12195
12196 * tests/atlocal.in (GCC): Add.
12197 * tests/calc.at: s/m4_match/m4_bmatch/.
12198 s/m4_patsubst/m4_bpatsubst/.
12199 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
12200 * configure.in: AC_SUBST(GCC).
12201
12202 2001-10-14 Marc Autret <autret_m@epita.fr>
12203
12204 * src/options.c (create_long_option_table): Fix.
12205
12206 2001-10-10 Akim Demaille <akim@epita.fr>
12207
12208 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
12209
12210 2001-10-04 Akim Demaille <akim@epita.fr>
12211
12212 * src/reader.c (parse_union_decl): Push the caracters in
12213 union_obstack, not attrs_obstack.
12214
12215 2001-10-04 Akim Demaille <akim@epita.fr>
12216
12217 Merge in the branch 1.29.
12218
12219 * src/reader.c (packsymbols): Use a temporary obstack for
12220 `%%tokendef', since output_stack is already used elsewhere.
12221
12222 2001-10-02 Akim Demaille <akim@epita.fr>
12223
12224 Bump 1.29d.
12225
12226 2001-10-02 Akim Demaille <akim@epita.fr>
12227
12228 Version 1.29c.
12229
12230 2001-10-02 Akim Demaille <akim@epita.fr>
12231
12232 * tests/regression.at (Invalid CPP headers): New.
12233 From Alexander Belopolsky.
12234 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
12235
12236 2001-10-02 Akim Demaille <akim@epita.fr>
12237
12238 * tests/regression.at (Invalid input): New.
12239 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
12240 Reported by Shura.
12241
12242 2001-10-02 Akim Demaille <akim@epita.fr>
12243
12244 * tests/calc.at: Now that --debug works, the tests must be adjusted.
12245
12246 2001-10-02 Akim Demaille <akim@epita.fr>
12247
12248 * src/output.c (output_parser): Assert `skeleton'.
12249 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
12250 systems.
12251 From Shura.
12252
12253 2001-10-01 Marc Autret <autret_m@epita.fr>
12254
12255 * src/lex.h: Echo modifications.
12256 * src/lex.c (unlex): Parameter is now token_t.
12257 From Hans Aberg.
12258
12259 2001-10-01 Marc Autret <autret_m@epita.fr>
12260
12261 * src/main.c: Include lex.h.
12262 From Hans Aberg.
12263
12264 2001-09-29 Akim Demaille <akim@epita.fr>
12265
12266 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
12267
12268 2001-09-28 Akim Demaille <akim@epita.fr>
12269
12270 * tests/testsuite.at: Update to newer Autotest.
12271 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
12272
12273 2001-09-27 Akim Demaille <akim@epita.fr>
12274
12275 Position independent wrapper.
12276
12277 * tests/bison: Remove.
12278 * tests/bison.in: New.
12279 * configure.in: Adjust.
12280
12281 2001-09-27 Paul Eggert <eggert@twinsun.com>
12282
12283 Port quotearg fixes from tar 1.13.24.
12284
12285 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
12286 tm to be declared.
12287 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
12288 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
12289
12290 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
12291 * m4/mbrtowc.m4: New file.
12292 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
12293 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
12294
12295 2001-09-27 Akim Demaille <akim@epita.fr>
12296
12297 Bump to 1.29c.
12298
12299 2001-09-27 Akim Demaille <akim@epita.fr>
12300
12301 Version 1.29b.
12302
12303 2001-09-25 Akim Demaille <akim@epita.fr>
12304
12305 * src/system.h: Include `xalloc.h'.
12306 Remove it from the C files.
12307 * src/files.c (output_files): Free the obstacks.
12308 * src/lex.c (init_lex): Rename as...
12309 (lex_init): this.
12310 (lex_free): New.
12311 * src/main.c (main): Use it.
12312
12313 2001-09-24 Marc Autret <autret_m@epita.fr>
12314
12315 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
12316 to output informations in fout (FILE*).
12317 (open_graph, close_graph): Likewise.
12318 (output_graph, output_edge, output_node): Likewise.
12319 * src/vcg.h: Update function prototypes.
12320 * src/print_graph.c (print_graph): Open output graph file.
12321 (print_actions): Adjust.
12322 * src/files.h: Remove extern declaration.
12323 * src/files.c: Remove graph_obstack declaration.
12324 (open_files): Remove graph_obstack initialization.
12325 (output_files): Remove graph_obstack saving.
12326
12327 2001-09-24 Marc Autret <autret_m@epita.fr>
12328
12329 * src/files.c (compute_output_file_names): Fix.
12330
12331 2001-09-24 Marc Autret <autret_m@epita.fr>,
12332 Akim Demaille <akim@epita.fr>
12333
12334 * src/reader.c (reader): Remove call to free_symtab ().
12335 * src/main.c (main): Call it here.
12336 Include symtab.h.
12337 * src/conflicts.c (initialize_conflicts): Rename as...
12338 (solve_conflicts): this.
12339 * src/print.c (print_core, print_actions, print_state)
12340 (print_grammar): Dump to a file instead a `output_obstack'.
12341 (print_results): Dump `output_obstack', and then proceed with the
12342 FILE *.
12343 * src/files.c (compute_output_file_names, close_files): New.
12344 (output_files): Adjust.
12345 * src/main.c (main): Adjust.
12346
12347 2001-09-23 Marc Autret <autret_m@epita.fr>
12348
12349 * src/files.c (compute_header_macro): Computes header macro name
12350 from spec_defines_file when given.
12351
12352 2001-09-23 Marc Autret <autret_m@epita.fr>
12353
12354 * src/files.c (output_files): Add default extensions.
12355
12356 2001-09-22 Akim Demaille <akim@epita.fr>
12357
12358 * src/conflicts.c (finalize_conflicts): Rename as...
12359 (free_conflicts): this.
12360
12361 2001-09-22 Akim Demaille <akim@epita.fr>
12362
12363 * src/gram.c (gram_free): Rename back as...
12364 (dummy): this.
12365 (output_token_translations): Free `token_translations'.
12366 * src/symtab.c (free_symtab): Free the tag field.
12367
12368 2001-09-22 Akim Demaille <akim@epita.fr>
12369
12370 Remove `translations' as it is always set to true.
12371
12372 * src/gram.h: Adjust.
12373 * src/reader.c (packsymbols, parse_token_decl): Adjust
12374 * src/print.c (print_grammar): Adjust.
12375 * src/output.c (output_token_translations): Adjust.
12376 * src/lex.c (lex): Adjust.
12377 * src/gram.c: Be sure the set pointers to NULL.
12378 (dummy): Rename as...
12379 (gram_free): this.
12380
12381 2001-09-22 Akim Demaille <akim@epita.fr>
12382
12383 * configure.in: Invoke AM_LIB_DMALLOC.
12384 * src/system.h: Use dmalloc.
12385 * src/LR0.c: Be sure to have pointers initialized to NULL.
12386 (allocate_itemsets): Allocate kernel_items only if needed.
12387
12388 2001-09-22 Akim Demaille <akim@epita.fr>
12389
12390 * configure.in: Bump to 1.29b.
12391 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
12392 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
12393 need xmalloc.c in calc.y.
12394 From Pascal Bart.
12395
12396 2001-09-21 Akim Demaille <akim@epita.fr>
12397
12398 Version 1.29a.
12399 * Makefile.maint, config/config.guess, config/config.sub,
12400 * config/missing: Update from masters.
12401 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
12402 upon package.m4.
12403 * configure.in (ALL_LINGUAS): Add `tr'.
12404
12405 2001-09-21 Akim Demaille <akim@epita.fr>
12406
12407 * tests/Makefile.am (package.m4): Move to...
12408 ($(srcdir)/$(TESTSUITE)): here.
12409
12410 2001-09-20 Akim Demaille <akim@epita.fr>
12411
12412 * src/complain.c: No longer try to be standalone: use system.h.
12413 Don't assume __STDC__ is defined to 1. Just test if it is defined.
12414 * src/complain.h: Likewise.
12415 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
12416 Remove the unused variable `n'.
12417 From Albert Chin-A-Young.
12418
12419 2001-09-18 Marc Autret <autret_m@epita.fr>
12420
12421 * doc/bison.1: Update.
12422 * doc/bison.texinfo (Bison Options): Update --defines and --graph
12423 descriptions.
12424 (Option Cross Key): Update.
12425 Add --graph.
12426
12427 2001-09-18 Marc Autret <autret_m@epita.fr>
12428
12429 * tests/regression.at: New test (comment in %union).
12430
12431 2001-09-18 Marc Autret <autret_m@epita.fr>
12432
12433 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
12434 do that.
12435 Reported by Keith Browne.
12436
12437 2001-09-18 Marc Autret <autret_m@epita.fr>
12438
12439 * tests/output.at: Add tests for --defines and --graph.
12440
12441 2001-09-18 Marc Autret <autret_m@epita.fr>
12442
12443 * tests/output.at: Removes tests of %{header,src}_extension features.
12444
12445 2001-09-18 Akim Demaille <akim@epita.fr>
12446
12447 * tests/Makefile.am (package.m4): New.
12448 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
12449 (_AT_CHECK_CALC_ERROR): Likewise.
12450 Factor the `, ' part of verbose error messages.
12451
12452 2001-09-18 Marc Autret <autret_m@epita.fr>
12453
12454 * src/getargs.c (longopts): Declare --defines and --graph as options
12455 with optional arguments.
12456 * src/files.h: Add extern declarations.
12457 * src/files.c (spec_graph_file, spec_defines_file): New.
12458 (output_files): Update.
12459 Remove CPP-outed code.
12460
12461 2001-09-18 Marc Autret <autret_m@epita.fr>
12462
12463 Turn off %{source,header}_extension feature.
12464
12465 * src/files.c (compute_exts_from_gf): Update.
12466 (compute_exts_from_src): Update.
12467 (output_files): CPP-out useless code.
12468 * src/files.h: Remove {header,source}_extension extern declarations.
12469 * src/reader.c (parse_dquoted_param): CPP-out.
12470 (parse_header_extension_decl): Remove.
12471 (parse_source_extension_decl): Remove.
12472 (read_declarations): Remove cases tok_{hdrext,srcext}.
12473 * src/lex.c (percent_table): Remove {header,source}_extension entries.
12474 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
12475
12476 2001-09-10 Akim Demaille <akim@epita.fr>
12477
12478 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
12479 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
12480 (AT_CHECK_OUTPUT): this.
12481 Merely check ls' exit status, its output is useless.
12482
12483 2001-09-10 Akim Demaille <akim@epita.fr>
12484
12485 * tests/calc.at: Use m4_match.
12486 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
12487
12488 2001-09-10 Marc Autret <autret_m@epita.fr>,
12489 Akim Demaille <akim@epita.fr>
12490
12491 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
12492 enum color_e.
12493 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
12494 to `normal'.
12495 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
12496 * src/lex.h: Adjust prototype.
12497 (token_t): Add `tok_undef'.
12498 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
12499 (parse_percent_token): Now returns token_t.
12500 Add default statement in switch.
12501 (lex): Separate `c' as an input variable, from the token_t result
12502 part.
12503 (unlexed): Is a token_t.
12504
12505 2001-09-10 Akim Demaille <akim@epita.fr>
12506
12507 * configure.in: Bump to 1.29a.
12508
12509 2001-09-07 Akim Demaille <akim@epita.fr>
12510
12511 Version 1.29.
12512
12513 2001-08-30 Akim Demaille <akim@epita.fr>
12514
12515 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
12516 * m4/atconfig.m4: Remove.
12517 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
12518 * tests/bison: New.
12519 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
12520 m4_if, m4_patsubst, and m4_regexp.
12521 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
12522 `input' file instead of echo.
12523
12524 2001-08-29 Akim Demaille <akim@epita.fr>
12525
12526 Bump to 1.28e.
12527
12528 2001-08-29 Akim Demaille <akim@epita.fr>
12529
12530 Version 1.28d.
12531
12532 2001-08-29 Paul Eggert <eggert@twinsun.com>
12533
12534 * src/bison.simple (yyparse): Don't take the address of an
12535 item before the start of an array, as that doesn't conform to
12536 the C Standard.
12537
12538 2001-08-29 Robert Anisko <anisko_r@epita.fr>
12539
12540 * doc/bison.texinfo (Location Tracking Calc): New node.
12541
12542 2001-08-29 Paul Eggert <eggert@twinsun.com>
12543
12544 * src/output.c (output): Do not define const, as this now
12545 causes more problems than it cures.
12546
12547 2001-08-29 Akim Demaille <akim@epita.fr>
12548
12549 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
12550 the nodes.
12551 Be sure to tag the `detailmenu'.
12552
12553 2001-08-29 Akim Demaille <akim@epita.fr>
12554
12555 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
12556 download in a tmp dir.
12557
12558 2001-08-28 Marc Autret <autret_m@epita.fr>
12559
12560 * config/depcomp: New file.
12561
12562 2001-08-28 Marc Autret <autret_m@epita.fr>
12563
12564 * doc/bison.1 (mandoc): Adjust.
12565 From Juan Manuel Guerrero.
12566
12567 2001-08-28 Marc Autret <autret_m@epita.fr>
12568
12569 * src/print_graph.c (print_state): Fix.
12570
12571 2001-08-27 Marc Autret <autret_m@epita.fr>
12572
12573 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
12574 char * members.
12575 Echo modifications to the functions prototypes.
12576 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
12577
12578 2001-08-27 Marc Autret <autret_m@epita.fr>
12579
12580 * src/vcg.c: Include `xalloc.h'.
12581 (add_colorentry): New.
12582 (add_classname): New.
12583 (add_infoname): New.
12584 * src/vcg.h: Add new prototypes.
12585
12586 2001-08-27 Akim Demaille <akim@epita.fr>
12587
12588 * Makefile.maint: Sync. again with CVS Autoconf.
12589
12590 2001-08-27 Akim Demaille <akim@epita.fr>
12591
12592 * Makefile.maint: Formatting changes.
12593 (po-update, cvs-update, update): New targets.
12594 (AMTAR): Remove.
12595
12596 2001-08-27 Akim Demaille <akim@epita.fr>
12597
12598 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12599 * Makefile.maint: Sync. with CVS Autoconf.
12600
12601 2001-08-27 Marc Autret <autret_m@epita.fr>
12602
12603 * src/vcg.h (struct infoname_s): New.
12604 (struct colorentry_s): New.
12605 (graph_s): New fields {vertical,horizontal}_order in structure.
12606 Add `infoname' field.
12607 Add `colorentry' field;
12608 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
12609 (G_HORIZONTAL_ORDER): New.
12610 (G_INFONAME): New.
12611 (G_COLORENTRY): New.
12612 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
12613 Add output of `infoname'.
12614 Add output of `colorentry'.
12615
12616 2001-08-27 Marc Autret <autret_m@epita.fr>
12617
12618 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
12619 This one shadowed a global parameter.
12620
12621 2001-08-24 Marc Autret <autret_m@epita.fr>
12622
12623 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
12624 instead of `unsigned'.
12625 (print_state): Do not call obstack_object_size () in obstack_grow ()
12626 to avoid macro variables shadowing.
12627
12628 2001-08-23 Marc Autret <autret_m@epita.fr>
12629
12630 * src/lex.c (percent_table): Typo: s/naem/name/.
12631 Add graph option.
12632 Normalize new options declarations.
12633
12634 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
12635
12636 * tests/suite.at: Exercise %header_extension and %source_extension.
12637
12638 2001-08-16 Marc Autret <autret_m@epita.fr>
12639
12640 * src/reader.c (parse_dquoted_param): New.
12641 (parse_header_extension_decl): Use it.
12642 (parse_source_extension_decl): Likewise.
12643
12644 2001-08-16 Marc Autret <autret_m@epita.fr>
12645
12646 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
12647 (get_xxxx_str): Use assert () instead of complain ().
12648 Remove return invokations in default cases.
12649 (get_decision_str): Modify default behaviour. Remove second argument.
12650 Echo modifications on calls.
12651 (output_graph): Fix.
12652
12653 2001-08-16 Marc Autret <autret_m@epita.fr>
12654
12655 * src/getargs.c (usage): Update with ``-g, --graph''.
12656
12657 2001-08-16 Marc Autret <autret_m@epita.fr>
12658
12659 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
12660 (Option Cross Key): Likewise.
12661 * doc/bison.1: Update.
12662
12663 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
12664
12665 * src/output.c (output_master_parser): Don't finish action_obstack.
12666 (output_parser): Don't care about the muscle action, here.
12667 (prepare): Copy the action_obstack in the action muscle.
12668 (output): Free action_obstack.
12669
12670 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
12671
12672 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
12673 will contain `%union' declaration.
12674 (parse_union_decl): Delete #line directive output.
12675 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
12676 informations about %union.
12677 (parse_union_decl): Copy the union_obstack in the muscle stype.
12678 * src/bison.simple: Add new #line directive.
12679 Add typdef %%stype YYSTYPE.
12680
12681 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
12682
12683 * src/bison.simple: Add new `#line' directive.
12684
12685 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
12686
12687 * src/bison.simple: New `#line' directive.
12688 * src/output.c (output_parser): Support new dynamic muscle input_line.
12689
12690 2001-09-22 Marc Autret <autret_m@epita.fr>
12691
12692 * src/output.c (output_master_parser): New.
12693 (output_parser): Be more re-entrant.
12694
12695 2001-09-21 Marc Autret <autret_m@epita.fr>
12696
12697 * src/reader.c (copy_definition, parse_union_decl): Update and use
12698 `linef' muscle.
12699 (copy_action): Likewise.
12700 Use obstack_1grow ().
12701 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
12702
12703 2001-09-21 Marc Autret <autret_m@epita.fr>
12704
12705 * src/options.c (option_table): Adjust.
12706 * src/lex.c (parse_percent_token): Fix.
12707
12708 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
12709
12710 * src/options.c (symtab.h): Include it, need by lex.h.
12711
12712 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
12713
12714 * src/lex.c (parse_percent_token): Change type of variable `tx', which
12715 is now an option_table_struct*.
12716 (option_strcmp): New function option_strcmp.
12717 (parse_percent_token): Call option_strcmp.
12718 * src/getargs.c (xalloc.h, options.h): Include it.
12719 (getargs): Call create_long_option_table.
12720 (getargs): Free longopts at the end of the function.
12721 (shortopts): Move in options.c.
12722 * src/options.c (create_long_option_table): New function. Convert
12723 information from option_table to option structure.
12724 * src/reader.c (options.h): Include it.
12725
12726 * src/Makefile.am: Adjust.
12727 * src/options.c (option_table): Create from longopts and percent_table.
12728 * src/getargs.c (longopts): Delete.
12729 * src/lex.c (struct percent_table_struct): Delete.
12730 (percent_table): Delete.
12731 (options.h): Include it.
12732 * src/options.c: Create.
12733 * src/options.h: Create.
12734 Declare enum opt_access_e.
12735 Define struct option_table_struct.
12736
12737 2001-09-20 Marc Autret <autret_m@epita.fr>
12738
12739 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
12740 sections of Bison.
12741
12742 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
12743
12744 * src/bison.simple: s/%%filename/%%skeleton.
12745 * src/muscle_tab.c (getargs.h): Include it.
12746 (muscle_init): Insert new muscle skeleton.
12747
12748 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
12749
12750 * src/output.c (output_parser): Delete unused variable actions_dumped.
12751
12752 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
12753
12754 * src/output.c (output): Delete call to reader_output_yylsp.
12755 * src/reader.c (reader): Likewise.
12756 * src/reader.h: Delete declaration of reader_output_yylsp.
12757
12758 2001-09-02 Marc Autret <autret_m@epita.fr>
12759
12760 * src/reader.c: Include muscle_tab.h.
12761 (parse_union_decl): Update.
12762 (parse_macro_decl): Rename parse_muscle_decl.
12763 Update to use renamed functions and variable.
12764 (read_declarations, copy_action, read_additionnal_code, : Updated
12765 with correct variables and functions names.
12766 (packsymbols, reader): Likewise.
12767
12768 * src/reader.h (muscle_obstack): Extern declaration update.
12769
12770 * src/output.c: Include muscle_tab.h
12771 In all functions using macro_insert, change by using muscle_insert ().
12772 (macro_obstack): Rename muscle_obstack.
12773 Echo modifications in the whole file.
12774 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
12775 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
12776 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
12777
12778 * src/muscle_tab.h: Update double inclusion macros.
12779 (macro_entry_s): Rename muscle_entry_s.
12780 Update prototypes.
12781
12782 * src/muscle_tab.c: Include muscle_tab.h.
12783 Rename macro_tabble to muscle_table.
12784 (mhash1, mhash2, mcmp): Use muscle_entry.
12785 (macro_init): Rename muscle_init. Update.
12786 (macro_insert): Rename muscle_insert. Update.
12787 (macro_find): Rename muscle_find. Update.
12788
12789 * src/main.c: Include muscle_tab.h.
12790 (main): Call muscle_init ().
12791 * src/Makefile.am (bison_SOURCES): Echo modifications.
12792
12793 2001-09-02 Marc Autret <autret_m@epita.fr>
12794
12795 Now the files macro_tab.[ch] are named muscle_tab.[ch].
12796
12797 * src/muscle_tab.c, src/muscle_tab.h: Add files.
12798
12799 2001-09-02 Marc Autret <autret_m@epita.fr>
12800
12801 * src/macrotab.c, src/macrotab.h: Remove.
12802
12803 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
12804
12805 * src/reader.c (copy_guard): Use muscle to specify the `#line'
12806 filename.
12807
12808 2001-09-01 Marc Autret <autret_m@epita.fr>
12809
12810 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
12811 to an explicit value to activate the feature. We do it here.
12812
12813 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12814
12815 * src/output.c (prepare): Delete the `filename' muscule insertion.
12816 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
12817 (parse_union_decl): Likewise.
12818 * src/macrotab.c (macro_init): Initialize filename by infile.
12819
12820 2001-08-31 Marc Autret <autret_m@epita.fr>
12821
12822 * src/bison.simple (YYLSP_NEEDED): New definition.
12823 * src/output.c (prepare): Add macro insertion of `locations_flag'
12824
12825 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12826
12827 * src/output.c (prepare): Delete insertion of previous muscles,
12828 and insert the `prefix' muscles.
12829 * src/macrotab.c (macro_init): Likewise.
12830 (macro_init): Initialization prefix directive by `yy'.
12831 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
12832 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
12833 yylval, yydebug, yyerror, yynerrs and yyparse.
12834 New directive `#define' to substitute yydebug, ... with option
12835 name_prefix.
12836
12837 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12838
12839 * src/main.c (main): Standardize.
12840 * src/output.c (output_table_data, output_parser): Likewise.
12841 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
12842
12843 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
12844
12845 * src/reader.c (read_additionnal_code): Rename %%user_code to
12846 %%epilogue.
12847 * src/output.c (output): Rename %%declarations to %%prologue.
12848 * src/bison.simple: Echo modifications.
12849
12850 2001-08-31 Marc Autret <autret_m@epita.fr>
12851
12852 * src/reader.c (readgram): CleanUp.
12853 (output_token_defines): Likewise.
12854 (packsymbols): Likewise.
12855 (reader): Likewise.
12856 * src/output.c (output): CPP-out useless code.
12857
12858 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12859
12860 * src/reader.c (reader): Delete obsolete call to function
12861 output_trailers and output_headers.
12862 * src/output.h: Remove obsolete functions prototypes of output_headers
12863 and output_trailers.
12864
12865 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
12866
12867 * src/main.c: Include macrotab.h.
12868 * src/macrotab.h (macro_entry_s): Constify fields.
12869 Adjust functions prototypes.
12870 * src/macrotab.c (macro_insert): Constify key and value.
12871 (macro_find): Constify key.
12872 (macro_insert): Include 'xalloc.h'
12873 (macro_insert): Use XMALLOC.
12874 (macro_find): Constify return value.
12875 * src/output.c (output_table_data): Rename table to table_data.
12876 (output_parser): Constify macro_key, macro_value.
12877
12878 2001-08-30 Marc Autret <autret_m@epita.fr>
12879
12880 * src/reader.c (parse_skel_decl): New.
12881 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
12882 * src/lex.h (token_t): New token `tok_skel'.
12883 * src/lex.c (percent_table): Add skeleton option entry.
12884 Standardize.
12885
12886 2001-08-29 Marc Autret <autret_m@epita.fr>
12887
12888 * src/bison.simple: Add %%user_code directive at the end.
12889 * src/reader.c (read_additionnal_code): New.
12890 (reader): Use it.
12891 * src/output.c (output_program): Remove.
12892 (output): Update.
12893
12894 2001-08-28 Marc Autret <autret_m@epita.fr>
12895
12896 * src/output.c (output_actions): Clean up.
12897 (output_gram): CPP-out useless code.
12898 * src/reader.c (reader): Clean up, CPP-out useless code.
12899
12900 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
12901
12902 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
12903 directive.
12904 * src/bison.simple: Add `%%definitions'.
12905
12906 2001-08-28 Marc Autret <autret_m@epita.fr>
12907
12908 * config/depcomp: New file.
12909
12910 2001-08-27 Paul Eggert <eggert@twinsun.com>
12911
12912 * src/bison.simple (yyparse): Don't take the address of an
12913 item before the start of an array, as that doesn't conform to
12914 the C Standard.
12915
12916 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12917
12918 * src/output.c (output): Remove the initialization of the macro
12919 obstack. It was done too late here.
12920
12921 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
12922 completely wrong.
12923 (reader): Initialize the macro obstack here, since we need it to grow
12924 '%define' directives.
12925
12926 * src/reader.h: Declare the macro obstack as extern.
12927
12928 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12929
12930 * src/output.c (output_parser): Fix. Store single '%' characters in
12931 the output obstack instead of throwing them away.
12932
12933 2001-08-27 Akim Demaille <akim@epita.fr>
12934
12935 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12936
12937 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12938
12939 * lib/Makefile.am: Adjust.
12940
12941 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12942
12943 * src/bison.simple: Update and add '%%' directives.
12944
12945 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12946
12947 * src/reader.c (reader): Remove calls to 'output_headers' and
12948 'output_trailers'. Remove some C output.
12949 (readgram): Disable a piece of code that was writing a default
12950 definition for 'YYSTYPE'.
12951 (reader_output_yylsp): Remove.
12952 (packsymbols): Output token defintions to a macro.
12953 (copy_definition): Disable C output.
12954
12955 * src/reader.c (parse_macro_decl): New function used to parse macro
12956 declarations.
12957 (copy_string2): Put the body of copy_string into this new function.
12958 Add a parameter to let the caller choose whether he wants to copy the
12959 string delimiters or not.
12960 (copy_string): Be a simple call to copy_string2 with the last argument
12961 bound to true.
12962 (read_declarations): Add case for macro definition.
12963 (copy_identifier): New.
12964 (parse_macro_decl): Read macro identifiers using copy_identifier
12965 rather than lex.
12966
12967 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12968
12969 * src/output.c (prepare): Add prefixed names.
12970 (output_parser): Output semantic actions.
12971 (output_parser): Fix bug on '%%line' directives.
12972
12973 * src/output.c (output_headers): Remove. The C code printed by this
12974 function should now be in the skeletons.
12975 (output_trailers): Remove.
12976 (output): Disable call to 'reader_output_yylsp'.
12977 (output_rule_data): Do not output tables to the table obstack.
12978
12979 * src/output.c: Remove some C dedicated output.
12980 Improve the use of macro and output obstacks.
12981 (output_defines): Remove.
12982
12983 * src/output.c (output_token_translations): Associate 'translate'
12984 table with a macro. No output to the table obstack.
12985 (output_gram): Same for 'rhs' and 'prhs'.
12986 (output_stos): Same for 'stos'.
12987 (output_rule_data): Same for 'r1' and 'r2'.
12988 (token_actions): Same for 'defact'.
12989 (goto_actions): Same for 'defgoto'.
12990 (output_base): Same for 'pact' and 'pgoto'.
12991 (output_table): Same for 'table'.
12992 (output_check): Same for 'check'.
12993
12994 * src/output.c (output_table_data): New function.
12995 (output_short_table): Remove.
12996 (output_short_or_char_table): Remove.
12997
12998 * src/output.c (output_parser): Replace most of the skeleton copy code
12999 with something new. Skeletons are now processed character by character
13000 rather than line by line, and Bison looks for '%%' macros. This is the
13001 first step in making Bison's output process (a lot) more flexible.
13002 (output_parser): Use the macro table.
13003
13004 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13005
13006 * src/main.c (main): Initialize the macro table.
13007
13008 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13009
13010 * src/lex.c (percent_table): Add tok_define.
13011 * src/lex.h: Add tok_define.
13012
13013 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13014
13015 * src/macrotab.c: New file.
13016 * src/macrotab.h: New file.
13017 * src/Makefile.am: Update.
13018
13019 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
13020
13021 * lib/hash.c: New file.
13022 * lib/hash.h: New file.
13023 * lib/Makefile.am: Update.
13024
13025 2001-08-15 Akim Demaille <akim@epita.fr>
13026
13027 Version 1.28c.
13028
13029 2001-08-15 Marc Autret <autret_m@epita.fr>
13030
13031 * src/reader.c (readgram): Indent output macro YYSTYPE.
13032 (packsymbols): Likewise.
13033 (output_token_defines): Likewise.
13034 * src/files.c: Standardize.
13035 (compute_header_macro): New.
13036 (defines_obstack_save): New. Use compute_header_macro.
13037 (output_files): Update. Use defines_obstack_save.
13038
13039 2001-08-15 Akim Demaille <akim@epita.fr>
13040
13041 * doc/bison.texinfo (Table of Symbols): Document
13042 YYSTACK_USE_ALLOCA.
13043
13044 2001-08-15 Akim Demaille <akim@epita.fr>
13045
13046 * missing: Update from CVS Automake.
13047 * config/config.guess, config/config.sub, config/texinfo.tex:
13048 Update from gnu.org.
13049
13050 2001-08-15 Akim Demaille <akim@epita.fr>
13051
13052 * Makefile.maint: Sync with CVS Autoconf.
13053
13054 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
13055
13056 * doc/bison.texinfo: Include GNU Free Documentation License from
13057 `fdl.texi'.
13058 * doc/fdl.texi: Add to package.
13059
13060 2001-08-14 Marc Autret <autret_m@epita.fr>
13061
13062 Turn on %{source,header}_extension features.
13063
13064 * src/lex.c (percent_table): Un-CPP out header_extension and
13065 source_extension.
13066 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
13067 (compute_exts_from_src): Remove conditions. It restores priorities
13068 between options.
13069
13070 2001-08-14 Marc Autret <autret_m@epita.fr>
13071
13072 * src/files.c (compute_base_names): Add extensions computing when
13073 `--file-prefix' used.
13074 Standardize function calls.
13075
13076 2001-08-13 Marc Autret <autret_m@epita.fr>
13077
13078 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
13079 defining it (defined but null disables alloca).
13080
13081 2001-08-13 Marc Autret <autret_m@epita.fr>
13082
13083 * src/bison.simple (_yy_memcpy): CPP reformat.
13084
13085 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
13086
13087 * tests/atconfig.in (CPPFLAGS): Fix.
13088
13089 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
13090
13091 * doc/bison.texinfo: Include GNU General Public License from
13092 `gpl.texi'.
13093 * doc/gpl.texi: Add to package.
13094
13095 2001-08-10 Marc Autret <autret_m@epita.fr>
13096
13097 * src/print_graph.h: Fix.
13098 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
13099
13100 2001-08-10 Akim Demaille <akim@epita.fr>
13101
13102 * src/system.h: Provide default declarations for stpcpy, strndup,
13103 and strnlen.
13104
13105 2001-08-10 Robert Anisko <anisko_r@epita.fr>
13106
13107 * doc/bison.texinfo (Locations): Update @$ stuff.
13108
13109 2001-08-09 Robert Anisko <anisko_r@epita.fr>
13110
13111 * src/bison.simple (YYLLOC_DEFAULT): Update.
13112 (yyparse): Adjust.
13113
13114 2001-08-08 Marc Autret <autret_m@epita.fr>
13115
13116 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
13117 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
13118 Reported by Fabrice Bauzac.
13119
13120 2001-08-08 Marc Autret <autret_m@epita.fr>
13121
13122 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
13123 * src/vcg.c (output_node): Fix.
13124 * src/vcg.h: Cleanup.
13125 * src/print_graph.c: Add comments.
13126 (node_output_size): New global variable. Simplify the formatting of
13127 the VCG graph output.
13128 (print_actions): Unused code is now used. It notifies the final state
13129 and no action states in the VCG graph. It also give the reduce actions.
13130 The `shift and goto' edges are red and the `go to state' edges are
13131 blue.
13132 Get the current node name and node_obstack by argument.
13133 (node_obstack): New variable.
13134 (print_state): Manage node_obstack.
13135 (print_core): Use node_obstack given by argument.
13136 A node is not only computed here but in print_actions also.
13137 (print_graph): CPP out useless code instead of commenting it.
13138
13139 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
13140
13141 * tests/atconfig.in (CPPFLAGS): Fix.
13142
13143 2001-08-07 Akim Demaille <akim@epita.fr>
13144
13145 * src/print_graph.c (quote): New.
13146 (print_core): Use it.
13147
13148 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
13149
13150 * src/vcg.c (complain.h): Include it.
13151 Unepitaize `return' invocations.
13152 [NDEBUG] (main): Remove.
13153 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
13154 * src/files.c (open_files): Initialize graph_obstack.
13155 * src/print_graph.c (print_actions): CPP out useless code.
13156 (print_core): Don't output the last `\n' in labels.
13157 Use `quote'.
13158 * src/files.c (output_files): Output the VCG file.
13159 * src/main.c (main): Invoke print_graph ();
13160
13161 2001-08-06 Marc Autret <autret_m@epita.fr>
13162
13163 Automaton VCG graph output.
13164 Using option ``-g'' or long option ``--graph'', you can generate
13165 a gram_filename.vcg file containing a VCG description of the LALR (1)
13166 automaton of your grammar.
13167
13168 * src/main.c: Call to print_graph() function.
13169 * src/getargs.h: Update.
13170 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
13171 (graph_flag): New flag.
13172 (longopts): Update.
13173 (getargs): Add case `g'.
13174 * src/files.c (graph_obstack): New obstack struct.
13175 (open_files): Initialize new obstack.
13176 (output_files): Saves graph_obstack if required.
13177 * src/files.h (graph_obstack): New extern declaration.
13178 * src/Makefile.am: Add new source files.
13179
13180 2001-08-06 Marc Autret <autret_m@epita.fr>
13181
13182 * src/print_graph.c, src/print_graph.h (graph): New.
13183 * src/vcg.h: New file.
13184 * src/vcg.c: New file, VCG graph handling.
13185
13186 2001-08-06 Marc Autret <autret_m@epita.fr>
13187
13188 Add of %source_extension and %header_extension which specify
13189 the source or/and the header output file extension.
13190
13191 * src/files.c (compute_base_names): Remove initialisation of
13192 src_extension and header_extension.
13193 (compute_exts_from_gf): Update.
13194 (compute_exts_from_src): Update.
13195 (output_files): Update.
13196 * src/reader.c (parse_header_extension_decl): New.
13197 (parse_source_extension_decl): New.
13198 (read_declarations): New case statements for the new tokens.
13199 * src/lex.c (percent_table): Add entries for %source_extension
13200 and %header_extension.
13201 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
13202
13203 2001-08-06 Marc Autret <autret_m@epita.fr>
13204
13205 * configure.in: Bump to 1.28c.
13206 * doc/bison.texinfo: Texinfo thingies.
13207
13208 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
13209
13210 * tests/atconfig.in (CPPFLAGS): Add.
13211 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
13212
13213 2001-08-03 Akim Demaille <akim@epita.fr>
13214
13215 Version 1.28b.
13216
13217 2001-08-03 Akim Demaille <akim@epita.fr>
13218
13219 * tests/Makefile.am (check-local): Ship testsuite.
13220 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
13221 Include `string.h'.
13222
13223 2001-08-03 Akim Demaille <akim@epita.fr>
13224
13225 * configure.in: Try using -Wformat when compiling.
13226
13227 2001-08-03 Akim Demaille <akim@epita.fr>
13228
13229 * configure.in: Bump to 1.28b.
13230
13231 2001-08-03 Akim Demaille <akim@epita.fr>
13232
13233 * src/complain.c: Adjust strerror_r portability issues.
13234
13235 2001-08-03 Akim Demaille <akim@epita.fr>
13236
13237 Version 1.28a.
13238
13239 2001-08-03 Akim Demaille <akim@epita.fr>
13240
13241 * src/getargs.c, src/getarg.h (skeleton)): Constify.
13242 * src/lex.c (literalchar): Avoid name clashes on `buf'.
13243 * src/getargs.c: Include complain.h.
13244 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
13245 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
13246
13247 2001-08-03 Akim Demaille <akim@epita.fr>
13248
13249 * src/reader.c (readgram): Display hidden chars in error messages.
13250
13251 2001-08-03 Akim Demaille <akim@epita.fr>
13252
13253 Update to gettext 0.10.39.
13254
13255 2001-08-03 Akim Demaille <akim@epita.fr>
13256
13257 * lib/strspn.c: New.
13258
13259 2001-08-01 Marc Autret <autret_m@epita.fr>
13260
13261 * doc/bison.texinfo: Update.
13262 * doc/bison.1 (mandoc): Update.
13263 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
13264 * src/files.c: Support output files extensions computing.
13265 (src_extension): New static variable.
13266 (header_extension): New static variable.
13267 (tr): New function.
13268 (get_extension_index): New function, gets the index of an extension
13269 filename in a string.
13270 (compute_exts_from_gf): New function, computes extensions from the
13271 grammar file extension.
13272 (compute_exts_from_src): New functions, computes extensions from the
13273 C source file extension, file given by ``-o'' option.
13274 (compute_base_names): Update.
13275 (output_files): Update.
13276
13277 2001-08-01 Robert Anisko <anisko_r@epita.fr>
13278
13279 * doc/bison.texi: Document @$.
13280 (Locations): New section.
13281
13282 2001-07-18 Akim Demaille <akim@epita.fr>
13283
13284 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
13285 * config/prev-version.txt, config/move-if-change: New.
13286 * Makefile.am: Adjust.
13287
13288 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
13289
13290 * src/bison.simple (yyparse): Suppress warning `comparaison
13291 between signed and unsigned'.
13292
13293 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
13294
13295 * src/getargs.h (raw_flag): Remove.
13296 * src/getargs.c: Die on `-r'/`--raw'.
13297 * src/lex.c (parse_percent_token): Die on `%raw'.
13298 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
13299 * tests/calc.at: Suppress test with option `--raw'.
13300
13301 2001-07-14 Akim Demaille <akim@epita.fr>
13302
13303 * config/: New.
13304 * configure.in: Require Autoconf 2.50.
13305 Update to gettext 0.10.38.
13306
13307 2001-03-16 Akim Demaille <akim@epita.fr>
13308
13309 * doc/bison.texinfo: ANSIfy the examples.
13310
13311 2001-03-16 Akim Demaille <akim@epita.fr>
13312
13313 * getargs.c (skeleton): New variable.
13314 (longopts): --skeleton is a new option.
13315 (shortopts, getargs): -S is a new option.
13316 * getargs.h: Declare skeleton.
13317 * output.c (output_parser): Use it.
13318
13319 2001-03-16 Akim Demaille <akim@epita.fr>
13320
13321 * m4/strerror_r.m4: New.
13322 * m4/error.m4: Run AC_FUNC_STRERROR_R.
13323 * lib/error.h, lib/error.c: Update.
13324
13325 2001-03-16 Akim Demaille <akim@epita.fr>
13326
13327 * src/getargs.c (longopts): Clean up.
13328
13329 2001-02-21 Akim Demaille <akim@epita.fr>
13330
13331 * src/reader.c (gensym): `gensym_count' is your own.
13332 Use a static buf to create the symbol name, as token_buffer is no
13333 longer a buffer.
13334
13335 2001-02-08 Akim Demaille <akim@epita.fr>
13336
13337 * src/conflicts.c (conflict_report): Be sure not to append to res
13338 between two calls, which could happen if both first sprintf were
13339 skipped, but not the first cp += strlen.
13340
13341 2001-02-08 Akim Demaille <akim@epita.fr>
13342
13343 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
13344 New, from fileutils 4.0.37.
13345 * configure.in: Require Autoconf 2.49c. I took some time before
13346 making this decision. This is the only way out for portability
13347 issues in Bison, it would mean way too much duplicate effort to
13348 import in Bison features implemented in 2.49c since 2.13.
13349 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
13350
13351 2001-02-02 Akim Demaille <akim@epita.fr>
13352
13353 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
13354 * lib/xalloc.h, lib/xmalloc.c: Update.
13355
13356 2001-01-19 Akim Demaille <akim@epita.fr>
13357
13358 Get rid of the ad hoc handling of token_buffer in the scanner: use
13359 the obstacks.
13360
13361 * src/lex.c (token_obstack): New.
13362 (init_lex): Initialize it. No longer call...
13363 (grow_token_buffer): this. Remove it.
13364 Adjust all the places which used it to use the obstack.
13365
13366 2001-01-19 Akim Demaille <akim@epita.fr>
13367
13368 * src/lex.h: Rename all the tokens:
13369 s/\bENDFILE\b/tok_eof/g;
13370 s/\bIDENTIFIER\b/tok_identifier/g;
13371 etc.
13372 Let them be enums, not #define, to ease debugging.
13373 Adjust all the code.
13374
13375 2001-01-18 Akim Demaille <akim@epita.fr>
13376
13377 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
13378 * src/lex.c (maxtoken, grow_token_buffer): Static.
13379
13380 2001-01-18 Akim Demaille <akim@epita.fr>
13381
13382 Since we now use obstacks, more % directives can be enabled.
13383
13384 * src/lex.c (percent_table): Also accept `%yacc',
13385 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
13386 `%debug'.
13387 Handle the actions for `%semantic_parser' and `%pure_parser' here,
13388 instead of returning a token.
13389 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
13390 * src/reader.c (read_declarations): Adjust.
13391 * src/files.c (open_files): Don't call `compute_base_names', don't
13392 compute `attrsfile' since they depend upon data which might be
13393 *in* the input file now.
13394 (output_files): Do it here.
13395 * src/output.c (output_headers): Document the fact that this patch
13396 introduces a guaranteed SEGV for semantic parsers.
13397 * doc/bison.texinfo: Document them.
13398 * tests/suite.at: Exercise these %options.
13399
13400 2000-12-20 Akim Demaille <akim@epita.fr>
13401
13402 Also handle the output file (--verbose) with obstacks.
13403
13404 * files.c (foutput): Remove.
13405 (output_obstack): New.
13406 Adjust all dependencies.
13407 * src/conflicts.c: Return a string.
13408 * src/system.h (obstack_grow_string): Rename as...
13409 (obstack_sgrow): this. Be ready to work with non literals.
13410 (obstack_fgrow4): New.
13411
13412 2000-12-20 Akim Demaille <akim@epita.fr>
13413
13414 * src/files.c (open_files): Fix the computation of short_base_name
13415 in the case of `-o foo.tab.c'.
13416
13417 2000-12-20 Akim Demaille <akim@epita.fr>
13418
13419 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
13420 (copy_dollar): Now that everything uses obstacks, get rid of the
13421 FILE * parameters.
13422
13423 2000-12-20 Akim Demaille <akim@epita.fr>
13424
13425 * src/files.c (open_files): Actually the `.output' file is based
13426 on the short_base_name, not base_name.
13427 * tests/suite.at (Checking output file names): Adjust.
13428
13429 2000-12-20 Akim Demaille <akim@epita.fr>
13430
13431 * src/bison.s1: Remove, we now use directly...
13432 * src/bison.simple: this.
13433 * src/Makefile.am: Use pkgdata instead of data.
13434
13435 2000-12-20 Akim Demaille <akim@epita.fr>
13436
13437 * src/files.c (guard_obstack): New.
13438 (open_files): Initialize it.
13439 (output_files): Dump it...
13440 * src/files.h: Export it.
13441 * src/reader.c (copy_guard): Use it.
13442
13443 2000-12-19 Akim Demaille <akim@epita.fr>
13444
13445 * src/files.c (outfile, defsfile, actfile): Removed as global
13446 vars.
13447 (open_files): Don't compute them.
13448 (output_files): Adjust.
13449 (base_name, short_base_name): Be global.
13450 Adjust dependencies.
13451
13452 2000-12-19 Akim Demaille <akim@epita.fr>
13453
13454 * src/files.c (strsuffix): New.
13455 (stringappend): Be just like strcat but allocate.
13456 (base_names): Eve out from open_files.
13457 Try to simplify the rather hairy computation of base_name and
13458 short_base_name.
13459 (open_files): Use it.
13460 * tests/suite.at (Checking output file names): New test.
13461
13462 2000-12-19 Akim Demaille <akim@epita.fr>
13463
13464 * src/system.h (obstack_grow_literal_string): Rename as...
13465 (obstack_grow_string): this.
13466 * src/output.c (output_parser): Recognize `%% actions' instead of
13467 `$'.
13468 * src/bison.s1: s/$/%% actions/.
13469 * src/bison.hairy: Likewise.
13470
13471 2000-12-19 Akim Demaille <akim@epita.fr>
13472
13473 * src/output.c (output_parser): Compute the `#line' lines when
13474 there are.
13475 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
13476 Suggested by Hans Aberg.
13477
13478 2000-12-19 Akim Demaille <akim@epita.fr>
13479
13480 Let the handling of the skeleton files be local to the procedures
13481 that use it.
13482
13483 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
13484 longer static.
13485 (fparser, open_extra_files): Remove.
13486 (open_files, output_files): Don't take care of fparser.
13487 * src/files.h: Adjust.
13488 * src/output.c (output_parser): Open and close the file to the
13489 skeleton.
13490 * src/reader.c (read_declarations): When %semantic_parser, open
13491 fguard.
13492
13493 2000-12-19 Akim Demaille <akim@epita.fr>
13494
13495 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
13496 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
13497
13498 2000-12-19 Akim Demaille <akim@epita.fr>
13499
13500 * src/files.c (open_files): Yipee! We no longer need all the code
13501 looking for `/tmp' since we have no tmp file.
13502
13503 2000-12-19 Akim Demaille <akim@epita.fr>
13504
13505 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
13506 New macros.
13507 * src/files.c (open_files): Less dependency on MSDOS etc.
13508
13509 2000-12-14 Akim Demaille <akim@epita.fr>
13510
13511 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
13512 Provide a default definition.
13513 Use it when executing the default @ action.
13514 * src/reader.c (reader_output_yylsp): No longer include
13515 `timestamp' and `text' in the default YYLTYPE.
13516
13517 2000-12-12 Akim Demaille <akim@epita.fr>
13518
13519 * src/reader.c (copy_definition, parse_union_decl, copy_action)
13520 (copy_guard): Quote the file names.
13521 Reported by Laurent Mascherpa.
13522
13523 2000-12-12 Akim Demaille <akim@epita.fr>
13524
13525 * src/output.c (output_headers, output_program, output): Be sure
13526 to escape special characters when outputting filenames.
13527 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
13528 (output_headers): Don't depend on them, Use ACTSTR.
13529
13530 2000-11-17 Akim Demaille <akim@epita.fr>
13531
13532 * lib/obstack.h: Formatting changes.
13533 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
13534 prevents type checking.
13535 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
13536 cast the value to (void *): assigning a `foo *' to a `void *'
13537 variable is valid.
13538 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
13539 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
13540 append characters.
13541
13542 2000-11-17 Akim Demaille <akim@epita.fr>
13543
13544 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
13545 as...
13546 (suite.m4, regression.m4, calc.m4): these.
13547 * tests/atgeneral.m4: Update from CVS Autoconf.
13548
13549 2000-11-17 Akim Demaille <akim@epita.fr>
13550
13551 * tests/regression.m4 (%union and --defines): New test,
13552 demonstrating a current bug in the obstack implementation.
13553
13554 2000-11-17 Akim Demaille <akim@epita.fr>
13555
13556 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
13557 macros.
13558 Use them to declare the variables which are global or local to
13559 `yyparse'.
13560
13561 2000-11-17 Akim Demaille <akim@epita.fr>
13562
13563 * acconfig.h: Remove, no longer used.
13564
13565 2000-11-07 Akim Demaille <akim@epita.fr>
13566
13567 * src: s/Copyright (C)/Copyright/g.
13568
13569 2000-11-07 Akim Demaille <akim@epita.fr>
13570
13571 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
13572 defining.
13573 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
13574
13575 2000-11-07 Akim Demaille <akim@epita.fr>
13576
13577 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
13578 Merge in a single CPP if/else.
13579
13580 2000-11-07 Akim Demaille <akim@epita.fr>
13581
13582 * src/output.c (output): Remove useless variables.
13583 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
13584 argument `data' for consistency with the prototypes.
13585 Qualify it `const'.
13586 (obstack_copy, obstack_copy0): Rename the second argument as
13587 `address' for consistency. Qualify it `const'.
13588 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
13589 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
13590 `const' their input argument (`data' or `address').
13591 Adjust the corresponding macros to include `const' in casts.
13592
13593 2000-11-03 Akim Demaille <akim@epita.fr>
13594
13595 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
13596 s/PFILE1/BISON_HAIRY/.
13597 Adjust dependencies.
13598
13599 2000-11-03 Akim Demaille <akim@epita.fr>
13600
13601 For some reason, this was not applied.
13602
13603 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
13604 `unlink': it's no longer used.
13605
13606 2000-11-03 Akim Demaille <akim@epita.fr>
13607
13608 * src/files.c (skeleton_find): New function, eved out of...
13609 (open_files, open_extra_files): here.
13610
13611 2000-11-03 Akim Demaille <akim@epita.fr>
13612
13613 Don't use `atexit'.
13614
13615 * src/files.c (obstack_save): New function.
13616 (done): Rename as...
13617 (output_files): this.
13618 Use `obstack_save'.
13619 * src/main.c (main): Don't use `atexit' to register `done', since
13620 it no longer has to remove tmp files, just call `output_files'
13621 when there are no errors.
13622
13623 2000-11-02 Akim Demaille <akim@epita.fr>
13624
13625 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
13626 `unlink': it's no longer used.
13627 * src/files.h: Formatting changes.
13628
13629 2000-11-02 Akim Demaille <akim@epita.fr>
13630
13631 Remove the last uses of mktemp and unlink/delete.
13632
13633 * src/files.c (fdefines, ftable): Removed.
13634 (defines_ostack, table_obstack): New.
13635 Adjust dependencies of the former into uses of the latter.
13636 * src/output.c (output_short_or_char_table, output_short_table):
13637 Convert to using obstacks.
13638 * src/reader.c (copy_comment2): Accept one FILE * and two
13639 obstacks.
13640 (output_token_defines, reader_output_yylsp): Use obstacks.
13641 * src/system.h (obstack_fgrow3): New.
13642 * po/POTFILES.in: Adjust.
13643
13644 2000-11-01 Akim Demaille <akim@epita.fr>
13645
13646 Change each use of `fattrs' into a use of `attrs_obstack'.
13647
13648 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
13649 * src/files.c (fattrs): Remove.
13650 (attrs_obstack): New.
13651 Adjust all dependencies.
13652 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
13653
13654 2000-11-01 Akim Demaille <akim@epita.fr>
13655
13656 Introduce obstacks.
13657 Change each use of `faction' into a use of `action_obstack'.
13658
13659 * lib/obstack.h, lib/obstack.c: New files.
13660 * src/files.c (faction): Remove.
13661 (action_obstack): New.
13662 Adjust all dependencies.
13663
13664 2000-10-20 Akim Demaille <akim@epita.fr>
13665
13666 * lib/quote.h (PARAMS): New macro. Use it.
13667
13668 2000-10-16 Akim Demaille <akim@epita.fr>
13669
13670 * src/output.c (output_short_or_char_table): New function.
13671 (output_short_table, output_token_translations): Use it.
13672 (goto_actions): Use output_short_table.
13673
13674 2000-10-16 Akim Demaille <akim@epita.fr>
13675
13676 * src/symtab.c (bucket_new): New function.
13677 (getsym): Use it.
13678
13679 * src/output.c (output_short_table): New argument to display the
13680 comment associated with the table.
13681 Adjust dependencies.
13682 (output_gram): Use it.
13683 (output_rule_data): Nicer output layout for YYTNAME.
13684
13685 2000-10-16 Akim Demaille <akim@epita.fr>
13686
13687 * src/lex.c (read_typename): New function.
13688 (lex): Use it.
13689 * src/reader.c (copy_dollar): Likewise.
13690
13691 2000-10-16 Akim Demaille <akim@epita.fr>
13692
13693 * src/reader.c (copy_comment2): Expect the input stream to be on
13694 the `/' which is suspected to open a comment, instead of being
13695 called after `//' or `/*' was read.
13696 (copy_comment, copy_definition, parse_union_decl, copy_action)
13697 (copy_guard): Adjust.
13698
13699 2000-10-16 Akim Demaille <akim@epita.fr>
13700
13701 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
13702 `read_signed_integer'.
13703
13704 2000-10-16 Akim Demaille <akim@epita.fr>
13705
13706 * src/reader.c (copy_dollar): New function.
13707 (copy_guard, copy_action): Use it.
13708
13709 2000-10-16 Akim Demaille <akim@epita.fr>
13710
13711 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
13712 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
13713 New files, from Fileutils 4.0.27.
13714 * src/main.c (printable_version): Remove.
13715 * src/lex.c, src/reader.c: Use `quote'.
13716
13717 2000-10-04 Akim Demaille <akim@epita.fr>
13718
13719 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
13720
13721 2000-10-04 Akim Demaille <akim@epita.fr>
13722
13723 * doc/bison.texinfo: Various typos spotted by Neil Booth.
13724
13725 2000-10-04 Akim Demaille <akim@epita.fr>
13726
13727 When a literal string is used to define two different tokens,
13728 `bison -v' segfaults.
13729 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
13730
13731 * tests/regression.m4: New file.
13732 Include the core of the sample provided by Piotr Gackiewicz.
13733 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
13734 properly.
13735
13736 2000-10-04 Akim Demaille <akim@epita.fr>
13737
13738 * src/reader.c (parse_expect_decl): Keep `count' within the size
13739 of `buffer'.
13740 From Neil Booth.
13741
13742 2000-10-02 Paul Eggert <eggert@twinsun.com>
13743
13744 * bison.s1 (yyparse): Assign the default value
13745 unconditionally, to avoid a GCC warning and make the parser a
13746 tad smaller.
13747
13748 2000-10-02 Akim Demaille <akim@epita.fr>
13749
13750 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
13751 options.
13752
13753 2000-10-02 Akim Demaille <akim@epita.fr>
13754
13755 * src/derives.c, src/print.c, src/reduce.c: To ease the
13756 translation, move some `\n' out of the translated strings.
13757
13758 2000-10-02 Akim Demaille <akim@epita.fr>
13759
13760 The location tracking mechanism is precious for parse error
13761 messages. Nevertheless, it is enabled only when `@n' is used in
13762 the grammar, which is a different issue (you can use it in error
13763 message, but not in the grammar per se). Therefore, there should
13764 be another means to enable it.
13765
13766 * src/getargs.c (getargs): Support `--locations'.
13767 (usage): Report it.
13768 * src/getargs.h (locationsflag): Export it.
13769 * src/lex.c (percent_table): Support `%locations'.
13770 * src/reader.c (yylsp_needed): Remove this variable, now replaced
13771 with `locationsflag'.
13772 * doc/bison.texinfo: Document `--locations' and `%locations'.
13773 Sort the options.
13774 * tests/calc.m4: Test it.
13775
13776 For regularity of the names, replace each
13777 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
13778 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
13779 In addition replace each `flag' with `_flag'.
13780
13781 2000-10-02 Akim Demaille <akim@epita.fr>
13782
13783 Also test parse error messages, including with YYERROR_VERBOSE.
13784
13785 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
13786 associative).
13787 Use it to check the computations.
13788 Use it to check `nonassoc' is honored.
13789 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
13790 `--yyerror-verbose'.
13791 (_AT_CHECK_CALC): Adjust to this option.
13792 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
13793
13794 2000-10-02 Akim Demaille <akim@epita.fr>
13795
13796 Test also `--verbose', `--defines' and `--name-prefix'. Testing
13797 the latter demonstrates a flaw in the handling of non debugging
13798 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
13799 was used in order to simplify:
13800
13801 #if YYDEBUG
13802 if (yydebug)
13803 {
13804 ...
13805 }
13806 #endif
13807
13808 into
13809
13810 if (yydebug)
13811 {
13812 ...
13813 }
13814
13815 unfortunately this leads to a CPP conflict when
13816 `--name-prefix=foo' is used since it produces `#define yydebug
13817 foodebug'.
13818
13819 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
13820 (YYDPRINTF): New macro.
13821 Spread its use.
13822 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
13823 the bison options.
13824 Also test `--verbose', `--defines' and `--name-prefix'.
13825
13826 2000-10-02 Akim Demaille <akim@epita.fr>
13827
13828 Improve the readability of the produced parsers.
13829
13830 * src/bison.s1: Formatting changes.
13831 Improve the comment related to the `$' mark.
13832 (yydefault): Don't fall through to `yyresume': `goto' there.
13833 * src/output.c (output_parser): When the `$' is met, skip the end
13834 of its line.
13835 New variable, `number_of_dollar_signs', to check there's exactly
13836 one `$' in the parser skeleton.
13837
13838 2000-10-02 Akim Demaille <akim@epita.fr>
13839
13840 * lib/xstrdup.c: New file, from the fileutils.
13841 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
13842 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
13843 instead of strlen + xmalloc + strcpy.
13844 * src/symtab.c (copys): Remove, use xstrdup instead.
13845
13846 2000-10-02 Akim Demaille <akim@epita.fr>
13847
13848 * src/gram.h (associativity): New enum type which replaces the
13849 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
13850 `right_assoc', `left_assoc' and `non_assoc'.
13851 Adjust all dependencies.
13852 * src/reader.c: Formatting changes.
13853 (LTYPESTR): Don't define it, use it as a literal in
13854 `reader_output_yylsp'.
13855 * src/symtab.h (symbol_class): New enum type which replaces the
13856 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
13857 `sunknown', `stoken and `snterm'.
13858
13859 2000-10-02 Akim Demaille <akim@epita.fr>
13860
13861 * src/getargs.c (fixed_outfiles): Rename as...
13862 (yaccflag): for consistency and accuracy.
13863 Adjust dependencies.
13864
13865 2000-10-02 Akim Demaille <akim@epita.fr>
13866
13867 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
13868 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
13869 difficult and introduced a lot of core dump. It turns out that
13870 Bison used an implementation of `xmalloc' based on `calloc', and
13871 at various places it does depend upon the initialization to 0. I
13872 have not tried to isolate the pertinent places, and all the former
13873 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
13874 someone should address this issue.
13875
13876 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
13877 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
13878 files.
13879 Adjust dependencies.
13880 * src/warshall.h: New file.
13881 Propagate.
13882
13883 2000-10-02 Akim Demaille <akim@epita.fr>
13884
13885 Various anti-`extern in *.c' changes.
13886
13887 * src/system.h: Include `assert.h'.
13888
13889 2000-10-02 Akim Demaille <akim@epita.fr>
13890
13891 * src/state.h (nstates, final_state, first_state, first_shift)
13892 (first_reduction): Move their exportation from here...
13893 * src/LR0.h: to here.
13894 Adjust dependencies.
13895 * src/getargs.c (statisticsflag): New variable.
13896 Add support for `--statistics'.
13897 Adjust dependencies.
13898
13899 Remove a lot of now useless `extern' statements in most files.
13900
13901 2000-10-02 Akim Demaille <akim@epita.fr>
13902
13903 * src/LR0.h: New file.
13904 Propagate its use.
13905
13906 2000-10-02 Akim Demaille <akim@epita.fr>
13907
13908 * src/print.h: New file.
13909 Propagate its use.
13910 * src/print.c: Formatting and ordering changes.
13911 (verbose, terse): Replace with...
13912 (print_results): this new function.
13913 Adjust dependencies.
13914
13915 2000-10-02 Akim Demaille <akim@epita.fr>
13916
13917 * src/conflicts.c (conflict_report): New function.
13918 (conflict_log, verbose_conflict_log): Replace with...
13919 (print_conflicts): this function.
13920 Adjust dependencies.
13921 * src/conflicts.h: New file.
13922 Propagate its inclusion.
13923
13924 2000-10-02 Akim Demaille <akim@epita.fr>
13925
13926 * src/nullable.h: New file.
13927 Propagate its inclusion.
13928 * src/nullable.c: Formatting changes.
13929
13930 2000-10-02 Akim Demaille <akim@epita.fr>
13931
13932 * src/reduce.h: New file.
13933 Propagate its inclusion.
13934 * src/reduce.c: Topological sort and other formatting changes.
13935 (bool, TRUE, FALSE): Move their definition to...
13936 * src/system.h: here.
13937
13938 2000-10-02 Akim Demaille <akim@epita.fr>
13939
13940 * src/files.c: Formatting changes.
13941 (tryopen, tryclose, openfiles): Rename as...
13942 (xfopen, xfclose, open_files): this.
13943 (stringappend): static.
13944 * src/files.h: Complete the list of exported symbols.
13945 Propagate its use.
13946
13947 2000-10-02 Akim Demaille <akim@epita.fr>
13948
13949 * src/reader.h: New file.
13950 Propagate its use instead of tedious list of `extern' and
13951 prototypes.
13952 * src/reader.c: Formatting changes, topological sort,
13953 s/register//.
13954
13955 2000-10-02 Akim Demaille <akim@epita.fr>
13956
13957 * src/lex.h: Prototype `lex.c' exported functions.
13958 * src/reader.c: Adjust.
13959 * src/lex.c: Formatting changes.
13960 (safegetc): Rename as...
13961 (xgetc): this.
13962
13963 2000-10-02 Akim Demaille <akim@epita.fr>
13964
13965 * src/lalr.h: New file.
13966 Propagate its inclusion instead of prototypes and `extern'.
13967 * src/lalr.c: Formatting changes, topological sorting etc.
13968
13969 2000-10-02 Akim Demaille <akim@epita.fr>
13970
13971 * src/output.c (token_actions): Introduce a temporary array,
13972 YYDEFACT, that makes it possible for this function to use
13973 output_short_table.
13974
13975 2000-10-02 Akim Demaille <akim@epita.fr>
13976
13977 `user_toknums' is output as a `short[]' in `output.c', while it is
13978 defined as a `int[]' in `reader.c'. For consistency with the
13979 other output tables, `user_toknums' is now defined as a table of
13980 shorts.
13981
13982 * src/reader.c (user_toknums): Be a short table instead of an int
13983 table.
13984 Adjust dependencies.
13985
13986 Factor the short table outputs.
13987
13988 * src/output.c (output_short_table): New function.
13989 * src/output.c (output_gram, output_stos, output_rule_data)
13990 (output_base, output_table, output_check): Use it.
13991
13992 2000-10-02 Akim Demaille <akim@epita.fr>
13993
13994 * src/output.c (output): Topological sort of the functions, in
13995 order to get rid of the `static' prototypes.
13996 No longer use `register'.
13997 * src/output.h: New file.
13998 Propagate its inclusion in files explicitly prototyping functions
13999 from output.c.
14000
14001 2000-09-21 Akim Demaille <akim@epita.fr>
14002
14003 * src/atgeneral.m4: Update from Autoconf.
14004
14005 2000-09-21 Akim Demaille <akim@epita.fr>
14006
14007 * src/closure.h: New file.
14008 * src/closure.c: Formatting changes, topological sort over the
14009 functions, use of closure.h.
14010 (initialize_closure, finalize_closure): Rename as...
14011 (new_closure, free_closure): these. Adjust dependencies.
14012 * src/LR0.c: Formatting changes, topological sort, use of
14013 cloture.h.
14014 (initialize_states): Rename as...
14015 (new_states): this.
14016 * src/Makefile.am (noinst_HEADERS): Adjust.
14017
14018 2000-09-20 Akim Demaille <akim@epita.fr>
14019
14020 * src/acconfig.h: Don't protect config.h against multiple
14021 inclusion.
14022 Don't define PARAMS.
14023 * src/system.h: Define PARAMS.
14024 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
14025 purpose of config.h. system.h must not try to fix wrong
14026 definitions in config.h.
14027
14028 2000-09-20 Akim Demaille <akim@epita.fr>
14029
14030 * src/derives.h: New file.
14031 * src/main.c, src/derives.h: Use it.
14032 Formatting changes.
14033 * src/Makefile.am (noinst_HEADERS): Adjust.
14034
14035 2000-09-20 Akim Demaille <akim@epita.fr>
14036
14037 * tests/atgeneral.m4: Update from Autoconf.
14038 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
14039 (AT_CHECK_CALC): New macros.
14040 Use these macros to test bison with options `', `--raw',
14041 `--debug', `--yacc', `--yacc --debug'.
14042
14043 2000-09-19 Akim Demaille <akim@epita.fr>
14044
14045 * src/output.c: Formatting changes.
14046 * src/machine.h: Remove, leaving its contents in...
14047 * src/system.h: here.
14048 Include stdio.h.
14049 Adjust all dependencies on stdio.h and machine.h.
14050 * src/getargs.h: New file.
14051 Let all `extern' declarations about getargs.c be replaced with
14052 inclusion of `getargs.h'.
14053 * src/Makefile.am (noinst_HEADERS): Adjust.
14054
14055 * tests/calc.m4 (yyin): Be initialized in main, not on the global
14056 scope.
14057 (yyerror): Returns void, not int.
14058 * doc/bison.texinfo: Formatting changes.
14059
14060 2000-09-19 Akim Demaille <akim@epita.fr>
14061
14062 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
14063 portable.
14064
14065 2000-09-18 Akim Demaille <akim@epita.fr>
14066
14067 * configure.in: Append WARNING_CFLAGS to CFLAGS.
14068 * src/Makefile.am (INCLUDES): Don't.
14069 Be ready to fetch headers in lib/.
14070
14071 2000-09-18 Akim Demaille <akim@epita.fr>
14072
14073 * doc/bison.texinfo: Update the copyright.
14074 ANSIfy and GNUify the examples.
14075 Remove the old menu.
14076
14077 2000-09-18 Akim Demaille <akim@epita.fr>
14078
14079 First set of tests: use the `calc' example from the documentation.
14080
14081 * src/bison.s1 (yyparse): Condition the code using `yytname' which
14082 is defined only when YYDEBUG is.
14083 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
14084 * src/files.c (tryopen, tryclose): Formatting changes.
14085 Move to the top and be static.
14086 * src/reader.c (read_signed_integer): Likewise.
14087 * tests/calc.m4: New file.
14088 * Makefile.am, suite.m4: Adjust.
14089 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
14090
14091 2000-09-18 Akim Demaille <akim@epita.fr>
14092
14093 Add support for an Autotest test suite for Bison.
14094
14095 * m4/m4.m4, m4/atconfig.m4: New files.
14096 * m4/Makefile.am (EXTRA_DIST): Adjust.
14097 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
14098 files.
14099 * src/getargs.c: Display a more standard --version message.
14100 * src/reader.c (reader): Formatting changes.
14101 No longer depend upon VERSION_STRING.
14102 * configure.in: No longer use `dnl'.
14103 Set up the test suite and the new directory `tests/.
14104 (VERSION_STRING): Remove.
14105
14106 2000-04-14 Akim Demaille <akim@epita.fr>
14107
14108 * src/reader.c (copy_comment2): New function, same as former
14109 `copy_comment', but outputs into two FILE *.
14110 (copy_comment): Use it.
14111 (parse_union_decl): Use it.
14112 (get_type, parse_start_decl): Use the same `invalid' message.
14113 (parse_start_decl, parse_union_decl): Use the same `multiple'
14114 message.
14115 (parse_union_decl, copy_guard, copy_action): Use the same
14116 `unmatched' message.
14117 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
14118
14119 2000-03-31 Akim Demaille <akim@epita.fr>
14120
14121 * src/files.c (tryopen, tryclose): Move to the top.
14122 Be static.
14123
14124 2000-03-31 Akim Demaille <akim@epita.fr>
14125
14126 * src/main.c (main): Don't call `done', exit does it.
14127
14128 2000-03-31 Akim Demaille <akim@epita.fr>
14129
14130 * allocate.c: s/return (foo)/return foo/.
14131 * lalr.c: Likewise.
14132 * LR0.c: Likewise.
14133 * output.c: Likewise.
14134 * reader.c: Likewise.
14135 * symtab.c: Likewise.
14136 * vmsgetargs.c: Likewise.
14137
14138 2000-03-31 Akim Demaille <akim@epita.fr>
14139
14140 Clean up the error reporting functions.
14141
14142 * src/report.c: New file.
14143 * src/report.h: Likewise.
14144 * src/Makefile.am: Adjust.
14145 * m4/error.m4: New file.
14146 * m4/Makefile.am: Adjust.
14147 * configure.in (jm_PREREQ_ERROR): Call it.
14148 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
14149 Remove.
14150 (fatal, fatals): Remove. All callers use complain.c::fatal.
14151 (warn, warni, warns, warnss, warnss): Remove. All callers use
14152 complain.c::complain.
14153 (toomany): Remove, use fatal instead.
14154 * src/files.c (done): No argument, use complain_message_count.
14155 * src/main.c (main): Register `done' to `atexit'.
14156
14157 * src/getargs.c (usage): More `fputs', less `fprintf'.
14158
14159 2000-03-28 Akim Demaille <akim@epita.fr>
14160
14161 * lib/: New directory.
14162 * Makefile.am (SUBDIRS): Adjust.
14163 * configure.in: Adjust.
14164 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
14165 useless.
14166 * src/alloca.c: Moved to lib/.
14167 * src/getopt.c: Likewise.
14168 * src/getopt1.c: Likewise.
14169 * src/getopt.h: Likewise.
14170 * src/ansi2knr.c: Likewise.
14171 * src/ansi2knr.1: Likewise.
14172 * src/Makefile.am: Adjust.
14173 * lib/Makefile.am: New file.
14174
14175 2000-03-28 Akim Demaille <akim@epita.fr>
14176
14177 * src/getargs.c (usage): Refresh the help message.
14178
14179 2000-03-17 Akim Demaille <akim@epita.fr>
14180
14181 * src/getopt1.c: Updated from textutils 2.0e
14182 * src/getopt.c: Likewise.
14183 * src/getopt.h: Likewise.
14184
14185 2000-03-17 Akim Demaille <akim@epita.fr>
14186
14187 * src/Makefile.am (bison.simple): Fix the awk program: quote only
14188 the file name, not the whole `#line LINE FILE'.
14189
14190 2000-03-17 Akim Demaille <akim@epita.fr>
14191
14192 On syntax errors, report the token on which we choked.
14193
14194 * src/bison.s1 (yyparse): In the label yyerrlab, when
14195 YYERROR_VERBOSE, add yychar in msg.
14196
14197 2000-03-17 Akim Demaille <akim@epita.fr>
14198
14199 * src/reader.c (copy_at): New function.
14200 (copy_guard): Use it.
14201 (copy_action): Use it.
14202
14203 2000-03-17 Akim Demaille <akim@epita.fr>
14204
14205 Be kind to translators, save some useless translations.
14206
14207 * src/main.c (banner): New function.
14208 (fatal_banner): Use it.
14209 (warn_banner): Use it.
14210
14211 2000-03-17 Akim Demaille <akim@epita.fr>
14212
14213 * src/reader.c (copy_definition): Use copy_string and
14214 copy_comment. Removed now unused `match', `ended',
14215 `cplus_comment'.
14216 (copy_comment, copy_string): Moved, to be visible from
14217 copy_definition.
14218
14219 2000-03-17 Akim Demaille <akim@epita.fr>
14220
14221 * src/reader.c (copy_string): Declare `static inline'. No
14222 problems with inline, since it is checked by configure.
14223 (copy_comment): Likewise.
14224
14225 2000-03-17 Akim Demaille <akim@epita.fr>
14226
14227 * src/reader.c (packsymbols): Formatting changes.
14228
14229 2000-03-17 Akim Demaille <akim@epita.fr>
14230
14231 * src/reader.c (copy_comment): New function, factored out from:
14232 (copy_action): Use it. Removed now unused `match', `ended',
14233 `cplus_comment'.
14234 (copy_guard): Likewise.
14235
14236 2000-03-17 Akim Demaille <akim@epita.fr>
14237
14238 * src/reader.c (copy_string): New function, factored out from:
14239 (copy_action): Use it.
14240 (copy_guard): Likewise.
14241
14242 2000-03-17 Akim Demaille <akim@epita.fr>
14243
14244 Change the handling of @s so that they behave exactly like $s.
14245 There is now a pseudo variable @$ (readble and writable), location
14246 of the lhs of the rule (by default ranging from the location of
14247 the first symbol of the rhs, to the location of the last symbol,
14248 or, if the rhs is empty, YYLLOC).
14249
14250 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
14251 yyval.
14252 (yyparse): When providing a default semantic action, provide a
14253 default location action.
14254 (after the $): No longer change `*YYLSP', just stack YYLOC the
14255 same way you stack YYVAL.
14256 * src/reader.c (read_declarations): Use warns.
14257 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
14258 (copy_action, case '@'): Likewise.
14259 Use a standard error message, to save useless work from
14260 translators.
14261
14262 2000-03-17 Akim Demaille <akim@epita.fr>
14263
14264 * src/bison.s1: Formatting and cosmetics changes.
14265 * src/reader.c: Likewise.
14266 Update the Copyright notice.
14267
14268 2000-03-17 Akim Demaille <akim@epita.fr>
14269
14270 * src/bison.s1 (#line): All set to `#line' only, since the
14271 Makefile now handles them.
14272
14273 2000-03-16 Akim Demaille <akim@epita.fr>
14274
14275 * src/output.c (output_rule_data): Output the documentation of
14276 some of the tables.
14277 (Copyright notice): Update.
14278 Formatting changes.
14279
14280 2000-03-16 Akim Demaille <akim@epita.fr>
14281
14282 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
14283 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
14284 One `#if YYDEBUG' remains, since it uses variables which are
14285 defined only if `YYDEBUG != 0'.
14286
14287 2000-03-16 Akim Demaille <akim@epita.fr>
14288
14289 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
14290 and related variables so that the similarities are highlighted.
14291
14292 2000-03-16 Akim Demaille <akim@epita.fr>
14293
14294 * src/bison.s1: Properly indent CPP directives.
14295
14296 2000-03-16 Akim Demaille <akim@epita.fr>
14297
14298 * src/bison.s1: Properly indent the `alloca' CPP section.
14299
14300 2000-03-16 Akim Demaille <akim@epita.fr>
14301
14302 Do not hard code values of directories in `configure.in'.
14303 Update the `configure' tool chain.
14304
14305 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
14306 src/makefile.am.
14307 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
14308 (AC_OUTPUT): Add m4/Makefile.
14309 Bump to bison 1.28a, 1.29 has never been released.
14310 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
14311 handled via src/Makefile.am.
14312 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
14313 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
14314 autoheader.
14315 * Makefile.am (SUBDIRS): Add m4.
14316 (ACLOCAL_AM_FLAGS): New variable.
14317 (AUTOMAKE_OPTIONS): Add check-news.
14318 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
14319 the proper line number and file name.
14320 (DEFS): Propagate the location of bison library files and of the
14321 locale files.
14322 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
14323 builddir.
14324 * acinclude.m4: Remove, replaced by the directory m4.
14325 * m4/Makefile.am (EXTRA_DIST): New variable.
14326 * m4/gettext.m4: New file, from the fileutils.
14327 * m4/lcmessage.m4: Likewise
14328 * m4/progtest.m4: Likewise.
14329 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
14330
14331 2000-03-10 Akim Demaille <akim@epita.fr>
14332
14333 * src/closure.c:
14334 Formatting changes of various comments.
14335 Respect the GNU coding standards at various places.
14336 Don't use `_()' when no translation is needed.
14337
14338 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14339
14340 * src/files.c:
14341 OS/2 honors TMPDIR environment variable.
14342
14343 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14344
14345 * doc/bison.texinfo: Tweaked spelling and grammar.
14346 Updated ISBN.
14347 Removed reference to price of printed copy.
14348 Mention BISON_SIMPLE and BISON_HAIRY.
14349
14350 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14351
14352 * configure.in, NEWS:
14353 Bison 1.29 released.
14354
14355 1999-10-27 Jesse Thilo <jthilo@gnu.org>
14356
14357 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
14358 Added reference card.
14359
14360 1999-07-26 Jesse Thilo <jthilo@gnu.org>
14361
14362 * po/ru.po: Added Russian translation.
14363
14364 1999-07-26 Jesse Thilo <jthilo@gnu.org>
14365
14366 * configure.in: Added Russian translation.
14367
14368 1999-07-06 Jesse Thilo <jthilo@gnu.org>
14369
14370 * configure.in, NEWS, README:
14371 Released version 1.28.
14372
14373 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14374
14375 * src/system.h:
14376 Squashed redefinition warning on some systems.
14377
14378 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
14379 Have configure build version string instead of relying on ANSI string
14380 concatentation.
14381
14382 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14383
14384 * po/POTFILES.in: Got rid of version.c.
14385
14386 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14387
14388 * acconfig.h, configure.in:
14389 Have configure build version string instead of relying on ANSI string
14390 concatentation.
14391
14392 1999-06-08 Jesse Thilo <jthilo@gnu.org>
14393
14394 * doc/bison.1:
14395 Dropped mention of `+' for long-named options.
14396
14397 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14398
14399 * src/files.c: Added <unistd.h> for unlink().
14400
14401 * src/Makefile.am, src/system.h:
14402 I18n fixes.
14403
14404 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14405
14406 * README: Added a FAQ list.
14407
14408 * configure.in, acconfig.h:
14409 I18n fixes.
14410
14411 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14412
14413 * doc/FAQ, doc/Makefile.am:
14414 Added a FAQ list.
14415
14416 1999-05-19 Jesse Thilo <jthilo@gnu.org>
14417
14418 * src/alloc.h, src/symtab.h, src/version.c:
14419 Protected inclusion of "config.h" with HAVE_CONFIG_H.
14420
14421 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14422
14423 * src/.cvsignore, src/Makefile.am:
14424 Reorganized: sources in `src', documentation in `doc'.
14425
14426 * src/lex.c (literalchar):
14427 fixed the code for escaping double quotes (thanks
14428 Jonathan Czisny.)
14429
14430 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14431
14432 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
14433 Adjusted paths to reflect directory reorganization.
14434
14435 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14436
14437 * doc/.cvsignore, doc/Makefile.am:
14438 Reorganized: sources in `src', documentation in `doc'.
14439
14440 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14441
14442 * configure.in:
14443 Updated AC_INIT file to reflect directory reorganization.
14444
14445 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
14446 Reorganized: sources in `src', documentation in `doc'.
14447
14448 1999-04-13 Jesse Thilo <jthilo@gnu.org>
14449
14450 * src/allocate.c:
14451 Don't declare calloc() and realloc() if not necessary.
14452
14453 1999-04-13 Jesse Thilo <jthilo@gnu.org>
14454
14455 * configure.in, acconfig.h, acinclude.m4:
14456 Don't declare calloc() and realloc() if not necessary.
14457
14458 1999-03-23 Jesse Thilo <jthilo@gnu.org>
14459
14460 * po/.cvsignore: Added i18n support.
14461
14462 1999-03-23 Jesse Thilo <jthilo@gnu.org>
14463
14464 * acconfig.h, configure.in, Makefile.am:
14465 Added i18n support.
14466
14467 1999-03-22 Jesse Thilo <jthilo@gnu.org>
14468
14469 * src/bison.s1: Fixed #line numbers.
14470
14471 1999-03-15 Jesse Thilo <jthilo@gnu.org>
14472
14473 * po/es.po, po/fr.po, po/nl.po, po/de.po:
14474 Added PO files from Translation Project.
14475
14476 1999-03-03 Jesse Thilo <jthilo@gnu.org>
14477
14478 * Makefile.am:
14479 Added support for non-ANSI compilers (ansi2knr).
14480
14481 1999-02-16 Jesse Thilo <jthilo@gnu.org>
14482
14483 * configure.in: Bumped version number to 1.27.
14484
14485 * Makefile.am:
14486 Added `bison.simple' to list of files removed by `make distclean'.
14487
14488 1999-02-12 Jesse Thilo <jthilo@gnu.org>
14489
14490 * src/files.c, src/files.h:
14491 Defined locations of parser files in config.h instead of Makefile.
14492
14493 1999-02-12 Jesse Thilo <jthilo@gnu.org>
14494
14495 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
14496 Defined locations of parser files in config.h instead of Makefile.
14497
14498 1999-02-09 Jesse Thilo <jthilo@gnu.org>
14499
14500 * Makefile.am:
14501 Removed inappropriate use of $< macro.
14502
14503 1999-02-05 Jesse Thilo <jthilo@gnu.org>
14504
14505 * po/Makefile.in.in, po/POTFILES.in:
14506 Add `po' directory skeleton.
14507
14508 1999-01-27 Jesse Thilo <jthilo@gnu.org>
14509
14510 * README: Document help-bison list.
14511
14512 * configure.in: Add check for mkstemp().
14513
14514 1999-01-20 Jesse Thilo <jthilo@gnu.org>
14515
14516 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
14517 Hush a few compiler warnings.
14518
14519 * src/files.c:
14520 Add tryclose(), which verifies that fclose was successful.
14521 Hush a couple of compiler warnings.
14522
14523 1999-01-20 Jesse Thilo <jthilo@gnu.org>
14524
14525 * Makefile.am, OChangeLog:
14526 ChangeLog is now automatically generated. Include the old version as
14527 OChangeLog.
14528
14529 1999-01-14 Jesse Thilo <jthilo@gnu.org>
14530
14531 * 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:
14532 Update FSF address.
14533
14534 1999-01-14 Jesse Thilo <jthilo@gnu.org>
14535
14536 * doc/bison.texinfo: Fix formatting glitch.
14537
14538 * doc/bison.texinfo: Update FSF address.
14539
14540 1999-01-14 Jesse Thilo <jthilo@gnu.org>
14541
14542 * acconfig.h: Update FSF address.
14543
14544 1999-01-08 Jesse Thilo <jthilo@gnu.org>
14545
14546 * src/system.h:
14547 Don't define PACKAGE here, since config.h defines it.
14548
14549 1998-12-30 Jesse Thilo <jthilo@gnu.org>
14550
14551 * src/reader.c: Update copyright date.
14552
14553 * src/main.c:
14554 Ditch sprintf to statically-sized buffers in fatal/warn functions in
14555 favor of output directly to stderr (avoids buffer overruns).
14556
14557 * src/reader.c: Some checks for premature EOF.
14558
14559 * 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:
14560 Use prototypes if the compiler understands them.
14561
14562 * src/files.c: Honor TMPDIR on Unix hosts.
14563 Use prototypes if the compiler understands them.
14564
14565 * src/reader.c:
14566 Fix a couple of buffer overrun bugs.
14567 Use prototypes if the compiler understands them.
14568
14569 * src/system.h: Include unistd.h and ctype.h.
14570 Use #ifdef instead of #if for NLS symbols.
14571
14572 1998-12-30 Jesse Thilo <jthilo@gnu.org>
14573
14574 * doc/bison.texinfo:
14575 Delete comment "consider using @set for edition number, etc..." since
14576 we now are doing so.
14577
14578 1998-12-30 Jesse Thilo <jthilo@gnu.org>
14579
14580 * configure.in:
14581 Use prototypes if the compiler understands them.
14582
14583 * NEWS: Document 1.26 highlights.
14584
14585 * Makefile.am: Require Automake 1.3 or later.
14586
14587 * acconfig.h:
14588 Use prototypes if the compiler understands them.
14589
14590 1998-12-29 Jesse Thilo <jthilo@gnu.org>
14591
14592 * src/version.c:
14593 Use VERSION symbol from automake for version number.
14594
14595 1998-12-29 Jesse Thilo <jthilo@gnu.org>
14596
14597 * acconfig.h, configure.in, version.cin:
14598 Use VERSION symbol from automake for version number.
14599
14600 1998-11-28 Jesse Thilo <jthilo@gnu.org>
14601
14602 * Makefile.am:
14603 Distribute original version of simple parser (bison.s1), not built
14604 version (bison.simple).
14605
14606 1998-11-28 Jesse Thilo <jthilo@gnu.org>
14607
14608 * doc/bison.texinfo: Add info dir entry.
14609
14610 * doc/bison.texinfo:
14611 Let automake put version number into documentation.
14612
14613 1998-11-26 Jesse Thilo <jthilo@gnu.org>
14614
14615 * src/bison.cld, src/build.com, src/vmshlp.mar:
14616 Add non-RCS files from /gd/gnu/bison.
14617
14618 1998-11-26 Jesse Thilo <jthilo@gnu.org>
14619
14620 * doc/bison.1:
14621 Document the BISON_HAIRY and BISON_SIMPLE variables.
14622
14623 1998-11-25 Jesse Thilo <jthilo@gnu.org>
14624
14625 * src/version.c: Build version.c automatically.
14626
14627 * src/reader.c:
14628 Fix token numbering (used to start at 258, not 257).
14629
14630 * src/system.h: Include config.h.
14631
14632 * src/getargs.c: Update bug report address.
14633
14634 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
14635 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
14636
14637 1998-11-25 Jesse Thilo <jthilo@gnu.org>
14638
14639 * Makefile.am:
14640 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
14641
14642 * configure.in, version.cin:
14643 Build version.c automatically.
14644
14645 * AUTHORS: Add AUTHORS file.
14646
14647 * README: Update bug report address.
14648
14649 * bison.simple:
14650 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
14651
14652 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
14653 Add automake stuff.
14654
14655 1998-11-25 Jesse Thilo <jthilo@gnu.org>
14656
14657 * doc/bison.texinfo: Clean up some formatting.
14658
14659 1998-05-05 Richard Stallman <rms@gnu.org>
14660
14661 * doc/bison.texinfo:
14662 Explain better why to make a pure parser.
14663
14664 1998-01-05 Richard Stallman <rms@gnu.org>
14665
14666 * src/files.c (openfiles):
14667 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
14668 find a temporary directory, if possible. Do not unlink files while
14669 they are open.
14670
14671 1997-08-25 Richard Stallman <rms@gnu.org>
14672
14673 * src/reader.c (stack_offset;):
14674 Change some warni to warns.
14675
14676 * src/lex.c (literalchar): Use warns, not warni.
14677
14678 1997-06-28 Richard Stallman <rms@gnu.org>
14679
14680 * src/bison.s1: Add a Bison version comment.
14681
14682 * src/main.c (fatal, warn, berror):
14683 Use program_name.
14684
14685 1997-06-28 Richard Stallman <rms@gnu.org>
14686
14687 * Makefile.in (bison_version): New variable.
14688 (dist): Use that variable.
14689 (bison.s1): Substitute the Bison version into bison.simple.
14690
14691 * bison.simple: Add a Bison version comment.
14692
14693 1997-06-18 Richard Stallman <rms@gnu.org>
14694
14695 * src/main.c (fatal, warn, berror):
14696 Make error messages standard.
14697 (toomany): Improve error message text.
14698
14699 * 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:
14700 new.h renamed to alloc.h.
14701
14702 1997-06-18 Richard Stallman <rms@gnu.org>
14703
14704 * Makefile.in: new.h renamed to alloc.h.
14705
14706 1997-05-24 Richard Stallman <rms@gnu.org>
14707
14708 * src/lex.c (literalchar):
14709 Fix the code for escaping \, " and '.
14710
14711 (lex): Avoid trouble when there are many chars
14712 to discard in a char literal with just several chars in it.
14713
14714 1997-05-17 Richard Stallman <rms@gnu.org>
14715
14716 * src/bison.s1:
14717 Use malloc, if using alloca is troublesome.
14718 (YYSTACK_USE_ALLOCA): New flag macro.
14719 Define it for some systems and compilers.
14720 (YYSTACK_ALLOC): New macro.
14721 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14722 If it was malloc'd, free it.
14723
14724 1997-05-17 Richard Stallman <rms@gnu.org>
14725
14726 * bison.simple:
14727 Use malloc, if using alloca is troublesome.
14728 (YYSTACK_USE_ALLOCA): New flag macro.
14729 Define it for some systems and compilers.
14730 (YYSTACK_ALLOC): New macro.
14731 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14732 If it was malloc'd, free it.
14733
14734 1997-04-23 Richard Stallman <rms@gnu.org>
14735
14736 * src/bison.s1:
14737 (alloca) [__hpux]: Always define as __builtin_alloca.
14738
14739 1997-04-23 Richard Stallman <rms@gnu.org>
14740
14741 * bison.simple:
14742 (alloca) [__hpux]: Always define as __builtin_alloca.
14743
14744 1997-04-22 Richard Stallman <rms@gnu.org>
14745
14746 * src/bison.s1:
14747 [__hpux]: Include alloca.h (right for HPUX 10)
14748 instead of declaring alloca (right for HPUX 9).
14749
14750 * src/bison.s1 (__yy_memcpy):
14751 Declare arg `count' as unsigned int.
14752 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14753
14754 1997-04-22 Richard Stallman <rms@gnu.org>
14755
14756 * bison.simple:
14757 [__hpux]: Include alloca.h (right for HPUX 10)
14758 instead of declaring alloca (right for HPUX 9).
14759
14760 * bison.simple (__yy_memcpy):
14761 Declare arg `count' as unsigned int.
14762 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14763
14764 1997-01-03 Richard Stallman <rms@gnu.org>
14765
14766 * src/allocate.c: [__STDC__ or _MSC_VER]:
14767 Declare calloc and realloc to return void *.
14768
14769 1997-01-02 Richard Stallman <rms@gnu.org>
14770
14771 * src/system.h:
14772 [_MSC_VER]: Include stdlib.h and process.h.
14773 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
14774
14775 * src/main.c (main): Return FAILURE as a value.
14776 (printable_version): Declare arg as int, not char.
14777
14778 1997-01-02 Richard Stallman <rms@gnu.org>
14779
14780 * Makefile.in (dist):
14781 Explicitly check for symlinks, and copy them.
14782
14783 1996-12-19 Richard Stallman <rms@gnu.org>
14784
14785 * src/files.c:
14786 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
14787
14788 1996-12-18 Paul Eggert <eggert@gnu.org>
14789
14790 * src/bison.s1 (yyparse):
14791 If __GNUC__ and YYPARSE_PARAM are both defined,
14792 declare yyparse to have a void * argument.
14793
14794 1996-12-18 Paul Eggert <eggert@gnu.org>
14795
14796 * bison.simple (yyparse):
14797 If __GNUC__ and YYPARSE_PARAM are both defined,
14798 declare yyparse to have a void * argument.
14799
14800 1996-12-17 Richard Stallman <rms@gnu.org>
14801
14802 * src/reduce.c (nbits): Add some casts.
14803
14804 1996-08-12 Richard Stallman <rms@gnu.org>
14805
14806 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
14807
14808 1996-08-12 Richard Stallman <rms@gnu.org>
14809
14810 * bison.simple: Test _MSDOS as well as _MSDOS_.
14811
14812 1996-07-31 Richard Stallman <rms@gnu.org>
14813
14814 * src/bison.s1:
14815 [__sun && __i386]: Include alloca.h.
14816
14817 1996-07-31 Richard Stallman <rms@gnu.org>
14818
14819 * bison.simple:
14820 [__sun && __i386]: Include alloca.h.
14821
14822 1996-07-30 Richard Stallman <rms@gnu.org>
14823
14824 * src/bison.s1: Comment change.
14825
14826 * src/bison.s1: Test _MSDOS_, not MSDOS.
14827
14828 1996-07-30 Richard Stallman <rms@gnu.org>
14829
14830 * bison.simple: Comment change.
14831
14832 * bison.simple: Test _MSDOS_, not MSDOS.
14833
14834 1996-06-01 Richard Stallman <rms@gnu.org>
14835
14836 * 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:
14837 Insert `_' macro around many string constants.
14838
14839 * src/main.c:
14840 Insert `_' macro around many string constants.
14841
14842 (main): Call setlocale, bindtextdomain and textdomain.
14843
14844 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
14845 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
14846 [ENABLE_NLS]: Include libintl.h.
14847 [ENABLE_NLS] (gettext): Define.
14848 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
14849 (N_, PACKAGE, LOCALEDIR): New macros.
14850
14851 1996-06-01 Richard Stallman <rms@gnu.org>
14852
14853 * POTFILES.in: New file.
14854
14855 * Makefile.in (allocate.o):
14856 Define target explicitly.
14857
14858 * Makefile.in (CFLAGS): Set to @CFLAGS@.
14859 (LDFLAGS): Set to @LDFLAGS@.
14860 (configure): Run autoconf only if preceding `cd' succeeds.
14861 (bison.s1): Redirect output to temporary file then move the
14862 temporary to the target, rather than redirecting directly to bison.s1.
14863 (clean): Remove config.status and config.log.
14864 (distclean): Don't remove config.status here.
14865
14866 1996-05-12 Richard Stallman <rms@gnu.org>
14867
14868 * src/bison.s1:
14869 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14870
14871 1996-05-12 Richard Stallman <rms@gnu.org>
14872
14873 * bison.simple:
14874 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14875
14876 1996-05-11 Richard Stallman <rms@gnu.org>
14877
14878 * src/bison.s1 (__yy_memcpy):
14879 Really reorder the args, as was supposedly done on Feb 14 1995.
14880 (yyparse): Calls changed accordingly.
14881
14882 1996-05-11 Richard Stallman <rms@gnu.org>
14883
14884 * Makefile.in (dist): Don't use $(srcdir).
14885
14886 * bison.simple (__yy_memcpy):
14887 Really reorder the args, as was supposedly done on Feb 14 1995.
14888 (yyparse): Calls changed accordingly.
14889
14890 1996-01-27 Richard Stallman <rms@gnu.org>
14891
14892 * src/output.c (output_rule_data):
14893 Test YYERROR_VERBOSE in the conditional
14894 around the definition of ttyname.
14895
14896 1995-12-29 Richard Stallman <rms@gnu.org>
14897
14898 * src/bison.s1:
14899 Fix line numbers in #line commands.
14900
14901 1995-12-29 Richard Stallman <rms@gnu.org>
14902
14903 * bison.simple:
14904 Fix line numbers in #line commands.
14905
14906 1995-12-27 Richard Stallman <rms@gnu.org>
14907
14908 * src/bison.s1 (YYPARSE_PARAM_DECL):
14909 In C++, make it always null.
14910 (YYPARSE_PARAM_ARG): New macro.
14911 (yyparse): Use YYPARSE_PARAM_ARG.
14912
14913 1995-12-27 Richard Stallman <rms@gnu.org>
14914
14915 * bison.simple (YYPARSE_PARAM_DECL):
14916 In C++, make it always null.
14917 (YYPARSE_PARAM_ARG): New macro.
14918 (yyparse): Use YYPARSE_PARAM_ARG.
14919
14920 1995-11-29 Richard Stallman <rms@gnu.org>
14921
14922 * doc/bison.texinfo:
14923 Describe literal string tokens, %raw, %no_lines, %token_table.
14924
14925 1995-11-29 Daniel Hagerty <hag@gnu.org>
14926
14927 * doc/bison.texinfo: Fixed update date
14928
14929 1995-10-16 Richard Stallman <rms@gnu.org>
14930
14931 * src/version.c: Version 1.25.
14932
14933 1995-10-16 Richard Stallman <rms@gnu.org>
14934
14935 * NEWS: *** empty log message ***
14936
14937 1995-10-16 Richard Stallman <rms@gnu.org>
14938
14939 * doc/bison.1, doc/bison.rnh:
14940 Add new options.
14941
14942 1995-10-15 Richard Stallman <rms@gnu.org>
14943
14944 * src/vmsgetargs.c, src/getargs.c:
14945 Added -n, -k, and -raw switches.
14946 (noparserflag, toknumflag, rawtoknumflag): New variables.
14947
14948 * src/symtab.h (SALIAS):
14949 New #define for adding aliases to %token.
14950 (struct bucket): Added `alias' field.
14951
14952 * src/reduce.c (reduce_grammar):
14953 Revise error message.
14954 (print_notices): Remove final `.' from error message.
14955
14956 * src/reader.c (reader_output_yylsp):
14957 New function.
14958 (readgram): Use `#if 0' around code that accepted %command
14959 inside grammar rules: The documentation doesn't allow it,
14960 and it will fail since the %command processors scan for the next %.
14961 (parse_token_decl): Extended the %token
14962 declaration to allow a multi-character symbol as an alias.
14963 (parse_thong_decl): New function.
14964 (read_declarations): Added %thong declarations.
14965 (read_declarations): Handle NOOP to deal with allowing
14966 % declarations as another means to specify the flags.
14967 (readgram): Allow %prec prior to semantics embedded in a rule.
14968 (skip_to_char, read_declarations, copy_definition)
14969 (parse_token_decl, parse_start_decl, parse_type_decl)
14970 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
14971 (get_type_name, copy_guard, copy_action, readgram)
14972 (get_type, packsymbols): Revised most error messages.
14973 Changed `fatal' to `warnxxx' to avoid aborting for error.
14974 Revised and use multiple warnxxx functions to avoid using VARARGS1.
14975 (read_declarations): Improve the error message for
14976 an invalid character. Do not abort.
14977 (read_declarations, copy_guard, copy_action): Use
14978 printable_version to avoid unprintable characters in printed output.
14979 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
14980 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
14981 Allow the type of a non-terminal can be given
14982 more than once, as long as all specifications give the same type.
14983
14984 * src/output.c:
14985 (output_headers, output_trailers, output, output_gram)
14986 (output_rule_data): Implement noparserflag variable.
14987 Implement toknumflag variable.
14988 (output): Call reader_output_yylsp to output LTYPESTR.
14989
14990 * src/main.c (main):
14991 If reader sees an error, don't process the grammar.
14992 (fatals): Updated to not use VARARGS1.
14993 (printable_version, int_to_string, warn, warni, warns, warnss)
14994 (warnsss): New error reporting functions. Avoid abort for error.
14995
14996 * src/lex.h:
14997 Added THONG and NOOP for alias processing.
14998 Added SETOPT for the new code that allows setting options with %flags.
14999
15000 * src/lex.c:
15001 Include getopt.h. Add some extern decls.
15002 (safegetc): New function to deal with EOF gracefully.
15003 (literalchar); new function to deal with reading \ escapes.
15004 (lex): Use literalchar.
15005 (lex): Implemented "..." tokens.
15006 (literalchar, lex, parse_percent_token): Made tokenbuffer
15007 always contain the token. This includes growing the token
15008 buffer while reading an integer.
15009 (parse_percent_token): Replaced if-else statement with percent_table.
15010 (parse_percent_token): Added % declarations as another
15011 way to specify the flags -n, -l, and -r. Also added hooks for
15012 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
15013 major changes to files.c.
15014 (lex) Retain in the incoming stream a character following
15015 an incorrect '/'.
15016 (skip_white_space, lex): Revised most error messages
15017 and changed fatal to warn to avoid aborting.
15018 (percent_table): Added %thong declarations.
15019
15020 * src/gram.h: Comment changes.
15021
15022 * src/files.c (openfiles, open_extra_files, done):
15023 Add faction flag
15024 and actfile file. Handle noparserflag. Both for -n switch.
15025
15026 * src/conflicts.c (resolve_sr_conflict):
15027 Remove use of alloca.
15028
15029 1995-06-01 Jim Meyering <meyering@gnu.org>
15030
15031 * doc/bison.texinfo: *** empty log message ***
15032
15033 1995-05-06 Richard Stallman <rms@gnu.org>
15034
15035 * src/bison.s1: Comment change.
15036
15037 1995-05-06 Richard Stallman <rms@gnu.org>
15038
15039 * bison.simple: Comment change.
15040
15041 1995-05-03 Richard Stallman <rms@gnu.org>
15042
15043 * src/version.c: Version now 1.24.
15044
15045 * src/bison.s1: Change distribution terms.
15046
15047 * src/version.c: Version now 1.23.
15048
15049 1995-05-03 Richard Stallman <rms@gnu.org>
15050
15051 * doc/bison.texinfo:
15052 Rewrite "Conditions for Using Bison".
15053 Update version to 1.24.
15054
15055 1995-05-03 Richard Stallman <rms@gnu.org>
15056
15057 * bison.simple: Change distribution terms.
15058
15059 1995-02-23 Richard Stallman <rms@gnu.org>
15060
15061 * src/files.c: Test __VMS_POSIX as well as VMS.
15062
15063 1995-02-14 Jim Meyering <meyering@gnu.org>
15064
15065 * src/bison.s1 (__yy_memcpy):
15066 Renamed from __yy_bcopy to avoid
15067 confusion. Reverse FROM and TO arguments to be consistent with
15068 those of memcpy.
15069
15070 1995-02-14 Jim Meyering <meyering@gnu.org>
15071
15072 * bison.simple (__yy_memcpy):
15073 Renamed from __yy_bcopy to avoid
15074 confusion. Reverse FROM and TO arguments to be consistent with
15075 those of memcpy.
15076
15077 1994-11-10 David J. MacKenzie <djm@gnu.org>
15078
15079 * NEWS: reformat
15080
15081 * NEWS: New file.
15082
15083 * Makefile.in (DISTFILES): Include NEWS.
15084
15085 * Makefile.in (DISTFILES):
15086 Include install-sh, not install.sh.
15087
15088 * configure.in: Update to Autoconf v2 macro names.
15089
15090 1994-10-05 David J. MacKenzie <djm@gnu.org>
15091
15092 * Makefile.in: fix typo
15093
15094 * Makefile.in (prefix, exec_prefix):
15095 Let configure set them.
15096
15097 1994-09-28 David J. MacKenzie <djm@gnu.org>
15098
15099 * Makefile.in: Set datadir to $(prefix)/share.
15100
15101 1994-09-15 Richard Stallman <rms@gnu.org>
15102
15103 * src/bison.s1:
15104 Update copyright notice and GPL version.
15105
15106 1994-09-15 Richard Stallman <rms@gnu.org>
15107
15108 * bison.simple:
15109 Update copyright notice and GPL version.
15110
15111 1994-07-12 Richard Stallman <rms@gnu.org>
15112
15113 * src/reduce.c, src/reader.c:
15114 entered into RCS
15115
15116 1994-05-05 David J. MacKenzie <djm@gnu.org>
15117
15118 * Makefile.in: entered into RCS
15119
15120 1994-03-26 Richard Stallman <rms@gnu.org>
15121
15122 * src/bison.s1: entered into RCS
15123
15124 1994-03-26 Richard Stallman <rms@gnu.org>
15125
15126 * bison.simple: entered into RCS
15127
15128 1994-03-25 Richard Stallman <rms@gnu.org>
15129
15130 * src/main.c: entered into RCS
15131
15132 1994-03-24 Richard Stallman <rms@gnu.org>
15133
15134 * src/conflicts.c: entered into RCS
15135
15136 1994-01-02 Richard Stallman <rms@gnu.org>
15137
15138 * Makefile.in: *** empty log message ***
15139
15140 1993-11-21 Richard Stallman <rms@gnu.org>
15141
15142 * src/bison.s1: *** empty log message ***
15143
15144 1993-11-21 Richard Stallman <rms@gnu.org>
15145
15146 * doc/bison.texinfo: entered into RCS
15147
15148 * doc/bison.texinfo: *** empty log message ***
15149
15150 1993-11-21 Richard Stallman <rms@gnu.org>
15151
15152 * bison.simple: *** empty log message ***
15153
15154 1993-10-25 David J. MacKenzie <djm@gnu.org>
15155
15156 * doc/bison.texinfo: *** empty log message ***
15157
15158 1993-10-19 Richard Stallman <rms@gnu.org>
15159
15160 * src/bison.s1: *** empty log message ***
15161
15162 1993-10-19 Richard Stallman <rms@gnu.org>
15163
15164 * bison.simple: *** empty log message ***
15165
15166 1993-10-14 Richard Stallman <rms@gnu.org>
15167
15168 * src/bison.s1: *** empty log message ***
15169
15170 1993-10-14 Richard Stallman <rms@gnu.org>
15171
15172 * bison.simple: *** empty log message ***
15173
15174 1993-09-14 David J. MacKenzie <djm@gnu.org>
15175
15176 * doc/bison.texinfo: *** empty log message ***
15177
15178 1993-09-13 Noah Friedman <friedman@gnu.org>
15179
15180 * Makefile.in: *** empty log message ***
15181
15182 1993-09-10 Richard Stallman <rms@gnu.org>
15183
15184 * src/conflicts.c: *** empty log message ***
15185
15186 * src/system.h: entered into RCS
15187
15188 1993-09-10 Richard Stallman <rms@gnu.org>
15189
15190 * doc/bison.1: entered into RCS
15191
15192 1993-09-06 Noah Friedman <friedman@gnu.org>
15193
15194 * src/version.c: entered into RCS
15195
15196 1993-09-06 Noah Friedman <friedman@gnu.org>
15197
15198 * Makefile.in: *** empty log message ***
15199
15200 1993-07-30 David J. MacKenzie <djm@gnu.org>
15201
15202 * Makefile.in: *** empty log message ***
15203
15204 1993-07-24 Richard Stallman <rms@gnu.org>
15205
15206 * src/bison.s1: *** empty log message ***
15207
15208 1993-07-24 Richard Stallman <rms@gnu.org>
15209
15210 * bison.simple: *** empty log message ***
15211
15212 1993-07-08 David J. MacKenzie <djm@gnu.org>
15213
15214 * Makefile.in: *** empty log message ***
15215
15216 1993-07-04 Richard Stallman <rms@gnu.org>
15217
15218 * src/bison.s1: *** empty log message ***
15219
15220 1993-07-04 Richard Stallman <rms@gnu.org>
15221
15222 * bison.simple: *** empty log message ***
15223
15224 1993-06-26 David J. MacKenzie <djm@gnu.org>
15225
15226 * src/getargs.c: entered into RCS
15227
15228 1993-06-26 David J. MacKenzie <djm@gnu.org>
15229
15230 * doc/bison.texinfo: *** empty log message ***
15231
15232 * doc/bison.1: New file.
15233
15234 1993-06-25 Richard Stallman <rms@gnu.org>
15235
15236 * src/getargs.c: New file.
15237
15238 1993-06-16 Richard Stallman <rms@gnu.org>
15239
15240 * src/bison.s1: *** empty log message ***
15241
15242 1993-06-16 Richard Stallman <rms@gnu.org>
15243
15244 * bison.simple: *** empty log message ***
15245
15246 1993-06-03 Richard Stallman <rms@gnu.org>
15247
15248 * src/bison.s1: New file.
15249
15250 1993-06-03 Richard Stallman <rms@gnu.org>
15251
15252 * doc/bison.texinfo: *** empty log message ***
15253
15254 1993-06-03 Richard Stallman <rms@gnu.org>
15255
15256 * bison.simple: New file.
15257
15258 1993-05-19 Richard Stallman <rms@gnu.org>
15259
15260 * doc/bison.texinfo: New file.
15261
15262 1993-05-07 Noah Friedman <friedman@gnu.org>
15263
15264 * Makefile.in: *** empty log message ***
15265
15266 1993-04-28 Noah Friedman <friedman@gnu.org>
15267
15268 * src/reader.c: *** empty log message ***
15269
15270 1993-04-23 Noah Friedman <friedman@gnu.org>
15271
15272 * src/alloc.h: entered into RCS
15273
15274 1993-04-20 David J. MacKenzie <djm@gnu.org>
15275
15276 * src/version.c: *** empty log message ***
15277
15278 * src/files.c, src/allocate.c:
15279 entered into RCS
15280
15281 * src/reader.c: *** empty log message ***
15282
15283 * src/lex.c: entered into RCS
15284
15285 * src/conflicts.c: New file.
15286
15287 * src/symtab.c: entered into RCS
15288
15289 * src/alloc.h: New file.
15290
15291 * src/LR0.c: entered into RCS
15292
15293 1993-04-18 Noah Friedman <friedman@gnu.org>
15294
15295 * src/reader.c: New file.
15296
15297 * src/version.c: *** empty log message ***
15298
15299 1993-04-18 Noah Friedman <friedman@gnu.org>
15300
15301 * Makefile.in: *** empty log message ***
15302
15303 1993-04-17 Noah Friedman <friedman@gnu.org>
15304
15305 * Makefile.in: *** empty log message ***
15306
15307 1993-04-15 Richard Stallman <rms@gnu.org>
15308
15309 * src/main.c, src/files.c:
15310 New file.
15311
15312 1993-04-15 Noah Friedman <friedman@gnu.org>
15313
15314 * configure.in: entered into RCS
15315
15316 * configure.in: *** empty log message ***
15317
15318 * configure.in: New file.
15319
15320 1993-04-14 Richard Stallman <rms@gnu.org>
15321
15322 * Makefile.in: New file.
15323
15324 1993-04-13 Richard Stallman <rms@gnu.org>
15325
15326 * src/version.c: New file.
15327
15328 1993-03-25 Richard Stallman <rms@gnu.org>
15329
15330 * src/output.c: entered into RCS
15331
15332 1992-09-25 Richard Stallman <rms@gnu.org>
15333
15334 * configure.bat: entered into RCS
15335
15336 1992-06-22 Richard Stallman <rms@gnu.org>
15337
15338 * src/vmsgetargs.c: entered into RCS
15339
15340 1992-06-22 Richard Stallman <rms@gnu.org>
15341
15342 * doc/bison.rnh: entered into RCS
15343
15344 1992-04-20 David J. MacKenzie <djm@gnu.org>
15345
15346 * README: entered into RCS
15347
15348 1992-01-22 Richard Stallman <rms@gnu.org>
15349
15350 * src/machine.h: entered into RCS
15351
15352 1991-12-21 Richard Stallman <rms@gnu.org>
15353
15354 * src/lalr.c, src/closure.c:
15355 entered into RCS
15356
15357 1991-12-20 Richard Stallman <rms@gnu.org>
15358
15359 * src/state.h: entered into RCS
15360
15361 1991-12-18 Richard Stallman <rms@gnu.org>
15362
15363 * src/print.c, src/nullable.c, src/derives.c:
15364 entered into RCS
15365
15366 1991-11-03 David J. MacKenzie <djm@gnu.org>
15367
15368 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
15369 entered into RCS
15370
15371 1988-09-09 Richard Stallman <rms@gnu.org>
15372
15373 * src/bison.hairy: entered into RCS
15374
15375 1987-12-16 Richard Stallman <rms@gnu.org>
15376
15377 * REFERENCES: entered into RCS
15378
15379
15380 -----
15381
15382 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
15383 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
15384 Software Foundation, Inc.
15385
15386 Copying and distribution of this file, with or without
15387 modification, are permitted provided the copyright notice and this
15388 notice are preserved.