]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/glr.c (yysplitStack): A little stylistic rewrite.
[bison.git] / ChangeLog
1 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2
3 * data/glr.c (yysplitStack): A little stylistic rewrite.
4
5 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6
7 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8
9 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
10
11 * doc/bison.texinfo: Fix some typos.
12 (GLR Semantic Actions): New subsection discussing special
13 considerations because GLR semantic actions might be deferred.
14 (Actions): Mention look-ahead usage of yylval.
15 (Actions and Locations): Mention look-ahead usage of yylloc.
16 (Special Features for Use in Actions): Add YYEOF entry and mention it
17 in the yychar entry.
18 In the yychar entry, remove mention of the local yychar case (pure
19 parser) since this is irrelevant information when writing semantic
20 actions and since it's already discussed in `Bison Symbols' where
21 yychar is otherwise described as an external variable.
22 In the yychar entry, don't call it the `current' look-ahead since it
23 isn't when semantic actions are deferred.
24 In the yychar and yyclearin entries, add note about deferred semantic
25 actions.
26 Add yylloc and yylval entries discussing look-ahead usage.
27 (Look-Ahead Tokens): When discussing yychar, don't call it the
28 `current' look-ahead, and do mention yylval and yylloc.
29 (Error Recovery): Cross-reference `Action Features' when mentioning
30 yyclearin.
31 (Bison Symbols): In the yychar entry, don't call it the `current'
32 look-ahead.
33 In the yylloc and yylval entries, mention look-ahead usage.
34
35 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
36
37 * tests/glr-regression.at: Update copyright year to 2006.
38
39 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
40
41 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
42 use during nondeterministic operation to track which stacks have
43 actually needed the current lookahead.
44 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
45 Allocate, deallocate, resize, and otherwise shuffle space for
46 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
47 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
48 appropriately during nondeterministic operation.
49 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
50 members to store the current lookahead to be used by the deferred
51 user action.
52 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
53 from which the RHS is taken. Set the lookahead members of the new
54 yySemanticOption according to the lookahead status for stack yyk.
55 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
56 yyaddDeferredAction.
57 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
58 members of yySemanticOption before invoking yyuserAction, and then set
59 them back to their current values afterward.
60 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
61 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
62 * tests/glr-regression.at: Remove `.' from the ends of recent test case
63 titles for consistency.
64 (Leaked merged semantic value if user action cuts parse): In order to
65 suppress lint warnings, use arguments in merge function, and assign
66 char value < 128 in main.
67 (Incorrect lookahead during deterministic GLR): New test case.
68 (Incorrect lookahead during nondeterministic GLR): New test case.
69
70 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
71
72 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
73 !yyvaluep as signal that no semantic value is available to print.
74 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
75 to print a semantic value.
76
77 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
78
79 * tests/glr-regression.at: For consistency with my newer test cases,
80 don't thank myself.
81
82 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
83
84 * data/glr.c (yyresolveValue): When merging semantic options, if at
85 least one user action succeeds but a later one cuts the parse, then
86 destroy the semantic value before returning rather than leaking it.
87 (yyresolveStates): If a user action cuts the parse and thus
88 yyresolveValue fails, ignore the (unset) semantic value rather than
89 corrupting the yyGLRState, and empty the semantic options list since
90 the user actions should have called all necessary destructors.
91 Simplify code with YYCHK.
92 * tests/glr-regression.at (Corrupted semantic options if user action
93 cuts parse): New test case.
94 (Undesirable destructors if user action cuts parse): New test case.
95 Before applying any of this patch, this test case never actually failed
96 for me... but only because the corrupted semantic options usually
97 masked this bug.
98 (Leaked merged semantic value if user action cuts parse): New test
99 case.
100
101 2006-01-05 Akim Demaille <akim@epita.fr>
102
103 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
104
105 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
106
107 * data/c.m4 (b4_c_modern): New macro, with a new provision for
108 _MSC_VER. Problem reported by Cenzato Marco.
109 (b4_c_function_def): Use it.
110 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
111 b4_c_modern.
112 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
113 than rolling our own.
114
115 2006-01-04 Akim Demaille <akim@epita.fr>
116
117 Also warn about non-used mid-rule values.
118 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
119 member.
120 (symbol_list_new): Adjust.
121 * src/reader.c (symbol_typed_p): New.
122 (grammar_rule_check): Use it.
123 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
124 Check its rule.
125 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
126 Use it.
127 * tests/actions.at (Exotic Dollars): Adjust.
128
129 2006-01-04 Akim Demaille <akim@epita.fr>
130
131 * src/reader.c (grammar_midrule_action): If $$ is set in a
132 mid-rule, move the `used' bit to its lhs.
133 * tests/input.at (Unused values): New.
134 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
135
136 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
137
138 * doc/bison.texinfo (Bison Options): Say more accurately what
139 --yacc does.
140 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
141 about declarations in the grammar when in Yacc mode, as POSIX does
142 not require a diagnostic when the grammar uses extensions.
143
144 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
145
146 Warn about dubious constructions like "%token T T".
147 Reported by twlevo.
148 * src/symtab.h (struct symbol.declared): New member.
149 * src/symtab.c (symbol_new): Initialize it to false.
150 (symbol_class_set): New arg DECLARING, specifying whether
151 this is a declaration that we want to warn about, if there
152 is more than one of them. All uses changed.
153
154 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
155 Allow multiple %union directives, whose contents concatenate.
156 * src/parse-gram.y (grammar_declaration): Likewise.
157 Use muscle_code_grow, so that we don't need stype_line any more.
158 All uses changed.
159
160 * src/muscle_tab.c (muscle_grow): Fix comment.
161
162 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
163 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
164 Update copyright year to 2006.
165
166 2006-01-03 Akim Demaille <akim@epita.fr>
167
168 Have glr.cc pass (some of) the calc.at tests.
169 * data/glr.cc (b4_parse_param_orig): New.
170 (b4_parse_param): Improve its definition, and bound it more
171 clearly in the skeleton.
172 (b4_epilogue): Append, instead of prepending, in order to keep
173 #line consistency.
174 Simplify the generation of auxiliary functions: locations and
175 purity are mandated.
176 (b4_global_tokens_and_yystype): Honor it.
177 * data/location.cc (c++.m4): Don't include it.
178 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
179 and AT_SKEL_CC_IF.
180 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
181 AT_LALR1_CC_IF.
182 Be sure to initialize the first position's filename.
183 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
184 mandated anyway.
185 (AT_CHECK_CALC_GLR_CC): New.
186 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
187
188 2006-01-02 Akim Demaille <akim@epita.fr>
189
190 * src/output.c (output_skeleton): Don't hard wire the inclusion of
191 c.m4.
192 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
193 * data/glr.cc: Do not include stack.hh.
194
195 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
196
197 * data/glr.c: Reformat whitespace with tabs.
198 (b4_lpure_formals): Remove this unused m4 macro.
199 * tests/cxx-type.at: Reformat whitespace with tabs.
200 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
201 since it's a member. Rename type to isNterm for clarity.
202
203 2005-12-29 Akim <akim@sulaco.local>
204
205 Let glr.cc catch up with symbol_value_print.
206 * data/glr.cc (b4_yysymprint_generate): Replace by...
207 (b4_yy_symbol_print_generate): this.
208 (yy_symbol_print, yy_symbol_value_print): Declare them.
209
210 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
211
212 * src/location.h (boundary): Note that a line or column equal
213 to INT_MAX indicates an overflow.
214 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
215 (rule_length_overflow, increment_rule_length, add_column_width):
216 New functions.
217 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
218 (<SC_BRACED_CODE>"}"):
219 Use increment_rule_length rather than incrementing it by hand.
220 (adjust_location, handle_syncline): Diagnose overflow.
221 (handle_action_dollar, handle_action_at):
222 Fix bug with monstrosities like $-2147483648.
223 Remove now-unnecessary checks.
224 (scan_integer): Verify assumptions and remove now-unnecessary checks.
225 (convert_ucn_to_byte): Verify assumptions.
226 (handle_syncline): New arg LOC. All callers changed.
227 Don't store through a value derived from char const * pointer.
228
229 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
230 GCC warnings.
231
232 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
233
234 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
235 Remove unnecessary forward static decls.
236
237 2005-12-27 Akim Demaille <akim@epita.fr>
238
239 * src/reader.c (grammar_current_rule_check): Also check that $$
240 is used.
241 Take the rule to check as argument, hence rename as...
242 (grammar_rule_check): this.
243 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
244 Rename as...
245 (grammar_rule_begin, grammar_rule_end): these, for consistency.
246 (grammar_midrule_action, grammar_symbol_append): Now static.
247 * tests/torture.at (input): Don't rely on the default action
248 being always performed.
249 * tests/calc.at: "Set" $$ even when the action is "cut" with
250 YYERROR or other.
251 * tests/actions.at (Exotic Dollars): Instead of using unused
252 values, check that the warning is issued.
253
254 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
255
256 * NEWS: Improve wording for unused-value warnings.
257
258 2005-12-22 Akim Demaille <akim@epita.fr>
259
260 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
261 (b4_yysymprint_generate): Rename as...
262 (b4_yy_symbol_print_generate): this.
263 Generate yy_symbol_print instead of yysymprint.
264 Generate also yy_symbol_value_print, and use it.
265
266 2005-12-22 Akim Demaille <akim@epita.fr>
267
268 * NEWS: Warn about unused values.
269 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
270 a `used' member.
271 (symbol_list_n_get, symbol_list_n_used_set): New.
272 (symbol_list_n_type_name_get): Use symbol_list_n_get.
273 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
274 * src/reader.c (grammar_current_rule_check): Check that values are
275 used.
276 * src/symtab.c (symbol_print): Accept 0.
277 * tests/existing.at: Remove the type information.
278 Empty the actions.
279 Remove useless actions (beware of mid-rule actions: perl -000
280 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
281 * tests/actions.at (Exotic Dollars): Use unused values.
282 * tests/calc.at: Likewise.
283 * tests/glr-regression.at (No users destructors if stack 0 deleted):
284 Likewise.
285
286 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
287 rule_useful_p.
288
289 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
290
291 Undo 2005-12-01 tentative license wording change. The wording is
292 still being reviewed by the lawyers, and we don't want to wait for
293 them before publishing a test release. For now, revert to the
294 previous wording.
295 * NEWS: Undo 2005-12-01 change.
296 * data/glr.c: Revert to previous license wording.
297 * data/glr.cc: Likewise.
298 * data/lalr1.cc: Likewise.
299 * data/location.cc: Likewise.
300 * data/yacc.c: Likewise.
301
302 * NEWS: Reword %destructor vs YYABORT etc.
303 * data/glr.c: Use American spacing, for consistency.
304 * data/glr.cc: Likewise.
305 * data/lalr1.cc: Likewise.
306 * data/yacc.c: Likewise.
307 * data/yacc.c: Reformat comments slightly.
308 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
309 for consistency. Fix some spelling errors and reword recently-included
310 text slightly.
311 * tests/cxx-type.at: Cast results of malloc, for C++.
312
313 2005-12-21 Joel E. Denny <address@hidden>
314
315 * tests/cxx-type.at: Construct a tree, count the parents of shared
316 nodes, and free each node once and only once. Previously, the memory
317 for semantic values was leaked instead.
318
319 2005-12-21 Joel E. Denny <address@hidden>
320
321 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
322 (yylval, yylloc): If pure, #define to yystackp->yyval and
323 yystackp->yyloc similar to yychar and yynerrs.
324 (yyparse): If pure, remove local yylval and yylloc. Add local
325 yystackp to accommodate pure definitions of yylval and yylloc.
326 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
327 yylvalp and yyllocp to &yylval and &yylloc.
328 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
329 namespace. Previously, nerrs and char were missing, but lval and lloc
330 weren't necessary.
331 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
332 yylvalp and yyllocp parameters since, if pure, these are now always
333 accessible through yystackp. If not pure, they are still accessible
334 globally.
335 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
336 `if (YYID (N))' to pacify lint.
337
338 2005-12-21 Akim Demaille <akim@epita.fr>
339
340 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
341 destroy the RHS symbols of a rule.
342 * data/yacc.c (yylen): Initialize to 0.
343 Keep its value to the number of items to possibly shift.
344 In particular, a regular successful parse that ends on YYFINAL by
345 a (internal) YYACCEPT must not have yylen != 0.
346 (yyerrorlab, yyreturn): Pop the RHS.
347 Reorder a bit to emphasize the `shifting' bits of code.
348 (YYPOPSTACK): Now accept a number of items to pop.
349 * data/lalr1.cc: Likewise.
350 * data/glr.c: Formatting changes.
351 Use goto instead of fall through.
352 * doc/bison.texinfo (Destructor Decl): Complete.
353
354 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
355
356 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
357 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
358 * djgpp/config.bat: Replace every occurence of the file name
359 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
360 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
361 * djgpp/config.sed: Replace every occurence of the file name
362 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
363 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
364 * djgpp/djunpack.bat: DJGPP specific file.
365 * djgpp/fnchange.lst: DJGPP specific file.
366 * djgpp/README.in: Add new information about how to unpack the bison
367 source on MSDOS and other systems which have 8.3 file name restrictions
368 using djunpack.bat and fnchange.lst.
369
370 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
371
372 * bootstrap (build_cvs_prefix): Remove; unused.
373 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
374 when getting gnulib.
375
376 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
377
378 * data/glr.c: Reorder typedef declarations for structs to match order
379 of struct declarations.
380 Rename yystack everywhere to yystackp except in yyparse where it's not
381 a pointer.
382 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
383 consistency.
384 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
385 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
386 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
387 lint.
388
389 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
390
391 * tests/sets.at (Accept): Fix typos in regular expression used to
392 sed out the final state number.
393
394 Work around portability problem on Solaris 10: flex-generated
395 files include <stdio.h> before <config.h>, which messes up
396 because the latter defines __EXTENSIONS__. Address the problem
397 by creating two new little files that include <config.h> first,
398 then include the flex-generated files. Rewrite everyone else
399 to include <config.h> first, as well.
400 * lib/timevar.c: Always include "config.h".
401 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
402 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
403 (EXTRA_bison_SOURCES): New macro.
404 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
405 * src/system.h: Don't include config.h.
406 * src/LR0.c: Include <config.h> first.
407 * src/assoc.c: Likewise.
408 * src/closure.c: Likewise.
409 * src/complain.c: Likewise.
410 * src/conflicts.c: Likewise.
411 * src/derives.c: Likewise.
412 * src/files.c: Likewise.
413 * src/getargs.c: Likewise.
414 * src/gram.c: Likewise.
415 * src/lalr.c: Likewise.
416 * src/location.c: Likewise.
417 * src/main.c: Likewise.
418 * src/muscle_tab.c: Likewise.
419 * src/nullable.c: Likewise.
420 * src/output.c: Likewise.
421 * src/parse-gram.y: Likewise.
422 * src/print.c: Likewise.
423 * src/print_graph.c: Likewise.
424 * src/reader.c: Likewise.
425 * src/reduce.c: Likewise.
426 * src/relation.c: Likewise.
427 * src/state.c: Likewise.
428 * src/symlist.c: Likewise.
429 * src/symtab.c: Likewise.
430 * src/tables.c: Likewise.
431 * src/uniqstr.c: Likewise.
432 * src/vcg.c: Likewise.
433
434 * src/parse-gram.y: Fix minor problems uncovered by lint.
435 (current_lhs, current_lhs_location): Now static.
436 (current_assoc): Remove unused variable.
437
438 Cleanups so that Bison-generated parsers have less lint.
439 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
440 Prepend /*ARGSUSED*/, for lint's sake.
441 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
442 definition if 'lint' is defined.
443 (YYID): New macro (or function, if lint).
444 All uses of /*CONSTCOND*/0 replaced by YYID(0).
445 * data/yacc.c: Likewise.
446 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
447 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
448 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
449 is C++ only.
450 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
451 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
452 Use YYID(0) rather than 0, for lint.
453 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
454 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
455
456 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
457
458 * tests/glr-regression.at
459 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
460 Close memory leak reported by twlevo.
461
462 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
463
464 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
465 all stacks.
466 (yyparse): Iterate another stack in order to call user destructors.
467 * tests/glr-regression.at (No users destructors if stack 0 deleted):
468 New test case.
469 (Duplicated user destructor for lookahead): This test now is expected
470 to succeed.
471
472 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
473
474 * NEWS: Document the following change.
475 * data/yacc.c: Say "parser skeleton" rather than "file", since
476 it's no longer just a file.
477 * data/glr.c: Grant a special exception for C GLR parsers, that
478 reads like the already-existing exception for C LALR(1) parsers.
479 * data/glr.cc: Likewise.
480 * data/lalr1.cc: Likewise.
481 * data/location.cc: Likewise.
482 * data/yacc.c: Reword the "written by" statement to clarify that
483 it was the parser skeleton, not the entire output file.
484 * data/glr.c: Written by Paul Hilfinger.
485 * data/glr.cc: Written by Akim Demaille.
486 * data/lalr1.cc: Likewise.
487
488 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
489
490 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
491 Fix typos in previous change that broke 'make check'.
492 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
493 supported in C.
494 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
495 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
496 We can revert this once things settle down.
497
498 * src/conflicts.c (conflicts_print): Don't print file name twice
499 when %expect fails because there were no conflicts.
500 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
501 change.
502 * tests/conflicts.at (%expect not enough, %expect too much):
503 (%expect with reduce conflicts): Adjust to new behavior.
504
505 2005-11-18 Akim Demaille <akim@epita.fr>
506
507 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
508 errors.
509 * NEWS: Document this.
510 * doc/bison.texinfo (Expect Decl): Likewise.
511
512 2005-11-16 Akim Demaille <akim@epita.fr>
513
514 Generalize the display of semantic values and locations in traces.
515 * data/glr.c (yy_reduce_print): Fix indices (again).
516 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
517 literal integers.
518 * data/lalr1.cc (yyreduce_print): Rename as...
519 (yy_reduce_print): this.
520 Display values and locations.
521 * data/yacc.c (yy_reduce_print): Likewise.
522 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
523 (yysymprint): Move higher to be visible from yy_reduce_print).
524 (yyparse): Adjust.
525 * tests/calc.at: Adjust the expected length of the traces.
526
527 2005-11-14 Akim Demaille <akim@epita.fr>
528
529 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
530 from 1 to N, while values and location start at 0.
531 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
532
533 2005-11-14 Akim Demaille <akim@epita.fr>
534
535 * data/glr.c (yy_reduce_print): Fix the $ number.
536
537 2005-11-14 Akim Demaille <akim@epita.fr>
538
539 "Use" parse parameters.
540 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
541 * data/glr.c, data/glr.cc: Use them.
542 * data/glr.c (YYUSE): Have a C++ definition that supports
543 non-pointer types.
544
545 2005-11-14 Akim Demaille <akim@epita.fr>
546
547 * data/glr.c (yyexpandGLRStack): Declare only if defined.
548
549 2005-11-14 Akim Demaille <akim@epita.fr>
550
551 * data/glr.cc: New.
552 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
553
554 2005-11-12 Akim Demaille <akim@epita.fr>
555
556 Let position and location be PODs.
557 * data/location.cc (position::initialize, location::initialize): New.
558 (position::position, location::location): Define only if
559 b4_location_constructors is defined.
560 * data/lalr1.cc (b4_location_constructors): Define it for backward
561 compatibility.
562 * doc/bison.texinfo (Initial Action Decl): Use initialize.
563
564 2005-11-12 Akim Demaille <akim@epita.fr>
565
566 * data/lalr1.cc: Move the body of the ctor and dtor into the
567 parser file (instead of the header).
568 Wrap the implementations in a "namespace yy".
569
570 2005-11-12 Akim Demaille <akim@epita.fr>
571
572 Have glr.c include its header file when created.
573 * data/glr.c (b4_shared_declarations): New.
574 Output them verbatim in the parser if !%defines, otherwise
575 output then in the header file, and include it instead.
576
577 2005-11-11 Akim Demaille <akim@epita.fr>
578
579 * data/glr.c: Comment changes.
580
581 2005-11-11 Akim Demaille <akim@epita.fr>
582
583 When yydebug, report semantic and location values for reductions.
584 * data/glr.c (yy_reduce_print): Report the semantic values and the
585 locations.
586 (YY_REDUCE_PRINT): Adjust.
587 (yyglrReduce): Use them.
588 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
589 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
590 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
591 traces.
592
593 2005-11-10 Akim Demaille <akim@epita.fr>
594
595 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
596 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
597 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
598
599 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
600
601 * m4/cxx.m4, examples/Makefile.am: Don't build
602 examples/calc++ if no C++ compiler is available. (trivial change)
603
604 2005-11-09 Akim Demaille <akim@epita.fr>
605
606 * src/scan-skel.l: Use a couple of asserts.
607
608 2005-11-03 Akim Demaille <akim@epita.fr>
609
610 In some (weird) cases, the final state number is incorrect.
611 Reported by Alexandre Duret-Lutz.
612 * src/LR0.c (state_list_append): Remove the computation of
613 final_state.
614 (save_reductions): Do it here.
615 (get_state): Alpha conversion.
616 (generate_states): Use a for loop.
617 * src/gram.h (item_number_is_rule_number)
618 (item_number_is_symbol_number): New.
619 * src/state.c: Use assert.
620 * src/system.h: Include assert.h.
621 * tests/sets.at (Accept): New.
622
623 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
624
625 * data/glr.c (yyfill): Adjust comment.
626 (yyresolveAction): Initialize default location properly
627 for empty right-hand sides.
628 (yydoAction): Ditto.
629 Add comment explaining apparently dead code.
630 * tests/glr-regression.at
631 (Incorrectly initialized location for empty right-hand side in GLR):
632 New test.
633
634 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
635
636 * bootstrap (cleanup_gnulib): New function. Use it to clean up
637 gnulib when interrupted. This fixes some race conditions and
638 works around some portability problems (one noted by Paul
639 Hilfinger).
640
641 2005-10-22 Akim <akim@epita.fr>
642
643 * Makefile.cfg: Adjust to config -> build-aux.
644 Reported by twledo.
645
646 2005-10-21 Akim Demaille <akim@epita.fr>
647
648 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
649 the %parse-params.
650 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
651 * data/yacc.c (b4_Pure_if): Rename as...
652 (b4_yacc_pure_if): this.
653 (YY_SYMBOL_PRINT, yyparse): Adjust.
654 * doc/bison.texinfo: Formatting changes.
655
656 2005-10-21 Akim Demaille <akim@epita.fr>
657
658 Finish the transition config -> build-aux.
659 * configure.ac, Makefile.am: Use build-aux.
660 * config/prev-version, config/announce-gen, config/Makefile.am:
661 Move to...
662 * build-aux/prev-version, build-aux/announce-gen,
663 * build-aux/Makefile.am: here.
664
665 2005-10-14 Akim Demaille <akim@epita.fr>
666
667 * examples/calc++/test: Use set -x only when VERBOSE.
668
669 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
670
671 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
672 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
673
674 2005-10-13 Akim Demaille <akim@epita.fr>
675
676 * src/scan-skel.l: Output the base name parts of the parser and
677 header file names.
678 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
679 additional checks.
680 Use this to exercise C++ outputs in subdirs.
681 Reported by Oleg Smolsky.
682
683 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
684
685 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
686 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
687 Problem reported by John P. Hartmann.
688 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
689 already defined it.
690
691 2005-10-12 Akim Demaille <akim@epita.fr>
692
693 * src/parse-gram.y (version_check): Exit 63 to please missing
694 (stands for "version mismatch).
695 * tests/input.at, doc/bison.texinfo: Adjust.
696
697 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
698
699 Work around portability problems with Visual Age C compiler
700 (xlc and xlC_r) reported by John P. Hartmann.
701 * data/location.cc (initial_column, initial_line): Remove.
702 All uses replaced by 0 and 1.
703 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
704 that xlc complains about.
705 * src/scan-skel.l (skel_wrap): Likewise.
706 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
707 as __STDC__.
708 * data/yacc.c (YYMODERN_C): New macro, which also looks at
709 __STDC_VERSION__. Use it everywhere instead of looking at
710 __STDC__ and __cplusplus.
711
712 2005-10-10 Akim Demaille <akim@epita.fr>
713
714 * examples/calc++/test: Be quiet unless VERBOSE.
715
716 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
717
718 * data/c.m4 (yydestruct, yysymprint):
719 Use YYUSE instead of casting to void.
720 * data/glr.c (YYUSE): New macro.
721 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
722 Use it instead of rolling our own.
723 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
724 (YYCHK1):
725 Use /*CONSTCOND*/ to suppress lint warnings.
726 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
727 (YY_STACK_PRINT): Use 'false' not '0'.
728 (YYUSE): New macro.
729 (yysymprint_, yydestruct_): Use it instead of rolling our own.
730 * data/yacc.c (YYUSE): New macro.
731 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
732 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
733 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
734
735
736 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
737 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
738
739 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
740
741 Undo the parts of the unlocked-I/O change that substituted
742 putc or puts for printf. This might hurt performance a bit,
743 but some people prefer the printf style.
744 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
745 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
746 All uses replaced by YYFPRINTF and YYDPRINTF.
747 * data/yacc.c: Likewise.
748 * lib/bitset.c (bitset_print): Likewise.
749 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
750 putc and puts.
751 * lib/lbitset.c (debug_lbitset): Likewise.
752 * src/closure.c (print_firsts, print_fderives): Likewise.
753 * src/gram.c (grammar_dump): Likewise.
754 * src/lalr.c (look_ahead_tokens_print): Likewise.
755 * src/output.c (escaped_output): Likewise.
756 (user_actions_output): Break apart two printfs.
757 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
758 * src/reduce.c (reduce_print): Likewise.
759 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
760 * src/system.h: Include unlocked-io.h rathe than stdio.h.
761
762 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
763 Use assignments rather than casts-to-void to suppress
764 unused-variable warnings. This pacifies 'lint'.
765 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
766 unused-variable warnings.
767
768 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
769
770 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
771
772 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
773
774 Use unlocked I/O for a minor performance improvement on hosts like
775 GNU/Linux and Solaris that support unlocked I/O. The basic idea
776 is to use the gnlib unlocked-io module, and to prefer putc and
777 puts to printf when either will work (since the latter doesn't
778 come in an unlocked flavor).
779 * bootstrap (gnulib_modules): Add unlocked-io.
780 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
781 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
782 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
783 and similarly for puts and putc and printf.
784 * data/yacc.c: Likewise.
785 * lib/bitset.c (bitset_print): Likewise.
786 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
787 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
788 to printf.
789 * lib/lbitset.c (debug_lbitset): Likewise.
790 * src/closure.c (print_firsts, print_fderives): Likewise.
791 * src/gram.c (grammar_dump): Likewise.
792 * src/lalr.c (look_ahead_tokens_print): Likewise.
793 * src/output.c (escaped_output): Likewise.
794 (user_actions_output): Coalesce two printfs.
795 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
796 * src/reduce.c (reduce_print): Likewise.
797 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
798 * src/system.h: Include unlocked-io.h rather than stdio.h.
799
800 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
801 this confuses xgettext.
802
803 2005-10-02 Akim Demaille <akim@epita.fr>
804
805 * bootstrap (gnulib_modules): Add strverscmp.
806 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
807 * m4/.cvsignore: Add strverscmp.m4.
808 * src/parse-gram.y (%require): New token, new rule.
809 (version_check): New.
810 * src/scan-gram.l (%require): Adjust.
811 * tests/input.at (AT_REQUIRE): New.
812 Use it.
813 * doc/bison.texinfo (Require Decl): New.
814 (Calc++ Parser): Use %require.
815
816 2005-10-02 Akim Demaille <akim@epita.fr>
817
818 * data/location.cc: New.
819
820 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
821 Akim Demaille <akim@epita.fr>
822
823 Make sure -odir/foo.cc creates dir/location.hh etc.
824 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
825 (spec_file_prefix, spec_verbose_file, spec_graph_file)
826 (spec_defines_file): Now const.
827 (dir_prefix): New.
828 (short_base_name): Remove.
829 * src/files.c: Adjust.
830 (dirname.h): Include.
831 (base_name): Don't prototype it.
832 (finput): Remove, duplicates gram_in.
833 (full_base_name, short_base_name): Replace by...
834 (all_but_ext, all_but_tab_ext): these.
835 (compute_base_names): Rename as...
836 (compute_file_name_parts): this.
837 Update to compute the new variables, including dir_prefix.
838 Adjust dependencies.
839 * src/output.c (prepare): Output them.
840 * src/reader.c: Adjust to use gram_in, not finput.
841 * src/scan-skel.l (@dir_prefix@): New.
842
843 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
844
845 * lib/subpipe.c: New function end_of_output_subpipe() added
846 to allow support for non-posix systems. This is a no-op function
847 for posix systems.
848
849 * lib/subpipe.h: New function end_of_output_subpipe() added
850 to allow support for non-posix systems. This is a no-op function
851 for posix systems.
852
853 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
854 handle the lack of pipe/fork functionality on non-posix systems.
855
856 * djgpp/Makefile.maint: DJGPP specific file.
857
858 * djgpp/README.in: DJGPP specific file.
859
860 * djgpp/config.bat: DJGPP specific configuration file.
861
862 * djgpp/config.sed: DJGPP specific configuration file.
863
864 * djgpp/config.site: DJGPP specific configuration file.
865
866 * djgpp/config_h.sed: DJGPP specific configuration file.
867
868 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
869
870 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
871
872 2005-10-02 Akim Demaille <akim@epita.fr>
873
874 * data/location.cc: New, extract from...
875 * data/lalr1.cc: here.
876 (location.hh): Include it after the user prologue, in case the
877 filename type is defined by the user.
878 Forward declation location and position before the pre-prologue.
879 (yyresult_): Rename as...
880 (yyresult): this, it's a local variable, not an attribute.
881 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
882
883 2005-10-01 Akim Demaille <akim@epita.fr>
884
885 * examples/extexi: Restore the #line generation.
886
887 2005-09-30 Akim Demaille <akim@epita.fr>,
888 Alexandre Duret-Lutz <adl@gnu.org>
889
890 Move the token type and YYSTYPE in the parser class.
891 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
892 (parser::token): New, from the moved free definition of tokens.
893 (parser::semantic_value): Now a full definition instead of an
894 indirection to YYSTYPE.
895 (b4_post_prologue): No longer included in the header file, but
896 in the implementation file.
897 * doc/bison.texi (C+ Language Interface): Update.
898 * src/parse-gram.y: Support unary %define.
899 * tests/actions.at: Define global_tokens_and_yystype for backward
900 compatibility until we update the tests.
901 * tests/calc.at: Idem.
902 (first_line, first_column, last_line, last_column): Define for lalr1.cc
903 to simplify the code.
904
905 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
906
907 Port to SunOS 4.1.4, which lacks strtoul and strerror.
908 Ah, the good old days! Problem reported by Peter Klein.
909 * bootstrap (gnulib_modules): Add strerror, strtoul.
910 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
911 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
912
913 2005-09-29 Akim Demaille <akim@epita.fr>
914
915 * data/c.m4 (b4_error_verbose_if): New.
916 * data/lalr1.cc: Use it.
917 (YYERROR_VERBOSE_IF): Remove.
918 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
919 parser members, replaced by...
920 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
921 local variables.
922 (yysyntax_error_): Takes the state number as argument.
923 (yyreduce_print_): Use the argument yyrule, not the former
924 attribute yyn_.
925
926 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
927
928 * bootstrap (gnulib_modules): Add verify.
929 * lib/.cvsignore: Add verify.h.
930 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
931 * src/system.h (verify): Remove.
932 Include verify.h instead.
933 * src/tables.c (tables_generate): Use new API for 'verify'.
934
935 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
936
937 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
938 local variables whose names begin with 'yy'.
939 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
940 Trivial changes from Joel E. Denny.
941
942 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
943 it itself.
944 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
945 don't use alloca any more.
946
947 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
948 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
949 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
950 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
951 to match yacc.c, to test more hosts.
952
953 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
954
955 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
956 doesn't affect behavior.
957 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
958 Solaris, AIX, MSC.
959 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
960 This works a bit better with glibc, if user code has already included
961 stdlib.h.
962 * doc/bison.texinfo (Bison Parser): Document that users can't
963 arbitrarily use malloc and free for other purposes. Document
964 that <alloca.h> and <malloc.h> might be included.
965 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
966 user must declare alloca.
967
968 * HACKING (release): Forwarn the Translation Project about
969 stable releses.
970
971 2005-09-20 Akim Demaille <akim@epita.fr>
972
973 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
974
975 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
976
977 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
978 (YYSTACK_ALLOC_MAXIMUM): Use it.
979 (yysyntax_error): New function.
980 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
981 multiple syntax errors are reported, and alloca is being used.
982 Instead, reallocate buffers twice as big each time, so that
983 we waste at most half the allocated memory. Start with a small
984 (128-byte) buffer that will suffice in most cases anyway.
985 Use yysyntax_error to do most of the work.
986
987 * doc/bison.texinfo (Error Reporting, Table of Symbols):
988 yynerrs is the number of errors reported, not the number of
989 errors encountered.
990
991 * tests/glr-regression.at (Duplicated user destructor for lookahead):
992 Mark it as expected to fail.
993 Cast result of malloc; problem reported by twlevo@xs4all.nl.
994 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
995 Don't start user-code symbols with "yy", to avoid name space problems.
996
997 2005-09-19 Akim Demaille <akim@epita.fr>
998
999 Remove the traits, failed experiment.
1000 It never proved useful, and anyway because of the current
1001 definition, it was not possible to have several specialization of
1002 this traits, making it useless.
1003 * data/lalr1.cc (yy:traits): Remove.
1004 Inline its definitions in the parser class.
1005
1006 2005-09-19 Akim Demaille <akim@epita.fr>
1007
1008 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
1009 least Mac OSX with a /usr/local install of gettext.
1010
1011 2005-09-19 Akim Demaille <akim@epita.fr>
1012
1013 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
1014 and yytoken for similarity with the other skeletons.
1015
1016 2005-09-19 Akim Demaille <akim@epita.fr>
1017
1018 * NEWS, configure.ac: Bump to 2.1a.
1019
1020 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
1021
1022 * NEWS: Version 2.1.
1023
1024 * NEWS: Remove notice of yytname change, since it was never in an
1025 official release.
1026 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
1027 diagnostic.
1028 * src/output.c (prepare): Likewise.
1029 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
1030 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
1031 is not defined. This is an awful hack, but it's enough for now.
1032 All callers changed.
1033 * tests/glr-regression-at (make_value): Args are const pointers now,
1034 to avoid GCC warning.
1035 (Duplicated user destructor for lookahead): New test. Currently
1036 skipped. It fails on my host but I'm not sure it'll always fail.
1037
1038 2005-09-16 Akim Demaille <akim@epita.fr>
1039
1040 * src/symtab.h (struct symbol): Declare the printer and destructor
1041 as const, to avoid accidental calls to free.
1042 (symbol_destructor_set, symbol_printer_set): Adjust.
1043 * src/symtab.c: Adjust.
1044
1045 2005-09-16 Akim Demaille <akim@epita.fr>
1046
1047 * data/c.m4 (b4_token_enums): New.
1048 (b4_token_defines): Rename as...
1049 (b4_token_enums_defines): this.
1050 (b4_token_defines): New, output only the #defines.
1051 * data/yacc.c, data/glr.c: Adjust.
1052 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
1053 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
1054 as default values.
1055
1056 2005-09-16 Akim Demaille <akim@epita.fr>
1057
1058 * data/lalr1.cc (yylex_): Remove, inline its code.
1059 (yyreport_syntax_error_): Remove, replaced by...
1060 (yysyntax_error_): this which returns a string and leaves to the
1061 caller the call to the users' error function.
1062 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
1063 Move from members of the parser object...
1064 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
1065 to local variables of the parse function.
1066
1067 2005-09-16 Akim Demaille <akim@epita.fr>
1068
1069 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
1070 since it's in Bison's name space.
1071
1072 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
1073
1074 * data/glr.c (yyresolveValue): Add default case to pacify
1075 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
1076
1077 * NEWS: Document when yyparse started to return 2.
1078 * doc/bison.texinfo (Parser Function): Document when yyparse
1079 returns 2.
1080
1081 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
1082 (b4_filename_type): Renamed back from b4_file_name_type. All uses
1083 changed.
1084 (class position): file_name -> filename (reverting). All uses changed.
1085
1086 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
1087
1088 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
1089 do anything if $@ exists. This reverts part of the 2005-07-07
1090 patch.
1091
1092 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
1093
1094 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
1095 contains obsolete information and isn't worth distributing as a
1096 separate file anyway.
1097 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
1098 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
1099 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
1100 (yyparse): Abort if user code uses longjmp to throw an unexpected
1101 value.
1102
1103 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
1104
1105 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
1106 Suggested by twlevo@xs4all.nl.
1107
1108 * data/glr.c (YYCHK1): Do not assume YYE is in range.
1109 This avoids a diagnostic from gcc -Wswitch-enum.
1110 Problem reported by twlevo@xs4all.nl.
1111
1112 * doc/bison.texinfo: Don't use "filename", as per GNU coding
1113 standards. Use "file name" or "file" or "name", depending on
1114 the context.
1115 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
1116 not to hack/foo.tab.c.
1117 (Calc++ Top Level): 2nd arg of main is not const.
1118 * data/glr.c: b4_filename -> b4_file_name.
1119 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
1120 All uses changed.
1121 (class position): filename -> file_name. All uses changed.
1122 * data/yacc.c: b4_filename -> b4_file_name.
1123 * lib/bitset.h: filename -> file_name in local vars.
1124 * lib/bitset_stats.c: Likewise.
1125 * src/files.c: Likewise.
1126 * src/scan-skel.l ("@output ".*\n): Likewise.
1127 * src/files.c (file_name_split): Renamed from filename_split.
1128 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
1129
1130 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
1131
1132 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
1133 to accommodate latest gnulib.
1134
1135 * tests/glr-regression.at (Duplicate representation of merged trees):
1136 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
1137
1138 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
1139 needed.
1140
1141 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
1142
1143 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
1144 All uses changed. Invoke user destructor after an error during a
1145 split parse (trivial change from Joel E. Denny).
1146
1147 * tests/glr-regression.at
1148 (User destructor after an error during a split parse): New test case.
1149 Problem reported by Joel E. Denny in:
1150 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
1151
1152 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
1153
1154 * README-cvs: Give URLs for recommended tools.
1155 Mention Gzip version problem, and bootstrapping issues.
1156 Remove troubleshooting section, as it's somewhat obsolete.
1157
1158 * bootstrap (no_cache): New var, to accommodate different wget
1159 variants. Use it instead of '-C off'. Problem reported by
1160 twlevo@xs4all.nl.
1161
1162 * data/glr.c (yydestroyStackItem): New function.
1163 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
1164 debugging information. Problem reported by Joel E. Denny.
1165
1166 2005-08-25 Akim Demaille <akim@epita.fr>
1167
1168 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
1169
1170 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
1171
1172 * data/glr.c (yyrecoverSyntaxError, yyreturn):
1173 Don't invoke destructor on unresolved entries.
1174 * tests/glr-regression.at
1175 (User destructor for unresolved GLR semantic value): New test case.
1176 Problem reported by Joel E. Denny in:
1177 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
1178
1179 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
1180
1181 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
1182 Add strnlen.c.
1183 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
1184 lib-prefix.m4, po.m4.
1185
1186 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
1187 in yydestruct diagnostic, since it might not be an error.
1188 Problem reported by Joel Denny near end of
1189 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1190 * data/lalr1.cc (yyerturn): Likewise.
1191 * data/yacc.c (yyreturn): Likewise.
1192 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
1193
1194 * src/files.c: Remove obsolete FIXME comment.
1195
1196 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
1197 with the other templates, and to fix bogus run-on messages such
1198 as the one reported at the end of
1199 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1200 All callers changed to avoid the newline.
1201 (yyprocessOneStack): Output two lines rather than one, to accommodate
1202 the above change. This changes the debug output format slightly.
1203
1204 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
1205 reported by Joel E. Denny in
1206 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
1207 (trivial change).
1208 * tests/glr-regression.at (Duplicate representation of merged trees):
1209 New test, from Joel E. Denny in:
1210 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
1211 * THANKS: Add Joel E. Denny.
1212
1213 * configure.ac (AC_INIT): Bump to 2.0c.
1214
1215 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
1216
1217 * NEWS: Version 2.0b.
1218
1219 * Makefile.am (SUBDIRS): Put examples before tests, so that
1220 "make check" doesn't finish with "All 1 tests passed".
1221
1222 * tests/regression.at (Token definitions): Don't rely on
1223 AT_PARSER_CHECK for data that contains backslashes. It currently
1224 uses 'echo', and 'echo' isn't portable if its argument contains
1225 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
1226 that the byte '\0xff' is not printable in the C locale; it is,
1227 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
1228 not printable, so use '\0x81' to test.
1229
1230 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
1231 version of GCC, since the macro is used with non-GCC compilers.
1232
1233 Fix core dump reported by Pablo De Napoli in
1234 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
1235 * tests/regression.at (Invalid inputs with {}): New test.
1236 * src/parse-gram.y (token_name): Translate type before using
1237 it as an index.
1238
1239 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
1240 the user's name space. All uses changed to __attribute__
1241 ((__unused__)).
1242 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
1243 Add __attribute__ ((__noreturn__)).
1244
1245 * etc/clcommit: Remove. We weren't using it, and it failed
1246 "make maintainer-distcheck".
1247 * Makefile.maint: Merge from coreutils.
1248 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
1249 (syntax-check-rules): Change list of rules as described below.
1250 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
1251 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
1252 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
1253 (sc_trailing_space): New rules.
1254 (sc_xalloc_h_in_src): Remove.
1255 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
1256 (sc_space_tab, sc_error_exit_success, sc_changelog):
1257 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
1258 (makefile-check, po-check, author_mark_check):
1259 (makefile_path_separator_check, copyright-check):
1260 Use grep -n, to make it easier to find violations.
1261 Use CVS_LIST and CVS_LIST_EXCEPT.
1262 (header_regexp, h_re): Remove.
1263 (dd_c): New macro.
1264 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
1265 (my-distcheck): Use more-modern GCC flags.
1266 (signatures, %.asc): Remove.
1267 (rel-files, announcement): Remove signatures.
1268 Restore old updating code, even though we don't use it, so
1269 that we're the same as coreutils.
1270 (alpha, beta, major): Depend on news-date-check.
1271 Make the upload commands.
1272
1273 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
1274 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
1275 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
1276 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
1277 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
1278 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
1279 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
1280 * tests/sets.at: Likewise.
1281
1282 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
1283 we comment out the Autoconf version number.
1284 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
1285 it's error-prone and "make maintainer-distcheck" rejects it.
1286
1287 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
1288 Indent calls to "error" to pacify "make maintainer-distcheck",
1289 when the calls are not intended to be translated.
1290 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
1291
1292 * src/Makefile.am (DEFS): Use +=, to pacify
1293 "make maintainer-distcheck".
1294 (bison_SOURCES): Add scan-skel.h.
1295 (sc_tight_scope): New rule, from coreutils.
1296
1297 * src/files.c (src_extension, header_extension):
1298 Now static, not extern.
1299 * src/getargs.c (short_options): Likewise.
1300 * src/muscle_tab.c (muscle_table): Likewise.
1301 * src/parse-gram.y (current_class, current_type, current_prec):
1302 Likewise.
1303 * src/reader.c (grammar_end, previous_rule_end): Likewise.
1304 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
1305 * src/main.c (main): Cast bindtextdomain and textdomain calls to
1306 void, to avoid warning when NLS is disabled.
1307 * src/output.c: Include scan-skel.h.
1308 (scan_skel): Remove decl, since scan-skel.h does this.
1309 (output_skeleton):
1310 Indent calls to "error" to pacify "make maintainer-distcheck".
1311 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
1312 * src/reader.h (gram_end, gram_lineno): New decls to pacify
1313 "make maintainer-distcheck".
1314 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
1315 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
1316 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
1317 (skel_lex_destroy, scan_skel): Move these decls to...
1318 * src/scan-skel.h: New file.
1319 * src/uniqstr.c (uniqstr_assert):
1320 Indent calls to "error" to pacify "make maintainer-distcheck".
1321
1322 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
1323 not @VAR@.
1324
1325 * tests/torture.at: Revamp to avoid misuse of atoi that
1326 "make maintainer-distcheck" complained about.
1327
1328 * examples/extexi (message): Don't print a message more than once,
1329 and omit line-number decoration that makes Emacs compile think
1330 that informative messages are worth worrying about.
1331
1332 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
1333
1334 * configure.ac: Update version number.
1335
1336 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
1337 accidentally.
1338 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
1339 autogenerated by the maintainer.
1340 * examples/calc++/.cvsignore: Add *.yy.
1341
1342 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
1343 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1344 * lib/bitsetv.c (bitsetv_alloc): Likewise.
1345
1346 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
1347
1348 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
1349 from maintainer-distcheck about casting the argument of 'free'.
1350
1351 * NEWS: Mention recent yytname changes.
1352 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
1353
1354 * bootstrap: For translations that have not yet been upgraded to
1355 the new runtime-po domain, prime the pump by extracting the
1356 relevant strings from the obsolete translations. This code can be
1357 removed once the bison-runtime domain has been translated by each
1358 team.
1359
1360 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
1361 now that token names are already quoted.
1362
1363 Fix problem reported by Anthony Heading.
1364 * data/glr.c (YYTOKEN_TABLE): New macro.
1365 (yytname): Define if YYTOKEN_TABLE.
1366 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
1367 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
1368 (YYERROR_VERBOSE): Define the same way the other skeletons do.
1369 * src/output.c (prepare_symbols): Output token_table_flag.
1370
1371 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
1372
1373 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
1374 again if the first call fails.
1375
1376 * data/glr.c (yytnamerr): New function.
1377 (yyreportSyntaxError): Use it to dequote most string literals.
1378 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
1379 with other skeletons. All uses changed.
1380 (yytnameerr_): New function.
1381 (yyreport_syntax_error): Use it to dequote most string literals.
1382 * data/yacc.c (yytnamerr): New function.
1383 (yyerrlab): Use it to decode most string literals.
1384 * doc/bison.texinfo (Decl Summary, Calling Convention):
1385 Clarify quoting convention of yytname.
1386 * src/output.c (prepare_symbols): Quote all names. This undoes
1387 the 2005-04-17 change, which is now accomplished (mostly) via
1388 changes in the parsers as described above.
1389 * tests/regression.at (Token definitions, Web2c Actions):
1390 Undo most 2005-04-17 change here, too.
1391
1392 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
1393
1394 Fix more problems reported by twlevo@xs4all.nl.
1395 * tests/cxx-type.at: Don't pipe output of ./types through sed to
1396 remove trailing spaces. This loses the exit status of ./types,
1397 and isn't needed since ./types shouldn't be emitting trailing
1398 spaces.
1399 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
1400 as the stack isn't valid in that case.
1401
1402 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1403 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1404 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1405 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
1406 is used.
1407 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
1408 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1409 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1410 Likewise.
1411
1412 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
1413 overly-picky compilers that reject 'char *foo = "bar";'.
1414
1415 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
1416 to FILE * parameter, not to stderr. This fixes a typo introduced
1417 in the 2005-07-12 change.
1418
1419 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
1420 warnings from GCC 4.
1421
1422 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
1423 (yyglrShiftDefer, yysplitStack):
1424 Remove unused parameters b4_pure_formals. All uses changed.
1425 (yyglrShift): Remove unused parameters b4_user_formals.
1426 All uses changed.
1427 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
1428
1429 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
1430
1431 Destructor cleanups and regularization among the three skeletons.
1432 * NEWS: Document the behavior changes.
1433 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
1434 stack before failing, as the cleanup code will do it for us now.
1435 * data/lalr1.cc (yyerrlab): Likewise.
1436 * data/glr.c (yyparse): Pop everything off the stack before
1437 freeing it, so that destructors get called properly.
1438 * data/lalr1.cc (yyreturn): Likewise.
1439 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
1440 This is more consistent.
1441 * doc/bison.texinfo (Destructor Decl): Mention more reasons
1442 why destructors might be called. 1.875 -> 2.1.
1443 (Destructor Decl, Decl Summary, Table of Symbols):
1444 Some English-language cleanups for %destructor.
1445 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1446 Add output line for destructor of start symbol.
1447 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
1448 because of that same extra output line.
1449
1450 * NEWS: Document minor wording changes in diagnostics of
1451 Bison-generated parsers.
1452 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
1453 Remove unused formals. All uses changed.
1454 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
1455 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
1456 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
1457 Rename yyoverflowab to yyexhaustedlab.
1458 When memory exhaustion occurs during syntax-error reporting,
1459 report it separately rather than in a single diagnostic; this
1460 eases translation.
1461 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
1462 (Memory Exhausted): Renamed from Parser Stack Overflow.
1463 Revamp wording slightly to prefer "memory exhaustion".
1464 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
1465
1466 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
1467
1468 Add i18n support to the GLR skeleton. Partially fix the C++
1469 skeleton; a C++ expert needs to finish this. Remove debugging
1470 msgids; there's little point to having them translated, since they
1471 can be understood only by someone who can read the
1472 (English-language) source code.
1473
1474 Generate runtime-po/bison-runtime.pot automatically, so that we
1475 don't have to worry about garbage getting in that file. We'll
1476 make sure after the next official release that old msgids don't
1477 get lost. See
1478 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
1479
1480 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
1481 Now auto-generated.
1482 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
1483 Fix typos in explanations of the runtime file.
1484 * bootstrap: Change gettext keyword from YYI18N to YY_.
1485 Use standard Makefile.in.in in runtime-po, since we'll arrange
1486 for backward-compatible bison-runtime.po files in a different way.
1487 * data/glr.c (YY_): New macro, from yacc.c.
1488 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
1489 Translate messages intended for users.
1490 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
1491 the wording in the other skeletons. We don't know that the memory
1492 is virtual.
1493 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
1494 Use same method that yacc.c uses.
1495 Don't translate debugging messages.
1496 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
1497 it doesn't work (yet), and requires C++ expertise to fix.
1498 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
1499 Move defn to a more logical place, to be consistent with other
1500 skeletons.
1501 Don't translate debugging messages.
1502 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
1503 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
1504 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
1505 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
1506
1507 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
1508 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
1509 void, not int.
1510 * tests/glr-regression.at (Badly Collapsed GLR States):
1511 Likewise.
1512 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1513 yylex should return 0 at EOF rather than aborting.
1514
1515 Improve tests for stack overflow in GLR parser.
1516 Problem reported by twlevo@xs4all.nl.
1517 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
1518 All uses removed.
1519 (yyStackOverflow): Just longjmp, but with value 2 so that caller
1520 can handle the problem.
1521 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
1522 (yyparse): New local variable yyresult to record the result.
1523 Use result of setjmp to set it, rather than storing itinto
1524 struct.
1525 (yyDone): Remove label.
1526 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
1527 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
1528 if YYABORT is used).
1529 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
1530 yyparse status; put status > 1 into diagnostic.
1531 Check that status==2 works.
1532 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
1533 Use exit status 3 for failure to open (which shouldn't happen).
1534
1535 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
1536
1537 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
1538 1 on syntax error; just let yyparse do its thing.
1539 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
1540 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
1541 (Exploding the Stack Size with Alloca):
1542 (Exploding the Stack Size with Malloc):
1543 Expect exit status 2, not 1, since the parser is supposed to blow
1544 its stack. Problem reported by twlevo@xs4all.nl.
1545
1546 * data/glr.c (yyparse): Don't assume that the initial calls
1547 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
1548 Print a stack-overflow message and fail instead.
1549 Initialize the line-number information before creating the stack,
1550 so that the stack-overflow message can report line zero safely.
1551
1552 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
1553
1554 Fix problems reported by twlevo@xs4all.nl.
1555 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
1556 (yyuserMerge): Provide a default case if b4_mergers is empty.
1557 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
1558 * tests/glr-regression.at
1559 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1560 Add casts to pacify C++ compilers.
1561 * tests/glr-regression.at (Improper merging of GLR delayed action
1562 sets): Declare yylex before using it.
1563 * tests/Makefile.am (maintainer-check-g++): Fix a stray
1564 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
1565 test for valgrind; valgrind is independent of g++.
1566 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
1567 for compatibility with POSIX 1003.1-2001 (if running coreutils).
1568 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
1569 Use a destructor, so that we can expand the stack. Change
1570 YYSTYPE to char * so that we can free it. Cast result of malloc.
1571
1572 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1573
1574 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
1575 a valgrind failure. Problem reported by twlevo@xs4all.nl.
1576
1577 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
1578
1579 * PACKAGING: New file, suggested by Bruno Haible and taken from
1580 similar wording in gettext's PACKAGING file.
1581 * NEWS: Mention PACKAGING.
1582 * Makefile.am (EXTRA_DIST): Add PACKAGING.
1583
1584 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
1585
1586 * NEWS: Document recent i18n improvements.
1587 * bootstrap: Get runtime translations into runtime-po.
1588 Create runtime-po files automatically, if possible.
1589 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
1590 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
1591 does not infringe on the user's name space.
1592 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
1593 * doc/bison.texinfo (Internationalization): Revamp the English
1594 and Texinfo syntax a bit, to try to make it clearer.
1595 (Bison Options, Option Cross Key): Mention --print-localedir.
1596 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
1597 YYENABLE_NLS. Quote a bit more.
1598 * runtime-po/.cvsignore: New file.
1599 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
1600 * runtime-po/Rules-quot: Remove; now created by bootstrap.
1601 * runtime-po/quot.sed: Likewise.
1602 * runtime-po/boldquot.sed: Likewise.
1603 * runtime-po/en@quot.header: Likewise.
1604 * runtime-po/en@boldquot.header: Likewise.
1605 * runtime-po/insert-header.sin: Likewise.
1606 * runtime-po/remove-potcdate.sin: Likewise.
1607 * runtime-po/Makevars: Likewise.
1608 * runtime-po/LINGUAS: Likewise.
1609 * runtime-po/de.po: Likewise; we will rely on the translation project
1610 to maintain this, so "bootstrap" should get it.
1611 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
1612 its value.
1613 * src/main.c (main): Bind the bison-runtime domain, too.
1614
1615 2005-07-12 Bruno Haible <bruno@clisp.org>
1616
1617 * data/yacc.c: Include <libintl.h> when NLS is enabled.
1618 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
1619 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
1620 * runtime-po: New directory.
1621 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
1622 $(DOMAIN).pot-update rule, so that old messages are never dropped.
1623 * runtime-po/Rules-quot: New file, copied from po/.
1624 * runtime-po/quot.sed: Likewise.
1625 * runtime-po/boldquot.sed: Likewise.
1626 * runtime-po/en@quot.header: Likewise.
1627 * runtime-po/en@boldquot.header: Likewise.
1628 * runtime-po/insert-header.sin: Likewise.
1629 * runtime-po/remove-potcdate.sin: Likewise.
1630 * runtime-po/Makevars: New file.
1631 * runtime-po/POTFILES.in: New file.
1632 * runtime-po/LINGUAS: New file.
1633 * runtime-po/bison-runtime.pot: New file.
1634 * runtime-po/de.po: New file.
1635 * m4/bison.m4: New file.
1636 * Makefile.am (SUBDIRS): Add runtime-po.
1637 (aclocaldir, aclocal_DATA): New variables.
1638 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
1639 Define aclocaldir.
1640 * src/getargs.c (usage): Document --print-localedir option.
1641 (PRINT_LOCALEDIR_OPTION): New enum item.
1642 (long_options): Add --print-localedir option.
1643 (getargs): Handle --print-localedir option.
1644 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
1645 (Internationalization): New section.
1646
1647 2005-07-12 Akim Demaille <akim@epita.fr>
1648
1649 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
1650 for consistency with the rest of the code.
1651 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
1652 Add separators.
1653
1654 2005-07-12 Akim Demaille <akim@epita.fr>
1655
1656 * src/parse-gram.y: Use %printer instead of YYPRINT.
1657
1658 2005-07-12 Akim Demaille <akim@epita.fr>
1659
1660 * src/symtab.h, src/symtab.c (symbol_print): New.
1661 * src/symlist.h, src/symlist.c (symbol_list_print): New.
1662 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
1663
1664 2005-07-12 Akim Demaille <akim@epita.fr>
1665
1666 * data/glr.c (b4_syncline): Fix (swap) the definitions of
1667 b4_at_dollar and b4_dollar_dollar.
1668
1669 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
1670
1671 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
1672 and Pennello's paper.
1673
1674 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
1675
1676 * data/yacc.c (yyparse): Undo previous patch. Instead,
1677 set yylsp[0] and yyvsp[0] only if the initial action
1678 sets yylloc and yylval, respectively.
1679
1680 * data/yacc.c (yyparse): In the initial action, set
1681 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
1682 This avoids the use of undefined variables if the initial
1683 action does not set yylloc and/or yylval.
1684
1685 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
1686
1687 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
1688 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
1689 Remove from CVS. These files are automatically generated.
1690 * examples/extexi: Clarify that this file is now part of Bison,
1691 not GNU M4, and that it works with any POSIX-compatible Awk.
1692 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
1693 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
1694 so that we also get calc++-parser.yy. Geneate it.
1695 Use $(AWK), not gawk, since any conforming Awk will do.
1696 Put comment before action, since older 'make' can't handle comment
1697 in action.
1698 $(BUILT_SOURCES): List all built sources, not just some of them.
1699 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
1700 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
1701 $($(calc_sources_generated)): Remove unnecessary test for existence
1702 of target. (This had a shell syntax error anyway; a stray "x".)
1703 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
1704 calc++-parser.yy.
1705 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
1706
1707 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
1708 implied by the other modules.
1709
1710 2005-07-06 Akim Demaille <akim@epita.fr>
1711
1712 Bind examples/calc++ to the package.
1713 * examples/calc++/Makefile: Remove, replaced by...
1714 * examples/calc++/Makefile.am: ... this new file.
1715 * examples/calc++/test: Remove input.
1716 * examples/calc++/compile: Remove.
1717 * examples/Makefile.am: New.
1718 * configure.ac, Makefile.am: Adjust.
1719 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
1720
1721 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
1722
1723 * data/glr.c (yyFail): Drastically simplify; since the format argument
1724 never had any % directives, we can simply pass it to yyerror.
1725 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
1726 be modified later, as that is the usual style in glr.c.
1727 Problems reported by Paul Hilfinger.
1728
1729 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
1730 and size overflow errors.
1731 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
1732 in case the user prolog sets feature-test macros like _GNU_SOURCE.
1733 (YYSIZEMAX): New macro.
1734 (yystpcpy): New function, taken from yacc.c.
1735 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
1736 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
1737 so that we don't have to maintain their signatures.
1738 (yyFail): Check for buffer overflow, by using vsnprintf rather
1739 than vsprintf. Allocate a bigger buffer if possible.
1740 Report an error if buffer allocation fails.
1741 (yyStackOverflow): New function.
1742 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
1743 the initialization was successful. It might fail if storage was
1744 exhausted.
1745 (yyexpandGLRStack): Add more checks for storage allocation failure.
1746 Use yyStackOverflow to report failures.
1747 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
1748 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
1749 Don't assume stack number fits in int.
1750 (yysplitStack): Check for storage allocation failure.
1751 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
1752 can print diagnostics on storage allocation failure. All callers
1753 changed.
1754 (yyresolveValue): Use yybool for boolean.
1755 (yyreportSyntaxError): Check for size-calculation overflow.
1756 This code is taken from yacc.c.
1757 (yyparse): Check for storage allocation errors when allocating
1758 the initial stack.
1759
1760 2005-07-05 Akim Demaille <akim@epita.fr>
1761
1762 Extract calc++ from the documentation.
1763 * doc/bison.texinfo (Calc++): Add the extraction marks.
1764 * examples/extexi: New, from the aborted GNU Programming 2E.
1765 Separate the different paragraph of a file with empty lines.
1766 * examples/Makefile: Use it to extract the whole calc++ example.
1767
1768 2005-06-24 Akim Demaille <akim@epita.fr>
1769
1770 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
1771 class typedefs.
1772
1773 2005-06-22 Akim Demaille <akim@epita.fr>
1774
1775 * doc/bison.texinfo (C++ Language Interface): First stab.
1776 (C++ Parsers): Remove.
1777
1778 2005-06-22 Akim Demaille <akim@epita.fr>
1779
1780 * data/lalr1.cc (yylex_): Honor %lex-param.
1781
1782 2005-06-22 Akim Demaille <akim@epita.fr>
1783
1784 Start a set of simple examples.
1785 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
1786 * examples/calc++/calc++-driver.hh,
1787 * examples/calc++/calc++-parser.yy,
1788 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
1789 * examples/calc++/compile, examples/calc++/test: New.
1790
1791 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
1792
1793 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
1794 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
1795 which stems from the 2005-05-27 patch.
1796
1797 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1798
1799 * data/glr.c: Modify treatment of unused parameters to permit use
1800 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
1801
1802 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
1803
1804 Fix infringement on user name space reported by Janos Zoltan Szabo.
1805 * data/yacc.c (yyparse): strlen -> yystrlen.
1806
1807 2005-05-30 Akim Demaille <akim@epita.fr>
1808
1809 * data/lalr1.cc (_): New.
1810 Translate the various messages.
1811
1812 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
1813
1814 Fix infringement on user name space reported by Bruno Haible.
1815 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
1816 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
1817 the user's name space.
1818 (alloca): Include <stdlib.h> to get it, if it's not built in.
1819 (YYMALLOC, YYFREE): Define only if needed.
1820 (malloc, free): Declare, but only if needed, as this infringes on
1821 the user name space.
1822
1823 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
1824
1825 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
1826 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
1827 with %d format.
1828 * lib/ebitset.c (min, max): Undef before defining.
1829 * lib/vbitset.c (min, max): Likewise.
1830 * lib/subpipe.c (create_subpipe): Save local variables in case
1831 vfork clobbers them.
1832
1833 2005-05-24 Bruno Haible <bruno@clisp.org>
1834
1835 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
1836 error message syntax used by gcc-4.0.
1837
1838 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
1839
1840 * README: Mention m4 1.4.3. Remove obsolete advice about
1841 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
1842
1843 * bootstrap: Remove workaround for problem I encountered with
1844 gettext 0.14.1; it seems to be fixed now.
1845
1846 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
1847
1848 * NEWS: Version 2.0a.
1849
1850 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
1851 the previous change.
1852
1853 Various maintainer cleanups.
1854 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
1855 conftest*, for benefit of CVS commands run at the same time as
1856 "configure". Add build-aux, since "bootstrap" now creates it and
1857 its subfiles.
1858 * Makefile.cfg (move_if_change): Remove.
1859 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
1860 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
1861 (po_repo, do-po-update, po-update, wget_files, get-targets):
1862 (config.guess-url_prefix, config.sub-url_prefix):
1863 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
1864 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
1865 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
1866 Remove.
1867 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
1868 this is now the recommended name.
1869 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
1870 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
1871 ylwrap. These files now go into build-aux.
1872 * config/move-if-change: Remove.
1873 * config/prev-version.txt: Bump from 1.75 to 2.0.
1874
1875 * bootstrap: Add stdio-safer, unistd-safer modules.
1876 Remove m4/glibc2.m4 (introduced by latest gnulib, but
1877 we don't need it).
1878 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
1879 fopen-safer.c, stdio-safer.h, unistd-safer.h.
1880 * lib/subpipe.c: Include "unistd-safer.h".
1881 (create_subpipe): Make sure all the newly-created
1882 file descriptors are > 2, so that diagnostics don't
1883 get sent down them (which might cause Bison to hang, in theory).
1884 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
1885 * src/files.c (xfopen): Use fopen_safer, not fopen.
1886
1887 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
1888 yesterday's yacc.c fix.
1889
1890 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
1891
1892 * data/glr.c, data/lalr1.cc: Update copyright date.
1893
1894 Fix a destructor bug reported by Wolfgang Spraul in
1895 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
1896 * data/yacc.c (yyabortlab): Don't call destructor, and
1897 don't set yychar to EMPTY.
1898 (yyoverflowlab): Don't call destructor.
1899 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
1900 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
1901 since we no longer output the message "discarding lookahead token
1902 end of input ()".
1903
1904 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1905
1906 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
1907 fix a small glitch in debugging output.
1908 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
1909 after YY_SYMBOL_PRINT where needed.
1910
1911 (struct yyGLRState): Add some comments.
1912 (struct yySemanticOption): Add some comments.
1913 (union yyGLRStackItem): Add comment.
1914
1915 (yymergeOptionSets): Correct this to properly perform the union,
1916 avoiding infinite reported by Michael Rosien.
1917 Update comment.
1918
1919 * tests/glr-regression.at: Add test for GLR merging error reported
1920 by M. Rosien.
1921
1922 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
1923
1924 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
1925 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
1926 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
1927 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
1928 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
1929 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
1930 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
1931 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
1932 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
1933 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
1934 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
1935 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
1936 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
1937 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
1938 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
1939 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
1940 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
1941 src/derives.h, src/files.c, src/files.h, src/getargs.c,
1942 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
1943 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
1944 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
1945 src/output.h, src/parse-gram.c, src/parse-gram.h,
1946 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
1947 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
1948 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
1949 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
1950 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
1951 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
1952 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
1953 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
1954 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
1955 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
1956 tests/reduce.at, tests/regression.at, tests/sets.at,
1957 tests/synclines.at, tests/testsuite.at, tests/torture.at:
1958 Update FSF postal mail address.
1959
1960 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
1961
1962 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
1963 Problem reported by Ralf Menzel.
1964
1965 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
1966
1967 * tests/actions.at: Test that stack overflow invokes destructors.
1968 From Marcus Holland-Moritz.
1969 * data/yacc.c (yyerrlab): Move the code that destroys the stack
1970 from here....
1971 (yyreturn): to here. That way, destructors are called properly
1972 even if the stack overflows, or the user calls YYACCEPT or
1973 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
1974 (yyoverflowlab): Destroy the lookahead.
1975
1976 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
1977
1978 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
1979
1980 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
1981
1982 * NEWS: Bison-generated C parsers no longer quote literal strings
1983 associated with tokens.
1984 * src/output.c (prepare_symbols): Don't escape strings,
1985 since users don't want to see C escapes.
1986 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
1987 in diagnostics.
1988 * tests/input.at (Torturing the Scanner): Likewise.
1989 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
1990
1991 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
1992
1993 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
1994 the data size is known to be too small and we can't increase it.
1995 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
1996
1997 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
1998
1999 * src/parse-gram.y: Include quotearg.h.
2000 (string_as_id): Quote $1 before using it as a key, since the
2001 lexer no longer quotes it for us.
2002 (string_content): Don't strip quotes, since lexer no longer
2003 quotes it for us.
2004 * src/scan-gram.l: Include quotearg.h.
2005 ("\""): Omit quote.
2006 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
2007 a key, since the rest of the lexer doesn't quote it.
2008 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
2009 * tests/regression.at (Token definitions): Check for backslashes
2010 in token strings.
2011
2012 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
2013 (YYSIZE_T): Define to unsigned long int when using an older compiler.
2014 (yyparse): Revamp code to generate long syntax error message, to
2015 make it easier to translate, and to avoid problems with arithmetic
2016 overflow. Change "virtual memory" to "memory" in diagnostic, since
2017 we don't know whether the memory is virtual.
2018
2019 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
2020
2021 * NEWS: Bison-generated C parsers now use the _ macro to
2022 translate strings.
2023 * data/yacc.c (_) [!defined _]: New macro.
2024 All English strings wrapped inside this macro.
2025 * doc/bison.texinfo (Bison Parser): Document _.
2026 * po/POTFILES.in: Include src/parse-gram.c, since it now
2027 includes translateable strings that parse-gram.y doesn't.
2028
2029 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
2030
2031 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
2032 reverting the 2004-10-11 change to this function.
2033 (symbol_check_alias_consistency): Don't call symbol_type_set
2034 if the type name is already correct.
2035 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
2036
2037 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
2038
2039 * tests/regression.at (Token definitions): Don't use a token named
2040 c, as that generates a "#define c ..." that runs afoul of buggy
2041 stdlib.h that uses the identifier c as a member of struct
2042 drand48_data. Problem reported by Horst Wente.
2043
2044 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
2045
2046 * bootstrap: Change translation URL from
2047 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
2048 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
2049 redirection glitches. Problem reported by twlevo@xs4all.nl.
2050
2051 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
2052
2053 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
2054 after operands; POSIX says this isn't portable for the c99 command.
2055
2056 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
2057
2058 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
2059 immediately if a data overrun has occurred; this may help us track
2060 down what may be a spurious failure on MacOS.
2061
2062 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
2063
2064 Respond to problems reported by twlevo@xs4all.nl.
2065
2066 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
2067
2068 * src/vcg.h: Comment fix.
2069 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
2070 (G_CMAX): Change to -1 instead of INT_MAX.
2071
2072 * data/yacc.c (yyparse): Omit spaces before #line.
2073
2074 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
2075
2076 * src/tables.c (state_number_to_vector_number): Put it inside an
2077 "#if 0", since it's not currently used. Problem reported by
2078 Roland McGrath.
2079
2080 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
2081
2082 * src/output.c (escaped_output): Renamed from
2083 escaped_file_name_output, since we now use it for symbol tags as
2084 well. All uses changed.
2085 (symbol_destructors_output, symbol_printers_output):
2086 Escape symbol tags too.
2087 Problem reported by Matyas Forstner in
2088 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
2089
2090 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
2091 not needed.
2092 * src/output.c (user_actions_output, token_definitions_output,
2093 symbol_destructors_output, symbol_printers_output): Likewise.
2094 * src/reader.c (prologue_augment): Likewise.
2095 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
2096
2097 * src/vcg.c (output_edge): Don't quote linestyle arg.
2098 Problem reported by twlevo@xs4all.nl.
2099
2100 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
2101
2102 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
2103 example, reported by Derek M Jones. Also, make the example even
2104 more outrageous, to better illustrate how bad the problem is.
2105
2106 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
2107
2108 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
2109 putsym. Typo reported by Sebastian Piping.
2110
2111 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
2112
2113 * doc/bison.texinfo (Language and Grammar): some -> same
2114 (Epilogue): int he -> in the
2115 Typos reported by Sebastian Piping via Justin Pence.
2116
2117 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
2118
2119 * tests/glr-regression.at (Improper handling of embedded actions
2120 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
2121 embedded actions and $-N in GLR parsers", work around an Autoconf bug
2122 with dollar signs in test names.
2123 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
2124 for a similar reason.
2125
2126 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
2127
2128 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
2129 wants to redefine G_VIEW.
2130
2131 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
2132
2133 * src/vcg.c (get_view_str): Remove case for normal_view.
2134 Problem reported by twlevo@xs4all.nl.
2135
2136 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
2137
2138 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
2139 Problem reported by twlevo@xs4all.nl.
2140
2141 * doc/bison.texinfo: Change @dircategory from "GNU programming
2142 tools" to "Software development". Requested by Richard Stallman
2143 via Karl Berry.
2144
2145 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
2146
2147 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
2148 Problem reported by twlevo@xs4all.nl.
2149
2150 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
2151
2152 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
2153 keyword; it's not needed with modern compilers, and it doesn't
2154 affect correctness with older compilers. Suggested by
2155 twlevo@xs4all.nl.
2156
2157 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
2158
2159 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
2160 gcc -Wswitch-default.
2161 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
2162 * data/yacc.c (yyparse): Likewise.
2163
2164 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
2165
2166 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
2167 already. Let config.h define any nonstandard values.
2168
2169 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
2170
2171 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
2172 for the benefit of slower hosts. Problem reported by
2173 Nelson H. F. Beebe.
2174
2175 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
2176
2177 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
2178 being defined and not used.
2179 * data/lalr1.cc (yyparse): Likewise.
2180 Use "if (false)" rather than "if (0)".
2181
2182 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
2183
2184 * TODO: Mention that we should allow NUL bytes in tokens.
2185
2186 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
2187
2188 * src/scan-skel.l (<<EOF>>): Don't close standard output.
2189 Problem reported by Hans Aberg.
2190
2191 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
2192
2193 * src/getargs.c (version): Happy new year; update overall
2194 program copyright date from 2004 to 2005.
2195
2196 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
2197 Problem reported by Hans Aberg.
2198 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
2199 (Output file names.): Add a test for the case when standard output
2200 is closed.
2201
2202 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
2203
2204 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
2205 to fix an oversight in the Bison 2.0 manual.
2206
2207 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
2208
2209 * NEWS: Version 2.0. Reformat the existing news items since
2210 1.875, so that related items are grouped together.
2211 * configure.ac (AC_INIT): Bump version to 2.0.
2212 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
2213
2214 * tests/torture.at (Exploding the Stack Size with Alloca): Set
2215 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
2216 otherwise, we're not testing alloca. Unfortunately there's no
2217 simple way to consult HAVE_ALLOCA here.
2218
2219 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
2220 for yymsg, too.
2221
2222 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
2223 hand. This avoids a warning about comparing int to size_t when
2224 GCC warnings are enabled.
2225
2226 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
2227
2228 * NEWS: Bison-generated parsers no longer default to using the
2229 alloca function (when available) to extend the parser stack, due
2230 to widespread problems in unchecked stack-overflow detection.
2231 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
2232 responsibility to set it to a positive value. This lets the user
2233 specify a value that is not a preprocessor constant.
2234 * data/yacc.c (YYMAXDEPTH): Likewise.
2235 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
2236 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
2237 to be a compile-time constant. However, explain the constraints on it.
2238 Also, explain the constraints on YYINITDEPTH.
2239 (Table of Symbols): Explain that alloca is no longer the default.
2240 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
2241 to 1.
2242
2243 * doc/bison.texinfo (Location Default Action): Mention that n must
2244 be zero when k is zero. Suggested by Frank Heckenbach.
2245
2246 2004-12-22 Akim Demaille <akim@epita.fr>
2247
2248 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
2249 (parser::state_type, parser::semantic_type, parser::location_type):
2250 Private, not public.
2251 (parser::parse): Return ints, not bool.
2252 Returning a bool introduces a problem: 0 corresponds to false, and
2253 it seems weird to return false on success. Returning true changes
2254 the conventions for yyparse.
2255 Alternatively we could return void and send an exception.
2256 There is no clear consensus (yet?).
2257 (state_stack, semantic_stack, location_stack): Rename as...
2258 (state_stack_type, semantic_stack_type, location_stack_type): these.
2259 Private, not public.
2260 * tests/c++.at: New.
2261 * tests/testsuite.at, tests/Makefile.am: Adjust.
2262
2263 2004-12-21 Akim Demaille <akim@epita.fr>
2264
2265 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
2266
2267 2004-12-21 Akim Demaille <akim@epita.fr>
2268
2269 Don't impose std::string for filenames.
2270
2271 * data/lalr1.cc (b4_filename_type): New.
2272 (position::filename): Use it.
2273 (parser.hh): Move the inclusion of stack.hh and location.hh below
2274 the user code, so that needed headers for the filename type can be
2275 included first.
2276 Forward declare them before the user code.
2277 * tests/Makefile.am (check-local, installcheck-local): Pass
2278 TESTSUITEFLAGS to the TESTSUITE.
2279
2280 2004-12-20 Akim Demaille <akim@epita.fr>
2281
2282 Use more STL like names: my_class instead of MyClass.
2283
2284 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
2285 (SemanticStack, SemanticType, StateStack, StateType)
2286 (TokenNumberType, Stack, Slice, Traits, Parser::location)
2287 (Parser::value): Rename as...
2288 (location_stack, location_type, rhs_number_type, semantic_stack)
2289 (semantic_type, state_stack, state_type, token_number_type, stack)
2290 (slice, traits, parser::yylloc, parser::yylval): these.
2291
2292 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
2293
2294 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
2295
2296 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
2297 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2298
2299 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
2300
2301 Remove uses of 'short int' and 'unsigned short int'. This raises
2302 some arbitrary limits. It uses more memory but nowadays that's
2303 not much of an issue.
2304
2305 This change does not affect the generated parsers; that's a different
2306 task, as some users will want to conserve memory there.
2307
2308 Ideally we should use size_t to represent all object counts, and
2309 something like ptrdiff_t to represent signed differences of object
2310 counts; but that will require more code-cleanup than I have the
2311 time to do right now.
2312
2313 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
2314 Use size_t, not int or short int, to count objects.
2315 * src/closure.c (nritemset, closure): Likewise.
2316 * src/closure.h (nritemset, closure): Likewise.
2317 * src/nullable.c (nullable_compute): Likewise.
2318 * src/print.c (print_core): Likewise.
2319 * src/print_graph.c (print_core): Likewise.
2320 * src/state.c (state_compare, state_hash): Likewise.
2321 * src/state.h (struct state): Likewise.
2322 * src/tables.c (default_goto, goto_actions): Likewise.
2323
2324 * src/gram.h (rule_number, rule): Use int, not short int.
2325 * src/output.c (prepare_rules): Likewise.
2326 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
2327 errs, reductions): Likewise.
2328 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
2329 Likewise.
2330 * src/tables.c (vector_number, tally, action_number,
2331 ACTION_NUMBER_MINIMUM): Likewise.
2332 * src/output.c (muscle_insert_short_int_table): Remove.
2333
2334 2004-12-17 Akim Demaille <akim@epita.fr>
2335
2336 * data/lalr1.cc: Extensive Doxygenation.
2337 (error_): Rename as...
2338 (error): this, since it is visible to the user.
2339 Adjust callers.
2340 (Parser::message): Now an automatic variable from...
2341 (Parser::yyreport_syntax_error_): here.
2342 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
2343 Parser::error.
2344 * tests/input.at: Escape $.
2345
2346 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
2347
2348 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
2349 Parenthesize rhs to avoid obscure problems with mistakes like
2350 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
2351 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
2352 b4_rhs_location): Likewise.
2353 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
2354 b4_rhs_location): Likewise.
2355
2356 2004-12-16 Akim Demaille <akim@epita.fr>
2357
2358 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
2359 yacc.c: be sure to stay within yycheck_.
2360 * tests/actions.at: Re-enable C++ tests.
2361
2362 2004-12-16 Akim Demaille <akim@epita.fr>
2363
2364 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
2365 real.
2366
2367 2004-12-16 Akim Demaille <akim@epita.fr>
2368
2369 Use #define to handle the %name-prefix.
2370
2371 * data/glr.c, data/yacc.c: Comment changes.
2372 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
2373 so that one can refer to yylex in the parser file, and have it
2374 renamed, as is the case with other skeletons.
2375
2376 2004-12-16 Akim Demaille <akim@epita.fr>
2377
2378 Move lalr1.cc internals into yy*.
2379
2380 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
2381 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
2382 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
2383 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
2384 (empty_, final_, terror_, errcode_, ntokens_)
2385 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
2386 (looka_, ilooka_, error_range_, nerrs_):
2387 Rename as...
2388 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
2389 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
2390 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
2391 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
2392 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
2393 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
2394 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
2395 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
2396 these.
2397
2398 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
2399
2400 Fix some problems reported by twlevo at xs4all.
2401 * src/symtab.c (symbol_new): Report an error if the input grammar
2402 contains too many symbols. This is better than calling abort() later.
2403 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
2404 (struct node, struct graph):
2405 Rename member expand to stretch. All uses changed.
2406 (struct graph): Remove member layoutalgorithm. All uses removed.
2407 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
2408 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
2409 All uses changed.
2410 (N_STRETCH): Rename from N_EXPAND. All uses changed.
2411
2412 2004-12-15 Akim Demaille <akim@epita.fr>
2413
2414 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
2415 Add more Doxygen comments.
2416 (symprint_, stack_print_, reduce_print_, destruct_, pop)
2417 (report_syntax_error_, translate_): Rename as...
2418 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
2419 (yypop_, yyreport_syntax_error_, yytranslate_): this.
2420
2421 2004-12-15 Akim Demaille <akim@epita.fr>
2422
2423 * data/lalr1.cc (lex_): Rename as...
2424 (yylex_): this.
2425 Move the trace here.
2426 Take the %name-prefix into account.
2427 Reported by Alexandre Duret-Lutz.
2428
2429 2004-12-15 Akim Demaille <akim@epita.fr>
2430
2431 Simplify the C++ parser constructor.
2432
2433 * data/lalr1.cc (debug_): Rename as...
2434 (yydebug_): so that the parser's internals are always in the yy*
2435 pseudo namespace.
2436 Adjust uses.
2437 (b4_parse_param_decl): Remove the leading comma as it is now only
2438 called as unique argument list.
2439 (Parser::Parser): Remove the constructor accepting a location and
2440 an initial debugging level.
2441 Remove from the other ctor the argument for the debugging level.
2442 (debug_level_type, debug_level, set_debug_level): New.
2443
2444 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
2445 constructor calls.
2446
2447 2004-12-15 Akim Demaille <akim@epita.fr>
2448
2449 Remove b4_root related material: failure experiment
2450 (which goal was to allow to derive from a class).
2451
2452 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
2453 definitions and uses.
2454
2455 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
2456
2457 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
2458 not 2, since it's not portable to subtract 1 from the start of an
2459 array. The new item 0 is never set or used. All uses changed.
2460
2461 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
2462 the default definition of YYLLOC_DEFAULT. Problem reported
2463 by Frank Heckenbach.
2464
2465 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
2466
2467 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
2468 the normal case and one for the error case. Just use the
2469 first one uniformly. Problem reported by Frank Heckenbach.
2470 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
2471 use exactly the same macro in both places.
2472 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
2473 so that the normal-case YYRHSLOC works for the error case too.
2474 All uses changed.
2475 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
2476 (YYLLOC_DEFAULT): Use the same macro as glr.c.
2477 * doc/bison.texinfo (Location Default Action): Don't claim that
2478 we have an array of locations. Use the same macro for both glr
2479 and lalr parsers. Mention YYRHSLOC. Mention what happens when
2480 the index is 0.
2481
2482 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
2483
2484 * HACKING: Update email addresses to send announcements to.
2485
2486 * configure.ac (AC_INIT): Bump version to 1.875f.
2487
2488 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
2489
2490 * NEWS: Version 1.875e.
2491 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
2492
2493 * src/scan-skel.l: Include "complain.h", for "fatal".
2494
2495 * src/relation.h (relation_print, relation_digraph):
2496 Relation sizes are of type relation_node, not size_t (this is
2497 merely a doc fix, since the two types are equivalent).
2498 (relation_transpose): Relation sizes are of type relation_node,
2499 not int.
2500 * src/relation.c: Likewise.
2501 (top, infinity): Now of type relation_node, not int.
2502 (traverse, relation_transpose): Use relation_node, not int.
2503
2504 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
2505 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
2506 (yyparse): Remove unused local introduced in 2004-10-25 patch.
2507
2508 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
2509 specifying whether the test should be skipped. Use it tp
2510 specify that the [%defines %skeleton "lalr1.cc"] tests currently
2511 fail on some hosts, and should be skipped.
2512
2513 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
2514
2515 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
2516 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
2517 unless otherwise specified below.
2518
2519 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
2520 to allocate kernel_base, kernel_items, kernel_size, since
2521 they needn't be initialized to 0.
2522 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
2523 * src/closure.c (new_closure): Likewise, for itemset.
2524 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
2525 * src/lalr.c (set_goto_map): Likewise, for temp_map.
2526 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
2527 (build_relations): Likewise for edge, states1, includes.
2528 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
2529 * src/reader.c (packgram): Likewise, for ritem, rules.
2530 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
2531 * src/relation.c (relation_digraph): Likewise for VERTICES.
2532 (relation_transpose): Likewise for new_R, end_R.
2533 * src/symtab.c (symbols_token_translations_init): Likewise for
2534 token_translations.
2535 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
2536 (token_actions): Likewise for yydefact, actrow, conflrow,
2537 conflict_list.
2538 (save_column): Likewise for froms[symno], tos[symno].
2539 (goto_actions): Likewise for state_count.
2540 (pack_table): Likewise for base, pos, check.
2541 (tables_generate): Likewise for width.
2542
2543 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
2544 for initial core. Just have a separate core, so we needn't worry
2545 about whether kernel_size and kernel_base are initialized.
2546
2547 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
2548 kernel_size, kernel_items): Remove unnecessary initialization.
2549 * src/conflicts.c (conflicts): Likewise.
2550 * src/derives.c (derives): Likewise.
2551 * src/muscle_tablc (muscle_insert): Likewise.
2552 * src/relation.c (relation_digraph): Likewise.
2553 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
2554 conflrow, conflict_table, conflict_list, table, check):
2555 Likewise.
2556
2557 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
2558 This is because all callers pass unsigned int.
2559 * src/closure.h (new_closure): Likewise.
2560
2561 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
2562 (build_relations): Initialize includes[i] in all cases.
2563 * src/reader.c (packgram): Always initialize rules[ruleno].prec
2564 and rules[ruleno].precsym. Initialize members in order.
2565 * src/relation.c (relation_transpose): Always initialize new_R[i]
2566 and end_R[i].
2567 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
2568
2569 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
2570 conflict_list[0] was always 0, but now it isn't initialized.
2571
2572 * src/table.c (table_grow): When conflict_table grew, the grown
2573 area wasn't cleared. Fix this.
2574
2575 * lib/.cvsignore: Add strdup.c, strdup.h.
2576 * m4/.cvsignore: Add strdup.m4.
2577
2578 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
2579
2580 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
2581 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
2582 GOTO_NUMBER_MAXIMUM, since we occasionally compute
2583 ngotos + 1 without checking for overflow.
2584 (build_relations): Use END_NODE, not -1, to denote end of edges.
2585 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
2586 build_relations): Use goto_number, not int, for goto numbers.
2587 * src/tables.c (save_column, default_goto): Likewise.
2588
2589 2004-11-23 Akim Demaille <akim@epita.fr>
2590
2591 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
2592 of #defining from yystype.
2593 Don't typedef yystype, C++ does not need it.
2594 This lets it possible to forward declare it as union.
2595
2596 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
2597
2598 * bootstrap (gnulib_modules): Add extensions.
2599 Problem reported by Jim Meyering.
2600
2601 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
2602
2603 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
2604 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
2605 src/system.h, src/tables.c: XFREE -> free, to accommodate
2606 recent change to gnulib xalloc.h.
2607 Problem reported by Jim Meyering.
2608
2609 2004-11-17 Akim Demaille <akim@epita.fr>
2610
2611 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
2612
2613 2004-10-28 Akim Demaille <akim@epita.fr>,
2614 Alexandre Duret-Lutz <adl@gnu.org>
2615
2616 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
2617 changes.
2618 (YYCDEBUG): Adjust.
2619 Use it instead of cdebug_.
2620 (Parser::debug_stream, Parser::set_debug_stream): New.
2621 (Parser::symprint_): Define cdebug_ for temporary backward
2622 compatibility.
2623 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
2624 debug_stream ().
2625
2626 2004-11-17 Akim Demaille <akim@epita.fr>
2627
2628 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
2629 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
2630 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
2631 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2632
2633 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
2634
2635 * data/glr.c (yyloc_default): Remove; not used.
2636 Problem reported by Frank Heckenbach.
2637
2638 2004-10-25 Akim Demaille <akim@epita.fr>
2639
2640 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
2641 Introduce another definition to address simple location arrays.
2642 (yyGLRStack): New member: yyerror_range.
2643 (yyrecoverSyntaxError, yyparse): Update it.
2644 (yyrecoverSyntaxError): Use it when shifting the error token to
2645 have an accurate range, equivalent to the one computed by both
2646 yacc.c and lalr1.cc.
2647 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
2648 that column numbers start at column 0, as per GNU Coding
2649 Standards, the others tests, and the doc.
2650 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
2651 Adjust to the above change (first column is 0).
2652 And adjust the location of the "<error>", now covering the whole
2653 line.
2654
2655 2004-10-22 Akim Demaille <akim@epita.fr>
2656 and Paul Eggert <eggert@cs.ucla.edu>
2657
2658 Remove some arbitrary limits on goto numbers and relations.
2659 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
2660 initial values, since they're never used.
2661 (set_goto_map): ngotos is now unsigned, so test for overflow
2662 by seeing whether it wraps around to zero.
2663 * src/lalr.h (goto_number): Now size_t, not short int.
2664 (GOTO_NUMBER_MAXIMUM): Remove.
2665 * src/relation.c (relation_print, traverse, relation_transpose):
2666 Check for END_NODE rather than looking at sign.
2667 * src/relation.h (END_NODE): New macro.
2668 (relation_node): Now size_t, not short int.
2669
2670 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
2671
2672 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
2673 keyword, not an identifier. Problem reported by Baron Schwartz in
2674 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
2675
2676 2004-10-11 Akim Demaille <akim@epita.fr>
2677
2678 * src/symtab.c (symbol_check_alias_consistency): Also check
2679 type names, destructors, and printers.
2680 Reported by Alexandre Duret-Lutz.
2681 Recode the handling of associativity and precedence in terms
2682 of symbol_precedence_set.
2683 Accept no redeclaration at all, not even equal to the previous
2684 value.
2685 (redeclaration): New.
2686 Use it to factor redeclaration complaints.
2687 (symbol_make_alias): Don't set the type of the alias, let
2688 symbol_check_alias_consistency do it as for other features.
2689 * src/symtab.h (symbol): Add new member prec_location, and
2690 type_location.
2691 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
2692 * tests/input.at (Incompatible Aliases): New.
2693
2694 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
2695
2696 .cvsignore fixes to accommodate gnulib changes,
2697 and the practice of naming build directories "_build".
2698 * .cvsignore: Add "_*". Sort.
2699 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
2700 * m4/.cvsignore: Add "*_gl.m4".
2701
2702 2004-10-06 Akim Demaille <akim@epita.fr>
2703
2704 * src/parse-gram.y (add_param): Fix the truncation of trailing
2705 spaces.
2706
2707 2004-10-05 Akim Demaille <akim@epita.fr>
2708
2709 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
2710 whether the reducion was empty or not. This leaves room to
2711 improve the use of YYLLOC_DEFAULT in such a case.
2712 lalr1.cc is still experimental, so changing this is acceptable.
2713 And finally, there are probably not many users who changed the
2714 handling of locations in GLR, so changing is admissible too.
2715
2716 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
2717 empty reduction, set @$ to an empty location ending the previously
2718 stacked symbol.
2719 Adjust uses to make sure the code is triggered on empty
2720 reductions.
2721 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
2722 expected output: empty reductions have empty locations.
2723
2724 2004-09-29 Akim Demaille <akim@epita.fr>
2725
2726 * data/lalr1.cc: Move towards a more standard C++ coding style
2727 for templates: Class < T > -> Class<T>.
2728
2729 2004-09-29 Akim Demaille <akim@epita.fr>
2730
2731 * data/lalr1.cc: Reinstall the former ctor, for sake of
2732 compatibility, but warn it will be removed.
2733 Move towards a more standard C++ coding style (i.e., type *var ->
2734 type* var).
2735
2736 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
2737
2738 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
2739 since it's less likely to work if NULs are involved in the future.
2740
2741 2004-09-27 Akim Demaille <akim@epita.fr>
2742
2743 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
2744
2745 2004-09-27 Akim Demaille <akim@epita.fr>
2746
2747 * data/lalr1.cc (b4_parse_param_decl_1): New.
2748 (b4_parse_param_decl): Use it to have different names between attribute
2749 and argument names.
2750 (b4_cc_constructor_call): Likewise.
2751
2752 2004-09-24 Akim Demaille <akim@epita.fr>
2753
2754 * src/parse-gram.y (add_param): Strip the leading and trailing
2755 blanks from a formal argument declaration.
2756 (YY_LOCATION_PRINT): New.
2757
2758 2004-09-24 Akim Demaille <akim@epita.fr>
2759
2760 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
2761 after the location.
2762
2763 2004-09-24 Akim Demaille <akim@epita.fr>
2764
2765 * doc/bison.texinfo (Table of Symbols): Sort.
2766
2767 2004-09-21 Akim Demaille <akim@epita.fr>
2768
2769 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
2770 the useless parentheses.
2771 Suggested by Paul Eggert.
2772
2773 2004-09-20 Akim Demaille <akim@epita.fr>
2774
2775 Let the initial-action act on the look-ahead, and use it for the
2776 "initial push" (corresponding to an hypothetical beginning-of-file).
2777 And let lalr1.cc honor %initial-action.
2778
2779 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
2780 example.
2781 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
2782 (Parser::Parser): Remove the ctor that used to initialize it.
2783 (Parser::parse): Like in the other skeletons, issue the "starting
2784 parse" message before any action.
2785 Honor %initial-action.
2786 Initialize the stacks with the lookahead.
2787 * data/yacc.c: Let $$ and @$ in %initial-action designate the
2788 look-ahead.
2789 Push them in the stacks.
2790 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
2791
2792 2004-09-20 Akim Demaille <akim@epita.fr>
2793
2794 * doc/bison.texinfo (Initial Action Decl): New.
2795
2796 2004-09-20 Akim Demaille <akim@epita.fr>
2797
2798 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
2799 clearer criterion to define it.
2800 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
2801 When reducing on an empty RHS, use the latest stacked location as
2802 location.
2803 yylloc is not always available.
2804 * data/glr.c: Likewise.
2805 Also, honor initial-actions.
2806
2807 2004-09-20 Akim Demaille <akim@epita.fr>
2808
2809 * data/yacc.c (YY_LOCATION_PRINT): New.
2810 Define when we know YYLTYPE's structure, i.e., when the default
2811 YYLLOC_DEFAULT is used.
2812 * data/c.m4 (b4_yysymprint_generate): Use it.
2813 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
2814 value of the result.
2815 (error_start_): Replace with...
2816 (error_range_): this location array.
2817 This allows to replace code relying on the implementation of
2818 locations by portable code.
2819 * data/yacc.c (yylerrsp): Replace with...
2820 (yyerror_range): this.
2821 Every time a token is popped, update yyerror_range[0], to have an
2822 accurate location for the error token.
2823 * data/glr.c (YY_LOCATION_PRINT): New.
2824 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
2825 deference a pointer.
2826 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
2827 report the location in %printers.
2828
2829 * src/scan-skel.l: Instead of abort, report error messages to ease
2830 understanding skeleton scanning failures.
2831
2832 2004-09-16 Akim Demaille <akim@epita.fr>
2833
2834 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
2835 (iterator, const_iterator): these, to be more in the C++ spirit.
2836 Also, return reverse iterators so that when displaying the stack
2837 we display its bottom first.
2838 (Parser::stack_print_, Parser::reduce_print_): Match the messages
2839 from yacc.c.
2840 We should probably use vector here though.
2841
2842 2004-09-16 Akim Demaille <akim@epita.fr>
2843
2844 Have more complete shift traces.
2845
2846 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
2847 to report Shifts instead of ad hoc YYDPRINTF invocations,
2848 including for the error token.
2849 * data/lalr1.cc (symprint_): Output the location.
2850 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
2851 output the location within the %printer.
2852 Activate GLR tests, at least to make sure they compile properly.
2853 They still don't pass though.
2854 * tests/calc.at: Adjust expect verbose output, since now "Entering
2855 state..." is on a different line than the "Shifting" message.
2856
2857 2004-09-08 Akim Demaille <akim@epita.fr>
2858
2859 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
2860 Bison directive from the Bison file to the invocation of this
2861 macro, so that these directives are passed to
2862 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
2863 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
2864 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
2865 the extra Bison directives instead of the whole series.
2866 Change the grammar so that there are recoverable errors, and
2867 unrecoverable errors. Now we can have the parser give up before
2868 consuming the whole input. As a result we now can observe that
2869 the lookahead is freed when needed.
2870 Change the parser source to parse argv[1] instead of a hard coded
2871 string.
2872 Simplify yylex, and give a value and location to EOF.
2873 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
2874 passed directives already coded in the file.
2875 Add some tests to check the location of "error".
2876 For some tests, the C++ parser is correct, and not yacc.c.
2877 For other tests, they provide different, but unsatisfying, values,
2878 so keep the C++ value so that at least one parser is "correct"
2879 according to the test suite.
2880 (Actions after errors): Remove, this is subsumed by the
2881 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
2882
2883 2004-09-06 Akim Demaille <akim@epita.fr>
2884
2885 * data/lalr1.cc: Adjust the indentation of the labels.
2886 (Parser::pop): New.
2887 Use it.
2888
2889 2004-09-06 Akim Demaille <akim@epita.fr>
2890
2891 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
2892 argument, an informative message.
2893 Call YY_SYMBOL_PRINT.
2894 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
2895 * data/lalr1.cc (destruct_): Likewise.
2896 In addition, no longer depend on b4_yysymprint_generate and
2897 b4_yydestruct_generate to generate these functions, do it "by
2898 hand".
2899
2900 2004-09-03 Akim Demaille <akim@epita.fr>
2901
2902 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
2903 invoked, yydestruct the lookahead.
2904 * tests/calc.at (Calculator $1): Update the expected lengths of
2905 traces: there is an added line for the discarded lookahead.
2906 * doc/bison.texinfo (Destructor Decl): Some rewording.
2907 Define "discarded" symbols.
2908
2909 2004-09-02 Akim Demaille <akim@epita.fr>
2910
2911 * data/lalr1.cc (translate_, destruct_): No reason to be static.
2912
2913 2004-09-02 Akim Demaille <akim@epita.fr>
2914
2915 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
2916 (YYDSYMPRINTF): Rename as...
2917 (YY_SYMBOL_PRINT): this.
2918 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
2919 two.
2920 Use it instead of direct symprint_ calls.
2921 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
2922 one.
2923
2924 2004-09-02 Akim Demaille <akim@epita.fr>
2925
2926 * data/lalr1.cc (b4_yysymprint_generate): New.
2927 (symprint_): New member function, defined when YYDEBUG.
2928 Use it consistently instead of token/nterm debugging output by
2929 hand.
2930 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
2931 %printer calls to use cdebug_ when using lalr1.cc.
2932
2933 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
2934
2935 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
2936 with #ifdef YYDEBUG.
2937
2938 2004-08-26 Akim Demaille <akim@epita.fr>
2939
2940 * doc/bison.texinfo (Implementing Loops): Rename as...
2941 (Implementing Gotos/Loops): this.
2942
2943 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
2944
2945 Adjust to latest gnulib.
2946 * bootstrap (gnulib_modules): Add xalloc-die.
2947 Set LC_ALL=C so that file names sort consistently.
2948 Prefer the gnulib copies of gettext.m4, glibc21.m4,
2949 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
2950 uintmax_t.m4, ulonglong.m4.
2951 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
2952 po.m4 since we are now using _gl.m4 instead.
2953
2954 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
2955
2956 * src/scan-action.l: Remove. Scanning of semantic actions is
2957 handled in scan-gram.l.
2958
2959 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
2960
2961 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
2962
2963 * src/location.h (struct): The file member is a uniqstr.
2964 (equal_boundaries): Use UNIQSTR_EQ for comparison.
2965
2966 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
2967
2968 Fix bug with non-%union parsers that have printers or destructors,
2969 which led to a Bison core dump. Reported by Peter Fales in
2970 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2971
2972 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
2973 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
2974 not to our own type.
2975 * src/output.c (symbol_destructors_output, symbol_printers_output):
2976 Don't assume %union.
2977 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
2978 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
2979 UNION-FLAG. All callers changed.
2980 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
2981 Use type char, not unsigned int, when declaring an array of char;
2982 this lets us remove a cast.
2983 (Printers and Destructors): Add non-%union test cases.
2984
2985 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2986
2987 * doc/bison.texinfo: Minor editorial changes, mostly to the new
2988 GLR writeups. E.g., avoid frenchspacing and the future tense,
2989 change "lookahead" to "look-ahead", and change "wrt" to "with
2990 respect to".
2991
2992 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2993
2994 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
2995 New sections, split off from the GLR Parsers section. Put the new
2996 Simple GLR Parser near the start of the GLR section, for clarity.
2997 Rewrite connective text.
2998
2999 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
3000
3001 * doc/bison.texinfo (Simple GLR Parsers): New section.
3002
3003 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
3004
3005 * NEWS, TODO, doc/bison.texinfo:
3006 Use "look-ahead" instead of "lookahead", to be consistent.
3007 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
3008 while we're fixing "look-ahead".
3009 * src/conflicts.c (shift_set): Renamed from shiftset.
3010 (look_ahead_set): Renamed from lookaheadset.
3011 * src/print.c: Likewise.
3012 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
3013 name for "lookahead".
3014 (report_types, usage): Likewise.
3015 * src/getargs.h (report_look_ahead_tokens): Renamed from
3016 report_lookaheads.
3017 * src/lalr.c (compute_look_ahead_tokens): Renamed from
3018 compute_lookaheads.
3019 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
3020 (look_ahead_tokens_print): Renamed from lookaheads_print.
3021 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
3022 state_rule_lookaheads_print.
3023 * src/state.h: Likewise.
3024 (reductions.look_ahead_tokens): Renamed from lookaheads.
3025 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
3026 AT_DATA_LOOKAHEADS_GRAMMAR.
3027
3028 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
3029
3030 * README: Update location of patched M4 distribution.
3031
3032 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
3033
3034 Don't assume the C++ compiler takes the same arguments as the C compiler
3035 (trivial change).
3036 * configure.ac (O0CXXFLAGS): New var.
3037 * tests/atlocal.in (CXXFLAGS): Use it.
3038
3039 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
3040
3041 Fix some "make check" problems with C++ reported by
3042 Albert Chin-A-Young for Tru64 C++ in this thread:
3043 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
3044
3045 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
3046 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3047 Output to a .cc file for C++, not to a .c file.
3048 * tests/calc.at (AT_CHECK_CALC): Likewise.
3049 * tests/regression.at (AT_CHECK_DANCER): Likewise.
3050 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
3051
3052 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
3053
3054 * tests/calc.at, tests/actions.at: Workaround for SGI
3055 C++ compiler. (trivial change)
3056
3057 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
3058
3059 Spent a few hours checking out which prerequisite versions the
3060 current sources actually require. I went all the way back to
3061 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
3062 a seemingly endless set of combinations of versions more recent
3063 than that. The bottom line is that the current sources require
3064 fairly recent versions of the build tools, and it'll be some work
3065 to change this.
3066 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
3067 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
3068 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
3069 Add comments explaining why those particular versions are
3070 currently needed.
3071
3072 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
3073 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
3074 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
3075
3076 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
3077 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
3078
3079 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
3080
3081 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
3082 0.11.5. Suggested by Bruno Haible.
3083 * bootstrap: Remove gettext version checking.
3084
3085 * doc/bison.texinfo (Decl Summary): Also mention that %union
3086 can depend on prerequisite types. Problem reported by Tim
3087 Van Holder.
3088
3089 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
3090
3091 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
3092 * README-alpha: Don't tell people not to package this.
3093
3094 * bootstrap: Don't assume $(...) works; use `...` instead.
3095 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
3096 gettext better.
3097
3098 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
3099 put into the -d output file, and mention what to do if YYSTYPE is
3100 defined as a macro.
3101
3102 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
3103
3104 Undo change made earlier today: it caused autopoint to not bring
3105 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
3106 autopoint's.
3107
3108 * bootstrap: Check that gettext version matches what's in
3109 configure.ac. Warn users to ignore robots.txt ERROR 404.
3110 * bootstrap: Undo today's earlier change (logged below).
3111 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
3112
3113 The gettext version checking is causing more trouble than it's
3114 curing; remove it. Problem reported by Paul Hilfinger.
3115
3116 * bootstrap: Issue a warning that one can expect a message
3117 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
3118 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
3119
3120 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
3121
3122 Ensure that the C++ compiler used for testing actually works on a
3123 simple test program; if not, skip the C++-related tests. Problem
3124 reported by Vin Shelton in:
3125 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
3126
3127 * m4/cxx.m4: New file.
3128 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
3129 * tests/atlocal.in (BISON_CXX_WORKS): Add.
3130 * tests/local.at (AT_COMPILE_CXX): Use it.
3131
3132 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3133
3134 * data/glr.c (yylloc): Output this macro even if locations are not
3135 being generated, as the GLR parser needs it even in that case.
3136 Problem reported by Troy A. Johnson
3137 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
3138
3139 * configure.ac (AC_INIT): Update to 1.875e.
3140
3141 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
3142
3143 * NEWS: Version 1.875d.
3144 * configure.ac (AC_INIT): Likewise.
3145 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
3146
3147 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
3148 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
3149 lalr1.cc runs afoul of the first, and the last two are no longer
3150 supported by GCC 3.4.0.
3151 * README: Mention GNU m4 1.4 or later; mention m4 patches.
3152 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
3153
3154 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
3155
3156 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
3157 unsigned int, for compatibility with latest gnulib hash module.
3158 * src/state.c (state_hash, state_hasher): Likewise.
3159 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
3160 * src/uniqstr.c (hash_uniqstr): Likewise.
3161
3162 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
3163
3164 * NEWS: Unescaped newlines are no longer allowed in char & strings.
3165
3166 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
3167 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
3168 character and string literals.
3169 (unexpected_end): New function.
3170 (unexpected_eof): Use it.
3171 (unexpected_newline): New function.
3172 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
3173 actions.
3174
3175 * NEWS: Document %expect-rr.
3176
3177 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
3178 Fix typo by replacing $1 with $option.
3179 Remove more 'intl'-related files.
3180 Don't DEFUN AM_INTL_SUBDIR twice.
3181
3182 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
3183 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
3184 strtoul.c.
3185 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
3186 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
3187 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
3188 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
3189 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
3190 * src/.cvsignore: Add *.output.
3191
3192 * src/parse-gram.y: Put copyright notice inside %{ %} so it
3193 gets copied to the output file.
3194
3195 2004-04-28 Paul Eggert <eggert@twinsun.com>
3196
3197 Get files from the gnulib and po repositories, instead of relying
3198 on them being in our CVS. Upgrade to latest versions of gnulib
3199 and Automake.
3200
3201 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
3202 * bootstrap: Bootstrap from gnulib and po repositories.
3203 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
3204 * README-cvs: Document these changes. Remove version numbers from
3205 mentions of build tools, since they change so often. Mention Flex.
3206
3207 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
3208 (gl_USE_SYSTEM_EXTENSIONS): Add.
3209 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
3210 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
3211 does this for us.
3212 (AC_ISC_POSIX): Remove; we no longer support this
3213 ancient OS, as it gets in the way of latest Autoconf & gnulib.
3214 (AC_HEADER_STDC): Remove: we now assume C89 or better.
3215 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
3216 Do not check for C89 headers, except for locale.h which is used
3217 by the Yacc library and must port to K&R hosts.
3218 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
3219 Do not check for C89 functions, except for setlocale which is
3220 used by the Yacc library.
3221 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
3222 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
3223 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
3224 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
3225 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
3226 AM_GNU_GETTEXT): Remove; now done by:
3227 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
3228 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
3229 for us.
3230
3231 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
3232 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
3233 Define to empty, as gnulib.mk will do the rest for us.
3234 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
3235 for us.
3236 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
3237 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
3238
3239 * src/files.c: Include gnulib's xstrndup.h.
3240
3241 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
3242 (REALLOC): Use xnrealloc, for likewise.
3243 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
3244 (strnlen, memrchr): Remove decls; functions no longer used.
3245 Include <stpcpy.h>.
3246
3247 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
3248 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3249 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
3250 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
3251 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
3252 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
3253 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
3254 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
3255 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
3256 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
3257 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
3258 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3259 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
3260 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
3261 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
3262 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
3263 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
3264 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
3265 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
3266 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
3267 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
3268 Remove, as these files are now generated automatically
3269 by bootstrap or automake.
3270
3271 * po/ChangeLog: Remove: all but one entry was a duplicate
3272 of this file, and I moved that 2000-11-02 entry here.
3273
3274 * config/.cvsignore: Add Makefile, depcomp, install-sh.
3275 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
3276 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
3277 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
3278 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
3279 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
3280 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
3281 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
3282 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
3283 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
3284 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
3285 xstrndup.h.
3286 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
3287 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
3288 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
3289 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
3290 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
3291 * src/.cvsignore: Remove *_.c.
3292
3293
3294 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
3295 support it. (The latest stable gzip doesn't.)
3296
3297 2004-04-27 Paul Eggert <eggert@twinsun.com>
3298
3299 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
3300 case, as stos_ is now used by destructors due to the 2004-02-09
3301 change.
3302
3303 Remove more K&R C support.
3304 * lib/libiberty.y (PARAMS): Remove. All uses removed.
3305 * lib/subpipe.c (errno): Remove decl.
3306 Include <stdlib.h> unconditionally.
3307 (EXIT_FAILURE): Remove macro.
3308 * src/complain.c (vfprintf, strerror): Remove.
3309 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
3310 unconditionally.
3311 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
3312 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
3313 (strchr, strspn, memchr): Remove decls.
3314 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
3315 unconditionally. Do not declare perror.
3316 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
3317 unconditionally.
3318
3319 * src/complain.c (_): Remove useless defn, as system.h defines this.
3320
3321 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
3322 with latest obstack.h.
3323 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
3324 to procedure types, as obstack.h now does that for us.
3325 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
3326
3327 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
3328 so that this include file can stand alone.
3329 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
3330 does this now. Include subpipe.h first after config.h, to
3331 test whether it can stand alone.
3332
3333 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
3334 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
3335 unused declaration.
3336
3337 * tests/synclines.at (%union synch line): Put a dummy member in
3338 the union, because empty unions aren't allowed in C. Caught
3339 by GCC 3.4.0.
3340
3341 2004-04-13 Jim Meyering <jim@meyering.net>
3342
3343 * src/conflicts.c (conflicts_print): Correct format string typo:
3344 use `%%' to produce literal `%'. (trivial change)
3345
3346 2004-03-30 Paul Eggert <eggert@twinsun.com>
3347
3348 * src/getargs.c (version): Update copyright year to 2004.
3349
3350 * data/c.m4 (b4_int_type): Use 'short int' rather than
3351 'short', and similarly for 'long', 'unsigned', etc.
3352 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
3353 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
3354 yy_yypstack, yydumpstack): Likewise.
3355 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
3356 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
3357 Likewise.
3358 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
3359 yy_stack_print, yyparse): Likewise.
3360 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
3361 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
3362 * lib/bitset.c (bitset_print): Likewise.
3363 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
3364 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3365 * lib/bitsetv.c (bitsetv_dump): Likewise.
3366 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
3367 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
3368 Likewise.
3369 * src/LR0.c (allocate_itemsets): Likewise.
3370 * src/gram.h (rule_number, rule): Likewise.
3371 * src/lalr.h (goto_number): Likewise.
3372 * src/nullable.c (nullable_compute): Likewise.
3373 * src/output.c (prepare_rules): Likewise.
3374 * src/relation.c (relation_print, relation_digraph): Likewise.
3375 * src/relation.h (relation_node): Likewise.
3376 * src/state.h (state_number, transitions, errs, reductions,
3377 struct state): Likewise.
3378 * src/symtab.h (symbol_number, struct symbol): Likewise.
3379 * src/tables.c (vector_number, tally, action_number,
3380 default_goto, goto_actions): Likewise.
3381 * tests/existing.at (GNU Cim Grammar): Likewise.
3382 * tests/regression.at (Web2c Actions): Likewise.
3383
3384 * src/output.c (muscle_insert_short_int_table): Renamed from
3385 muscle_insert_short_table. All uses changed.
3386
3387 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3388
3389 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
3390 (declaration): Replace expected_conflicts with expected_sr_conflicts.
3391 Add %expect-rr rule.
3392
3393 * src/scan-gram.l: Recognize %expect-rr.
3394
3395 * src/conflicts.h (expected_sr_conflicts): Rename from
3396 expected_conflicts.
3397 (expected_rr_conflicts): Declare.
3398
3399 * src/conflicts.c (expected_sr_conflicts): Rename from
3400 expected_conflicts.
3401 (expected_rr_conflicts): Define.
3402 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
3403 for GLR parsers.
3404 Use expected_sr_conflicts in place of expected_conflicts.
3405 Warn if expected_rr_conflicts used in non-GLR parser.
3406
3407 * doc/bison.texinfo: Add documentation for %expect-rr.
3408
3409 2004-03-08 Paul Eggert <eggert@gnu.org>
3410
3411 Add support for hex token numbers. Suggested by Odd Arild Olsen in
3412 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
3413
3414 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
3415 in lalr1.cc.
3416 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
3417 * src/scan-gram.l (scan_integer): New function.
3418 ({int}): Use it.
3419 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
3420 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
3421 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
3422 Say "long int", not "long", for uniformity with GNU style.
3423
3424 2004-02-25 Paul Eggert <eggert@twinsun.com>
3425
3426 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
3427 compilers. This fixes a problem with Intel's C++ compiler being
3428 chatty, reported by Guido Trentalancia in
3429 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
3430
3431 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
3432
3433 Support %destructor and merge error locations in lalr1.cc.
3434
3435 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
3436 (Parser::stos_): Define unconditionally.
3437 (Parser::destruct_): New method. Generate its body with
3438 b4_yydestruct_generate.
3439 (Parser::error_start_): New attribute.
3440 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
3441 token which are discarded.
3442 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
3443 error_start_ when erroneous token are discarded.
3444 (Parser::parse) <yyerrlab1>: Compute the location of the error
3445 token so that it covers all the discarded tokens.
3446 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
3447 it can be called with `%skeleton "lalr1.cc"', and do that.
3448
3449 2004-02-02 Paul Eggert <eggert@twinsun.com>
3450
3451 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
3452 $(top_srcdir)/lib and ../lib. This fixes a bug reported
3453 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
3454 There's no need to mention top_builddir since Automake does that
3455 for us.
3456 (INCLUDES): Remove, as Automake says it's obsolescent.
3457 Contents migrated into AM_CPPFLAGS as described above.
3458 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
3459
3460 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3461
3462 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
3463 (yyreportSyntaxError): Handle case where lookahead token is
3464 YYEMPTY.
3465
3466 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3467
3468 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
3469 resulting parsers are compilable with C++.
3470
3471 2003-12-23 Paul Eggert <eggert@twinsun.com>
3472
3473 * config/depcomp, config/install-sh: Sync with Automake 1.8.
3474 * src/output.c (output_skeleton): Rename local var.
3475 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
3476 Bison tokens, as this runs afoul of the 2003-10-07 change that
3477 disallowed NUL bytes in character constants or string literals.
3478
3479 * tests/local.at: Require Autoconf 2.59's Autotest.
3480 * tests/testsuite.at: Don't include local.at, since we now assume
3481 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
3482 including it.
3483 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
3484 multiple inclusion warnings.
3485
3486 2003-12-02 Akim Demaille <akim@epita.fr>
3487
3488 * doc/bison.texinfo (How Can I Reset the Parser): More about start
3489 conditions.
3490 From Bruno Haible.
3491
3492 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
3493
3494 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
3495
3496 2003-10-07 Paul Eggert <eggert@twinsun.com>
3497
3498 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
3499 if testsuite doesn't exist.
3500
3501 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
3502 literals, unfortunately.
3503 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
3504 Complain about NUL bytes in character constants or string literals.
3505
3506 2003-10-05 Paul Eggert <eggert@twinsun.com>
3507
3508 * NEWS: Don't document %no-default-prec, as it's still
3509 too experimental.
3510 * doc/bison.texinfo: Document %no-default-prec only if
3511 the defaultprec flag is set. Normally it's not.
3512
3513 2003-10-04 Paul Eggert <eggert@twinsun.com>
3514
3515 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
3516 non-modifiable lvalue, instead of a modifiable one.
3517 * doc/bison.texinfo (Actions): Document that $$ can
3518 be assigned to. Do not claim that $$ and $N are
3519 array element references: user code should not rely on this.
3520
3521 2003-10-01 Paul Eggert <eggert@twinsun.com>
3522
3523 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
3524 (grammar_declaration): Use it.
3525 * src/scan-gram.l: New token %no-default-prec.
3526 * tests/conflicts.at: Revamp tests to use %no-default-prec.
3527 * NEWS, doc/bison.texinfo: Document the above.
3528
3529 2003-10-01 Akim Demaille <akim@epita.fr>
3530
3531 VCG no longer supports long_straight_phase.
3532
3533 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
3534 * src/print_graph.c (print_graph): Adjust.
3535
3536 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
3537 and Paul Eggert <eggert@twinsun.com>
3538
3539 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
3540 Table of Symbols): Document %default-prec.
3541 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
3542 (grammar_declaration): Set default_prec on %default-prec.
3543 * src/scan-gram.l (%default-prec): New token.
3544 * src/reader.h (default_prec): New flag.
3545 * src/reader.c: Likewise.
3546 (packgram): Handle it.
3547 * tests/conflicts.at (%default-prec without %prec,
3548 %default-prec with %prec, %default-prec 1): New tests.
3549
3550 2003-09-30 Paul Eggert <eggert@twinsun.com>
3551
3552 * tests/testsuite.at: Include local.at, not input.at, fixing
3553 a typo in the 2003-08-25 patch.
3554
3555 2003-08-27 Akim Demaille <akim@epita.fr>
3556
3557 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
3558 GCC warnings.
3559
3560 2003-08-26 Akim Demaille <akim@epita.fr>
3561
3562 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
3563 "<\#" to avoid magic from Gnus when posting parts of this script.
3564
3565 2003-08-26 Akim Demaille <akim@epita.fr>
3566
3567 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
3568 (Parser::parse): here.
3569 Adjust: nerrs and errstatus is now replaced by...
3570 (Parser::nerrs_, Parser::errstatus_): New.
3571
3572 2003-08-25 Akim Demaille <akim@epita.fr>
3573
3574 * config/announce-gen, Makefile.cfg: New.
3575 * Makefile.am: Adjust.
3576 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
3577 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
3578
3579 2003-08-25 Akim Demaille <akim@epita.fr>
3580
3581 When reducing initial empty rules, Bison parser read an initial
3582 location that is not defined. This results in garbage, and that
3583 affects Bison's own parser. Therefore we need (i) to extend Bison
3584 to support a means to initialize this location, and (ii) to use
3585 this CVS Bison to fix CVS Bison's parser.
3586
3587 * src/reader.h, reader.c (epilogue_augment): Remove, replace
3588 with...
3589 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
3590 * src/parse-gram.y: Adjust.
3591 (%initial-action): New.
3592 (%error-verbose): Since we require CVS Bison, there is no reason
3593 not to use it.
3594 * src/scan-gram.l: Adjust.
3595 * src/Makefile.am (YACC): New, to make sure we use our own parser.
3596 * data/yacc.c (yyparse): Use b4_initial_action.
3597
3598 2003-08-25 Akim Demaille <akim@epita.fr>
3599
3600 * doc/bison.texinfo: Don't promote stdout for error messages.
3601
3602 2003-08-25 Akim Demaille <akim@epita.fr>
3603
3604 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
3605 From Alexandre Duret-Lutz.
3606
3607 2003-08-25 Akim Demaille <akim@epita.fr>
3608
3609 Version 1.875c.
3610
3611 2003-08-25 Akim Demaille <akim@epita.fr>
3612
3613 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
3614 Use them.
3615
3616 2003-08-25 Akim Demaille <akim@epita.fr>
3617
3618 * data/lalr1.cc (Parser::reduce_print_): New.
3619 Use it.
3620
3621 2003-08-25 Akim Demaille <akim@epita.fr>
3622
3623 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
3624 error recovery loops. This patch is based on
3625 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
3626 Also, augment the similarity between lalr1.cc and yacc.c.
3627 Note: the locations of error recovery rules are not correct yet.
3628
3629 * data/lalr1.cc: Comment changes to augment the similarity between
3630 lalr1.cc and yacc.c.
3631 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
3632 (yyerrlab1): Remove, but where it used to be (now the bottom part of
3633 yyerrlab), when hitting EOF, pop the whole stack here instead of
3634 merely falling thru the default error handling mechanism.
3635 (yyerrorlab): New label, with the old contents of YYERROR,
3636 plus the following change: pop the stack of rhs corresponding
3637 to the production that invoked YYERROR. That is how Yacc
3638 behaves (required by POSIX).
3639 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
3640 fail.
3641
3642 2003-08-25 Akim Demaille <akim@epita.fr>
3643
3644 Tune local.at so that people can "autom4te -l autotest calc.at -o
3645 calc" for instance, to extract a sub test suite.
3646
3647 * tests/testsuite.at: Move the initialization, Autotest version
3648 requirement, and AT_TESTED invocation into...
3649 * tests/local.at: here.
3650 * tests/testsuite.at: Include it for compatibility with Autoconf
3651 2.57.
3652 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
3653 be ignore.
3654
3655 2003-08-04 Paul Eggert <eggert@twinsun.com>
3656
3657 Rework code slightly to avoid gcc -Wtraditional warnings.
3658 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
3659 The returned value is now stored in *YY0. All callers changed.
3660 * src/output.c (merge_output): Adjust to the above change.
3661
3662 2003-07-26 Paul Eggert <eggert@twinsun.com>
3663
3664 * data/glr.c (YYASSERT): New macro.
3665 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
3666 yyresolveStates, yyprocessOneStack):
3667 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
3668 Derived from a suggestion by Frank Heckenbach.
3669
3670 2003-07-25 Paul Eggert <eggert@twinsun.com>
3671
3672 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
3673 for portability to K&R C (after ansi2knr, presumably). See
3674 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
3675 by Frank Heckenbach, though I have omitted the structure-initialization
3676 part of his glr-knr.diff patch since I recall that the Portable
3677 C Compiler didn't require that change.
3678
3679 Let the user specify how to allocate and free memory.
3680 Derived from a suggestion by Frank Heckenbach in
3681 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
3682 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
3683 All uses of free, malloc, realloc changed to use these macros,
3684 and unnecessary casts removed.
3685 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
3686
3687 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
3688
3689 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
3690 use s.empty() rather than s == "" to test for empty string; see
3691 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
3692 (trivial change)
3693
3694 2003-06-25 Akim Demaille <akim@epita.fr>
3695
3696 * config/depcomp, config/install-sh: Update from masters.
3697
3698 2003-06-20 Paul Eggert <eggert@twinsun.com>
3699
3700 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
3701 and return properly parenthesized result.
3702 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
3703 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3704 Remove unnecessary parentheses from uses.
3705 * doc/bison.texinfo (Location Default Action): Describe the
3706 conventions for parentheses.
3707
3708 2003-06-19 Paul Eggert <eggert@twinsun.com>
3709
3710 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
3711 yyreportTree): Do not assume that size_t is the same width as int,
3712 when printing sizes. Print sizes using an unsigned format.
3713 Problem reported by Frank Heckenbach in
3714 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
3715
3716 Port to Forte Developer 7 C compiler.
3717 * data/glr.c (struct YYLTYPE): If locations are not being used,
3718 declare a single dummy member, as empty structs do not conform
3719 to the C standard.
3720 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
3721 the Forte Developer 7 C compiler complains that end-of-loop
3722 code is not reached.
3723
3724 2003-06-17 Paul Eggert <eggert@twinsun.com>
3725
3726 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
3727 avoid warnings from picky compilers about redefinition of PARAMS.
3728
3729 2003-06-17 Paul Eggert <eggert@twinsun.com>
3730
3731 Version 1.875b.
3732
3733 * NEWS: Document 1.875b.
3734
3735 * lib/bbitset.h: Do not include config.h; that's the includer's job.
3736 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
3737 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
3738 Don't use 'index' in comments, as it's a builtin fn on some hosts.
3739 * lib/bitset_stats.c: Include gettext.h unconditionally, as
3740 per recent gettext manual's suggestion.
3741 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
3742 Use prototypes, not old-style definitions.
3743 * lib/lbitset.c (lbitset_unused_clear): Likewise.
3744 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
3745 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
3746 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
3747 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
3748 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
3749 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
3750 vbitset_or_and_cmp, vbitset_copy): Likewise.
3751
3752 * lib/libiberty.h: Do not include config.h; that's the includer's job.
3753 Do not include <stdlib.h>.
3754 (PARAMS): Define unconditionally for C89.
3755 (ATTRIBUTE_NORETURN): Remove.
3756 (ATTRIBUTE_UNUSED): Define unconditionally.
3757
3758 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
3759 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
3760 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
3761 * lib/vbitset.c, lib/vbitset.h: New files.
3762 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3763 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
3764 from libbitset.
3765
3766 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
3767 `How Can I Reset @code{yyparse}', since texinfo does not allow
3768 arbitrary @ in node names.
3769
3770 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
3771 shouldn't be needed according to the gettext 0.12.1 documentation
3772 but which seem to be needed anyway: codeset.m4 glibc21.m4
3773 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
3774 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
3775 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
3776
3777 * lib/.cvsignore: Add stdbool.h.
3778 * m4/.cvsignore: Add nls.m4, po.m4.
3779
3780 Upgrade to CVS gnulib.
3781 * stdbool_.h: File renamed from stdbool.h.in.
3782 * configure.ac (AM_STDBOOL_H): Invoke this instead of
3783 AC_HEADER_STDBOOL.
3784 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
3785 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
3786 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
3787 (MOSTLYCLEANFILES): New var.
3788 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
3789 (stdbool.h): New rule.
3790 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
3791 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
3792 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
3793 m4/quote.m4: Upgrade to today's gnulib.
3794
3795 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
3796 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
3797 the tests right now.
3798 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
3799 yyerror are declared before use; C99 requires this.
3800
3801 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3802
3803 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
3804 first.
3805 (yyrecoverSyntaxError): Correct the logic for setting and testing
3806 yyerrState.
3807 Correct comment on handling EOF.
3808 Allow states with only a default reduction, rather than failing
3809 (I can't quite reconstruct why these were not allowed before).
3810
3811 Fixes to avoid problem that $-N rules in GLR parsers can cause
3812 buffer overruns, corrupting state.
3813
3814 * src/output.c (prepare_rules): Output max_left_semantic_context
3815 definition.
3816 * src/reader.h (max_left_semantic_context): New variable declaration.
3817 * src/scan-gram.l (max_left_semantic_context): Define.
3818 (handle_action_dollar): Update max_left_semantic_context.
3819 * data/glr.c (YYMAXLEFT): New definition.
3820 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
3821 (yyresolveAction): Ditto.
3822
3823 Fixes to problems with location handling in GLR parsers reported by
3824 Frank Heckenbach (2003/06/05).
3825
3826 * data/glr.c (YYLTYPE): Make trivial if locations not used.
3827 (YYRHSLOC): Add parentheses, and define only if locations used.
3828 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
3829 locations not used.
3830 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
3831 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
3832
3833 * tests/cxx-type.at: Exercise location information; update tests
3834 to differentiate output with and without locations.
3835 Remove forward declarations of yylex and yyerror---caused errors
3836 because default YYLTYPE not yet defined.
3837 Change semantic actions to compute strings, rather than printing
3838 them directly (to test proper passing of semantics values). Change
3839 output to prefix notation and update test data and expected results.
3840 (yylex): Track locations.
3841 (stmtMerge): Return value rather than printing, and include arguments
3842 in value.
3843
3844 2003-06-03 Paul Eggert <eggert@twinsun.com>
3845
3846 Avoid warnings generated by GCC 2.95.4 when Bison is
3847 configured with --enable-gcc-warnings.
3848 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
3849 yy::]b4_parser_class_name[::translate_,
3850 yy::Stack::operator[] (unsigned),
3851 yy::Stack::operator[] (unsigned) const,
3852 yy::Slice::operator[] (unsigned),
3853 yy::Slice::operator[] (unsigned) const):
3854 Rename local vars to avoid warnings.
3855 * tests/glr-regression.at (Improper handling of embedded actions
3856 and $-N in GLR parsers): Remove unused local variable from yylex.
3857 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
3858 (void) as arg when not pure, since we now assume C89 when building
3859 Bison. Pacify GCC by using parameter.
3860
3861 2003-06-02 Paul Eggert <eggert@twinsun.com>
3862
3863 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
3864 yy::Location::lines, yy::Location::columns): Rename arguments
3865 to avoid shadowing; this removes a warning generated by GCC 3.3.
3866
3867 2003-06-01 Paul Eggert <eggert@twinsun.com>
3868
3869 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
3870 to g++, as GCC 3.3 complains if you do it.
3871 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
3872 everything that WARNING_CFLAGS has, except omit warnings
3873 not suitable for C++.
3874 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
3875 * tests/atlocal.in (CXXFLAGS): New var.
3876 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
3877
3878 Fix a GLR parser bug I reported in February; see
3879 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
3880 The problem was that GLR parsers did not conform to the C standard,
3881 because actions like { $1 = $2 + $3; } expanded to expressions
3882 that invoked YYFILL in separate subexpressions, and YYFILL assigned
3883 to a local variable. The C standard says that expressions
3884 like (var = f ()) + (var = f ()) have undefined behavior.
3885 Another problem was that GCC sometimes issues warnings that
3886 yyfill and its parameters are unused.
3887
3888 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
3889 as possibly unused.
3890 (yyfill): New function.
3891 (YYFILL): Use it.
3892 (yyuserAction): Change type of yynormal to bool, so that it matches
3893 the new yyfill signature. Mark it as possibly unused.
3894
3895
3896 Follow up on a bug I reported in February, where a Bison-generated
3897 parser can loop. Provide a test case and a fix for yacc.c. I
3898 don't have a fix for lalr1.cc or for glr.c, unfortunately.
3899 The original bug report is in:
3900 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
3901
3902 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
3903 macro's size was becoming unwieldy.
3904 (yyerrlab): Do not discard an empty lookahead symbol, as this
3905 might destroy garbage.
3906 (yyerrorlab): New label, with the old contents of YYERROR,
3907 plus the following change: pop the stack of rhs corresponding
3908 to the production that invoked YYERROR. That is how Yacc
3909 behaves, and POSIX requires this behavior.
3910 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
3911 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
3912 Define 'alarm' to do nothing if unistd.h is not available.
3913 Add a new rule "exp: '-' error;" to test the above change to
3914 data/yacc.c. Use 'alarm' to abort any test taking longer than
3915 10 seconds, as it's probably looping.
3916 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
3917 Also, the new yacc.c generates two fewer diagnostics for an
3918 existing test.
3919
3920 2003-05-24 Paul Eggert <eggert@twinsun.com>
3921
3922 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
3923 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
3924 This fixes a problem reported by John Bowman when the Compaq/HP
3925 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
3926 -ansi -Wall -gall).
3927 * data/yacc.c (union yyalloc): Likewise.
3928 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
3929
3930 Switch from 'int' to 'bool' where that makes sense.
3931
3932 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
3933 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
3934 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
3935 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
3936 Return or accept bool, not int. All callers changed.
3937 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
3938 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
3939 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
3940 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
3941 bitset_or_and_cmp_): Likewise.
3942 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
3943 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
3944 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
3945 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
3946 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
3947 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
3948 bitset_stats_or_and_cmp): Likewise.
3949 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
3950 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
3951 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
3952 ebitset_xor_cmp): Likewise.
3953 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
3954 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
3955 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
3956 lbitset_xor_cmp): Likewise.
3957 * lib/bbitset.h: Include <stdbool.h>.
3958 (struct bitset_vtable): The following members now return bool, not
3959 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
3960 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
3961 or_and_cmp).
3962 * src/conflicts.c (count_rr_conflicts): Likewise.
3963 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
3964 All uses changed.
3965 * lib/ebitset.c (ebitset_obstack_init): Likewise.
3966 * lib/lbitset.c (lbitset_obstack_init): Likewise.
3967 * src/getargs.c (debug_flag, defines_flag, locations_flag,
3968 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3969 graph_flag): Likewise.
3970 * src/getargs.h (debug_flag, defines_flag, locations_flag,
3971 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3972 graph_flag): Likewise.
3973 * src/output.c (error_verbose): Likewise.
3974 * src/output.h (error_verbose): Likewise.
3975 * src/reader.c (start_flag, typed): Likewise.
3976 * src/reader.h (typed): Likewise.
3977 * src/getargs.c (LOCATIONS_OPTION): New constant.
3978 (long_options, getargs): Use it.
3979 * src/lalr.c (build_relations): Use bool, not int.
3980 * src/nullable.c (nullable_compute): Likewise.
3981 * src/print.c (print_reductions): Likewise.
3982 * src/tables.c (action_row, pack_vector): Likewise.
3983 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
3984 * src/output.c (prepare): Use it.
3985 * src/output.c (token_definitions_output,
3986 symbol_destructors_output, symbol_destructors_output): Use string,
3987 not boolean integer, to keep track of whether to output separator.
3988 * src/print_graph.c (print_core): Likewise.
3989 * src/state.c (state_rule_lookaheads_print): Likewise.
3990
3991 * config/install-sh: Sync from automake 1.7.5.
3992
3993 2003-05-14 Paul Eggert <eggert@twinsun.com>
3994
3995 * src/parse-gram.y (rules_or_grammar_declaration): Require a
3996 semicolon after a grammar declaration, in the interest of possible
3997 future changes to the Bison input language.
3998 Do not allow a stray semicolon at the start of the grammar.
3999 (rhses.1): Allow one or more semicolons after any rule, including
4000 just before "|" as required by POSIX.
4001 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
4002 grammar.
4003
4004 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
4005
4006 %parse-param support for lalr1.cc.
4007
4008 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
4009 b4_cc_constructor_calls, b4_cc_constructor_call,
4010 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
4011 definitions.
4012 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
4013 parse-param arguments.
4014 (yy::b4_parser_class_name): Declare instance variables to
4015 hold parse-param arguments.
4016 * tests/calc.at: s/value/semantic_value/ because value clashes
4017 with a member of yy::b4_parser_class_name. Adjust C++ code
4018 to handle %parse-param. Enable %parse-param test in C++.
4019
4020 2003-05-12 Paul Eggert <eggert@twinsun.com>
4021
4022 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
4023 English a bit. Fix fclose typo. Change "const char" to "char
4024 const", and use ANSI C rather than K&R for "main". Suggest
4025 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
4026 and suggest yy_switch_to_buffer.
4027
4028 2003-05-05 Paul Eggert <eggert@twinsun.com>
4029
4030 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
4031 C89. This avoids a diagnostic on compilers that define __STDC__
4032 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
4033 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
4034
4035 2003-05-03 Paul Eggert <eggert@twinsun.com>
4036
4037 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
4038 Do not overrun array bounds.
4039 This should fix a bug reported today by Olatunji Oluwabukunmi in
4040 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
4041
4042 2003-04-29 Akim Demaille <akim@epita.fr>
4043
4044 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
4045 * src/getargs.c, src/getargs.h: here, as bool, not int.
4046 (nondeterministic_parser): New.
4047 * src/parse-gram.y, src/scan-gram.l: Support
4048 %nondeterministic-parser.
4049 * src/output.c (prepare): Use nondeterministic_parser instead
4050 of glr_parser where appropriate.
4051 * src/tables.c (conflict_row, action_row, save_row)
4052 (token_actions, token_actions, pack_vector): Ditto.
4053
4054 2003-04-29 Akim Demaille <akim@epita.fr>
4055
4056 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
4057
4058 2003-04-29 Akim Demaille <akim@epita.fr>
4059
4060 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
4061 with %pure-parser and %locations to exercise the patch from Yakov
4062 Markovitch below.
4063
4064 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
4065
4066 * data/yacc.c: (b4_lex_param): Corrected for the case where
4067 %lex-param is provided and %pure-parser isn't.
4068
4069 2003-04-27 Paul Eggert <eggert@twinsun.com>
4070
4071 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
4072 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
4073 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
4074 if it is not defined.
4075 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
4076
4077 2003-04-26 Paul Eggert <eggert@twinsun.com>
4078
4079 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
4080 Declare to be of type suitable for the ninf value itself, not of
4081 type suitable for the corresponding table, since the latter might
4082 be unsigned but the ninf value might be negative. This fixes a
4083 bug reported by Alexandre Duret-Lutz in
4084 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
4085
4086 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
4087 invokes it. We shouldn't invoke it twice because it will attempt
4088 to put error.o in the archive twice. This fixes a glitch reported
4089 by Martin Mokrejs in
4090 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
4091
4092 2003-04-21 Paul Eggert <eggert@twinsun.com>
4093
4094 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
4095 to gnulib.
4096
4097 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
4098
4099 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
4100 Fix obvious typo that results in uncompilable GLR parsers
4101 when both %pure-parser and %locations are used. (trivial change)
4102
4103 2003-04-17 Paul Eggert <eggert@twinsun.com>
4104
4105 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
4106 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
4107 Do not insert the expected token via unput, as this runs afoul
4108 of a POSIX-compatibility bug in flex 2.5.31.
4109 All uses changed to BEGIN the parent state,
4110 since we no longer insert the expected token via unput.
4111 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
4112 that is no longer emitted after the above change.
4113
4114 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
4115 the first one. This change is from Paul Hilfinger, and it fixes
4116 regression reported by Werner Lemberg in
4117 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4118
4119 (resolve_sr_conflict): Don't invoke state_errs_set
4120 unless one or more tokens have been explicitly made errors.
4121 Otherwise, the above change causes Bison to abort.
4122
4123 * tests/existing.at (GNU pic Grammar): New test case, taken from
4124 Lemberg's email.
4125
4126 2003-03-31 Akim Demaille <akim@epita.fr>
4127
4128 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
4129
4130 2003-03-31 Akim Demaille <akim@epita.fr>
4131
4132 * src/output.c (prepare_symbols): Avoid trailing spaces in the
4133 output.
4134
4135 2003-03-31 Akim Demaille <akim@epita.fr>
4136
4137 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
4138 From Paul Hilfinger.
4139
4140 2003-03-29 Akim Demaille <akim@epita.fr>
4141
4142 * m4/error.m4: Do not put under dynamic conditions some code which
4143 expansion is under static control.
4144
4145 2003-03-29 Akim Demaille <akim@epita.fr>
4146
4147 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
4148
4149 2003-03-29 Akim Demaille <akim@epita.fr>
4150
4151 * doc/bison.texinfo (Strings are Destroyed): New.
4152
4153 2003-03-13 Paul Eggert <eggert@twinsun.com>
4154
4155 * .cvsignore: Add configure.lineno.
4156 * src/.cvsignore: Add yacc.
4157 * tests/.cvsignore: Add testsuite.log.
4158 * doc/fdl.texi: Sync with latest FSF version.
4159
4160 2003-03-12 Paul Eggert <eggert@twinsun.com>
4161
4162 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
4163 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
4164 cursor, instead of leaving it undefined. This fixes a bug
4165 reported by Tim Van Holder in
4166 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
4167 * tests/input.at (Torturing the Scanner): Test the scanner on
4168 an empty input file, which was Tim Van Holder's test case.
4169
4170 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
4171 <sys/resource.h> can be included, include sys/time.h and
4172 sys/times.h first, if available. This works around the SunOS
4173 4.1.4 porting bug reported by Bruce Becker in
4174 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
4175
4176 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
4177 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
4178 AC_HEADER_SYS_WAIT.
4179
4180 Merge changes from gnulib. This was prompted because the CVS
4181 snapshot didn't build on Solaris 7 due to strnlen problems.
4182
4183 These changes need to be merged back into gnulib:
4184 * lib/hash.c: Include <stdbool.h> unconditionally.
4185 * m4/onceonly.m4 (m4_quote): New macro.
4186 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
4187 Quote AC_FOREACH variable-expansions properly.
4188 The 2003-01-03 obstack.h change also needs merging.
4189 {end of changes requiring merging}
4190
4191 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4192 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
4193 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
4194 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
4195 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
4196 New files, imported from gnulib.
4197 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
4198 above.
4199
4200 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
4201 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
4202 gnulib sources.
4203
4204 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
4205 Add.
4206 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
4207 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
4208 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
4209 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
4210 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
4211 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
4212 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
4213 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
4214 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
4215 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
4216 (jm_PREREQ_ARGMATCH): Remove.
4217 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
4218 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
4219
4220 * src/system.h: Include <stdbool.h> unconditionally.
4221
4222 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
4223 assuming at least C89 in the bitset code for some time now.
4224
4225 2003-03-03 Akim Demaille <akim@epita.fr>
4226
4227 * ro.po: New.
4228
4229 2003-03-02 Akim Demaille <akim@epita.fr>
4230
4231 * doc/bison.texinfo (Table of Symbols): Reactivate the
4232 documentation for %lex-param, and %parse-param.
4233
4234 2003-03-02 Akim Demaille <akim@epita.fr>
4235
4236 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
4237 generate verbose error messages.
4238 Use the number of tokens as an upper bound in yytname, as it
4239 cannot be a non terminal.
4240
4241 2003-03-02 Akim Demaille <akim@epita.fr>
4242
4243 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
4244 message.
4245
4246 2003-03-02 Akim Demaille <akim@epita.fr>
4247
4248 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
4249 Use them to exercise yycheck overrun.
4250 Based on Andrew Suffield's grammar.
4251
4252 2003-03-02 Akim Demaille <akim@epita.fr>
4253
4254 Create tests/local.at for Bison generic testing macros.
4255
4256 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
4257 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
4258 This new file.
4259 * tests/calc.at (AT_CHECK_CALC): Adjust.
4260 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
4261 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
4262 * tests/local.at: here.
4263 (AT_COMPILE_CXX): Tags the tests using it as c++.
4264 Ignore the test if CXX is not functional.
4265
4266 2003-03-01 Paul Eggert <eggert@twinsun.com>
4267
4268 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
4269 not loc->end, since loc->end might contain garbage and this leads
4270 to undefined behavior on some platforms.
4271 (id_loc, token_start): Use (IF_LINTed) initial values that do not
4272 depend on *loc, so that the reader doesn't give the the false
4273 impression that *loc is initialized.
4274 (<INITIAL>"%%"): Do not bother setting code_start, since its value
4275 does not survive the return.
4276
4277 2003-03-01 Akim Demaille <akim@epita.fr>
4278
4279 * src/scan-gram.l (code_start): Always initialize it when entering
4280 into yylex, as SC_EPILOGUE is activated *before* the corresponding
4281 yylex invocation. An alternative would be making it static, but
4282 then it starts with the second %%'s beginning, instead of its end.
4283
4284 2003-02-28 Paul Eggert <eggert@twinsun.com>
4285
4286 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
4287 around a UnixWare 7.1.1 porting bug reported by John Hughes in
4288 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
4289
4290 2003-02-26 Paul Eggert <eggert@twinsun.com>
4291
4292 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
4293 Remove Sequent/Pyramid discussion (nobody uses them any more).
4294 Merge VMS and MS-DOS discussion; these ports may well be dead
4295 but let's keep mentioning them for now. Put <> around email
4296 addresses. Add copyright notice.
4297
4298 2003-02-24 Paul Eggert <eggert@twinsun.com>
4299
4300 * data/glr.c (yy_reduce_print): yylineno -> yylno,
4301 to avoid collision with flex use of yylineno.
4302 Problem reported by Bruce Lilly in
4303 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
4304 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4305 * data/yacc.c (yy_reduce_print): Likewise.
4306
4307 * config/depcomp: Sync with Automake 1.7.3.
4308
4309 2003-02-21 Akim Demaille <akim@epita.fr>
4310
4311 * data/lalr1.cc: Use temporary variables instead of casts to
4312 change integer types.
4313 Suggested by Paul Eggert.
4314
4315 2003-02-21 Akim Demaille <akim@epita.fr>
4316
4317 * doc/bison.texinfo: Use "location" consistently to refer to @n,
4318 to avoid confusions with lalr1.cc's notion of Position.
4319 Suggested by Paul Eggert.
4320
4321 2003-02-20 Akim Demaille <akim@epita.fr>
4322
4323 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
4324 before initial_columns.
4325 (location.hh): Use consistent variable names when defining the
4326 operator<<.
4327 Use "last" so that we subtract from Positions, not from unsigned.
4328
4329 2003-02-20 Akim Demaille <akim@epita.fr>
4330
4331 * data/lalr1.cc (position.hh): New subfile, including the extended
4332 and Doxygen'ed documentation of class Position.
4333 (location.hh): Use it.
4334 Document a` la Doxygen.
4335 With the help of Benoit Perrot.
4336
4337 2003-02-20 Akim Demaille <akim@epita.fr>
4338
4339 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
4340 AT_YACC_IF.
4341 Redefine AT_YYERROR_SEES_LOC_IF using it.
4342 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
4343 not defined.
4344 Don't use the location in yy::Parser::error_ and
4345 yy::Parser::print_ when not %locations.
4346 Activate more lalr1.cc tests.
4347
4348 2003-02-19 Akim Demaille <akim@epita.fr>
4349
4350 * data/lalr1.cc: When displaying a line number, be sure to make it
4351 an int.
4352
4353 2003-02-19 Akim Demaille <akim@epita.fr>
4354
4355 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
4356 Remove, useless.
4357 (YYABORT, YYACCEPT, YYERROR): New.
4358 * tests/calc.at: Renable the lalr1.cc test.
4359
4360 2003-02-19 Akim Demaille <akim@epita.fr>
4361
4362 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
4363 error recovery, mixing with/without pops and discarding of the
4364 lookahead.
4365 Exercise YYERROR.
4366 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
4367
4368 2003-02-17 Paul Eggert <eggert@twinsun.com>
4369
4370 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
4371 * tests/testsuite.at (AT_COMPILE): Use them.
4372 This fixes the testsuite problem reported by Robert Lentz in
4373 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
4374
4375 2003-02-12 Paul Eggert <eggert@twinsun.com>
4376
4377 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
4378 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
4379 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
4380 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
4381 Check for malloc failure, for consistency with yacc.c.
4382 (yytname_size): Remove, for consistency with yacc.c.
4383
4384 The bug still remains in data/lalr1.cc, as I didn't have time
4385 to fix it there.
4386
4387 2003-02-06 Akim Demaille <akim@epita.fr>
4388
4389 * configure.ac (GXX): Rename as...
4390 (CXX): this, to keep the original Autoconf semantics.
4391 Require 2.57.
4392 * data/lalr1.cc: Fix b4_copyright invocations.
4393 If YYDEBUG is not defined, don't depend upon name_ being defined.
4394 (location.hh): Include string and iostream.
4395 (Position::filename): New member.
4396 (Position::Position ()): New.
4397 (operator<< (Position)): New.
4398 (operator- (Position, int)): New.
4399 (Location::first, Location::last): Rename as...
4400 (Location::begin, Location::end): these, to mock the conventional
4401 iterator names.
4402 (operator<< (Location)): New.
4403 * tests/atlocal.in (CXX): New.
4404 * tests/testsuite.at (AT_COMPILE_CXX): New.
4405 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
4406 locations in a more synthetic way.
4407 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
4408 lalr1.cc is used.
4409 Adjust the C locations to match those from Emacs: first column is
4410 column 0.
4411 Change all the expected results.
4412 Conform to the GCS: simplify the locations when applicable.
4413 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
4414 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
4415 these CPP macros with the m4 macros new defined by...
4416 (AT_CHECK_PUSHDEFS): this, i.e.:
4417 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
4418 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
4419 New macros.
4420 (AT_CHECK_POPDEFS): Undefine them.
4421 (AT_CHECK_CALC_LALR1_CC): New.
4422 Use it for the first lalr1.cc test.
4423
4424 2003-02-04 Akim Demaille <akim@epita.fr>
4425
4426 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
4427 Location as is defined.
4428
4429 2003-02-04 Akim Demaille <akim@epita.fr>
4430
4431 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
4432 name_ being defined.
4433
4434 2003-02-03 Paul Eggert <eggert@twinsun.com>
4435
4436 * src/gram.h (start_symbol): Remove unused decl.
4437
4438 Use more-consistent naming conventions for local vars.
4439
4440 * src/derives.c (derives_compute): Change type of local var from
4441 int to rule_number.
4442 * src/gram.c (grammar_rules_partial_print): Likewise.
4443 * src/print.c (print_core): Likewise.
4444 * src/reduce.c (reduce_grammar_tables): Likewise.
4445
4446 * src/gram.c (grammar_dump): Change name of item_number *
4447 local var from r to rp.
4448 * src/nullable.c (nullable_compute): Likewise.
4449
4450 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
4451
4452 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
4453 for symbol or symbol_number var.
4454 * src/reader.c (grammar_start_symbol_set): Likewise.
4455 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
4456 Likewise.
4457 * src/state.c (transitions_to): Likewise.
4458 * src/state.h: Likewise.
4459 * src/tables.c (symbol_number_to_vector_number): Likewise.
4460
4461 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
4462 char * var.
4463
4464 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
4465 var.
4466
4467 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
4468 var.
4469
4470 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
4471 Use str, not s, for char * var. Use ch, not c, for character var.
4472 Use size for size var.
4473
4474 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
4475 char * var.
4476 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
4477 uniqstr var.
4478 * src/uniqstr.h: Likewise.
4479
4480 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4481 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4482 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
4483 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
4484 param to have same name as that of enum, so that we don't use
4485 "s" to stand for a non-state.
4486
4487 2003-02-02 Akim Demaille <akim@epita.fr>
4488
4489 * src/scan-skel.l: Scan more than one inert character per yylex
4490 invocation.
4491
4492 2003-02-01 Paul Eggert <eggert@twinsun.com>
4493
4494 Version 1.875a.
4495
4496 * po/LINGUAS: Add ms.
4497
4498 2003-01-30 Akim Demaille <akim@epita.fr>
4499
4500 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
4501
4502 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4503
4504 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
4505 of $1.
4506
4507 Changes in response to error report by S. Eken: GLR mode does not
4508 handle negative $ indices or $ indices in embedded rules correctly.
4509 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
4510
4511 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
4512 (b4_rhs_location): Ditto.
4513 (yyfill): New function to copy from stack tree into array
4514 incrementally.
4515 (yyuserAction): Modify to allow incremental move of semantic values
4516 to rhs array when in GLR mode.
4517 Define YYFILL to use in user-defined actions to fill semantic array
4518 as needed.
4519 Remove dummy use of yystack, as there is now a guaranteed use.
4520 (yydoAction): Modify to allow incremental move of semantic values
4521 to rhs array when in GLR mode.
4522 (yyresolveAction): Ditto.
4523 (yyglrShiftDefer): Update comment.
4524 (yyresolveStates): Use X == NULL for pointers, not !X.
4525 (yyglrReduce): Ditto.
4526 (yydoAction): Ditto
4527
4528 * tests/glr-regr1.at: Rename to ...
4529 * tests/glr-regression.at: Add new regression test for the problems
4530 described above (adapted from S. Eken).
4531 Update copyright notice.
4532 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
4533 * tests/Makefile.am: Ditto.
4534
4535 2003-01-28 Paul Eggert <eggert@twinsun.com>
4536
4537 * data/lalr1.cc: Do not use @output_header_name@ unless
4538 b4_defines_flag is set. This fixes two bugs reported by
4539 Tim Van Holder in
4540 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
4541 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
4542
4543 2003-01-21 Paul Eggert <eggert@twinsun.com>
4544
4545 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
4546 we don't need to worry about yyerrlab1 being reported as an
4547 "unused label" by non-GCC C compilers. The downside is that if
4548 locations are used then a couple of statements are duplicated each
4549 time YYERROR is invoked, but the upside is that the warnings
4550 should vanish.
4551 (yyerrlab1): Move code to YERROR.
4552 (yyerrlab2): Remove. Change uses back to yyerrlab1.
4553 This reverts some of the 2002-12-27 change.
4554
4555 2003-01-17 Paul Eggert <eggert@twinsun.com>
4556
4557 * src/output.c (symbol_printers_output): Fix typo that led
4558 to core dump. Problem reported by Antonio Rus in
4559 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4560
4561 2003-01-13 Akim Demaille <akim@epita.fr>,
4562 Quoc Peyrot <chojin@lrde.epita.fr>,
4563 Robert Anisko <anisko_r@lrde.epita.fr>
4564
4565 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
4566 when the stacks contain one element, as the loop would otherwise
4567 free the last state, and then use the top state (the one we just
4568 popped). This means that the initial elements will not be freed
4569 explicitly, as is the case in yacc.c; it is not a problem, as
4570 these elements have fake values.
4571
4572 2003-01-11 Paul Eggert <eggert@twinsun.com>
4573
4574 * NEWS: %expect-violations are now just warnings, reverting
4575 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
4576 bootstrapping problem reported by Matthias Klose; see
4577 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
4578 * src/conflicts.c (conflicts_print): Likewise.
4579 * tests/conflicts.at (%expect not enough, %expect too much,
4580 %expect with reduce conflicts): Likewise.
4581 * doc/bison.texinfo (Expect Decl): Document this. Also mention
4582 that the warning is enabled if the number of conflicts changes
4583 (not necessarily increases).
4584
4585 * src/getargs.c (version): Update copyright year.
4586
4587 2003-01-09 Akim Demaille <akim@epita.fr>
4588
4589 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
4590
4591 2003-01-08 Paul Eggert <eggert@twinsun.com>
4592
4593 * Makefile.maint (WGETFLAGS):
4594 New macro, containing "-C off" to disable proxy caches.
4595 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
4596 (rel-check): Use $(WGET) instead of wget.
4597
4598 2003-01-06 Paul Eggert <eggert@twinsun.com>
4599
4600 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
4601 the GLR paper of Scott, Johnstone and Hussain.
4602
4603 2003-01-04 Paul Eggert <eggert@twinsun.com>
4604
4605 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
4606 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
4607 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
4608 (EXTRA_LIBRARIES): New var, for liby.a.
4609 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
4610 (EXTRA_SCRIPTS): New var, for yacc.
4611
4612 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
4613 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
4614 Problem reported by Nelson H. F. Beebe.
4615
4616 2003-01-03 Paul Eggert <eggert@twinsun.com>
4617
4618 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
4619 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
4620 when compiling Bison 1.875's `bitset bset = obstack_alloc
4621 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
4622
4623 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
4624 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
4625 grow to a huge size with typical invocation.
4626
4627 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
4628 Use the pattern recommended by Autoconf 2.57, except also protect
4629 against double-definition.
4630 * src/system.h: Likewise.
4631 Portability issues reported by Nelson H. F. Beebe.
4632
4633 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
4634 All uses changed. Provide a definition in both C and C++.
4635 (yytrue, yyfalse): Define even if defined (__cplusplus).
4636
4637 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
4638 Reported by Nelson H. F. Beebe.
4639
4640 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
4641
4642 2003-01-02 Paul Eggert <eggert@twinsun.com>
4643
4644 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
4645 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
4646 Bug reported by Nelson H. F. Beebe.
4647
4648 2003-01-01 Paul Eggert <eggert@twinsun.com>
4649
4650 * Version 1.875.
4651
4652 2002-12-30 Paul Eggert <eggert@twinsun.com>
4653
4654 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
4655 Moved here from...
4656 (<INITIAL>","): Here. This causes stray "," to be treated
4657 more uniformly.
4658
4659 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
4660 last brace in braced code when not in Yacc mode, for compatibility
4661 with Bison 1.35. This resurrects the 2001-12-15 patch to
4662 src/reader.c.
4663
4664 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
4665 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
4666
4667 2002-12-28 Paul Eggert <eggert@twinsun.com>
4668
4669 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
4670 that of SYM's type. This fixes Debian bug 168069, reported by
4671 Thomas Olsson.
4672
4673 2002-12-28 Paul Eggert <eggert@twinsun.com>
4674
4675 Version 1.75f.
4676
4677 Switch back to the Yacc style of conflict reports, undoing some
4678 of the 2002-07-30 change.
4679 * doc/bison.texinfo (Understanding): Use Yacc style for
4680 conflict reports. Also, use new way of locating rules.
4681 * src/conflicts.c (conflict_report):
4682 Renamed from conflict_report_yacc, removing the old
4683 'conflict_report'. Translate the entire conflict report at once,
4684 so that we don't assume that "," has the same interpretation in
4685 all languages.
4686 (conflicts_output): Use Yacc-style conflict report for each state,
4687 instead of our more-complicated style.
4688 (conflicts_print): Use Yacc-style conflict report, except print
4689 the input file name when not emulating Yacc.
4690 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
4691 Conflicted Reduction, %expect not enough, %expect too much,
4692 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
4693 * tests/existing.at (GNU Cim Grammar): Likewise.
4694 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
4695
4696 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
4697 fatal): Don't invoke fflush; it's not needed and it might even be
4698 harmful for stdout, as stdout might not be open.
4699 * src/reduce.c (reduce_print): Likewise.
4700
4701 2002-12-27 Paul Eggert <eggert@twinsun.com>
4702
4703 Fix a bug where error locations were not being recorded correctly.
4704 This problem was originally reported by Paul Hilfinger in
4705 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
4706
4707 * data/yacc.c (yyparse): New local var yylerrsp, to record the
4708 top of the location stack's error locations.
4709 (yyerrlab): Set it. When discarding a token, push its location
4710 onto yylerrsp so that we don't lose track of the error's end.
4711 (yyerrlab1): Now is only the target of YYERROR, so that we can
4712 properly record the location of the action that failed. For GCC
4713 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
4714 GCC warning about yyerrlab1 being unused if YYERROR is unused.
4715 (yyerrlab2): New label, which yyerrlab now falls through to.
4716 Compute the error's location by applying YYLLOC_DEFAULT to
4717 the locations of all the symbols that went into the error.
4718 * doc/bison.texinfo (Location Default Action): Mention that
4719 YYLLOC_DEFAULT is also invoked for syntax errors.
4720 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4721 Error locations include the locations of all the tokens that were
4722 discarded, not just the last token.
4723
4724 2002-12-26 Paul Eggert <eggert@twinsun.com>
4725
4726 * src/files.c: Include quote.h.
4727 (compute_output_file_names): Warn if we detect conflicting
4728 outputs to the same file. This should catch the misunderstanding
4729 exemplified by Debian Bug 165349, reported by Bruce Stephens..
4730
4731 * src/conflicts.c (conflicts_print): If the user specifies
4732 "%expect N", report an error if there are any reduce/reduce
4733 conflicts. This is what the manual says should happen.
4734 This fixes Debian bug 130890, reported by Anthony DeRobertis.
4735 * tests/conflicts.at (%expect with reduce conflicts): New test.
4736
4737 Don't use m4_include on relative file names, as it doesn't work as
4738 desired if there happens to be a file with that name under ".".
4739
4740 * m4sugar/version.m4: Remove; it was included but it wasn't used.
4741 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
4742 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
4743 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
4744 * src/output.c (output_skeleton): Use full path names when
4745 specifying a file to include; don't rely on include path, as
4746 it's unreliable when the working file contains a file with
4747 that name.
4748
4749 2002-12-25 Paul Eggert <eggert@twinsun.com>
4750
4751 Remove obsolete references to bison.simple and bison.hairy.
4752 Problem mentioned by Aubin Mahe in
4753 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
4754 * data/glr.c: Comment fix.
4755 * doc/bison.1: Remove references. Also, mention "yacc".
4756
4757 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
4758 with -g option.
4759
4760 * src/parse-gram.y (declaration): Use enum "report_states" rather
4761 than its numeric value 1.
4762
4763 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
4764 opening a new one. This fixes Debian bug 165349, reported by
4765 Bruce Stephens.
4766
4767 2002-12-24 Paul Eggert <eggert@twinsun.com>
4768
4769 Version 1.75e.
4770
4771 * Makefile.maint (cvs-update): Don't assume that the shell
4772 supports $(...), as Solaris sh doesn't.
4773
4774 * src/parse-gram.y (lloc_default): Remove test for empty
4775 nonterminals at the end, since it didn't change the result.
4776
4777 2002-12-24 Paul Eggert <eggert@twinsun.com>
4778
4779 If the user does not define YYSTYPE as a macro, Bison now declares it
4780 using typedef instead of defining it as a macro. POSIX requires this.
4781 For consistency, YYLTYPE is also declared instead of defined.
4782
4783 %union directives can now have a tag before the `{', e.g., the
4784 directive `%union foo {...}' now generates the C code
4785 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
4786 The default union tag is `YYSTYPE', for compatibility with Solaris 9
4787 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
4788 instead of `yyltype'.
4789
4790 `yystype' and `yyltype' are now obsolescent macros instead of being
4791 typedefs or tags; they are no longer documented and will be
4792 withdrawn in a future release.
4793
4794 * data/glr.c (b4_location_type): Remove.
4795 (YYSTYPE): Renamed from yystype.
4796 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
4797 (struct YYLTYPE): Renamed from struct yyltype.
4798 (YYLTYPE): Renamed from yyltype.
4799 (yyltype, yystype): New (and obsolescent) macros,
4800 for backward compatibility.
4801 * data/yacc.c: Likewise.
4802
4803 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
4804 does not specify a union tag. This is for compatibility with
4805 Solaris 9 yacc.
4806
4807 * src/parse-gram.y (add_param): 2nd arg is now char * not char
4808 const *, since it is now modified by stripping surrounding { }.
4809 (current_braced_code): Remove.
4810 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
4811 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
4812 trailing " {...}". Now of type <chars>.
4813 (grammar_declaration): Adjust to bundled tokens.
4814 (code_content): Remove; stripping is now done by add_param.
4815 (print_token_value): Print contents of bundled tokens.
4816 (token_name): New function.
4817
4818 * src/reader.h (braced_code, current_braced_code): Remove.
4819 (token_name): New decl.
4820
4821 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
4822 token_type, not braced_code code_kind. All uses changed.
4823 (SC_PRE_CODE): New state, for scanning after a keyword that
4824 has (or usually has) an immediately-following braced code.
4825 (token_type): New local var, to keep track of which token type
4826 to return when scanning braced code.
4827 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
4828 <INITIAL>"%parse-param", <INITIAL>"%printer",
4829 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
4830 instead of returning a token type immediately.
4831 (<INITIAL>"{"): Set token type.
4832 (<SC_BRACED_CODE>"}"): Use it.
4833 (handle_action_dollar, handle_action_at): Now returns bool
4834 indicating success. Fail if ! current_rule; this prevents a core dump.
4835 (handle_symbol_code_dollar, handle_symbol_code_at):
4836 Remove; merge body into caller.
4837 (handle_dollar, handle_at): Complain in invalid contexts.
4838
4839 * NEWS, doc/bison.texinfo: Document the above.
4840 * NEWS: Fix years and program names in copyright notice.
4841
4842 2002-12-17 Paul Eggert <eggert@twinsun.com>
4843
4844 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
4845 Reporting, Table of Symbols): Omit mentions of %lex-param and
4846 %parse-param from the documentation for now.
4847
4848 2002-12-15 Paul Eggert <eggert@twinsun.com>
4849
4850 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
4851 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
4852 lookahead symbol, and which sets yychar in parser actions) and it
4853 disagreed with the Bison documentation. Bug
4854 reported by Andrew Walrond.
4855
4856 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
4857 as the caller now does that.
4858 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
4859 (YYEMPTY): Parenthesize right hand side, since others use it.
4860 (yyparse): Don't assume that our generated code is the only code
4861 that sets yychar.
4862
4863 2002-12-13 Paul Eggert <eggert@twinsun.com>
4864
4865 Version 1.75d.
4866
4867 POSIX requires a "yacc" command.
4868 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
4869 (MOSTLYCLEANFILES): Add yacc.
4870 (yacc): New rule.
4871 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
4872 as an alias for bison y.
4873
4874 * po/LINGUAS: Add da.
4875
4876 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
4877 problem with latest <getopt.h>.
4878 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
4879
4880 * doc/fdl.texi: Upgrade to 1.2.
4881 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
4882 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
4883 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
4884 gnulib.
4885 * config/install-sh: Sync with autotools.
4886
4887 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
4888 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4889 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
4890 locations are requested.
4891 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
4892 locations are requested.
4893
4894 2002-12-12 Paul Eggert <eggert@twinsun.com>
4895
4896 Remove unportable casts and storage allocation tricks.
4897 While we're at it, remove almost all casts, since they
4898 usually aren't needed and are a sign of trouble.
4899
4900 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
4901
4902 * src/derives.c (derives_compute): Do not subtract NTOKENS from
4903 the pointer DSET returned by malloc; this isn't portable.
4904 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
4905 Similarly for DERIVES.
4906 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
4907 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
4908 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
4909
4910 * src/derives.c (derives_compute): Do not bother invoking
4911 int_of_rule_number, since rule numbers are integers.
4912
4913 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
4914 rather than XMALLOC (char, N).
4915
4916 * src/files.c (filename_split): Rewrite to avoid cast.
4917
4918 * src/gram.h (symbol_number_as_item_number,
4919 item_number_as_symbol_number, rule_number_as_item_number,
4920 item_number_as_rule_number):
4921 Now inline functions rather than macros, to avoid casts.
4922 * src/state.h (state_number_as_int): Likewise.
4923 * src/tables.c (state_number_to_vector_number,
4924 symbol_number_to_vector_number): Likewise.
4925
4926 * src/gram.h (int_of_rule_number): Remove; no longer used.
4927
4928 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
4929 since the resulting storage is always stored into.
4930
4931 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
4932 where it's needed.
4933
4934 * src/muscle_tab.c (muscle_m4_output):
4935 Now inline. Return bool, not int.
4936 * src/state.c (state_compare): Likewise.
4937 * src/symtab.c (symbol_check_defined,
4938 symbol_check_alias_consistency, symbol_pack, symbol_translation,
4939 hash_compare_symbol, hash_symbol):
4940 Likewise.
4941 * src/uniqstr.c (uniqstr_print): Likewise.
4942 * src/muscle_tab.c (muscle_m4_output_processor):
4943 New function, to avoid casts.
4944 * src/state.c (state_comparator, stage_hasher): Likewise.
4945 * src/symtab.c (symbol_check_defined_processor,
4946 symbol_check_alias_consistency_processor, symbol_pack_processor,
4947 symbol_translation_processor, hash_symbol_comparator,
4948 hash_symbol_hasher): Likewise.
4949 * src/uniqstr.c (uniqstr_print_processor): Likewise.
4950 * src/muscle_tab.c (muscles_m4_output):
4951 Use new functions instead of casting old functions unportably.
4952 * src/state.c (state_hash_new): Likewise.
4953 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
4954 symbols_token_translations_init):
4955 Likewise.
4956 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
4957
4958 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
4959 var instead of casting to long, to avoid casts.
4960 (prepare_states): Use MALLOC rather than alloca, so that we don't
4961 have to worry about alloca.
4962 * src/state.c (state_hash_lookup): Likewise.
4963
4964 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
4965 local var instead of casting to unsigned char, to avoid casts.
4966
4967 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
4968 STATE_ALLOC): Remove.
4969 (transitions_new, errs_new, reductions_new, state_new): Use malloc
4970 rather than calloc, and use offsetof to avoid allocating slightly
4971 too much storage.
4972 (state_new): Initialize all members.
4973
4974 * src/state.c (state_hash): Use unsigned accumulator, not signed.
4975
4976 * src/symtab.c (symbol_free): Remove; unused.
4977 (symbol_get): Remove cast in lhs of assignment.
4978 (symbols_do): Now static. Accept generic arguments, not
4979 hashing-related ones.
4980
4981 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
4982 (symbol_processor): Remove.
4983 (symbols_do): Remove decl; now static.
4984
4985 * src/system.h (alloca): Remove; decl no longer needed.
4986 (<stddef.h>): Include, for offsetof.
4987 (<inttypes.>, <stdint.h>): Include if available.
4988 (uintptr_t): New type, if system lacks it.
4989 (CALLOC, MALLOC, REALLOC): New macros.
4990 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
4991 new macros.
4992
4993 * src/tables.c (table_size): Now int, to pacify GCC.
4994 (table_grow, table_ninf_remap): Use signed table size.
4995 (save_row): Don't bother initializing locals when not needed.
4996 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
4997 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
4998
4999 * src/vcg.h: Correct misspellings.
5000
5001 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
5002
5003
5004 * src/getargs.c (getargs): Don't assume EOF == -1.
5005
5006 2002-12-09 Paul Eggert <eggert@twinsun.com>
5007
5008 Change identifier spellings to avoid collisions with names
5009 that are reserved by POSIX.
5010
5011 Don't use names ending in _t, since POSIX reserves them.
5012 For consistency, remove _e and _s endings -- they're weren't
5013 needed to remove ambiguity. All uses changed.
5014 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
5015 turn was just renamed from struniq_t.
5016 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
5017 which in turn was just renamed from struniq_processor_t.
5018 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
5019 in turn was renamed from hash_compare_struniq_t.
5020 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
5021 (state_list): Renamed from state_list_t.
5022 * src/assoc.h (assoc): Renamed from assoc_t.
5023 * src/conflicts.c (enum conflict_resolution): Renamed from
5024 enum conflict_resolution_e.
5025 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
5026 (rule_list): Renamed from rule_list_t.
5027 * src/getargs.h (enum trace): Renamed from enum trace_e.
5028 (enum report): Renamed from enum report_e.
5029 * src/gram.h (item_number): Renamed from item_number_t.
5030 (rule_number): Renamed from rule_number_t.
5031 (struct rule_s): Remove the "rule_s" part; not used.
5032 (rule): Renamed from rule_t.
5033 (rule_filter): Renamed from rule_filter_t.
5034 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
5035 (goto_list): Renamed from goto_list_t.
5036 * src/lalr.h (goto_number): Renamed from goto_number_t.
5037 * src/location.h (location): Renamed from location_t.
5038 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
5039 and moved here from:
5040 * src/muscle_tab.h (muscle_entry_t): here.
5041 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
5042 (rule_list): Renamed from rule_list_t.
5043 * src/print_graph.c (static_graph): Renamed from graph.
5044 * src/reader.h (braced_code): Renamed from braced_code_t.
5045 Remove brace_code_e tag.
5046 * src/relation.h (relation_node): Renamed from relation_node_t.
5047 (relation_nodes): Renamed from relation_nodes_t.
5048 (relation): Renamed from relation_t.
5049 * src/state.h (state_number): Renamed from state_number_t.
5050 (struct state): Renamed from struct state_s.
5051 (state): Renamed from state_t.
5052 (transitions): Renamed from transitions_t. Unused (and
5053 misspelled) transtion_s tag removed.
5054 (errs): Renamed from errs_t. Unused errs_s tag removed.
5055 (reductions): Renamed from reductions_t. Unused tag
5056 reductions_s removed.
5057 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
5058 (struct symbol_list): Renamed from struct symbol_list_s.
5059 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
5060 (struct symbol): Renamed from struct symbol_s.
5061 (symbol): Renamed from symbol_t.
5062 * src/tables.c (vector_number): Renamed from vector_number_t.
5063 (action_number): Renamed from action_t.
5064 * src/tables.h (base_number): Renamed from base_t.
5065 * src/vcg.h (enum color): Renamed from enum color_e.
5066 (enum textmode): Renamed from enum textmode_e.
5067 (enum shape): Renamed from enum shape_e.
5068 (struct colorentry): Renamed from struct colorentry_s.
5069 (struct classname): Renamed from struct classname_s.
5070 (struct infoname): Renamed from struct infoname_s.
5071 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
5072 (enum decision): Renamed from enum decision_e.
5073 (enum orientation): Renamed from enum orientation_e.
5074 (enum alignment): Renamed from enum alignment_e.
5075 (enum arrow_mode): Renamed from enum arrow_mode_e.
5076 (enum crossing_type): Renamed from enum crossing_type_e.
5077 (enum view): Renamed from enum view_e.
5078 (struct node): Renamed from struct node_s.
5079 (node): Renamed from node_t.
5080 (enum linestyle): Renamed from enum linestyle_e.
5081 (enum arrowstyle): Renamed from enum arrowstyle_e.
5082 (struct edge): Renamed from struct edge.
5083 (edge): Renamed from edge_t.
5084 (struct graph): Renamed from struct graph_s.
5085 (graph): Renamed from graph_t.
5086 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
5087 Rename value_t -> value.
5088 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
5089 value_t_as_yystype -> value_as_yystype.
5090
5091 Don't include <errno.h> in the mainstream code, since it
5092 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
5093 * lib/get-errno.c, lib/get-errno.h: New files.
5094 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
5095 get-errno.c.
5096 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
5097 * src/output.c (output_skeleton): Likewise.
5098 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
5099 instead of errno.
5100 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
5101 Likewise.
5102 (handle_action_dollar, handle_action_at): Likewise.
5103 * src/system.h: Do not include <errno.h>.
5104 (TAB_EXT): Renamed from EXT_TAB.
5105 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
5106
5107 Avoid str[a-z]*, since <string.h> reserves that name space.
5108 Change all instances of "struniq" in names to "uniqstr", and
5109 likewise for "STRUNIQ" and "UNIQSTR".
5110 * src/uniqstr.c: Renamed from src/struniq.c.
5111 * src/uniqstr.h: Renamed from src/struniq.h.
5112 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
5113 * src/files.c (strsuffix): Remove; unused.
5114 (concat2): Renamed from stringappend. Now static.
5115 * src/files.h (strsuffix, stringappend): Remove; unused.
5116 * src/parse-gram.y (<chars>): Renamed from <string>.
5117 (<uniqstr>): Renamed from <struniq>.
5118 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
5119 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
5120 (struct graph_s.expand): Renamed from struct graph_s.stretch.
5121 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
5122 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
5123 (N_EXPAND): Renamed from N_STRETCH.
5124
5125 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
5126 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
5127 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
5128 Remove; unused.
5129 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
5130 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
5131 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
5132 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
5133 (BASE_MAXIMUM): Renamed from BASE_MAX.
5134 (BASE_MINIMUM): Renamed from BASE_MIN.
5135 (ACTION_MAX): Remove; unused.
5136 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
5137 Unnecessary casts removed from above defines.
5138
5139
5140 Fix misspelling in names.
5141 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
5142 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
5143 G_NODE_ALIGNEMENT.
5144
5145
5146 * lib/timevar.c (timevar_report): Renamed from time_report,
5147 for consistency with other names.
5148 * lib/timevar.h (timevar_report): New decl.
5149 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
5150
5151
5152 Sort include-file uses.
5153
5154 Reorder all include files under src to be in the order "system.h".
5155 then the ../lib include files in angle brackets (alphabetized),
5156 then the . include files in double-quotes (alphabetized). Fix
5157 dependency breakages encountered in this process, as follows:
5158 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
5159 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
5160 * src/state.h: Include "symtab.h".
5161
5162 2002-12-08 Paul Eggert <eggert@twinsun.com>
5163
5164 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
5165 since this causes problems when __file__ contains character
5166 sequences like "@" that are treated specially by src/scan-skel.l.
5167 Instead, just use the file's basename. This fixes the bug
5168 reported by Martin Mokrejs in
5169 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
5170
5171 2002-12-06 Paul Eggert <eggert@twinsun.com>
5172
5173 Add support for rules that do not have trailing semicolons, as
5174 POSIX requires. Improve the quality of locations in Bison
5175 diagnostics.
5176
5177 * src/location.c: Include <quotearg.h>.
5178 (empty_location): Now const.
5179 (location_print): New function. Follow the recommendation of the
5180 GNU Coding Standards for locations that span file boundaries.
5181 * src/location.h: Do not include <quotearg.h>; no longer needed.
5182 (boundary): New type.
5183 (location_t): Use it. This allows locations to span file boundaries.
5184 All member uses changed: file -> start.file or end.file (as needed),
5185 first_line -> start.line, first_column -> start.column,
5186 last_line -> end.line, last_column -> end.column.
5187 (equal_boundaries): New function.
5188 (LOCATION_RESET, LOCATION_STEP): Remove.
5189 (LOCATION_PRINT): Remove. All callers changed to use location_print.
5190 (empty_location): Now const.
5191 (location_print): New decl.
5192 * src/parse-gram.y (lloc_default): New function, which handles
5193 empty locations more accurately.
5194 (YYLLOC_DEFAULT): Use it.
5195 (%token COLON): Remove.
5196 (%token ID_COLON): New token.
5197 (rules): Use it.
5198 (declarations, rules): Remove trailing semicolon.
5199 (declaration, rules_or_grammar_declaration):
5200 Allow empty (";") declaration.
5201 (symbol_def): Remove empty actions; no longer needed.
5202 (rules_or_grammar_declaration): Remove trailing semicolon.
5203 (semi_colon.opt): Remove.
5204 * src/reader.h: Include location.h.
5205 (scanner_cursor): New decl.
5206 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
5207 rolling our own.
5208 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
5209 of *loc.
5210 (STEP): Remove. No longer needed, now that adjust_location does
5211 the work. All uses removed.
5212 (scanner_cursor): New var.
5213 (adjust_location): Renamed from extend_location. It now sets
5214 *loc and adjusts the scanner cursor. All uses changed.
5215 Don't bother testing for CR.
5216 (handle_syncline): Remove location arg; now updates scanner cursor.
5217 All callers changed.
5218 (unexpected_end_of_file): Now accepts start boundary of token or
5219 comment, not location. All callers changed. Update scanner cursor,
5220 not the location.
5221 (SC_AFTER_IDENTIFIER): New state.
5222 (context_state): Renamed from c_context. All uses changed.
5223 (id_loc, code_start, token_start): New local vars.
5224 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
5225 processing of Yacc white space and equivalents here.
5226 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
5227 instead of returning ID immediately, since we need to search for
5228 a subsequent colon.
5229 (<INITIAL>"'", "\""): Save token_start.
5230 (<INITIAL>"%{", "{", "%%"): Save code_start.
5231 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
5232 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
5233 BEGIN context_state at end, not INITIAL.
5234 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
5235 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
5236 Return correct token start.
5237 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
5238 the start of a character, string or multiline comment is found.
5239 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
5240 Reduction): Adjust reported locations to match the more-precise
5241 results now expected.
5242 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
5243 * tests/reduce.at (Useless Rules, Reduced Automaton,
5244 Underivable Rules): Likewise.
5245 * tests/regression.at (Invalid inputs): No longer `expecting ";"
5246 or "|"' now that so many other tokens are allowed by the new grammar.
5247
5248 * src/complain.h (current_file): Remove duplicate decl;
5249 current_file is now owned by files.h.
5250 * src/complain.c, src/scan-gram.l: Include files.h.
5251
5252 2002-12-06 Paul Eggert <eggert@twinsun.com>
5253
5254 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
5255 promotes to int; it might be unsigned int.
5256 * data/yacc.c (yy_reduce_print): Likewise.
5257
5258 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
5259 be #defined in the prologue, not in the Bison declarations.
5260 This fixes Debian Bug 102878, reported by Shaul Karl.
5261
5262 2002-12-02 Paul Eggert <eggert@twinsun.com>
5263
5264 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
5265 * lib/strtoul.c: New file, from gnulib.
5266 This fixes a porting bug reported by Peter Klein in
5267 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
5268
5269 2002-11-30 Paul Eggert <eggert@twinsun.com>
5270
5271 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
5272 and put only a forward declaration in the prologue. This is for
5273 consistency with the other scanner helper functions.
5274
5275 Type clashes now generate warnings, not errors, since it
5276 appears that POSIX may allow some grammars with type clashes.
5277 * src/reader.c (grammar_current_rule_check): Warn about
5278 type clashes instead of complaining.
5279 * tests/input.at (Type Clashes): Expect warnings, not complaints.
5280
5281 Add Yacc library, since POSIX requires it.
5282 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
5283 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
5284 * lib/main.c, lib/yyerror.c: New files.
5285
5286 gram_error can be static; it need not be extern.
5287 * src/reader.h (gram_error): Remove decl.
5288 * src/parse-gram.y (gram_error): Now static. Add static decl.
5289 (print_token_value): Omit parameter names from forward decl,
5290 for consistency.
5291
5292 2002-11-29 Paul Eggert <eggert@twinsun.com>
5293
5294 * doc/bison.texinfo: Emphasize that yylex and yyerror must
5295 be declared before being used. E.g., one should typically
5296 declare them in the prologue. Use GNU coding style in examples.
5297 Put "const" consistently after the type it modifies. Mention
5298 that C99 supports "inline". Mention that yyerror traditionally
5299 returns "int".
5300
5301 %parse-param and %lex-param now take just one argument, the
5302 declaration; the argument name is deduced from the declaration.
5303
5304 * doc/bison.texinfo (Parser Function, Pure Calling, Error
5305 Reporting, Table of Symbols): Document this.
5306 * src/parse-gram.y (add_param): New function.
5307 (COMMA): Remove.
5308 (declaration): Implement new rule for %parse-param and %lex-param.
5309 * src/scan-gram.l: "," now elicits a warning, rather than being
5310 a token; this is more compatible with byacc.
5311 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
5312
5313 2002-11-27 Paul Eggert <eggert@twinsun.com>
5314
5315 Rename identifiers to avoid real and potential collisions.
5316
5317 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
5318 to avoid collision with lex macro described by Bruce Lilly in
5319 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
5320 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5321 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
5322 * src/parse-gram.y (print_token_value): Renamed from yyprint.
5323 All uses changed.
5324 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
5325 The name "yycontrol" violates the name space rules, and this stuff
5326 wasn't being used anyway.
5327 (input): Remove action; this stuff wasn't being used.
5328 (gram_error): Rename local variable yylloc -> loc.
5329 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
5330 (YY_DECL): Don't use "yy" at start of local variables.
5331 All uses changed, e.g., yylloc -> loc.
5332 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
5333 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
5334 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
5335 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
5336
5337 * src/parse-gram.y (gram_error): loc is now const *.
5338 * src/reader.h (gram_error): Likewise.
5339
5340 2002-11-24 Paul Eggert <eggert@twinsun.com>
5341
5342 Version 1.75c.
5343
5344 * tests/actions.at (Actions after errors): Use an output format
5345 more similar to that of the Printers and Destructors test.
5346 Test the position of the ';' token too.
5347 (Printers and Destructors): Likewise.
5348 (Printers and Destructors: %glr-parser): Remove for now, to avoid
5349 unnecessarily alarming people when the test fails.
5350
5351 * data/yacc.c (yyerrlab1): Move this label down, so that the
5352 parser does not discard the lookahead token if the user code
5353 invokes YYERROR. This change is required for POSIX conformance.
5354
5355 * lib/error.c: Sync with gnulib.
5356
5357 2002-11-22 Paul Eggert <eggert@twinsun.com>
5358
5359 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
5360 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
5361 * lib/xmalloc.c: Likewise.
5362
5363 2002-11-20 Paul Eggert <eggert@twinsun.com>
5364
5365 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
5366
5367 2002-11-20 Paul Eggert <eggert@twinsun.com>
5368
5369 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
5370 should use `if (! x) abort ();' rather than `assert (x);', and
5371 anyway it's one less thing to worry about configuring.
5372
5373 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
5374 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
5375 and replace all instances of assert with abort.
5376 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
5377 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
5378
5379 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
5380 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
5381 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
5382 hash_find_entry, hash_rehash, hash_insert): Likewise.
5383 * src/conflicts.c (resolve_sr_conflict): Likewise.
5384 * src/lalr.c (set_goto_map, map_goto): Likewise.
5385 * src/nullable.c (nullable_compute): Likewise.
5386 * src/output.c (prepare_rules, token_definitions_output): Likewise.
5387 * src/reader.c (packgram, reader): Likewise.
5388 * src/state.c (state_new, state_free, state_transitions_set,
5389 state_reduction_find): Likewise.
5390 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
5391 symbol_pack): Likewise.
5392 * src/tables.c (conflict_row, pack_vector): Likewise.
5393 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5394 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5395 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
5396 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
5397
5398 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
5399 (ARGMATCH_CONSTRAINT): New macro.
5400 (ARGMATCH_ASSERT): Use it.
5401
5402 * src/system.h (verify): New macro.
5403 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
5404 rather than assert.
5405 * src/tables.c (tables_generate): Likewise.
5406
5407 * src/struniq.c (struniq_assert): Now returns void, and aborts
5408 if the assertion is false.
5409 (struniq_assert_p): Remove.
5410 * src/struniq.h: Likewise.
5411
5412 2002-11-18 Paul Eggert <eggert@twinsun.com>
5413
5414 * data/glr.c (yygetLRActions): Replace `yyindex' with
5415 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
5416 This fixes the regression with Sun ONE Studio 7 cc that I reported in
5417 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
5418
5419 2002-11-18 Akim Demaille <akim@epita.fr>
5420
5421 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
5422 space.
5423 From Tim Van Holder.
5424
5425 2002-11-17 Paul Eggert <eggert@twinsun.com>
5426
5427 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
5428 to "SyntaxError" for consistency with my 2002-11-15 change.
5429
5430 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
5431 not define to {}, since this breaks the common use of `YYDPRINTF
5432 ((...));' if a single statement is desired (e.g. before `else').
5433 Work around GCC warnings by surrounding corresponding calls with
5434 {} if needed.
5435 (yyhasResolvedValue): Remove unused function.
5436 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
5437 loop body.
5438 (yyreportSyntaxError): Renamed from yyreportParseError.
5439 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
5440 All uses changed.
5441 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
5442 extern when possible. Remove unused initializations.
5443
5444 2002-11-16 Akim Demaille <akim@epita.fr>
5445
5446 Augment the similarity between GLR and LALR traces.
5447
5448 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
5449 (YY_REDUCE_PRINT): New.
5450 (yyparse): Use them.
5451 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
5452 YYDPRINT here.
5453 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
5454 state reached after the reduction/recovery, since...
5455 (yyparse, yyprocessOneStack): Report the state we are entering in.
5456
5457 2002-11-16 Akim Demaille <akim@epita.fr>
5458
5459 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
5460 Add support for --trace=skeleton.
5461 * src/scan-skel.l: %option debug.
5462 Scan strings of non-@ or \n instead of character by character.
5463 (scan_skel): Handle trace_skeleton.
5464 (QPUTS): New.
5465 (@output_parser_name@, @output_header_name@): ``Restore'' their
5466 support (used to be M4 macros).
5467 * data/yacc.c: Quote larger chunks, a la glr.c.
5468 * data/lalr1.cc: Likewise.
5469 The header guards are no longer available, so use some other
5470 string than `YYLSP_NEEDED'.
5471
5472 2002-11-16 Akim Demaille <akim@epita.fr>
5473
5474 Make the ``Printers and Destructors'' test more verbose, taking
5475 `yacc.c''s behavior as (possibly wrong) reference.
5476
5477 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
5478 instead of fprint on stdout.
5479 Set and report the last_line of the symbols.
5480 Consistently display values and locations.
5481
5482 2002-11-16 Paul Eggert <eggert@twinsun.com>
5483
5484 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
5485
5486 2002-11-15 Paul Eggert <eggert@twinsun.com>
5487
5488 * tests/actions.at (Actions after errors): New test case.
5489
5490 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
5491 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
5492 tests/action.at, tests/calc.at, tests/conflicts.at,
5493 tests/cxx-type.at, tests/regression.at:
5494 "parse error" -> "syntax error" for POSIX compatibility.
5495 "parsing stack overflow..." -> "parser stack overflow" so
5496 that code matches Bison documentation.
5497
5498 2002-11-15 Akim Demaille <akim@epita.fr>
5499
5500 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
5501 take two BRACED_CODE, not two string_content.
5502 Free the scanner's obstack when we are done.
5503 (code_content): New.
5504 * tests/calc.at: Adjust.
5505 * doc/bison.texinfo: Adjust.
5506 Also, make sure to include the `,' for these declarations.
5507
5508 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
5509
5510 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
5511 definition; avoids potential autoreconf problems.
5512
5513 2002-11-15 Akim Demaille <akim@epita.fr>
5514
5515 Always check the value returned by yyparse.
5516
5517 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
5518 returned by yyparse.
5519 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
5520 Adjust calls.
5521 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
5522 returned by yyparse.
5523
5524 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5525
5526 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
5527 on input.at test.
5528
5529 2002-11-14 Paul Eggert <eggert@twinsun.com>
5530
5531 * src/output.c (output_skeleton): Call xfopen instead of
5532 duplicating xfopen's body.
5533
5534 Fix bugs reported by Nelson H. F. Beebe in
5535 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
5536
5537 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
5538 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
5539 Group compiler. Instead, use "$CC -E bar.c". Include the .h
5540 file twice in the grammar, as an extra check.
5541
5542 * tests/input.at (Torturing the Scanner): Surround the
5543 backslash-newline tests with "#if 0", to make it less likely that
5544 we'll run into compiler bugs. Bring back solitary \ inside
5545 comment, but add a closing comment to work around HP C bug. Don't
5546 test backslash-newline in C character constant.
5547
5548 2002-11-14 Akim Demaille <akim@epita.fr>
5549
5550 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
5551 status of the compiler.
5552 Calling `exit 1' is no longer needed.
5553 Reported by Nelson H. F. Beebe.
5554
5555 2002-11-14 Akim Demaille <akim@epita.fr>
5556
5557 * tests/atlocal.in (CPPFLAGS): We have config.h.
5558 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
5559 New.
5560 * tests/actions.at, tests/calc.at, tests/conflicts.at,
5561 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
5562 * tests/regression.at, tests/torture.at: Use them for all the
5563 grammars that are to be compiled.
5564 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
5565 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
5566 * doc/bison.texinfo (GLR Parsers): Document `inline'.
5567
5568 2002-11-14 Akim Demaille <akim@epita.fr>
5569
5570 * doc/bison.texinfo: Various formatting changes (alignments in
5571 samples, additional @group/@end group, GCS in samples.
5572 Use @deffn instead of simple @table to define the directives,
5573 macros, variables etc.
5574
5575 2002-11-13 Paul Eggert <eggert@twinsun.com>
5576
5577 Fix some bugs reported by Albert Chin-A-Young in
5578 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
5579
5580 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
5581 -o c"; the HP C compiler chatters during compilation.
5582 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
5583 * tests/headers.at (export YYLTYPE): Likewise.
5584
5585 * tests/input.at (Torturing the Scanner): Remove lines containing
5586 solitary backslashes, as they tickle a bug in the HP C compiler.
5587
5588 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
5589 comments, since they're not portable. Use GNU coding style.
5590
5591 2002-11-13 Akim Demaille <akim@epita.fr>
5592
5593 * data/yacc.c: Leave bigger chunks of quoted text.
5594 (YYDSYMPRINTF): New.
5595 Use it to report symbol activities.
5596 * data/glr.c (YYDSYMPRINTF): New.
5597 Use it.
5598
5599 2002-11-12 Paul Eggert <eggert@twinsun.com>
5600
5601 Version 1.75b.
5602
5603 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
5604 (yyglrReduce): Return yyok, not 0.
5605 This should avoid the enumerated-type warnings reported
5606 by Nelson H. F. Beebe in
5607 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
5608
5609 * lib/bbitset.h (BITSET_INLINE): Remove.
5610 * lib/bitset.h [! BITSET_INLINE]: Remove.
5611 (bitset_set, bitset_reset, bitset_test): Rename local vars
5612 to avoid shadowing warnings by GCC.
5613
5614 * data/glr.c (inline): Remove #define. It's the user's
5615 responsibility to #define it away, just like 'const'.
5616 This fixes one of the bugs reported by Nelson H. F. Beebe in
5617 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
5618
5619 * Makefile.maint (po-check): Scan .l and .y files instead of the
5620 .c and the .h files that they generate. This fixes the bug
5621 reported by Tim Van Holder in:
5622 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
5623 Look for N_ as well as for _. Try to avoid matching #define for
5624 N_ and _.
5625 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
5626 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
5627 * src/scan-gram.l: Revamp regular expressions so that " and '
5628 do not confuse xgettext.
5629
5630 * src/struniq.h (struniq_new): Do not declare the return type
5631 to be 'const'; this violates the C standard.
5632 * src/struniq.c (struniq_new): Likewise.
5633
5634 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
5635
5636 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
5637 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
5638 linker.
5639
5640 2002-11-12 Akim Demaille <akim@epita.fr>
5641
5642 * Makefile.maint: Sync with Autoconf:
5643 (local_updates): New.
5644
5645 2002-11-12 Akim Demaille <akim@epita.fr>
5646
5647 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
5648
5649 2002-11-12 Akim Demaille <akim@epita.fr>
5650
5651 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
5652 locations.
5653
5654 2002-11-12 Akim Demaille <akim@epita.fr>
5655
5656 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
5657 not yyvalue.
5658
5659 2002-11-12 Akim Demaille <akim@epita.fr>
5660
5661 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
5662 Use it to test the GLR parser.
5663
5664 2002-11-12 Akim Demaille <akim@epita.fr>
5665
5666 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
5667 defines it.
5668 * data/glr.c (yystos): New.
5669 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
5670 (YYDSYMPRINT): New.
5671 (yyval): Don't define it, it is handled via M4.
5672 (yyrecoverParseError): Free verbosely the discarded symbols.
5673 * data/yacc.c (yysymprint): Remove, rather...
5674 (b4_yysymprint_generate): invoke.
5675 * data/c.m4 (b4_yysymprint_generate): New.
5676 Accept pointers as arguments, as opposed to the version from
5677 yacc.c.
5678 (b4_yydestruct_generate): Likewise.
5679 * tests/cations.at (Printers and Destructors): Use Bison directives
5680 instead of CPP macros.
5681 Don't rely on internal details.
5682
5683 2002-11-12 Akim Demaille <akim@epita.fr>
5684
5685 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
5686 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
5687 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
5688 it against YYEMPTY and so forth), work on yytoken (i.e., set
5689 it to YYEMPTY etc.).
5690 (yydestruct): Replace with a b4_yydestruct_generate invocation.
5691 (b4_symbol_actions): Remove.
5692 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
5693 for 0, end-of-input.
5694
5695 2002-11-12 Akim Demaille <akim@epita.fr>
5696
5697 * doc/bison.texinfo (Destructor Decl): New.
5698
5699 2002-11-12 Akim Demaille <akim@epita.fr>
5700
5701 * src/tables.c (tables_generate): Use free for pointers that
5702 cannot be NULL, not XFREE.
5703 (pack_vector): Use assert, not fatal, for bound violations.
5704 * src/state.c (state_new): Likewise.
5705 * src/reader.c (reader): Likewise.
5706 * src/lalr.c (set_goto_map): Likewise.
5707 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
5708 the file name.
5709
5710 2002-11-12 Akim Demaille <akim@epita.fr>
5711
5712 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
5713 Restore.
5714 * src/scan-gram.l (last_string): Is global to the file, not to
5715 yylex.
5716 * src/parse-gram.y (input): Don't append the epilogue here,
5717 (epilogue.opt): do it here, and free the scanner's obstack.
5718 * src/reader.c (epilogue_set): Rename as...
5719 (epilogue_augment): this.
5720 * data/c.m4 (b4_epilogue): Defaults to empty.
5721
5722 2002-11-12 Akim Demaille <akim@epita.fr>
5723
5724 * src/getargs.c (long_options): Remove duplicates.
5725 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
5726 Remove.
5727 * doc/bison.rnh: Remove.
5728 * doc/bison.texinfo (VMS Invocation): Remove.
5729
5730 2002-11-12 Akim Demaille <akim@epita.fr>
5731
5732 * src/struniq.h, src/struniq.c (struniq_t): Is const.
5733 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
5734
5735 Use struniq for symbols.
5736
5737 * src/symtab.h (symbol_t): The tag member is a struniq.
5738 (symbol_type_set): Adjust.
5739 * src/symtab.c (symbol_new): Takes a struniq.
5740 (symbol_free): Don't free the tag member.
5741 (hash_compare_symbol_t, hash_symbol_t): Rename as...
5742 (hash_compare_symbol, hash_symbol): these.
5743 Use the fact that tags as struniqs.
5744 (symbol_get): Use struniq_new.
5745 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
5746 Returns a strniq.
5747 * src/reader.h (merger_list, grammar_currentmerge_set): The name
5748 and type members are struniqs.
5749 * src/reader.c (get_merge_function)
5750 (grammar_current_rule_merge_set): Adjust.
5751 (TYPE, current_type): Are struniq.
5752
5753 Use struniq for file names.
5754
5755 * src/files.h, src/files.c (infile): Split into...
5756 (grammar_file, current_file): these.
5757 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
5758 * src/reduce.c (reduce_print): Likewise.
5759 * src/getargs.c (getargs): Likewise.
5760 * src/complain.h, src/complain.c: Likewise.
5761 * src/main.c (main): Call struniqs_new early enough to use it for
5762 file names.
5763 Don't free the input file name.
5764
5765 2002-11-12 Akim Demaille <akim@epita.fr>
5766
5767 * src/symtab.c (symbol_free): Remove dead deactivated code:
5768 type_name are properly removed.
5769 Don't use XFREE to free items that cannot be NULL.
5770 * src/struniq.h, src/struniq.c: New.
5771 * src/main.c (main): Initialize/free struniqs.
5772 * src/parse-gram.y (%union): Add astruniq member.
5773 (yyprint): Adjust.
5774 * src/scan-gram.l (<{tag}>): Return a struniq.
5775 Free the obstack bit that used to store it.
5776 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
5777
5778 2002-11-11 Paul Eggert <eggert@twinsun.com>
5779
5780 Revamp to fix many (but not all) of the C- and M4-related quoting
5781 problems. Among other things, this fixes the Bison bug reported
5782 by Jan Hubicka when processing the Bash grammar; see:
5783 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
5784
5785 Use new @ escapes consistently. Represent brackets with @{ and @}
5786 rather than @<:@ and @:>@, since this works a bit better with dumb
5787 editors like vi. Represent @ with @@, since @ is now consistently
5788 an escape. Use @oline@ and @ofile@ rather than __oline__ and
5789 __ofile__, to avoid unexpected expansions. Similarly, use @output
5790 rather than #output.
5791
5792 * data/c.m4 (b4_copyright): Omit file name from comment, since
5793 the file name could contain "*/".
5794 (b4_synclines_flag): Don't quote the 2nd argument; it should already
5795 be quoted. All uses changed.
5796
5797 * data/glr.c: Use new @ escapes consistently.
5798 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
5799 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
5800 Remove, since they couldn't handle arbitrary characters in file
5801 names.
5802 * data/lalr1.cc: Likewise.
5803 * data/yacc.c: Likewise.
5804
5805 * src/files.c (output_infix): Remove; all uses removed.
5806 * src/files.h: Likewise.
5807
5808 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
5809 mishandled funny characters in file names, and anyway it isn't
5810 needed any more.
5811 * data/yacc.c: Likewise.
5812 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
5813
5814 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
5815 * data/yacc.c: Likewise.
5816
5817 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
5818 strings now.
5819 (muscle_init): Quote filename as a C string.
5820 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
5821 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
5822 * src/output.c (escaped_file_name_output): New function.
5823 (prepare_symbols): Quote tokens for M4.
5824 (prepare): Don't insert output_infix, output_prefix,
5825 output_parser_name, output_header_name; this is now down by scan-skel.
5826 Insert skeleton as a C string.
5827
5828 * src/output.c (user_actions_output, symbol_destructors_output,
5829 symbol_printers_output): Quote filenames for C and M4.
5830 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5831
5832 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
5833 escapes other than \\ and \'; this simplifies the code.
5834 (<SC_STRING>): Likewise, for \\ and \".
5835 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
5836 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
5837 Use new escapes @{ and @} for [ and ].
5838
5839 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
5840 them with auto vars.
5841 Switch to new escape scheme, where @ is the escape character uniformly.
5842 Abort if a stray escape character is found. Avoid unbounded input
5843 buffer when parsing non-escaped text.
5844
5845 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
5846 __oline__, #output, $@, and @{ do not have unintended meanings.
5847
5848 2002-11-09 Paul Eggert <eggert@twinsun.com>
5849
5850 Fix the test failure due to GCC warnings described in
5851 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
5852 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
5853 evaluate to 0 if it's impossible for NINF to be in the respective
5854 table.
5855 (yygetLRActions, yyrecoverParseError): Use them.
5856
5857 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
5858 counted in the token inserted at end of file. Now takes
5859 location_t *, not location_t, so that the location can be
5860 adjusted. All uses changed.
5861
5862 * tests/regression.at (Invalid inputs): Adjust wording in
5863 diagnostic to match the new behavior.
5864
5865 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
5866 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
5867 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
5868 abort ();'. This reduces the runtime of the "Many lookaheads"
5869 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
5870 GCC 3.2.
5871
5872 2002-11-07 Paul Eggert <eggert@twinsun.com>
5873
5874 * src/parse-gram.y (CHARACTER): Remove unused token.
5875 All uses removed.
5876
5877 * src/scan-gram.l: Remove stack option. We no longer use the
5878 stack, since the stack was never deeper than 1; instead, use the
5879 new auto var c_context to record the stacked value.
5880
5881 Remove nounput option. At an unexpected end of file, we now unput
5882 the minimal input necessary to end cleanly; this simplifies the
5883 code.
5884
5885 Avoid unbounded token sizes where this is easy.
5886
5887 (unexpected_end_of_file): New function.
5888 Use it to systematize the error message on unexpected EOF.
5889 (last-string): Now auto, not static.
5890 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
5891 (scanner_last_string_free): Remove; not used.
5892 (percent_percent_count): Move decl to just before use.
5893 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
5894 not the (never otherwised-used) CHARACTER.
5895
5896 2002-11-07 Akim Demaille <akim@epita.fr>
5897
5898 Let yyerror always receive the msg as last argument, so that
5899 yyerror can be variadic.
5900
5901 * data/yacc.c (b4_yyerror_args): New.
5902 Use it when calling yyerror.
5903 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
5904 Use it when calling yyerror.
5905 * doc/bison.texinfo (Error Reporting): Adjust.
5906 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
5907 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
5908
5909 2002-11-06 Akim Demaille <akim@epita.fr>
5910
5911 #line should have quoted strings.
5912 Ideally, this should be done by m4_quotearg.
5913
5914 * src/scan-skel.l: Include quotearg.h.
5915 Quote __ofile__.
5916 * src/output.c (symbol_printers_output)
5917 (symbol_destructors_output): Quote the file name.
5918
5919 2002-11-06 Akim Demaille <akim@epita.fr>
5920
5921 * tests/regression.at (Invalid inputs): Adjust to the recent
5922 messages.
5923
5924 2002-11-06 Akim Demaille <akim@epita.fr>
5925
5926 Restore --no-lines.
5927 Reported by Jim Kent.
5928
5929 * data/c.m4 (b4_syncline): New.
5930 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
5931 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
5932 * src/output.c (user_actions_output): Likewise.
5933 (prepare): Define 'b4_synclines_flag'.
5934 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
5935
5936 2002-11-06 Akim Demaille <akim@epita.fr>
5937
5938 * src/main.c (main): Free `infile'.
5939 * src/scan-gram.l (handle_syncline): New.
5940 Recognize `#line'.
5941 * src/output.c (user_actions_output, symbol_destructors_output)
5942 (symbol_printers_output): Use the location's file name, not
5943 infile.
5944 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5945
5946 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5947
5948 * src/tables.c (matching_state): Don't allow states to match if
5949 either has GLR conflict entries.
5950
5951 2002-11-05 Paul Eggert <eggert@twinsun.com>
5952
5953 * src/scan-gram.l: Use more accurate diagnostics, e.g.
5954 "integer out of range" rather than "invalid value".
5955 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
5956 accordingly.
5957
5958 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
5959 Also, remove one static variable in the scanner.
5960
5961 * src/scan-gram.l (braces_level): Now auto, not static.
5962 Initialize to zero if the compiler is being picky.
5963 (INITIAL): Clear braces_level instead of incrementing it.
5964 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
5965 as POSIX 1003.1-2001 requires.
5966 * src/system.h (IF_LINT): New macro, taken from coreutils.
5967 * configure.ac: Define "lint" if --enable-gcc-warnings.
5968
5969 2002-11-05 Akim Demaille <akim@epita.fr>
5970
5971 * src/scan-gram.l: When it starts with `%', complain about the
5972 whole directive, not just that `invalid character: %'.
5973
5974 2002-11-04 Akim Demaille <akim@epita.fr>
5975
5976 * Makefile.maint: Update from Autoconf.
5977 (update, cvs-update, po-update, do-po-update): New.
5978
5979 2002-11-04 Akim Demaille <akim@epita.fr>
5980
5981 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
5982 and yyerror.
5983 Have yyerror `use' its arguments.
5984 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
5985 returns true when location & yacc & pure & parse-param.
5986 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
5987
5988 2002-11-04 Akim Demaille <akim@epita.fr>
5989
5990 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
5991 clashes.
5992 * src/scan-gram.l: Use [\'] instead of ['] to pacify
5993 font-lock-mode.
5994 Use complain_at.
5995 Use quote, not quote_n since LOCATION_PRINT no longer uses the
5996 slot 0.
5997
5998 2002-11-03 Paul Eggert <eggert@twinsun.com>
5999
6000 * src/reader.c (get_merge_function, grammar_current_rule_check):
6001 Use consistent diagnostics for reporting type name clashes.
6002 Quote the types with <>, for consistency with Yacc.
6003 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
6004
6005 2002-11-03 Akim Demaille <akim@epita.fr>
6006
6007 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
6008 New.
6009 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
6010 (b4_parse_param): Remove.
6011 Use b4_identification.
6012 Propagate b4_pure_args where needed to pass them to yyerror.
6013 * data/glr.m4 (b4_parse_param): Remove.
6014 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
6015 (b4_lpure_formals): New.
6016 Use b4_identification.
6017 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
6018 b4_user_formals and b4_user_args.
6019 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
6020 (yyreportAmbiguity): When using a pure parser, also need
6021 the location, and the parse-params.
6022 Adjust callers.
6023 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
6024 When using a pure parser, also need the parse-params.
6025 Adjust callers.
6026 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
6027 (%pure-parser + %parse-param) LALR and GLR parsers.
6028 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
6029 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
6030 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
6031 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
6032 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
6033 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
6034 * doc/bison.texinfo: Untabify the whole file.
6035 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
6036 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
6037 (Error Reporting): Adjust to these new directives.
6038 Document %error-verbose, deprecate YYERROR_VERBOSE.
6039
6040 2002-11-03 Akim Demaille <akim@epita.fr>
6041
6042 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
6043 AT_CHECK_CALC_GLR invocations to use % directives, instead of
6044 command line options.
6045 * tests/cxx-type.at: Formatting changes.
6046
6047 2002-11-03 Paul Eggert <eggert@twinsun.com>
6048
6049 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
6050 to count columns correctly, and to check for invalid inputs.
6051
6052 Use mbsnwidth to count columns correctly. Account for tabs, too.
6053 Include mbswidth.h.
6054 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
6055 (extend_location): New function.
6056 (YY_LINES): Remove.
6057
6058 Handle CRLF in C code rather than in Lex code.
6059 (YY_INPUT): New macro.
6060 (no_cr_read): New function.
6061
6062 Scan UCNs, even though we don't fully handle them yet.
6063 (convert_ucn_to_byte): New function.
6064
6065 Handle backslash-newline correctly in C code.
6066 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
6067 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
6068 all uses changed.
6069 (tag, splice): New EREs. Do not allow NUL or newline in tags.
6070 Use {splice} wherever C allows backslash-newline.
6071 YY_STEP after space, newline, vertical-tab.
6072 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
6073
6074 (letter, id): Don't assume ASCII; e.g., spell out a-z.
6075
6076 ({int}, handle_action_dollar, handle_action_at): Check for integer
6077 overflow.
6078
6079 (YY_STEP): Omit trailing semicolon, so that it's more like C.
6080
6081 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
6082 as well as \000. Check for UCHAR_MAX, not 255.
6083 Allow \x with an arbitrary positive number of digits, as in C.
6084 Check for overflow here.
6085 Allow \? and UCNs, for compatibility with C.
6086
6087 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
6088 with quote slot used by complain_at.
6089
6090 * tests/input.at: Add tests for backslash-newline, m4 quotes
6091 in symbols, long literals, and funny escapes in strings.
6092
6093 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
6094 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
6095 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
6096 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
6097 * m4/mbswidth.m4: New file, from GNU coreutils.
6098
6099 * doc/bison.texinfo (Grammar Outline): Document // comments.
6100 (Symbols): Document that trigraphs have no special meaning in Bison,
6101 nor is backslash-newline allowed.
6102 (Actions): Document that trigraphs have no special meaning.
6103
6104 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
6105 no longer used.
6106
6107 2002-11-02 Paul Eggert <eggert@twinsun.com>
6108
6109 * src/reader.c: Don't include quote.h; not needed.
6110 (get_merge_function): Reword warning to be consistent with
6111 type clash diagnostic in grammar_current_rule_check.
6112
6113 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
6114 bug in trigraph handling.
6115
6116 * src/output.c (prepare_symbols): When printing token names,
6117 escape "[" as "@<:@" and likewise for "]".
6118
6119 * src/system.h (errno): Remove declaration, as we are now
6120 assuming C89 or better, and C89 guarantees errno.
6121
6122 2002-10-30 Paul Eggert <eggert@twinsun.com>
6123
6124 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
6125 Check for close failures.
6126 * src/files.h (xfclose): Return void, not int, since it always
6127 returned zero.
6128 * src/files.c (xfclose): Likewise. Report I/O error if ferror
6129 indicates one.
6130 * src/output.c (output_skeleton): Use xfclose rather than fclose
6131 and ferror. xfclose now checks ferror.
6132
6133 * data/glr.c (YYLEFTMOST_STATE): Remove.
6134 (yyreportTree): Use a stack-based leftmost state. This avoids
6135 our continuing battles with bogus warnings about initializers.
6136
6137 2002-10-30 Akim Demaille <akim@epita.fr>
6138
6139 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
6140 #if.
6141
6142 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6143
6144 * tests/glr-regr1.at: New test for reported regressions.
6145 * tests/testsuite.at: Add glr-regr1.at test.
6146 * tests/Makefile.am: Add glr-regr1.at test.
6147
6148 2002-10-24 Paul Eggert <eggert@twinsun.com>
6149
6150 Version 1.75a.
6151
6152 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
6153 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
6154 we use malloc. Don't assume 'A' through 'Z' are contiguous.
6155 Don't assume strdup exists; POSIX says its an XSI extension.
6156 Check for buffer overflow on input.
6157
6158 2002-10-24 Akim Demaille <akim@epita.fr>
6159
6160 * src/output.c (output_skeleton): Don't disable M4sugar comments
6161 too soon: it results in comments being expanded.
6162 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
6163 first output.
6164
6165 2002-10-24 Akim Demaille <akim@epita.fr>
6166
6167 * data/yacc.c (m4_int_type): New.
6168 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
6169 char' as only yacc.c wants K&R portability.
6170 * data/glr.c (yysigned_char): Remove.
6171 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
6172 Reported by Quoc Peyrot.
6173
6174 2002-10-23 Paul Eggert <eggert@twinsun.com>
6175
6176 * src/main.c (main): With --trace=time, report times even if a
6177 non-fatal error occurs. Formerly, the times were reported in some
6178 such cases but not in others.
6179 * src/reader.c (reader): Just return if a complaint has been issued,
6180 instead of exiting, so that 'main' can report times.
6181
6182 2002-10-22 Akim Demaille <akim@epita.fr>
6183
6184 * src/system.h: Include sys/types.
6185 Reported by Bert Deknuydt.
6186
6187 2002-10-23 Paul Eggert <eggert@twinsun.com>
6188
6189 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
6190 Suggested by Art Haas.
6191
6192 2002-10-22 Paul Eggert <eggert@twinsun.com>
6193
6194 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
6195 decl; not needed any more.
6196 * src/main.c (main): Use return to exit, undoing yesterday's change.
6197 The last OS that we could find where this wouldn't work is
6198 SunOS 3.5, and that's too old to worry about now.
6199
6200 * data/glr.c (struct yyltype): Define members even when not
6201 doing locations. This is more consistent with yacc.c, and it
6202 works around the following bug reports:
6203 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
6204 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
6205
6206 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
6207 @acronym consistently. Standardize on "Yacc" instead of "YACC",
6208 "Algol" instead of "ALGOL". Give a bit more history about BNF.
6209
6210 2002-10-22 Akim Demaille <akim@epita.fr>
6211
6212 * data/README: New.
6213
6214 2002-10-21 Paul Eggert <eggert@twinsun.com>
6215
6216 Be consistent about 'bool'; the old code used an enum in one
6217 module and an int in another, and this violates the C standard.
6218 * m4/stdbool.m4: New file, from coreutils 4.5.3.
6219 * configure.ac (AC_HEADER_STDBOOL): Add.
6220 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
6221 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
6222 * src/symtab.c (hash_compare_symbol_t): Likewise.
6223 * src/system.h (bool, false, true): Use a definition consistent
6224 with ../lib/hash.c. All uses changed.
6225
6226 * src/complain.c (warning_issued): Renamed from warn_message_count,
6227 so that we needn't worry about integer overflow (!).
6228 Now of type bool. All uses changed.
6229 (complaint_issued): Renamed from complain_message_count; likewise.
6230
6231 * src/main.c (main): Use exit to exit with failure.
6232
6233 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
6234 rather than 1 and 0.
6235 * src/main.c (main): Likewise.
6236 * src/getargs.c (getargs): Likewise.
6237 * src/reader.c (reader): Likewise.
6238
6239 * src/getarg.c (getargs): Remove duplicate code for
6240 "Try `bison --help'".
6241
6242 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
6243 What was that "2" for?
6244
6245 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
6246 * src/getargs.c (usage): Likewise.
6247
6248 * src/getargs.c (getargs): When there are too few operands, report
6249 the last one. When there are too many, report the first extra
6250 one. This is how diffutils does it.
6251
6252 2002-10-20 Paul Eggert <eggert@twinsun.com>
6253
6254 Remove K&R vestiges.
6255 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
6256 * src/complain.c (VA_START): Remove. Assume prototypes.
6257 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
6258 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
6259 fatal): Assume prototypes.
6260 * src/complain.h: Assume prototypes.
6261 * src/system.h (PARAMS): Remove.
6262 Include <limits.h> unconditionally, since it's guaranteeed even
6263 for a freestanding C89 compiler.
6264 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
6265 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
6266
6267 2002-10-20 Akim Demaille <akim@epita.fr>
6268
6269 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
6270 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
6271 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
6272 (yyresolveStates, yyresolveAction, yyresolveStack)
6273 (yyprocessOneStack): Use them.
6274 (yy_reduce_print): New.
6275 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
6276
6277 2002-10-20 Akim Demaille <akim@epita.fr>
6278
6279 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
6280 arguments and output `void'.
6281 (b4_c_function): Rename as...
6282 (b4_c_function_def): this.
6283 (b4_c_function_decl, b4_c_ansi_function_def)
6284 (b4_c_ansi_function_decl): New.
6285 Change the interpretation of the arguments: before `int, foo', now
6286 `int foo, foo'.
6287 * data/yacc.c (yyparse): Prototype and define thanks to these.
6288 Adjust b4_c_function_def uses.
6289 * data/glr.c (yyparse): Likewise, but ANSI only.
6290
6291 2002-10-20 Akim Demaille <akim@epita.fr>
6292
6293 * src/output.c (prepare): Move the definition of `tokens_number',
6294 `nterms_number', `undef_token_number', `user_token_number_max'
6295 to...
6296 (prepare_tokens): Here.
6297 (prepare_tokens): Rename as...
6298 (prepare_symbols): this.
6299 (prepare): Move the definition of `rules_number' to...
6300 (prepare_rules): here.
6301 (prepare): Move the definition of `last', `final_state_number',
6302 `states_number' to...
6303 (prepare_states): here.
6304 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
6305
6306 2002-10-20 Akim Demaille <akim@epita.fr>
6307
6308 * src/tables.h, src/tables.c, src/output.c: Comment changes.
6309
6310 2002-10-20 Akim Demaille <akim@epita.fr>
6311
6312 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
6313 * data/c.m4: here.
6314
6315 2002-10-20 Akim Demaille <akim@epita.fr>
6316
6317 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
6318 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
6319 `pair'.
6320 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
6321 `name' to...
6322 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
6323 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
6324 These.
6325
6326 2002-10-19 Paul Eggert <eggert@twinsun.com>
6327
6328 Do not create a temporary file, as that involves security and
6329 cleanup headaches. Instead, use a pair of pipes.
6330 Derived from a suggestion by Florian Krohm.
6331 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
6332 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
6333 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
6334 (BISON_PREREQ_SUBPIPE): Add.
6335 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
6336 Add subpipe.h, subpipe.c.
6337 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
6338 * po/POTFILES.in: Add lib/subpipe.c.
6339 * src/output.c: Include "subpipe.h".
6340 (m4_invoke): Remove decl.
6341 (scan_skel): New decl.
6342 (output_skeleton): Use pipe rather than temporary file for m4 input.
6343 Check that m4sugar.m4 is readable, to avoid deadlock.
6344 Check for pipe I/O error.
6345 * src/scan-skel.l (readpipe): Remove decl.
6346 (scan_skel): New function, to be used in place of m4_invoke.
6347 Read from stream rather than file.
6348
6349 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
6350 float, as this generates a warning on Solaris 8 + GCC 3.2 with
6351 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
6352 this generates a more-accurate value anyway.
6353
6354 * lib/timevar.c (timervar_accumulate): Rename locals to
6355 avoid confusion with similarly-named more-global.
6356 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
6357
6358 * src/output.c (prepare): Use xstrdup to convert char const *
6359 to char *, to avoid GCC warning.
6360
6361 2002-10-19 Akim Demaille <akim@epita.fr>
6362
6363 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
6364 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
6365 Use them to have `calc.y' ready for %pure-parser.
6366 * data/yacc.c (YYLEX): Pass a yylex return type to
6367 b4_c_function_call.
6368
6369 2002-10-19 Akim Demaille <akim@epita.fr>
6370
6371 Prototype support of %lex-param and %parse-param.
6372
6373 * src/parse-gram.y: Add the definition of the %lex-param and
6374 %parse-param tokens, plus their rules.
6375 Drop the `_' version of %glr-parser.
6376 Add the "," token.
6377 * src/scan-gram.l (INITIAL): Scan them.
6378 * src/muscle_tab.c: Comment changes.
6379 (muscle_insert, muscle_find): Rename `pair' as `probe'.
6380 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
6381 (muscle_entry_s): The `value' member is no longer const.
6382 Adjust all dependencies.
6383 * src/muscle_tab.c (muscle_init): Adjust: use
6384 MUSCLE_INSERT_STRING.
6385 Initialize the obstack earlier.
6386 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
6387 (muscle_pair_list_grow): New.
6388 * data/c.m4 (b4_c_function_call, b4_c_args): New.
6389 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
6390 * tests/calc.at: Use %locations, not --locations.
6391 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
6392
6393 2002-10-19 Akim Demaille <akim@epita.fr>
6394
6395 * src/getargs.c (usage): Take status as argument and exit
6396 accordingly.
6397 Report the traditional `Try ... --help' message when status != 0.
6398 (usage, version): Don't take a FILE * as arg, it is pointless.
6399 (getargs): When there is an incorrect number of arguments, make it
6400 an error, and report it GNUlically thanks to `usage ()'.
6401
6402 2002-10-18 Paul Eggert <eggert@twinsun.com>
6403
6404 * data/glr.c (yyreportParseError): Don't assume that sprintf
6405 yields the length of the printed string, as this is not true
6406 on SunOS 4.1.4. Reported by Peter Klein.
6407
6408 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
6409 * tests/conflicts.at (%nonassoc and eof): Likewise.
6410 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
6411
6412 2002-10-17 Akim Demaille <akim@epita.fr>
6413
6414 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
6415 * src/getargs.c (trace_types, trace_args): Adjust.
6416 * src/reader.c (grammar_current_rule_prec_set)
6417 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
6418 Standardize error messages.
6419 And s/@prec/%prec/!
6420 (reader): Use trace_flag to enable scanner/parser debugging,
6421 instead of an adhoc scheme.
6422 * src/scan-gram.l: Remove trailing debugging code.
6423
6424 2002-10-16 Paul Eggert <eggert@twinsun.com>
6425
6426 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
6427 MUSCLE_TAB_H.
6428
6429 * NEWS: Officially drop support for building Bison with K&R C,
6430 since it didn't work anyway and it's not worth worrying about.
6431 * Makefile.maint (wget_files): Remove ansi2knr.c.
6432 (ansi2knr.c-url_prefix): Remove.
6433 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
6434 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6435 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6436
6437 2002-10-15 Paul Eggert <eggert@twinsun.com>
6438
6439 Stop using the "enum_" trick for K&R-style function definitions;
6440 it confused me, and I was the author! Instead, assume that people
6441 who want to use K&R C compilers (when using these modules in GCC,
6442 perhaps?) will run ansi2knr.
6443
6444 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
6445 All uses of "enum_" changed to "enum ".
6446 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6447 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6448
6449 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
6450 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
6451 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
6452 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
6453 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
6454 abitset_not, abitset_ones, abitset_or, abitset_or_and,
6455 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
6456 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
6457 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
6458 Use function prototypes; this removes the need for declaring
6459 static functions simply to provide their prototypes.
6460 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
6461 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
6462 bitset_count_, bitset_create, bitset_dump, bitset_first,
6463 bitset_free, bitset_init, bitset_last, bitset_next,
6464 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
6465 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
6466 bitset_print, bitset_release_memory, bitset_toggle_,
6467 bitset_type_choose, bitset_type_get, bitset_type_name_get,
6468 debug_bitset): Likewise.
6469 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
6470 * lib/bitset_stats.c (bitset_log_histogram_print,
6471 bitset_percent_histogram_print, bitset_stats_and,
6472 bitset_stats_and_cmp, bitset_stats_and_or,
6473 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
6474 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
6475 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
6476 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
6477 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
6478 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
6479 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
6480 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
6481 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
6482 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
6483 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
6484 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
6485 bitset_stats_zero): Likewise.
6486 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6487 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6488 bitsetv_dump, debug_bitsetv): Likewise.
6489 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
6490 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
6491 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
6492 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
6493 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
6494 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
6495 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
6496 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
6497 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
6498 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
6499 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
6500 Likewise.
6501 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
6502 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
6503 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
6504 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
6505 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
6506 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
6507 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
6508 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
6509 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
6510 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
6511 lbitset_xor_cmp, lbitset_zero): Likewise.
6512
6513 2002-10-14 Akim Demaille <akim@epita.fr>
6514
6515 Version 1.75.
6516
6517 2002-10-14 Akim Demaille <akim@epita.fr>
6518
6519 * tests/Makefile.am (maintainer-check-posix): New.
6520
6521 2002-10-14 Akim Demaille <akim@epita.fr>
6522
6523 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
6524 member.
6525
6526 2002-10-14 Akim Demaille <akim@epita.fr>
6527
6528 * src/tables.c (table_ninf_remap): base -> tab.
6529 Reported by Matt Rosing.
6530
6531 2002-10-14 Paul Eggert <eggert@twinsun.com>
6532
6533 * tests/action.at, tests/calc.at, tests/conflicts.at,
6534 tests/cxx-type.at, tests/headers.at, tests/input.at,
6535 tests/regression.at, tests/synclines.at, tests/torture.at:
6536 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
6537 so that the tests still work even if POSIXLY_CORRECT is set.
6538 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
6539
6540 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
6541 for portability to K&R hosts. Fix typo: signed char is guaranteed
6542 only to 127, not to 128.
6543 * data/glr.c (yysigned_char): New type.
6544 * data/yacc.c (yysigned_char): Likewise.
6545 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
6546
6547 2002-10-13 Paul Eggert <eggert@twinsun.com>
6548
6549 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
6550 true due to limited range of data type" warning from GCC.
6551
6552 * data/c.m4 (b4_token_defines): Protect against double-inclusion
6553 by wrapping enum yytokentype's definition inside #ifndef
6554 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
6555
6556 2002-10-13 Akim Demaille <akim@epita.fr>
6557
6558 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
6559 Un yy- yyrhs to avoid the name clash with the global YYRHS.
6560
6561 2002-10-13 Akim Demaille <akim@epita.fr>
6562
6563 * Makefile.maint: Update from Autoconf 2.54.
6564 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
6565
6566 2002-10-13 Akim Demaille <akim@epita.fr>
6567
6568 * src/print.c (print_state): Separate the list of solved conflicts
6569 from the other items.
6570 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
6571
6572 2002-10-13 Akim Demaille <akim@epita.fr>
6573
6574 Let nondeterministic skeletons be usable with deterministic
6575 tables.
6576
6577 With the patch, GAWK compiled by GCC without -O2 passes its test
6578 suite using a GLR parser driven by LALR tables. It fails with -O2
6579 because `struct stat' gives two different answers on my machine:
6580 88 (definition of an auto var) and later 96 (memset on this var).
6581 Hence the stack is badly corrumpted. The headers inclusion is to
6582 blame: if I move the awk.h inclusion before GLR's system header
6583 inclusion, the two struct stat have the same size.
6584
6585 * src/tables.c (pack_table): Always create conflict_table.
6586 (token_actions): Always create conflict_list.
6587 * data/glr.c (YYFLAG): Remove, unused.
6588
6589 2002-10-13 Akim Demaille <akim@epita.fr>
6590
6591 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
6592 (O0FLAGS): New.
6593 (VALGRIND, GXX): New.
6594 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
6595 * tests/bison.in: Run $PREBISON a pre-command.
6596 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
6597 (maintainer-check-g++): New.
6598 * Makefile.am (maintainer-check): New.
6599
6600 2002-10-13 Akim Demaille <akim@epita.fr>
6601
6602 * data/glr.c: Formatting changes.
6603 Tweak some trace messages to match yacc.c's.
6604
6605 2002-10-13 Akim Demaille <akim@epita.fr>
6606
6607 GLR parsers sometimes raise parse errors instead of performing the
6608 default reduction.
6609 Reported by Charles-Henry de Boysson.
6610
6611 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
6612 check the length of the traces when %glr.
6613 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
6614 GLR's traces.
6615 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
6616 Test GLR parsers.
6617 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
6618 (yyltype): Remove the yy prefix from the member names.
6619 (yytable): Complete its comment.
6620 (yygetLRActions): Map error action number from YYTABLE from
6621 YYTABLE_NINF to 0.
6622 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
6623 (which was a bug: it should have been YYTABEL_NINF, and yet it was
6624 not satisfying as we could compare an YYACTION computed from
6625 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
6626 only value for error actions.
6627 (yyreportParseError): In verbose parse error messages, don't issue
6628 `error' in the list of expected tokens.
6629 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
6630 next action to perform to match glr.c's decoding.
6631 (yytable): Complete its comment.
6632
6633 2002-10-13 Paul Eggert <eggert@twinsun.com>
6634
6635 Fix problem reported by Henrik Grubbstroem in
6636 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
6637 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
6638 because the Bison parser reads the second action before reducing
6639 the first one.
6640 * src/scan-gram.l (rule_length): New static var.
6641 Use it to keep track of the rule length in the scanner, since
6642 we can't expect the parser to be in lock-step sync with the scanner.
6643 (handle_action_dollar, handle_action_at): Use this var.
6644 * tests/actions.at (Exotic Dollars): Test for the problem.
6645
6646 2002-10-12 Paul Eggert <eggert@twinsun.com>
6647
6648 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
6649 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
6650 Include <sys/time.h> when checking for clock_t and struct tms.
6651 Use same include order as source.
6652 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
6653 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
6654
6655 * lib/timevar.c: Update copyright date and clarify comments.
6656 (get_time) [IN_GCC]: Keep the GCC version for reference.
6657
6658 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
6659 GCC version as of today, then merge Bison's changes.
6660 Change "GCC" to "Bison" in copyright notice. timevar.def's
6661 author is Akim, so change that too.
6662
6663 * src/reader.c (grammar_current_rule_check):
6664 Don't worry about the default action if $$ is untyped.
6665 Prevents bogus warnings reported by Jim Gifford in
6666 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
6667
6668 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
6669 * data/glr.c, data/lalr1.cc, data/yacc.c:
6670 Output token definitions before the first part of user declarations.
6671 Fixes compatibility problem reported by Jim Gifford for kbd in
6672 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
6673
6674 2002-10-11 Paul Eggert <eggert@twinsun.com>
6675
6676 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
6677 (yyparse): here. This undoes some of the 2002-07-25 change.
6678 Compatibility problem reported by Ralf S. Engelschall with
6679 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
6680
6681 2002-10-11 Akim Demaille <akim@epita.fr>
6682
6683 * tests/regression.at Characters Escapes): New.
6684 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
6685 characters.
6686 Reported by Jan Nieuwenhuizen.
6687
6688 2002-10-11 Akim Demaille <akim@epita.fr>
6689
6690 * po/id.po: New.
6691
6692 2002-10-10 Paul Eggert <eggert@twinsun.com>
6693
6694 Portability fixes for bitsets; this also avoids several GCC
6695 warnings.
6696
6697 * lib/abitset.c: Include <stddef.h>, for offsetof.
6698 * lib/lbitset.c: Likewise.
6699
6700 * lib/abitset.c (abitset_bytes): Return a size that is aligned
6701 properly for vectors of objects. Do not assume that adding a
6702 header size to a multiple of a word size yields a value that is
6703 properly aligned for the whole union.
6704 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6705
6706 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
6707 unique names for structures.
6708 * lib/ebitset.c (ebitset_bytes): Likewise.
6709 * lib/lbitset.c (lbitset_bytes): Likewise.
6710
6711 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
6712 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
6713 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
6714 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
6715 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
6716 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
6717 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
6718 to improve the type-checking that GCC can do.
6719 * lib/bitset.c (bitset_op4_cmp): Likewise.
6720 * lib/bitset_stats.c (bitset_stats_count,
6721 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
6722 bitset_stats_copy, bitset_stats_disjoint_p,
6723 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
6724 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
6725 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
6726 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
6727 bitset_stats_and_or_cmp, bitset_stats_andn_or,
6728 bitset_stats_andn_or_cmp, bitset_stats_or_and,
6729 bitset_stats_or_and_cmp): Likewise.
6730 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
6731 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
6732 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
6733 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
6734
6735 * lib/abitset.h: Include bitset.h, not bbitset.h.
6736 * lib/ebitset.h: Likewise.
6737 * lib/lbitset.h: Likewise.
6738
6739 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
6740 All instances of parameters of type enum bitset_opts are now of
6741 type enum_bitset_opts, to conform to the C Standard, and similarly
6742 for enum_bitset_type.
6743 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6744 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6745
6746 Do not use "struct bitset_struct" to mean different things in
6747 different modules. Not only is this confusing, it violates
6748 the C Standard, which requires that structure types in different
6749 modules must be compatible if one is to be passed to the other.
6750 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
6751 All instances of "struct bitset_struct *" replaced with "bitset".
6752 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
6753 (union bitset_union, struct abitset_struct, struct ebitset_struct,
6754 struct lbitset_struct, struct bitset_stats_struct): New types.
6755 All uses of struct bitset_struct changed to union bitset_union,
6756 etc.
6757 * lib/abitset.c (struct abitset_struct, abitset,
6758 struct bitset_struct): Remove.
6759 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
6760 struct bitset_struct): Remove.
6761 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
6762 bitset_struct): Remove.
6763 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
6764 Likewise.
6765
6766 Do not call a function of type T using a call that assumes the
6767 function is of a different type U. Standard C requires that a
6768 function must be called with a type that is compatible with its
6769 definition.
6770 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6771 New decls.
6772 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6773 New functions.
6774 * lib/ebitset.c (PFV): Remove.
6775 * lib/lbitset.c (PFV): Likewise.
6776 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
6777 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
6778 decls.
6779 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
6780 (ebitset_vtable): Use them.
6781 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
6782 lbitset_xor): New functions.
6783 (lbitset_vtable): Use them.
6784
6785 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
6786 Declare.
6787
6788 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
6789 GCC warning.
6790 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
6791 Use offsetof, for simplicity.
6792
6793 2002-10-06 Paul Eggert <eggert@twinsun.com>
6794
6795 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
6796 the same width as int. This reapplies a hunk of the 2002-08-12 patch
6797 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6798 which was inadvertently undone by the 2002-09-30 patch.
6799 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
6800 the same width as int.
6801
6802 2002-10-04 Paul Eggert <eggert@twinsun.com>
6803
6804 Version 1.50.
6805
6806 * configure.ac (AC_INIT), NEWS: Increment version number.
6807
6808 * doc/bison.texinfo: Minor spelling, grammar, and white space
6809 fixes.
6810 (Symbols): Mention that any negative value returned from yylex
6811 signifies end-of-input. Warn about negative chars. Mention
6812 the portable Standard C character set.
6813
6814 The GNU coding standard says CFLAGS and YFLAGS are reserved
6815 for the installer to set.
6816 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
6817 * src/Makefile.am (AM_CFLAGS): Likewise.
6818 (AM_YFLAGS): Renamed from YFLAGS.
6819
6820 Fix some MAX and MIN problems.
6821 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
6822 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
6823 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
6824 * src/reader.c (reader): Use it.
6825
6826 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
6827 POSIX 1003.1-2001 has removed fgrep.
6828
6829 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6830
6831 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
6832 interpreted as signed.
6833 * lib/ebitset.c (ebitset_list): Fix bug.
6834
6835 2002-10-01 Paul Eggert <eggert@twinsun.com>
6836
6837 More fixes for 64-bit hosts and large bitsets.
6838
6839 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
6840 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
6841 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
6842 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
6843 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
6844 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
6845 bitset_count_): Likewise.
6846 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
6847 bitset_first, bitset_last): Likewise.
6848 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
6849 bitset_stats_list_reverse, bitset_stats_size,
6850 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
6851 Likewise.
6852 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6853 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6854 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6855 bitsetv_reflexive_transitive_closure): Likewise.
6856 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
6857 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
6858 Likewise.
6859 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
6860 Likewise.
6861
6862 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
6863 Use size_t, not unsigned int, to count bytes.
6864 * lib/abitset.h (abitset_bytes): Likewise.
6865 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
6866 Likewise.
6867 * lib/bitset.h (bitset_bytes): Likewise.
6868 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
6869 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
6870 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6871 * lib/ebitset.c (ebitset_bytes): Likewise.
6872 * lib/ebitset.h (ebitset_bytes): Likewise.
6873 * lib/lbitset.c (lbitset_bytes): Likewise.
6874 * lib/lbitset.h (lbitset_bytes): Likewise.
6875
6876 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
6877 abitset_subset_p, abitset_disjoint_p, abitset_and,
6878 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
6879 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
6880 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
6881 abitset_or_and, abitset_or_and_cmp):
6882 Use bitset_windex instead of unsigned int.
6883 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6884 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
6885 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
6886 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
6887 Likewise.
6888 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
6889
6890 * lib/bitset.c (bitset_print):
6891 Use proper printf formats for widths of integer types.
6892 * lib/bitset_stats.c (bitset_percent_histogram_print,
6893 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
6894 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6895 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6896 * lib/lbitset.c (lbitset_bytes): Likewise.
6897
6898 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
6899 BITSET_SIZE_MAX): New macros.
6900 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
6901 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
6902 to BITSET_WINDEX_MAX.
6903
6904 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
6905 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
6906 since we now return the bitset_bindex type (not int).
6907
6908 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
6909 when computing sizes.
6910 * lib/ebitset.c (ebitset_elts_grow): Likewise.
6911
6912 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
6913 and avoid cast to unsigned.
6914
6915 2002-09-30 Akim Demaille <akim@epita.fr>
6916
6917 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6918 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
6919 Updates from Michael Hayes.
6920
6921 2002-09-30 Art Haas <ahaas@neosoft.com>
6922
6923 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
6924 invocations.
6925 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
6926 defined.
6927
6928 2002-09-27 Akim Demaille <akim@epita.fr>
6929
6930 Version 1.49c.
6931
6932 2002-09-27 Akim Demaille <akim@epita.fr>
6933
6934 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
6935 (Because of AC_LIBSOURCE).
6936
6937 2002-09-27 Akim Demaille <akim@epita.fr>
6938
6939 Playing with Autoscan.
6940
6941 * configure.ac: Remove the old LIBOBJ tweaks.
6942 (AC_REPLACE_FUNCS): Add strrchr and strtol.
6943 * lib/strrchr.c: New.
6944 * lib/strtol.c: New, from the Coreutils 4.5.1.
6945
6946 2002-09-27 Akim Demaille <akim@epita.fr>
6947
6948 Playing with Autoscan.
6949
6950 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
6951 * lib/Makefile.am (libbison_a_SOURCES): No longer include
6952 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
6953 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
6954 Coreutils 4.5.1.
6955
6956 2002-09-24 Akim Demaille <akim@epita.fr>
6957
6958 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
6959 (Frequently Asked Questions, Parser Stack Overflow): New.
6960
6961 2002-09-13 Akim Demaille <akim@epita.fr>
6962
6963 Playing with autoscan.
6964
6965 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
6966 * src/files.c (skeleton_find): Remove, unused.
6967 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
6968 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
6969
6970 2002-09-13 Akim Demaille <akim@epita.fr>
6971
6972 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
6973 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
6974
6975 2002-09-13 Akim Demaille <akim@epita.fr>
6976
6977 * configure.ac: Require 2.54.
6978 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
6979 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
6980 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
6981 Remove, provided by Autoconf macros.
6982
6983 2002-09-12 Akim Demaille <akim@epita.fr>
6984
6985 * m4/prereq.m4: Update, from Coreutils 4.5.1.
6986
6987 2002-09-12 Akim Demaille <akim@epita.fr>
6988
6989 * m4/prereq.m4: Update, from Fileutils 4.1.5.
6990 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
6991 Reported by Martin Mokrejs.
6992
6993 2002-09-10 Akim Demaille <akim@epita.fr>
6994
6995 * src/parse-gram.y: Associate a human readable string to each
6996 token type.
6997 * tests/regression.at (Invalid inputs): Adjust.
6998
6999 2002-09-10 Gary V. Vaughan <gary@gnu.org>
7000
7001 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
7002 with an Autoconf-2.5x style configure.ac.
7003
7004 2002-09-06 Paul Eggert <eggert@twinsun.com>
7005
7006 * doc/bison.texinfo (Conditions): Make explicit that the GPL
7007 exception applies only to yacc.c. This is a modification of a
7008 patch originally suggested by Akim Demaille.
7009
7010 2002-09-06 Akim Demaille <akim@epita.fr>
7011
7012 * data/c.m4 (b4_copyright): Move the GPL exception comment from
7013 here to...
7014 * data/yacc.c: here.
7015
7016 * data/lalr1.cc (struct yyltype): Don't define it, since we use
7017 LocationType.
7018 (b4_ltype): Default to yy::Location from location.hh.
7019
7020 2002-09-04 Jim Meyering <jim@meyering.net>
7021
7022 * data/yacc.c: Guard the declaration of yytoknum also with
7023 `#ifdef YYPRINT', so it is declared only when used.
7024
7025 2002-09-04 Akim Demaille <akim@epita.fr>
7026
7027 * configure.in: Rename as...
7028 * configure.ac: this.
7029 Bump to 1.49c.
7030
7031 2002-09-04 Akim Demaille <akim@epita.fr>
7032
7033 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
7034 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
7035 translate maintainer only messages.
7036
7037 2002-08-12 Paul Eggert <eggert@twinsun.com>
7038
7039 Version 1.49b.
7040
7041 * Makefile.am (SUBDIRS): Remove intl.
7042 (DISTCLEANFILES): Remove.
7043 * NEWS: Mention that GNU M4 is now required. Clarify what is
7044 meant by "larger grammars". Mention the pt_BR translation.
7045 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
7046 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
7047 Bump version from 0.11.2 to 0.11.5.
7048 (BISON_PREREQ_STAGE): Remove.
7049 (AM_GNU_GETTEXT): Use external gettext.
7050 (AC_OUTPUT): Remove intl/Makefile.
7051
7052 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
7053
7054 * data/glr.c: Include string.h, for strlen.
7055 (yyreportParseError): Use size_t for yysize.
7056 (yy_yypstack): No longer nested inside yypstates, as nested
7057 functions are not portable. Do not assume size_t is the
7058 same width as int.
7059 (yypstates): Do not assume that ptrdiff_t is the same width
7060 as int, and similarly for yyposn and YYINDEX.
7061
7062 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
7063
7064 * lib/Makefile.am (INCLUDES): Do not include from the intl
7065 directory, which has been removed.
7066 * src/Makefile.am (INCLUDES): Likewise.
7067
7068 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
7069 (bitsets_sources, additional_bitsets_sources, timevars_sources):
7070 New vars.
7071
7072 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
7073 * tests/Makefile.am (EXTRA_DIST): Likewise.
7074
7075 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
7076 Do not assume that bitset_windex is the same width as unsigned.
7077
7078 * lib/abitset.c (abitset_unused_clear): Do not assume that
7079 bitset_word is the same width as int.
7080 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
7081 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
7082 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
7083 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
7084 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
7085
7086 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
7087 portability to one's complement hosts!).
7088 * lib/ebitset.c (ebitset_op1): Likewise.
7089 * lib/lbitset.c (lbitset_op1): Likewise.
7090
7091 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
7092 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7093 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
7094 Sync with fileutils.
7095 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
7096 lib/gettext.h: Sync with diffutils.
7097
7098 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
7099 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
7100
7101 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
7102 PROTOTYPES to check for prototypes, and "defined __STDC__" to
7103 check for void *.
7104
7105 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
7106 size_t; the old version tried to do this but casted improperly.
7107 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
7108 (bitset_test): Now returns int, not unsigned long.
7109
7110 * lib/bitset_stats.c: Include "gettext.h".
7111 (_): New macro.
7112 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
7113 name locals "index", as it generates unnecessary warnings on some
7114 hosts that have an "index" function.
7115
7116 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
7117 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
7118 they need translation.
7119 * src/LR0.c (state_list_append, new_itemsets, get_state,
7120 append_states, generate_states): Likewise.
7121 * src/assoc.c (assoc_to_string): Likewise.
7122 * src/closure.c (print_closure, set_firsts, closure): Likewise.
7123 * src/gram.c (grammar_dump): Likewise.
7124 * src/injections.c (injections_compute): Likewise.
7125 * src/lalr.c (lookaheads_print): Likewise.
7126 * src/relation.c (relation_transpose): Likewise.
7127 * src/scan-gram.l: Likewise.
7128 * src/tables.c (table_grow, pack_vector): Likewise.
7129
7130 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
7131 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
7132 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
7133 * m4/mbstate_t.m4: Sync with fileutils.
7134 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
7135
7136 * po/LINGUAS: Add pt_BR.
7137 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
7138 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
7139 lib/timevar.c.
7140 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
7141 manual recommends.
7142 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
7143
7144 * src/complain.c (strerror_r): Remove decl; not needed.
7145 (strerror): Use same pattern as ../lib/error.c.
7146
7147 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
7148
7149 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
7150
7151 * src/main.c (main): Cast result of bindtextdomain and textdomain
7152 to void, to avoid a GCC warning when --disable-nls is in effect.
7153
7154 * src/scan-gram.l: Use strings rather than escapes when possible,
7155 to minimize the number of warnings from xgettext.
7156 (handle_action_dollar, handle_action_at): Don't use isdigit,
7157 as it mishandles negative chars and it may not work as expected
7158 outside the C locale.
7159
7160 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
7161 this is a GCC extension and is not portable to other compilers.
7162
7163 * src/system.h (alloca): Use same pattern as ../lib/error.c.
7164 Do not include <ctype.h>; no longer needed.
7165 Do not include <malloc.h>; no longer needed (and generates
7166 warnings on OpenBSD 3.0).
7167
7168 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
7169 it's not portable.
7170
7171 * tests/regression.at: Do not use 'cc -c input.c -o input';
7172 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
7173
7174 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
7175 exit status as failure, not just exit status 1. Sun C exits
7176 with status 2 sometimes.
7177
7178 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
7179 Use it for the two large tests.
7180
7181 2002-08-02 Akim Demaille <akim@epita.fr>
7182
7183 * src/conflicts.c (conflicts_output): Don't output rules never
7184 reduced here, since anyway that computation doesn't work.
7185 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
7186 (rule_useless_p, rule_never_reduced_p): New.
7187 (grammar_rules_partial_print): Use a filter instead of a range.
7188 Display the title only if needed.
7189 (grammar_rules_print): Adjust.
7190 (grammar_rules_never_reduced_report): New.
7191 * src/tables.c (action_row): Move the computation of rules never
7192 reduced to...
7193 (token_actions): here.
7194 * src/main.c (main): Make the parser before making the report, so
7195 that rules never reduced are computed.
7196 Call grammar_rules_never_reduced_report.
7197 * src/print.c (print_results): Report rules never reduced.
7198 * tests/conflicts.at, tests/reduce.at: Adjust.
7199
7200 2002-08-01 Akim Demaille <akim@epita.fr>
7201
7202 Instead of attaching lookaheads and duplicating the rules being
7203 reduced by a state, attach the lookaheads to the reductions.
7204
7205 * src/state.h (state_t): Remove the `lookaheads',
7206 `lookaheads_rule' member.
7207 (reductions_t): Add a `lookaheads' member.
7208 Use a regular array for the `rules'.
7209 * src/state.c (reductions_new): Initialize the lookaheads member
7210 to 0.
7211 (state_rule_lookaheads_print): Adjust.
7212 * src/state.h, src/state.c (state_reductions_find): New.
7213 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
7214 (count_rr_conflicts): Adjust.
7215 * src/lalr.c (LArule): Remove.
7216 (add_lookback_edge): Adjust.
7217 (state_lookaheads_count): New.
7218 (states_lookaheads_initialize): Merge into...
7219 (initialize_LA): this.
7220 (lalr_free): Adjust.
7221 * src/main.c (main): Don't free nullable and derives too early: it
7222 is used by --verbose.
7223 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
7224
7225 2002-08-01 Akim Demaille <akim@epita.fr>
7226
7227 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
7228 `rule_number_t**'.
7229 (set_derives, free_derives): Rename as...
7230 (derives_compute, derives_free): this.
7231 Adjust all dependencies.
7232 * src/nullable.c (set_nullable, free_nullable): Rename as...
7233 (nullable_compute, nullable_free): these.
7234 (rule_list_t): Store rule_t *, not rule_number_t.
7235 * src/state.c (state_rule_lookaheads_print): Directly compare rule
7236 pointers, instead of their numbers.
7237 * src/main.c (main): Call nullable_free, and derives_free earlier,
7238 as they were lo longer used.
7239
7240 2002-08-01 Akim Demaille <akim@epita.fr>
7241
7242 * lib/timevar.c (get_time): Include children time.
7243 * src/lalr.h (LA, LArule): Don't export them: used with the
7244 state_t.
7245 * src/lalr.c (LA, LArule): Static.
7246 * src/lalr.h, src/lalr.c (lalr_free): New.
7247 * src/main.c (main): Call it.
7248 * src/tables.c (pack_vector): Check whether loc is >= to the
7249 table_size, not >.
7250 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
7251 (tables_generate): do it, since that's also it which allocates
7252 them.
7253 Don't free LA and LArule, main does.
7254
7255 2002-07-31 Akim Demaille <akim@epita.fr>
7256
7257 Separate parser tables computation and output.
7258
7259 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
7260 (conflict_list, conflict_list_cnt, table, check, table_ninf)
7261 (yydefgoto, yydefact, high): Move to...
7262 * src/tables.h, src/tables.c: here.
7263 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
7264 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
7265 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
7266 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
7267 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
7268 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
7269 (action_row, save_row, token_actions, save_column, default_goto)
7270 (goto_actions, sort_actions, matching_state, pack_vector)
7271 (table_ninf_remap, pack_table, prepare_actions): Move to...
7272 * src/tables.c: here.
7273 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
7274 * src/output.c (token_actions, output_base, output_conflicts)
7275 (output_check): Merge into...
7276 (prepare_actions): this.
7277 (actions_output): Rename as...
7278 (user_actions_output): this.
7279 * src/main.c (main): Call tables_generate and tables_free.
7280
7281 2002-07-31 Akim Demaille <akim@epita.fr>
7282
7283 Steal GCC's --time-report support.
7284
7285 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
7286 stolen/adjusted from GCC.
7287 * m4/stage.m4: Remove time related checks.
7288 * m4/timevar.m4: New.
7289 * configure.in: Adjust.
7290 * src/system.h: Adjust to using timevar.h.
7291 * src/getargs.h, src/getargs.c: Support trace_time for
7292 --trace=time.
7293 * src/main.c (stage): Remove.
7294 (main): Replace `stage' invocations with timevar calls.
7295 * src/output.c: Insert pertinent timevar calls.
7296
7297 2002-07-31 Akim Demaille <akim@epita.fr>
7298
7299 Let --trace have arguments.
7300
7301 * src/getargs.h (enum trace_e): New.
7302 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
7303 (long_options, short_options): --trace/-T takes an optional
7304 argument.
7305 Change all the uses of trace_flag to reflect the new flags.
7306 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
7307
7308 Strengthen `stage' portability.
7309
7310 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
7311 * configure.in: Use it.
7312 Don't check for malloc.h and sys/times.h.
7313 * src/system.h: Include them when appropriate.
7314 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
7315 times and struct tms are available.
7316
7317 2002-07-30 Akim Demaille <akim@epita.fr>
7318
7319 In verbose parse error message, don't report `error' as an
7320 expected token.
7321 * tests/actions.at (Printers and Destructors): Adjust.
7322 * tests/calc.at (Calculator $1): Adjust.
7323 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
7324 error message, do not report the parser accepts the error token in
7325 that state.
7326
7327 2002-07-30 Akim Demaille <akim@epita.fr>
7328
7329 Normalize conflict related messages.
7330
7331 * src/complain.h, src/complain.c (warn, complain): New.
7332 * src/conflicts.c (conflicts_print): Use them.
7333 (conflict_report_yacc): New, extracted from...
7334 (conflicts_print): here.
7335 * tests/conflicts.at, tests/existing.at: Adjust.
7336
7337 2002-07-30 Akim Demaille <akim@epita.fr>
7338
7339 Report rules which are never reduced by the parser: those hidden
7340 by conflicts.
7341
7342 * src/LR0.c (save_reductions): Don't make the final state too
7343 different: save its reduction (accept) instead of having a state
7344 without any action (no shift or goto, no reduce).
7345 Note: the final state is now a ``regular'' state, i.e., the
7346 parsers now contain `reduce 0' as default reduction.
7347 Nevertheless, since they decide to `accept' when yystate =
7348 final_state, they still will not reduce rule 0.
7349 * src/print.c (print_actions, print_reduction): Adjust.
7350 * src/output.c (action_row): Track reduced rules.
7351 (token_actions): Report rules never reduced.
7352 * tests/conflicts.at, tests/regression.at: Adjust.
7353
7354 2002-07-30 Akim Demaille <akim@epita.fr>
7355
7356 `stage' was accidently included in a previous patch.
7357 Initiate its autoconfiscation.
7358
7359 * configure.in: Look for malloc.h and sys/times.h.
7360 * src/main.c (stage): Adjust.
7361 Report only when trace_flag.
7362
7363 2002-07-29 Akim Demaille <akim@epita.fr>
7364
7365 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
7366 state_number_t.
7367 (errs_t): symbol_t*, not symbol_number_t.
7368 (reductions_t): rule_t*, not rule_number_t.
7369 (FOR_EACH_SHIFT): New.
7370 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
7371 * src/print.c, src/print_graph.c: Adjust.
7372
7373 2002-07-29 Akim Demaille <akim@epita.fr>
7374
7375 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
7376
7377 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
7378 (endtoken, accept): these.
7379 * src/reader.c (reader): Set endtoken's default tag to "$end".
7380 Set undeftoken's tag to "$undefined" instead of "$undefined.".
7381 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
7382 Adjust.
7383
7384 2002-07-29 Akim Demaille <akim@epita.fr>
7385
7386 * src/reduce.c (reduce_grammar): When the language is empty,
7387 complain about the start symbol, not the axiom.
7388 Use its location.
7389 * tests/reduce.at (Empty Language): New.
7390
7391 2002-07-26 Akim Demaille <akim@epita.fr>
7392
7393 * src/reader.h, src/reader.c (gram_error): ... can't get
7394 yycontrol without making too strong assumptions on the parser
7395 itself.
7396 * src/output.c (prepare_tokens): Use the real 0th value of
7397 token_translations instead of `0'.
7398 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
7399 visible here.
7400 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
7401 for the time being: %locations ought to provide it to yyerror.
7402
7403 2002-07-25 Akim Demaille <akim@epita.fr>
7404
7405 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
7406 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
7407 * tests/regression.at (Web2c Actions): Adjust.
7408
7409 2002-07-25 Akim Demaille <akim@epita.fr>
7410
7411 Stop storing rules from 1 to nrules + 1.
7412
7413 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
7414 * src/nullable.c, src/output.c, src/print.c, src/reader.c
7415 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
7416 Iterate from 0 to nrules.
7417 Use rule_number_as_item_number and item_number_as_rule_number.
7418 Adjust to `derive' now containing possibly 0.
7419 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
7420 Handle the `- 1' part in rule numbers from/to item numbers.
7421 * src/conflicts.c (log_resolution): Fix the message which reversed
7422 shift and reduce.
7423 * src/output.c (action_row): Initialize default_rule to -1.
7424 (token_actions): Adjust.
7425 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
7426 expected output.
7427 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
7428
7429 2002-07-25 Akim Demaille <akim@epita.fr>
7430
7431 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
7432 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
7433 (b4_c_knr_arg_decl): New.
7434 * data/yacc.c: Use it to define yysymprint, yydestruct, and
7435 yyreport_parse_error.
7436
7437 2002-07-25 Akim Demaille <akim@epita.fr>
7438
7439 * data/yacc.c (yyreport_parse_error): New, extracted from...
7440 (yyparse): here.
7441 (yydestruct, yysymprint): Move above yyparse.
7442 Be K&R compliant.
7443
7444 2002-07-25 Akim Demaille <akim@epita.fr>
7445
7446 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
7447 replace...
7448 (b4_sint_type, b4_uint_type): these.
7449 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
7450 * tests/regression.at (Web2c Actions): Adjust.
7451
7452 2002-07-25 Akim Demaille <akim@epita.fr>
7453
7454 * src/gram.h (TIEM_NUMBER_MAX): New.
7455 (item_number_of_rule_number, rule_number_of_item_number): Rename
7456 as...
7457 (rule_number_as_item_number, item_number_as_rule_number): these.
7458 Adjust dependencies.
7459 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
7460 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
7461 (symbol_number_to_vector_number): New.
7462 (order): Of vector_number_t* type.
7463 (base_t, BASE_MAX, BASE_MIN): New.
7464 (froms, tos, width, pos, check): Of base_t type.
7465 (action_number_t, ACTION_MIN, ACTION_MAX): New.
7466 (actrow): Of action_number_t type.
7467 (conflrow): Of unsigned int type.
7468 (table_ninf, base_ninf): New.
7469 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
7470 (muscle_insert_int_table, muscle_insert_base_table)
7471 (muscle_insert_rule_number_table): New.
7472 (prepare_tokens): Output `toknum' as int_table.
7473 (action_row): Returns a rule_number_t.
7474 Use ACTION_MIN, not SHRT_MIN.
7475 (token_actions): yydefact is rule_number_t*.
7476 (table_ninf_remap): New.
7477 (pack_table): Use it for `base' and `table'.
7478 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
7479 replaced with...
7480 (YYPACT_NINF, YYTABLE_NINF): these.
7481 (yypact, yytable): Compute their types instead of hard-coded
7482 `short'.
7483 * tests/regression.at (Web2c Actions): Adjust.
7484
7485 2002-07-19 Akim Demaille <akim@epita.fr>
7486
7487 * src/scan-gram.l (id): Can start with an underscore.
7488
7489 2002-07-16 Akim Demaille <akim@epita.fr>
7490
7491 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
7492 Adjust all former `associativity' dependencies.
7493 * src/symtab.c (symbol_new): Default associativity is `undef', not
7494 `right'.
7495 (symbol_check_alias_consistence): Adjust.
7496
7497 2002-07-09 Akim Demaille <akim@epita.fr>
7498
7499 * doc/bison.texinfo: Properly set the ``header'' part.
7500 Use @dircategory ``GNU programming tools'' as per Texinfo's
7501 documentation.
7502 Use @copying.
7503
7504 2002-07-09 Akim Demaille <akim@epita.fr>
7505
7506 * lib/quotearg.h: Protect against multiple inclusions.
7507 * src/location.h (location_t): Add a `file' member.
7508 (LOCATION_RESET, LOCATION_PRINT): Adjust.
7509 * src/complain.c (warn_at, complain_at, fatal_at): Drop
7510 `error_one_per_line' support.
7511
7512 2002-07-09 Akim Demaille <akim@epita.fr>
7513
7514 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
7515 * src/reader.c (lineno): Remove.
7516 Adjust all dependencies.
7517 (get_merge_function): Take a location and use complain_at.
7518 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
7519 * tests/regression.at (Invalid inputs, Mixing %token styles):
7520 Adjust.
7521
7522 2002-07-09 Akim Demaille <akim@epita.fr>
7523
7524 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
7525 recovery rule, and forbid extensions when --yacc.
7526 (gram_error): Use complain_at.
7527 * src/reader.c (reader): Exit if there were parse errors.
7528
7529 2002-07-09 Akim Demaille <akim@epita.fr>
7530
7531 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
7532 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
7533 Reported by R Blake <blakers@mac.com>.
7534
7535 2002-07-09 Akim Demaille <akim@epita.fr>
7536
7537 * data/yacc.c: Output the copyright notive in the header.
7538
7539 2002-07-03 Akim Demaille <akim@epita.fr>
7540
7541 * src/output.c (froms, tos): Are state_number_t.
7542 (save_column): sp, sp1, and sp2 are state_number_t.
7543 (prepare): Rename `final' as `final_state_number', `nnts' as
7544 `nterms_number', `nrules' as `rules_number', `nstates' as
7545 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
7546 unused.
7547 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
7548 * data/lalr1.cc (nsym_): Remove, unused.
7549
7550 2002-07-03 Akim Demaille <akim@epita.fr>
7551
7552 * src/lalr.h, src/lalr.c (goto_number_t): New.
7553 * src/lalr.c (goto_list_t): New.
7554 Propagate them.
7555 * src/nullable.c (rule_list_t): New.
7556 Propagate.
7557 * src/types.h: Remove.
7558
7559 2002-07-03 Akim Demaille <akim@epita.fr>
7560
7561 * src/closure.c (print_fderives): Use rule_rhs_print.
7562 * src/derives.c (print_derives): Use rule_rhs_print.
7563 (rule_list_t): New, replaces `shorts'.
7564 (set_derives): Add comments.
7565 * tests/sets.at (Nullable, Firsts): Adjust.
7566
7567 2002-07-03 Akim Demaille <akim@epita.fr>
7568
7569 * src/output.c (prepare_actions): Free `tally' and `width'.
7570 (prepare_actions): Allocate and free `order'.
7571 * src/symtab.c (symbols_free): Free `symbols'.
7572 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
7573 * src/output.c (m4_invoke): Move to...
7574 * src/scan-skel.l: here.
7575 (<<EOF>>): Close yyout, and free its name.
7576
7577 2002-07-03 Akim Demaille <akim@epita.fr>
7578
7579 Fix some memory leaks, and fix a bug: state 0 was examined twice.
7580
7581 * src/LR0.c (new_state): Merge into...
7582 (state_list_append): this.
7583 (new_states): Merge into...
7584 (generate_states): here.
7585 (set_states): Don't ensure a proper `errs' state member here, do it...
7586 * src/conflicts.c (conflicts_solve): here.
7587 * src/state.h, src/state.c: Comment changes.
7588 (state_t): Rename member `shifts' as `transitions'.
7589 Adjust all dependencies.
7590 (errs_new): For consistency, also take the values as argument.
7591 (errs_dup): Remove.
7592 (state_errs_set): New.
7593 (state_reductions_set, state_transitions_set): Assert that no
7594 previous value was assigned.
7595 (state_free): New.
7596 (states_free): Use it.
7597 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
7598 temporary storage: use `errs' and `nerrs' as elsewhere.
7599 (set_conflicts): Allocate and free this `errs'.
7600
7601 2002-07-02 Akim Demaille <akim@epita.fr>
7602
7603 * lib/libiberty.h: New.
7604 * lib: Update the bitset implementation from upstream.
7605 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
7606 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
7607 * src/main.c: Adjust bitset stats calls.
7608
7609 2002-07-01 Paul Eggert <eggert@twinsun.com>
7610
7611 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
7612 char, so that negative chars don't collide with $.
7613
7614 2002-06-30 Akim Demaille <akim@epita.fr>
7615
7616 Have the GLR tests be `warning' checked, and fix the warnings.
7617
7618 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
7619 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
7620 (yyremoveDeletes): `yyi' and `yyj' are size_t.
7621 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
7622 (yyaddDeferredAction): static.
7623 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
7624 (yyreportParseError): yyprefix is const.
7625 yytokenp is used only when verbose.
7626 (yy__GNUC__): Replace with __GNUC__.
7627 (yypdumpstack): yyi is size_t.
7628 (yypreference): Un-yy local variables and arguments, to avoid
7629 clashes with `yyr1'. Anyway, we are not in the user name space.
7630 (yytname_size): be an int, as is compared with ints.
7631 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
7632 Use them.
7633 * tests/cxx-gram.at: Use quotation to protect $1.
7634 Use AT_COMPILE to enable warnings hunts.
7635 Prototype yylex and yyerror.
7636 `Use' argc.
7637 Include `string.h', not `strings.h'.
7638 Produce and prototype stmtMerge only when used.
7639 yylex takes a location.
7640
7641 2002-06-30 Akim Demaille <akim@epita.fr>
7642
7643 We spend a lot of time in quotearg, in particular when --verbose.
7644
7645 * src/symtab.c (symbol_get): Store a quoted version of the key.
7646 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
7647 Adjust all callers.
7648
7649 2002-06-30 Akim Demaille <akim@epita.fr>
7650
7651 * src/state.h (reductions_t): Rename member `nreds' as num.
7652 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
7653 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
7654
7655 2002-06-30 Akim Demaille <akim@epita.fr>
7656
7657 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
7658 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
7659 (shifts_to): Rename as...
7660 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
7661 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
7662 (TRANSITION_IS_DISABLED, transitions_to): these.
7663
7664 2002-06-30 Akim Demaille <akim@epita.fr>
7665
7666 * src/print.c (print_shifts, print_gotos): Merge into...
7667 (print_transitions): this.
7668 (print_transitions, print_errs, print_reductions): Align the
7669 lookaheads columns.
7670 (print_core, print_transitions, print_errs, print_state,
7671 print_grammar): Output empty lines separator before, not after.
7672 (state_default_rule_compute): Rename as...
7673 (state_default_rule): this.
7674 * tests/conflicts.at (Defaulted Conflicted Reduction),
7675 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
7676 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
7677
7678 2002-06-30 Akim Demaille <akim@epita.fr>
7679
7680 Display items as we display rules.
7681
7682 * src/gram.h, src/gram.c (rule_lhs_print): New.
7683 * src/gram.c (grammar_rules_partial_print): Use it.
7684 * src/print.c (print_core): Likewise.
7685 * tests/conflicts.at (Defaulted Conflicted Reduction),
7686 (Unresolved SR Conflicts): Adjust.
7687 (Unresolved SR Conflicts): Adjust and rename as...
7688 (Resolved SR Conflicts): this, as was meant.
7689 * tests/regression.at (Web2c Report): Adjust.
7690
7691 2002-06-30 Akim Demaille <akim@epita.fr>
7692
7693 * src/print.c (state_default_rule_compute): New, extracted from...
7694 (print_reductions): here.
7695 Pessimize, but clarify the code.
7696 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
7697
7698 2002-06-30 Akim Demaille <akim@epita.fr>
7699
7700 * src/output.c (action_row): Let default_rule be always a rule
7701 number.
7702
7703 2002-06-30 Akim Demaille <akim@epita.fr>
7704
7705 * src/closure.c (print_firsts, print_fderives, closure):
7706 Use BITSET_EXECUTE.
7707 * src/lalr.c (lookaheads_print): Likewise.
7708 * src/state.c (state_rule_lookaheads_print): Likewise.
7709 * src/print_graph.c (print_core): Likewise.
7710 * src/print.c (print_reductions): Likewise.
7711 * src/output.c (action_row): Likewise.
7712 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
7713
7714 2002-06-30 Akim Demaille <akim@epita.fr>
7715
7716 * src/print_graph.c: Use report_flag.
7717
7718 2002-06-30 Akim Demaille <akim@epita.fr>
7719
7720 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
7721 to...
7722 * src/relation.h, src/relation.c (traverse, relation_digraph)
7723 (relation_print, relation_transpose): New.
7724
7725 2002-06-30 Akim Demaille <akim@epita.fr>
7726
7727 * src/state.h, src/state.c (shifts_to): New.
7728 * src/lalr.c (build_relations): Use it.
7729
7730 2002-06-30 Akim Demaille <akim@epita.fr>
7731
7732 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
7733 (item_number_of_rule_number, rule_number_of_item_number): New.
7734 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
7735 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7736 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
7737 Propagate their use.
7738 Much remains to be done, in particular wrt `shorts' from types.h.
7739
7740 2002-06-30 Akim Demaille <akim@epita.fr>
7741
7742 * src/symtab.c (symbol_new): Initialize the `printer' member.
7743
7744 2002-06-30 Akim Demaille <akim@epita.fr>
7745
7746 * src/LR0.c (save_reductions): Remove, replaced by...
7747 * src/state.h, src/state.c (state_reductions_set): New.
7748 (reductions, errs): Rename as...
7749 (reductions_t, errs_t): these.
7750 Adjust all dependencies.
7751
7752 2002-06-30 Akim Demaille <akim@epita.fr>
7753
7754 * src/LR0.c (state_list_t, state_list_append): New.
7755 (first_state, last_state): Now symbol_list_t.
7756 (this_state): Remove.
7757 (new_itemsets, append_states, save_reductions): Take a state_t as
7758 argument.
7759 (set_states, generate_states): Adjust.
7760 (save_shifts): Remove, replaced by...
7761 * src/state.h, src/state.c (state_shifts_set): New.
7762 (shifts): Rename as...
7763 (shifts_t): this.
7764 Adjust all dependencies.
7765 * src/state.h (state_t): Remove the `next' member.
7766
7767 2002-06-30 Akim Demaille <akim@epita.fr>
7768
7769 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
7770 escaped in slot 0.
7771
7772 2002-06-30 Akim Demaille <akim@epita.fr>
7773
7774 Use hash.h for the state hash table.
7775
7776 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
7777 (allocate_storage): Use state_hash_new.
7778 (free_storage): Use state_hash_free.
7779 (new_state, get_state): Adjust.
7780 * src/lalr.h, src/lalr.c (states): Move to...
7781 * src/states.h (state_t): Remove the `link' member, no longer
7782 used.
7783 * src/states.h, src/states.c: here.
7784 (state_hash_new, state_hash_free, state_hash_lookup)
7785 (state_hash_insert, states_free): New.
7786 * src/states.c (state_table, state_compare, state_hash): New.
7787 * src/output.c (output_actions): Do not free states now, since we
7788 still need to know the final_state number in `prepare', called
7789 afterwards. Do it...
7790 * src/main.c (main): here: call states_free after `output'.
7791
7792 2002-06-30 Akim Demaille <akim@epita.fr>
7793
7794 * src/state.h, src/state.c (state_new): New, extracted from...
7795 * src/LR0.c (new_state): here.
7796 * src/state.h (STATE_ALLOC): Move to...
7797 * src/state.c: here.
7798 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
7799 * src/state.h, src/state.c: here.
7800
7801 2002-06-30 Akim Demaille <akim@epita.fr>
7802
7803 * src/reader.c (gensym): Rename as...
7804 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
7805 (getsym): Rename as...
7806 (symbol_get): this.
7807
7808 2002-06-30 Akim Demaille <akim@epita.fr>
7809
7810 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
7811 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
7812 * src/output.c, src/print.c, src/print_graph.c: Propagate.
7813 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
7814
7815 2002-06-30 Akim Demaille <akim@epita.fr>
7816
7817 Make the test suite pass with warnings checked.
7818
7819 * tests/actions.at (Printers and Destructors): Improve.
7820 Avoid unsigned vs. signed issues.
7821 * tests/calc.at: Don't exercise the scanner here, do it...
7822 * tests/input.at (Torturing the Scanner): here.
7823
7824 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7825
7826 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
7827 reorganize first lines parallel to yacc.c.
7828
7829 2002-06-28 Akim Demaille <akim@epita.fr>
7830
7831 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
7832 (b4_token_enum, b4_token_defines): New, factored from...
7833 * data/lalr1.cc, data/yacc.c, glr.c: here.
7834
7835 2002-06-28 Akim Demaille <akim@epita.fr>
7836
7837 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
7838 unused variables.
7839 * src/output.c (merger_output): static.
7840
7841 2002-06-28 Akim Demaille <akim@epita.fr>
7842
7843 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
7844 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
7845 pacify GCC.
7846 * src/output.c (save_row): Initialize all the variables to pacify GCC.
7847
7848 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7849
7850 Accumulated changelog for new GLR parsing features.
7851
7852 * src/conflicts.c (count_total_conflicts): Change name to
7853 conflicts_total_count.
7854 * src/conflicts.h: Ditto.
7855 * src/output.c (token_actions): Use the new name.
7856 (output_conflicts): Change conflp => conflict_list_heads, and
7857 confl => conflict_list for better readability.
7858 * data/glr.c: Use the new names.
7859 * NEWS: Add self to GLR announcement.
7860
7861 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
7862
7863 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
7864 Akim Demaille.
7865
7866 * data/bison.glr: Change name to glr.c
7867 * data/glr.c: Renamed from bison.glr.
7868 * data/Makefile.am: Add glr.c
7869
7870 * src/getargs.c:
7871
7872 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
7873 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
7874
7875 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7876
7877 * data/bison.glr: Be sure to restore the
7878 current #line when returning to the skeleton contents after having
7879 exposed the input file's #line.
7880
7881 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7882
7883 * data/bison.glr: Bring up to date with changes to bison.simple.
7884
7885 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7886
7887 * data/bison.glr: Correct definitions that use b4_prefix.
7888 Various reformatting.
7889 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
7890 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
7891 yytokenp argument; now part of stack.
7892 (yychar): Define to behave as documented.
7893 (yyclearin): Ditto.
7894
7895 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7896
7897 * src/reader.h: Add declaration for free_merger_functions.
7898
7899 * src/reader.c (merge_functions): New variable.
7900 (get_merge_function): New function.
7901 (free_merger_functions): New function.
7902 (readgram): Check for %prec that is not followed by a symbol.
7903 Handle %dprec and %merge declarations.
7904 (packgram): Initialize dprec and merger fields in rules array.
7905
7906 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
7907 conflict_list_cnt, conflict_list_free): New variables.
7908 (table_grow): Also grow conflict_table.
7909 (prepare_rules): Output dprec and merger tables.
7910 (conflict_row): New function.
7911 (action_row): Output conflict lists for GLR parser. Don't use
7912 default reduction in conflicted states for GLR parser so that there
7913 are spaces for the conflict lists.
7914 (save_row): Also save conflict information.
7915 (token_actions): Allocate conflict list.
7916 (merger_output): New function.
7917 (pack_vector): Pack conflict table, too.
7918 (output_conflicts): New function to output yyconflp and yyconfl.
7919 (output_check): Allocate conflict_tos.
7920 (output_actions): Output conflict tables, also.
7921 (output_skeleton): Output b4_mergers definition.
7922 (prepare): Output b4_max_rhs_length definition.
7923 Use 'bison.glr' as default skeleton for GLR parsers.
7924
7925 * src/gram.c (glr_parser): New flag.
7926 (grammar_free): Call free_merger_functions.
7927
7928 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
7929 all pairs of conflicting reductions, rather than just all tokens
7930 causing conflicts. Needed to size conflict tables.
7931 (conflicts_output): Modify call to count_rr_conflicts for new
7932 interface.
7933 (conflicts_print): Ditto.
7934 (count_total_conflicts): New function.
7935
7936 * src/reader.h (merger_list): New type.
7937 (merge_functions): New variable.
7938
7939 * src/lex.h (tok_dprec, tok_merge): New token types.
7940
7941 * src/gram.h (rule_s): Add dprec and merger fields.
7942 (glr_parser): New flag.
7943
7944 * src/conflicts.h (count_total_conflicts): New function.
7945
7946 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
7947
7948 * doc/bison.texinfo (Generalized LR Parsing): New section.
7949 (GLR Parsers): New section.
7950 (Language and Grammar): Mention GLR parsing.
7951 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
7952 Correct typo ("tge" -> "the").
7953
7954 * data/bison.glr: New skeleton for GLR parsing.
7955
7956 * tests/cxx-gram.at: New tests for GLR parsing.
7957
7958 * tests/testsuite.at: Include cxx-gram.at.
7959
7960 * tests/Makefile.am: Add cxx-gram.at.
7961
7962 * src/parse-gram.y:
7963
7964 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
7965
7966 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
7967
7968 2002-06-27 Akim Demaille <akim@epita.fr>
7969
7970 * src/options.h, src/options.c: Remove.
7971 * src/getargs.c (short_options, long_options): New.
7972
7973 2002-06-27 Akim Demaille <akim@epita.fr>
7974
7975 * data/bison.simple, data/bison.c++: Rename as...
7976 * data/yacc.c, data/lalr1.cc: these.
7977 * doc/bison.texinfo (Environment Variables): Remove.
7978
7979 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
7980
7981 * src/getargs.c (report_argmatch): Initialize strtok().
7982
7983 2002-06-20 Akim Demaille <akim@epita.fr>
7984
7985 * data/bison.simple (b4_symbol_actions): New, replaces...
7986 (b4_symbol_destructor, b4_symbol_printer): these.
7987 (yysymprint): Be sure to call YYPRINT only for tokens, and using
7988 user token numbers.
7989
7990 2002-06-20 Akim Demaille <akim@epita.fr>
7991
7992 * data/bison.simple (yydestructor): Rename as...
7993 (yydestruct): this.
7994
7995 2002-06-20 Akim Demaille <akim@epita.fr>
7996
7997 * src/symtab.h, src/symtab.c (symbol_type_set)
7998 (symbol_destructor_set, symbol_precedence_set): The location is
7999 the last argument.
8000 Adjust all callers.
8001
8002 2002-06-20 Akim Demaille <akim@epita.fr>
8003
8004 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
8005 internals.
8006 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
8007 Takes a location.
8008 * src/symtab.h, src/symtab.c (symbol_class_set)
8009 (symbol_user_token_number_set): Likewise.
8010 Adjust all callers.
8011 Promote complain_at.
8012 * tests/input.at (Type Clashes): Adjust.
8013
8014 2002-06-20 Akim Demaille <akim@epita.fr>
8015
8016 * data/bison.simple (YYLEX): Fix the declaration when
8017 %pure-parser.
8018
8019 2002-06-20 Akim Demaille <akim@epita.fr>
8020
8021 * data/bison.simple (yysymprint): Don't print the token number,
8022 just its name.
8023 * tests/actions.at (Destructors): Rename as...
8024 (Printers and Destructors): this.
8025 Also exercise %printer.
8026
8027 2002-06-20 Akim Demaille <akim@epita.fr>
8028
8029 * data/bison.simple (YYDSYMPRINT): New.
8030 Use it to remove many of the #if YYDEBUG/if (yydebug).
8031
8032 2002-06-20 Akim Demaille <akim@epita.fr>
8033
8034 * src/symtab.h, src/symtab.c (symbol_t): printer and
8035 printer_location are new members.
8036 (symbol_printer_set): New.
8037 * src/parse-gram.y (PERCENT_PRINTER): New token.
8038 Handle its associated rule.
8039 * src/scan-gram.l: Adjust.
8040 (handle_destructor_at, handle_destructor_dollar): Rename as...
8041 (handle_symbol_code_at, handle_symbol_code_dollar): these.
8042 * src/output.c (symbol_printers_output): New.
8043 (output_skeleton): Call it.
8044 * data/bison.simple (yysymprint): New. Cannot be named yyprint
8045 since there are already many grammar files with a user `yyprint'.
8046 Replace the calls to YYPRINT to calls to yysymprint.
8047 * tests/calc.at: Adjust.
8048 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
8049 taking advantage of parser very internal details (stack size!).
8050
8051 2002-06-20 Akim Demaille <akim@epita.fr>
8052
8053 * src/scan-gram.l: Complete the scanner with the missing patterns
8054 to pacify Flex.
8055 Use `quote' and `symbol_tag_get' where appropriate.
8056
8057 2002-06-19 Akim Demaille <akim@epita.fr>
8058
8059 * tests/actions.at (Destructors): Augment to test locations.
8060 * data/bison.simple (yydestructor): Pass it the current location
8061 if locations are enabled.
8062 Prototype only when __STDC__ or C++.
8063 Change the argument names to move into the yy name space: there is
8064 user code here.
8065
8066 2002-06-19 Akim Demaille <akim@epita.fr>
8067
8068 * data/bison.simple (b4_pure_if): New.
8069 Use it instead of #ifdef YYPURE.
8070
8071 2002-06-19 Akim Demaille <akim@epita.fr>
8072
8073 * data/bison.simple (b4_location_if): New.
8074 Use it instead of #ifdef YYLSP_NEEDED.
8075
8076 2002-06-19 Akim Demaille <akim@epita.fr>
8077
8078 Prepare @$ in %destructor, but currently don't bind it in the
8079 skeleton, as %location use is not cleaned up yet.
8080
8081 * src/scan-gram.l (handle_dollar, handle_destructor_at)
8082 (handle_action_at): New.
8083 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
8084 a braced_code_t and a location as additional arguments.
8085 (handle_destructor_dollar): Instead of requiring `b4_eval', just
8086 unquote one when outputting `b4_dollar_dollar'.
8087 Adjust callers.
8088 * data/bison.simple (b4_eval): Remove.
8089 (b4_symbol_destructor): Adjust.
8090 * tests/input.at (Invalid @n): Adjust.
8091
8092 2002-06-19 Zack Weinberg <zack@codesourcery.com>
8093
8094 * doc/bison.texinfo: Document ability to have multiple
8095 prologue sections.
8096
8097 2002-06-18 Akim Demaille <akim@epita.fr>
8098
8099 * src/files.c (compute_base_names): When computing the output file
8100 names from the input file name, strip the directory part.
8101
8102 2002-06-18 Akim Demaille <akim@epita.fr>
8103
8104 * data/bison.simple.new: Comment changes.
8105 Reported by Andreas Schwab.
8106
8107 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
8108
8109 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
8110 there are no `label `yyoverflowlab' defined but not used' warnings
8111 when yyoverflow is defined.
8112
8113 2002-06-18 Akim Demaille <akim@epita.fr>
8114
8115 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
8116 new member.
8117 (symbol_destructor_set): Adjust.
8118 * src/output.c (symbol_destructors_output): Output the destructor
8119 locations.
8120 Output the symbol name.
8121 * data/bison.simple (b4_symbol_destructor): Adjust.
8122
8123 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
8124 and Akim Demaille <akim@epita.fr>
8125
8126 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
8127 what's left on the stack when the error recovery hits EOF.
8128 * tests/actions.at (Destructors): Complete to exercise this case.
8129
8130 2002-06-17 Akim Demaille <akim@epita.fr>
8131
8132 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
8133 arguments is really empty, not only equal to `[]'.
8134 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
8135 member.
8136 (symbol_destructor_set): New.
8137 * src/output.c (symbol_destructors_output): New.
8138 * src/reader.h (brace_code_t, current_braced_code): New.
8139 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
8140 (handle_dollar): Rename as...
8141 (handle_action_dollar): this.
8142 (handle_destructor_dollar): New.
8143 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
8144 (grammar_declaration): Use it.
8145 * data/bison.simple (yystos): Is always defined.
8146 (yydestructor): New.
8147 * tests/actions.at (Destructors): New.
8148 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
8149
8150 2002-06-17 Akim Demaille <akim@epita.fr>
8151
8152 * src/symlist.h, src/symlist.c (symbol_list_length): New.
8153 * src/scan-gram.l (handle_dollar, handle_at): Compute the
8154 rule_length only when needed.
8155 * src/output.c (actions_output, token_definitions_output): Output
8156 the full M4 block.
8157 * src/symtab.c: Don't access directly to the symbol tag, use
8158 symbol_tag_get.
8159 * src/parse-gram.y: Use symbol_list_free.
8160
8161 2002-06-17 Akim Demaille <akim@epita.fr>
8162
8163 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
8164 (symbol_list_prepend, get_type_name): Move to...
8165 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
8166 (symbol_list_prepend, symbol_list_n_type_name_get): here.
8167 Adjust all callers.
8168 (symbol_list_free): New.
8169 * src/scan-gram.l (handle_dollar): Takes a location.
8170 * tests/input.at (Invalid $n): Adjust.
8171
8172 2002-06-17 Akim Demaille <akim@epita.fr>
8173
8174 * src/reader.h, src/reader.c (symbol_list_new): Export it.
8175 (symbol_list_prepend): New.
8176 * src/parse-gram.y (%union): `list' is a new member.
8177 (symbols.1): New, replaces...
8178 (terms_to_prec.1, nterms_to_type.1): these.
8179 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
8180 Take a location as additional argument.
8181 Adjust all callers.
8182
8183 2002-06-15 Akim Demaille <akim@epita.fr>
8184
8185 * src/parse-gram.y: Move %token in the declaration section so that
8186 we don't depend upon CVS Bison.
8187
8188 2002-06-15 Akim Demaille <akim@epita.fr>
8189
8190 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
8191 * src/print.c (print_core): Use it.
8192
8193 2002-06-15 Akim Demaille <akim@epita.fr>
8194
8195 * src/conflicts.c (log_resolution): Accept the rule involved in
8196 the sr conflicts instead of the lookahead number that points to
8197 that rule.
8198 (flush_reduce): Accept the current lookahead vector as argument,
8199 instead of the index in LA.
8200 (resolve_sr_conflict): Accept the current number of lookahead
8201 bitset to consider for the STATE, instead of the index in LA.
8202 (set_conflicts): Adjust.
8203 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
8204
8205 2002-06-15 Akim Demaille <akim@epita.fr>
8206
8207 * src/state.h (state_t): Replace the `lookaheadsp' member, a
8208 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
8209 Adjust all dependencies.
8210 * src/lalr.c (initialize_lookaheads): Split into...
8211 (states_lookaheads_count, states_lookaheads_initialize): these.
8212 (lalr): Adjust.
8213
8214 2002-06-15 Akim Demaille <akim@epita.fr>
8215
8216 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
8217 out of...
8218 (grammar_rules_print): here.
8219 * src/reduce.c (reduce_output): Use it.
8220 * tests/reduce.at (Useless Rules, Reduced Automaton)
8221 (Underivable Rules): Adjust.
8222
8223 2002-06-15 Akim Demaille <akim@epita.fr>
8224
8225 Copy BYacc's nice way to report the grammar.
8226
8227 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
8228 New.
8229 Don't print the rules' location, it is confusing and useless.
8230 (rule_print): Use grammar_rhs_print.
8231 * src/print.c (print_grammar): Use grammar_rules_print.
8232
8233 2002-06-15 Akim Demaille <akim@epita.fr>
8234
8235 Complete and rationalize `useless thing' warnings.
8236
8237 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
8238 (symbol_tag_print): New.
8239 Use them everywhere in place of accessing directly the tag member.
8240 * src/gram.h, src/gram.c (rule_print): New.
8241 Use it where a rule used to be printed `by hand'.
8242 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
8243 (reduce_grammar_tables): Report the useless rules.
8244 (reduce_print): Useless things are a warning, not an error.
8245 Report it as such.
8246 * tests/reduce.at (Useless Nonterminals, Useless Rules):
8247 (Reduced Automaton, Underivable Rules): Adjust.
8248 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
8249 * tests/conflicts.at (Unresolved SR Conflicts)
8250 (Solved SR Conflicts): Adjust.
8251
8252 2002-06-15 Akim Demaille <akim@epita.fr>
8253
8254 Let symbols have a location.
8255
8256 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
8257 (getsym): Adjust.
8258 Adjust all callers.
8259 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
8260 Use location_t, not int.
8261 * src/symtab.c (symbol_check_defined): Take advantage of the
8262 location.
8263 * tests/regression.at (Invalid inputs): Adjust.
8264
8265 2002-06-15 Akim Demaille <akim@epita.fr>
8266
8267 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
8268 (input): Don't try to initialize yylloc here, do it in the
8269 scanner.
8270 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
8271 * src/gram.h (rule_t): Change line and action_line into location
8272 and action_location, of location_t type.
8273 Adjust all dependencies.
8274 * src/location.h, src/location.c (empty_location): New.
8275 * src/reader.h, src/reader.c (grammar_start_symbol_set)
8276 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
8277 (grammar_current_rule_symbol_append)
8278 (grammar_current_rule_action_append): Expect a location as argument.
8279 * src/reader.c (grammar_midrule_action): Adjust to attach an
8280 action's location as dummy symbol location.
8281 * src/symtab.h, src/symtab.c (startsymbol_location): New.
8282 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
8283 the line numbers.
8284
8285 2002-06-14 Akim Demaille <akim@epita.fr>
8286
8287 Grammar declarations may be found in the grammar section.
8288
8289 * src/parse-gram.y (rules_or_grammar_declaration): New.
8290 (declarations): Each declaration may end with a semicolon, not
8291 just...
8292 (grammar_declaration): `"%union"'.
8293 (grammar): Branch to rules_or_grammar_declaration.
8294
8295 2002-06-14 Akim Demaille <akim@epita.fr>
8296
8297 * src/main.c (main): Invoke scanner_free.
8298
8299 2002-06-14 Akim Demaille <akim@epita.fr>
8300
8301 * src/output.c (m4_invoke): Extracted from...
8302 (output_skeleton): here.
8303 Free tempfile.
8304
8305 2002-06-14 Akim Demaille <akim@epita.fr>
8306
8307 * src/parse-gram.y (directives, directive, gram)
8308 (grammar_directives, precedence_directives, precedence_directive):
8309 Rename as...
8310 (declarations, declaration, grammar, grammar_declaration)
8311 (precedence_declaration, precedence_declarator): these.
8312 (symbol_declaration): New.
8313
8314 2002-06-14 Akim Demaille <akim@epita.fr>
8315
8316 * src/files.c (action_obstack): Remove, unused.
8317 (output_obstack): Remove it, and all its dependencies, as it is no
8318 longer needed.
8319 * src/reader.c (epilogue_set): Build the epilogue in the
8320 muscle_obstack.
8321 * src/output.h, src/output.c (muscle_obstack): Move to...
8322 * src/muscle_tab.h, src/muscle_tab.h: here.
8323 (muscle_init): Initialize muscle_obstack.
8324 (muscle_free): New.
8325 * src/main.c (main): Call it.
8326
8327 2002-06-14 Akim Demaille <akim@epita.fr>
8328
8329 * src/location.h: New, extracted from...
8330 * src/reader.h: here.
8331 * src/Makefile.am (noinst_HEADERS): Merge into
8332 (bison_SOURCES): this.
8333 Add location.h.
8334 * src/parse-gram.y: Use location_t instead of Bison's.
8335 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
8336 Use location_t instead of ints.
8337
8338 2002-06-14 Akim Demaille <akim@epita.fr>
8339
8340 * data/bison.simple, data/bison.c++: Be sure to restore the
8341 current #line when returning to the skeleton contents after having
8342 exposed the input file's #line.
8343
8344 2002-06-12 Akim Demaille <akim@epita.fr>
8345
8346 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
8347 eager.
8348 * tests/actions.at (Exotic Dollars): New.
8349
8350 2002-06-12 Akim Demaille <akim@epita.fr>
8351
8352 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
8353 ['"/] too eagerly.
8354 * tests/input.at (Torturing the Scanner): New.
8355
8356 2002-06-11 Akim Demaille <akim@epita.fr>
8357
8358 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
8359 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
8360 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
8361 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
8362 * src/reader.c (reader): Use it.
8363
8364 2002-06-11 Akim Demaille <akim@epita.fr>
8365
8366 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
8367 Adjust all callers.
8368 (scanner_last_string_free): New.
8369
8370 2002-06-11 Akim Demaille <akim@epita.fr>
8371
8372 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
8373 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
8374 (last_string, YY_OBS_FREE): New.
8375 Use them when returning an ID.
8376
8377 2002-06-11 Akim Demaille <akim@epita.fr>
8378
8379 Have Bison grammars parsed by a Bison grammar.
8380
8381 * src/reader.c, src/reader.h (prologue_augment): New.
8382 * src/reader.c (copy_definition): Remove.
8383
8384 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
8385 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
8386 (grammar_current_rule_prec_set, grammar_current_rule_check)
8387 (grammar_current_rule_symbol_append)
8388 (grammar_current_rule_action_append): Export.
8389 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
8390 (symbol_list_action_append): Remove.
8391 Hook the routines from reader.
8392 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
8393 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
8394
8395 * src/reader.c (read_declarations): Remove, unused.
8396
8397 * src/parse-gram.y: Handle the epilogue.
8398 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
8399 (grammar_start_symbol_set): this.
8400 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
8401 * src/reader.c (readgram): Remove, unused.
8402 (reader): Adjust to insert eoftoken and axiom where appropriate.
8403
8404 * src/reader.c (copy_dollar): Replace with...
8405 * src/scan-gram.h (handle_dollar): this.
8406 * src/parse-gram.y: Remove `%thong'.
8407
8408 * src/reader.c (copy_at): Replace with...
8409 * src/scan-gram.h (handle_at): this.
8410
8411 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
8412 New.
8413
8414 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
8415 time being.
8416
8417 * src/reader.h, src/reader.c (grammar_rule_end): New.
8418
8419 * src/parse.y (current_type, current_class): New.
8420 Implement `%nterm', `%token' support.
8421 Merge `%term' into `%token'.
8422 (string_as_id): New.
8423 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
8424 type name.
8425
8426 * src/parse-gram.y: Be sure to handle properly the beginning of
8427 rules.
8428
8429 * src/parse-gram.y: Handle %type.
8430 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
8431
8432 * src/parse-gram.y: More directives support.
8433 * src/options.c: No longer handle source directives.
8434
8435 * src/parse-gram.y: Fix %output.
8436
8437 * src/parse-gram.y: Handle %union.
8438 Use the prologue locations.
8439 * src/reader.c (parse_union_decl): Remove.
8440
8441 * src/reader.h, src/reader.c (epilogue_set): New.
8442 * src/parse-gram.y: Use it.
8443
8444 * data/bison.simple, data/bison.c++: b4_stype is now either not
8445 defined, then default to int, or to the contents of %union,
8446 without `union' itself.
8447 Adjust.
8448 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
8449
8450 * src/output.c (actions_output): Don't output braces, as they are
8451 already handled by the scanner.
8452
8453 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
8454 characters to themselves.
8455
8456 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
8457 that the epilogue has a proper #line.
8458
8459 * src/parse-gram.y: Handle precedence/associativity.
8460
8461 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
8462 a terminal.
8463 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
8464 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
8465 at all to define terminals that cannot be emitted.
8466
8467 * src/scan-gram.l: Escape M4 characters.
8468
8469 * src/scan-gram.l: Working properly with escapes in user
8470 strings/characters.
8471
8472 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
8473 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
8474 grammar.
8475 Use more modest sizes, as for the time being the parser does not
8476 release memory, and therefore the process swallows a huge amount
8477 of memory.
8478
8479 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
8480 stricter %token grammar.
8481
8482 * src/symtab.h (associativity): Add `undef_assoc'.
8483 (symbol_precedence_set): Do nothing when passed an undef_assoc.
8484 * src/symtab.c (symbol_check_alias_consistence): Adjust.
8485
8486 * tests/regression.at (Invalid %directive): Remove, as it is now
8487 meaningless.
8488 (Invalid inputs): Adjust to the new error messages.
8489 (Token definitions): The new grammar doesn't allow too many
8490 eccentricities.
8491
8492 * src/lex.h, src/lex.c: Remove.
8493 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
8494 (copy_character, copy_string2, copy_string, copy_identifier)
8495 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
8496 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
8497 (parse_action): Remove.
8498 * po/POTFILES.in: Adjust.
8499
8500 2002-06-11 Akim Demaille <akim@epita.fr>
8501
8502 * src/reader.c (parse_action): Don't store directly into the
8503 rule's action member: return the action as a string.
8504 Don't require `rule_length' as an argument: compute it.
8505 (grammar_current_rule_symbol_append)
8506 (grammar_current_rule_action_append): New, eved out from
8507 (readgram): here.
8508 Remove `action_flag', `rulelength', unused now.
8509
8510 2002-06-11 Akim Demaille <akim@epita.fr>
8511
8512 * src/reader.c (grammar_current_rule_prec_set).
8513 (grammar_current_rule_check): New, eved out from...
8514 (readgram): here.
8515 Remove `xaction', `first_rhs': useless.
8516 * tests/input.at (Type clashes): New.
8517 * tests/existing.at (GNU Cim Grammar): Adjust.
8518
8519 2002-06-11 Akim Demaille <akim@epita.fr>
8520
8521 * src/reader.c (grammar_midrule_action): New, Eved out from
8522 (readgram): here.
8523
8524 2002-06-11 Akim Demaille <akim@epita.fr>
8525
8526 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
8527 New.
8528 (readgram): Use them as replacement of inlined code, crule and
8529 crule1.
8530
8531 2002-06-11 Akim Demaille <akim@epita.fr>
8532
8533 * src/reader.c (grammar_end, grammar_symbol_append): New.
8534 (readgram): Use them.
8535 Make the use of `p' as local as possible.
8536
8537 2002-06-10 Akim Demaille <akim@epita.fr>
8538
8539 GCJ's parser requires the tokens to be defined before the prologue.
8540
8541 * data/bison.simple: Output the token definition before the user's
8542 prologue.
8543 * tests/regression.at (Braces parsing, Duplicate string)
8544 (Mixing %token styles): Check the output from bison.
8545 (Early token definitions): New.
8546
8547 2002-06-10 Akim Demaille <akim@epita.fr>
8548
8549 * src/symtab.c (symbol_user_token_number_set): Don't complain when
8550 assigning twice the same user number to a token, so that we can
8551 use it in...
8552 * src/lex.c (lex): here.
8553 Also use `symbol_class_set' instead of hand written code.
8554 * src/reader.c (parse_assoc_decl): Likewise.
8555
8556 2002-06-10 Akim Demaille <akim@epita.fr>
8557
8558 * src/symtab.c, src/symtab.c (symbol_class_set)
8559 (symbol_user_token_number_set): New.
8560 * src/reader.c (parse_token_decl): Use them.
8561 Use a switch instead of ifs.
8562 Use a single argument.
8563
8564 2002-06-10 Akim Demaille <akim@epita.fr>
8565
8566 Remove `%thong' support as it is undocumented, unused, duplicates
8567 `%token's job, and creates useless e-mail traffic with people who
8568 want to know what it is, why it is undocumented, unused, and
8569 duplicates `%token's job.
8570
8571 * src/reader.c (parse_thong_decl): Remove.
8572 * src/options.c (option_table): Remove "thong".
8573 * src/lex.h (tok_thong): Remove.
8574
8575 2002-06-10 Akim Demaille <akim@epita.fr>
8576
8577 * src/symtab.c, src/symtab.c (symbol_type_set)
8578 (symbol_precedence_set): New.
8579 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
8580 (value_components_used): Remove, unused.
8581
8582 2002-06-09 Akim Demaille <akim@epita.fr>
8583
8584 Move symbols handling code out of the reader.
8585
8586 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
8587 (axiom): Move to...
8588 * src/symtab.h, src/symtab.c: here.
8589
8590 * src/gram.c (start_symbol): Remove: use startsymbol->number.
8591 * src/reader.c (startval): Rename as...
8592 * src/symtab.h, src/symtab.c (startsymbol): this.
8593 * src/reader.c: Adjust.
8594
8595 * src/reader.c (symbol_check_defined, symbol_make_alias)
8596 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8597 (token_translations_init)
8598 Move to...
8599 * src/symtab.c: here.
8600 * src/reader.c (packsymbols): Move to...
8601 * src/symtab.h, src/symtab.c (symbols_pack): here.
8602 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
8603 argument.
8604
8605 2002-06-03 Akim Demaille <akim@epita.fr>
8606
8607 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
8608 then statements.
8609
8610 2002-06-03 Akim Demaille <akim@epita.fr>
8611
8612 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
8613 structs with non literals.
8614 * src/scan-skel.l: never-interactive.
8615 * src/conflicts.c (enum conflict_resolution_e): No trailing
8616 comma.
8617 * src/getargs.c (usage): Split long literal strings.
8618 Reported by Hans Aberg.
8619
8620 2002-05-28 Akim Demaille <akim@epita.fr>
8621
8622 * data/bison.c++: Use C++ ostreams.
8623 (cdebug_): New member.
8624
8625 2002-05-28 Akim Demaille <akim@epita.fr>
8626
8627 * src/output.c (output_skeleton): Be sure to allocate enough room
8628 for `/' _and_ for `\0' in full_skeleton.
8629
8630 2002-05-28 Akim Demaille <akim@epita.fr>
8631
8632 * data/bison.c++: Catch up with bison.simple:
8633 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8634 and Paul Eggert <eggert@twinsun.com>: `error' handing.
8635 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
8636 and popping traces.
8637
8638 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8639
8640 * src/output.c (output_skeleton): Put an explicit path in front of
8641 the skeleton file name, rather than relying on the -I directory,
8642 to partially alleviate effects of having a skeleton file lying around
8643 in the current directory.
8644
8645 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8646
8647 * src/conflicts.c (log_resolution): Correct typo:
8648 obstack_printf should be obstack_fgrow1.
8649
8650 2002-05-26 Akim Demaille <akim@epita.fr>
8651
8652 * src/state.h (state_t): `solved_conflicts' is a new member.
8653 * src/LR0.c (new_state): Set it to 0.
8654 * src/conflicts.h, src/conflicts.c (print_conflicts)
8655 (free_conflicts, solve_conflicts): Rename as...
8656 (conflicts_print, conflicts_free, conflicts_solve): these.
8657 Adjust callers.
8658 * src/conflicts.c (enum conflict_resolution_e)
8659 (solved_conflicts_obstack): New, used by...
8660 (log_resolution): this.
8661 Adjust to attach the conflict resolution to each state.
8662 Complete the description with the precedence/associativity
8663 information.
8664 (resolve_sr_conflict): Adjust.
8665 * src/print.c (print_state): Output its solved_conflicts.
8666 * tests/conflicts.at (Unresolved SR Conflicts)
8667 (Solved SR Conflicts): Exercise --report=all.
8668
8669 2002-05-26 Akim Demaille <akim@epita.fr>
8670
8671 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8672 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8673 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
8674 (token_number_t, item_number_as_token_number)
8675 (token_number_as_item_number, muscle_insert_token_number_table):
8676 Rename as...
8677 (symbol_number_t, item_number_as_symbol_number)
8678 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
8679 these, since it is more appropriate.
8680
8681 2002-05-26 Akim Demaille <akim@epita.fr>
8682
8683 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
8684 `Error:' lines.
8685 * data/bison.simple (yystos) [YYDEBUG]: New.
8686 (yyparse) [YYDEBUG]: Display the symbols which are popped during
8687 error recovery.
8688 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
8689
8690 2002-05-25 Akim Demaille <akim@epita.fr>
8691
8692 * doc/bison.texinfo (Debugging): Split into...
8693 (Tracing): this new section, its former contents, and...
8694 (Understanding): this new section.
8695 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
8696 by...
8697 (report_flag): this.
8698 Adjust all dependencies.
8699 (report_args, report_types, report_argmatch): New.
8700 (usage, getargs): Report/support -r, --report.
8701 * src/options.h
8702 (struct option_table_struct): Rename as..,
8703 (struct option_table_s): this.
8704 Rename the `set_flag' member to `flag' to match with getopt_long's
8705 struct.
8706 * src/options.c (option_table): Split verbose into an entry for
8707 %verbose, and another for --verbose.
8708 Support --report/-r, so remove -r from the obsolete --raw.
8709 * src/print.c: Attach full item sets and lookaheads reports to
8710 report_flag instead of trace_flag.
8711 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
8712
8713 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8714 and Paul Eggert <eggert@twinsun.com>
8715
8716 * data/bison.simple (yyparse): Correct error handling to conform to
8717 POSIX and yacc. Specifically, after syntax error is discovered,
8718 do not reduce further before shifting the error token.
8719 Clean up the code a bit by removing the labels yyerrdefault,
8720 yyerrhandle, yyerrpop.
8721 * NEWS: Document the above.
8722
8723 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8724
8725 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
8726 type; it isn't always big enough, since it doesn't necessarily
8727 include non-terminals.
8728 (yytranslate): Expand definition of yy_token_number_type, so that
8729 the latter can be removed.
8730 (yy_token_number_type): Remove, only one use.
8731 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
8732 don't use TokenNumberType as element type.
8733
8734 * tests/regression.at: Modify expected output to agree with change
8735 to yyr1 and yytranslate.
8736
8737 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
8738
8739 * src/reader.c (parse_action): Use copy_character instead of
8740 obstack_1grow.
8741
8742 2002-05-13 Akim Demaille <akim@epita.fr>
8743
8744 * tests/regression.at (Token definitions): Prototype yylex and
8745 yyerror.
8746
8747 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8748
8749 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
8750 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
8751 32-bit arithmetic.
8752 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
8753
8754 2002-05-07 Akim Demaille <akim@epita.fr>
8755
8756 * tests/synclines.at: Be sure to prototype yylex and yyerror to
8757 avoid GCC warnings.
8758
8759 2002-05-07 Akim Demaille <akim@epita.fr>
8760
8761 Kill GCC warnings.
8762
8763 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
8764 over the RHS of each rule.
8765 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
8766 * src/state.h (state_t): Member `nitems' is unsigned short.
8767 * src/LR0.c (get_state): Adjust.
8768 * src/reader.c (packgram): Likewise.
8769 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
8770 `Type'.
8771 (muscle_insert_int_table): Remove, unused.
8772 (prepare_rules): Remove `max'.
8773
8774 2002-05-06 Akim Demaille <akim@epita.fr>
8775
8776 * src/closure.c (print_firsts): Display of the symbol tags.
8777 (bitmatrix_print): Move to...
8778 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
8779 here.
8780 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
8781
8782 2002-05-06 Akim Demaille <akim@epita.fr>
8783
8784 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
8785 hash_do_for_each.
8786
8787 2002-05-06 Akim Demaille <akim@epita.fr>
8788
8789 * src/LR0.c (new_state, get_state): Instead of using the global
8790 `kernel_size' and `kernel_base', have two new arguments:
8791 `core_size' and `core'.
8792 Adjust callers.
8793
8794 2002-05-06 Akim Demaille <akim@epita.fr>
8795
8796 * src/reader.c (packgram): No longer end `ritem' with a 0
8797 sentinel: it is not used.
8798
8799 2002-05-05 Akim Demaille <akim@epita.fr>
8800
8801 New experimental feature: display the lookaheads in the report and
8802 graph.
8803
8804 * src/print (print_core): When --trace-flag, display the rules
8805 lookaheads.
8806 * src/print_graph.c (print_core): Likewise.
8807 Swap the arguments.
8808 Adjust caller.
8809
8810 2002-05-05 Akim Demaille <akim@epita.fr>
8811
8812 * tests/torture.at (Many lookaheads): New test.
8813
8814 2002-05-05 Akim Demaille <akim@epita.fr>
8815
8816 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
8817 (GENERATE_MUSCLE_INSERT_TABLE): this.
8818 (output_int_table, output_unsigned_int_table, output_short_table)
8819 (output_token_number_table, output_item_number_table): Replace with...
8820 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8821 (muscle_insert_short_table, muscle_insert_token_number_table)
8822 (muscle_insert_item_number_table): these.
8823 Adjust all callers.
8824 (prepare_tokens): Don't free `translations', since...
8825 * src/reader.h, src/reader.c (grammar_free): do it.
8826 Move to...
8827 * src/gram.h, src/gram.c (grammar_free): here.
8828 * data/bison.simple, data/bison.c++: b4_token_number_max is now
8829 b4_translate_max.
8830
8831 2002-05-05 Akim Demaille <akim@epita.fr>
8832
8833 * src/output.c (output_unsigned_int_table): New.
8834 (prepare_rules): `i' is unsigned.
8835 `prhs', `rline', `r2' are unsigned int.
8836 Rename muscle `rhs_number_max' as `rhs_max'.
8837 Output muscles `prhs_max', `rline_max', and `r2_max'.
8838 Free rline and r1.
8839 * data/bison.simple, data/bison.c++: Adjust to use these muscles
8840 to compute types instead of constant types.
8841 * tests/regression.at (Web2c Actions): Adjust.
8842
8843 2002-05-04 Akim Demaille <akim@epita.fr>
8844
8845 * src/symtab.h (SALIAS, SUNDEF): Rename as...
8846 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
8847 Adjust dependencies.
8848 * src/output.c (token_definitions_output): Be sure not to output a
8849 `#define 'a'' when fed with `%token 'a' "a"'.
8850 * tests/regression.at (Token definitions): New.
8851
8852 2002-05-03 Paul Eggert <eggert@twinsun.com>
8853
8854 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
8855 for K&R C.
8856
8857 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
8858
8859 * Makefile.am (SUBDIRS): Remove intl.
8860 (EXTRA_DIST): Add config/config.rpath.
8861
8862 2002-05-03 Akim Demaille <akim@epita.fr>
8863
8864 * data/bison.simple (m4_if): Don't output empty enums.
8865 And actually, output valid enum definitions :(.
8866
8867 2002-05-03 Akim Demaille <akim@epita.fr>
8868
8869 * configure.bat: Remove, completely obsolete.
8870 * Makefile.am (EXTRA_DIST): Adjust.
8871 Don't distribute config.rpath...
8872 * config/Makefile.am (EXTRA_DIST): Do it.
8873
8874 2002-05-03 Akim Demaille <akim@epita.fr>
8875
8876 * configure.in (GETTEXT_VERSION): New.
8877 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
8878
8879 2002-05-03 Akim Demaille <akim@epita.fr>
8880
8881 * data/bison.simple (b4_token_enum): New.
8882 (b4_token_defines): Use it to output tokens both as #define and
8883 enums.
8884 Suggested by Paul Eggert.
8885 * src/output.c (token_definitions_output): Don't output spurious
8886 white spaces.
8887
8888 2002-05-03 Akim Demaille <akim@epita.fr>
8889
8890 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8891
8892 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
8893
8894 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
8895 Update the stack class, give a try to deque as the default container.
8896
8897 2002-05-02 Akim Demaille <akim@epita.fr>
8898
8899 * data/bison.simple (yyparse): Do not implement @$ = @1.
8900 (YYLLOC_DEFAULT): Adjust to do it.
8901 * doc/bison.texinfo (Location Default Action): Fix.
8902
8903 2002-05-02 Akim Demaille <akim@epita.fr>
8904
8905 * src/reader.c (parse_braces): Merge into...
8906 (parse_action): this.
8907
8908 2002-05-02 Akim Demaille <akim@epita.fr>
8909
8910 * configure.in (ALL_LINGUAS): Remove.
8911 * po/LINGUAS, hr.po: New.
8912
8913 2002-05-02 Akim Demaille <akim@epita.fr>
8914
8915 Remove the so called hairy (semantic) parsers.
8916
8917 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
8918 * src/gram.h, src/gram.c (semantic_parser): Remove.
8919 (rule_t): Remove the guard and guard_line members.
8920 * src/lex.h (token_t): remove tok_guard.
8921 * src/options.c (option_table): Remove %guard and %semantic_parser
8922 support.
8923 * src/output.c, src/output.h (guards_output): Remove.
8924 (prepare): Adjust.
8925 (token_definitions_output): Don't output the `T'
8926 tokens (???).
8927 (output_skeleton): Don't output the guards.
8928 * src/files.c, src/files.c (attrsfile): Remove.
8929 * src/reader.c (symbol_list): Remove the guard and guard_line
8930 members.
8931 Adjust dependencies.
8932 (parse_guard): Remove.
8933 * data/bison.hairy: Remove.
8934 * doc/bison.texinfo (Environment Variables): Remove occurrences of
8935 BISON_HAIRY.
8936
8937 2002-05-02 Akim Demaille <akim@epita.fr>
8938
8939 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
8940 (parse_guard): Rename the formal argument `stack_offset' as
8941 `rule_length', which is more readable.
8942 Adjust callers.
8943 (copy_at, copy_dollar): Instead of outputting the hard coded
8944 values of $$, $n and so forth, output invocation to b4_lhs_value,
8945 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
8946 Note: this patch partially drops `semantic-parser' support: it
8947 always does `rule_length - n', where semantic parsers ought to
8948 always use `-n'.
8949 * data/bison.simple, data/bison.c++ (b4_lhs_value)
8950 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
8951
8952 2002-05-02 Akim Demaille <akim@epita.fr>
8953
8954 * configure.in (AC_INIT): Bump to 1.49b.
8955 (AM_INIT_AUTOMAKE): Short invocation.
8956
8957 2002-05-02 Akim Demaille <akim@epita.fr>
8958
8959 Version 1.49a.
8960
8961 2002-05-01 Akim Demaille <akim@epita.fr>
8962
8963 * src/skeleton.h: Remove.
8964
8965 2002-05-01 Akim Demaille <akim@epita.fr>
8966
8967 * src/skeleton.h: Fix the #endif.
8968 Reported by Magnus Fromreide.
8969
8970 2002-04-26 Paul Eggert <eggert@twinsun.com>
8971
8972 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
8973 Define if we define YYSTYPE and YYLTYPE, respectively.
8974 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8975
8976 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
8977
8978 * src/scan-skel.l: Postprocess quadrigraphs.
8979
8980 * src/reader.c (copy_character): New function, used to output
8981 single characters while replacing `[' and `]' with quadrigraphs, to
8982 avoid troubles with M4 quotes.
8983 (copy_comment): Output characters with copy_character.
8984 (read_additionnal_code): Likewise.
8985 (copy_string2): Likewise.
8986 (copy_definition): Likewise.
8987
8988 * tests/calc.at: Exercise M4 quoting.
8989
8990 2002-04-25 Akim Demaille <akim@epita.fr>
8991
8992 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
8993 between `!' and the command.
8994 Reported by Paul Eggert.
8995
8996 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
8997
8998 * tests/calc.at: Exercise prologue splitting.
8999
9000 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
9001 `b4_post_prologue' instead of `b4_prologue'.
9002
9003 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
9004 muscles.
9005 (output): Free pre_prologue_obstack and post_prologue_obstack.
9006 * src/files.h, src/files.c (attrs_obstack): Remove.
9007 (pre_prologue_obstack, post_prologue_obstack): New.
9008 * src/reader.c (copy_definition): Add a parameter to specify the
9009 obstack to fill, instead of using attrs_obstack unconditionally.
9010 (read_declarations): Pass pre_prologue_obstack to copy_definition if
9011 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
9012
9013 2002-04-23 Paul Eggert <eggert@twinsun.com>
9014
9015 * data/bison.simple: Remove unnecessary commentary and white
9016 space differences from 1_29-branch.
9017 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
9018
9019 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
9020 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
9021 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
9022 constructors or destructors.
9023
9024 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
9025
9026 2002-04-23 Akim Demaille <akim@epita.fr>
9027
9028 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
9029 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
9030 location with columns.
9031 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
9032 All reported by Paul Eggert.
9033
9034 2002-04-22 Akim Demaille <akim@epita.fr>
9035
9036 * src/reduce.c (dump_grammar): Move to...
9037 * src/gram.h, src/gram.c (grammar_dump): here.
9038 Be sure to separate long item numbers.
9039 Don't read the members of a rule's prec if its nil.
9040
9041 2002-04-22 Akim Demaille <akim@epita.fr>
9042
9043 * src/output.c (table_size, table_grow): New.
9044 (MAXTABLE): Remove, replace uses with table_size.
9045 (pack_vector): Instead of dying when the table is too big, grow it.
9046
9047 2002-04-22 Akim Demaille <akim@epita.fr>
9048
9049 * data/bison.simple (yyr1): Its type is that of a token number.
9050 * data/bison.c++ (r1_): Likewise.
9051 * tests/regression.at (Web2c Actions): Adjust.
9052
9053 2002-04-22 Akim Demaille <akim@epita.fr>
9054
9055 * src/reader.c (token_translations_init): 256 is now the default
9056 value for the error token, i.e., it will be assigned another
9057 number if the user assigned 256 to one of her tokens.
9058 (reader): Don't force 256 to error.
9059 * doc/bison.texinfo (Symbols): Adjust.
9060 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
9061 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
9062 etc. instead of 10, 20, 30 (which was used to `jump' over error
9063 (256) and undefined (2)).
9064
9065 2002-04-22 Akim Demaille <akim@epita.fr>
9066
9067 Propagate more token_number_t.
9068
9069 * src/gram.h (token_number_as_item_number)
9070 (item_number_as_token_number): New.
9071 * src/output.c (GENERATE_OUTPUT_TABLE): New.
9072 Use it to create output_item_number_table and
9073 output_token_number_table.
9074 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
9075 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
9076 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
9077 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
9078
9079 2002-04-22 Akim Demaille <akim@epita.fr>
9080
9081 * src/output.h, src/output.c (get_lines_number): Remove.
9082
9083 2002-04-19 Akim Demaille <akim@epita.fr>
9084
9085 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
9086 as Lex/Flex'.
9087 (Debugging): More details about enabling the debugging features.
9088 (Table of Symbols): Describe $$, $n, @$, and @n.
9089 Suggested by Tim Josling.
9090
9091 2002-04-19 Akim Demaille <akim@epita.fr>
9092
9093 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
9094
9095 2002-04-10 Akim Demaille <akim@epita.fr>
9096
9097 * src/system.h: Rely on HAVE_LIMITS_H.
9098 Suggested by Paul Eggert.
9099
9100 2002-04-09 Akim Demaille <akim@epita.fr>
9101
9102 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
9103 full stderr, and strip it according to the bison options, instead
9104 of composing the error message from different bits.
9105 This makes it easier to check for several error messages.
9106 Adjust all the invocations.
9107 Add an invocation exercising the error token.
9108 Add an invocation demonstrating a stupid error message.
9109 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
9110 Adjust the tests.
9111 Error message are for stderr, not stdout.
9112
9113 2002-04-09 Akim Demaille <akim@epita.fr>
9114
9115 * src/gram.h, src/gram.c (error_token_number): Remove, use
9116 errtoken->number.
9117 * src/reader.c (reader): Don't specify the user token number (2)
9118 for $undefined, as it uselessly prevents using it.
9119 * src/gram.h (token_number_t): Move to...
9120 * src/symtab.h: here.
9121 (state_t.number): Is a token_number_t.
9122 * src/print.c, src/reader.c: Use undeftoken->number instead of
9123 hard coded 2.
9124 (Even though this 2 is not the same as above: the number of the
9125 undeftoken remains being 2, it is its user token number which
9126 might not be 2).
9127 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
9128 `user_token_number_max'.
9129 Output `undef_token_number'.
9130 * data/bison.simple, data/bison.c++: Use them.
9131 Be sure to map invalid yylex return values to
9132 `undef_token_number'. This saves us from gratuitous SEGV.
9133
9134 * tests/conflicts.at (Solved SR Conflicts)
9135 (Unresolved SR Conflicts): Adjust.
9136 * tests/regression.at (Web2c Actions): Adjust.
9137
9138 2002-04-08 Akim Demaille <akim@epita.fr>
9139
9140 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
9141 Adding #line.
9142 Remove the duplicate `typedefs'.
9143 (RhsNumberType): Fix the declaration and various other typos.
9144 Use __ofile__.
9145 * data/bison.simple: Use __ofile__.
9146 * src/scan-skel.l: Handle __ofile__.
9147
9148 2002-04-08 Akim Demaille <akim@epita.fr>
9149
9150 * src/gram.h (item_number_t): New, the type of item numbers in
9151 RITEM. Note that it must be able to code symbol numbers as
9152 positive number, and the negation of rule numbers as negative
9153 numbers.
9154 Adjust all dependencies (pretty many).
9155 * src/reduce.c (rule): Remove this `short *' pointer: use
9156 item_number_t.
9157 * src/system.h (MINSHORT, MAXSHORT): Remove.
9158 Include `limits.h'.
9159 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
9160 (shortcpy): Remove.
9161 (MAXTABLE): Move to...
9162 * src/output.c (MAXTABLE): here.
9163 (prepare_rules): Use output_int_table to output rhs.
9164 * data/bison.simple, data/bison.c++: Adjust.
9165 * tests/torture.at (Big triangle): Move the limit from 254 to
9166 500.
9167 * tests/regression.at (Web2c Actions): Ajust.
9168
9169 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
9170 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
9171 passes, but produces negative #line number, once fixed, GCC is
9172 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
9173 C), it passes.
9174 * src/state.h (state_h): Code input lines on ints, not shorts.
9175
9176 2002-04-08 Akim Demaille <akim@epita.fr>
9177
9178 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
9179 and then the grammar.
9180
9181 2002-04-08 Akim Demaille <akim@epita.fr>
9182
9183 * src/system.h: No longer using strndup.
9184
9185 2002-04-07 Akim Demaille <akim@epita.fr>
9186
9187 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
9188 * src/output.c (output_table_data): Return the longest number.
9189 (prepare_tokens): Output `token_number_max').
9190 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
9191 New.
9192 Use them to define yy_token_number_type/TokenNumberType.
9193 Use this type for yytranslate.
9194 * tests/torture.at (Big triangle): Push the limit from 124 to
9195 253.
9196 * tests/regression.at (Web2c Actions): Adjust.
9197
9198 2002-04-07 Akim Demaille <akim@epita.fr>
9199
9200 * tests/torture.at (Big triangle): New.
9201 (GNU AWK Grammar, GNU Cim Grammar): Move to...
9202 * tests/existing.at: here.
9203
9204 2002-04-07 Akim Demaille <akim@epita.fr>
9205
9206 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
9207 nritems.
9208 Adjust dependencies.
9209
9210 2002-04-07 Akim Demaille <akim@epita.fr>
9211
9212 * src/reader.c: Normalize increments to prefix form.
9213
9214 2002-04-07 Akim Demaille <akim@epita.fr>
9215
9216 * src/reader.c, symtab.c: Remove debugging code.
9217
9218 2002-04-07 Akim Demaille <akim@epita.fr>
9219
9220 Rename all the `bucket's as `symbol_t'.
9221
9222 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
9223 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
9224 * src/symtab.c, src/symtab.h (bucket): Rename as...
9225 (symbol_t): this.
9226 (symbol_list_new, bucket_check_defined, bucket_make_alias)
9227 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
9228 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9229 (buckets_new, buckets_free, buckets_do): Rename as...
9230 (symbol_list_new, symbol_check_defined, symbol_make_alias)
9231 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9232 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
9233 (symbols_new, symbols_free, symbols_do): these.
9234
9235 2002-04-07 Akim Demaille <akim@epita.fr>
9236
9237 Use lib/hash for the symbol table.
9238
9239 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
9240 EOF.
9241 * src/lex.c (lex): Set the `number' member of new terminals.
9242 * src/reader.c (bucket_check_defined, bucket_make_alias)
9243 (bucket_check_alias_consistence, bucket_translation): New.
9244 (reader, grammar_free, readgram, token_translations_init)
9245 (packsymbols): Adjust.
9246 (reader): Number the predefined tokens.
9247 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
9248 for predefined tokens.
9249 * src/symtab.h (bucket): Remove all the hash table related
9250 members.
9251 * src/symtab.c (symtab): Replace by...
9252 (bucket_table): this.
9253 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9254 (buckets_new, buckets_do): New.
9255
9256 2002-04-07 Akim Demaille <akim@epita.fr>
9257
9258 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
9259 (start_symbol, max_user_token_number, semantic_parser)
9260 (error_token_number): Initialize.
9261 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
9262 Initialize.
9263 (reader): Don't.
9264 (errtoken, eoftoken, undeftoken, axiom): Extern.
9265
9266 2002-04-07 Akim Demaille <akim@epita.fr>
9267
9268 * src/gram.h (rule_s): prec and precsym are now pointers
9269 to the bucket giving the priority/associativity.
9270 Member `associativity' removed: useless.
9271 * src/reduce.c, src/conflicts.c: Adjust.
9272
9273 2002-04-07 Akim Demaille <akim@epita.fr>
9274
9275 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
9276 Properly escape the symbols' TAG when outputting them.
9277
9278 2002-04-07 Akim Demaille <akim@epita.fr>
9279
9280 * src/lalr.h (LA): Is a bitsetv, not bitset*.
9281
9282 2002-04-07 Akim Demaille <akim@epita.fr>
9283
9284 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
9285 (LArule): this, which is an array to rule_t*.
9286 * src/print.c, src/conflicts.c: Adjust.
9287
9288 2002-04-07 Akim Demaille <akim@epita.fr>
9289
9290 * src/gram.h (rule_t): Rename `number' as `user_number'.
9291 `number' is a new member.
9292 Adjust dependencies.
9293 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
9294
9295 2002-04-07 Akim Demaille <akim@epita.fr>
9296
9297 As a result of the previous patch, it is no longer needed
9298 to reorder ritem itself.
9299
9300 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
9301
9302 2002-04-07 Akim Demaille <akim@epita.fr>
9303
9304 Be sure never to walk through RITEMS, but use only data related to
9305 the rules themselves. RITEMS should be banished.
9306
9307 * src/output.c (output_token_translations): Rename as...
9308 (prepare_tokens): this.
9309 In addition to `translate', prepare the muscles `tname' and
9310 `toknum', which were handled by...
9311 (output_rule_data): this.
9312 Remove, and move the remainder of its outputs into...
9313 (prepare_rules): this new routines, which also merges content from
9314 (output_gram): this.
9315 (prepare_rules): Be sure never to walk through RITEMS.
9316 (output_stos): Rename as...
9317 (prepare_stos): this.
9318 (output): Always invoke prepare_states, after all, just don't use it
9319 in the output if you don't need it.
9320
9321 2002-04-07 Akim Demaille <akim@epita.fr>
9322
9323 * src/LR0.c (new_state): Display `nstates' as the name of the
9324 newly created state.
9325 Adjust to initialize first_state and last_state if needed.
9326 Be sure to distinguish the initial from the final state.
9327 (new_states): Create the itemset of the initial state, and use
9328 new_state.
9329 * src/closure.c (closure): Now that the initial state has its
9330 items properly set, there is no need for a special case when
9331 creating `ruleset'.
9332
9333 As a result, now the rule 0, reducing to $axiom, is visible in the
9334 outputs. Adjust the test suite.
9335
9336 * tests/conflicts.at (Solved SR Conflicts)
9337 (Unresolved SR Conflicts): Adjust.
9338 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
9339 * tests/conflicts.at (S/R in initial): New.
9340
9341 2002-04-07 Akim Demaille <akim@epita.fr>
9342
9343 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
9344 the RHS of the rules.
9345 * src/output.c (output_gram): Likewise.
9346
9347 2002-04-07 Akim Demaille <akim@epita.fr>
9348
9349 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
9350 bucket.
9351 Adjust all dependencies.
9352 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
9353 `number' of the buckets too.
9354 * src/gram.h: Include `symtab.h'.
9355 (associativity): Move to...
9356 * src/symtab.h: here.
9357 No longer include `gram.h'.
9358
9359 2002-04-07 Akim Demaille <akim@epita.fr>
9360
9361 * src/gram.h, src/gram.c (rules_rhs_length): New.
9362 (ritem_longest_rhs): Use it.
9363 * src/gram.h (rule_t): `number' is a new member.
9364 * src/reader.c (packgram): Set it.
9365 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
9366 the end of `rules', and count them out of `nrules'.
9367 (reduce_output, dump_grammar): Adjust.
9368 * src/print.c (print_grammar): It is no longer needed to check for
9369 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
9370 * tests/reduce.at (Reduced Automaton): New test.
9371
9372 2002-04-07 Akim Demaille <akim@epita.fr>
9373
9374 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
9375 lacking `+ 1' to nrules, Bison reported as useless a token if it
9376 was used solely to set the precedence of the last rule...
9377
9378 2002-04-07 Akim Demaille <akim@epita.fr>
9379
9380 * data/bison.c++, data/bison.simple: Don't output the current file
9381 name in #line, to avoid useless diffs between two identical
9382 outputs under different names.
9383
9384 2002-04-07 Akim Demaille <akim@epita.fr>
9385
9386 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
9387 Normalize loops to using `< nrules + 1', not `<= nrules'.
9388
9389 2002-04-07 Akim Demaille <akim@epita.fr>
9390
9391 * TODO: Update.
9392
9393 2002-04-07 Akim Demaille <akim@epita.fr>
9394
9395 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
9396 bucket.value as bucket.number.
9397
9398 2002-04-07 Akim Demaille <akim@epita.fr>
9399
9400 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
9401 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
9402 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
9403 RHS, instead of being an index in RITEMS.
9404
9405 2002-04-04 Paul Eggert <eggert@twinsun.com>
9406
9407 * doc/bison.texinfo: Update copyright date.
9408 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
9409 (Symbols): Warn about running Bison in one character set,
9410 but compiling and/or running in an incompatible one.
9411 Warn about character code 256, too.
9412
9413 2002-04-03 Paul Eggert <eggert@twinsun.com>
9414
9415 * src/bison.data (YYSTACK_ALLOC): Depend on whether
9416 YYERROR_VERBOSE is nonzero, not whether it is defined.
9417
9418 Merge changes from bison-1_29-branch.
9419
9420 2002-03-20 Paul Eggert <eggert@twinsun.com>
9421
9422 Merge fixes from Debian bison_1.34-1.diff.
9423
9424 * configure.in (AC_PREREQ): 2.53.
9425
9426 2002-03-20 Akim Demaille <akim@epita.fr>
9427
9428 * src/conflicts.c (log_resolution): Argument `resolution' is const.
9429
9430 2002-03-19 Paul Eggert <eggert@twinsun.com>
9431
9432 * src/bison.simple (YYCOPY): New macro.
9433 (YYSTACK_RELOCATE): Use it.
9434 Remove Type arg; no longer needed. All callers changed.
9435 (yymemcpy): Remove; no longer needed.
9436
9437 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
9438 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9439
9440 2002-03-19 Akim Demaille <akim@epita.fr>
9441
9442 Test and fix the #line outputs.
9443
9444 * tests/atlocal.at (GCC): New.
9445 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
9446 (Prologue synch line, %union synch line, Postprologue synch line)
9447 (Action synch line, Epilogue synch line): New tests.
9448 * src/reader.c (parse_union_decl): Define the muscle stype_line.
9449 * data/bison.simple, data/bison.c++: Use it.
9450
9451 2002-03-19 Akim Demaille <akim@epita.fr>
9452
9453 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
9454 (Solved SR Conflicts, %expect not enough, %expect right)
9455 (%expect too much): Move to...
9456 * tests/conflicts.at: this new file.
9457
9458 2002-03-19 Akim Demaille <akim@epita.fr>
9459
9460 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
9461 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
9462 that we can move to enums for instance.
9463 * src/output.c (token_definitions_output): Output a list of
9464 `token-name, token-number' instead of the #define.
9465 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
9466
9467 2002-03-14 Akim Demaille <akim@epita.fr>
9468
9469 Use Gettext 0.11.1.
9470
9471 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
9472
9473 * data/bison.c++: Make the user able to add members to the generated
9474 parser by subclassing.
9475
9476 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
9477
9478 * src/reader.c (read_additionnal_code): `c' should be an integer, not
9479 a character.
9480 Reported by Nicolas Tisserand and Nicolas Burrus.
9481
9482 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
9483
9484 * src/reader.c: Warn about lacking semi-colons, do not complain.
9485
9486 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
9487
9488 * data/bison.c++: Remove a debug line.
9489
9490 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
9491
9492 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
9493 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
9494 provide a default implementation.
9495
9496 2002-03-04 Akim Demaille <akim@epita.fr>
9497
9498 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
9499 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
9500 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
9501 * tests/semantic.at (Parsing Guards): Similarly.
9502 * src/reader.at (readgram): Complain if the last rule is not ended
9503 with a semi-colon.
9504
9505 2002-03-04 Akim Demaille <akim@epita.fr>
9506
9507 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
9508 * src/closure.c: here.
9509 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
9510 RTC.
9511 * src/warshall.h, src/warshall.c: Remove.
9512 * tests/sets.at (Broken Closure): Adjust.
9513
9514 2002-03-04 Akim Demaille <akim@epita.fr>
9515
9516 * src/output.c (output_skeleton): tempdir is const.
9517 bytes_read is unused.
9518
9519 2002-03-04 Akim Demaille <akim@epita.fr>
9520
9521 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9522 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
9523 Update.
9524 From Michael Hayes.
9525
9526 2002-03-04 Akim Demaille <akim@epita.fr>
9527
9528 * src/closure.c (closure): `r' is unused.
9529
9530 2002-03-04 Akim Demaille <akim@epita.fr>
9531
9532 * tests/sets.at (Broken Closure): Add the ending `;'.
9533 * src/reader.at (readgram): Complain if a rule is not ended with a
9534 semi-colon.
9535
9536 2002-03-04 Akim Demaille <akim@epita.fr>
9537
9538 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
9539 (count_sr_conflicts): Use bitset_count.
9540 * src/reduce.c (inaccessable_symbols): Ditto.
9541 (bits_size): Remove.
9542 * src/warshall.h, src/warshall.c: Convert to bitsetv.
9543
9544 2002-03-04 Akim Demaille <akim@epita.fr>
9545
9546 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
9547 * src/reduce.c: Remove the `bitset_zero's following the
9548 `bitset_create's, as now it is performed by the latter.
9549
9550 2002-03-04 Akim Demaille <akim@epita.fr>
9551
9552 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
9553 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
9554 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
9555 latest sources from Michael.
9556
9557 2002-03-04 Akim Demaille <akim@epita.fr>
9558
9559 * src/output.c (output): Don't free the grammar.
9560 * src/reader.c (grammar_free): New.
9561 * src/main.c (main): Call it and don't free symtab here.
9562
9563 2002-03-04 Akim Demaille <akim@epita.fr>
9564
9565 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
9566 before returning.
9567 Reported by Benoit Perrot.
9568
9569 2002-03-04 Akim Demaille <akim@epita.fr>
9570
9571 Use bitset operations when possible, not loops over bits.
9572
9573 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
9574 bitset_or.
9575 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
9576 * src/reduce.c (useless_nonterminals): Formatting changes.
9577 * src/warshall.c (TC): Use bitset_or.
9578
9579 2002-03-04 Akim Demaille <akim@epita.fr>
9580
9581 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
9582 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
9583 Ditto.
9584
9585 2002-03-04 Akim Demaille <akim@epita.fr>
9586
9587 * src/lalr.c (F): Now a bitset*.
9588 Adjust all dependencies.
9589
9590 2002-03-04 Akim Demaille <akim@epita.fr>
9591
9592 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
9593 Adjust all dependencies.
9594
9595 2002-03-04 Akim Demaille <akim@epita.fr>
9596
9597 * src/L0.c, src/LR0.h (nstates): Be size_t.
9598 Adjust comparisons (signed vs unsigned).
9599 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
9600 bitset*.
9601 Adjust all dependencies.
9602
9603 2002-03-04 Akim Demaille <akim@epita.fr>
9604
9605 * src/closure.c (firsts): Now, also a bitset.
9606 Adjust all dependencies.
9607 (varsetsize): Remove, now unused.
9608 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
9609
9610 2002-03-04 Akim Demaille <akim@epita.fr>
9611
9612 * src/print.c: Convert to use bitset.h, not hand coded iterations
9613 over ints.
9614
9615 2002-03-04 Akim Demaille <akim@epita.fr>
9616
9617 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
9618
9619 2002-03-04 Akim Demaille <akim@epita.fr>
9620
9621 * src/closure.c (ruleset): Be a bitset.
9622 (rulesetsize): Remove.
9623
9624 2002-03-04 Akim Demaille <akim@epita.fr>
9625
9626 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9627 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
9628 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
9629 * src/closure.c (fderives): Be an array of bitsets.
9630
9631 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
9632
9633 * data/bison.c++: Merge the two generated headers. Insert a copyright
9634 notice in each output file.
9635
9636 2002-02-28 Akim Demaille <akim@epita.fr>
9637
9638 * data/bison.c++: Copy the prologue of bison.simple to fetch
9639 useful M4 definitions, such as b4_header_guard.
9640
9641 2002-02-25 Akim Demaille <akim@epita.fr>
9642
9643 * src/getargs.c (version): Give the name of the authors, and use a
9644 translator friendly scheme for the bgr
9645 copyright notice.
9646
9647 2002-02-25 Akim Demaille <akim@epita.fr>
9648
9649 * src/output.c (header_output): Remove, now handled completely via
9650 M4.
9651
9652 2002-02-25 Akim Demaille <akim@epita.fr>
9653
9654 * m4/m4.m4: New, from CVS Autoconf.
9655 * configure.in: Invoke it.
9656 * src/output.c (output_skeleton): Use its result instead of the
9657 hard coded name.
9658
9659 2002-02-25 Akim Demaille <akim@epita.fr>
9660
9661 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
9662 Fileutils 4.1.5.
9663 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
9664 * src/output.c (output_skeleton): Use mkstemp to create a real
9665 temporary file.
9666 Move the filling of `skeleton' and its muscle to...
9667 (prepare): here.
9668 (output): Move the definition of the prologue muscle to...
9669 (prepare): here.
9670 * src/system.h (DEFAULT_TMPDIR): New.
9671
9672 2002-02-14 Paul Eggert <eggert@twinsun.com>
9673
9674 Remove the support for C++ namespace cleanliness; it was
9675 causing more problems than it was curing, since it didn't work
9676 properly on some nonstandard C++ compilers. This can wait
9677 for a proper C++ parser.
9678
9679 * NEWS: Document this.
9680 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
9681 of C++, as it's treated like C now.
9682 * src/bison.simple (YYSTD): Remove.
9683 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
9684 Treat C++ just like Standard C instead of trying to support
9685 namespace cleanliness.
9686
9687 2002-02-14 Akim Demaille <akim@epita.fr>
9688
9689 * tests/regression.at (else): Adjust to Andreas' change.
9690
9691 2002-02-14 Akim Demaille <akim@epita.fr>
9692
9693 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
9694
9695 2002-02-13 Andreas Schwab <schwab@suse.de>
9696
9697 * src/output.c (output_rule_data): Don't output NULL, it might
9698 not be defined yet.
9699
9700 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
9701
9702 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
9703 (Copyright notice): Update.
9704
9705 2002-02-11 Akim Demaille <akim@epita.fr>
9706
9707 * tests/regression.at (%nonassoc and eof): Don't include
9708 nonportable headers.
9709
9710 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
9711
9712 * data/bison.c++: Correct error recovery. Make the user able to
9713 initialize the starting location.
9714
9715 2002-02-07 Akim Demaille <akim@epita.fr>
9716
9717 * tests/input.at: New.
9718
9719 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9720
9721 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9722 more consistent when naming methods and variables. Put preprocessor
9723 directives around tables only needed for debugging.
9724
9725 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9726
9727 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
9728 C++ parsers.
9729 (yy::b4_name::parse): Use print_.
9730
9731 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9732
9733 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
9734
9735 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9736
9737 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
9738 C++ parsers.
9739 (yy::b4_name::parse): Build verbose error messages, and use error_.
9740
9741 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9742
9743 * data/bison.c++: Fix m4 quoting in comments.
9744
9745 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9746
9747 * data/bison.c++: Adjust the parser code. Fix some muscles that were
9748 not expanded by m4.
9749
9750 2002-02-05 Akim Demaille <akim@epita.fr>
9751
9752 * data/bison.c++: Adjust to the M4 back end.
9753 More is certainly needed.
9754
9755 2002-02-05 Akim Demaille <akim@epita.fr>
9756
9757 Give a try to M4 as a back end.
9758
9759 * lib/readpipe.c: New, from wdiff.
9760 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
9761 BISON_HAIRY.
9762 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
9763 specific values. Now it is m4 that performs the lookup.
9764 * src/parse-skel.y: Remove.
9765 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
9766 * src/output.c (actions_output, guards_output)
9767 (token_definitions_output): No longer keeps track of the output
9768 line number, hence remove the second argument.
9769 (guards_output): Check against the guard member of a rule, not the
9770 action member.
9771 Adjust callers.
9772 (output_skeleton): Don't look for the skeleton location, let m4 do
9773 that.
9774 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
9775 file will be used.
9776 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
9777 (prepare): Given that for the time being changesyntax is not
9778 usable in M4, rename the muscles using `-' to `_'.
9779 Define `defines_flag', `output_parser_name' and `output_header_name'.
9780 * src/output.h (actions_output, guards_output)
9781 (token_definitions_output): Adjust prototypes.
9782 * src/scan-skel.l: Instead of scanning the skeletons, it now
9783 processes the output of m4: `__oline__' and `#output'.
9784 * data/bison.simple: Adjust to be used by M4(sugar).
9785 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
9786 to date.
9787 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
9788 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
9789 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
9790 shamelessly stolen from CVS Autoconf.
9791
9792 2002-02-05 Akim Demaille <akim@epita.fr>
9793
9794 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
9795 * configure.in: Check for the declarations of free and malloc.
9796 * src/muscle_tab.c: Adjust.
9797
9798 2002-02-05 Akim Demaille <akim@epita.fr>
9799
9800 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
9801 which have no values.
9802
9803 2002-02-05 Akim Demaille <akim@epita.fr>
9804
9805 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
9806 * data/: here.
9807
9808 2002-01-29 Paul Eggert <eggert@twinsun.com>
9809
9810 * src/bison.simple (YYSIZE_T): Do not define merely because
9811 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
9812 On some platforms, <alloca.h> does not declare YYSTD (size_t).
9813
9814 2002-01-27 Akim Demaille <akim@epita.fr>
9815
9816 Fix `%nonassoc and eof'.
9817
9818 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
9819 which were not properly copied! Replace
9820 memcpy (res->errs, src->errs, src->nerrs);
9821 with
9822 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
9823 !!!
9824 * tests/regression.at (%nonassoc and eof): Adjust to newest
9825 Autotest: `.' is not in the PATH.
9826
9827 2002-01-27 Akim Demaille <akim@epita.fr>
9828
9829 * tests/sets.at (AT_EXTRACT_SETS): New.
9830 (Nullable): Use it.
9831 (Firsts): New.
9832
9833 2002-01-26 Akim Demaille <akim@epita.fr>
9834
9835 * tests/actions.at, tests/calc.at, tests/headers.at,
9836 * tests/torture.at: Adjust to the newest Autotest which no longer
9837 forces `.' in the PATH.
9838
9839 2002-01-25 Akim Demaille <akim@epita.fr>
9840
9841 * tests/regression.at (%nonassoc and eof): New.
9842 Suggested by Robert Anisko.
9843
9844 2002-01-24 Akim Demaille <akim@epita.fr>
9845
9846 Bison dumps core when trying to complain about broken input files.
9847 Reported by Cris van Pelt.
9848
9849 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
9850 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
9851 into...
9852 (Invalid inputs): Strengthen: exercise parse_percent_token.
9853
9854 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
9855
9856 * src/Makefile.am: Add bison.c++.
9857 * src/bison.c++: New skeleton.
9858
9859 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
9860
9861 * po/it.po: New.
9862
9863 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
9864
9865 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
9866
9867 2002-01-20 Marc Autret <marc@gnu.org>
9868
9869 * src/files.c (compute_output_file_names): Fix
9870
9871 2002-01-20 Marc Autret <marc@gnu.org>
9872
9873 * tests/output.at: New test.
9874 * src/files.c (compute_base_names): Don't map extensions when
9875 the YACC flag is set, use defaults.
9876 Reported by Evgeny Stambulchik.
9877
9878 2002-01-20 Marc Autret <marc@gnu.org>
9879
9880 * src/system.h: Need to define __attribute__ away for non-GCC
9881 compilers as well (i.e., the vendor C compiler).
9882 Suggested by Albert Chin-A-Young.
9883
9884 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
9885
9886 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
9887 canonical definition.
9888 * src/system.h: Use the canonical definition for PARAMS (avoids
9889 a conflict with the macro from lib/hash.h).
9890
9891 2002-01-11 Akim Demaille <akim@epita.fr>
9892
9893 * configure.in: Use AC_FUNC_STRNLEN.
9894 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
9895
9896 2002-01-09 Akim Demaille <akim@epita.fr>
9897
9898 * src/files.c, src/files.h (output_infix): New.
9899 (tab_extension): Remove.
9900 (compute_base_names): Compute the former, drop the latter.
9901 * src/output.c (prepare): Insert the muscles `output-infix', and
9902 `output-suffix'.
9903 * src/parse-skel.y (string, string.1): New.
9904 (section.header): Use it.
9905 (section.yacc): Remove.
9906 (prefix): Remove too.
9907 * src/scan-skel.l: Adjust.
9908 * src/bison.simple, src/bison.hairy: Adjust.
9909
9910 2002-01-09 Akim Demaille <akim@epita.fr>
9911
9912 * configure.in (WERROR_CFLAGS): Compute it.
9913 * src/Makefile.am (CFLAGS): Pass it.
9914 * tests/atlocal.in (CFLAGS): Idem.
9915 * src/files.c: Fix a few warnings.
9916 (get_extension_index): Remove, unused.
9917
9918 2002-01-08 Akim Demaille <akim@epita.fr>
9919
9920 * src/getargs.c (AS_FILE_NAME): New.
9921 (getargs): Use it to convert DOSish file names.
9922 * src/files.c (base_name): Rename as full_base_name to avoid
9923 clashes with `base_name ()'.
9924 (filename_split): New.
9925 (compute_base_names): N-th rewrite, using filename_split.
9926
9927 2002-01-08 Akim Demaille <akim@epita.fr>
9928
9929 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
9930 New, stolen from the Fileutils 4.1.
9931 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9932 * configure.in: Check for the presence of memrchr, and of its
9933 prototype.
9934
9935 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
9936
9937 * lib/hash.h (__P): Added definition for this macro.
9938 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
9939 BUILT_SOURCES, to ensure they are generated first.
9940 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
9941 %error-verbose to allow bootstrapping with bison 1.30x.
9942
9943 2002-01-06 Akim Demaille <akim@epita.fr>
9944
9945 * src/reader.c (parse_braces): Don't fetch the next char, the
9946 convention is to fetch on entry.
9947 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
9948 'switch' without a following semicolon.
9949 * tests/regression.at (braces parsing): New.
9950
9951 2002-01-06 Akim Demaille <akim@epita.fr>
9952
9953 Bison is dead wrong in its RR conflict reports.
9954
9955 * tests/torture.at (GNU Cim Grammar): New.
9956 * src/conflicts.c (count_rr_conflicts): Fix.
9957
9958 2002-01-06 Akim Demaille <akim@epita.fr>
9959
9960 Creating package.m4 from configure.ac causes too many problems.
9961
9962 * tests/Makefile.am (package.m4): Create it by hand,
9963 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
9964
9965 2002-01-06 Akim Demaille <akim@epita.fr>
9966
9967 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
9968 skeleton.h.
9969
9970 2002-01-04 Paul Eggert <eggert@twinsun.com>
9971
9972 * doc/bison.texinfo (Debugging):
9973 Remove YYSTDERR; it's no longer defined or used.
9974 Also, s/cstdio.h/cstdio/.
9975
9976 2002-01-03 Akim Demaille <akim@epita.fr>
9977
9978 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
9979
9980 2002-01-03 Akim Demaille <akim@epita.fr>
9981
9982 * src/parse-skel.y (process_skeleton): Don't bind the parser's
9983 tracing code to --trace, wait for a better --trace option, with
9984 args.
9985
9986 2002-01-03 Akim Demaille <akim@epita.fr>
9987
9988 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
9989 The ISO C++ standard is extremely clear about it: stderr is
9990 considered a macro, not a regular symbol (see table 94 `Header
9991 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
9992 Therefore std:: does not apply to it. It still does with fprintf.
9993 Also, s/cstdio.h/cstdio/.
9994
9995 2002-01-03 Akim Demaille <akim@epita.fr>
9996
9997 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
9998 for non system headers.
9999
10000 2002-01-02 Akim Demaille <akim@epita.fr>
10001
10002 Equip the skeleton chain with location tracking, runtime trace,
10003 pure parser and scanner.
10004
10005 * src/parse-skel.y: Request a pure parser, locations, and prefix
10006 renaming.
10007 (%union): Having several members with the same type does not help
10008 type mismatches, simplify.
10009 (YYPRINT, yyprint): New.
10010 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
10011 (skel_error): this.
10012 Handle locations.
10013 * src/scan-skel.l: Adjust to these changes.
10014 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
10015 (LOCATION_PRINT, skel_control_t): New.
10016
10017 2001-12-30 Akim Demaille <akim@epita.fr>
10018
10019 * src/parse-skel.y: Get rid of the shift/reduce conflict:
10020 replace `gb' with BLANKS.
10021 * src/scan-skel.l: Adjust.
10022
10023 2001-12-30 Akim Demaille <akim@epita.fr>
10024
10025 * src/system.h: We don't need nor want bcopy.
10026 Throw away MS-DOS crap: we don't need getpid.
10027 * configure.in: We don't need strndup. It was even causing
10028 problems: because Flex includes the headers *before* us,
10029 _GNU_SOURCE is not defined by config.h, and therefore strndup was
10030 not visible.
10031 * lib/xstrndup.c: New.
10032 * src/scan-skel.l: Use it.
10033 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
10034 * src/parse-skel.y: Use %directives instead of #defines.
10035
10036 2001-12-30 Akim Demaille <akim@epita.fr>
10037
10038 * src/skeleton.h: New.
10039 * src/output.c (output_parser, output_master_parser): Remove, dead
10040 code.
10041 * src/output.h (get_lines_number, actions_output, guards_output)
10042 (token_definitions_output): Prototype them.
10043 * src/parse-skel.y: Add the license notice.
10044 Include output.h and skeleton.h.
10045 (process_skeleton): Returns void, and takes a single parameter.
10046 * src/scan-skel.l: Add the license notice.
10047 Include skeleton.h.
10048 Don't use %option yylineno: it seems that then Flex imagines
10049 REJECT has been used, and therefore it won't reallocate its
10050 buffers (which makes no other sense to me than a bug). It results
10051 in warnings for `unused: yy_flex_realloc'.
10052
10053 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
10054
10055 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10056 (MUSCLE_INSERT_PREFIX): ...to there.
10057 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
10058 (MUSCLE_INSERT_PREFIX): Move from here...
10059
10060 * src/bison.hairy: Add a section directive. Put braces around muscle
10061 names. This parser skeleton is still broken, but Bison should not
10062 choke on a bad muscle 'syntax'.
10063 * src/bison.simple: Add a section directive. Put braces around muscle
10064 names.
10065
10066 * src/files.h (strsuffix, stringappend): Add declarations.
10067 (tab_extension): Add declaration.
10068 (short_base_name): Add declaration.
10069
10070 * src/files.c (strsuffix, stringappend): No longer static. These
10071 functions are used in the skeleton parser.
10072 (tab_extension): New.
10073 (compute_base_names): Use the computations done in this function
10074 to guess if the generated parsers should have '.tab' in their
10075 names.
10076 (short_base_name): No longer static.
10077
10078 * src/output.c (output_skeleton): New.
10079 (output): Disable call to output_master_parser, and give a try to
10080 a new skeleton handling system.
10081 (guards_output, actions_output): No longer static.
10082 (token_definitions_output, get_lines_number): No longer static.
10083
10084 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
10085
10086 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
10087 parse-skel.y.
10088
10089 * src/parse-skel.y: New file.
10090 * src/scan-skel.l: New file.
10091
10092 2001-12-29 Akim Demaille <akim@epita.fr>
10093
10094 %name-prefix is broken.
10095
10096 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
10097 Adjust all dependencies.
10098 * tests/headers.at (export YYLTYPE): Strengthen this test: use
10099 %name-prefix.
10100
10101 Renaming yylval but not yylloc is not consistent. Now we do.
10102
10103 * src/bison.simple: Prefix yylloc if used.
10104 * doc/bison.texinfo (Decl Summary): Document that.
10105
10106 2001-12-29 Akim Demaille <akim@epita.fr>
10107
10108 * doc/bison.texinfo: Promote `%long-directive' over
10109 `%long_directive'.
10110 Remove all references to fixed-output-files, yacc is enough.
10111
10112 2001-12-29 Akim Demaille <akim@epita.fr>
10113
10114 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
10115 user prologue. These are defaults.
10116 * tests/actions.at (Mid-rule actions): Make sure the user can
10117 define YYDEBUG and YYERROR_VERBOSE.
10118
10119 2001-12-29 Akim Demaille <akim@epita.fr>
10120
10121 * src/output.c (header_output): Don't forget to export YYLTYPE and
10122 yylloc.
10123 * tests/headers.at (export YYLTYPE): New, make sure it does.
10124 * tests/regression.at (%union and --defines, Invalid CPP headers):
10125 Move to...
10126 * tests/headers.at: here.
10127
10128 2001-12-29 Akim Demaille <akim@epita.fr>
10129
10130 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
10131
10132 2001-12-29 Akim Demaille <akim@epita.fr>
10133
10134 * tests/actions.at (Mid-rule actions): Output on a single line
10135 instead of several.
10136
10137 2001-12-29 Akim Demaille <akim@epita.fr>
10138
10139 * doc/bison.texinfo: Formatting changes.
10140
10141 2001-12-29 Akim Demaille <akim@epita.fr>
10142
10143 Don't store the token defs in a muscle, just be ready to output it
10144 on command. Now possible via `symbols'. Fixes a memory leak.
10145
10146 * src/output.c (token_definitions_output): New.
10147 (output_parser, header_output): Use it.
10148 * src/reader.c (symbols_save): Remove.
10149
10150 2001-12-29 Akim Demaille <akim@epita.fr>
10151
10152 * src/bison.simple: Do not provide a default for YYSTYPE and
10153 YYLTYPE before the user's prologue. Otherwise it's hardly... a
10154 default.
10155
10156 2001-12-29 Akim Demaille <akim@epita.fr>
10157
10158 Mid-rule actions are simply... ignored!
10159
10160 * src/reader.c (readgram): Be sure to attach mid-rule actions to
10161 the empty-rule associated to the dummy symbol, not to the host
10162 rule.
10163 * tests/actions.at (Mid-rule actions): New.
10164
10165 2001-12-29 Akim Demaille <akim@epita.fr>
10166
10167 Memory leak.
10168
10169 * src/reader.c (reader): Free grammar.
10170
10171 2001-12-29 Akim Demaille <akim@epita.fr>
10172
10173 Memory leak.
10174
10175 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
10176 since it allocates it for each state, although only one is needed.
10177 (allocate_storage): Do it here.
10178
10179 2001-12-29 Akim Demaille <akim@epita.fr>
10180
10181 * src/options.h, src/options.c (create_long_option_table): Rename
10182 as...
10183 (long_option_table_new): this, with a clearer prototype.
10184 (percent_table): Remove, unused,
10185 * src/getargs.c (getargs): Adjust.
10186
10187 2001-12-29 Akim Demaille <akim@epita.fr>
10188
10189 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
10190 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
10191 as states.
10192
10193 2001-12-29 Akim Demaille <akim@epita.fr>
10194
10195 * src/lalr.c (build_relations): Rename `states' as `states1'.
10196 Sorry, I don't understand exactly what it is, no better name...
10197
10198 2001-12-29 Akim Demaille <akim@epita.fr>
10199
10200 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
10201 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
10202 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
10203 as rules.
10204
10205 2001-12-29 Akim Demaille <akim@epita.fr>
10206
10207 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
10208 ago.
10209
10210 2001-12-29 Akim Demaille <akim@epita.fr>
10211
10212 * src/reader.c, src/reader.h (user_toknums): Remove.
10213 Adjust all users to use symbols[i]->user_token_number.
10214
10215 2001-12-29 Akim Demaille <akim@epita.fr>
10216
10217 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
10218 Adjust all users to use symbols[i]->prec or ->assoc.
10219
10220 2001-12-29 Akim Demaille <akim@epita.fr>
10221
10222 * src/reader.c, src/reader.h (tags): Remove.
10223 Adjust all users to use symbols[i]->tag.
10224
10225 2001-12-29 Akim Demaille <akim@epita.fr>
10226
10227 * src/gram.h, src/gram.c (symbols): New, similar to state_table
10228 and rule_table.
10229 * src/reader.c (packsymbols): Fill this table.
10230 Drop sprec.
10231 * src/conflicts.c (resolve_sr_conflict): Adjust.
10232 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
10233 single table.
10234 Use symbols[i]->tag instead of tags[i].
10235
10236 2001-12-29 Akim Demaille <akim@epita.fr>
10237
10238 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
10239 In addition, put a comment in there, to replace...
10240 * tests/regression.at (%union and C comments): Remove.
10241
10242 2001-12-29 Akim Demaille <akim@epita.fr>
10243
10244 * tests/regression.at (Web2c Actions): Blindly move the actual
10245 output as expected output. The contents *seem* right to me, but I
10246 can't pretend reading perfectly parser tables... Nonetheless, all
10247 the other tests pass correctly, the table look OK, even though the
10248 presence of `$axiom' is to be noted: AFAICS it is useless (but
10249 harmless).
10250
10251 2001-12-29 Akim Demaille <akim@epita.fr>
10252
10253 * src/reader.c (readgram): Don't add the rule 0 if there were no
10254 rules read. In other words, add it _after_ having performed
10255 grammar sanity checks.
10256 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
10257
10258 2001-12-29 Akim Demaille <akim@epita.fr>
10259
10260 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
10261 visible, and some states have now a different number.
10262
10263 2001-12-29 Akim Demaille <akim@epita.fr>
10264
10265 * src/reader.c (readgram): Bind the initial rule's lineno to that
10266 of the first rule.
10267 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
10268 (Solved SR Conflicts): Adjust rule 0's line number.
10269
10270 2001-12-29 Akim Demaille <akim@epita.fr>
10271
10272 Fix the `GAWK Grammar' failure.
10273
10274 * src/LR0.c (final_state): Initialize to -1 so that we do compute
10275 the reductions of the first state which was mistakenly confused
10276 with the final state because precisely final_state was initialized
10277 to 0.
10278 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
10279 now noticed by Bison.
10280 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
10281 have a reduction on $default.
10282
10283 2001-12-29 Akim Demaille <akim@epita.fr>
10284
10285 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
10286 rule line numbers.
10287 * src/closure.c (print_closure): Likewise.
10288 * src/derives.c (print_derives): Likewise.
10289 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
10290 now.
10291
10292 2001-12-29 Akim Demaille <akim@epita.fr>
10293
10294 * src/lalr.c (lookaheads_print): New.
10295 (lalr): Call it when --trace-flag.
10296 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
10297 are dumped.
10298
10299 2001-12-29 Akim Demaille <akim@epita.fr>
10300
10301 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
10302 when walking through ritem, even via rule->rhs.
10303 * src/reduce.c (dump_grammar, useful_production, reduce_output)
10304 (useful_production, useless_nonterminals): Likewise.
10305 (reduce_grammar_tables): Likewise, plus update nritems.
10306 * src/nullable.c (set_nullable): Likewise.
10307 * src/lalr.c (build_relations): Likewise.
10308 * tests/sets.at (Nullable): Adjust.
10309 Fortunately, now, the $axiom is no longer nullable.
10310
10311 2001-12-29 Akim Demaille <akim@epita.fr>
10312
10313 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
10314 the 0-sentinel.
10315 * src/gram.c (ritem_longest_rhs): Likewise.
10316 * src/reduce.c (nonterminals_reduce): Likewise.
10317 * src/print_graph.c (print_graph): Likewise.
10318 * src/output.c (output_rule_data): Likewise.
10319 * src/nullable.c (set_nullable): Likewise.
10320
10321 2001-12-29 Akim Demaille <akim@epita.fr>
10322
10323 * src/output.c: Comment changes.
10324
10325 2001-12-27 Paul Eggert <eggert@twinsun.com>
10326
10327 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
10328 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
10329 Sparc, as they were causing more porting problems than the
10330 (minor) performance improvement was worth.
10331
10332 Also, catch up with 1.31's YYSTD.
10333
10334 2001-12-27 Akim Demaille <akim@epita.fr>
10335
10336 * src/output.c (output_gram): Rely on nritems, not the
10337 0-sentinel. See below.
10338 Use -1 as separator, not 0.
10339 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
10340 Rely on -1 as separator in yyrhs, instead of 0.
10341 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
10342 twice `Now at end of input', therefore there are two lines less to
10343 expect.
10344
10345 2001-12-27 Akim Demaille <akim@epita.fr>
10346
10347 * tests/regression.at (Unresolved SR Conflicts):
10348 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
10349 below.
10350
10351 2001-12-27 Akim Demaille <akim@epita.fr>
10352
10353 * src/LR0.c (new_state): Recognize the final state by the fact it
10354 is reached by eoftoken.
10355 (insert_start_shifting_state, insert_eof_shifting_state)
10356 (insert_accepting_state, augment_automaton): Remove, since now
10357 these states are automatically computed from the initial state.
10358 (generate_states): Adjust.
10359 * src/print.c: When reporting a rule number to the user, substract
10360 1, so that the axiom rule is rule 0, and the first user rule is 1.
10361 * src/reduce.c: Likewise.
10362 * src/print_graph.c (print_core): For the time being, just as for
10363 the report, depend upon --trace-flags to dump the full set of
10364 items.
10365 * src/reader.c (readgram): Once the grammar read, insert the rule
10366 0: `$axiom: START-SYMBOL $'.
10367 * tests/set.at: Adjust: rule 0 is now displayed, and since the
10368 number of the states has changed (the final state is no longer
10369 necessarily the last), catch up.
10370
10371 2001-12-27 Akim Demaille <akim@epita.fr>
10372
10373 Try to make the use of the eoftoken valid. Given that its value
10374 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
10375 is used instead of > 0 where appropriate, (ii), depend upon nritems
10376 instead of the 0-sentinel.
10377
10378 * src/gram.h, src/gram.c (nritems): New.
10379 Expected to be duplication of nitems, but for the time being...
10380 * src/reader.c (packgram): Assert nritems and nitems are equal.
10381 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
10382 * src/closure.c (print_closure, print_fderives): Likewise.
10383 * src/gram.c (ritem_print): Likewise.
10384 * src/print.c (print_core, print_grammar): Likewise.
10385 * src/print_graph.c: Likewise.
10386
10387 2001-12-27 Akim Demaille <akim@epita.fr>
10388
10389 * src/main.c (main): If there are complains after grammar
10390 reductions, then output the report anyway if requested, then die.
10391 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
10392 * src/reader.c (eoftoken): New.
10393 (parse_token_decl): If the token being defined has value `0', it
10394 is the eoftoken.
10395 (packsymbols): No longer hack `tags' to insert `$' by hand.
10396 Be sure to preserve the value of the eoftoken.
10397 (reader): Make sure eoftoken is defined.
10398 Initialize nsyms to 0: now eoftoken is created just like the others.
10399 * src/print.c (print_grammar): Don't special case the eof token.
10400 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
10401 lie anyway, albeit pleasant.
10402 * tests/calc.at: Exercise error messages with eoftoken.
10403 Change the grammar so that empty input is invalid.
10404 Adjust expectations.
10405 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
10406
10407 2001-12-27 Akim Demaille <akim@epita.fr>
10408
10409 * configure.in: Check the protos of strchr ans strspn.
10410 Replace strchr if needed.
10411 * src/system.h: Provide the protos of strchr, strspn and memchr if
10412 missing.
10413 * lib/strchr.c: New.
10414 * src/reader.c (symbols_save): Use strchr.
10415
10416 2001-12-27 Akim Demaille <akim@epita.fr>
10417
10418 * src/print.c, src/print_graph.c (escape): New.
10419 Use it to quote the TAGS outputs.
10420 * src/print_graph.c (print_state): Now errors are in red, and
10421 reductions in green.
10422 Prefer high to wide: output the state number on a line of its own.
10423
10424 2001-12-27 Akim Demaille <akim@epita.fr>
10425
10426 * src/state.h, src/state.c (reductions_new): New.
10427 * src/LR0.c (set_state_table): Let all the states have a
10428 `reductions', even if reduced to 0.
10429 (save_reductions): Adjust.
10430 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
10431 * src/print.c (print_reductions, print_actions): Adjust.
10432 * src/output.c (action_row): Adjust.
10433
10434 2001-12-27 Akim Demaille <akim@epita.fr>
10435
10436 * src/state.h, src/state.c (errs_new, errs_dup): New.
10437 * src/LR0.c (set_state_table): Let all the states have an errs,
10438 even if reduced to 0.
10439 * src/print.c (print_errs, print_reductions): Adjust.
10440 * src/output.c (output_actions, action_row): Adjust.
10441 * src/conflicts.c (resolve_sr_conflict): Adjust.
10442
10443 2001-12-27 Akim Demaille <akim@epita.fr>
10444
10445 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
10446
10447 2001-12-27 Akim Demaille <akim@epita.fr>
10448
10449 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
10450 * src/print.c: here.
10451 (lookaheadset, shiftset): New, used as additional storage by
10452 print_reductions.
10453 (print_results): Adjust.
10454 (print_shifts, print_gotos, print_errs): New, extracted from...
10455 (print_actions): here.
10456 * src/print_graph.c (print_actions): Remove dead code.
10457
10458 2001-12-27 Akim Demaille <akim@epita.fr>
10459
10460 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
10461 `$n' and `@n'.
10462
10463 2001-12-27 Akim Demaille <akim@epita.fr>
10464
10465 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
10466 (build_relations): Adjust.
10467
10468 2001-12-27 Akim Demaille <akim@epita.fr>
10469
10470 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
10471 duplication.
10472
10473 2001-12-27 Akim Demaille <akim@epita.fr>
10474
10475 * src/reader.c (packgram): Catch nitems overflows.
10476
10477 2001-12-27 Akim Demaille <akim@epita.fr>
10478
10479 * src/files.c, src/files.h (guard_obstack): Remove.
10480 * src/output.c (output): Adjust.
10481 * src/reader.c (parse_braces): New, factoring...
10482 (copy_action, copy_guard): these two which are renamed as...
10483 (parse_action, parse_guard): these.
10484 As a voluntary consequence, using braces around guards is now
10485 mandatory.
10486
10487 2001-12-27 Akim Demaille <akim@epita.fr>
10488
10489 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
10490 * src/reader.c (symbol_list): `guard' and `guard_line' are new
10491 members.
10492 (symbol_list_new): Adjust.
10493 (copy_action): action_line is the first line, not the last.
10494 (copy_guard): Just as for actions, store the `action' only, not
10495 the switch/case/break flesh.
10496 Don't parse the user action that might follow the guard, let...
10497 (readgram): do it, i.e., now, there can be an action after a
10498 guard.
10499 In other words the guard is just explicitly optional.
10500 (packgram): Adjust.
10501 * src/output.c (guards_output): New.
10502 (output_parser): Call it when needed.
10503 (output): Also free the guard and attrs obstacks.
10504 * src/files.c, src/files.h (obstack_save): Remove.
10505 (output_files): Remove.
10506 As a result, if one needs the former `.act' file, using an
10507 appropriate skeleton which requires actions and guards is now
10508 required.
10509 * src/main.c (main): Adjust.
10510 * tests/semantic.at: New.
10511 * tests/regression.at: Use `input.y' as input file name.
10512 Avoid 8+3 problems by requiring input.c when the test needs the
10513 parser.
10514
10515 2001-12-27 Akim Demaille <akim@epita.fr>
10516
10517 * src/reader.c (symbol_list_new): Be sure to initialize all the
10518 fields.
10519
10520 2001-12-27 Akim Demaille <akim@epita.fr>
10521
10522 All the hacks using a final pseudo state are now useless.
10523
10524 * src/LR0.c (set_state_table): state_table holds exactly nstates.
10525 * src/lalr.c (nLA): New.
10526 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
10527 instead of lookaheadsp from the pseudo state (nstate + 1).
10528
10529 2001-12-27 Akim Demaille <akim@epita.fr>
10530
10531 * src/output.c (action_row, token_actions): Use a state_t instead
10532 of a integer, and nlookaheads instead of the following state's
10533 lookaheadsp.
10534
10535 2001-12-27 Akim Demaille <akim@epita.fr>
10536
10537 * src/conflicts.c (log_resolution, flush_shift)
10538 (resolve_sr_conflict, set_conflicts, solve_conflicts)
10539 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
10540 (conflicts_print, print_reductions): Use a state_t instead of an
10541 integer when referring to a state.
10542 As much as possible, depend upon nlookaheads, instead of the
10543 `lookaheadsp' member of the following state (since lookaheads of
10544 successive states are successive, the difference between state n + 1
10545 and n served as the number of lookaheads for state n).
10546 * src/lalr.c (add_lookback_edge): Likewise.
10547 * src/print.c (print_core, print_actions, print_state)
10548 (print_results): Likewise.
10549 * src/print_graph.c (print_core, print_actions, print_state)
10550 (print_graph): Likewise.
10551 * src/conflicts.h: Adjust.
10552
10553 2001-12-27 Akim Demaille <akim@epita.fr>
10554
10555 * src/bison.hairy: Formatting/comment changes.
10556 ANSIfy.
10557 Remove `register' indications.
10558 Add plenty of `static'.
10559
10560 2001-12-27 Akim Demaille <akim@epita.fr>
10561
10562 * src/output.c (prepare): Drop the muscle `ntbase' which
10563 duplicates ntokens.
10564 * src/bison.simple: Formatting/comment changes.
10565 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
10566 is an undocumented synonym.
10567
10568 2001-12-22 Akim Demaille <akim@epita.fr>
10569
10570 * src/output.c (output_table_data): Change the prototype to use
10571 `int' for array ranges: some invocations do pass an int, not a
10572 short.
10573 Reported by Wayne Green.
10574
10575 2001-12-22 Akim Demaille <akim@epita.fr>
10576
10577 Some actions of web2c.y are improperly triggered.
10578 Reported by Mike Castle.
10579
10580 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
10581 * tests/regression.at (Web2c): Rename as...
10582 (Web2c Report): this.
10583 (Web2c Actions): New.
10584
10585 2001-12-22 Akim Demaille <akim@epita.fr>
10586
10587 Reductions in web2c.y are improperly reported.
10588 Reported by Mike Castle.
10589
10590 * src/conflicts.c (print_reductions): Fix.
10591 * tests/regression.at (Web2c): New.
10592
10593 2001-12-18 Akim Demaille <akim@epita.fr>
10594
10595 Some host fail on `assert (!"foo")', which expands to
10596 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
10597 Reported by Nelson Beebee.
10598
10599 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
10600 `#define it_succeeded 0' and `assert (it_succeeded)'.
10601
10602 2001-12-17 Marc Autret <autret_m@epita.fr>
10603
10604 * src/bison.simple: Don't hard code the skeleton line and filename.
10605 * src/output.c (output_parser): Rename 'line' as 'output_line'.
10606 New line counter 'skeleton_line' (skeleton-line muscle).
10607
10608 2001-12-17 Paul Eggert <eggert@twinsun.com>
10609
10610 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
10611 YYDEBUG must be defined to a nonzero value.
10612
10613 * src/bison.simple (yytname): Do not assume that the user defines
10614 YYDEBUG to a properly parenthesized expression.
10615
10616 2001-12-17 Akim Demaille <akim@epita.fr>
10617
10618 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
10619 nlookaheads is a new member.
10620 Adjust all users.
10621 * src/lalr.h (nlookaheads): Remove this orphan declaration.
10622 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
10623 state.
10624
10625 2001-12-17 Akim Demaille <akim@epita.fr>
10626
10627 * src/files.h, src/files.c (open_files, close_files): Remove.
10628 * src/main.c (main): Don't open/close files, nor invoke lex_free,
10629 let...
10630 * src/reader.c (reader): Do it.
10631
10632 2001-12-17 Akim Demaille <akim@epita.fr>
10633
10634 * src/conflicts.c (print_reductions): Formatting changes.
10635
10636 2001-12-17 Akim Demaille <akim@epita.fr>
10637
10638 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
10639 (flush_reduce): New.
10640 (resolve_sr_conflict): Adjust.
10641
10642 2001-12-17 Akim Demaille <akim@epita.fr>
10643
10644 * src/output.c (output_obstack): Be static and rename as...
10645 (format_obstack): this, to avoid any confusion with files.c's
10646 output_obstack.
10647 * src/reader.h (muscle_obstack): Move to...
10648 * src/output.h: here, since it's defined in output.c.
10649
10650 2001-12-17 Akim Demaille <akim@epita.fr>
10651
10652 * src/output.c (action_row, save_column, default_goto)
10653 (sort_actions, matching_state, pack_vector): Better variable
10654 locality.
10655
10656 2001-12-17 Akim Demaille <akim@epita.fr>
10657
10658 * src/output.c: Various formatting changes.
10659
10660 2001-12-17 Akim Demaille <akim@epita.fr>
10661
10662 * src/files.c (output_files): Free the output_obstack.
10663 * src/main.c (main): Call print and print_graph conditionally.
10664 * src/print.c (print): Work unconditionally.
10665 * src/print_graph.c (print_graph): Work unconditionally.
10666 * src/conflicts.c (log_resolution): Output only if verbose_flag.
10667
10668 2001-12-16 Marc Autret <autret_m@epita.fr>
10669
10670 * src/output.c (actions_output): Fix. When we use %no-lines,
10671 there is one less line per action.
10672
10673 2001-12-16 Marc Autret <autret_m@epita.fr>
10674
10675 * src/bison.simple: Remove a useless #line directive.
10676 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
10677 * src/output.c (get_lines_number): New.
10678 (output_parser): Adjust, now takes care about the lines of a
10679 output muscles.
10680 Fix line numbering.
10681 (actions_output): Computes the number of lines taken by actions.
10682 (output_master_parser): Insert new skeleton which is the name of
10683 the output parser file name.
10684
10685 2001-12-15 Marc Autret <autret_m@epita.fr>
10686
10687 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
10688
10689 2001-12-15 Marc Autret <autret_m@epita.fr>
10690
10691 * src/output.c (output_gram): Keep track of the hairy one.
10692
10693 2001-12-15 Akim Demaille <akim@epita.fr>
10694
10695 Make `make distcheck' work.
10696
10697 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
10698 system.h which uses libgettext.h.
10699
10700 2001-12-15 Akim Demaille <akim@epita.fr>
10701
10702 * src/nullable.c (set_nullable): Useless rules must be skipped,
10703 otherwise, since we range over their symbols, we might look at a
10704 nonterminal which no longer ``exists'', i.e., it is not counted in
10705 `nvars', hence we overflow our arrays.
10706
10707 2001-12-15 Akim Demaille <akim@epita.fr>
10708
10709 The header can also be produced directly, without any obstack!
10710 Yahoo!
10711
10712 * src/files.c, src/files.h (defines_obstack): Remove.
10713 (compute_header_macro): Global.
10714 (defines_obstack_save): Remove.
10715 * src/reader.c (parse_union_decl): No longer output to
10716 defines_obstack: its content can be found in the `stype' muscle
10717 anyway.
10718 (output_token_translations): Merge into...
10719 (symbols_output): this.
10720 Rename as...
10721 (symbols_save): this.
10722 (reader): Adjust.
10723 * src/output.c (header_output): New.
10724 (output): Call it.
10725
10726 2001-12-15 Akim Demaille <akim@epita.fr>
10727
10728 * src/reader.c (parse_union_decl): Instead of handling two obstack
10729 simultaneously, use one to define the `stype' muscle, and use the
10730 value of the latter to fill defines_obstack.
10731 (copy_comment): Remove.
10732 (copy_comment2): Work for a single obstack.
10733 Rename as...
10734 (copy_comment): this.
10735
10736 2001-12-15 Akim Demaille <akim@epita.fr>
10737
10738 * src/lex.c, src/lex.h (xgetc): No longer static.
10739 * src/reader.c (parse_union_decl): Revamp.
10740
10741 2001-12-15 Akim Demaille <akim@epita.fr>
10742
10743 Still making progress in separating Bison into (i) input, (ii)
10744 process, (iii) output: now we can directly output the parser file
10745 without using table_obstack at all.
10746
10747 * src/files.c, src/files.h (table_obstack): Bye bye.
10748 (parser_file_name): New.
10749 * src/files.c (compute_output_file_names): Compute it.
10750 * src/output.c (actions_output, output_parser)
10751 (output_master_parser): To a file instead of an obstack.
10752
10753 2001-12-15 Akim Demaille <akim@epita.fr>
10754
10755 Attach actions to rules, instead of pre-outputting them to
10756 actions_obstack.
10757
10758 * src/gram.h (rule_t): action and action_line are new members.
10759 * src/reader.c (symbol_list): Likewise.
10760 (copy_action): Save the actions within the rule.
10761 (packgram): Save them in rule_table.
10762 * src/output.c (actions_output): New.
10763 (output_parser): Use it on `%%actions'.
10764 (output_rule_data): Don't free rule_table.
10765 (output): Do it.
10766 (prepare): Don't save the `action' muscle.
10767 * src/bison.simple: s/%%action/%%actions/.
10768
10769 2001-12-15 Akim Demaille <akim@epita.fr>
10770
10771 * src/reader.c (copy_action): When --yacc, don't append a `;'
10772 to the user action: let it fail if lacking.
10773 Suggested by Arnold Robbins and Tom Tromey.
10774
10775 2001-12-14 Akim Demaille <akim@epita.fr>
10776
10777 * src/lex.c (literalchar): Simply return the char you decoded, non
10778 longer mess around with obstacks and int pointers.
10779 Adjust all callers.
10780
10781 2001-12-14 Akim Demaille <akim@epita.fr>
10782
10783 * src/lex.c (literalchar): Don't escape the special characters,
10784 just decode them, and keep them as char (before, eol was output as
10785 the 2 char string `\n' etc.).
10786 * src/output.c (output_rule_data): Use quotearg to output the
10787 token strings.
10788
10789 2001-12-13 Paul Eggert <eggert@twinsun.com>
10790
10791 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
10792 Do not infringe on the global user namespace when using C++.
10793 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
10794 All uses of `fprintf' and `stderr' changed.
10795
10796 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
10797
10798 2001-12-13 Akim Demaille <akim@epita.fr>
10799
10800 The computation of nullable is broken: it doesn't handle empty
10801 RHS's properly.
10802
10803 * tests/torture.at (GNU AWK Grammar): New.
10804 * tests/sets.at (Nullable): New.
10805 * src/nullable.c (set_nullable): Instead of blindly looping over
10806 `ritems', loop over the rules, and then over their rhs's.
10807
10808 Work around Autotest bugs.
10809
10810 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
10811 frame, because Autotest understand lines starting with a `+' as
10812 traces from the shell. Then, they are not processed properly.
10813 Admittedly an Autotest bug, but we don't have time to wait for
10814 Autotest to catch up.
10815 * tests/regression.at (Broken Closure): Adjust to the new table
10816 frames.
10817 Move to...
10818 * tests/sets.at: here.
10819
10820 2001-12-13 Akim Demaille <akim@epita.fr>
10821
10822 * src/closure.c (closure): Use nrules instead of playing tricks
10823 with BITS_PER_WORD.
10824
10825 2001-12-13 Akim Demaille <akim@epita.fr>
10826
10827 * src/print.c (print_actions): Output the handling of `$' as the
10828 traces do: shifting the token EOF. Before EOF was treated as a
10829 nonterminal.
10830 * tests/regression.at: Adjust some tests.
10831 * src/print_graph.c (print_core): Complete the set of items via
10832 closure. The next-to-final and final states are still unsatisfying,
10833 but that's to be addressed elsewhere.
10834 No longer output the rule numbers, but do output the state number.
10835 A single loop for the shifts + gotos is enough, but picked a
10836 distinct color for each.
10837 (print_graph): Initialize and finalize closure.
10838
10839 2001-12-13 Akim Demaille <akim@epita.fr>
10840
10841 * src/reader.c (readgram): Remove dead code, an strip useless
10842 braces.
10843 (get_type): Remove, unused.
10844
10845 2001-12-12 Akim Demaille <akim@epita.fr>
10846
10847 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
10848 on that of lib/error.c.
10849
10850 2001-12-12 Akim Demaille <akim@epita.fr>
10851
10852 Some hosts don't like `/' in includes.
10853
10854 * src/system.h: Include libgettext.h without qualifying the path.
10855 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
10856 $(top_srcdir).
10857
10858 2001-12-11 Marc Autret <autret_m@epita.fr>
10859
10860 * src/output.c (output_parser): Remove useless muscle.
10861
10862 2001-12-11 Marc Autret <autret_m@epita.fr>
10863
10864 * src/bison.simple: Remove #line just before %%epilogue. It
10865 is now handled in ...
10866 * src/reader.c (read_additionnal_code): Add the output of a
10867 #line for the epilogue.
10868
10869 2001-12-10 Marc Autret <autret_m@epita.fr>
10870
10871 * src/reader.c (copy_definition): Re-use CPP-outed code which
10872 replace precedent remove.
10873 * src/bison.simple: Remove #line before %%prologue because
10874 %%input-line is wrong at this time.
10875
10876 2001-12-10 Marc Autret <autret_m@epita.fr>
10877
10878 * src/reader.c (symbols_output): Clean up.
10879 * src/output.c (output_gram, output): Clean up.
10880
10881 2001-12-10 Akim Demaille <akim@epita.fr>
10882
10883 * src/lalr.c (initialize_lookaheads): New. Extracted from...
10884 * src/LR0.c (set_state_table): here.
10885 * src/lalr.c (lalr): Call it.
10886
10887 2001-12-10 Akim Demaille <akim@epita.fr>
10888
10889 * src/state.h (shifts): Remove the `number' member: shifts are
10890 attached to state, hence no longer need to be labelled with a
10891 state number.
10892
10893 2001-12-10 Akim Demaille <akim@epita.fr>
10894
10895 Now that states have a complete set of members, the linked list of
10896 shifts is useless: just fill directly the state's shifts member.
10897
10898 * src/state.h (shifts): Remove the `next' member.
10899 * src/LR0.c (first_state, last_state): Remove.
10900 Adjust the callers.
10901 (augment_automaton): Don't look for the shifts that must be added
10902 a shift on EOF: it is those of the state we looked for! But now,
10903 since shifts are attached, it is no longer needed to looking
10904 merely by its id: its number.
10905
10906 2001-12-10 Akim Demaille <akim@epita.fr>
10907
10908 * src/LR0.c (augment_automaton): Better variable locality.
10909 Remove an impossible branch: if there is a state corresponding to
10910 the start symbol being shifted, then there is shift for the start
10911 symbol from the initial state.
10912
10913 2001-12-10 Akim Demaille <akim@epita.fr>
10914
10915 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
10916 only when appropriate: when insert_start_shifting_state' is not
10917 invoked.
10918 * tests/regression.at (Rule Line Numbers): Adjust.
10919
10920 2001-12-10 Akim Demaille <akim@epita.fr>
10921
10922 * src/LR0.c (augment_automaton): Now that all states have shifts,
10923 merge the two cases addition shifts to the initial state.
10924
10925 2001-12-10 Akim Demaille <akim@epita.fr>
10926
10927 * src/lalr.c (set_state_table): Move to...
10928 * src/LR0.c: here.
10929 * src/lalr.c (lalr): Don't call it...
10930 * src/LR0.c (generate_states): do it.
10931 * src/LR0.h (first_state): Remove, only the table is used.
10932
10933 2001-12-10 Akim Demaille <akim@epita.fr>
10934
10935 * src/LR0.h (first_shift, first_reduction): Remove.
10936 * src/lalr.c: Don't use first_shift: find shifts through the
10937 states.
10938
10939 2001-12-10 Akim Demaille <akim@epita.fr>
10940
10941 * src/LR0.c: Attach shifts to states as soon as they are
10942 computed.
10943 * src/lalr.c (set_state_table): Instead of assigning shifts to
10944 state, just assert that the mapping was properly done.
10945
10946 2001-12-10 Akim Demaille <akim@epita.fr>
10947
10948 * src/LR0.c (insert_start_shift): Rename as...
10949 (insert_start_shifting_state): this.
10950 (insert_eof_shifting_state, insert_accepting_state): New.
10951 (augment_automaton): Adjust.
10952 Better locality of the variables.
10953 When looking if the start_symbol is shifted from the initial
10954 state, using `while (... symbol != start_symbol ...)' sounds
10955 better than `while (... symbol < start_symbol ...)': If fail
10956 to see how the order between symbols could be relevant!
10957
10958 2001-12-10 Akim Demaille <akim@epita.fr>
10959
10960 * src/getargs.h: Don't declare `spec_name_prefix' and
10961 `spec_file_prefix', declared by src/files.h.
10962 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
10963 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
10964 * src/output.c (prepare): Adjust.
10965 * src/reader.c (symbols_output): Likewise.
10966 * src/vmsgetargs.c: Vaguely adjust, but who cares?
10967
10968 2001-12-10 Akim Demaille <akim@epita.fr>
10969
10970 * src/muscle_tab.c (muscle_init): NULL is a better default than
10971 `"0"'.
10972
10973 2001-12-10 Akim Demaille <akim@epita.fr>
10974
10975 * src/reader.c (reader): Calling symbols_output once is enough.
10976
10977 2001-12-10 Akim Demaille <akim@epita.fr>
10978
10979 Now that states have a complete set of members, the linked list of
10980 reductions is useless: just fill directly the state's reductions
10981 member.
10982
10983 * src/state.h (struct reductions): Remove member `number' and
10984 `next'.
10985 * src/LR0.c (first_reduction, last_reduction): Remove.
10986 (save_reductions): Don't link the new reductions, store them in
10987 this_state.
10988 * src/lalr.c (set_state_table): No need to attach reductions to
10989 states, it's already done.
10990 * src/output.c (output_actions): No longer free the shifts, then
10991 the reductions, then the states: free all the states and their
10992 members.
10993
10994 2001-12-10 Akim Demaille <akim@epita.fr>
10995
10996 * src/options.c (OPTN, DRTV, BOTH): New.
10997 (option_table): Use them.
10998
10999 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
11000 the job of system.h.
11001 * src/options.c: Don't include stdio.h and xalloc.h for the same
11002 reasons.
11003
11004 2001-12-10 Akim Demaille <akim@epita.fr>
11005
11006 * src/output.c (output, prepare): Make sure the values of the
11007 muscles `action' and `prologue' are 0-terminated.
11008
11009 2001-12-10 Akim Demaille <akim@epita.fr>
11010
11011 Clean up GCC warnings.
11012
11013 * src/reader.c (copy_action): `buf' is not used.
11014 (parse_skel_decl): Be static.
11015 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
11016 * src/options.h (create_long_option_table): Have a real prototype.
11017 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
11018 (hash_delete_at): Return const void *.
11019 Adjust casts to preserve the const.
11020
11021 2001-12-10 Akim Demaille <akim@epita.fr>
11022
11023 * configure.in: Require 2.52g.
11024 M4 is not needed, but AUTOM4TE is.
11025 * m4/m4.m4: Remove.
11026 * tests/Makefile.am: Adjust.
11027
11028 2001-12-10 Akim Demaille <akim@epita.fr>
11029
11030 One structure for states is enough, even though theoretically
11031 there are LR(0) states and LALR(1) states.
11032
11033 * src/lalr.h (state_t): Remove.
11034 (state_table): Be state_t **, not state_t *.
11035 * src/state.h (core, CORE_ALLOC): Rename as...
11036 (state_t, STATE_ALLOC): this.
11037 Add the LALR(1) members: shifts, reductions, errs.
11038 * src/LR0.c (state_table): Rename as...
11039 (state_hash): this, to avoid name clashes with the global
11040 `state_table'.
11041 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
11042 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
11043
11044 2001-12-10 Akim Demaille <akim@epita.fr>
11045
11046 Bison dumps core on bash.y.
11047 Reported by Pascal Bart.
11048
11049 * src/warshall.c (bitmatrix_print): New.
11050 (TC): Use it.
11051 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
11052 j must be the outer loop.
11053 * tests/regression.at (Broken Closure): New.
11054
11055 2001-12-05 Akim Demaille <akim@epita.fr>
11056
11057 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
11058 its argument.
11059 Reported by Peter Hamorsky.
11060
11061 2001-12-05 Akim Demaille <akim@epita.fr>
11062
11063 * src/conflicts.c (err_table): Remove.
11064 (resolve_sr_conflict): Adjust.
11065 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
11066 Rename as...
11067 (state_t.reductions, state_t.shifts): this.
11068
11069 2001-12-05 Akim Demaille <akim@epita.fr>
11070
11071 * src/reduce.c (reduce_grammar_tables): No longer disable the
11072 removal of useless rules via CPP but via `if (0)', so that the
11073 compiler still check the code is valid.
11074 For instance, it should have noticed `rline' no longer exists: use
11075 the `line' member of rule_t.
11076 * src/gram.c (dummy, rline): Remove, unused.
11077
11078 2001-12-05 Akim Demaille <akim@epita.fr>
11079
11080 * src/output.c (pack_vector): Use assert, not berror.
11081 * src/main.c (berror): Remove, unused.
11082
11083 2001-12-05 Akim Demaille <akim@epita.fr>
11084
11085 New experimental feature: if --verbose --trace output all the
11086 items of a state, not only its kernel.
11087
11088 * src/print.c (print_core): If `trace_flag', then invoke closure
11089 before outputting the items of the state (print_core is no longer
11090 a correct name them).
11091 (print_results): Invoke new_closure/free_closure if needed.
11092
11093 2001-12-05 Akim Demaille <akim@epita.fr>
11094
11095 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
11096 * src/closure.c, src/closure.h (itemsetsize): Rename as...
11097 (nitemset): for consistency with the rest of the project.
11098
11099 2001-12-05 Akim Demaille <akim@epita.fr>
11100
11101 * src/closure.c (print_closure): Improve.
11102 (closure): Use it for printing input and output.
11103
11104 2001-12-05 Akim Demaille <akim@epita.fr>
11105
11106 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
11107 indexed by nonterminals.
11108
11109 2001-12-05 Akim Demaille <akim@epita.fr>
11110
11111 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
11112 what it was!).
11113 * src/warshall.h: Remove accidental duplication of the content.
11114
11115 2001-12-05 Akim Demaille <akim@epita.fr>
11116
11117 * src/closure.c (set_fderives): De-obfuscate.
11118
11119 2001-12-05 Akim Demaille <akim@epita.fr>
11120
11121 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
11122
11123 2001-12-05 Akim Demaille <akim@epita.fr>
11124
11125 * src/closure.c (set_firsts): De-obfuscate.
11126
11127 2001-12-05 Akim Demaille <akim@epita.fr>
11128
11129 * src/output.c (action_row): De-obfuscate
11130 using the good o' techniques: arrays not pointers, variable
11131 locality, BITISSET, RESETBIT etc.
11132
11133 2001-12-05 Akim Demaille <akim@epita.fr>
11134
11135 Pessimize the code to simplify it: from now on, all the states
11136 have a valid SHIFTS, which NSHIFTS is possibly 0.
11137
11138 * src/LR0.c (shifts_new): Be global and move to..
11139 * src/state.c, src/state.h: here.
11140 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
11141 * src/print_graph: Adjust.
11142
11143 2001-12-05 Akim Demaille <akim@epita.fr>
11144
11145 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
11146 * src/conflicts.c: Use it.
11147 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
11148 incorrectly ``simplified''.
11149
11150 2001-12-05 Akim Demaille <akim@epita.fr>
11151
11152 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
11153 using the good o' techniques: arrays not pointers, variable
11154 locality, BITISSET, RESETBIT etc.
11155
11156 2001-12-05 Akim Demaille <akim@epita.fr>
11157
11158 * src/state.h (SHIFT_SYMBOL): New.
11159 * src/conflicts.c: Use it to deobfuscate.
11160
11161 2001-12-05 Akim Demaille <akim@epita.fr>
11162
11163 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
11164 (print_reductions): De-obfuscate using the good o' techniques:
11165 arrays not pointers, variable locality, BITISSET.
11166
11167 2001-12-05 Akim Demaille <akim@epita.fr>
11168
11169 * src/conflicts.c (print_reductions): Arrays, not pointers.
11170 Use BITISSET.
11171
11172 2001-12-05 Akim Demaille <akim@epita.fr>
11173
11174 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11175
11176 2001-12-05 Akim Demaille <akim@epita.fr>
11177
11178 * src/conflicts.c (print_reductions): Improve variable locality.
11179
11180 2001-12-05 Akim Demaille <akim@epita.fr>
11181
11182 * src/conflicts.c (print_reductions): Pessimize, but clarify.
11183
11184 2001-12-05 Akim Demaille <akim@epita.fr>
11185
11186 * src/conflicts.c (print_reductions): Improve variable locality.
11187
11188 2001-12-05 Akim Demaille <akim@epita.fr>
11189
11190 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
11191 * src/lalr.c: Use them.
11192
11193 2001-12-05 Akim Demaille <akim@epita.fr>
11194
11195 * src/LR0.c (augment_automaton): Formatting changes.
11196 Better variable locality.
11197
11198 2001-12-05 Akim Demaille <akim@epita.fr>
11199
11200 * src/lalr.c (matrix_print): New.
11201 (transpose): Use it.
11202 Use arrays instead of pointers.
11203
11204 2001-12-05 Akim Demaille <akim@epita.fr>
11205
11206 * src/lalr.c (maxrhs): Move to...
11207 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
11208 * src/lalr.c (build_relations): Adjust.
11209
11210 2001-12-05 Akim Demaille <akim@epita.fr>
11211
11212 * src/lalr.c (transpose): Free the memory allocated to the
11213 argument, as it is replaced by the results by the unique caller.
11214 (build_relations): Merely invoke transpose: it handles the memory
11215 deallocation.
11216 Improve variable locality.
11217 Avoid variables used as mere abbreviations.
11218 (compute_lookaheads): Use arrays instead of pointers.
11219
11220 2001-12-05 Akim Demaille <akim@epita.fr>
11221
11222 * src/lalr.c (initialize_F): Improve variable locality.
11223 Avoid variables used as mere abbreviations.
11224
11225 2001-12-05 Akim Demaille <akim@epita.fr>
11226
11227 * src/derives.c (print_derives): Display the ruleno.
11228 * src/lalr.c (initialize_F, transpose): Better variable locality
11229 to improve readability.
11230 Avoid variables used as mere abbreviations.
11231
11232 2001-12-05 Akim Demaille <akim@epita.fr>
11233
11234 * src/lalr.c (traverse): Use arrays instead of pointers.
11235
11236 2001-12-05 Akim Demaille <akim@epita.fr>
11237
11238 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
11239 the handling of squeue.
11240 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11241
11242 2001-12-05 Akim Demaille <akim@epita.fr>
11243
11244 Because useless nonterminals are now kept alive (instead of being
11245 `destroyed'), we now sometimes examine them, and store information
11246 related to them. Hence we need to know their number, and adjust
11247 memory allocations.
11248
11249 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
11250 static.
11251 * src/LR0.c (allocate_itemsets): The memory allocated to
11252 `symbol_count' was used for two different purpose: once to count
11253 the number of occurrences of each symbol, and later reassigned to
11254 `shift_symbol', containing the symbol that can be shifted from a
11255 given state.
11256 Deobfuscate, i.e., allocate, use and free `symbol_count' here
11257 only, and...
11258 (new_itemsets): Allocate `shift_symbol' here.
11259 (allocate_itemsets): symbol_count includes useless nonterminals.
11260 Make room for them.
11261 (free_storage): Use `free', not `XFREE', for pointers that cannot
11262 be null.
11263
11264 2001-12-05 Akim Demaille <akim@epita.fr>
11265
11266 * src/nullable.c (set_nullable): Deobfuscate the handling of
11267 ritem.
11268 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11269
11270 2001-12-05 Akim Demaille <akim@epita.fr>
11271
11272 * src/gram.c, src/gram.h (ritem_print): New.
11273 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
11274 (This useless function was defined only to work around VMS linkers
11275 that can't handle compilation units with variables only).
11276 * src/reduce.c (dump_grammar): Use it to trace the construction of
11277 ritem.
11278
11279 2001-12-04 Paul Eggert <eggert@twinsun.com>
11280
11281 * src/bison.simple (union yyalloc): Change member names
11282 to be the same as the stack names.
11283 (yyparse): yyptr is now union yyalloc *, not char *.
11284 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
11285 and may generate better code on some machines.
11286 (yystpcpy): Use prototype if __STDC__ is defined, not just
11287 if __cplusplus is defined.
11288
11289 2001-11-30 Akim Demaille <akim@epita.fr>
11290
11291 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
11292 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
11293 Gettext doesn't compile cleanly, and dies with -Werror.
11294 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
11295 Include WARNING_CFLAGS here.
11296 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
11297 before being defined.
11298
11299 2001-11-27 Paul Eggert <eggert@twinsun.com>
11300
11301 * lib/quotearg.h (quotearg_n, quotearg_n_style):
11302 First arg is int, not unsigned.
11303 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
11304 (SIZE_MAX, UINT_MAX): New macros.
11305 (quotearg_n_options): Abort if N is negative.
11306 Avoid overflow check on hosts where size_t is 64 bits and int
11307 is 32 bits, as overflow is impossible there.
11308 Fix off-by-one typo that caused unnecessary reallocation.
11309
11310 2001-11-29 Paul Eggert <eggert@twinsun.com>
11311
11312 Name space cleanup in generated parser.
11313
11314 * doc/bison.texinfo (Bison Parser): Discuss system headers
11315 and their effect on the user name space.
11316
11317 * src/bison.simple:
11318 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
11319 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
11320 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
11321
11322 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
11323 on user names when possible.
11324
11325 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
11326 Simplify test for whather <alloca.h> exists.
11327
11328 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
11329
11330 (<stdio.h>): Include if YYDEBUG.
11331
11332 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
11333 ! defined (yyoverflow) && ! defined (yymemcpy).
11334
11335 (yymemcpy, yyparse): Rename local variables as needed so that
11336 they all begin with 'yy'.
11337
11338 (yystrlen, yystpcpy): New functions.
11339
11340 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
11341 All uses changed.
11342
11343 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
11344 instead of relying on string.h functions. Use YYSTACK_ALLOC
11345 and YYSTACK_FREE instead of malloc and free.
11346
11347 2001-11-30 Akim Demaille <akim@epita.fr>
11348
11349 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
11350 before their first uses.
11351 (YYBISON, YYPURE): Move to the top of the output.
11352
11353 2001-11-30 Akim Demaille <akim@epita.fr>
11354
11355 * tests/reduce.at (Useless Nonterminals): Fix.
11356
11357 2001-11-30 Akim Demaille <akim@epita.fr>
11358
11359 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
11360 if body instead of `;' to pacify GCC's warnings.
11361
11362 2001-11-30 Akim Demaille <akim@epita.fr>
11363
11364 Instead of mapping the LHS of unused rules to -1, keep the LHS
11365 valid, but flag the rules as invalid.
11366
11367 * src/gram.h (rule_t): `useful' is a new member.
11368 * src/print.c (print_grammar): Adjust.
11369 * src/derives.c (set_derives): Likewise.
11370 * src/reader.c (packgram, reduce_output): Likewise.
11371 * src/reduce.c (reduce_grammar_tables): Likewise.
11372 * tests/reduce.at (Underivable Rules, Useless Rules): New.
11373
11374 2001-11-30 Akim Demaille <akim@epita.fr>
11375
11376 * src/reduce.c (reduce_output): Formatting changes.
11377 * src/print.c (print_results, print_grammar): Likewise.
11378 * tests/regression.at (Rule Line Numbers)
11379 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
11380
11381 2001-11-30 Akim Demaille <akim@epita.fr>
11382
11383 * src/reduce.c (nonterminals_reduce): Instead of throwing away
11384 useless nonterminals, move them at the end of the symbol arrays.
11385 (reduce_output): Adjust.
11386 * tests/reduce.at (Useless Nonterminals): Adjust.
11387
11388 2001-11-30 Akim Demaille <akim@epita.fr>
11389
11390 * src/reduce.c: Various comment/formatting changes.
11391 (nonterminals_reduce): New, extracted from...
11392 (reduce_grammar_tables): here.
11393 (reduce_grammar): Call nonterminals_reduce.
11394
11395 2001-11-29 Paul Eggert <eggert@twinsun.com>
11396
11397 * src/bison.simple (YYSTACK_REALLOC): Remove.
11398 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
11399 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
11400 New macros.
11401 (union yyalloc): New type.
11402 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
11403 an arbitrary restriction on hosts where size_t is wider than int.
11404
11405 (yyparse): Don't dump core if alloca or malloc fails; instead, report
11406 a parser stack overflow. Allocate just one block of memory for all
11407 three stacks, instead of allocating three blocks; this typically is
11408 faster and reduces fragmentation.
11409
11410 Do not limit the number of items in the stack to a value that fits
11411 in 'int', as this is an arbitrary limit on hosts with 64-bit
11412 size_t and 32-bit int.
11413
11414 2001-11-29 Marc Autret <autret_m@epita.fr>
11415
11416 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
11417 of defining YYERROR_VERBOSE.
11418 [AT_DATA]: $4 is now out of C declarations in the prologue.
11419
11420 2001-11-28 Marc Autret <autret_m@epita.fr>
11421
11422 * src/reader.c (parse_dquoted_param): New.
11423 (parse_skel_decl): Use it.
11424 * src/lex.h: Add its prototype.
11425 * src/lex.c (literalchar): Become not static.
11426
11427 2001-11-28 Marc Autret <autret_m@epita.fr>
11428
11429 * src/output.h: And put its extern declaration here.
11430 * src/output.c (error_verbose): Define here.
11431 (prepare): Echo name modification.
11432 * src/getargs.h: Clean its extern declaration.
11433 * src/getargs.c (error_verbose_flag): Remove.
11434 (getargs): Remove case 'e'.
11435 * src/options.c (option_table): 'error-verbose' is now seen as simple
11436 percent option.
11437 Include output.h.
11438
11439 * src/reader.c (read_declarations): Remove case tok_include.
11440 (parse_include_decl): Remove.
11441 * src/lex.h (token_t): Remove tok_include.
11442 * src/options.c (option_table): 'include' is now a simple command line
11443 option.
11444
11445 2001-11-28 Marc Autret <autret_m@epita.fr>
11446
11447 * src/bison.simple: Adjust muscle names.
11448 * src/muscle_tab.c (muscle_init): Also rename the muscles.
11449 * src/output.c (prepare): s/_/-/ for the muscles names.
11450 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
11451
11452 2001-11-28 Marc Autret <autret_m@epita.fr>
11453
11454 * src/bison.simple: Fix debug.
11455 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
11456
11457 2001-11-28 Akim Demaille <akim@epita.fr>
11458
11459 * src/LR0.c (shifts_new): New.
11460 (save_shifts, insert_start_shift, augment_automaton): Use it.
11461
11462 2001-11-28 Akim Demaille <akim@epita.fr>
11463
11464 * src/closure.c (closure): `b' and `ruleno' denote the same value:
11465 keep ruleno only.
11466
11467 2001-11-28 Akim Demaille <akim@epita.fr>
11468
11469 * src/closure.c (closure): Instead of looping over word in array
11470 then bits in words, loop over bits in array.
11471
11472 2001-11-28 Akim Demaille <akim@epita.fr>
11473
11474 * src/closure.c (closure): No longer optimize the special case
11475 where all the bits of `ruleset[r]' are set to 0, to make the code
11476 clearer.
11477
11478 2001-11-28 Akim Demaille <akim@epita.fr>
11479
11480 * src/closure.c (closure): `r' and `c' are new variables, used to
11481 de-obfuscate accesses to RULESET and CORE.
11482
11483 2001-11-28 Akim Demaille <akim@epita.fr>
11484
11485 * src/reduce.c (reduce_print): Use ngettext.
11486 (dump_grammar): Improve the trace accuracy.
11487
11488 2001-11-28 Akim Demaille <akim@epita.fr>
11489
11490 * src/reduce.c (dump_grammar): Don't translate trace messages.
11491
11492 2001-11-28 Akim Demaille <akim@epita.fr>
11493
11494 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
11495 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
11496 as all tags are free'ed afterwards.
11497 From Enrico Scholz.
11498
11499 2001-11-27 Paul Eggert <eggert@twinsun.com>
11500
11501 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
11502 use alloca when we didn't want to, and vice versa.
11503
11504 2001-11-27 Marc Autret <autret_m@epita.fr>
11505
11506 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
11507 initialization.
11508 * src/output.c (prepare): Remove its update.
11509
11510 2001-11-27 Marc Autret <autret_m@epita.fr>
11511
11512 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
11513 Use %error-verbose.
11514
11515 2001-11-27 Marc Autret <autret_m@epita.fr>
11516
11517 * src/bison.simple: Remove YYERROR_VERBOSE using.
11518 Use %%error_verbose.
11519 (yyparse): Likewise.
11520 * src/output.c (prepare): Give its final value.
11521 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
11522 * src/getargs.h: Add its extern declaration.
11523 * src/getargs.c (error_verbose_flag): New int.
11524 (getargs): Update to catch new case.
11525 * src/options.c (option_table): 'error-verbose' is a new option.
11526 (shortopts): Update.
11527
11528 2001-11-27 Akim Demaille <akim@epita.fr>
11529
11530 * src/system.h: Use intl/libgettext.h.
11531 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
11532
11533 2001-11-27 Akim Demaille <akim@epita.fr>
11534
11535 * tests/torture.at (Exploding the Stack Size with Malloc):
11536 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
11537
11538 2001-11-27 Akim Demaille <akim@epita.fr>
11539
11540 * src/files.c: Include error.h.
11541 Reported by Hans Aberg.
11542
11543 2001-11-26 Marc Autret <autret_m@epita.fr>
11544
11545 * src/reader.c (parse_include_decl): New, not yet implemented.
11546 (read_declarations): Add case tok_include.
11547 * src/getargs.h (include): Add its extern definition.
11548 * src/getargs.c (include): New const char *.
11549 (getargs): Add case '-I'.
11550 * src/options.c (option_table): Add include as command line and
11551 percent option.
11552 * src/lex.h (token_t): Add tok_include.
11553
11554 2001-11-26 Akim Demaille <akim@epita.fr>
11555
11556 * src/reader.c (readgram): Make sure rules for mid-rule actions
11557 have a lineno equal to that of their host rule.
11558 Reported by Hans Aberg.
11559 * tests/regression.at (Rule Line Numbers): New.
11560
11561 2001-11-26 Akim Demaille <akim@epita.fr>
11562
11563 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
11564 size_ts.
11565
11566 2001-11-26 Akim Demaille <akim@epita.fr>
11567
11568 * src/complain.c, src/complain.h (error): Remove, provided by
11569 lib/error.[ch].
11570
11571 2001-11-26 Akim Demaille <akim@epita.fr>
11572
11573 * src/reader.c (read_declarations): Don't abort on tok_illegal,
11574 issue an error message.
11575 * tests/regression.at (Invalid %directive): New.
11576 Reported by Hans Aberg.
11577
11578 2001-11-26 Akim Demaille <akim@epita.fr>
11579
11580 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
11581 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11582
11583 2001-11-26 Akim Demaille <akim@epita.fr>
11584
11585 * src/conflicts.c (conflicts_print): Don't complain at all when
11586 there are no reduce/reduce conflicts, and as many shift/reduce
11587 conflicts as expected.
11588 * tests/regression.at (%expect right): Adjust.
11589
11590 2001-11-23 Akim Demaille <akim@epita.fr>
11591
11592 * lib/alloca.c: Update, from fileutils.
11593
11594 2001-11-23 Akim Demaille <akim@epita.fr>
11595
11596 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
11597
11598 2001-11-23 Akim Demaille <akim@epita.fr>
11599
11600 * src/system.h: Include alloca.h.
11601 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
11602
11603 2001-11-23 Akim Demaille <akim@epita.fr>
11604
11605 * src/print_graph.c (print_actions): Remove `rule', unused.
11606 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
11607 pacify GCC's signed < unsigned warnings.
11608 * src/closure.c (itemsetsize): Likewise.
11609 * src/reader.c (symbol_list_new): Static.
11610
11611 2001-11-23 Akim Demaille <akim@epita.fr>
11612
11613 Attaching lineno to buckets is stupid, since only one copy of each
11614 symbol is kept, only the line of the first occurrence is kept too.
11615
11616 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
11617 * src/reader.c (rline_allocated): Remove, unused.
11618 (symbol_list): Have a `line' member.
11619 (symbol_list_new): New.
11620 (readgram): Use it.
11621 * src/print.c (print_grammar): Output the rule line numbers.
11622 * tests/regression.at (Solved SR Conflicts)
11623 (Unresolved SR Conflicts): Adjust.
11624 Reported by Hans Aberg.
11625
11626 2001-11-22 Marc Autret <autret_m@epita.fr>
11627
11628 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
11629
11630 2001-11-22 Marc Autret <autret_m@epita.fr>
11631
11632 * src/muscle_tab.c (muscle_init): Remove initialization of
11633 skeleton muscle.
11634 * src/output.c (output_master_parser): Do it here.
11635
11636 2001-11-20 Akim Demaille <akim@epita.fr>
11637
11638 * po/sv.po: New.
11639 * configure.in (ALL_LINGUAS): Adjust.
11640 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
11641 longer contains strings to translate.
11642
11643 2001-11-19 Akim Demaille <akim@epita.fr>
11644
11645 * src/conflicts.c (conflicts_print): Add a missing \n.
11646
11647 2001-11-19 Akim Demaille <akim@epita.fr>
11648
11649 * src/nullable.c (nullable_print): New.
11650 (set_nullable): Call it when tracing.
11651 Better locality of variables.
11652
11653 2001-11-19 Akim Demaille <akim@epita.fr>
11654
11655 * src/print.c (print_actions): Better locality of variables.
11656
11657 2001-11-19 Akim Demaille <akim@epita.fr>
11658
11659 * src/derives.c (print_derives): Fix and enrich.
11660 * src/closure.c (print_fderives): Likewise.
11661
11662 2001-11-19 Akim Demaille <akim@epita.fr>
11663
11664 * src/closure.c (itemsetend): Remove, replaced with...
11665 (itemsetsize): new.
11666
11667 2001-11-19 Akim Demaille <akim@epita.fr>
11668
11669 * src/LR0.c (kernel_end): Remove, replaced with...
11670 (kernel_size): new.
11671
11672 2001-11-19 Akim Demaille <akim@epita.fr>
11673
11674 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
11675 to clarify.
11676
11677 2001-11-19 Akim Demaille <akim@epita.fr>
11678
11679 * src/closure.c (closure): Use arrays instead of pointers to clarify.
11680
11681 2001-11-19 Akim Demaille <akim@epita.fr>
11682
11683 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
11684 trace messages.
11685 * src/LR0.c: Likewise.
11686 (allocate_itemsets): Use arrays instead of pointers to clarify.
11687
11688 2001-11-19 Akim Demaille <akim@epita.fr>
11689
11690 * src/getargs.c (statistics_flag): Replace with...
11691 (trace_flag): New.
11692 (longopts): Accept --trace instead of --statistics.
11693 * src/getargs.h, src/options.c: Adjust.
11694 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
11695 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
11696
11697 2001-11-19 Akim Demaille <akim@epita.fr>
11698
11699 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
11700 pointers to clarify the code.
11701 (save_reductions, save_shifts): Factor common parts of alternatives.
11702
11703 2001-11-19 Akim Demaille <akim@epita.fr>
11704
11705 * src/LR0.c (new_state, get_state): Complete TRACE code.
11706 * src/closure.c: Include `reader.h' to get `tags', needed by the
11707 trace code.
11708 Rename the conditional DEBUG as TRACE.
11709 Output consistently TRACEs to stderr, not stdout.
11710 * src/derives.c: Likewise.
11711 * src/reduce.c: (inaccessable_symbols): Using if is better style
11712 than goto.
11713 Use `#if TRACE' instead of `#if 0' for tracing code.
11714
11715 2001-11-19 Akim Demaille <akim@epita.fr>
11716
11717 * src/system.h (LIST_FREE, shortcpy): New.
11718 * src/LR0.c: Use them.
11719 * src/output.c (free_itemsets, free_reductions, free_shifts):
11720 Remove, replaced by LIST_FREE.
11721
11722 2001-11-19 Akim Demaille <akim@epita.fr>
11723
11724 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
11725 (REDUCTIONS_ALLOC): New.
11726 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
11727 allocation.
11728
11729 2001-11-19 Akim Demaille <akim@epita.fr>
11730
11731 * src/LR0.c (new_state): Complete trace code.
11732 * src/nullable.c (set_nullable): Don't translate traces.
11733
11734 2001-11-19 Akim Demaille <akim@epita.fr>
11735
11736 * src/print_graph.c (print_core): Better locality of variables.
11737 * src/print.c (print_core): Likewise.
11738
11739 2001-11-19 Akim Demaille <akim@epita.fr>
11740
11741 * src/vcg.c: You do the output, so you are responsible of the
11742 handling of VCG syntax, in particular: use quotearg.
11743 * src/print_graph.c: Don't.
11744 (print_actions): Don't output the actions as part of the nodes,
11745 since that's the job of the edges.
11746 (print_state): Don't output by hand: fill the node description,
11747 and ask for its output.
11748
11749 2001-11-19 Akim Demaille <akim@epita.fr>
11750
11751 * src/bison.simple (yyparse): When verbosely reporting an error,
11752 no longer put additional quotes around token names.
11753 * tests/calc.at: Adjust.
11754
11755 2001-11-19 Akim Demaille <akim@epita.fr>
11756
11757 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
11758 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
11759 * src/output.c: Adjust.
11760
11761 2001-11-19 Akim Demaille <akim@epita.fr>
11762
11763 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
11764 (rule_t): this.
11765 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
11766
11767 2001-11-19 Akim Demaille <akim@epita.fr>
11768
11769 * src/gram.h (rule_t): New.
11770 (rule_table): New.
11771 (rrhs, rlhs): Remove, part of state_t.
11772 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
11773 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11774 * src/reader.c, src/reduce.c: Adjust.
11775
11776 2001-11-19 Akim Demaille <akim@epita.fr>
11777
11778 * src/reader.c (symbols_output): New, extracted from...
11779 (packsymbols): Here.
11780 (reader): Call it.
11781
11782 2001-11-19 Akim Demaille <akim@epita.fr>
11783
11784 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
11785 (maxrhs): this new function.
11786
11787 2001-11-19 Akim Demaille <akim@epita.fr>
11788
11789 * src/lalr.c (F): New macro to access the variable F.
11790 Adjust.
11791
11792 2001-11-19 Akim Demaille <akim@epita.fr>
11793
11794 * src/lalr.h (LA): New macro to access the variable LA.
11795 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11796 * src/lalr.c: Adjust.
11797
11798 2001-11-19 Akim Demaille <akim@epita.fr>
11799
11800 * src/lalr.c (initialize_LA): Only initialize LA. Let...
11801 (set_state_table): handle the `lookaheads' members.
11802
11803 2001-11-19 Akim Demaille <akim@epita.fr>
11804
11805 * src/lalr.h (lookaheads): Removed array, whose contents is now
11806 a member of...
11807 (state_t): this structure.
11808 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11809 Adjust.
11810
11811 2001-11-19 Akim Demaille <akim@epita.fr>
11812
11813 * src/lalr.h (consistent): Removed array, whose contents is now
11814 a member of...
11815 (state_t): this structure.
11816 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11817 Adjust.
11818
11819 2001-11-19 Akim Demaille <akim@epita.fr>
11820
11821 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
11822 contents are now members of...
11823 (state_t): this structure.
11824 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11825 Adjust.
11826
11827 2001-11-19 Akim Demaille <akim@epita.fr>
11828
11829 * src/lalr.h (state_t): New.
11830 (state_table): Be a state_t * instead of a core **.
11831 (accessing_symbol): Remove, part of state_t.
11832 * src/lalr.c: Adjust.
11833 (set_accessing_symbol): Merge into...
11834 (set_state_table): this.
11835 * src/print_graph.c, src/conflicts.c: Adjust.
11836
11837 2001-11-14 Akim Demaille <akim@epita.fr>
11838
11839 * tests/calc.at, tests/output.at, tests/regression.at,
11840 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
11841 now the tests are run in private dirs, therefore AC_CLEANUP and
11842 family can be simplified to 0-ary.
11843 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
11844 use abs. path to find config.h.
11845 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
11846 stderr, there can be way too much random noise.
11847 Instead pass -Werror to GCC and rely on the exit status.
11848 Reported by Wolfram Wagner.
11849
11850 2001-11-14 Akim Demaille <akim@epita.fr>
11851
11852 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
11853 defined only if yyoverflow is defined, to avoid `warning: unused
11854 variable `yyvs1''.
11855 Reported by The Test Suite.
11856
11857 2001-11-14 Akim Demaille <akim@epita.fr>
11858
11859 * src/print.c: Include reduce.h.
11860 Reported by Hans Aberg.
11861
11862 2001-11-14 Akim Demaille <akim@epita.fr>
11863
11864 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
11865 Revert a previous patch: these are really const.
11866 * src/conflicts.c (conflict_report): Additional useless pair of
11867 braces to pacify GCC's warnings for `if () if () {} else {}'.
11868 * src/lex.c (parse_percent_token): Replace equal_offset with
11869 arg_offset.
11870 arg is const.
11871 Be sure to strdup `arg' when used, since there is no reason for
11872 token_buffer not to change.
11873
11874 2001-11-14 Akim Demaille <akim@epita.fr>
11875
11876 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
11877 definition.
11878 * src/main.c (main): Use them.
11879 Suggested by Hans Aberg.
11880
11881 2001-11-12 Akim Demaille <akim@epita.fr>
11882
11883 * src/system.h (ngettext): Now that we use ngettext, be sure to
11884 provide a default definition when NLS are not used.
11885
11886 2001-11-12 Akim Demaille <akim@epita.fr>
11887
11888 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
11889 Use @kbd to denote user input.
11890 (Language and Grammar): ANSIfy the example.
11891 Adjust its layout for info/notinfo.
11892 (Location Tracking Calc): Output error messages to stderr.
11893 Output locations in a more GNUtically correct way.
11894 Fix a couple of Englishos.
11895 Adjust @group/@end group pairs.
11896
11897 2001-11-12 Akim Demaille <akim@epita.fr>
11898
11899 %expect was not functioning at all.
11900
11901 * src/conflicts.c (expected_conflicts): Set to -1.
11902 (conflict_report): Use ngettext.
11903 (conflicts_print): Check %expect and make its violation an error.
11904 * doc/bison.texinfo (Expect Decl): Adjust.
11905 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
11906 * tests/regression.at (%expect not enough, %expect right)
11907 (%expect too much): New.
11908
11909 2001-11-12 Akim Demaille <akim@epita.fr>
11910
11911 * tests/regression.at (Conflicts): Rename as...
11912 (Unresolved SR Conflicts): this.
11913 (Solved SR Conflicts): New.
11914
11915 2001-11-12 Akim Demaille <akim@epita.fr>
11916
11917 * src/reduce.c (print_results): Rename as...
11918 (reduce_output): This.
11919 Output to OUT, passed as argument, instead of output_obstack.
11920 (dump_grammar): Likewise.
11921 (reduce_free): New.
11922 Also free V1.
11923 (reduce_grammar): No longer call reduce_output, since...
11924 * src/print.c (print_results): do it.
11925 * src/main.c (main): Call reduce_free;
11926
11927 2001-11-12 Akim Demaille <akim@epita.fr>
11928
11929 * src/conflicts.c (print_reductions): Accept OUT as argument.
11930 Output to it, not to output_obstack.
11931 * src/print.c (print_actions): Adjust.
11932
11933 2001-11-12 Akim Demaille <akim@epita.fr>
11934
11935 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
11936 the result instead of using...
11937 (src_total, rrc_total, src_count, rrc_count): Remove.
11938 (any_conflicts): Remove.
11939 (print_conflicts): Split into...
11940 (conflicts_print, conflicts_output): New.
11941 * src/conflicts.h: Adjust.
11942 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
11943 * src/print.c (print_grammar): Issue `\n' between two rules.
11944 * tests/regression.at (Conflicts): New.
11945 Reported by Tom Lane.
11946
11947 2001-11-12 Akim Demaille <akim@epita.fr>
11948
11949 * tests/regression.at (Invalid input): Remove, duplicate with
11950 ``Invalid input: 1''.
11951
11952 2001-11-12 Akim Demaille <akim@epita.fr>
11953
11954 * tests/torture.at (AT_DATA_STACK_TORTURE)
11955 (Exploding the Stack Size with Alloca)
11956 (Exploding the Stack Size with Malloc): New.
11957
11958 2001-11-12 Akim Demaille <akim@epita.fr>
11959
11960 * src/bison.simple (YYSTACK_REALLOC): New.
11961 (yyparse) [!yyoverflow]: Use it and free the old stack.
11962 Reported by Per Allansson.
11963
11964 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
11965
11966 * src/bison.simple: Define type yystype instead of YYSTYPE, and
11967 define CPP macro, which substitute YYSTYPE by yystype.
11968 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
11969 with yyltype/YYLTYPE. This allows inclusion of the generated
11970 header within the parser if the compiler, such as GGC, accepts
11971 multiple equivalent #defines.
11972 From Akim.
11973
11974 2001-11-05 Akim Demaille <akim@epita.fr>
11975
11976 * src/reader.c (symbols_output): New, extracted from...
11977 (packsymbols): here.
11978 (reader): Adjust.
11979
11980 2001-11-05 Akim Demaille <akim@epita.fr>
11981
11982 * src/lex.c (parse_percent_token): s/quotearg/quote/.
11983
11984 2001-11-05 Akim Demaille <akim@epita.fr>
11985
11986 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
11987 pattern.
11988
11989 2001-11-05 Akim Demaille <akim@epita.fr>
11990
11991 * src/options.h (struct option_table_struct): set_flags is void*.
11992 * src/options.c (longopts): Support `--output' and `%output'.
11993 (usage): Adjust.
11994 * src/lex.h (tok_setopt): Remove, replaced with...
11995 (tok_intopt, tok_stropt): these new guys.
11996 * src/lex.c (getopt.h): Not needed.
11997 (token_buffer, unlexed_token_buffer): Not const.
11998 (percent_table): Promote `-' over `_' in directive names.
11999 Active `%name-prefix', `file-prefix', and `output'.
12000 (parse_percent_token): Accept possible arguments to directives.
12001 Promote `-' over `_' in directive names.
12002
12003 2001-11-04 Akim Demaille <akim@epita.fr>
12004
12005 * doc/bison.texinfo (Decl Summary): Split the list into
12006 `directives for grammars' and `directives for bison'.
12007 Sort'em.
12008 Add description of `%name-prefix', `file-prefix', and `output'.
12009 Promote `-' over `_' in directive names.
12010 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
12011 Simplify the description of `--name-prefix'.
12012 Promote `-' over `_' in directive names.
12013 Promote `--output' over `--output-file'.
12014 Fix the description of `--defines'.
12015 * tests/output.at: Exercise %file-prefix and %output.
12016
12017 2001-11-02 Akim Demaille <akim@epita.fr>
12018
12019 * doc/refcard.tex: Update.
12020
12021 2001-11-02 Akim Demaille <akim@epita.fr>
12022
12023 * src/symtab.h (SUNDEF): New.
12024 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
12025 stand for `uninitialized', instead of 0.
12026 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
12027 * src/lex.c (lex): Adjust.
12028
12029 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
12030 Number it 0.
12031 Let yylex return it instead of a plain 0.
12032 Reported by Dick Streefland.
12033
12034 2001-11-02 Akim Demaille <akim@epita.fr>
12035
12036 * tests/regression.at (Mixing %token styles): New test.
12037
12038 2001-11-02 Akim Demaille <akim@epita.fr>
12039
12040 * src/reader.c (parse_thong_decl): Formatting changes.
12041 (token_translations_init): New, extracted from...
12042 (packsymbols): Here.
12043 Adjust.
12044
12045 2001-11-01 Akim Demaille <akim@epita.fr>
12046
12047 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
12048 Check that `9foo.y' produces correct cpp guards.
12049 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
12050 guards.
12051 Reported by Wwp.
12052
12053 2001-11-01 Akim Demaille <akim@epita.fr>
12054
12055 * tests/regression.at (Invalid input: 2): New.
12056 * src/lex.c (unlexed_token_buffer): New.
12057 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
12058 too.
12059 Reported by Wwp.
12060
12061 2001-11-01 Akim Demaille <akim@epita.fr>
12062
12063 * tests/calc.at: Catch up with 1.30.
12064 * configure.in: Bump to 1.49a.
12065 Adjust to newer Autotest.
12066
12067 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
12068
12069 * src/conflicts.c: Move global variables rrc_total and src_total ...
12070 (print_conflicts): here.
12071 * src/output.c (output): Free global variable user_toknums.
12072 * src/lex.c (token_obstack): Become static.
12073
12074 2001-10-18 Akim Demaille <akim@epita.fr>
12075
12076 * tests/atlocal.in (GCC): Add.
12077 * tests/calc.at: s/m4_match/m4_bmatch/.
12078 s/m4_patsubst/m4_bpatsubst/.
12079 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
12080 * configure.in: AC_SUBST(GCC).
12081
12082 2001-10-14 Marc Autret <autret_m@epita.fr>
12083
12084 * src/options.c (create_long_option_table): Fix.
12085
12086 2001-10-10 Akim Demaille <akim@epita.fr>
12087
12088 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
12089
12090 2001-10-04 Akim Demaille <akim@epita.fr>
12091
12092 * src/reader.c (parse_union_decl): Push the caracters in
12093 union_obstack, not attrs_obstack.
12094
12095 2001-10-04 Akim Demaille <akim@epita.fr>
12096
12097 Merge in the branch 1.29.
12098
12099 * src/reader.c (packsymbols): Use a temporary obstack for
12100 `%%tokendef', since output_stack is already used elsewhere.
12101
12102 2001-10-02 Akim Demaille <akim@epita.fr>
12103
12104 Bump 1.29d.
12105
12106 2001-10-02 Akim Demaille <akim@epita.fr>
12107
12108 Version 1.29c.
12109
12110 2001-10-02 Akim Demaille <akim@epita.fr>
12111
12112 * tests/regression.at (Invalid CPP headers): New.
12113 From Alexander Belopolsky.
12114 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
12115
12116 2001-10-02 Akim Demaille <akim@epita.fr>
12117
12118 * tests/regression.at (Invalid input): New.
12119 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
12120 Reported by Shura.
12121
12122 2001-10-02 Akim Demaille <akim@epita.fr>
12123
12124 * tests/calc.at: Now that --debug works, the tests must be adjusted.
12125
12126 2001-10-02 Akim Demaille <akim@epita.fr>
12127
12128 * src/output.c (output_parser): Assert `skeleton'.
12129 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
12130 systems.
12131 From Shura.
12132
12133 2001-10-01 Marc Autret <autret_m@epita.fr>
12134
12135 * src/lex.h: Echo modifications.
12136 * src/lex.c (unlex): Parameter is now token_t.
12137 From Hans Aberg.
12138
12139 2001-10-01 Marc Autret <autret_m@epita.fr>
12140
12141 * src/main.c: Include lex.h.
12142 From Hans Aberg.
12143
12144 2001-09-29 Akim Demaille <akim@epita.fr>
12145
12146 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
12147
12148 2001-09-28 Akim Demaille <akim@epita.fr>
12149
12150 * tests/testsuite.at: Update to newer Autotest.
12151 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
12152
12153 2001-09-27 Akim Demaille <akim@epita.fr>
12154
12155 Position independent wrapper.
12156
12157 * tests/bison: Remove.
12158 * tests/bison.in: New.
12159 * configure.in: Adjust.
12160
12161 2001-09-27 Paul Eggert <eggert@twinsun.com>
12162
12163 Port quotearg fixes from tar 1.13.24.
12164
12165 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
12166 tm to be declared.
12167 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
12168 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
12169
12170 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
12171 * m4/mbrtowc.m4: New file.
12172 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
12173 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
12174
12175 2001-09-27 Akim Demaille <akim@epita.fr>
12176
12177 Bump to 1.29c.
12178
12179 2001-09-27 Akim Demaille <akim@epita.fr>
12180
12181 Version 1.29b.
12182
12183 2001-09-25 Akim Demaille <akim@epita.fr>
12184
12185 * src/system.h: Include `xalloc.h'.
12186 Remove it from the C files.
12187 * src/files.c (output_files): Free the obstacks.
12188 * src/lex.c (init_lex): Rename as...
12189 (lex_init): this.
12190 (lex_free): New.
12191 * src/main.c (main): Use it.
12192
12193 2001-09-24 Marc Autret <autret_m@epita.fr>
12194
12195 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
12196 to output informations in fout (FILE*).
12197 (open_graph, close_graph): Likewise.
12198 (output_graph, output_edge, output_node): Likewise.
12199 * src/vcg.h: Update function prototypes.
12200 * src/print_graph.c (print_graph): Open output graph file.
12201 (print_actions): Adjust.
12202 * src/files.h: Remove extern declaration.
12203 * src/files.c: Remove graph_obstack declaration.
12204 (open_files): Remove graph_obstack initialization.
12205 (output_files): Remove graph_obstack saving.
12206
12207 2001-09-24 Marc Autret <autret_m@epita.fr>
12208
12209 * src/files.c (compute_output_file_names): Fix.
12210
12211 2001-09-24 Marc Autret <autret_m@epita.fr>,
12212 Akim Demaille <akim@epita.fr>
12213
12214 * src/reader.c (reader): Remove call to free_symtab ().
12215 * src/main.c (main): Call it here.
12216 Include symtab.h.
12217 * src/conflicts.c (initialize_conflicts): Rename as...
12218 (solve_conflicts): this.
12219 * src/print.c (print_core, print_actions, print_state)
12220 (print_grammar): Dump to a file instead a `output_obstack'.
12221 (print_results): Dump `output_obstack', and then proceed with the
12222 FILE *.
12223 * src/files.c (compute_output_file_names, close_files): New.
12224 (output_files): Adjust.
12225 * src/main.c (main): Adjust.
12226
12227 2001-09-23 Marc Autret <autret_m@epita.fr>
12228
12229 * src/files.c (compute_header_macro): Computes header macro name
12230 from spec_defines_file when given.
12231
12232 2001-09-23 Marc Autret <autret_m@epita.fr>
12233
12234 * src/files.c (output_files): Add default extensions.
12235
12236 2001-09-22 Akim Demaille <akim@epita.fr>
12237
12238 * src/conflicts.c (finalize_conflicts): Rename as...
12239 (free_conflicts): this.
12240
12241 2001-09-22 Akim Demaille <akim@epita.fr>
12242
12243 * src/gram.c (gram_free): Rename back as...
12244 (dummy): this.
12245 (output_token_translations): Free `token_translations'.
12246 * src/symtab.c (free_symtab): Free the tag field.
12247
12248 2001-09-22 Akim Demaille <akim@epita.fr>
12249
12250 Remove `translations' as it is always set to true.
12251
12252 * src/gram.h: Adjust.
12253 * src/reader.c (packsymbols, parse_token_decl): Adjust
12254 * src/print.c (print_grammar): Adjust.
12255 * src/output.c (output_token_translations): Adjust.
12256 * src/lex.c (lex): Adjust.
12257 * src/gram.c: Be sure the set pointers to NULL.
12258 (dummy): Rename as...
12259 (gram_free): this.
12260
12261 2001-09-22 Akim Demaille <akim@epita.fr>
12262
12263 * configure.in: Invoke AM_LIB_DMALLOC.
12264 * src/system.h: Use dmalloc.
12265 * src/LR0.c: Be sure to have pointers initialized to NULL.
12266 (allocate_itemsets): Allocate kernel_items only if needed.
12267
12268 2001-09-22 Akim Demaille <akim@epita.fr>
12269
12270 * configure.in: Bump to 1.29b.
12271 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
12272 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
12273 need xmalloc.c in calc.y.
12274 From Pascal Bart.
12275
12276 2001-09-21 Akim Demaille <akim@epita.fr>
12277
12278 Version 1.29a.
12279 * Makefile.maint, config/config.guess, config/config.sub,
12280 * config/missing: Update from masters.
12281 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
12282 upon package.m4.
12283 * configure.in (ALL_LINGUAS): Add `tr'.
12284
12285 2001-09-21 Akim Demaille <akim@epita.fr>
12286
12287 * tests/Makefile.am (package.m4): Move to...
12288 ($(srcdir)/$(TESTSUITE)): here.
12289
12290 2001-09-20 Akim Demaille <akim@epita.fr>
12291
12292 * src/complain.c: No longer try to be standalone: use system.h.
12293 Don't assume __STDC__ is defined to 1. Just test if it is defined.
12294 * src/complain.h: Likewise.
12295 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
12296 Remove the unused variable `n'.
12297 From Albert Chin-A-Young.
12298
12299 2001-09-18 Marc Autret <autret_m@epita.fr>
12300
12301 * doc/bison.1: Update.
12302 * doc/bison.texinfo (Bison Options): Update --defines and --graph
12303 descriptions.
12304 (Option Cross Key): Update.
12305 Add --graph.
12306
12307 2001-09-18 Marc Autret <autret_m@epita.fr>
12308
12309 * tests/regression.at: New test (comment in %union).
12310
12311 2001-09-18 Marc Autret <autret_m@epita.fr>
12312
12313 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
12314 do that.
12315 Reported by Keith Browne.
12316
12317 2001-09-18 Marc Autret <autret_m@epita.fr>
12318
12319 * tests/output.at: Add tests for --defines and --graph.
12320
12321 2001-09-18 Marc Autret <autret_m@epita.fr>
12322
12323 * tests/output.at: Removes tests of %{header,src}_extension features.
12324
12325 2001-09-18 Akim Demaille <akim@epita.fr>
12326
12327 * tests/Makefile.am (package.m4): New.
12328 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
12329 (_AT_CHECK_CALC_ERROR): Likewise.
12330 Factor the `, ' part of verbose error messages.
12331
12332 2001-09-18 Marc Autret <autret_m@epita.fr>
12333
12334 * src/getargs.c (longopts): Declare --defines and --graph as options
12335 with optional arguments.
12336 * src/files.h: Add extern declarations.
12337 * src/files.c (spec_graph_file, spec_defines_file): New.
12338 (output_files): Update.
12339 Remove CPP-outed code.
12340
12341 2001-09-18 Marc Autret <autret_m@epita.fr>
12342
12343 Turn off %{source,header}_extension feature.
12344
12345 * src/files.c (compute_exts_from_gf): Update.
12346 (compute_exts_from_src): Update.
12347 (output_files): CPP-out useless code.
12348 * src/files.h: Remove {header,source}_extension extern declarations.
12349 * src/reader.c (parse_dquoted_param): CPP-out.
12350 (parse_header_extension_decl): Remove.
12351 (parse_source_extension_decl): Remove.
12352 (read_declarations): Remove cases tok_{hdrext,srcext}.
12353 * src/lex.c (percent_table): Remove {header,source}_extension entries.
12354 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
12355
12356 2001-09-10 Akim Demaille <akim@epita.fr>
12357
12358 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
12359 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
12360 (AT_CHECK_OUTPUT): this.
12361 Merely check ls' exit status, its output is useless.
12362
12363 2001-09-10 Akim Demaille <akim@epita.fr>
12364
12365 * tests/calc.at: Use m4_match.
12366 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
12367
12368 2001-09-10 Marc Autret <autret_m@epita.fr>,
12369 Akim Demaille <akim@epita.fr>
12370
12371 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
12372 enum color_e.
12373 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
12374 to `normal'.
12375 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
12376 * src/lex.h: Adjust prototype.
12377 (token_t): Add `tok_undef'.
12378 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
12379 (parse_percent_token): Now returns token_t.
12380 Add default statement in switch.
12381 (lex): Separate `c' as an input variable, from the token_t result
12382 part.
12383 (unlexed): Is a token_t.
12384
12385 2001-09-10 Akim Demaille <akim@epita.fr>
12386
12387 * configure.in: Bump to 1.29a.
12388
12389 2001-09-07 Akim Demaille <akim@epita.fr>
12390
12391 Version 1.29.
12392
12393 2001-08-30 Akim Demaille <akim@epita.fr>
12394
12395 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
12396 * m4/atconfig.m4: Remove.
12397 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
12398 * tests/bison: New.
12399 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
12400 m4_if, m4_patsubst, and m4_regexp.
12401 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
12402 `input' file instead of echo.
12403
12404 2001-08-29 Akim Demaille <akim@epita.fr>
12405
12406 Bump to 1.28e.
12407
12408 2001-08-29 Akim Demaille <akim@epita.fr>
12409
12410 Version 1.28d.
12411
12412 2001-08-29 Paul Eggert <eggert@twinsun.com>
12413
12414 * src/bison.simple (yyparse): Don't take the address of an
12415 item before the start of an array, as that doesn't conform to
12416 the C Standard.
12417
12418 2001-08-29 Robert Anisko <anisko_r@epita.fr>
12419
12420 * doc/bison.texinfo (Location Tracking Calc): New node.
12421
12422 2001-08-29 Paul Eggert <eggert@twinsun.com>
12423
12424 * src/output.c (output): Do not define const, as this now
12425 causes more problems than it cures.
12426
12427 2001-08-29 Akim Demaille <akim@epita.fr>
12428
12429 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
12430 the nodes.
12431 Be sure to tag the `detailmenu'.
12432
12433 2001-08-29 Akim Demaille <akim@epita.fr>
12434
12435 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
12436 download in a tmp dir.
12437
12438 2001-08-28 Marc Autret <autret_m@epita.fr>
12439
12440 * config/depcomp: New file.
12441
12442 2001-08-28 Marc Autret <autret_m@epita.fr>
12443
12444 * doc/bison.1 (mandoc): Adjust.
12445 From Juan Manuel Guerrero.
12446
12447 2001-08-28 Marc Autret <autret_m@epita.fr>
12448
12449 * src/print_graph.c (print_state): Fix.
12450
12451 2001-08-27 Marc Autret <autret_m@epita.fr>
12452
12453 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
12454 char * members.
12455 Echo modifications to the functions prototypes.
12456 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
12457
12458 2001-08-27 Marc Autret <autret_m@epita.fr>
12459
12460 * src/vcg.c: Include `xalloc.h'.
12461 (add_colorentry): New.
12462 (add_classname): New.
12463 (add_infoname): New.
12464 * src/vcg.h: Add new prototypes.
12465
12466 2001-08-27 Akim Demaille <akim@epita.fr>
12467
12468 * Makefile.maint: Sync. again with CVS Autoconf.
12469
12470 2001-08-27 Akim Demaille <akim@epita.fr>
12471
12472 * Makefile.maint: Formatting changes.
12473 (po-update, cvs-update, update): New targets.
12474 (AMTAR): Remove.
12475
12476 2001-08-27 Akim Demaille <akim@epita.fr>
12477
12478 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12479 * Makefile.maint: Sync. with CVS Autoconf.
12480
12481 2001-08-27 Marc Autret <autret_m@epita.fr>
12482
12483 * src/vcg.h (struct infoname_s): New.
12484 (struct colorentry_s): New.
12485 (graph_s): New fields {vertical,horizontal}_order in structure.
12486 Add `infoname' field.
12487 Add `colorentry' field;
12488 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
12489 (G_HORIZONTAL_ORDER): New.
12490 (G_INFONAME): New.
12491 (G_COLORENTRY): New.
12492 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
12493 Add output of `infoname'.
12494 Add output of `colorentry'.
12495
12496 2001-08-27 Marc Autret <autret_m@epita.fr>
12497
12498 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
12499 This one shadowed a global parameter.
12500
12501 2001-08-24 Marc Autret <autret_m@epita.fr>
12502
12503 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
12504 instead of `unsigned'.
12505 (print_state): Do not call obstack_object_size () in obstack_grow ()
12506 to avoid macro variables shadowing.
12507
12508 2001-08-23 Marc Autret <autret_m@epita.fr>
12509
12510 * src/lex.c (percent_table): Typo: s/naem/name/.
12511 Add graph option.
12512 Normalize new options declarations.
12513
12514 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
12515
12516 * tests/suite.at: Exercise %header_extension and %source_extension.
12517
12518 2001-08-16 Marc Autret <autret_m@epita.fr>
12519
12520 * src/reader.c (parse_dquoted_param): New.
12521 (parse_header_extension_decl): Use it.
12522 (parse_source_extension_decl): Likewise.
12523
12524 2001-08-16 Marc Autret <autret_m@epita.fr>
12525
12526 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
12527 (get_xxxx_str): Use assert () instead of complain ().
12528 Remove return invokations in default cases.
12529 (get_decision_str): Modify default behaviour. Remove second argument.
12530 Echo modifications on calls.
12531 (output_graph): Fix.
12532
12533 2001-08-16 Marc Autret <autret_m@epita.fr>
12534
12535 * src/getargs.c (usage): Update with ``-g, --graph''.
12536
12537 2001-08-16 Marc Autret <autret_m@epita.fr>
12538
12539 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
12540 (Option Cross Key): Likewise.
12541 * doc/bison.1: Update.
12542
12543 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
12544
12545 * src/output.c (output_master_parser): Don't finish action_obstack.
12546 (output_parser): Don't care about the muscle action, here.
12547 (prepare): Copy the action_obstack in the action muscle.
12548 (output): Free action_obstack.
12549
12550 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
12551
12552 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
12553 will contain `%union' declaration.
12554 (parse_union_decl): Delete #line directive output.
12555 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
12556 informations about %union.
12557 (parse_union_decl): Copy the union_obstack in the muscle stype.
12558 * src/bison.simple: Add new #line directive.
12559 Add typdef %%stype YYSTYPE.
12560
12561 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
12562
12563 * src/bison.simple: Add new `#line' directive.
12564
12565 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
12566
12567 * src/bison.simple: New `#line' directive.
12568 * src/output.c (output_parser): Support new dynamic muscle input_line.
12569
12570 2001-09-22 Marc Autret <autret_m@epita.fr>
12571
12572 * src/output.c (output_master_parser): New.
12573 (output_parser): Be more re-entrant.
12574
12575 2001-09-21 Marc Autret <autret_m@epita.fr>
12576
12577 * src/reader.c (copy_definition, parse_union_decl): Update and use
12578 `linef' muscle.
12579 (copy_action): Likewise.
12580 Use obstack_1grow ().
12581 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
12582
12583 2001-09-21 Marc Autret <autret_m@epita.fr>
12584
12585 * src/options.c (option_table): Adjust.
12586 * src/lex.c (parse_percent_token): Fix.
12587
12588 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
12589
12590 * src/options.c (symtab.h): Include it, need by lex.h.
12591
12592 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
12593
12594 * src/lex.c (parse_percent_token): Change type of variable `tx', which
12595 is now an option_table_struct*.
12596 (option_strcmp): New function option_strcmp.
12597 (parse_percent_token): Call option_strcmp.
12598 * src/getargs.c (xalloc.h, options.h): Include it.
12599 (getargs): Call create_long_option_table.
12600 (getargs): Free longopts at the end of the function.
12601 (shortopts): Move in options.c.
12602 * src/options.c (create_long_option_table): New function. Convert
12603 information from option_table to option structure.
12604 * src/reader.c (options.h): Include it.
12605
12606 * src/Makefile.am: Adjust.
12607 * src/options.c (option_table): Create from longopts and percent_table.
12608 * src/getargs.c (longopts): Delete.
12609 * src/lex.c (struct percent_table_struct): Delete.
12610 (percent_table): Delete.
12611 (options.h): Include it.
12612 * src/options.c: Create.
12613 * src/options.h: Create.
12614 Declare enum opt_access_e.
12615 Define struct option_table_struct.
12616
12617 2001-09-20 Marc Autret <autret_m@epita.fr>
12618
12619 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
12620 sections of Bison.
12621
12622 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
12623
12624 * src/bison.simple: s/%%filename/%%skeleton.
12625 * src/muscle_tab.c (getargs.h): Include it.
12626 (muscle_init): Insert new muscle skeleton.
12627
12628 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
12629
12630 * src/output.c (output_parser): Delete unused variable actions_dumped.
12631
12632 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
12633
12634 * src/output.c (output): Delete call to reader_output_yylsp.
12635 * src/reader.c (reader): Likewise.
12636 * src/reader.h: Delete declaration of reader_output_yylsp.
12637
12638 2001-09-02 Marc Autret <autret_m@epita.fr>
12639
12640 * src/reader.c: Include muscle_tab.h.
12641 (parse_union_decl): Update.
12642 (parse_macro_decl): Rename parse_muscle_decl.
12643 Update to use renamed functions and variable.
12644 (read_declarations, copy_action, read_additionnal_code, : Updated
12645 with correct variables and functions names.
12646 (packsymbols, reader): Likewise.
12647
12648 * src/reader.h (muscle_obstack): Extern declaration update.
12649
12650 * src/output.c: Include muscle_tab.h
12651 In all functions using macro_insert, change by using muscle_insert ().
12652 (macro_obstack): Rename muscle_obstack.
12653 Echo modifications in the whole file.
12654 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
12655 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
12656 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
12657
12658 * src/muscle_tab.h: Update double inclusion macros.
12659 (macro_entry_s): Rename muscle_entry_s.
12660 Update prototypes.
12661
12662 * src/muscle_tab.c: Include muscle_tab.h.
12663 Rename macro_tabble to muscle_table.
12664 (mhash1, mhash2, mcmp): Use muscle_entry.
12665 (macro_init): Rename muscle_init. Update.
12666 (macro_insert): Rename muscle_insert. Update.
12667 (macro_find): Rename muscle_find. Update.
12668
12669 * src/main.c: Include muscle_tab.h.
12670 (main): Call muscle_init ().
12671 * src/Makefile.am (bison_SOURCES): Echo modifications.
12672
12673 2001-09-02 Marc Autret <autret_m@epita.fr>
12674
12675 Now the files macro_tab.[ch] are named muscle_tab.[ch].
12676
12677 * src/muscle_tab.c, src/muscle_tab.h: Add files.
12678
12679 2001-09-02 Marc Autret <autret_m@epita.fr>
12680
12681 * src/macrotab.c, src/macrotab.h: Remove.
12682
12683 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
12684
12685 * src/reader.c (copy_guard): Use muscle to specify the `#line'
12686 filename.
12687
12688 2001-09-01 Marc Autret <autret_m@epita.fr>
12689
12690 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
12691 to an explicit value to activate the feature. We do it here.
12692
12693 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12694
12695 * src/output.c (prepare): Delete the `filename' muscule insertion.
12696 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
12697 (parse_union_decl): Likewise.
12698 * src/macrotab.c (macro_init): Initialize filename by infile.
12699
12700 2001-08-31 Marc Autret <autret_m@epita.fr>
12701
12702 * src/bison.simple (YYLSP_NEEDED): New definition.
12703 * src/output.c (prepare): Add macro insertion of `locations_flag'
12704
12705 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12706
12707 * src/output.c (prepare): Delete insertion of previous muscles,
12708 and insert the `prefix' muscles.
12709 * src/macrotab.c (macro_init): Likewise.
12710 (macro_init): Initialization prefix directive by `yy'.
12711 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
12712 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
12713 yylval, yydebug, yyerror, yynerrs and yyparse.
12714 New directive `#define' to substitute yydebug, ... with option
12715 name_prefix.
12716
12717 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12718
12719 * src/main.c (main): Standardize.
12720 * src/output.c (output_table_data, output_parser): Likewise.
12721 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
12722
12723 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
12724
12725 * src/reader.c (read_additionnal_code): Rename %%user_code to
12726 %%epilogue.
12727 * src/output.c (output): Rename %%declarations to %%prologue.
12728 * src/bison.simple: Echo modifications.
12729
12730 2001-08-31 Marc Autret <autret_m@epita.fr>
12731
12732 * src/reader.c (readgram): CleanUp.
12733 (output_token_defines): Likewise.
12734 (packsymbols): Likewise.
12735 (reader): Likewise.
12736 * src/output.c (output): CPP-out useless code.
12737
12738 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12739
12740 * src/reader.c (reader): Delete obsolete call to function
12741 output_trailers and output_headers.
12742 * src/output.h: Remove obsolete functions prototypes of output_headers
12743 and output_trailers.
12744
12745 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
12746
12747 * src/main.c: Include macrotab.h.
12748 * src/macrotab.h (macro_entry_s): Constify fields.
12749 Adjust functions prototypes.
12750 * src/macrotab.c (macro_insert): Constify key and value.
12751 (macro_find): Constify key.
12752 (macro_insert): Include 'xalloc.h'
12753 (macro_insert): Use XMALLOC.
12754 (macro_find): Constify return value.
12755 * src/output.c (output_table_data): Rename table to table_data.
12756 (output_parser): Constify macro_key, macro_value.
12757
12758 2001-08-30 Marc Autret <autret_m@epita.fr>
12759
12760 * src/reader.c (parse_skel_decl): New.
12761 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
12762 * src/lex.h (token_t): New token `tok_skel'.
12763 * src/lex.c (percent_table): Add skeleton option entry.
12764 Standardize.
12765
12766 2001-08-29 Marc Autret <autret_m@epita.fr>
12767
12768 * src/bison.simple: Add %%user_code directive at the end.
12769 * src/reader.c (read_additionnal_code): New.
12770 (reader): Use it.
12771 * src/output.c (output_program): Remove.
12772 (output): Update.
12773
12774 2001-08-28 Marc Autret <autret_m@epita.fr>
12775
12776 * src/output.c (output_actions): Clean up.
12777 (output_gram): CPP-out useless code.
12778 * src/reader.c (reader): Clean up, CPP-out useless code.
12779
12780 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
12781
12782 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
12783 directive.
12784 * src/bison.simple: Add `%%definitions'.
12785
12786 2001-08-28 Marc Autret <autret_m@epita.fr>
12787
12788 * config/depcomp: New file.
12789
12790 2001-08-27 Paul Eggert <eggert@twinsun.com>
12791
12792 * src/bison.simple (yyparse): Don't take the address of an
12793 item before the start of an array, as that doesn't conform to
12794 the C Standard.
12795
12796 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12797
12798 * src/output.c (output): Remove the initialization of the macro
12799 obstack. It was done too late here.
12800
12801 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
12802 completely wrong.
12803 (reader): Initialize the macro obstack here, since we need it to grow
12804 '%define' directives.
12805
12806 * src/reader.h: Declare the macro obstack as extern.
12807
12808 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12809
12810 * src/output.c (output_parser): Fix. Store single '%' characters in
12811 the output obstack instead of throwing them away.
12812
12813 2001-08-27 Akim Demaille <akim@epita.fr>
12814
12815 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12816
12817 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12818
12819 * lib/Makefile.am: Adjust.
12820
12821 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12822
12823 * src/bison.simple: Update and add '%%' directives.
12824
12825 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12826
12827 * src/reader.c (reader): Remove calls to 'output_headers' and
12828 'output_trailers'. Remove some C output.
12829 (readgram): Disable a piece of code that was writing a default
12830 definition for 'YYSTYPE'.
12831 (reader_output_yylsp): Remove.
12832 (packsymbols): Output token defintions to a macro.
12833 (copy_definition): Disable C output.
12834
12835 * src/reader.c (parse_macro_decl): New function used to parse macro
12836 declarations.
12837 (copy_string2): Put the body of copy_string into this new function.
12838 Add a parameter to let the caller choose whether he wants to copy the
12839 string delimiters or not.
12840 (copy_string): Be a simple call to copy_string2 with the last argument
12841 bound to true.
12842 (read_declarations): Add case for macro definition.
12843 (copy_identifier): New.
12844 (parse_macro_decl): Read macro identifiers using copy_identifier
12845 rather than lex.
12846
12847 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12848
12849 * src/output.c (prepare): Add prefixed names.
12850 (output_parser): Output semantic actions.
12851 (output_parser): Fix bug on '%%line' directives.
12852
12853 * src/output.c (output_headers): Remove. The C code printed by this
12854 function should now be in the skeletons.
12855 (output_trailers): Remove.
12856 (output): Disable call to 'reader_output_yylsp'.
12857 (output_rule_data): Do not output tables to the table obstack.
12858
12859 * src/output.c: Remove some C dedicated output.
12860 Improve the use of macro and output obstacks.
12861 (output_defines): Remove.
12862
12863 * src/output.c (output_token_translations): Associate 'translate'
12864 table with a macro. No output to the table obstack.
12865 (output_gram): Same for 'rhs' and 'prhs'.
12866 (output_stos): Same for 'stos'.
12867 (output_rule_data): Same for 'r1' and 'r2'.
12868 (token_actions): Same for 'defact'.
12869 (goto_actions): Same for 'defgoto'.
12870 (output_base): Same for 'pact' and 'pgoto'.
12871 (output_table): Same for 'table'.
12872 (output_check): Same for 'check'.
12873
12874 * src/output.c (output_table_data): New function.
12875 (output_short_table): Remove.
12876 (output_short_or_char_table): Remove.
12877
12878 * src/output.c (output_parser): Replace most of the skeleton copy code
12879 with something new. Skeletons are now processed character by character
12880 rather than line by line, and Bison looks for '%%' macros. This is the
12881 first step in making Bison's output process (a lot) more flexible.
12882 (output_parser): Use the macro table.
12883
12884 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12885
12886 * src/main.c (main): Initialize the macro table.
12887
12888 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12889
12890 * src/lex.c (percent_table): Add tok_define.
12891 * src/lex.h: Add tok_define.
12892
12893 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12894
12895 * src/macrotab.c: New file.
12896 * src/macrotab.h: New file.
12897 * src/Makefile.am: Update.
12898
12899 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12900
12901 * lib/hash.c: New file.
12902 * lib/hash.h: New file.
12903 * lib/Makefile.am: Update.
12904
12905 2001-08-15 Akim Demaille <akim@epita.fr>
12906
12907 Version 1.28c.
12908
12909 2001-08-15 Marc Autret <autret_m@epita.fr>
12910
12911 * src/reader.c (readgram): Indent output macro YYSTYPE.
12912 (packsymbols): Likewise.
12913 (output_token_defines): Likewise.
12914 * src/files.c: Standardize.
12915 (compute_header_macro): New.
12916 (defines_obstack_save): New. Use compute_header_macro.
12917 (output_files): Update. Use defines_obstack_save.
12918
12919 2001-08-15 Akim Demaille <akim@epita.fr>
12920
12921 * doc/bison.texinfo (Table of Symbols): Document
12922 YYSTACK_USE_ALLOCA.
12923
12924 2001-08-15 Akim Demaille <akim@epita.fr>
12925
12926 * missing: Update from CVS Automake.
12927 * config/config.guess, config/config.sub, config/texinfo.tex:
12928 Update from gnu.org.
12929
12930 2001-08-15 Akim Demaille <akim@epita.fr>
12931
12932 * Makefile.maint: Sync with CVS Autoconf.
12933
12934 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
12935
12936 * doc/bison.texinfo: Include GNU Free Documentation License from
12937 `fdl.texi'.
12938 * doc/fdl.texi: Add to package.
12939
12940 2001-08-14 Marc Autret <autret_m@epita.fr>
12941
12942 Turn on %{source,header}_extension features.
12943
12944 * src/lex.c (percent_table): Un-CPP out header_extension and
12945 source_extension.
12946 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
12947 (compute_exts_from_src): Remove conditions. It restores priorities
12948 between options.
12949
12950 2001-08-14 Marc Autret <autret_m@epita.fr>
12951
12952 * src/files.c (compute_base_names): Add extensions computing when
12953 `--file-prefix' used.
12954 Standardize function calls.
12955
12956 2001-08-13 Marc Autret <autret_m@epita.fr>
12957
12958 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
12959 defining it (defined but null disables alloca).
12960
12961 2001-08-13 Marc Autret <autret_m@epita.fr>
12962
12963 * src/bison.simple (_yy_memcpy): CPP reformat.
12964
12965 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
12966
12967 * tests/atconfig.in (CPPFLAGS): Fix.
12968
12969 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
12970
12971 * doc/bison.texinfo: Include GNU General Public License from
12972 `gpl.texi'.
12973 * doc/gpl.texi: Add to package.
12974
12975 2001-08-10 Marc Autret <autret_m@epita.fr>
12976
12977 * src/print_graph.h: Fix.
12978 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
12979
12980 2001-08-10 Akim Demaille <akim@epita.fr>
12981
12982 * src/system.h: Provide default declarations for stpcpy, strndup,
12983 and strnlen.
12984
12985 2001-08-10 Robert Anisko <anisko_r@epita.fr>
12986
12987 * doc/bison.texinfo (Locations): Update @$ stuff.
12988
12989 2001-08-09 Robert Anisko <anisko_r@epita.fr>
12990
12991 * src/bison.simple (YYLLOC_DEFAULT): Update.
12992 (yyparse): Adjust.
12993
12994 2001-08-08 Marc Autret <autret_m@epita.fr>
12995
12996 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
12997 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
12998 Reported by Fabrice Bauzac.
12999
13000 2001-08-08 Marc Autret <autret_m@epita.fr>
13001
13002 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
13003 * src/vcg.c (output_node): Fix.
13004 * src/vcg.h: Cleanup.
13005 * src/print_graph.c: Add comments.
13006 (node_output_size): New global variable. Simplify the formatting of
13007 the VCG graph output.
13008 (print_actions): Unused code is now used. It notifies the final state
13009 and no action states in the VCG graph. It also give the reduce actions.
13010 The `shift and goto' edges are red and the `go to state' edges are
13011 blue.
13012 Get the current node name and node_obstack by argument.
13013 (node_obstack): New variable.
13014 (print_state): Manage node_obstack.
13015 (print_core): Use node_obstack given by argument.
13016 A node is not only computed here but in print_actions also.
13017 (print_graph): CPP out useless code instead of commenting it.
13018
13019 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
13020
13021 * tests/atconfig.in (CPPFLAGS): Fix.
13022
13023 2001-08-07 Akim Demaille <akim@epita.fr>
13024
13025 * src/print_graph.c (quote): New.
13026 (print_core): Use it.
13027
13028 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
13029
13030 * src/vcg.c (complain.h): Include it.
13031 Unepitaize `return' invocations.
13032 [NDEBUG] (main): Remove.
13033 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
13034 * src/files.c (open_files): Initialize graph_obstack.
13035 * src/print_graph.c (print_actions): CPP out useless code.
13036 (print_core): Don't output the last `\n' in labels.
13037 Use `quote'.
13038 * src/files.c (output_files): Output the VCG file.
13039 * src/main.c (main): Invoke print_graph ();
13040
13041 2001-08-06 Marc Autret <autret_m@epita.fr>
13042
13043 Automaton VCG graph output.
13044 Using option ``-g'' or long option ``--graph'', you can generate
13045 a gram_filename.vcg file containing a VCG description of the LALR (1)
13046 automaton of your grammar.
13047
13048 * src/main.c: Call to print_graph() function.
13049 * src/getargs.h: Update.
13050 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
13051 (graph_flag): New flag.
13052 (longopts): Update.
13053 (getargs): Add case `g'.
13054 * src/files.c (graph_obstack): New obstack struct.
13055 (open_files): Initialize new obstack.
13056 (output_files): Saves graph_obstack if required.
13057 * src/files.h (graph_obstack): New extern declaration.
13058 * src/Makefile.am: Add new source files.
13059
13060 2001-08-06 Marc Autret <autret_m@epita.fr>
13061
13062 * src/print_graph.c, src/print_graph.h (graph): New.
13063 * src/vcg.h: New file.
13064 * src/vcg.c: New file, VCG graph handling.
13065
13066 2001-08-06 Marc Autret <autret_m@epita.fr>
13067
13068 Add of %source_extension and %header_extension which specify
13069 the source or/and the header output file extension.
13070
13071 * src/files.c (compute_base_names): Remove initialisation of
13072 src_extension and header_extension.
13073 (compute_exts_from_gf): Update.
13074 (compute_exts_from_src): Update.
13075 (output_files): Update.
13076 * src/reader.c (parse_header_extension_decl): New.
13077 (parse_source_extension_decl): New.
13078 (read_declarations): New case statements for the new tokens.
13079 * src/lex.c (percent_table): Add entries for %source_extension
13080 and %header_extension.
13081 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
13082
13083 2001-08-06 Marc Autret <autret_m@epita.fr>
13084
13085 * configure.in: Bump to 1.28c.
13086 * doc/bison.texinfo: Texinfo thingies.
13087
13088 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
13089
13090 * tests/atconfig.in (CPPFLAGS): Add.
13091 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
13092
13093 2001-08-03 Akim Demaille <akim@epita.fr>
13094
13095 Version 1.28b.
13096
13097 2001-08-03 Akim Demaille <akim@epita.fr>
13098
13099 * tests/Makefile.am (check-local): Ship testsuite.
13100 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
13101 Include `string.h'.
13102
13103 2001-08-03 Akim Demaille <akim@epita.fr>
13104
13105 * configure.in: Try using -Wformat when compiling.
13106
13107 2001-08-03 Akim Demaille <akim@epita.fr>
13108
13109 * configure.in: Bump to 1.28b.
13110
13111 2001-08-03 Akim Demaille <akim@epita.fr>
13112
13113 * src/complain.c: Adjust strerror_r portability issues.
13114
13115 2001-08-03 Akim Demaille <akim@epita.fr>
13116
13117 Version 1.28a.
13118
13119 2001-08-03 Akim Demaille <akim@epita.fr>
13120
13121 * src/getargs.c, src/getarg.h (skeleton)): Constify.
13122 * src/lex.c (literalchar): Avoid name clashes on `buf'.
13123 * src/getargs.c: Include complain.h.
13124 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
13125 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
13126
13127 2001-08-03 Akim Demaille <akim@epita.fr>
13128
13129 * src/reader.c (readgram): Display hidden chars in error messages.
13130
13131 2001-08-03 Akim Demaille <akim@epita.fr>
13132
13133 Update to gettext 0.10.39.
13134
13135 2001-08-03 Akim Demaille <akim@epita.fr>
13136
13137 * lib/strspn.c: New.
13138
13139 2001-08-01 Marc Autret <autret_m@epita.fr>
13140
13141 * doc/bison.texinfo: Update.
13142 * doc/bison.1 (mandoc): Update.
13143 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
13144 * src/files.c: Support output files extensions computing.
13145 (src_extension): New static variable.
13146 (header_extension): New static variable.
13147 (tr): New function.
13148 (get_extension_index): New function, gets the index of an extension
13149 filename in a string.
13150 (compute_exts_from_gf): New function, computes extensions from the
13151 grammar file extension.
13152 (compute_exts_from_src): New functions, computes extensions from the
13153 C source file extension, file given by ``-o'' option.
13154 (compute_base_names): Update.
13155 (output_files): Update.
13156
13157 2001-08-01 Robert Anisko <anisko_r@epita.fr>
13158
13159 * doc/bison.texi: Document @$.
13160 (Locations): New section.
13161
13162 2001-07-18 Akim Demaille <akim@epita.fr>
13163
13164 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
13165 * config/prev-version.txt, config/move-if-change: New.
13166 * Makefile.am: Adjust.
13167
13168 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
13169
13170 * src/bison.simple (yyparse): Suppress warning `comparaison
13171 between signed and unsigned'.
13172
13173 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
13174
13175 * src/getargs.h (raw_flag): Remove.
13176 * src/getargs.c: Die on `-r'/`--raw'.
13177 * src/lex.c (parse_percent_token): Die on `%raw'.
13178 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
13179 * tests/calc.at: Suppress test with option `--raw'.
13180
13181 2001-07-14 Akim Demaille <akim@epita.fr>
13182
13183 * config/: New.
13184 * configure.in: Require Autoconf 2.50.
13185 Update to gettext 0.10.38.
13186
13187 2001-03-16 Akim Demaille <akim@epita.fr>
13188
13189 * doc/bison.texinfo: ANSIfy the examples.
13190
13191 2001-03-16 Akim Demaille <akim@epita.fr>
13192
13193 * getargs.c (skeleton): New variable.
13194 (longopts): --skeleton is a new option.
13195 (shortopts, getargs): -S is a new option.
13196 * getargs.h: Declare skeleton.
13197 * output.c (output_parser): Use it.
13198
13199 2001-03-16 Akim Demaille <akim@epita.fr>
13200
13201 * m4/strerror_r.m4: New.
13202 * m4/error.m4: Run AC_FUNC_STRERROR_R.
13203 * lib/error.h, lib/error.c: Update.
13204
13205 2001-03-16 Akim Demaille <akim@epita.fr>
13206
13207 * src/getargs.c (longopts): Clean up.
13208
13209 2001-02-21 Akim Demaille <akim@epita.fr>
13210
13211 * src/reader.c (gensym): `gensym_count' is your own.
13212 Use a static buf to create the symbol name, as token_buffer is no
13213 longer a buffer.
13214
13215 2001-02-08 Akim Demaille <akim@epita.fr>
13216
13217 * src/conflicts.c (conflict_report): Be sure not to append to res
13218 between two calls, which could happen if both first sprintf were
13219 skipped, but not the first cp += strlen.
13220
13221 2001-02-08 Akim Demaille <akim@epita.fr>
13222
13223 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
13224 New, from fileutils 4.0.37.
13225 * configure.in: Require Autoconf 2.49c. I took some time before
13226 making this decision. This is the only way out for portability
13227 issues in Bison, it would mean way too much duplicate effort to
13228 import in Bison features implemented in 2.49c since 2.13.
13229 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
13230
13231 2001-02-02 Akim Demaille <akim@epita.fr>
13232
13233 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
13234 * lib/xalloc.h, lib/xmalloc.c: Update.
13235
13236 2001-01-19 Akim Demaille <akim@epita.fr>
13237
13238 Get rid of the ad hoc handling of token_buffer in the scanner: use
13239 the obstacks.
13240
13241 * src/lex.c (token_obstack): New.
13242 (init_lex): Initialize it. No longer call...
13243 (grow_token_buffer): this. Remove it.
13244 Adjust all the places which used it to use the obstack.
13245
13246 2001-01-19 Akim Demaille <akim@epita.fr>
13247
13248 * src/lex.h: Rename all the tokens:
13249 s/\bENDFILE\b/tok_eof/g;
13250 s/\bIDENTIFIER\b/tok_identifier/g;
13251 etc.
13252 Let them be enums, not #define, to ease debugging.
13253 Adjust all the code.
13254
13255 2001-01-18 Akim Demaille <akim@epita.fr>
13256
13257 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
13258 * src/lex.c (maxtoken, grow_token_buffer): Static.
13259
13260 2001-01-18 Akim Demaille <akim@epita.fr>
13261
13262 Since we now use obstacks, more % directives can be enabled.
13263
13264 * src/lex.c (percent_table): Also accept `%yacc',
13265 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
13266 `%debug'.
13267 Handle the actions for `%semantic_parser' and `%pure_parser' here,
13268 instead of returning a token.
13269 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
13270 * src/reader.c (read_declarations): Adjust.
13271 * src/files.c (open_files): Don't call `compute_base_names', don't
13272 compute `attrsfile' since they depend upon data which might be
13273 *in* the input file now.
13274 (output_files): Do it here.
13275 * src/output.c (output_headers): Document the fact that this patch
13276 introduces a guaranteed SEGV for semantic parsers.
13277 * doc/bison.texinfo: Document them.
13278 * tests/suite.at: Exercise these %options.
13279
13280 2000-12-20 Akim Demaille <akim@epita.fr>
13281
13282 Also handle the output file (--verbose) with obstacks.
13283
13284 * files.c (foutput): Remove.
13285 (output_obstack): New.
13286 Adjust all dependencies.
13287 * src/conflicts.c: Return a string.
13288 * src/system.h (obstack_grow_string): Rename as...
13289 (obstack_sgrow): this. Be ready to work with non literals.
13290 (obstack_fgrow4): New.
13291
13292 2000-12-20 Akim Demaille <akim@epita.fr>
13293
13294 * src/files.c (open_files): Fix the computation of short_base_name
13295 in the case of `-o foo.tab.c'.
13296
13297 2000-12-20 Akim Demaille <akim@epita.fr>
13298
13299 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
13300 (copy_dollar): Now that everything uses obstacks, get rid of the
13301 FILE * parameters.
13302
13303 2000-12-20 Akim Demaille <akim@epita.fr>
13304
13305 * src/files.c (open_files): Actually the `.output' file is based
13306 on the short_base_name, not base_name.
13307 * tests/suite.at (Checking output file names): Adjust.
13308
13309 2000-12-20 Akim Demaille <akim@epita.fr>
13310
13311 * src/bison.s1: Remove, we now use directly...
13312 * src/bison.simple: this.
13313 * src/Makefile.am: Use pkgdata instead of data.
13314
13315 2000-12-20 Akim Demaille <akim@epita.fr>
13316
13317 * src/files.c (guard_obstack): New.
13318 (open_files): Initialize it.
13319 (output_files): Dump it...
13320 * src/files.h: Export it.
13321 * src/reader.c (copy_guard): Use it.
13322
13323 2000-12-19 Akim Demaille <akim@epita.fr>
13324
13325 * src/files.c (outfile, defsfile, actfile): Removed as global
13326 vars.
13327 (open_files): Don't compute them.
13328 (output_files): Adjust.
13329 (base_name, short_base_name): Be global.
13330 Adjust dependencies.
13331
13332 2000-12-19 Akim Demaille <akim@epita.fr>
13333
13334 * src/files.c (strsuffix): New.
13335 (stringappend): Be just like strcat but allocate.
13336 (base_names): Eve out from open_files.
13337 Try to simplify the rather hairy computation of base_name and
13338 short_base_name.
13339 (open_files): Use it.
13340 * tests/suite.at (Checking output file names): New test.
13341
13342 2000-12-19 Akim Demaille <akim@epita.fr>
13343
13344 * src/system.h (obstack_grow_literal_string): Rename as...
13345 (obstack_grow_string): this.
13346 * src/output.c (output_parser): Recognize `%% actions' instead of
13347 `$'.
13348 * src/bison.s1: s/$/%% actions/.
13349 * src/bison.hairy: Likewise.
13350
13351 2000-12-19 Akim Demaille <akim@epita.fr>
13352
13353 * src/output.c (output_parser): Compute the `#line' lines when
13354 there are.
13355 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
13356 Suggested by Hans Aberg.
13357
13358 2000-12-19 Akim Demaille <akim@epita.fr>
13359
13360 Let the handling of the skeleton files be local to the procedures
13361 that use it.
13362
13363 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
13364 longer static.
13365 (fparser, open_extra_files): Remove.
13366 (open_files, output_files): Don't take care of fparser.
13367 * src/files.h: Adjust.
13368 * src/output.c (output_parser): Open and close the file to the
13369 skeleton.
13370 * src/reader.c (read_declarations): When %semantic_parser, open
13371 fguard.
13372
13373 2000-12-19 Akim Demaille <akim@epita.fr>
13374
13375 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
13376 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
13377
13378 2000-12-19 Akim Demaille <akim@epita.fr>
13379
13380 * src/files.c (open_files): Yipee! We no longer need all the code
13381 looking for `/tmp' since we have no tmp file.
13382
13383 2000-12-19 Akim Demaille <akim@epita.fr>
13384
13385 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
13386 New macros.
13387 * src/files.c (open_files): Less dependency on MSDOS etc.
13388
13389 2000-12-14 Akim Demaille <akim@epita.fr>
13390
13391 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
13392 Provide a default definition.
13393 Use it when executing the default @ action.
13394 * src/reader.c (reader_output_yylsp): No longer include
13395 `timestamp' and `text' in the default YYLTYPE.
13396
13397 2000-12-12 Akim Demaille <akim@epita.fr>
13398
13399 * src/reader.c (copy_definition, parse_union_decl, copy_action)
13400 (copy_guard): Quote the file names.
13401 Reported by Laurent Mascherpa.
13402
13403 2000-12-12 Akim Demaille <akim@epita.fr>
13404
13405 * src/output.c (output_headers, output_program, output): Be sure
13406 to escape special characters when outputting filenames.
13407 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
13408 (output_headers): Don't depend on them, Use ACTSTR.
13409
13410 2000-11-17 Akim Demaille <akim@epita.fr>
13411
13412 * lib/obstack.h: Formatting changes.
13413 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
13414 prevents type checking.
13415 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
13416 cast the value to (void *): assigning a `foo *' to a `void *'
13417 variable is valid.
13418 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
13419 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
13420 append characters.
13421
13422 2000-11-17 Akim Demaille <akim@epita.fr>
13423
13424 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
13425 as...
13426 (suite.m4, regression.m4, calc.m4): these.
13427 * tests/atgeneral.m4: Update from CVS Autoconf.
13428
13429 2000-11-17 Akim Demaille <akim@epita.fr>
13430
13431 * tests/regression.m4 (%union and --defines): New test,
13432 demonstrating a current bug in the obstack implementation.
13433
13434 2000-11-17 Akim Demaille <akim@epita.fr>
13435
13436 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
13437 macros.
13438 Use them to declare the variables which are global or local to
13439 `yyparse'.
13440
13441 2000-11-17 Akim Demaille <akim@epita.fr>
13442
13443 * acconfig.h: Remove, no longer used.
13444
13445 2000-11-07 Akim Demaille <akim@epita.fr>
13446
13447 * src: s/Copyright (C)/Copyright/g.
13448
13449 2000-11-07 Akim Demaille <akim@epita.fr>
13450
13451 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
13452 defining.
13453 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
13454
13455 2000-11-07 Akim Demaille <akim@epita.fr>
13456
13457 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
13458 Merge in a single CPP if/else.
13459
13460 2000-11-07 Akim Demaille <akim@epita.fr>
13461
13462 * src/output.c (output): Remove useless variables.
13463 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
13464 argument `data' for consistency with the prototypes.
13465 Qualify it `const'.
13466 (obstack_copy, obstack_copy0): Rename the second argument as
13467 `address' for consistency. Qualify it `const'.
13468 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
13469 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
13470 `const' their input argument (`data' or `address').
13471 Adjust the corresponding macros to include `const' in casts.
13472
13473 2000-11-03 Akim Demaille <akim@epita.fr>
13474
13475 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
13476 s/PFILE1/BISON_HAIRY/.
13477 Adjust dependencies.
13478
13479 2000-11-03 Akim Demaille <akim@epita.fr>
13480
13481 For some reason, this was not applied.
13482
13483 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
13484 `unlink': it's no longer used.
13485
13486 2000-11-03 Akim Demaille <akim@epita.fr>
13487
13488 * src/files.c (skeleton_find): New function, eved out of...
13489 (open_files, open_extra_files): here.
13490
13491 2000-11-03 Akim Demaille <akim@epita.fr>
13492
13493 Don't use `atexit'.
13494
13495 * src/files.c (obstack_save): New function.
13496 (done): Rename as...
13497 (output_files): this.
13498 Use `obstack_save'.
13499 * src/main.c (main): Don't use `atexit' to register `done', since
13500 it no longer has to remove tmp files, just call `output_files'
13501 when there are no errors.
13502
13503 2000-11-02 Akim Demaille <akim@epita.fr>
13504
13505 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
13506 `unlink': it's no longer used.
13507 * src/files.h: Formatting changes.
13508
13509 2000-11-02 Akim Demaille <akim@epita.fr>
13510
13511 Remove the last uses of mktemp and unlink/delete.
13512
13513 * src/files.c (fdefines, ftable): Removed.
13514 (defines_ostack, table_obstack): New.
13515 Adjust dependencies of the former into uses of the latter.
13516 * src/output.c (output_short_or_char_table, output_short_table):
13517 Convert to using obstacks.
13518 * src/reader.c (copy_comment2): Accept one FILE * and two
13519 obstacks.
13520 (output_token_defines, reader_output_yylsp): Use obstacks.
13521 * src/system.h (obstack_fgrow3): New.
13522 * po/POTFILES.in: Adjust.
13523
13524 2000-11-01 Akim Demaille <akim@epita.fr>
13525
13526 Change each use of `fattrs' into a use of `attrs_obstack'.
13527
13528 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
13529 * src/files.c (fattrs): Remove.
13530 (attrs_obstack): New.
13531 Adjust all dependencies.
13532 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
13533
13534 2000-11-01 Akim Demaille <akim@epita.fr>
13535
13536 Introduce obstacks.
13537 Change each use of `faction' into a use of `action_obstack'.
13538
13539 * lib/obstack.h, lib/obstack.c: New files.
13540 * src/files.c (faction): Remove.
13541 (action_obstack): New.
13542 Adjust all dependencies.
13543
13544 2000-10-20 Akim Demaille <akim@epita.fr>
13545
13546 * lib/quote.h (PARAMS): New macro. Use it.
13547
13548 2000-10-16 Akim Demaille <akim@epita.fr>
13549
13550 * src/output.c (output_short_or_char_table): New function.
13551 (output_short_table, output_token_translations): Use it.
13552 (goto_actions): Use output_short_table.
13553
13554 2000-10-16 Akim Demaille <akim@epita.fr>
13555
13556 * src/symtab.c (bucket_new): New function.
13557 (getsym): Use it.
13558
13559 * src/output.c (output_short_table): New argument to display the
13560 comment associated with the table.
13561 Adjust dependencies.
13562 (output_gram): Use it.
13563 (output_rule_data): Nicer output layout for YYTNAME.
13564
13565 2000-10-16 Akim Demaille <akim@epita.fr>
13566
13567 * src/lex.c (read_typename): New function.
13568 (lex): Use it.
13569 * src/reader.c (copy_dollar): Likewise.
13570
13571 2000-10-16 Akim Demaille <akim@epita.fr>
13572
13573 * src/reader.c (copy_comment2): Expect the input stream to be on
13574 the `/' which is suspected to open a comment, instead of being
13575 called after `//' or `/*' was read.
13576 (copy_comment, copy_definition, parse_union_decl, copy_action)
13577 (copy_guard): Adjust.
13578
13579 2000-10-16 Akim Demaille <akim@epita.fr>
13580
13581 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
13582 `read_signed_integer'.
13583
13584 2000-10-16 Akim Demaille <akim@epita.fr>
13585
13586 * src/reader.c (copy_dollar): New function.
13587 (copy_guard, copy_action): Use it.
13588
13589 2000-10-16 Akim Demaille <akim@epita.fr>
13590
13591 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
13592 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
13593 New files, from Fileutils 4.0.27.
13594 * src/main.c (printable_version): Remove.
13595 * src/lex.c, src/reader.c: Use `quote'.
13596
13597 2000-10-04 Akim Demaille <akim@epita.fr>
13598
13599 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
13600
13601 2000-10-04 Akim Demaille <akim@epita.fr>
13602
13603 * doc/bison.texinfo: Various typos spotted by Neil Booth.
13604
13605 2000-10-04 Akim Demaille <akim@epita.fr>
13606
13607 When a literal string is used to define two different tokens,
13608 `bison -v' segfaults.
13609 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
13610
13611 * tests/regression.m4: New file.
13612 Include the core of the sample provided by Piotr Gackiewicz.
13613 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
13614 properly.
13615
13616 2000-10-04 Akim Demaille <akim@epita.fr>
13617
13618 * src/reader.c (parse_expect_decl): Keep `count' within the size
13619 of `buffer'.
13620 From Neil Booth.
13621
13622 2000-10-02 Paul Eggert <eggert@twinsun.com>
13623
13624 * bison.s1 (yyparse): Assign the default value
13625 unconditionally, to avoid a GCC warning and make the parser a
13626 tad smaller.
13627
13628 2000-10-02 Akim Demaille <akim@epita.fr>
13629
13630 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
13631 options.
13632
13633 2000-10-02 Akim Demaille <akim@epita.fr>
13634
13635 * src/derives.c, src/print.c, src/reduce.c: To ease the
13636 translation, move some `\n' out of the translated strings.
13637
13638 2000-10-02 Akim Demaille <akim@epita.fr>
13639
13640 The location tracking mechanism is precious for parse error
13641 messages. Nevertheless, it is enabled only when `@n' is used in
13642 the grammar, which is a different issue (you can use it in error
13643 message, but not in the grammar per se). Therefore, there should
13644 be another means to enable it.
13645
13646 * src/getargs.c (getargs): Support `--locations'.
13647 (usage): Report it.
13648 * src/getargs.h (locationsflag): Export it.
13649 * src/lex.c (percent_table): Support `%locations'.
13650 * src/reader.c (yylsp_needed): Remove this variable, now replaced
13651 with `locationsflag'.
13652 * doc/bison.texinfo: Document `--locations' and `%locations'.
13653 Sort the options.
13654 * tests/calc.m4: Test it.
13655
13656 For regularity of the names, replace each
13657 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
13658 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
13659 In addition replace each `flag' with `_flag'.
13660
13661 2000-10-02 Akim Demaille <akim@epita.fr>
13662
13663 Also test parse error messages, including with YYERROR_VERBOSE.
13664
13665 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
13666 associative).
13667 Use it to check the computations.
13668 Use it to check `nonassoc' is honored.
13669 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
13670 `--yyerror-verbose'.
13671 (_AT_CHECK_CALC): Adjust to this option.
13672 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
13673
13674 2000-10-02 Akim Demaille <akim@epita.fr>
13675
13676 Test also `--verbose', `--defines' and `--name-prefix'. Testing
13677 the latter demonstrates a flaw in the handling of non debugging
13678 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
13679 was used in order to simplify:
13680
13681 #if YYDEBUG
13682 if (yydebug)
13683 {
13684 ...
13685 }
13686 #endif
13687
13688 into
13689
13690 if (yydebug)
13691 {
13692 ...
13693 }
13694
13695 unfortunately this leads to a CPP conflict when
13696 `--name-prefix=foo' is used since it produces `#define yydebug
13697 foodebug'.
13698
13699 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
13700 (YYDPRINTF): New macro.
13701 Spread its use.
13702 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
13703 the bison options.
13704 Also test `--verbose', `--defines' and `--name-prefix'.
13705
13706 2000-10-02 Akim Demaille <akim@epita.fr>
13707
13708 Improve the readability of the produced parsers.
13709
13710 * src/bison.s1: Formatting changes.
13711 Improve the comment related to the `$' mark.
13712 (yydefault): Don't fall through to `yyresume': `goto' there.
13713 * src/output.c (output_parser): When the `$' is met, skip the end
13714 of its line.
13715 New variable, `number_of_dollar_signs', to check there's exactly
13716 one `$' in the parser skeleton.
13717
13718 2000-10-02 Akim Demaille <akim@epita.fr>
13719
13720 * lib/xstrdup.c: New file, from the fileutils.
13721 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
13722 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
13723 instead of strlen + xmalloc + strcpy.
13724 * src/symtab.c (copys): Remove, use xstrdup instead.
13725
13726 2000-10-02 Akim Demaille <akim@epita.fr>
13727
13728 * src/gram.h (associativity): New enum type which replaces the
13729 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
13730 `right_assoc', `left_assoc' and `non_assoc'.
13731 Adjust all dependencies.
13732 * src/reader.c: Formatting changes.
13733 (LTYPESTR): Don't define it, use it as a literal in
13734 `reader_output_yylsp'.
13735 * src/symtab.h (symbol_class): New enum type which replaces the
13736 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
13737 `sunknown', `stoken and `snterm'.
13738
13739 2000-10-02 Akim Demaille <akim@epita.fr>
13740
13741 * src/getargs.c (fixed_outfiles): Rename as...
13742 (yaccflag): for consistency and accuracy.
13743 Adjust dependencies.
13744
13745 2000-10-02 Akim Demaille <akim@epita.fr>
13746
13747 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
13748 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
13749 difficult and introduced a lot of core dump. It turns out that
13750 Bison used an implementation of `xmalloc' based on `calloc', and
13751 at various places it does depend upon the initialization to 0. I
13752 have not tried to isolate the pertinent places, and all the former
13753 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
13754 someone should address this issue.
13755
13756 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
13757 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
13758 files.
13759 Adjust dependencies.
13760 * src/warshall.h: New file.
13761 Propagate.
13762
13763 2000-10-02 Akim Demaille <akim@epita.fr>
13764
13765 Various anti-`extern in *.c' changes.
13766
13767 * src/system.h: Include `assert.h'.
13768
13769 2000-10-02 Akim Demaille <akim@epita.fr>
13770
13771 * src/state.h (nstates, final_state, first_state, first_shift)
13772 (first_reduction): Move their exportation from here...
13773 * src/LR0.h: to here.
13774 Adjust dependencies.
13775 * src/getargs.c (statisticsflag): New variable.
13776 Add support for `--statistics'.
13777 Adjust dependencies.
13778
13779 Remove a lot of now useless `extern' statements in most files.
13780
13781 2000-10-02 Akim Demaille <akim@epita.fr>
13782
13783 * src/LR0.h: New file.
13784 Propagate its use.
13785
13786 2000-10-02 Akim Demaille <akim@epita.fr>
13787
13788 * src/print.h: New file.
13789 Propagate its use.
13790 * src/print.c: Formatting and ordering changes.
13791 (verbose, terse): Replace with...
13792 (print_results): this new function.
13793 Adjust dependencies.
13794
13795 2000-10-02 Akim Demaille <akim@epita.fr>
13796
13797 * src/conflicts.c (conflict_report): New function.
13798 (conflict_log, verbose_conflict_log): Replace with...
13799 (print_conflicts): this function.
13800 Adjust dependencies.
13801 * src/conflicts.h: New file.
13802 Propagate its inclusion.
13803
13804 2000-10-02 Akim Demaille <akim@epita.fr>
13805
13806 * src/nullable.h: New file.
13807 Propagate its inclusion.
13808 * src/nullable.c: Formatting changes.
13809
13810 2000-10-02 Akim Demaille <akim@epita.fr>
13811
13812 * src/reduce.h: New file.
13813 Propagate its inclusion.
13814 * src/reduce.c: Topological sort and other formatting changes.
13815 (bool, TRUE, FALSE): Move their definition to...
13816 * src/system.h: here.
13817
13818 2000-10-02 Akim Demaille <akim@epita.fr>
13819
13820 * src/files.c: Formatting changes.
13821 (tryopen, tryclose, openfiles): Rename as...
13822 (xfopen, xfclose, open_files): this.
13823 (stringappend): static.
13824 * src/files.h: Complete the list of exported symbols.
13825 Propagate its use.
13826
13827 2000-10-02 Akim Demaille <akim@epita.fr>
13828
13829 * src/reader.h: New file.
13830 Propagate its use instead of tedious list of `extern' and
13831 prototypes.
13832 * src/reader.c: Formatting changes, topological sort,
13833 s/register//.
13834
13835 2000-10-02 Akim Demaille <akim@epita.fr>
13836
13837 * src/lex.h: Prototype `lex.c' exported functions.
13838 * src/reader.c: Adjust.
13839 * src/lex.c: Formatting changes.
13840 (safegetc): Rename as...
13841 (xgetc): this.
13842
13843 2000-10-02 Akim Demaille <akim@epita.fr>
13844
13845 * src/lalr.h: New file.
13846 Propagate its inclusion instead of prototypes and `extern'.
13847 * src/lalr.c: Formatting changes, topological sorting etc.
13848
13849 2000-10-02 Akim Demaille <akim@epita.fr>
13850
13851 * src/output.c (token_actions): Introduce a temporary array,
13852 YYDEFACT, that makes it possible for this function to use
13853 output_short_table.
13854
13855 2000-10-02 Akim Demaille <akim@epita.fr>
13856
13857 `user_toknums' is output as a `short[]' in `output.c', while it is
13858 defined as a `int[]' in `reader.c'. For consistency with the
13859 other output tables, `user_toknums' is now defined as a table of
13860 shorts.
13861
13862 * src/reader.c (user_toknums): Be a short table instead of an int
13863 table.
13864 Adjust dependencies.
13865
13866 Factor the short table outputs.
13867
13868 * src/output.c (output_short_table): New function.
13869 * src/output.c (output_gram, output_stos, output_rule_data)
13870 (output_base, output_table, output_check): Use it.
13871
13872 2000-10-02 Akim Demaille <akim@epita.fr>
13873
13874 * src/output.c (output): Topological sort of the functions, in
13875 order to get rid of the `static' prototypes.
13876 No longer use `register'.
13877 * src/output.h: New file.
13878 Propagate its inclusion in files explicitly prototyping functions
13879 from output.c.
13880
13881 2000-09-21 Akim Demaille <akim@epita.fr>
13882
13883 * src/atgeneral.m4: Update from Autoconf.
13884
13885 2000-09-21 Akim Demaille <akim@epita.fr>
13886
13887 * src/closure.h: New file.
13888 * src/closure.c: Formatting changes, topological sort over the
13889 functions, use of closure.h.
13890 (initialize_closure, finalize_closure): Rename as...
13891 (new_closure, free_closure): these. Adjust dependencies.
13892 * src/LR0.c: Formatting changes, topological sort, use of
13893 cloture.h.
13894 (initialize_states): Rename as...
13895 (new_states): this.
13896 * src/Makefile.am (noinst_HEADERS): Adjust.
13897
13898 2000-09-20 Akim Demaille <akim@epita.fr>
13899
13900 * src/acconfig.h: Don't protect config.h against multiple
13901 inclusion.
13902 Don't define PARAMS.
13903 * src/system.h: Define PARAMS.
13904 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
13905 purpose of config.h. system.h must not try to fix wrong
13906 definitions in config.h.
13907
13908 2000-09-20 Akim Demaille <akim@epita.fr>
13909
13910 * src/derives.h: New file.
13911 * src/main.c, src/derives.h: Use it.
13912 Formatting changes.
13913 * src/Makefile.am (noinst_HEADERS): Adjust.
13914
13915 2000-09-20 Akim Demaille <akim@epita.fr>
13916
13917 * tests/atgeneral.m4: Update from Autoconf.
13918 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
13919 (AT_CHECK_CALC): New macros.
13920 Use these macros to test bison with options `', `--raw',
13921 `--debug', `--yacc', `--yacc --debug'.
13922
13923 2000-09-19 Akim Demaille <akim@epita.fr>
13924
13925 * src/output.c: Formatting changes.
13926 * src/machine.h: Remove, leaving its contents in...
13927 * src/system.h: here.
13928 Include stdio.h.
13929 Adjust all dependencies on stdio.h and machine.h.
13930 * src/getargs.h: New file.
13931 Let all `extern' declarations about getargs.c be replaced with
13932 inclusion of `getargs.h'.
13933 * src/Makefile.am (noinst_HEADERS): Adjust.
13934
13935 * tests/calc.m4 (yyin): Be initialized in main, not on the global
13936 scope.
13937 (yyerror): Returns void, not int.
13938 * doc/bison.texinfo: Formatting changes.
13939
13940 2000-09-19 Akim Demaille <akim@epita.fr>
13941
13942 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
13943 portable.
13944
13945 2000-09-18 Akim Demaille <akim@epita.fr>
13946
13947 * configure.in: Append WARNING_CFLAGS to CFLAGS.
13948 * src/Makefile.am (INCLUDES): Don't.
13949 Be ready to fetch headers in lib/.
13950
13951 2000-09-18 Akim Demaille <akim@epita.fr>
13952
13953 * doc/bison.texinfo: Update the copyright.
13954 ANSIfy and GNUify the examples.
13955 Remove the old menu.
13956
13957 2000-09-18 Akim Demaille <akim@epita.fr>
13958
13959 First set of tests: use the `calc' example from the documentation.
13960
13961 * src/bison.s1 (yyparse): Condition the code using `yytname' which
13962 is defined only when YYDEBUG is.
13963 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
13964 * src/files.c (tryopen, tryclose): Formatting changes.
13965 Move to the top and be static.
13966 * src/reader.c (read_signed_integer): Likewise.
13967 * tests/calc.m4: New file.
13968 * Makefile.am, suite.m4: Adjust.
13969 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
13970
13971 2000-09-18 Akim Demaille <akim@epita.fr>
13972
13973 Add support for an Autotest test suite for Bison.
13974
13975 * m4/m4.m4, m4/atconfig.m4: New files.
13976 * m4/Makefile.am (EXTRA_DIST): Adjust.
13977 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
13978 files.
13979 * src/getargs.c: Display a more standard --version message.
13980 * src/reader.c (reader): Formatting changes.
13981 No longer depend upon VERSION_STRING.
13982 * configure.in: No longer use `dnl'.
13983 Set up the test suite and the new directory `tests/.
13984 (VERSION_STRING): Remove.
13985
13986 2000-04-14 Akim Demaille <akim@epita.fr>
13987
13988 * src/reader.c (copy_comment2): New function, same as former
13989 `copy_comment', but outputs into two FILE *.
13990 (copy_comment): Use it.
13991 (parse_union_decl): Use it.
13992 (get_type, parse_start_decl): Use the same `invalid' message.
13993 (parse_start_decl, parse_union_decl): Use the same `multiple'
13994 message.
13995 (parse_union_decl, copy_guard, copy_action): Use the same
13996 `unmatched' message.
13997 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
13998
13999 2000-03-31 Akim Demaille <akim@epita.fr>
14000
14001 * src/files.c (tryopen, tryclose): Move to the top.
14002 Be static.
14003
14004 2000-03-31 Akim Demaille <akim@epita.fr>
14005
14006 * src/main.c (main): Don't call `done', exit does it.
14007
14008 2000-03-31 Akim Demaille <akim@epita.fr>
14009
14010 * allocate.c: s/return (foo)/return foo/.
14011 * lalr.c: Likewise.
14012 * LR0.c: Likewise.
14013 * output.c: Likewise.
14014 * reader.c: Likewise.
14015 * symtab.c: Likewise.
14016 * vmsgetargs.c: Likewise.
14017
14018 2000-03-31 Akim Demaille <akim@epita.fr>
14019
14020 Clean up the error reporting functions.
14021
14022 * src/report.c: New file.
14023 * src/report.h: Likewise.
14024 * src/Makefile.am: Adjust.
14025 * m4/error.m4: New file.
14026 * m4/Makefile.am: Adjust.
14027 * configure.in (jm_PREREQ_ERROR): Call it.
14028 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
14029 Remove.
14030 (fatal, fatals): Remove. All callers use complain.c::fatal.
14031 (warn, warni, warns, warnss, warnss): Remove. All callers use
14032 complain.c::complain.
14033 (toomany): Remove, use fatal instead.
14034 * src/files.c (done): No argument, use complain_message_count.
14035 * src/main.c (main): Register `done' to `atexit'.
14036
14037 * src/getargs.c (usage): More `fputs', less `fprintf'.
14038
14039 2000-03-28 Akim Demaille <akim@epita.fr>
14040
14041 * lib/: New directory.
14042 * Makefile.am (SUBDIRS): Adjust.
14043 * configure.in: Adjust.
14044 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
14045 useless.
14046 * src/alloca.c: Moved to lib/.
14047 * src/getopt.c: Likewise.
14048 * src/getopt1.c: Likewise.
14049 * src/getopt.h: Likewise.
14050 * src/ansi2knr.c: Likewise.
14051 * src/ansi2knr.1: Likewise.
14052 * src/Makefile.am: Adjust.
14053 * lib/Makefile.am: New file.
14054
14055 2000-03-28 Akim Demaille <akim@epita.fr>
14056
14057 * src/getargs.c (usage): Refresh the help message.
14058
14059 2000-03-17 Akim Demaille <akim@epita.fr>
14060
14061 * src/getopt1.c: Updated from textutils 2.0e
14062 * src/getopt.c: Likewise.
14063 * src/getopt.h: Likewise.
14064
14065 2000-03-17 Akim Demaille <akim@epita.fr>
14066
14067 * src/Makefile.am (bison.simple): Fix the awk program: quote only
14068 the file name, not the whole `#line LINE FILE'.
14069
14070 2000-03-17 Akim Demaille <akim@epita.fr>
14071
14072 On syntax errors, report the token on which we choked.
14073
14074 * src/bison.s1 (yyparse): In the label yyerrlab, when
14075 YYERROR_VERBOSE, add yychar in msg.
14076
14077 2000-03-17 Akim Demaille <akim@epita.fr>
14078
14079 * src/reader.c (copy_at): New function.
14080 (copy_guard): Use it.
14081 (copy_action): Use it.
14082
14083 2000-03-17 Akim Demaille <akim@epita.fr>
14084
14085 Be kind to translators, save some useless translations.
14086
14087 * src/main.c (banner): New function.
14088 (fatal_banner): Use it.
14089 (warn_banner): Use it.
14090
14091 2000-03-17 Akim Demaille <akim@epita.fr>
14092
14093 * src/reader.c (copy_definition): Use copy_string and
14094 copy_comment. Removed now unused `match', `ended',
14095 `cplus_comment'.
14096 (copy_comment, copy_string): Moved, to be visible from
14097 copy_definition.
14098
14099 2000-03-17 Akim Demaille <akim@epita.fr>
14100
14101 * src/reader.c (copy_string): Declare `static inline'. No
14102 problems with inline, since it is checked by configure.
14103 (copy_comment): Likewise.
14104
14105 2000-03-17 Akim Demaille <akim@epita.fr>
14106
14107 * src/reader.c (packsymbols): Formatting changes.
14108
14109 2000-03-17 Akim Demaille <akim@epita.fr>
14110
14111 * src/reader.c (copy_comment): New function, factored out from:
14112 (copy_action): Use it. Removed now unused `match', `ended',
14113 `cplus_comment'.
14114 (copy_guard): Likewise.
14115
14116 2000-03-17 Akim Demaille <akim@epita.fr>
14117
14118 * src/reader.c (copy_string): New function, factored out from:
14119 (copy_action): Use it.
14120 (copy_guard): Likewise.
14121
14122 2000-03-17 Akim Demaille <akim@epita.fr>
14123
14124 Change the handling of @s so that they behave exactly like $s.
14125 There is now a pseudo variable @$ (readble and writable), location
14126 of the lhs of the rule (by default ranging from the location of
14127 the first symbol of the rhs, to the location of the last symbol,
14128 or, if the rhs is empty, YYLLOC).
14129
14130 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
14131 yyval.
14132 (yyparse): When providing a default semantic action, provide a
14133 default location action.
14134 (after the $): No longer change `*YYLSP', just stack YYLOC the
14135 same way you stack YYVAL.
14136 * src/reader.c (read_declarations): Use warns.
14137 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
14138 (copy_action, case '@'): Likewise.
14139 Use a standard error message, to save useless work from
14140 translators.
14141
14142 2000-03-17 Akim Demaille <akim@epita.fr>
14143
14144 * src/bison.s1: Formatting and cosmetics changes.
14145 * src/reader.c: Likewise.
14146 Update the Copyright notice.
14147
14148 2000-03-17 Akim Demaille <akim@epita.fr>
14149
14150 * src/bison.s1 (#line): All set to `#line' only, since the
14151 Makefile now handles them.
14152
14153 2000-03-16 Akim Demaille <akim@epita.fr>
14154
14155 * src/output.c (output_rule_data): Output the documentation of
14156 some of the tables.
14157 (Copyright notice): Update.
14158 Formatting changes.
14159
14160 2000-03-16 Akim Demaille <akim@epita.fr>
14161
14162 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
14163 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
14164 One `#if YYDEBUG' remains, since it uses variables which are
14165 defined only if `YYDEBUG != 0'.
14166
14167 2000-03-16 Akim Demaille <akim@epita.fr>
14168
14169 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
14170 and related variables so that the similarities are highlighted.
14171
14172 2000-03-16 Akim Demaille <akim@epita.fr>
14173
14174 * src/bison.s1: Properly indent CPP directives.
14175
14176 2000-03-16 Akim Demaille <akim@epita.fr>
14177
14178 * src/bison.s1: Properly indent the `alloca' CPP section.
14179
14180 2000-03-16 Akim Demaille <akim@epita.fr>
14181
14182 Do not hard code values of directories in `configure.in'.
14183 Update the `configure' tool chain.
14184
14185 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
14186 src/makefile.am.
14187 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
14188 (AC_OUTPUT): Add m4/Makefile.
14189 Bump to bison 1.28a, 1.29 has never been released.
14190 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
14191 handled via src/Makefile.am.
14192 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
14193 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
14194 autoheader.
14195 * Makefile.am (SUBDIRS): Add m4.
14196 (ACLOCAL_AM_FLAGS): New variable.
14197 (AUTOMAKE_OPTIONS): Add check-news.
14198 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
14199 the proper line number and file name.
14200 (DEFS): Propagate the location of bison library files and of the
14201 locale files.
14202 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
14203 builddir.
14204 * acinclude.m4: Remove, replaced by the directory m4.
14205 * m4/Makefile.am (EXTRA_DIST): New variable.
14206 * m4/gettext.m4: New file, from the fileutils.
14207 * m4/lcmessage.m4: Likewise
14208 * m4/progtest.m4: Likewise.
14209 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
14210
14211 2000-03-10 Akim Demaille <akim@epita.fr>
14212
14213 * src/closure.c:
14214 Formatting changes of various comments.
14215 Respect the GNU coding standards at various places.
14216 Don't use `_()' when no translation is needed.
14217
14218 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14219
14220 * src/files.c:
14221 OS/2 honors TMPDIR environment variable.
14222
14223 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14224
14225 * doc/bison.texinfo: Tweaked spelling and grammar.
14226 Updated ISBN.
14227 Removed reference to price of printed copy.
14228 Mention BISON_SIMPLE and BISON_HAIRY.
14229
14230 1999-12-13 Jesse Thilo <jthilo@gnu.org>
14231
14232 * configure.in, NEWS:
14233 Bison 1.29 released.
14234
14235 1999-10-27 Jesse Thilo <jthilo@gnu.org>
14236
14237 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
14238 Added reference card.
14239
14240 1999-07-26 Jesse Thilo <jthilo@gnu.org>
14241
14242 * po/ru.po: Added Russian translation.
14243
14244 1999-07-26 Jesse Thilo <jthilo@gnu.org>
14245
14246 * configure.in: Added Russian translation.
14247
14248 1999-07-06 Jesse Thilo <jthilo@gnu.org>
14249
14250 * configure.in, NEWS, README:
14251 Released version 1.28.
14252
14253 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14254
14255 * src/system.h:
14256 Squashed redefinition warning on some systems.
14257
14258 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
14259 Have configure build version string instead of relying on ANSI string
14260 concatentation.
14261
14262 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14263
14264 * po/POTFILES.in: Got rid of version.c.
14265
14266 1999-06-14 Jesse Thilo <jthilo@gnu.org>
14267
14268 * acconfig.h, configure.in:
14269 Have configure build version string instead of relying on ANSI string
14270 concatentation.
14271
14272 1999-06-08 Jesse Thilo <jthilo@gnu.org>
14273
14274 * doc/bison.1:
14275 Dropped mention of `+' for long-named options.
14276
14277 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14278
14279 * src/files.c: Added <unistd.h> for unlink().
14280
14281 * src/Makefile.am, src/system.h:
14282 I18n fixes.
14283
14284 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14285
14286 * README: Added a FAQ list.
14287
14288 * configure.in, acconfig.h:
14289 I18n fixes.
14290
14291 1999-05-30 Jesse Thilo <jthilo@gnu.org>
14292
14293 * doc/FAQ, doc/Makefile.am:
14294 Added a FAQ list.
14295
14296 1999-05-19 Jesse Thilo <jthilo@gnu.org>
14297
14298 * src/alloc.h, src/symtab.h, src/version.c:
14299 Protected inclusion of "config.h" with HAVE_CONFIG_H.
14300
14301 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14302
14303 * src/.cvsignore, src/Makefile.am:
14304 Reorganized: sources in `src', documentation in `doc'.
14305
14306 * src/lex.c (literalchar):
14307 fixed the code for escaping double quotes (thanks
14308 Jonathan Czisny.)
14309
14310 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14311
14312 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
14313 Adjusted paths to reflect directory reorganization.
14314
14315 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14316
14317 * doc/.cvsignore, doc/Makefile.am:
14318 Reorganized: sources in `src', documentation in `doc'.
14319
14320 1999-04-18 Jesse Thilo <jthilo@gnu.org>
14321
14322 * configure.in:
14323 Updated AC_INIT file to reflect directory reorganization.
14324
14325 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
14326 Reorganized: sources in `src', documentation in `doc'.
14327
14328 1999-04-13 Jesse Thilo <jthilo@gnu.org>
14329
14330 * src/allocate.c:
14331 Don't declare calloc() and realloc() if not necessary.
14332
14333 1999-04-13 Jesse Thilo <jthilo@gnu.org>
14334
14335 * configure.in, acconfig.h, acinclude.m4:
14336 Don't declare calloc() and realloc() if not necessary.
14337
14338 1999-03-23 Jesse Thilo <jthilo@gnu.org>
14339
14340 * po/.cvsignore: Added i18n support.
14341
14342 1999-03-23 Jesse Thilo <jthilo@gnu.org>
14343
14344 * acconfig.h, configure.in, Makefile.am:
14345 Added i18n support.
14346
14347 1999-03-22 Jesse Thilo <jthilo@gnu.org>
14348
14349 * src/bison.s1: Fixed #line numbers.
14350
14351 1999-03-15 Jesse Thilo <jthilo@gnu.org>
14352
14353 * po/es.po, po/fr.po, po/nl.po, po/de.po:
14354 Added PO files from Translation Project.
14355
14356 1999-03-03 Jesse Thilo <jthilo@gnu.org>
14357
14358 * Makefile.am:
14359 Added support for non-ANSI compilers (ansi2knr).
14360
14361 1999-02-16 Jesse Thilo <jthilo@gnu.org>
14362
14363 * configure.in: Bumped version number to 1.27.
14364
14365 * Makefile.am:
14366 Added `bison.simple' to list of files removed by `make distclean'.
14367
14368 1999-02-12 Jesse Thilo <jthilo@gnu.org>
14369
14370 * src/files.c, src/files.h:
14371 Defined locations of parser files in config.h instead of Makefile.
14372
14373 1999-02-12 Jesse Thilo <jthilo@gnu.org>
14374
14375 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
14376 Defined locations of parser files in config.h instead of Makefile.
14377
14378 1999-02-09 Jesse Thilo <jthilo@gnu.org>
14379
14380 * Makefile.am:
14381 Removed inappropriate use of $< macro.
14382
14383 1999-02-05 Jesse Thilo <jthilo@gnu.org>
14384
14385 * po/Makefile.in.in, po/POTFILES.in:
14386 Add `po' directory skeleton.
14387
14388 1999-01-27 Jesse Thilo <jthilo@gnu.org>
14389
14390 * README: Document help-bison list.
14391
14392 * configure.in: Add check for mkstemp().
14393
14394 1999-01-20 Jesse Thilo <jthilo@gnu.org>
14395
14396 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
14397 Hush a few compiler warnings.
14398
14399 * src/files.c:
14400 Add tryclose(), which verifies that fclose was successful.
14401 Hush a couple of compiler warnings.
14402
14403 1999-01-20 Jesse Thilo <jthilo@gnu.org>
14404
14405 * Makefile.am, OChangeLog:
14406 ChangeLog is now automatically generated. Include the old version as
14407 OChangeLog.
14408
14409 1999-01-14 Jesse Thilo <jthilo@gnu.org>
14410
14411 * 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:
14412 Update FSF address.
14413
14414 1999-01-14 Jesse Thilo <jthilo@gnu.org>
14415
14416 * doc/bison.texinfo: Fix formatting glitch.
14417
14418 * doc/bison.texinfo: Update FSF address.
14419
14420 1999-01-14 Jesse Thilo <jthilo@gnu.org>
14421
14422 * acconfig.h: Update FSF address.
14423
14424 1999-01-08 Jesse Thilo <jthilo@gnu.org>
14425
14426 * src/system.h:
14427 Don't define PACKAGE here, since config.h defines it.
14428
14429 1998-12-30 Jesse Thilo <jthilo@gnu.org>
14430
14431 * src/reader.c: Update copyright date.
14432
14433 * src/main.c:
14434 Ditch sprintf to statically-sized buffers in fatal/warn functions in
14435 favor of output directly to stderr (avoids buffer overruns).
14436
14437 * src/reader.c: Some checks for premature EOF.
14438
14439 * 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:
14440 Use prototypes if the compiler understands them.
14441
14442 * src/files.c: Honor TMPDIR on Unix hosts.
14443 Use prototypes if the compiler understands them.
14444
14445 * src/reader.c:
14446 Fix a couple of buffer overrun bugs.
14447 Use prototypes if the compiler understands them.
14448
14449 * src/system.h: Include unistd.h and ctype.h.
14450 Use #ifdef instead of #if for NLS symbols.
14451
14452 1998-12-30 Jesse Thilo <jthilo@gnu.org>
14453
14454 * doc/bison.texinfo:
14455 Delete comment "consider using @set for edition number, etc..." since
14456 we now are doing so.
14457
14458 1998-12-30 Jesse Thilo <jthilo@gnu.org>
14459
14460 * configure.in:
14461 Use prototypes if the compiler understands them.
14462
14463 * NEWS: Document 1.26 highlights.
14464
14465 * Makefile.am: Require Automake 1.3 or later.
14466
14467 * acconfig.h:
14468 Use prototypes if the compiler understands them.
14469
14470 1998-12-29 Jesse Thilo <jthilo@gnu.org>
14471
14472 * src/version.c:
14473 Use VERSION symbol from automake for version number.
14474
14475 1998-12-29 Jesse Thilo <jthilo@gnu.org>
14476
14477 * acconfig.h, configure.in, version.cin:
14478 Use VERSION symbol from automake for version number.
14479
14480 1998-11-28 Jesse Thilo <jthilo@gnu.org>
14481
14482 * Makefile.am:
14483 Distribute original version of simple parser (bison.s1), not built
14484 version (bison.simple).
14485
14486 1998-11-28 Jesse Thilo <jthilo@gnu.org>
14487
14488 * doc/bison.texinfo: Add info dir entry.
14489
14490 * doc/bison.texinfo:
14491 Let automake put version number into documentation.
14492
14493 1998-11-26 Jesse Thilo <jthilo@gnu.org>
14494
14495 * src/bison.cld, src/build.com, src/vmshlp.mar:
14496 Add non-RCS files from /gd/gnu/bison.
14497
14498 1998-11-26 Jesse Thilo <jthilo@gnu.org>
14499
14500 * doc/bison.1:
14501 Document the BISON_HAIRY and BISON_SIMPLE variables.
14502
14503 1998-11-25 Jesse Thilo <jthilo@gnu.org>
14504
14505 * src/version.c: Build version.c automatically.
14506
14507 * src/reader.c:
14508 Fix token numbering (used to start at 258, not 257).
14509
14510 * src/system.h: Include config.h.
14511
14512 * src/getargs.c: Update bug report address.
14513
14514 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
14515 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
14516
14517 1998-11-25 Jesse Thilo <jthilo@gnu.org>
14518
14519 * Makefile.am:
14520 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
14521
14522 * configure.in, version.cin:
14523 Build version.c automatically.
14524
14525 * AUTHORS: Add AUTHORS file.
14526
14527 * README: Update bug report address.
14528
14529 * bison.simple:
14530 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
14531
14532 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
14533 Add automake stuff.
14534
14535 1998-11-25 Jesse Thilo <jthilo@gnu.org>
14536
14537 * doc/bison.texinfo: Clean up some formatting.
14538
14539 1998-05-05 Richard Stallman <rms@gnu.org>
14540
14541 * doc/bison.texinfo:
14542 Explain better why to make a pure parser.
14543
14544 1998-01-05 Richard Stallman <rms@gnu.org>
14545
14546 * src/files.c (openfiles):
14547 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
14548 find a temporary directory, if possible. Do not unlink files while
14549 they are open.
14550
14551 1997-08-25 Richard Stallman <rms@gnu.org>
14552
14553 * src/reader.c (stack_offset;):
14554 Change some warni to warns.
14555
14556 * src/lex.c (literalchar): Use warns, not warni.
14557
14558 1997-06-28 Richard Stallman <rms@gnu.org>
14559
14560 * src/bison.s1: Add a Bison version comment.
14561
14562 * src/main.c (fatal, warn, berror):
14563 Use program_name.
14564
14565 1997-06-28 Richard Stallman <rms@gnu.org>
14566
14567 * Makefile.in (bison_version): New variable.
14568 (dist): Use that variable.
14569 (bison.s1): Substitute the Bison version into bison.simple.
14570
14571 * bison.simple: Add a Bison version comment.
14572
14573 1997-06-18 Richard Stallman <rms@gnu.org>
14574
14575 * src/main.c (fatal, warn, berror):
14576 Make error messages standard.
14577 (toomany): Improve error message text.
14578
14579 * 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:
14580 new.h renamed to alloc.h.
14581
14582 1997-06-18 Richard Stallman <rms@gnu.org>
14583
14584 * Makefile.in: new.h renamed to alloc.h.
14585
14586 1997-05-24 Richard Stallman <rms@gnu.org>
14587
14588 * src/lex.c (literalchar):
14589 Fix the code for escaping \, " and '.
14590
14591 (lex): Avoid trouble when there are many chars
14592 to discard in a char literal with just several chars in it.
14593
14594 1997-05-17 Richard Stallman <rms@gnu.org>
14595
14596 * src/bison.s1:
14597 Use malloc, if using alloca is troublesome.
14598 (YYSTACK_USE_ALLOCA): New flag macro.
14599 Define it for some systems and compilers.
14600 (YYSTACK_ALLOC): New macro.
14601 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14602 If it was malloc'd, free it.
14603
14604 1997-05-17 Richard Stallman <rms@gnu.org>
14605
14606 * bison.simple:
14607 Use malloc, if using alloca is troublesome.
14608 (YYSTACK_USE_ALLOCA): New flag macro.
14609 Define it for some systems and compilers.
14610 (YYSTACK_ALLOC): New macro.
14611 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14612 If it was malloc'd, free it.
14613
14614 1997-04-23 Richard Stallman <rms@gnu.org>
14615
14616 * src/bison.s1:
14617 (alloca) [__hpux]: Always define as __builtin_alloca.
14618
14619 1997-04-23 Richard Stallman <rms@gnu.org>
14620
14621 * bison.simple:
14622 (alloca) [__hpux]: Always define as __builtin_alloca.
14623
14624 1997-04-22 Richard Stallman <rms@gnu.org>
14625
14626 * src/bison.s1:
14627 [__hpux]: Include alloca.h (right for HPUX 10)
14628 instead of declaring alloca (right for HPUX 9).
14629
14630 * src/bison.s1 (__yy_memcpy):
14631 Declare arg `count' as unsigned int.
14632 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14633
14634 1997-04-22 Richard Stallman <rms@gnu.org>
14635
14636 * bison.simple:
14637 [__hpux]: Include alloca.h (right for HPUX 10)
14638 instead of declaring alloca (right for HPUX 9).
14639
14640 * bison.simple (__yy_memcpy):
14641 Declare arg `count' as unsigned int.
14642 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14643
14644 1997-01-03 Richard Stallman <rms@gnu.org>
14645
14646 * src/allocate.c: [__STDC__ or _MSC_VER]:
14647 Declare calloc and realloc to return void *.
14648
14649 1997-01-02 Richard Stallman <rms@gnu.org>
14650
14651 * src/system.h:
14652 [_MSC_VER]: Include stdlib.h and process.h.
14653 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
14654
14655 * src/main.c (main): Return FAILURE as a value.
14656 (printable_version): Declare arg as int, not char.
14657
14658 1997-01-02 Richard Stallman <rms@gnu.org>
14659
14660 * Makefile.in (dist):
14661 Explicitly check for symlinks, and copy them.
14662
14663 1996-12-19 Richard Stallman <rms@gnu.org>
14664
14665 * src/files.c:
14666 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
14667
14668 1996-12-18 Paul Eggert <eggert@gnu.org>
14669
14670 * src/bison.s1 (yyparse):
14671 If __GNUC__ and YYPARSE_PARAM are both defined,
14672 declare yyparse to have a void * argument.
14673
14674 1996-12-18 Paul Eggert <eggert@gnu.org>
14675
14676 * bison.simple (yyparse):
14677 If __GNUC__ and YYPARSE_PARAM are both defined,
14678 declare yyparse to have a void * argument.
14679
14680 1996-12-17 Richard Stallman <rms@gnu.org>
14681
14682 * src/reduce.c (nbits): Add some casts.
14683
14684 1996-08-12 Richard Stallman <rms@gnu.org>
14685
14686 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
14687
14688 1996-08-12 Richard Stallman <rms@gnu.org>
14689
14690 * bison.simple: Test _MSDOS as well as _MSDOS_.
14691
14692 1996-07-31 Richard Stallman <rms@gnu.org>
14693
14694 * src/bison.s1:
14695 [__sun && __i386]: Include alloca.h.
14696
14697 1996-07-31 Richard Stallman <rms@gnu.org>
14698
14699 * bison.simple:
14700 [__sun && __i386]: Include alloca.h.
14701
14702 1996-07-30 Richard Stallman <rms@gnu.org>
14703
14704 * src/bison.s1: Comment change.
14705
14706 * src/bison.s1: Test _MSDOS_, not MSDOS.
14707
14708 1996-07-30 Richard Stallman <rms@gnu.org>
14709
14710 * bison.simple: Comment change.
14711
14712 * bison.simple: Test _MSDOS_, not MSDOS.
14713
14714 1996-06-01 Richard Stallman <rms@gnu.org>
14715
14716 * 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:
14717 Insert `_' macro around many string constants.
14718
14719 * src/main.c:
14720 Insert `_' macro around many string constants.
14721
14722 (main): Call setlocale, bindtextdomain and textdomain.
14723
14724 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
14725 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
14726 [ENABLE_NLS]: Include libintl.h.
14727 [ENABLE_NLS] (gettext): Define.
14728 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
14729 (N_, PACKAGE, LOCALEDIR): New macros.
14730
14731 1996-06-01 Richard Stallman <rms@gnu.org>
14732
14733 * POTFILES.in: New file.
14734
14735 * Makefile.in (allocate.o):
14736 Define target explicitly.
14737
14738 * Makefile.in (CFLAGS): Set to @CFLAGS@.
14739 (LDFLAGS): Set to @LDFLAGS@.
14740 (configure): Run autoconf only if preceding `cd' succeeds.
14741 (bison.s1): Redirect output to temporary file then move the
14742 temporary to the target, rather than redirecting directly to bison.s1.
14743 (clean): Remove config.status and config.log.
14744 (distclean): Don't remove config.status here.
14745
14746 1996-05-12 Richard Stallman <rms@gnu.org>
14747
14748 * src/bison.s1:
14749 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14750
14751 1996-05-12 Richard Stallman <rms@gnu.org>
14752
14753 * bison.simple:
14754 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14755
14756 1996-05-11 Richard Stallman <rms@gnu.org>
14757
14758 * src/bison.s1 (__yy_memcpy):
14759 Really reorder the args, as was supposedly done on Feb 14 1995.
14760 (yyparse): Calls changed accordingly.
14761
14762 1996-05-11 Richard Stallman <rms@gnu.org>
14763
14764 * Makefile.in (dist): Don't use $(srcdir).
14765
14766 * bison.simple (__yy_memcpy):
14767 Really reorder the args, as was supposedly done on Feb 14 1995.
14768 (yyparse): Calls changed accordingly.
14769
14770 1996-01-27 Richard Stallman <rms@gnu.org>
14771
14772 * src/output.c (output_rule_data):
14773 Test YYERROR_VERBOSE in the conditional
14774 around the definition of ttyname.
14775
14776 1995-12-29 Richard Stallman <rms@gnu.org>
14777
14778 * src/bison.s1:
14779 Fix line numbers in #line commands.
14780
14781 1995-12-29 Richard Stallman <rms@gnu.org>
14782
14783 * bison.simple:
14784 Fix line numbers in #line commands.
14785
14786 1995-12-27 Richard Stallman <rms@gnu.org>
14787
14788 * src/bison.s1 (YYPARSE_PARAM_DECL):
14789 In C++, make it always null.
14790 (YYPARSE_PARAM_ARG): New macro.
14791 (yyparse): Use YYPARSE_PARAM_ARG.
14792
14793 1995-12-27 Richard Stallman <rms@gnu.org>
14794
14795 * bison.simple (YYPARSE_PARAM_DECL):
14796 In C++, make it always null.
14797 (YYPARSE_PARAM_ARG): New macro.
14798 (yyparse): Use YYPARSE_PARAM_ARG.
14799
14800 1995-11-29 Richard Stallman <rms@gnu.org>
14801
14802 * doc/bison.texinfo:
14803 Describe literal string tokens, %raw, %no_lines, %token_table.
14804
14805 1995-11-29 Daniel Hagerty <hag@gnu.org>
14806
14807 * doc/bison.texinfo: Fixed update date
14808
14809 1995-10-16 Richard Stallman <rms@gnu.org>
14810
14811 * src/version.c: Version 1.25.
14812
14813 1995-10-16 Richard Stallman <rms@gnu.org>
14814
14815 * NEWS: *** empty log message ***
14816
14817 1995-10-16 Richard Stallman <rms@gnu.org>
14818
14819 * doc/bison.1, doc/bison.rnh:
14820 Add new options.
14821
14822 1995-10-15 Richard Stallman <rms@gnu.org>
14823
14824 * src/vmsgetargs.c, src/getargs.c:
14825 Added -n, -k, and -raw switches.
14826 (noparserflag, toknumflag, rawtoknumflag): New variables.
14827
14828 * src/symtab.h (SALIAS):
14829 New #define for adding aliases to %token.
14830 (struct bucket): Added `alias' field.
14831
14832 * src/reduce.c (reduce_grammar):
14833 Revise error message.
14834 (print_notices): Remove final `.' from error message.
14835
14836 * src/reader.c (reader_output_yylsp):
14837 New function.
14838 (readgram): Use `#if 0' around code that accepted %command
14839 inside grammar rules: The documentation doesn't allow it,
14840 and it will fail since the %command processors scan for the next %.
14841 (parse_token_decl): Extended the %token
14842 declaration to allow a multi-character symbol as an alias.
14843 (parse_thong_decl): New function.
14844 (read_declarations): Added %thong declarations.
14845 (read_declarations): Handle NOOP to deal with allowing
14846 % declarations as another means to specify the flags.
14847 (readgram): Allow %prec prior to semantics embedded in a rule.
14848 (skip_to_char, read_declarations, copy_definition)
14849 (parse_token_decl, parse_start_decl, parse_type_decl)
14850 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
14851 (get_type_name, copy_guard, copy_action, readgram)
14852 (get_type, packsymbols): Revised most error messages.
14853 Changed `fatal' to `warnxxx' to avoid aborting for error.
14854 Revised and use multiple warnxxx functions to avoid using VARARGS1.
14855 (read_declarations): Improve the error message for
14856 an invalid character. Do not abort.
14857 (read_declarations, copy_guard, copy_action): Use
14858 printable_version to avoid unprintable characters in printed output.
14859 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
14860 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
14861 Allow the type of a non-terminal can be given
14862 more than once, as long as all specifications give the same type.
14863
14864 * src/output.c:
14865 (output_headers, output_trailers, output, output_gram)
14866 (output_rule_data): Implement noparserflag variable.
14867 Implement toknumflag variable.
14868 (output): Call reader_output_yylsp to output LTYPESTR.
14869
14870 * src/main.c (main):
14871 If reader sees an error, don't process the grammar.
14872 (fatals): Updated to not use VARARGS1.
14873 (printable_version, int_to_string, warn, warni, warns, warnss)
14874 (warnsss): New error reporting functions. Avoid abort for error.
14875
14876 * src/lex.h:
14877 Added THONG and NOOP for alias processing.
14878 Added SETOPT for the new code that allows setting options with %flags.
14879
14880 * src/lex.c:
14881 Include getopt.h. Add some extern decls.
14882 (safegetc): New function to deal with EOF gracefully.
14883 (literalchar); new function to deal with reading \ escapes.
14884 (lex): Use literalchar.
14885 (lex): Implemented "..." tokens.
14886 (literalchar, lex, parse_percent_token): Made tokenbuffer
14887 always contain the token. This includes growing the token
14888 buffer while reading an integer.
14889 (parse_percent_token): Replaced if-else statement with percent_table.
14890 (parse_percent_token): Added % declarations as another
14891 way to specify the flags -n, -l, and -r. Also added hooks for
14892 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
14893 major changes to files.c.
14894 (lex) Retain in the incoming stream a character following
14895 an incorrect '/'.
14896 (skip_white_space, lex): Revised most error messages
14897 and changed fatal to warn to avoid aborting.
14898 (percent_table): Added %thong declarations.
14899
14900 * src/gram.h: Comment changes.
14901
14902 * src/files.c (openfiles, open_extra_files, done):
14903 Add faction flag
14904 and actfile file. Handle noparserflag. Both for -n switch.
14905
14906 * src/conflicts.c (resolve_sr_conflict):
14907 Remove use of alloca.
14908
14909 1995-06-01 Jim Meyering <meyering@gnu.org>
14910
14911 * doc/bison.texinfo: *** empty log message ***
14912
14913 1995-05-06 Richard Stallman <rms@gnu.org>
14914
14915 * src/bison.s1: Comment change.
14916
14917 1995-05-06 Richard Stallman <rms@gnu.org>
14918
14919 * bison.simple: Comment change.
14920
14921 1995-05-03 Richard Stallman <rms@gnu.org>
14922
14923 * src/version.c: Version now 1.24.
14924
14925 * src/bison.s1: Change distribution terms.
14926
14927 * src/version.c: Version now 1.23.
14928
14929 1995-05-03 Richard Stallman <rms@gnu.org>
14930
14931 * doc/bison.texinfo:
14932 Rewrite "Conditions for Using Bison".
14933 Update version to 1.24.
14934
14935 1995-05-03 Richard Stallman <rms@gnu.org>
14936
14937 * bison.simple: Change distribution terms.
14938
14939 1995-02-23 Richard Stallman <rms@gnu.org>
14940
14941 * src/files.c: Test __VMS_POSIX as well as VMS.
14942
14943 1995-02-14 Jim Meyering <meyering@gnu.org>
14944
14945 * src/bison.s1 (__yy_memcpy):
14946 Renamed from __yy_bcopy to avoid
14947 confusion. Reverse FROM and TO arguments to be consistent with
14948 those of memcpy.
14949
14950 1995-02-14 Jim Meyering <meyering@gnu.org>
14951
14952 * bison.simple (__yy_memcpy):
14953 Renamed from __yy_bcopy to avoid
14954 confusion. Reverse FROM and TO arguments to be consistent with
14955 those of memcpy.
14956
14957 1994-11-10 David J. MacKenzie <djm@gnu.org>
14958
14959 * NEWS: reformat
14960
14961 * NEWS: New file.
14962
14963 * Makefile.in (DISTFILES): Include NEWS.
14964
14965 * Makefile.in (DISTFILES):
14966 Include install-sh, not install.sh.
14967
14968 * configure.in: Update to Autoconf v2 macro names.
14969
14970 1994-10-05 David J. MacKenzie <djm@gnu.org>
14971
14972 * Makefile.in: fix typo
14973
14974 * Makefile.in (prefix, exec_prefix):
14975 Let configure set them.
14976
14977 1994-09-28 David J. MacKenzie <djm@gnu.org>
14978
14979 * Makefile.in: Set datadir to $(prefix)/share.
14980
14981 1994-09-15 Richard Stallman <rms@gnu.org>
14982
14983 * src/bison.s1:
14984 Update copyright notice and GPL version.
14985
14986 1994-09-15 Richard Stallman <rms@gnu.org>
14987
14988 * bison.simple:
14989 Update copyright notice and GPL version.
14990
14991 1994-07-12 Richard Stallman <rms@gnu.org>
14992
14993 * src/reduce.c, src/reader.c:
14994 entered into RCS
14995
14996 1994-05-05 David J. MacKenzie <djm@gnu.org>
14997
14998 * Makefile.in: entered into RCS
14999
15000 1994-03-26 Richard Stallman <rms@gnu.org>
15001
15002 * src/bison.s1: entered into RCS
15003
15004 1994-03-26 Richard Stallman <rms@gnu.org>
15005
15006 * bison.simple: entered into RCS
15007
15008 1994-03-25 Richard Stallman <rms@gnu.org>
15009
15010 * src/main.c: entered into RCS
15011
15012 1994-03-24 Richard Stallman <rms@gnu.org>
15013
15014 * src/conflicts.c: entered into RCS
15015
15016 1994-01-02 Richard Stallman <rms@gnu.org>
15017
15018 * Makefile.in: *** empty log message ***
15019
15020 1993-11-21 Richard Stallman <rms@gnu.org>
15021
15022 * src/bison.s1: *** empty log message ***
15023
15024 1993-11-21 Richard Stallman <rms@gnu.org>
15025
15026 * doc/bison.texinfo: entered into RCS
15027
15028 * doc/bison.texinfo: *** empty log message ***
15029
15030 1993-11-21 Richard Stallman <rms@gnu.org>
15031
15032 * bison.simple: *** empty log message ***
15033
15034 1993-10-25 David J. MacKenzie <djm@gnu.org>
15035
15036 * doc/bison.texinfo: *** empty log message ***
15037
15038 1993-10-19 Richard Stallman <rms@gnu.org>
15039
15040 * src/bison.s1: *** empty log message ***
15041
15042 1993-10-19 Richard Stallman <rms@gnu.org>
15043
15044 * bison.simple: *** empty log message ***
15045
15046 1993-10-14 Richard Stallman <rms@gnu.org>
15047
15048 * src/bison.s1: *** empty log message ***
15049
15050 1993-10-14 Richard Stallman <rms@gnu.org>
15051
15052 * bison.simple: *** empty log message ***
15053
15054 1993-09-14 David J. MacKenzie <djm@gnu.org>
15055
15056 * doc/bison.texinfo: *** empty log message ***
15057
15058 1993-09-13 Noah Friedman <friedman@gnu.org>
15059
15060 * Makefile.in: *** empty log message ***
15061
15062 1993-09-10 Richard Stallman <rms@gnu.org>
15063
15064 * src/conflicts.c: *** empty log message ***
15065
15066 * src/system.h: entered into RCS
15067
15068 1993-09-10 Richard Stallman <rms@gnu.org>
15069
15070 * doc/bison.1: entered into RCS
15071
15072 1993-09-06 Noah Friedman <friedman@gnu.org>
15073
15074 * src/version.c: entered into RCS
15075
15076 1993-09-06 Noah Friedman <friedman@gnu.org>
15077
15078 * Makefile.in: *** empty log message ***
15079
15080 1993-07-30 David J. MacKenzie <djm@gnu.org>
15081
15082 * Makefile.in: *** empty log message ***
15083
15084 1993-07-24 Richard Stallman <rms@gnu.org>
15085
15086 * src/bison.s1: *** empty log message ***
15087
15088 1993-07-24 Richard Stallman <rms@gnu.org>
15089
15090 * bison.simple: *** empty log message ***
15091
15092 1993-07-08 David J. MacKenzie <djm@gnu.org>
15093
15094 * Makefile.in: *** empty log message ***
15095
15096 1993-07-04 Richard Stallman <rms@gnu.org>
15097
15098 * src/bison.s1: *** empty log message ***
15099
15100 1993-07-04 Richard Stallman <rms@gnu.org>
15101
15102 * bison.simple: *** empty log message ***
15103
15104 1993-06-26 David J. MacKenzie <djm@gnu.org>
15105
15106 * src/getargs.c: entered into RCS
15107
15108 1993-06-26 David J. MacKenzie <djm@gnu.org>
15109
15110 * doc/bison.texinfo: *** empty log message ***
15111
15112 * doc/bison.1: New file.
15113
15114 1993-06-25 Richard Stallman <rms@gnu.org>
15115
15116 * src/getargs.c: New file.
15117
15118 1993-06-16 Richard Stallman <rms@gnu.org>
15119
15120 * src/bison.s1: *** empty log message ***
15121
15122 1993-06-16 Richard Stallman <rms@gnu.org>
15123
15124 * bison.simple: *** empty log message ***
15125
15126 1993-06-03 Richard Stallman <rms@gnu.org>
15127
15128 * src/bison.s1: New file.
15129
15130 1993-06-03 Richard Stallman <rms@gnu.org>
15131
15132 * doc/bison.texinfo: *** empty log message ***
15133
15134 1993-06-03 Richard Stallman <rms@gnu.org>
15135
15136 * bison.simple: New file.
15137
15138 1993-05-19 Richard Stallman <rms@gnu.org>
15139
15140 * doc/bison.texinfo: New file.
15141
15142 1993-05-07 Noah Friedman <friedman@gnu.org>
15143
15144 * Makefile.in: *** empty log message ***
15145
15146 1993-04-28 Noah Friedman <friedman@gnu.org>
15147
15148 * src/reader.c: *** empty log message ***
15149
15150 1993-04-23 Noah Friedman <friedman@gnu.org>
15151
15152 * src/alloc.h: entered into RCS
15153
15154 1993-04-20 David J. MacKenzie <djm@gnu.org>
15155
15156 * src/version.c: *** empty log message ***
15157
15158 * src/files.c, src/allocate.c:
15159 entered into RCS
15160
15161 * src/reader.c: *** empty log message ***
15162
15163 * src/lex.c: entered into RCS
15164
15165 * src/conflicts.c: New file.
15166
15167 * src/symtab.c: entered into RCS
15168
15169 * src/alloc.h: New file.
15170
15171 * src/LR0.c: entered into RCS
15172
15173 1993-04-18 Noah Friedman <friedman@gnu.org>
15174
15175 * src/reader.c: New file.
15176
15177 * src/version.c: *** empty log message ***
15178
15179 1993-04-18 Noah Friedman <friedman@gnu.org>
15180
15181 * Makefile.in: *** empty log message ***
15182
15183 1993-04-17 Noah Friedman <friedman@gnu.org>
15184
15185 * Makefile.in: *** empty log message ***
15186
15187 1993-04-15 Richard Stallman <rms@gnu.org>
15188
15189 * src/main.c, src/files.c:
15190 New file.
15191
15192 1993-04-15 Noah Friedman <friedman@gnu.org>
15193
15194 * configure.in: entered into RCS
15195
15196 * configure.in: *** empty log message ***
15197
15198 * configure.in: New file.
15199
15200 1993-04-14 Richard Stallman <rms@gnu.org>
15201
15202 * Makefile.in: New file.
15203
15204 1993-04-13 Richard Stallman <rms@gnu.org>
15205
15206 * src/version.c: New file.
15207
15208 1993-03-25 Richard Stallman <rms@gnu.org>
15209
15210 * src/output.c: entered into RCS
15211
15212 1992-09-25 Richard Stallman <rms@gnu.org>
15213
15214 * configure.bat: entered into RCS
15215
15216 1992-06-22 Richard Stallman <rms@gnu.org>
15217
15218 * src/vmsgetargs.c: entered into RCS
15219
15220 1992-06-22 Richard Stallman <rms@gnu.org>
15221
15222 * doc/bison.rnh: entered into RCS
15223
15224 1992-04-20 David J. MacKenzie <djm@gnu.org>
15225
15226 * README: entered into RCS
15227
15228 1992-01-22 Richard Stallman <rms@gnu.org>
15229
15230 * src/machine.h: entered into RCS
15231
15232 1991-12-21 Richard Stallman <rms@gnu.org>
15233
15234 * src/lalr.c, src/closure.c:
15235 entered into RCS
15236
15237 1991-12-20 Richard Stallman <rms@gnu.org>
15238
15239 * src/state.h: entered into RCS
15240
15241 1991-12-18 Richard Stallman <rms@gnu.org>
15242
15243 * src/print.c, src/nullable.c, src/derives.c:
15244 entered into RCS
15245
15246 1991-11-03 David J. MacKenzie <djm@gnu.org>
15247
15248 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
15249 entered into RCS
15250
15251 1988-09-09 Richard Stallman <rms@gnu.org>
15252
15253 * src/bison.hairy: entered into RCS
15254
15255 1987-12-16 Richard Stallman <rms@gnu.org>
15256
15257 * REFERENCES: entered into RCS
15258
15259
15260 -----
15261
15262 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
15263 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
15264 Software Foundation, Inc.
15265
15266 Copying and distribution of this file, with or without
15267 modification, are permitted provided the copyright notice and this
15268 notice are preserved.