]> git.saurik.com Git - bison.git/blame - ChangeLog
* data/glr.c: Reformat whitespace with tabs.
[bison.git] / ChangeLog
CommitLineData
9ecafbbf
AD
12006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * data/glr.c: Reformat whitespace with tabs.
4 (b4_lpure_formals): Remove this unused m4 macro.
5 * tests/cxx-type.at: Reformat whitespace with tabs.
6 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
7 since it's a member. Rename type to isNterm for clarity.
8
c4d497a0
AD
92005-12-29 Akim <akim@sulaco.local>
10
11 Let glr.cc catch up with symbol_value_print.
12 * data/glr.cc (b4_yysymprint_generate): Replace by...
13 (b4_yy_symbol_print_generate): this.
14 (yy_symbol_print, yy_symbol_value_print): Declare them.
15
4517da37
PE
162005-12-28 Paul Eggert <eggert@cs.ucla.edu>
17
18 * src/location.h (boundary): Note that a line or column equal
19 to INT_MAX indicates an overflow.
20 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
21 (rule_length_overflow, increment_rule_length, add_column_width):
22 New functions.
23 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
24 (<SC_BRACED_CODE>"}"):
25 Use increment_rule_length rather than incrementing it by hand.
26 (adjust_location, handle_syncline): Diagnose overflow.
27 (handle_action_dollar, handle_action_at):
28 Fix bug with monstrosities like $-2147483648.
29 Remove now-unnecessary checks.
30 (scan_integer): Verify assumptions and remove now-unnecessary checks.
31 (convert_ucn_to_byte): Verify assumptions.
32 (handle_syncline): New arg LOC. All callers changed.
33 Don't store through a value derived from char const * pointer.
34
35 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
36 GCC warnings.
37
e3233bf6
PE
382005-12-27 Paul Eggert <eggert@cs.ucla.edu>
39
40 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
41 Remove unnecessary forward static decls.
42
8f3596a6
AD
432005-12-27 Akim Demaille <akim@epita.fr>
44
45 * src/reader.c (grammar_current_rule_check): Also check that $$
46 is used.
47 Take the rule to check as argument, hence rename as...
48 (grammar_rule_check): this.
49 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
50 Rename as...
51 (grammar_rule_begin, grammar_rule_end): these, for consistency.
52 (grammar_midrule_action, grammar_symbol_append): Now static.
53 * tests/torture.at (input): Don't rely on the default action
54 being always performed.
55 * tests/calc.at: "Set" $$ even when the action is "cut" with
56 YYERROR or other.
57 * tests/actions.at (Exotic Dollars): Instead of using unused
58 values, check that the warning is issued.
59
721be13c
PE
602005-12-22 Paul Eggert <eggert@cs.ucla.edu>
61
62 * NEWS: Improve wording for unused-value warnings.
63
a0af42fc
AD
642005-12-22 Akim Demaille <akim@epita.fr>
65
66 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
67 (b4_yysymprint_generate): Rename as...
68 (b4_yy_symbol_print_generate): this.
69 Generate yy_symbol_print instead of yysymprint.
70 Generate also yy_symbol_value_print, and use it.
71
affac613
AD
722005-12-22 Akim Demaille <akim@epita.fr>
73
721be13c 74 * NEWS: Warn about unused values.
affac613
AD
75 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
76 a `used' member.
77 (symbol_list_n_get, symbol_list_n_used_set): New.
78 (symbol_list_n_type_name_get): Use symbol_list_n_get.
79 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
80 * src/reader.c (grammar_current_rule_check): Check that values are
81 used.
82 * src/symtab.c (symbol_print): Accept 0.
83 * tests/existing.at: Remove the type information.
84 Empty the actions.
85 Remove useless actions (beware of mid-rule actions: perl -000
86 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
87 * tests/actions.at (Exotic Dollars): Use unused values.
88 * tests/calc.at: Likewise.
89 * tests/glr-regression.at (No users destructors if stack 0 deleted):
90 Likewise.
91
92 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
93 rule_useful_p.
94
9d9b8b70
PE
952005-12-21 Paul Eggert <eggert@cs.ucla.edu>
96
8bb4c753
PE
97 Undo 2005-12-01 tentative license wording change. The wording is
98 still being reviewed by the lawyers, and we don't want to wait for
99 them before publishing a test release. For now, revert to the
100 previous wording.
101 * NEWS: Undo 2005-12-01 change.
102 * data/glr.c: Revert to previous license wording.
103 * data/glr.cc: Likewise.
104 * data/lalr1.cc: Likewise.
105 * data/location.cc: Likewise.
106 * data/yacc.c: Likewise.
107
9d9b8b70
PE
108 * NEWS: Reword %destructor vs YYABORT etc.
109 * data/glr.c: Use American spacing, for consistency.
110 * data/glr.cc: Likewise.
111 * data/lalr1.cc: Likewise.
112 * data/yacc.c: Likewise.
113 * data/yacc.c: Reformat comments slightly.
114 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
115 for consistency. Fix some spelling errors and reword recently-included
116 text slightly.
117 * tests/cxx-type.at: Cast results of malloc, for C++.
118
2c3b392a
AD
1192005-12-21 Joel E. Denny <address@hidden>
120
121 * tests/cxx-type.at: Construct a tree, count the parents of shared
122 nodes, and free each node once and only once. Previously, the memory
123 for semantic values was leaked instead.
124
d6cff4dc
AD
1252005-12-21 Joel E. Denny <address@hidden>
126
127 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
128 (yylval, yylloc): If pure, #define to yystackp->yyval and
129 yystackp->yyloc similar to yychar and yynerrs.
130 (yyparse): If pure, remove local yylval and yylloc. Add local
131 yystackp to accommodate pure definitions of yylval and yylloc.
132 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
133 yylvalp and yyllocp to &yylval and &yylloc.
134 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
135 namespace. Previously, nerrs and char were missing, but lval and lloc
136 weren't necessary.
137 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
138 yylvalp and yyllocp parameters since, if pure, these are now always
139 accessible through yystackp. If not pure, they are still accessible
140 globally.
141 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
142 `if (YYID (N))' to pacify lint.
143
a85284cf
AD
1442005-12-21 Akim Demaille <akim@epita.fr>
145
146 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
147 destroy the RHS symbols of a rule.
148 * data/yacc.c (yylen): Initialize to 0.
149 Keep its value to the number of items to possibly shift.
150 In particular, a regular successful parse that ends on YYFINAL by
151 a (internal) YYACCEPT must not have yylen != 0.
152 (yyerrorlab, yyreturn): Pop the RHS.
153 Reorder a bit to emphasize the `shifting' bits of code.
154 (YYPOPSTACK): Now accept a number of items to pop.
155 * data/lalr1.cc: Likewise.
156 * data/glr.c: Formatting changes.
157 Use goto instead of fall through.
158 * doc/bison.texinfo (Destructor Decl): Complete.
159
d508c281
JMG
1602005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
161
162 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
163 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
164 * djgpp/config.bat: Replace every occurence of the file name
165 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
166 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
167 * djgpp/config.sed: Replace every occurence of the file name
168 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
169 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
170 * djgpp/djunpack.bat: DJGPP specific file.
171 * djgpp/fnchange.lst: DJGPP specific file.
172 * djgpp/README.in: Add new information about how to unpack the bison
173 source on MSDOS and other systems which have 8.3 file name restrictions
174 using djunpack.bat and fnchange.lst.
175
3e7a2cd9
PE
1762005-12-12 Paul Eggert <eggert@cs.ucla.edu>
177
178 * bootstrap (build_cvs_prefix): Remove; unused.
179 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
180 when getting gnulib.
181
1822005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
183
184 * data/glr.c: Reorder typedef declarations for structs to match order
185 of struct declarations.
186 Rename yystack everywhere to yystackp except in yyparse where it's not
187 a pointer.
188 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
189 consistency.
190 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
191 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
192 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
193 lint.
194
877519f8
PE
1952005-12-09 Paul Eggert <eggert@cs.ucla.edu>
196
0eca5a39
PE
197 * tests/sets.at (Accept): Fix typos in regular expression used to
198 sed out the final state number.
199
2cec9080
PE
200 Work around portability problem on Solaris 10: flex-generated
201 files include <stdio.h> before <config.h>, which messes up
202 because the latter defines __EXTENSIONS__. Address the problem
203 by creating two new little files that include <config.h> first,
204 then include the flex-generated files. Rewrite everyone else
205 to include <config.h> first, as well.
206 * lib/timevar.c: Always include "config.h".
207 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
208 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
209 (EXTRA_bison_SOURCES): New macro.
210 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
211 * src/system.h: Don't include config.h.
212 * src/LR0.c: Include <config.h> first.
213 * src/assoc.c: Likewise.
214 * src/closure.c: Likewise.
215 * src/complain.c: Likewise.
216 * src/conflicts.c: Likewise.
217 * src/derives.c: Likewise.
218 * src/files.c: Likewise.
219 * src/getargs.c: Likewise.
220 * src/gram.c: Likewise.
221 * src/lalr.c: Likewise.
222 * src/location.c: Likewise.
223 * src/main.c: Likewise.
224 * src/muscle_tab.c: Likewise.
225 * src/nullable.c: Likewise.
226 * src/output.c: Likewise.
227 * src/parse-gram.y: Likewise.
228 * src/print.c: Likewise.
229 * src/print_graph.c: Likewise.
230 * src/reader.c: Likewise.
231 * src/reduce.c: Likewise.
232 * src/relation.c: Likewise.
233 * src/state.c: Likewise.
234 * src/symlist.c: Likewise.
235 * src/symtab.c: Likewise.
236 * src/tables.c: Likewise.
237 * src/uniqstr.c: Likewise.
238 * src/vcg.c: Likewise.
239
877519f8
PE
240 * src/parse-gram.y: Fix minor problems uncovered by lint.
241 (current_lhs, current_lhs_location): Now static.
242 (current_assoc): Remove unused variable.
243
244 Cleanups so that Bison-generated parsers have less lint.
245 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
246 Prepend /*ARGSUSED*/, for lint's sake.
247 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
248 definition if 'lint' is defined.
249 (YYID): New macro (or function, if lint).
250 All uses of /*CONSTCOND*/0 replaced by YYID(0).
251 * data/yacc.c: Likewise.
252 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
253 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
254 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
255 is C++ only.
256 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
257 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
258 Use YYID(0) rather than 0, for lint.
259 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
260 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
261
f5228370
PE
2622005-12-07 Paul Eggert <eggert@cs.ucla.edu>
263
264 * tests/glr-regression.at
265 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
266 Close memory leak reported by twlevo.
267
69ce078b
PE
2682005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
269
6ff99711
PE
270 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
271 all stacks.
272 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
273 * tests/glr-regression.at (No users destructors if stack 0 deleted):
274 New test case.
275 (Duplicated user destructor for lookahead): This test now is expected
276 to succeed.
277
af3412cd
PE
2782005-12-01 Paul Eggert <eggert@cs.ucla.edu>
279
32b5b719 280 * NEWS: Document the following change.
af3412cd
PE
281 * data/yacc.c: Say "parser skeleton" rather than "file", since
282 it's no longer just a file.
283 * data/glr.c: Grant a special exception for C GLR parsers, that
284 reads like the already-existing exception for C LALR(1) parsers.
285 * data/glr.cc: Likewise.
286 * data/lalr1.cc: Likewise.
287 * data/location.cc: Likewise.
288 * data/yacc.c: Reword the "written by" statement to clarify that
289 it was the parser skeleton, not the entire output file.
290 * data/glr.c: Written by Paul Hilfinger.
291 * data/glr.cc: Written by Akim Demaille.
292 * data/lalr1.cc: Likewise.
293
035aa4a0
PE
2942005-11-18 Paul Eggert <eggert@cs.ucla.edu>
295
d9963c85
PE
296 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
297 Fix typos in previous change that broke 'make check'.
298 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
299 supported in C.
300 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
301 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
302 We can revert this once things settle down.
303
035aa4a0
PE
304 * src/conflicts.c (conflicts_print): Don't print file name twice
305 when %expect fails because there were no conflicts.
306 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
307 change.
308 * tests/conflicts.at (%expect not enough, %expect too much):
309 (%expect with reduce conflicts): Adjust to new behavior.
310
3112005-11-18 Akim Demaille <akim@epita.fr>
312
313 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
314 errors.
315 * NEWS: Document this.
316 * doc/bison.texinfo (Expect Decl): Likewise.
317
d1ff7a7c
AD
3182005-11-16 Akim Demaille <akim@epita.fr>
319
320 Generalize the display of semantic values and locations in traces.
321 * data/glr.c (yy_reduce_print): Fix indices (again).
322 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
323 literal integers.
324 * data/lalr1.cc (yyreduce_print): Rename as...
325 (yy_reduce_print): this.
326 Display values and locations.
327 * data/yacc.c (yy_reduce_print): Likewise.
328 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
329 (yysymprint): Move higher to be visible from yy_reduce_print).
330 (yyparse): Adjust.
331 * tests/calc.at: Adjust the expected length of the traces.
332
6de5398d
AD
3332005-11-14 Akim Demaille <akim@epita.fr>
334
335 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
336 from 1 to N, while values and location start at 0.
337 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
338
a1373f55
AD
3392005-11-14 Akim Demaille <akim@epita.fr>
340
341 * data/glr.c (yy_reduce_print): Fix the $ number.
342
613d8952
AD
3432005-11-14 Akim Demaille <akim@epita.fr>
344
345 "Use" parse parameters.
346 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
347 * data/glr.c, data/glr.cc: Use them.
348 * data/glr.c (YYUSE): Have a C++ definition that supports
349 non-pointer types.
350
b2741627
AD
3512005-11-14 Akim Demaille <akim@epita.fr>
352
353 * data/glr.c (yyexpandGLRStack): Declare only if defined.
354
5059b5c8
AD
3552005-11-14 Akim Demaille <akim@epita.fr>
356
42249483
AD
357 * data/glr.cc: New.
358 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 359
4626a15d
AD
3602005-11-12 Akim Demaille <akim@epita.fr>
361
362 Let position and location be PODs.
363 * data/location.cc (position::initialize, location::initialize): New.
364 (position::position, location::location): Define only if
365 b4_location_constructors is defined.
366 * data/lalr1.cc (b4_location_constructors): Define it for backward
367 compatibility.
368 * doc/bison.texinfo (Initial Action Decl): Use initialize.
369
3702005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
371
372 * data/lalr1.cc: Move the body of the ctor and dtor into the
373 parser file (instead of the header).
374 Wrap the implementations in a "namespace yy".
375
3762005-11-12 Akim Demaille <akim@epita.fr>
377
378 Have glr.c include its header file when created.
379 * data/glr.c (b4_shared_declarations): New.
380 Output them verbatim in the parser if !%defines, otherwise
381 output then in the header file, and include it instead.
382
1989d947
AD
3832005-11-11 Akim Demaille <akim@epita.fr>
384
385 * data/glr.c: Comment changes.
386
3872005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
388
389 When yydebug, report semantic and location values for reductions.
390 * data/glr.c (yy_reduce_print): Report the semantic values and the
391 locations.
392 (YY_REDUCE_PRINT): Adjust.
393 (yyglrReduce): Use them.
394 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
395 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
396 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
397 traces.
398
02998094
AD
3992005-11-10 Akim Demaille <akim@epita.fr>
400
401 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
402 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
403 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
404
5210672f
PE
4052005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
406
407 * m4/cxx.m4, examples/Makefile.am: Don't build
408 examples/calc++ if no C++ compiler is available. (trivial change)
409
a8991a1d
AD
4102005-11-09 Akim Demaille <akim@epita.fr>
411
412 * src/scan-skel.l: Use a couple of asserts.
413
36b5e963
AD
4142005-11-03 Akim Demaille <akim@epita.fr>
415
416 In some (weird) cases, the final state number is incorrect.
417 Reported by Alexandre Duret-Lutz.
418 * src/LR0.c (state_list_append): Remove the computation of
419 final_state.
420 (save_reductions): Do it here.
421 (get_state): Alpha conversion.
422 (generate_states): Use a for loop.
423 * src/gram.h (item_number_is_rule_number)
424 (item_number_is_symbol_number): New.
425 * src/state.c: Use assert.
426 * src/system.h: Include assert.h.
427 * tests/sets.at (Accept): New.
428
44e7ead1
PH
4292005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
430
431 * data/glr.c (yyfill): Adjust comment.
36b5e963 432 (yyresolveAction): Initialize default location properly
44e7ead1
PH
433 for empty right-hand sides.
434 (yydoAction): Ditto.
435 Add comment explaining apparently dead code.
36b5e963
AD
436 * tests/glr-regression.at
437 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 438 New test.
36b5e963 439
e10a80ee
PE
4402005-10-30 Paul Eggert <eggert@cs.ucla.edu>
441
442 * bootstrap (cleanup_gnulib): New function. Use it to clean up
443 gnulib when interrupted. This fixes some race conditions and
444 works around some portability problems (one noted by Paul
445 Hilfinger).
446
067b32ee
AD
4472005-10-22 Akim <akim@epita.fr>
448
449 * Makefile.cfg: Adjust to config -> build-aux.
450 Reported by twledo.
451
4b367315
AD
4522005-10-21 Akim Demaille <akim@epita.fr>
453
454 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
455 the %parse-params.
456 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
457 * data/yacc.c (b4_Pure_if): Rename as...
458 (b4_yacc_pure_if): this.
459 (YY_SYMBOL_PRINT, yyparse): Adjust.
460 * doc/bison.texinfo: Formatting changes.
461
24cc23d9
AD
4622005-10-21 Akim Demaille <akim@epita.fr>
463
464 Finish the transition config -> build-aux.
465 * configure.ac, Makefile.am: Use build-aux.
466 * config/prev-version, config/announce-gen, config/Makefile.am:
467 Move to...
468 * build-aux/prev-version, build-aux/announce-gen,
469 * build-aux/Makefile.am: here.
470
d4476375
AD
4712005-10-14 Akim Demaille <akim@epita.fr>
472
473 * examples/calc++/test: Use set -x only when VERBOSE.
474
302c0aee
PE
4752005-10-13 Paul Eggert <eggert@cs.ucla.edu>
476
477 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
478 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
479
7625ec2c
AD
4802005-10-13 Akim Demaille <akim@epita.fr>
481
482 * src/scan-skel.l: Output the base name parts of the parser and
483 header file names.
302c0aee 484 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
485 additional checks.
486 Use this to exercise C++ outputs in subdirs.
487 Reported by Oleg Smolsky.
488
ba0fe3c7
PE
4892005-10-12 Paul Eggert <eggert@cs.ucla.edu>
490
491 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
492 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
493 Problem reported by John P. Hartmann.
494 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
495 already defined it.
496
9b8a5ce0
AD
4972005-10-12 Akim Demaille <akim@epita.fr>
498
499 * src/parse-gram.y (version_check): Exit 63 to please missing
500 (stands for "version mismatch).
501 * tests/input.at, doc/bison.texinfo: Adjust.
502
4f6e011e
PE
5032005-10-10 Paul Eggert <eggert@cs.ucla.edu>
504
505 Work around portability problems with Visual Age C compiler
506 (xlc and xlC_r) reported by John P. Hartmann.
507 * data/location.cc (initial_column, initial_line): Remove.
508 All uses replaced by 0 and 1.
509 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
510 that xlc complains about.
511 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 512 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 513 as __STDC__.
4d7aa45e
PE
514 * data/yacc.c (YYMODERN_C): New macro, which also looks at
515 __STDC_VERSION__. Use it everywhere instead of looking at
516 __STDC__ and __cplusplus.
4f6e011e 517
a1b3bf8c
AD
5182005-10-10 Akim Demaille <akim@epita.fr>
519
520 * examples/calc++/test: Be quiet unless VERBOSE.
521
412e44aa
PE
5222005-10-05 Paul Eggert <eggert@cs.ucla.edu>
523
2a4647a3
PE
524 * data/c.m4 (yydestruct, yysymprint):
525 Use YYUSE instead of casting to void.
526 * data/glr.c (YYUSE): New macro.
527 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
528 Use it instead of rolling our own.
529 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
530 (YYCHK1):
531 Use /*CONSTCOND*/ to suppress lint warnings.
532 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
533 (YY_STACK_PRINT): Use 'false' not '0'.
534 (YYUSE): New macro.
535 (yysymprint_, yydestruct_): Use it instead of rolling our own.
536 * data/yacc.c (YYUSE): New macro.
537 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
538 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
539 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
540
541
412e44aa
PE
542 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
543 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
544
88c6637f
PE
5452005-10-04 Paul Eggert <eggert@cs.ucla.edu>
546
2f4f028d
PE
547 Undo the parts of the unlocked-I/O change that substituted
548 putc or puts for printf. This might hurt performance a bit,
549 but some people prefer the printf style.
550 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
551 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
552 All uses replaced by YYFPRINTF and YYDPRINTF.
553 * data/yacc.c: Likewise.
554 * lib/bitset.c (bitset_print): Likewise.
555 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
556 putc and puts.
557 * lib/lbitset.c (debug_lbitset): Likewise.
558 * src/closure.c (print_firsts, print_fderives): Likewise.
559 * src/gram.c (grammar_dump): Likewise.
560 * src/lalr.c (look_ahead_tokens_print): Likewise.
561 * src/output.c (escaped_output): Likewise.
562 (user_actions_output): Break apart two printfs.
563 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
564 * src/reduce.c (reduce_print): Likewise.
565 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
566 * src/system.h: Include unlocked-io.h rathe than stdio.h.
567
88c6637f
PE
568 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
569 Use assignments rather than casts-to-void to suppress
570 unused-variable warnings. This pacifies 'lint'.
571 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
572 unused-variable warnings.
573
fb32e373
JMG
5742005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
575
576 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
577
edb8f44f
PE
5782005-10-02 Paul Eggert <eggert@cs.ucla.edu>
579
fb9c0b33
PE
580 Use unlocked I/O for a minor performance improvement on hosts like
581 GNU/Linux and Solaris that support unlocked I/O. The basic idea
582 is to use the gnlib unlocked-io module, and to prefer putc and
583 puts to printf when either will work (since the latter doesn't
584 come in an unlocked flavor).
585 * bootstrap (gnulib_modules): Add unlocked-io.
586 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
587 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
588 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
589 and similarly for puts and putc and printf.
590 * data/yacc.c: Likewise.
591 * lib/bitset.c (bitset_print): Likewise.
592 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
593 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
594 to printf.
595 * lib/lbitset.c (debug_lbitset): Likewise.
596 * src/closure.c (print_firsts, print_fderives): Likewise.
597 * src/gram.c (grammar_dump): Likewise.
598 * src/lalr.c (look_ahead_tokens_print): Likewise.
599 * src/output.c (escaped_output): Likewise.
600 (user_actions_output): Coalesce two printfs.
2f4f028d 601 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
602 * src/reduce.c (reduce_print): Likewise.
603 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 604 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 605
edb8f44f
PE
606 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
607 this confuses xgettext.
608
b50d2359
AD
6092005-10-02 Akim Demaille <akim@epita.fr>
610
611 * bootstrap (gnulib_modules): Add strverscmp.
612 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
613 * m4/.cvsignore: Add strverscmp.m4.
614 * src/parse-gram.y (%require): New token, new rule.
615 (version_check): New.
616 * src/scan-gram.l (%require): Adjust.
617 * tests/input.at (AT_REQUIRE): New.
618 Use it.
619 * doc/bison.texinfo (Require Decl): New.
620 (Calc++ Parser): Use %require.
621
21667f64
AD
6222005-10-02 Akim Demaille <akim@epita.fr>
623
624 * data/location.cc: New.
625
2b81e969
AD
6262005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
627 Akim Demaille <akim@epita.fr>
628
629 Make sure -odir/foo.cc creates dir/location.hh etc.
630 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
631 (spec_file_prefix, spec_verbose_file, spec_graph_file)
632 (spec_defines_file): Now const.
633 (dir_prefix): New.
634 (short_base_name): Remove.
635 * src/files.c: Adjust.
636 (dirname.h): Include.
637 (base_name): Don't prototype it.
638 (finput): Remove, duplicates gram_in.
639 (full_base_name, short_base_name): Replace by...
640 (all_but_ext, all_but_tab_ext): these.
641 (compute_base_names): Rename as...
642 (compute_file_name_parts): this.
643 Update to compute the new variables, including dir_prefix.
644 Adjust dependencies.
645 * src/output.c (prepare): Output them.
646 * src/reader.c: Adjust to use gram_in, not finput.
647 * src/scan-skel.l (@dir_prefix@): New.
648
ad6a9b97
JMG
6492005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
650
651 * lib/subpipe.c: New function end_of_output_subpipe() added
652 to allow support for non-posix systems. This is a no-op function
653 for posix systems.
654
655 * lib/subpipe.h: New function end_of_output_subpipe() added
656 to allow support for non-posix systems. This is a no-op function
657 for posix systems.
658
659 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
660 handle the lack of pipe/fork functionality on non-posix systems.
661
662 * djgpp/Makefile.maint: DJGPP specific file.
663
664 * djgpp/README.in: DJGPP specific file.
665
666 * djgpp/config.bat: DJGPP specific configuration file.
667
668 * djgpp/config.sed: DJGPP specific configuration file.
669
670 * djgpp/config.site: DJGPP specific configuration file.
671
672 * djgpp/config_h.sed: DJGPP specific configuration file.
673
674 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
675
676 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
677
fc695704
AD
6782005-10-02 Akim Demaille <akim@epita.fr>
679
680 * data/location.cc: New, extract from...
681 * data/lalr1.cc: here.
682 (location.hh): Include it after the user prologue, in case the
683 filename type is defined by the user.
684 Forward declation location and position before the pre-prologue.
685 (yyresult_): Rename as...
686 (yyresult): this, it's a local variable, not an attribute.
687 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
688
6892005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
690
691 * examples/extexi: Restore the #line generation.
692
fb9712a9
AD
6932005-09-30 Akim Demaille <akim@epita.fr>,
694 Alexandre Duret-Lutz <adl@gnu.org>
695
696 Move the token type and YYSTYPE in the parser class.
697 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
698 (parser::token): New, from the moved free definition of tokens.
699 (parser::semantic_value): Now a full definition instead of an
700 indirection to YYSTYPE.
701 (b4_post_prologue): No longer included in the header file, but
702 in the implementation file.
703 * doc/bison.texi (C+ Language Interface): Update.
704 * src/parse-gram.y: Support unary %define.
705 * tests/actions.at: Define global_tokens_and_yystype for backward
706 compatibility until we update the tests.
707 * tests/calc.at: Idem.
708 (first_line, first_column, last_line, last_column): Define for lalr1.cc
709 to simplify the code.
710
55f0c7b1
PE
7112005-09-29 Paul Eggert <eggert@cs.ucla.edu>
712
713 Port to SunOS 4.1.4, which lacks strtoul and strerror.
714 Ah, the good old days! Problem reported by Peter Klein.
715 * bootstrap (gnulib_modules): Add strerror, strtoul.
716 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
717 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
718
fb9712a9 7192005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
720
721 * data/c.m4 (b4_error_verbose_if): New.
722 * data/lalr1.cc: Use it.
723 (YYERROR_VERBOSE_IF): Remove.
724 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
725 parser members, replaced by...
726 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
727 local variables.
728 (yysyntax_error_): Takes the state number as argument.
729 (yyreduce_print_): Use the argument yyrule, not the former
730 attribute yyn_.
731
8a6f72f3
PE
7322005-09-26 Paul Eggert <eggert@cs.ucla.edu>
733
734 * bootstrap (gnulib_modules): Add verify.
735 * lib/.cvsignore: Add verify.h.
736 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
737 * src/system.h (verify): Remove.
738 Include verify.h instead.
739 * src/tables.c (tables_generate): Use new API for 'verify'.
740
0d50976f
PE
7412005-09-21 Paul Eggert <eggert@cs.ucla.edu>
742
ebc3737e
PE
743 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
744 local variables whose names begin with 'yy'.
745 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
746 Trivial changes from Joel E. Denny.
747
0d50976f
PE
748 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
749 it itself.
750 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
751 don't use alloca any more.
752
753 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
754 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 755 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
756 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
757 to match yacc.c, to test more hosts.
758
a05b79df
PE
7592005-09-20 Paul Eggert <eggert@cs.ucla.edu>
760
55289366
PE
761 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
762 doesn't affect behavior.
763 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
764 Solaris, AIX, MSC.
765 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
766 This works a bit better with glibc, if user code has already included
767 stdlib.h.
768 * doc/bison.texinfo (Bison Parser): Document that users can't
769 arbitrarily use malloc and free for other purposes. Document
770 that <alloca.h> and <malloc.h> might be included.
771 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
772 user must declare alloca.
773
a05b79df
PE
774 * HACKING (release): Forwarn the Translation Project about
775 stable releses.
776
3ab2ca22
AD
7772005-09-20 Akim Demaille <akim@epita.fr>
778
779 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
780
a9739e7c
PE
7812005-09-19 Paul Eggert <eggert@cs.ucla.edu>
782
a702593e
PE
783 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
784 (YYSTACK_ALLOC_MAXIMUM): Use it.
785 (yysyntax_error): New function.
786 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
787 multiple syntax errors are reported, and alloca is being used.
788 Instead, reallocate buffers twice as big each time, so that
789 we waste at most half the allocated memory. Start with a small
790 (128-byte) buffer that will suffice in most cases anyway.
791 Use yysyntax_error to do most of the work.
792
793 * doc/bison.texinfo (Error Reporting, Table of Symbols):
794 yynerrs is the number of errors reported, not the number of
795 errors encountered.
796
a9739e7c
PE
797 * tests/glr-regression.at (Duplicated user destructor for lookahead):
798 Mark it as expected to fail.
799 Cast result of malloc; problem reported by twlevo@xs4all.nl.
800 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
801 Don't start user-code symbols with "yy", to avoid name space problems.
802
f479c6c6
AD
8032005-09-19 Akim Demaille <akim@epita.fr>
804
805 Remove the traits, failed experiment.
806 It never proved useful, and anyway because of the current
807 definition, it was not possible to have several specialization of
808 this traits, making it useless.
809 * data/lalr1.cc (yy:traits): Remove.
810 Inline its definitions in the parser class.
811
e2586f82
AD
8122005-09-19 Akim Demaille <akim@epita.fr>
813
814 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
815 least Mac OSX with a /usr/local install of gettext.
816
2e8cf949
AD
8172005-09-19 Akim Demaille <akim@epita.fr>
818
819 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
820 and yytoken for similarity with the other skeletons.
821
c7fb0b90
AD
8222005-09-19 Akim Demaille <akim@epita.fr>
823
824 * NEWS, configure.ac: Bump to 2.1a.
825
1bd0deda
PE
8262005-09-16 Paul Eggert <eggert@cs.ucla.edu>
827
828 * NEWS: Version 2.1.
829
830 * NEWS: Remove notice of yytname change, since it was never in an
831 official release.
832 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
833 diagnostic.
834 * src/output.c (prepare): Likewise.
835 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
836 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
837 is not defined. This is an awful hack, but it's enough for now.
838 All callers changed.
839 * tests/glr-regression-at (make_value): Args are const pointers now,
840 to avoid GCC warning.
841 (Duplicated user destructor for lookahead): New test. Currently
842 skipped. It fails on my host but I'm not sure it'll always fail.
843
8442005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
845
846 * src/symtab.h (struct symbol): Declare the printer and destructor
847 as const, to avoid accidental calls to free.
848 (symbol_destructor_set, symbol_printer_set): Adjust.
849 * src/symtab.c: Adjust.
850
1bd0deda 8512005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
852
853 * data/c.m4 (b4_token_enums): New.
854 (b4_token_defines): Rename as...
855 (b4_token_enums_defines): this.
856 (b4_token_defines): New, output only the #defines.
857 * data/yacc.c, data/glr.c: Adjust.
858 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
859 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
860 as default values.
861
dbcdae2d
AD
8622005-09-16 Akim Demaille <akim@epita.fr>
863
864 * data/lalr1.cc (yylex_): Remove, inline its code.
865 (yyreport_syntax_error_): Remove, replaced by...
866 (yysyntax_error_): this which returns a string and leaves to the
867 caller the call to the users' error function.
868 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
869 Move from members of the parser object...
870 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
871 to local variables of the parse function.
872
70d8f291
AD
8732005-09-16 Akim Demaille <akim@epita.fr>
874
875 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
876 since it's in Bison's name space.
877
b47dbebe
PE
8782005-09-15 Paul Eggert <eggert@cs.ucla.edu>
879
ae199bf1
PE
880 * data/glr.c (yyresolveValue): Add default case to pacify
881 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
882
b47dbebe
PE
883 * NEWS: Document when yyparse started to return 2.
884 * doc/bison.texinfo (Parser Function): Document when yyparse
885 returns 2.
886
887 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
888 (b4_filename_type): Renamed back from b4_file_name_type. All uses
889 changed.
890 (class position): file_name -> filename (reverting). All uses changed.
891
8922005-09-14 Paul Eggert <eggert@cs.ucla.edu>
893
894 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
895 do anything if $@ exists. This reverts part of the 2005-07-07
896 patch.
897
00292f66
PE
8982005-09-11 Paul Eggert <eggert@cs.ucla.edu>
899
900 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
901 contains obsolete information and isn't worth distributing as a
902 separate file anyway.
903 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
904 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
905 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
906 (yyparse): Abort if user code uses longjmp to throw an unexpected
907 value.
908
a420f962
PE
9092005-09-09 Paul Eggert <eggert@cs.ucla.edu>
910
00292f66
PE
911 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
912 Suggested by twlevo@xs4all.nl.
913
127287e9
PE
914 * data/glr.c (YYCHK1): Do not assume YYE is in range.
915 This avoids a diagnostic from gcc -Wswitch-enum.
916 Problem reported by twlevo@xs4all.nl.
917
a420f962
PE
918 * doc/bison.texinfo: Don't use "filename", as per GNU coding
919 standards. Use "file name" or "file" or "name", depending on
920 the context.
921 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
922 not to hack/foo.tab.c.
923 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
924 * data/glr.c: b4_filename -> b4_file_name.
925 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
926 All uses changed.
927 (class position): filename -> file_name. All uses changed.
928 * data/yacc.c: b4_filename -> b4_file_name.
929 * lib/bitset.h: filename -> file_name in local vars.
930 * lib/bitset_stats.c: Likewise.
931 * src/files.c: Likewise.
932 * src/scan-skel.l ("@output ".*\n): Likewise.
933 * src/files.c (file_name_split): Renamed from filename_split.
934 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
935
9362005-09-08 Paul Eggert <eggert@cs.ucla.edu>
937
938 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
939 to accommodate latest gnulib.
940
941 * tests/glr-regression.at (Duplicate representation of merged trees):
942 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
943
944 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
945 needed.
946
42a6501d
PE
9472005-08-26 Paul Eggert <eggert@cs.ucla.edu>
948
949 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
950 All uses changed. Invoke user destructor after an error during a
951 split parse (trivial change from Joel E. Denny).
952
953 * tests/glr-regression.at
954 (User destructor after an error during a split parse): New test case.
955 Problem reported by Joel E. Denny in:
956 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
957
ef9a1faf
PE
9582005-08-25 Paul Eggert <eggert@cs.ucla.edu>
959
5b4aaf78
PE
960 * README-cvs: Give URLs for recommended tools.
961 Mention Gzip version problem, and bootstrapping issues.
962 Remove troubleshooting section, as it's somewhat obsolete.
963
b5240ba5
PE
964 * bootstrap (no_cache): New var, to accommodate different wget
965 variants. Use it instead of '-C off'. Problem reported by
966 twlevo@xs4all.nl.
967
ef9a1faf
PE
968 * data/glr.c (yydestroyStackItem): New function.
969 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
970 debugging information. Problem reported by Joel E. Denny.
971
e6efa9da
AD
9722005-08-25 Akim Demaille <akim@epita.fr>
973
974 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
975
adc90f13
PE
9762005-08-24 Paul Eggert <eggert@cs.ucla.edu>
977
978 * data/glr.c (yyrecoverSyntaxError, yyreturn):
979 Don't invoke destructor on unresolved entries.
980 * tests/glr-regression.at
981 (User destructor for unresolved GLR semantic value): New test case.
982 Problem reported by Joel E. Denny in:
983 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
984
f9315de5
PE
9852005-08-21 Paul Eggert <eggert@cs.ucla.edu>
986
15d29c1f
PE
987 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
988 Add strnlen.c.
989 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
990 lib-prefix.m4, po.m4.
991
dd5f2af2
PE
992 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
993 in yydestruct diagnostic, since it might not be an error.
994 Problem reported by Joel Denny near end of
995 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 996 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
997 * data/yacc.c (yyreturn): Likewise.
998 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
999
1000 * src/files.c: Remove obsolete FIXME comment.
1001
1002 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
1003 with the other templates, and to fix bogus run-on messages such
1004 as the one reported at the end of
1005 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
1006 All callers changed to avoid the newline.
1007 (yyprocessOneStack): Output two lines rather than one, to accommodate
1008 the above change. This changes the debug output format slightly.
1009
f9315de5
PE
1010 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
1011 reported by Joel E. Denny in
1012 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
1013 (trivial change).
1014 * tests/glr-regression.at (Duplicate representation of merged trees):
1015 New test, from Joel E. Denny in:
1016 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
1017 * THANKS: Add Joel E. Denny.
1018
1019 * configure.ac (AC_INIT): Bump to 2.0c.
1020
04098407
PE
10212005-07-24 Paul Eggert <eggert@cs.ucla.edu>
1022
1023 * NEWS: Version 2.0b.
1024
ca5d2013
PE
1025 * Makefile.am (SUBDIRS): Put examples before tests, so that
1026 "make check" doesn't finish with "All 1 tests passed".
1027
3d54b576
PE
1028 * tests/regression.at (Token definitions): Don't rely on
1029 AT_PARSER_CHECK for data that contains backslashes. It currently
1030 uses 'echo', and 'echo' isn't portable if its argument contains
1031 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
1032 that the byte '\0xff' is not printable in the C locale; it is,
1033 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
1034 not printable, so use '\0x81' to test.
1035
d53ae497
PE
1036 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
1037 version of GCC, since the macro is used with non-GCC compilers.
1038
fc01665e
PE
1039 Fix core dump reported by Pablo De Napoli in
1040 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
1041 * tests/regression.at (Invalid inputs with {}): New test.
1042 * src/parse-gram.y (token_name): Translate type before using
1043 it as an index.
1044
04098407
PE
1045 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
1046 the user's name space. All uses changed to __attribute__
1047 ((__unused__)).
1048 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
1049 Add __attribute__ ((__noreturn__)).
1050
1051 * etc/clcommit: Remove. We weren't using it, and it failed
1052 "make maintainer-distcheck".
1053 * Makefile.maint: Merge from coreutils.
1054 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
1055 (syntax-check-rules): Change list of rules as described below.
1056 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
1057 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
1058 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
1059 (sc_trailing_space): New rules.
1060 (sc_xalloc_h_in_src): Remove.
1061 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
1062 (sc_space_tab, sc_error_exit_success, sc_changelog):
1063 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
1064 (makefile-check, po-check, author_mark_check):
1065 (makefile_path_separator_check, copyright-check):
1066 Use grep -n, to make it easier to find violations.
1067 Use CVS_LIST and CVS_LIST_EXCEPT.
1068 (header_regexp, h_re): Remove.
1069 (dd_c): New macro.
1070 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
1071 (my-distcheck): Use more-modern GCC flags.
1072 (signatures, %.asc): Remove.
1073 (rel-files, announcement): Remove signatures.
1074 Restore old updating code, even though we don't use it, so
1075 that we're the same as coreutils.
1076 (alpha, beta, major): Depend on news-date-check.
1077 Make the upload commands.
1078
1079 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
1080 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
1081 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
1082 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
1083 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
1084 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
1085 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
1086 * tests/sets.at: Likewise.
1087
1088 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
1089 we comment out the Autoconf version number.
1090 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
1091 it's error-prone and "make maintainer-distcheck" rejects it.
1092
1093 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
1094 Indent calls to "error" to pacify "make maintainer-distcheck",
1095 when the calls are not intended to be translated.
1096 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
1097
1098 * src/Makefile.am (DEFS): Use +=, to pacify
1099 "make maintainer-distcheck".
1100 (bison_SOURCES): Add scan-skel.h.
1101 (sc_tight_scope): New rule, from coreutils.
1102
1103 * src/files.c (src_extension, header_extension):
1104 Now static, not extern.
1105 * src/getargs.c (short_options): Likewise.
1106 * src/muscle_tab.c (muscle_table): Likewise.
1107 * src/parse-gram.y (current_class, current_type, current_prec):
1108 Likewise.
1109 * src/reader.c (grammar_end, previous_rule_end): Likewise.
1110 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
1111 * src/main.c (main): Cast bindtextdomain and textdomain calls to
1112 void, to avoid warning when NLS is disabled.
1113 * src/output.c: Include scan-skel.h.
1114 (scan_skel): Remove decl, since scan-skel.h does this.
1115 (output_skeleton):
1116 Indent calls to "error" to pacify "make maintainer-distcheck".
1117 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
1118 * src/reader.h (gram_end, gram_lineno): New decls to pacify
1119 "make maintainer-distcheck".
1120 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
1121 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
1122 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
1123 (skel_lex_destroy, scan_skel): Move these decls to...
1124 * src/scan-skel.h: New file.
1125 * src/uniqstr.c (uniqstr_assert):
1126 Indent calls to "error" to pacify "make maintainer-distcheck".
1127
1128 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
1129 not @VAR@.
1130
1131 * tests/torture.at: Revamp to avoid misuse of atoi that
1132 "make maintainer-distcheck" complained about.
1133
1134 * examples/extexi (message): Don't print a message more than once,
1135 and omit line-number decoration that makes Emacs compile think
1136 that informative messages are worth worrying about.
1137
11382005-07-22 Paul Eggert <eggert@cs.ucla.edu>
1139
1140 * configure.ac: Update version number.
1141
1142 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
1143 accidentally.
1144 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
1145 autogenerated by the maintainer.
1146 * examples/calc++/.cvsignore: Add *.yy.
1147
1148 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
1149 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1150 * lib/bitsetv.c (bitsetv_alloc): Likewise.
1151
1152 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
1153
1154 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
1155 from maintainer-distcheck about casting the argument of 'free'.
1156
1157 * NEWS: Mention recent yytname changes.
1158 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
1159
1160 * bootstrap: For translations that have not yet been upgraded to
1161 the new runtime-po domain, prime the pump by extracting the
1162 relevant strings from the obsolete translations. This code can be
1163 removed once the bison-runtime domain has been translated by each
1164 team.
1165
1166 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
1167 now that token names are already quoted.
1168
1169 Fix problem reported by Anthony Heading.
1170 * data/glr.c (YYTOKEN_TABLE): New macro.
1171 (yytname): Define if YYTOKEN_TABLE.
1172 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
1173 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
1174 (YYERROR_VERBOSE): Define the same way the other skeletons do.
1175 * src/output.c (prepare_symbols): Output token_table_flag.
1176
0ffda363
PE
11772005-07-21 Paul Eggert <eggert@cs.ucla.edu>
1178
1179 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
1180 again if the first call fails.
1181
1182 * data/glr.c (yytnamerr): New function.
1183 (yyreportSyntaxError): Use it to dequote most string literals.
1184 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
1185 with other skeletons. All uses changed.
1186 (yytnameerr_): New function.
1187 (yyreport_syntax_error): Use it to dequote most string literals.
1188 * data/yacc.c (yytnamerr): New function.
1189 (yyerrlab): Use it to decode most string literals.
1190 * doc/bison.texinfo (Decl Summary, Calling Convention):
1191 Clarify quoting convention of yytname.
1192 * src/output.c (prepare_symbols): Quote all names. This undoes
1193 the 2005-04-17 change, which is now accomplished (mostly) via
1194 changes in the parsers as described above.
1195 * tests/regression.at (Token definitions, Web2c Actions):
1196 Undo most 2005-04-17 change here, too.
1197
11982005-07-20 Paul Eggert <eggert@cs.ucla.edu>
1199
1200 Fix more problems reported by twlevo@xs4all.nl.
1201 * tests/cxx-type.at: Don't pipe output of ./types through sed to
1202 remove trailing spaces. This loses the exit status of ./types,
1203 and isn't needed since ./types shouldn't be emitting trailing
1204 spaces.
1205 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
1206 as the stack isn't valid in that case.
1207
1208 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1209 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1210 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1211 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
1212 is used.
1213 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
1214 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1215 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1216 Likewise.
1217
1218 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
1219 overly-picky compilers that reject 'char *foo = "bar";'.
1220
1221 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
1222 to FILE * parameter, not to stderr. This fixes a typo introduced
1223 in the 2005-07-12 change.
1224
1225 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
1226 warnings from GCC 4.
1227
1228 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
1229 (yyglrShiftDefer, yysplitStack):
1230 Remove unused parameters b4_pure_formals. All uses changed.
1231 (yyglrShift): Remove unused parameters b4_user_formals.
1232 All uses changed.
1233 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
1234
6100a9aa
PE
12352005-07-18 Paul Eggert <eggert@cs.ucla.edu>
1236
258b75ca
PE
1237 Destructor cleanups and regularization among the three skeletons.
1238 * NEWS: Document the behavior changes.
1239 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
1240 stack before failing, as the cleanup code will do it for us now.
1241 * data/lalr1.cc (yyerrlab): Likewise.
1242 * data/glr.c (yyparse): Pop everything off the stack before
1243 freeing it, so that destructors get called properly.
1244 * data/lalr1.cc (yyreturn): Likewise.
1245 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
1246 This is more consistent.
1247 * doc/bison.texinfo (Destructor Decl): Mention more reasons
1248 why destructors might be called. 1.875 -> 2.1.
1249 (Destructor Decl, Decl Summary, Table of Symbols):
1250 Some English-language cleanups for %destructor.
1251 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1252 Add output line for destructor of start symbol.
1253 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
1254 because of that same extra output line.
1255
1a059451
PE
1256 * NEWS: Document minor wording changes in diagnostics of
1257 Bison-generated parsers.
1258 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
1259 Remove unused formals. All uses changed.
1260 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
1261 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
1262 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
1263 Rename yyoverflowab to yyexhaustedlab.
1264 When memory exhaustion occurs during syntax-error reporting,
1265 report it separately rather than in a single diagnostic; this
1266 eases translation.
1267 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
1268 (Memory Exhausted): Renamed from Parser Stack Overflow.
1269 Revamp wording slightly to prefer "memory exhaustion".
1270 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
1271
97460c78
PE
1272 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
1273
30757c8c
PE
1274 Add i18n support to the GLR skeleton. Partially fix the C++
1275 skeleton; a C++ expert needs to finish this. Remove debugging
1276 msgids; there's little point to having them translated, since they
1277 can be understood only by someone who can read the
1278 (English-language) source code.
1279
1280 Generate runtime-po/bison-runtime.pot automatically, so that we
1281 don't have to worry about garbage getting in that file. We'll
1282 make sure after the next official release that old msgids don't
1283 get lost. See
1284 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
1285
1286 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
1287 Now auto-generated.
1288 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
1289 Fix typos in explanations of the runtime file.
1290 * bootstrap: Change gettext keyword from YYI18N to YY_.
1291 Use standard Makefile.in.in in runtime-po, since we'll arrange
1292 for backward-compatible bison-runtime.po files in a different way.
1293 * data/glr.c (YY_): New macro, from yacc.c.
1294 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
1295 Translate messages intended for users.
1296 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
1297 the wording in the other skeletons. We don't know that the memory
1298 is virtual.
1299 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
1300 Use same method that yacc.c uses.
1301 Don't translate debugging messages.
1302 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
1303 it doesn't work (yet), and requires C++ expertise to fix.
1304 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
1305 Move defn to a more logical place, to be consistent with other
1306 skeletons.
1307 Don't translate debugging messages.
1308 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
1309 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
1310 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
1311 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
1312
ac8c5689
PE
1313 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
1314 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
1315 void, not int.
1316 * tests/glr-regression.at (Badly Collapsed GLR States):
1317 Likewise.
1318 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1319 yylex should return 0 at EOF rather than aborting.
1320
6100a9aa
PE
1321 Improve tests for stack overflow in GLR parser.
1322 Problem reported by twlevo@xs4all.nl.
1323 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
1324 All uses removed.
1325 (yyStackOverflow): Just longjmp, but with value 2 so that caller
1326 can handle the problem.
1327 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
1328 (yyparse): New local variable yyresult to record the result.
1329 Use result of setjmp to set it, rather than storing itinto
1330 struct.
1331 (yyDone): Remove label.
1332 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
1333 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
1334 if YYABORT is used).
1335 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
1336 yyparse status; put status > 1 into diagnostic.
1337 Check that status==2 works.
1338 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
1339 Use exit status 3 for failure to open (which shouldn't happen).
1340
15f40952
PE
13412005-07-17 Paul Eggert <eggert@cs.ucla.edu>
1342
67fd79c4
PE
1343 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
1344 1 on syntax error; just let yyparse do its thing.
1345 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
1346 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
1347 (Exploding the Stack Size with Alloca):
1348 (Exploding the Stack Size with Malloc):
1349 Expect exit status 2, not 1, since the parser is supposed to blow
1350 its stack. Problem reported by twlevo@xs4all.nl.
1351
15f40952
PE
1352 * data/glr.c (yyparse): Don't assume that the initial calls
1353 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
1354 Print a stack-overflow message and fail instead.
1355 Initialize the line-number information before creating the stack,
1356 so that the stack-overflow message can report line zero safely.
1357
f32c66b5
PE
13582005-07-14 Paul Eggert <eggert@cs.ucla.edu>
1359
a22ff96f 1360 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
1361 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
1362 (yyuserMerge): Provide a default case if b4_mergers is empty.
1363 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
1364 * tests/glr-regression.at
1365 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 1366 Add casts to pacify C++ compilers.
1beb0b24
PE
1367 * tests/glr-regression.at (Improper merging of GLR delayed action
1368 sets): Declare yylex before using it.
f32c66b5 1369 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
1370 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
1371 test for valgrind; valgrind is independent of g++.
1372 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
1373 for compatibility with POSIX 1003.1-2001 (if running coreutils).
1374 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
1375 Use a destructor, so that we can expand the stack. Change
1376 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 1377
d741bd1b
PE
13782005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1379
1380 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
1381 a valgrind failure. Problem reported by twlevo@xs4all.nl.
1382
0410a6e0
PE
13832005-07-13 Paul Eggert <eggert@cs.ucla.edu>
1384
1385 * PACKAGING: New file, suggested by Bruno Haible and taken from
1386 similar wording in gettext's PACKAGING file.
1387 * NEWS: Mention PACKAGING.
1388 * Makefile.am (EXTRA_DIST): Add PACKAGING.
1389
f7ab6a50
PE
13902005-07-12 Paul Eggert <eggert@cs.ucla.edu>
1391
baf785db 1392 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
1393 * bootstrap: Get runtime translations into runtime-po.
1394 Create runtime-po files automatically, if possible.
1395 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
1396 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
1397 does not infringe on the user's name space.
1398 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
1399 * doc/bison.texinfo (Internationalization): Revamp the English
1400 and Texinfo syntax a bit, to try to make it clearer.
1401 (Bison Options, Option Cross Key): Mention --print-localedir.
1402 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
1403 YYENABLE_NLS. Quote a bit more.
1404 * runtime-po/.cvsignore: New file.
1405 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
1406 * runtime-po/Rules-quot: Remove; now created by bootstrap.
1407 * runtime-po/quot.sed: Likewise.
1408 * runtime-po/boldquot.sed: Likewise.
1409 * runtime-po/en@quot.header: Likewise.
1410 * runtime-po/en@boldquot.header: Likewise.
1411 * runtime-po/insert-header.sin: Likewise.
1412 * runtime-po/remove-potcdate.sin: Likewise.
1413 * runtime-po/Makevars: Likewise.
1414 * runtime-po/LINGUAS: Likewise.
1415 * runtime-po/de.po: Likewise; we will rely on the translation project
1416 to maintain this, so "bootstrap" should get it.
0410a6e0 1417 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
1418 its value.
1419 * src/main.c (main): Bind the bison-runtime domain, too.
1420
14212005-07-12 Bruno Haible <bruno@clisp.org>
1422
1423 * data/yacc.c: Include <libintl.h> when NLS is enabled.
1424 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
1425 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
1426 * runtime-po: New directory.
1427 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
1428 $(DOMAIN).pot-update rule, so that old messages are never dropped.
1429 * runtime-po/Rules-quot: New file, copied from po/.
1430 * runtime-po/quot.sed: Likewise.
1431 * runtime-po/boldquot.sed: Likewise.
1432 * runtime-po/en@quot.header: Likewise.
1433 * runtime-po/en@boldquot.header: Likewise.
1434 * runtime-po/insert-header.sin: Likewise.
1435 * runtime-po/remove-potcdate.sin: Likewise.
1436 * runtime-po/Makevars: New file.
1437 * runtime-po/POTFILES.in: New file.
1438 * runtime-po/LINGUAS: New file.
1439 * runtime-po/bison-runtime.pot: New file.
1440 * runtime-po/de.po: New file.
1441 * m4/bison.m4: New file.
1442 * Makefile.am (SUBDIRS): Add runtime-po.
1443 (aclocaldir, aclocal_DATA): New variables.
1444 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
1445 Define aclocaldir.
1446 * src/getargs.c (usage): Document --print-localedir option.
1447 (PRINT_LOCALEDIR_OPTION): New enum item.
1448 (long_options): Add --print-localedir option.
1449 (getargs): Handle --print-localedir option.
1450 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
1451 (Internationalization): New section.
1452
22dda0f0
AD
14532005-07-12 Akim Demaille <akim@epita.fr>
1454
1455 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
1456 for consistency with the rest of the code.
1457 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
1458 Add separators.
1459
82b248ad
AD
14602005-07-12 Akim Demaille <akim@epita.fr>
1461
1462 * src/parse-gram.y: Use %printer instead of YYPRINT.
1463
fa0e9314
AD
14642005-07-12 Akim Demaille <akim@epita.fr>
1465
867a3e00
AD
1466 * src/symtab.h, src/symtab.c (symbol_print): New.
1467 * src/symlist.h, src/symlist.c (symbol_list_print): New.
1468 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
1469
14702005-07-12 Akim Demaille <akim@epita.fr>
1471
1472 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
1473 b4_at_dollar and b4_dollar_dollar.
1474
e054b190
PE
14752005-07-11 Paul Eggert <eggert@cs.ucla.edu>
1476
1477 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
1478 and Pennello's paper.
1479
34160ec4
PE
14802005-07-09 Paul Eggert <eggert@cs.ucla.edu>
1481
407d4a75
PE
1482 * data/yacc.c (yyparse): Undo previous patch. Instead,
1483 set yylsp[0] and yyvsp[0] only if the initial action
1484 sets yylloc and yylval, respectively.
1485
34160ec4
PE
1486 * data/yacc.c (yyparse): In the initial action, set
1487 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
1488 This avoids the use of undefined variables if the initial
1489 action does not set yylloc and/or yylval.
1490
c3d5a4a7
PE
14912005-07-07 Paul Eggert <eggert@cs.ucla.edu>
1492
b34d96c1
PE
1493 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
1494 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
1495 Remove from CVS. These files are automatically generated.
1496 * examples/extexi: Clarify that this file is now part of Bison,
1497 not GNU M4, and that it works with any POSIX-compatible Awk.
1498 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
1499 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
1500 so that we also get calc++-parser.yy. Geneate it.
1501 Use $(AWK), not gawk, since any conforming Awk will do.
1502 Put comment before action, since older 'make' can't handle comment
1503 in action.
1504 $(BUILT_SOURCES): List all built sources, not just some of them.
1505 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
1506 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
1507 $($(calc_sources_generated)): Remove unnecessary test for existence
1508 of target. (This had a shell syntax error anyway; a stray "x".)
1509 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
1510 calc++-parser.yy.
1511 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
1512
c3d5a4a7
PE
1513 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
1514 implied by the other modules.
1515
828c373b
AD
15162005-07-06 Akim Demaille <akim@epita.fr>
1517
1518 Bind examples/calc++ to the package.
1519 * examples/calc++/Makefile: Remove, replaced by...
1520 * examples/calc++/Makefile.am: ... this new file.
1521 * examples/calc++/test: Remove input.
1522 * examples/calc++/compile: Remove.
1523 * examples/Makefile.am: New.
1524 * configure.ac, Makefile.am: Adjust.
1525 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
1526
63cb01d6
PE
15272005-07-05 Paul Eggert <eggert@cs.ucla.edu>
1528
fd2df2ed
PE
1529 * data/glr.c (yyFail): Drastically simplify; since the format argument
1530 never had any % directives, we can simply pass it to yyerror.
1531 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
1532 be modified later, as that is the usual style in glr.c.
1533 Problems reported by Paul Hilfinger.
1534
63cb01d6
PE
1535 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
1536 and size overflow errors.
1537 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
1538 in case the user prolog sets feature-test macros like _GNU_SOURCE.
1539 (YYSIZEMAX): New macro.
1540 (yystpcpy): New function, taken from yacc.c.
1541 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
1542 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
1543 so that we don't have to maintain their signatures.
1544 (yyFail): Check for buffer overflow, by using vsnprintf rather
1545 than vsprintf. Allocate a bigger buffer if possible.
1546 Report an error if buffer allocation fails.
1547 (yyStackOverflow): New function.
1548 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
1549 the initialization was successful. It might fail if storage was
1550 exhausted.
1551 (yyexpandGLRStack): Add more checks for storage allocation failure.
1552 Use yyStackOverflow to report failures.
1553 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
1554 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
1555 Don't assume stack number fits in int.
1556 (yysplitStack): Check for storage allocation failure.
1557 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
1558 can print diagnostics on storage allocation failure. All callers
1559 changed.
1560 (yyresolveValue): Use yybool for boolean.
1561 (yyreportSyntaxError): Check for size-calculation overflow.
1562 This code is taken from yacc.c.
1563 (yyparse): Check for storage allocation errors when allocating
1564 the initial stack.
1565
1c59e0a1
AD
15662005-07-05 Akim Demaille <akim@epita.fr>
1567
1568 Extract calc++ from the documentation.
1569 * doc/bison.texinfo (Calc++): Add the extraction marks.
1570 * examples/extexi: New, from the aborted GNU Programming 2E.
1571 Separate the different paragraph of a file with empty lines.
1572 * examples/Makefile: Use it to extract the whole calc++ example.
1573
8a0adb01
AD
15742005-06-24 Akim Demaille <akim@epita.fr>
1575
1576 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
1577 class typedefs.
1578
12545799
AD
15792005-06-22 Akim Demaille <akim@epita.fr>
1580
1581 * doc/bison.texinfo (C++ Language Interface): First stab.
1582 (C++ Parsers): Remove.
1583
99be0235
AD
15842005-06-22 Akim Demaille <akim@epita.fr>
1585
1586 * data/lalr1.cc (yylex_): Honor %lex-param.
1587
0ffd4fd1
AD
15882005-06-22 Akim Demaille <akim@epita.fr>
1589
1590 Start a set of simple examples.
1591 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
1592 * examples/calc++/calc++-driver.hh,
1593 * examples/calc++/calc++-parser.yy,
1594 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
1595 * examples/calc++/compile, examples/calc++/test: New.
1596
0925ebb4
PE
15972005-06-09 Paul Eggert <eggert@cs.ucla.edu>
1598
1599 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
1600 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
1601 which stems from the 2005-05-27 patch.
1602
43d3b664
PH
16032005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1604
1605 * data/glr.c: Modify treatment of unused parameters to permit use
1606 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
1607
3062864d
PE
16082005-05-30 Paul Eggert <eggert@cs.ucla.edu>
1609
1610 Fix infringement on user name space reported by Janos Zoltan Szabo.
1611 * data/yacc.c (yyparse): strlen -> yystrlen.
1612
989b5b8e
AD
16132005-05-30 Akim Demaille <akim@epita.fr>
1614
1615 * data/lalr1.cc (_): New.
1616 Translate the various messages.
1617
bedf57f5
PE
16182005-05-27 Paul Eggert <eggert@cs.ucla.edu>
1619
1620 Fix infringement on user name space reported by Bruno Haible.
1621 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
1622 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
1623 the user's name space.
1624 (alloca): Include <stdlib.h> to get it, if it's not built in.
1625 (YYMALLOC, YYFREE): Define only if needed.
1626 (malloc, free): Declare, but only if needed, as this infringes on
1627 the user name space.
1628
4d1801f1
PE
16292005-05-25 Paul Eggert <eggert@cs.ucla.edu>
1630
1631 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
1632 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
1633 with %d format.
1634 * lib/ebitset.c (min, max): Undef before defining.
1635 * lib/vbitset.c (min, max): Likewise.
1636 * lib/subpipe.c (create_subpipe): Save local variables in case
1637 vfork clobbers them.
1638
16392005-05-24 Bruno Haible <bruno@clisp.org>
1640
1641 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
1642 error message syntax used by gcc-4.0.
1643
b94a9e1e
PE
16442005-05-23 Paul Eggert <eggert@cs.ucla.edu>
1645
85ac3861
PE
1646 * README: Mention m4 1.4.3. Remove obsolete advice about
1647 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
1648
b94a9e1e
PE
1649 * bootstrap: Remove workaround for problem I encountered with
1650 gettext 0.14.1; it seems to be fixed now.
1651
51c30d21
PE
16522005-05-22 Paul Eggert <eggert@cs.ucla.edu>
1653
009ce67d
PE
1654 * NEWS: Version 2.0a.
1655
f2a97c62
PE
1656 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
1657 the previous change.
1658
c8775f93
PE
1659 Various maintainer cleanups.
1660 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
1661 conftest*, for benefit of CVS commands run at the same time as
1662 "configure". Add build-aux, since "bootstrap" now creates it and
1663 its subfiles.
1664 * Makefile.cfg (move_if_change): Remove.
1665 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
1666 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
1667 (po_repo, do-po-update, po-update, wget_files, get-targets):
1668 (config.guess-url_prefix, config.sub-url_prefix):
1669 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
1670 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
1671 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
1672 Remove.
1673 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
1674 this is now the recommended name.
1675 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
1676 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
1677 ylwrap. These files now go into build-aux.
1678 * config/move-if-change: Remove.
1679 * config/prev-version.txt: Bump from 1.75 to 2.0.
1680
3ea5f0ec
PE
1681 * bootstrap: Add stdio-safer, unistd-safer modules.
1682 Remove m4/glibc2.m4 (introduced by latest gnulib, but
1683 we don't need it).
1684 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
1685 fopen-safer.c, stdio-safer.h, unistd-safer.h.
1686 * lib/subpipe.c: Include "unistd-safer.h".
1687 (create_subpipe): Make sure all the newly-created
1688 file descriptors are > 2, so that diagnostics don't
1689 get sent down them (which might cause Bison to hang, in theory).
1690 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
1691 * src/files.c (xfopen): Use fopen_safer, not fopen.
1692
51c30d21
PE
1693 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
1694 yesterday's yacc.c fix.
1695
cea1469d
PE
16962005-05-21 Paul Eggert <eggert@cs.ucla.edu>
1697
3ea5f0ec
PE
1698 * data/glr.c, data/lalr1.cc: Update copyright date.
1699
cea1469d
PE
1700 Fix a destructor bug reported by Wolfgang Spraul in
1701 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
1702 * data/yacc.c (yyabortlab): Don't call destructor, and
1703 don't set yychar to EMPTY.
1704 (yyoverflowlab): Don't call destructor.
1705 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
1706 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
1707 since we no longer output the message "discarding lookahead token
1708 end of input ()".
1709
5e6f62f2
PH
17102005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1711
1712 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
1713 fix a small glitch in debugging output.
1714 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
1715 after YY_SYMBOL_PRINT where needed.
1716
1717 (struct yyGLRState): Add some comments.
1718 (struct yySemanticOption): Add some comments.
1719 (union yyGLRStackItem): Add comment.
1720
1721 (yymergeOptionSets): Correct this to properly perform the union,
1722 avoiding infinite reported by Michael Rosien.
1723 Update comment.
1724
1725 * tests/glr-regression.at: Add test for GLR merging error reported
1726 by M. Rosien.
cea1469d 1727
0fb669f9
PE
17282005-05-13 Paul Eggert <eggert@cs.ucla.edu>
1729
1730 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
1731 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
1732 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
1733 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
1734 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
1735 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
1736 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
1737 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
1738 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
1739 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
1740 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
1741 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
1742 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
1743 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
1744 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
1745 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
1746 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
1747 src/derives.h, src/files.c, src/files.h, src/getargs.c,
1748 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
1749 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
1750 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
1751 src/output.h, src/parse-gram.c, src/parse-gram.h,
1752 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
1753 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
1754 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
1755 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
1756 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
1757 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
1758 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
1759 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
1760 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
1761 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
1762 tests/reduce.at, tests/regression.at, tests/sets.at,
1763 tests/synclines.at, tests/testsuite.at, tests/torture.at:
1764 Update FSF postal mail address.
1765
51f4735e
PE
17662005-05-11 Paul Eggert <eggert@cs.ucla.edu>
1767
1768 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
1769 Problem reported by Ralf Menzel.
1770
80ce3401
PE
17712005-05-01 Paul Eggert <eggert@cs.ucla.edu>
1772
1773 * tests/actions.at: Test that stack overflow invokes destructors.
1774 From Marcus Holland-Moritz.
1775 * data/yacc.c (yyerrlab): Move the code that destroys the stack
1776 from here....
1777 (yyreturn): to here. That way, destructors are called properly
1778 even if the stack overflows, or the user calls YYACCEPT or
1779 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
1780 (yyoverflowlab): Destroy the lookahead.
1781
17822005-04-24 Paul Eggert <eggert@cs.ucla.edu>
1783
1784 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
1785
72f000b0
PE
17862005-04-17 Paul Eggert <eggert@cs.ucla.edu>
1787
1788 * NEWS: Bison-generated C parsers no longer quote literal strings
1789 associated with tokens.
1790 * src/output.c (prepare_symbols): Don't escape strings,
1791 since users don't want to see C escapes.
1792 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
1793 in diagnostics.
c19683bb 1794 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
1795 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
1796
1094323f
PE
17972005-04-16 Paul Eggert <eggert@cs.ucla.edu>
1798
1799 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
1800 the data size is known to be too small and we can't increase it.
1801 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
1802
ca407bdf
PE
18032005-04-15 Paul Eggert <eggert@cs.ucla.edu>
1804
1805 * src/parse-gram.y: Include quotearg.h.
1806 (string_as_id): Quote $1 before using it as a key, since the
1807 lexer no longer quotes it for us.
1808 (string_content): Don't strip quotes, since lexer no longer
1809 quotes it for us.
1810 * src/scan-gram.l: Include quotearg.h.
1811 ("\""): Omit quote.
1812 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
1813 a key, since the rest of the lexer doesn't quote it.
1814 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
1815 * tests/regression.at (Token definitions): Check for backslashes
1816 in token strings.
1817
1818 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
1819 (YYSIZE_T): Define to unsigned long int when using an older compiler.
1820 (yyparse): Revamp code to generate long syntax error message, to
1821 make it easier to translate, and to avoid problems with arithmetic
1822 overflow. Change "virtual memory" to "memory" in diagnostic, since
1823 we don't know whether the memory is virtual.
1824
1ce59070
PE
18252005-04-13 Paul Eggert <eggert@cs.ucla.edu>
1826
1827 * NEWS: Bison-generated C parsers now use the _ macro to
1828 translate strings.
1829 * data/yacc.c (_) [!defined _]: New macro.
1830 All English strings wrapped inside this macro.
1831 * doc/bison.texinfo (Bison Parser): Document _.
1832 * po/POTFILES.in: Include src/parse-gram.c, since it now
1833 includes translateable strings that parse-gram.y doesn't.
1834
a749a695
PE
18352005-04-12 Paul Eggert <eggert@cs.ucla.edu>
1836
1837 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
1838 reverting the 2004-10-11 change to this function.
1839 (symbol_check_alias_consistency): Don't call symbol_type_set
1840 if the type name is already correct.
1841 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
1842
8fb1053b
PE
18432005-03-25 Paul Eggert <eggert@cs.ucla.edu>
1844
1845 * tests/regression.at (Token definitions): Don't use a token named
1846 c, as that generates a "#define c ..." that runs afoul of buggy
1847 stdlib.h that uses the identifier c as a member of struct
1848 drand48_data. Problem reported by Horst Wente.
1849
ff498c4a
PE
18502005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1851
1852 * bootstrap: Change translation URL from
1853 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
1854 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
1855 redirection glitches. Problem reported by twlevo@xs4all.nl.
1856
65211d70
PE
18572005-03-20 Paul Eggert <eggert@cs.ucla.edu>
1858
1859 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
1860 after operands; POSIX says this isn't portable for the c99 command.
1861
9577fb1f
PE
18622005-03-18 Paul Eggert <eggert@cs.ucla.edu>
1863
1864 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
1865 immediately if a data overrun has occurred; this may help us track
1866 down what may be a spurious failure on MacOS.
1867
78b178f7
PE
18682005-03-17 Paul Eggert <eggert@cs.ucla.edu>
1869
a2599d0f
PE
1870 Respond to problems reported by twlevo@xs4all.nl.
1871
1872 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
1873
78b178f7
PE
1874 * src/vcg.h: Comment fix.
1875 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
1876 (G_CMAX): Change to -1 instead of INT_MAX.
1877
1878 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 1879
7296e729
PE
18802005-03-15 Paul Eggert <eggert@cs.ucla.edu>
1881
1882 * src/tables.c (state_number_to_vector_number): Put it inside an
1883 "#if 0", since it's not currently used. Problem reported by
1884 Roland McGrath.
1885
05ac60f3
PE
18862005-03-06 Paul Eggert <eggert@cs.ucla.edu>
1887
1888 * src/output.c (escaped_output): Renamed from
1889 escaped_file_name_output, since we now use it for symbol tags as
1890 well. All uses changed.
1891 (symbol_destructors_output, symbol_printers_output):
1892 Escape symbol tags too.
1893 Problem reported by Matyas Forstner in
1894 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
1895
1896 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
1897 not needed.
1898 * src/output.c (user_actions_output, token_definitions_output,
1899 symbol_destructors_output, symbol_printers_output): Likewise.
1900 * src/reader.c (prologue_augment): Likewise.
1901 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
1902
1903 * src/vcg.c (output_edge): Don't quote linestyle arg.
1904 Problem reported by twlevo@xs4all.nl.
1905
7eb453ac
PE
19062005-02-28 Paul Eggert <eggert@cs.ucla.edu>
1907
1908 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
1909 example, reported by Derek M Jones. Also, make the example even
1910 more outrageous, to better illustrate how bad the problem is.
1911
4c04c52a
PE
19122005-02-24 Paul Eggert <eggert@cs.ucla.edu>
1913
1914 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
1915 putsym. Typo reported by Sebastian Piping.
1916
a61e1620
PE
19172005-02-23 Paul Eggert <eggert@cs.ucla.edu>
1918
1919 * doc/bison.texinfo (Language and Grammar): some -> same
1920 (Epilogue): int he -> in the
1921 Typos reported by Sebastian Piping via Justin Pence.
1922
9ec93868
PE
19232005-02-07 Paul Eggert <eggert@cs.ucla.edu>
1924
1925 * tests/glr-regression.at (Improper handling of embedded actions
1926 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
1927 embedded actions and $-N in GLR parsers", work around an Autoconf bug
1928 with dollar signs in test names.
1929 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
1930 for a similar reason.
1931
73ce7e7e
PE
19322005-01-28 Paul Eggert <eggert@cs.ucla.edu>
1933
1934 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
1935 wants to redefine G_VIEW.
1936
2e72b98e
PE
19372005-01-27 Paul Eggert <eggert@cs.ucla.edu>
1938
1939 * src/vcg.c (get_view_str): Remove case for normal_view.
1940 Problem reported by twlevo@xs4all.nl.
1941
e0d634e5
PE
19422005-01-24 Paul Eggert <eggert@cs.ucla.edu>
1943
ccf830a4
PE
1944 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
1945 Problem reported by twlevo@xs4all.nl.
1946
e0d634e5
PE
1947 * doc/bison.texinfo: Change @dircategory from "GNU programming
1948 tools" to "Software development". Requested by Richard Stallman
1949 via Karl Berry.
1950
7bbc8cb0
PE
19512005-01-23 Paul Eggert <eggert@cs.ucla.edu>
1952
1953 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
1954 Problem reported by twlevo@xs4all.nl.
1955
08b770bc
PE
19562005-01-21 Paul Eggert <eggert@cs.ucla.edu>
1957
1958 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
1959 keyword; it's not needed with modern compilers, and it doesn't
1960 affect correctness with older compilers. Suggested by
1961 twlevo@xs4all.nl.
1962
95f22ad2
PE
19632005-01-17 Paul Eggert <eggert@cs.ucla.edu>
1964
1965 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1966 gcc -Wswitch-default.
1967 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1968 * data/yacc.c (yyparse): Likewise.
1969
d229d15c
PE
19702005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1971
1972 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1973 already. Let config.h define any nonstandard values.
1974
ecadd90f
PE
19752005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1976
1977 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1978 for the benefit of slower hosts. Problem reported by
1979 Nelson H. F. Beebe.
1980
213744b5
PE
19812005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1982
1983 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1984 being defined and not used.
1985 * data/lalr1.cc (yyparse): Likewise.
1986 Use "if (false)" rather than "if (0)".
1987
249d3236
PE
19882005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1989
1990 * TODO: Mention that we should allow NUL bytes in tokens.
1991
987cc1fb
PE
19922005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1993
1994 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1995 Problem reported by Hans Aberg.
1996
08fe02d9
PE
19972005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1998
1999 * src/getargs.c (version): Happy new year; update overall
2000 program copyright date from 2004 to 2005.
2001
2002 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
2003 Problem reported by Hans Aberg.
2004 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
2005 (Output file names.): Add a test for the case when standard output
2006 is closed.
2007
010c0266
PE
20082004-12-26 Paul Eggert <eggert@cs.ucla.edu>
2009
2010 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
2011 to fix an oversight in the Bison 2.0 manual.
2012
da12206a
PE
20132004-12-25 Paul Eggert <eggert@cs.ucla.edu>
2014
2015 * NEWS: Version 2.0. Reformat the existing news items since
2016 1.875, so that related items are grouped together.
3a4734aa 2017 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
2018 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
2019
c935d934
PE
2020 * tests/torture.at (Exploding the Stack Size with Alloca): Set
2021 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
2022 otherwise, we're not testing alloca. Unfortunately there's no
2023 simple way to consult HAVE_ALLOCA here.
2024
da12206a
PE
2025 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
2026 for yymsg, too.
2027
2028 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
2029 hand. This avoids a warning about comparing int to size_t when
2030 GCC warnings are enabled.
2031
0a2c5137
PE
20322004-12-22 Paul Eggert <eggert@cs.ucla.edu>
2033
d7e14fc0
PE
2034 * NEWS: Bison-generated parsers no longer default to using the
2035 alloca function (when available) to extend the parser stack, due
2036 to widespread problems in unchecked stack-overflow detection.
2037 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
2038 responsibility to set it to a positive value. This lets the user
2039 specify a value that is not a preprocessor constant.
2040 * data/yacc.c (YYMAXDEPTH): Likewise.
2041 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
2042 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
2043 to be a compile-time constant. However, explain the constraints on it.
2044 Also, explain the constraints on YYINITDEPTH.
2045 (Table of Symbols): Explain that alloca is no longer the default.
2046 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
2047 to 1.
2048
0a2c5137
PE
2049 * doc/bison.texinfo (Location Default Action): Mention that n must
2050 be zero when k is zero. Suggested by Frank Heckenbach.
2051
e019c247
AD
20522004-12-22 Akim Demaille <akim@epita.fr>
2053
2054 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
2055 (parser::state_type, parser::semantic_type, parser::location_type):
2056 Private, not public.
2057 (parser::parse): Return ints, not bool.
2058 Returning a bool introduces a problem: 0 corresponds to false, and
2059 it seems weird to return false on success. Returning true changes
2060 the conventions for yyparse.
2061 Alternatively we could return void and send an exception.
2062 There is no clear consensus (yet?).
2063 (state_stack, semantic_stack, location_stack): Rename as...
2064 (state_stack_type, semantic_stack_type, location_stack_type): these.
2065 Private, not public.
2066 * tests/c++.at: New.
2067 * tests/testsuite.at, tests/Makefile.am: Adjust.
2068
72731bb7
AD
20692004-12-21 Akim Demaille <akim@epita.fr>
2070
2071 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
2072
9a0d8bec
AD
20732004-12-21 Akim Demaille <akim@epita.fr>
2074
2075 Don't impose std::string for filenames.
2076
2077 * data/lalr1.cc (b4_filename_type): New.
2078 (position::filename): Use it.
2079 (parser.hh): Move the inclusion of stack.hh and location.hh below
2080 the user code, so that needed headers for the filename type can be
2081 included first.
72731bb7
AD
2082 Forward declare them before the user code.
2083 * tests/Makefile.am (check-local, installcheck-local): Pass
2084 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 2085
99880de5
AD
20862004-12-20 Akim Demaille <akim@epita.fr>
2087
2088 Use more STL like names: my_class instead of MyClass.
2089
2090 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
2091 (SemanticStack, SemanticType, StateStack, StateType)
2092 (TokenNumberType, Stack, Slice, Traits, Parser::location)
2093 (Parser::value): Rename as...
2094 (location_stack, location_type, rhs_number_type, semantic_stack)
2095 (semantic_type, state_stack, state_type, token_number_type, stack)
2096 (slice, traits, parser::yylloc, parser::yylval): these.
2097
2098 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
2099
9bec482e
PE
21002004-12-19 Paul Eggert <eggert@cs.ucla.edu>
2101
2102 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
2103 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2104
f6fbd3da
PE
21052004-12-17 Paul Eggert <eggert@cs.ucla.edu>
2106
2107 Remove uses of 'short int' and 'unsigned short int'. This raises
2108 some arbitrary limits. It uses more memory but nowadays that's
2109 not much of an issue.
2110
2111 This change does not affect the generated parsers; that's a different
2112 task, as some users will want to conserve memory there.
2113
2114 Ideally we should use size_t to represent all object counts, and
2115 something like ptrdiff_t to represent signed differences of object
2116 counts; but that will require more code-cleanup than I have the
2117 time to do right now.
2118
2119 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
2120 Use size_t, not int or short int, to count objects.
2121 * src/closure.c (nritemset, closure): Likewise.
2122 * src/closure.h (nritemset, closure): Likewise.
2123 * src/nullable.c (nullable_compute): Likewise.
2124 * src/print.c (print_core): Likewise.
2125 * src/print_graph.c (print_core): Likewise.
2126 * src/state.c (state_compare, state_hash): Likewise.
2127 * src/state.h (struct state): Likewise.
2128 * src/tables.c (default_goto, goto_actions): Likewise.
2129
2130 * src/gram.h (rule_number, rule): Use int, not short int.
2131 * src/output.c (prepare_rules): Likewise.
2132 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
2133 errs, reductions): Likewise.
2134 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
2135 Likewise.
2136 * src/tables.c (vector_number, tally, action_number,
2137 ACTION_NUMBER_MINIMUM): Likewise.
2138 * src/output.c (muscle_insert_short_int_table): Remove.
2139
efeed023
AD
21402004-12-17 Akim Demaille <akim@epita.fr>
2141
2142 * data/lalr1.cc: Extensive Doxygenation.
2143 (error_): Rename as...
2144 (error): this, since it is visible to the user.
2145 Adjust callers.
2146 (Parser::message): Now an automatic variable from...
2147 (Parser::yyreport_syntax_error_): here.
2148 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
2149 Parser::error.
2150 * tests/input.at: Escape $.
2151
bc82c5a5
PE
21522004-12-16 Paul Eggert <eggert@cs.ucla.edu>
2153
2154 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
2155 Parenthesize rhs to avoid obscure problems with mistakes like
2156 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
2157 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
2158 b4_rhs_location): Likewise.
2159 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
2160 b4_rhs_location): Likewise.
2161
fd19f271
AD
21622004-12-16 Akim Demaille <akim@epita.fr>
2163
2164 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
2165 yacc.c: be sure to stay within yycheck_.
2166 * tests/actions.at: Re-enable C++ tests.
2167
10454ea4
AD
21682004-12-16 Akim Demaille <akim@epita.fr>
2169
2170 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
2171 real.
2172
c5b95ccf
AD
21732004-12-16 Akim Demaille <akim@epita.fr>
2174
2175 Use #define to handle the %name-prefix.
2176
2177 * data/glr.c, data/yacc.c: Comment changes.
2178 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
2179 so that one can refer to yylex in the parser file, and have it
2180 renamed, as is the case with other skeletons.
2181
617a8f12
AD
21822004-12-16 Akim Demaille <akim@epita.fr>
2183
2184 Move lalr1.cc internals into yy*.
2185
2186 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
2187 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
2188 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
2189 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
2190 (empty_, final_, terror_, errcode_, ntokens_)
2191 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
2192 (looka_, ilooka_, error_range_, nerrs_):
2193 Rename as...
2194 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
2195 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
2196 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
2197 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
2198 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
2199 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
2200 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
2201 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
2202 these.
2203
1e547e6e
PE
22042004-12-15 Paul Eggert <eggert@cs.ucla.edu>
2205
2206 Fix some problems reported by twlevo at xs4all.
2207 * src/symtab.c (symbol_new): Report an error if the input grammar
2208 contains too many symbols. This is better than calling abort() later.
2209 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
2210 (struct node, struct graph):
2211 Rename member expand to stretch. All uses changed.
2212 (struct graph): Remove member layoutalgorithm. All uses removed.
2213 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
2214 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
2215 All uses changed.
2216 (N_STRETCH): Rename from N_EXPAND. All uses changed.
2217
735d6bd4
AD
22182004-12-15 Akim Demaille <akim@epita.fr>
2219
2220 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
2221 Add more Doxygen comments.
2222 (symprint_, stack_print_, reduce_print_, destruct_, pop)
2223 (report_syntax_error_, translate_): Rename as...
2224 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
2225 (yypop_, yyreport_syntax_error_, yytranslate_): this.
2226
2e1f5829
AD
22272004-12-15 Akim Demaille <akim@epita.fr>
2228
2229 * data/lalr1.cc (lex_): Rename as...
2230 (yylex_): this.
2231 Move the trace here.
2232 Take the %name-prefix into account.
2233 Reported by Alexandre Duret-Lutz.
2234
a3cb6248
AD
22352004-12-15 Akim Demaille <akim@epita.fr>
2236
2237 Simplify the C++ parser constructor.
2238
2239 * data/lalr1.cc (debug_): Rename as...
2240 (yydebug_): so that the parser's internals are always in the yy*
2241 pseudo namespace.
2242 Adjust uses.
2243 (b4_parse_param_decl): Remove the leading comma as it is now only
2244 called as unique argument list.
2245 (Parser::Parser): Remove the constructor accepting a location and
2246 an initial debugging level.
2247 Remove from the other ctor the argument for the debugging level.
2248 (debug_level_type, debug_level, set_debug_level): New.
2249
2250 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
2251 constructor calls.
2252
07fed891
AD
22532004-12-15 Akim Demaille <akim@epita.fr>
2254
2255 Remove b4_root related material: failure experiment
a3cb6248 2256 (which goal was to allow to derive from a class).
07fed891
AD
2257
2258 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
2259 definitions and uses.
2260
e603eaa5
PE
22612004-12-14 Paul Eggert <eggert@cs.ucla.edu>
2262
2263 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
2264 not 2, since it's not portable to subtract 1 from the start of an
2265 array. The new item 0 is never set or used. All uses changed.
2266
2267 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
2268 the default definition of YYLLOC_DEFAULT. Problem reported
2269 by Frank Heckenbach.
2270
fafb007d
PE
22712004-12-12 Paul Eggert <eggert@cs.ucla.edu>
2272
2273 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
2274 the normal case and one for the error case. Just use the
2275 first one uniformly. Problem reported by Frank Heckenbach.
2276 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
2277 use exactly the same macro in both places.
2278 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
2279 so that the normal-case YYRHSLOC works for the error case too.
2280 All uses changed.
2281 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
2282 (YYLLOC_DEFAULT): Use the same macro as glr.c.
2283 * doc/bison.texinfo (Location Default Action): Don't claim that
2284 we have an array of locations. Use the same macro for both glr
2285 and lalr parsers. Mention YYRHSLOC. Mention what happens when
2286 the index is 0.
2287
48814dcd
PE
22882004-12-10 Paul Eggert <eggert@cs.ucla.edu>
2289
a4e1a53b
PE
2290 * HACKING: Update email addresses to send announcements to.
2291
48814dcd
PE
2292 * configure.ac (AC_INIT): Bump version to 1.875f.
2293
337116ba
PE
22942004-12-10 Paul Eggert <eggert@cs.ucla.edu>
2295
2296 * NEWS: Version 1.875e.
2297 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
2298
2299 * src/scan-skel.l: Include "complain.h", for "fatal".
2300
2301 * src/relation.h (relation_print, relation_digraph):
2302 Relation sizes are of type relation_node, not size_t (this is
2303 merely a doc fix, since the two types are equivalent).
2304 (relation_transpose): Relation sizes are of type relation_node,
2305 not int.
2306 * src/relation.c: Likewise.
2307 (top, infinity): Now of type relation_node, not int.
2308 (traverse, relation_transpose): Use relation_node, not int.
2309
2310 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
2311 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
2312 (yyparse): Remove unused local introduced in 2004-10-25 patch.
2313
2314 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 2315 specifying whether the test should be skipped. Use it tp
337116ba 2316 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 2317 fail on some hosts, and should be skipped.
337116ba 2318
da2a7671
PE
23192004-12-08 Paul Eggert <eggert@cs.ucla.edu>
2320
2321 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
2322 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
2323 unless otherwise specified below.
2324
2325 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
2326 to allocate kernel_base, kernel_items, kernel_size, since
2327 they needn't be initialized to 0.
2328 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
2329 * src/closure.c (new_closure): Likewise, for itemset.
2330 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
2331 * src/lalr.c (set_goto_map): Likewise, for temp_map.
2332 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
2333 (build_relations): Likewise for edge, states1, includes.
2334 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
2335 * src/reader.c (packgram): Likewise, for ritem, rules.
2336 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
2337 * src/relation.c (relation_digraph): Likewise for VERTICES.
2338 (relation_transpose): Likewise for new_R, end_R.
2339 * src/symtab.c (symbols_token_translations_init): Likewise for
2340 token_translations.
2341 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
2342 (token_actions): Likewise for yydefact, actrow, conflrow,
2343 conflict_list.
2344 (save_column): Likewise for froms[symno], tos[symno].
2345 (goto_actions): Likewise for state_count.
2346 (pack_table): Likewise for base, pos, check.
2347 (tables_generate): Likewise for width.
2348
2349 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
2350 for initial core. Just have a separate core, so we needn't worry
2351 about whether kernel_size and kernel_base are initialized.
2352
2353 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
2354 kernel_size, kernel_items): Remove unnecessary initialization.
2355 * src/conflicts.c (conflicts): Likewise.
2356 * src/derives.c (derives): Likewise.
2357 * src/muscle_tablc (muscle_insert): Likewise.
2358 * src/relation.c (relation_digraph): Likewise.
2359 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
2360 conflrow, conflict_table, conflict_list, table, check):
2361 Likewise.
2362
2363 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
2364 This is because all callers pass unsigned int.
2365 * src/closure.h (new_closure): Likewise.
2366
2367 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
2368 (build_relations): Initialize includes[i] in all cases.
2369 * src/reader.c (packgram): Always initialize rules[ruleno].prec
2370 and rules[ruleno].precsym. Initialize members in order.
2371 * src/relation.c (relation_transpose): Always initialize new_R[i]
2372 and end_R[i].
2373 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
2374
2375 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
2376 conflict_list[0] was always 0, but now it isn't initialized.
2377
2378 * src/table.c (table_grow): When conflict_table grew, the grown
2379 area wasn't cleared. Fix this.
2380
2381 * lib/.cvsignore: Add strdup.c, strdup.h.
2382 * m4/.cvsignore: Add strdup.m4.
2383
00baeeac
PE
23842004-12-07 Paul Eggert <eggert@cs.ucla.edu>
2385
2386 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
2387 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
2388 GOTO_NUMBER_MAXIMUM, since we occasionally compute
2389 ngotos + 1 without checking for overflow.
2390 (build_relations): Use END_NODE, not -1, to denote end of edges.
2391 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
2392 build_relations): Use goto_number, not int, for goto numbers.
2393 * src/tables.c (save_column, default_goto): Likewise.
2394
be3d9d42
AD
23952004-11-23 Akim Demaille <akim@epita.fr>
2396
2397 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
2398 of #defining from yystype.
2399 Don't typedef yystype, C++ does not need it.
2400 This lets it possible to forward declare it as union.
2401
78e526d5
PE
24022004-11-23 Paul Eggert <eggert@cs.ucla.edu>
2403
2404 * bootstrap (gnulib_modules): Add extensions.
2405 Problem reported by Jim Meyering.
2406
afbb696d
PE
24072004-11-22 Paul Eggert <eggert@cs.ucla.edu>
2408
2409 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
2410 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
2411 src/system.h, src/tables.c: XFREE -> free, to accommodate
2412 recent change to gnulib xalloc.h.
78e526d5 2413 Problem reported by Jim Meyering.
afbb696d 2414
c1f8f16a
AD
24152004-11-17 Akim Demaille <akim@epita.fr>
2416
2417 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
2418
24192004-10-28 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
2420 Alexandre Duret-Lutz <adl@gnu.org>
2421
2422 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
2423 changes.
2424 (YYCDEBUG): Adjust.
2425 Use it instead of cdebug_.
2426 (Parser::debug_stream, Parser::set_debug_stream): New.
2427 (Parser::symprint_): Define cdebug_ for temporary backward
2428 compatibility.
2429 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
2430 debug_stream ().
2431
68e11668
AD
24322004-11-17 Akim Demaille <akim@epita.fr>
2433
2434 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
2435 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
2436 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
2437 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2438
97cbc73e
PE
24392004-10-27 Paul Eggert <eggert@cs.ucla.edu>
2440
2441 * data/glr.c (yyloc_default): Remove; not used.
2442 Problem reported by Frank Heckenbach.
2443
e342c3be
AD
24442004-10-25 Akim Demaille <akim@epita.fr>
2445
2446 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
2447 Introduce another definition to address simple location arrays.
2448 (yyGLRStack): New member: yyerror_range.
2449 (yyrecoverSyntaxError, yyparse): Update it.
2450 (yyrecoverSyntaxError): Use it when shifting the error token to
2451 have an accurate range, equivalent to the one computed by both
2452 yacc.c and lalr1.cc.
2453 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
2454 that column numbers start at column 0, as per GNU Coding
2455 Standards, the others tests, and the doc.
2456 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
2457 Adjust to the above change (first column is 0).
2458 And adjust the location of the "<error>", now covering the whole
2459 line.
2460
93602feb 24612004-10-22 Akim Demaille <akim@epita.fr>
04098407 2462 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
2463
2464 Remove some arbitrary limits on goto numbers and relations.
2465 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
2466 initial values, since they're never used.
2467 (set_goto_map): ngotos is now unsigned, so test for overflow
2468 by seeing whether it wraps around to zero.
2469 * src/lalr.h (goto_number): Now size_t, not short int.
2470 (GOTO_NUMBER_MAXIMUM): Remove.
2471 * src/relation.c (relation_print, traverse, relation_transpose):
2472 Check for END_NODE rather than looking at sign.
2473 * src/relation.h (END_NODE): New macro.
2474 (relation_node): Now size_t, not short int.
2475
dba08b04
PE
24762004-10-22 Paul Eggert <eggert@cs.ucla.edu>
2477
2478 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
2479 keyword, not an identifier. Problem reported by Baron Schwartz in
2480 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
2481
df09ef2e
AD
24822004-10-11 Akim Demaille <akim@epita.fr>
2483
2484 * src/symtab.c (symbol_check_alias_consistency): Also check
2485 type names, destructors, and printers.
2486 Reported by Alexandre Duret-Lutz.
2487 Recode the handling of associativity and precedence in terms
2488 of symbol_precedence_set.
2489 Accept no redeclaration at all, not even equal to the previous
2490 value.
2491 (redeclaration): New.
2492 Use it to factor redeclaration complaints.
2493 (symbol_make_alias): Don't set the type of the alias, let
2494 symbol_check_alias_consistency do it as for other features.
2495 * src/symtab.h (symbol): Add new member prec_location, and
2496 type_location.
2497 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
2498 * tests/input.at (Incompatible Aliases): New.
2499
146bc99d
PE
25002004-10-09 Paul Eggert <eggert@cs.ucla.edu>
2501
2502 .cvsignore fixes to accommodate gnulib changes,
2503 and the practice of naming build directories "_build".
2504 * .cvsignore: Add "_*". Sort.
2505 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
2506 * m4/.cvsignore: Add "*_gl.m4".
2507
e503aa60
AD
25082004-10-06 Akim Demaille <akim@epita.fr>
2509
2510 * src/parse-gram.y (add_param): Fix the truncation of trailing
2511 spaces.
2512
b4a20338
AD
25132004-10-05 Akim Demaille <akim@epita.fr>
2514
2515 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
2516 whether the reducion was empty or not. This leaves room to
2517 improve the use of YYLLOC_DEFAULT in such a case.
2518 lalr1.cc is still experimental, so changing this is acceptable.
2519 And finally, there are probably not many users who changed the
2520 handling of locations in GLR, so changing is admissible too.
2521
2522 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
2523 empty reduction, set @$ to an empty location ending the previously
2524 stacked symbol.
2525 Adjust uses to make sure the code is triggered on empty
2526 reductions.
2527 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
2528 expected output: empty reductions have empty locations.
2529
f85a5e6f
AD
25302004-09-29 Akim Demaille <akim@epita.fr>
2531
2532 * data/lalr1.cc: Move towards a more standard C++ coding style
2533 for templates: Class < T > -> Class<T>.
2534
b203fc2c
AD
25352004-09-29 Akim Demaille <akim@epita.fr>
2536
2537 * data/lalr1.cc: Reinstall the former ctor, for sake of
2538 compatibility, but warn it will be removed.
2539 Move towards a more standard C++ coding style (i.e., type *var ->
2540 type* var).
2541
5b7e1e73
PE
25422004-09-27 Paul Eggert <eggert@cs.ucla.edu>
2543
3fee967f
PE
2544 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
2545 since it's less likely to work if NULs are involved in the future.
5b7e1e73 2546
0dcca5c2
AD
25472004-09-27 Akim Demaille <akim@epita.fr>
2548
2549 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
2550
6dde1c82
AD
25512004-09-27 Akim Demaille <akim@epita.fr>
2552
2553 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 2554 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
2555 and argument names.
2556 (b4_cc_constructor_call): Likewise.
2557
b233d555
AD
25582004-09-24 Akim Demaille <akim@epita.fr>
2559
2560 * src/parse-gram.y (add_param): Strip the leading and trailing
2561 blanks from a formal argument declaration.
2562 (YY_LOCATION_PRINT): New.
2563
619404e3
AD
25642004-09-24 Akim Demaille <akim@epita.fr>
2565
2566 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
2567 after the location.
2568
dd8d9022
AD
25692004-09-24 Akim Demaille <akim@epita.fr>
2570
2571 * doc/bison.texinfo (Table of Symbols): Sort.
2572
0092f063
AD
25732004-09-21 Akim Demaille <akim@epita.fr>
2574
2575 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
2576 the useless parentheses.
2577 Suggested by Paul Eggert.
2578
451364ed
AD
25792004-09-20 Akim Demaille <akim@epita.fr>
2580
2581 Let the initial-action act on the look-ahead, and use it for the
2582 "initial push" (corresponding to an hypothetical beginning-of-file).
2583 And let lalr1.cc honor %initial-action.
2584
2585 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
2586 example.
2587 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
2588 (Parser::Parser): Remove the ctor that used to initialize it.
2589 (Parser::parse): Like in the other skeletons, issue the "starting
2590 parse" message before any action.
2591 Honor %initial-action.
2592 Initialize the stacks with the lookahead.
2593 * data/yacc.c: Let $$ and @$ in %initial-action designate the
2594 look-ahead.
2595 Push them in the stacks.
2596 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
2597
18d192f0
AD
25982004-09-20 Akim Demaille <akim@epita.fr>
2599
2600 * doc/bison.texinfo (Initial Action Decl): New.
2601
b8458aa5
AD
26022004-09-20 Akim Demaille <akim@epita.fr>
2603
2604 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
2605 clearer criterion to define it.
2606 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
2607 When reducing on an empty RHS, use the latest stacked location as
2608 location.
2609 yylloc is not always available.
2610 * data/glr.c: Likewise.
2611 Also, honor initial-actions.
2612
3fc16193
AD
26132004-09-20 Akim Demaille <akim@epita.fr>
2614
2615 * data/yacc.c (YY_LOCATION_PRINT): New.
2616 Define when we know YYLTYPE's structure, i.e., when the default
2617 YYLLOC_DEFAULT is used.
2618 * data/c.m4 (b4_yysymprint_generate): Use it.
2619 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
2620 value of the result.
2621 (error_start_): Replace with...
2622 (error_range_): this location array.
2623 This allows to replace code relying on the implementation of
2624 locations by portable code.
2625 * data/yacc.c (yylerrsp): Replace with...
2626 (yyerror_range): this.
2627 Every time a token is popped, update yyerror_range[0], to have an
2628 accurate location for the error token.
2629 * data/glr.c (YY_LOCATION_PRINT): New.
2630 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
2631 deference a pointer.
2632 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
2633 report the location in %printers.
2634
2635 * src/scan-skel.l: Instead of abort, report error messages to ease
2636 understanding skeleton scanning failures.
2637
ecfe33e7
AD
26382004-09-16 Akim Demaille <akim@epita.fr>
2639
2640 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
2641 (iterator, const_iterator): these, to be more in the C++ spirit.
2642 Also, return reverse iterators so that when displaying the stack
2643 we display its bottom first.
2644 (Parser::stack_print_, Parser::reduce_print_): Match the messages
2645 from yacc.c.
2646 We should probably use vector here though.
2647
1576d44d
AD
26482004-09-16 Akim Demaille <akim@epita.fr>
2649
2650 Have more complete shift traces.
2651
2652 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
2653 to report Shifts instead of ad hoc YYDPRINTF invocations,
2654 including for the error token.
2655 * data/lalr1.cc (symprint_): Output the location.
2656 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
2657 output the location within the %printer.
2658 Activate GLR tests, at least to make sure they compile properly.
2659 They still don't pass though.
2660 * tests/calc.at: Adjust expect verbose output, since now "Entering
2661 state..." is on a different line than the "Shifting" message.
2662
9c66f418
AD
26632004-09-08 Akim Demaille <akim@epita.fr>
2664
2665 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
2666 Bison directive from the Bison file to the invocation of this
2667 macro, so that these directives are passed to
2668 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
2669 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
2670 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
2671 the extra Bison directives instead of the whole series.
2672 Change the grammar so that there are recoverable errors, and
2673 unrecoverable errors. Now we can have the parser give up before
2674 consuming the whole input. As a result we now can observe that
2675 the lookahead is freed when needed.
2676 Change the parser source to parse argv[1] instead of a hard coded
2677 string.
2678 Simplify yylex, and give a value and location to EOF.
2679 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
2680 passed directives already coded in the file.
2681 Add some tests to check the location of "error".
2682 For some tests, the C++ parser is correct, and not yacc.c.
2683 For other tests, they provide different, but unsatisfying, values,
2684 so keep the C++ value so that at least one parser is "correct"
2685 according to the test suite.
2686 (Actions after errors): Remove, this is subsumed by the
2687 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
2688
52d5733f
AD
26892004-09-06 Akim Demaille <akim@epita.fr>
2690
2691 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 2692 (Parser::pop): New.
52d5733f
AD
2693 Use it.
2694
a0e68930
AD
26952004-09-06 Akim Demaille <akim@epita.fr>
2696
2697 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
2698 argument, an informative message.
2699 Call YY_SYMBOL_PRINT.
2700 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
2701 * data/lalr1.cc (destruct_): Likewise.
2702 In addition, no longer depend on b4_yysymprint_generate and
2703 b4_yydestruct_generate to generate these functions, do it "by
2704 hand".
2705
e757bb10
AD
27062004-09-03 Akim Demaille <akim@epita.fr>
2707
2708 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
2709 invoked, yydestruct the lookahead.
2710 * tests/calc.at (Calculator $1): Update the expected lengths of
2711 traces: there is an added line for the discarded lookahead.
2712 * doc/bison.texinfo (Destructor Decl): Some rewording.
2713 Define "discarded" symbols.
2714
0fe1f06d
AD
27152004-09-02 Akim Demaille <akim@epita.fr>
2716
2717 * data/lalr1.cc (translate_, destruct_): No reason to be static.
2718
284acc8b
AD
27192004-09-02 Akim Demaille <akim@epita.fr>
2720
2721 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
2722 (YYDSYMPRINTF): Rename as...
2723 (YY_SYMBOL_PRINT): this.
2724 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
2725 two.
2726 Use it instead of direct symprint_ calls.
2727 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
2728 one.
2729
a5eb1ed2
AD
27302004-09-02 Akim Demaille <akim@epita.fr>
2731
b7c72fe1
AD
2732 * data/lalr1.cc (b4_yysymprint_generate): New.
2733 (symprint_): New member function, defined when YYDEBUG.
2734 Use it consistently instead of token/nterm debugging output by
2735 hand.
a5eb1ed2
AD
2736 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
2737 %printer calls to use cdebug_ when using lalr1.cc.
2738
417141dd
AD
27392004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
2740
2741 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
2742 with #ifdef YYDEBUG.
2743
2fa09258
AD
27442004-08-26 Akim Demaille <akim@epita.fr>
2745
2746 * doc/bison.texinfo (Implementing Loops): Rename as...
2747 (Implementing Gotos/Loops): this.
2748
9378b508
PE
27492004-08-13 Paul Eggert <eggert@cs.ucla.edu>
2750
2751 Adjust to latest gnulib.
2752 * bootstrap (gnulib_modules): Add xalloc-die.
2753 Set LC_ALL=C so that file names sort consistently.
2754 Prefer the gnulib copies of gettext.m4, glibc21.m4,
2755 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
2756 uintmax_t.m4, ulonglong.m4.
2757 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
2758 po.m4 since we are now using _gl.m4 instead.
2759
87a8ad5c
PE
27602004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
2761
2762 * src/scan-action.l: Remove. Scanning of semantic actions is
2763 handled in scan-gram.l.
2764
dca81a78
PE
27652004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
2766
2767 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
2768
2769 * src/location.h (struct): The file member is a uniqstr.
2770 (equal_boundaries): Use UNIQSTR_EQ for comparison.
2771
c9cbf7c5
PE
27722004-07-22 Paul Eggert <eggert@cs.ucla.edu>
2773
2774 Fix bug with non-%union parsers that have printers or destructors,
2775 which led to a Bison core dump. Reported by Peter Fales in
2776 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 2777
c9cbf7c5
PE
2778 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
2779 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
2780 not to our own type.
2781 * src/output.c (symbol_destructors_output, symbol_printers_output):
2782 Don't assume %union.
2783 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
2784 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
2785 UNION-FLAG. All callers changed.
2786 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
2787 Use type char, not unsigned int, when declaring an array of char;
2788 this lets us remove a cast.
2789 (Printers and Destructors): Add non-%union test cases.
2790
fa7e68c3
PE
27912004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2792
2793 * doc/bison.texinfo: Minor editorial changes, mostly to the new
2794 GLR writeups. E.g., avoid frenchspacing and the future tense,
2795 change "lookahead" to "look-ahead", and change "wrt" to "with
2796 respect to".
2fa09258 2797
fa7e68c3
PE
27982004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2799
2800 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
2801 New sections, split off from the GLR Parsers section. Put the new
2802 Simple GLR Parser near the start of the GLR section, for clarity.
2803 Rewrite connective text.
2804
99a9344e
PE
28052004-06-21 Frank Heckenbach <frank@g-n-u.de>
2806
2807 * doc/bison.texinfo (Simple GLR Parsers): New section.
2808
8dd162d3
PE
28092004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2810
2811 * NEWS, TODO, doc/bison.texinfo:
2812 Use "look-ahead" instead of "lookahead", to be consistent.
2813 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
2814 while we're fixing "look-ahead".
2815 * src/conflicts.c (shift_set): Renamed from shiftset.
2816 (look_ahead_set): Renamed from lookaheadset.
2817 * src/print.c: Likewise.
2818 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
2819 name for "lookahead".
2820 (report_types, usage): Likewise.
2821 * src/getargs.h (report_look_ahead_tokens): Renamed from
2822 report_lookaheads.
2823 * src/lalr.c (compute_look_ahead_tokens): Renamed from
2824 compute_lookaheads.
2825 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
2826 (look_ahead_tokens_print): Renamed from lookaheads_print.
2827 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
2828 state_rule_lookaheads_print.
2829 * src/state.h: Likewise.
2830 (reductions.look_ahead_tokens): Renamed from lookaheads.
2831 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
2832 AT_DATA_LOOKAHEADS_GRAMMAR.
2833
57a90331
PE
28342004-06-03 Paul Eggert <eggert@cs.ucla.edu>
2835
2836 * README: Update location of patched M4 distribution.
2837
8ed3234a
PE
28382004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
2839
2840 Don't assume the C++ compiler takes the same arguments as the C compiler
2841 (trivial change).
2842 * configure.ac (O0CXXFLAGS): New var.
2843 * tests/atlocal.in (CXXFLAGS): Use it.
2844
07971983
PE
28452004-05-29 Paul Eggert <eggert@cs.ucla.edu>
2846
2847 Fix some "make check" problems with C++ reported by
2848 Albert Chin-A-Young for Tru64 C++ in this thread:
2849 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
2850
2851 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
2852 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2853 Output to a .cc file for C++, not to a .c file.
2854 * tests/calc.at (AT_CHECK_CALC): Likewise.
2855 * tests/regression.at (AT_CHECK_DANCER): Likewise.
2856 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
2857
29058652
PE
28582004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
2859
2860 * tests/calc.at, tests/actions.at: Workaround for SGI
2861 C++ compiler. (trivial change)
2862
62cb8a99
PE
28632004-05-27 Paul Eggert <eggert@cs.ucla.edu>
2864
fd418816
PE
2865 Spent a few hours checking out which prerequisite versions the
2866 current sources actually require. I went all the way back to
2867 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
2868 a seemingly endless set of combinations of versions more recent
2869 than that. The bottom line is that the current sources require
2870 fairly recent versions of the build tools, and it'll be some work
2871 to change this.
2872 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
2873 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
2874 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
2875 Add comments explaining why those particular versions are
2876 currently needed.
2fa09258 2877
62cb8a99
PE
2878 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
2879 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 2880 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
2881
2882 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
2883 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
2884
caa52c10
PE
28852004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2886
2887 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
2888 0.11.5. Suggested by Bruno Haible.
2889 * bootstrap: Remove gettext version checking.
2890
2891 * doc/bison.texinfo (Decl Summary): Also mention that %union
2892 can depend on prerequisite types. Problem reported by Tim
2893 Van Holder.
2894
4bfd5e4e
PE
28952004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2896
2cef3017
PE
2897 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
2898 * README-alpha: Don't tell people not to package this.
2899
b9c85d5c
PE
2900 * bootstrap: Don't assume $(...) works; use `...` instead.
2901 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
2902 gettext better.
2903
4bfd5e4e
PE
2904 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
2905 put into the -d output file, and mention what to do if YYSTYPE is
2906 defined as a macro.
2907
6a36ff94
PE
29082004-05-24 Paul Eggert <eggert@cs.ucla.edu>
2909
6712933e
PE
2910 Undo change made earlier today: it caused autopoint to not bring
2911 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
2912 autopoint's.
2913
2914 * bootstrap: Check that gettext version matches what's in
2915 configure.ac. Warn users to ignore robots.txt ERROR 404.
2916 * bootstrap: Undo today's earlier change (logged below).
2917 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 2918
6a36ff94
PE
2919 The gettext version checking is causing more trouble than it's
2920 curing; remove it. Problem reported by Paul Hilfinger.
2921
2922 * bootstrap: Issue a warning that one can expect a message
2923 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
2924 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
2925
209ea708
PE
29262004-05-23 Paul Eggert <eggert@cs.ucla.edu>
2927
2928 Ensure that the C++ compiler used for testing actually works on a
2929 simple test program; if not, skip the C++-related tests. Problem
2930 reported by Vin Shelton in:
161a71f3 2931 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
2932
2933 * m4/cxx.m4: New file.
2934 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
2935 * tests/atlocal.in (BISON_CXX_WORKS): Add.
2936 * tests/local.at (AT_COMPILE_CXX): Use it.
2937
41ca2549
PE
29382004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2939
383e69dc
PE
2940 * data/glr.c (yylloc): Output this macro even if locations are not
2941 being generated, as the GLR parser needs it even in that case.
2942 Problem reported by Troy A. Johnson
2943 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
2944
41ca2549
PE
2945 * configure.ac (AC_INIT): Update to 1.875e.
2946
e476c87d
PE
29472004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2948
2949 * NEWS: Version 1.875d.
2950 * configure.ac (AC_INIT): Likewise.
2951 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
2952
2953 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
2954 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
2955 lalr1.cc runs afoul of the first, and the last two are no longer
2956 supported by GCC 3.4.0.
2957 * README: Mention GNU m4 1.4 or later; mention m4 patches.
2958 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
2959
233a88ad
PE
29602004-05-06 Paul Eggert <eggert@cs.ucla.edu>
2961
2962 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
2963 unsigned int, for compatibility with latest gnulib hash module.
2964 * src/state.c (state_hash, state_hasher): Likewise.
2965 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2966 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 2967
12ffdd28
PE
29682004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2969
2970 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2971
2972 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2973 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2974 character and string literals.
2975 (unexpected_end): New function.
2976 (unexpected_eof): Use it.
2977 (unexpected_newline): New function.
2978 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2979 actions.
e476c87d 2980
12ffdd28
PE
2981 * NEWS: Document %expect-rr.
2982
2983 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2984 Fix typo by replacing $1 with $option.
2985 Remove more 'intl'-related files.
9668e2be 2986 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
2987
2988 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2989 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2990 strtoul.c.
2991 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2992 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2993 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2994 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2995 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2996 * src/.cvsignore: Add *.output.
2997
2998 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2999 gets copied to the output file.
e476c87d 3000
1f65350a
PE
30012004-04-28 Paul Eggert <eggert@twinsun.com>
3002
3003 Get files from the gnulib and po repositories, instead of relying
3004 on them being in our CVS. Upgrade to latest versions of gnulib
3005 and Automake.
3006
3007 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
3008 * bootstrap: Bootstrap from gnulib and po repositories.
3009 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
3010 * README-cvs: Document these changes. Remove version numbers from
3011 mentions of build tools, since they change so often. Mention Flex.
3012
3013 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
3014 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
3015 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
3016 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 3017 does this for us.
12ffdd28
PE
3018 (AC_ISC_POSIX): Remove; we no longer support this
3019 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
3020 (AC_HEADER_STDC): Remove: we now assume C89 or better.
3021 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
3022 Do not check for C89 headers, except for locale.h which is used
3023 by the Yacc library and must port to K&R hosts.
3024 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
3025 Do not check for C89 functions, except for setlocale which is
3026 used by the Yacc library.
3027 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
3028 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
3029 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
3030 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
3031 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
3032 AM_GNU_GETTEXT): Remove; now done by:
3033 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
3034 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
3035 for us.
3036
3037 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
3038 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
3039 Define to empty, as gnulib.mk will do the rest for us.
3040 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
3041 for us.
3042 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
3043 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
3044
3045 * src/files.c: Include gnulib's xstrndup.h.
3046
3047 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
3048 (REALLOC): Use xnrealloc, for likewise.
3049 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
3050 (strnlen, memrchr): Remove decls; functions no longer used.
3051 Include <stpcpy.h>.
3052
3053 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
3054 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3055 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
3056 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
3057 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
3058 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
3059 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
3060 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
3061 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
3062 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
3063 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
3064 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3065 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
3066 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
3067 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
3068 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
3069 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
3070 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
3071 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
3072 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
3073 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
3074 Remove, as these files are now generated automatically
3075 by bootstrap or automake.
3076
3077 * po/ChangeLog: Remove: all but one entry was a duplicate
3078 of this file, and I moved that 2000-11-02 entry here.
3079
3080 * config/.cvsignore: Add Makefile, depcomp, install-sh.
3081 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
3082 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
3083 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
3084 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
3085 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
3086 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
3087 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
3088 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
3089 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
3090 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
3091 xstrndup.h.
3092 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
3093 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
3094 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
3095 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
3096 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
3097 * src/.cvsignore: Remove *_.c.
3098
3099
3100 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
3101 support it. (The latest stable gzip doesn't.)
3102
31032004-04-27 Paul Eggert <eggert@twinsun.com>
3104
3105 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
3106 case, as stos_ is now used by destructors due to the 2004-02-09
3107 change.
3108
3109 Remove more K&R C support.
3110 * lib/libiberty.y (PARAMS): Remove. All uses removed.
3111 * lib/subpipe.c (errno): Remove decl.
3112 Include <stdlib.h> unconditionally.
3113 (EXIT_FAILURE): Remove macro.
3114 * src/complain.c (vfprintf, strerror): Remove.
3115 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
3116 unconditionally.
3117 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
3118 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
3119 (strchr, strspn, memchr): Remove decls.
3120 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
3121 unconditionally. Do not declare perror.
3122 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
3123 unconditionally.
3124
3125 * src/complain.c (_): Remove useless defn, as system.h defines this.
3126
3127 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
3128 with latest obstack.h.
3129 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
3130 to procedure types, as obstack.h now does that for us.
3131 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
3132
3133 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
3134 so that this include file can stand alone.
3135 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
3136 does this now. Include subpipe.h first after config.h, to
3137 test whether it can stand alone.
3138
3139 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
3140 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
3141 unused declaration.
3142
3143 * tests/synclines.at (%union synch line): Put a dummy member in
3144 the union, because empty unions aren't allowed in C. Caught
3145 by GCC 3.4.0.
3146
4f16766c
PE
31472004-04-13 Jim Meyering <jim@meyering.net>
3148
3149 * src/conflicts.c (conflicts_print): Correct format string typo:
3150 use `%%' to produce literal `%'. (trivial change)
3151
779e7ceb
PE
31522004-03-30 Paul Eggert <eggert@twinsun.com>
3153
3154 * src/getargs.c (version): Update copyright year to 2004.
3155
3156 * data/c.m4 (b4_int_type): Use 'short int' rather than
3157 'short', and similarly for 'long', 'unsigned', etc.
3158 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
3159 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
3160 yy_yypstack, yydumpstack): Likewise.
3161 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
3162 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
3163 Likewise.
3164 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
3165 yy_stack_print, yyparse): Likewise.
3166 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
3167 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
3168 * lib/bitset.c (bitset_print): Likewise.
3169 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
3170 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3171 * lib/bitsetv.c (bitsetv_dump): Likewise.
3172 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
3173 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
3174 Likewise.
3175 * src/LR0.c (allocate_itemsets): Likewise.
3176 * src/gram.h (rule_number, rule): Likewise.
3177 * src/lalr.h (goto_number): Likewise.
3178 * src/nullable.c (nullable_compute): Likewise.
3179 * src/output.c (prepare_rules): Likewise.
3180 * src/relation.c (relation_print, relation_digraph): Likewise.
3181 * src/relation.h (relation_node): Likewise.
3182 * src/state.h (state_number, transitions, errs, reductions,
3183 struct state): Likewise.
3184 * src/symtab.h (symbol_number, struct symbol): Likewise.
3185 * src/tables.c (vector_number, tally, action_number,
3186 default_goto, goto_actions): Likewise.
3187 * tests/existing.at (GNU Cim Grammar): Likewise.
3188 * tests/regression.at (Web2c Actions): Likewise.
3189
3190 * src/output.c (muscle_insert_short_int_table): Renamed from
3191 muscle_insert_short_table. All uses changed.
3192
d6328241
PH
31932004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3194
3195 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
3196 (declaration): Replace expected_conflicts with expected_sr_conflicts.
3197 Add %expect-rr rule.
4f16766c 3198
d6328241
PH
3199 * src/scan-gram.l: Recognize %expect-rr.
3200
4f16766c 3201 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 3202 expected_conflicts.
4f16766c 3203 (expected_rr_conflicts): Declare.
d6328241
PH
3204
3205 * src/conflicts.c (expected_sr_conflicts): Rename from
3206 expected_conflicts.
3207 (expected_rr_conflicts): Define.
3208 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
3209 for GLR parsers.
3210 Use expected_sr_conflicts in place of expected_conflicts.
3211 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 3212
d6328241 3213 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 3214
1452af69
PE
32152004-03-08 Paul Eggert <eggert@gnu.org>
3216
3217 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 3218 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
3219
3220 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
3221 in lalr1.cc.
3222 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
3223 * src/scan-gram.l (scan_integer): New function.
3224 ({int}): Use it.
3225 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
3226 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
3227 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
3228 Say "long int", not "long", for uniformity with GNU style.
3229
006d217d
PE
32302004-02-25 Paul Eggert <eggert@twinsun.com>
3231
3232 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
3233 compilers. This fixes a problem with Intel's C++ compiler being
3234 chatty, reported by Guido Trentalancia in
161a71f3 3235 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 3236
c2729758
ADL
32372004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
3238
3239 Support %destructor and merge error locations in lalr1.cc.
3240
3241 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
3242 (Parser::stos_): Define unconditionally.
3243 (Parser::destruct_): New method. Generate its body with
3244 b4_yydestruct_generate.
3245 (Parser::error_start_): New attribute.
3246 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
3247 token which are discarded.
3248 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
3249 error_start_ when erroneous token are discarded.
3250 (Parser::parse) <yyerrlab1>: Compute the location of the error
3251 token so that it covers all the discarded tokens.
3252 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
3253 it can be called with `%skeleton "lalr1.cc"', and do that.
3254
dd0e0635
PE
32552004-02-02 Paul Eggert <eggert@twinsun.com>
3256
3257 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
3258 $(top_srcdir)/lib and ../lib. This fixes a bug reported
3259 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
3260 There's no need to mention top_builddir since Automake does that
3261 for us.
3262 (INCLUDES): Remove, as Automake says it's obsolescent.
3263 Contents migrated into AM_CPPFLAGS as described above.
3264 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
3265
32662004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3267
3268 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
3269 (yyreportSyntaxError): Handle case where lookahead token is
3270 YYEMPTY.
3271
be16239b
PH
32722004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3273
3274 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
3275 resulting parsers are compilable with C++.
3276
5fa90832
PE
32772003-12-23 Paul Eggert <eggert@twinsun.com>
3278
3279 * config/depcomp, config/install-sh: Sync with Automake 1.8.
3280 * src/output.c (output_skeleton): Rename local var.
3281 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
3282 Bison tokens, as this runs afoul of the 2003-10-07 change that
3283 disallowed NUL bytes in character constants or string literals.
3284
3285 * tests/local.at: Require Autoconf 2.59's Autotest.
3286 * tests/testsuite.at: Don't include local.at, since we now assume
3287 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
3288 including it.
3289 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
3290 multiple inclusion warnings.
dd0e0635 3291
b165c324
AD
32922003-12-02 Akim Demaille <akim@epita.fr>
3293
3294 * doc/bison.texinfo (How Can I Reset the Parser): More about start
3295 conditions.
3296 From Bruno Haible.
3297
26e06a21
ADL
32982003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
3299
3300 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
3301
92ac3705
PE
33022003-10-07 Paul Eggert <eggert@twinsun.com>
3303
6a5ecb38
PE
3304 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
3305 if testsuite doesn't exist.
3306
92ac3705
PE
3307 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
3308 literals, unfortunately.
3309 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
3310 Complain about NUL bytes in character constants or string literals.
3311
91d2c560
PE
33122003-10-05 Paul Eggert <eggert@twinsun.com>
3313
3314 * NEWS: Don't document %no-default-prec, as it's still
3315 too experimental.
3316 * doc/bison.texinfo: Document %no-default-prec only if
3317 the defaultprec flag is set. Normally it's not.
3318
0cc3da3a
PE
33192003-10-04 Paul Eggert <eggert@twinsun.com>
3320
3321 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
3322 non-modifiable lvalue, instead of a modifiable one.
3323 * doc/bison.texinfo (Actions): Document that $$ can
3324 be assigned to. Do not claim that $$ and $N are
3325 array element references: user code should not rely on this.
3326
22fccf95
PE
33272003-10-01 Paul Eggert <eggert@twinsun.com>
3328
3329 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
3330 (grammar_declaration): Use it.
3331 * src/scan-gram.l: New token %no-default-prec.
3332 * tests/conflicts.at: Revamp tests to use %no-default-prec.
3333 * NEWS, doc/bison.texinfo: Document the above.
3334
fc8f2965
AD
33352003-10-01 Akim Demaille <akim@epita.fr>
3336
3337 VCG no longer supports long_straight_phase.
3338
3339 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
3340 * src/print_graph.c (print_graph): Adjust.
3341
39a06c25
PE
33422003-09-30 Frank Heckenbach <frank@g-n-u.de>
3343 and Paul Eggert <eggert@twinsun.com>
3344
3345 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
3346 Table of Symbols): Document %default-prec.
3347 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
3348 (grammar_declaration): Set default_prec on %default-prec.
3349 * src/scan-gram.l (%default-prec): New token.
3350 * src/reader.h (default_prec): New flag.
3351 * src/reader.c: Likewise.
3352 (packgram): Handle it.
3353 * tests/conflicts.at (%default-prec without %prec,
3354 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 3355
39a06c25
PE
33562003-09-30 Paul Eggert <eggert@twinsun.com>
3357
3358 * tests/testsuite.at: Include local.at, not input.at, fixing
3359 a typo in the 2003-08-25 patch.
3360
62b6aef9
AD
33612003-08-27 Akim Demaille <akim@epita.fr>
3362
3363 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
3364 GCC warnings.
3365
89e1cc61
AD
33662003-08-26 Akim Demaille <akim@epita.fr>
3367
3368 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
3369 "<\#" to avoid magic from Gnus when posting parts of this script.
3370
a08460b0
AD
33712003-08-26 Akim Demaille <akim@epita.fr>
3372
3373 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
3374 (Parser::parse): here.
3375 Adjust: nerrs and errstatus is now replaced by...
3376 (Parser::nerrs_, Parser::errstatus_): New.
3377
603f1cfd
AD
33782003-08-25 Akim Demaille <akim@epita.fr>
3379
3380 * config/announce-gen, Makefile.cfg: New.
3381 * Makefile.am: Adjust.
3382 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
3383 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
3384
cd3684cf
AD
33852003-08-25 Akim Demaille <akim@epita.fr>
3386
3387 When reducing initial empty rules, Bison parser read an initial
3388 location that is not defined. This results in garbage, and that
3389 affects Bison's own parser. Therefore we need (i) to extend Bison
3390 to support a means to initialize this location, and (ii) to use
3391 this CVS Bison to fix CVS Bison's parser.
3392
3393 * src/reader.h, reader.c (epilogue_augment): Remove, replace
3394 with...
3395 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
3396 * src/parse-gram.y: Adjust.
3397 (%initial-action): New.
3398 (%error-verbose): Since we require CVS Bison, there is no reason
3399 not to use it.
3400 * src/scan-gram.l: Adjust.
3401 * src/Makefile.am (YACC): New, to make sure we use our own parser.
3402 * data/yacc.c (yyparse): Use b4_initial_action.
3403
4e03e201
AD
34042003-08-25 Akim Demaille <akim@epita.fr>
3405
3406 * doc/bison.texinfo: Don't promote stdout for error messages.
3407
8c182d05
AD
34082003-08-25 Akim Demaille <akim@epita.fr>
3409
3410 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
3411 From Alexandre Duret-Lutz.
3412
6a60c4cf
PE
34132003-08-25 Akim Demaille <akim@epita.fr>
3414
3415 Version 1.875c.
3416
25f66e1a
AD
34172003-08-25 Akim Demaille <akim@epita.fr>
3418
3419 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
3420 Use them.
3421
5348bfbe
AD
34222003-08-25 Akim Demaille <akim@epita.fr>
3423
3424 * data/lalr1.cc (Parser::reduce_print_): New.
3425 Use it.
3426
47301314
AD
34272003-08-25 Akim Demaille <akim@epita.fr>
3428
3429 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
3430 error recovery loops. This patch is based on
161a71f3 3431 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
3432 Also, augment the similarity between lalr1.cc and yacc.c.
3433 Note: the locations of error recovery rules are not correct yet.
3434
3435 * data/lalr1.cc: Comment changes to augment the similarity between
3436 lalr1.cc and yacc.c.
3437 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
3438 (yyerrlab1): Remove, but where it used to be (now the bottom part of
3439 yyerrlab), when hitting EOF, pop the whole stack here instead of
3440 merely falling thru the default error handling mechanism.
3441 (yyerrorlab): New label, with the old contents of YYERROR,
3442 plus the following change: pop the stack of rhs corresponding
3443 to the production that invoked YYERROR. That is how Yacc
3444 behaves (required by POSIX).
3445 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
3446 fail.
3447
1f7a61ff
AD
34482003-08-25 Akim Demaille <akim@epita.fr>
3449
3450 Tune local.at so that people can "autom4te -l autotest calc.at -o
3451 calc" for instance, to extract a sub test suite.
3452
3453 * tests/testsuite.at: Move the initialization, Autotest version
3454 requirement, and AT_TESTED invocation into...
3455 * tests/local.at: here.
3456 * tests/testsuite.at: Include it for compatibility with Autoconf
3457 2.57.
3458 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
3459 be ignore.
3460
327b5b56
PE
34612003-08-04 Paul Eggert <eggert@twinsun.com>
3462
3463 Rework code slightly to avoid gcc -Wtraditional warnings.
3464 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
3465 The returned value is now stored in *YY0. All callers changed.
3466 * src/output.c (merge_output): Adjust to the above change.
3467
0051e3ed
PE
34682003-07-26 Paul Eggert <eggert@twinsun.com>
3469
3470 * data/glr.c (YYASSERT): New macro.
3471 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
3472 yyresolveStates, yyprocessOneStack):
3473 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
3474 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 3475
137437c6
PE
34762003-07-25 Paul Eggert <eggert@twinsun.com>
3477
5b620e06
PE
3478 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
3479 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 3480 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
3481 by Frank Heckenbach, though I have omitted the structure-initialization
3482 part of his glr-knr.diff patch since I recall that the Portable
3483 C Compiler didn't require that change.
3484
137437c6
PE
3485 Let the user specify how to allocate and free memory.
3486 Derived from a suggestion by Frank Heckenbach in
161a71f3 3487 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
3488 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
3489 All uses of free, malloc, realloc changed to use these macros,
3490 and unnecessary casts removed.
3491 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
3492
ddb85ca5
PE
34932003-07-06 Matthias Mann <MatthiasMann@gmx.de>
3494
3495 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
3496 use s.empty() rather than s == "" to test for empty string; see
161a71f3 3497 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
3498 (trivial change)
3499
39910e09
AD
35002003-06-25 Akim Demaille <akim@epita.fr>
3501
3502 * config/depcomp, config/install-sh: Update from masters.
3503
0ae99356
PE
35042003-06-20 Paul Eggert <eggert@twinsun.com>
3505
3506 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
3507 and return properly parenthesized result.
3508 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
3509 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3510 Remove unnecessary parentheses from uses.
3511 * doc/bison.texinfo (Location Default Action): Describe the
3512 conventions for parentheses.
3513
cd05d13c
PE
35142003-06-19 Paul Eggert <eggert@twinsun.com>
3515
81fd08ca
PE
3516 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
3517 yyreportTree): Do not assume that size_t is the same width as int,
3518 when printing sizes. Print sizes using an unsigned format.
3519 Problem reported by Frank Heckenbach in
161a71f3 3520 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 3521
cd05d13c
PE
3522 Port to Forte Developer 7 C compiler.
3523 * data/glr.c (struct YYLTYPE): If locations are not being used,
3524 declare a single dummy member, as empty structs do not conform
3525 to the C standard.
3526 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
3527 the Forte Developer 7 C compiler complains that end-of-loop
3528 code is not reached.
3529
4dcf140b
PE
35302003-06-17 Paul Eggert <eggert@twinsun.com>
3531
3532 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
3533 avoid warnings from picky compilers about redefinition of PARAMS.
3534
8dd76bee
PE
35352003-06-17 Paul Eggert <eggert@twinsun.com>
3536
3537 Version 1.875b.
3538
3539 * NEWS: Document 1.875b.
3540
3541 * lib/bbitset.h: Do not include config.h; that's the includer's job.
3542 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
3543 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
3544 Don't use 'index' in comments, as it's a builtin fn on some hosts.
3545 * lib/bitset_stats.c: Include gettext.h unconditionally, as
3546 per recent gettext manual's suggestion.
3547 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
3548 Use prototypes, not old-style definitions.
3549 * lib/lbitset.c (lbitset_unused_clear): Likewise.
3550 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
3551 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
3552 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
3553 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
3554 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
3555 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
3556 vbitset_or_and_cmp, vbitset_copy): Likewise.
3557
3558 * lib/libiberty.h: Do not include config.h; that's the includer's job.
3559 Do not include <stdlib.h>.
3560 (PARAMS): Define unconditionally for C89.
3561 (ATTRIBUTE_NORETURN): Remove.
3562 (ATTRIBUTE_UNUSED): Define unconditionally.
3563
3564 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 3565 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
3566 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
3567 * lib/vbitset.c, lib/vbitset.h: New files.
3568 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3569 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
3570 from libbitset.
3571
3572 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
3573 `How Can I Reset @code{yyparse}', since texinfo does not allow
3574 arbitrary @ in node names.
3575
3576 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
3577 shouldn't be needed according to the gettext 0.12.1 documentation
3578 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 3579 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 3580 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 3581 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 3582
8dd76bee
PE
3583 * lib/.cvsignore: Add stdbool.h.
3584 * m4/.cvsignore: Add nls.m4, po.m4.
3585
3586 Upgrade to CVS gnulib.
3587 * stdbool_.h: File renamed from stdbool.h.in.
3588 * configure.ac (AM_STDBOOL_H): Invoke this instead of
3589 AC_HEADER_STDBOOL.
3590 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
3591 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
3592 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
3593 (MOSTLYCLEANFILES): New var.
3594 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
3595 (stdbool.h): New rule.
3596 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
3597 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
3598 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
3599 m4/quote.m4: Upgrade to today's gnulib.
3600
3601 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
3602 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
3603 the tests right now.
3604 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
3605 yyerror are declared before use; C99 requires this.
3606
25005f6a
PH
36072003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3608
3609 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
3610 first.
3611 (yyrecoverSyntaxError): Correct the logic for setting and testing
3612 yyerrState.
3613 Correct comment on handling EOF.
3614 Allow states with only a default reduction, rather than failing
8dd76bee 3615 (I can't quite reconstruct why these were not allowed before).
25005f6a 3616
137437c6 3617 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 3618 buffer overruns, corrupting state.
8dd76bee
PE
3619
3620 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
3621 definition.
3622 * src/reader.h (max_left_semantic_context): New variable declaration.
3623 * src/scan-gram.l (max_left_semantic_context): Define.
3624 (handle_action_dollar): Update max_left_semantic_context.
3625 * data/glr.c (YYMAXLEFT): New definition.
3626 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
3627 (yyresolveAction): Ditto.
3628
3629 Fixes to problems with location handling in GLR parsers reported by
3630 Frank Heckenbach (2003/06/05).
3631
3632 * data/glr.c (YYLTYPE): Make trivial if locations not used.
3633 (YYRHSLOC): Add parentheses, and define only if locations used.
3634 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
3635 locations not used.
3636 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
3637 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 3638
25005f6a
PH
3639 * tests/cxx-type.at: Exercise location information; update tests
3640 to differentiate output with and without locations.
8dd76bee 3641 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
3642 because default YYLTYPE not yet defined.
3643 Change semantic actions to compute strings, rather than printing
3644 them directly (to test proper passing of semantics values). Change
3645 output to prefix notation and update test data and expected results.
3646 (yylex): Track locations.
3647 (stmtMerge): Return value rather than printing, and include arguments
3648 in value.
8dd76bee 3649
711f40b7
PE
36502003-06-03 Paul Eggert <eggert@twinsun.com>
3651
3652 Avoid warnings generated by GCC 2.95.4 when Bison is
3653 configured with --enable-gcc-warnings.
3654 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
3655 yy::]b4_parser_class_name[::translate_,
3656 yy::Stack::operator[] (unsigned),
3657 yy::Stack::operator[] (unsigned) const,
3658 yy::Slice::operator[] (unsigned),
3659 yy::Slice::operator[] (unsigned) const):
3660 Rename local vars to avoid warnings.
3661 * tests/glr-regression.at (Improper handling of embedded actions
3662 and $-N in GLR parsers): Remove unused local variable from yylex.
3663 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
3664 (void) as arg when not pure, since we now assume C89 when building
3665 Bison. Pacify GCC by using parameter.
3666
ac695f7d
PE
36672003-06-02 Paul Eggert <eggert@twinsun.com>
3668
3669 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
3670 yy::Location::lines, yy::Location::columns): Rename arguments
3671 to avoid shadowing; this removes a warning generated by GCC 3.3.
3672
26ec81e0
PE
36732003-06-01 Paul Eggert <eggert@twinsun.com>
3674
3675 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
3676 to g++, as GCC 3.3 complains if you do it.
3677 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
3678 everything that WARNING_CFLAGS has, except omit warnings
3679 not suitable for C++.
3680 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
3681 * tests/atlocal.in (CXXFLAGS): New var.
3682 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
3683
3684 Fix a GLR parser bug I reported in February; see
161a71f3 3685 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
3686 The problem was that GLR parsers did not conform to the C standard,
3687 because actions like { $1 = $2 + $3; } expanded to expressions
3688 that invoked YYFILL in separate subexpressions, and YYFILL assigned
3689 to a local variable. The C standard says that expressions
3690 like (var = f ()) + (var = f ()) have undefined behavior.
3691 Another problem was that GCC sometimes issues warnings that
3692 yyfill and its parameters are unused.
3693
3694 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
3695 as possibly unused.
3696 (yyfill): New function.
3697 (YYFILL): Use it.
3698 (yyuserAction): Change type of yynormal to bool, so that it matches
3699 the new yyfill signature. Mark it as possibly unused.
3700
3701
3702 Follow up on a bug I reported in February, where a Bison-generated
3703 parser can loop. Provide a test case and a fix for yacc.c. I
3704 don't have a fix for lalr1.cc or for glr.c, unfortunately.
3705 The original bug report is in:
161a71f3 3706 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
3707
3708 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
3709 macro's size was becoming unwieldy.
3710 (yyerrlab): Do not discard an empty lookahead symbol, as this
3711 might destroy garbage.
3712 (yyerrorlab): New label, with the old contents of YYERROR,
3713 plus the following change: pop the stack of rhs corresponding
3714 to the production that invoked YYERROR. That is how Yacc
3715 behaves, and POSIX requires this behavior.
3716 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
3717 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
3718 Define 'alarm' to do nothing if unistd.h is not available.
3719 Add a new rule "exp: '-' error;" to test the above change to
3720 data/yacc.c. Use 'alarm' to abort any test taking longer than
3721 10 seconds, as it's probably looping.
3722 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
3723 Also, the new yacc.c generates two fewer diagnostics for an
3724 existing test.
3725
d0829076
PE
37262003-05-24 Paul Eggert <eggert@twinsun.com>
3727
c6ae27df
PE
3728 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
3729 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
3730 This fixes a problem reported by John Bowman when the Compaq/HP
3731 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
3732 -ansi -Wall -gall).
3733 * data/yacc.c (union yyalloc): Likewise.
3734 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 3735
d0829076
PE
3736 Switch from 'int' to 'bool' where that makes sense.
3737
3738 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
3739 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
3740 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
3741 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
3742 Return or accept bool, not int. All callers changed.
3743 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
3744 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
3745 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
3746 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
3747 bitset_or_and_cmp_): Likewise.
3748 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
3749 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
3750 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
3751 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
3752 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
3753 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
3754 bitset_stats_or_and_cmp): Likewise.
3755 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
3756 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
3757 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
3758 ebitset_xor_cmp): Likewise.
3759 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
3760 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
3761 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
3762 lbitset_xor_cmp): Likewise.
3763 * lib/bbitset.h: Include <stdbool.h>.
3764 (struct bitset_vtable): The following members now return bool, not
3765 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
3766 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
3767 or_and_cmp).
3768 * src/conflicts.c (count_rr_conflicts): Likewise.
3769 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
3770 All uses changed.
3771 * lib/ebitset.c (ebitset_obstack_init): Likewise.
3772 * lib/lbitset.c (lbitset_obstack_init): Likewise.
3773 * src/getargs.c (debug_flag, defines_flag, locations_flag,
3774 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3775 graph_flag): Likewise.
3776 * src/getargs.h (debug_flag, defines_flag, locations_flag,
3777 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3778 graph_flag): Likewise.
3779 * src/output.c (error_verbose): Likewise.
3780 * src/output.h (error_verbose): Likewise.
3781 * src/reader.c (start_flag, typed): Likewise.
3782 * src/reader.h (typed): Likewise.
3783 * src/getargs.c (LOCATIONS_OPTION): New constant.
3784 (long_options, getargs): Use it.
3785 * src/lalr.c (build_relations): Use bool, not int.
3786 * src/nullable.c (nullable_compute): Likewise.
3787 * src/print.c (print_reductions): Likewise.
3788 * src/tables.c (action_row, pack_vector): Likewise.
3789 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
3790 * src/output.c (prepare): Use it.
3791 * src/output.c (token_definitions_output,
3792 symbol_destructors_output, symbol_destructors_output): Use string,
3793 not boolean integer, to keep track of whether to output separator.
3794 * src/print_graph.c (print_core): Likewise.
3795 * src/state.c (state_rule_lookaheads_print): Likewise.
3796
3797 * config/install-sh: Sync from automake 1.7.5.
3798
6b2584b7
PE
37992003-05-14 Paul Eggert <eggert@twinsun.com>
3800
3801 * src/parse-gram.y (rules_or_grammar_declaration): Require a
3802 semicolon after a grammar declaration, in the interest of possible
3803 future changes to the Bison input language.
3804 Do not allow a stray semicolon at the start of the grammar.
3805 (rhses.1): Allow one or more semicolons after any rule, including
3806 just before "|" as required by POSIX.
3807 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
3808 grammar.
3809
caf37a36
ADL
38102003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
3811
3812 %parse-param support for lalr1.cc.
3813
3814 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
3815 b4_cc_constructor_calls, b4_cc_constructor_call,
3816 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
3817 definitions.
3818 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
3819 parse-param arguments.
3820 (yy::b4_parser_class_name): Declare instance variables to
3821 hold parse-param arguments.
3822 * tests/calc.at: s/value/semantic_value/ because value clashes
3823 with a member of yy::b4_parser_class_name. Adjust C++ code
3824 to handle %parse-param. Enable %parse-param test in C++.
3825
3ab37077
PE
38262003-05-12 Paul Eggert <eggert@twinsun.com>
3827
3828 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
3829 English a bit. Fix fclose typo. Change "const char" to "char
3830 const", and use ANSI C rather than K&R for "main". Suggest
3831 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
3832 and suggest yy_switch_to_buffer.
3833
38342003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
3835
3836 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
3837 C89. This avoids a diagnostic on compilers that define __STDC__
3838 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 3839 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 3840
e743727f
PE
38412003-05-03 Paul Eggert <eggert@twinsun.com>
3842
3843 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
3844 Do not overrun array bounds.
3845 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 3846 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 3847
916708d5
AD
38482003-04-29 Akim Demaille <akim@epita.fr>
3849
3850 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
3851 * src/getargs.c, src/getargs.h: here, as bool, not int.
3852 (nondeterministic_parser): New.
3853 * src/parse-gram.y, src/scan-gram.l: Support
3854 %nondeterministic-parser.
3855 * src/output.c (prepare): Use nondeterministic_parser instead
3856 of glr_parser where appropriate.
3857 * src/tables.c (conflict_row, action_row, save_row)
3858 (token_actions, token_actions, pack_vector): Ditto.
3859
a06ea4aa
AD
38602003-04-29 Akim Demaille <akim@epita.fr>
3861
3862 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
3863
211074ca
AD
38642003-04-29 Akim Demaille <akim@epita.fr>
3865
3866 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
3867 with %pure-parser and %locations to exercise the patch from Yakov
3868 Markovitch below.
3869
6175ffe3
PE
38702003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
3871
3872 * data/yacc.c: (b4_lex_param): Corrected for the case where
3873 %lex-param is provided and %pure-parser isn't.
3874
b1e95857
PE
38752003-04-27 Paul Eggert <eggert@twinsun.com>
3876
3877 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 3878 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
3879 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
3880 if it is not defined.
3881 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
3882
acda9df6
PE
38832003-04-26 Paul Eggert <eggert@twinsun.com>
3884
3470c57b
PE
3885 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
3886 Declare to be of type suitable for the ninf value itself, not of
3887 type suitable for the corresponding table, since the latter might
3888 be unsigned but the ninf value might be negative. This fixes a
3889 bug reported by Alexandre Duret-Lutz in
161a71f3 3890 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 3891
acda9df6
PE
3892 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
3893 invokes it. We shouldn't invoke it twice because it will attempt
3894 to put error.o in the archive twice. This fixes a glitch reported
3895 by Martin Mokrejs in
161a71f3 3896 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 3897
b5250f26
PE
38982003-04-21 Paul Eggert <eggert@twinsun.com>
3899
3900 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
3901 to gnulib.
3902
089ac0f1
PE
39032003-04-21 Yakov Markovitch <Markovitch@iso.ru>
3904
3905 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
3906 Fix obvious typo that results in uncompilable GLR parsers
3907 when both %pure-parser and %locations are used. (trivial change)
3908
5ededac6
PE
39092003-04-17 Paul Eggert <eggert@twinsun.com>
3910
1b8f2fff
PE
3911 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
3912 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
3913 Do not insert the expected token via unput, as this runs afoul
3914 of a POSIX-compatibility bug in flex 2.5.31.
3915 All uses changed to BEGIN the parent state,
3916 since we no longer insert the expected token via unput.
3917 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
3918 that is no longer emitted after the above change.
3919
5ededac6
PE
3920 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
3921 the first one. This change is from Paul Hilfinger, and it fixes
3922 regression reported by Werner Lemberg in
161a71f3 3923 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
3924
3925 (resolve_sr_conflict): Don't invoke state_errs_set
3926 unless one or more tokens have been explicitly made errors.
3927 Otherwise, the above change causes Bison to abort.
3928
3929 * tests/existing.at (GNU pic Grammar): New test case, taken from
3930 Lemberg's email.
3931
b8be9132
AD
39322003-03-31 Akim Demaille <akim@epita.fr>
3933
3934 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
3935
d423d460
AD
39362003-03-31 Akim Demaille <akim@epita.fr>
3937
3938 * src/output.c (prepare_symbols): Avoid trailing spaces in the
3939 output.
3940
c7e441b4
AD
39412003-03-31 Akim Demaille <akim@epita.fr>
3942
3943 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
3944 From Paul Hilfinger.
3945
231897ad
AD
39462003-03-29 Akim Demaille <akim@epita.fr>
3947
3948 * m4/error.m4: Do not put under dynamic conditions some code which
3949 expansion is under static control.
3950
5b066063
AD
39512003-03-29 Akim Demaille <akim@epita.fr>
3952
3953 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
3954
22a74fec
AD
39552003-03-29 Akim Demaille <akim@epita.fr>
3956
3957 * doc/bison.texinfo (Strings are Destroyed): New.
3958
0eee27e7
PE
39592003-03-13 Paul Eggert <eggert@twinsun.com>
3960
3961 * .cvsignore: Add configure.lineno.
3962 * src/.cvsignore: Add yacc.
3963 * tests/.cvsignore: Add testsuite.log.
3964 * doc/fdl.texi: Sync with latest FSF version.
3965
f61aad93
PE
39662003-03-12 Paul Eggert <eggert@twinsun.com>
3967
537636c7
PE
3968 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3969 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3970 cursor, instead of leaving it undefined. This fixes a bug
3971 reported by Tim Van Holder in
161a71f3 3972 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
3973 * tests/input.at (Torturing the Scanner): Test the scanner on
3974 an empty input file, which was Tim Van Holder's test case.
3975
3976 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3977 <sys/resource.h> can be included, include sys/time.h and
3978 sys/times.h first, if available. This works around the SunOS
3979 4.1.4 porting bug reported by Bruce Becker in
161a71f3 3980 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
3981
3982 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3983 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3984 AC_HEADER_SYS_WAIT.
3985
f61aad93
PE
3986 Merge changes from gnulib. This was prompted because the CVS
3987 snapshot didn't build on Solaris 7 due to strnlen problems.
3988
3989 These changes need to be merged back into gnulib:
3990 * lib/hash.c: Include <stdbool.h> unconditionally.
3991 * m4/onceonly.m4 (m4_quote): New macro.
3992 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3993 Quote AC_FOREACH variable-expansions properly.
3994 The 2003-01-03 obstack.h change also needs merging.
3995 {end of changes requiring merging}
5b066063 3996
f61aad93
PE
3997 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3998 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3999 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
4000 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
4001 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
4002 New files, imported from gnulib.
4003 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
4004 above.
4005
4006 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
4007 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
4008 gnulib sources.
4009
4010 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
4011 Add.
4012 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
4013 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
4014 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
4015 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
4016 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
4017 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
4018 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
4019 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
4020 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
4021 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
4022 (jm_PREREQ_ARGMATCH): Remove.
4023 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
4024 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
4025
4026 * src/system.h: Include <stdbool.h> unconditionally.
4027
4028 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
4029 assuming at least C89 in the bitset code for some time now.
4030
d2ffe116
AD
40312003-03-03 Akim Demaille <akim@epita.fr>
4032
4033 * ro.po: New.
4034
052826fd
AD
40352003-03-02 Akim Demaille <akim@epita.fr>
4036
4037 * doc/bison.texinfo (Table of Symbols): Reactivate the
4038 documentation for %lex-param, and %parse-param.
4039
c4749565
AD
40402003-03-02 Akim Demaille <akim@epita.fr>
4041
4042 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
4043 generate verbose error messages.
4044 Use the number of tokens as an upper bound in yytname, as it
4045 cannot be a non terminal.
4046
d5286af1
AD
40472003-03-02 Akim Demaille <akim@epita.fr>
4048
4049 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
4050 message.
4051
22e304a6
AD
40522003-03-02 Akim Demaille <akim@epita.fr>
4053
22e304a6
AD
4054 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
4055 Use them to exercise yycheck overrun.
4056 Based on Andrew Suffield's grammar.
4057
67a25fed
AD
40582003-03-02 Akim Demaille <akim@epita.fr>
4059
4060 Create tests/local.at for Bison generic testing macros.
4061
4062 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
4063 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
4064 This new file.
4065 * tests/calc.at (AT_CHECK_CALC): Adjust.
4066 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
4067 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
4068 * tests/local.at: here.
4069 (AT_COMPILE_CXX): Tags the tests using it as c++.
4070 Ignore the test if CXX is not functional.
4071
9c2b381f
PE
40722003-03-01 Paul Eggert <eggert@twinsun.com>
4073
4074 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
4075 not loc->end, since loc->end might contain garbage and this leads
4076 to undefined behavior on some platforms.
4077 (id_loc, token_start): Use (IF_LINTed) initial values that do not
4078 depend on *loc, so that the reader doesn't give the the false
4079 impression that *loc is initialized.
4080 (<INITIAL>"%%"): Do not bother setting code_start, since its value
4081 does not survive the return.
4082
0433ba88
AD
40832003-03-01 Akim Demaille <akim@epita.fr>
4084
4085 * src/scan-gram.l (code_start): Always initialize it when entering
4086 into yylex, as SC_EPILOGUE is activated *before* the corresponding
4087 yylex invocation. An alternative would be making it static, but
4088 then it starts with the second %%'s beginning, instead of its end.
4089
b305ea69
PE
40902003-02-28 Paul Eggert <eggert@twinsun.com>
4091
4092 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
4093 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 4094 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 4095
c3d25e01
PE
40962003-02-26 Paul Eggert <eggert@twinsun.com>
4097
4098 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
4099 Remove Sequent/Pyramid discussion (nobody uses them any more).
4100 Merge VMS and MS-DOS discussion; these ports may well be dead
4101 but let's keep mentioning them for now. Put <> around email
4102 addresses. Add copyright notice.
4103
c267ffbc
PE
41042003-02-24 Paul Eggert <eggert@twinsun.com>
4105
4106 * data/glr.c (yy_reduce_print): yylineno -> yylno,
4107 to avoid collision with flex use of yylineno.
4108 Problem reported by Bruce Lilly in
161a71f3 4109 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
4110 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4111 * data/yacc.c (yy_reduce_print): Likewise.
4112
4113 * config/depcomp: Sync with Automake 1.7.3.
4114
f939fc12
AD
41152003-02-21 Akim Demaille <akim@epita.fr>
4116
4117 * data/lalr1.cc: Use temporary variables instead of casts to
4118 change integer types.
4119 Suggested by Paul Eggert.
4120
95923bd6
AD
41212003-02-21 Akim Demaille <akim@epita.fr>
4122
4123 * doc/bison.texinfo: Use "location" consistently to refer to @n,
4124 to avoid confusions with lalr1.cc's notion of Position.
4125 Suggested by Paul Eggert.
4126
2cdc240e
AD
41272003-02-20 Akim Demaille <akim@epita.fr>
4128
4129 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
4130 before initial_columns.
4131 (location.hh): Use consistent variable names when defining the
4132 operator<<.
4133 Use "last" so that we subtract from Positions, not from unsigned.
4134
5d003116
AD
41352003-02-20 Akim Demaille <akim@epita.fr>
4136
4137 * data/lalr1.cc (position.hh): New subfile, including the extended
4138 and Doxygen'ed documentation of class Position.
4139 (location.hh): Use it.
4140 Document a` la Doxygen.
ba1ecc07 4141 With the help of Benoit Perrot.
5d003116 4142
d02b25f9
AD
41432003-02-20 Akim Demaille <akim@epita.fr>
4144
4145 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
4146 AT_YACC_IF.
4147 Redefine AT_YYERROR_SEES_LOC_IF using it.
4148 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
4149 not defined.
4150 Don't use the location in yy::Parser::error_ and
4151 yy::Parser::print_ when not %locations.
4152 Activate more lalr1.cc tests.
4153
0d1c3a04
AD
41542003-02-19 Akim Demaille <akim@epita.fr>
4155
4156 * data/lalr1.cc: When displaying a line number, be sure to make it
4157 an int.
4158
60a777aa
AD
41592003-02-19 Akim Demaille <akim@epita.fr>
4160
4161 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
4162 Remove, useless.
4163 (YYABORT, YYACCEPT, YYERROR): New.
4164 * tests/calc.at: Renable the lalr1.cc test.
4165
0b86fc41
AD
41662003-02-19 Akim Demaille <akim@epita.fr>
4167
4168 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
4169 error recovery, mixing with/without pops and discarding of the
4170 lookahead.
4171 Exercise YYERROR.
4172 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
4173
da99a5dc
PE
41742003-02-17 Paul Eggert <eggert@twinsun.com>
4175
4176 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
4177 * tests/testsuite.at (AT_COMPILE): Use them.
4178 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 4179 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 4180
93b8c255
PE
41812003-02-12 Paul Eggert <eggert@twinsun.com>
4182
4183 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
4184 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 4185 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
4186 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
4187 Check for malloc failure, for consistency with yacc.c.
4188 (yytname_size): Remove, for consistency with yacc.c.
4189
4190 The bug still remains in data/lalr1.cc, as I didn't have time
4191 to fix it there.
4192
7548fed2
AD
41932003-02-06 Akim Demaille <akim@epita.fr>
4194
4195 * configure.ac (GXX): Rename as...
4196 (CXX): this, to keep the original Autoconf semantics.
4197 Require 2.57.
4198 * data/lalr1.cc: Fix b4_copyright invocations.
4199 If YYDEBUG is not defined, don't depend upon name_ being defined.
4200 (location.hh): Include string and iostream.
4201 (Position::filename): New member.
4202 (Position::Position ()): New.
4203 (operator<< (Position)): New.
4204 (operator- (Position, int)): New.
4205 (Location::first, Location::last): Rename as...
4206 (Location::begin, Location::end): these, to mock the conventional
4207 iterator names.
4208 (operator<< (Location)): New.
4209 * tests/atlocal.in (CXX): New.
4210 * tests/testsuite.at (AT_COMPILE_CXX): New.
4211 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
4212 locations in a more synthetic way.
4213 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
4214 lalr1.cc is used.
4215 Adjust the C locations to match those from Emacs: first column is
4216 column 0.
4217 Change all the expected results.
4218 Conform to the GCS: simplify the locations when applicable.
4219 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
4220 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
4221 these CPP macros with the m4 macros new defined by...
4222 (AT_CHECK_PUSHDEFS): this, i.e.:
4223 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 4224 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
4225 New macros.
4226 (AT_CHECK_POPDEFS): Undefine them.
4227 (AT_CHECK_CALC_LALR1_CC): New.
4228 Use it for the first lalr1.cc test.
4229
43a176ef
AD
42302003-02-04 Akim Demaille <akim@epita.fr>
4231
4232 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
4233 Location as is defined.
4234
fc049e9c
AD
42352003-02-04 Akim Demaille <akim@epita.fr>
4236
4237 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
4238 name_ being defined.
4239
a737b216
PE
42402003-02-03 Paul Eggert <eggert@twinsun.com>
4241
4242 * src/gram.h (start_symbol): Remove unused decl.
4243
4244 Use more-consistent naming conventions for local vars.
4245
4246 * src/derives.c (derives_compute): Change type of local var from
4247 int to rule_number.
4248 * src/gram.c (grammar_rules_partial_print): Likewise.
4249 * src/print.c (print_core): Likewise.
4250 * src/reduce.c (reduce_grammar_tables): Likewise.
4251
4252 * src/gram.c (grammar_dump): Change name of item_number *
4253 local var from r to rp.
4254 * src/nullable.c (nullable_compute): Likewise.
4255
4256 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
4257
4258 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
4259 for symbol or symbol_number var.
4260 * src/reader.c (grammar_start_symbol_set): Likewise.
4261 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
4262 Likewise.
4263 * src/state.c (transitions_to): Likewise.
4264 * src/state.h: Likewise.
4265 * src/tables.c (symbol_number_to_vector_number): Likewise.
4266
4267 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
4268 char * var.
4269
4270 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
4271 var.
4272
4273 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
4274 var.
4275
4276 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
4277 Use str, not s, for char * var. Use ch, not c, for character var.
4278 Use size for size var.
4279
4280 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
4281 char * var.
4282 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
4283 uniqstr var.
4284 * src/uniqstr.h: Likewise.
4285
4286 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4287 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4288 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
4289 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
4290 param to have same name as that of enum, so that we don't use
4291 "s" to stand for a non-state.
4292
68e93ad5
AD
42932003-02-02 Akim Demaille <akim@epita.fr>
4294
4295 * src/scan-skel.l: Scan more than one inert character per yylex
4296 invocation.
4297
92898986
PE
42982003-02-01 Paul Eggert <eggert@twinsun.com>
4299
4300 Version 1.875a.
4301
1d9d5d71
PE
4302 * po/LINGUAS: Add ms.
4303
0435d061
AD
43042003-01-30 Akim Demaille <akim@epita.fr>
4305
4306 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
4307
6029a57f
PH
43082003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4309
4310 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
4311 of $1.
0435d061
AD
4312
4313 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 4314 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 4315 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 4316
6029a57f
PH
4317 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
4318 (b4_rhs_location): Ditto.
0435d061 4319 (yyfill): New function to copy from stack tree into array
6029a57f 4320 incrementally.
0435d061
AD
4321 (yyuserAction): Modify to allow incremental move of semantic values
4322 to rhs array when in GLR mode.
4323 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
4324 as needed.
4325 Remove dummy use of yystack, as there is now a guaranteed use.
4326 (yydoAction): Modify to allow incremental move of semantic values
4327 to rhs array when in GLR mode.
4328 (yyresolveAction): Ditto.
4329 (yyglrShiftDefer): Update comment.
0435d061 4330 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
4331 (yyglrReduce): Ditto.
4332 (yydoAction): Ditto
0435d061 4333
6029a57f
PH
4334 * tests/glr-regr1.at: Rename to ...
4335 * tests/glr-regression.at: Add new regression test for the problems
4336 described above (adapted from S. Eken).
4337 Update copyright notice.
4338 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
4339 * tests/Makefile.am: Ditto.
4340
6cee6297
PE
43412003-01-28 Paul Eggert <eggert@twinsun.com>
4342
4343 * data/lalr1.cc: Do not use @output_header_name@ unless
4344 b4_defines_flag is set. This fixes two bugs reported by
4345 Tim Van Holder in
161a71f3
PE
4346 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
4347 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 4348
b2a836b5
PE
43492003-01-21 Paul Eggert <eggert@twinsun.com>
4350
4351 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
4352 we don't need to worry about yyerrlab1 being reported as an
4353 "unused label" by non-GCC C compilers. The downside is that if
4354 locations are used then a couple of statements are duplicated each
4355 time YYERROR is invoked, but the upside is that the warnings
4356 should vanish.
4357 (yyerrlab1): Move code to YERROR.
4358 (yyerrlab2): Remove. Change uses back to yyerrlab1.
4359 This reverts some of the 2002-12-27 change.
4360
4196b931
PE
43612003-01-17 Paul Eggert <eggert@twinsun.com>
4362
4363 * src/output.c (symbol_printers_output): Fix typo that led
4364 to core dump. Problem reported by Antonio Rus in
161a71f3 4365 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 4366
3ae831b4
AD
43672003-01-13 Akim Demaille <akim@epita.fr>,
4368 Quoc Peyrot <chojin@lrde.epita.fr>,
4369 Robert Anisko <anisko_r@lrde.epita.fr>
4370
4371 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
4372 when the stacks contain one element, as the loop would otherwise
4373 free the last state, and then use the top state (the one we just
4374 popped). This means that the initial elements will not be freed
4375 explicitly, as is the case in yacc.c; it is not a problem, as
4376 these elements have fake values.
4377
e3aa65c5
PE
43782003-01-11 Paul Eggert <eggert@twinsun.com>
4379
4380 * NEWS: %expect-violations are now just warnings, reverting
4381 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
4382 bootstrapping problem reported by Matthias Klose; see
161a71f3 4383 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
4384 * src/conflicts.c (conflicts_print): Likewise.
4385 * tests/conflicts.at (%expect not enough, %expect too much,
4386 %expect with reduce conflicts): Likewise.
4387 * doc/bison.texinfo (Expect Decl): Document this. Also mention
4388 that the warning is enabled if the number of conflicts changes
4389 (not necessarily increases).
4390
4391 * src/getargs.c (version): Update copyright year.
4392
f0057011
AD
43932003-01-09 Akim Demaille <akim@epita.fr>
4394
4395 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
4396
1ee6d2a0
PE
43972003-01-08 Paul Eggert <eggert@twinsun.com>
4398
4399 * Makefile.maint (WGETFLAGS):
4400 New macro, containing "-C off" to disable proxy caches.
4401 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
4402 (rel-check): Use $(WGET) instead of wget.
4403
d4fd77c4
PE
44042003-01-06 Paul Eggert <eggert@twinsun.com>
4405
4406 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
4407 the GLR paper of Scott, Johnstone and Hussain.
4408
464c6927
PE
44092003-01-04 Paul Eggert <eggert@twinsun.com>
4410
d600ee67
PE
4411 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
4412 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
4413 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
4414 (EXTRA_LIBRARIES): New var, for liby.a.
4415 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
4416 (EXTRA_SCRIPTS): New var, for yacc.
4417
464c6927
PE
4418 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
4419 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
4420 Problem reported by Nelson H. F. Beebe.
4421
44222003-01-03 Paul Eggert <eggert@twinsun.com>
4423
4424 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
4425 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
4426 when compiling Bison 1.875's `bitset bset = obstack_alloc
4427 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
4428
4429 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
4430 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
4431 grow to a huge size with typical invocation.
d600ee67 4432
464c6927
PE
4433 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
4434 Use the pattern recommended by Autoconf 2.57, except also protect
4435 against double-definition.
4436 * src/system.h: Likewise.
4437 Portability issues reported by Nelson H. F. Beebe.
d600ee67 4438
464c6927
PE
4439 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
4440 All uses changed. Provide a definition in both C and C++.
4441 (yytrue, yyfalse): Define even if defined (__cplusplus).
4442
4443 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
4444 Reported by Nelson H. F. Beebe.
d600ee67 4445
464c6927
PE
4446 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
4447
0f42c7d5
PE
44482003-01-02 Paul Eggert <eggert@twinsun.com>
4449
4450 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
4451 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
4452 Bug reported by Nelson H. F. Beebe.
4453
dc546b0f
PE
44542003-01-01 Paul Eggert <eggert@twinsun.com>
4455
4456 * Version 1.875.
4457
2c09b6a7
PE
44582002-12-30 Paul Eggert <eggert@twinsun.com>
4459
4460 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
4461 Moved here from...
4462 (<INITIAL>","): Here. This causes stray "," to be treated
4463 more uniformly.
4464
dc546b0f 4465 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
4466 last brace in braced code when not in Yacc mode, for compatibility
4467 with Bison 1.35. This resurrects the 2001-12-15 patch to
4468 src/reader.c.
4469
4470 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
4471 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
4472
535c0f63
PE
44732002-12-28 Paul Eggert <eggert@twinsun.com>
4474
4475 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
4476 that of SYM's type. This fixes Debian bug 168069, reported by
4477 Thomas Olsson.
d600ee67 4478
963fcc17
PE
44792002-12-28 Paul Eggert <eggert@twinsun.com>
4480
4481 Version 1.75f.
4482
4483 Switch back to the Yacc style of conflict reports, undoing some
4484 of the 2002-07-30 change.
4485 * doc/bison.texinfo (Understanding): Use Yacc style for
4486 conflict reports. Also, use new way of locating rules.
4487 * src/conflicts.c (conflict_report):
4488 Renamed from conflict_report_yacc, removing the old
4489 'conflict_report'. Translate the entire conflict report at once,
4490 so that we don't assume that "," has the same interpretation in
4491 all languages.
4492 (conflicts_output): Use Yacc-style conflict report for each state,
4493 instead of our more-complicated style.
4494 (conflicts_print): Use Yacc-style conflict report, except print
4495 the input file name when not emulating Yacc.
4496 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
4497 Conflicted Reduction, %expect not enough, %expect too much,
4498 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
4499 * tests/existing.at (GNU Cim Grammar): Likewise.
4500 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
4501
4502 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
4503 fatal): Don't invoke fflush; it's not needed and it might even be
4504 harmful for stdout, as stdout might not be open.
4505 * src/reduce.c (reduce_print): Likewise.
4506
b1efe548
PE
45072002-12-27 Paul Eggert <eggert@twinsun.com>
4508
4509 Fix a bug where error locations were not being recorded correctly.
4510 This problem was originally reported by Paul Hilfinger in
161a71f3 4511 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
4512
4513 * data/yacc.c (yyparse): New local var yylerrsp, to record the
4514 top of the location stack's error locations.
4515 (yyerrlab): Set it. When discarding a token, push its location
4516 onto yylerrsp so that we don't lose track of the error's end.
4517 (yyerrlab1): Now is only the target of YYERROR, so that we can
4518 properly record the location of the action that failed. For GCC
4519 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
4520 GCC warning about yyerrlab1 being unused if YYERROR is unused.
4521 (yyerrlab2): New label, which yyerrlab now falls through to.
4522 Compute the error's location by applying YYLLOC_DEFAULT to
4523 the locations of all the symbols that went into the error.
4524 * doc/bison.texinfo (Location Default Action): Mention that
4525 YYLLOC_DEFAULT is also invoked for syntax errors.
4526 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4527 Error locations include the locations of all the tokens that were
4528 discarded, not just the last token.
d600ee67 4529
983c5c2c
PE
45302002-12-26 Paul Eggert <eggert@twinsun.com>
4531
b1efe548
PE
4532 * src/files.c: Include quote.h.
4533 (compute_output_file_names): Warn if we detect conflicting
4534 outputs to the same file. This should catch the misunderstanding
4535 exemplified by Debian Bug 165349, reported by Bruce Stephens..
4536
4537 * src/conflicts.c (conflicts_print): If the user specifies
4538 "%expect N", report an error if there are any reduce/reduce
4539 conflicts. This is what the manual says should happen.
4540 This fixes Debian bug 130890, reported by Anthony DeRobertis.
4541 * tests/conflicts.at (%expect with reduce conflicts): New test.
4542
983c5c2c
PE
4543 Don't use m4_include on relative file names, as it doesn't work as
4544 desired if there happens to be a file with that name under ".".
d600ee67 4545
983c5c2c
PE
4546 * m4sugar/version.m4: Remove; it was included but it wasn't used.
4547 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
4548 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
4549 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
4550 * src/output.c (output_skeleton): Use full path names when
4551 specifying a file to include; don't rely on include path, as
4552 it's unreliable when the working file contains a file with
4553 that name.
d600ee67 4554
983c5c2c
PE
45552002-12-25 Paul Eggert <eggert@twinsun.com>
4556
4557 Remove obsolete references to bison.simple and bison.hairy.
4558 Problem mentioned by Aubin Mahe in
161a71f3 4559 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
4560 * data/glr.c: Comment fix.
4561 * doc/bison.1: Remove references. Also, mention "yacc".
4562
4563 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
4564 with -g option.
4565
4566 * src/parse-gram.y (declaration): Use enum "report_states" rather
4567 than its numeric value 1.
4568
4569 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
4570 opening a new one. This fixes Debian bug 165349, reported by
4571 Bruce Stephens.
4572
23f2d9dc
PE
45732002-12-24 Paul Eggert <eggert@twinsun.com>
4574
4575 Version 1.75e.
4576
4577 * Makefile.maint (cvs-update): Don't assume that the shell
4578 supports $(...), as Solaris sh doesn't.
4579
4580 * src/parse-gram.y (lloc_default): Remove test for empty
4581 nonterminals at the end, since it didn't change the result.
4582
45832002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
4584
4585 If the user does not define YYSTYPE as a macro, Bison now declares it
4586 using typedef instead of defining it as a macro. POSIX requires this.
4587 For consistency, YYLTYPE is also declared instead of defined.
4588
4589 %union directives can now have a tag before the `{', e.g., the
4590 directive `%union foo {...}' now generates the C code
4591 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
4592 The default union tag is `YYSTYPE', for compatibility with Solaris 9
4593 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
4594 instead of `yyltype'.
4595
4596 `yystype' and `yyltype' are now obsolescent macros instead of being
4597 typedefs or tags; they are no longer documented and will be
4598 withdrawn in a future release.
4599
4600 * data/glr.c (b4_location_type): Remove.
4601 (YYSTYPE): Renamed from yystype.
4602 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
4603 (struct YYLTYPE): Renamed from struct yyltype.
4604 (YYLTYPE): Renamed from yyltype.
4605 (yyltype, yystype): New (and obsolescent) macros,
4606 for backward compatibility.
4607 * data/yacc.c: Likewise.
4608
4609 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
4610 does not specify a union tag. This is for compatibility with
4611 Solaris 9 yacc.
4612
4613 * src/parse-gram.y (add_param): 2nd arg is now char * not char
4614 const *, since it is now modified by stripping surrounding { }.
4615 (current_braced_code): Remove.
4616 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
4617 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
4618 trailing " {...}". Now of type <chars>.
4619 (grammar_declaration): Adjust to bundled tokens.
4620 (code_content): Remove; stripping is now done by add_param.
4621 (print_token_value): Print contents of bundled tokens.
4622 (token_name): New function.
4623
4624 * src/reader.h (braced_code, current_braced_code): Remove.
4625 (token_name): New decl.
4626
4627 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
4628 token_type, not braced_code code_kind. All uses changed.
4629 (SC_PRE_CODE): New state, for scanning after a keyword that
4630 has (or usually has) an immediately-following braced code.
4631 (token_type): New local var, to keep track of which token type
4632 to return when scanning braced code.
4633 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 4634 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
4635 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
4636 instead of returning a token type immediately.
4637 (<INITIAL>"{"): Set token type.
4638 (<SC_BRACED_CODE>"}"): Use it.
4639 (handle_action_dollar, handle_action_at): Now returns bool
4640 indicating success. Fail if ! current_rule; this prevents a core dump.
4641 (handle_symbol_code_dollar, handle_symbol_code_at):
4642 Remove; merge body into caller.
4643 (handle_dollar, handle_at): Complain in invalid contexts.
4644
4645 * NEWS, doc/bison.texinfo: Document the above.
4646 * NEWS: Fix years and program names in copyright notice.
4647
879ca4f8
PE
46482002-12-17 Paul Eggert <eggert@twinsun.com>
4649
4650 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
4651 Reporting, Table of Symbols): Omit mentions of %lex-param and
4652 %parse-param from the documentation for now.
4653
1c5fe69d
PE
46542002-12-15 Paul Eggert <eggert@twinsun.com>
4655
4656 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
4657 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
4658 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
4659 disagreed with the Bison documentation. Bug
4660 reported by Andrew Walrond.
d600ee67 4661
1c5fe69d
PE
4662 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
4663 as the caller now does that.
4664 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
4665 (YYEMPTY): Parenthesize right hand side, since others use it.
4666 (yyparse): Don't assume that our generated code is the only code
4667 that sets yychar.
4668
d1de5372
PE
46692002-12-13 Paul Eggert <eggert@twinsun.com>
4670
4671 Version 1.75d.
4672
4673 POSIX requires a "yacc" command.
4674 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
4675 (MOSTLYCLEANFILES): Add yacc.
4676 (yacc): New rule.
1c5fe69d 4677 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
4678 as an alias for bison y.
4679
4680 * po/LINGUAS: Add da.
d600ee67 4681
d1de5372
PE
4682 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
4683 problem with latest <getopt.h>.
4684 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
4685
4686 * doc/fdl.texi: Upgrade to 1.2.
4687 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
4688 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
4689 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
4690 gnulib.
4691 * config/install-sh: Sync with autotools.
4692
4693 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 4694 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
4695 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
4696 locations are requested.
4697 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
4698 locations are requested.
4699
d0f3fe23
PE
47002002-12-12 Paul Eggert <eggert@twinsun.com>
4701
4702 Remove unportable casts and storage allocation tricks.
4703 While we're at it, remove almost all casts, since they
4704 usually aren't needed and are a sign of trouble.
4705
4706 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
4707
4708 * src/derives.c (derives_compute): Do not subtract NTOKENS from
4709 the pointer DSET returned by malloc; this isn't portable.
4710 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
4711 Similarly for DERIVES.
4712 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
4713 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
4714 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
4715
4716 * src/derives.c (derives_compute): Do not bother invoking
4717 int_of_rule_number, since rule numbers are integers.
4718
4719 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
4720 rather than XMALLOC (char, N).
4721
4722 * src/files.c (filename_split): Rewrite to avoid cast.
4723
4724 * src/gram.h (symbol_number_as_item_number,
4725 item_number_as_symbol_number, rule_number_as_item_number,
4726 item_number_as_rule_number):
4727 Now inline functions rather than macros, to avoid casts.
4728 * src/state.h (state_number_as_int): Likewise.
4729 * src/tables.c (state_number_to_vector_number,
4730 symbol_number_to_vector_number): Likewise.
4731
4732 * src/gram.h (int_of_rule_number): Remove; no longer used.
4733
4734 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
4735 since the resulting storage is always stored into.
4736
4737 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
4738 where it's needed.
4739
4740 * src/muscle_tab.c (muscle_m4_output):
4741 Now inline. Return bool, not int.
4742 * src/state.c (state_compare): Likewise.
4743 * src/symtab.c (symbol_check_defined,
4744 symbol_check_alias_consistency, symbol_pack, symbol_translation,
4745 hash_compare_symbol, hash_symbol):
4746 Likewise.
4747 * src/uniqstr.c (uniqstr_print): Likewise.
4748 * src/muscle_tab.c (muscle_m4_output_processor):
4749 New function, to avoid casts.
4750 * src/state.c (state_comparator, stage_hasher): Likewise.
4751 * src/symtab.c (symbol_check_defined_processor,
4752 symbol_check_alias_consistency_processor, symbol_pack_processor,
4753 symbol_translation_processor, hash_symbol_comparator,
4754 hash_symbol_hasher): Likewise.
4755 * src/uniqstr.c (uniqstr_print_processor): Likewise.
4756 * src/muscle_tab.c (muscles_m4_output):
4757 Use new functions instead of casting old functions unportably.
4758 * src/state.c (state_hash_new): Likewise.
4759 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
4760 symbols_token_translations_init):
4761 Likewise.
4762 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
4763
4764 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
4765 var instead of casting to long, to avoid casts.
4766 (prepare_states): Use MALLOC rather than alloca, so that we don't
4767 have to worry about alloca.
4768 * src/state.c (state_hash_lookup): Likewise.
4769
4770 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
4771 local var instead of casting to unsigned char, to avoid casts.
4772
4773 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
4774 STATE_ALLOC): Remove.
4775 (transitions_new, errs_new, reductions_new, state_new): Use malloc
4776 rather than calloc, and use offsetof to avoid allocating slightly
4777 too much storage.
4778 (state_new): Initialize all members.
4779
4780 * src/state.c (state_hash): Use unsigned accumulator, not signed.
4781
4782 * src/symtab.c (symbol_free): Remove; unused.
4783 (symbol_get): Remove cast in lhs of assignment.
4784 (symbols_do): Now static. Accept generic arguments, not
4785 hashing-related ones.
4786
4787 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
4788 (symbol_processor): Remove.
4789 (symbols_do): Remove decl; now static.
4790
4791 * src/system.h (alloca): Remove; decl no longer needed.
4792 (<stddef.h>): Include, for offsetof.
4793 (<inttypes.>, <stdint.h>): Include if available.
4794 (uintptr_t): New type, if system lacks it.
4795 (CALLOC, MALLOC, REALLOC): New macros.
4796 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
4797 new macros.
4798
4799 * src/tables.c (table_size): Now int, to pacify GCC.
4800 (table_grow, table_ninf_remap): Use signed table size.
4801 (save_row): Don't bother initializing locals when not needed.
4802 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
4803 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
4804
4805 * src/vcg.h: Correct misspellings.
4806
4807 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
4808
4809
4810 * src/getargs.c (getargs): Don't assume EOF == -1.
4811
26b4a969
PE
48122002-12-09 Paul Eggert <eggert@twinsun.com>
4813
4814 Change identifier spellings to avoid collisions with names
4815 that are reserved by POSIX.
4816
4817 Don't use names ending in _t, since POSIX reserves them.
4818 For consistency, remove _e and _s endings -- they're weren't
4819 needed to remove ambiguity. All uses changed.
4820 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
4821 turn was just renamed from struniq_t.
4822 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
4823 which in turn was just renamed from struniq_processor_t.
4824 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
4825 in turn was renamed from hash_compare_struniq_t.
4826 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
4827 (state_list): Renamed from state_list_t.
4828 * src/assoc.h (assoc): Renamed from assoc_t.
4829 * src/conflicts.c (enum conflict_resolution): Renamed from
4830 enum conflict_resolution_e.
4831 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
4832 (rule_list): Renamed from rule_list_t.
4833 * src/getargs.h (enum trace): Renamed from enum trace_e.
4834 (enum report): Renamed from enum report_e.
4835 * src/gram.h (item_number): Renamed from item_number_t.
4836 (rule_number): Renamed from rule_number_t.
4837 (struct rule_s): Remove the "rule_s" part; not used.
4838 (rule): Renamed from rule_t.
4839 (rule_filter): Renamed from rule_filter_t.
4840 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
4841 (goto_list): Renamed from goto_list_t.
4842 * src/lalr.h (goto_number): Renamed from goto_number_t.
4843 * src/location.h (location): Renamed from location_t.
4844 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
4845 and moved here from:
4846 * src/muscle_tab.h (muscle_entry_t): here.
4847 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
4848 (rule_list): Renamed from rule_list_t.
4849 * src/print_graph.c (static_graph): Renamed from graph.
4850 * src/reader.h (braced_code): Renamed from braced_code_t.
4851 Remove brace_code_e tag.
4852 * src/relation.h (relation_node): Renamed from relation_node_t.
4853 (relation_nodes): Renamed from relation_nodes_t.
4854 (relation): Renamed from relation_t.
4855 * src/state.h (state_number): Renamed from state_number_t.
4856 (struct state): Renamed from struct state_s.
4857 (state): Renamed from state_t.
4858 (transitions): Renamed from transitions_t. Unused (and
4859 misspelled) transtion_s tag removed.
4860 (errs): Renamed from errs_t. Unused errs_s tag removed.
4861 (reductions): Renamed from reductions_t. Unused tag
4862 reductions_s removed.
4863 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
4864 (struct symbol_list): Renamed from struct symbol_list_s.
4865 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
4866 (struct symbol): Renamed from struct symbol_s.
4867 (symbol): Renamed from symbol_t.
4868 * src/tables.c (vector_number): Renamed from vector_number_t.
4869 (action_number): Renamed from action_t.
4870 * src/tables.h (base_number): Renamed from base_t.
4871 * src/vcg.h (enum color): Renamed from enum color_e.
4872 (enum textmode): Renamed from enum textmode_e.
4873 (enum shape): Renamed from enum shape_e.
4874 (struct colorentry): Renamed from struct colorentry_s.
4875 (struct classname): Renamed from struct classname_s.
4876 (struct infoname): Renamed from struct infoname_s.
4877 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
4878 (enum decision): Renamed from enum decision_e.
4879 (enum orientation): Renamed from enum orientation_e.
4880 (enum alignment): Renamed from enum alignment_e.
4881 (enum arrow_mode): Renamed from enum arrow_mode_e.
4882 (enum crossing_type): Renamed from enum crossing_type_e.
4883 (enum view): Renamed from enum view_e.
4884 (struct node): Renamed from struct node_s.
4885 (node): Renamed from node_t.
4886 (enum linestyle): Renamed from enum linestyle_e.
4887 (enum arrowstyle): Renamed from enum arrowstyle_e.
4888 (struct edge): Renamed from struct edge.
4889 (edge): Renamed from edge_t.
4890 (struct graph): Renamed from struct graph_s.
4891 (graph): Renamed from graph_t.
4892 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
4893 Rename value_t -> value.
4894 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
4895 value_t_as_yystype -> value_as_yystype.
4896
4897 Don't include <errno.h> in the mainstream code, since it
4898 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
4899 * lib/get-errno.c, lib/get-errno.h: New files.
4900 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
4901 get-errno.c.
4902 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
4903 * src/output.c (output_skeleton): Likewise.
4904 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
4905 instead of errno.
4906 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
4907 Likewise.
4908 (handle_action_dollar, handle_action_at): Likewise.
4909 * src/system.h: Do not include <errno.h>.
4910 (TAB_EXT): Renamed from EXT_TAB.
4911 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
4912
4913 Avoid str[a-z]*, since <string.h> reserves that name space.
4914 Change all instances of "struniq" in names to "uniqstr", and
4915 likewise for "STRUNIQ" and "UNIQSTR".
4916 * src/uniqstr.c: Renamed from src/struniq.c.
4917 * src/uniqstr.h: Renamed from src/struniq.h.
4918 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
4919 * src/files.c (strsuffix): Remove; unused.
4920 (concat2): Renamed from stringappend. Now static.
4921 * src/files.h (strsuffix, stringappend): Remove; unused.
4922 * src/parse-gram.y (<chars>): Renamed from <string>.
4923 (<uniqstr>): Renamed from <struniq>.
4924 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
4925 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
4926 (struct graph_s.expand): Renamed from struct graph_s.stretch.
4927 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
4928 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
4929 (N_EXPAND): Renamed from N_STRETCH.
4930
4931 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
4932 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
4933 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
4934 Remove; unused.
4935 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
4936 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
4937 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
4938 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
4939 (BASE_MAXIMUM): Renamed from BASE_MAX.
4940 (BASE_MINIMUM): Renamed from BASE_MIN.
4941 (ACTION_MAX): Remove; unused.
4942 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
4943 Unnecessary casts removed from above defines.
4944
4945
4946 Fix misspelling in names.
4947 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
4948 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
4949 G_NODE_ALIGNEMENT.
4950
4951
4952 * lib/timevar.c (timevar_report): Renamed from time_report,
4953 for consistency with other names.
4954 * lib/timevar.h (timevar_report): New decl.
4955 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
4956
4957
4958 Sort include-file uses.
4959
4960 Reorder all include files under src to be in the order "system.h".
4961 then the ../lib include files in angle brackets (alphabetized),
4962 then the . include files in double-quotes (alphabetized). Fix
4963 dependency breakages encountered in this process, as follows:
4964 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4965 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4966 * src/state.h: Include "symtab.h".
4967
996b1c7e
PE
49682002-12-08 Paul Eggert <eggert@twinsun.com>
4969
4970 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4971 since this causes problems when __file__ contains character
4972 sequences like "@" that are treated specially by src/scan-skel.l.
4973 Instead, just use the file's basename. This fixes the bug
4974 reported by Martin Mokrejs in
161a71f3 4975 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 4976
e19c4e5d
PE
49772002-12-06 Paul Eggert <eggert@twinsun.com>
4978
4979 Add support for rules that do not have trailing semicolons, as
4980 POSIX requires. Improve the quality of locations in Bison
4981 diagnostics.
26b4a969 4982
e19c4e5d
PE
4983 * src/location.c: Include <quotearg.h>.
4984 (empty_location): Now const.
4985 (location_print): New function. Follow the recommendation of the
4986 GNU Coding Standards for locations that span file boundaries.
4987 * src/location.h: Do not include <quotearg.h>; no longer needed.
4988 (boundary): New type.
4989 (location_t): Use it. This allows locations to span file boundaries.
4990 All member uses changed: file -> start.file or end.file (as needed),
4991 first_line -> start.line, first_column -> start.column,
4992 last_line -> end.line, last_column -> end.column.
4993 (equal_boundaries): New function.
4994 (LOCATION_RESET, LOCATION_STEP): Remove.
4995 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4996 (empty_location): Now const.
4997 (location_print): New decl.
4998 * src/parse-gram.y (lloc_default): New function, which handles
4999 empty locations more accurately.
5000 (YYLLOC_DEFAULT): Use it.
5001 (%token COLON): Remove.
5002 (%token ID_COLON): New token.
26b4a969 5003 (rules): Use it.
e19c4e5d
PE
5004 (declarations, rules): Remove trailing semicolon.
5005 (declaration, rules_or_grammar_declaration):
5006 Allow empty (";") declaration.
5007 (symbol_def): Remove empty actions; no longer needed.
5008 (rules_or_grammar_declaration): Remove trailing semicolon.
5009 (semi_colon.opt): Remove.
5010 * src/reader.h: Include location.h.
5011 (scanner_cursor): New decl.
5012 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
5013 rolling our own.
5014 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
5015 of *loc.
5016 (STEP): Remove. No longer needed, now that adjust_location does
5017 the work. All uses removed.
5018 (scanner_cursor): New var.
5019 (adjust_location): Renamed from extend_location. It now sets
5020 *loc and adjusts the scanner cursor. All uses changed.
5021 Don't bother testing for CR.
5022 (handle_syncline): Remove location arg; now updates scanner cursor.
5023 All callers changed.
5024 (unexpected_end_of_file): Now accepts start boundary of token or
5025 comment, not location. All callers changed. Update scanner cursor,
5026 not the location.
5027 (SC_AFTER_IDENTIFIER): New state.
5028 (context_state): Renamed from c_context. All uses changed.
5029 (id_loc, code_start, token_start): New local vars.
5030 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
5031 processing of Yacc white space and equivalents here.
5032 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
5033 instead of returning ID immediately, since we need to search for
5034 a subsequent colon.
5035 (<INITIAL>"'", "\""): Save token_start.
5036 (<INITIAL>"%{", "{", "%%"): Save code_start.
5037 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
5038 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
5039 BEGIN context_state at end, not INITIAL.
5040 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
5041 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
5042 Return correct token start.
5043 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
5044 the start of a character, string or multiline comment is found.
5045 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
5046 Reduction): Adjust reported locations to match the more-precise
5047 results now expected.
5048 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
5049 * tests/reduce.at (Useless Rules, Reduced Automaton,
5050 Underivable Rules): Likewise.
5051 * tests/regression.at (Invalid inputs): No longer `expecting ";"
5052 or "|"' now that so many other tokens are allowed by the new grammar.
5053
5054 * src/complain.h (current_file): Remove duplicate decl;
5055 current_file is now owned by files.h.
5056 * src/complain.c, src/scan-gram.l: Include files.h.
5057
50582002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 5059
e19c4e5d
PE
5060 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
5061 promotes to int; it might be unsigned int.
5062 * data/yacc.c (yy_reduce_print): Likewise.
5063
5064 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
5065 be #defined in the prologue, not in the Bison declarations.
5066 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 5067
b64755e3
PE
50682002-12-02 Paul Eggert <eggert@twinsun.com>
5069
5070 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
5071 * lib/strtoul.c: New file, from gnulib.
5072 This fixes a porting bug reported by Peter Klein in
161a71f3 5073 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 5074
6e746484
PE
50752002-11-30 Paul Eggert <eggert@twinsun.com>
5076
b64755e3
PE
5077 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
5078 and put only a forward declaration in the prologue. This is for
5079 consistency with the other scanner helper functions.
5080
6ba55592
PE
5081 Type clashes now generate warnings, not errors, since it
5082 appears that POSIX may allow some grammars with type clashes.
5083 * src/reader.c (grammar_current_rule_check): Warn about
5084 type clashes instead of complaining.
5085 * tests/input.at (Type Clashes): Expect warnings, not complaints.
5086
6e746484
PE
5087 Add Yacc library, since POSIX requires it.
5088 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
5089 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
5090 * lib/main.c, lib/yyerror.c: New files.
5091
5092 gram_error can be static; it need not be extern.
5093 * src/reader.h (gram_error): Remove decl.
5094 * src/parse-gram.y (gram_error): Now static. Add static decl.
5095 (print_token_value): Omit parameter names from forward decl,
5096 for consistency.
5097
88510f9c
PE
50982002-11-29 Paul Eggert <eggert@twinsun.com>
5099
6e746484
PE
5100 * doc/bison.texinfo: Emphasize that yylex and yyerror must
5101 be declared before being used. E.g., one should typically
5102 declare them in the prologue. Use GNU coding style in examples.
5103 Put "const" consistently after the type it modifies. Mention
5104 that C99 supports "inline". Mention that yyerror traditionally
5105 returns "int".
5106
88510f9c
PE
5107 %parse-param and %lex-param now take just one argument, the
5108 declaration; the argument name is deduced from the declaration.
5109
5110 * doc/bison.texinfo (Parser Function, Pure Calling, Error
5111 Reporting, Table of Symbols): Document this.
5112 * src/parse-gram.y (add_param): New function.
5113 (COMMA): Remove.
5114 (declaration): Implement new rule for %parse-param and %lex-param.
5115 * src/scan-gram.l: "," now elicits a warning, rather than being
5116 a token; this is more compatible with byacc.
5117 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
5118
bb92250c
PE
51192002-11-27 Paul Eggert <eggert@twinsun.com>
5120
5121 Rename identifiers to avoid real and potential collisions.
5122
5123 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
5124 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 5125 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
5126 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
5127 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
5128 * src/parse-gram.y (print_token_value): Renamed from yyprint.
5129 All uses changed.
5130 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
5131 The name "yycontrol" violates the name space rules, and this stuff
5132 wasn't being used anyway.
5133 (input): Remove action; this stuff wasn't being used.
5134 (gram_error): Rename local variable yylloc -> loc.
5135 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
5136 (YY_DECL): Don't use "yy" at start of local variables.
5137 All uses changed, e.g., yylloc -> loc.
5138 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
5139 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
5140 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
5141 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
5142
5143 * src/parse-gram.y (gram_error): loc is now const *.
5144 * src/reader.h (gram_error): Likewise.
5145
3af4feb2
PE
51462002-11-24 Paul Eggert <eggert@twinsun.com>
5147
5148 Version 1.75c.
5149
5150 * tests/actions.at (Actions after errors): Use an output format
5151 more similar to that of the Printers and Destructors test.
5152 Test the position of the ';' token too.
5153 (Printers and Destructors): Likewise.
5154 (Printers and Destructors: %glr-parser): Remove for now, to avoid
5155 unnecessarily alarming people when the test fails.
5156
5157 * data/yacc.c (yyerrlab1): Move this label down, so that the
5158 parser does not discard the lookahead token if the user code
5159 invokes YYERROR. This change is required for POSIX conformance.
5160
5161 * lib/error.c: Sync with gnulib.
5162
51632002-11-22 Paul Eggert <eggert@twinsun.com>
5164
5165 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
5166 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
5167 * lib/xmalloc.c: Likewise.
26b4a969 5168
58004308
PE
51692002-11-20 Paul Eggert <eggert@twinsun.com>
5170
5171 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
5172
51732002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 5174
58004308
PE
5175 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
5176 should use `if (! x) abort ();' rather than `assert (x);', and
5177 anyway it's one less thing to worry about configuring.
5178
5179 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
5180 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
5181 and replace all instances of assert with abort.
5182 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
5183 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
5184
5185 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
5186 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
5187 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
5188 hash_find_entry, hash_rehash, hash_insert): Likewise.
5189 * src/conflicts.c (resolve_sr_conflict): Likewise.
5190 * src/lalr.c (set_goto_map, map_goto): Likewise.
5191 * src/nullable.c (nullable_compute): Likewise.
5192 * src/output.c (prepare_rules, token_definitions_output): Likewise.
5193 * src/reader.c (packgram, reader): Likewise.
5194 * src/state.c (state_new, state_free, state_transitions_set,
5195 state_reduction_find): Likewise.
5196 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
5197 symbol_pack): Likewise.
5198 * src/tables.c (conflict_row, pack_vector): Likewise.
5199 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
5200 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
5201 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
5202 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
5203
5204 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
5205 (ARGMATCH_CONSTRAINT): New macro.
5206 (ARGMATCH_ASSERT): Use it.
5207
5208 * src/system.h (verify): New macro.
5209 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
5210 rather than assert.
5211 * src/tables.c (tables_generate): Likewise.
5212
5213 * src/struniq.c (struniq_assert): Now returns void, and aborts
5214 if the assertion is false.
5215 (struniq_assert_p): Remove.
5216 * src/struniq.h: Likewise.
5217
76ae8198
PE
52182002-11-18 Paul Eggert <eggert@twinsun.com>
5219
5220 * data/glr.c (yygetLRActions): Replace `yyindex' with
5221 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
5222 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 5223 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 5224
d3c4e709
AD
52252002-11-18 Akim Demaille <akim@epita.fr>
5226
5227 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
5228 space.
5229 From Tim Van Holder.
5230
8d8a7238
PE
52312002-11-17 Paul Eggert <eggert@twinsun.com>
5232
5233 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
5234 to "SyntaxError" for consistency with my 2002-11-15 change.
5235
5236 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
5237 not define to {}, since this breaks the common use of `YYDPRINTF
5238 ((...));' if a single statement is desired (e.g. before `else').
5239 Work around GCC warnings by surrounding corresponding calls with
5240 {} if needed.
5241 (yyhasResolvedValue): Remove unused function.
5242 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
5243 loop body.
5244 (yyreportSyntaxError): Renamed from yyreportParseError.
5245 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
5246 All uses changed.
5247 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
5248 extern when possible. Remove unused initializations.
5249
b0937b22
AD
52502002-11-16 Akim Demaille <akim@epita.fr>
5251
5252 Augment the similarity between GLR and LALR traces.
5253
5254 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
5255 (YY_REDUCE_PRINT): New.
5256 (yyparse): Use them.
5257 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
5258 YYDPRINT here.
5259 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
5260 state reached after the reduction/recovery, since...
5261 (yyparse, yyprocessOneStack): Report the state we are entering in.
5262
c5e3e510
AD
52632002-11-16 Akim Demaille <akim@epita.fr>
5264
5265 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
5266 Add support for --trace=skeleton.
5267 * src/scan-skel.l: %option debug.
5268 Scan strings of non-@ or \n instead of character by character.
5269 (scan_skel): Handle trace_skeleton.
5270 (QPUTS): New.
5271 (@output_parser_name@, @output_header_name@): ``Restore'' their
5272 support (used to be M4 macros).
5273 * data/yacc.c: Quote larger chunks, a la glr.c.
5274 * data/lalr1.cc: Likewise.
5275 The header guards are no longer available, so use some other
5276 string than `YYLSP_NEEDED'.
5277
4c6cc1db
AD
52782002-11-16 Akim Demaille <akim@epita.fr>
5279
5280 Make the ``Printers and Destructors'' test more verbose, taking
5281 `yacc.c''s behavior as (possibly wrong) reference.
5282
5283 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
5284 instead of fprint on stdout.
5285 Set and report the last_line of the symbols.
5286 Consistently display values and locations.
5287
6d9e8019
PE
52882002-11-16 Paul Eggert <eggert@twinsun.com>
5289
5290 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
5291
6e649e65
PE
52922002-11-15 Paul Eggert <eggert@twinsun.com>
5293
b25d88f6
PE
5294 * tests/actions.at (Actions after errors): New test case.
5295
6e649e65
PE
5296 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
5297 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
5298 tests/action.at, tests/calc.at, tests/conflicts.at,
5299 tests/cxx-type.at, tests/regression.at:
5300 "parse error" -> "syntax error" for POSIX compatibility.
5301 "parsing stack overflow..." -> "parser stack overflow" so
5302 that code matches Bison documentation.
5303
0f39aab9
AD
53042002-11-15 Akim Demaille <akim@epita.fr>
5305
5306 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
5307 take two BRACED_CODE, not two string_content.
5308 Free the scanner's obstack when we are done.
5309 (code_content): New.
5310 * tests/calc.at: Adjust.
5311 * doc/bison.texinfo: Adjust.
5312 Also, make sure to include the `,' for these declarations.
5313
761c1926
AD
53142002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
5315
5316 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
5317 definition; avoids potential autoreconf problems.
5318
b0f98b10
AD
53192002-11-15 Akim Demaille <akim@epita.fr>
5320
5321 Always check the value returned by yyparse.
5322
5323 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
5324 returned by yyparse.
5325 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
5326 Adjust calls.
5327 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
5328 returned by yyparse.
5329
970785f1
PH
53302002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5331
5332 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
5333 on input.at test.
5334
8fcc7db1
PE
53352002-11-14 Paul Eggert <eggert@twinsun.com>
5336
7ec1b48e
PE
5337 * src/output.c (output_skeleton): Call xfopen instead of
5338 duplicating xfopen's body.
5339
cfff7583 5340 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 5341 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 5342
8fcc7db1
PE
5343 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
5344 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
5345 Group compiler. Instead, use "$CC -E bar.c". Include the .h
5346 file twice in the grammar, as an extra check.
5347
5348 * tests/input.at (Torturing the Scanner): Surround the
5349 backslash-newline tests with "#if 0", to make it less likely that
5350 we'll run into compiler bugs. Bring back solitary \ inside
5351 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 5352 test backslash-newline in C character constant.
8fcc7db1 5353
4e8d992c
AD
53542002-11-14 Akim Demaille <akim@epita.fr>
5355
5356 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
5357 status of the compiler.
f32b346d 5358 Calling `exit 1' is no longer needed.
4e8d992c
AD
5359 Reported by Nelson H. F. Beebe.
5360
9501dc6e
AD
53612002-11-14 Akim Demaille <akim@epita.fr>
5362
5363 * tests/atlocal.in (CPPFLAGS): We have config.h.
5364 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
5365 New.
5366 * tests/actions.at, tests/calc.at, tests/conflicts.at,
5367 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
5368 * tests/regression.at, tests/torture.at: Use them for all the
5369 grammars that are to be compiled.
5370 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
5371 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
5372 * doc/bison.texinfo (GLR Parsers): Document `inline'.
5373
18b519c0
AD
53742002-11-14 Akim Demaille <akim@epita.fr>
5375
5376 * doc/bison.texinfo: Various formatting changes (alignments in
5377 samples, additional @group/@end group, GCS in samples.
5378 Use @deffn instead of simple @table to define the directives,
5379 macros, variables etc.
5380
9a86cdb9
PE
53812002-11-13 Paul Eggert <eggert@twinsun.com>
5382
daa33def 5383 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 5384 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 5385
daa33def 5386 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 5387 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
5388 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
5389 * tests/headers.at (export YYLTYPE): Likewise.
5390
5391 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 5392 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 5393
9a86cdb9
PE
5394 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
5395 comments, since they're not portable. Use GNU coding style.
5396
9c1e26bd
AD
53972002-11-13 Akim Demaille <akim@epita.fr>
5398
5399 * data/yacc.c: Leave bigger chunks of quoted text.
5400 (YYDSYMPRINTF): New.
5401 Use it to report symbol activities.
5402 * data/glr.c (YYDSYMPRINTF): New.
5403 Use it.
5404
87f721cc
PE
54052002-11-12 Paul Eggert <eggert@twinsun.com>
5406
5407 Version 1.75b.
5408
5409 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
5410 (yyglrReduce): Return yyok, not 0.
5411 This should avoid the enumerated-type warnings reported
464c6927 5412 by Nelson H. F. Beebe in
161a71f3 5413 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
5414
5415 * lib/bbitset.h (BITSET_INLINE): Remove.
5416 * lib/bitset.h [! BITSET_INLINE]: Remove.
5417 (bitset_set, bitset_reset, bitset_test): Rename local vars
5418 to avoid shadowing warnings by GCC.
5419
5420 * data/glr.c (inline): Remove #define. It's the user's
5421 responsibility to #define it away, just like 'const'.
464c6927 5422 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 5423 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 5424
87f721cc
PE
5425 * Makefile.maint (po-check): Scan .l and .y files instead of the
5426 .c and the .h files that they generate. This fixes the bug
5427 reported by Tim Van Holder in:
161a71f3 5428 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
5429 Look for N_ as well as for _. Try to avoid matching #define for
5430 N_ and _.
5431 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
5432 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
5433 * src/scan-gram.l: Revamp regular expressions so that " and '
5434 do not confuse xgettext.
5435
5436 * src/struniq.h (struniq_new): Do not declare the return type
5437 to be 'const'; this violates the C standard.
5438 * src/struniq.c (struniq_new): Likewise.
5439
be14ade5
AD
54402002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
5441
5442 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
5443 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
5444 linker.
5445
05291fbc
AD
54462002-11-12 Akim Demaille <akim@epita.fr>
5447
5448 * Makefile.maint: Sync with Autoconf:
5449 (local_updates): New.
5450
1f5fd52e
AD
54512002-11-12 Akim Demaille <akim@epita.fr>
5452
5453 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
5454
283f1e64
AD
54552002-11-12 Akim Demaille <akim@epita.fr>
5456
5457 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
5458 locations.
5459
886b69d1
AD
54602002-11-12 Akim Demaille <akim@epita.fr>
5461
5462 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
5463 not yyvalue.
5464
3df37415
AD
54652002-11-12 Akim Demaille <akim@epita.fr>
5466
5467 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
5468 Use it to test the GLR parser.
5469
7bd6c77e
AD
54702002-11-12 Akim Demaille <akim@epita.fr>
5471
5472 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
5473 defines it.
5474 * data/glr.c (yystos): New.
5475 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
5476 (YYDSYMPRINT): New.
5477 (yyval): Don't define it, it is handled via M4.
5478 (yyrecoverParseError): Free verbosely the discarded symbols.
5479 * data/yacc.c (yysymprint): Remove, rather...
5480 (b4_yysymprint_generate): invoke.
5481 * data/c.m4 (b4_yysymprint_generate): New.
5482 Accept pointers as arguments, as opposed to the version from
5483 yacc.c.
5484 (b4_yydestruct_generate): Likewise.
5485 * tests/cations.at (Printers and Destructors): Use Bison directives
5486 instead of CPP macros.
5487 Don't rely on internal details.
5488
b0400cc6
AD
54892002-11-12 Akim Demaille <akim@epita.fr>
5490
5491 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
5492 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
5493 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
5494 it against YYEMPTY and so forth), work on yytoken (i.e., set
5495 it to YYEMPTY etc.).
5496 (yydestruct): Replace with a b4_yydestruct_generate invocation.
5497 (b4_symbol_actions): Remove.
5498 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
5499 for 0, end-of-input.
5500
72f889cc
AD
55012002-11-12 Akim Demaille <akim@epita.fr>
5502
5503 * doc/bison.texinfo (Destructor Decl): New.
5504
b1ae9233
AD
55052002-11-12 Akim Demaille <akim@epita.fr>
5506
5507 * src/tables.c (tables_generate): Use free for pointers that
5508 cannot be NULL, not XFREE.
5509 (pack_vector): Use assert, not fatal, for bound violations.
5510 * src/state.c (state_new): Likewise.
5511 * src/reader.c (reader): Likewise.
5512 * src/lalr.c (set_goto_map): Likewise.
72f889cc 5513 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
5514 the file name.
5515
7ec2d4cd
AD
55162002-11-12 Akim Demaille <akim@epita.fr>
5517
5518 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
5519 Restore.
5520 * src/scan-gram.l (last_string): Is global to the file, not to
5521 yylex.
5522 * src/parse-gram.y (input): Don't append the epilogue here,
5523 (epilogue.opt): do it here, and free the scanner's obstack.
5524 * src/reader.c (epilogue_set): Rename as...
5525 (epilogue_augment): this.
5526 * data/c.m4 (b4_epilogue): Defaults to empty.
5527
573a6cd3
AD
55282002-11-12 Akim Demaille <akim@epita.fr>
5529
5530 * src/getargs.c (long_options): Remove duplicates.
5531 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
5532 Remove.
5533 * doc/bison.rnh: Remove.
5534 * doc/bison.texinfo (VMS Invocation): Remove.
5535
95612cfa
AD
55362002-11-12 Akim Demaille <akim@epita.fr>
5537
5538 * src/struniq.h, src/struniq.c (struniq_t): Is const.
5539 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
5540
5541 Use struniq for symbols.
5542
5543 * src/symtab.h (symbol_t): The tag member is a struniq.
5544 (symbol_type_set): Adjust.
5545 * src/symtab.c (symbol_new): Takes a struniq.
5546 (symbol_free): Don't free the tag member.
5547 (hash_compare_symbol_t, hash_symbol_t): Rename as...
5548 (hash_compare_symbol, hash_symbol): these.
5549 Use the fact that tags as struniqs.
5550 (symbol_get): Use struniq_new.
5551 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
5552 Returns a strniq.
5553 * src/reader.h (merger_list, grammar_currentmerge_set): The name
5554 and type members are struniqs.
5555 * src/reader.c (get_merge_function)
5556 (grammar_current_rule_merge_set): Adjust.
5557 (TYPE, current_type): Are struniq.
5558
5559 Use struniq for file names.
5560
5561 * src/files.h, src/files.c (infile): Split into...
5562 (grammar_file, current_file): these.
5563 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
5564 * src/reduce.c (reduce_print): Likewise.
5565 * src/getargs.c (getargs): Likewise.
5566 * src/complain.h, src/complain.c: Likewise.
5567 * src/main.c (main): Call struniqs_new early enough to use it for
5568 file names.
5569 Don't free the input file name.
5570
3e6656f9
AD
55712002-11-12 Akim Demaille <akim@epita.fr>
5572
5573 * src/symtab.c (symbol_free): Remove dead deactivated code:
5574 type_name are properly removed.
5575 Don't use XFREE to free items that cannot be NULL.
5576 * src/struniq.h, src/struniq.c: New.
5577 * src/main.c (main): Initialize/free struniqs.
5578 * src/parse-gram.y (%union): Add astruniq member.
5579 (yyprint): Adjust.
5580 * src/scan-gram.l (<{tag}>): Return a struniq.
5581 Free the obstack bit that used to store it.
5582 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
5583
7672019c
PE
55842002-11-11 Paul Eggert <eggert@twinsun.com>
5585
5586 Revamp to fix many (but not all) of the C- and M4-related quoting
5587 problems. Among other things, this fixes the Bison bug reported
5588 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 5589 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
5590
5591 Use new @ escapes consistently. Represent brackets with @{ and @}
5592 rather than @<:@ and @:>@, since this works a bit better with dumb
5593 editors like vi. Represent @ with @@, since @ is now consistently
5594 an escape. Use @oline@ and @ofile@ rather than __oline__ and
5595 __ofile__, to avoid unexpected expansions. Similarly, use @output
5596 rather than #output.
5597
5598 * data/c.m4 (b4_copyright): Omit file name from comment, since
5599 the file name could contain "*/".
5600 (b4_synclines_flag): Don't quote the 2nd argument; it should already
5601 be quoted. All uses changed.
5602
5603 * data/glr.c: Use new @ escapes consistently.
5604 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
5605 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
5606 Remove, since they couldn't handle arbitrary characters in file
5607 names.
5608 * data/lalr1.cc: Likewise.
5609 * data/yacc.c: Likewise.
5610
5611 * src/files.c (output_infix): Remove; all uses removed.
5612 * src/files.h: Likewise.
5613
5614 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
5615 mishandled funny characters in file names, and anyway it isn't
5616 needed any more.
5617 * data/yacc.c: Likewise.
5618 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
5619
5620 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
5621 * data/yacc.c: Likewise.
5622
5623 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
5624 strings now.
5625 (muscle_init): Quote filename as a C string.
5626 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
5627 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
5628 * src/output.c (escaped_file_name_output): New function.
5629 (prepare_symbols): Quote tokens for M4.
5630 (prepare): Don't insert output_infix, output_prefix,
5631 output_parser_name, output_header_name; this is now down by scan-skel.
5632 Insert skeleton as a C string.
5633
5634 * src/output.c (user_actions_output, symbol_destructors_output,
5635 symbol_printers_output): Quote filenames for C and M4.
5636 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5637
5638 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
5639 escapes other than \\ and \'; this simplifies the code.
5640 (<SC_STRING>): Likewise, for \\ and \".
5641 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
5642 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
5643 Use new escapes @{ and @} for [ and ].
5644
5645 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
5646 them with auto vars.
5647 Switch to new escape scheme, where @ is the escape character uniformly.
5648 Abort if a stray escape character is found. Avoid unbounded input
5649 buffer when parsing non-escaped text.
5650
5651 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
5652 __oline__, #output, $@, and @{ do not have unintended meanings.
5653
acea4f3b
PE
56542002-11-09 Paul Eggert <eggert@twinsun.com>
5655
5656 Fix the test failure due to GCC warnings described in
161a71f3 5657 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
5658 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
5659 evaluate to 0 if it's impossible for NINF to be in the respective
5660 table.
5661 (yygetLRActions, yyrecoverParseError): Use them.
5662
5663 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
5664 counted in the token inserted at end of file. Now takes
5665 location_t *, not location_t, so that the location can be
5666 adjusted. All uses changed.
5667
5668 * tests/regression.at (Invalid inputs): Adjust wording in
5669 diagnostic to match the new behavior.
5670
5671 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
5672 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
5673 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
5674 abort ();'. This reduces the runtime of the "Many lookaheads"
5675 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
5676 GCC 3.2.
5677
20ef1ad5
PE
56782002-11-07 Paul Eggert <eggert@twinsun.com>
5679
5680 * src/parse-gram.y (CHARACTER): Remove unused token.
5681 All uses removed.
5682
5683 * src/scan-gram.l: Remove stack option. We no longer use the
5684 stack, since the stack was never deeper than 1; instead, use the
5685 new auto var c_context to record the stacked value.
5686
5687 Remove nounput option. At an unexpected end of file, we now unput
5688 the minimal input necessary to end cleanly; this simplifies the
5689 code.
5690
5691 Avoid unbounded token sizes where this is easy.
5692
5693 (unexpected_end_of_file): New function.
5694 Use it to systematize the error message on unexpected EOF.
5695 (last-string): Now auto, not static.
5696 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
5697 (scanner_last_string_free): Remove; not used.
5698 (percent_percent_count): Move decl to just before use.
5699 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
5700 not the (never otherwised-used) CHARACTER.
5701
93724f13
AD
57022002-11-07 Akim Demaille <akim@epita.fr>
5703
5704 Let yyerror always receive the msg as last argument, so that
5705 yyerror can be variadic.
5706
5707 * data/yacc.c (b4_yyerror_args): New.
5708 Use it when calling yyerror.
5709 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
5710 Use it when calling yyerror.
5711 * doc/bison.texinfo (Error Reporting): Adjust.
5712 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
5713 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
5714
6e40b4eb
AD
57152002-11-06 Akim Demaille <akim@epita.fr>
5716
5717 #line should have quoted strings.
5718 Ideally, this should be done by m4_quotearg.
5719
5720 * src/scan-skel.l: Include quotearg.h.
5721 Quote __ofile__.
5722 * src/output.c (symbol_printers_output)
5723 (symbol_destructors_output): Quote the file name.
5724
2dfbfc12
AD
57252002-11-06 Akim Demaille <akim@epita.fr>
5726
5727 * tests/regression.at (Invalid inputs): Adjust to the recent
5728 messages.
5729
437c2d80
AD
57302002-11-06 Akim Demaille <akim@epita.fr>
5731
5732 Restore --no-lines.
5733 Reported by Jim Kent.
5734
5735 * data/c.m4 (b4_syncline): New.
5736 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
5737 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
5738 * src/output.c (user_actions_output): Likewise.
5739 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 5740 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 5741
900c5db5
AD
57422002-11-06 Akim Demaille <akim@epita.fr>
5743
5744 * src/main.c (main): Free `infile'.
5745 * src/scan-gram.l (handle_syncline): New.
5746 Recognize `#line'.
5747 * src/output.c (user_actions_output, symbol_destructors_output)
5748 (symbol_printers_output): Use the location's file name, not
5749 infile.
5750 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5751
e183b123 57522002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 5753
e183b123 5754 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 5755 either has GLR conflict entries.
e183b123 5756
193eb6b7
PE
57572002-11-05 Paul Eggert <eggert@twinsun.com>
5758
e183b123
PE
5759 * src/scan-gram.l: Use more accurate diagnostics, e.g.
5760 "integer out of range" rather than "invalid value".
5761 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
5762 accordingly.
5763
193eb6b7
PE
5764 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
5765 Also, remove one static variable in the scanner.
5766
5767 * src/scan-gram.l (braces_level): Now auto, not static.
5768 Initialize to zero if the compiler is being picky.
5769 (INITIAL): Clear braces_level instead of incrementing it.
5770 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
5771 as POSIX 1003.1-2001 requires.
5772 * src/system.h (IF_LINT): New macro, taken from coreutils.
5773 * configure.ac: Define "lint" if --enable-gcc-warnings.
5774
29c01725
AD
57752002-11-05 Akim Demaille <akim@epita.fr>
5776
5777 * src/scan-gram.l: When it starts with `%', complain about the
5778 whole directive, not just that `invalid character: %'.
5779
8aeac3ca
AD
57802002-11-04 Akim Demaille <akim@epita.fr>
5781
5782 * Makefile.maint: Update from Autoconf.
5783 (update, cvs-update, po-update, do-po-update): New.
5784
793a58bb
AD
57852002-11-04 Akim Demaille <akim@epita.fr>
5786
5787 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
5788 and yyerror.
5789 Have yyerror `use' its arguments.
5790 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
5791 returns true when location & yacc & pure & parse-param.
5792 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
5793
c4d720cd
AD
57942002-11-04 Akim Demaille <akim@epita.fr>
5795
5796 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
5797 clashes.
5798 * src/scan-gram.l: Use [\'] instead of ['] to pacify
5799 font-lock-mode.
5800 Use complain_at.
5801 Use quote, not quote_n since LOCATION_PRINT no longer uses the
5802 slot 0.
5803
613a0dc5
PE
58042002-11-03 Paul Eggert <eggert@twinsun.com>
5805
5806 * src/reader.c (get_merge_function, grammar_current_rule_check):
5807 Use consistent diagnostics for reporting type name clashes.
5808 Quote the types with <>, for consistency with Yacc.
5809 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
5810
2a8d363a
AD
58112002-11-03 Akim Demaille <akim@epita.fr>
5812
5813 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
5814 New.
5815 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
5816 (b4_parse_param): Remove.
5817 Use b4_identification.
5818 Propagate b4_pure_args where needed to pass them to yyerror.
5819 * data/glr.m4 (b4_parse_param): Remove.
5820 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
5821 (b4_lpure_formals): New.
5822 Use b4_identification.
5823 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
5824 b4_user_formals and b4_user_args.
5825 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
5826 (yyreportAmbiguity): When using a pure parser, also need
5827 the location, and the parse-params.
5828 Adjust callers.
5829 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
5830 When using a pure parser, also need the parse-params.
5831 Adjust callers.
5832 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
5833 (%pure-parser + %parse-param) LALR and GLR parsers.
5834 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
5835 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
5836 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
5837 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
5838 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
5839 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
5840 * doc/bison.texinfo: Untabify the whole file.
5841 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
5842 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
5843 (Error Reporting): Adjust to these new directives.
5844 Document %error-verbose, deprecate YYERROR_VERBOSE.
5845
9e32add8
AD
58462002-11-03 Akim Demaille <akim@epita.fr>
5847
5848 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
5849 AT_CHECK_CALC_GLR invocations to use % directives, instead of
5850 command line options.
5851 * tests/cxx-type.at: Formatting changes.
5852
b02d90a5
PE
58532002-11-03 Paul Eggert <eggert@twinsun.com>
5854
5855 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
5856 to count columns correctly, and to check for invalid inputs.
9e32add8 5857
b02d90a5
PE
5858 Use mbsnwidth to count columns correctly. Account for tabs, too.
5859 Include mbswidth.h.
5860 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
5861 (extend_location): New function.
5862 (YY_LINES): Remove.
5863
5864 Handle CRLF in C code rather than in Lex code.
5865 (YY_INPUT): New macro.
5866 (no_cr_read): New function.
5867
5868 Scan UCNs, even though we don't fully handle them yet.
5869 (convert_ucn_to_byte): New function.
5870
5871 Handle backslash-newline correctly in C code.
5872 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
5873 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
5874 all uses changed.
5875 (tag, splice): New EREs. Do not allow NUL or newline in tags.
5876 Use {splice} wherever C allows backslash-newline.
5877 YY_STEP after space, newline, vertical-tab.
5878 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 5879
b02d90a5
PE
5880 (letter, id): Don't assume ASCII; e.g., spell out a-z.
5881
5882 ({int}, handle_action_dollar, handle_action_at): Check for integer
5883 overflow.
9e32add8 5884
b02d90a5
PE
5885 (YY_STEP): Omit trailing semicolon, so that it's more like C.
5886
5887 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
5888 as well as \000. Check for UCHAR_MAX, not 255.
5889 Allow \x with an arbitrary positive number of digits, as in C.
5890 Check for overflow here.
5891 Allow \? and UCNs, for compatibility with C.
5892
5893 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
5894 with quote slot used by complain_at.
5895
5896 * tests/input.at: Add tests for backslash-newline, m4 quotes
5897 in symbols, long literals, and funny escapes in strings.
5898
5899 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
5900 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
5901 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
5902 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
5903 * m4/mbswidth.m4: New file, from GNU coreutils.
5904
5905 * doc/bison.texinfo (Grammar Outline): Document // comments.
5906 (Symbols): Document that trigraphs have no special meaning in Bison,
5907 nor is backslash-newline allowed.
5908 (Actions): Document that trigraphs have no special meaning.
5909
5910 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
5911 no longer used.
5912
59132002-11-02 Paul Eggert <eggert@twinsun.com>
5914
5915 * src/reader.c: Don't include quote.h; not needed.
5916 (get_merge_function): Reword warning to be consistent with
5917 type clash diagnostic in grammar_current_rule_check.
5918
5919 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
5920 bug in trigraph handling.
5921
5922 * src/output.c (prepare_symbols): When printing token names,
5923 escape "[" as "@<:@" and likewise for "]".
5924
5925 * src/system.h (errno): Remove declaration, as we are now
5926 assuming C89 or better, and C89 guarantees errno.
5927
762b212b
PE
59282002-10-30 Paul Eggert <eggert@twinsun.com>
5929
5930 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
5931 Check for close failures.
5932 * src/files.h (xfclose): Return void, not int, since it always
5933 returned zero.
5934 * src/files.c (xfclose): Likewise. Report I/O error if ferror
5935 indicates one.
5936 * src/output.c (output_skeleton): Use xfclose rather than fclose
5937 and ferror. xfclose now checks ferror.
5938
5939 * data/glr.c (YYLEFTMOST_STATE): Remove.
5940 (yyreportTree): Use a stack-based leftmost state. This avoids
5941 our continuing battles with bogus warnings about initializers.
5942
56100c60
AD
59432002-10-30 Akim Demaille <akim@epita.fr>
5944
5945 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
5946 #if.
5947
51b4a04c
PH
59482002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5949
5950 * tests/glr-regr1.at: New test for reported regressions.
5951 * tests/testsuite.at: Add glr-regr1.at test.
5952 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 5953
bf1ebda2
PE
59542002-10-24 Paul Eggert <eggert@twinsun.com>
5955
5c16c6b1
PE
5956 Version 1.75a.
5957
bf1ebda2
PE
5958 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
5959 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
5960 we use malloc. Don't assume 'A' through 'Z' are contiguous.
5961 Don't assume strdup exists; POSIX says its an XSI extension.
5962 Check for buffer overflow on input.
5963
b526ee61
AD
59642002-10-24 Akim Demaille <akim@epita.fr>
5965
5966 * src/output.c (output_skeleton): Don't disable M4sugar comments
5967 too soon: it results in comments being expanded.
5968 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5969 first output.
5970
f1886bb2
AD
59712002-10-24 Akim Demaille <akim@epita.fr>
5972
5973 * data/yacc.c (m4_int_type): New.
5974 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5975 char' as only yacc.c wants K&R portability.
5976 * data/glr.c (yysigned_char): Remove.
5977 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5978 Reported by Quoc Peyrot.
5979
c5576256
PE
59802002-10-23 Paul Eggert <eggert@twinsun.com>
5981
5982 * src/main.c (main): With --trace=time, report times even if a
5983 non-fatal error occurs. Formerly, the times were reported in some
5984 such cases but not in others.
5985 * src/reader.c (reader): Just return if a complaint has been issued,
5986 instead of exiting, so that 'main' can report times.
5987
27b0ffea
AD
59882002-10-22 Akim Demaille <akim@epita.fr>
5989
5990 * src/system.h: Include sys/types.
5991 Reported by Bert Deknuydt.
5992
223a7883
PE
59932002-10-23 Paul Eggert <eggert@twinsun.com>
5994
5995 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5996 Suggested by Art Haas.
5997
59982002-10-22 Paul Eggert <eggert@twinsun.com>
5999
6000 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
6001 decl; not needed any more.
6002 * src/main.c (main): Use return to exit, undoing yesterday's change.
6003 The last OS that we could find where this wouldn't work is
6004 SunOS 3.5, and that's too old to worry about now.
6005
6006 * data/glr.c (struct yyltype): Define members even when not
6007 doing locations. This is more consistent with yacc.c, and it
6008 works around the following bug reports:
161a71f3
PE
6009 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
6010 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 6011
223a7883
PE
6012 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
6013 @acronym consistently. Standardize on "Yacc" instead of "YACC",
6014 "Algol" instead of "ALGOL". Give a bit more history about BNF.
6015
8b76775a
AD
60162002-10-22 Akim Demaille <akim@epita.fr>
6017
6018 * data/README: New.
6019
6db10d14
PE
60202002-10-21 Paul Eggert <eggert@twinsun.com>
6021
6022 Be consistent about 'bool'; the old code used an enum in one
6023 module and an int in another, and this violates the C standard.
6024 * m4/stdbool.m4: New file, from coreutils 4.5.3.
6025 * configure.ac (AC_HEADER_STDBOOL): Add.
6026 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
6027 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
6028 * src/symtab.c (hash_compare_symbol_t): Likewise.
6029 * src/system.h (bool, false, true): Use a definition consistent
6030 with ../lib/hash.c. All uses changed.
6031
6032 * src/complain.c (warning_issued): Renamed from warn_message_count,
6033 so that we needn't worry about integer overflow (!).
6034 Now of type bool. All uses changed.
6035 (complaint_issued): Renamed from complain_message_count; likewise.
6036
6037 * src/main.c (main): Use exit to exit with failure.
27b0ffea 6038
6db10d14
PE
6039 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
6040 rather than 1 and 0.
6041 * src/main.c (main): Likewise.
6042 * src/getargs.c (getargs): Likewise.
6043 * src/reader.c (reader): Likewise.
6044
6045 * src/getarg.c (getargs): Remove duplicate code for
6046 "Try `bison --help'".
6047
6048 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
6049 What was that "2" for?
6050
6051 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
6052 * src/getargs.c (usage): Likewise.
6053
6054 * src/getargs.c (getargs): When there are too few operands, report
6055 the last one. When there are too many, report the first extra
6056 one. This is how diffutils does it.
6057
92a060fd
PE
60582002-10-20 Paul Eggert <eggert@twinsun.com>
6059
6060 Remove K&R vestiges.
6061 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
6062 * src/complain.c (VA_START): Remove. Assume prototypes.
6063 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
6064 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
6065 fatal): Assume prototypes.
6066 * src/complain.h: Assume prototypes.
6067 * src/system.h (PARAMS): Remove.
6068 Include <limits.h> unconditionally, since it's guaranteeed even
6069 for a freestanding C89 compiler.
6070 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
6071 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 6072
e7cb57c0
AD
60732002-10-20 Akim Demaille <akim@epita.fr>
6074
6075 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
6076 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
6077 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
6078 (yyresolveStates, yyresolveAction, yyresolveStack)
6079 (yyprocessOneStack): Use them.
6080 (yy_reduce_print): New.
6081 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
6082
0245f82d
AD
60832002-10-20 Akim Demaille <akim@epita.fr>
6084
6085 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
6086 arguments and output `void'.
6087 (b4_c_function): Rename as...
6088 (b4_c_function_def): this.
6089 (b4_c_function_decl, b4_c_ansi_function_def)
6090 (b4_c_ansi_function_decl): New.
6091 Change the interpretation of the arguments: before `int, foo', now
6092 `int foo, foo'.
6093 * data/yacc.c (yyparse): Prototype and define thanks to these.
6094 Adjust b4_c_function_def uses.
6095 * data/glr.c (yyparse): Likewise, but ANSI only.
6096
39912f52
AD
60972002-10-20 Akim Demaille <akim@epita.fr>
6098
6099 * src/output.c (prepare): Move the definition of `tokens_number',
6100 `nterms_number', `undef_token_number', `user_token_number_max'
6101 to...
6102 (prepare_tokens): Here.
6103 (prepare_tokens): Rename as...
6104 (prepare_symbols): this.
6105 (prepare): Move the definition of `rules_number' to...
6106 (prepare_rules): here.
6107 (prepare): Move the definition of `last', `final_state_number',
6108 `states_number' to...
6109 (prepare_states): here.
6110 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
6111
20c1e2ad
AD
61122002-10-20 Akim Demaille <akim@epita.fr>
6113
6114 * src/tables.h, src/tables.c, src/output.c: Comment changes.
6115
21964f43
AD
61162002-10-20 Akim Demaille <akim@epita.fr>
6117
6118 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
6119 * data/c.m4: here.
6120
66d30cd4
AD
61212002-10-20 Akim Demaille <akim@epita.fr>
6122
6123 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
6124 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
6125 `pair'.
6126 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
6127 `name' to...
6128 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
6129 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
6130 These.
6131
95f2c9fe
PE
61322002-10-19 Paul Eggert <eggert@twinsun.com>
6133
6134 Do not create a temporary file, as that involves security and
6135 cleanup headaches. Instead, use a pair of pipes.
6136 Derived from a suggestion by Florian Krohm.
6137 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
6138 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
6139 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
6140 (BISON_PREREQ_SUBPIPE): Add.
6141 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
6142 Add subpipe.h, subpipe.c.
6143 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
6144 * po/POTFILES.in: Add lib/subpipe.c.
6145 * src/output.c: Include "subpipe.h".
6146 (m4_invoke): Remove decl.
6147 (scan_skel): New decl.
6148 (output_skeleton): Use pipe rather than temporary file for m4 input.
6149 Check that m4sugar.m4 is readable, to avoid deadlock.
6150 Check for pipe I/O error.
6151 * src/scan-skel.l (readpipe): Remove decl.
6152 (scan_skel): New function, to be used in place of m4_invoke.
6153 Read from stream rather than file.
66d30cd4 6154
95f2c9fe
PE
6155 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
6156 float, as this generates a warning on Solaris 8 + GCC 3.2 with
6157 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
6158 this generates a more-accurate value anyway.
6159
6160 * lib/timevar.c (timervar_accumulate): Rename locals to
6161 avoid confusion with similarly-named more-global.
6162 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
6163
6164 * src/output.c (prepare): Use xstrdup to convert char const *
6165 to char *, to avoid GCC warning.
6166
c19988b7
AD
61672002-10-19 Akim Demaille <akim@epita.fr>
6168
6169 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
6170 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
6171 Use them to have `calc.y' ready for %pure-parser.
6172 * data/yacc.c (YYLEX): Pass a yylex return type to
6173 b4_c_function_call.
6174
ae7453f2
AD
61752002-10-19 Akim Demaille <akim@epita.fr>
6176
6177 Prototype support of %lex-param and %parse-param.
6178
6179 * src/parse-gram.y: Add the definition of the %lex-param and
6180 %parse-param tokens, plus their rules.
6181 Drop the `_' version of %glr-parser.
6182 Add the "," token.
6183 * src/scan-gram.l (INITIAL): Scan them.
6184 * src/muscle_tab.c: Comment changes.
6185 (muscle_insert, muscle_find): Rename `pair' as `probe'.
6186 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
6187 (muscle_entry_s): The `value' member is no longer const.
6188 Adjust all dependencies.
6189 * src/muscle_tab.c (muscle_init): Adjust: use
6190 MUSCLE_INSERT_STRING.
6191 Initialize the obstack earlier.
6192 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
6193 (muscle_pair_list_grow): New.
6194 * data/c.m4 (b4_c_function_call, b4_c_args): New.
6195 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
6196 * tests/calc.at: Use %locations, not --locations.
6197 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
6198
0e575721
AD
61992002-10-19 Akim Demaille <akim@epita.fr>
6200
6201 * src/getargs.c (usage): Take status as argument and exit
6202 accordingly.
6203 Report the traditional `Try ... --help' message when status != 0.
6204 (usage, version): Don't take a FILE * as arg, it is pointless.
6205 (getargs): When there is an incorrect number of arguments, make it
6206 an error, and report it GNUlically thanks to `usage ()'.
6207
724ce7f5
PE
62082002-10-18 Paul Eggert <eggert@twinsun.com>
6209
3a781eb2
PE
6210 * data/glr.c (yyreportParseError): Don't assume that sprintf
6211 yields the length of the printed string, as this is not true
6212 on SunOS 4.1.4. Reported by Peter Klein.
6213
724ce7f5
PE
6214 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
6215 * tests/conflicts.at (%nonassoc and eof): Likewise.
6216 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
6217
473d0a75
AD
62182002-10-17 Akim Demaille <akim@epita.fr>
6219
6220 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
6221 * src/getargs.c (trace_types, trace_args): Adjust.
6222 * src/reader.c (grammar_current_rule_prec_set)
6223 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
6224 Standardize error messages.
6225 And s/@prec/%prec/!
6226 (reader): Use trace_flag to enable scanner/parser debugging,
6227 instead of an adhoc scheme.
6228 * src/scan-gram.l: Remove trailing debugging code.
6229
e76d2469
PE
62302002-10-16 Paul Eggert <eggert@twinsun.com>
6231
93e2236a
PE
6232 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
6233 MUSCLE_TAB_H.
6234
e76d2469
PE
6235 * NEWS: Officially drop support for building Bison with K&R C,
6236 since it didn't work anyway and it's not worth worrying about.
6237 * Makefile.maint (wget_files): Remove ansi2knr.c.
6238 (ansi2knr.c-url_prefix): Remove.
6239 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
6240 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6241 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
6242
5bd1c419
PE
62432002-10-15 Paul Eggert <eggert@twinsun.com>
6244
6245 Stop using the "enum_" trick for K&R-style function definitions;
6246 it confused me, and I was the author! Instead, assume that people
6247 who want to use K&R C compilers (when using these modules in GCC,
6248 perhaps?) will run ansi2knr.
6249
6250 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
6251 All uses of "enum_" changed to "enum ".
6252 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6253 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 6254
5bd1c419
PE
6255 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
6256 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
6257 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
6258 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
6259 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
6260 abitset_not, abitset_ones, abitset_or, abitset_or_and,
6261 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
6262 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
6263 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
6264 Use function prototypes; this removes the need for declaring
6265 static functions simply to provide their prototypes.
6266 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
6267 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
6268 bitset_count_, bitset_create, bitset_dump, bitset_first,
6269 bitset_free, bitset_init, bitset_last, bitset_next,
6270 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
6271 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
6272 bitset_print, bitset_release_memory, bitset_toggle_,
6273 bitset_type_choose, bitset_type_get, bitset_type_name_get,
6274 debug_bitset): Likewise.
6275 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
6276 * lib/bitset_stats.c (bitset_log_histogram_print,
6277 bitset_percent_histogram_print, bitset_stats_and,
6278 bitset_stats_and_cmp, bitset_stats_and_or,
6279 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
6280 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
6281 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
6282 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
6283 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
6284 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
6285 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
6286 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
6287 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
6288 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
6289 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
6290 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
6291 bitset_stats_zero): Likewise.
6292 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6293 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6294 bitsetv_dump, debug_bitsetv): Likewise.
6295 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
6296 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
6297 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
6298 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
6299 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
6300 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
6301 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
6302 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
6303 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
6304 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
6305 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
6306 Likewise.
6307 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
6308 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
6309 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
6310 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
6311 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
6312 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
6313 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
6314 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
6315 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
6316 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
6317 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 6318
ae26e1f0
AD
63192002-10-14 Akim Demaille <akim@epita.fr>
6320
6321 Version 1.75.
6322
d43baf71
AD
63232002-10-14 Akim Demaille <akim@epita.fr>
6324
6325 * tests/Makefile.am (maintainer-check-posix): New.
6326
7ebc83e3
AD
63272002-10-14 Akim Demaille <akim@epita.fr>
6328
6329 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
6330 member.
6331
05846dae
AD
63322002-10-14 Akim Demaille <akim@epita.fr>
6333
6334 * src/tables.c (table_ninf_remap): base -> tab.
6335 Reported by Matt Rosing.
6336
1318e37d
PE
63372002-10-14 Paul Eggert <eggert@twinsun.com>
6338
447fbb17
PE
6339 * tests/action.at, tests/calc.at, tests/conflicts.at,
6340 tests/cxx-type.at, tests/headers.at, tests/input.at,
6341 tests/regression.at, tests/synclines.at, tests/torture.at:
6342 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
6343 so that the tests still work even if POSIXLY_CORRECT is set.
6344 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 6345
1318e37d
PE
6346 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
6347 for portability to K&R hosts. Fix typo: signed char is guaranteed
6348 only to 127, not to 128.
6349 * data/glr.c (yysigned_char): New type.
6350 * data/yacc.c (yysigned_char): Likewise.
6351 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
6352
cc0f0794
PE
63532002-10-13 Paul Eggert <eggert@twinsun.com>
6354
5038f418
PE
6355 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
6356 true due to limited range of data type" warning from GCC.
6357
cc0f0794
PE
6358 * data/c.m4 (b4_token_defines): Protect against double-inclusion
6359 by wrapping enum yytokentype's definition inside #ifndef
6360 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
6361
6fed0802
AD
63622002-10-13 Akim Demaille <akim@epita.fr>
6363
6364 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
6365 Un yy- yyrhs to avoid the name clash with the global YYRHS.
6366
32f0598d
AD
63672002-10-13 Akim Demaille <akim@epita.fr>
6368
6369 * Makefile.maint: Update from Autoconf 2.54.
6370 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
6371
7ea9a33f
AD
63722002-10-13 Akim Demaille <akim@epita.fr>
6373
6374 * src/print.c (print_state): Separate the list of solved conflicts
6375 from the other items.
6376 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
6377
ea99527d
AD
63782002-10-13 Akim Demaille <akim@epita.fr>
6379
6380 Let nondeterministic skeletons be usable with deterministic
6381 tables.
6382
6383 With the patch, GAWK compiled by GCC without -O2 passes its test
6384 suite using a GLR parser driven by LALR tables. It fails with -O2
6385 because `struct stat' gives two different answers on my machine:
6386 88 (definition of an auto var) and later 96 (memset on this var).
6387 Hence the stack is badly corrumpted. The headers inclusion is to
6388 blame: if I move the awk.h inclusion before GLR's system header
6389 inclusion, the two struct stat have the same size.
6390
6391 * src/tables.c (pack_table): Always create conflict_table.
6392 (token_actions): Always create conflict_list.
6393 * data/glr.c (YYFLAG): Remove, unused.
6394
f377f69f
AD
63952002-10-13 Akim Demaille <akim@epita.fr>
6396
6397 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
6398 (O0FLAGS): New.
6399 (VALGRIND, GXX): New.
6400 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
6401 * tests/bison.in: Run $PREBISON a pre-command.
6402 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
6403 (maintainer-check-g++): New.
6404 * Makefile.am (maintainer-check): New.
6405
2a1fe6ed
AD
64062002-10-13 Akim Demaille <akim@epita.fr>
6407
6408 * data/glr.c: Formatting changes.
6409 Tweak some trace messages to match yacc.c's.
6410
f50adbbd
AD
64112002-10-13 Akim Demaille <akim@epita.fr>
6412
6413 GLR parsers sometimes raise parse errors instead of performing the
6414 default reduction.
6415 Reported by Charles-Henry de Boysson.
6416
6417 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 6418 check the length of the traces when %glr.
f50adbbd
AD
6419 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
6420 GLR's traces.
6421 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
6422 Test GLR parsers.
6423 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
6424 (yyltype): Remove the yy prefix from the member names.
6425 (yytable): Complete its comment.
6426 (yygetLRActions): Map error action number from YYTABLE from
6427 YYTABLE_NINF to 0.
6428 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
6429 (which was a bug: it should have been YYTABEL_NINF, and yet it was
6430 not satisfying as we could compare an YYACTION computed from
6431 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
6432 only value for error actions.
6433 (yyreportParseError): In verbose parse error messages, don't issue
6434 `error' in the list of expected tokens.
6435 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
6436 next action to perform to match glr.c's decoding.
6437 (yytable): Complete its comment.
6438
bcbad5b9
PE
64392002-10-13 Paul Eggert <eggert@twinsun.com>
6440
6441 Fix problem reported by Henrik Grubbstroem in
161a71f3 6442 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
6443 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
6444 because the Bison parser reads the second action before reducing
6445 the first one.
6446 * src/scan-gram.l (rule_length): New static var.
6447 Use it to keep track of the rule length in the scanner, since
6448 we can't expect the parser to be in lock-step sync with the scanner.
6449 (handle_action_dollar, handle_action_at): Use this var.
6450 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 6451
14904b89
PE
64522002-10-12 Paul Eggert <eggert@twinsun.com>
6453
1fe611e5
PE
6454 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
6455 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
6456 Include <sys/time.h> when checking for clock_t and struct tms.
6457 Use same include order as source.
6458 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 6459 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 6460
1fe611e5
PE
6461 * lib/timevar.c: Update copyright date and clarify comments.
6462 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 6463
1fe611e5
PE
6464 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
6465 GCC version as of today, then merge Bison's changes.
6466 Change "GCC" to "Bison" in copyright notice. timevar.def's
6467 author is Akim, so change that too.
6468
98194095
PE
6469 * src/reader.c (grammar_current_rule_check):
6470 Don't worry about the default action if $$ is untyped.
6471 Prevents bogus warnings reported by Jim Gifford in
161a71f3 6472 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 6473
14904b89
PE
6474 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
6475 * data/glr.c, data/lalr1.cc, data/yacc.c:
6476 Output token definitions before the first part of user declarations.
6477 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 6478 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 6479
ff6dca18
PE
64802002-10-11 Paul Eggert <eggert@twinsun.com>
6481
6482 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
6483 (yyparse): here. This undoes some of the 2002-07-25 change.
6484 Compatibility problem reported by Ralf S. Engelschall with
6485 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
6486
eb714592
AD
64872002-10-11 Akim Demaille <akim@epita.fr>
6488
6489 * tests/regression.at Characters Escapes): New.
6490 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
6491 characters.
6492 Reported by Jan Nieuwenhuizen.
6493
b7195100
AD
64942002-10-11 Akim Demaille <akim@epita.fr>
6495
6496 * po/id.po: New.
6497
f28a0f2d
PE
64982002-10-10 Paul Eggert <eggert@twinsun.com>
6499
6500 Portability fixes for bitsets; this also avoids several GCC
6501 warnings.
6502
6503 * lib/abitset.c: Include <stddef.h>, for offsetof.
6504 * lib/lbitset.c: Likewise.
6505
6506 * lib/abitset.c (abitset_bytes): Return a size that is aligned
6507 properly for vectors of objects. Do not assume that adding a
6508 header size to a multiple of a word size yields a value that is
6509 properly aligned for the whole union.
6510 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6511
6512 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
6513 unique names for structures.
6514 * lib/ebitset.c (ebitset_bytes): Likewise.
6515 * lib/lbitset.c (lbitset_bytes): Likewise.
6516
6517 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
6518 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
6519 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
6520 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
6521 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
6522 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
6523 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
6524 to improve the type-checking that GCC can do.
6525 * lib/bitset.c (bitset_op4_cmp): Likewise.
6526 * lib/bitset_stats.c (bitset_stats_count,
6527 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
6528 bitset_stats_copy, bitset_stats_disjoint_p,
6529 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
6530 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
6531 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
6532 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
6533 bitset_stats_and_or_cmp, bitset_stats_andn_or,
6534 bitset_stats_andn_or_cmp, bitset_stats_or_and,
6535 bitset_stats_or_and_cmp): Likewise.
6536 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
6537 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
6538 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
6539 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
6540
6541 * lib/abitset.h: Include bitset.h, not bbitset.h.
6542 * lib/ebitset.h: Likewise.
6543 * lib/lbitset.h: Likewise.
6544
6545 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
6546 All instances of parameters of type enum bitset_opts are now of
6547 type enum_bitset_opts, to conform to the C Standard, and similarly
6548 for enum_bitset_type.
6549 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6550 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6551
6552 Do not use "struct bitset_struct" to mean different things in
6553 different modules. Not only is this confusing, it violates
6554 the C Standard, which requires that structure types in different
6555 modules must be compatible if one is to be passed to the other.
6556 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
6557 All instances of "struct bitset_struct *" replaced with "bitset".
6558 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
6559 (union bitset_union, struct abitset_struct, struct ebitset_struct,
6560 struct lbitset_struct, struct bitset_stats_struct): New types.
6561 All uses of struct bitset_struct changed to union bitset_union,
6562 etc.
ba0fe3c7 6563 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
6564 struct bitset_struct): Remove.
6565 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
6566 struct bitset_struct): Remove.
6567 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
6568 bitset_struct): Remove.
6569 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
6570 Likewise.
6571
6572 Do not call a function of type T using a call that assumes the
6573 function is of a different type U. Standard C requires that a
6574 function must be called with a type that is compatible with its
6575 definition.
6576 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6577 New decls.
6578 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6579 New functions.
6580 * lib/ebitset.c (PFV): Remove.
6581 * lib/lbitset.c (PFV): Likewise.
6582 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
6583 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
6584 decls.
6585 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
6586 (ebitset_vtable): Use them.
6587 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
6588 lbitset_xor): New functions.
6589 (lbitset_vtable): Use them.
6590
6591 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
6592 Declare.
6593
6594 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
6595 GCC warning.
6596 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
6597 Use offsetof, for simplicity.
6598
6fbe4984
PE
65992002-10-06 Paul Eggert <eggert@twinsun.com>
6600
6601 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
6602 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 6603 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
6604 which was inadvertently undone by the 2002-09-30 patch.
6605 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
6606 the same width as int.
6607
420f93c8
PE
66082002-10-04 Paul Eggert <eggert@twinsun.com>
6609
6610 Version 1.50.
6611
6612 * configure.ac (AC_INIT), NEWS: Increment version number.
6613
6614 * doc/bison.texinfo: Minor spelling, grammar, and white space
6615 fixes.
6616 (Symbols): Mention that any negative value returned from yylex
6617 signifies end-of-input. Warn about negative chars. Mention
6618 the portable Standard C character set.
6619
6620 The GNU coding standard says CFLAGS and YFLAGS are reserved
6621 for the installer to set.
6622 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
6623 * src/Makefile.am (AM_CFLAGS): Likewise.
6624 (AM_YFLAGS): Renamed from YFLAGS.
6625
6626 Fix some MAX and MIN problems.
6627 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
6628 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
6629 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
6630 * src/reader.c (reader): Use it.
6631
6632 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
6633 POSIX 1003.1-2001 has removed fgrep.
6634
66352002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6636
6637 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
6638 interpreted as signed.
6639 * lib/ebitset.c (ebitset_list): Fix bug.
6640
ff68026d
PE
66412002-10-01 Paul Eggert <eggert@twinsun.com>
6642
6643 More fixes for 64-bit hosts and large bitsets.
6644
6645 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
6646 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
6647 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
6648 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
6649 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
6650 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
6651 bitset_count_): Likewise.
6652 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
6653 bitset_first, bitset_last): Likewise.
6654 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
6655 bitset_stats_list_reverse, bitset_stats_size,
6656 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
6657 Likewise.
6658 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6659 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6660 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6661 bitsetv_reflexive_transitive_closure): Likewise.
6662 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
6663 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
6664 Likewise.
6665 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
6666 Likewise.
420f93c8 6667
ff68026d
PE
6668 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
6669 Use size_t, not unsigned int, to count bytes.
6670 * lib/abitset.h (abitset_bytes): Likewise.
6671 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
6672 Likewise.
6673 * lib/bitset.h (bitset_bytes): Likewise.
6674 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
6675 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
6676 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6677 * lib/ebitset.c (ebitset_bytes): Likewise.
6678 * lib/ebitset.h (ebitset_bytes): Likewise.
6679 * lib/lbitset.c (lbitset_bytes): Likewise.
6680 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 6681
ff68026d
PE
6682 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
6683 abitset_subset_p, abitset_disjoint_p, abitset_and,
6684 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
6685 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
6686 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
6687 abitset_or_and, abitset_or_and_cmp):
6688 Use bitset_windex instead of unsigned int.
6689 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6690 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
6691 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
6692 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
6693 Likewise.
6694 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 6695
ff68026d
PE
6696 * lib/bitset.c (bitset_print):
6697 Use proper printf formats for widths of integer types.
6698 * lib/bitset_stats.c (bitset_percent_histogram_print,
6699 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
6700 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6701 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6702 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 6703
ff68026d
PE
6704 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
6705 BITSET_SIZE_MAX): New macros.
6706 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
6707 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
6708 to BITSET_WINDEX_MAX.
6709
6710 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
6711 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
6712 since we now return the bitset_bindex type (not int).
6713
6714 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
6715 when computing sizes.
6716 * lib/ebitset.c (ebitset_elts_grow): Likewise.
6717
6718 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
6719 and avoid cast to unsigned.
6720
6aa452a6
AD
67212002-09-30 Akim Demaille <akim@epita.fr>
6722
6723 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6724 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
6725 Updates from Michael Hayes.
6726
927f7817
AD
67272002-09-30 Art Haas <ahaas@neosoft.com>
6728
6729 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
6730 invocations.
6731 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
6732 defined.
6733
9738f41e
AD
67342002-09-27 Akim Demaille <akim@epita.fr>
6735
6736 Version 1.49c.
6737
a5c75d7f
AD
67382002-09-27 Akim Demaille <akim@epita.fr>
6739
6740 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
6741 (Because of AC_LIBSOURCE).
6742
8280e179
AD
67432002-09-27 Akim Demaille <akim@epita.fr>
6744
6745 Playing with Autoscan.
6746
6747 * configure.ac: Remove the old LIBOBJ tweaks.
6748 (AC_REPLACE_FUNCS): Add strrchr and strtol.
6749 * lib/strrchr.c: New.
6750 * lib/strtol.c: New, from the Coreutils 4.5.1.
6751
ae64af35
AD
67522002-09-27 Akim Demaille <akim@epita.fr>
6753
6754 Playing with Autoscan.
6755
6756 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
6757 * lib/Makefile.am (libbison_a_SOURCES): No longer include
6758 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
6759 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
6760 Coreutils 4.5.1.
6761
d1a1114f
AD
67622002-09-24 Akim Demaille <akim@epita.fr>
6763
6764 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
6765 (Frequently Asked Questions, Parser Stack Overflow): New.
6766
b906441c
AD
67672002-09-13 Akim Demaille <akim@epita.fr>
6768
6769 Playing with autoscan.
6770
6771 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
6772 * src/files.c (skeleton_find): Remove, unused.
6773 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
6774 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
6775
bd701811
AD
67762002-09-13 Akim Demaille <akim@epita.fr>
6777
6778 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
6779 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
6780
e0a13e7b
AD
67812002-09-13 Akim Demaille <akim@epita.fr>
6782
6783 * configure.ac: Require 2.54.
6784 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
6785 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
6786 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
6787 Remove, provided by Autoconf macros.
6788
c97011bf
AD
67892002-09-12 Akim Demaille <akim@epita.fr>
6790
6791 * m4/prereq.m4: Update, from Coreutils 4.5.1.
6792
d862b1be
AD
67932002-09-12 Akim Demaille <akim@epita.fr>
6794
6795 * m4/prereq.m4: Update, from Fileutils 4.1.5.
6796 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
6797 Reported by Martin Mokrejs.
6798
3d38c03a
AD
67992002-09-10 Akim Demaille <akim@epita.fr>
6800
6801 * src/parse-gram.y: Associate a human readable string to each
6802 token type.
6803 * tests/regression.at (Invalid inputs): Adjust.
6804
b6347355
AD
68052002-09-10 Gary V. Vaughan <gary@gnu.org>
6806
6807 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
6808 with an Autoconf-2.5x style configure.ac.
6809
09ba4ab2
PE
68102002-09-06 Paul Eggert <eggert@twinsun.com>
6811
6812 * doc/bison.texinfo (Conditions): Make explicit that the GPL
6813 exception applies only to yacc.c. This is a modification of a
6814 patch originally suggested by Akim Demaille.
6815
21846f69
AD
68162002-09-06 Akim Demaille <akim@epita.fr>
6817
09ba4ab2
PE
6818 * data/c.m4 (b4_copyright): Move the GPL exception comment from
6819 here to...
6820 * data/yacc.c: here.
6821
21846f69
AD
6822 * data/lalr1.cc (struct yyltype): Don't define it, since we use
6823 LocationType.
6824 (b4_ltype): Default to yy::Location from location.hh.
6825
c0ad8bf3
AD
68262002-09-04 Jim Meyering <jim@meyering.net>
6827
6828 * data/yacc.c: Guard the declaration of yytoknum also with
6829 `#ifdef YYPRINT', so it is declared only when used.
6830
3a93251e
AD
68312002-09-04 Akim Demaille <akim@epita.fr>
6832
6833 * configure.in: Rename as...
6834 * configure.ac: this.
6835 Bump to 1.49c.
6836
427c0dda
AD
68372002-09-04 Akim Demaille <akim@epita.fr>
6838
6839 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
6840 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
6841 translate maintainer only messages.
6842
6a254321
PE
68432002-08-12 Paul Eggert <eggert@twinsun.com>
6844
645e30d1
PE
6845 Version 1.49b.
6846
6a254321
PE
6847 * Makefile.am (SUBDIRS): Remove intl.
6848 (DISTCLEANFILES): Remove.
6849 * NEWS: Mention that GNU M4 is now required. Clarify what is
6850 meant by "larger grammars". Mention the pt_BR translation.
6851 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
6852 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
6853 Bump version from 0.11.2 to 0.11.5.
6854 (BISON_PREREQ_STAGE): Remove.
6855 (AM_GNU_GETTEXT): Use external gettext.
6856 (AC_OUTPUT): Remove intl/Makefile.
6857
6858 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
6859
6860 * data/glr.c: Include string.h, for strlen.
6861 (yyreportParseError): Use size_t for yysize.
6862 (yy_yypstack): No longer nested inside yypstates, as nested
6863 functions are not portable. Do not assume size_t is the
6864 same width as int.
6865 (yypstates): Do not assume that ptrdiff_t is the same width
6866 as int, and similarly for yyposn and YYINDEX.
6867
6868 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
6869
6870 * lib/Makefile.am (INCLUDES): Do not include from the intl
6871 directory, which has been removed.
6872 * src/Makefile.am (INCLUDES): Likewise.
6873
6874 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
6875 (bitsets_sources, additional_bitsets_sources, timevars_sources):
6876 New vars.
6877
6878 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
6879 * tests/Makefile.am (EXTRA_DIST): Likewise.
6880
6881 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
6882 Do not assume that bitset_windex is the same width as unsigned.
6883
6884 * lib/abitset.c (abitset_unused_clear): Do not assume that
6885 bitset_word is the same width as int.
6886 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
6887 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
6888 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
6889 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
6890 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
6891
6892 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
6893 portability to one's complement hosts!).
6894 * lib/ebitset.c (ebitset_op1): Likewise.
6895 * lib/lbitset.c (lbitset_op1): Likewise.
6896
6897 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
6898 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6899 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
6900 Sync with fileutils.
6901 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
6902 lib/gettext.h: Sync with diffutils.
6903
6904 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
6905 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
6906
6907 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
6908 PROTOTYPES to check for prototypes, and "defined __STDC__" to
6909 check for void *.
6910
6911 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
6912 size_t; the old version tried to do this but casted improperly.
6913 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
6914 (bitset_test): Now returns int, not unsigned long.
6915
6916 * lib/bitset_stats.c: Include "gettext.h".
6917 (_): New macro.
6918 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
6919 name locals "index", as it generates unnecessary warnings on some
6920 hosts that have an "index" function.
6921
6922 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
6923 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
6924 they need translation.
6925 * src/LR0.c (state_list_append, new_itemsets, get_state,
6926 append_states, generate_states): Likewise.
6927 * src/assoc.c (assoc_to_string): Likewise.
6928 * src/closure.c (print_closure, set_firsts, closure): Likewise.
6929 * src/gram.c (grammar_dump): Likewise.
6930 * src/injections.c (injections_compute): Likewise.
6931 * src/lalr.c (lookaheads_print): Likewise.
6932 * src/relation.c (relation_transpose): Likewise.
6933 * src/scan-gram.l: Likewise.
6934 * src/tables.c (table_grow, pack_vector): Likewise.
6935
6936 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
6937 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
6938 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
6939 * m4/mbstate_t.m4: Sync with fileutils.
6940 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
6941
6942 * po/LINGUAS: Add pt_BR.
6943 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
6944 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
6945 lib/timevar.c.
6946 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
6947 manual recommends.
6948 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
6949
6950 * src/complain.c (strerror_r): Remove decl; not needed.
6951 (strerror): Use same pattern as ../lib/error.c.
6952
6953 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
6954
6955 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
6956
6957 * src/main.c (main): Cast result of bindtextdomain and textdomain
6958 to void, to avoid a GCC warning when --disable-nls is in effect.
6959
6960 * src/scan-gram.l: Use strings rather than escapes when possible,
6961 to minimize the number of warnings from xgettext.
6962 (handle_action_dollar, handle_action_at): Don't use isdigit,
6963 as it mishandles negative chars and it may not work as expected
6964 outside the C locale.
6965
6966 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6967 this is a GCC extension and is not portable to other compilers.
6968
6969 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6970 Do not include <ctype.h>; no longer needed.
6971 Do not include <malloc.h>; no longer needed (and generates
6972 warnings on OpenBSD 3.0).
6973
6974 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6975 it's not portable.
6976
6977 * tests/regression.at: Do not use 'cc -c input.c -o input';
6978 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6979
6980 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6981 exit status as failure, not just exit status 1. Sun C exits
6982 with status 2 sometimes.
6983
6984 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6985 Use it for the two large tests.
6986
c8f002c7
AD
69872002-08-02 Akim Demaille <akim@epita.fr>
6988
6989 * src/conflicts.c (conflicts_output): Don't output rules never
6990 reduced here, since anyway that computation doesn't work.
6991 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6992 (rule_useless_p, rule_never_reduced_p): New.
6993 (grammar_rules_partial_print): Use a filter instead of a range.
6994 Display the title only if needed.
6995 (grammar_rules_print): Adjust.
6996 (grammar_rules_never_reduced_report): New.
6997 * src/tables.c (action_row): Move the computation of rules never
6998 reduced to...
6999 (token_actions): here.
7000 * src/main.c (main): Make the parser before making the report, so
7001 that rules never reduced are computed.
7002 Call grammar_rules_never_reduced_report.
7003 * src/print.c (print_results): Report rules never reduced.
7004 * tests/conflicts.at, tests/reduce.at: Adjust.
7005
cd08e51e
AD
70062002-08-01 Akim Demaille <akim@epita.fr>
7007
7008 Instead of attaching lookaheads and duplicating the rules being
7009 reduced by a state, attach the lookaheads to the reductions.
7010
7011 * src/state.h (state_t): Remove the `lookaheads',
7012 `lookaheads_rule' member.
7013 (reductions_t): Add a `lookaheads' member.
7014 Use a regular array for the `rules'.
7015 * src/state.c (reductions_new): Initialize the lookaheads member
7016 to 0.
7017 (state_rule_lookaheads_print): Adjust.
7018 * src/state.h, src/state.c (state_reductions_find): New.
7019 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
7020 (count_rr_conflicts): Adjust.
7021 * src/lalr.c (LArule): Remove.
7022 (add_lookback_edge): Adjust.
7023 (state_lookaheads_count): New.
7024 (states_lookaheads_initialize): Merge into...
7025 (initialize_LA): this.
7026 (lalr_free): Adjust.
7027 * src/main.c (main): Don't free nullable and derives too early: it
7028 is used by --verbose.
7029 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
7030
bb0027a9
AD
70312002-08-01 Akim Demaille <akim@epita.fr>
7032
7033 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
7034 `rule_number_t**'.
7035 (set_derives, free_derives): Rename as...
7036 (derives_compute, derives_free): this.
7037 Adjust all dependencies.
7038 * src/nullable.c (set_nullable, free_nullable): Rename as...
7039 (nullable_compute, nullable_free): these.
7040 (rule_list_t): Store rule_t *, not rule_number_t.
7041 * src/state.c (state_rule_lookaheads_print): Directly compare rule
7042 pointers, instead of their numbers.
7043 * src/main.c (main): Call nullable_free, and derives_free earlier,
7044 as they were lo longer used.
7045
3325ddc4
AD
70462002-08-01 Akim Demaille <akim@epita.fr>
7047
7048 * lib/timevar.c (get_time): Include children time.
7049 * src/lalr.h (LA, LArule): Don't export them: used with the
7050 state_t.
7051 * src/lalr.c (LA, LArule): Static.
7052 * src/lalr.h, src/lalr.c (lalr_free): New.
7053 * src/main.c (main): Call it.
7054 * src/tables.c (pack_vector): Check whether loc is >= to the
7055 table_size, not >.
7056 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
7057 (tables_generate): do it, since that's also it which allocates
7058 them.
7059 Don't free LA and LArule, main does.
7060
c6f1a33c
AD
70612002-07-31 Akim Demaille <akim@epita.fr>
7062
7063 Separate parser tables computation and output.
7064
7065 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
7066 (conflict_list, conflict_list_cnt, table, check, table_ninf)
7067 (yydefgoto, yydefact, high): Move to...
7068 * src/tables.h, src/tables.c: here.
7069 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
7070 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
7071 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
7072 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
7073 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
7074 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
7075 (action_row, save_row, token_actions, save_column, default_goto)
7076 (goto_actions, sort_actions, matching_state, pack_vector)
7077 (table_ninf_remap, pack_table, prepare_actions): Move to...
7078 * src/tables.c: here.
7079 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
7080 * src/output.c (token_actions, output_base, output_conflicts)
7081 (output_check): Merge into...
7082 (prepare_actions): this.
7083 (actions_output): Rename as...
7084 (user_actions_output): this.
7085 * src/main.c (main): Call tables_generate and tables_free.
7086
1509d42f
AD
70872002-07-31 Akim Demaille <akim@epita.fr>
7088
7089 Steal GCC's --time-report support.
7090
7091 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
7092 stolen/adjusted from GCC.
7093 * m4/stage.m4: Remove time related checks.
7094 * m4/timevar.m4: New.
7095 * configure.in: Adjust.
7096 * src/system.h: Adjust to using timevar.h.
7097 * src/getargs.h, src/getargs.c: Support trace_time for
7098 --trace=time.
7099 * src/main.c (stage): Remove.
7100 (main): Replace `stage' invocations with timevar calls.
7101 * src/output.c: Insert pertinent timevar calls.
7102
273a74fa
AD
71032002-07-31 Akim Demaille <akim@epita.fr>
7104
7105 Let --trace have arguments.
7106
7107 * src/getargs.h (enum trace_e): New.
7108 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
7109 (long_options, short_options): --trace/-T takes an optional
7110 argument.
7111 Change all the uses of trace_flag to reflect the new flags.
7112 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
7113
7114 Strengthen `stage' portability.
7115
7116 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
7117 * configure.in: Use it.
7118 Don't check for malloc.h and sys/times.h.
7119 * src/system.h: Include them when appropriate.
7120 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
7121 times and struct tms are available.
7122
217598da
AD
71232002-07-30 Akim Demaille <akim@epita.fr>
7124
7125 In verbose parse error message, don't report `error' as an
7126 expected token.
7127 * tests/actions.at (Printers and Destructors): Adjust.
7128 * tests/calc.at (Calculator $1): Adjust.
7129 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
7130 error message, do not report the parser accepts the error token in
7131 that state.
7132
52489d44
AD
71332002-07-30 Akim Demaille <akim@epita.fr>
7134
7135 Normalize conflict related messages.
7136
7137 * src/complain.h, src/complain.c (warn, complain): New.
7138 * src/conflicts.c (conflicts_print): Use them.
7139 (conflict_report_yacc): New, extracted from...
7140 (conflicts_print): here.
7141 * tests/conflicts.at, tests/existing.at: Adjust.
7142
e8832397
AD
71432002-07-30 Akim Demaille <akim@epita.fr>
7144
7145 Report rules which are never reduced by the parser: those hidden
7146 by conflicts.
7147
7148 * src/LR0.c (save_reductions): Don't make the final state too
7149 different: save its reduction (accept) instead of having a state
7150 without any action (no shift or goto, no reduce).
7151 Note: the final state is now a ``regular'' state, i.e., the
7152 parsers now contain `reduce 0' as default reduction.
7153 Nevertheless, since they decide to `accept' when yystate =
7154 final_state, they still will not reduce rule 0.
7155 * src/print.c (print_actions, print_reduction): Adjust.
7156 * src/output.c (action_row): Track reduced rules.
7157 (token_actions): Report rules never reduced.
7158 * tests/conflicts.at, tests/regression.at: Adjust.
7159
caf23d24
AD
71602002-07-30 Akim Demaille <akim@epita.fr>
7161
7162 `stage' was accidently included in a previous patch.
7163 Initiate its autoconfiscation.
7164
7165 * configure.in: Look for malloc.h and sys/times.h.
7166 * src/main.c (stage): Adjust.
7167 Report only when trace_flag.
7168
640748ee
AD
71692002-07-29 Akim Demaille <akim@epita.fr>
7170
7171 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
7172 state_number_t.
7173 (errs_t): symbol_t*, not symbol_number_t.
7174 (reductions_t): rule_t*, not rule_number_t.
7175 (FOR_EACH_SHIFT): New.
7176 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
7177 * src/print.c, src/print_graph.c: Adjust.
7178
88bce5a2
AD
71792002-07-29 Akim Demaille <akim@epita.fr>
7180
7181 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
7182
7183 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
7184 (endtoken, accept): these.
7185 * src/reader.c (reader): Set endtoken's default tag to "$end".
7186 Set undeftoken's tag to "$undefined" instead of "$undefined.".
7187 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
7188 Adjust.
7189
1bfb97db
AD
71902002-07-29 Akim Demaille <akim@epita.fr>
7191
7192 * src/reduce.c (reduce_grammar): When the language is empty,
7193 complain about the start symbol, not the axiom.
7194 Use its location.
7195 * tests/reduce.at (Empty Language): New.
7196
fc5734fe
AD
71972002-07-26 Akim Demaille <akim@epita.fr>
7198
7199 * src/reader.h, src/reader.c (gram_error): ... can't get
7200 yycontrol without making too strong assumptions on the parser
7201 itself.
7202 * src/output.c (prepare_tokens): Use the real 0th value of
7203 token_translations instead of `0'.
7204 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
7205 visible here.
7206 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
7207 for the time being: %locations ought to provide it to yyerror.
7208
3650b4b8
AD
72092002-07-25 Akim Demaille <akim@epita.fr>
7210
7211 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
7212 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
7213 * tests/regression.at (Web2c Actions): Adjust.
7214
4b3d3a8e
AD
72152002-07-25 Akim Demaille <akim@epita.fr>
7216
7217 Stop storing rules from 1 to nrules + 1.
7218
7219 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
7220 * src/nullable.c, src/output.c, src/print.c, src/reader.c
7221 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
7222 Iterate from 0 to nrules.
7223 Use rule_number_as_item_number and item_number_as_rule_number.
7224 Adjust to `derive' now containing possibly 0.
7225 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
7226 Handle the `- 1' part in rule numbers from/to item numbers.
7227 * src/conflicts.c (log_resolution): Fix the message which reversed
7228 shift and reduce.
7229 * src/output.c (action_row): Initialize default_rule to -1.
7230 (token_actions): Adjust.
7231 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
7232 expected output.
7233 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
7234
4a2a22f4
AD
72352002-07-25 Akim Demaille <akim@epita.fr>
7236
7237 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
7238 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
7239 (b4_c_knr_arg_decl): New.
7240 * data/yacc.c: Use it to define yysymprint, yydestruct, and
7241 yyreport_parse_error.
7242
b8df3223
AD
72432002-07-25 Akim Demaille <akim@epita.fr>
7244
7245 * data/yacc.c (yyreport_parse_error): New, extracted from...
7246 (yyparse): here.
7247 (yydestruct, yysymprint): Move above yyparse.
7248 Be K&R compliant.
7249
a762e609
AD
72502002-07-25 Akim Demaille <akim@epita.fr>
7251
7252 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
7253 replace...
7254 (b4_sint_type, b4_uint_type): these.
7255 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
7256 * tests/regression.at (Web2c Actions): Adjust.
7257
12b0043a
AD
72582002-07-25 Akim Demaille <akim@epita.fr>
7259
7260 * src/gram.h (TIEM_NUMBER_MAX): New.
7261 (item_number_of_rule_number, rule_number_of_item_number): Rename
7262 as...
7263 (rule_number_as_item_number, item_number_as_rule_number): these.
7264 Adjust dependencies.
7265 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
7266 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
7267 (symbol_number_to_vector_number): New.
7268 (order): Of vector_number_t* type.
7269 (base_t, BASE_MAX, BASE_MIN): New.
7270 (froms, tos, width, pos, check): Of base_t type.
7271 (action_number_t, ACTION_MIN, ACTION_MAX): New.
7272 (actrow): Of action_number_t type.
7273 (conflrow): Of unsigned int type.
7274 (table_ninf, base_ninf): New.
7275 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
7276 (muscle_insert_int_table, muscle_insert_base_table)
7277 (muscle_insert_rule_number_table): New.
7278 (prepare_tokens): Output `toknum' as int_table.
7279 (action_row): Returns a rule_number_t.
7280 Use ACTION_MIN, not SHRT_MIN.
7281 (token_actions): yydefact is rule_number_t*.
7282 (table_ninf_remap): New.
7283 (pack_table): Use it for `base' and `table'.
7284 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
7285 replaced with...
7286 (YYPACT_NINF, YYTABLE_NINF): these.
7287 (yypact, yytable): Compute their types instead of hard-coded
7288 `short'.
7289 * tests/regression.at (Web2c Actions): Adjust.
7290
5dde258a
AD
72912002-07-19 Akim Demaille <akim@epita.fr>
7292
7293 * src/scan-gram.l (id): Can start with an underscore.
7294
a945ec39
AD
72952002-07-16 Akim Demaille <akim@epita.fr>
7296
7297 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
7298 Adjust all former `associativity' dependencies.
7299 * src/symtab.c (symbol_new): Default associativity is `undef', not
7300 `right'.
7301 (symbol_check_alias_consistence): Adjust.
7302
fae437e8
AD
73032002-07-09 Akim Demaille <akim@epita.fr>
7304
7305 * doc/bison.texinfo: Properly set the ``header'' part.
7306 Use @dircategory ``GNU programming tools'' as per Texinfo's
7307 documentation.
7308 Use @copying.
7309
1a715ef2
AD
73102002-07-09 Akim Demaille <akim@epita.fr>
7311
7312 * lib/quotearg.h: Protect against multiple inclusions.
7313 * src/location.h (location_t): Add a `file' member.
7314 (LOCATION_RESET, LOCATION_PRINT): Adjust.
7315 * src/complain.c (warn_at, complain_at, fatal_at): Drop
7316 `error_one_per_line' support.
7317
a5d50994
AD
73182002-07-09 Akim Demaille <akim@epita.fr>
7319
7320 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
7321 * src/reader.c (lineno): Remove.
7322 Adjust all dependencies.
7323 (get_merge_function): Take a location and use complain_at.
7324 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
7325 * tests/regression.at (Invalid inputs, Mixing %token styles):
7326 Adjust.
7327
b275314e
AD
73282002-07-09 Akim Demaille <akim@epita.fr>
7329
7330 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
7331 recovery rule, and forbid extensions when --yacc.
7332 (gram_error): Use complain_at.
7333 * src/reader.c (reader): Exit if there were parse errors.
7334
865b9df1
AD
73352002-07-09 Akim Demaille <akim@epita.fr>
7336
7337 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
7338 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
7339 Reported by R Blake <blakers@mac.com>.
7340
c76e14da
AD
73412002-07-09 Akim Demaille <akim@epita.fr>
7342
7343 * data/yacc.c: Output the copyright notive in the header.
7344
7db2ed2d
AD
73452002-07-03 Akim Demaille <akim@epita.fr>
7346
7347 * src/output.c (froms, tos): Are state_number_t.
7348 (save_column): sp, sp1, and sp2 are state_number_t.
7349 (prepare): Rename `final' as `final_state_number', `nnts' as
7350 `nterms_number', `nrules' as `rules_number', `nstates' as
7351 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
7352 unused.
7353 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
7354 * data/lalr1.cc (nsym_): Remove, unused.
7355
e68e0410
AD
73562002-07-03 Akim Demaille <akim@epita.fr>
7357
7358 * src/lalr.h, src/lalr.c (goto_number_t): New.
7359 * src/lalr.c (goto_list_t): New.
7360 Propagate them.
7361 * src/nullable.c (rule_list_t): New.
7362 Propagate.
7363 * src/types.h: Remove.
7364
e1a4f3a4
AD
73652002-07-03 Akim Demaille <akim@epita.fr>
7366
7367 * src/closure.c (print_fderives): Use rule_rhs_print.
7368 * src/derives.c (print_derives): Use rule_rhs_print.
7369 (rule_list_t): New, replaces `shorts'.
7370 (set_derives): Add comments.
7371 * tests/sets.at (Nullable, Firsts): Adjust.
7372
536545f3
AD
73732002-07-03 Akim Demaille <akim@epita.fr>
7374
7375 * src/output.c (prepare_actions): Free `tally' and `width'.
7376 (prepare_actions): Allocate and free `order'.
7377 * src/symtab.c (symbols_free): Free `symbols'.
7378 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
7379 * src/output.c (m4_invoke): Move to...
7380 * src/scan-skel.l: here.
7381 (<<EOF>>): Close yyout, and free its name.
7382
8b752b00
AD
73832002-07-03 Akim Demaille <akim@epita.fr>
7384
7385 Fix some memory leaks, and fix a bug: state 0 was examined twice.
7386
7387 * src/LR0.c (new_state): Merge into...
7388 (state_list_append): this.
7389 (new_states): Merge into...
7390 (generate_states): here.
7391 (set_states): Don't ensure a proper `errs' state member here, do it...
7392 * src/conflicts.c (conflicts_solve): here.
7393 * src/state.h, src/state.c: Comment changes.
7394 (state_t): Rename member `shifts' as `transitions'.
7395 Adjust all dependencies.
7396 (errs_new): For consistency, also take the values as argument.
7397 (errs_dup): Remove.
7398 (state_errs_set): New.
7399 (state_reductions_set, state_transitions_set): Assert that no
7400 previous value was assigned.
7401 (state_free): New.
7402 (states_free): Use it.
7403 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
7404 temporary storage: use `errs' and `nerrs' as elsewhere.
7405 (set_conflicts): Allocate and free this `errs'.
7406
613f5e1a
AD
74072002-07-02 Akim Demaille <akim@epita.fr>
7408
7409 * lib/libiberty.h: New.
7410 * lib: Update the bitset implementation from upstream.
7411 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
7412 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
7413 * src/main.c: Adjust bitset stats calls.
7414
26e0cadc
PE
74152002-07-01 Paul Eggert <eggert@twinsun.com>
7416
7417 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
7418 char, so that negative chars don't collide with $.
7419
1154cced
AD
74202002-06-30 Akim Demaille <akim@epita.fr>
7421
7422 Have the GLR tests be `warning' checked, and fix the warnings.
7423
7424 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
7425 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
7426 (yyremoveDeletes): `yyi' and `yyj' are size_t.
7427 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
7428 (yyaddDeferredAction): static.
7429 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
7430 (yyreportParseError): yyprefix is const.
7431 yytokenp is used only when verbose.
7432 (yy__GNUC__): Replace with __GNUC__.
7433 (yypdumpstack): yyi is size_t.
7434 (yypreference): Un-yy local variables and arguments, to avoid
7435 clashes with `yyr1'. Anyway, we are not in the user name space.
7436 (yytname_size): be an int, as is compared with ints.
7437 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
7438 Use them.
7439 * tests/cxx-gram.at: Use quotation to protect $1.
7440 Use AT_COMPILE to enable warnings hunts.
7441 Prototype yylex and yyerror.
7442 `Use' argc.
7443 Include `string.h', not `strings.h'.
7444 Produce and prototype stmtMerge only when used.
7445 yylex takes a location.
7446
97650f4e
AD
74472002-06-30 Akim Demaille <akim@epita.fr>
7448
7449 We spend a lot of time in quotearg, in particular when --verbose.
7450
7451 * src/symtab.c (symbol_get): Store a quoted version of the key.
7452 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
7453 Adjust all callers.
7454
d2576365
AD
74552002-06-30 Akim Demaille <akim@epita.fr>
7456
7457 * src/state.h (reductions_t): Rename member `nreds' as num.
7458 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
7459 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
7460
ccaf65bc
AD
74612002-06-30 Akim Demaille <akim@epita.fr>
7462
7463 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
7464 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
7465 (shifts_to): Rename as...
7466 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
7467 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
7468 (TRANSITION_IS_DISABLED, transitions_to): these.
7469
87675353
AD
74702002-06-30 Akim Demaille <akim@epita.fr>
7471
7472 * src/print.c (print_shifts, print_gotos): Merge into...
7473 (print_transitions): this.
7474 (print_transitions, print_errs, print_reductions): Align the
7475 lookaheads columns.
7476 (print_core, print_transitions, print_errs, print_state,
7477 print_grammar): Output empty lines separator before, not after.
7478 (state_default_rule_compute): Rename as...
7479 (state_default_rule): this.
7480 * tests/conflicts.at (Defaulted Conflicted Reduction),
7481 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
7482 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
7483
ce4ccb4b
AD
74842002-06-30 Akim Demaille <akim@epita.fr>
7485
7486 Display items as we display rules.
7487
7488 * src/gram.h, src/gram.c (rule_lhs_print): New.
7489 * src/gram.c (grammar_rules_partial_print): Use it.
7490 * src/print.c (print_core): Likewise.
7491 * tests/conflicts.at (Defaulted Conflicted Reduction),
7492 (Unresolved SR Conflicts): Adjust.
7493 (Unresolved SR Conflicts): Adjust and rename as...
7494 (Resolved SR Conflicts): this, as was meant.
7495 * tests/regression.at (Web2c Report): Adjust.
7496
bc933ef1
AD
74972002-06-30 Akim Demaille <akim@epita.fr>
7498
7499 * src/print.c (state_default_rule_compute): New, extracted from...
7500 (print_reductions): here.
7501 Pessimize, but clarify the code.
7502 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
7503
53d4308d
AD
75042002-06-30 Akim Demaille <akim@epita.fr>
7505
7506 * src/output.c (action_row): Let default_rule be always a rule
7507 number.
7508
574fb2d5
AD
75092002-06-30 Akim Demaille <akim@epita.fr>
7510
7511 * src/closure.c (print_firsts, print_fderives, closure):
7512 Use BITSET_EXECUTE.
7513 * src/lalr.c (lookaheads_print): Likewise.
7514 * src/state.c (state_rule_lookaheads_print): Likewise.
7515 * src/print_graph.c (print_core): Likewise.
7516 * src/print.c (print_reductions): Likewise.
7517 * src/output.c (action_row): Likewise.
7518 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
7519
05811fd7
AD
75202002-06-30 Akim Demaille <akim@epita.fr>
7521
7522 * src/print_graph.c: Use report_flag.
7523
0e4d5753
AD
75242002-06-30 Akim Demaille <akim@epita.fr>
7525
7526 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
7527 to...
7528 * src/relation.h, src/relation.c (traverse, relation_digraph)
7529 (relation_print, relation_transpose): New.
7530
24c7d800
AD
75312002-06-30 Akim Demaille <akim@epita.fr>
7532
7533 * src/state.h, src/state.c (shifts_to): New.
7534 * src/lalr.c (build_relations): Use it.
7535
9222837b
AD
75362002-06-30 Akim Demaille <akim@epita.fr>
7537
7538 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
7539 (item_number_of_rule_number, rule_number_of_item_number): New.
7540 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
7541 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7542 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
7543 Propagate their use.
7544 Much remains to be done, in particular wrt `shorts' from types.h.
7545
260008e5
AD
75462002-06-30 Akim Demaille <akim@epita.fr>
7547
7548 * src/symtab.c (symbol_new): Initialize the `printer' member.
7549
8a731ca8
AD
75502002-06-30 Akim Demaille <akim@epita.fr>
7551
7552 * src/LR0.c (save_reductions): Remove, replaced by...
7553 * src/state.h, src/state.c (state_reductions_set): New.
7554 (reductions, errs): Rename as...
7555 (reductions_t, errs_t): these.
7556 Adjust all dependencies.
7557
32e1e0a4
AD
75582002-06-30 Akim Demaille <akim@epita.fr>
7559
7560 * src/LR0.c (state_list_t, state_list_append): New.
7561 (first_state, last_state): Now symbol_list_t.
7562 (this_state): Remove.
7563 (new_itemsets, append_states, save_reductions): Take a state_t as
7564 argument.
7565 (set_states, generate_states): Adjust.
7566 (save_shifts): Remove, replaced by...
7567 * src/state.h, src/state.c (state_shifts_set): New.
7568 (shifts): Rename as...
7569 (shifts_t): this.
7570 Adjust all dependencies.
7571 * src/state.h (state_t): Remove the `next' member.
7572
e5fb6710
AD
75732002-06-30 Akim Demaille <akim@epita.fr>
7574
7575 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
7576 escaped in slot 0.
7577
c7ca99d4
AD
75782002-06-30 Akim Demaille <akim@epita.fr>
7579
7580 Use hash.h for the state hash table.
7581
7582 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
7583 (allocate_storage): Use state_hash_new.
7584 (free_storage): Use state_hash_free.
7585 (new_state, get_state): Adjust.
7586 * src/lalr.h, src/lalr.c (states): Move to...
7587 * src/states.h (state_t): Remove the `link' member, no longer
7588 used.
7589 * src/states.h, src/states.c: here.
7590 (state_hash_new, state_hash_free, state_hash_lookup)
7591 (state_hash_insert, states_free): New.
7592 * src/states.c (state_table, state_compare, state_hash): New.
7593 * src/output.c (output_actions): Do not free states now, since we
7594 still need to know the final_state number in `prepare', called
7595 afterwards. Do it...
7596 * src/main.c (main): here: call states_free after `output'.
7597
df0e7316
AD
75982002-06-30 Akim Demaille <akim@epita.fr>
7599
7600 * src/state.h, src/state.c (state_new): New, extracted from...
7601 * src/LR0.c (new_state): here.
7602 * src/state.h (STATE_ALLOC): Move to...
7603 * src/state.c: here.
7604 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
7605 * src/state.h, src/state.c: here.
7606
39f41916
AD
76072002-06-30 Akim Demaille <akim@epita.fr>
7608
7609 * src/reader.c (gensym): Rename as...
7610 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
7611 (getsym): Rename as...
7612 (symbol_get): this.
7613
d57650a5
AD
76142002-06-30 Akim Demaille <akim@epita.fr>
7615
7616 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
7617 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
7618 * src/output.c, src/print.c, src/print_graph.c: Propagate.
7619 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
7620
5a08f1ce
AD
76212002-06-30 Akim Demaille <akim@epita.fr>
7622
7623 Make the test suite pass with warnings checked.
7624
7625 * tests/actions.at (Printers and Destructors): Improve.
7626 Avoid unsigned vs. signed issues.
7627 * tests/calc.at: Don't exercise the scanner here, do it...
7628 * tests/input.at (Torturing the Scanner): here.
7629
720623af
PH
76302002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7631
88e7e941 7632 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
7633 reorganize first lines parallel to yacc.c.
7634
fb8135fa
AD
76352002-06-28 Akim Demaille <akim@epita.fr>
7636
7637 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
7638 (b4_token_enum, b4_token_defines): New, factored from...
7639 * data/lalr1.cc, data/yacc.c, glr.c: here.
7640
41442480
AD
76412002-06-28 Akim Demaille <akim@epita.fr>
7642
7643 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
7644 unused variables.
7645 * src/output.c (merger_output): static.
7646
e0e5bf84
AD
76472002-06-28 Akim Demaille <akim@epita.fr>
7648
ba0fe3c7 7649 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
7650 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
7651 pacify GCC.
7652 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 7653
676385e2
PH
76542002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7655
7656 Accumulated changelog for new GLR parsing features.
7657
6a254321 7658 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
7659 conflicts_total_count.
7660 * src/conflicts.h: Ditto.
7661 * src/output.c (token_actions): Use the new name.
7662 (output_conflicts): Change conflp => conflict_list_heads, and
7663 confl => conflict_list for better readability.
7664 * data/glr.c: Use the new names.
7665 * NEWS: Add self to GLR announcement.
e0e5bf84 7666
676385e2
PH
7667 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
7668
7669 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
7670 Akim Demaille.
7671
7672 * data/bison.glr: Change name to glr.c
7673 * data/glr.c: Renamed from bison.glr.
7674 * data/Makefile.am: Add glr.c
e0e5bf84
AD
7675
7676 * src/getargs.c:
7677
676385e2 7678 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 7679 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 7680
676385e2
PH
7681 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7682
7683 * data/bison.glr: Be sure to restore the
7684 current #line when returning to the skeleton contents after having
7685 exposed the input file's #line.
7686
7687 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7688
7689 * data/bison.glr: Bring up to date with changes to bison.simple.
7690
7691 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7692
7693 * data/bison.glr: Correct definitions that use b4_prefix.
7694 Various reformatting.
7695 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
7696 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
7697 yytokenp argument; now part of stack.
7698 (yychar): Define to behave as documented.
7699 (yyclearin): Ditto.
e0e5bf84 7700
676385e2
PH
7701 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7702
7703 * src/reader.h: Add declaration for free_merger_functions.
7704
7705 * src/reader.c (merge_functions): New variable.
7706 (get_merge_function): New function.
7707 (free_merger_functions): New function.
7708 (readgram): Check for %prec that is not followed by a symbol.
7709 Handle %dprec and %merge declarations.
7710 (packgram): Initialize dprec and merger fields in rules array.
7711
7712 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
7713 conflict_list_cnt, conflict_list_free): New variables.
7714 (table_grow): Also grow conflict_table.
e0e5bf84 7715 (prepare_rules): Output dprec and merger tables.
676385e2 7716 (conflict_row): New function.
e0e5bf84 7717 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
7718 default reduction in conflicted states for GLR parser so that there
7719 are spaces for the conflict lists.
7720 (save_row): Also save conflict information.
7721 (token_actions): Allocate conflict list.
7722 (merger_output): New function.
7723 (pack_vector): Pack conflict table, too.
7724 (output_conflicts): New function to output yyconflp and yyconfl.
7725 (output_check): Allocate conflict_tos.
7726 (output_actions): Output conflict tables, also.
7727 (output_skeleton): Output b4_mergers definition.
7728 (prepare): Output b4_max_rhs_length definition.
7729 Use 'bison.glr' as default skeleton for GLR parsers.
7730
7731 * src/gram.c (glr_parser): New flag.
7732 (grammar_free): Call free_merger_functions.
7733
7734 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
7735 all pairs of conflicting reductions, rather than just all tokens
7736 causing conflicts. Needed to size conflict tables.
e0e5bf84 7737 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
7738 interface.
7739 (conflicts_print): Ditto.
7740 (count_total_conflicts): New function.
7741
7742 * src/reader.h (merger_list): New type.
7743 (merge_functions): New variable.
7744
7745 * src/lex.h (tok_dprec, tok_merge): New token types.
7746
7747 * src/gram.h (rule_s): Add dprec and merger fields.
7748 (glr_parser): New flag.
7749
7750 * src/conflicts.h (count_total_conflicts): New function.
7751
7752 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
7753
7754 * doc/bison.texinfo (Generalized LR Parsing): New section.
7755 (GLR Parsers): New section.
7756 (Language and Grammar): Mention GLR parsing.
7757 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
7758 Correct typo ("tge" -> "the").
7759
7760 * data/bison.glr: New skeleton for GLR parsing.
7761
7762 * tests/cxx-gram.at: New tests for GLR parsing.
7763
7764 * tests/testsuite.at: Include cxx-gram.at.
7765
7766 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 7767
676385e2
PH
7768 * src/parse-gram.y:
7769
7770 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
7771
7772 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 7773
b5480d74 77742002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
7775
7776 * src/options.h, src/options.c: Remove.
7777 * src/getargs.c (short_options, long_options): New.
7778
60491a94
AD
77792002-06-27 Akim Demaille <akim@epita.fr>
7780
7781 * data/bison.simple, data/bison.c++: Rename as...
7782 * data/yacc.c, data/lalr1.cc: these.
7783 * doc/bison.texinfo (Environment Variables): Remove.
7784
9be0c25b
AD
77852002-06-25 Raja R Harinath <harinath@cs.umn.edu>
7786
7787 * src/getargs.c (report_argmatch): Initialize strtok().
7788
1ae72863
AD
77892002-06-20 Akim Demaille <akim@epita.fr>
7790
7791 * data/bison.simple (b4_symbol_actions): New, replaces...
7792 (b4_symbol_destructor, b4_symbol_printer): these.
7793 (yysymprint): Be sure to call YYPRINT only for tokens, and using
7794 user token numbers.
7795
87542d29
AD
77962002-06-20 Akim Demaille <akim@epita.fr>
7797
7798 * data/bison.simple (yydestructor): Rename as...
7799 (yydestruct): this.
7800
1a31ed21
AD
78012002-06-20 Akim Demaille <akim@epita.fr>
7802
7803 * src/symtab.h, src/symtab.c (symbol_type_set)
7804 (symbol_destructor_set, symbol_precedence_set): The location is
7805 the last argument.
7806 Adjust all callers.
7807
e776192e
AD
78082002-06-20 Akim Demaille <akim@epita.fr>
7809
7810 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
7811 internals.
7812 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
7813 Takes a location.
7814 * src/symtab.h, src/symtab.c (symbol_class_set)
7815 (symbol_user_token_number_set): Likewise.
7816 Adjust all callers.
7817 Promote complain_at.
7818 * tests/input.at (Type Clashes): Adjust.
7819
5c1180b3
AD
78202002-06-20 Akim Demaille <akim@epita.fr>
7821
7822 * data/bison.simple (YYLEX): Fix the declaration when
7823 %pure-parser.
7824
e3170060
AD
78252002-06-20 Akim Demaille <akim@epita.fr>
7826
7827 * data/bison.simple (yysymprint): Don't print the token number,
7828 just its name.
7829 * tests/actions.at (Destructors): Rename as...
7830 (Printers and Destructors): this.
7831 Also exercise %printer.
7832
253862fd
AD
78332002-06-20 Akim Demaille <akim@epita.fr>
7834
7835 * data/bison.simple (YYDSYMPRINT): New.
7836 Use it to remove many of the #if YYDEBUG/if (yydebug).
7837
366eea36
AD
78382002-06-20 Akim Demaille <akim@epita.fr>
7839
7840 * src/symtab.h, src/symtab.c (symbol_t): printer and
7841 printer_location are new members.
7842 (symbol_printer_set): New.
7843 * src/parse-gram.y (PERCENT_PRINTER): New token.
7844 Handle its associated rule.
7845 * src/scan-gram.l: Adjust.
7846 (handle_destructor_at, handle_destructor_dollar): Rename as...
7847 (handle_symbol_code_at, handle_symbol_code_dollar): these.
7848 * src/output.c (symbol_printers_output): New.
7849 (output_skeleton): Call it.
7850 * data/bison.simple (yysymprint): New. Cannot be named yyprint
7851 since there are already many grammar files with a user `yyprint'.
7852 Replace the calls to YYPRINT to calls to yysymprint.
7853 * tests/calc.at: Adjust.
7854 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
7855 taking advantage of parser very internal details (stack size!).
7856
4f25ebb0
AD
78572002-06-20 Akim Demaille <akim@epita.fr>
7858
7859 * src/scan-gram.l: Complete the scanner with the missing patterns
7860 to pacify Flex.
7861 Use `quote' and `symbol_tag_get' where appropriate.
7862
93b68a0e
AD
78632002-06-19 Akim Demaille <akim@epita.fr>
7864
7865 * tests/actions.at (Destructors): Augment to test locations.
7866 * data/bison.simple (yydestructor): Pass it the current location
7867 if locations are enabled.
7868 Prototype only when __STDC__ or C++.
7869 Change the argument names to move into the yy name space: there is
7870 user code here.
7871
58612f1d
AD
78722002-06-19 Akim Demaille <akim@epita.fr>
7873
74310291
AD
7874 * data/bison.simple (b4_pure_if): New.
7875 Use it instead of #ifdef YYPURE.
7876
78772002-06-19 Akim Demaille <akim@epita.fr>
7878
7879 * data/bison.simple (b4_location_if): New.
58612f1d
AD
7880 Use it instead of #ifdef YYLSP_NEEDED.
7881
f25bfb75
AD
78822002-06-19 Akim Demaille <akim@epita.fr>
7883
7884 Prepare @$ in %destructor, but currently don't bind it in the
7885 skeleton, as %location use is not cleaned up yet.
7886
7887 * src/scan-gram.l (handle_dollar, handle_destructor_at)
7888 (handle_action_at): New.
7889 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
7890 a braced_code_t and a location as additional arguments.
7891 (handle_destructor_dollar): Instead of requiring `b4_eval', just
7892 unquote one when outputting `b4_dollar_dollar'.
7893 Adjust callers.
7894 * data/bison.simple (b4_eval): Remove.
7895 (b4_symbol_destructor): Adjust.
7896 * tests/input.at (Invalid @n): Adjust.
7897
c732d2c6
AD
78982002-06-19 Zack Weinberg <zack@codesourcery.com>
7899
7900 * doc/bison.texinfo: Document ability to have multiple
7901 prologue sections.
7902
8c165d89
AD
79032002-06-18 Akim Demaille <akim@epita.fr>
7904
7905 * src/files.c (compute_base_names): When computing the output file
7906 names from the input file name, strip the directory part.
7907
ca98bf57
AD
79082002-06-18 Akim Demaille <akim@epita.fr>
7909
7910 * data/bison.simple.new: Comment changes.
7911 Reported by Andreas Schwab.
7912
0bfb02ff
AD
79132002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
7914
7915 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
7916 there are no `label `yyoverflowlab' defined but not used' warnings
7917 when yyoverflow is defined.
7918
24c0aad7
AD
79192002-06-18 Akim Demaille <akim@epita.fr>
7920
7921 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
7922 new member.
7923 (symbol_destructor_set): Adjust.
7924 * src/output.c (symbol_destructors_output): Output the destructor
7925 locations.
7926 Output the symbol name.
7927 * data/bison.simple (b4_symbol_destructor): Adjust.
7928
5719c109
AD
79292002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
7930 and Akim Demaille <akim@epita.fr>
7931
7932 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
7933 what's left on the stack when the error recovery hits EOF.
7934 * tests/actions.at (Destructors): Complete to exercise this case.
7935
9280d3ef
AD
79362002-06-17 Akim Demaille <akim@epita.fr>
7937
7938 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
7939 arguments is really empty, not only equal to `[]'.
7940 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
7941 member.
7942 (symbol_destructor_set): New.
7943 * src/output.c (symbol_destructors_output): New.
7944 * src/reader.h (brace_code_t, current_braced_code): New.
7945 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
7946 (handle_dollar): Rename as...
7947 (handle_action_dollar): this.
7948 (handle_destructor_dollar): New.
7949 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
7950 (grammar_declaration): Use it.
7951 * data/bison.simple (yystos): Is always defined.
7952 (yydestructor): New.
7953 * tests/actions.at (Destructors): New.
7954 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
7955
dafdc66f
AD
79562002-06-17 Akim Demaille <akim@epita.fr>
7957
7958 * src/symlist.h, src/symlist.c (symbol_list_length): New.
7959 * src/scan-gram.l (handle_dollar, handle_at): Compute the
7960 rule_length only when needed.
7961 * src/output.c (actions_output, token_definitions_output): Output
7962 the full M4 block.
7963 * src/symtab.c: Don't access directly to the symbol tag, use
7964 symbol_tag_get.
7965 * src/parse-gram.y: Use symbol_list_free.
7966
56c47203
AD
79672002-06-17 Akim Demaille <akim@epita.fr>
7968
7969 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7970 (symbol_list_prepend, get_type_name): Move to...
7971 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7972 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7973 Adjust all callers.
7974 (symbol_list_free): New.
7975 * src/scan-gram.l (handle_dollar): Takes a location.
7976 * tests/input.at (Invalid $n): Adjust.
7977
1e0bab92
AD
79782002-06-17 Akim Demaille <akim@epita.fr>
7979
7980 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7981 (symbol_list_prepend): New.
7982 * src/parse-gram.y (%union): `list' is a new member.
7983 (symbols.1): New, replaces...
7984 (terms_to_prec.1, nterms_to_type.1): these.
7985 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7986 Take a location as additional argument.
7987 Adjust all callers.
7988
04e60654
AD
79892002-06-15 Akim Demaille <akim@epita.fr>
7990
7991 * src/parse-gram.y: Move %token in the declaration section so that
7992 we don't depend upon CVS Bison.
7993
10e5b8bd
AD
79942002-06-15 Akim Demaille <akim@epita.fr>
7995
7996 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7997 * src/print.c (print_core): Use it.
7998
9801d40c
AD
79992002-06-15 Akim Demaille <akim@epita.fr>
8000
8001 * src/conflicts.c (log_resolution): Accept the rule involved in
8002 the sr conflicts instead of the lookahead number that points to
8003 that rule.
8004 (flush_reduce): Accept the current lookahead vector as argument,
8005 instead of the index in LA.
8006 (resolve_sr_conflict): Accept the current number of lookahead
8007 bitset to consider for the STATE, instead of the index in LA.
8008 (set_conflicts): Adjust.
8009 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
8010
c0263492
AD
80112002-06-15 Akim Demaille <akim@epita.fr>
8012
8013 * src/state.h (state_t): Replace the `lookaheadsp' member, a
8014 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
8015 Adjust all dependencies.
8016 * src/lalr.c (initialize_lookaheads): Split into...
8017 (states_lookaheads_count, states_lookaheads_initialize): these.
8018 (lalr): Adjust.
8019
9757c359
AD
80202002-06-15 Akim Demaille <akim@epita.fr>
8021
8022 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
8023 out of...
8024 (grammar_rules_print): here.
8025 * src/reduce.c (reduce_output): Use it.
8026 * tests/reduce.at (Useless Rules, Reduced Automaton)
8027 (Underivable Rules): Adjust.
8028
6b98e4b5
AD
80292002-06-15 Akim Demaille <akim@epita.fr>
8030
8031 Copy BYacc's nice way to report the grammar.
8032
8033 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
8034 New.
8035 Don't print the rules' location, it is confusing and useless.
8036 (rule_print): Use grammar_rhs_print.
8037 * src/print.c (print_grammar): Use grammar_rules_print.
8038
6b98e4b5
AD
80392002-06-15 Akim Demaille <akim@epita.fr>
8040
8041 Complete and rationalize `useless thing' warnings.
8042
8043 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
8044 (symbol_tag_print): New.
8045 Use them everywhere in place of accessing directly the tag member.
8046 * src/gram.h, src/gram.c (rule_print): New.
8047 Use it where a rule used to be printed `by hand'.
8048 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
8049 (reduce_grammar_tables): Report the useless rules.
8050 (reduce_print): Useless things are a warning, not an error.
8051 Report it as such.
8052 * tests/reduce.at (Useless Nonterminals, Useless Rules):
8053 (Reduced Automaton, Underivable Rules): Adjust.
8054 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
8055 * tests/conflicts.at (Unresolved SR Conflicts)
8056 (Solved SR Conflicts): Adjust.
8057
ee000ba4
AD
80582002-06-15 Akim Demaille <akim@epita.fr>
8059
8060 Let symbols have a location.
8061
8062 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
8063 (getsym): Adjust.
8064 Adjust all callers.
8065 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
8066 Use location_t, not int.
8067 * src/symtab.c (symbol_check_defined): Take advantage of the
8068 location.
8069 * tests/regression.at (Invalid inputs): Adjust.
8070
8efe435c
AD
80712002-06-15 Akim Demaille <akim@epita.fr>
8072
8073 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
8074 (input): Don't try to initialize yylloc here, do it in the
8075 scanner.
8076 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
8077 * src/gram.h (rule_t): Change line and action_line into location
8078 and action_location, of location_t type.
8079 Adjust all dependencies.
8080 * src/location.h, src/location.c (empty_location): New.
8081 * src/reader.h, src/reader.c (grammar_start_symbol_set)
8082 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
8083 (grammar_current_rule_symbol_append)
8084 (grammar_current_rule_action_append): Expect a location as argument.
8085 * src/reader.c (grammar_midrule_action): Adjust to attach an
8086 action's location as dummy symbol location.
8087 * src/symtab.h, src/symtab.c (startsymbol_location): New.
8088 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
8089 the line numbers.
8090
1921f1d7
AD
80912002-06-14 Akim Demaille <akim@epita.fr>
8092
8093 Grammar declarations may be found in the grammar section.
8094
8095 * src/parse-gram.y (rules_or_grammar_declaration): New.
8096 (declarations): Each declaration may end with a semicolon, not
8097 just...
8098 (grammar_declaration): `"%union"'.
8099 (grammar): Branch to rules_or_grammar_declaration.
8100
4515534c
AD
81012002-06-14 Akim Demaille <akim@epita.fr>
8102
8103 * src/main.c (main): Invoke scanner_free.
8104
f958596b
AD
81052002-06-14 Akim Demaille <akim@epita.fr>
8106
8107 * src/output.c (m4_invoke): Extracted from...
8108 (output_skeleton): here.
8109 Free tempfile.
8110
2c569025
AD
81112002-06-14 Akim Demaille <akim@epita.fr>
8112
8113 * src/parse-gram.y (directives, directive, gram)
8114 (grammar_directives, precedence_directives, precedence_directive):
8115 Rename as...
8116 (declarations, declaration, grammar, grammar_declaration)
8117 (precedence_declaration, precedence_declarator): these.
8118 (symbol_declaration): New.
8119
592e8d4d
AD
81202002-06-14 Akim Demaille <akim@epita.fr>
8121
8122 * src/files.c (action_obstack): Remove, unused.
8123 (output_obstack): Remove it, and all its dependencies, as it is no
8124 longer needed.
8125 * src/reader.c (epilogue_set): Build the epilogue in the
8126 muscle_obstack.
8127 * src/output.h, src/output.c (muscle_obstack): Move to...
8128 * src/muscle_tab.h, src/muscle_tab.h: here.
8129 (muscle_init): Initialize muscle_obstack.
8130 (muscle_free): New.
8131 * src/main.c (main): Call it.
8132
0c15323d
AD
81332002-06-14 Akim Demaille <akim@epita.fr>
8134
8135 * src/location.h: New, extracted from...
8136 * src/reader.h: here.
8137 * src/Makefile.am (noinst_HEADERS): Merge into
8138 (bison_SOURCES): this.
8139 Add location.h.
8140 * src/parse-gram.y: Use location_t instead of Bison's.
8141 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
8142 Use location_t instead of ints.
8143
e96c9728
AD
81442002-06-14 Akim Demaille <akim@epita.fr>
8145
8146 * data/bison.simple, data/bison.c++: Be sure to restore the
8147 current #line when returning to the skeleton contents after having
8148 exposed the input file's #line.
8149
75d1fe16
AD
81502002-06-12 Akim Demaille <akim@epita.fr>
8151
8152 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
8153 eager.
8154 * tests/actions.at (Exotic Dollars): New.
8155
6c35d22c
AD
81562002-06-12 Akim Demaille <akim@epita.fr>
8157
8158 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
8159 ['"/] too eagerly.
8160 * tests/input.at (Torturing the Scanner): New.
8161
1d6412ad
AD
81622002-06-11 Akim Demaille <akim@epita.fr>
8163
8164 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
8165 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
8166 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
8167 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
8168 * src/reader.c (reader): Use it.
8169
4cdb01db
AD
81702002-06-11 Akim Demaille <akim@epita.fr>
8171
8172 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
8173 Adjust all callers.
8174 (scanner_last_string_free): New.
8175
44995b2e
AD
81762002-06-11 Akim Demaille <akim@epita.fr>
8177
8178 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
8179 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
8180 (last_string, YY_OBS_FREE): New.
8181 Use them when returning an ID.
8182
e9955c83
AD
81832002-06-11 Akim Demaille <akim@epita.fr>
8184
8185 Have Bison grammars parsed by a Bison grammar.
8186
8187 * src/reader.c, src/reader.h (prologue_augment): New.
8188 * src/reader.c (copy_definition): Remove.
8189
8190 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
8191 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
8192 (grammar_current_rule_prec_set, grammar_current_rule_check)
8193 (grammar_current_rule_symbol_append)
8194 (grammar_current_rule_action_append): Export.
8195 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
8196 (symbol_list_action_append): Remove.
8197 Hook the routines from reader.
8198 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
8199 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
8200
8201 * src/reader.c (read_declarations): Remove, unused.
8202
8203 * src/parse-gram.y: Handle the epilogue.
8204 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
8205 (grammar_start_symbol_set): this.
8206 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
8207 * src/reader.c (readgram): Remove, unused.
8208 (reader): Adjust to insert eoftoken and axiom where appropriate.
8209
8210 * src/reader.c (copy_dollar): Replace with...
8211 * src/scan-gram.h (handle_dollar): this.
8212 * src/parse-gram.y: Remove `%thong'.
8213
8214 * src/reader.c (copy_at): Replace with...
8215 * src/scan-gram.h (handle_at): this.
8216
8217 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
8218 New.
8219
8220 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
8221 time being.
8222
8223 * src/reader.h, src/reader.c (grammar_rule_end): New.
8224
8225 * src/parse.y (current_type, current_class): New.
8226 Implement `%nterm', `%token' support.
8227 Merge `%term' into `%token'.
8228 (string_as_id): New.
8229 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
8230 type name.
8231
8232 * src/parse-gram.y: Be sure to handle properly the beginning of
8233 rules.
8234
8235 * src/parse-gram.y: Handle %type.
8236 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
8237
8238 * src/parse-gram.y: More directives support.
8239 * src/options.c: No longer handle source directives.
8240
8241 * src/parse-gram.y: Fix %output.
8242
8243 * src/parse-gram.y: Handle %union.
8244 Use the prologue locations.
8245 * src/reader.c (parse_union_decl): Remove.
8246
8247 * src/reader.h, src/reader.c (epilogue_set): New.
8248 * src/parse-gram.y: Use it.
8249
8250 * data/bison.simple, data/bison.c++: b4_stype is now either not
8251 defined, then default to int, or to the contents of %union,
8252 without `union' itself.
8253 Adjust.
8254 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
8255
8256 * src/output.c (actions_output): Don't output braces, as they are
8257 already handled by the scanner.
8258
8259 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
8260 characters to themselves.
8261
8262 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
8263 that the epilogue has a proper #line.
8264
8265 * src/parse-gram.y: Handle precedence/associativity.
8266
8267 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
8268 a terminal.
8269 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
8270 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
8271 at all to define terminals that cannot be emitted.
8272
8273 * src/scan-gram.l: Escape M4 characters.
8274
8275 * src/scan-gram.l: Working properly with escapes in user
8276 strings/characters.
8277
8278 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
8279 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
8280 grammar.
8281 Use more modest sizes, as for the time being the parser does not
8282 release memory, and therefore the process swallows a huge amount
8283 of memory.
8284
8285 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
8286 stricter %token grammar.
8287
8288 * src/symtab.h (associativity): Add `undef_assoc'.
8289 (symbol_precedence_set): Do nothing when passed an undef_assoc.
8290 * src/symtab.c (symbol_check_alias_consistence): Adjust.
8291
8292 * tests/regression.at (Invalid %directive): Remove, as it is now
8293 meaningless.
8294 (Invalid inputs): Adjust to the new error messages.
8295 (Token definitions): The new grammar doesn't allow too many
8296 eccentricities.
8297
8298 * src/lex.h, src/lex.c: Remove.
8299 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
8300 (copy_character, copy_string2, copy_string, copy_identifier)
8301 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
8302 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
8303 (parse_action): Remove.
8304 * po/POTFILES.in: Adjust.
8305
2e047461
AD
83062002-06-11 Akim Demaille <akim@epita.fr>
8307
cd05d13c 8308 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
8309 rule's action member: return the action as a string.
8310 Don't require `rule_length' as an argument: compute it.
8311 (grammar_current_rule_symbol_append)
8312 (grammar_current_rule_action_append): New, eved out from
8313 (readgram): here.
8314 Remove `action_flag', `rulelength', unused now.
8315
9af3fbce
AD
83162002-06-11 Akim Demaille <akim@epita.fr>
8317
8318 * src/reader.c (grammar_current_rule_prec_set).
8319 (grammar_current_rule_check): New, eved out from...
8320 (readgram): here.
8321 Remove `xaction', `first_rhs': useless.
8322 * tests/input.at (Type clashes): New.
8323 * tests/existing.at (GNU Cim Grammar): Adjust.
8324
1485e106
AD
83252002-06-11 Akim Demaille <akim@epita.fr>
8326
8327 * src/reader.c (grammar_midrule_action): New, Eved out from
8328 (readgram): here.
8329
da4160c3
AD
83302002-06-11 Akim Demaille <akim@epita.fr>
8331
8332 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
8333 New.
8334 (readgram): Use them as replacement of inlined code, crule and
8335 crule1.
8336
f6d0f937
AD
83372002-06-11 Akim Demaille <akim@epita.fr>
8338
8339 * src/reader.c (grammar_end, grammar_symbol_append): New.
8340 (readgram): Use them.
8341 Make the use of `p' as local as possible.
8342
69078d4b
AD
83432002-06-10 Akim Demaille <akim@epita.fr>
8344
8345 GCJ's parser requires the tokens to be defined before the prologue.
8346
8347 * data/bison.simple: Output the token definition before the user's
8348 prologue.
8349 * tests/regression.at (Braces parsing, Duplicate string)
8350 (Mixing %token styles): Check the output from bison.
8351 (Early token definitions): New.
8352
5e424082
AD
83532002-06-10 Akim Demaille <akim@epita.fr>
8354
8355 * src/symtab.c (symbol_user_token_number_set): Don't complain when
8356 assigning twice the same user number to a token, so that we can
8357 use it in...
8358 * src/lex.c (lex): here.
8359 Also use `symbol_class_set' instead of hand written code.
8360 * src/reader.c (parse_assoc_decl): Likewise.
8361
44536b35
AD
83622002-06-10 Akim Demaille <akim@epita.fr>
8363
8364 * src/symtab.c, src/symtab.c (symbol_class_set)
8365 (symbol_user_token_number_set): New.
8366 * src/reader.c (parse_token_decl): Use them.
8367 Use a switch instead of ifs.
8368 Use a single argument.
8369
8b9f2372
AD
83702002-06-10 Akim Demaille <akim@epita.fr>
8371
8372 Remove `%thong' support as it is undocumented, unused, duplicates
8373 `%token's job, and creates useless e-mail traffic with people who
8374 want to know what it is, why it is undocumented, unused, and
8375 duplicates `%token's job.
8376
8377 * src/reader.c (parse_thong_decl): Remove.
8378 * src/options.c (option_table): Remove "thong".
8379 * src/lex.h (tok_thong): Remove.
8380
3ae2b51f
AD
83812002-06-10 Akim Demaille <akim@epita.fr>
8382
8383 * src/symtab.c, src/symtab.c (symbol_type_set)
8384 (symbol_precedence_set): New.
8385 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
8386 (value_components_used): Remove, unused.
8387
2f1afb73
AD
83882002-06-09 Akim Demaille <akim@epita.fr>
8389
8390 Move symbols handling code out of the reader.
8391
8392 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
8393 (axiom): Move to...
8394 * src/symtab.h, src/symtab.c: here.
8395
8396 * src/gram.c (start_symbol): Remove: use startsymbol->number.
8397 * src/reader.c (startval): Rename as...
8398 * src/symtab.h, src/symtab.c (startsymbol): this.
8399 * src/reader.c: Adjust.
8400
8401 * src/reader.c (symbol_check_defined, symbol_make_alias)
8402 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8403 (token_translations_init)
8404 Move to...
8405 * src/symtab.c: here.
8406 * src/reader.c (packsymbols): Move to...
8407 * src/symtab.h, src/symtab.c (symbols_pack): here.
8408 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
8409 argument.
8410
e9bca3ad
AD
84112002-06-03 Akim Demaille <akim@epita.fr>
8412
8413 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
8414 then statements.
8415
86eff183
AD
84162002-06-03 Akim Demaille <akim@epita.fr>
8417
8418 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
8419 structs with non literals.
8420 * src/scan-skel.l: never-interactive.
8421 * src/conflicts.c (enum conflict_resolution_e): No trailing
8422 comma.
8423 * src/getargs.c (usage): Split long literal strings.
8424 Reported by Hans Aberg.
8425
717be197
AD
84262002-05-28 Akim Demaille <akim@epita.fr>
8427
8428 * data/bison.c++: Use C++ ostreams.
8429 (cdebug_): New member.
8430
670ddffd
AD
84312002-05-28 Akim Demaille <akim@epita.fr>
8432
8433 * src/output.c (output_skeleton): Be sure to allocate enough room
8434 for `/' _and_ for `\0' in full_skeleton.
8435
769b430f
AD
84362002-05-28 Akim Demaille <akim@epita.fr>
8437
8438 * data/bison.c++: Catch up with bison.simple:
8439 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8440 and Paul Eggert <eggert@twinsun.com>: `error' handing.
8441 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
8442 and popping traces.
8443
7067cb36
PH
84442002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8445
8446 * src/output.c (output_skeleton): Put an explicit path in front of
8447 the skeleton file name, rather than relying on the -I directory,
8448 to partially alleviate effects of having a skeleton file lying around
8449 in the current directory.
769b430f 8450
4a713ec2
PH
84512002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8452
769b430f 8453 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
8454 obstack_printf should be obstack_fgrow1.
8455
b408954b
AD
84562002-05-26 Akim Demaille <akim@epita.fr>
8457
8458 * src/state.h (state_t): `solved_conflicts' is a new member.
8459 * src/LR0.c (new_state): Set it to 0.
8460 * src/conflicts.h, src/conflicts.c (print_conflicts)
8461 (free_conflicts, solve_conflicts): Rename as...
8462 (conflicts_print, conflicts_free, conflicts_solve): these.
8463 Adjust callers.
8464 * src/conflicts.c (enum conflict_resolution_e)
8465 (solved_conflicts_obstack): New, used by...
8466 (log_resolution): this.
8467 Adjust to attach the conflict resolution to each state.
8468 Complete the description with the precedence/associativity
8469 information.
8470 (resolve_sr_conflict): Adjust.
8471 * src/print.c (print_state): Output its solved_conflicts.
8472 * tests/conflicts.at (Unresolved SR Conflicts)
8473 (Solved SR Conflicts): Exercise --report=all.
8474
a49aecd5
AD
84752002-05-26 Akim Demaille <akim@epita.fr>
8476
8477 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8478 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8479 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
8480 (token_number_t, item_number_as_token_number)
8481 (token_number_as_item_number, muscle_insert_token_number_table):
8482 Rename as...
8483 (symbol_number_t, item_number_as_symbol_number)
8484 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
8485 these, since it is more appropriate.
8486
5504898e
AD
84872002-05-26 Akim Demaille <akim@epita.fr>
8488
8489 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
8490 `Error:' lines.
8491 * data/bison.simple (yystos) [YYDEBUG]: New.
8492 (yyparse) [YYDEBUG]: Display the symbols which are popped during
8493 error recovery.
8494 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
8495
ec3bc396
AD
84962002-05-25 Akim Demaille <akim@epita.fr>
8497
8498 * doc/bison.texinfo (Debugging): Split into...
8499 (Tracing): this new section, its former contents, and...
8500 (Understanding): this new section.
8501 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
8502 by...
8503 (report_flag): this.
8504 Adjust all dependencies.
8505 (report_args, report_types, report_argmatch): New.
8506 (usage, getargs): Report/support -r, --report.
8507 * src/options.h
8508 (struct option_table_struct): Rename as..,
8509 (struct option_table_s): this.
8510 Rename the `set_flag' member to `flag' to match with getopt_long's
8511 struct.
8512 * src/options.c (option_table): Split verbose into an entry for
8513 %verbose, and another for --verbose.
8514 Support --report/-r, so remove -r from the obsolete --raw.
8515 * src/print.c: Attach full item sets and lookaheads reports to
8516 report_flag instead of trace_flag.
8517 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
8518
78df8250
PE
85192002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8520 and Paul Eggert <eggert@twinsun.com>
769b430f 8521
78df8250
PE
8522 * data/bison.simple (yyparse): Correct error handling to conform to
8523 POSIX and yacc. Specifically, after syntax error is discovered,
8524 do not reduce further before shifting the error token.
8525 Clean up the code a bit by removing the labels yyerrdefault,
8526 yyerrhandle, yyerrpop.
8527 * NEWS: Document the above.
8528
c0c9ea05
PH
85292002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8530
8531 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
8532 type; it isn't always big enough, since it doesn't necessarily
8533 include non-terminals.
769b430f 8534 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
8535 the latter can be removed.
8536 (yy_token_number_type): Remove, only one use.
8537 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
8538 don't use TokenNumberType as element type.
769b430f 8539
c0c9ea05
PH
8540 * tests/regression.at: Modify expected output to agree with change
8541 to yyr1 and yytranslate.
769b430f 8542
6390a83f
FK
85432002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
8544
8545 * src/reader.c (parse_action): Use copy_character instead of
8546 obstack_1grow.
8547
db7c8e9a
AD
85482002-05-13 Akim Demaille <akim@epita.fr>
8549
8550 * tests/regression.at (Token definitions): Prototype yylex and
8551 yyerror.
8552
fcc61800
PH
85532002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8554
158c687b 8555 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
8556 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
8557 32-bit arithmetic.
8558 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
8559
5683e9b2
AD
85602002-05-07 Akim Demaille <akim@epita.fr>
8561
8562 * tests/synclines.at: Be sure to prototype yylex and yyerror to
8563 avoid GCC warnings.
8564
0c2d3f4c
AD
85652002-05-07 Akim Demaille <akim@epita.fr>
8566
8567 Kill GCC warnings.
8568
8569 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
8570 over the RHS of each rule.
8571 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
8572 * src/state.h (state_t): Member `nitems' is unsigned short.
8573 * src/LR0.c (get_state): Adjust.
8574 * src/reader.c (packgram): Likewise.
8575 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
8576 `Type'.
8577 (muscle_insert_int_table): Remove, unused.
8578 (prepare_rules): Remove `max'.
8579
1565b720
AD
85802002-05-06 Akim Demaille <akim@epita.fr>
8581
8582 * src/closure.c (print_firsts): Display of the symbol tags.
8583 (bitmatrix_print): Move to...
8584 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
8585 here.
8586 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
8587
cfaee611
AD
85882002-05-06 Akim Demaille <akim@epita.fr>
8589
8590 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
8591 hash_do_for_each.
8592
458be8e0
AD
85932002-05-06 Akim Demaille <akim@epita.fr>
8594
8595 * src/LR0.c (new_state, get_state): Instead of using the global
8596 `kernel_size' and `kernel_base', have two new arguments:
8597 `core_size' and `core'.
8598 Adjust callers.
8599
a900a624
AD
86002002-05-06 Akim Demaille <akim@epita.fr>
8601
8602 * src/reader.c (packgram): No longer end `ritem' with a 0
8603 sentinel: it is not used.
8604
d4e7d3a1
AD
86052002-05-05 Akim Demaille <akim@epita.fr>
8606
8607 New experimental feature: display the lookaheads in the report and
8608 graph.
8609
8610 * src/print (print_core): When --trace-flag, display the rules
8611 lookaheads.
8612 * src/print_graph.c (print_core): Likewise.
8613 Swap the arguments.
8614 Adjust caller.
8615
39ceb25b
AD
86162002-05-05 Akim Demaille <akim@epita.fr>
8617
8618 * tests/torture.at (Many lookaheads): New test.
8619
5372019f
AD
86202002-05-05 Akim Demaille <akim@epita.fr>
8621
8622 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
8623 (GENERATE_MUSCLE_INSERT_TABLE): this.
8624 (output_int_table, output_unsigned_int_table, output_short_table)
8625 (output_token_number_table, output_item_number_table): Replace with...
8626 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8627 (muscle_insert_short_table, muscle_insert_token_number_table)
8628 (muscle_insert_item_number_table): these.
8629 Adjust all callers.
8630 (prepare_tokens): Don't free `translations', since...
8631 * src/reader.h, src/reader.c (grammar_free): do it.
8632 Move to...
8633 * src/gram.h, src/gram.c (grammar_free): here.
8634 * data/bison.simple, data/bison.c++: b4_token_number_max is now
8635 b4_translate_max.
8636
5df5f6d5
AD
86372002-05-05 Akim Demaille <akim@epita.fr>
8638
8639 * src/output.c (output_unsigned_int_table): New.
8640 (prepare_rules): `i' is unsigned.
8641 `prhs', `rline', `r2' are unsigned int.
8642 Rename muscle `rhs_number_max' as `rhs_max'.
8643 Output muscles `prhs_max', `rline_max', and `r2_max'.
8644 Free rline and r1.
8645 * data/bison.simple, data/bison.c++: Adjust to use these muscles
8646 to compute types instead of constant types.
8647 * tests/regression.at (Web2c Actions): Adjust.
8648
b87f8b21
AD
86492002-05-04 Akim Demaille <akim@epita.fr>
8650
8651 * src/symtab.h (SALIAS, SUNDEF): Rename as...
8652 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
8653 Adjust dependencies.
8654 * src/output.c (token_definitions_output): Be sure not to output a
8655 `#define 'a'' when fed with `%token 'a' "a"'.
8656 * tests/regression.at (Token definitions): New.
8657
8bb936e4
PE
86582002-05-03 Paul Eggert <eggert@twinsun.com>
8659
8660 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
8661 for K&R C.
8662
86632002-05-03 gettextize <bug-gnu-gettext@gnu.org>
8664
8665 * Makefile.am (SUBDIRS): Remove intl.
8666 (EXTRA_DIST): Add config/config.rpath.
8667
53c71a12
AD
86682002-05-03 Akim Demaille <akim@epita.fr>
8669
8670 * data/bison.simple (m4_if): Don't output empty enums.
8671 And actually, output valid enum definitions :(.
8672
289dd0cf
AD
86732002-05-03 Akim Demaille <akim@epita.fr>
8674
8675 * configure.bat: Remove, completely obsolete.
8676 * Makefile.am (EXTRA_DIST): Adjust.
8677 Don't distribute config.rpath...
8678 * config/Makefile.am (EXTRA_DIST): Do it.
8679
db85e524
AD
86802002-05-03 Akim Demaille <akim@epita.fr>
8681
8682 * configure.in (GETTEXT_VERSION): New.
8683 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
8684
83ccf991
AD
86852002-05-03 Akim Demaille <akim@epita.fr>
8686
8687 * data/bison.simple (b4_token_enum): New.
8688 (b4_token_defines): Use it to output tokens both as #define and
8689 enums.
8690 Suggested by Paul Eggert.
8691 * src/output.c (token_definitions_output): Don't output spurious
8692 white spaces.
8693
1f418995
AD
86942002-05-03 Akim Demaille <akim@epita.fr>
8695
8696 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8697
45119f04
RA
86982002-05-02 Robert Anisko <robert@lrde.epita.fr>
8699
8700 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
8701 Update the stack class, give a try to deque as the default container.
8702
b2d52318
AD
87032002-05-02 Akim Demaille <akim@epita.fr>
8704
8705 * data/bison.simple (yyparse): Do not implement @$ = @1.
8706 (YYLLOC_DEFAULT): Adjust to do it.
8707 * doc/bison.texinfo (Location Default Action): Fix.
8708
3a8b4109
AD
87092002-05-02 Akim Demaille <akim@epita.fr>
8710
8711 * src/reader.c (parse_braces): Merge into...
8712 (parse_action): this.
8713
84614e13
AD
87142002-05-02 Akim Demaille <akim@epita.fr>
8715
8716 * configure.in (ALL_LINGUAS): Remove.
8717 * po/LINGUAS, hr.po: New.
8718
fdbcd8e2
AD
87192002-05-02 Akim Demaille <akim@epita.fr>
8720
8721 Remove the so called hairy (semantic) parsers.
8722
8723 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
8724 * src/gram.h, src/gram.c (semantic_parser): Remove.
8725 (rule_t): Remove the guard and guard_line members.
8726 * src/lex.h (token_t): remove tok_guard.
8727 * src/options.c (option_table): Remove %guard and %semantic_parser
8728 support.
8729 * src/output.c, src/output.h (guards_output): Remove.
8730 (prepare): Adjust.
8731 (token_definitions_output): Don't output the `T'
8732 tokens (???).
8733 (output_skeleton): Don't output the guards.
8734 * src/files.c, src/files.c (attrsfile): Remove.
8735 * src/reader.c (symbol_list): Remove the guard and guard_line
8736 members.
8737 Adjust dependencies.
8738 (parse_guard): Remove.
8739 * data/bison.hairy: Remove.
8740 * doc/bison.texinfo (Environment Variables): Remove occurrences of
8741 BISON_HAIRY.
8742
82b6cb3f
AD
87432002-05-02 Akim Demaille <akim@epita.fr>
8744
8745 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
8746 (parse_guard): Rename the formal argument `stack_offset' as
8747 `rule_length', which is more readable.
8748 Adjust callers.
8749 (copy_at, copy_dollar): Instead of outputting the hard coded
8750 values of $$, $n and so forth, output invocation to b4_lhs_value,
8751 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
8752 Note: this patch partially drops `semantic-parser' support: it
8753 always does `rule_length - n', where semantic parsers ought to
8754 always use `-n'.
82b6cb3f
AD
8755 * data/bison.simple, data/bison.c++ (b4_lhs_value)
8756 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
8757
6cbfbcc5
AD
87582002-05-02 Akim Demaille <akim@epita.fr>
8759
8760 * configure.in (AC_INIT): Bump to 1.49b.
8761 (AM_INIT_AUTOMAKE): Short invocation.
8762
b8548114
AD
87632002-05-02 Akim Demaille <akim@epita.fr>
8764
8765 Version 1.49a.
8766
c20cd1fa
AD
87672002-05-01 Akim Demaille <akim@epita.fr>
8768
8769 * src/skeleton.h: Remove.
8770
8a9566d4
AD
87712002-05-01 Akim Demaille <akim@epita.fr>
8772
8773 * src/skeleton.h: Fix the #endif.
8774 Reported by Magnus Fromreide.
8775
8c6d399a
PE
87762002-04-26 Paul Eggert <eggert@twinsun.com>
8777
8778 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
8779 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 8780 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 8781
2b7ed18a
RA
87822002-04-25 Robert Anisko <robert@lrde.epita.fr>
8783
8784 * src/scan-skel.l: Postprocess quadrigraphs.
8785
8786 * src/reader.c (copy_character): New function, used to output
8787 single characters while replacing `[' and `]' with quadrigraphs, to
8788 avoid troubles with M4 quotes.
8789 (copy_comment): Output characters with copy_character.
8790 (read_additionnal_code): Likewise.
8791 (copy_string2): Likewise.
8792 (copy_definition): Likewise.
8793
8794 * tests/calc.at: Exercise M4 quoting.
8795
34a89c50
AD
87962002-04-25 Akim Demaille <akim@epita.fr>
8797
8798 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
8799 between `!' and the command.
8800 Reported by Paul Eggert.
8801
0dd1580a
RA
88022002-04-24 Robert Anisko <robert@lrde.epita.fr>
8803
8804 * tests/calc.at: Exercise prologue splitting.
8805
8806 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
8807 `b4_post_prologue' instead of `b4_prologue'.
8808
8809 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
8810 muscles.
8811 (output): Free pre_prologue_obstack and post_prologue_obstack.
8812 * src/files.h, src/files.c (attrs_obstack): Remove.
8813 (pre_prologue_obstack, post_prologue_obstack): New.
8814 * src/reader.c (copy_definition): Add a parameter to specify the
8815 obstack to fill, instead of using attrs_obstack unconditionally.
8816 (read_declarations): Pass pre_prologue_obstack to copy_definition if
8817 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
8818
83c1796f
PE
88192002-04-23 Paul Eggert <eggert@twinsun.com>
8820
8821 * data/bison.simple: Remove unnecessary commentary and white
8822 space differences from 1_29-branch.
8823 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
8824
8825 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
8826 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
8827 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
8828 constructors or destructors.
8829
8830 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
8831
1207eeac
AD
88322002-04-23 Akim Demaille <akim@epita.fr>
8833
8834 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
8835 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
8836 location with columns.
8837 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
8838 All reported by Paul Eggert.
8839
78ab8f67
AD
88402002-04-22 Akim Demaille <akim@epita.fr>
8841
8842 * src/reduce.c (dump_grammar): Move to...
8843 * src/gram.h, src/gram.c (grammar_dump): here.
8844 Be sure to separate long item numbers.
8845 Don't read the members of a rule's prec if its nil.
8846
133c20e2
AD
88472002-04-22 Akim Demaille <akim@epita.fr>
8848
8849 * src/output.c (table_size, table_grow): New.
8850 (MAXTABLE): Remove, replace uses with table_size.
8851 (pack_vector): Instead of dying when the table is too big, grow it.
8852
9515e8a7
AD
88532002-04-22 Akim Demaille <akim@epita.fr>
8854
8855 * data/bison.simple (yyr1): Its type is that of a token number.
8856 * data/bison.c++ (r1_): Likewise.
8857 * tests/regression.at (Web2c Actions): Adjust.
8858
23c5a174
AD
88592002-04-22 Akim Demaille <akim@epita.fr>
8860
8861 * src/reader.c (token_translations_init): 256 is now the default
8862 value for the error token, i.e., it will be assigned another
8863 number if the user assigned 256 to one of her tokens.
8864 (reader): Don't force 256 to error.
8865 * doc/bison.texinfo (Symbols): Adjust.
8866 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
8867 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
8868 etc. instead of 10, 20, 30 (which was used to `jump' over error
8869 (256) and undefined (2)).
8870
5fbb0954
AD
88712002-04-22 Akim Demaille <akim@epita.fr>
8872
8873 Propagate more token_number_t.
8874
8875 * src/gram.h (token_number_as_item_number)
8876 (item_number_as_token_number): New.
8877 * src/output.c (GENERATE_OUTPUT_TABLE): New.
8878 Use it to create output_item_number_table and
8879 output_token_number_table.
8880 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8881 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
8882 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
8883 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
8884
4f940944
AD
88852002-04-22 Akim Demaille <akim@epita.fr>
8886
8887 * src/output.h, src/output.c (get_lines_number): Remove.
8888
3ded9a63
AD
88892002-04-19 Akim Demaille <akim@epita.fr>
8890
8891 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
8892 as Lex/Flex'.
8893 (Debugging): More details about enabling the debugging features.
8894 (Table of Symbols): Describe $$, $n, @$, and @n.
8895 Suggested by Tim Josling.
8896
e0c471a9
AD
88972002-04-19 Akim Demaille <akim@epita.fr>
8898
8899 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
8900
fecc10cd
AD
89012002-04-10 Akim Demaille <akim@epita.fr>
8902
8903 * src/system.h: Rely on HAVE_LIMITS_H.
8904 Suggested by Paul Eggert.
8905
51dec47b
AD
89062002-04-09 Akim Demaille <akim@epita.fr>
8907
8908 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
8909 full stderr, and strip it according to the bison options, instead
8910 of composing the error message from different bits.
8911 This makes it easier to check for several error messages.
8912 Adjust all the invocations.
8913 Add an invocation exercising the error token.
8914 Add an invocation demonstrating a stupid error message.
8915 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
8916 Adjust the tests.
8917 Error message are for stderr, not stdout.
8918
007a50a4
AD
89192002-04-09 Akim Demaille <akim@epita.fr>
8920
8921 * src/gram.h, src/gram.c (error_token_number): Remove, use
8922 errtoken->number.
8923 * src/reader.c (reader): Don't specify the user token number (2)
8924 for $undefined, as it uselessly prevents using it.
8925 * src/gram.h (token_number_t): Move to...
8926 * src/symtab.h: here.
8927 (state_t.number): Is a token_number_t.
8928 * src/print.c, src/reader.c: Use undeftoken->number instead of
8929 hard coded 2.
8930 (Even though this 2 is not the same as above: the number of the
8931 undeftoken remains being 2, it is its user token number which
8932 might not be 2).
8933 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
8934 `user_token_number_max'.
8935 Output `undef_token_number'.
8936 * data/bison.simple, data/bison.c++: Use them.
8937 Be sure to map invalid yylex return values to
8938 `undef_token_number'. This saves us from gratuitous SEGV.
8939
8940 * tests/conflicts.at (Solved SR Conflicts)
8941 (Unresolved SR Conflicts): Adjust.
8942 * tests/regression.at (Web2c Actions): Adjust.
8943
06446ccf
AD
89442002-04-08 Akim Demaille <akim@epita.fr>
8945
8946 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
8947 Adding #line.
8948 Remove the duplicate `typedefs'.
8949 (RhsNumberType): Fix the declaration and various other typos.
8950 Use __ofile__.
8951 * data/bison.simple: Use __ofile__.
8952 * src/scan-skel.l: Handle __ofile__.
8953
62a3e4f0
AD
89542002-04-08 Akim Demaille <akim@epita.fr>
8955
8956 * src/gram.h (item_number_t): New, the type of item numbers in
8957 RITEM. Note that it must be able to code symbol numbers as
8958 positive number, and the negation of rule numbers as negative
8959 numbers.
8960 Adjust all dependencies (pretty many).
8961 * src/reduce.c (rule): Remove this `short *' pointer: use
8962 item_number_t.
8963 * src/system.h (MINSHORT, MAXSHORT): Remove.
8964 Include `limits.h'.
8965 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8966 (shortcpy): Remove.
8967 (MAXTABLE): Move to...
8968 * src/output.c (MAXTABLE): here.
8969 (prepare_rules): Use output_int_table to output rhs.
8970 * data/bison.simple, data/bison.c++: Adjust.
8971 * tests/torture.at (Big triangle): Move the limit from 254 to
8972 500.
8973 * tests/regression.at (Web2c Actions): Ajust.
8974
8975 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8976 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8977 passes, but produces negative #line number, once fixed, GCC is
8978 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8979 C), it passes.
8980 * src/state.h (state_h): Code input lines on ints, not shorts.
8981
bb88b0fc
AD
89822002-04-08 Akim Demaille <akim@epita.fr>
8983
8984 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8985 and then the grammar.
8986
9a636f47
AD
89872002-04-08 Akim Demaille <akim@epita.fr>
8988
8989 * src/system.h: No longer using strndup.
8990
680e8701
AD
89912002-04-07 Akim Demaille <akim@epita.fr>
8992
8993 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8994 * src/output.c (output_table_data): Return the longest number.
8995 (prepare_tokens): Output `token_number_max').
8996 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8997 New.
8998 Use them to define yy_token_number_type/TokenNumberType.
8999 Use this type for yytranslate.
9000 * tests/torture.at (Big triangle): Push the limit from 124 to
9001 253.
9002 * tests/regression.at (Web2c Actions): Adjust.
9003
817e9f41
AD
90042002-04-07 Akim Demaille <akim@epita.fr>
9005
9006 * tests/torture.at (Big triangle): New.
9007 (GNU AWK Grammar, GNU Cim Grammar): Move to...
9008 * tests/existing.at: here.
9009
5123689b
AD
90102002-04-07 Akim Demaille <akim@epita.fr>
9011
9012 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
9013 nritems.
9014 Adjust dependencies.
9015
f3849179
AD
90162002-04-07 Akim Demaille <akim@epita.fr>
9017
9018 * src/reader.c: Normalize increments to prefix form.
9019
bd02036a
AD
90202002-04-07 Akim Demaille <akim@epita.fr>
9021
9022 * src/reader.c, symtab.c: Remove debugging code.
9023
db8837cb
AD
90242002-04-07 Akim Demaille <akim@epita.fr>
9025
9026 Rename all the `bucket's as `symbol_t'.
9027
9028 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
9029 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
9030 * src/symtab.c, src/symtab.h (bucket): Rename as...
9031 (symbol_t): this.
9032 (symbol_list_new, bucket_check_defined, bucket_make_alias)
9033 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
9034 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9035 (buckets_new, buckets_free, buckets_do): Rename as...
9036 (symbol_list_new, symbol_check_defined, symbol_make_alias)
9037 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
9038 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
9039 (symbols_new, symbols_free, symbols_do): these.
9040
72a23c97
AD
90412002-04-07 Akim Demaille <akim@epita.fr>
9042
9043 Use lib/hash for the symbol table.
9044
9045 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
9046 EOF.
9047 * src/lex.c (lex): Set the `number' member of new terminals.
9048 * src/reader.c (bucket_check_defined, bucket_make_alias)
9049 (bucket_check_alias_consistence, bucket_translation): New.
9050 (reader, grammar_free, readgram, token_translations_init)
9051 (packsymbols): Adjust.
9052 (reader): Number the predefined tokens.
9053 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
9054 for predefined tokens.
9055 * src/symtab.h (bucket): Remove all the hash table related
9056 members.
9057 * src/symtab.c (symtab): Replace by...
9058 (bucket_table): this.
9059 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
9060 (buckets_new, buckets_do): New.
9061
280a38c3
AD
90622002-04-07 Akim Demaille <akim@epita.fr>
9063
9064 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
9065 (start_symbol, max_user_token_number, semantic_parser)
9066 (error_token_number): Initialize.
9067 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
9068 Initialize.
9069 (reader): Don't.
9070 (errtoken, eoftoken, undeftoken, axiom): Extern.
9071
03b31c0c
AD
90722002-04-07 Akim Demaille <akim@epita.fr>
9073
9074 * src/gram.h (rule_s): prec and precsym are now pointers
9075 to the bucket giving the priority/associativity.
9076 Member `associativity' removed: useless.
9077 * src/reduce.c, src/conflicts.c: Adjust.
9078
8b3df748
AD
90792002-04-07 Akim Demaille <akim@epita.fr>
9080
9081 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
9082 Properly escape the symbols' TAG when outputting them.
9083
e601aa1d
AD
90842002-04-07 Akim Demaille <akim@epita.fr>
9085
9086 * src/lalr.h (LA): Is a bitsetv, not bitset*.
9087
b0299a2e
AD
90882002-04-07 Akim Demaille <akim@epita.fr>
9089
9090 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
9091 (LArule): this, which is an array to rule_t*.
9092 * src/print.c, src/conflicts.c: Adjust.
9093
d7e1f00c
AD
90942002-04-07 Akim Demaille <akim@epita.fr>
9095
9096 * src/gram.h (rule_t): Rename `number' as `user_number'.
9097 `number' is a new member.
9098 Adjust dependencies.
9099 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
9100
cc9305dd
AD
91012002-04-07 Akim Demaille <akim@epita.fr>
9102
9103 As a result of the previous patch, it is no longer needed
9104 to reorder ritem itself.
9105
9106 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
9107
b0940840
AD
91082002-04-07 Akim Demaille <akim@epita.fr>
9109
9110 Be sure never to walk through RITEMS, but use only data related to
9111 the rules themselves. RITEMS should be banished.
9112
9113 * src/output.c (output_token_translations): Rename as...
9114 (prepare_tokens): this.
9115 In addition to `translate', prepare the muscles `tname' and
9116 `toknum', which were handled by...
9117 (output_rule_data): this.
9118 Remove, and move the remainder of its outputs into...
9119 (prepare_rules): this new routines, which also merges content from
9120 (output_gram): this.
9121 (prepare_rules): Be sure never to walk through RITEMS.
9122 (output_stos): Rename as...
9123 (prepare_stos): this.
9124 (output): Always invoke prepare_states, after all, just don't use it
9125 in the output if you don't need it.
9126
643a5994
AD
91272002-04-07 Akim Demaille <akim@epita.fr>
9128
9129 * src/LR0.c (new_state): Display `nstates' as the name of the
9130 newly created state.
9131 Adjust to initialize first_state and last_state if needed.
9132 Be sure to distinguish the initial from the final state.
9133 (new_states): Create the itemset of the initial state, and use
9134 new_state.
9135 * src/closure.c (closure): Now that the initial state has its
9136 items properly set, there is no need for a special case when
9137 creating `ruleset'.
9138
9139 As a result, now the rule 0, reducing to $axiom, is visible in the
9140 outputs. Adjust the test suite.
9141
9142 * tests/conflicts.at (Solved SR Conflicts)
9143 (Unresolved SR Conflicts): Adjust.
9144 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
9145 * tests/conflicts.at (S/R in initial): New.
9146
b4c4ccc2
AD
91472002-04-07 Akim Demaille <akim@epita.fr>
9148
9149 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
9150 the RHS of the rules.
9151 * src/output.c (output_gram): Likewise.
9152
bba97eb2
AD
91532002-04-07 Akim Demaille <akim@epita.fr>
9154
9155 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
9156 bucket.
9157 Adjust all dependencies.
9158 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
9159 `number' of the buckets too.
9160 * src/gram.h: Include `symtab.h'.
9161 (associativity): Move to...
9162 * src/symtab.h: here.
9163 No longer include `gram.h'.
9164
c3b407f4
AD
91652002-04-07 Akim Demaille <akim@epita.fr>
9166
9167 * src/gram.h, src/gram.c (rules_rhs_length): New.
9168 (ritem_longest_rhs): Use it.
9169 * src/gram.h (rule_t): `number' is a new member.
9170 * src/reader.c (packgram): Set it.
9171 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
9172 the end of `rules', and count them out of `nrules'.
9173 (reduce_output, dump_grammar): Adjust.
9174 * src/print.c (print_grammar): It is no longer needed to check for
9175 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
9176 * tests/reduce.at (Reduced Automaton): New test.
9177
11652ab3
AD
91782002-04-07 Akim Demaille <akim@epita.fr>
9179
9180 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
9181 lacking `+ 1' to nrules, Bison reported as useless a token if it
9182 was used solely to set the precedence of the last rule...
9183
26b23c1a
AD
91842002-04-07 Akim Demaille <akim@epita.fr>
9185
9186 * data/bison.c++, data/bison.simple: Don't output the current file
9187 name in #line, to avoid useless diffs between two identical
9188 outputs under different names.
9189
18bcecb0
AD
91902002-04-07 Akim Demaille <akim@epita.fr>
9191
9192 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
9193 Normalize loops to using `< nrules + 1', not `<= nrules'.
9194
fa770c86
AD
91952002-04-07 Akim Demaille <akim@epita.fr>
9196
9197 * TODO: Update.
9198
d9b739c3
AD
91992002-04-07 Akim Demaille <akim@epita.fr>
9200
9201 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
9202 bucket.value as bucket.number.
9203
99013900
AD
92042002-04-07 Akim Demaille <akim@epita.fr>
9205
9206 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
9207 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
9208 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
9209 RHS, instead of being an index in RITEMS.
9210
e966383b
PE
92112002-04-04 Paul Eggert <eggert@twinsun.com>
9212
9213 * doc/bison.texinfo: Update copyright date.
9214 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
9215 (Symbols): Warn about running Bison in one character set,
9216 but compiling and/or running in an incompatible one.
9217 Warn about character code 256, too.
9218
92192002-04-03 Paul Eggert <eggert@twinsun.com>
9220
9221 * src/bison.data (YYSTACK_ALLOC): Depend on whether
9222 YYERROR_VERBOSE is nonzero, not whether it is defined.
9223
9224 Merge changes from bison-1_29-branch.
c307773e 9225
8d6c48b9
PE
92262002-03-20 Paul Eggert <eggert@twinsun.com>
9227
9228 Merge fixes from Debian bison_1.34-1.diff.
9229
9230 * configure.in (AC_PREREQ): 2.53.
9231
e53c6322
AD
92322002-03-20 Akim Demaille <akim@epita.fr>
9233
9234 * src/conflicts.c (log_resolution): Argument `resolution' is const.
9235
9ffbeca7
PE
92362002-03-19 Paul Eggert <eggert@twinsun.com>
9237
21db0b2a
PE
9238 * src/bison.simple (YYCOPY): New macro.
9239 (YYSTACK_RELOCATE): Use it.
9240 Remove Type arg; no longer needed. All callers changed.
9241 (yymemcpy): Remove; no longer needed.
9242
9ffbeca7
PE
9243 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
9244 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9245
642cb8f8
AD
92462002-03-19 Akim Demaille <akim@epita.fr>
9247
9248 Test and fix the #line outputs.
9249
9250 * tests/atlocal.at (GCC): New.
9251 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 9252 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
9253 (Action synch line, Epilogue synch line): New tests.
9254 * src/reader.c (parse_union_decl): Define the muscle stype_line.
9255 * data/bison.simple, data/bison.c++: Use it.
9256
3c31a486
AD
92572002-03-19 Akim Demaille <akim@epita.fr>
9258
9259 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
9260 (Solved SR Conflicts, %expect not enough, %expect right)
9261 (%expect too much): Move to...
9262 * tests/conflicts.at: this new file.
9263
0d8bed56
AD
92642002-03-19 Akim Demaille <akim@epita.fr>
9265
9266 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
9267 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
9268 that we can move to enums for instance.
9269 * src/output.c (token_definitions_output): Output a list of
9270 `token-name, token-number' instead of the #define.
9271 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
9272
9208d17f
AD
92732002-03-14 Akim Demaille <akim@epita.fr>
9274
9275 Use Gettext 0.11.1.
9276
af27eacb
RA
92772002-03-09 Robert Anisko <robert@lrde.epita.fr>
9278
9279 * data/bison.c++: Make the user able to add members to the generated
9280 parser by subclassing.
9281
9101a310
RA
92822002-03-05 Robert Anisko <robert@lrde.epita.fr>
9283
9284 * src/reader.c (read_additionnal_code): `c' should be an integer, not
9285 a character.
9286 Reported by Nicolas Tisserand and Nicolas Burrus.
9287
fff9bf0b
RA
92882002-03-04 Robert Anisko <robert@lrde.epita.fr>
9289
9290 * src/reader.c: Warn about lacking semi-colons, do not complain.
9291
64dba31e
RA
92922002-03-04 Robert Anisko <robert@lrde.epita.fr>
9293
9294 * data/bison.c++: Remove a debug line.
9295
374f5a14
RA
92962002-03-04 Robert Anisko <robert@lrde.epita.fr>
9297
9298 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
9299 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
9300 provide a default implementation.
9301
bfcf1f3a
AD
93022002-03-04 Akim Demaille <akim@epita.fr>
9303
9304 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
9305 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
9306 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
9307 * tests/semantic.at (Parsing Guards): Similarly.
9308 * src/reader.at (readgram): Complain if the last rule is not ended
9309 with a semi-colon.
9310
65ccf9fc
AD
93112002-03-04 Akim Demaille <akim@epita.fr>
9312
9313 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
9314 * src/closure.c: here.
9315 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
9316 RTC.
9317 * src/warshall.h, src/warshall.c: Remove.
9318 * tests/sets.at (Broken Closure): Adjust.
9319
d0039cbc
AD
93202002-03-04 Akim Demaille <akim@epita.fr>
9321
9322 * src/output.c (output_skeleton): tempdir is const.
9323 bytes_read is unused.
9324
345cea78
AD
93252002-03-04 Akim Demaille <akim@epita.fr>
9326
9327 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9328 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
9329 Update.
9330 From Michael Hayes.
9331
564801f7
AD
93322002-03-04 Akim Demaille <akim@epita.fr>
9333
9334 * src/closure.c (closure): `r' is unused.
9335
e5352bc7
AD
93362002-03-04 Akim Demaille <akim@epita.fr>
9337
9338 * tests/sets.at (Broken Closure): Add the ending `;'.
9339 * src/reader.at (readgram): Complain if a rule is not ended with a
9340 semi-colon.
9341
914feea9
AD
93422002-03-04 Akim Demaille <akim@epita.fr>
9343
9344 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
9345 (count_sr_conflicts): Use bitset_count.
9346 * src/reduce.c (inaccessable_symbols): Ditto.
9347 (bits_size): Remove.
9348 * src/warshall.h, src/warshall.c: Convert to bitsetv.
9349
f0250de6
AD
93502002-03-04 Akim Demaille <akim@epita.fr>
9351
9352 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
9353 * src/reduce.c: Remove the `bitset_zero's following the
9354 `bitset_create's, as now it is performed by the latter.
9355
ef017502
AD
93562002-03-04 Akim Demaille <akim@epita.fr>
9357
9358 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
9359 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
9360 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
9361 latest sources from Michael.
9362
76514394
AD
93632002-03-04 Akim Demaille <akim@epita.fr>
9364
9365 * src/output.c (output): Don't free the grammar.
9366 * src/reader.c (grammar_free): New.
9367 * src/main.c (main): Call it and don't free symtab here.
9368
55024580
AD
93692002-03-04 Akim Demaille <akim@epita.fr>
9370
9371 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
9372 before returning.
9373 Reported by Benoit Perrot.
9374
f9abaa2c
AD
93752002-03-04 Akim Demaille <akim@epita.fr>
9376
9377 Use bitset operations when possible, not loops over bits.
9378
9379 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
9380 bitset_or.
9381 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
9382 * src/reduce.c (useless_nonterminals): Formatting changes.
9383 * src/warshall.c (TC): Use bitset_or.
9384
0e721e75
AD
93852002-03-04 Akim Demaille <akim@epita.fr>
9386
9387 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
9388 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
9389 Ditto.
9390
0fb1ffb1
AD
93912002-03-04 Akim Demaille <akim@epita.fr>
9392
9393 * src/lalr.c (F): Now a bitset*.
9394 Adjust all dependencies.
9395
b86796bf
AD
93962002-03-04 Akim Demaille <akim@epita.fr>
9397
9398 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
9399 Adjust all dependencies.
9400
602bbf31
AD
94012002-03-04 Akim Demaille <akim@epita.fr>
9402
9403 * src/L0.c, src/LR0.h (nstates): Be size_t.
9404 Adjust comparisons (signed vs unsigned).
9405 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
9406 bitset*.
9407 Adjust all dependencies.
9408
d8a0245c
AD
94092002-03-04 Akim Demaille <akim@epita.fr>
9410
9411 * src/closure.c (firsts): Now, also a bitset.
9412 Adjust all dependencies.
9413 (varsetsize): Remove, now unused.
9414 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
9415
34ba9743
AD
94162002-03-04 Akim Demaille <akim@epita.fr>
9417
9418 * src/print.c: Convert to use bitset.h, not hand coded iterations
9419 over ints.
9420
ed86e78c
AD
94212002-03-04 Akim Demaille <akim@epita.fr>
9422
9423 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
9424
dfdb1797
AD
94252002-03-04 Akim Demaille <akim@epita.fr>
9426
9427 * src/closure.c (ruleset): Be a bitset.
9428 (rulesetsize): Remove.
9429
7086e707
AD
94302002-03-04 Akim Demaille <akim@epita.fr>
9431
9432 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9433 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
9434 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
9435 * src/closure.c (fderives): Be an array of bitsets.
9436
98254360
RA
94372002-02-28 Robert Anisko <robert@lrde.epita.fr>
9438
9439 * data/bison.c++: Merge the two generated headers. Insert a copyright
9440 notice in each output file.
9441
a75c057f
AD
94422002-02-28 Akim Demaille <akim@epita.fr>
9443
9444 * data/bison.c++: Copy the prologue of bison.simple to fetch
9445 useful M4 definitions, such as b4_header_guard.
9446
06b00abc
AD
94472002-02-25 Akim Demaille <akim@epita.fr>
9448
9449 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
9450 translator friendly scheme for the bgr
9451 copyright notice.
06b00abc 9452
70e7d534
AD
94532002-02-25 Akim Demaille <akim@epita.fr>
9454
9455 * src/output.c (header_output): Remove, now handled completely via
9456 M4.
9457
abe017f6
AD
94582002-02-25 Akim Demaille <akim@epita.fr>
9459
9460 * m4/m4.m4: New, from CVS Autoconf.
9461 * configure.in: Invoke it.
9462 * src/output.c (output_skeleton): Use its result instead of the
9463 hard coded name.
9464
381fb12e
AD
94652002-02-25 Akim Demaille <akim@epita.fr>
9466
9467 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
9468 Fileutils 4.1.5.
9469 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
9470 * src/output.c (output_skeleton): Use mkstemp to create a real
9471 temporary file.
9472 Move the filling of `skeleton' and its muscle to...
9473 (prepare): here.
9474 (output): Move the definition of the prologue muscle to...
9475 (prepare): here.
9476 * src/system.h (DEFAULT_TMPDIR): New.
9477
6f38107f
PE
94782002-02-14 Paul Eggert <eggert@twinsun.com>
9479
9480 Remove the support for C++ namespace cleanliness; it was
9481 causing more problems than it was curing, since it didn't work
9482 properly on some nonstandard C++ compilers. This can wait
9483 for a proper C++ parser.
9484
9485 * NEWS: Document this.
9486 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
9487 of C++, as it's treated like C now.
9488 * src/bison.simple (YYSTD): Remove.
9489 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
9490 Treat C++ just like Standard C instead of trying to support
9491 namespace cleanliness.
9492
80cce3da
AD
94932002-02-14 Akim Demaille <akim@epita.fr>
9494
9495 * tests/regression.at (else): Adjust to Andreas' change.
9496
842e8679
AD
94972002-02-14 Akim Demaille <akim@epita.fr>
9498
9499 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
9500
4bda3f10
AD
95012002-02-13 Andreas Schwab <schwab@suse.de>
9502
9503 * src/output.c (output_rule_data): Don't output NULL, it might
9504 not be defined yet.
9505
4162fa07 95062002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 9507
4162fa07
RA
9508 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
9509 (Copyright notice): Update.
b418ecd8 9510
bd16a5dc
AD
95112002-02-11 Akim Demaille <akim@epita.fr>
9512
9513 * tests/regression.at (%nonassoc and eof): Don't include
9514 nonportable headers.
9515
8d69a1a3
RA
95162002-02-08 Robert Anisko <robert@lrde.epita.fr>
9517
9518 * data/bison.c++: Correct error recovery. Make the user able to
9519 initialize the starting location.
9520
9b2d0677
AD
95212002-02-07 Akim Demaille <akim@epita.fr>
9522
9523 * tests/input.at: New.
9524
69e2658b
RA
95252002-02-07 Robert Anisko <robert@lrde.epita.fr>
9526
9527 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 9528 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
9529 directives around tables only needed for debugging.
9530
4aacc3a7
RA
95312002-02-07 Robert Anisko <robert@lrde.epita.fr>
9532
9533 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
9534 C++ parsers.
9535 (yy::b4_name::parse): Use print_.
9536
762a801e
RA
95372002-02-07 Robert Anisko <robert@lrde.epita.fr>
9538
9539 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
9540
4bb2bc3f
RA
95412002-02-07 Robert Anisko <robert@lrde.epita.fr>
9542
9543 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
9544 C++ parsers.
9545 (yy::b4_name::parse): Build verbose error messages, and use error_.
9546
6b45a3ca
RA
95472002-02-06 Robert Anisko <robert@lrde.epita.fr>
9548
9549 * data/bison.c++: Fix m4 quoting in comments.
9550
50997c6e
RA
95512002-02-06 Robert Anisko <robert@lrde.epita.fr>
9552
9553 * data/bison.c++: Adjust the parser code. Fix some muscles that were
9554 not expanded by m4.
9555
3f3eed27
AD
95562002-02-05 Akim Demaille <akim@epita.fr>
9557
9558 * data/bison.c++: Adjust to the M4 back end.
9559 More is certainly needed.
9560
be2a1a68
AD
95612002-02-05 Akim Demaille <akim@epita.fr>
9562
9563 Give a try to M4 as a back end.
9564
9565 * lib/readpipe.c: New, from wdiff.
9566 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
9567 BISON_HAIRY.
9568 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
9569 specific values. Now it is m4 that performs the lookup.
9570 * src/parse-skel.y: Remove.
9571 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
9572 * src/output.c (actions_output, guards_output)
9573 (token_definitions_output): No longer keeps track of the output
9574 line number, hence remove the second argument.
9575 (guards_output): Check against the guard member of a rule, not the
9576 action member.
9577 Adjust callers.
9578 (output_skeleton): Don't look for the skeleton location, let m4 do
9579 that.
9580 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
9581 file will be used.
9582 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
9583 (prepare): Given that for the time being changesyntax is not
9584 usable in M4, rename the muscles using `-' to `_'.
9585 Define `defines_flag', `output_parser_name' and `output_header_name'.
9586 * src/output.h (actions_output, guards_output)
9587 (token_definitions_output): Adjust prototypes.
9588 * src/scan-skel.l: Instead of scanning the skeletons, it now
9589 processes the output of m4: `__oline__' and `#output'.
9590 * data/bison.simple: Adjust to be used by M4(sugar).
9591 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
9592 to date.
9593 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
9594 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
9595 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
9596 shamelessly stolen from CVS Autoconf.
9597
beda758b
AD
95982002-02-05 Akim Demaille <akim@epita.fr>
9599
9600 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
9601 * configure.in: Check for the declarations of free and malloc.
9602 * src/muscle_tab.c: Adjust.
9603
5ece6d43
AD
96042002-02-05 Akim Demaille <akim@epita.fr>
9605
9606 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
9607 which have no values.
9608
5bb18f9a
AD
96092002-02-05 Akim Demaille <akim@epita.fr>
9610
9611 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
9612 * data/: here.
9613
894dd62e
PE
96142002-01-29 Paul Eggert <eggert@twinsun.com>
9615
9616 * src/bison.simple (YYSIZE_T): Do not define merely because
9617 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
9618 On some platforms, <alloca.h> does not declare YYSTD (size_t).
9619
82841af7
AD
96202002-01-27 Akim Demaille <akim@epita.fr>
9621
9622 Fix `%nonassoc and eof'.
9623
9624 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
9625 which were not properly copied! Replace
9626 memcpy (res->errs, src->errs, src->nerrs);
9627 with
9628 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
9629 !!!
9630 * tests/regression.at (%nonassoc and eof): Adjust to newest
9631 Autotest: `.' is not in the PATH.
9632
318b76e9
AD
96332002-01-27 Akim Demaille <akim@epita.fr>
9634
9635 * tests/sets.at (AT_EXTRACT_SETS): New.
9636 (Nullable): Use it.
9637 (Firsts): New.
9638
30d2f3d5
AD
96392002-01-26 Akim Demaille <akim@epita.fr>
9640
9641 * tests/actions.at, tests/calc.at, tests/headers.at,
9642 * tests/torture.at: Adjust to the newest Autotest which no longer
9643 forces `.' in the PATH.
9644
30f8c395
AD
96452002-01-25 Akim Demaille <akim@epita.fr>
9646
9647 * tests/regression.at (%nonassoc and eof): New.
9648 Suggested by Robert Anisko.
9649
29ae55f1
AD
96502002-01-24 Akim Demaille <akim@epita.fr>
9651
9652 Bison dumps core when trying to complain about broken input files.
9653 Reported by Cris van Pelt.
9654
9655 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
9656 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
9657 into...
9658 (Invalid inputs): Strengthen: exercise parse_percent_token.
9659
2b548aa6
RA
96602002-01-24 Robert Anisko <robert.anisko@epita.fr>
9661
9662 * src/Makefile.am: Add bison.c++.
9663 * src/bison.c++: New skeleton.
9664
bb0146c2
AD
96652002-01-21 Paolo Bonzini <bonzini@gnu.org>
9666
9667 * po/it.po: New.
9668
bec30531
AD
96692002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
9670
9671 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
9672
fc6edc45
MA
96732002-01-20 Marc Autret <marc@gnu.org>
9674
9675 * src/files.c (compute_output_file_names): Fix
9676
5e5d5415
MA
96772002-01-20 Marc Autret <marc@gnu.org>
9678
9679 * tests/output.at: New test.
9680 * src/files.c (compute_base_names): Don't map extensions when
9681 the YACC flag is set, use defaults.
9682 Reported by Evgeny Stambulchik.
9683
44ea3fbd
MA
96842002-01-20 Marc Autret <marc@gnu.org>
9685
ba0fe3c7
PE
9686 * src/system.h: Need to define __attribute__ away for non-GCC
9687 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
9688 Suggested by Albert Chin-A-Young.
9689
338963d1
TVH
96902002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
9691
9692 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
9693 canonical definition.
9694 * src/system.h: Use the canonical definition for PARAMS (avoids
9695 a conflict with the macro from lib/hash.h).
9696
c57b2479
AD
96972002-01-11 Akim Demaille <akim@epita.fr>
9698
9699 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 9700 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 9701
b85810ae
AD
97022002-01-09 Akim Demaille <akim@epita.fr>
9703
9704 * src/files.c, src/files.h (output_infix): New.
9705 (tab_extension): Remove.
9706 (compute_base_names): Compute the former, drop the latter.
9707 * src/output.c (prepare): Insert the muscles `output-infix', and
9708 `output-suffix'.
9709 * src/parse-skel.y (string, string.1): New.
9710 (section.header): Use it.
9711 (section.yacc): Remove.
9712 (prefix): Remove too.
9713 * src/scan-skel.l: Adjust.
9714 * src/bison.simple, src/bison.hairy: Adjust.
9715
cae60122
AD
97162002-01-09 Akim Demaille <akim@epita.fr>
9717
9718 * configure.in (WERROR_CFLAGS): Compute it.
9719 * src/Makefile.am (CFLAGS): Pass it.
9720 * tests/atlocal.in (CFLAGS): Idem.
9721 * src/files.c: Fix a few warnings.
9722 (get_extension_index): Remove, unused.
9723
ae404801
AD
97242002-01-08 Akim Demaille <akim@epita.fr>
9725
9726 * src/getargs.c (AS_FILE_NAME): New.
9727 (getargs): Use it to convert DOSish file names.
9728 * src/files.c (base_name): Rename as full_base_name to avoid
9729 clashes with `base_name ()'.
9730 (filename_split): New.
9731 (compute_base_names): N-th rewrite, using filename_split.
9732
22312b71
AD
97332002-01-08 Akim Demaille <akim@epita.fr>
9734
9735 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
9736 New, stolen from the Fileutils 4.1.
9737 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9738 * configure.in: Check for the presence of memrchr, and of its
9739 prototype.
9740
a67cef01
TVH
97412002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
9742
9743 * lib/hash.h (__P): Added definition for this macro.
9744 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
9745 BUILT_SOURCES, to ensure they are generated first.
9746 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
9747 %error-verbose to allow bootstrapping with bison 1.30x.
9748
2b25d624
AD
97492002-01-06 Akim Demaille <akim@epita.fr>
9750
9751 * src/reader.c (parse_braces): Don't fetch the next char, the
9752 convention is to fetch on entry.
9753 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
9754 'switch' without a following semicolon.
9755 * tests/regression.at (braces parsing): New.
9756
3460813b
AD
97572002-01-06 Akim Demaille <akim@epita.fr>
9758
9759 Bison is dead wrong in its RR conflict reports.
9760
9761 * tests/torture.at (GNU Cim Grammar): New.
9762 * src/conflicts.c (count_rr_conflicts): Fix.
9763
73784c64
AD
97642002-01-06 Akim Demaille <akim@epita.fr>
9765
9766 Creating package.m4 from configure.ac causes too many problems.
9767
9768 * tests/Makefile.am (package.m4): Create it by hand,
9769 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
9770
25d81090
AD
97712002-01-06 Akim Demaille <akim@epita.fr>
9772
9773 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
9774 skeleton.h.
9775
a9b8959e
PE
97762002-01-04 Paul Eggert <eggert@twinsun.com>
9777
9778 * doc/bison.texinfo (Debugging):
9779 Remove YYSTDERR; it's no longer defined or used.
9780 Also, s/cstdio.h/cstdio/.
9781
25d81090
AD
97822002-01-03 Akim Demaille <akim@epita.fr>
9783
9784 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
9785
1109455c
AD
97862002-01-03 Akim Demaille <akim@epita.fr>
9787
9788 * src/parse-skel.y (process_skeleton): Don't bind the parser's
9789 tracing code to --trace, wait for a better --trace option, with
9790 args.
9791
7ea5e977
AD
97922002-01-03 Akim Demaille <akim@epita.fr>
9793
9794 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
9795 The ISO C++ standard is extremely clear about it: stderr is
9796 considered a macro, not a regular symbol (see table 94 `Header
9797 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
9798 Therefore std:: does not apply to it. It still does with fprintf.
9799 Also, s/cstdio.h/cstdio/.
9800
fab5b110
AD
98012002-01-03 Akim Demaille <akim@epita.fr>
9802
9803 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
9804 for non system headers.
9805
aed7fd9b
AD
98062002-01-02 Akim Demaille <akim@epita.fr>
9807
9808 Equip the skeleton chain with location tracking, runtime trace,
9809 pure parser and scanner.
9810
9811 * src/parse-skel.y: Request a pure parser, locations, and prefix
9812 renaming.
9813 (%union): Having several members with the same type does not help
9814 type mismatches, simplify.
9815 (YYPRINT, yyprint): New.
9816 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
9817 (skel_error): this.
9818 Handle locations.
9819 * src/scan-skel.l: Adjust to these changes.
9820 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
9821 (LOCATION_PRINT, skel_control_t): New.
9822
24fad99e
AD
98232001-12-30 Akim Demaille <akim@epita.fr>
9824
9825 * src/parse-skel.y: Get rid of the shift/reduce conflict:
9826 replace `gb' with BLANKS.
9827 * src/scan-skel.l: Adjust.
9828
a4b36db4
AD
98292001-12-30 Akim Demaille <akim@epita.fr>
9830
9831 * src/system.h: We don't need nor want bcopy.
9832 Throw away MS-DOS crap: we don't need getpid.
9833 * configure.in: We don't need strndup. It was even causing
9834 problems: because Flex includes the headers *before* us,
9835 _GNU_SOURCE is not defined by config.h, and therefore strndup was
9836 not visible.
9837 * lib/xstrndup.c: New.
9838 * src/scan-skel.l: Use it.
9839 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
9840 * src/parse-skel.y: Use %directives instead of #defines.
9841
1239777d
AD
98422001-12-30 Akim Demaille <akim@epita.fr>
9843
9844 * src/skeleton.h: New.
9845 * src/output.c (output_parser, output_master_parser): Remove, dead
9846 code.
9847 * src/output.h (get_lines_number, actions_output, guards_output)
9848 (token_definitions_output): Prototype them.
9849 * src/parse-skel.y: Add the license notice.
9850 Include output.h and skeleton.h.
9851 (process_skeleton): Returns void, and takes a single parameter.
9852 * src/scan-skel.l: Add the license notice.
9853 Include skeleton.h.
9854 Don't use %option yylineno: it seems that then Flex imagines
9855 REJECT has been used, and therefore it won't reallocate its
9856 buffers (which makes no other sense to me than a bug). It results
9857 in warnings for `unused: yy_flex_realloc'.
9858
9b3add5b
RA
98592001-12-30 Robert Anisko <robert.anisko@epita.fr>
9860
9861 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9862 (MUSCLE_INSERT_PREFIX): ...to there.
9863 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9864 (MUSCLE_INSERT_PREFIX): Move from here...
9865
9866 * src/bison.hairy: Add a section directive. Put braces around muscle
9867 names. This parser skeleton is still broken, but Bison should not
9868 choke on a bad muscle 'syntax'.
9869 * src/bison.simple: Add a section directive. Put braces around muscle
9870 names.
9871
9872 * src/files.h (strsuffix, stringappend): Add declarations.
9873 (tab_extension): Add declaration.
9874 (short_base_name): Add declaration.
9875
9876 * src/files.c (strsuffix, stringappend): No longer static. These
9877 functions are used in the skeleton parser.
9878 (tab_extension): New.
9879 (compute_base_names): Use the computations done in this function
fab5b110 9880 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
9881 names.
9882 (short_base_name): No longer static.
9883
9884 * src/output.c (output_skeleton): New.
9885 (output): Disable call to output_master_parser, and give a try to
9886 a new skeleton handling system.
9887 (guards_output, actions_output): No longer static.
9888 (token_definitions_output, get_lines_number): No longer static.
9889
9890 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
9891
fab5b110 9892 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
9893 parse-skel.y.
9894
9895 * src/parse-skel.y: New file.
9896 * src/scan-skel.l: New file.
9897
b5b61c61
AD
98982001-12-29 Akim Demaille <akim@epita.fr>
9899
9900 %name-prefix is broken.
9901
9902 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
9903 Adjust all dependencies.
9904 * tests/headers.at (export YYLTYPE): Strengthen this test: use
9905 %name-prefix.
9906
9907 Renaming yylval but not yylloc is not consistent. Now we do.
9908
9909 * src/bison.simple: Prefix yylloc if used.
9910 * doc/bison.texinfo (Decl Summary): Document that.
9911
8c9a50be
AD
99122001-12-29 Akim Demaille <akim@epita.fr>
9913
9914 * doc/bison.texinfo: Promote `%long-directive' over
9915 `%long_directive'.
9916 Remove all references to fixed-output-files, yacc is enough.
9917
d99361e6
AD
99182001-12-29 Akim Demaille <akim@epita.fr>
9919
9920 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
9921 user prologue. These are defaults.
9922 * tests/actions.at (Mid-rule actions): Make sure the user can
9923 define YYDEBUG and YYERROR_VERBOSE.
9924
b9cecb91
AD
99252001-12-29 Akim Demaille <akim@epita.fr>
9926
9927 * src/output.c (header_output): Don't forget to export YYLTYPE and
9928 yylloc.
9929 * tests/headers.at (export YYLTYPE): New, make sure it does.
9930 * tests/regression.at (%union and --defines, Invalid CPP headers):
9931 Move to...
9932 * tests/headers.at: here.
9933
aea13e97
AD
99342001-12-29 Akim Demaille <akim@epita.fr>
9935
9936 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
9937
931394cb
AD
99382001-12-29 Akim Demaille <akim@epita.fr>
9939
9940 * tests/actions.at (Mid-rule actions): Output on a single line
9941 instead of several.
9942
704a47c4
AD
99432001-12-29 Akim Demaille <akim@epita.fr>
9944
9945 * doc/bison.texinfo: Formatting changes.
9946
091e20bb
AD
99472001-12-29 Akim Demaille <akim@epita.fr>
9948
9949 Don't store the token defs in a muscle, just be ready to output it
9950 on command. Now possible via `symbols'. Fixes a memory leak.
9951
9952 * src/output.c (token_definitions_output): New.
9953 (output_parser, header_output): Use it.
9954 * src/reader.c (symbols_save): Remove.
9955
cce71710
AD
99562001-12-29 Akim Demaille <akim@epita.fr>
9957
9958 * src/bison.simple: Do not provide a default for YYSTYPE and
9959 YYLTYPE before the user's prologue. Otherwise it's hardly... a
9960 default.
9961
82c035a8
AD
99622001-12-29 Akim Demaille <akim@epita.fr>
9963
9964 Mid-rule actions are simply... ignored!
9965
9966 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9967 the empty-rule associated to the dummy symbol, not to the host
9968 rule.
9969 * tests/actions.at (Mid-rule actions): New.
9970
8419d367
AD
99712001-12-29 Akim Demaille <akim@epita.fr>
9972
9973 Memory leak.
9974
9975 * src/reader.c (reader): Free grammar.
9976
375d5806
AD
99772001-12-29 Akim Demaille <akim@epita.fr>
9978
9979 Memory leak.
9980
9981 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9982 since it allocates it for each state, although only one is needed.
9983 (allocate_storage): Do it here.
9984
f51cb8ff
AD
99852001-12-29 Akim Demaille <akim@epita.fr>
9986
9987 * src/options.h, src/options.c (create_long_option_table): Rename
9988 as...
9989 (long_option_table_new): this, with a clearer prototype.
9990 (percent_table): Remove, unused,
9991 * src/getargs.c (getargs): Adjust.
9992
29e88316
AD
99932001-12-29 Akim Demaille <akim@epita.fr>
9994
9995 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9996 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9997 as states.
9998
b9f71f19
AD
99992001-12-29 Akim Demaille <akim@epita.fr>
10000
10001 * src/lalr.c (build_relations): Rename `states' as `states1'.
10002 Sorry, I don't understand exactly what it is, no better name...
10003
1a2b5d37
AD
100042001-12-29 Akim Demaille <akim@epita.fr>
10005
10006 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
10007 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
10008 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
10009 as rules.
10010
1cca533e
AD
100112001-12-29 Akim Demaille <akim@epita.fr>
10012
10013 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
10014 ago.
10015
c03ae966
AD
100162001-12-29 Akim Demaille <akim@epita.fr>
10017
10018 * src/reader.c, src/reader.h (user_toknums): Remove.
10019 Adjust all users to use symbols[i]->user_token_number.
10020
5a670b1e
AD
100212001-12-29 Akim Demaille <akim@epita.fr>
10022
10023 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
10024 Adjust all users to use symbols[i]->prec or ->assoc.
10025
ad949da9
AD
100262001-12-29 Akim Demaille <akim@epita.fr>
10027
10028 * src/reader.c, src/reader.h (tags): Remove.
10029 Adjust all users to use symbols[i]->tag.
10030
0e78e603
AD
100312001-12-29 Akim Demaille <akim@epita.fr>
10032
10033 * src/gram.h, src/gram.c (symbols): New, similar to state_table
10034 and rule_table.
10035 * src/reader.c (packsymbols): Fill this table.
10036 Drop sprec.
10037 * src/conflicts.c (resolve_sr_conflict): Adjust.
10038 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
10039 single table.
10040 Use symbols[i]->tag instead of tags[i].
10041
213e640e
AD
100422001-12-29 Akim Demaille <akim@epita.fr>
10043
10044 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
10045 In addition, put a comment in there, to replace...
10046 * tests/regression.at (%union and C comments): Remove.
10047
e7b8bef1
AD
100482001-12-29 Akim Demaille <akim@epita.fr>
10049
10050 * tests/regression.at (Web2c Actions): Blindly move the actual
10051 output as expected output. The contents *seem* right to me, but I
10052 can't pretend reading perfectly parser tables... Nonetheless, all
10053 the other tests pass correctly, the table look OK, even though the
10054 presence of `$axiom' is to be noted: AFAICS it is useless (but
10055 harmless).
10056
b68e7744
AD
100572001-12-29 Akim Demaille <akim@epita.fr>
10058
10059 * src/reader.c (readgram): Don't add the rule 0 if there were no
10060 rules read. In other words, add it _after_ having performed
10061 grammar sanity checks.
10062 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
10063
78d5bae9
AD
100642001-12-29 Akim Demaille <akim@epita.fr>
10065
10066 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
10067 visible, and some states have now a different number.
10068
ff442794
AD
100692001-12-29 Akim Demaille <akim@epita.fr>
10070
10071 * src/reader.c (readgram): Bind the initial rule's lineno to that
10072 of the first rule.
10073 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
10074 (Solved SR Conflicts): Adjust rule 0's line number.
10075
610ab194
AD
100762001-12-29 Akim Demaille <akim@epita.fr>
10077
10078 Fix the `GAWK Grammar' failure.
10079
10080 * src/LR0.c (final_state): Initialize to -1 so that we do compute
10081 the reductions of the first state which was mistakenly confused
10082 with the final state because precisely final_state was initialized
10083 to 0.
10084 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
10085 now noticed by Bison.
10086 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
10087 have a reduction on $default.
10088
29d29c8f
AD
100892001-12-29 Akim Demaille <akim@epita.fr>
10090
10091 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
10092 rule line numbers.
10093 * src/closure.c (print_closure): Likewise.
10094 * src/derives.c (print_derives): Likewise.
10095 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
10096 now.
10097
7c6b64d0
AD
100982001-12-29 Akim Demaille <akim@epita.fr>
10099
10100 * src/lalr.c (lookaheads_print): New.
10101 (lalr): Call it when --trace-flag.
10102 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
10103 are dumped.
10104
3d4daee3
AD
101052001-12-29 Akim Demaille <akim@epita.fr>
10106
10107 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
10108 when walking through ritem, even via rule->rhs.
10109 * src/reduce.c (dump_grammar, useful_production, reduce_output)
10110 (useful_production, useless_nonterminals): Likewise.
10111 (reduce_grammar_tables): Likewise, plus update nritems.
10112 * src/nullable.c (set_nullable): Likewise.
10113 * src/lalr.c (build_relations): Likewise.
10114 * tests/sets.at (Nullable): Adjust.
10115 Fortunately, now, the $axiom is no longer nullable.
10116
9e7f6bbd
AD
101172001-12-29 Akim Demaille <akim@epita.fr>
10118
10119 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
10120 the 0-sentinel.
10121 * src/gram.c (ritem_longest_rhs): Likewise.
10122 * src/reduce.c (nonterminals_reduce): Likewise.
10123 * src/print_graph.c (print_graph): Likewise.
10124 * src/output.c (output_rule_data): Likewise.
10125 * src/nullable.c (set_nullable): Likewise.
10126
255ef638
AD
101272001-12-29 Akim Demaille <akim@epita.fr>
10128
10129 * src/output.c: Comment changes.
10130
0d8a7363
AD
101312001-12-27 Paul Eggert <eggert@twinsun.com>
10132
10133 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
10134 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
10135 Sparc, as they were causing more porting problems than the
10136 (minor) performance improvement was worth.
10137
10138 Also, catch up with 1.31's YYSTD.
10139
3db472b9
AD
101402001-12-27 Akim Demaille <akim@epita.fr>
10141
10142 * src/output.c (output_gram): Rely on nritems, not the
10143 0-sentinel. See below.
10144 Use -1 as separator, not 0.
10145 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
10146 Rely on -1 as separator in yyrhs, instead of 0.
10147 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
10148 twice `Now at end of input', therefore there are two lines less to
10149 expect.
10150
b365aa05
AD
101512001-12-27 Akim Demaille <akim@epita.fr>
10152
10153 * tests/regression.at (Unresolved SR Conflicts):
10154 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
10155 below.
10156
30171f79
AD
101572001-12-27 Akim Demaille <akim@epita.fr>
10158
10159 * src/LR0.c (new_state): Recognize the final state by the fact it
10160 is reached by eoftoken.
10161 (insert_start_shifting_state, insert_eof_shifting_state)
10162 (insert_accepting_state, augment_automaton): Remove, since now
10163 these states are automatically computed from the initial state.
10164 (generate_states): Adjust.
10165 * src/print.c: When reporting a rule number to the user, substract
10166 1, so that the axiom rule is rule 0, and the first user rule is 1.
10167 * src/reduce.c: Likewise.
10168 * src/print_graph.c (print_core): For the time being, just as for
10169 the report, depend upon --trace-flags to dump the full set of
10170 items.
10171 * src/reader.c (readgram): Once the grammar read, insert the rule
10172 0: `$axiom: START-SYMBOL $'.
10173 * tests/set.at: Adjust: rule 0 is now displayed, and since the
10174 number of the states has changed (the final state is no longer
10175 necessarily the last), catch up.
10176
75142d45
AD
101772001-12-27 Akim Demaille <akim@epita.fr>
10178
10179 Try to make the use of the eoftoken valid. Given that its value
10180 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
10181 is used instead of > 0 where appropriate, (ii), depend upon nritems
10182 instead of the 0-sentinel.
10183
10184 * src/gram.h, src/gram.c (nritems): New.
10185 Expected to be duplication of nitems, but for the time being...
10186 * src/reader.c (packgram): Assert nritems and nitems are equal.
10187 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
10188 * src/closure.c (print_closure, print_fderives): Likewise.
10189 * src/gram.c (ritem_print): Likewise.
10190 * src/print.c (print_core, print_grammar): Likewise.
10191 * src/print_graph.c: Likewise.
10192
b7c49edf
AD
101932001-12-27 Akim Demaille <akim@epita.fr>
10194
10195 * src/main.c (main): If there are complains after grammar
10196 reductions, then output the report anyway if requested, then die.
10197 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
10198 * src/reader.c (eoftoken): New.
10199 (parse_token_decl): If the token being defined has value `0', it
10200 is the eoftoken.
10201 (packsymbols): No longer hack `tags' to insert `$' by hand.
10202 Be sure to preserve the value of the eoftoken.
10203 (reader): Make sure eoftoken is defined.
10204 Initialize nsyms to 0: now eoftoken is created just like the others.
10205 * src/print.c (print_grammar): Don't special case the eof token.
10206 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
10207 lie anyway, albeit pleasant.
10208 * tests/calc.at: Exercise error messages with eoftoken.
10209 Change the grammar so that empty input is invalid.
10210 Adjust expectations.
10211 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
10212
ec2da99f
AD
102132001-12-27 Akim Demaille <akim@epita.fr>
10214
10215 * configure.in: Check the protos of strchr ans strspn.
10216 Replace strchr if needed.
10217 * src/system.h: Provide the protos of strchr, strspn and memchr if
10218 missing.
10219 * lib/strchr.c: New.
10220 * src/reader.c (symbols_save): Use strchr.
10221
8adfa272
AD
102222001-12-27 Akim Demaille <akim@epita.fr>
10223
10224 * src/print.c, src/print_graph.c (escape): New.
10225 Use it to quote the TAGS outputs.
10226 * src/print_graph.c (print_state): Now errors are in red, and
10227 reductions in green.
10228 Prefer high to wide: output the state number on a line of its own.
10229
80dac38c
AD
102302001-12-27 Akim Demaille <akim@epita.fr>
10231
10232 * src/state.h, src/state.c (reductions_new): New.
10233 * src/LR0.c (set_state_table): Let all the states have a
10234 `reductions', even if reduced to 0.
10235 (save_reductions): Adjust.
10236 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
10237 * src/print.c (print_reductions, print_actions): Adjust.
10238 * src/output.c (action_row): Adjust.
10239
2cec70b9
AD
102402001-12-27 Akim Demaille <akim@epita.fr>
10241
10242 * src/state.h, src/state.c (errs_new, errs_dup): New.
10243 * src/LR0.c (set_state_table): Let all the states have an errs,
10244 even if reduced to 0.
10245 * src/print.c (print_errs, print_reductions): Adjust.
10246 * src/output.c (output_actions, action_row): Adjust.
10247 * src/conflicts.c (resolve_sr_conflict): Adjust.
10248
13ca549a
AD
102492001-12-27 Akim Demaille <akim@epita.fr>
10250
10251 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
10252
5092aba5
AD
102532001-12-27 Akim Demaille <akim@epita.fr>
10254
10255 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
10256 * src/print.c: here.
10257 (lookaheadset, shiftset): New, used as additional storage by
10258 print_reductions.
10259 (print_results): Adjust.
10260 (print_shifts, print_gotos, print_errs): New, extracted from...
10261 (print_actions): here.
10262 * src/print_graph.c (print_actions): Remove dead code.
10263
11e2beca
AD
102642001-12-27 Akim Demaille <akim@epita.fr>
10265
10266 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
10267 `$n' and `@n'.
10268
dac3c910
AD
102692001-12-27 Akim Demaille <akim@epita.fr>
10270
10271 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
10272 (build_relations): Adjust.
10273
d0b0fefa
AD
102742001-12-27 Akim Demaille <akim@epita.fr>
10275
10276 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
10277 duplication.
10278
adc8c848
AD
102792001-12-27 Akim Demaille <akim@epita.fr>
10280
10281 * src/reader.c (packgram): Catch nitems overflows.
10282
14d293ac
AD
102832001-12-27 Akim Demaille <akim@epita.fr>
10284
10285 * src/files.c, src/files.h (guard_obstack): Remove.
10286 * src/output.c (output): Adjust.
10287 * src/reader.c (parse_braces): New, factoring...
10288 (copy_action, copy_guard): these two which are renamed as...
10289 (parse_action, parse_guard): these.
10290 As a voluntary consequence, using braces around guards is now
10291 mandatory.
10292
f499b062
AD
102932001-12-27 Akim Demaille <akim@epita.fr>
10294
10295 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
10296 * src/reader.c (symbol_list): `guard' and `guard_line' are new
10297 members.
10298 (symbol_list_new): Adjust.
10299 (copy_action): action_line is the first line, not the last.
10300 (copy_guard): Just as for actions, store the `action' only, not
10301 the switch/case/break flesh.
10302 Don't parse the user action that might follow the guard, let...
10303 (readgram): do it, i.e., now, there can be an action after a
10304 guard.
10305 In other words the guard is just explicitly optional.
10306 (packgram): Adjust.
10307 * src/output.c (guards_output): New.
10308 (output_parser): Call it when needed.
10309 (output): Also free the guard and attrs obstacks.
10310 * src/files.c, src/files.h (obstack_save): Remove.
10311 (output_files): Remove.
10312 As a result, if one needs the former `.act' file, using an
10313 appropriate skeleton which requires actions and guards is now
10314 required.
10315 * src/main.c (main): Adjust.
10316 * tests/semantic.at: New.
10317 * tests/regression.at: Use `input.y' as input file name.
10318 Avoid 8+3 problems by requiring input.c when the test needs the
10319 parser.
10320
d945f5cd
AD
103212001-12-27 Akim Demaille <akim@epita.fr>
10322
10323 * src/reader.c (symbol_list_new): Be sure to initialize all the
10324 fields.
10325
d200e455
AD
103262001-12-27 Akim Demaille <akim@epita.fr>
10327
10328 All the hacks using a final pseudo state are now useless.
10329
10330 * src/LR0.c (set_state_table): state_table holds exactly nstates.
10331 * src/lalr.c (nLA): New.
10332 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
10333 instead of lookaheadsp from the pseudo state (nstate + 1).
10334
f9507c28
AD
103352001-12-27 Akim Demaille <akim@epita.fr>
10336
10337 * src/output.c (action_row, token_actions): Use a state_t instead
10338 of a integer, and nlookaheads instead of the following state's
10339 lookaheadsp.
10340
065fbd27
AD
103412001-12-27 Akim Demaille <akim@epita.fr>
10342
10343 * src/conflicts.c (log_resolution, flush_shift)
10344 (resolve_sr_conflict, set_conflicts, solve_conflicts)
10345 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
10346 (conflicts_print, print_reductions): Use a state_t instead of an
10347 integer when referring to a state.
10348 As much as possible, depend upon nlookaheads, instead of the
10349 `lookaheadsp' member of the following state (since lookaheads of
10350 successive states are successive, the difference between state n + 1
10351 and n served as the number of lookaheads for state n).
10352 * src/lalr.c (add_lookback_edge): Likewise.
10353 * src/print.c (print_core, print_actions, print_state)
10354 (print_results): Likewise.
10355 * src/print_graph.c (print_core, print_actions, print_state)
10356 (print_graph): Likewise.
10357 * src/conflicts.h: Adjust.
10358
1b177bd7
AD
103592001-12-27 Akim Demaille <akim@epita.fr>
10360
10361 * src/bison.hairy: Formatting/comment changes.
10362 ANSIfy.
10363 Remove `register' indications.
10364 Add plenty of `static'.
10365
7742ddeb
AD
103662001-12-27 Akim Demaille <akim@epita.fr>
10367
10368 * src/output.c (prepare): Drop the muscle `ntbase' which
10369 duplicates ntokens.
10370 * src/bison.simple: Formatting/comment changes.
10371 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
10372 is an undocumented synonym.
10373
1fa14068
AD
103742001-12-22 Akim Demaille <akim@epita.fr>
10375
10376 * src/output.c (output_table_data): Change the prototype to use
10377 `int' for array ranges: some invocations do pass an int, not a
10378 short.
10379 Reported by Wayne Green.
10380
b9752825
AD
103812001-12-22 Akim Demaille <akim@epita.fr>
10382
10383 Some actions of web2c.y are improperly triggered.
10384 Reported by Mike Castle.
10385
10386 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
10387 * tests/regression.at (Web2c): Rename as...
10388 (Web2c Report): this.
10389 (Web2c Actions): New.
10390
776209d6
AD
103912001-12-22 Akim Demaille <akim@epita.fr>
10392
10393 Reductions in web2c.y are improperly reported.
10394 Reported by Mike Castle.
10395
10396 * src/conflicts.c (print_reductions): Fix.
10397 * tests/regression.at (Web2c): New.
10398
275fc3ad
AD
103992001-12-18 Akim Demaille <akim@epita.fr>
10400
10401 Some host fail on `assert (!"foo")', which expands to
10402 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
10403 Reported by Nelson Beebee.
10404
10405 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
10406 `#define it_succeeded 0' and `assert (it_succeeded)'.
10407
897668ee
MA
104082001-12-17 Marc Autret <autret_m@epita.fr>
10409
10410 * src/bison.simple: Don't hard code the skeleton line and filename.
10411 * src/output.c (output_parser): Rename 'line' as 'output_line'.
10412 New line counter 'skeleton_line' (skeleton-line muscle).
10413
ab3399e0
PE
104142001-12-17 Paul Eggert <eggert@twinsun.com>
10415
10416 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
10417 YYDEBUG must be defined to a nonzero value.
10418
10419 * src/bison.simple (yytname): Do not assume that the user defines
10420 YYDEBUG to a properly parenthesized expression.
10421
3877f72b
AD
104222001-12-17 Akim Demaille <akim@epita.fr>
10423
10424 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
10425 nlookaheads is a new member.
10426 Adjust all users.
10427 * src/lalr.h (nlookaheads): Remove this orphan declaration.
10428 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
10429 state.
776209d6 10430
331dbc1b
AD
104312001-12-17 Akim Demaille <akim@epita.fr>
10432
10433 * src/files.h, src/files.c (open_files, close_files): Remove.
10434 * src/main.c (main): Don't open/close files, nor invoke lex_free,
10435 let...
10436 * src/reader.c (reader): Do it.
776209d6 10437
be750e4c
AD
104382001-12-17 Akim Demaille <akim@epita.fr>
10439
10440 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 10441
709ae8c6
AD
104422001-12-17 Akim Demaille <akim@epita.fr>
10443
10444 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
10445 (flush_reduce): New.
10446 (resolve_sr_conflict): Adjust.
776209d6 10447
f87685c3
AD
104482001-12-17 Akim Demaille <akim@epita.fr>
10449
10450 * src/output.c (output_obstack): Be static and rename as...
10451 (format_obstack): this, to avoid any confusion with files.c's
10452 output_obstack.
10453 * src/reader.h (muscle_obstack): Move to...
10454 * src/output.h: here, since it's defined in output.c.
10455
837491d8
AD
104562001-12-17 Akim Demaille <akim@epita.fr>
10457
10458 * src/output.c (action_row, save_column, default_goto)
10459 (sort_actions, matching_state, pack_vector): Better variable
10460 locality.
10461
796d61fb
AD
104622001-12-17 Akim Demaille <akim@epita.fr>
10463
10464 * src/output.c: Various formatting changes.
776209d6 10465
64d15509
AD
104662001-12-17 Akim Demaille <akim@epita.fr>
10467
10468 * src/files.c (output_files): Free the output_obstack.
10469 * src/main.c (main): Call print and print_graph conditionally.
10470 * src/print.c (print): Work unconditionally.
10471 * src/print_graph.c (print_graph): Work unconditionally.
10472 * src/conflicts.c (log_resolution): Output only if verbose_flag.
10473
fbc8ecb7
MA
104742001-12-16 Marc Autret <autret_m@epita.fr>
10475
10476 * src/output.c (actions_output): Fix. When we use %no-lines,
10477 there is one less line per action.
10478
f0440388
MA
104792001-12-16 Marc Autret <autret_m@epita.fr>
10480
10481 * src/bison.simple: Remove a useless #line directive.
10482 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
10483 * src/output.c (get_lines_number): New.
776209d6 10484 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
10485 output muscles.
10486 Fix line numbering.
10487 (actions_output): Computes the number of lines taken by actions.
10488 (output_master_parser): Insert new skeleton which is the name of
10489 the output parser file name.
10490
a79986b8
MA
104912001-12-15 Marc Autret <autret_m@epita.fr>
10492
10493 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
10494
4ec8e00f
MA
104952001-12-15 Marc Autret <autret_m@epita.fr>
10496
10497 * src/output.c (output_gram): Keep track of the hairy one.
10498
1a4648ff
AD
104992001-12-15 Akim Demaille <akim@epita.fr>
10500
10501 Make `make distcheck' work.
10502
10503 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
10504 system.h which uses libgettext.h.
10505
9c2c67e6
AD
105062001-12-15 Akim Demaille <akim@epita.fr>
10507
10508 * src/nullable.c (set_nullable): Useless rules must be skipped,
10509 otherwise, since we range over their symbols, we might look at a
10510 nonterminal which no longer ``exists'', i.e., it is not counted in
10511 `nvars', hence we overflow our arrays.
10512
93ede233
AD
105132001-12-15 Akim Demaille <akim@epita.fr>
10514
10515 The header can also be produced directly, without any obstack!
10516 Yahoo!
10517
10518 * src/files.c, src/files.h (defines_obstack): Remove.
10519 (compute_header_macro): Global.
10520 (defines_obstack_save): Remove.
10521 * src/reader.c (parse_union_decl): No longer output to
10522 defines_obstack: its content can be found in the `stype' muscle
10523 anyway.
10524 (output_token_translations): Merge into...
10525 (symbols_output): this.
10526 Rename as...
10527 (symbols_save): this.
10528 (reader): Adjust.
10529 * src/output.c (header_output): New.
10530 (output): Call it.
10531
2666f928
AD
105322001-12-15 Akim Demaille <akim@epita.fr>
10533
10534 * src/reader.c (parse_union_decl): Instead of handling two obstack
10535 simultaneously, use one to define the `stype' muscle, and use the
10536 value of the latter to fill defines_obstack.
10537 (copy_comment): Remove.
10538 (copy_comment2): Work for a single obstack.
10539 Rename as...
10540 (copy_comment): this.
10541
428046f8
AD
105422001-12-15 Akim Demaille <akim@epita.fr>
10543
10544 * src/lex.c, src/lex.h (xgetc): No longer static.
10545 * src/reader.c (parse_union_decl): Revamp.
10546
ea52d706
AD
105472001-12-15 Akim Demaille <akim@epita.fr>
10548
10549 Still making progress in separating Bison into (i) input, (ii)
10550 process, (iii) output: now we can directly output the parser file
10551 without using table_obstack at all.
10552
10553 * src/files.c, src/files.h (table_obstack): Bye bye.
10554 (parser_file_name): New.
10555 * src/files.c (compute_output_file_names): Compute it.
10556 * src/output.c (actions_output, output_parser)
10557 (output_master_parser): To a file instead of an obstack.
10558
3f96f4dc
AD
105592001-12-15 Akim Demaille <akim@epita.fr>
10560
10561 Attach actions to rules, instead of pre-outputting them to
10562 actions_obstack.
10563
10564 * src/gram.h (rule_t): action and action_line are new members.
10565 * src/reader.c (symbol_list): Likewise.
10566 (copy_action): Save the actions within the rule.
10567 (packgram): Save them in rule_table.
10568 * src/output.c (actions_output): New.
10569 (output_parser): Use it on `%%actions'.
10570 (output_rule_data): Don't free rule_table.
10571 (output): Do it.
10572 (prepare): Don't save the `action' muscle.
10573 * src/bison.simple: s/%%action/%%actions/.
10574
51576fb3
AD
105752001-12-15 Akim Demaille <akim@epita.fr>
10576
10577 * src/reader.c (copy_action): When --yacc, don't append a `;'
10578 to the user action: let it fail if lacking.
dee049eb 10579 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 10580
2648a72d
AD
105812001-12-14 Akim Demaille <akim@epita.fr>
10582
10583 * src/lex.c (literalchar): Simply return the char you decoded, non
10584 longer mess around with obstacks and int pointers.
10585 Adjust all callers.
10586
92790e5b
AD
105872001-12-14 Akim Demaille <akim@epita.fr>
10588
10589 * src/lex.c (literalchar): Don't escape the special characters,
10590 just decode them, and keep them as char (before, eol was output as
10591 the 2 char string `\n' etc.).
10592 * src/output.c (output_rule_data): Use quotearg to output the
10593 token strings.
10594
927c1557
PE
105952001-12-13 Paul Eggert <eggert@twinsun.com>
10596
10597 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
10598 Do not infringe on the global user namespace when using C++.
10599 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
10600 All uses of `fprintf' and `stderr' changed.
10601
10602 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
10603
ed8e1f68
AD
106042001-12-13 Akim Demaille <akim@epita.fr>
10605
10606 The computation of nullable is broken: it doesn't handle empty
10607 RHS's properly.
10608
10609 * tests/torture.at (GNU AWK Grammar): New.
10610 * tests/sets.at (Nullable): New.
10611 * src/nullable.c (set_nullable): Instead of blindly looping over
10612 `ritems', loop over the rules, and then over their rhs's.
10613
10614 Work around Autotest bugs.
10615
10616 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
10617 frame, because Autotest understand lines starting with a `+' as
10618 traces from the shell. Then, they are not processed properly.
10619 Admittedly an Autotest bug, but we don't have time to wait for
10620 Autotest to catch up.
10621 * tests/regression.at (Broken Closure): Adjust to the new table
10622 frames.
10623 Move to...
10624 * tests/sets.at: here.
10625
cb581495
AD
106262001-12-13 Akim Demaille <akim@epita.fr>
10627
10628 * src/closure.c (closure): Use nrules instead of playing tricks
10629 with BITS_PER_WORD.
10630
2e729273
AD
106312001-12-13 Akim Demaille <akim@epita.fr>
10632
10633 * src/print.c (print_actions): Output the handling of `$' as the
10634 traces do: shifting the token EOF. Before EOF was treated as a
10635 nonterminal.
10636 * tests/regression.at: Adjust some tests.
10637 * src/print_graph.c (print_core): Complete the set of items via
10638 closure. The next-to-final and final states are still unsatisfying,
10639 but that's to be addressed elsewhere.
10640 No longer output the rule numbers, but do output the state number.
10641 A single loop for the shifts + gotos is enough, but picked a
10642 distinct color for each.
10643 (print_graph): Initialize and finalize closure.
10644
107f7dfb
AD
106452001-12-13 Akim Demaille <akim@epita.fr>
10646
10647 * src/reader.c (readgram): Remove dead code, an strip useless
10648 braces.
10649 (get_type): Remove, unused.
10650
9b53a24f
AD
106512001-12-12 Akim Demaille <akim@epita.fr>
10652
10653 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
10654 on that of lib/error.c.
10655
dbfb6dcd
AD
106562001-12-12 Akim Demaille <akim@epita.fr>
10657
10658 Some hosts don't like `/' in includes.
10659
10660 * src/system.h: Include libgettext.h without qualifying the path.
10661 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
10662 $(top_srcdir).
10663
c25fb648
MA
106642001-12-11 Marc Autret <autret_m@epita.fr>
10665
10666 * src/output.c (output_parser): Remove useless muscle.
10667
710ddc4f
MA
106682001-12-11 Marc Autret <autret_m@epita.fr>
10669
10670 * src/bison.simple: Remove #line just before %%epilogue. It
10671 is now handled in ...
10672 * src/reader.c (read_additionnal_code): Add the output of a
10673 #line for the epilogue.
10674
e83d80b8
MA
106752001-12-10 Marc Autret <autret_m@epita.fr>
10676
927c1557 10677 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
10678 replace precedent remove.
10679 * src/bison.simple: Remove #line before %%prologue because
10680 %%input-line is wrong at this time.
10681
971d5158
MA
106822001-12-10 Marc Autret <autret_m@epita.fr>
10683
10684 * src/reader.c (symbols_output): Clean up.
927c1557 10685 * src/output.c (output_gram, output): Clean up.
971d5158 10686
5edafffd
AD
106872001-12-10 Akim Demaille <akim@epita.fr>
10688
10689 * src/lalr.c (initialize_lookaheads): New. Extracted from...
10690 * src/LR0.c (set_state_table): here.
10691 * src/lalr.c (lalr): Call it.
10692
0279f8e9
AD
106932001-12-10 Akim Demaille <akim@epita.fr>
10694
10695 * src/state.h (shifts): Remove the `number' member: shifts are
10696 attached to state, hence no longer need to be labelled with a
10697 state number.
10698
190c4f5f
AD
106992001-12-10 Akim Demaille <akim@epita.fr>
10700
10701 Now that states have a complete set of members, the linked list of
10702 shifts is useless: just fill directly the state's shifts member.
10703
10704 * src/state.h (shifts): Remove the `next' member.
10705 * src/LR0.c (first_state, last_state): Remove.
10706 Adjust the callers.
10707 (augment_automaton): Don't look for the shifts that must be added
10708 a shift on EOF: it is those of the state we looked for! But now,
10709 since shifts are attached, it is no longer needed to looking
10710 merely by its id: its number.
10711
2a73b93d
AD
107122001-12-10 Akim Demaille <akim@epita.fr>
10713
10714 * src/LR0.c (augment_automaton): Better variable locality.
10715 Remove an impossible branch: if there is a state corresponding to
10716 the start symbol being shifted, then there is shift for the start
10717 symbol from the initial state.
10718
74392f6a
AD
107192001-12-10 Akim Demaille <akim@epita.fr>
10720
10721 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
10722 only when appropriate: when insert_start_shifting_state' is not
10723 invoked.
10724 * tests/regression.at (Rule Line Numbers): Adjust.
10725
37c82725
AD
107262001-12-10 Akim Demaille <akim@epita.fr>
10727
10728 * src/LR0.c (augment_automaton): Now that all states have shifts,
10729 merge the two cases addition shifts to the initial state.
10730
6a164e0c
AD
107312001-12-10 Akim Demaille <akim@epita.fr>
10732
10733 * src/lalr.c (set_state_table): Move to...
10734 * src/LR0.c: here.
10735 * src/lalr.c (lalr): Don't call it...
10736 * src/LR0.c (generate_states): do it.
10737 * src/LR0.h (first_state): Remove, only the table is used.
10738
7215de24
AD
107392001-12-10 Akim Demaille <akim@epita.fr>
10740
10741 * src/LR0.h (first_shift, first_reduction): Remove.
10742 * src/lalr.c: Don't use first_shift: find shifts through the
10743 states.
10744
80e25d4d
AD
107452001-12-10 Akim Demaille <akim@epita.fr>
10746
10747 * src/LR0.c: Attach shifts to states as soon as they are
10748 computed.
10749 * src/lalr.c (set_state_table): Instead of assigning shifts to
10750 state, just assert that the mapping was properly done.
10751
0ab3728b
AD
107522001-12-10 Akim Demaille <akim@epita.fr>
10753
10754 * src/LR0.c (insert_start_shift): Rename as...
10755 (insert_start_shifting_state): this.
10756 (insert_eof_shifting_state, insert_accepting_state): New.
10757 (augment_automaton): Adjust.
10758 Better locality of the variables.
10759 When looking if the start_symbol is shifted from the initial
10760 state, using `while (... symbol != start_symbol ...)' sounds
10761 better than `while (... symbol < start_symbol ...)': If fail
10762 to see how the order between symbols could be relevant!
10763
78af9bbc
AD
107642001-12-10 Akim Demaille <akim@epita.fr>
10765
10766 * src/getargs.h: Don't declare `spec_name_prefix' and
10767 `spec_file_prefix', declared by src/files.h.
10768 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
10769 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
10770 * src/output.c (prepare): Adjust.
10771 * src/reader.c (symbols_output): Likewise.
10772 * src/vmsgetargs.c: Vaguely adjust, but who cares?
10773
bdef2a41
AD
107742001-12-10 Akim Demaille <akim@epita.fr>
10775
10776 * src/muscle_tab.c (muscle_init): NULL is a better default than
10777 `"0"'.
10778
3735969c
AD
107792001-12-10 Akim Demaille <akim@epita.fr>
10780
10781 * src/reader.c (reader): Calling symbols_output once is enough.
10782
49701457
AD
107832001-12-10 Akim Demaille <akim@epita.fr>
10784
10785 Now that states have a complete set of members, the linked list of
10786 reductions is useless: just fill directly the state's reductions
10787 member.
10788
10789 * src/state.h (struct reductions): Remove member `number' and
10790 `next'.
10791 * src/LR0.c (first_reduction, last_reduction): Remove.
10792 (save_reductions): Don't link the new reductions, store them in
10793 this_state.
10794 * src/lalr.c (set_state_table): No need to attach reductions to
10795 states, it's already done.
10796 * src/output.c (output_actions): No longer free the shifts, then
10797 the reductions, then the states: free all the states and their
10798 members.
10799
0edad749
AD
108002001-12-10 Akim Demaille <akim@epita.fr>
10801
10802 * src/options.c (OPTN, DRTV, BOTH): New.
10803 (option_table): Use them.
10804
0edad749
AD
10805 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
10806 the job of system.h.
10807 * src/options.c: Don't include stdio.h and xalloc.h for the same
10808 reasons.
10809
5449dd0f
AD
108102001-12-10 Akim Demaille <akim@epita.fr>
10811
10812 * src/output.c (output, prepare): Make sure the values of the
10813 muscles `action' and `prologue' are 0-terminated.
10814
a870c567
AD
108152001-12-10 Akim Demaille <akim@epita.fr>
10816
10817 Clean up GCC warnings.
10818
10819 * src/reader.c (copy_action): `buf' is not used.
10820 (parse_skel_decl): Be static.
10821 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
10822 * src/options.h (create_long_option_table): Have a real prototype.
10823 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
10824 (hash_delete_at): Return const void *.
10825 Adjust casts to preserve the const.
10826
80df8768
AD
108272001-12-10 Akim Demaille <akim@epita.fr>
10828
10829 * configure.in: Require 2.52g.
10830 M4 is not needed, but AUTOM4TE is.
10831 * m4/m4.m4: Remove.
10832 * tests/Makefile.am: Adjust.
10833
f693ad14
AD
108342001-12-10 Akim Demaille <akim@epita.fr>
10835
10836 One structure for states is enough, even though theoretically
10837 there are LR(0) states and LALR(1) states.
10838
10839 * src/lalr.h (state_t): Remove.
10840 (state_table): Be state_t **, not state_t *.
10841 * src/state.h (core, CORE_ALLOC): Rename as...
10842 (state_t, STATE_ALLOC): this.
10843 Add the LALR(1) members: shifts, reductions, errs.
10844 * src/LR0.c (state_table): Rename as...
10845 (state_hash): this, to avoid name clashes with the global
10846 `state_table'.
10847 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
10848 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
10849
74ffbcb6
AD
108502001-12-10 Akim Demaille <akim@epita.fr>
10851
10852 Bison dumps core on bash.y.
10853 Reported by Pascal Bart.
10854
10855 * src/warshall.c (bitmatrix_print): New.
10856 (TC): Use it.
ba0fe3c7 10857 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
10858 j must be the outer loop.
10859 * tests/regression.at (Broken Closure): New.
10860
07708e19
AD
108612001-12-05 Akim Demaille <akim@epita.fr>
10862
10863 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
10864 its argument.
ba1ecc07 10865 Reported by Peter Hamorsky.
07708e19 10866
92b16366
AD
108672001-12-05 Akim Demaille <akim@epita.fr>
10868
10869 * src/conflicts.c (err_table): Remove.
10870 (resolve_sr_conflict): Adjust.
10871 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
10872 Rename as...
10873 (state_t.reductions, state_t.shifts): this.
10874
076ab033
AD
108752001-12-05 Akim Demaille <akim@epita.fr>
10876
10877 * src/reduce.c (reduce_grammar_tables): No longer disable the
10878 removal of useless rules via CPP but via `if (0)', so that the
10879 compiler still check the code is valid.
10880 For instance, it should have noticed `rline' no longer exists: use
10881 the `line' member of rule_t.
10882 * src/gram.c (dummy, rline): Remove, unused.
10883
3843c413
AD
108842001-12-05 Akim Demaille <akim@epita.fr>
10885
10886 * src/output.c (pack_vector): Use assert, not berror.
10887 * src/main.c (berror): Remove, unused.
10888
43168960
AD
108892001-12-05 Akim Demaille <akim@epita.fr>
10890
10891 New experimental feature: if --verbose --trace output all the
10892 items of a state, not only its kernel.
10893
10894 * src/print.c (print_core): If `trace_flag', then invoke closure
10895 before outputting the items of the state (print_core is no longer
10896 a correct name them).
10897 (print_results): Invoke new_closure/free_closure if needed.
10898
b2872512
AD
108992001-12-05 Akim Demaille <akim@epita.fr>
10900
10901 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
10902 * src/closure.c, src/closure.h (itemsetsize): Rename as...
10903 (nitemset): for consistency with the rest of the project.
10904
23cbcc6c
AD
109052001-12-05 Akim Demaille <akim@epita.fr>
10906
10907 * src/closure.c (print_closure): Improve.
10908 (closure): Use it for printing input and output.
10909
03ec521c
AD
109102001-12-05 Akim Demaille <akim@epita.fr>
10911
10912 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
10913 indexed by nonterminals.
10914
3a7456dd
AD
109152001-12-05 Akim Demaille <akim@epita.fr>
10916
10917 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
10918 what it was!).
10919 * src/warshall.h: Remove accidental duplication of the content.
10920
1cbcf2e7
AD
109212001-12-05 Akim Demaille <akim@epita.fr>
10922
10923 * src/closure.c (set_fderives): De-obfuscate.
10924
84182270
AD
109252001-12-05 Akim Demaille <akim@epita.fr>
10926
10927 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
10928
3f6f053c
AD
109292001-12-05 Akim Demaille <akim@epita.fr>
10930
10931 * src/closure.c (set_firsts): De-obfuscate.
10932
7a5350ba
AD
109332001-12-05 Akim Demaille <akim@epita.fr>
10934
10935 * src/output.c (action_row): De-obfuscate
10936 using the good o' techniques: arrays not pointers, variable
10937 locality, BITISSET, RESETBIT etc.
10938
d954473d
AD
109392001-12-05 Akim Demaille <akim@epita.fr>
10940
10941 Pessimize the code to simplify it: from now on, all the states
10942 have a valid SHIFTS, which NSHIFTS is possibly 0.
10943
10944 * src/LR0.c (shifts_new): Be global and move to..
10945 * src/state.c, src/state.h: here.
10946 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
10947 * src/print_graph: Adjust.
10948
9839bbe5
AD
109492001-12-05 Akim Demaille <akim@epita.fr>
10950
10951 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
10952 * src/conflicts.c: Use it.
10953 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
10954 incorrectly ``simplified''.
10955
9f136c07
AD
109562001-12-05 Akim Demaille <akim@epita.fr>
10957
10958 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
10959 using the good o' techniques: arrays not pointers, variable
10960 locality, BITISSET, RESETBIT etc.
10961
b608206e
AD
109622001-12-05 Akim Demaille <akim@epita.fr>
10963
10964 * src/state.h (SHIFT_SYMBOL): New.
10965 * src/conflicts.c: Use it to deobfuscate.
10966
52afa962
AD
109672001-12-05 Akim Demaille <akim@epita.fr>
10968
10969 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10970 (print_reductions): De-obfuscate using the good o' techniques:
10971 arrays not pointers, variable locality, BITISSET.
10972
e74dc321
AD
109732001-12-05 Akim Demaille <akim@epita.fr>
10974
10975 * src/conflicts.c (print_reductions): Arrays, not pointers.
10976 Use BITISSET.
10977
768fca83
AD
109782001-12-05 Akim Demaille <akim@epita.fr>
10979
10980 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10981
a17e599f
AD
109822001-12-05 Akim Demaille <akim@epita.fr>
10983
10984 * src/conflicts.c (print_reductions): Improve variable locality.
10985
a04bc341
AD
109862001-12-05 Akim Demaille <akim@epita.fr>
10987
10988 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10989
c8ea038e
AD
109902001-12-05 Akim Demaille <akim@epita.fr>
10991
10992 * src/conflicts.c (print_reductions): Improve variable locality.
10993
aa2aab3c
AD
109942001-12-05 Akim Demaille <akim@epita.fr>
10995
10996 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10997 * src/lalr.c: Use them.
10998
b178c8cc
AD
109992001-12-05 Akim Demaille <akim@epita.fr>
11000
11001 * src/LR0.c (augment_automaton): Formatting changes.
11002 Better variable locality.
11003
f67d13aa
AD
110042001-12-05 Akim Demaille <akim@epita.fr>
11005
11006 * src/lalr.c (matrix_print): New.
11007 (transpose): Use it.
11008 Use arrays instead of pointers.
11009
c2713865
AD
110102001-12-05 Akim Demaille <akim@epita.fr>
11011
11012 * src/lalr.c (maxrhs): Move to...
11013 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
11014 * src/lalr.c (build_relations): Adjust.
11015
9887c18a
AD
110162001-12-05 Akim Demaille <akim@epita.fr>
11017
11018 * src/lalr.c (transpose): Free the memory allocated to the
11019 argument, as it is replaced by the results by the unique caller.
11020 (build_relations): Merely invoke transpose: it handles the memory
11021 deallocation.
11022 Improve variable locality.
11023 Avoid variables used as mere abbreviations.
11024 (compute_lookaheads): Use arrays instead of pointers.
11025
4d4f699c
AD
110262001-12-05 Akim Demaille <akim@epita.fr>
11027
11028 * src/lalr.c (initialize_F): Improve variable locality.
11029 Avoid variables used as mere abbreviations.
11030
80a69750
AD
110312001-12-05 Akim Demaille <akim@epita.fr>
11032
11033 * src/derives.c (print_derives): Display the ruleno.
11034 * src/lalr.c (initialize_F, transpose): Better variable locality
11035 to improve readability.
11036 Avoid variables used as mere abbreviations.
11037
fe961097
AD
110382001-12-05 Akim Demaille <akim@epita.fr>
11039
11040 * src/lalr.c (traverse): Use arrays instead of pointers.
11041
e3e4e814
AD
110422001-12-05 Akim Demaille <akim@epita.fr>
11043
11044 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
11045 the handling of squeue.
11046 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11047
630e182b
AD
110482001-12-05 Akim Demaille <akim@epita.fr>
11049
11050 Because useless nonterminals are now kept alive (instead of being
11051 `destroyed'), we now sometimes examine them, and store information
11052 related to them. Hence we need to know their number, and adjust
11053 memory allocations.
11054
11055 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
11056 static.
11057 * src/LR0.c (allocate_itemsets): The memory allocated to
11058 `symbol_count' was used for two different purpose: once to count
11059 the number of occurrences of each symbol, and later reassigned to
11060 `shift_symbol', containing the symbol that can be shifted from a
11061 given state.
11062 Deobfuscate, i.e., allocate, use and free `symbol_count' here
11063 only, and...
11064 (new_itemsets): Allocate `shift_symbol' here.
11065 (allocate_itemsets): symbol_count includes useless nonterminals.
11066 Make room for them.
11067 (free_storage): Use `free', not `XFREE', for pointers that cannot
11068 be null.
11069
81b51460
AD
110702001-12-05 Akim Demaille <akim@epita.fr>
11071
11072 * src/nullable.c (set_nullable): Deobfuscate the handling of
11073 ritem.
11074 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
11075
3067fbef
AD
110762001-12-05 Akim Demaille <akim@epita.fr>
11077
11078 * src/gram.c, src/gram.h (ritem_print): New.
11079 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
11080 (This useless function was defined only to work around VMS linkers
11081 that can't handle compilation units with variables only).
11082 * src/reduce.c (dump_grammar): Use it to trace the construction of
11083 ritem.
11084
c2bea5f9
PE
110852001-12-04 Paul Eggert <eggert@twinsun.com>
11086
7d27c823
PE
11087 * src/bison.simple (union yyalloc): Change member names
11088 to be the same as the stack names.
11089 (yyparse): yyptr is now union yyalloc *, not char *.
11090 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
11091 and may generate better code on some machines.
c2bea5f9
PE
11092 (yystpcpy): Use prototype if __STDC__ is defined, not just
11093 if __cplusplus is defined.
35687a9d 11094
2c8a9dfa
AD
110952001-11-30 Akim Demaille <akim@epita.fr>
11096
11097 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
11098 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
11099 Gettext doesn't compile cleanly, and dies with -Werror.
11100 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
11101 Include WARNING_CFLAGS here.
11102 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
11103 before being defined.
11104
f4e421e6
AD
111052001-11-27 Paul Eggert <eggert@twinsun.com>
11106
11107 * lib/quotearg.h (quotearg_n, quotearg_n_style):
11108 First arg is int, not unsigned.
11109 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
11110 (SIZE_MAX, UINT_MAX): New macros.
11111 (quotearg_n_options): Abort if N is negative.
11112 Avoid overflow check on hosts where size_t is 64 bits and int
11113 is 32 bits, as overflow is impossible there.
11114 Fix off-by-one typo that caused unnecessary reallocation.
11115
7093d0f5
AD
111162001-11-29 Paul Eggert <eggert@twinsun.com>
11117
11118 Name space cleanup in generated parser.
11119
11120 * doc/bison.texinfo (Bison Parser): Discuss system headers
11121 and their effect on the user name space.
11122
11123 * src/bison.simple:
11124 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
11125 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
11126 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
11127
11128 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
11129 on user names when possible.
11130
11131 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
11132 Simplify test for whather <alloca.h> exists.
11133
11134 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
11135
11136 (<stdio.h>): Include if YYDEBUG.
11137
11138 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
11139 ! defined (yyoverflow) && ! defined (yymemcpy).
11140
11141 (yymemcpy, yyparse): Rename local variables as needed so that
11142 they all begin with 'yy'.
11143
11144 (yystrlen, yystpcpy): New functions.
11145
11146 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
11147 All uses changed.
11148
11149 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
11150 instead of relying on string.h functions. Use YYSTACK_ALLOC
11151 and YYSTACK_FREE instead of malloc and free.
11152
fd51e5ff
AD
111532001-11-30 Akim Demaille <akim@epita.fr>
11154
11155 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
11156 before their first uses.
11157 (YYBISON, YYPURE): Move to the top of the output.
11158
7d13ff5f
AD
111592001-11-30 Akim Demaille <akim@epita.fr>
11160
11161 * tests/reduce.at (Useless Nonterminals): Fix.
11162
892a3995
AD
111632001-11-30 Akim Demaille <akim@epita.fr>
11164
11165 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
11166 if body instead of `;' to pacify GCC's warnings.
11167
68f1e3ed
AD
111682001-11-30 Akim Demaille <akim@epita.fr>
11169
11170 Instead of mapping the LHS of unused rules to -1, keep the LHS
11171 valid, but flag the rules as invalid.
11172
11173 * src/gram.h (rule_t): `useful' is a new member.
11174 * src/print.c (print_grammar): Adjust.
11175 * src/derives.c (set_derives): Likewise.
11176 * src/reader.c (packgram, reduce_output): Likewise.
11177 * src/reduce.c (reduce_grammar_tables): Likewise.
11178 * tests/reduce.at (Underivable Rules, Useless Rules): New.
11179
d2d1b42b
AD
111802001-11-30 Akim Demaille <akim@epita.fr>
11181
11182 * src/reduce.c (reduce_output): Formatting changes.
11183 * src/print.c (print_results, print_grammar): Likewise.
11184 * tests/regression.at (Rule Line Numbers)
11185 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
11186
760b53a8
AD
111872001-11-30 Akim Demaille <akim@epita.fr>
11188
11189 * src/reduce.c (nonterminals_reduce): Instead of throwing away
11190 useless nonterminals, move them at the end of the symbol arrays.
11191 (reduce_output): Adjust.
11192 * tests/reduce.at (Useless Nonterminals): Adjust.
11193
00238958
AD
111942001-11-30 Akim Demaille <akim@epita.fr>
11195
11196 * src/reduce.c: Various comment/formatting changes.
11197 (nonterminals_reduce): New, extracted from...
11198 (reduce_grammar_tables): here.
11199 (reduce_grammar): Call nonterminals_reduce.
11200
396452de
PE
112012001-11-29 Paul Eggert <eggert@twinsun.com>
11202
11203 * src/bison.simple (YYSTACK_REALLOC): Remove.
11204 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
11205 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
11206 New macros.
11207 (union yyalloc): New type.
11208 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
11209 an arbitrary restriction on hosts where size_t is wider than int.
11210
11211 (yyparse): Don't dump core if alloca or malloc fails; instead, report
11212 a parser stack overflow. Allocate just one block of memory for all
11213 three stacks, instead of allocating three blocks; this typically is
11214 faster and reduces fragmentation.
11215
11216 Do not limit the number of items in the stack to a value that fits
11217 in 'int', as this is an arbitrary limit on hosts with 64-bit
11218 size_t and 32-bit int.
11219
147e184c
MA
112202001-11-29 Marc Autret <autret_m@epita.fr>
11221
11222 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
11223 of defining YYERROR_VERBOSE.
11224 [AT_DATA]: $4 is now out of C declarations in the prologue.
11225
426cf563
MA
112262001-11-28 Marc Autret <autret_m@epita.fr>
11227
11228 * src/reader.c (parse_dquoted_param): New.
11229 (parse_skel_decl): Use it.
11230 * src/lex.h: Add its prototype.
11231 * src/lex.c (literalchar): Become not static.
11232
c7925b99
MA
112332001-11-28 Marc Autret <autret_m@epita.fr>
11234
11235 * src/output.h: And put its extern declaration here.
11236 * src/output.c (error_verbose): Define here.
11237 (prepare): Echo name modification.
11238 * src/getargs.h: Clean its extern declaration.
11239 * src/getargs.c (error_verbose_flag): Remove.
11240 (getargs): Remove case 'e'.
11241 * src/options.c (option_table): 'error-verbose' is now seen as simple
11242 percent option.
11243 Include output.h.
11244
11245 * src/reader.c (read_declarations): Remove case tok_include.
11246 (parse_include_decl): Remove.
11247 * src/lex.h (token_t): Remove tok_include.
11248 * src/options.c (option_table): 'include' is now a simple command line
11249 option.
11250
5b5d1929
MA
112512001-11-28 Marc Autret <autret_m@epita.fr>
11252
11253 * src/bison.simple: Adjust muscle names.
11254 * src/muscle_tab.c (muscle_init): Also rename the muscles.
11255 * src/output.c (prepare): s/_/-/ for the muscles names.
11256 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
11257
8850be4b
MA
112582001-11-28 Marc Autret <autret_m@epita.fr>
11259
11260 * src/bison.simple: Fix debug.
11261 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
11262
4a38e613
AD
112632001-11-28 Akim Demaille <akim@epita.fr>
11264
11265 * src/LR0.c (shifts_new): New.
11266 (save_shifts, insert_start_shift, augment_automaton): Use it.
11267
4b35e1c1
AD
112682001-11-28 Akim Demaille <akim@epita.fr>
11269
11270 * src/closure.c (closure): `b' and `ruleno' denote the same value:
11271 keep ruleno only.
11272
d2b04478
AD
112732001-11-28 Akim Demaille <akim@epita.fr>
11274
11275 * src/closure.c (closure): Instead of looping over word in array
11276 then bits in words, loop over bits in array.
11277
2c4c30aa
AD
112782001-11-28 Akim Demaille <akim@epita.fr>
11279
11280 * src/closure.c (closure): No longer optimize the special case
11281 where all the bits of `ruleset[r]' are set to 0, to make the code
11282 clearer.
11283
576890b7
AD
112842001-11-28 Akim Demaille <akim@epita.fr>
11285
11286 * src/closure.c (closure): `r' and `c' are new variables, used to
11287 de-obfuscate accesses to RULESET and CORE.
11288
cb487d7d
AD
112892001-11-28 Akim Demaille <akim@epita.fr>
11290
11291 * src/reduce.c (reduce_print): Use ngettext.
11292 (dump_grammar): Improve the trace accuracy.
11293
6013d43f
AD
112942001-11-28 Akim Demaille <akim@epita.fr>
11295
11296 * src/reduce.c (dump_grammar): Don't translate trace messages.
11297
cb4956ee
AD
112982001-11-28 Akim Demaille <akim@epita.fr>
11299
11300 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
11301 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
11302 as all tags are free'ed afterwards.
11303 From Enrico Scholz.
11304
648185ab
PE
113052001-11-27 Paul Eggert <eggert@twinsun.com>
11306
11307 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
11308 use alloca when we didn't want to, and vice versa.
11309
68254a03
MA
113102001-11-27 Marc Autret <autret_m@epita.fr>
11311
9113b58f
AD
11312 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
11313 initialization.
68254a03
MA
11314 * src/output.c (prepare): Remove its update.
11315
04d843a2
MA
113162001-11-27 Marc Autret <autret_m@epita.fr>
11317
11318 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
11319 Use %error-verbose.
11320
d2079671 113212001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
11322
11323 * src/bison.simple: Remove YYERROR_VERBOSE using.
11324 Use %%error_verbose.
11325 (yyparse): Likewise.
11326 * src/output.c (prepare): Give its final value.
11327 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
11328 * src/getargs.h: Add its extern declaration.
11329 * src/getargs.c (error_verbose_flag): New int.
11330 (getargs): Update to catch new case.
11331 * src/options.c (option_table): 'error-verbose' is a new option.
11332 (shortopts): Update.
11333
e0327bc8
AD
113342001-11-27 Akim Demaille <akim@epita.fr>
11335
11336 * src/system.h: Use intl/libgettext.h.
11337 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
11338
000f1a3c
AD
113392001-11-27 Akim Demaille <akim@epita.fr>
11340
11341 * tests/torture.at (Exploding the Stack Size with Malloc):
11342 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
11343
26cfe0be
AD
113442001-11-27 Akim Demaille <akim@epita.fr>
11345
11346 * src/files.c: Include error.h.
11347 Reported by Hans Aberg.
11348
f6bd5427
MA
113492001-11-26 Marc Autret <autret_m@epita.fr>
11350
d2079671 11351 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
11352 (read_declarations): Add case tok_include.
11353 * src/getargs.h (include): Add its extern definition.
11354 * src/getargs.c (include): New const char *.
11355 (getargs): Add case '-I'.
11356 * src/options.c (option_table): Add include as command line and
11357 percent option.
11358 * src/lex.h (token_t): Add tok_include.
11359
2ca209c1
AD
113602001-11-26 Akim Demaille <akim@epita.fr>
11361
11362 * src/reader.c (readgram): Make sure rules for mid-rule actions
11363 have a lineno equal to that of their host rule.
11364 Reported by Hans Aberg.
11365 * tests/regression.at (Rule Line Numbers): New.
11366
0e41b407
AD
113672001-11-26 Akim Demaille <akim@epita.fr>
11368
11369 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
11370 size_ts.
11371
113722001-11-26 Akim Demaille <akim@epita.fr>
11373
11374 * src/complain.c, src/complain.h (error): Remove, provided by
11375 lib/error.[ch].
11376
e0c40012
AD
113772001-11-26 Akim Demaille <akim@epita.fr>
11378
11379 * src/reader.c (read_declarations): Don't abort on tok_illegal,
11380 issue an error message.
11381 * tests/regression.at (Invalid %directive): New.
11382 Reported by Hans Aberg.
11383
5e147124
AD
113842001-11-26 Akim Demaille <akim@epita.fr>
11385
11386 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
11387 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11388
a034c8b8
AD
113892001-11-26 Akim Demaille <akim@epita.fr>
11390
11391 * src/conflicts.c (conflicts_print): Don't complain at all when
11392 there are no reduce/reduce conflicts, and as many shift/reduce
11393 conflicts as expected.
11394 * tests/regression.at (%expect right): Adjust.
11395
c64a20f3
AD
113962001-11-23 Akim Demaille <akim@epita.fr>
11397
11398 * lib/alloca.c: Update, from fileutils.
11399
5b0d29bb
AD
114002001-11-23 Akim Demaille <akim@epita.fr>
11401
11402 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
11403
722c4bfe
AD
114042001-11-23 Akim Demaille <akim@epita.fr>
11405
11406 * src/system.h: Include alloca.h.
11407 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
11408
6255b435
AD
114092001-11-23 Akim Demaille <akim@epita.fr>
11410
11411 * src/print_graph.c (print_actions): Remove `rule', unused.
11412 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
11413 pacify GCC's signed < unsigned warnings.
11414 * src/closure.c (itemsetsize): Likewise.
11415 * src/reader.c (symbol_list_new): Static.
11416
b29b2ed5
AD
114172001-11-23 Akim Demaille <akim@epita.fr>
11418
11419 Attaching lineno to buckets is stupid, since only one copy of each
11420 symbol is kept, only the line of the first occurrence is kept too.
11421
11422 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
11423 * src/reader.c (rline_allocated): Remove, unused.
11424 (symbol_list): Have a `line' member.
11425 (symbol_list_new): New.
11426 (readgram): Use it.
11427 * src/print.c (print_grammar): Output the rule line numbers.
11428 * tests/regression.at (Solved SR Conflicts)
11429 (Unresolved SR Conflicts): Adjust.
11430 Reported by Hans Aberg.
11431
a81b1d4a
MA
114322001-11-22 Marc Autret <autret_m@epita.fr>
11433
11434 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
11435
c1ecb3c1
MA
114362001-11-22 Marc Autret <autret_m@epita.fr>
11437
11438 * src/muscle_tab.c (muscle_init): Remove initialization of
11439 skeleton muscle.
11440 * src/output.c (output_master_parser): Do it here.
11441
fbe01355
AD
114422001-11-20 Akim Demaille <akim@epita.fr>
11443
11444 * po/sv.po: New.
11445 * configure.in (ALL_LINGUAS): Adjust.
11446 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
11447 longer contains strings to translate.
11448
81e895c0
AD
114492001-11-19 Akim Demaille <akim@epita.fr>
11450
11451 * src/conflicts.c (conflicts_print): Add a missing \n.
11452
6bb1878b
AD
114532001-11-19 Akim Demaille <akim@epita.fr>
11454
11455 * src/nullable.c (nullable_print): New.
11456 (set_nullable): Call it when tracing.
11457 Better locality of variables.
11458
d9ec2d07
AD
114592001-11-19 Akim Demaille <akim@epita.fr>
11460
11461 * src/print.c (print_actions): Better locality of variables.
11462
720e5c1b
AD
114632001-11-19 Akim Demaille <akim@epita.fr>
11464
11465 * src/derives.c (print_derives): Fix and enrich.
11466 * src/closure.c (print_fderives): Likewise.
11467
fb908786
AD
114682001-11-19 Akim Demaille <akim@epita.fr>
11469
11470 * src/closure.c (itemsetend): Remove, replaced with...
11471 (itemsetsize): new.
11472
125ecb56
AD
114732001-11-19 Akim Demaille <akim@epita.fr>
11474
11475 * src/LR0.c (kernel_end): Remove, replaced with...
11476 (kernel_size): new.
11477
d8cf039f
AD
114782001-11-19 Akim Demaille <akim@epita.fr>
11479
11480 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
11481 to clarify.
11482
7bec0760
AD
114832001-11-19 Akim Demaille <akim@epita.fr>
11484
11485 * src/closure.c (closure): Use arrays instead of pointers to clarify.
11486
c87d4863
AD
114872001-11-19 Akim Demaille <akim@epita.fr>
11488
11489 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
11490 trace messages.
11491 * src/LR0.c: Likewise.
11492 (allocate_itemsets): Use arrays instead of pointers to clarify.
11493
9bfe901c
AD
114942001-11-19 Akim Demaille <akim@epita.fr>
11495
11496 * src/getargs.c (statistics_flag): Replace with...
11497 (trace_flag): New.
11498 (longopts): Accept --trace instead of --statistics.
11499 * src/getargs.h, src/options.c: Adjust.
11500 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
11501 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
11502
97db7bd4
AD
115032001-11-19 Akim Demaille <akim@epita.fr>
11504
cc72668c 11505 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
11506 pointers to clarify the code.
11507 (save_reductions, save_shifts): Factor common parts of alternatives.
11508
2c5f66ed
AD
115092001-11-19 Akim Demaille <akim@epita.fr>
11510
11511 * src/LR0.c (new_state, get_state): Complete TRACE code.
11512 * src/closure.c: Include `reader.h' to get `tags', needed by the
11513 trace code.
11514 Rename the conditional DEBUG as TRACE.
11515 Output consistently TRACEs to stderr, not stdout.
11516 * src/derives.c: Likewise.
11517 * src/reduce.c: (inaccessable_symbols): Using if is better style
11518 than goto.
11519 Use `#if TRACE' instead of `#if 0' for tracing code.
11520
300f275f
AD
115212001-11-19 Akim Demaille <akim@epita.fr>
11522
11523 * src/system.h (LIST_FREE, shortcpy): New.
11524 * src/LR0.c: Use them.
11525 * src/output.c (free_itemsets, free_reductions, free_shifts):
11526 Remove, replaced by LIST_FREE.
11527
f59c437a
AD
115282001-11-19 Akim Demaille <akim@epita.fr>
11529
11530 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
11531 (REDUCTIONS_ALLOC): New.
11532 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
11533 allocation.
11534
6986fd9e
AD
115352001-11-19 Akim Demaille <akim@epita.fr>
11536
11537 * src/LR0.c (new_state): Complete trace code.
11538 * src/nullable.c (set_nullable): Don't translate traces.
11539
4bc30f78
AD
115402001-11-19 Akim Demaille <akim@epita.fr>
11541
11542 * src/print_graph.c (print_core): Better locality of variables.
11543 * src/print.c (print_core): Likewise.
11544
08a946e0
AD
115452001-11-19 Akim Demaille <akim@epita.fr>
11546
11547 * src/vcg.c: You do the output, so you are responsible of the
11548 handling of VCG syntax, in particular: use quotearg.
11549 * src/print_graph.c: Don't.
11550 (print_actions): Don't output the actions as part of the nodes,
11551 since that's the job of the edges.
11552 (print_state): Don't output by hand: fill the node description,
9bfe901c 11553 and ask for its output.
08a946e0 11554
f0473484
AD
115552001-11-19 Akim Demaille <akim@epita.fr>
11556
cc72668c
AD
11557 * src/bison.simple (yyparse): When verbosely reporting an error,
11558 no longer put additional quotes around token names.
f0473484
AD
11559 * tests/calc.at: Adjust.
11560
e41dc700
AD
115612001-11-19 Akim Demaille <akim@epita.fr>
11562
11563 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
11564 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
11565 * src/output.c: Adjust.
11566
652a871c
AD
115672001-11-19 Akim Demaille <akim@epita.fr>
11568
11569 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
11570 (rule_t): this.
11571 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
11572
b2ed6e58
AD
115732001-11-19 Akim Demaille <akim@epita.fr>
11574
11575 * src/gram.h (rule_t): New.
11576 (rule_table): New.
11577 (rrhs, rlhs): Remove, part of state_t.
11578 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
11579 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11580 * src/reader.c, src/reduce.c: Adjust.
11581
edad7067
AD
115822001-11-19 Akim Demaille <akim@epita.fr>
11583
11584 * src/reader.c (symbols_output): New, extracted from...
11585 (packsymbols): Here.
11586 (reader): Call it.
11587
3feec034
AD
115882001-11-19 Akim Demaille <akim@epita.fr>
11589
11590 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
11591 (maxrhs): this new function.
11592
ddcd5fdf
AD
115932001-11-19 Akim Demaille <akim@epita.fr>
11594
cc72668c 11595 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
11596 Adjust.
11597
bb527fc2
AD
115982001-11-19 Akim Demaille <akim@epita.fr>
11599
cc72668c 11600 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
11601 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11602 * src/lalr.c: Adjust.
11603
a845a697
AD
116042001-11-19 Akim Demaille <akim@epita.fr>
11605
11606 * src/lalr.c (initialize_LA): Only initialize LA. Let...
11607 (set_state_table): handle the `lookaheads' members.
11608
f004bf6a
AD
116092001-11-19 Akim Demaille <akim@epita.fr>
11610
cc72668c
AD
11611 * src/lalr.h (lookaheads): Removed array, whose contents is now
11612 a member of...
f004bf6a
AD
11613 (state_t): this structure.
11614 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11615 Adjust.
11616
de326cc0
AD
116172001-11-19 Akim Demaille <akim@epita.fr>
11618
cc72668c
AD
11619 * src/lalr.h (consistent): Removed array, whose contents is now
11620 a member of...
de326cc0
AD
11621 (state_t): this structure.
11622 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11623 Adjust.
11624
90b4416b
AD
116252001-11-19 Akim Demaille <akim@epita.fr>
11626
cc72668c
AD
11627 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
11628 contents are now members of...
90b4416b
AD
11629 (state_t): this structure.
11630 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11631 Adjust.
11632
9703cc49
AD
116332001-11-19 Akim Demaille <akim@epita.fr>
11634
11635 * src/lalr.h (state_t): New.
11636 (state_table): Be a state_t * instead of a core **.
11637 (accessing_symbol): Remove, part of state_t.
11638 * src/lalr.c: Adjust.
11639 (set_accessing_symbol): Merge into...
11640 (set_state_table): this.
11641 * src/print_graph.c, src/conflicts.c: Adjust.
11642
d803322e
AD
116432001-11-14 Akim Demaille <akim@epita.fr>
11644
11645 * tests/calc.at, tests/output.at, tests/regression.at,
11646 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
11647 now the tests are run in private dirs, therefore AC_CLEANUP and
11648 family can be simplified to 0-ary.
11649 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
11650 use abs. path to find config.h.
11651 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
11652 stderr, there can be way too much random noise.
11653 Instead pass -Werror to GCC and rely on the exit status.
11654 Reported by Wolfram Wagner.
11655
3d76b07d
AD
116562001-11-14 Akim Demaille <akim@epita.fr>
11657
11658 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
11659 defined only if yyoverflow is defined, to avoid `warning: unused
11660 variable `yyvs1''.
11661 Reported by The Test Suite.
11662
09b503c8
AD
116632001-11-14 Akim Demaille <akim@epita.fr>
11664
11665 * src/print.c: Include reduce.h.
11666 Reported by Hans Aberg.
11667
116682001-11-14 Akim Demaille <akim@epita.fr>
11669
11670 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
11671 Revert a previous patch: these are really const.
11672 * src/conflicts.c (conflict_report): Additional useless pair of
11673 braces to pacify GCC's warnings for `if () if () {} else {}'.
11674 * src/lex.c (parse_percent_token): Replace equal_offset with
11675 arg_offset.
11676 arg is const.
11677 Be sure to strdup `arg' when used, since there is no reason for
11678 token_buffer not to change.
11679
0f37a994
AD
116802001-11-14 Akim Demaille <akim@epita.fr>
11681
11682 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
11683 definition.
11684 * src/main.c (main): Use them.
11685 Suggested by Hans Aberg.
11686
d39d93b8
AD
116872001-11-12 Akim Demaille <akim@epita.fr>
11688
11689 * src/system.h (ngettext): Now that we use ngettext, be sure to
11690 provide a default definition when NLS are not used.
11691
9edcd895
AD
116922001-11-12 Akim Demaille <akim@epita.fr>
11693
11694 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
11695 Use @kbd to denote user input.
11696 (Language and Grammar): ANSIfy the example.
11697 Adjust its layout for info/notinfo.
11698 (Location Tracking Calc): Output error messages to stderr.
11699 Output locations in a more GNUtically correct way.
11700 Fix a couple of Englishos.
11701 Adjust @group/@end group pairs.
11702
7da99ede
AD
117032001-11-12 Akim Demaille <akim@epita.fr>
11704
e3aa65c5 11705 %expect was not functioning at all.
7da99ede
AD
11706
11707 * src/conflicts.c (expected_conflicts): Set to -1.
11708 (conflict_report): Use ngettext.
11709 (conflicts_print): Check %expect and make its violation an error.
11710 * doc/bison.texinfo (Expect Decl): Adjust.
11711 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
11712 * tests/regression.at (%expect not enough, %expect right)
11713 (%expect too much): New.
11714
ba9dda1a
AD
117152001-11-12 Akim Demaille <akim@epita.fr>
11716
11717 * tests/regression.at (Conflicts): Rename as...
11718 (Unresolved SR Conflicts): this.
11719 (Solved SR Conflicts): New.
11720
337c5bd1
AD
117212001-11-12 Akim Demaille <akim@epita.fr>
11722
11723 * src/reduce.c (print_results): Rename as...
11724 (reduce_output): This.
11725 Output to OUT, passed as argument, instead of output_obstack.
11726 (dump_grammar): Likewise.
11727 (reduce_free): New.
11728 Also free V1.
11729 (reduce_grammar): No longer call reduce_output, since...
11730 * src/print.c (print_results): do it.
11731 * src/main.c (main): Call reduce_free;
11732
c73a41af
AD
117332001-11-12 Akim Demaille <akim@epita.fr>
11734
11735 * src/conflicts.c (print_reductions): Accept OUT as argument.
11736 Output to it, not to output_obstack.
11737 * src/print.c (print_actions): Adjust.
11738
0df87bb6
AD
117392001-11-12 Akim Demaille <akim@epita.fr>
11740
11741 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
11742 the result instead of using...
11743 (src_total, rrc_total, src_count, rrc_count): Remove.
11744 (any_conflicts): Remove.
11745 (print_conflicts): Split into...
11746 (conflicts_print, conflicts_output): New.
11747 * src/conflicts.h: Adjust.
11748 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 11749 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
11750 * tests/regression.at (Conflicts): New.
11751 Reported by Tom Lane.
11752
e4d3d4de
AD
117532001-11-12 Akim Demaille <akim@epita.fr>
11754
11755 * tests/regression.at (Invalid input): Remove, duplicate with
11756 ``Invalid input: 1''.
11757
6d7d248e
AD
117582001-11-12 Akim Demaille <akim@epita.fr>
11759
11760 * tests/torture.at (AT_DATA_STACK_TORTURE)
11761 (Exploding the Stack Size with Alloca)
11762 (Exploding the Stack Size with Malloc): New.
11763
e9e4c321
AD
117642001-11-12 Akim Demaille <akim@epita.fr>
11765
11766 * src/bison.simple (YYSTACK_REALLOC): New.
11767 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 11768 Reported by Per Allansson.
e9e4c321 11769
5f7e0832
AD
117702001-11-12 Pascal Bart <pascal.bart@epita.fr>
11771
11772 * src/bison.simple: Define type yystype instead of YYSTYPE, and
11773 define CPP macro, which substitute YYSTYPE by yystype.
11774 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
11775 with yyltype/YYLTYPE. This allows inclusion of the generated
11776 header within the parser if the compiler, such as GGC, accepts
11777 multiple equivalent #defines.
11778 From Akim.
11779
e3f1699f
AD
117802001-11-05 Akim Demaille <akim@epita.fr>
11781
11782 * src/reader.c (symbols_output): New, extracted from...
11783 (packsymbols): here.
11784 (reader): Adjust.
11785
65be0866
AD
117862001-11-05 Akim Demaille <akim@epita.fr>
11787
11788 * src/lex.c (parse_percent_token): s/quotearg/quote/.
11789
e4d910bf
AD
117902001-11-05 Akim Demaille <akim@epita.fr>
11791
11792 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
11793 pattern.
11794
951366c1
AD
117952001-11-05 Akim Demaille <akim@epita.fr>
11796
11797 * src/options.h (struct option_table_struct): set_flags is void*.
11798 * src/options.c (longopts): Support `--output' and `%output'.
11799 (usage): Adjust.
11800 * src/lex.h (tok_setopt): Remove, replaced with...
11801 (tok_intopt, tok_stropt): these new guys.
11802 * src/lex.c (getopt.h): Not needed.
11803 (token_buffer, unlexed_token_buffer): Not const.
11804 (percent_table): Promote `-' over `_' in directive names.
11805 Active `%name-prefix', `file-prefix', and `output'.
11806 (parse_percent_token): Accept possible arguments to directives.
11807 Promote `-' over `_' in directive names.
11808
d8988b2f
AD
118092001-11-04 Akim Demaille <akim@epita.fr>
11810
11811 * doc/bison.texinfo (Decl Summary): Split the list into
11812 `directives for grammars' and `directives for bison'.
11813 Sort'em.
11814 Add description of `%name-prefix', `file-prefix', and `output'.
11815 Promote `-' over `_' in directive names.
11816 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
11817 Simplify the description of `--name-prefix'.
11818 Promote `-' over `_' in directive names.
11819 Promote `--output' over `--output-file'.
11820 Fix the description of `--defines'.
11821 * tests/output.at: Exercise %file-prefix and %output.
11822
6468d18e
AD
118232001-11-02 Akim Demaille <akim@epita.fr>
11824
11825 * doc/refcard.tex: Update.
11826
6b7e85b9
AD
118272001-11-02 Akim Demaille <akim@epita.fr>
11828
11829 * src/symtab.h (SUNDEF): New.
11830 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
11831 stand for `uninitialized', instead of 0.
11832 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
11833 * src/lex.c (lex): Adjust.
11834
11835 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
11836 Number it 0.
11837 Let yylex return it instead of a plain 0.
11838 Reported by Dick Streefland.
11839
cd5aafcf
AD
118402001-11-02 Akim Demaille <akim@epita.fr>
11841
11842 * tests/regression.at (Mixing %token styles): New test.
11843
037ca2f1
AD
118442001-11-02 Akim Demaille <akim@epita.fr>
11845
11846 * src/reader.c (parse_thong_decl): Formatting changes.
11847 (token_translations_init): New, extracted from...
11848 (packsymbols): Here.
11849 Adjust.
11850
270a173c
AD
118512001-11-01 Akim Demaille <akim@epita.fr>
11852
11853 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
11854 Check that `9foo.y' produces correct cpp guards.
11855 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
11856 guards.
11857 Reported by Wwp.
11858
561f9a30
AD
118592001-11-01 Akim Demaille <akim@epita.fr>
11860
11861 * tests/regression.at (Invalid input: 2): New.
11862 * src/lex.c (unlexed_token_buffer): New.
11863 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
11864 too.
11865 Reported by Wwp.
11866
f987e9d2
AD
118672001-11-01 Akim Demaille <akim@epita.fr>
11868
11869 * tests/calc.at: Catch up with 1.30.
11870 * configure.in: Bump to 1.49a.
11871 Adjust to newer Autotest.
11872
0846f581
PB
118732001-10-19 Pascal Bart <pascal.bart@epita.fr>
11874
11875 * src/conflicts.c: Move global variables rrc_total and src_total ...
11876 (print_conflicts): here.
11877 * src/output.c (output): Free global variable user_toknums.
11878 * src/lex.c (token_obstack): Become static.
11879
3c1a79b3
AD
118802001-10-18 Akim Demaille <akim@epita.fr>
11881
11882 * tests/atlocal.in (GCC): Add.
11883 * tests/calc.at: s/m4_match/m4_bmatch/.
11884 s/m4_patsubst/m4_bpatsubst/.
11885 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
11886 * configure.in: AC_SUBST(GCC).
11887
5d52e7d0
MA
118882001-10-14 Marc Autret <autret_m@epita.fr>
11889
11890 * src/options.c (create_long_option_table): Fix.
11891
631aa1d3
AD
118922001-10-10 Akim Demaille <akim@epita.fr>
11893
11894 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
11895
f6ec6d13
AD
118962001-10-04 Akim Demaille <akim@epita.fr>
11897
11898 * src/reader.c (parse_union_decl): Push the caracters in
11899 union_obstack, not attrs_obstack.
11900
342b8b6e
AD
119012001-10-04 Akim Demaille <akim@epita.fr>
11902
11903 Merge in the branch 1.29.
11904
11905 * src/reader.c (packsymbols): Use a temporary obstack for
11906 `%%tokendef', since output_stack is already used elsewhere.
11907
11908 2001-10-02 Akim Demaille <akim@epita.fr>
11909
11910 Bump 1.29d.
11911
11912 2001-10-02 Akim Demaille <akim@epita.fr>
11913
11914 Version 1.29c.
11915
11916 2001-10-02 Akim Demaille <akim@epita.fr>
11917
11918 * tests/regression.at (Invalid CPP headers): New.
11919 From Alexander Belopolsky.
11920 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
11921
11922 2001-10-02 Akim Demaille <akim@epita.fr>
11923
11924 * tests/regression.at (Invalid input): New.
11925 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
11926 Reported by Shura.
11927
11928 2001-10-02 Akim Demaille <akim@epita.fr>
11929
11930 * tests/calc.at: Now that --debug works, the tests must be adjusted.
11931
11932 2001-10-02 Akim Demaille <akim@epita.fr>
11933
11934 * src/output.c (output_parser): Assert `skeleton'.
11935 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
11936 systems.
11937 From Shura.
11938
11939 2001-10-01 Marc Autret <autret_m@epita.fr>
11940
11941 * src/lex.h: Echo modifications.
11942 * src/lex.c (unlex): Parameter is now token_t.
11943 From Hans Aberg.
11944
11945 2001-10-01 Marc Autret <autret_m@epita.fr>
11946
11947 * src/main.c: Include lex.h.
11948 From Hans Aberg.
11949
11950 2001-09-29 Akim Demaille <akim@epita.fr>
11951
11952 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
11953
11954 2001-09-28 Akim Demaille <akim@epita.fr>
11955
11956 * tests/testsuite.at: Update to newer Autotest.
11957 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
11958
11959 2001-09-27 Akim Demaille <akim@epita.fr>
11960
11961 Position independent wrapper.
11962
11963 * tests/bison: Remove.
11964 * tests/bison.in: New.
11965 * configure.in: Adjust.
11966
11967 2001-09-27 Paul Eggert <eggert@twinsun.com>
11968
11969 Port quotearg fixes from tar 1.13.24.
11970
11971 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11972 tm to be declared.
11973 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11974 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11975
11976 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11977 * m4/mbrtowc.m4: New file.
11978 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11979 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11980
11981 2001-09-27 Akim Demaille <akim@epita.fr>
11982
11983 Bump to 1.29c.
11984
11985 2001-09-27 Akim Demaille <akim@epita.fr>
11986
11987 Version 1.29b.
11988
11989 2001-09-25 Akim Demaille <akim@epita.fr>
11990
11991 * src/system.h: Include `xalloc.h'.
11992 Remove it from the C files.
11993 * src/files.c (output_files): Free the obstacks.
11994 * src/lex.c (init_lex): Rename as...
11995 (lex_init): this.
11996 (lex_free): New.
11997 * src/main.c (main): Use it.
11998
11999 2001-09-24 Marc Autret <autret_m@epita.fr>
12000
12001 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
12002 to output informations in fout (FILE*).
12003 (open_graph, close_graph): Likewise.
12004 (output_graph, output_edge, output_node): Likewise.
12005 * src/vcg.h: Update function prototypes.
12006 * src/print_graph.c (print_graph): Open output graph file.
12007 (print_actions): Adjust.
12008 * src/files.h: Remove extern declaration.
12009 * src/files.c: Remove graph_obstack declaration.
12010 (open_files): Remove graph_obstack initialization.
12011 (output_files): Remove graph_obstack saving.
12012
12013 2001-09-24 Marc Autret <autret_m@epita.fr>
12014
12015 * src/files.c (compute_output_file_names): Fix.
12016
12017 2001-09-24 Marc Autret <autret_m@epita.fr>,
12018 Akim Demaille <akim@epita.fr>
12019
12020 * src/reader.c (reader): Remove call to free_symtab ().
12021 * src/main.c (main): Call it here.
12022 Include symtab.h.
12023 * src/conflicts.c (initialize_conflicts): Rename as...
12024 (solve_conflicts): this.
12025 * src/print.c (print_core, print_actions, print_state)
12026 (print_grammar): Dump to a file instead a `output_obstack'.
12027 (print_results): Dump `output_obstack', and then proceed with the
12028 FILE *.
12029 * src/files.c (compute_output_file_names, close_files): New.
12030 (output_files): Adjust.
12031 * src/main.c (main): Adjust.
12032
12033 2001-09-23 Marc Autret <autret_m@epita.fr>
12034
12035 * src/files.c (compute_header_macro): Computes header macro name
12036 from spec_defines_file when given.
12037
12038 2001-09-23 Marc Autret <autret_m@epita.fr>
12039
12040 * src/files.c (output_files): Add default extensions.
12041
12042 2001-09-22 Akim Demaille <akim@epita.fr>
12043
12044 * src/conflicts.c (finalize_conflicts): Rename as...
12045 (free_conflicts): this.
12046
12047 2001-09-22 Akim Demaille <akim@epita.fr>
12048
12049 * src/gram.c (gram_free): Rename back as...
12050 (dummy): this.
12051 (output_token_translations): Free `token_translations'.
12052 * src/symtab.c (free_symtab): Free the tag field.
12053
12054 2001-09-22 Akim Demaille <akim@epita.fr>
12055
12056 Remove `translations' as it is always set to true.
12057
12058 * src/gram.h: Adjust.
12059 * src/reader.c (packsymbols, parse_token_decl): Adjust
12060 * src/print.c (print_grammar): Adjust.
12061 * src/output.c (output_token_translations): Adjust.
12062 * src/lex.c (lex): Adjust.
12063 * src/gram.c: Be sure the set pointers to NULL.
12064 (dummy): Rename as...
12065 (gram_free): this.
12066
12067 2001-09-22 Akim Demaille <akim@epita.fr>
12068
12069 * configure.in: Invoke AM_LIB_DMALLOC.
12070 * src/system.h: Use dmalloc.
12071 * src/LR0.c: Be sure to have pointers initialized to NULL.
12072 (allocate_itemsets): Allocate kernel_items only if needed.
12073
12074 2001-09-22 Akim Demaille <akim@epita.fr>
12075
12076 * configure.in: Bump to 1.29b.
12077 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
12078 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
12079 need xmalloc.c in calc.y.
12080 From Pascal Bart.
12081
12082 2001-09-21 Akim Demaille <akim@epita.fr>
12083
12084 Version 1.29a.
12085 * Makefile.maint, config/config.guess, config/config.sub,
12086 * config/missing: Update from masters.
12087 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
12088 upon package.m4.
12089 * configure.in (ALL_LINGUAS): Add `tr'.
12090
12091 2001-09-21 Akim Demaille <akim@epita.fr>
12092
12093 * tests/Makefile.am (package.m4): Move to...
12094 ($(srcdir)/$(TESTSUITE)): here.
12095
12096 2001-09-20 Akim Demaille <akim@epita.fr>
12097
12098 * src/complain.c: No longer try to be standalone: use system.h.
12099 Don't assume __STDC__ is defined to 1. Just test if it is defined.
12100 * src/complain.h: Likewise.
12101 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
12102 Remove the unused variable `n'.
12103 From Albert Chin-A-Young.
12104
12105 2001-09-18 Marc Autret <autret_m@epita.fr>
12106
12107 * doc/bison.1: Update.
12108 * doc/bison.texinfo (Bison Options): Update --defines and --graph
12109 descriptions.
12110 (Option Cross Key): Update.
12111 Add --graph.
12112
12113 2001-09-18 Marc Autret <autret_m@epita.fr>
12114
12115 * tests/regression.at: New test (comment in %union).
12116
12117 2001-09-18 Marc Autret <autret_m@epita.fr>
12118
12119 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
12120 do that.
12121 Reported by Keith Browne.
12122
12123 2001-09-18 Marc Autret <autret_m@epita.fr>
12124
12125 * tests/output.at: Add tests for --defines and --graph.
12126
12127 2001-09-18 Marc Autret <autret_m@epita.fr>
12128
12129 * tests/output.at: Removes tests of %{header,src}_extension features.
12130
12131 2001-09-18 Akim Demaille <akim@epita.fr>
12132
12133 * tests/Makefile.am (package.m4): New.
12134 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
12135 (_AT_CHECK_CALC_ERROR): Likewise.
12136 Factor the `, ' part of verbose error messages.
12137
12138 2001-09-18 Marc Autret <autret_m@epita.fr>
12139
12140 * src/getargs.c (longopts): Declare --defines and --graph as options
12141 with optional arguments.
12142 * src/files.h: Add extern declarations.
12143 * src/files.c (spec_graph_file, spec_defines_file): New.
12144 (output_files): Update.
12145 Remove CPP-outed code.
12146
12147 2001-09-18 Marc Autret <autret_m@epita.fr>
12148
12149 Turn off %{source,header}_extension feature.
12150
12151 * src/files.c (compute_exts_from_gf): Update.
12152 (compute_exts_from_src): Update.
12153 (output_files): CPP-out useless code.
12154 * src/files.h: Remove {header,source}_extension extern declarations.
12155 * src/reader.c (parse_dquoted_param): CPP-out.
12156 (parse_header_extension_decl): Remove.
12157 (parse_source_extension_decl): Remove.
12158 (read_declarations): Remove cases tok_{hdrext,srcext}.
12159 * src/lex.c (percent_table): Remove {header,source}_extension entries.
12160 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
12161
12162 2001-09-10 Akim Demaille <akim@epita.fr>
12163
12164 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
12165 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
12166 (AT_CHECK_OUTPUT): this.
12167 Merely check ls' exit status, its output is useless.
12168
12169 2001-09-10 Akim Demaille <akim@epita.fr>
12170
12171 * tests/calc.at: Use m4_match.
12172 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
12173
12174 2001-09-10 Marc Autret <autret_m@epita.fr>,
12175 Akim Demaille <akim@epita.fr>
12176
12177 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
12178 enum color_e.
12179 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
12180 to `normal'.
12181 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
12182 * src/lex.h: Adjust prototype.
12183 (token_t): Add `tok_undef'.
12184 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
12185 (parse_percent_token): Now returns token_t.
12186 Add default statement in switch.
12187 (lex): Separate `c' as an input variable, from the token_t result
12188 part.
12189 (unlexed): Is a token_t.
12190
12191 2001-09-10 Akim Demaille <akim@epita.fr>
12192
12193 * configure.in: Bump to 1.29a.
12194
12195 2001-09-07 Akim Demaille <akim@epita.fr>
12196
12197 Version 1.29.
12198
12199 2001-08-30 Akim Demaille <akim@epita.fr>
12200
12201 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
12202 * m4/atconfig.m4: Remove.
12203 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
12204 * tests/bison: New.
12205 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
12206 m4_if, m4_patsubst, and m4_regexp.
12207 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
12208 `input' file instead of echo.
12209
12210 2001-08-29 Akim Demaille <akim@epita.fr>
12211
12212 Bump to 1.28e.
12213
12214 2001-08-29 Akim Demaille <akim@epita.fr>
12215
12216 Version 1.28d.
12217
12218 2001-08-29 Paul Eggert <eggert@twinsun.com>
12219
12220 * src/bison.simple (yyparse): Don't take the address of an
12221 item before the start of an array, as that doesn't conform to
12222 the C Standard.
12223
12224 2001-08-29 Robert Anisko <anisko_r@epita.fr>
12225
12226 * doc/bison.texinfo (Location Tracking Calc): New node.
12227
12228 2001-08-29 Paul Eggert <eggert@twinsun.com>
12229
12230 * src/output.c (output): Do not define const, as this now
12231 causes more problems than it cures.
12232
12233 2001-08-29 Akim Demaille <akim@epita.fr>
12234
12235 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
12236 the nodes.
12237 Be sure to tag the `detailmenu'.
12238
12239 2001-08-29 Akim Demaille <akim@epita.fr>
12240
12241 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
12242 download in a tmp dir.
12243
12244 2001-08-28 Marc Autret <autret_m@epita.fr>
12245
12246 * config/depcomp: New file.
12247
12248 2001-08-28 Marc Autret <autret_m@epita.fr>
12249
12250 * doc/bison.1 (mandoc): Adjust.
12251 From Juan Manuel Guerrero.
12252
12253 2001-08-28 Marc Autret <autret_m@epita.fr>
12254
12255 * src/print_graph.c (print_state): Fix.
12256
12257 2001-08-27 Marc Autret <autret_m@epita.fr>
12258
12259 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
12260 char * members.
12261 Echo modifications to the functions prototypes.
12262 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
12263
12264 2001-08-27 Marc Autret <autret_m@epita.fr>
12265
12266 * src/vcg.c: Include `xalloc.h'.
12267 (add_colorentry): New.
12268 (add_classname): New.
12269 (add_infoname): New.
12270 * src/vcg.h: Add new prototypes.
12271
12272 2001-08-27 Akim Demaille <akim@epita.fr>
12273
12274 * Makefile.maint: Sync. again with CVS Autoconf.
12275
12276 2001-08-27 Akim Demaille <akim@epita.fr>
12277
12278 * Makefile.maint: Formatting changes.
12279 (po-update, cvs-update, update): New targets.
12280 (AMTAR): Remove.
12281
12282 2001-08-27 Akim Demaille <akim@epita.fr>
12283
12284 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12285 * Makefile.maint: Sync. with CVS Autoconf.
12286
12287 2001-08-27 Marc Autret <autret_m@epita.fr>
12288
12289 * src/vcg.h (struct infoname_s): New.
12290 (struct colorentry_s): New.
12291 (graph_s): New fields {vertical,horizontal}_order in structure.
12292 Add `infoname' field.
12293 Add `colorentry' field;
12294 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
12295 (G_HORIZONTAL_ORDER): New.
12296 (G_INFONAME): New.
12297 (G_COLORENTRY): New.
12298 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
12299 Add output of `infoname'.
12300 Add output of `colorentry'.
12301
12302 2001-08-27 Marc Autret <autret_m@epita.fr>
12303
12304 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
12305 This one shadowed a global parameter.
12306
12307 2001-08-24 Marc Autret <autret_m@epita.fr>
12308
12309 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
12310 instead of `unsigned'.
12311 (print_state): Do not call obstack_object_size () in obstack_grow ()
12312 to avoid macro variables shadowing.
12313
12314 2001-08-23 Marc Autret <autret_m@epita.fr>
12315
12316 * src/lex.c (percent_table): Typo: s/naem/name/.
12317 Add graph option.
12318 Normalize new options declarations.
12319
12320 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
12321
12322 * tests/suite.at: Exercise %header_extension and %source_extension.
12323
12324 2001-08-16 Marc Autret <autret_m@epita.fr>
12325
12326 * src/reader.c (parse_dquoted_param): New.
12327 (parse_header_extension_decl): Use it.
12328 (parse_source_extension_decl): Likewise.
12329
12330 2001-08-16 Marc Autret <autret_m@epita.fr>
12331
12332 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
12333 (get_xxxx_str): Use assert () instead of complain ().
12334 Remove return invokations in default cases.
12335 (get_decision_str): Modify default behaviour. Remove second argument.
12336 Echo modifications on calls.
12337 (output_graph): Fix.
12338
12339 2001-08-16 Marc Autret <autret_m@epita.fr>
12340
12341 * src/getargs.c (usage): Update with ``-g, --graph''.
12342
12343 2001-08-16 Marc Autret <autret_m@epita.fr>
12344
12345 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
12346 (Option Cross Key): Likewise.
12347 * doc/bison.1: Update.
12348
1c8c2190
PB
123492001-09-25 Pascal Bart <pascal.bart@epita.fr>
12350
12351 * src/output.c (output_master_parser): Don't finish action_obstack.
12352 (output_parser): Don't care about the muscle action, here.
12353 (prepare): Copy the action_obstack in the action muscle.
12354 (output): Free action_obstack.
12355
180d45ba
PB
123562001-09-23 Pascal Bart <pascal.bart@epita.fr>
12357
12358 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
12359 will contain `%union' declaration.
12360 (parse_union_decl): Delete #line directive output.
12361 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
12362 informations about %union.
12363 (parse_union_decl): Copy the union_obstack in the muscle stype.
12364 * src/bison.simple: Add new #line directive.
12365 Add typdef %%stype YYSTYPE.
12366
c51d1a19
PB
123672001-09-23 Pascal Bart <pascal.bart@epita.fr>
12368
12369 * src/bison.simple: Add new `#line' directive.
12370
6f9344da
PB
123712001-09-22 Pascal Bart <pascal.bart@epita.fr>
12372
12373 * src/bison.simple: New `#line' directive.
12374 * src/output.c (output_parser): Support new dynamic muscle input_line.
12375
652def80
MA
123762001-09-22 Marc Autret <autret_m@epita.fr>
12377
12378 * src/output.c (output_master_parser): New.
12379 (output_parser): Be more re-entrant.
12380
25b222fa
MA
123812001-09-21 Marc Autret <autret_m@epita.fr>
12382
12383 * src/reader.c (copy_definition, parse_union_decl): Update and use
12384 `linef' muscle.
12385 (copy_action): Likewise.
12386 Use obstack_1grow ().
12387 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
12388
6bc35ae5
MA
123892001-09-21 Marc Autret <autret_m@epita.fr>
12390
12391 * src/options.c (option_table): Adjust.
12392 * src/lex.c (parse_percent_token): Fix.
12393
c0629aa1
PB
123942001-09-20 Pascal Bart <pascal.bart@epita.fr>
12395
12396 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 12397
82b6d266
PB
123982001-09-20 Pascal Bart <pascal.bart@epita.fr>
12399
12400 * src/lex.c (parse_percent_token): Change type of variable `tx', which
12401 is now an option_table_struct*.
12402 (option_strcmp): New function option_strcmp.
12403 (parse_percent_token): Call option_strcmp.
12404 * src/getargs.c (xalloc.h, options.h): Include it.
12405 (getargs): Call create_long_option_table.
12406 (getargs): Free longopts at the end of the function.
12407 (shortopts): Move in options.c.
12408 * src/options.c (create_long_option_table): New function. Convert
12409 information from option_table to option structure.
12410 * src/reader.c (options.h): Include it.
12411
12412 * src/Makefile.am: Adjust.
12413 * src/options.c (option_table): Create from longopts and percent_table.
12414 * src/getargs.c (longopts): Delete.
12415 * src/lex.c (struct percent_table_struct): Delete.
12416 (percent_table): Delete.
12417 (options.h): Include it.
12418 * src/options.c: Create.
12419 * src/options.h: Create.
12420 Declare enum opt_access_e.
12421 Define struct option_table_struct.
12422
75f5aaea
MA
124232001-09-20 Marc Autret <autret_m@epita.fr>
12424
12425 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
12426 sections of Bison.
12427
f508cb0a
PB
124282001-09-19 Pascal Bart <pascal.bart@epita.fr>
12429
12430 * src/bison.simple: s/%%filename/%%skeleton.
12431 * src/muscle_tab.c (getargs.h): Include it.
12432 (muscle_init): Insert new muscle skeleton.
12433
13105fc1
PB
124342001-09-18 Pascal Bart <pascal.bart@epita.fr>
12435
12436 * src/output.c (output_parser): Delete unused variable actions_dumped.
12437
b0c4483e
PB
124382001-09-07 Pascal Bart <pascal.bart@epita.fr>
12439
12440 * src/output.c (output): Delete call to reader_output_yylsp.
12441 * src/reader.c (reader): Likewise.
ba0fe3c7 12442 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 12443
11d82f03
MA
124442001-09-02 Marc Autret <autret_m@epita.fr>
12445
12446 * src/reader.c: Include muscle_tab.h.
12447 (parse_union_decl): Update.
12448 (parse_macro_decl): Rename parse_muscle_decl.
12449 Update to use renamed functions and variable.
12450 (read_declarations, copy_action, read_additionnal_code, : Updated
12451 with correct variables and functions names.
12452 (packsymbols, reader): Likewise.
342b8b6e 12453
11d82f03 12454 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 12455
11d82f03
MA
12456 * src/output.c: Include muscle_tab.h
12457 In all functions using macro_insert, change by using muscle_insert ().
12458 (macro_obstack): Rename muscle_obstack.
12459 Echo modifications in the whole file.
12460 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
12461 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
12462 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
12463
12464 * src/muscle_tab.h: Update double inclusion macros.
12465 (macro_entry_s): Rename muscle_entry_s.
12466 Update prototypes.
342b8b6e 12467
11d82f03
MA
12468 * src/muscle_tab.c: Include muscle_tab.h.
12469 Rename macro_tabble to muscle_table.
12470 (mhash1, mhash2, mcmp): Use muscle_entry.
12471 (macro_init): Rename muscle_init. Update.
12472 (macro_insert): Rename muscle_insert. Update.
12473 (macro_find): Rename muscle_find. Update.
12474
12475 * src/main.c: Include muscle_tab.h.
12476 (main): Call muscle_init ().
12477 * src/Makefile.am (bison_SOURCES): Echo modifications.
12478
93a37297
MA
124792001-09-02 Marc Autret <autret_m@epita.fr>
12480
f753cd62 12481 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 12482
f753cd62
MA
12483 * src/muscle_tab.c, src/muscle_tab.h: Add files.
12484
124852001-09-02 Marc Autret <autret_m@epita.fr>
12486
12487 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 12488
682d48cd
PB
124892001-09-01 Pascal Bart <pascal.bart@epita.fr>
12490
342b8b6e 12491 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
12492 filename.
12493
087c8fda
MA
124942001-09-01 Marc Autret <autret_m@epita.fr>
12495
12496 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
12497 to an explicit value to activate the feature. We do it here.
12498
dda680cb
PB
124992001-08-31 Pascal Bart <pascal.bart@epita.fr>
12500
12501 * src/output.c (prepare): Delete the `filename' muscule insertion.
12502 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
12503 (parse_union_decl): Likewise.
12504 * src/macrotab.c (macro_init): Initialize filename by infile.
12505
9e644e64
MA
125062001-08-31 Marc Autret <autret_m@epita.fr>
12507
12508 * src/bison.simple (YYLSP_NEEDED): New definition.
12509 * src/output.c (prepare): Add macro insertion of `locations_flag'
12510
17da6427
PB
125112001-08-31 Pascal Bart <pascal.bart@epita.fr>
12512
12513 * src/output.c (prepare): Delete insertion of previous muscles,
12514 and insert the `prefix' muscles.
12515 * src/macrotab.c (macro_init): Likewise.
12516 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 12517 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
12518 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
12519 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 12520 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
12521 name_prefix.
12522
e8cb70b9
PB
125232001-08-31 Pascal Bart <pascal.bart@epita.fr>
12524
12525 * src/main.c (main): Standardize.
12526 * src/output.c (output_table_data, output_parser): Likewise.
12527 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
12528
63c2d5de
MA
125292001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
12530
342b8b6e 12531 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
12532 %%epilogue.
12533 * src/output.c (output): Rename %%declarations to %%prologue.
12534 * src/bison.simple: Echo modifications.
342b8b6e 12535
d8cb5183
MA
125362001-08-31 Marc Autret <autret_m@epita.fr>
12537
12538 * src/reader.c (readgram): CleanUp.
12539 (output_token_defines): Likewise.
12540 (packsymbols): Likewise.
12541 (reader): Likewise.
12542 * src/output.c (output): CPP-out useless code.
12543
6c686258
PB
125442001-08-31 Pascal Bart <pascal.bart@epita.fr>
12545
342b8b6e 12546 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
12547 output_trailers and output_headers.
12548 * src/output.h: Remove obsolete functions prototypes of output_headers
12549 and output_trailers.
12550
8f451ef7
PB
125512001-08-30 Pascal Bart <pascal.bart@epita.fr>
12552
12553 * src/main.c: Include macrotab.h.
342b8b6e 12554 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
12555 Adjust functions prototypes.
12556 * src/macrotab.c (macro_insert): Constify key and value.
12557 (macro_find): Constify key.
12558 (macro_insert): Include 'xalloc.h'
12559 (macro_insert): Use XMALLOC.
12560 (macro_find): Constify return value.
12561 * src/output.c (output_table_data): Rename table to table_data.
12562 (output_parser): Constify macro_key, macro_value.
12563
997b6fd0 125642001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
12565
12566 * src/reader.c (parse_skel_decl): New.
342b8b6e 12567 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
12568 * src/lex.h (token_t): New token `tok_skel'.
12569 * src/lex.c (percent_table): Add skeleton option entry.
12570 Standardize.
12571
ff48177d
MA
125722001-08-29 Marc Autret <autret_m@epita.fr>
12573
12574 * src/bison.simple: Add %%user_code directive at the end.
12575 * src/reader.c (read_additionnal_code): New.
12576 (reader): Use it.
12577 * src/output.c (output_program): Remove.
12578 (output): Update.
12579
b33160bf
MA
125802001-08-28 Marc Autret <autret_m@epita.fr>
12581
12582 * src/output.c (output_actions): Clean up.
4e5caae2 12583 (output_gram): CPP-out useless code.
b33160bf
MA
12584 * src/reader.c (reader): Clean up, CPP-out useless code.
12585
d1a2daf7
PB
125862001-08-28 Pascal Bart <pascal.bart@epita.fr>
12587
342b8b6e 12588 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 12589 directive.
d1a2daf7
PB
12590 * src/bison.simple: Add `%%definitions'.
12591
2b763dfe
MA
125922001-08-28 Marc Autret <autret_m@epita.fr>
12593
12594 * config/depcomp: New file.
12595
f1a87ef6
PE
125962001-08-27 Paul Eggert <eggert@twinsun.com>
12597
12598 * src/bison.simple (yyparse): Don't take the address of an
12599 item before the start of an array, as that doesn't conform to
12600 the C Standard.
12601
82e236e2
RA
126022001-08-27 Robert Anisko <robert.anisko@epita.fr>
12603
f1a87ef6 12604 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
12605 obstack. It was done too late here.
12606
12607 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
12608 completely wrong.
12609 (reader): Initialize the macro obstack here, since we need it to grow
12610 '%define' directives.
12611
12612 * src/reader.h: Declare the macro obstack as extern.
12613
b0cfa28a
RA
126142001-08-27 Robert Anisko <robert.anisko@epita.fr>
12615
12616 * src/output.c (output_parser): Fix. Store single '%' characters in
12617 the output obstack instead of throwing them away.
12618
6fc74234
AD
126192001-08-27 Akim Demaille <akim@epita.fr>
12620
12621 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12622
9c76d118
RA
126232001-08-25 Robert Anisko <robert.anisko@epita.fr>
12624
12625 * lib/Makefile.am: Adjust.
12626
a8289c62
RA
126272001-08-25 Robert Anisko <robert.anisko@epita.fr>
12628
12629 * src/bison.simple: Update and add '%%' directives.
12630
b6610515
RA
126312001-08-25 Robert Anisko <robert.anisko@epita.fr>
12632
12633 * src/reader.c (reader): Remove calls to 'output_headers' and
12634 'output_trailers'. Remove some C output.
12635 (readgram): Disable a piece of code that was writing a default
12636 definition for 'YYSTYPE'.
12637 (reader_output_yylsp): Remove.
12638 (packsymbols): Output token defintions to a macro.
12639 (copy_definition): Disable C output.
6fc74234 12640
b6610515
RA
12641 * src/reader.c (parse_macro_decl): New function used to parse macro
12642 declarations.
12643 (copy_string2): Put the body of copy_string into this new function.
12644 Add a parameter to let the caller choose whether he wants to copy the
12645 string delimiters or not.
12646 (copy_string): Be a simple call to copy_string2 with the last argument
12647 bound to true.
12648 (read_declarations): Add case for macro definition.
12649 (copy_identifier): New.
6fc74234 12650 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
12651 rather than lex.
12652
26f609ff
RA
126532001-08-25 Robert Anisko <robert.anisko@epita.fr>
12654
12655 * src/output.c (prepare): Add prefixed names.
12656 (output_parser): Output semantic actions.
12657 (output_parser): Fix bug on '%%line' directives.
6fc74234 12658
26f609ff
RA
12659 * src/output.c (output_headers): Remove. The C code printed by this
12660 function should now be in the skeletons.
12661 (output_trailers): Remove.
12662 (output): Disable call to 'reader_output_yylsp'.
12663 (output_rule_data): Do not output tables to the table obstack.
12664
12665 * src/output.c: Remove some C dedicated output.
12666 Improve the use of macro and output obstacks.
12667 (output_defines): Remove.
6fc74234 12668
26f609ff
RA
12669 * src/output.c (output_token_translations): Associate 'translate'
12670 table with a macro. No output to the table obstack.
12671 (output_gram): Same for 'rhs' and 'prhs'.
12672 (output_stos): Same for 'stos'.
12673 (output_rule_data): Same for 'r1' and 'r2'.
12674 (token_actions): Same for 'defact'.
12675 (goto_actions): Same for 'defgoto'.
12676 (output_base): Same for 'pact' and 'pgoto'.
12677 (output_table): Same for 'table'.
12678 (output_check): Same for 'check'.
6fc74234 12679
26f609ff
RA
12680 * src/output.c (output_table_data): New function.
12681 (output_short_table): Remove.
12682 (output_short_or_char_table): Remove.
6fc74234 12683
26f609ff
RA
12684 * src/output.c (output_parser): Replace most of the skeleton copy code
12685 with something new. Skeletons are now processed character by character
12686 rather than line by line, and Bison looks for '%%' macros. This is the
12687 first step in making Bison's output process (a lot) more flexible.
12688 (output_parser): Use the macro table.
12689
6f43b113
RA
126902001-08-25 Robert Anisko <robert.anisko@epita.fr>
12691
12692 * src/main.c (main): Initialize the macro table.
12693
dd3127cf
RA
126942001-08-25 Robert Anisko <robert.anisko@epita.fr>
12695
12696 * src/lex.c (percent_table): Add tok_define.
12697 * src/lex.h: Add tok_define.
12698
aa321494
RA
126992001-08-25 Robert Anisko <robert.anisko@epita.fr>
12700
12701 * src/macrotab.c: New file.
12702 * src/macrotab.h: New file.
12703 * src/Makefile.am: Update.
12704
68bd3b6b
RA
127052001-08-25 Robert Anisko <robert.anisko@epita.fr>
12706
12707 * lib/hash.c: New file.
12708 * lib/hash.h: New file.
12709 * lib/Makefile.am: Update.
12710
45f8dd1e
AD
127112001-08-15 Akim Demaille <akim@epita.fr>
12712
12713 Version 1.28c.
12714
40a64a7a 127152001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
12716
12717 * src/reader.c (readgram): Indent output macro YYSTYPE.
12718 (packsymbols): Likewise.
12719 (output_token_defines): Likewise.
12720 * src/files.c: Standardize.
12721 (compute_header_macro): New.
12722 (defines_obstack_save): New. Use compute_header_macro.
12723 (output_files): Update. Use defines_obstack_save.
12724
f9a8293a
AD
127252001-08-15 Akim Demaille <akim@epita.fr>
12726
12727 * doc/bison.texinfo (Table of Symbols): Document
12728 YYSTACK_USE_ALLOCA.
12729
150ca7a7
AD
127302001-08-15 Akim Demaille <akim@epita.fr>
12731
12732 * missing: Update from CVS Automake.
12733 * config/config.guess, config/config.sub, config/texinfo.tex:
12734 Update from gnu.org.
12735
69b5cec4
AD
127362001-08-15 Akim Demaille <akim@epita.fr>
12737
12738 * Makefile.maint: Sync with CVS Autoconf.
12739
f2b5126e
PB
127402001-08-14 Pascal Bart <pascal.bart@epita.fr>
12741
69b5cec4 12742 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
12743 `fdl.texi'.
12744 * doc/fdl.texi: Add to package.
12745
4ecbf796
MA
127462001-08-14 Marc Autret <autret_m@epita.fr>
12747
12748 Turn on %{source,header}_extension features.
12749
69b5cec4 12750 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
12751 source_extension.
12752 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 12753 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
12754 between options.
12755
95fb5662
MA
127562001-08-14 Marc Autret <autret_m@epita.fr>
12757
12758 * src/files.c (compute_base_names): Add extensions computing when
12759 `--file-prefix' used.
12760 Standardize function calls.
12761
78d09da9
MA
127622001-08-13 Marc Autret <autret_m@epita.fr>
12763
69b5cec4 12764 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
12765 defining it (defined but null disables alloca).
12766
5a009f2c
MA
127672001-08-13 Marc Autret <autret_m@epita.fr>
12768
12769 * src/bison.simple (_yy_memcpy): CPP reformat.
12770
1e41465a
PB
127712001-08-13 Pascal Bart <pascal.bart@epita.fr>
12772
12773 * tests/atconfig.in (CPPFLAGS): Fix.
12774
c67a198d
PB
127752001-08-10 Pascal Bart <pascal.bart@epita.fr>
12776
79282c6c 12777 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
12778 `gpl.texi'.
12779 * doc/gpl.texi: Add to package.
12780
09a6de7e
MA
127812001-08-10 Marc Autret <autret_m@epita.fr>
12782
12783 * src/print_graph.h: Fix.
12784 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
12785
b77b9ee0
AD
127862001-08-10 Akim Demaille <akim@epita.fr>
12787
12788 * src/system.h: Provide default declarations for stpcpy, strndup,
12789 and strnlen.
12790
3e259915
MA
127912001-08-10 Robert Anisko <anisko_r@epita.fr>
12792
12793 * doc/bison.texinfo (Locations): Update @$ stuff.
12794
ca96bc2d
MA
127952001-08-09 Robert Anisko <anisko_r@epita.fr>
12796
12797 * src/bison.simple (YYLLOC_DEFAULT): Update.
12798 (yyparse): Adjust.
12799
fdc6758b
MA
128002001-08-08 Marc Autret <autret_m@epita.fr>
12801
b77b9ee0 12802 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
12803 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
12804 Reported by Fabrice Bauzac.
957d4dbf 12805
600cad3b
MA
128062001-08-08 Marc Autret <autret_m@epita.fr>
12807
12808 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
12809 * src/vcg.c (output_node): Fix.
12810 * src/vcg.h: Cleanup.
12811 * src/print_graph.c: Add comments.
b77b9ee0 12812 (node_output_size): New global variable. Simplify the formatting of
600cad3b 12813 the VCG graph output.
b77b9ee0 12814 (print_actions): Unused code is now used. It notifies the final state
600cad3b 12815 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 12816 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
12817 blue.
12818 Get the current node name and node_obstack by argument.
12819 (node_obstack): New variable.
12820 (print_state): Manage node_obstack.
12821 (print_core): Use node_obstack given by argument.
12822 A node is not only computed here but in print_actions also.
12823 (print_graph): CPP out useless code instead of commenting it.
12824
976e528f
AD
128252001-08-07 Pascal Bart <pascal.bart@epita.fr>
12826
12827 * tests/atconfig.in (CPPFLAGS): Fix.
12828
20e8e5ca
AD
128292001-08-07 Akim Demaille <akim@epita.fr>
12830
12831 * src/print_graph.c (quote): New.
12832 (print_core): Use it.
12833
957d4dbf 128342001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 12835
3e3da797
AD
12836 * src/vcg.c (complain.h): Include it.
12837 Unepitaize `return' invocations.
c4b66126 12838 [NDEBUG] (main): Remove.
79282c6c 12839 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
12840 * src/files.c (open_files): Initialize graph_obstack.
12841 * src/print_graph.c (print_actions): CPP out useless code.
12842 (print_core): Don't output the last `\n' in labels.
12843 Use `quote'.
12844 * src/files.c (output_files): Output the VCG file.
12845 * src/main.c (main): Invoke print_graph ();
3e3da797 12846
957d4dbf 128472001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
12848
12849 Automaton VCG graph output.
12850 Using option ``-g'' or long option ``--graph'', you can generate
12851 a gram_filename.vcg file containing a VCG description of the LALR (1)
12852 automaton of your grammar.
12853
12854 * src/main.c: Call to print_graph() function.
12855 * src/getargs.h: Update.
12856 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
12857 (graph_flag): New flag.
12858 (longopts): Update.
12859 (getargs): Add case `g'.
12860 * src/files.c (graph_obstack): New obstack struct.
12861 (open_files): Initialize new obstack.
12862 (output_files): Saves graph_obstack if required.
12863 * src/files.h (graph_obstack): New extern declaration.
12864 * src/Makefile.am: Add new source files.
12865
927c1557 128662001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
12867
12868 * src/print_graph.c, src/print_graph.h (graph): New.
12869 * src/vcg.h: New file.
12870 * src/vcg.c: New file, VCG graph handling.
12871
7333d403
AD
128722001-08-06 Marc Autret <autret_m@epita.fr>
12873
12874 Add of %source_extension and %header_extension which specify
12875 the source or/and the header output file extension.
12876
12877 * src/files.c (compute_base_names): Remove initialisation of
12878 src_extension and header_extension.
12879 (compute_exts_from_gf): Update.
12880 (compute_exts_from_src): Update.
12881 (output_files): Update.
12882 * src/reader.c (parse_header_extension_decl): New.
12883 (parse_source_extension_decl): New.
12884 (read_declarations): New case statements for the new tokens.
12885 * src/lex.c (percent_table): Add entries for %source_extension
12886 and %header_extension.
12887 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
12888
84163231
AD
128892001-08-06 Marc Autret <autret_m@epita.fr>
12890
12891 * configure.in: Bump to 1.28c.
12892 * doc/bison.texinfo: Texinfo thingies.
12893
8303fc42
AD
128942001-08-04 Pascal Bart <pascal.bart@epita.fr>
12895
12896 * tests/atconfig.in (CPPFLAGS): Add.
12897 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
12898
70a84437
AD
128992001-08-03 Akim Demaille <akim@epita.fr>
12900
12901 Version 1.28b.
12902
2ce10144
AD
129032001-08-03 Akim Demaille <akim@epita.fr>
12904
12905 * tests/Makefile.am (check-local): Ship testsuite.
12906 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
12907 Include `string.h'.
12908
1e3e4bc1
AD
129092001-08-03 Akim Demaille <akim@epita.fr>
12910
12911 * configure.in: Try using -Wformat when compiling.
12912
42b45b7f
AD
129132001-08-03 Akim Demaille <akim@epita.fr>
12914
12915 * configure.in: Bump to 1.28b.
12916
8f13fe33
AD
129172001-08-03 Akim Demaille <akim@epita.fr>
12918
12919 * src/complain.c: Adjust strerror_r portability issues.
12920
b37ba92c
AD
129212001-08-03 Akim Demaille <akim@epita.fr>
12922
12923 Version 1.28a.
12924
b0ce6046
AD
129252001-08-03 Akim Demaille <akim@epita.fr>
12926
12927 * src/getargs.c, src/getarg.h (skeleton)): Constify.
12928 * src/lex.c (literalchar): Avoid name clashes on `buf'.
12929 * src/getargs.c: Include complain.h.
12930 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
12931 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
12932
d01c415b
AD
129332001-08-03 Akim Demaille <akim@epita.fr>
12934
12935 * src/reader.c (readgram): Display hidden chars in error messages.
12936
459dd1a6
AD
129372001-08-03 Akim Demaille <akim@epita.fr>
12938
12939 Update to gettext 0.10.39.
12940
53b74c0c
AD
129412001-08-03 Akim Demaille <akim@epita.fr>
12942
12943 * lib/strspn.c: New.
12944
234a3be3
AD
129452001-08-01 Marc Autret <autret_m@epita.fr>
12946
12947 * doc/bison.texinfo: Update.
12948 * doc/bison.1 (mandoc): Update.
12949 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
12950 * src/files.c: Support output files extensions computing.
12951 (src_extension): New static variable.
12952 (header_extension): New static variable.
12953 (tr): New function.
12954 (get_extension_index): New function, gets the index of an extension
12955 filename in a string.
12956 (compute_exts_from_gf): New function, computes extensions from the
12957 grammar file extension.
12958 (compute_exts_from_src): New functions, computes extensions from the
12959 C source file extension, file given by ``-o'' option.
12960 (compute_base_names): Update.
12961 (output_files): Update.
12962
847bf1f5
AD
129632001-08-01 Robert Anisko <anisko_r@epita.fr>
12964
d995fee7 12965 * doc/bison.texi: Document @$.
847bf1f5
AD
12966 (Locations): New section.
12967
d074a105
AD
129682001-07-18 Akim Demaille <akim@epita.fr>
12969
12970 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12971 * config/prev-version.txt, config/move-if-change: New.
12972 * Makefile.am: Adjust.
12973
3419715d
AD
129742001-07-08 Pascal Bart <pascal.bart@epita.fr>
12975
12976 * src/bison.simple (yyparse): Suppress warning `comparaison
12977 between signed and unsigned'.
12978
62ab6972
AD
129792001-07-05 Pascal Bart <pascal.bart@epita.fr>
12980
12981 * src/getargs.h (raw_flag): Remove.
12982 * src/getargs.c: Die on `-r'/`--raw'.
12983 * src/lex.c (parse_percent_token): Die on `%raw'.
12984 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12985 * tests/calc.at: Suppress test with option `--raw'.
12986
1e24cc5b
AD
129872001-07-14 Akim Demaille <akim@epita.fr>
12988
12989 * config/: New.
12990 * configure.in: Require Autoconf 2.50.
12991 Update to gettext 0.10.38.
12992
32dfccf8
AD
129932001-03-16 Akim Demaille <akim@epita.fr>
12994
12995 * doc/bison.texinfo: ANSIfy the examples.
12996
cd5bd6ac
AD
129972001-03-16 Akim Demaille <akim@epita.fr>
12998
12999 * getargs.c (skeleton): New variable.
13000 (longopts): --skeleton is a new option.
13001 (shortopts, getargs): -S is a new option.
13002 * getargs.h: Declare skeleton.
13003 * output.c (output_parser): Use it.
13004
5141b016
AD
130052001-03-16 Akim Demaille <akim@epita.fr>
13006
13007 * m4/strerror_r.m4: New.
13008 * m4/error.m4: Run AC_FUNC_STRERROR_R.
13009 * lib/error.h, lib/error.c: Update.
13010
447992b9
AD
130112001-03-16 Akim Demaille <akim@epita.fr>
13012
13013 * src/getargs.c (longopts): Clean up.
13014
274d42ce
AD
130152001-02-21 Akim Demaille <akim@epita.fr>
13016
13017 * src/reader.c (gensym): `gensym_count' is your own.
13018 Use a static buf to create the symbol name, as token_buffer is no
13019 longer a buffer.
13020
22c821f3
AD
130212001-02-08 Akim Demaille <akim@epita.fr>
13022
13023 * src/conflicts.c (conflict_report): Be sure not to append to res
13024 between two calls, which could happen if both first sprintf were
13025 skipped, but not the first cp += strlen.
13026
18569462
AD
130272001-02-08 Akim Demaille <akim@epita.fr>
13028
13029 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
13030 New, from fileutils 4.0.37.
13031 * configure.in: Require Autoconf 2.49c. I took some time before
13032 making this decision. This is the only way out for portability
13033 issues in Bison, it would mean way too much duplicate effort to
13034 import in Bison features implemented in 2.49c since 2.13.
13035 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
13036
0d8f3c8a
AD
130372001-02-02 Akim Demaille <akim@epita.fr>
13038
13039 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 13040 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 13041
f17bcd1f
AD
130422001-01-19 Akim Demaille <akim@epita.fr>
13043
13044 Get rid of the ad hoc handling of token_buffer in the scanner: use
13045 the obstacks.
13046
13047 * src/lex.c (token_obstack): New.
13048 (init_lex): Initialize it. No longer call...
13049 (grow_token_buffer): this. Remove it.
13050 Adjust all the places which used it to use the obstack.
13051
511e79b3
AD
130522001-01-19 Akim Demaille <akim@epita.fr>
13053
13054 * src/lex.h: Rename all the tokens:
13055 s/\bENDFILE\b/tok_eof/g;
13056 s/\bIDENTIFIER\b/tok_identifier/g;
13057 etc.
13058 Let them be enums, not #define, to ease debugging.
13059 Adjust all the code.
13060
0d6508ef
AD
130612001-01-18 Akim Demaille <akim@epita.fr>
13062
13063 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
13064 * src/lex.c (maxtoken, grow_token_buffer): Static.
13065
6deb4447
AD
130662001-01-18 Akim Demaille <akim@epita.fr>
13067
13068 Since we now use obstacks, more % directives can be enabled.
13069
13070 * src/lex.c (percent_table): Also accept `%yacc',
13071 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
13072 `%debug'.
13073 Handle the actions for `%semantic_parser' and `%pure_parser' here,
13074 instead of returning a token.
13075 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
13076 * src/reader.c (read_declarations): Adjust.
13077 * src/files.c (open_files): Don't call `compute_base_names', don't
13078 compute `attrsfile' since they depend upon data which might be
13079 *in* the input file now.
13080 (output_files): Do it here.
13081 * src/output.c (output_headers): Document the fact that this patch
13082 introduces a guaranteed SEGV for semantic parsers.
13083 * doc/bison.texinfo: Document them.
13084 * tests/suite.at: Exercise these %options.
13085
ff4423cc
AD
130862000-12-20 Akim Demaille <akim@epita.fr>
13087
13088 Also handle the output file (--verbose) with obstacks.
13089
13090 * files.c (foutput): Remove.
13091 (output_obstack): New.
13092 Adjust all dependencies.
13093 * src/conflicts.c: Return a string.
13094 * src/system.h (obstack_grow_string): Rename as...
13095 (obstack_sgrow): this. Be ready to work with non literals.
13096 (obstack_fgrow4): New.
13097
956dba3a
AD
130982000-12-20 Akim Demaille <akim@epita.fr>
13099
13100 * src/files.c (open_files): Fix the computation of short_base_name
13101 in the case of `-o foo.tab.c'.
13102
337bab46
AD
131032000-12-20 Akim Demaille <akim@epita.fr>
13104
13105 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
13106 (copy_dollar): Now that everything uses obstacks, get rid of the
13107 FILE * parameters.
13108
5d3214b8
AD
131092000-12-20 Akim Demaille <akim@epita.fr>
13110
13111 * src/files.c (open_files): Actually the `.output' file is based
13112 on the short_base_name, not base_name.
13113 * tests/suite.at (Checking output file names): Adjust.
13114
29092a57
AD
131152000-12-20 Akim Demaille <akim@epita.fr>
13116
13117 * src/bison.s1: Remove, we now use directly...
13118 * src/bison.simple: this.
13119 * src/Makefile.am: Use pkgdata instead of data.
13120
ea5607fd
AD
131212000-12-20 Akim Demaille <akim@epita.fr>
13122
13123 * src/files.c (guard_obstack): New.
13124 (open_files): Initialize it.
13125 (output_files): Dump it...
13126 * src/files.h: Export it.
13127 * src/reader.c (copy_guard): Use it.
13128
27110317
AD
131292000-12-19 Akim Demaille <akim@epita.fr>
13130
13131 * src/files.c (outfile, defsfile, actfile): Removed as global
13132 vars.
13133 (open_files): Don't compute them.
13134 (output_files): Adjust.
13135 (base_name, short_base_name): Be global.
13136 Adjust dependencies.
13137
19c50364
AD
131382000-12-19 Akim Demaille <akim@epita.fr>
13139
13140 * src/files.c (strsuffix): New.
13141 (stringappend): Be just like strcat but allocate.
13142 (base_names): Eve out from open_files.
13143 Try to simplify the rather hairy computation of base_name and
13144 short_base_name.
13145 (open_files): Use it.
13146 * tests/suite.at (Checking output file names): New test.
13147
573c1d9f
AD
131482000-12-19 Akim Demaille <akim@epita.fr>
13149
13150 * src/system.h (obstack_grow_literal_string): Rename as...
13151 (obstack_grow_string): this.
13152 * src/output.c (output_parser): Recognize `%% actions' instead of
13153 `$'.
13154 * src/bison.s1: s/$/%% actions/.
13155 * src/bison.hairy: Likewise.
13156
ef7ddedd
AD
131572000-12-19 Akim Demaille <akim@epita.fr>
13158
13159 * src/output.c (output_parser): Compute the `#line' lines when
13160 there are.
13161 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
13162 Suggested by Hans Aberg.
13163
ff61dabd
AD
131642000-12-19 Akim Demaille <akim@epita.fr>
13165
13166 Let the handling of the skeleton files be local to the procedures
13167 that use it.
13168
13169 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
13170 longer static.
13171 (fparser, open_extra_files): Remove.
13172 (open_files, output_files): Don't take care of fparser.
13173 * src/files.h: Adjust.
13174 * src/output.c (output_parser): Open and close the file to the
13175 skeleton.
13176 * src/reader.c (read_declarations): When %semantic_parser, open
13177 fguard.
13178
55b96341
AD
131792000-12-19 Akim Demaille <akim@epita.fr>
13180
13181 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
13182 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
13183
358c15b7
AD
131842000-12-19 Akim Demaille <akim@epita.fr>
13185
13186 * src/files.c (open_files): Yipee! We no longer need all the code
13187 looking for `/tmp' since we have no tmp file.
13188
7de3329e
AD
131892000-12-19 Akim Demaille <akim@epita.fr>
13190
13191 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
13192 New macros.
13193 * src/files.c (open_files): Less dependency on MSDOS etc.
13194
3abcd459
AD
131952000-12-14 Akim Demaille <akim@epita.fr>
13196
13197 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
13198 Provide a default definition.
13199 Use it when executing the default @ action.
13200 * src/reader.c (reader_output_yylsp): No longer include
13201 `timestamp' and `text' in the default YYLTYPE.
13202
2a91a95e
AD
132032000-12-12 Akim Demaille <akim@epita.fr>
13204
13205 * src/reader.c (copy_definition, parse_union_decl, copy_action)
13206 (copy_guard): Quote the file names.
13207 Reported by Laurent Mascherpa.
13208
14d3eb9b
AD
132092000-12-12 Akim Demaille <akim@epita.fr>
13210
13211 * src/output.c (output_headers, output_program, output): Be sure
13212 to escape special characters when outputting filenames.
13213 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
13214 (output_headers): Don't depend on them, Use ACTSTR.
13215
d7045ec6
AD
132162000-11-17 Akim Demaille <akim@epita.fr>
13217
13218 * lib/obstack.h: Formatting changes.
13219 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
13220 prevents type checking.
13221 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
13222 cast the value to (void *): assigning a `foo *' to a `void *'
13223 variable is valid.
13224 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
13225 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
13226 append characters.
13227
6fd54b73
AD
132282000-11-17 Akim Demaille <akim@epita.fr>
13229
13230 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
13231 as...
13232 (suite.m4, regression.m4, calc.m4): these.
13233 * tests/atgeneral.m4: Update from CVS Autoconf.
13234
4c50eae6
AD
132352000-11-17 Akim Demaille <akim@epita.fr>
13236
13237 * tests/regression.m4 (%union and --defines): New test,
13238 demonstrating a current bug in the obstack implementation.
13239
a35f64ea
AD
132402000-11-17 Akim Demaille <akim@epita.fr>
13241
13242 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
13243 macros.
13244 Use them to declare the variables which are global or local to
13245 `yyparse'.
13246
7de23534
AD
132472000-11-17 Akim Demaille <akim@epita.fr>
13248
13249 * acconfig.h: Remove, no longer used.
13250
aa7815f5
AD
132512000-11-07 Akim Demaille <akim@epita.fr>
13252
13253 * src: s/Copyright (C)/Copyright/g.
13254
5af1f549
AD
132552000-11-07 Akim Demaille <akim@epita.fr>
13256
13257 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
13258 defining.
13259 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
13260
553e2b22
AD
132612000-11-07 Akim Demaille <akim@epita.fr>
13262
13263 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
13264 Merge in a single CPP if/else.
13265
8a4f41d6
AD
132662000-11-07 Akim Demaille <akim@epita.fr>
13267
13268 * src/output.c (output): Remove useless variables.
13269 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
13270 argument `data' for consistency with the prototypes.
13271 Qualify it `const'.
13272 (obstack_copy, obstack_copy0): Rename the second argument as
13273 `address' for consistency. Qualify it `const'.
13274 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
13275 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
13276 `const' their input argument (`data' or `address').
13277 Adjust the corresponding macros to include `const' in casts.
13278
095a3fb5
AD
132792000-11-03 Akim Demaille <akim@epita.fr>
13280
13281 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
13282 s/PFILE1/BISON_HAIRY/.
13283 Adjust dependencies.
13284
d1cdce7c
AD
132852000-11-03 Akim Demaille <akim@epita.fr>
13286
090c5ebf 13287 For some reason, this was not applied.
d1cdce7c
AD
13288
13289 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
13290 `unlink': it's no longer used.
13291
9311529b
AD
132922000-11-03 Akim Demaille <akim@epita.fr>
13293
13294 * src/files.c (skeleton_find): New function, eved out of...
13295 (open_files, open_extra_files): here.
13296
d8880f69
AD
132972000-11-03 Akim Demaille <akim@epita.fr>
13298
13299 Don't use `atexit'.
13300
13301 * src/files.c (obstack_save): New function.
13302 (done): Rename as...
13303 (output_files): this.
13304 Use `obstack_save'.
13305 * src/main.c (main): Don't use `atexit' to register `done', since
13306 it no longer has to remove tmp files, just call `output_files'
13307 when there are no errors.
13308
0dbb648e
AD
133092000-11-02 Akim Demaille <akim@epita.fr>
13310
13311 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
13312 `unlink': it's no longer used.
13313 * src/files.h: Formatting changes.
13314
896fe5c1
AD
133152000-11-02 Akim Demaille <akim@epita.fr>
13316
13317 Remove the last uses of mktemp and unlink/delete.
13318
13319 * src/files.c (fdefines, ftable): Removed.
13320 (defines_ostack, table_obstack): New.
13321 Adjust dependencies of the former into uses of the latter.
13322 * src/output.c (output_short_or_char_table, output_short_table):
13323 Convert to using obstacks.
13324 * src/reader.c (copy_comment2): Accept one FILE * and two
13325 obstacks.
13326 (output_token_defines, reader_output_yylsp): Use obstacks.
13327 * src/system.h (obstack_fgrow3): New.
1f65350a 13328 * po/POTFILES.in: Adjust.
896fe5c1 13329
dd60faec
AD
133302000-11-01 Akim Demaille <akim@epita.fr>
13331
13332 Change each use of `fattrs' into a use of `attrs_obstack'.
13333
13334 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
13335 * src/files.c (fattrs): Remove.
13336 (attrs_obstack): New.
13337 Adjust all dependencies.
13338 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
13339
8c7ebe49
AD
133402000-11-01 Akim Demaille <akim@epita.fr>
13341
13342 Introduce obstacks.
13343 Change each use of `faction' into a use of `action_obstack'.
13344
13345 * lib/obstack.h, lib/obstack.c: New files.
13346 * src/files.c (faction): Remove.
13347 (action_obstack): New.
13348 Adjust all dependencies.
13349
77aee789
AD
133502000-10-20 Akim Demaille <akim@epita.fr>
13351
13352 * lib/quote.h (PARAMS): New macro. Use it.
13353
43591cec
AD
133542000-10-16 Akim Demaille <akim@epita.fr>
13355
13356 * src/output.c (output_short_or_char_table): New function.
13357 (output_short_table, output_token_translations): Use it.
13358 (goto_actions): Use output_short_table.
13359
1e9798d5
AD
133602000-10-16 Akim Demaille <akim@epita.fr>
13361
13362 * src/symtab.c (bucket_new): New function.
13363 (getsym): Use it.
13364
13365 * src/output.c (output_short_table): New argument to display the
13366 comment associated with the table.
13367 Adjust dependencies.
13368 (output_gram): Use it.
13369 (output_rule_data): Nicer output layout for YYTNAME.
13370
f282676b
AD
133712000-10-16 Akim Demaille <akim@epita.fr>
13372
13373 * src/lex.c (read_typename): New function.
13374 (lex): Use it.
13375 * src/reader.c (copy_dollar): Likewise.
13376
550a72a3
AD
133772000-10-16 Akim Demaille <akim@epita.fr>
13378
13379 * src/reader.c (copy_comment2): Expect the input stream to be on
13380 the `/' which is suspected to open a comment, instead of being
13381 called after `//' or `/*' was read.
13382 (copy_comment, copy_definition, parse_union_decl, copy_action)
13383 (copy_guard): Adjust.
13384
131e2fef
AD
133852000-10-16 Akim Demaille <akim@epita.fr>
13386
13387 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
13388 `read_signed_integer'.
13389
79282c5a
AD
133902000-10-16 Akim Demaille <akim@epita.fr>
13391
13392 * src/reader.c (copy_dollar): New function.
13393 (copy_guard, copy_action): Use it.
13394
ff4a34be
AD
133952000-10-16 Akim Demaille <akim@epita.fr>
13396
13397 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
13398 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
13399 New files, from Fileutils 4.0.27.
13400 * src/main.c (printable_version): Remove.
13401 * src/lex.c, src/reader.c: Use `quote'.
13402
134032000-10-04 Akim Demaille <akim@epita.fr>
13404
13405 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
13406
14ded682
AD
134072000-10-04 Akim Demaille <akim@epita.fr>
13408
13409 * doc/bison.texinfo: Various typos spotted by Neil Booth.
13410
8e03724b
AD
134112000-10-04 Akim Demaille <akim@epita.fr>
13412
13413 When a literal string is used to define two different tokens,
13414 `bison -v' segfaults.
13415 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
13416
13417 * tests/regression.m4: New file.
13418 Include the core of the sample provided by Piotr Gackiewicz.
13419 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
13420 properly.
13421
a9e64249
AD
134222000-10-04 Akim Demaille <akim@epita.fr>
13423
13424 * src/reader.c (parse_expect_decl): Keep `count' within the size
13425 of `buffer'.
13426 From Neil Booth.
13427
da9abf43
AD
134282000-10-02 Paul Eggert <eggert@twinsun.com>
13429
13430 * bison.s1 (yyparse): Assign the default value
13431 unconditionally, to avoid a GCC warning and make the parser a
13432 tad smaller.
13433
c33638bb
AD
134342000-10-02 Akim Demaille <akim@epita.fr>
13435
13436 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
13437 options.
13438
444c570a
AD
134392000-10-02 Akim Demaille <akim@epita.fr>
13440
13441 * src/derives.c, src/print.c, src/reduce.c: To ease the
13442 translation, move some `\n' out of the translated strings.
13443
89cab50d
AD
134442000-10-02 Akim Demaille <akim@epita.fr>
13445
13446 The location tracking mechanism is precious for parse error
13447 messages. Nevertheless, it is enabled only when `@n' is used in
13448 the grammar, which is a different issue (you can use it in error
13449 message, but not in the grammar per se). Therefore, there should
13450 be another means to enable it.
13451
13452 * src/getargs.c (getargs): Support `--locations'.
13453 (usage): Report it.
13454 * src/getargs.h (locationsflag): Export it.
13455 * src/lex.c (percent_table): Support `%locations'.
13456 * src/reader.c (yylsp_needed): Remove this variable, now replaced
13457 with `locationsflag'.
13458 * doc/bison.texinfo: Document `--locations' and `%locations'.
13459 Sort the options.
13460 * tests/calc.m4: Test it.
13461
13462 For regularity of the names, replace each
13463 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
13464 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
13465 In addition replace each `flag' with `_flag'.
13466
d6c2cba0
AD
134672000-10-02 Akim Demaille <akim@epita.fr>
13468
13469 Also test parse error messages, including with YYERROR_VERBOSE.
13470
13471 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
13472 associative).
13473 Use it to check the computations.
13474 Use it to check `nonassoc' is honored.
13475 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
13476 `--yyerror-verbose'.
13477 (_AT_CHECK_CALC): Adjust to this option.
13478 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
13479
5a35a6cb
AD
134802000-10-02 Akim Demaille <akim@epita.fr>
13481
13482 Test also `--verbose', `--defines' and `--name-prefix'. Testing
13483 the latter demonstrates a flaw in the handling of non debugging
13484 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
13485 was used in order to simplify:
13486
13487 #if YYDEBUG
13488 if (yydebug)
13489 {
13490 ...
13491 }
13492 #endif
13493
13494 into
13495
13496 if (yydebug)
13497 {
13498 ...
13499 }
13500
13501 unfortunately this leads to a CPP conflict when
13502 `--name-prefix=foo' is used since it produces `#define yydebug
13503 foodebug'.
13504
13505 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
13506 (YYDPRINTF): New macro.
13507 Spread its use.
13508 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
13509 the bison options.
13510 Also test `--verbose', `--defines' and `--name-prefix'.
13511
71da9eea
AD
135122000-10-02 Akim Demaille <akim@epita.fr>
13513
13514 Improve the readability of the produced parsers.
13515
13516 * src/bison.s1: Formatting changes.
13517 Improve the comment related to the `$' mark.
13518 (yydefault): Don't fall through to `yyresume': `goto' there.
13519 * src/output.c (output_parser): When the `$' is met, skip the end
13520 of its line.
13521 New variable, `number_of_dollar_signs', to check there's exactly
13522 one `$' in the parser skeleton.
13523
95e36146
AD
135242000-10-02 Akim Demaille <akim@epita.fr>
13525
13526 * lib/xstrdup.c: New file, from the fileutils.
13527 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
13528 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
13529 instead of strlen + xmalloc + strcpy.
13530 * src/symtab.c (copys): Remove, use xstrdup instead.
13531
d7020c20
AD
135322000-10-02 Akim Demaille <akim@epita.fr>
13533
13534 * src/gram.h (associativity): New enum type which replaces the
13535 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
13536 `right_assoc', `left_assoc' and `non_assoc'.
13537 Adjust all dependencies.
13538 * src/reader.c: Formatting changes.
13539 (LTYPESTR): Don't define it, use it as a literal in
13540 `reader_output_yylsp'.
13541 * src/symtab.h (symbol_class): New enum type which replaces the
13542 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
13543 `sunknown', `stoken and `snterm'.
13544
1916f98e
AD
135452000-10-02 Akim Demaille <akim@epita.fr>
13546
13547 * src/getargs.c (fixed_outfiles): Rename as...
13548 (yaccflag): for consistency and accuracy.
13549 Adjust dependencies.
13550
d7913476
AD
135512000-10-02 Akim Demaille <akim@epita.fr>
13552
13553 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
13554 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
13555 difficult and introduced a lot of core dump. It turns out that
13556 Bison used an implementation of `xmalloc' based on `calloc', and
13557 at various places it does depend upon the initialization to 0. I
13558 have not tried to isolate the pertinent places, and all the former
13559 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
13560 someone should address this issue.
13561
13562 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
13563 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
13564 files.
13565 Adjust dependencies.
13566 * src/warshall.h: New file.
13567 Propagate.
13568
340ef489
AD
135692000-10-02 Akim Demaille <akim@epita.fr>
13570
13571 Various anti-`extern in *.c' changes.
13572
13573 * src/system.h: Include `assert.h'.
13574
b2ca4022
AD
135752000-10-02 Akim Demaille <akim@epita.fr>
13576
13577 * src/state.h (nstates, final_state, first_state, first_shift)
13578 (first_reduction): Move their exportation from here...
13579 * src/LR0.h: to here.
13580 Adjust dependencies.
13581 * src/getargs.c (statisticsflag): New variable.
13582 Add support for `--statistics'.
13583 Adjust dependencies.
13584
13585 Remove a lot of now useless `extern' statements in most files.
13586
403b315b
AD
135872000-10-02 Akim Demaille <akim@epita.fr>
13588
13589 * src/LR0.h: New file.
13590 Propagate its use.
13591
07a58c13
AD
135922000-10-02 Akim Demaille <akim@epita.fr>
13593
13594 * src/print.h: New file.
13595 Propagate its use.
13596 * src/print.c: Formatting and ordering changes.
13597 (verbose, terse): Replace with...
13598 (print_results): this new function.
13599 Adjust dependencies.
13600
0619caf0
AD
136012000-10-02 Akim Demaille <akim@epita.fr>
13602
13603 * src/conflicts.c (conflict_report): New function.
13604 (conflict_log, verbose_conflict_log): Replace with...
13605 (print_conflicts): this function.
13606 Adjust dependencies.
13607 * src/conflicts.h: New file.
13608 Propagate its inclusion.
13609
3519ec76
AD
136102000-10-02 Akim Demaille <akim@epita.fr>
13611
13612 * src/nullable.h: New file.
13613 Propagate its inclusion.
13614 * src/nullable.c: Formatting changes.
13615
015acc48
AD
136162000-10-02 Akim Demaille <akim@epita.fr>
13617
13618 * src/reduce.h: New file.
13619 Propagate its inclusion.
13620 * src/reduce.c: Topological sort and other formatting changes.
13621 (bool, TRUE, FALSE): Move their definition to...
13622 * src/system.h: here.
13623
8963a27b
AD
136242000-10-02 Akim Demaille <akim@epita.fr>
13625
13626 * src/files.c: Formatting changes.
13627 (tryopen, tryclose, openfiles): Rename as...
13628 (xfopen, xfclose, open_files): this.
13629 (stringappend): static.
13630 * src/files.h: Complete the list of exported symbols.
13631 Propagate its use.
13632
a70083a3
AD
136332000-10-02 Akim Demaille <akim@epita.fr>
13634
13635 * src/reader.h: New file.
13636 Propagate its use instead of tedious list of `extern' and
13637 prototypes.
13638 * src/reader.c: Formatting changes, topological sort,
13639 s/register//.
13640
abadc117
AD
136412000-10-02 Akim Demaille <akim@epita.fr>
13642
13643 * src/lex.h: Prototype `lex.c' exported functions.
13644 * src/reader.c: Adjust.
13645 * src/lex.c: Formatting changes.
13646 (safegetc): Rename as...
13647 (xgetc): this.
13648
720d742f
AD
136492000-10-02 Akim Demaille <akim@epita.fr>
13650
13651 * src/lalr.h: New file.
13652 Propagate its inclusion instead of prototypes and `extern'.
13653 * src/lalr.c: Formatting changes, topological sorting etc.
13654
f2acea59
AD
136552000-10-02 Akim Demaille <akim@epita.fr>
13656
13657 * src/output.c (token_actions): Introduce a temporary array,
13658 YYDEFACT, that makes it possible for this function to use
13659 output_short_table.
13660
d019d655
AD
136612000-10-02 Akim Demaille <akim@epita.fr>
13662
13663 `user_toknums' is output as a `short[]' in `output.c', while it is
13664 defined as a `int[]' in `reader.c'. For consistency with the
13665 other output tables, `user_toknums' is now defined as a table of
13666 shorts.
13667
13668 * src/reader.c (user_toknums): Be a short table instead of an int
13669 table.
13670 Adjust dependencies.
13671
13672 Factor the short table outputs.
13673
13674 * src/output.c (output_short_table): New function.
13675 * src/output.c (output_gram, output_stos, output_rule_data)
13676 (output_base, output_table, output_check): Use it.
13677
6c89f1c1
AD
136782000-10-02 Akim Demaille <akim@epita.fr>
13679
13680 * src/output.c (output): Topological sort of the functions, in
13681 order to get rid of the `static' prototypes.
13682 No longer use `register'.
13683 * src/output.h: New file.
13684 Propagate its inclusion in files explicitly prototyping functions
13685 from output.c.
13686
d9efd181
AD
136872000-09-21 Akim Demaille <akim@epita.fr>
13688
13689 * src/atgeneral.m4: Update from Autoconf.
13690
c29240e7 136912000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
13692
13693 * src/closure.h: New file.
13694 * src/closure.c: Formatting changes, topological sort over the
13695 functions, use of closure.h.
13696 (initialize_closure, finalize_closure): Rename as...
13697 (new_closure, free_closure): these. Adjust dependencies.
13698 * src/LR0.c: Formatting changes, topological sort, use of
13699 cloture.h.
13700 (initialize_states): Rename as...
13701 (new_states): this.
13702 * src/Makefile.am (noinst_HEADERS): Adjust.
13703
499daa50
AD
137042000-09-20 Akim Demaille <akim@epita.fr>
13705
13706 * src/acconfig.h: Don't protect config.h against multiple
13707 inclusion.
13708 Don't define PARAMS.
13709 * src/system.h: Define PARAMS.
13710 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
13711 purpose of config.h. system.h must not try to fix wrong
13712 definitions in config.h.
13713
cc84fd5d
AD
137142000-09-20 Akim Demaille <akim@epita.fr>
13715
13716 * src/derives.h: New file.
13717 * src/main.c, src/derives.h: Use it.
13718 Formatting changes.
13719 * src/Makefile.am (noinst_HEADERS): Adjust.
13720
db5b3a89
AD
137212000-09-20 Akim Demaille <akim@epita.fr>
13722
13723 * tests/atgeneral.m4: Update from Autoconf.
13724 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
13725 (AT_CHECK_CALC): New macros.
13726 Use these macros to test bison with options `', `--raw',
13727 `--debug', `--yacc', `--yacc --debug'.
13728
ceed8467
AD
137292000-09-19 Akim Demaille <akim@epita.fr>
13730
13731 * src/output.c: Formatting changes.
13732 * src/machine.h: Remove, leaving its contents in...
13733 * src/system.h: here.
13734 Include stdio.h.
13735 Adjust all dependencies on stdio.h and machine.h.
13736 * src/getargs.h: New file.
13737 Let all `extern' declarations about getargs.c be replaced with
13738 inclusion of `getargs.h'.
13739 * src/Makefile.am (noinst_HEADERS): Adjust.
13740
13741 * tests/calc.m4 (yyin): Be initialized in main, not on the global
13742 scope.
13743 (yyerror): Returns void, not int.
13744 * doc/bison.texinfo: Formatting changes.
13745
05a1d24b
AD
137462000-09-19 Akim Demaille <akim@epita.fr>
13747
13748 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
13749 portable.
13750
cbd25751
AD
137512000-09-18 Akim Demaille <akim@epita.fr>
13752
13753 * configure.in: Append WARNING_CFLAGS to CFLAGS.
13754 * src/Makefile.am (INCLUDES): Don't.
13755 Be ready to fetch headers in lib/.
13756
13863333
AD
137572000-09-18 Akim Demaille <akim@epita.fr>
13758
13759 * doc/bison.texinfo: Update the copyright.
13760 ANSIfy and GNUify the examples.
13761 Remove the old menu.
13762
0d533154
AD
137632000-09-18 Akim Demaille <akim@epita.fr>
13764
13765 First set of tests: use the `calc' example from the documentation.
13766
13767 * src/bison.s1 (yyparse): Condition the code using `yytname' which
13768 is defined only when YYDEBUG is.
13769 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
13770 * src/files.c (tryopen, tryclose): Formatting changes.
13771 Move to the top and be static.
13772 * src/reader.c (read_signed_integer): Likewise.
13773 * tests/calc.m4: New file.
13774 * Makefile.am, suite.m4: Adjust.
13775 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
13776
e79137ac
AD
137772000-09-18 Akim Demaille <akim@epita.fr>
13778
13779 Add support for an Autotest test suite for Bison.
13780
13781 * m4/m4.m4, m4/atconfig.m4: New files.
13782 * m4/Makefile.am (EXTRA_DIST): Adjust.
13783 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
13784 files.
13785 * src/getargs.c: Display a more standard --version message.
13786 * src/reader.c (reader): Formatting changes.
13787 No longer depend upon VERSION_STRING.
13788 * configure.in: No longer use `dnl'.
13789 Set up the test suite and the new directory `tests/.
13790 (VERSION_STRING): Remove.
13791
27821bff
AD
137922000-04-14 Akim Demaille <akim@epita.fr>
13793
13794 * src/reader.c (copy_comment2): New function, same as former
13795 `copy_comment', but outputs into two FILE *.
13796 (copy_comment): Use it.
13797 (parse_union_decl): Use it.
13798 (get_type, parse_start_decl): Use the same `invalid' message.
13799 (parse_start_decl, parse_union_decl): Use the same `multiple'
13800 message.
13801 (parse_union_decl, copy_guard, copy_action): Use the same
13802 `unmatched' message.
13803 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
13804
cfe5fbc0
AD
138052000-03-31 Akim Demaille <akim@epita.fr>
13806
13807 * src/files.c (tryopen, tryclose): Move to the top.
13808 Be static.
13809
cb7db13e
AD
138102000-03-31 Akim Demaille <akim@epita.fr>
13811
13812 * src/main.c (main): Don't call `done', exit does it.
13813
a0f6b076
AD
138142000-03-31 Akim Demaille <akim@epita.fr>
13815
36281465
AD
13816 * allocate.c: s/return (foo)/return foo/.
13817 * lalr.c: Likewise.
13818 * LR0.c: Likewise.
13819 * output.c: Likewise.
13820 * reader.c: Likewise.
13821 * symtab.c: Likewise.
13822 * vmsgetargs.c: Likewise.
13823
138242000-03-31 Akim Demaille <akim@epita.fr>
13825
13826 Clean up the error reporting functions.
a0f6b076
AD
13827
13828 * src/report.c: New file.
13829 * src/report.h: Likewise.
13830 * src/Makefile.am: Adjust.
13831 * m4/error.m4: New file.
13832 * m4/Makefile.am: Adjust.
13833 * configure.in (jm_PREREQ_ERROR): Call it.
13834 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
13835 Remove.
13836 (fatal, fatals): Remove. All callers use complain.c::fatal.
13837 (warn, warni, warns, warnss, warnss): Remove. All callers use
13838 complain.c::complain.
13839 (toomany): Remove, use fatal instead.
13840 * src/files.c (done): No argument, use complain_message_count.
13841 * src/main.c (main): Register `done' to `atexit'.
13842
13843 * src/getargs.c (usage): More `fputs', less `fprintf'.
13844
18539825
AD
138452000-03-28 Akim Demaille <akim@epita.fr>
13846
13847 * lib/: New directory.
13848 * Makefile.am (SUBDIRS): Adjust.
13849 * configure.in: Adjust.
13850 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
13851 useless.
13852 * src/alloca.c: Moved to lib/.
13853 * src/getopt.c: Likewise.
13854 * src/getopt1.c: Likewise.
13855 * src/getopt.h: Likewise.
13856 * src/ansi2knr.c: Likewise.
13857 * src/ansi2knr.1: Likewise.
13858 * src/Makefile.am: Adjust.
13859 * lib/Makefile.am: New file.
13860
9f306f2a
AD
138612000-03-28 Akim Demaille <akim@epita.fr>
13862
13863 * src/getargs.c (usage): Refresh the help message.
13864
0ba347b6
AD
138652000-03-17 Akim Demaille <akim@epita.fr>
13866
13867 * src/getopt1.c: Updated from textutils 2.0e
13868 * src/getopt.c: Likewise.
13869 * src/getopt.h: Likewise.
13870
dbe7f271
AD
138712000-03-17 Akim Demaille <akim@epita.fr>
13872
13873 * src/Makefile.am (bison.simple): Fix the awk program: quote only
13874 the file name, not the whole `#line LINE FILE'.
13875
75bbe78d
AD
138762000-03-17 Akim Demaille <akim@epita.fr>
13877
13878 On syntax errors, report the token on which we choked.
13879
aa5fd0ee
AD
13880 * src/bison.s1 (yyparse): In the label yyerrlab, when
13881 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 13882
7b306f52
AD
138832000-03-17 Akim Demaille <akim@epita.fr>
13884
aa5fd0ee 13885 * src/reader.c (copy_at): New function.
7b306f52
AD
13886 (copy_guard): Use it.
13887 (copy_action): Use it.
13888
e87b5700
AD
138892000-03-17 Akim Demaille <akim@epita.fr>
13890
13891 Be kind to translators, save some useless translations.
13892
aa5fd0ee 13893 * src/main.c (banner): New function.
e87b5700
AD
13894 (fatal_banner): Use it.
13895 (warn_banner): Use it.
13896
ae3c3164
AD
138972000-03-17 Akim Demaille <akim@epita.fr>
13898
aa5fd0ee
AD
13899 * src/reader.c (copy_definition): Use copy_string and
13900 copy_comment. Removed now unused `match', `ended',
13901 `cplus_comment'.
ae3c3164
AD
13902 (copy_comment, copy_string): Moved, to be visible from
13903 copy_definition.
13904
4dc58e7c
AD
139052000-03-17 Akim Demaille <akim@epita.fr>
13906
aa5fd0ee
AD
13907 * src/reader.c (copy_string): Declare `static inline'. No
13908 problems with inline, since it is checked by configure.
4dc58e7c
AD
13909 (copy_comment): Likewise.
13910
0a6384c4
AD
139112000-03-17 Akim Demaille <akim@epita.fr>
13912
aa5fd0ee 13913 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 13914
3cef001a
AD
139152000-03-17 Akim Demaille <akim@epita.fr>
13916
aa5fd0ee 13917 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
13918 (copy_action): Use it. Removed now unused `match', `ended',
13919 `cplus_comment'.
13920 (copy_guard): Likewise.
13921
ca36d2ef
AD
139222000-03-17 Akim Demaille <akim@epita.fr>
13923
aa5fd0ee 13924 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
13925 (copy_action): Use it.
13926 (copy_guard): Likewise.
13927
6666f98f
AD
139282000-03-17 Akim Demaille <akim@epita.fr>
13929
13930 Change the handling of @s so that they behave exactly like $s.
13931 There is now a pseudo variable @$ (readble and writable), location
13932 of the lhs of the rule (by default ranging from the location of
13933 the first symbol of the rhs, to the location of the last symbol,
13934 or, if the rhs is empty, YYLLOC).
13935
13936 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
13937 yyval.
13938 (yyparse): When providing a default semantic action, provide a
13939 default location action.
13940 (after the $): No longer change `*YYLSP', just stack YYLOC the
13941 same way you stack YYVAL.
13942 * src/reader.c (read_declarations): Use warns.
13943 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
13944 (copy_action, case '@'): Likewise.
13945 Use a standard error message, to save useless work from
13946 translators.
13947
41aca2e0
AD
139482000-03-17 Akim Demaille <akim@epita.fr>
13949
aa5fd0ee
AD
13950 * src/bison.s1: Formatting and cosmetics changes.
13951 * src/reader.c: Likewise.
41aca2e0
AD
13952 Update the Copyright notice.
13953
dc08c1d5
AD
139542000-03-17 Akim Demaille <akim@epita.fr>
13955
aa5fd0ee
AD
13956 * src/bison.s1 (#line): All set to `#line' only, since the
13957 Makefile now handles them.
dc08c1d5 13958
9ee3c97b
AD
139592000-03-16 Akim Demaille <akim@epita.fr>
13960
13961 * src/output.c (output_rule_data): Output the documentation of
13962 some of the tables.
13963 (Copyright notice): Update.
13964 Formatting changes.
13965
0de741ca
AD
139662000-03-16 Akim Demaille <akim@epita.fr>
13967
13968 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13969 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13970 One `#if YYDEBUG' remains, since it uses variables which are
13971 defined only if `YYDEBUG != 0'.
13972
bb10be54
AD
139732000-03-16 Akim Demaille <akim@epita.fr>
13974
13975 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13976 and related variables so that the similarities are highlighted.
13977
b07b484a
AD
139782000-03-16 Akim Demaille <akim@epita.fr>
13979
13980 * src/bison.s1: Properly indent CPP directives.
13981
361f60b3
AD
139822000-03-16 Akim Demaille <akim@epita.fr>
13983
13984 * src/bison.s1: Properly indent the `alloca' CPP section.
13985
8c44d3ec
AD
139862000-03-16 Akim Demaille <akim@epita.fr>
13987
13988 Do not hard code values of directories in `configure.in'.
13989 Update the `configure' tool chain.
13990
13991 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13992 src/makefile.am.
13993 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13994 (AC_OUTPUT): Add m4/Makefile.
13995 Bump to bison 1.28a, 1.29 has never been released.
13996 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13997 handled via src/Makefile.am.
13998 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13999 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
14000 autoheader.
14001 * Makefile.am (SUBDIRS): Add m4.
14002 (ACLOCAL_AM_FLAGS): New variable.
14003 (AUTOMAKE_OPTIONS): Add check-news.
14004 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
14005 the proper line number and file name.
14006 (DEFS): Propagate the location of bison library files and of the
14007 locale files.
14008 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
14009 builddir.
14010 * acinclude.m4: Remove, replaced by the directory m4.
14011 * m4/Makefile.am (EXTRA_DIST): New variable.
14012 * m4/gettext.m4: New file, from the fileutils.
14013 * m4/lcmessage.m4: Likewise
14014 * m4/progtest.m4: Likewise.
14015 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
14016
f95997e7
AD
140172000-03-10 Akim Demaille <akim@epita.fr>
14018
14019 * src/closure.c:
14020 Formatting changes of various comments.
14021 Respect the GNU coding standards at various places.
14022 Don't use `_()' when no translation is needed.
14023
140241999-12-13 Jesse Thilo <jthilo@gnu.org>
14025
14026 * src/files.c:
14027 OS/2 honors TMPDIR environment variable.
14028
140291999-12-13 Jesse Thilo <jthilo@gnu.org>
14030
14031 * doc/bison.texinfo: Tweaked spelling and grammar.
14032 Updated ISBN.
14033 Removed reference to price of printed copy.
14034 Mention BISON_SIMPLE and BISON_HAIRY.
14035
140361999-12-13 Jesse Thilo <jthilo@gnu.org>
14037
14038 * configure.in, NEWS:
14039 Bison 1.29 released.
14040
140411999-10-27 Jesse Thilo <jthilo@gnu.org>
14042
14043 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
14044 Added reference card.
14045
140461999-07-26 Jesse Thilo <jthilo@gnu.org>
14047
14048 * po/ru.po: Added Russian translation.
14049
140501999-07-26 Jesse Thilo <jthilo@gnu.org>
14051
14052 * configure.in: Added Russian translation.
14053
140541999-07-06 Jesse Thilo <jthilo@gnu.org>
14055
14056 * configure.in, NEWS, README:
14057 Released version 1.28.
14058
140591999-06-14 Jesse Thilo <jthilo@gnu.org>
14060
14061 * src/system.h:
14062 Squashed redefinition warning on some systems.
14063
14064 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
14065 Have configure build version string instead of relying on ANSI string
14066 concatentation.
14067
140681999-06-14 Jesse Thilo <jthilo@gnu.org>
14069
14070 * po/POTFILES.in: Got rid of version.c.
14071
140721999-06-14 Jesse Thilo <jthilo@gnu.org>
14073
14074 * acconfig.h, configure.in:
14075 Have configure build version string instead of relying on ANSI string
14076 concatentation.
14077
140781999-06-08 Jesse Thilo <jthilo@gnu.org>
14079
14080 * doc/bison.1:
14081 Dropped mention of `+' for long-named options.
14082
140831999-05-30 Jesse Thilo <jthilo@gnu.org>
14084
14085 * src/files.c: Added <unistd.h> for unlink().
14086
14087 * src/Makefile.am, src/system.h:
14088 I18n fixes.
14089
140901999-05-30 Jesse Thilo <jthilo@gnu.org>
14091
14092 * README: Added a FAQ list.
14093
14094 * configure.in, acconfig.h:
14095 I18n fixes.
14096
140971999-05-30 Jesse Thilo <jthilo@gnu.org>
14098
14099 * doc/FAQ, doc/Makefile.am:
14100 Added a FAQ list.
14101
141021999-05-19 Jesse Thilo <jthilo@gnu.org>
14103
14104 * src/alloc.h, src/symtab.h, src/version.c:
14105 Protected inclusion of "config.h" with HAVE_CONFIG_H.
14106
141071999-04-18 Jesse Thilo <jthilo@gnu.org>
14108
14109 * src/.cvsignore, src/Makefile.am:
14110 Reorganized: sources in `src', documentation in `doc'.
14111
14112 * src/lex.c (literalchar):
14113 fixed the code for escaping double quotes (thanks
14114 Jonathan Czisny.)
14115
141161999-04-18 Jesse Thilo <jthilo@gnu.org>
14117
14118 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
14119 Adjusted paths to reflect directory reorganization.
14120
141211999-04-18 Jesse Thilo <jthilo@gnu.org>
14122
14123 * doc/.cvsignore, doc/Makefile.am:
14124 Reorganized: sources in `src', documentation in `doc'.
14125
141261999-04-18 Jesse Thilo <jthilo@gnu.org>
14127
14128 * configure.in:
14129 Updated AC_INIT file to reflect directory reorganization.
14130
14131 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
14132 Reorganized: sources in `src', documentation in `doc'.
14133
141341999-04-13 Jesse Thilo <jthilo@gnu.org>
14135
14136 * src/allocate.c:
14137 Don't declare calloc() and realloc() if not necessary.
14138
141391999-04-13 Jesse Thilo <jthilo@gnu.org>
14140
14141 * configure.in, acconfig.h, acinclude.m4:
14142 Don't declare calloc() and realloc() if not necessary.
14143
141441999-03-23 Jesse Thilo <jthilo@gnu.org>
14145
14146 * po/.cvsignore: Added i18n support.
14147
141481999-03-23 Jesse Thilo <jthilo@gnu.org>
14149
14150 * acconfig.h, configure.in, Makefile.am:
14151 Added i18n support.
14152
141531999-03-22 Jesse Thilo <jthilo@gnu.org>
14154
14155 * src/bison.s1: Fixed #line numbers.
14156
141571999-03-15 Jesse Thilo <jthilo@gnu.org>
14158
14159 * po/es.po, po/fr.po, po/nl.po, po/de.po:
14160 Added PO files from Translation Project.
14161
141621999-03-03 Jesse Thilo <jthilo@gnu.org>
14163
14164 * Makefile.am:
14165 Added support for non-ANSI compilers (ansi2knr).
14166
141671999-02-16 Jesse Thilo <jthilo@gnu.org>
14168
14169 * configure.in: Bumped version number to 1.27.
14170
14171 * Makefile.am:
14172 Added `bison.simple' to list of files removed by `make distclean'.
14173
141741999-02-12 Jesse Thilo <jthilo@gnu.org>
14175
14176 * src/files.c, src/files.h:
14177 Defined locations of parser files in config.h instead of Makefile.
14178
141791999-02-12 Jesse Thilo <jthilo@gnu.org>
14180
14181 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
14182 Defined locations of parser files in config.h instead of Makefile.
14183
141841999-02-09 Jesse Thilo <jthilo@gnu.org>
14185
14186 * Makefile.am:
14187 Removed inappropriate use of $< macro.
14188
141891999-02-05 Jesse Thilo <jthilo@gnu.org>
14190
14191 * po/Makefile.in.in, po/POTFILES.in:
14192 Add `po' directory skeleton.
14193
141941999-01-27 Jesse Thilo <jthilo@gnu.org>
14195
14196 * README: Document help-bison list.
14197
14198 * configure.in: Add check for mkstemp().
14199
142001999-01-20 Jesse Thilo <jthilo@gnu.org>
14201
14202 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
14203 Hush a few compiler warnings.
14204
14205 * src/files.c:
14206 Add tryclose(), which verifies that fclose was successful.
14207 Hush a couple of compiler warnings.
14208
142091999-01-20 Jesse Thilo <jthilo@gnu.org>
14210
14211 * Makefile.am, OChangeLog:
14212 ChangeLog is now automatically generated. Include the old version as
14213 OChangeLog.
14214
142151999-01-14 Jesse Thilo <jthilo@gnu.org>
14216
14217 * 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:
14218 Update FSF address.
14219
142201999-01-14 Jesse Thilo <jthilo@gnu.org>
14221
14222 * doc/bison.texinfo: Fix formatting glitch.
14223
14224 * doc/bison.texinfo: Update FSF address.
14225
142261999-01-14 Jesse Thilo <jthilo@gnu.org>
14227
14228 * acconfig.h: Update FSF address.
14229
142301999-01-08 Jesse Thilo <jthilo@gnu.org>
14231
14232 * src/system.h:
14233 Don't define PACKAGE here, since config.h defines it.
14234
142351998-12-30 Jesse Thilo <jthilo@gnu.org>
14236
14237 * src/reader.c: Update copyright date.
14238
14239 * src/main.c:
14240 Ditch sprintf to statically-sized buffers in fatal/warn functions in
14241 favor of output directly to stderr (avoids buffer overruns).
14242
14243 * src/reader.c: Some checks for premature EOF.
14244
14245 * 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:
14246 Use prototypes if the compiler understands them.
14247
14248 * src/files.c: Honor TMPDIR on Unix hosts.
14249 Use prototypes if the compiler understands them.
14250
14251 * src/reader.c:
14252 Fix a couple of buffer overrun bugs.
14253 Use prototypes if the compiler understands them.
14254
14255 * src/system.h: Include unistd.h and ctype.h.
14256 Use #ifdef instead of #if for NLS symbols.
14257
142581998-12-30 Jesse Thilo <jthilo@gnu.org>
14259
14260 * doc/bison.texinfo:
14261 Delete comment "consider using @set for edition number, etc..." since
14262 we now are doing so.
14263
142641998-12-30 Jesse Thilo <jthilo@gnu.org>
14265
14266 * configure.in:
14267 Use prototypes if the compiler understands them.
14268
14269 * NEWS: Document 1.26 highlights.
14270
14271 * Makefile.am: Require Automake 1.3 or later.
14272
14273 * acconfig.h:
14274 Use prototypes if the compiler understands them.
14275
142761998-12-29 Jesse Thilo <jthilo@gnu.org>
14277
14278 * src/version.c:
14279 Use VERSION symbol from automake for version number.
14280
142811998-12-29 Jesse Thilo <jthilo@gnu.org>
14282
14283 * acconfig.h, configure.in, version.cin:
14284 Use VERSION symbol from automake for version number.
14285
142861998-11-28 Jesse Thilo <jthilo@gnu.org>
14287
14288 * Makefile.am:
14289 Distribute original version of simple parser (bison.s1), not built
14290 version (bison.simple).
14291
142921998-11-28 Jesse Thilo <jthilo@gnu.org>
14293
14294 * doc/bison.texinfo: Add info dir entry.
14295
14296 * doc/bison.texinfo:
14297 Let automake put version number into documentation.
14298
142991998-11-26 Jesse Thilo <jthilo@gnu.org>
14300
14301 * src/bison.cld, src/build.com, src/vmshlp.mar:
14302 Add non-RCS files from /gd/gnu/bison.
14303
143041998-11-26 Jesse Thilo <jthilo@gnu.org>
14305
14306 * doc/bison.1:
14307 Document the BISON_HAIRY and BISON_SIMPLE variables.
14308
143091998-11-25 Jesse Thilo <jthilo@gnu.org>
14310
14311 * src/version.c: Build version.c automatically.
14312
14313 * src/reader.c:
14314 Fix token numbering (used to start at 258, not 257).
14315
14316 * src/system.h: Include config.h.
14317
14318 * src/getargs.c: Update bug report address.
14319
14320 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
14321 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
14322
143231998-11-25 Jesse Thilo <jthilo@gnu.org>
14324
14325 * Makefile.am:
14326 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
14327
14328 * configure.in, version.cin:
14329 Build version.c automatically.
14330
14331 * AUTHORS: Add AUTHORS file.
14332
14333 * README: Update bug report address.
14334
14335 * bison.simple:
14336 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
14337
14338 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
14339 Add automake stuff.
14340
143411998-11-25 Jesse Thilo <jthilo@gnu.org>
14342
14343 * doc/bison.texinfo: Clean up some formatting.
14344
143451998-05-05 Richard Stallman <rms@gnu.org>
14346
14347 * doc/bison.texinfo:
14348 Explain better why to make a pure parser.
14349
143501998-01-05 Richard Stallman <rms@gnu.org>
14351
14352 * src/files.c (openfiles):
14353 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
14354 find a temporary directory, if possible. Do not unlink files while
14355 they are open.
14356
143571997-08-25 Richard Stallman <rms@gnu.org>
14358
14359 * src/reader.c (stack_offset;):
14360 Change some warni to warns.
14361
14362 * src/lex.c (literalchar): Use warns, not warni.
14363
143641997-06-28 Richard Stallman <rms@gnu.org>
14365
14366 * src/bison.s1: Add a Bison version comment.
14367
14368 * src/main.c (fatal, warn, berror):
14369 Use program_name.
14370
143711997-06-28 Richard Stallman <rms@gnu.org>
14372
14373 * Makefile.in (bison_version): New variable.
14374 (dist): Use that variable.
14375 (bison.s1): Substitute the Bison version into bison.simple.
14376
14377 * bison.simple: Add a Bison version comment.
14378
143791997-06-18 Richard Stallman <rms@gnu.org>
14380
14381 * src/main.c (fatal, warn, berror):
14382 Make error messages standard.
14383 (toomany): Improve error message text.
14384
14385 * 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:
14386 new.h renamed to alloc.h.
14387
143881997-06-18 Richard Stallman <rms@gnu.org>
14389
14390 * Makefile.in: new.h renamed to alloc.h.
14391
143921997-05-24 Richard Stallman <rms@gnu.org>
14393
14394 * src/lex.c (literalchar):
14395 Fix the code for escaping \, " and '.
14396
14397 (lex): Avoid trouble when there are many chars
14398 to discard in a char literal with just several chars in it.
14399
144001997-05-17 Richard Stallman <rms@gnu.org>
14401
14402 * src/bison.s1:
14403 Use malloc, if using alloca is troublesome.
14404 (YYSTACK_USE_ALLOCA): New flag macro.
14405 Define it for some systems and compilers.
14406 (YYSTACK_ALLOC): New macro.
14407 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14408 If it was malloc'd, free it.
14409
144101997-05-17 Richard Stallman <rms@gnu.org>
14411
14412 * bison.simple:
14413 Use malloc, if using alloca is troublesome.
14414 (YYSTACK_USE_ALLOCA): New flag macro.
14415 Define it for some systems and compilers.
14416 (YYSTACK_ALLOC): New macro.
14417 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14418 If it was malloc'd, free it.
14419
144201997-04-23 Richard Stallman <rms@gnu.org>
14421
14422 * src/bison.s1:
14423 (alloca) [__hpux]: Always define as __builtin_alloca.
14424
144251997-04-23 Richard Stallman <rms@gnu.org>
14426
14427 * bison.simple:
14428 (alloca) [__hpux]: Always define as __builtin_alloca.
14429
144301997-04-22 Richard Stallman <rms@gnu.org>
14431
14432 * src/bison.s1:
14433 [__hpux]: Include alloca.h (right for HPUX 10)
14434 instead of declaring alloca (right for HPUX 9).
14435
14436 * src/bison.s1 (__yy_memcpy):
14437 Declare arg `count' as unsigned int.
14438 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14439
144401997-04-22 Richard Stallman <rms@gnu.org>
14441
14442 * bison.simple:
14443 [__hpux]: Include alloca.h (right for HPUX 10)
14444 instead of declaring alloca (right for HPUX 9).
14445
14446 * bison.simple (__yy_memcpy):
14447 Declare arg `count' as unsigned int.
14448 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14449
144501997-01-03 Richard Stallman <rms@gnu.org>
14451
14452 * src/allocate.c: [__STDC__ or _MSC_VER]:
14453 Declare calloc and realloc to return void *.
14454
144551997-01-02 Richard Stallman <rms@gnu.org>
14456
14457 * src/system.h:
14458 [_MSC_VER]: Include stdlib.h and process.h.
14459 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
14460
14461 * src/main.c (main): Return FAILURE as a value.
14462 (printable_version): Declare arg as int, not char.
14463
144641997-01-02 Richard Stallman <rms@gnu.org>
14465
14466 * Makefile.in (dist):
14467 Explicitly check for symlinks, and copy them.
14468
144691996-12-19 Richard Stallman <rms@gnu.org>
14470
14471 * src/files.c:
14472 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
14473
144741996-12-18 Paul Eggert <eggert@gnu.org>
14475
14476 * src/bison.s1 (yyparse):
14477 If __GNUC__ and YYPARSE_PARAM are both defined,
14478 declare yyparse to have a void * argument.
14479
144801996-12-18 Paul Eggert <eggert@gnu.org>
14481
14482 * bison.simple (yyparse):
14483 If __GNUC__ and YYPARSE_PARAM are both defined,
14484 declare yyparse to have a void * argument.
14485
144861996-12-17 Richard Stallman <rms@gnu.org>
14487
14488 * src/reduce.c (nbits): Add some casts.
14489
144901996-08-12 Richard Stallman <rms@gnu.org>
14491
14492 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
14493
144941996-08-12 Richard Stallman <rms@gnu.org>
14495
14496 * bison.simple: Test _MSDOS as well as _MSDOS_.
14497
144981996-07-31 Richard Stallman <rms@gnu.org>
14499
14500 * src/bison.s1:
14501 [__sun && __i386]: Include alloca.h.
14502
145031996-07-31 Richard Stallman <rms@gnu.org>
14504
14505 * bison.simple:
14506 [__sun && __i386]: Include alloca.h.
14507
145081996-07-30 Richard Stallman <rms@gnu.org>
14509
14510 * src/bison.s1: Comment change.
14511
14512 * src/bison.s1: Test _MSDOS_, not MSDOS.
14513
145141996-07-30 Richard Stallman <rms@gnu.org>
14515
14516 * bison.simple: Comment change.
14517
14518 * bison.simple: Test _MSDOS_, not MSDOS.
14519
145201996-06-01 Richard Stallman <rms@gnu.org>
14521
14522 * 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:
14523 Insert `_' macro around many string constants.
14524
14525 * src/main.c:
14526 Insert `_' macro around many string constants.
14527
14528 (main): Call setlocale, bindtextdomain and textdomain.
14529
14530 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
14531 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
14532 [ENABLE_NLS]: Include libintl.h.
14533 [ENABLE_NLS] (gettext): Define.
14534 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
14535 (N_, PACKAGE, LOCALEDIR): New macros.
14536
145371996-06-01 Richard Stallman <rms@gnu.org>
14538
14539 * POTFILES.in: New file.
14540
14541 * Makefile.in (allocate.o):
14542 Define target explicitly.
14543
14544 * Makefile.in (CFLAGS): Set to @CFLAGS@.
14545 (LDFLAGS): Set to @LDFLAGS@.
14546 (configure): Run autoconf only if preceding `cd' succeeds.
14547 (bison.s1): Redirect output to temporary file then move the
14548 temporary to the target, rather than redirecting directly to bison.s1.
14549 (clean): Remove config.status and config.log.
14550 (distclean): Don't remove config.status here.
14551
145521996-05-12 Richard Stallman <rms@gnu.org>
14553
14554 * src/bison.s1:
14555 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14556
145571996-05-12 Richard Stallman <rms@gnu.org>
14558
14559 * bison.simple:
14560 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14561
145621996-05-11 Richard Stallman <rms@gnu.org>
14563
14564 * src/bison.s1 (__yy_memcpy):
14565 Really reorder the args, as was supposedly done on Feb 14 1995.
14566 (yyparse): Calls changed accordingly.
14567
145681996-05-11 Richard Stallman <rms@gnu.org>
14569
14570 * Makefile.in (dist): Don't use $(srcdir).
14571
14572 * bison.simple (__yy_memcpy):
14573 Really reorder the args, as was supposedly done on Feb 14 1995.
14574 (yyparse): Calls changed accordingly.
14575
145761996-01-27 Richard Stallman <rms@gnu.org>
14577
14578 * src/output.c (output_rule_data):
14579 Test YYERROR_VERBOSE in the conditional
14580 around the definition of ttyname.
14581
145821995-12-29 Richard Stallman <rms@gnu.org>
14583
14584 * src/bison.s1:
14585 Fix line numbers in #line commands.
14586
145871995-12-29 Richard Stallman <rms@gnu.org>
14588
14589 * bison.simple:
14590 Fix line numbers in #line commands.
14591
145921995-12-27 Richard Stallman <rms@gnu.org>
14593
14594 * src/bison.s1 (YYPARSE_PARAM_DECL):
14595 In C++, make it always null.
14596 (YYPARSE_PARAM_ARG): New macro.
14597 (yyparse): Use YYPARSE_PARAM_ARG.
14598
145991995-12-27 Richard Stallman <rms@gnu.org>
14600
14601 * bison.simple (YYPARSE_PARAM_DECL):
14602 In C++, make it always null.
14603 (YYPARSE_PARAM_ARG): New macro.
14604 (yyparse): Use YYPARSE_PARAM_ARG.
14605
146061995-11-29 Richard Stallman <rms@gnu.org>
14607
14608 * doc/bison.texinfo:
14609 Describe literal string tokens, %raw, %no_lines, %token_table.
14610
146111995-11-29 Daniel Hagerty <hag@gnu.org>
14612
14613 * doc/bison.texinfo: Fixed update date
14614
146151995-10-16 Richard Stallman <rms@gnu.org>
14616
14617 * src/version.c: Version 1.25.
14618
146191995-10-16 Richard Stallman <rms@gnu.org>
14620
14621 * NEWS: *** empty log message ***
14622
146231995-10-16 Richard Stallman <rms@gnu.org>
14624
14625 * doc/bison.1, doc/bison.rnh:
14626 Add new options.
14627
146281995-10-15 Richard Stallman <rms@gnu.org>
14629
14630 * src/vmsgetargs.c, src/getargs.c:
14631 Added -n, -k, and -raw switches.
14632 (noparserflag, toknumflag, rawtoknumflag): New variables.
14633
14634 * src/symtab.h (SALIAS):
14635 New #define for adding aliases to %token.
14636 (struct bucket): Added `alias' field.
14637
14638 * src/reduce.c (reduce_grammar):
14639 Revise error message.
14640 (print_notices): Remove final `.' from error message.
14641
14642 * src/reader.c (reader_output_yylsp):
14643 New function.
14644 (readgram): Use `#if 0' around code that accepted %command
14645 inside grammar rules: The documentation doesn't allow it,
14646 and it will fail since the %command processors scan for the next %.
14647 (parse_token_decl): Extended the %token
14648 declaration to allow a multi-character symbol as an alias.
14649 (parse_thong_decl): New function.
14650 (read_declarations): Added %thong declarations.
14651 (read_declarations): Handle NOOP to deal with allowing
14652 % declarations as another means to specify the flags.
14653 (readgram): Allow %prec prior to semantics embedded in a rule.
14654 (skip_to_char, read_declarations, copy_definition)
14655 (parse_token_decl, parse_start_decl, parse_type_decl)
14656 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
14657 (get_type_name, copy_guard, copy_action, readgram)
14658 (get_type, packsymbols): Revised most error messages.
14659 Changed `fatal' to `warnxxx' to avoid aborting for error.
14660 Revised and use multiple warnxxx functions to avoid using VARARGS1.
14661 (read_declarations): Improve the error message for
14662 an invalid character. Do not abort.
14663 (read_declarations, copy_guard, copy_action): Use
14664 printable_version to avoid unprintable characters in printed output.
14665 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
14666 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
14667 Allow the type of a non-terminal can be given
14668 more than once, as long as all specifications give the same type.
14669
14670 * src/output.c:
14671 (output_headers, output_trailers, output, output_gram)
14672 (output_rule_data): Implement noparserflag variable.
14673 Implement toknumflag variable.
14674 (output): Call reader_output_yylsp to output LTYPESTR.
14675
14676 * src/main.c (main):
14677 If reader sees an error, don't process the grammar.
14678 (fatals): Updated to not use VARARGS1.
14679 (printable_version, int_to_string, warn, warni, warns, warnss)
14680 (warnsss): New error reporting functions. Avoid abort for error.
14681
14682 * src/lex.h:
14683 Added THONG and NOOP for alias processing.
14684 Added SETOPT for the new code that allows setting options with %flags.
14685
14686 * src/lex.c:
14687 Include getopt.h. Add some extern decls.
14688 (safegetc): New function to deal with EOF gracefully.
14689 (literalchar); new function to deal with reading \ escapes.
14690 (lex): Use literalchar.
14691 (lex): Implemented "..." tokens.
14692 (literalchar, lex, parse_percent_token): Made tokenbuffer
14693 always contain the token. This includes growing the token
14694 buffer while reading an integer.
14695 (parse_percent_token): Replaced if-else statement with percent_table.
14696 (parse_percent_token): Added % declarations as another
14697 way to specify the flags -n, -l, and -r. Also added hooks for
14698 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
14699 major changes to files.c.
14700 (lex) Retain in the incoming stream a character following
14701 an incorrect '/'.
14702 (skip_white_space, lex): Revised most error messages
14703 and changed fatal to warn to avoid aborting.
14704 (percent_table): Added %thong declarations.
14705
14706 * src/gram.h: Comment changes.
14707
14708 * src/files.c (openfiles, open_extra_files, done):
14709 Add faction flag
14710 and actfile file. Handle noparserflag. Both for -n switch.
14711
14712 * src/conflicts.c (resolve_sr_conflict):
14713 Remove use of alloca.
14714
147151995-06-01 Jim Meyering <meyering@gnu.org>
14716
14717 * doc/bison.texinfo: *** empty log message ***
14718
147191995-05-06 Richard Stallman <rms@gnu.org>
14720
14721 * src/bison.s1: Comment change.
14722
147231995-05-06 Richard Stallman <rms@gnu.org>
14724
14725 * bison.simple: Comment change.
14726
147271995-05-03 Richard Stallman <rms@gnu.org>
14728
14729 * src/version.c: Version now 1.24.
14730
14731 * src/bison.s1: Change distribution terms.
14732
14733 * src/version.c: Version now 1.23.
14734
147351995-05-03 Richard Stallman <rms@gnu.org>
14736
14737 * doc/bison.texinfo:
14738 Rewrite "Conditions for Using Bison".
14739 Update version to 1.24.
14740
147411995-05-03 Richard Stallman <rms@gnu.org>
14742
14743 * bison.simple: Change distribution terms.
14744
147451995-02-23 Richard Stallman <rms@gnu.org>
14746
14747 * src/files.c: Test __VMS_POSIX as well as VMS.
14748
147491995-02-14 Jim Meyering <meyering@gnu.org>
14750
14751 * src/bison.s1 (__yy_memcpy):
14752 Renamed from __yy_bcopy to avoid
14753 confusion. Reverse FROM and TO arguments to be consistent with
14754 those of memcpy.
14755
147561995-02-14 Jim Meyering <meyering@gnu.org>
14757
14758 * bison.simple (__yy_memcpy):
14759 Renamed from __yy_bcopy to avoid
14760 confusion. Reverse FROM and TO arguments to be consistent with
14761 those of memcpy.
14762
147631994-11-10 David J. MacKenzie <djm@gnu.org>
14764
14765 * NEWS: reformat
14766
14767 * NEWS: New file.
14768
14769 * Makefile.in (DISTFILES): Include NEWS.
14770
14771 * Makefile.in (DISTFILES):
14772 Include install-sh, not install.sh.
14773
14774 * configure.in: Update to Autoconf v2 macro names.
14775
147761994-10-05 David J. MacKenzie <djm@gnu.org>
14777
14778 * Makefile.in: fix typo
14779
14780 * Makefile.in (prefix, exec_prefix):
14781 Let configure set them.
14782
147831994-09-28 David J. MacKenzie <djm@gnu.org>
14784
14785 * Makefile.in: Set datadir to $(prefix)/share.
14786
147871994-09-15 Richard Stallman <rms@gnu.org>
14788
14789 * src/bison.s1:
14790 Update copyright notice and GPL version.
14791
147921994-09-15 Richard Stallman <rms@gnu.org>
14793
14794 * bison.simple:
14795 Update copyright notice and GPL version.
14796
147971994-07-12 Richard Stallman <rms@gnu.org>
14798
14799 * src/reduce.c, src/reader.c:
14800 entered into RCS
14801
148021994-05-05 David J. MacKenzie <djm@gnu.org>
14803
14804 * Makefile.in: entered into RCS
14805
148061994-03-26 Richard Stallman <rms@gnu.org>
14807
14808 * src/bison.s1: entered into RCS
14809
148101994-03-26 Richard Stallman <rms@gnu.org>
14811
14812 * bison.simple: entered into RCS
14813
148141994-03-25 Richard Stallman <rms@gnu.org>
14815
14816 * src/main.c: entered into RCS
14817
148181994-03-24 Richard Stallman <rms@gnu.org>
14819
14820 * src/conflicts.c: entered into RCS
14821
148221994-01-02 Richard Stallman <rms@gnu.org>
14823
14824 * Makefile.in: *** empty log message ***
14825
148261993-11-21 Richard Stallman <rms@gnu.org>
14827
14828 * src/bison.s1: *** empty log message ***
14829
148301993-11-21 Richard Stallman <rms@gnu.org>
14831
14832 * doc/bison.texinfo: entered into RCS
14833
14834 * doc/bison.texinfo: *** empty log message ***
14835
148361993-11-21 Richard Stallman <rms@gnu.org>
14837
14838 * bison.simple: *** empty log message ***
14839
148401993-10-25 David J. MacKenzie <djm@gnu.org>
14841
14842 * doc/bison.texinfo: *** empty log message ***
14843
148441993-10-19 Richard Stallman <rms@gnu.org>
14845
14846 * src/bison.s1: *** empty log message ***
14847
148481993-10-19 Richard Stallman <rms@gnu.org>
14849
14850 * bison.simple: *** empty log message ***
14851
148521993-10-14 Richard Stallman <rms@gnu.org>
14853
14854 * src/bison.s1: *** empty log message ***
14855
148561993-10-14 Richard Stallman <rms@gnu.org>
14857
14858 * bison.simple: *** empty log message ***
14859
148601993-09-14 David J. MacKenzie <djm@gnu.org>
14861
14862 * doc/bison.texinfo: *** empty log message ***
14863
148641993-09-13 Noah Friedman <friedman@gnu.org>
14865
14866 * Makefile.in: *** empty log message ***
14867
148681993-09-10 Richard Stallman <rms@gnu.org>
14869
14870 * src/conflicts.c: *** empty log message ***
14871
14872 * src/system.h: entered into RCS
14873
148741993-09-10 Richard Stallman <rms@gnu.org>
14875
14876 * doc/bison.1: entered into RCS
14877
148781993-09-06 Noah Friedman <friedman@gnu.org>
14879
14880 * src/version.c: entered into RCS
14881
148821993-09-06 Noah Friedman <friedman@gnu.org>
14883
14884 * Makefile.in: *** empty log message ***
14885
148861993-07-30 David J. MacKenzie <djm@gnu.org>
14887
14888 * Makefile.in: *** empty log message ***
14889
148901993-07-24 Richard Stallman <rms@gnu.org>
14891
14892 * src/bison.s1: *** empty log message ***
14893
148941993-07-24 Richard Stallman <rms@gnu.org>
14895
14896 * bison.simple: *** empty log message ***
14897
148981993-07-08 David J. MacKenzie <djm@gnu.org>
14899
14900 * Makefile.in: *** empty log message ***
14901
149021993-07-04 Richard Stallman <rms@gnu.org>
14903
14904 * src/bison.s1: *** empty log message ***
14905
149061993-07-04 Richard Stallman <rms@gnu.org>
14907
14908 * bison.simple: *** empty log message ***
14909
149101993-06-26 David J. MacKenzie <djm@gnu.org>
14911
14912 * src/getargs.c: entered into RCS
14913
149141993-06-26 David J. MacKenzie <djm@gnu.org>
14915
14916 * doc/bison.texinfo: *** empty log message ***
14917
14918 * doc/bison.1: New file.
14919
149201993-06-25 Richard Stallman <rms@gnu.org>
14921
14922 * src/getargs.c: New file.
14923
149241993-06-16 Richard Stallman <rms@gnu.org>
14925
14926 * src/bison.s1: *** empty log message ***
14927
149281993-06-16 Richard Stallman <rms@gnu.org>
14929
14930 * bison.simple: *** empty log message ***
14931
149321993-06-03 Richard Stallman <rms@gnu.org>
14933
14934 * src/bison.s1: New file.
14935
149361993-06-03 Richard Stallman <rms@gnu.org>
14937
14938 * doc/bison.texinfo: *** empty log message ***
14939
149401993-06-03 Richard Stallman <rms@gnu.org>
14941
14942 * bison.simple: New file.
14943
149441993-05-19 Richard Stallman <rms@gnu.org>
14945
14946 * doc/bison.texinfo: New file.
14947
149481993-05-07 Noah Friedman <friedman@gnu.org>
14949
14950 * Makefile.in: *** empty log message ***
14951
149521993-04-28 Noah Friedman <friedman@gnu.org>
14953
14954 * src/reader.c: *** empty log message ***
14955
149561993-04-23 Noah Friedman <friedman@gnu.org>
14957
14958 * src/alloc.h: entered into RCS
14959
149601993-04-20 David J. MacKenzie <djm@gnu.org>
14961
14962 * src/version.c: *** empty log message ***
14963
14964 * src/files.c, src/allocate.c:
14965 entered into RCS
14966
14967 * src/reader.c: *** empty log message ***
14968
14969 * src/lex.c: entered into RCS
14970
14971 * src/conflicts.c: New file.
14972
14973 * src/symtab.c: entered into RCS
14974
14975 * src/alloc.h: New file.
14976
14977 * src/LR0.c: entered into RCS
14978
149791993-04-18 Noah Friedman <friedman@gnu.org>
14980
14981 * src/reader.c: New file.
14982
14983 * src/version.c: *** empty log message ***
14984
149851993-04-18 Noah Friedman <friedman@gnu.org>
14986
14987 * Makefile.in: *** empty log message ***
14988
149891993-04-17 Noah Friedman <friedman@gnu.org>
14990
14991 * Makefile.in: *** empty log message ***
14992
149931993-04-15 Richard Stallman <rms@gnu.org>
14994
14995 * src/main.c, src/files.c:
14996 New file.
14997
149981993-04-15 Noah Friedman <friedman@gnu.org>
14999
15000 * configure.in: entered into RCS
15001
15002 * configure.in: *** empty log message ***
15003
15004 * configure.in: New file.
15005
150061993-04-14 Richard Stallman <rms@gnu.org>
15007
15008 * Makefile.in: New file.
15009
150101993-04-13 Richard Stallman <rms@gnu.org>
15011
15012 * src/version.c: New file.
15013
150141993-03-25 Richard Stallman <rms@gnu.org>
15015
15016 * src/output.c: entered into RCS
15017
150181992-09-25 Richard Stallman <rms@gnu.org>
15019
15020 * configure.bat: entered into RCS
15021
150221992-06-22 Richard Stallman <rms@gnu.org>
15023
15024 * src/vmsgetargs.c: entered into RCS
15025
150261992-06-22 Richard Stallman <rms@gnu.org>
15027
15028 * doc/bison.rnh: entered into RCS
15029
150301992-04-20 David J. MacKenzie <djm@gnu.org>
15031
15032 * README: entered into RCS
15033
150341992-01-22 Richard Stallman <rms@gnu.org>
15035
15036 * src/machine.h: entered into RCS
15037
150381991-12-21 Richard Stallman <rms@gnu.org>
15039
15040 * src/lalr.c, src/closure.c:
15041 entered into RCS
15042
150431991-12-20 Richard Stallman <rms@gnu.org>
15044
15045 * src/state.h: entered into RCS
15046
150471991-12-18 Richard Stallman <rms@gnu.org>
15048
15049 * src/print.c, src/nullable.c, src/derives.c:
15050 entered into RCS
15051
150521991-11-03 David J. MacKenzie <djm@gnu.org>
15053
15054 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
15055 entered into RCS
15056
150571988-09-09 Richard Stallman <rms@gnu.org>
15058
15059 * src/bison.hairy: entered into RCS
15060
150611987-12-16 Richard Stallman <rms@gnu.org>
15062
15063 * REFERENCES: entered into RCS
dc546b0f 15064
f294a2c2 15065
04098407 15066 -----
f294a2c2 15067
04098407
PE
15068 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
15069 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
15070 Foundation, Inc.
f294a2c2 15071
04098407
PE
15072 Copying and distribution of this file, with or without
15073 modification, are permitted provided the copyright notice and this
15074 notice are preserved.