]> git.saurik.com Git - bison.git/blob - ChangeLog
* doc/bison.texinfo (Table of Symbols): Reactivate the
[bison.git] / ChangeLog
1 2003-03-02 Akim Demaille <akim@epita.fr>
2
3 * doc/bison.texinfo (Table of Symbols): Reactivate the
4 documentation for %lex-param, and %parse-param.
5
6 2003-03-02 Akim Demaille <akim@epita.fr>
7
8 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9 generate verbose error messages.
10 Use the number of tokens as an upper bound in yytname, as it
11 cannot be a non terminal.
12
13 2003-03-02 Akim Demaille <akim@epita.fr>
14
15 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
16 message.
17
18 2003-03-02 Akim Demaille <akim@epita.fr>
19
20 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
21 Use them to exercise yycheck overrun.
22 Based on Andrew Suffield's grammar.
23
24 2003-03-02 Akim Demaille <akim@epita.fr>
25
26 Create tests/local.at for Bison generic testing macros.
27
28 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
29 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
30 This new file.
31 * tests/calc.at (AT_CHECK_CALC): Adjust.
32 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
33 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
34 * tests/local.at: here.
35 (AT_COMPILE_CXX): Tags the tests using it as c++.
36 Ignore the test if CXX is not functional.
37
38 2003-03-01 Paul Eggert <eggert@twinsun.com>
39
40 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
41 not loc->end, since loc->end might contain garbage and this leads
42 to undefined behavior on some platforms.
43 (id_loc, token_start): Use (IF_LINTed) initial values that do not
44 depend on *loc, so that the reader doesn't give the the false
45 impression that *loc is initialized.
46 (<INITIAL>"%%"): Do not bother setting code_start, since its value
47 does not survive the return.
48
49 2003-03-01 Akim Demaille <akim@epita.fr>
50
51 * src/scan-gram.l (code_start): Always initialize it when entering
52 into yylex, as SC_EPILOGUE is activated *before* the corresponding
53 yylex invocation. An alternative would be making it static, but
54 then it starts with the second %%'s beginning, instead of its end.
55
56 2003-02-28 Paul Eggert <eggert@twinsun.com>
57
58 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
59 around a UnixWare 7.1.1 porting bug reported by John Hughes in
60 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
61
62 2003-02-26 Paul Eggert <eggert@twinsun.com>
63
64 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
65 Remove Sequent/Pyramid discussion (nobody uses them any more).
66 Merge VMS and MS-DOS discussion; these ports may well be dead
67 but let's keep mentioning them for now. Put <> around email
68 addresses. Add copyright notice.
69
70 2003-02-24 Paul Eggert <eggert@twinsun.com>
71
72 * data/glr.c (yy_reduce_print): yylineno -> yylno,
73 to avoid collision with flex use of yylineno.
74 Problem reported by Bruce Lilly in
75 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
76 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
77 * data/yacc.c (yy_reduce_print): Likewise.
78
79 * config/depcomp: Sync with Automake 1.7.3.
80
81 2003-02-21 Akim Demaille <akim@epita.fr>
82
83 * data/lalr1.cc: Use temporary variables instead of casts to
84 change integer types.
85 Suggested by Paul Eggert.
86
87 2003-02-21 Akim Demaille <akim@epita.fr>
88
89 * doc/bison.texinfo: Use "location" consistently to refer to @n,
90 to avoid confusions with lalr1.cc's notion of Position.
91 Suggested by Paul Eggert.
92
93 2003-02-20 Akim Demaille <akim@epita.fr>
94
95 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
96 before initial_columns.
97 (location.hh): Use consistent variable names when defining the
98 operator<<.
99 Use "last" so that we subtract from Positions, not from unsigned.
100
101 2003-02-20 Akim Demaille <akim@epita.fr>
102
103 * data/lalr1.cc (position.hh): New subfile, including the extended
104 and Doxygen'ed documentation of class Position.
105 (location.hh): Use it.
106 Document a` la Doxygen.
107 With the help of Benoit Perrot.
108
109 2003-02-20 Akim Demaille <akim@epita.fr>
110
111 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
112 AT_YACC_IF.
113 Redefine AT_YYERROR_SEES_LOC_IF using it.
114 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
115 not defined.
116 Don't use the location in yy::Parser::error_ and
117 yy::Parser::print_ when not %locations.
118 Activate more lalr1.cc tests.
119
120 2003-02-19 Akim Demaille <akim@epita.fr>
121
122 * data/lalr1.cc: When displaying a line number, be sure to make it
123 an int.
124
125 2003-02-19 Akim Demaille <akim@epita.fr>
126
127 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
128 Remove, useless.
129 (YYABORT, YYACCEPT, YYERROR): New.
130 * tests/calc.at: Renable the lalr1.cc test.
131
132 2003-02-19 Akim Demaille <akim@epita.fr>
133
134 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
135 error recovery, mixing with/without pops and discarding of the
136 lookahead.
137 Exercise YYERROR.
138 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
139
140 2003-02-17 Paul Eggert <eggert@twinsun.com>
141
142 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
143 * tests/testsuite.at (AT_COMPILE): Use them.
144 This fixes the testsuite problem reported by Robert Lentz in
145 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
146
147 2003-02-12 Paul Eggert <eggert@twinsun.com>
148
149 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
150 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
151 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
152 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
153 Check for malloc failure, for consistency with yacc.c.
154 (yytname_size): Remove, for consistency with yacc.c.
155
156 The bug still remains in data/lalr1.cc, as I didn't have time
157 to fix it there.
158
159 2003-02-06 Akim Demaille <akim@epita.fr>
160
161 * configure.ac (GXX): Rename as...
162 (CXX): this, to keep the original Autoconf semantics.
163 Require 2.57.
164 * data/lalr1.cc: Fix b4_copyright invocations.
165 If YYDEBUG is not defined, don't depend upon name_ being defined.
166 (location.hh): Include string and iostream.
167 (Position::filename): New member.
168 (Position::Position ()): New.
169 (operator<< (Position)): New.
170 (operator- (Position, int)): New.
171 (Location::first, Location::last): Rename as...
172 (Location::begin, Location::end): these, to mock the conventional
173 iterator names.
174 (operator<< (Location)): New.
175 * tests/atlocal.in (CXX): New.
176 * tests/testsuite.at (AT_COMPILE_CXX): New.
177 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
178 locations in a more synthetic way.
179 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
180 lalr1.cc is used.
181 Adjust the C locations to match those from Emacs: first column is
182 column 0.
183 Change all the expected results.
184 Conform to the GCS: simplify the locations when applicable.
185 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
186 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
187 these CPP macros with the m4 macros new defined by...
188 (AT_CHECK_PUSHDEFS): this, i.e.:
189 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
190 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
191 New macros.
192 (AT_CHECK_POPDEFS): Undefine them.
193 (AT_CHECK_CALC_LALR1_CC): New.
194 Use it for the first lalr1.cc test.
195
196 2003-02-04 Akim Demaille <akim@epita.fr>
197
198 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
199 Location as is defined.
200
201 2003-02-04 Akim Demaille <akim@epita.fr>
202
203 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
204 name_ being defined.
205
206 2003-02-03 Paul Eggert <eggert@twinsun.com>
207
208 * src/gram.h (start_symbol): Remove unused decl.
209
210 Use more-consistent naming conventions for local vars.
211
212 * src/derives.c (derives_compute): Change type of local var from
213 int to rule_number.
214 * src/gram.c (grammar_rules_partial_print): Likewise.
215 * src/print.c (print_core): Likewise.
216 * src/reduce.c (reduce_grammar_tables): Likewise.
217
218 * src/gram.c (grammar_dump): Change name of item_number *
219 local var from r to rp.
220 * src/nullable.c (nullable_compute): Likewise.
221
222 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
223
224 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
225 for symbol or symbol_number var.
226 * src/reader.c (grammar_start_symbol_set): Likewise.
227 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
228 Likewise.
229 * src/state.c (transitions_to): Likewise.
230 * src/state.h: Likewise.
231 * src/tables.c (symbol_number_to_vector_number): Likewise.
232
233 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
234 char * var.
235
236 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
237 var.
238
239 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
240 var.
241
242 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
243 Use str, not s, for char * var. Use ch, not c, for character var.
244 Use size for size var.
245
246 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
247 char * var.
248 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
249 uniqstr var.
250 * src/uniqstr.h: Likewise.
251
252 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
253 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
254 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
255 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
256 param to have same name as that of enum, so that we don't use
257 "s" to stand for a non-state.
258
259 2003-02-02 Akim Demaille <akim@epita.fr>
260
261 * src/scan-skel.l: Scan more than one inert character per yylex
262 invocation.
263
264 2003-02-01 Paul Eggert <eggert@twinsun.com>
265
266 Version 1.875a.
267
268 * po/LINGUAS: Add ms.
269
270 2003-01-30 Akim Demaille <akim@epita.fr>
271
272 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
273
274 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
275
276 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
277 of $1.
278
279 Changes in response to error report by S. Eken: GLR mode does not
280 handle negative $ indices or $ indices in embedded rules correctly.
281 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
282
283 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
284 (b4_rhs_location): Ditto.
285 (yyfill): New function to copy from stack tree into array
286 incrementally.
287 (yyuserAction): Modify to allow incremental move of semantic values
288 to rhs array when in GLR mode.
289 Define YYFILL to use in user-defined actions to fill semantic array
290 as needed.
291 Remove dummy use of yystack, as there is now a guaranteed use.
292 (yydoAction): Modify to allow incremental move of semantic values
293 to rhs array when in GLR mode.
294 (yyresolveAction): Ditto.
295 (yyglrShiftDefer): Update comment.
296 (yyresolveStates): Use X == NULL for pointers, not !X.
297 (yyglrReduce): Ditto.
298 (yydoAction): Ditto
299
300 * tests/glr-regr1.at: Rename to ...
301 * tests/glr-regression.at: Add new regression test for the problems
302 described above (adapted from S. Eken).
303 Update copyright notice.
304 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
305 * tests/Makefile.am: Ditto.
306
307 2003-01-28 Paul Eggert <eggert@twinsun.com>
308
309 * data/lalr1.cc: Do not use @output_header_name@ unless
310 b4_defines_flag is set. This fixes two bugs reported by
311 Tim Van Holder in
312 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
313 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
314
315 2003-01-21 Paul Eggert <eggert@twinsun.com>
316
317 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
318 we don't need to worry about yyerrlab1 being reported as an
319 "unused label" by non-GCC C compilers. The downside is that if
320 locations are used then a couple of statements are duplicated each
321 time YYERROR is invoked, but the upside is that the warnings
322 should vanish.
323 (yyerrlab1): Move code to YERROR.
324 (yyerrlab2): Remove. Change uses back to yyerrlab1.
325 This reverts some of the 2002-12-27 change.
326
327 2003-01-17 Paul Eggert <eggert@twinsun.com>
328
329 * src/output.c (symbol_printers_output): Fix typo that led
330 to core dump. Problem reported by Antonio Rus in
331 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
332
333 2003-01-13 Akim Demaille <akim@epita.fr>,
334 Quoc Peyrot <chojin@lrde.epita.fr>,
335 Robert Anisko <anisko_r@lrde.epita.fr>
336
337 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
338 when the stacks contain one element, as the loop would otherwise
339 free the last state, and then use the top state (the one we just
340 popped). This means that the initial elements will not be freed
341 explicitly, as is the case in yacc.c; it is not a problem, as
342 these elements have fake values.
343
344 2003-01-11 Paul Eggert <eggert@twinsun.com>
345
346 * NEWS: %expect-violations are now just warnings, reverting
347 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
348 bootstrapping problem reported by Matthias Klose; see
349 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
350 * src/conflicts.c (conflicts_print): Likewise.
351 * tests/conflicts.at (%expect not enough, %expect too much,
352 %expect with reduce conflicts): Likewise.
353 * doc/bison.texinfo (Expect Decl): Document this. Also mention
354 that the warning is enabled if the number of conflicts changes
355 (not necessarily increases).
356
357 * src/getargs.c (version): Update copyright year.
358
359 2003-01-09 Akim Demaille <akim@epita.fr>
360
361 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
362
363 2003-01-08 Paul Eggert <eggert@twinsun.com>
364
365 * Makefile.maint (WGETFLAGS):
366 New macro, containing "-C off" to disable proxy caches.
367 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
368 (rel-check): Use $(WGET) instead of wget.
369
370 2003-01-06 Paul Eggert <eggert@twinsun.com>
371
372 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
373 the GLR paper of Scott, Johnstone and Hussain.
374
375 2003-01-04 Paul Eggert <eggert@twinsun.com>
376
377 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
378 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
379 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
380 (EXTRA_LIBRARIES): New var, for liby.a.
381 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
382 (EXTRA_SCRIPTS): New var, for yacc.
383
384 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
385 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
386 Problem reported by Nelson H. F. Beebe.
387
388 2003-01-03 Paul Eggert <eggert@twinsun.com>
389
390 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
391 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
392 when compiling Bison 1.875's `bitset bset = obstack_alloc
393 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
394
395 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
396 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
397 grow to a huge size with typical invocation.
398
399 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
400 Use the pattern recommended by Autoconf 2.57, except also protect
401 against double-definition.
402 * src/system.h: Likewise.
403 Portability issues reported by Nelson H. F. Beebe.
404
405 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
406 All uses changed. Provide a definition in both C and C++.
407 (yytrue, yyfalse): Define even if defined (__cplusplus).
408
409 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
410 Reported by Nelson H. F. Beebe.
411
412 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
413
414 2003-01-02 Paul Eggert <eggert@twinsun.com>
415
416 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
417 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
418 Bug reported by Nelson H. F. Beebe.
419
420 2003-01-01 Paul Eggert <eggert@twinsun.com>
421
422 * Version 1.875.
423
424 2002-12-30 Paul Eggert <eggert@twinsun.com>
425
426 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
427 Moved here from...
428 (<INITIAL>","): Here. This causes stray "," to be treated
429 more uniformly.
430
431 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
432 last brace in braced code when not in Yacc mode, for compatibility
433 with Bison 1.35. This resurrects the 2001-12-15 patch to
434 src/reader.c.
435
436 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
437 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
438
439 2002-12-28 Paul Eggert <eggert@twinsun.com>
440
441 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
442 that of SYM's type. This fixes Debian bug 168069, reported by
443 Thomas Olsson.
444
445 2002-12-28 Paul Eggert <eggert@twinsun.com>
446
447 Version 1.75f.
448
449 Switch back to the Yacc style of conflict reports, undoing some
450 of the 2002-07-30 change.
451 * doc/bison.texinfo (Understanding): Use Yacc style for
452 conflict reports. Also, use new way of locating rules.
453 * src/conflicts.c (conflict_report):
454 Renamed from conflict_report_yacc, removing the old
455 'conflict_report'. Translate the entire conflict report at once,
456 so that we don't assume that "," has the same interpretation in
457 all languages.
458 (conflicts_output): Use Yacc-style conflict report for each state,
459 instead of our more-complicated style.
460 (conflicts_print): Use Yacc-style conflict report, except print
461 the input file name when not emulating Yacc.
462 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
463 Conflicted Reduction, %expect not enough, %expect too much,
464 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
465 * tests/existing.at (GNU Cim Grammar): Likewise.
466 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
467
468 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
469 fatal): Don't invoke fflush; it's not needed and it might even be
470 harmful for stdout, as stdout might not be open.
471 * src/reduce.c (reduce_print): Likewise.
472
473 2002-12-27 Paul Eggert <eggert@twinsun.com>
474
475 Fix a bug where error locations were not being recorded correctly.
476 This problem was originally reported by Paul Hilfinger in
477 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
478
479 * data/yacc.c (yyparse): New local var yylerrsp, to record the
480 top of the location stack's error locations.
481 (yyerrlab): Set it. When discarding a token, push its location
482 onto yylerrsp so that we don't lose track of the error's end.
483 (yyerrlab1): Now is only the target of YYERROR, so that we can
484 properly record the location of the action that failed. For GCC
485 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
486 GCC warning about yyerrlab1 being unused if YYERROR is unused.
487 (yyerrlab2): New label, which yyerrlab now falls through to.
488 Compute the error's location by applying YYLLOC_DEFAULT to
489 the locations of all the symbols that went into the error.
490 * doc/bison.texinfo (Location Default Action): Mention that
491 YYLLOC_DEFAULT is also invoked for syntax errors.
492 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
493 Error locations include the locations of all the tokens that were
494 discarded, not just the last token.
495
496 2002-12-26 Paul Eggert <eggert@twinsun.com>
497
498 * src/files.c: Include quote.h.
499 (compute_output_file_names): Warn if we detect conflicting
500 outputs to the same file. This should catch the misunderstanding
501 exemplified by Debian Bug 165349, reported by Bruce Stephens..
502
503 * src/conflicts.c (conflicts_print): If the user specifies
504 "%expect N", report an error if there are any reduce/reduce
505 conflicts. This is what the manual says should happen.
506 This fixes Debian bug 130890, reported by Anthony DeRobertis.
507 * tests/conflicts.at (%expect with reduce conflicts): New test.
508
509 Don't use m4_include on relative file names, as it doesn't work as
510 desired if there happens to be a file with that name under ".".
511
512 * m4sugar/version.m4: Remove; it was included but it wasn't used.
513 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
514 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
515 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
516 * src/output.c (output_skeleton): Use full path names when
517 specifying a file to include; don't rely on include path, as
518 it's unreliable when the working file contains a file with
519 that name.
520
521 2002-12-25 Paul Eggert <eggert@twinsun.com>
522
523 Remove obsolete references to bison.simple and bison.hairy.
524 Problem mentioned by Aubin Mahe in
525 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
526 * data/glr.c: Comment fix.
527 * doc/bison.1: Remove references. Also, mention "yacc".
528
529 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
530 with -g option.
531
532 * src/parse-gram.y (declaration): Use enum "report_states" rather
533 than its numeric value 1.
534
535 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
536 opening a new one. This fixes Debian bug 165349, reported by
537 Bruce Stephens.
538
539 2002-12-24 Paul Eggert <eggert@twinsun.com>
540
541 Version 1.75e.
542
543 * Makefile.maint (cvs-update): Don't assume that the shell
544 supports $(...), as Solaris sh doesn't.
545
546 * src/parse-gram.y (lloc_default): Remove test for empty
547 nonterminals at the end, since it didn't change the result.
548
549 2002-12-24 Paul Eggert <eggert@twinsun.com>
550
551 If the user does not define YYSTYPE as a macro, Bison now declares it
552 using typedef instead of defining it as a macro. POSIX requires this.
553 For consistency, YYLTYPE is also declared instead of defined.
554
555 %union directives can now have a tag before the `{', e.g., the
556 directive `%union foo {...}' now generates the C code
557 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
558 The default union tag is `YYSTYPE', for compatibility with Solaris 9
559 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
560 instead of `yyltype'.
561
562 `yystype' and `yyltype' are now obsolescent macros instead of being
563 typedefs or tags; they are no longer documented and will be
564 withdrawn in a future release.
565
566 * data/glr.c (b4_location_type): Remove.
567 (YYSTYPE): Renamed from yystype.
568 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
569 (struct YYLTYPE): Renamed from struct yyltype.
570 (YYLTYPE): Renamed from yyltype.
571 (yyltype, yystype): New (and obsolescent) macros,
572 for backward compatibility.
573 * data/yacc.c: Likewise.
574
575 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
576 does not specify a union tag. This is for compatibility with
577 Solaris 9 yacc.
578
579 * src/parse-gram.y (add_param): 2nd arg is now char * not char
580 const *, since it is now modified by stripping surrounding { }.
581 (current_braced_code): Remove.
582 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
583 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
584 trailing " {...}". Now of type <chars>.
585 (grammar_declaration): Adjust to bundled tokens.
586 (code_content): Remove; stripping is now done by add_param.
587 (print_token_value): Print contents of bundled tokens.
588 (token_name): New function.
589
590 * src/reader.h (braced_code, current_braced_code): Remove.
591 (token_name): New decl.
592
593 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
594 token_type, not braced_code code_kind. All uses changed.
595 (SC_PRE_CODE): New state, for scanning after a keyword that
596 has (or usually has) an immediately-following braced code.
597 (token_type): New local var, to keep track of which token type
598 to return when scanning braced code.
599 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
600 <INITIAL>"%parse-param", <INITIAL>"%printer",
601 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
602 instead of returning a token type immediately.
603 (<INITIAL>"{"): Set token type.
604 (<SC_BRACED_CODE>"}"): Use it.
605 (handle_action_dollar, handle_action_at): Now returns bool
606 indicating success. Fail if ! current_rule; this prevents a core dump.
607 (handle_symbol_code_dollar, handle_symbol_code_at):
608 Remove; merge body into caller.
609 (handle_dollar, handle_at): Complain in invalid contexts.
610
611 * NEWS, doc/bison.texinfo: Document the above.
612 * NEWS: Fix years and program names in copyright notice.
613
614 2002-12-17 Paul Eggert <eggert@twinsun.com>
615
616 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
617 Reporting, Table of Symbols): Omit mentions of %lex-param and
618 %parse-param from the documentation for now.
619
620 2002-12-15 Paul Eggert <eggert@twinsun.com>
621
622 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
623 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
624 lookahead symbol, and which sets yychar in parser actions) and it
625 disagreed with the Bison documentation. Bug
626 reported by Andrew Walrond.
627
628 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
629 as the caller now does that.
630 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
631 (YYEMPTY): Parenthesize right hand side, since others use it.
632 (yyparse): Don't assume that our generated code is the only code
633 that sets yychar.
634
635 2002-12-13 Paul Eggert <eggert@twinsun.com>
636
637 Version 1.75d.
638
639 POSIX requires a "yacc" command.
640 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
641 (MOSTLYCLEANFILES): Add yacc.
642 (yacc): New rule.
643 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
644 as an alias for bison y.
645
646 * po/LINGUAS: Add da.
647
648 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
649 problem with latest <getopt.h>.
650 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
651
652 * doc/fdl.texi: Upgrade to 1.2.
653 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
654 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
655 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
656 gnulib.
657 * config/install-sh: Sync with autotools.
658
659 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
660 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
661 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
662 locations are requested.
663 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
664 locations are requested.
665
666 2002-12-12 Paul Eggert <eggert@twinsun.com>
667
668 Remove unportable casts and storage allocation tricks.
669 While we're at it, remove almost all casts, since they
670 usually aren't needed and are a sign of trouble.
671
672 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
673
674 * src/derives.c (derives_compute): Do not subtract NTOKENS from
675 the pointer DSET returned by malloc; this isn't portable.
676 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
677 Similarly for DERIVES.
678 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
679 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
680 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
681
682 * src/derives.c (derives_compute): Do not bother invoking
683 int_of_rule_number, since rule numbers are integers.
684
685 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
686 rather than XMALLOC (char, N).
687
688 * src/files.c (filename_split): Rewrite to avoid cast.
689
690 * src/gram.h (symbol_number_as_item_number,
691 item_number_as_symbol_number, rule_number_as_item_number,
692 item_number_as_rule_number):
693 Now inline functions rather than macros, to avoid casts.
694 * src/state.h (state_number_as_int): Likewise.
695 * src/tables.c (state_number_to_vector_number,
696 symbol_number_to_vector_number): Likewise.
697
698 * src/gram.h (int_of_rule_number): Remove; no longer used.
699
700 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
701 since the resulting storage is always stored into.
702
703 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
704 where it's needed.
705
706 * src/muscle_tab.c (muscle_m4_output):
707 Now inline. Return bool, not int.
708 * src/state.c (state_compare): Likewise.
709 * src/symtab.c (symbol_check_defined,
710 symbol_check_alias_consistency, symbol_pack, symbol_translation,
711 hash_compare_symbol, hash_symbol):
712 Likewise.
713 * src/uniqstr.c (uniqstr_print): Likewise.
714 * src/muscle_tab.c (muscle_m4_output_processor):
715 New function, to avoid casts.
716 * src/state.c (state_comparator, stage_hasher): Likewise.
717 * src/symtab.c (symbol_check_defined_processor,
718 symbol_check_alias_consistency_processor, symbol_pack_processor,
719 symbol_translation_processor, hash_symbol_comparator,
720 hash_symbol_hasher): Likewise.
721 * src/uniqstr.c (uniqstr_print_processor): Likewise.
722 * src/muscle_tab.c (muscles_m4_output):
723 Use new functions instead of casting old functions unportably.
724 * src/state.c (state_hash_new): Likewise.
725 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
726 symbols_token_translations_init):
727 Likewise.
728 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
729
730 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
731 var instead of casting to long, to avoid casts.
732 (prepare_states): Use MALLOC rather than alloca, so that we don't
733 have to worry about alloca.
734 * src/state.c (state_hash_lookup): Likewise.
735
736 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
737 local var instead of casting to unsigned char, to avoid casts.
738
739 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
740 STATE_ALLOC): Remove.
741 (transitions_new, errs_new, reductions_new, state_new): Use malloc
742 rather than calloc, and use offsetof to avoid allocating slightly
743 too much storage.
744 (state_new): Initialize all members.
745
746 * src/state.c (state_hash): Use unsigned accumulator, not signed.
747
748 * src/symtab.c (symbol_free): Remove; unused.
749 (symbol_get): Remove cast in lhs of assignment.
750 (symbols_do): Now static. Accept generic arguments, not
751 hashing-related ones.
752
753 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
754 (symbol_processor): Remove.
755 (symbols_do): Remove decl; now static.
756
757 * src/system.h (alloca): Remove; decl no longer needed.
758 (<stddef.h>): Include, for offsetof.
759 (<inttypes.>, <stdint.h>): Include if available.
760 (uintptr_t): New type, if system lacks it.
761 (CALLOC, MALLOC, REALLOC): New macros.
762 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
763 new macros.
764
765 * src/tables.c (table_size): Now int, to pacify GCC.
766 (table_grow, table_ninf_remap): Use signed table size.
767 (save_row): Don't bother initializing locals when not needed.
768 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
769 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
770
771 * src/vcg.h: Correct misspellings.
772
773 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
774
775
776 * src/getargs.c (getargs): Don't assume EOF == -1.
777
778 2002-12-09 Paul Eggert <eggert@twinsun.com>
779
780 Change identifier spellings to avoid collisions with names
781 that are reserved by POSIX.
782
783 Don't use names ending in _t, since POSIX reserves them.
784 For consistency, remove _e and _s endings -- they're weren't
785 needed to remove ambiguity. All uses changed.
786 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
787 turn was just renamed from struniq_t.
788 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
789 which in turn was just renamed from struniq_processor_t.
790 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
791 in turn was renamed from hash_compare_struniq_t.
792 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
793 (state_list): Renamed from state_list_t.
794 * src/assoc.h (assoc): Renamed from assoc_t.
795 * src/conflicts.c (enum conflict_resolution): Renamed from
796 enum conflict_resolution_e.
797 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
798 (rule_list): Renamed from rule_list_t.
799 * src/getargs.h (enum trace): Renamed from enum trace_e.
800 (enum report): Renamed from enum report_e.
801 * src/gram.h (item_number): Renamed from item_number_t.
802 (rule_number): Renamed from rule_number_t.
803 (struct rule_s): Remove the "rule_s" part; not used.
804 (rule): Renamed from rule_t.
805 (rule_filter): Renamed from rule_filter_t.
806 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
807 (goto_list): Renamed from goto_list_t.
808 * src/lalr.h (goto_number): Renamed from goto_number_t.
809 * src/location.h (location): Renamed from location_t.
810 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
811 and moved here from:
812 * src/muscle_tab.h (muscle_entry_t): here.
813 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
814 (rule_list): Renamed from rule_list_t.
815 * src/print_graph.c (static_graph): Renamed from graph.
816 * src/reader.h (braced_code): Renamed from braced_code_t.
817 Remove brace_code_e tag.
818 * src/relation.h (relation_node): Renamed from relation_node_t.
819 (relation_nodes): Renamed from relation_nodes_t.
820 (relation): Renamed from relation_t.
821 * src/state.h (state_number): Renamed from state_number_t.
822 (struct state): Renamed from struct state_s.
823 (state): Renamed from state_t.
824 (transitions): Renamed from transitions_t. Unused (and
825 misspelled) transtion_s tag removed.
826 (errs): Renamed from errs_t. Unused errs_s tag removed.
827 (reductions): Renamed from reductions_t. Unused tag
828 reductions_s removed.
829 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
830 (struct symbol_list): Renamed from struct symbol_list_s.
831 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
832 (struct symbol): Renamed from struct symbol_s.
833 (symbol): Renamed from symbol_t.
834 * src/tables.c (vector_number): Renamed from vector_number_t.
835 (action_number): Renamed from action_t.
836 * src/tables.h (base_number): Renamed from base_t.
837 * src/vcg.h (enum color): Renamed from enum color_e.
838 (enum textmode): Renamed from enum textmode_e.
839 (enum shape): Renamed from enum shape_e.
840 (struct colorentry): Renamed from struct colorentry_s.
841 (struct classname): Renamed from struct classname_s.
842 (struct infoname): Renamed from struct infoname_s.
843 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
844 (enum decision): Renamed from enum decision_e.
845 (enum orientation): Renamed from enum orientation_e.
846 (enum alignment): Renamed from enum alignment_e.
847 (enum arrow_mode): Renamed from enum arrow_mode_e.
848 (enum crossing_type): Renamed from enum crossing_type_e.
849 (enum view): Renamed from enum view_e.
850 (struct node): Renamed from struct node_s.
851 (node): Renamed from node_t.
852 (enum linestyle): Renamed from enum linestyle_e.
853 (enum arrowstyle): Renamed from enum arrowstyle_e.
854 (struct edge): Renamed from struct edge.
855 (edge): Renamed from edge_t.
856 (struct graph): Renamed from struct graph_s.
857 (graph): Renamed from graph_t.
858 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
859 Rename value_t -> value.
860 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
861 value_t_as_yystype -> value_as_yystype.
862
863 Don't include <errno.h> in the mainstream code, since it
864 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
865 * lib/get-errno.c, lib/get-errno.h: New files.
866 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
867 get-errno.c.
868 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
869 * src/output.c (output_skeleton): Likewise.
870 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
871 instead of errno.
872 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
873 Likewise.
874 (handle_action_dollar, handle_action_at): Likewise.
875 * src/system.h: Do not include <errno.h>.
876 (TAB_EXT): Renamed from EXT_TAB.
877 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
878
879 Avoid str[a-z]*, since <string.h> reserves that name space.
880 Change all instances of "struniq" in names to "uniqstr", and
881 likewise for "STRUNIQ" and "UNIQSTR".
882 * src/uniqstr.c: Renamed from src/struniq.c.
883 * src/uniqstr.h: Renamed from src/struniq.h.
884 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
885 * src/files.c (strsuffix): Remove; unused.
886 (concat2): Renamed from stringappend. Now static.
887 * src/files.h (strsuffix, stringappend): Remove; unused.
888 * src/parse-gram.y (<chars>): Renamed from <string>.
889 (<uniqstr>): Renamed from <struniq>.
890 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
891 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
892 (struct graph_s.expand): Renamed from struct graph_s.stretch.
893 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
894 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
895 (N_EXPAND): Renamed from N_STRETCH.
896
897 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
898 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
899 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
900 Remove; unused.
901 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
902 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
903 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
904 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
905 (BASE_MAXIMUM): Renamed from BASE_MAX.
906 (BASE_MINIMUM): Renamed from BASE_MIN.
907 (ACTION_MAX): Remove; unused.
908 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
909 Unnecessary casts removed from above defines.
910
911
912 Fix misspelling in names.
913 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
914 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
915 G_NODE_ALIGNEMENT.
916
917
918 * lib/timevar.c (timevar_report): Renamed from time_report,
919 for consistency with other names.
920 * lib/timevar.h (timevar_report): New decl.
921 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
922
923
924 Sort include-file uses.
925
926 Reorder all include files under src to be in the order "system.h".
927 then the ../lib include files in angle brackets (alphabetized),
928 then the . include files in double-quotes (alphabetized). Fix
929 dependency breakages encountered in this process, as follows:
930 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
931 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
932 * src/state.h: Include "symtab.h".
933
934 2002-12-08 Paul Eggert <eggert@twinsun.com>
935
936 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
937 since this causes problems when __file__ contains character
938 sequences like "@" that are treated specially by src/scan-skel.l.
939 Instead, just use the file's basename. This fixes the bug
940 reported by Martin Mokrejs in
941 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
942
943 2002-12-06 Paul Eggert <eggert@twinsun.com>
944
945 Add support for rules that do not have trailing semicolons, as
946 POSIX requires. Improve the quality of locations in Bison
947 diagnostics.
948
949 * src/location.c: Include <quotearg.h>.
950 (empty_location): Now const.
951 (location_print): New function. Follow the recommendation of the
952 GNU Coding Standards for locations that span file boundaries.
953 * src/location.h: Do not include <quotearg.h>; no longer needed.
954 (boundary): New type.
955 (location_t): Use it. This allows locations to span file boundaries.
956 All member uses changed: file -> start.file or end.file (as needed),
957 first_line -> start.line, first_column -> start.column,
958 last_line -> end.line, last_column -> end.column.
959 (equal_boundaries): New function.
960 (LOCATION_RESET, LOCATION_STEP): Remove.
961 (LOCATION_PRINT): Remove. All callers changed to use location_print.
962 (empty_location): Now const.
963 (location_print): New decl.
964 * src/parse-gram.y (lloc_default): New function, which handles
965 empty locations more accurately.
966 (YYLLOC_DEFAULT): Use it.
967 (%token COLON): Remove.
968 (%token ID_COLON): New token.
969 (rules): Use it.
970 (declarations, rules): Remove trailing semicolon.
971 (declaration, rules_or_grammar_declaration):
972 Allow empty (";") declaration.
973 (symbol_def): Remove empty actions; no longer needed.
974 (rules_or_grammar_declaration): Remove trailing semicolon.
975 (semi_colon.opt): Remove.
976 * src/reader.h: Include location.h.
977 (scanner_cursor): New decl.
978 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
979 rolling our own.
980 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
981 of *loc.
982 (STEP): Remove. No longer needed, now that adjust_location does
983 the work. All uses removed.
984 (scanner_cursor): New var.
985 (adjust_location): Renamed from extend_location. It now sets
986 *loc and adjusts the scanner cursor. All uses changed.
987 Don't bother testing for CR.
988 (handle_syncline): Remove location arg; now updates scanner cursor.
989 All callers changed.
990 (unexpected_end_of_file): Now accepts start boundary of token or
991 comment, not location. All callers changed. Update scanner cursor,
992 not the location.
993 (SC_AFTER_IDENTIFIER): New state.
994 (context_state): Renamed from c_context. All uses changed.
995 (id_loc, code_start, token_start): New local vars.
996 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
997 processing of Yacc white space and equivalents here.
998 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
999 instead of returning ID immediately, since we need to search for
1000 a subsequent colon.
1001 (<INITIAL>"'", "\""): Save token_start.
1002 (<INITIAL>"%{", "{", "%%"): Save code_start.
1003 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1004 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1005 BEGIN context_state at end, not INITIAL.
1006 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1007 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1008 Return correct token start.
1009 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1010 the start of a character, string or multiline comment is found.
1011 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1012 Reduction): Adjust reported locations to match the more-precise
1013 results now expected.
1014 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1015 * tests/reduce.at (Useless Rules, Reduced Automaton,
1016 Underivable Rules): Likewise.
1017 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1018 or "|"' now that so many other tokens are allowed by the new grammar.
1019
1020 * src/complain.h (current_file): Remove duplicate decl;
1021 current_file is now owned by files.h.
1022 * src/complain.c, src/scan-gram.l: Include files.h.
1023
1024 2002-12-06 Paul Eggert <eggert@twinsun.com>
1025
1026 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1027 promotes to int; it might be unsigned int.
1028 * data/yacc.c (yy_reduce_print): Likewise.
1029
1030 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1031 be #defined in the prologue, not in the Bison declarations.
1032 This fixes Debian Bug 102878, reported by Shaul Karl.
1033
1034 2002-12-02 Paul Eggert <eggert@twinsun.com>
1035
1036 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1037 * lib/strtoul.c: New file, from gnulib.
1038 This fixes a porting bug reported by Peter Klein in
1039 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1040
1041 2002-11-30 Paul Eggert <eggert@twinsun.com>
1042
1043 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1044 and put only a forward declaration in the prologue. This is for
1045 consistency with the other scanner helper functions.
1046
1047 Type clashes now generate warnings, not errors, since it
1048 appears that POSIX may allow some grammars with type clashes.
1049 * src/reader.c (grammar_current_rule_check): Warn about
1050 type clashes instead of complaining.
1051 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1052
1053 Add Yacc library, since POSIX requires it.
1054 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1055 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1056 * lib/main.c, lib/yyerror.c: New files.
1057
1058 gram_error can be static; it need not be extern.
1059 * src/reader.h (gram_error): Remove decl.
1060 * src/parse-gram.y (gram_error): Now static. Add static decl.
1061 (print_token_value): Omit parameter names from forward decl,
1062 for consistency.
1063
1064 2002-11-29 Paul Eggert <eggert@twinsun.com>
1065
1066 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1067 be declared before being used. E.g., one should typically
1068 declare them in the prologue. Use GNU coding style in examples.
1069 Put "const" consistently after the type it modifies. Mention
1070 that C99 supports "inline". Mention that yyerror traditionally
1071 returns "int".
1072
1073 %parse-param and %lex-param now take just one argument, the
1074 declaration; the argument name is deduced from the declaration.
1075
1076 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1077 Reporting, Table of Symbols): Document this.
1078 * src/parse-gram.y (add_param): New function.
1079 (COMMA): Remove.
1080 (declaration): Implement new rule for %parse-param and %lex-param.
1081 * src/scan-gram.l: "," now elicits a warning, rather than being
1082 a token; this is more compatible with byacc.
1083 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1084
1085 2002-11-27 Paul Eggert <eggert@twinsun.com>
1086
1087 Rename identifiers to avoid real and potential collisions.
1088
1089 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1090 to avoid collision with lex macro described by Bruce Lilly in
1091 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1092 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1093 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1094 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1095 All uses changed.
1096 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1097 The name "yycontrol" violates the name space rules, and this stuff
1098 wasn't being used anyway.
1099 (input): Remove action; this stuff wasn't being used.
1100 (gram_error): Rename local variable yylloc -> loc.
1101 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1102 (YY_DECL): Don't use "yy" at start of local variables.
1103 All uses changed, e.g., yylloc -> loc.
1104 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1105 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1106 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1107 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1108
1109 * src/parse-gram.y (gram_error): loc is now const *.
1110 * src/reader.h (gram_error): Likewise.
1111
1112 2002-11-24 Paul Eggert <eggert@twinsun.com>
1113
1114 Version 1.75c.
1115
1116 * tests/actions.at (Actions after errors): Use an output format
1117 more similar to that of the Printers and Destructors test.
1118 Test the position of the ';' token too.
1119 (Printers and Destructors): Likewise.
1120 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1121 unnecessarily alarming people when the test fails.
1122
1123 * data/yacc.c (yyerrlab1): Move this label down, so that the
1124 parser does not discard the lookahead token if the user code
1125 invokes YYERROR. This change is required for POSIX conformance.
1126
1127 * lib/error.c: Sync with gnulib.
1128
1129 2002-11-22 Paul Eggert <eggert@twinsun.com>
1130
1131 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1132 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1133 * lib/xmalloc.c: Likewise.
1134
1135 2002-11-20 Paul Eggert <eggert@twinsun.com>
1136
1137 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1138
1139 2002-11-20 Paul Eggert <eggert@twinsun.com>
1140
1141 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1142 should use `if (! x) abort ();' rather than `assert (x);', and
1143 anyway it's one less thing to worry about configuring.
1144
1145 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1146 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1147 and replace all instances of assert with abort.
1148 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1149 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1150
1151 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1152 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1153 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1154 hash_find_entry, hash_rehash, hash_insert): Likewise.
1155 * src/conflicts.c (resolve_sr_conflict): Likewise.
1156 * src/lalr.c (set_goto_map, map_goto): Likewise.
1157 * src/nullable.c (nullable_compute): Likewise.
1158 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1159 * src/reader.c (packgram, reader): Likewise.
1160 * src/state.c (state_new, state_free, state_transitions_set,
1161 state_reduction_find): Likewise.
1162 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1163 symbol_pack): Likewise.
1164 * src/tables.c (conflict_row, pack_vector): Likewise.
1165 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1166 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1167 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1168 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1169
1170 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1171 (ARGMATCH_CONSTRAINT): New macro.
1172 (ARGMATCH_ASSERT): Use it.
1173
1174 * src/system.h (verify): New macro.
1175 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1176 rather than assert.
1177 * src/tables.c (tables_generate): Likewise.
1178
1179 * src/struniq.c (struniq_assert): Now returns void, and aborts
1180 if the assertion is false.
1181 (struniq_assert_p): Remove.
1182 * src/struniq.h: Likewise.
1183
1184 2002-11-18 Paul Eggert <eggert@twinsun.com>
1185
1186 * data/glr.c (yygetLRActions): Replace `yyindex' with
1187 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1188 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1189 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1190
1191 2002-11-18 Akim Demaille <akim@epita.fr>
1192
1193 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1194 space.
1195 From Tim Van Holder.
1196
1197 2002-11-17 Paul Eggert <eggert@twinsun.com>
1198
1199 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1200 to "SyntaxError" for consistency with my 2002-11-15 change.
1201
1202 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1203 not define to {}, since this breaks the common use of `YYDPRINTF
1204 ((...));' if a single statement is desired (e.g. before `else').
1205 Work around GCC warnings by surrounding corresponding calls with
1206 {} if needed.
1207 (yyhasResolvedValue): Remove unused function.
1208 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1209 loop body.
1210 (yyreportSyntaxError): Renamed from yyreportParseError.
1211 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1212 All uses changed.
1213 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1214 extern when possible. Remove unused initializations.
1215
1216 2002-11-16 Akim Demaille <akim@epita.fr>
1217
1218 Augment the similarity between GLR and LALR traces.
1219
1220 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1221 (YY_REDUCE_PRINT): New.
1222 (yyparse): Use them.
1223 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1224 YYDPRINT here.
1225 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1226 state reached after the reduction/recovery, since...
1227 (yyparse, yyprocessOneStack): Report the state we are entering in.
1228
1229 2002-11-16 Akim Demaille <akim@epita.fr>
1230
1231 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1232 Add support for --trace=skeleton.
1233 * src/scan-skel.l: %option debug.
1234 Scan strings of non-@ or \n instead of character by character.
1235 (scan_skel): Handle trace_skeleton.
1236 (QPUTS): New.
1237 (@output_parser_name@, @output_header_name@): ``Restore'' their
1238 support (used to be M4 macros).
1239 * data/yacc.c: Quote larger chunks, a la glr.c.
1240 * data/lalr1.cc: Likewise.
1241 The header guards are no longer available, so use some other
1242 string than `YYLSP_NEEDED'.
1243
1244 2002-11-16 Akim Demaille <akim@epita.fr>
1245
1246 Make the ``Printers and Destructors'' test more verbose, taking
1247 `yacc.c''s behavior as (possibly wrong) reference.
1248
1249 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1250 instead of fprint on stdout.
1251 Set and report the last_line of the symbols.
1252 Consistently display values and locations.
1253
1254 2002-11-16 Paul Eggert <eggert@twinsun.com>
1255
1256 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1257
1258 2002-11-15 Paul Eggert <eggert@twinsun.com>
1259
1260 * tests/actions.at (Actions after errors): New test case.
1261
1262 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1263 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1264 tests/action.at, tests/calc.at, tests/conflicts.at,
1265 tests/cxx-type.at, tests/regression.at:
1266 "parse error" -> "syntax error" for POSIX compatibility.
1267 "parsing stack overflow..." -> "parser stack overflow" so
1268 that code matches Bison documentation.
1269
1270 2002-11-15 Akim Demaille <akim@epita.fr>
1271
1272 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1273 take two BRACED_CODE, not two string_content.
1274 Free the scanner's obstack when we are done.
1275 (code_content): New.
1276 * tests/calc.at: Adjust.
1277 * doc/bison.texinfo: Adjust.
1278 Also, make sure to include the `,' for these declarations.
1279
1280 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1281
1282 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1283 definition; avoids potential autoreconf problems.
1284
1285 2002-11-15 Akim Demaille <akim@epita.fr>
1286
1287 Always check the value returned by yyparse.
1288
1289 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1290 returned by yyparse.
1291 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1292 Adjust calls.
1293 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1294 returned by yyparse.
1295
1296 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1297
1298 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1299 on input.at test.
1300
1301 2002-11-14 Paul Eggert <eggert@twinsun.com>
1302
1303 * src/output.c (output_skeleton): Call xfopen instead of
1304 duplicating xfopen's body.
1305
1306 Fix bugs reported by Nelson H. F. Beebe in
1307 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1308
1309 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1310 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1311 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1312 file twice in the grammar, as an extra check.
1313
1314 * tests/input.at (Torturing the Scanner): Surround the
1315 backslash-newline tests with "#if 0", to make it less likely that
1316 we'll run into compiler bugs. Bring back solitary \ inside
1317 comment, but add a closing comment to work around HP C bug. Don't
1318 test backslash-newline in C character constant.
1319
1320 2002-11-14 Akim Demaille <akim@epita.fr>
1321
1322 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1323 status of the compiler.
1324 Calling `exit 1' is no longer needed.
1325 Reported by Nelson H. F. Beebe.
1326
1327 2002-11-14 Akim Demaille <akim@epita.fr>
1328
1329 * tests/atlocal.in (CPPFLAGS): We have config.h.
1330 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1331 New.
1332 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1333 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1334 * tests/regression.at, tests/torture.at: Use them for all the
1335 grammars that are to be compiled.
1336 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1337 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1338 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1339
1340 2002-11-14 Akim Demaille <akim@epita.fr>
1341
1342 * doc/bison.texinfo: Various formatting changes (alignments in
1343 samples, additional @group/@end group, GCS in samples.
1344 Use @deffn instead of simple @table to define the directives,
1345 macros, variables etc.
1346
1347 2002-11-13 Paul Eggert <eggert@twinsun.com>
1348
1349 Fix some bugs reported by Albert Chin-A-Young in
1350 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1351
1352 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1353 -o c"; the HP C compiler chatters during compilation.
1354 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1355 * tests/headers.at (export YYLTYPE): Likewise.
1356
1357 * tests/input.at (Torturing the Scanner): Remove lines containing
1358 solitary backslashes, as they tickle a bug in the HP C compiler.
1359
1360 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1361 comments, since they're not portable. Use GNU coding style.
1362
1363 2002-11-13 Akim Demaille <akim@epita.fr>
1364
1365 * data/yacc.c: Leave bigger chunks of quoted text.
1366 (YYDSYMPRINTF): New.
1367 Use it to report symbol activities.
1368 * data/glr.c (YYDSYMPRINTF): New.
1369 Use it.
1370
1371 2002-11-12 Paul Eggert <eggert@twinsun.com>
1372
1373 Version 1.75b.
1374
1375 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1376 (yyglrReduce): Return yyok, not 0.
1377 This should avoid the enumerated-type warnings reported
1378 by Nelson H. F. Beebe in
1379 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1380
1381 * lib/bbitset.h (BITSET_INLINE): Remove.
1382 * lib/bitset.h [! BITSET_INLINE]: Remove.
1383 (bitset_set, bitset_reset, bitset_test): Rename local vars
1384 to avoid shadowing warnings by GCC.
1385
1386 * data/glr.c (inline): Remove #define. It's the user's
1387 responsibility to #define it away, just like 'const'.
1388 This fixes one of the bugs reported by Nelson H. F. Beebe in
1389 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1390
1391 * Makefile.maint (po-check): Scan .l and .y files instead of the
1392 .c and the .h files that they generate. This fixes the bug
1393 reported by Tim Van Holder in:
1394 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1395 Look for N_ as well as for _. Try to avoid matching #define for
1396 N_ and _.
1397 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1398 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1399 * src/scan-gram.l: Revamp regular expressions so that " and '
1400 do not confuse xgettext.
1401
1402 * src/struniq.h (struniq_new): Do not declare the return type
1403 to be 'const'; this violates the C standard.
1404 * src/struniq.c (struniq_new): Likewise.
1405
1406 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1407
1408 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1409 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1410 linker.
1411
1412 2002-11-12 Akim Demaille <akim@epita.fr>
1413
1414 * Makefile.maint: Sync with Autoconf:
1415 (local_updates): New.
1416
1417 2002-11-12 Akim Demaille <akim@epita.fr>
1418
1419 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1420
1421 2002-11-12 Akim Demaille <akim@epita.fr>
1422
1423 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1424 locations.
1425
1426 2002-11-12 Akim Demaille <akim@epita.fr>
1427
1428 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1429 not yyvalue.
1430
1431 2002-11-12 Akim Demaille <akim@epita.fr>
1432
1433 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1434 Use it to test the GLR parser.
1435
1436 2002-11-12 Akim Demaille <akim@epita.fr>
1437
1438 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1439 defines it.
1440 * data/glr.c (yystos): New.
1441 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1442 (YYDSYMPRINT): New.
1443 (yyval): Don't define it, it is handled via M4.
1444 (yyrecoverParseError): Free verbosely the discarded symbols.
1445 * data/yacc.c (yysymprint): Remove, rather...
1446 (b4_yysymprint_generate): invoke.
1447 * data/c.m4 (b4_yysymprint_generate): New.
1448 Accept pointers as arguments, as opposed to the version from
1449 yacc.c.
1450 (b4_yydestruct_generate): Likewise.
1451 * tests/cations.at (Printers and Destructors): Use Bison directives
1452 instead of CPP macros.
1453 Don't rely on internal details.
1454
1455 2002-11-12 Akim Demaille <akim@epita.fr>
1456
1457 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1458 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1459 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1460 it against YYEMPTY and so forth), work on yytoken (i.e., set
1461 it to YYEMPTY etc.).
1462 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1463 (b4_symbol_actions): Remove.
1464 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1465 for 0, end-of-input.
1466
1467 2002-11-12 Akim Demaille <akim@epita.fr>
1468
1469 * doc/bison.texinfo (Destructor Decl): New.
1470
1471 2002-11-12 Akim Demaille <akim@epita.fr>
1472
1473 * src/tables.c (tables_generate): Use free for pointers that
1474 cannot be NULL, not XFREE.
1475 (pack_vector): Use assert, not fatal, for bound violations.
1476 * src/state.c (state_new): Likewise.
1477 * src/reader.c (reader): Likewise.
1478 * src/lalr.c (set_goto_map): Likewise.
1479 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1480 the file name.
1481
1482 2002-11-12 Akim Demaille <akim@epita.fr>
1483
1484 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1485 Restore.
1486 * src/scan-gram.l (last_string): Is global to the file, not to
1487 yylex.
1488 * src/parse-gram.y (input): Don't append the epilogue here,
1489 (epilogue.opt): do it here, and free the scanner's obstack.
1490 * src/reader.c (epilogue_set): Rename as...
1491 (epilogue_augment): this.
1492 * data/c.m4 (b4_epilogue): Defaults to empty.
1493
1494 2002-11-12 Akim Demaille <akim@epita.fr>
1495
1496 * src/getargs.c (long_options): Remove duplicates.
1497 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1498 Remove.
1499 * doc/bison.rnh: Remove.
1500 * doc/bison.texinfo (VMS Invocation): Remove.
1501
1502 2002-11-12 Akim Demaille <akim@epita.fr>
1503
1504 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1505 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1506
1507 Use struniq for symbols.
1508
1509 * src/symtab.h (symbol_t): The tag member is a struniq.
1510 (symbol_type_set): Adjust.
1511 * src/symtab.c (symbol_new): Takes a struniq.
1512 (symbol_free): Don't free the tag member.
1513 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1514 (hash_compare_symbol, hash_symbol): these.
1515 Use the fact that tags as struniqs.
1516 (symbol_get): Use struniq_new.
1517 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1518 Returns a strniq.
1519 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1520 and type members are struniqs.
1521 * src/reader.c (get_merge_function)
1522 (grammar_current_rule_merge_set): Adjust.
1523 (TYPE, current_type): Are struniq.
1524
1525 Use struniq for file names.
1526
1527 * src/files.h, src/files.c (infile): Split into...
1528 (grammar_file, current_file): these.
1529 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1530 * src/reduce.c (reduce_print): Likewise.
1531 * src/getargs.c (getargs): Likewise.
1532 * src/complain.h, src/complain.c: Likewise.
1533 * src/main.c (main): Call struniqs_new early enough to use it for
1534 file names.
1535 Don't free the input file name.
1536
1537 2002-11-12 Akim Demaille <akim@epita.fr>
1538
1539 * src/symtab.c (symbol_free): Remove dead deactivated code:
1540 type_name are properly removed.
1541 Don't use XFREE to free items that cannot be NULL.
1542 * src/struniq.h, src/struniq.c: New.
1543 * src/main.c (main): Initialize/free struniqs.
1544 * src/parse-gram.y (%union): Add astruniq member.
1545 (yyprint): Adjust.
1546 * src/scan-gram.l (<{tag}>): Return a struniq.
1547 Free the obstack bit that used to store it.
1548 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1549
1550 2002-11-11 Paul Eggert <eggert@twinsun.com>
1551
1552 Revamp to fix many (but not all) of the C- and M4-related quoting
1553 problems. Among other things, this fixes the Bison bug reported
1554 by Jan Hubicka when processing the Bash grammar; see:
1555 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1556
1557 Use new @ escapes consistently. Represent brackets with @{ and @}
1558 rather than @<:@ and @:>@, since this works a bit better with dumb
1559 editors like vi. Represent @ with @@, since @ is now consistently
1560 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1561 __ofile__, to avoid unexpected expansions. Similarly, use @output
1562 rather than #output.
1563
1564 * data/c.m4 (b4_copyright): Omit file name from comment, since
1565 the file name could contain "*/".
1566 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1567 be quoted. All uses changed.
1568
1569 * data/glr.c: Use new @ escapes consistently.
1570 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1571 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1572 Remove, since they couldn't handle arbitrary characters in file
1573 names.
1574 * data/lalr1.cc: Likewise.
1575 * data/yacc.c: Likewise.
1576
1577 * src/files.c (output_infix): Remove; all uses removed.
1578 * src/files.h: Likewise.
1579
1580 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1581 mishandled funny characters in file names, and anyway it isn't
1582 needed any more.
1583 * data/yacc.c: Likewise.
1584 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1585
1586 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1587 * data/yacc.c: Likewise.
1588
1589 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1590 strings now.
1591 (muscle_init): Quote filename as a C string.
1592 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1593 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1594 * src/output.c (escaped_file_name_output): New function.
1595 (prepare_symbols): Quote tokens for M4.
1596 (prepare): Don't insert output_infix, output_prefix,
1597 output_parser_name, output_header_name; this is now down by scan-skel.
1598 Insert skeleton as a C string.
1599
1600 * src/output.c (user_actions_output, symbol_destructors_output,
1601 symbol_printers_output): Quote filenames for C and M4.
1602 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1603
1604 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1605 escapes other than \\ and \'; this simplifies the code.
1606 (<SC_STRING>): Likewise, for \\ and \".
1607 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1608 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1609 Use new escapes @{ and @} for [ and ].
1610
1611 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1612 them with auto vars.
1613 Switch to new escape scheme, where @ is the escape character uniformly.
1614 Abort if a stray escape character is found. Avoid unbounded input
1615 buffer when parsing non-escaped text.
1616
1617 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1618 __oline__, #output, $@, and @{ do not have unintended meanings.
1619
1620 2002-11-09 Paul Eggert <eggert@twinsun.com>
1621
1622 Fix the test failure due to GCC warnings described in
1623 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1624 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1625 evaluate to 0 if it's impossible for NINF to be in the respective
1626 table.
1627 (yygetLRActions, yyrecoverParseError): Use them.
1628
1629 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1630 counted in the token inserted at end of file. Now takes
1631 location_t *, not location_t, so that the location can be
1632 adjusted. All uses changed.
1633
1634 * tests/regression.at (Invalid inputs): Adjust wording in
1635 diagnostic to match the new behavior.
1636
1637 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1638 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1639 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1640 abort ();'. This reduces the runtime of the "Many lookaheads"
1641 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1642 GCC 3.2.
1643
1644 2002-11-07 Paul Eggert <eggert@twinsun.com>
1645
1646 * src/parse-gram.y (CHARACTER): Remove unused token.
1647 All uses removed.
1648
1649 * src/scan-gram.l: Remove stack option. We no longer use the
1650 stack, since the stack was never deeper than 1; instead, use the
1651 new auto var c_context to record the stacked value.
1652
1653 Remove nounput option. At an unexpected end of file, we now unput
1654 the minimal input necessary to end cleanly; this simplifies the
1655 code.
1656
1657 Avoid unbounded token sizes where this is easy.
1658
1659 (unexpected_end_of_file): New function.
1660 Use it to systematize the error message on unexpected EOF.
1661 (last-string): Now auto, not static.
1662 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1663 (scanner_last_string_free): Remove; not used.
1664 (percent_percent_count): Move decl to just before use.
1665 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1666 not the (never otherwised-used) CHARACTER.
1667
1668 2002-11-07 Akim Demaille <akim@epita.fr>
1669
1670 Let yyerror always receive the msg as last argument, so that
1671 yyerror can be variadic.
1672
1673 * data/yacc.c (b4_yyerror_args): New.
1674 Use it when calling yyerror.
1675 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1676 Use it when calling yyerror.
1677 * doc/bison.texinfo (Error Reporting): Adjust.
1678 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1679 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1680
1681 2002-11-06 Akim Demaille <akim@epita.fr>
1682
1683 #line should have quoted strings.
1684 Ideally, this should be done by m4_quotearg.
1685
1686 * src/scan-skel.l: Include quotearg.h.
1687 Quote __ofile__.
1688 * src/output.c (symbol_printers_output)
1689 (symbol_destructors_output): Quote the file name.
1690
1691 2002-11-06 Akim Demaille <akim@epita.fr>
1692
1693 * tests/regression.at (Invalid inputs): Adjust to the recent
1694 messages.
1695
1696 2002-11-06 Akim Demaille <akim@epita.fr>
1697
1698 Restore --no-lines.
1699 Reported by Jim Kent.
1700
1701 * data/c.m4 (b4_syncline): New.
1702 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1703 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1704 * src/output.c (user_actions_output): Likewise.
1705 (prepare): Define 'b4_synclines_flag'.
1706 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1707
1708 2002-11-06 Akim Demaille <akim@epita.fr>
1709
1710 * src/main.c (main): Free `infile'.
1711 * src/scan-gram.l (handle_syncline): New.
1712 Recognize `#line'.
1713 * src/output.c (user_actions_output, symbol_destructors_output)
1714 (symbol_printers_output): Use the location's file name, not
1715 infile.
1716 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1717
1718 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1719
1720 * src/tables.c (matching_state): Don't allow states to match if
1721 either has GLR conflict entries.
1722
1723 2002-11-05 Paul Eggert <eggert@twinsun.com>
1724
1725 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1726 "integer out of range" rather than "invalid value".
1727 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1728 accordingly.
1729
1730 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1731 Also, remove one static variable in the scanner.
1732
1733 * src/scan-gram.l (braces_level): Now auto, not static.
1734 Initialize to zero if the compiler is being picky.
1735 (INITIAL): Clear braces_level instead of incrementing it.
1736 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1737 as POSIX 1003.1-2001 requires.
1738 * src/system.h (IF_LINT): New macro, taken from coreutils.
1739 * configure.ac: Define "lint" if --enable-gcc-warnings.
1740
1741 2002-11-05 Akim Demaille <akim@epita.fr>
1742
1743 * src/scan-gram.l: When it starts with `%', complain about the
1744 whole directive, not just that `invalid character: %'.
1745
1746 2002-11-04 Akim Demaille <akim@epita.fr>
1747
1748 * Makefile.maint: Update from Autoconf.
1749 (update, cvs-update, po-update, do-po-update): New.
1750
1751 2002-11-04 Akim Demaille <akim@epita.fr>
1752
1753 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1754 and yyerror.
1755 Have yyerror `use' its arguments.
1756 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1757 returns true when location & yacc & pure & parse-param.
1758 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1759
1760 2002-11-04 Akim Demaille <akim@epita.fr>
1761
1762 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1763 clashes.
1764 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1765 font-lock-mode.
1766 Use complain_at.
1767 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1768 slot 0.
1769
1770 2002-11-03 Paul Eggert <eggert@twinsun.com>
1771
1772 * src/reader.c (get_merge_function, grammar_current_rule_check):
1773 Use consistent diagnostics for reporting type name clashes.
1774 Quote the types with <>, for consistency with Yacc.
1775 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1776
1777 2002-11-03 Akim Demaille <akim@epita.fr>
1778
1779 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1780 New.
1781 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1782 (b4_parse_param): Remove.
1783 Use b4_identification.
1784 Propagate b4_pure_args where needed to pass them to yyerror.
1785 * data/glr.m4 (b4_parse_param): Remove.
1786 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1787 (b4_lpure_formals): New.
1788 Use b4_identification.
1789 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1790 b4_user_formals and b4_user_args.
1791 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1792 (yyreportAmbiguity): When using a pure parser, also need
1793 the location, and the parse-params.
1794 Adjust callers.
1795 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1796 When using a pure parser, also need the parse-params.
1797 Adjust callers.
1798 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1799 (%pure-parser + %parse-param) LALR and GLR parsers.
1800 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1801 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1802 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1803 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1804 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1805 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1806 * doc/bison.texinfo: Untabify the whole file.
1807 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1808 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1809 (Error Reporting): Adjust to these new directives.
1810 Document %error-verbose, deprecate YYERROR_VERBOSE.
1811
1812 2002-11-03 Akim Demaille <akim@epita.fr>
1813
1814 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1815 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1816 command line options.
1817 * tests/cxx-type.at: Formatting changes.
1818
1819 2002-11-03 Paul Eggert <eggert@twinsun.com>
1820
1821 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1822 to count columns correctly, and to check for invalid inputs.
1823
1824 Use mbsnwidth to count columns correctly. Account for tabs, too.
1825 Include mbswidth.h.
1826 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1827 (extend_location): New function.
1828 (YY_LINES): Remove.
1829
1830 Handle CRLF in C code rather than in Lex code.
1831 (YY_INPUT): New macro.
1832 (no_cr_read): New function.
1833
1834 Scan UCNs, even though we don't fully handle them yet.
1835 (convert_ucn_to_byte): New function.
1836
1837 Handle backslash-newline correctly in C code.
1838 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1839 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1840 all uses changed.
1841 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1842 Use {splice} wherever C allows backslash-newline.
1843 YY_STEP after space, newline, vertical-tab.
1844 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1845
1846 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1847
1848 ({int}, handle_action_dollar, handle_action_at): Check for integer
1849 overflow.
1850
1851 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1852
1853 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1854 as well as \000. Check for UCHAR_MAX, not 255.
1855 Allow \x with an arbitrary positive number of digits, as in C.
1856 Check for overflow here.
1857 Allow \? and UCNs, for compatibility with C.
1858
1859 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1860 with quote slot used by complain_at.
1861
1862 * tests/input.at: Add tests for backslash-newline, m4 quotes
1863 in symbols, long literals, and funny escapes in strings.
1864
1865 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1866 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1867 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1868 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1869 * m4/mbswidth.m4: New file, from GNU coreutils.
1870
1871 * doc/bison.texinfo (Grammar Outline): Document // comments.
1872 (Symbols): Document that trigraphs have no special meaning in Bison,
1873 nor is backslash-newline allowed.
1874 (Actions): Document that trigraphs have no special meaning.
1875
1876 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1877 no longer used.
1878
1879 2002-11-02 Paul Eggert <eggert@twinsun.com>
1880
1881 * src/reader.c: Don't include quote.h; not needed.
1882 (get_merge_function): Reword warning to be consistent with
1883 type clash diagnostic in grammar_current_rule_check.
1884
1885 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1886 bug in trigraph handling.
1887
1888 * src/output.c (prepare_symbols): When printing token names,
1889 escape "[" as "@<:@" and likewise for "]".
1890
1891 * src/system.h (errno): Remove declaration, as we are now
1892 assuming C89 or better, and C89 guarantees errno.
1893
1894 2002-10-30 Paul Eggert <eggert@twinsun.com>
1895
1896 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1897 Check for close failures.
1898 * src/files.h (xfclose): Return void, not int, since it always
1899 returned zero.
1900 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1901 indicates one.
1902 * src/output.c (output_skeleton): Use xfclose rather than fclose
1903 and ferror. xfclose now checks ferror.
1904
1905 * data/glr.c (YYLEFTMOST_STATE): Remove.
1906 (yyreportTree): Use a stack-based leftmost state. This avoids
1907 our continuing battles with bogus warnings about initializers.
1908
1909 2002-10-30 Akim Demaille <akim@epita.fr>
1910
1911 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1912 #if.
1913
1914 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1915
1916 * tests/glr-regr1.at: New test for reported regressions.
1917 * tests/testsuite.at: Add glr-regr1.at test.
1918 * tests/Makefile.am: Add glr-regr1.at test.
1919
1920 2002-10-24 Paul Eggert <eggert@twinsun.com>
1921
1922 Version 1.75a.
1923
1924 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1925 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1926 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1927 Don't assume strdup exists; POSIX says its an XSI extension.
1928 Check for buffer overflow on input.
1929
1930 2002-10-24 Akim Demaille <akim@epita.fr>
1931
1932 * src/output.c (output_skeleton): Don't disable M4sugar comments
1933 too soon: it results in comments being expanded.
1934 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1935 first output.
1936
1937 2002-10-24 Akim Demaille <akim@epita.fr>
1938
1939 * data/yacc.c (m4_int_type): New.
1940 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1941 char' as only yacc.c wants K&R portability.
1942 * data/glr.c (yysigned_char): Remove.
1943 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1944 Reported by Quoc Peyrot.
1945
1946 2002-10-23 Paul Eggert <eggert@twinsun.com>
1947
1948 * src/main.c (main): With --trace=time, report times even if a
1949 non-fatal error occurs. Formerly, the times were reported in some
1950 such cases but not in others.
1951 * src/reader.c (reader): Just return if a complaint has been issued,
1952 instead of exiting, so that 'main' can report times.
1953
1954 2002-10-22 Akim Demaille <akim@epita.fr>
1955
1956 * src/system.h: Include sys/types.
1957 Reported by Bert Deknuydt.
1958
1959 2002-10-23 Paul Eggert <eggert@twinsun.com>
1960
1961 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1962 Suggested by Art Haas.
1963
1964 2002-10-22 Paul Eggert <eggert@twinsun.com>
1965
1966 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1967 decl; not needed any more.
1968 * src/main.c (main): Use return to exit, undoing yesterday's change.
1969 The last OS that we could find where this wouldn't work is
1970 SunOS 3.5, and that's too old to worry about now.
1971
1972 * data/glr.c (struct yyltype): Define members even when not
1973 doing locations. This is more consistent with yacc.c, and it
1974 works around the following bug reports:
1975 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
1976 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
1977
1978 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1979 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1980 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1981
1982 2002-10-22 Akim Demaille <akim@epita.fr>
1983
1984 * data/README: New.
1985
1986 2002-10-21 Paul Eggert <eggert@twinsun.com>
1987
1988 Be consistent about 'bool'; the old code used an enum in one
1989 module and an int in another, and this violates the C standard.
1990 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1991 * configure.ac (AC_HEADER_STDBOOL): Add.
1992 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1993 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1994 * src/symtab.c (hash_compare_symbol_t): Likewise.
1995 * src/system.h (bool, false, true): Use a definition consistent
1996 with ../lib/hash.c. All uses changed.
1997
1998 * src/complain.c (warning_issued): Renamed from warn_message_count,
1999 so that we needn't worry about integer overflow (!).
2000 Now of type bool. All uses changed.
2001 (complaint_issued): Renamed from complain_message_count; likewise.
2002
2003 * src/main.c (main): Use exit to exit with failure.
2004
2005 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2006 rather than 1 and 0.
2007 * src/main.c (main): Likewise.
2008 * src/getargs.c (getargs): Likewise.
2009 * src/reader.c (reader): Likewise.
2010
2011 * src/getarg.c (getargs): Remove duplicate code for
2012 "Try `bison --help'".
2013
2014 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2015 What was that "2" for?
2016
2017 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2018 * src/getargs.c (usage): Likewise.
2019
2020 * src/getargs.c (getargs): When there are too few operands, report
2021 the last one. When there are too many, report the first extra
2022 one. This is how diffutils does it.
2023
2024 2002-10-20 Paul Eggert <eggert@twinsun.com>
2025
2026 Remove K&R vestiges.
2027 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2028 * src/complain.c (VA_START): Remove. Assume prototypes.
2029 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2030 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2031 fatal): Assume prototypes.
2032 * src/complain.h: Assume prototypes.
2033 * src/system.h (PARAMS): Remove.
2034 Include <limits.h> unconditionally, since it's guaranteeed even
2035 for a freestanding C89 compiler.
2036 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2037 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2038
2039 2002-10-20 Akim Demaille <akim@epita.fr>
2040
2041 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2042 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2043 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2044 (yyresolveStates, yyresolveAction, yyresolveStack)
2045 (yyprocessOneStack): Use them.
2046 (yy_reduce_print): New.
2047 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2048
2049 2002-10-20 Akim Demaille <akim@epita.fr>
2050
2051 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2052 arguments and output `void'.
2053 (b4_c_function): Rename as...
2054 (b4_c_function_def): this.
2055 (b4_c_function_decl, b4_c_ansi_function_def)
2056 (b4_c_ansi_function_decl): New.
2057 Change the interpretation of the arguments: before `int, foo', now
2058 `int foo, foo'.
2059 * data/yacc.c (yyparse): Prototype and define thanks to these.
2060 Adjust b4_c_function_def uses.
2061 * data/glr.c (yyparse): Likewise, but ANSI only.
2062
2063 2002-10-20 Akim Demaille <akim@epita.fr>
2064
2065 * src/output.c (prepare): Move the definition of `tokens_number',
2066 `nterms_number', `undef_token_number', `user_token_number_max'
2067 to...
2068 (prepare_tokens): Here.
2069 (prepare_tokens): Rename as...
2070 (prepare_symbols): this.
2071 (prepare): Move the definition of `rules_number' to...
2072 (prepare_rules): here.
2073 (prepare): Move the definition of `last', `final_state_number',
2074 `states_number' to...
2075 (prepare_states): here.
2076 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2077
2078 2002-10-20 Akim Demaille <akim@epita.fr>
2079
2080 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2081
2082 2002-10-20 Akim Demaille <akim@epita.fr>
2083
2084 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2085 * data/c.m4: here.
2086
2087 2002-10-20 Akim Demaille <akim@epita.fr>
2088
2089 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2090 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2091 `pair'.
2092 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2093 `name' to...
2094 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2095 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2096 These.
2097
2098 2002-10-19 Paul Eggert <eggert@twinsun.com>
2099
2100 Do not create a temporary file, as that involves security and
2101 cleanup headaches. Instead, use a pair of pipes.
2102 Derived from a suggestion by Florian Krohm.
2103 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2104 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2105 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2106 (BISON_PREREQ_SUBPIPE): Add.
2107 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2108 Add subpipe.h, subpipe.c.
2109 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2110 * po/POTFILES.in: Add lib/subpipe.c.
2111 * src/output.c: Include "subpipe.h".
2112 (m4_invoke): Remove decl.
2113 (scan_skel): New decl.
2114 (output_skeleton): Use pipe rather than temporary file for m4 input.
2115 Check that m4sugar.m4 is readable, to avoid deadlock.
2116 Check for pipe I/O error.
2117 * src/scan-skel.l (readpipe): Remove decl.
2118 (scan_skel): New function, to be used in place of m4_invoke.
2119 Read from stream rather than file.
2120
2121 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2122 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2123 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2124 this generates a more-accurate value anyway.
2125
2126 * lib/timevar.c (timervar_accumulate): Rename locals to
2127 avoid confusion with similarly-named more-global.
2128 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2129
2130 * src/output.c (prepare): Use xstrdup to convert char const *
2131 to char *, to avoid GCC warning.
2132
2133 2002-10-19 Akim Demaille <akim@epita.fr>
2134
2135 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2136 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2137 Use them to have `calc.y' ready for %pure-parser.
2138 * data/yacc.c (YYLEX): Pass a yylex return type to
2139 b4_c_function_call.
2140
2141 2002-10-19 Akim Demaille <akim@epita.fr>
2142
2143 Prototype support of %lex-param and %parse-param.
2144
2145 * src/parse-gram.y: Add the definition of the %lex-param and
2146 %parse-param tokens, plus their rules.
2147 Drop the `_' version of %glr-parser.
2148 Add the "," token.
2149 * src/scan-gram.l (INITIAL): Scan them.
2150 * src/muscle_tab.c: Comment changes.
2151 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2152 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2153 (muscle_entry_s): The `value' member is no longer const.
2154 Adjust all dependencies.
2155 * src/muscle_tab.c (muscle_init): Adjust: use
2156 MUSCLE_INSERT_STRING.
2157 Initialize the obstack earlier.
2158 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2159 (muscle_pair_list_grow): New.
2160 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2161 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2162 * tests/calc.at: Use %locations, not --locations.
2163 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2164
2165 2002-10-19 Akim Demaille <akim@epita.fr>
2166
2167 * src/getargs.c (usage): Take status as argument and exit
2168 accordingly.
2169 Report the traditional `Try ... --help' message when status != 0.
2170 (usage, version): Don't take a FILE * as arg, it is pointless.
2171 (getargs): When there is an incorrect number of arguments, make it
2172 an error, and report it GNUlically thanks to `usage ()'.
2173
2174 2002-10-18 Paul Eggert <eggert@twinsun.com>
2175
2176 * data/glr.c (yyreportParseError): Don't assume that sprintf
2177 yields the length of the printed string, as this is not true
2178 on SunOS 4.1.4. Reported by Peter Klein.
2179
2180 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2181 * tests/conflicts.at (%nonassoc and eof): Likewise.
2182 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2183
2184 2002-10-17 Akim Demaille <akim@epita.fr>
2185
2186 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2187 * src/getargs.c (trace_types, trace_args): Adjust.
2188 * src/reader.c (grammar_current_rule_prec_set)
2189 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2190 Standardize error messages.
2191 And s/@prec/%prec/!
2192 (reader): Use trace_flag to enable scanner/parser debugging,
2193 instead of an adhoc scheme.
2194 * src/scan-gram.l: Remove trailing debugging code.
2195
2196 2002-10-16 Paul Eggert <eggert@twinsun.com>
2197
2198 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2199 MUSCLE_TAB_H.
2200
2201 * NEWS: Officially drop support for building Bison with K&R C,
2202 since it didn't work anyway and it's not worth worrying about.
2203 * Makefile.maint (wget_files): Remove ansi2knr.c.
2204 (ansi2knr.c-url_prefix): Remove.
2205 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2206 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2207 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2208
2209 2002-10-15 Paul Eggert <eggert@twinsun.com>
2210
2211 Stop using the "enum_" trick for K&R-style function definitions;
2212 it confused me, and I was the author! Instead, assume that people
2213 who want to use K&R C compilers (when using these modules in GCC,
2214 perhaps?) will run ansi2knr.
2215
2216 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2217 All uses of "enum_" changed to "enum ".
2218 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2219 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2220
2221 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2222 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2223 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2224 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2225 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2226 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2227 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2228 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2229 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2230 Use function prototypes; this removes the need for declaring
2231 static functions simply to provide their prototypes.
2232 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2233 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2234 bitset_count_, bitset_create, bitset_dump, bitset_first,
2235 bitset_free, bitset_init, bitset_last, bitset_next,
2236 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2237 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2238 bitset_print, bitset_release_memory, bitset_toggle_,
2239 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2240 debug_bitset): Likewise.
2241 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2242 * lib/bitset_stats.c (bitset_log_histogram_print,
2243 bitset_percent_histogram_print, bitset_stats_and,
2244 bitset_stats_and_cmp, bitset_stats_and_or,
2245 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2246 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2247 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2248 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2249 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2250 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2251 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2252 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2253 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2254 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2255 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2256 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2257 bitset_stats_zero): Likewise.
2258 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2259 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2260 bitsetv_dump, debug_bitsetv): Likewise.
2261 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2262 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2263 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2264 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2265 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2266 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2267 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2268 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2269 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2270 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2271 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2272 Likewise.
2273 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2274 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2275 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2276 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2277 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2278 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2279 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2280 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2281 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2282 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2283 lbitset_xor_cmp, lbitset_zero): Likewise.
2284
2285 2002-10-14 Akim Demaille <akim@epita.fr>
2286
2287 Version 1.75.
2288
2289 2002-10-14 Akim Demaille <akim@epita.fr>
2290
2291 * tests/Makefile.am (maintainer-check-posix): New.
2292
2293 2002-10-14 Akim Demaille <akim@epita.fr>
2294
2295 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2296 member.
2297
2298 2002-10-14 Akim Demaille <akim@epita.fr>
2299
2300 * src/tables.c (table_ninf_remap): base -> tab.
2301 Reported by Matt Rosing.
2302
2303 2002-10-14 Paul Eggert <eggert@twinsun.com>
2304
2305 * tests/action.at, tests/calc.at, tests/conflicts.at,
2306 tests/cxx-type.at, tests/headers.at, tests/input.at,
2307 tests/regression.at, tests/synclines.at, tests/torture.at:
2308 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2309 so that the tests still work even if POSIXLY_CORRECT is set.
2310 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2311
2312 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2313 for portability to K&R hosts. Fix typo: signed char is guaranteed
2314 only to 127, not to 128.
2315 * data/glr.c (yysigned_char): New type.
2316 * data/yacc.c (yysigned_char): Likewise.
2317 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2318
2319 2002-10-13 Paul Eggert <eggert@twinsun.com>
2320
2321 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2322 true due to limited range of data type" warning from GCC.
2323
2324 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2325 by wrapping enum yytokentype's definition inside #ifndef
2326 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2327
2328 2002-10-13 Akim Demaille <akim@epita.fr>
2329
2330 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2331 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2332
2333 2002-10-13 Akim Demaille <akim@epita.fr>
2334
2335 * Makefile.maint: Update from Autoconf 2.54.
2336 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2337
2338 2002-10-13 Akim Demaille <akim@epita.fr>
2339
2340 * src/print.c (print_state): Separate the list of solved conflicts
2341 from the other items.
2342 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2343
2344 2002-10-13 Akim Demaille <akim@epita.fr>
2345
2346 Let nondeterministic skeletons be usable with deterministic
2347 tables.
2348
2349 With the patch, GAWK compiled by GCC without -O2 passes its test
2350 suite using a GLR parser driven by LALR tables. It fails with -O2
2351 because `struct stat' gives two different answers on my machine:
2352 88 (definition of an auto var) and later 96 (memset on this var).
2353 Hence the stack is badly corrumpted. The headers inclusion is to
2354 blame: if I move the awk.h inclusion before GLR's system header
2355 inclusion, the two struct stat have the same size.
2356
2357 * src/tables.c (pack_table): Always create conflict_table.
2358 (token_actions): Always create conflict_list.
2359 * data/glr.c (YYFLAG): Remove, unused.
2360
2361 2002-10-13 Akim Demaille <akim@epita.fr>
2362
2363 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2364 (O0FLAGS): New.
2365 (VALGRIND, GXX): New.
2366 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2367 * tests/bison.in: Run $PREBISON a pre-command.
2368 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2369 (maintainer-check-g++): New.
2370 * Makefile.am (maintainer-check): New.
2371
2372 2002-10-13 Akim Demaille <akim@epita.fr>
2373
2374 * data/glr.c: Formatting changes.
2375 Tweak some trace messages to match yacc.c's.
2376
2377 2002-10-13 Akim Demaille <akim@epita.fr>
2378
2379 GLR parsers sometimes raise parse errors instead of performing the
2380 default reduction.
2381 Reported by Charles-Henry de Boysson.
2382
2383 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2384 check the length of the traces when %glr.
2385 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2386 GLR's traces.
2387 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2388 Test GLR parsers.
2389 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2390 (yyltype): Remove the yy prefix from the member names.
2391 (yytable): Complete its comment.
2392 (yygetLRActions): Map error action number from YYTABLE from
2393 YYTABLE_NINF to 0.
2394 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2395 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2396 not satisfying as we could compare an YYACTION computed from
2397 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2398 only value for error actions.
2399 (yyreportParseError): In verbose parse error messages, don't issue
2400 `error' in the list of expected tokens.
2401 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2402 next action to perform to match glr.c's decoding.
2403 (yytable): Complete its comment.
2404
2405 2002-10-13 Paul Eggert <eggert@twinsun.com>
2406
2407 Fix problem reported by Henrik Grubbstroem in
2408 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2409 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2410 because the Bison parser reads the second action before reducing
2411 the first one.
2412 * src/scan-gram.l (rule_length): New static var.
2413 Use it to keep track of the rule length in the scanner, since
2414 we can't expect the parser to be in lock-step sync with the scanner.
2415 (handle_action_dollar, handle_action_at): Use this var.
2416 * tests/actions.at (Exotic Dollars): Test for the problem.
2417
2418 2002-10-12 Paul Eggert <eggert@twinsun.com>
2419
2420 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2421 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2422 Include <sys/time.h> when checking for clock_t and struct tms.
2423 Use same include order as source.
2424 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2425 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2426
2427 * lib/timevar.c: Update copyright date and clarify comments.
2428 (get_time) [IN_GCC]: Keep the GCC version for reference.
2429
2430 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2431 GCC version as of today, then merge Bison's changes.
2432 Change "GCC" to "Bison" in copyright notice. timevar.def's
2433 author is Akim, so change that too.
2434
2435 * src/reader.c (grammar_current_rule_check):
2436 Don't worry about the default action if $$ is untyped.
2437 Prevents bogus warnings reported by Jim Gifford in
2438 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2439
2440 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2441 * data/glr.c, data/lalr1.cc, data/yacc.c:
2442 Output token definitions before the first part of user declarations.
2443 Fixes compatibility problem reported by Jim Gifford for kbd in
2444 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2445
2446 2002-10-11 Paul Eggert <eggert@twinsun.com>
2447
2448 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2449 (yyparse): here. This undoes some of the 2002-07-25 change.
2450 Compatibility problem reported by Ralf S. Engelschall with
2451 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2452
2453 2002-10-11 Akim Demaille <akim@epita.fr>
2454
2455 * tests/regression.at Characters Escapes): New.
2456 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2457 characters.
2458 Reported by Jan Nieuwenhuizen.
2459
2460 2002-10-11 Akim Demaille <akim@epita.fr>
2461
2462 * po/id.po: New.
2463
2464 2002-10-10 Paul Eggert <eggert@twinsun.com>
2465
2466 Portability fixes for bitsets; this also avoids several GCC
2467 warnings.
2468
2469 * lib/abitset.c: Include <stddef.h>, for offsetof.
2470 * lib/lbitset.c: Likewise.
2471
2472 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2473 properly for vectors of objects. Do not assume that adding a
2474 header size to a multiple of a word size yields a value that is
2475 properly aligned for the whole union.
2476 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2477
2478 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2479 unique names for structures.
2480 * lib/ebitset.c (ebitset_bytes): Likewise.
2481 * lib/lbitset.c (lbitset_bytes): Likewise.
2482
2483 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2484 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2485 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2486 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2487 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2488 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2489 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2490 to improve the type-checking that GCC can do.
2491 * lib/bitset.c (bitset_op4_cmp): Likewise.
2492 * lib/bitset_stats.c (bitset_stats_count,
2493 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2494 bitset_stats_copy, bitset_stats_disjoint_p,
2495 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2496 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2497 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2498 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2499 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2500 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2501 bitset_stats_or_and_cmp): Likewise.
2502 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2503 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2504 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2505 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2506
2507 * lib/abitset.h: Include bitset.h, not bbitset.h.
2508 * lib/ebitset.h: Likewise.
2509 * lib/lbitset.h: Likewise.
2510
2511 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2512 All instances of parameters of type enum bitset_opts are now of
2513 type enum_bitset_opts, to conform to the C Standard, and similarly
2514 for enum_bitset_type.
2515 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2516 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2517
2518 Do not use "struct bitset_struct" to mean different things in
2519 different modules. Not only is this confusing, it violates
2520 the C Standard, which requires that structure types in different
2521 modules must be compatible if one is to be passed to the other.
2522 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2523 All instances of "struct bitset_struct *" replaced with "bitset".
2524 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2525 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2526 struct lbitset_struct, struct bitset_stats_struct): New types.
2527 All uses of struct bitset_struct changed to union bitset_union,
2528 etc.
2529 * lib/abitset.c (struct abitset_struct, abitset,
2530 struct bitset_struct): Remove.
2531 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2532 struct bitset_struct): Remove.
2533 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2534 bitset_struct): Remove.
2535 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2536 Likewise.
2537
2538 Do not call a function of type T using a call that assumes the
2539 function is of a different type U. Standard C requires that a
2540 function must be called with a type that is compatible with its
2541 definition.
2542 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2543 New decls.
2544 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2545 New functions.
2546 * lib/ebitset.c (PFV): Remove.
2547 * lib/lbitset.c (PFV): Likewise.
2548 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2549 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2550 decls.
2551 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2552 (ebitset_vtable): Use them.
2553 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2554 lbitset_xor): New functions.
2555 (lbitset_vtable): Use them.
2556
2557 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2558 Declare.
2559
2560 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2561 GCC warning.
2562 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2563 Use offsetof, for simplicity.
2564
2565 2002-10-06 Paul Eggert <eggert@twinsun.com>
2566
2567 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2568 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2569 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2570 which was inadvertently undone by the 2002-09-30 patch.
2571 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2572 the same width as int.
2573
2574 2002-10-04 Paul Eggert <eggert@twinsun.com>
2575
2576 Version 1.50.
2577
2578 * configure.ac (AC_INIT), NEWS: Increment version number.
2579
2580 * doc/bison.texinfo: Minor spelling, grammar, and white space
2581 fixes.
2582 (Symbols): Mention that any negative value returned from yylex
2583 signifies end-of-input. Warn about negative chars. Mention
2584 the portable Standard C character set.
2585
2586 The GNU coding standard says CFLAGS and YFLAGS are reserved
2587 for the installer to set.
2588 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2589 * src/Makefile.am (AM_CFLAGS): Likewise.
2590 (AM_YFLAGS): Renamed from YFLAGS.
2591
2592 Fix some MAX and MIN problems.
2593 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2594 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2595 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2596 * src/reader.c (reader): Use it.
2597
2598 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2599 POSIX 1003.1-2001 has removed fgrep.
2600
2601 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2602
2603 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2604 interpreted as signed.
2605 * lib/ebitset.c (ebitset_list): Fix bug.
2606
2607 2002-10-01 Paul Eggert <eggert@twinsun.com>
2608
2609 More fixes for 64-bit hosts and large bitsets.
2610
2611 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2612 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2613 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2614 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2615 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2616 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2617 bitset_count_): Likewise.
2618 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2619 bitset_first, bitset_last): Likewise.
2620 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2621 bitset_stats_list_reverse, bitset_stats_size,
2622 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2623 Likewise.
2624 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2625 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2626 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2627 bitsetv_reflexive_transitive_closure): Likewise.
2628 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2629 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2630 Likewise.
2631 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2632 Likewise.
2633
2634 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2635 Use size_t, not unsigned int, to count bytes.
2636 * lib/abitset.h (abitset_bytes): Likewise.
2637 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2638 Likewise.
2639 * lib/bitset.h (bitset_bytes): Likewise.
2640 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2641 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2642 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2643 * lib/ebitset.c (ebitset_bytes): Likewise.
2644 * lib/ebitset.h (ebitset_bytes): Likewise.
2645 * lib/lbitset.c (lbitset_bytes): Likewise.
2646 * lib/lbitset.h (lbitset_bytes): Likewise.
2647
2648 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2649 abitset_subset_p, abitset_disjoint_p, abitset_and,
2650 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2651 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2652 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2653 abitset_or_and, abitset_or_and_cmp):
2654 Use bitset_windex instead of unsigned int.
2655 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2656 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2657 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2658 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2659 Likewise.
2660 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2661
2662 * lib/bitset.c (bitset_print):
2663 Use proper printf formats for widths of integer types.
2664 * lib/bitset_stats.c (bitset_percent_histogram_print,
2665 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2666 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2667 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2668 * lib/lbitset.c (lbitset_bytes): Likewise.
2669
2670 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2671 BITSET_SIZE_MAX): New macros.
2672 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2673 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2674 to BITSET_WINDEX_MAX.
2675
2676 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2677 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2678 since we now return the bitset_bindex type (not int).
2679
2680 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2681 when computing sizes.
2682 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2683
2684 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2685 and avoid cast to unsigned.
2686
2687 2002-09-30 Akim Demaille <akim@epita.fr>
2688
2689 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2690 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2691 Updates from Michael Hayes.
2692
2693 2002-09-30 Art Haas <ahaas@neosoft.com>
2694
2695 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2696 invocations.
2697 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2698 defined.
2699
2700 2002-09-27 Akim Demaille <akim@epita.fr>
2701
2702 Version 1.49c.
2703
2704 2002-09-27 Akim Demaille <akim@epita.fr>
2705
2706 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2707 (Because of AC_LIBSOURCE).
2708
2709 2002-09-27 Akim Demaille <akim@epita.fr>
2710
2711 Playing with Autoscan.
2712
2713 * configure.ac: Remove the old LIBOBJ tweaks.
2714 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2715 * lib/strrchr.c: New.
2716 * lib/strtol.c: New, from the Coreutils 4.5.1.
2717
2718 2002-09-27 Akim Demaille <akim@epita.fr>
2719
2720 Playing with Autoscan.
2721
2722 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2723 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2724 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2725 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2726 Coreutils 4.5.1.
2727
2728 2002-09-24 Akim Demaille <akim@epita.fr>
2729
2730 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2731 (Frequently Asked Questions, Parser Stack Overflow): New.
2732
2733 2002-09-13 Akim Demaille <akim@epita.fr>
2734
2735 Playing with autoscan.
2736
2737 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2738 * src/files.c (skeleton_find): Remove, unused.
2739 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2740 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2741
2742 2002-09-13 Akim Demaille <akim@epita.fr>
2743
2744 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2745 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2746
2747 2002-09-13 Akim Demaille <akim@epita.fr>
2748
2749 * configure.ac: Require 2.54.
2750 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2751 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2752 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2753 Remove, provided by Autoconf macros.
2754
2755 2002-09-12 Akim Demaille <akim@epita.fr>
2756
2757 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2758
2759 2002-09-12 Akim Demaille <akim@epita.fr>
2760
2761 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2762 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2763 Reported by Martin Mokrejs.
2764
2765 2002-09-10 Akim Demaille <akim@epita.fr>
2766
2767 * src/parse-gram.y: Associate a human readable string to each
2768 token type.
2769 * tests/regression.at (Invalid inputs): Adjust.
2770
2771 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2772
2773 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2774 with an Autoconf-2.5x style configure.ac.
2775
2776 2002-09-06 Paul Eggert <eggert@twinsun.com>
2777
2778 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2779 exception applies only to yacc.c. This is a modification of a
2780 patch originally suggested by Akim Demaille.
2781
2782 2002-09-06 Akim Demaille <akim@epita.fr>
2783
2784 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2785 here to...
2786 * data/yacc.c: here.
2787
2788 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2789 LocationType.
2790 (b4_ltype): Default to yy::Location from location.hh.
2791
2792 2002-09-04 Jim Meyering <jim@meyering.net>
2793
2794 * data/yacc.c: Guard the declaration of yytoknum also with
2795 `#ifdef YYPRINT', so it is declared only when used.
2796
2797 2002-09-04 Akim Demaille <akim@epita.fr>
2798
2799 * configure.in: Rename as...
2800 * configure.ac: this.
2801 Bump to 1.49c.
2802
2803 2002-09-04 Akim Demaille <akim@epita.fr>
2804
2805 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2806 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2807 translate maintainer only messages.
2808
2809 2002-08-12 Paul Eggert <eggert@twinsun.com>
2810
2811 Version 1.49b.
2812
2813 * Makefile.am (SUBDIRS): Remove intl.
2814 (DISTCLEANFILES): Remove.
2815 * NEWS: Mention that GNU M4 is now required. Clarify what is
2816 meant by "larger grammars". Mention the pt_BR translation.
2817 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2818 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2819 Bump version from 0.11.2 to 0.11.5.
2820 (BISON_PREREQ_STAGE): Remove.
2821 (AM_GNU_GETTEXT): Use external gettext.
2822 (AC_OUTPUT): Remove intl/Makefile.
2823
2824 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2825
2826 * data/glr.c: Include string.h, for strlen.
2827 (yyreportParseError): Use size_t for yysize.
2828 (yy_yypstack): No longer nested inside yypstates, as nested
2829 functions are not portable. Do not assume size_t is the
2830 same width as int.
2831 (yypstates): Do not assume that ptrdiff_t is the same width
2832 as int, and similarly for yyposn and YYINDEX.
2833
2834 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2835
2836 * lib/Makefile.am (INCLUDES): Do not include from the intl
2837 directory, which has been removed.
2838 * src/Makefile.am (INCLUDES): Likewise.
2839
2840 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2841 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2842 New vars.
2843
2844 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2845 * tests/Makefile.am (EXTRA_DIST): Likewise.
2846
2847 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2848 Do not assume that bitset_windex is the same width as unsigned.
2849
2850 * lib/abitset.c (abitset_unused_clear): Do not assume that
2851 bitset_word is the same width as int.
2852 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2853 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2854 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2855 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2856 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2857
2858 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2859 portability to one's complement hosts!).
2860 * lib/ebitset.c (ebitset_op1): Likewise.
2861 * lib/lbitset.c (lbitset_op1): Likewise.
2862
2863 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2864 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2865 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2866 Sync with fileutils.
2867 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2868 lib/gettext.h: Sync with diffutils.
2869
2870 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2871 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2872
2873 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2874 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2875 check for void *.
2876
2877 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2878 size_t; the old version tried to do this but casted improperly.
2879 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2880 (bitset_test): Now returns int, not unsigned long.
2881
2882 * lib/bitset_stats.c: Include "gettext.h".
2883 (_): New macro.
2884 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2885 name locals "index", as it generates unnecessary warnings on some
2886 hosts that have an "index" function.
2887
2888 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2889 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2890 they need translation.
2891 * src/LR0.c (state_list_append, new_itemsets, get_state,
2892 append_states, generate_states): Likewise.
2893 * src/assoc.c (assoc_to_string): Likewise.
2894 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2895 * src/gram.c (grammar_dump): Likewise.
2896 * src/injections.c (injections_compute): Likewise.
2897 * src/lalr.c (lookaheads_print): Likewise.
2898 * src/relation.c (relation_transpose): Likewise.
2899 * src/scan-gram.l: Likewise.
2900 * src/tables.c (table_grow, pack_vector): Likewise.
2901
2902 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2903 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2904 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2905 * m4/mbstate_t.m4: Sync with fileutils.
2906 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2907
2908 * po/LINGUAS: Add pt_BR.
2909 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2910 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2911 lib/timevar.c.
2912 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2913 manual recommends.
2914 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2915
2916 * src/complain.c (strerror_r): Remove decl; not needed.
2917 (strerror): Use same pattern as ../lib/error.c.
2918
2919 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2920
2921 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2922
2923 * src/main.c (main): Cast result of bindtextdomain and textdomain
2924 to void, to avoid a GCC warning when --disable-nls is in effect.
2925
2926 * src/scan-gram.l: Use strings rather than escapes when possible,
2927 to minimize the number of warnings from xgettext.
2928 (handle_action_dollar, handle_action_at): Don't use isdigit,
2929 as it mishandles negative chars and it may not work as expected
2930 outside the C locale.
2931
2932 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2933 this is a GCC extension and is not portable to other compilers.
2934
2935 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2936 Do not include <ctype.h>; no longer needed.
2937 Do not include <malloc.h>; no longer needed (and generates
2938 warnings on OpenBSD 3.0).
2939
2940 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2941 it's not portable.
2942
2943 * tests/regression.at: Do not use 'cc -c input.c -o input';
2944 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2945
2946 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2947 exit status as failure, not just exit status 1. Sun C exits
2948 with status 2 sometimes.
2949
2950 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2951 Use it for the two large tests.
2952
2953 2002-08-02 Akim Demaille <akim@epita.fr>
2954
2955 * src/conflicts.c (conflicts_output): Don't output rules never
2956 reduced here, since anyway that computation doesn't work.
2957 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2958 (rule_useless_p, rule_never_reduced_p): New.
2959 (grammar_rules_partial_print): Use a filter instead of a range.
2960 Display the title only if needed.
2961 (grammar_rules_print): Adjust.
2962 (grammar_rules_never_reduced_report): New.
2963 * src/tables.c (action_row): Move the computation of rules never
2964 reduced to...
2965 (token_actions): here.
2966 * src/main.c (main): Make the parser before making the report, so
2967 that rules never reduced are computed.
2968 Call grammar_rules_never_reduced_report.
2969 * src/print.c (print_results): Report rules never reduced.
2970 * tests/conflicts.at, tests/reduce.at: Adjust.
2971
2972 2002-08-01 Akim Demaille <akim@epita.fr>
2973
2974 Instead of attaching lookaheads and duplicating the rules being
2975 reduced by a state, attach the lookaheads to the reductions.
2976
2977 * src/state.h (state_t): Remove the `lookaheads',
2978 `lookaheads_rule' member.
2979 (reductions_t): Add a `lookaheads' member.
2980 Use a regular array for the `rules'.
2981 * src/state.c (reductions_new): Initialize the lookaheads member
2982 to 0.
2983 (state_rule_lookaheads_print): Adjust.
2984 * src/state.h, src/state.c (state_reductions_find): New.
2985 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2986 (count_rr_conflicts): Adjust.
2987 * src/lalr.c (LArule): Remove.
2988 (add_lookback_edge): Adjust.
2989 (state_lookaheads_count): New.
2990 (states_lookaheads_initialize): Merge into...
2991 (initialize_LA): this.
2992 (lalr_free): Adjust.
2993 * src/main.c (main): Don't free nullable and derives too early: it
2994 is used by --verbose.
2995 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2996
2997 2002-08-01 Akim Demaille <akim@epita.fr>
2998
2999 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3000 `rule_number_t**'.
3001 (set_derives, free_derives): Rename as...
3002 (derives_compute, derives_free): this.
3003 Adjust all dependencies.
3004 * src/nullable.c (set_nullable, free_nullable): Rename as...
3005 (nullable_compute, nullable_free): these.
3006 (rule_list_t): Store rule_t *, not rule_number_t.
3007 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3008 pointers, instead of their numbers.
3009 * src/main.c (main): Call nullable_free, and derives_free earlier,
3010 as they were lo longer used.
3011
3012 2002-08-01 Akim Demaille <akim@epita.fr>
3013
3014 * lib/timevar.c (get_time): Include children time.
3015 * src/lalr.h (LA, LArule): Don't export them: used with the
3016 state_t.
3017 * src/lalr.c (LA, LArule): Static.
3018 * src/lalr.h, src/lalr.c (lalr_free): New.
3019 * src/main.c (main): Call it.
3020 * src/tables.c (pack_vector): Check whether loc is >= to the
3021 table_size, not >.
3022 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3023 (tables_generate): do it, since that's also it which allocates
3024 them.
3025 Don't free LA and LArule, main does.
3026
3027 2002-07-31 Akim Demaille <akim@epita.fr>
3028
3029 Separate parser tables computation and output.
3030
3031 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3032 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3033 (yydefgoto, yydefact, high): Move to...
3034 * src/tables.h, src/tables.c: here.
3035 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3036 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3037 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3038 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3039 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3040 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3041 (action_row, save_row, token_actions, save_column, default_goto)
3042 (goto_actions, sort_actions, matching_state, pack_vector)
3043 (table_ninf_remap, pack_table, prepare_actions): Move to...
3044 * src/tables.c: here.
3045 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3046 * src/output.c (token_actions, output_base, output_conflicts)
3047 (output_check): Merge into...
3048 (prepare_actions): this.
3049 (actions_output): Rename as...
3050 (user_actions_output): this.
3051 * src/main.c (main): Call tables_generate and tables_free.
3052
3053 2002-07-31 Akim Demaille <akim@epita.fr>
3054
3055 Steal GCC's --time-report support.
3056
3057 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3058 stolen/adjusted from GCC.
3059 * m4/stage.m4: Remove time related checks.
3060 * m4/timevar.m4: New.
3061 * configure.in: Adjust.
3062 * src/system.h: Adjust to using timevar.h.
3063 * src/getargs.h, src/getargs.c: Support trace_time for
3064 --trace=time.
3065 * src/main.c (stage): Remove.
3066 (main): Replace `stage' invocations with timevar calls.
3067 * src/output.c: Insert pertinent timevar calls.
3068
3069 2002-07-31 Akim Demaille <akim@epita.fr>
3070
3071 Let --trace have arguments.
3072
3073 * src/getargs.h (enum trace_e): New.
3074 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3075 (long_options, short_options): --trace/-T takes an optional
3076 argument.
3077 Change all the uses of trace_flag to reflect the new flags.
3078 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3079
3080 Strengthen `stage' portability.
3081
3082 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3083 * configure.in: Use it.
3084 Don't check for malloc.h and sys/times.h.
3085 * src/system.h: Include them when appropriate.
3086 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3087 times and struct tms are available.
3088
3089 2002-07-30 Akim Demaille <akim@epita.fr>
3090
3091 In verbose parse error message, don't report `error' as an
3092 expected token.
3093 * tests/actions.at (Printers and Destructors): Adjust.
3094 * tests/calc.at (Calculator $1): Adjust.
3095 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3096 error message, do not report the parser accepts the error token in
3097 that state.
3098
3099 2002-07-30 Akim Demaille <akim@epita.fr>
3100
3101 Normalize conflict related messages.
3102
3103 * src/complain.h, src/complain.c (warn, complain): New.
3104 * src/conflicts.c (conflicts_print): Use them.
3105 (conflict_report_yacc): New, extracted from...
3106 (conflicts_print): here.
3107 * tests/conflicts.at, tests/existing.at: Adjust.
3108
3109 2002-07-30 Akim Demaille <akim@epita.fr>
3110
3111 Report rules which are never reduced by the parser: those hidden
3112 by conflicts.
3113
3114 * src/LR0.c (save_reductions): Don't make the final state too
3115 different: save its reduction (accept) instead of having a state
3116 without any action (no shift or goto, no reduce).
3117 Note: the final state is now a ``regular'' state, i.e., the
3118 parsers now contain `reduce 0' as default reduction.
3119 Nevertheless, since they decide to `accept' when yystate =
3120 final_state, they still will not reduce rule 0.
3121 * src/print.c (print_actions, print_reduction): Adjust.
3122 * src/output.c (action_row): Track reduced rules.
3123 (token_actions): Report rules never reduced.
3124 * tests/conflicts.at, tests/regression.at: Adjust.
3125
3126 2002-07-30 Akim Demaille <akim@epita.fr>
3127
3128 `stage' was accidently included in a previous patch.
3129 Initiate its autoconfiscation.
3130
3131 * configure.in: Look for malloc.h and sys/times.h.
3132 * src/main.c (stage): Adjust.
3133 Report only when trace_flag.
3134
3135 2002-07-29 Akim Demaille <akim@epita.fr>
3136
3137 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3138 state_number_t.
3139 (errs_t): symbol_t*, not symbol_number_t.
3140 (reductions_t): rule_t*, not rule_number_t.
3141 (FOR_EACH_SHIFT): New.
3142 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3143 * src/print.c, src/print_graph.c: Adjust.
3144
3145 2002-07-29 Akim Demaille <akim@epita.fr>
3146
3147 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3148
3149 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3150 (endtoken, accept): these.
3151 * src/reader.c (reader): Set endtoken's default tag to "$end".
3152 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3153 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3154 Adjust.
3155
3156 2002-07-29 Akim Demaille <akim@epita.fr>
3157
3158 * src/reduce.c (reduce_grammar): When the language is empty,
3159 complain about the start symbol, not the axiom.
3160 Use its location.
3161 * tests/reduce.at (Empty Language): New.
3162
3163 2002-07-26 Akim Demaille <akim@epita.fr>
3164
3165 * src/reader.h, src/reader.c (gram_error): ... can't get
3166 yycontrol without making too strong assumptions on the parser
3167 itself.
3168 * src/output.c (prepare_tokens): Use the real 0th value of
3169 token_translations instead of `0'.
3170 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3171 visible here.
3172 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3173 for the time being: %locations ought to provide it to yyerror.
3174
3175 2002-07-25 Akim Demaille <akim@epita.fr>
3176
3177 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3178 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3179 * tests/regression.at (Web2c Actions): Adjust.
3180
3181 2002-07-25 Akim Demaille <akim@epita.fr>
3182
3183 Stop storing rules from 1 to nrules + 1.
3184
3185 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3186 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3187 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3188 Iterate from 0 to nrules.
3189 Use rule_number_as_item_number and item_number_as_rule_number.
3190 Adjust to `derive' now containing possibly 0.
3191 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3192 Handle the `- 1' part in rule numbers from/to item numbers.
3193 * src/conflicts.c (log_resolution): Fix the message which reversed
3194 shift and reduce.
3195 * src/output.c (action_row): Initialize default_rule to -1.
3196 (token_actions): Adjust.
3197 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3198 expected output.
3199 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3200
3201 2002-07-25 Akim Demaille <akim@epita.fr>
3202
3203 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3204 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3205 (b4_c_knr_arg_decl): New.
3206 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3207 yyreport_parse_error.
3208
3209 2002-07-25 Akim Demaille <akim@epita.fr>
3210
3211 * data/yacc.c (yyreport_parse_error): New, extracted from...
3212 (yyparse): here.
3213 (yydestruct, yysymprint): Move above yyparse.
3214 Be K&R compliant.
3215
3216 2002-07-25 Akim Demaille <akim@epita.fr>
3217
3218 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3219 replace...
3220 (b4_sint_type, b4_uint_type): these.
3221 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3222 * tests/regression.at (Web2c Actions): Adjust.
3223
3224 2002-07-25 Akim Demaille <akim@epita.fr>
3225
3226 * src/gram.h (TIEM_NUMBER_MAX): New.
3227 (item_number_of_rule_number, rule_number_of_item_number): Rename
3228 as...
3229 (rule_number_as_item_number, item_number_as_rule_number): these.
3230 Adjust dependencies.
3231 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3232 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3233 (symbol_number_to_vector_number): New.
3234 (order): Of vector_number_t* type.
3235 (base_t, BASE_MAX, BASE_MIN): New.
3236 (froms, tos, width, pos, check): Of base_t type.
3237 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3238 (actrow): Of action_number_t type.
3239 (conflrow): Of unsigned int type.
3240 (table_ninf, base_ninf): New.
3241 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3242 (muscle_insert_int_table, muscle_insert_base_table)
3243 (muscle_insert_rule_number_table): New.
3244 (prepare_tokens): Output `toknum' as int_table.
3245 (action_row): Returns a rule_number_t.
3246 Use ACTION_MIN, not SHRT_MIN.
3247 (token_actions): yydefact is rule_number_t*.
3248 (table_ninf_remap): New.
3249 (pack_table): Use it for `base' and `table'.
3250 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3251 replaced with...
3252 (YYPACT_NINF, YYTABLE_NINF): these.
3253 (yypact, yytable): Compute their types instead of hard-coded
3254 `short'.
3255 * tests/regression.at (Web2c Actions): Adjust.
3256
3257 2002-07-19 Akim Demaille <akim@epita.fr>
3258
3259 * src/scan-gram.l (id): Can start with an underscore.
3260
3261 2002-07-16 Akim Demaille <akim@epita.fr>
3262
3263 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3264 Adjust all former `associativity' dependencies.
3265 * src/symtab.c (symbol_new): Default associativity is `undef', not
3266 `right'.
3267 (symbol_check_alias_consistence): Adjust.
3268
3269 2002-07-09 Akim Demaille <akim@epita.fr>
3270
3271 * doc/bison.texinfo: Properly set the ``header'' part.
3272 Use @dircategory ``GNU programming tools'' as per Texinfo's
3273 documentation.
3274 Use @copying.
3275
3276 2002-07-09 Akim Demaille <akim@epita.fr>
3277
3278 * lib/quotearg.h: Protect against multiple inclusions.
3279 * src/location.h (location_t): Add a `file' member.
3280 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3281 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3282 `error_one_per_line' support.
3283
3284 2002-07-09 Akim Demaille <akim@epita.fr>
3285
3286 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3287 * src/reader.c (lineno): Remove.
3288 Adjust all dependencies.
3289 (get_merge_function): Take a location and use complain_at.
3290 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3291 * tests/regression.at (Invalid inputs, Mixing %token styles):
3292 Adjust.
3293
3294 2002-07-09 Akim Demaille <akim@epita.fr>
3295
3296 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3297 recovery rule, and forbid extensions when --yacc.
3298 (gram_error): Use complain_at.
3299 * src/reader.c (reader): Exit if there were parse errors.
3300
3301 2002-07-09 Akim Demaille <akim@epita.fr>
3302
3303 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3304 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3305 Reported by R Blake <blakers@mac.com>.
3306
3307 2002-07-09 Akim Demaille <akim@epita.fr>
3308
3309 * data/yacc.c: Output the copyright notive in the header.
3310
3311 2002-07-03 Akim Demaille <akim@epita.fr>
3312
3313 * src/output.c (froms, tos): Are state_number_t.
3314 (save_column): sp, sp1, and sp2 are state_number_t.
3315 (prepare): Rename `final' as `final_state_number', `nnts' as
3316 `nterms_number', `nrules' as `rules_number', `nstates' as
3317 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3318 unused.
3319 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3320 * data/lalr1.cc (nsym_): Remove, unused.
3321
3322 2002-07-03 Akim Demaille <akim@epita.fr>
3323
3324 * src/lalr.h, src/lalr.c (goto_number_t): New.
3325 * src/lalr.c (goto_list_t): New.
3326 Propagate them.
3327 * src/nullable.c (rule_list_t): New.
3328 Propagate.
3329 * src/types.h: Remove.
3330
3331 2002-07-03 Akim Demaille <akim@epita.fr>
3332
3333 * src/closure.c (print_fderives): Use rule_rhs_print.
3334 * src/derives.c (print_derives): Use rule_rhs_print.
3335 (rule_list_t): New, replaces `shorts'.
3336 (set_derives): Add comments.
3337 * tests/sets.at (Nullable, Firsts): Adjust.
3338
3339 2002-07-03 Akim Demaille <akim@epita.fr>
3340
3341 * src/output.c (prepare_actions): Free `tally' and `width'.
3342 (prepare_actions): Allocate and free `order'.
3343 * src/symtab.c (symbols_free): Free `symbols'.
3344 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3345 * src/output.c (m4_invoke): Move to...
3346 * src/scan-skel.l: here.
3347 (<<EOF>>): Close yyout, and free its name.
3348
3349 2002-07-03 Akim Demaille <akim@epita.fr>
3350
3351 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3352
3353 * src/LR0.c (new_state): Merge into...
3354 (state_list_append): this.
3355 (new_states): Merge into...
3356 (generate_states): here.
3357 (set_states): Don't ensure a proper `errs' state member here, do it...
3358 * src/conflicts.c (conflicts_solve): here.
3359 * src/state.h, src/state.c: Comment changes.
3360 (state_t): Rename member `shifts' as `transitions'.
3361 Adjust all dependencies.
3362 (errs_new): For consistency, also take the values as argument.
3363 (errs_dup): Remove.
3364 (state_errs_set): New.
3365 (state_reductions_set, state_transitions_set): Assert that no
3366 previous value was assigned.
3367 (state_free): New.
3368 (states_free): Use it.
3369 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3370 temporary storage: use `errs' and `nerrs' as elsewhere.
3371 (set_conflicts): Allocate and free this `errs'.
3372
3373 2002-07-02 Akim Demaille <akim@epita.fr>
3374
3375 * lib/libiberty.h: New.
3376 * lib: Update the bitset implementation from upstream.
3377 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3378 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3379 * src/main.c: Adjust bitset stats calls.
3380
3381 2002-07-01 Paul Eggert <eggert@twinsun.com>
3382
3383 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3384 char, so that negative chars don't collide with $.
3385
3386 2002-06-30 Akim Demaille <akim@epita.fr>
3387
3388 Have the GLR tests be `warning' checked, and fix the warnings.
3389
3390 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3391 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3392 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3393 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3394 (yyaddDeferredAction): static.
3395 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3396 (yyreportParseError): yyprefix is const.
3397 yytokenp is used only when verbose.
3398 (yy__GNUC__): Replace with __GNUC__.
3399 (yypdumpstack): yyi is size_t.
3400 (yypreference): Un-yy local variables and arguments, to avoid
3401 clashes with `yyr1'. Anyway, we are not in the user name space.
3402 (yytname_size): be an int, as is compared with ints.
3403 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3404 Use them.
3405 * tests/cxx-gram.at: Use quotation to protect $1.
3406 Use AT_COMPILE to enable warnings hunts.
3407 Prototype yylex and yyerror.
3408 `Use' argc.
3409 Include `string.h', not `strings.h'.
3410 Produce and prototype stmtMerge only when used.
3411 yylex takes a location.
3412
3413 2002-06-30 Akim Demaille <akim@epita.fr>
3414
3415 We spend a lot of time in quotearg, in particular when --verbose.
3416
3417 * src/symtab.c (symbol_get): Store a quoted version of the key.
3418 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3419 Adjust all callers.
3420
3421 2002-06-30 Akim Demaille <akim@epita.fr>
3422
3423 * src/state.h (reductions_t): Rename member `nreds' as num.
3424 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3425 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3426
3427 2002-06-30 Akim Demaille <akim@epita.fr>
3428
3429 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3430 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3431 (shifts_to): Rename as...
3432 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3433 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3434 (TRANSITION_IS_DISABLED, transitions_to): these.
3435
3436 2002-06-30 Akim Demaille <akim@epita.fr>
3437
3438 * src/print.c (print_shifts, print_gotos): Merge into...
3439 (print_transitions): this.
3440 (print_transitions, print_errs, print_reductions): Align the
3441 lookaheads columns.
3442 (print_core, print_transitions, print_errs, print_state,
3443 print_grammar): Output empty lines separator before, not after.
3444 (state_default_rule_compute): Rename as...
3445 (state_default_rule): this.
3446 * tests/conflicts.at (Defaulted Conflicted Reduction),
3447 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3448 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3449
3450 2002-06-30 Akim Demaille <akim@epita.fr>
3451
3452 Display items as we display rules.
3453
3454 * src/gram.h, src/gram.c (rule_lhs_print): New.
3455 * src/gram.c (grammar_rules_partial_print): Use it.
3456 * src/print.c (print_core): Likewise.
3457 * tests/conflicts.at (Defaulted Conflicted Reduction),
3458 (Unresolved SR Conflicts): Adjust.
3459 (Unresolved SR Conflicts): Adjust and rename as...
3460 (Resolved SR Conflicts): this, as was meant.
3461 * tests/regression.at (Web2c Report): Adjust.
3462
3463 2002-06-30 Akim Demaille <akim@epita.fr>
3464
3465 * src/print.c (state_default_rule_compute): New, extracted from...
3466 (print_reductions): here.
3467 Pessimize, but clarify the code.
3468 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3469
3470 2002-06-30 Akim Demaille <akim@epita.fr>
3471
3472 * src/output.c (action_row): Let default_rule be always a rule
3473 number.
3474
3475 2002-06-30 Akim Demaille <akim@epita.fr>
3476
3477 * src/closure.c (print_firsts, print_fderives, closure):
3478 Use BITSET_EXECUTE.
3479 * src/lalr.c (lookaheads_print): Likewise.
3480 * src/state.c (state_rule_lookaheads_print): Likewise.
3481 * src/print_graph.c (print_core): Likewise.
3482 * src/print.c (print_reductions): Likewise.
3483 * src/output.c (action_row): Likewise.
3484 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3485
3486 2002-06-30 Akim Demaille <akim@epita.fr>
3487
3488 * src/print_graph.c: Use report_flag.
3489
3490 2002-06-30 Akim Demaille <akim@epita.fr>
3491
3492 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3493 to...
3494 * src/relation.h, src/relation.c (traverse, relation_digraph)
3495 (relation_print, relation_transpose): New.
3496
3497 2002-06-30 Akim Demaille <akim@epita.fr>
3498
3499 * src/state.h, src/state.c (shifts_to): New.
3500 * src/lalr.c (build_relations): Use it.
3501
3502 2002-06-30 Akim Demaille <akim@epita.fr>
3503
3504 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3505 (item_number_of_rule_number, rule_number_of_item_number): New.
3506 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3507 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3508 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3509 Propagate their use.
3510 Much remains to be done, in particular wrt `shorts' from types.h.
3511
3512 2002-06-30 Akim Demaille <akim@epita.fr>
3513
3514 * src/symtab.c (symbol_new): Initialize the `printer' member.
3515
3516 2002-06-30 Akim Demaille <akim@epita.fr>
3517
3518 * src/LR0.c (save_reductions): Remove, replaced by...
3519 * src/state.h, src/state.c (state_reductions_set): New.
3520 (reductions, errs): Rename as...
3521 (reductions_t, errs_t): these.
3522 Adjust all dependencies.
3523
3524 2002-06-30 Akim Demaille <akim@epita.fr>
3525
3526 * src/LR0.c (state_list_t, state_list_append): New.
3527 (first_state, last_state): Now symbol_list_t.
3528 (this_state): Remove.
3529 (new_itemsets, append_states, save_reductions): Take a state_t as
3530 argument.
3531 (set_states, generate_states): Adjust.
3532 (save_shifts): Remove, replaced by...
3533 * src/state.h, src/state.c (state_shifts_set): New.
3534 (shifts): Rename as...
3535 (shifts_t): this.
3536 Adjust all dependencies.
3537 * src/state.h (state_t): Remove the `next' member.
3538
3539 2002-06-30 Akim Demaille <akim@epita.fr>
3540
3541 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3542 escaped in slot 0.
3543
3544 2002-06-30 Akim Demaille <akim@epita.fr>
3545
3546 Use hash.h for the state hash table.
3547
3548 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3549 (allocate_storage): Use state_hash_new.
3550 (free_storage): Use state_hash_free.
3551 (new_state, get_state): Adjust.
3552 * src/lalr.h, src/lalr.c (states): Move to...
3553 * src/states.h (state_t): Remove the `link' member, no longer
3554 used.
3555 * src/states.h, src/states.c: here.
3556 (state_hash_new, state_hash_free, state_hash_lookup)
3557 (state_hash_insert, states_free): New.
3558 * src/states.c (state_table, state_compare, state_hash): New.
3559 * src/output.c (output_actions): Do not free states now, since we
3560 still need to know the final_state number in `prepare', called
3561 afterwards. Do it...
3562 * src/main.c (main): here: call states_free after `output'.
3563
3564 2002-06-30 Akim Demaille <akim@epita.fr>
3565
3566 * src/state.h, src/state.c (state_new): New, extracted from...
3567 * src/LR0.c (new_state): here.
3568 * src/state.h (STATE_ALLOC): Move to...
3569 * src/state.c: here.
3570 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3571 * src/state.h, src/state.c: here.
3572
3573 2002-06-30 Akim Demaille <akim@epita.fr>
3574
3575 * src/reader.c (gensym): Rename as...
3576 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3577 (getsym): Rename as...
3578 (symbol_get): this.
3579
3580 2002-06-30 Akim Demaille <akim@epita.fr>
3581
3582 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3583 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3584 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3585 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3586
3587 2002-06-30 Akim Demaille <akim@epita.fr>
3588
3589 Make the test suite pass with warnings checked.
3590
3591 * tests/actions.at (Printers and Destructors): Improve.
3592 Avoid unsigned vs. signed issues.
3593 * tests/calc.at: Don't exercise the scanner here, do it...
3594 * tests/input.at (Torturing the Scanner): here.
3595
3596 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3597
3598 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3599 reorganize first lines parallel to yacc.c.
3600
3601 2002-06-28 Akim Demaille <akim@epita.fr>
3602
3603 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3604 (b4_token_enum, b4_token_defines): New, factored from...
3605 * data/lalr1.cc, data/yacc.c, glr.c: here.
3606
3607 2002-06-28 Akim Demaille <akim@epita.fr>
3608
3609 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3610 unused variables.
3611 * src/output.c (merger_output): static.
3612
3613 2002-06-28 Akim Demaille <akim@epita.fr>
3614
3615 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3616 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3617 pacify GCC.
3618 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3619
3620 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3621
3622 Accumulated changelog for new GLR parsing features.
3623
3624 * src/conflicts.c (count_total_conflicts): Change name to
3625 conflicts_total_count.
3626 * src/conflicts.h: Ditto.
3627 * src/output.c (token_actions): Use the new name.
3628 (output_conflicts): Change conflp => conflict_list_heads, and
3629 confl => conflict_list for better readability.
3630 * data/glr.c: Use the new names.
3631 * NEWS: Add self to GLR announcement.
3632
3633 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3634
3635 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3636 Akim Demaille.
3637
3638 * data/bison.glr: Change name to glr.c
3639 * data/glr.c: Renamed from bison.glr.
3640 * data/Makefile.am: Add glr.c
3641
3642 * src/getargs.c:
3643
3644 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3645 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3646
3647 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3648
3649 * data/bison.glr: Be sure to restore the
3650 current #line when returning to the skeleton contents after having
3651 exposed the input file's #line.
3652
3653 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3654
3655 * data/bison.glr: Bring up to date with changes to bison.simple.
3656
3657 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3658
3659 * data/bison.glr: Correct definitions that use b4_prefix.
3660 Various reformatting.
3661 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3662 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3663 yytokenp argument; now part of stack.
3664 (yychar): Define to behave as documented.
3665 (yyclearin): Ditto.
3666
3667 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3668
3669 * src/reader.h: Add declaration for free_merger_functions.
3670
3671 * src/reader.c (merge_functions): New variable.
3672 (get_merge_function): New function.
3673 (free_merger_functions): New function.
3674 (readgram): Check for %prec that is not followed by a symbol.
3675 Handle %dprec and %merge declarations.
3676 (packgram): Initialize dprec and merger fields in rules array.
3677
3678 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3679 conflict_list_cnt, conflict_list_free): New variables.
3680 (table_grow): Also grow conflict_table.
3681 (prepare_rules): Output dprec and merger tables.
3682 (conflict_row): New function.
3683 (action_row): Output conflict lists for GLR parser. Don't use
3684 default reduction in conflicted states for GLR parser so that there
3685 are spaces for the conflict lists.
3686 (save_row): Also save conflict information.
3687 (token_actions): Allocate conflict list.
3688 (merger_output): New function.
3689 (pack_vector): Pack conflict table, too.
3690 (output_conflicts): New function to output yyconflp and yyconfl.
3691 (output_check): Allocate conflict_tos.
3692 (output_actions): Output conflict tables, also.
3693 (output_skeleton): Output b4_mergers definition.
3694 (prepare): Output b4_max_rhs_length definition.
3695 Use 'bison.glr' as default skeleton for GLR parsers.
3696
3697 * src/gram.c (glr_parser): New flag.
3698 (grammar_free): Call free_merger_functions.
3699
3700 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3701 all pairs of conflicting reductions, rather than just all tokens
3702 causing conflicts. Needed to size conflict tables.
3703 (conflicts_output): Modify call to count_rr_conflicts for new
3704 interface.
3705 (conflicts_print): Ditto.
3706 (count_total_conflicts): New function.
3707
3708 * src/reader.h (merger_list): New type.
3709 (merge_functions): New variable.
3710
3711 * src/lex.h (tok_dprec, tok_merge): New token types.
3712
3713 * src/gram.h (rule_s): Add dprec and merger fields.
3714 (glr_parser): New flag.
3715
3716 * src/conflicts.h (count_total_conflicts): New function.
3717
3718 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3719
3720 * doc/bison.texinfo (Generalized LR Parsing): New section.
3721 (GLR Parsers): New section.
3722 (Language and Grammar): Mention GLR parsing.
3723 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3724 Correct typo ("tge" -> "the").
3725
3726 * data/bison.glr: New skeleton for GLR parsing.
3727
3728 * tests/cxx-gram.at: New tests for GLR parsing.
3729
3730 * tests/testsuite.at: Include cxx-gram.at.
3731
3732 * tests/Makefile.am: Add cxx-gram.at.
3733
3734 * src/parse-gram.y:
3735
3736 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3737
3738 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3739
3740 2002-06-27 Akim Demaille <akim@epita.fr>
3741
3742 * src/options.h, src/options.c: Remove.
3743 * src/getargs.c (short_options, long_options): New.
3744
3745 2002-06-27 Akim Demaille <akim@epita.fr>
3746
3747 * data/bison.simple, data/bison.c++: Rename as...
3748 * data/yacc.c, data/lalr1.cc: these.
3749 * doc/bison.texinfo (Environment Variables): Remove.
3750
3751 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3752
3753 * src/getargs.c (report_argmatch): Initialize strtok().
3754
3755 2002-06-20 Akim Demaille <akim@epita.fr>
3756
3757 * data/bison.simple (b4_symbol_actions): New, replaces...
3758 (b4_symbol_destructor, b4_symbol_printer): these.
3759 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3760 user token numbers.
3761
3762 2002-06-20 Akim Demaille <akim@epita.fr>
3763
3764 * data/bison.simple (yydestructor): Rename as...
3765 (yydestruct): this.
3766
3767 2002-06-20 Akim Demaille <akim@epita.fr>
3768
3769 * src/symtab.h, src/symtab.c (symbol_type_set)
3770 (symbol_destructor_set, symbol_precedence_set): The location is
3771 the last argument.
3772 Adjust all callers.
3773
3774 2002-06-20 Akim Demaille <akim@epita.fr>
3775
3776 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3777 internals.
3778 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3779 Takes a location.
3780 * src/symtab.h, src/symtab.c (symbol_class_set)
3781 (symbol_user_token_number_set): Likewise.
3782 Adjust all callers.
3783 Promote complain_at.
3784 * tests/input.at (Type Clashes): Adjust.
3785
3786 2002-06-20 Akim Demaille <akim@epita.fr>
3787
3788 * data/bison.simple (YYLEX): Fix the declaration when
3789 %pure-parser.
3790
3791 2002-06-20 Akim Demaille <akim@epita.fr>
3792
3793 * data/bison.simple (yysymprint): Don't print the token number,
3794 just its name.
3795 * tests/actions.at (Destructors): Rename as...
3796 (Printers and Destructors): this.
3797 Also exercise %printer.
3798
3799 2002-06-20 Akim Demaille <akim@epita.fr>
3800
3801 * data/bison.simple (YYDSYMPRINT): New.
3802 Use it to remove many of the #if YYDEBUG/if (yydebug).
3803
3804 2002-06-20 Akim Demaille <akim@epita.fr>
3805
3806 * src/symtab.h, src/symtab.c (symbol_t): printer and
3807 printer_location are new members.
3808 (symbol_printer_set): New.
3809 * src/parse-gram.y (PERCENT_PRINTER): New token.
3810 Handle its associated rule.
3811 * src/scan-gram.l: Adjust.
3812 (handle_destructor_at, handle_destructor_dollar): Rename as...
3813 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3814 * src/output.c (symbol_printers_output): New.
3815 (output_skeleton): Call it.
3816 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3817 since there are already many grammar files with a user `yyprint'.
3818 Replace the calls to YYPRINT to calls to yysymprint.
3819 * tests/calc.at: Adjust.
3820 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3821 taking advantage of parser very internal details (stack size!).
3822
3823 2002-06-20 Akim Demaille <akim@epita.fr>
3824
3825 * src/scan-gram.l: Complete the scanner with the missing patterns
3826 to pacify Flex.
3827 Use `quote' and `symbol_tag_get' where appropriate.
3828
3829 2002-06-19 Akim Demaille <akim@epita.fr>
3830
3831 * tests/actions.at (Destructors): Augment to test locations.
3832 * data/bison.simple (yydestructor): Pass it the current location
3833 if locations are enabled.
3834 Prototype only when __STDC__ or C++.
3835 Change the argument names to move into the yy name space: there is
3836 user code here.
3837
3838 2002-06-19 Akim Demaille <akim@epita.fr>
3839
3840 * data/bison.simple (b4_pure_if): New.
3841 Use it instead of #ifdef YYPURE.
3842
3843 2002-06-19 Akim Demaille <akim@epita.fr>
3844
3845 * data/bison.simple (b4_location_if): New.
3846 Use it instead of #ifdef YYLSP_NEEDED.
3847
3848 2002-06-19 Akim Demaille <akim@epita.fr>
3849
3850 Prepare @$ in %destructor, but currently don't bind it in the
3851 skeleton, as %location use is not cleaned up yet.
3852
3853 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3854 (handle_action_at): New.
3855 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3856 a braced_code_t and a location as additional arguments.
3857 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3858 unquote one when outputting `b4_dollar_dollar'.
3859 Adjust callers.
3860 * data/bison.simple (b4_eval): Remove.
3861 (b4_symbol_destructor): Adjust.
3862 * tests/input.at (Invalid @n): Adjust.
3863
3864 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3865
3866 * doc/bison.texinfo: Document ability to have multiple
3867 prologue sections.
3868
3869 2002-06-18 Akim Demaille <akim@epita.fr>
3870
3871 * src/files.c (compute_base_names): When computing the output file
3872 names from the input file name, strip the directory part.
3873
3874 2002-06-18 Akim Demaille <akim@epita.fr>
3875
3876 * data/bison.simple.new: Comment changes.
3877 Reported by Andreas Schwab.
3878
3879 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3880
3881 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3882 there are no `label `yyoverflowlab' defined but not used' warnings
3883 when yyoverflow is defined.
3884
3885 2002-06-18 Akim Demaille <akim@epita.fr>
3886
3887 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3888 new member.
3889 (symbol_destructor_set): Adjust.
3890 * src/output.c (symbol_destructors_output): Output the destructor
3891 locations.
3892 Output the symbol name.
3893 * data/bison.simple (b4_symbol_destructor): Adjust.
3894
3895 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3896 and Akim Demaille <akim@epita.fr>
3897
3898 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3899 what's left on the stack when the error recovery hits EOF.
3900 * tests/actions.at (Destructors): Complete to exercise this case.
3901
3902 2002-06-17 Akim Demaille <akim@epita.fr>
3903
3904 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3905 arguments is really empty, not only equal to `[]'.
3906 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3907 member.
3908 (symbol_destructor_set): New.
3909 * src/output.c (symbol_destructors_output): New.
3910 * src/reader.h (brace_code_t, current_braced_code): New.
3911 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3912 (handle_dollar): Rename as...
3913 (handle_action_dollar): this.
3914 (handle_destructor_dollar): New.
3915 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3916 (grammar_declaration): Use it.
3917 * data/bison.simple (yystos): Is always defined.
3918 (yydestructor): New.
3919 * tests/actions.at (Destructors): New.
3920 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3921
3922 2002-06-17 Akim Demaille <akim@epita.fr>
3923
3924 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3925 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3926 rule_length only when needed.
3927 * src/output.c (actions_output, token_definitions_output): Output
3928 the full M4 block.
3929 * src/symtab.c: Don't access directly to the symbol tag, use
3930 symbol_tag_get.
3931 * src/parse-gram.y: Use symbol_list_free.
3932
3933 2002-06-17 Akim Demaille <akim@epita.fr>
3934
3935 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3936 (symbol_list_prepend, get_type_name): Move to...
3937 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3938 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3939 Adjust all callers.
3940 (symbol_list_free): New.
3941 * src/scan-gram.l (handle_dollar): Takes a location.
3942 * tests/input.at (Invalid $n): Adjust.
3943
3944 2002-06-17 Akim Demaille <akim@epita.fr>
3945
3946 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3947 (symbol_list_prepend): New.
3948 * src/parse-gram.y (%union): `list' is a new member.
3949 (symbols.1): New, replaces...
3950 (terms_to_prec.1, nterms_to_type.1): these.
3951 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3952 Take a location as additional argument.
3953 Adjust all callers.
3954
3955 2002-06-15 Akim Demaille <akim@epita.fr>
3956
3957 * src/parse-gram.y: Move %token in the declaration section so that
3958 we don't depend upon CVS Bison.
3959
3960 2002-06-15 Akim Demaille <akim@epita.fr>
3961
3962 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3963 * src/print.c (print_core): Use it.
3964
3965 2002-06-15 Akim Demaille <akim@epita.fr>
3966
3967 * src/conflicts.c (log_resolution): Accept the rule involved in
3968 the sr conflicts instead of the lookahead number that points to
3969 that rule.
3970 (flush_reduce): Accept the current lookahead vector as argument,
3971 instead of the index in LA.
3972 (resolve_sr_conflict): Accept the current number of lookahead
3973 bitset to consider for the STATE, instead of the index in LA.
3974 (set_conflicts): Adjust.
3975 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3976
3977 2002-06-15 Akim Demaille <akim@epita.fr>
3978
3979 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3980 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3981 Adjust all dependencies.
3982 * src/lalr.c (initialize_lookaheads): Split into...
3983 (states_lookaheads_count, states_lookaheads_initialize): these.
3984 (lalr): Adjust.
3985
3986 2002-06-15 Akim Demaille <akim@epita.fr>
3987
3988 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3989 out of...
3990 (grammar_rules_print): here.
3991 * src/reduce.c (reduce_output): Use it.
3992 * tests/reduce.at (Useless Rules, Reduced Automaton)
3993 (Underivable Rules): Adjust.
3994
3995 2002-06-15 Akim Demaille <akim@epita.fr>
3996
3997 Copy BYacc's nice way to report the grammar.
3998
3999 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4000 New.
4001 Don't print the rules' location, it is confusing and useless.
4002 (rule_print): Use grammar_rhs_print.
4003 * src/print.c (print_grammar): Use grammar_rules_print.
4004
4005 2002-06-15 Akim Demaille <akim@epita.fr>
4006
4007 Complete and rationalize `useless thing' warnings.
4008
4009 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4010 (symbol_tag_print): New.
4011 Use them everywhere in place of accessing directly the tag member.
4012 * src/gram.h, src/gram.c (rule_print): New.
4013 Use it where a rule used to be printed `by hand'.
4014 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4015 (reduce_grammar_tables): Report the useless rules.
4016 (reduce_print): Useless things are a warning, not an error.
4017 Report it as such.
4018 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4019 (Reduced Automaton, Underivable Rules): Adjust.
4020 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4021 * tests/conflicts.at (Unresolved SR Conflicts)
4022 (Solved SR Conflicts): Adjust.
4023
4024 2002-06-15 Akim Demaille <akim@epita.fr>
4025
4026 Let symbols have a location.
4027
4028 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4029 (getsym): Adjust.
4030 Adjust all callers.
4031 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4032 Use location_t, not int.
4033 * src/symtab.c (symbol_check_defined): Take advantage of the
4034 location.
4035 * tests/regression.at (Invalid inputs): Adjust.
4036
4037 2002-06-15 Akim Demaille <akim@epita.fr>
4038
4039 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4040 (input): Don't try to initialize yylloc here, do it in the
4041 scanner.
4042 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4043 * src/gram.h (rule_t): Change line and action_line into location
4044 and action_location, of location_t type.
4045 Adjust all dependencies.
4046 * src/location.h, src/location.c (empty_location): New.
4047 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4048 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4049 (grammar_current_rule_symbol_append)
4050 (grammar_current_rule_action_append): Expect a location as argument.
4051 * src/reader.c (grammar_midrule_action): Adjust to attach an
4052 action's location as dummy symbol location.
4053 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4054 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4055 the line numbers.
4056
4057 2002-06-14 Akim Demaille <akim@epita.fr>
4058
4059 Grammar declarations may be found in the grammar section.
4060
4061 * src/parse-gram.y (rules_or_grammar_declaration): New.
4062 (declarations): Each declaration may end with a semicolon, not
4063 just...
4064 (grammar_declaration): `"%union"'.
4065 (grammar): Branch to rules_or_grammar_declaration.
4066
4067 2002-06-14 Akim Demaille <akim@epita.fr>
4068
4069 * src/main.c (main): Invoke scanner_free.
4070
4071 2002-06-14 Akim Demaille <akim@epita.fr>
4072
4073 * src/output.c (m4_invoke): Extracted from...
4074 (output_skeleton): here.
4075 Free tempfile.
4076
4077 2002-06-14 Akim Demaille <akim@epita.fr>
4078
4079 * src/parse-gram.y (directives, directive, gram)
4080 (grammar_directives, precedence_directives, precedence_directive):
4081 Rename as...
4082 (declarations, declaration, grammar, grammar_declaration)
4083 (precedence_declaration, precedence_declarator): these.
4084 (symbol_declaration): New.
4085
4086 2002-06-14 Akim Demaille <akim@epita.fr>
4087
4088 * src/files.c (action_obstack): Remove, unused.
4089 (output_obstack): Remove it, and all its dependencies, as it is no
4090 longer needed.
4091 * src/reader.c (epilogue_set): Build the epilogue in the
4092 muscle_obstack.
4093 * src/output.h, src/output.c (muscle_obstack): Move to...
4094 * src/muscle_tab.h, src/muscle_tab.h: here.
4095 (muscle_init): Initialize muscle_obstack.
4096 (muscle_free): New.
4097 * src/main.c (main): Call it.
4098
4099 2002-06-14 Akim Demaille <akim@epita.fr>
4100
4101 * src/location.h: New, extracted from...
4102 * src/reader.h: here.
4103 * src/Makefile.am (noinst_HEADERS): Merge into
4104 (bison_SOURCES): this.
4105 Add location.h.
4106 * src/parse-gram.y: Use location_t instead of Bison's.
4107 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4108 Use location_t instead of ints.
4109
4110 2002-06-14 Akim Demaille <akim@epita.fr>
4111
4112 * data/bison.simple, data/bison.c++: Be sure to restore the
4113 current #line when returning to the skeleton contents after having
4114 exposed the input file's #line.
4115
4116 2002-06-12 Akim Demaille <akim@epita.fr>
4117
4118 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4119 eager.
4120 * tests/actions.at (Exotic Dollars): New.
4121
4122 2002-06-12 Akim Demaille <akim@epita.fr>
4123
4124 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4125 ['"/] too eagerly.
4126 * tests/input.at (Torturing the Scanner): New.
4127
4128 2002-06-11 Akim Demaille <akim@epita.fr>
4129
4130 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4131 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4132 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4133 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4134 * src/reader.c (reader): Use it.
4135
4136 2002-06-11 Akim Demaille <akim@epita.fr>
4137
4138 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4139 Adjust all callers.
4140 (scanner_last_string_free): New.
4141
4142 2002-06-11 Akim Demaille <akim@epita.fr>
4143
4144 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4145 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4146 (last_string, YY_OBS_FREE): New.
4147 Use them when returning an ID.
4148
4149 2002-06-11 Akim Demaille <akim@epita.fr>
4150
4151 Have Bison grammars parsed by a Bison grammar.
4152
4153 * src/reader.c, src/reader.h (prologue_augment): New.
4154 * src/reader.c (copy_definition): Remove.
4155
4156 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4157 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4158 (grammar_current_rule_prec_set, grammar_current_rule_check)
4159 (grammar_current_rule_symbol_append)
4160 (grammar_current_rule_action_append): Export.
4161 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4162 (symbol_list_action_append): Remove.
4163 Hook the routines from reader.
4164 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4165 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4166
4167 * src/reader.c (read_declarations): Remove, unused.
4168
4169 * src/parse-gram.y: Handle the epilogue.
4170 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4171 (grammar_start_symbol_set): this.
4172 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4173 * src/reader.c (readgram): Remove, unused.
4174 (reader): Adjust to insert eoftoken and axiom where appropriate.
4175
4176 * src/reader.c (copy_dollar): Replace with...
4177 * src/scan-gram.h (handle_dollar): this.
4178 * src/parse-gram.y: Remove `%thong'.
4179
4180 * src/reader.c (copy_at): Replace with...
4181 * src/scan-gram.h (handle_at): this.
4182
4183 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4184 New.
4185
4186 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4187 time being.
4188
4189 * src/reader.h, src/reader.c (grammar_rule_end): New.
4190
4191 * src/parse.y (current_type, current_class): New.
4192 Implement `%nterm', `%token' support.
4193 Merge `%term' into `%token'.
4194 (string_as_id): New.
4195 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4196 type name.
4197
4198 * src/parse-gram.y: Be sure to handle properly the beginning of
4199 rules.
4200
4201 * src/parse-gram.y: Handle %type.
4202 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4203
4204 * src/parse-gram.y: More directives support.
4205 * src/options.c: No longer handle source directives.
4206
4207 * src/parse-gram.y: Fix %output.
4208
4209 * src/parse-gram.y: Handle %union.
4210 Use the prologue locations.
4211 * src/reader.c (parse_union_decl): Remove.
4212
4213 * src/reader.h, src/reader.c (epilogue_set): New.
4214 * src/parse-gram.y: Use it.
4215
4216 * data/bison.simple, data/bison.c++: b4_stype is now either not
4217 defined, then default to int, or to the contents of %union,
4218 without `union' itself.
4219 Adjust.
4220 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4221
4222 * src/output.c (actions_output): Don't output braces, as they are
4223 already handled by the scanner.
4224
4225 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4226 characters to themselves.
4227
4228 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4229 that the epilogue has a proper #line.
4230
4231 * src/parse-gram.y: Handle precedence/associativity.
4232
4233 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4234 a terminal.
4235 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4236 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4237 at all to define terminals that cannot be emitted.
4238
4239 * src/scan-gram.l: Escape M4 characters.
4240
4241 * src/scan-gram.l: Working properly with escapes in user
4242 strings/characters.
4243
4244 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4245 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4246 grammar.
4247 Use more modest sizes, as for the time being the parser does not
4248 release memory, and therefore the process swallows a huge amount
4249 of memory.
4250
4251 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4252 stricter %token grammar.
4253
4254 * src/symtab.h (associativity): Add `undef_assoc'.
4255 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4256 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4257
4258 * tests/regression.at (Invalid %directive): Remove, as it is now
4259 meaningless.
4260 (Invalid inputs): Adjust to the new error messages.
4261 (Token definitions): The new grammar doesn't allow too many
4262 eccentricities.
4263
4264 * src/lex.h, src/lex.c: Remove.
4265 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4266 (copy_character, copy_string2, copy_string, copy_identifier)
4267 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4268 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4269 (parse_action): Remove.
4270 * po/POTFILES.in: Adjust.
4271
4272 2002-06-11 Akim Demaille <akim@epita.fr>
4273
4274 * src/reader.c (parse_action): Don't store directly into the
4275 rule's action member: return the action as a string.
4276 Don't require `rule_length' as an argument: compute it.
4277 (grammar_current_rule_symbol_append)
4278 (grammar_current_rule_action_append): New, eved out from
4279 (readgram): here.
4280 Remove `action_flag', `rulelength', unused now.
4281
4282 2002-06-11 Akim Demaille <akim@epita.fr>
4283
4284 * src/reader.c (grammar_current_rule_prec_set).
4285 (grammar_current_rule_check): New, eved out from...
4286 (readgram): here.
4287 Remove `xaction', `first_rhs': useless.
4288 * tests/input.at (Type clashes): New.
4289 * tests/existing.at (GNU Cim Grammar): Adjust.
4290
4291 2002-06-11 Akim Demaille <akim@epita.fr>
4292
4293 * src/reader.c (grammar_midrule_action): New, Eved out from
4294 (readgram): here.
4295
4296 2002-06-11 Akim Demaille <akim@epita.fr>
4297
4298 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4299 New.
4300 (readgram): Use them as replacement of inlined code, crule and
4301 crule1.
4302
4303 2002-06-11 Akim Demaille <akim@epita.fr>
4304
4305 * src/reader.c (grammar_end, grammar_symbol_append): New.
4306 (readgram): Use them.
4307 Make the use of `p' as local as possible.
4308
4309 2002-06-10 Akim Demaille <akim@epita.fr>
4310
4311 GCJ's parser requires the tokens to be defined before the prologue.
4312
4313 * data/bison.simple: Output the token definition before the user's
4314 prologue.
4315 * tests/regression.at (Braces parsing, Duplicate string)
4316 (Mixing %token styles): Check the output from bison.
4317 (Early token definitions): New.
4318
4319 2002-06-10 Akim Demaille <akim@epita.fr>
4320
4321 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4322 assigning twice the same user number to a token, so that we can
4323 use it in...
4324 * src/lex.c (lex): here.
4325 Also use `symbol_class_set' instead of hand written code.
4326 * src/reader.c (parse_assoc_decl): Likewise.
4327
4328 2002-06-10 Akim Demaille <akim@epita.fr>
4329
4330 * src/symtab.c, src/symtab.c (symbol_class_set)
4331 (symbol_user_token_number_set): New.
4332 * src/reader.c (parse_token_decl): Use them.
4333 Use a switch instead of ifs.
4334 Use a single argument.
4335
4336 2002-06-10 Akim Demaille <akim@epita.fr>
4337
4338 Remove `%thong' support as it is undocumented, unused, duplicates
4339 `%token's job, and creates useless e-mail traffic with people who
4340 want to know what it is, why it is undocumented, unused, and
4341 duplicates `%token's job.
4342
4343 * src/reader.c (parse_thong_decl): Remove.
4344 * src/options.c (option_table): Remove "thong".
4345 * src/lex.h (tok_thong): Remove.
4346
4347 2002-06-10 Akim Demaille <akim@epita.fr>
4348
4349 * src/symtab.c, src/symtab.c (symbol_type_set)
4350 (symbol_precedence_set): New.
4351 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4352 (value_components_used): Remove, unused.
4353
4354 2002-06-09 Akim Demaille <akim@epita.fr>
4355
4356 Move symbols handling code out of the reader.
4357
4358 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4359 (axiom): Move to...
4360 * src/symtab.h, src/symtab.c: here.
4361
4362 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4363 * src/reader.c (startval): Rename as...
4364 * src/symtab.h, src/symtab.c (startsymbol): this.
4365 * src/reader.c: Adjust.
4366
4367 * src/reader.c (symbol_check_defined, symbol_make_alias)
4368 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4369 (token_translations_init)
4370 Move to...
4371 * src/symtab.c: here.
4372 * src/reader.c (packsymbols): Move to...
4373 * src/symtab.h, src/symtab.c (symbols_pack): here.
4374 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4375 argument.
4376
4377 2002-06-03 Akim Demaille <akim@epita.fr>
4378
4379 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4380 then statements.
4381
4382 2002-06-03 Akim Demaille <akim@epita.fr>
4383
4384 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4385 structs with non literals.
4386 * src/scan-skel.l: never-interactive.
4387 * src/conflicts.c (enum conflict_resolution_e): No trailing
4388 comma.
4389 * src/getargs.c (usage): Split long literal strings.
4390 Reported by Hans Aberg.
4391
4392 2002-05-28 Akim Demaille <akim@epita.fr>
4393
4394 * data/bison.c++: Use C++ ostreams.
4395 (cdebug_): New member.
4396
4397 2002-05-28 Akim Demaille <akim@epita.fr>
4398
4399 * src/output.c (output_skeleton): Be sure to allocate enough room
4400 for `/' _and_ for `\0' in full_skeleton.
4401
4402 2002-05-28 Akim Demaille <akim@epita.fr>
4403
4404 * data/bison.c++: Catch up with bison.simple:
4405 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4406 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4407 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4408 and popping traces.
4409
4410 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4411
4412 * src/output.c (output_skeleton): Put an explicit path in front of
4413 the skeleton file name, rather than relying on the -I directory,
4414 to partially alleviate effects of having a skeleton file lying around
4415 in the current directory.
4416
4417 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4418
4419 * src/conflicts.c (log_resolution): Correct typo:
4420 obstack_printf should be obstack_fgrow1.
4421
4422 2002-05-26 Akim Demaille <akim@epita.fr>
4423
4424 * src/state.h (state_t): `solved_conflicts' is a new member.
4425 * src/LR0.c (new_state): Set it to 0.
4426 * src/conflicts.h, src/conflicts.c (print_conflicts)
4427 (free_conflicts, solve_conflicts): Rename as...
4428 (conflicts_print, conflicts_free, conflicts_solve): these.
4429 Adjust callers.
4430 * src/conflicts.c (enum conflict_resolution_e)
4431 (solved_conflicts_obstack): New, used by...
4432 (log_resolution): this.
4433 Adjust to attach the conflict resolution to each state.
4434 Complete the description with the precedence/associativity
4435 information.
4436 (resolve_sr_conflict): Adjust.
4437 * src/print.c (print_state): Output its solved_conflicts.
4438 * tests/conflicts.at (Unresolved SR Conflicts)
4439 (Solved SR Conflicts): Exercise --report=all.
4440
4441 2002-05-26 Akim Demaille <akim@epita.fr>
4442
4443 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4444 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4445 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4446 (token_number_t, item_number_as_token_number)
4447 (token_number_as_item_number, muscle_insert_token_number_table):
4448 Rename as...
4449 (symbol_number_t, item_number_as_symbol_number)
4450 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4451 these, since it is more appropriate.
4452
4453 2002-05-26 Akim Demaille <akim@epita.fr>
4454
4455 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4456 `Error:' lines.
4457 * data/bison.simple (yystos) [YYDEBUG]: New.
4458 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4459 error recovery.
4460 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4461
4462 2002-05-25 Akim Demaille <akim@epita.fr>
4463
4464 * doc/bison.texinfo (Debugging): Split into...
4465 (Tracing): this new section, its former contents, and...
4466 (Understanding): this new section.
4467 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4468 by...
4469 (report_flag): this.
4470 Adjust all dependencies.
4471 (report_args, report_types, report_argmatch): New.
4472 (usage, getargs): Report/support -r, --report.
4473 * src/options.h
4474 (struct option_table_struct): Rename as..,
4475 (struct option_table_s): this.
4476 Rename the `set_flag' member to `flag' to match with getopt_long's
4477 struct.
4478 * src/options.c (option_table): Split verbose into an entry for
4479 %verbose, and another for --verbose.
4480 Support --report/-r, so remove -r from the obsolete --raw.
4481 * src/print.c: Attach full item sets and lookaheads reports to
4482 report_flag instead of trace_flag.
4483 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4484
4485 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4486 and Paul Eggert <eggert@twinsun.com>
4487
4488 * data/bison.simple (yyparse): Correct error handling to conform to
4489 POSIX and yacc. Specifically, after syntax error is discovered,
4490 do not reduce further before shifting the error token.
4491 Clean up the code a bit by removing the labels yyerrdefault,
4492 yyerrhandle, yyerrpop.
4493 * NEWS: Document the above.
4494
4495 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4496
4497 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4498 type; it isn't always big enough, since it doesn't necessarily
4499 include non-terminals.
4500 (yytranslate): Expand definition of yy_token_number_type, so that
4501 the latter can be removed.
4502 (yy_token_number_type): Remove, only one use.
4503 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4504 don't use TokenNumberType as element type.
4505
4506 * tests/regression.at: Modify expected output to agree with change
4507 to yyr1 and yytranslate.
4508
4509 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4510
4511 * src/reader.c (parse_action): Use copy_character instead of
4512 obstack_1grow.
4513
4514 2002-05-13 Akim Demaille <akim@epita.fr>
4515
4516 * tests/regression.at (Token definitions): Prototype yylex and
4517 yyerror.
4518
4519 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4520
4521 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4522 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4523 32-bit arithmetic.
4524 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4525
4526 2002-05-07 Akim Demaille <akim@epita.fr>
4527
4528 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4529 avoid GCC warnings.
4530
4531 2002-05-07 Akim Demaille <akim@epita.fr>
4532
4533 Kill GCC warnings.
4534
4535 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4536 over the RHS of each rule.
4537 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4538 * src/state.h (state_t): Member `nitems' is unsigned short.
4539 * src/LR0.c (get_state): Adjust.
4540 * src/reader.c (packgram): Likewise.
4541 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4542 `Type'.
4543 (muscle_insert_int_table): Remove, unused.
4544 (prepare_rules): Remove `max'.
4545
4546 2002-05-06 Akim Demaille <akim@epita.fr>
4547
4548 * src/closure.c (print_firsts): Display of the symbol tags.
4549 (bitmatrix_print): Move to...
4550 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4551 here.
4552 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4553
4554 2002-05-06 Akim Demaille <akim@epita.fr>
4555
4556 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4557 hash_do_for_each.
4558
4559 2002-05-06 Akim Demaille <akim@epita.fr>
4560
4561 * src/LR0.c (new_state, get_state): Instead of using the global
4562 `kernel_size' and `kernel_base', have two new arguments:
4563 `core_size' and `core'.
4564 Adjust callers.
4565
4566 2002-05-06 Akim Demaille <akim@epita.fr>
4567
4568 * src/reader.c (packgram): No longer end `ritem' with a 0
4569 sentinel: it is not used.
4570
4571 2002-05-05 Akim Demaille <akim@epita.fr>
4572
4573 New experimental feature: display the lookaheads in the report and
4574 graph.
4575
4576 * src/print (print_core): When --trace-flag, display the rules
4577 lookaheads.
4578 * src/print_graph.c (print_core): Likewise.
4579 Swap the arguments.
4580 Adjust caller.
4581
4582 2002-05-05 Akim Demaille <akim@epita.fr>
4583
4584 * tests/torture.at (Many lookaheads): New test.
4585
4586 2002-05-05 Akim Demaille <akim@epita.fr>
4587
4588 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4589 (GENERATE_MUSCLE_INSERT_TABLE): this.
4590 (output_int_table, output_unsigned_int_table, output_short_table)
4591 (output_token_number_table, output_item_number_table): Replace with...
4592 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4593 (muscle_insert_short_table, muscle_insert_token_number_table)
4594 (muscle_insert_item_number_table): these.
4595 Adjust all callers.
4596 (prepare_tokens): Don't free `translations', since...
4597 * src/reader.h, src/reader.c (grammar_free): do it.
4598 Move to...
4599 * src/gram.h, src/gram.c (grammar_free): here.
4600 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4601 b4_translate_max.
4602
4603 2002-05-05 Akim Demaille <akim@epita.fr>
4604
4605 * src/output.c (output_unsigned_int_table): New.
4606 (prepare_rules): `i' is unsigned.
4607 `prhs', `rline', `r2' are unsigned int.
4608 Rename muscle `rhs_number_max' as `rhs_max'.
4609 Output muscles `prhs_max', `rline_max', and `r2_max'.
4610 Free rline and r1.
4611 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4612 to compute types instead of constant types.
4613 * tests/regression.at (Web2c Actions): Adjust.
4614
4615 2002-05-04 Akim Demaille <akim@epita.fr>
4616
4617 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4618 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4619 Adjust dependencies.
4620 * src/output.c (token_definitions_output): Be sure not to output a
4621 `#define 'a'' when fed with `%token 'a' "a"'.
4622 * tests/regression.at (Token definitions): New.
4623
4624 2002-05-03 Paul Eggert <eggert@twinsun.com>
4625
4626 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4627 for K&R C.
4628
4629 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4630
4631 * Makefile.am (SUBDIRS): Remove intl.
4632 (EXTRA_DIST): Add config/config.rpath.
4633
4634 2002-05-03 Akim Demaille <akim@epita.fr>
4635
4636 * data/bison.simple (m4_if): Don't output empty enums.
4637 And actually, output valid enum definitions :(.
4638
4639 2002-05-03 Akim Demaille <akim@epita.fr>
4640
4641 * configure.bat: Remove, completely obsolete.
4642 * Makefile.am (EXTRA_DIST): Adjust.
4643 Don't distribute config.rpath...
4644 * config/Makefile.am (EXTRA_DIST): Do it.
4645
4646 2002-05-03 Akim Demaille <akim@epita.fr>
4647
4648 * configure.in (GETTEXT_VERSION): New.
4649 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4650
4651 2002-05-03 Akim Demaille <akim@epita.fr>
4652
4653 * data/bison.simple (b4_token_enum): New.
4654 (b4_token_defines): Use it to output tokens both as #define and
4655 enums.
4656 Suggested by Paul Eggert.
4657 * src/output.c (token_definitions_output): Don't output spurious
4658 white spaces.
4659
4660 2002-05-03 Akim Demaille <akim@epita.fr>
4661
4662 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4663
4664 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4665
4666 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4667 Update the stack class, give a try to deque as the default container.
4668
4669 2002-05-02 Akim Demaille <akim@epita.fr>
4670
4671 * data/bison.simple (yyparse): Do not implement @$ = @1.
4672 (YYLLOC_DEFAULT): Adjust to do it.
4673 * doc/bison.texinfo (Location Default Action): Fix.
4674
4675 2002-05-02 Akim Demaille <akim@epita.fr>
4676
4677 * src/reader.c (parse_braces): Merge into...
4678 (parse_action): this.
4679
4680 2002-05-02 Akim Demaille <akim@epita.fr>
4681
4682 * configure.in (ALL_LINGUAS): Remove.
4683 * po/LINGUAS, hr.po: New.
4684
4685 2002-05-02 Akim Demaille <akim@epita.fr>
4686
4687 Remove the so called hairy (semantic) parsers.
4688
4689 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4690 * src/gram.h, src/gram.c (semantic_parser): Remove.
4691 (rule_t): Remove the guard and guard_line members.
4692 * src/lex.h (token_t): remove tok_guard.
4693 * src/options.c (option_table): Remove %guard and %semantic_parser
4694 support.
4695 * src/output.c, src/output.h (guards_output): Remove.
4696 (prepare): Adjust.
4697 (token_definitions_output): Don't output the `T'
4698 tokens (???).
4699 (output_skeleton): Don't output the guards.
4700 * src/files.c, src/files.c (attrsfile): Remove.
4701 * src/reader.c (symbol_list): Remove the guard and guard_line
4702 members.
4703 Adjust dependencies.
4704 (parse_guard): Remove.
4705 * data/bison.hairy: Remove.
4706 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4707 BISON_HAIRY.
4708
4709 2002-05-02 Akim Demaille <akim@epita.fr>
4710
4711 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4712 (parse_guard): Rename the formal argument `stack_offset' as
4713 `rule_length', which is more readable.
4714 Adjust callers.
4715 (copy_at, copy_dollar): Instead of outputting the hard coded
4716 values of $$, $n and so forth, output invocation to b4_lhs_value,
4717 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4718 Note: this patch partially drops `semantic-parser' support: it
4719 always does `rule_length - n', where semantic parsers ought to
4720 always use `-n'.
4721 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4722 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4723
4724 2002-05-02 Akim Demaille <akim@epita.fr>
4725
4726 * configure.in (AC_INIT): Bump to 1.49b.
4727 (AM_INIT_AUTOMAKE): Short invocation.
4728
4729 2002-05-02 Akim Demaille <akim@epita.fr>
4730
4731 Version 1.49a.
4732
4733 2002-05-01 Akim Demaille <akim@epita.fr>
4734
4735 * src/skeleton.h: Remove.
4736
4737 2002-05-01 Akim Demaille <akim@epita.fr>
4738
4739 * src/skeleton.h: Fix the #endif.
4740 Reported by Magnus Fromreide.
4741
4742 2002-04-26 Paul Eggert <eggert@twinsun.com>
4743
4744 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4745 Define if we define YYSTYPE and YYLTYPE, respectively.
4746 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4747
4748 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4749
4750 * src/scan-skel.l: Postprocess quadrigraphs.
4751
4752 * src/reader.c (copy_character): New function, used to output
4753 single characters while replacing `[' and `]' with quadrigraphs, to
4754 avoid troubles with M4 quotes.
4755 (copy_comment): Output characters with copy_character.
4756 (read_additionnal_code): Likewise.
4757 (copy_string2): Likewise.
4758 (copy_definition): Likewise.
4759
4760 * tests/calc.at: Exercise M4 quoting.
4761
4762 2002-04-25 Akim Demaille <akim@epita.fr>
4763
4764 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4765 between `!' and the command.
4766 Reported by Paul Eggert.
4767
4768 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4769
4770 * tests/calc.at: Exercise prologue splitting.
4771
4772 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4773 `b4_post_prologue' instead of `b4_prologue'.
4774
4775 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4776 muscles.
4777 (output): Free pre_prologue_obstack and post_prologue_obstack.
4778 * src/files.h, src/files.c (attrs_obstack): Remove.
4779 (pre_prologue_obstack, post_prologue_obstack): New.
4780 * src/reader.c (copy_definition): Add a parameter to specify the
4781 obstack to fill, instead of using attrs_obstack unconditionally.
4782 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4783 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4784
4785 2002-04-23 Paul Eggert <eggert@twinsun.com>
4786
4787 * data/bison.simple: Remove unnecessary commentary and white
4788 space differences from 1_29-branch.
4789 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4790
4791 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4792 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4793 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4794 constructors or destructors.
4795
4796 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4797
4798 2002-04-23 Akim Demaille <akim@epita.fr>
4799
4800 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4801 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4802 location with columns.
4803 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4804 All reported by Paul Eggert.
4805
4806 2002-04-22 Akim Demaille <akim@epita.fr>
4807
4808 * src/reduce.c (dump_grammar): Move to...
4809 * src/gram.h, src/gram.c (grammar_dump): here.
4810 Be sure to separate long item numbers.
4811 Don't read the members of a rule's prec if its nil.
4812
4813 2002-04-22 Akim Demaille <akim@epita.fr>
4814
4815 * src/output.c (table_size, table_grow): New.
4816 (MAXTABLE): Remove, replace uses with table_size.
4817 (pack_vector): Instead of dying when the table is too big, grow it.
4818
4819 2002-04-22 Akim Demaille <akim@epita.fr>
4820
4821 * data/bison.simple (yyr1): Its type is that of a token number.
4822 * data/bison.c++ (r1_): Likewise.
4823 * tests/regression.at (Web2c Actions): Adjust.
4824
4825 2002-04-22 Akim Demaille <akim@epita.fr>
4826
4827 * src/reader.c (token_translations_init): 256 is now the default
4828 value for the error token, i.e., it will be assigned another
4829 number if the user assigned 256 to one of her tokens.
4830 (reader): Don't force 256 to error.
4831 * doc/bison.texinfo (Symbols): Adjust.
4832 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4833 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4834 etc. instead of 10, 20, 30 (which was used to `jump' over error
4835 (256) and undefined (2)).
4836
4837 2002-04-22 Akim Demaille <akim@epita.fr>
4838
4839 Propagate more token_number_t.
4840
4841 * src/gram.h (token_number_as_item_number)
4842 (item_number_as_token_number): New.
4843 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4844 Use it to create output_item_number_table and
4845 output_token_number_table.
4846 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4847 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4848 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4849 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4850
4851 2002-04-22 Akim Demaille <akim@epita.fr>
4852
4853 * src/output.h, src/output.c (get_lines_number): Remove.
4854
4855 2002-04-19 Akim Demaille <akim@epita.fr>
4856
4857 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4858 as Lex/Flex'.
4859 (Debugging): More details about enabling the debugging features.
4860 (Table of Symbols): Describe $$, $n, @$, and @n.
4861 Suggested by Tim Josling.
4862
4863 2002-04-19 Akim Demaille <akim@epita.fr>
4864
4865 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4866
4867 2002-04-10 Akim Demaille <akim@epita.fr>
4868
4869 * src/system.h: Rely on HAVE_LIMITS_H.
4870 Suggested by Paul Eggert.
4871
4872 2002-04-09 Akim Demaille <akim@epita.fr>
4873
4874 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4875 full stderr, and strip it according to the bison options, instead
4876 of composing the error message from different bits.
4877 This makes it easier to check for several error messages.
4878 Adjust all the invocations.
4879 Add an invocation exercising the error token.
4880 Add an invocation demonstrating a stupid error message.
4881 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4882 Adjust the tests.
4883 Error message are for stderr, not stdout.
4884
4885 2002-04-09 Akim Demaille <akim@epita.fr>
4886
4887 * src/gram.h, src/gram.c (error_token_number): Remove, use
4888 errtoken->number.
4889 * src/reader.c (reader): Don't specify the user token number (2)
4890 for $undefined, as it uselessly prevents using it.
4891 * src/gram.h (token_number_t): Move to...
4892 * src/symtab.h: here.
4893 (state_t.number): Is a token_number_t.
4894 * src/print.c, src/reader.c: Use undeftoken->number instead of
4895 hard coded 2.
4896 (Even though this 2 is not the same as above: the number of the
4897 undeftoken remains being 2, it is its user token number which
4898 might not be 2).
4899 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4900 `user_token_number_max'.
4901 Output `undef_token_number'.
4902 * data/bison.simple, data/bison.c++: Use them.
4903 Be sure to map invalid yylex return values to
4904 `undef_token_number'. This saves us from gratuitous SEGV.
4905
4906 * tests/conflicts.at (Solved SR Conflicts)
4907 (Unresolved SR Conflicts): Adjust.
4908 * tests/regression.at (Web2c Actions): Adjust.
4909
4910 2002-04-08 Akim Demaille <akim@epita.fr>
4911
4912 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4913 Adding #line.
4914 Remove the duplicate `typedefs'.
4915 (RhsNumberType): Fix the declaration and various other typos.
4916 Use __ofile__.
4917 * data/bison.simple: Use __ofile__.
4918 * src/scan-skel.l: Handle __ofile__.
4919
4920 2002-04-08 Akim Demaille <akim@epita.fr>
4921
4922 * src/gram.h (item_number_t): New, the type of item numbers in
4923 RITEM. Note that it must be able to code symbol numbers as
4924 positive number, and the negation of rule numbers as negative
4925 numbers.
4926 Adjust all dependencies (pretty many).
4927 * src/reduce.c (rule): Remove this `short *' pointer: use
4928 item_number_t.
4929 * src/system.h (MINSHORT, MAXSHORT): Remove.
4930 Include `limits.h'.
4931 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4932 (shortcpy): Remove.
4933 (MAXTABLE): Move to...
4934 * src/output.c (MAXTABLE): here.
4935 (prepare_rules): Use output_int_table to output rhs.
4936 * data/bison.simple, data/bison.c++: Adjust.
4937 * tests/torture.at (Big triangle): Move the limit from 254 to
4938 500.
4939 * tests/regression.at (Web2c Actions): Ajust.
4940
4941 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4942 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4943 passes, but produces negative #line number, once fixed, GCC is
4944 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4945 C), it passes.
4946 * src/state.h (state_h): Code input lines on ints, not shorts.
4947
4948 2002-04-08 Akim Demaille <akim@epita.fr>
4949
4950 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4951 and then the grammar.
4952
4953 2002-04-08 Akim Demaille <akim@epita.fr>
4954
4955 * src/system.h: No longer using strndup.
4956
4957 2002-04-07 Akim Demaille <akim@epita.fr>
4958
4959 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4960 * src/output.c (output_table_data): Return the longest number.
4961 (prepare_tokens): Output `token_number_max').
4962 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4963 New.
4964 Use them to define yy_token_number_type/TokenNumberType.
4965 Use this type for yytranslate.
4966 * tests/torture.at (Big triangle): Push the limit from 124 to
4967 253.
4968 * tests/regression.at (Web2c Actions): Adjust.
4969
4970 2002-04-07 Akim Demaille <akim@epita.fr>
4971
4972 * tests/torture.at (Big triangle): New.
4973 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4974 * tests/existing.at: here.
4975
4976 2002-04-07 Akim Demaille <akim@epita.fr>
4977
4978 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4979 nritems.
4980 Adjust dependencies.
4981
4982 2002-04-07 Akim Demaille <akim@epita.fr>
4983
4984 * src/reader.c: Normalize increments to prefix form.
4985
4986 2002-04-07 Akim Demaille <akim@epita.fr>
4987
4988 * src/reader.c, symtab.c: Remove debugging code.
4989
4990 2002-04-07 Akim Demaille <akim@epita.fr>
4991
4992 Rename all the `bucket's as `symbol_t'.
4993
4994 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4995 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4996 * src/symtab.c, src/symtab.h (bucket): Rename as...
4997 (symbol_t): this.
4998 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4999 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5000 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5001 (buckets_new, buckets_free, buckets_do): Rename as...
5002 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5003 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5004 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5005 (symbols_new, symbols_free, symbols_do): these.
5006
5007 2002-04-07 Akim Demaille <akim@epita.fr>
5008
5009 Use lib/hash for the symbol table.
5010
5011 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5012 EOF.
5013 * src/lex.c (lex): Set the `number' member of new terminals.
5014 * src/reader.c (bucket_check_defined, bucket_make_alias)
5015 (bucket_check_alias_consistence, bucket_translation): New.
5016 (reader, grammar_free, readgram, token_translations_init)
5017 (packsymbols): Adjust.
5018 (reader): Number the predefined tokens.
5019 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5020 for predefined tokens.
5021 * src/symtab.h (bucket): Remove all the hash table related
5022 members.
5023 * src/symtab.c (symtab): Replace by...
5024 (bucket_table): this.
5025 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5026 (buckets_new, buckets_do): New.
5027
5028 2002-04-07 Akim Demaille <akim@epita.fr>
5029
5030 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5031 (start_symbol, max_user_token_number, semantic_parser)
5032 (error_token_number): Initialize.
5033 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5034 Initialize.
5035 (reader): Don't.
5036 (errtoken, eoftoken, undeftoken, axiom): Extern.
5037
5038 2002-04-07 Akim Demaille <akim@epita.fr>
5039
5040 * src/gram.h (rule_s): prec and precsym are now pointers
5041 to the bucket giving the priority/associativity.
5042 Member `associativity' removed: useless.
5043 * src/reduce.c, src/conflicts.c: Adjust.
5044
5045 2002-04-07 Akim Demaille <akim@epita.fr>
5046
5047 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5048 Properly escape the symbols' TAG when outputting them.
5049
5050 2002-04-07 Akim Demaille <akim@epita.fr>
5051
5052 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5053
5054 2002-04-07 Akim Demaille <akim@epita.fr>
5055
5056 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5057 (LArule): this, which is an array to rule_t*.
5058 * src/print.c, src/conflicts.c: Adjust.
5059
5060 2002-04-07 Akim Demaille <akim@epita.fr>
5061
5062 * src/gram.h (rule_t): Rename `number' as `user_number'.
5063 `number' is a new member.
5064 Adjust dependencies.
5065 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5066
5067 2002-04-07 Akim Demaille <akim@epita.fr>
5068
5069 As a result of the previous patch, it is no longer needed
5070 to reorder ritem itself.
5071
5072 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5073
5074 2002-04-07 Akim Demaille <akim@epita.fr>
5075
5076 Be sure never to walk through RITEMS, but use only data related to
5077 the rules themselves. RITEMS should be banished.
5078
5079 * src/output.c (output_token_translations): Rename as...
5080 (prepare_tokens): this.
5081 In addition to `translate', prepare the muscles `tname' and
5082 `toknum', which were handled by...
5083 (output_rule_data): this.
5084 Remove, and move the remainder of its outputs into...
5085 (prepare_rules): this new routines, which also merges content from
5086 (output_gram): this.
5087 (prepare_rules): Be sure never to walk through RITEMS.
5088 (output_stos): Rename as...
5089 (prepare_stos): this.
5090 (output): Always invoke prepare_states, after all, just don't use it
5091 in the output if you don't need it.
5092
5093 2002-04-07 Akim Demaille <akim@epita.fr>
5094
5095 * src/LR0.c (new_state): Display `nstates' as the name of the
5096 newly created state.
5097 Adjust to initialize first_state and last_state if needed.
5098 Be sure to distinguish the initial from the final state.
5099 (new_states): Create the itemset of the initial state, and use
5100 new_state.
5101 * src/closure.c (closure): Now that the initial state has its
5102 items properly set, there is no need for a special case when
5103 creating `ruleset'.
5104
5105 As a result, now the rule 0, reducing to $axiom, is visible in the
5106 outputs. Adjust the test suite.
5107
5108 * tests/conflicts.at (Solved SR Conflicts)
5109 (Unresolved SR Conflicts): Adjust.
5110 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5111 * tests/conflicts.at (S/R in initial): New.
5112
5113 2002-04-07 Akim Demaille <akim@epita.fr>
5114
5115 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5116 the RHS of the rules.
5117 * src/output.c (output_gram): Likewise.
5118
5119 2002-04-07 Akim Demaille <akim@epita.fr>
5120
5121 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5122 bucket.
5123 Adjust all dependencies.
5124 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5125 `number' of the buckets too.
5126 * src/gram.h: Include `symtab.h'.
5127 (associativity): Move to...
5128 * src/symtab.h: here.
5129 No longer include `gram.h'.
5130
5131 2002-04-07 Akim Demaille <akim@epita.fr>
5132
5133 * src/gram.h, src/gram.c (rules_rhs_length): New.
5134 (ritem_longest_rhs): Use it.
5135 * src/gram.h (rule_t): `number' is a new member.
5136 * src/reader.c (packgram): Set it.
5137 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5138 the end of `rules', and count them out of `nrules'.
5139 (reduce_output, dump_grammar): Adjust.
5140 * src/print.c (print_grammar): It is no longer needed to check for
5141 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5142 * tests/reduce.at (Reduced Automaton): New test.
5143
5144 2002-04-07 Akim Demaille <akim@epita.fr>
5145
5146 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5147 lacking `+ 1' to nrules, Bison reported as useless a token if it
5148 was used solely to set the precedence of the last rule...
5149
5150 2002-04-07 Akim Demaille <akim@epita.fr>
5151
5152 * data/bison.c++, data/bison.simple: Don't output the current file
5153 name in #line, to avoid useless diffs between two identical
5154 outputs under different names.
5155
5156 2002-04-07 Akim Demaille <akim@epita.fr>
5157
5158 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5159 Normalize loops to using `< nrules + 1', not `<= nrules'.
5160
5161 2002-04-07 Akim Demaille <akim@epita.fr>
5162
5163 * TODO: Update.
5164
5165 2002-04-07 Akim Demaille <akim@epita.fr>
5166
5167 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5168 bucket.value as bucket.number.
5169
5170 2002-04-07 Akim Demaille <akim@epita.fr>
5171
5172 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5173 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5174 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5175 RHS, instead of being an index in RITEMS.
5176
5177 2002-04-04 Paul Eggert <eggert@twinsun.com>
5178
5179 * doc/bison.texinfo: Update copyright date.
5180 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5181 (Symbols): Warn about running Bison in one character set,
5182 but compiling and/or running in an incompatible one.
5183 Warn about character code 256, too.
5184
5185 2002-04-03 Paul Eggert <eggert@twinsun.com>
5186
5187 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5188 YYERROR_VERBOSE is nonzero, not whether it is defined.
5189
5190 Merge changes from bison-1_29-branch.
5191
5192 2002-03-20 Paul Eggert <eggert@twinsun.com>
5193
5194 Merge fixes from Debian bison_1.34-1.diff.
5195
5196 * configure.in (AC_PREREQ): 2.53.
5197
5198 2002-03-20 Akim Demaille <akim@epita.fr>
5199
5200 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5201
5202 2002-03-19 Paul Eggert <eggert@twinsun.com>
5203
5204 * src/bison.simple (YYCOPY): New macro.
5205 (YYSTACK_RELOCATE): Use it.
5206 Remove Type arg; no longer needed. All callers changed.
5207 (yymemcpy): Remove; no longer needed.
5208
5209 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5210 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5211
5212 2002-03-19 Akim Demaille <akim@epita.fr>
5213
5214 Test and fix the #line outputs.
5215
5216 * tests/atlocal.at (GCC): New.
5217 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5218 (Prologue synch line, ,%union synch line, Postprologue synch line)
5219 (Action synch line, Epilogue synch line): New tests.
5220 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5221 * data/bison.simple, data/bison.c++: Use it.
5222
5223 2002-03-19 Akim Demaille <akim@epita.fr>
5224
5225 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5226 (Solved SR Conflicts, %expect not enough, %expect right)
5227 (%expect too much): Move to...
5228 * tests/conflicts.at: this new file.
5229
5230 2002-03-19 Akim Demaille <akim@epita.fr>
5231
5232 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5233 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5234 that we can move to enums for instance.
5235 * src/output.c (token_definitions_output): Output a list of
5236 `token-name, token-number' instead of the #define.
5237 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5238
5239 2002-03-14 Akim Demaille <akim@epita.fr>
5240
5241 Use Gettext 0.11.1.
5242
5243 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5244
5245 * data/bison.c++: Make the user able to add members to the generated
5246 parser by subclassing.
5247
5248 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5249
5250 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5251 a character.
5252 Reported by Nicolas Tisserand and Nicolas Burrus.
5253
5254 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5255
5256 * src/reader.c: Warn about lacking semi-colons, do not complain.
5257
5258 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5259
5260 * data/bison.c++: Remove a debug line.
5261
5262 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5263
5264 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5265 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5266 provide a default implementation.
5267
5268 2002-03-04 Akim Demaille <akim@epita.fr>
5269
5270 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5271 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5272 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5273 * tests/semantic.at (Parsing Guards): Similarly.
5274 * src/reader.at (readgram): Complain if the last rule is not ended
5275 with a semi-colon.
5276
5277 2002-03-04 Akim Demaille <akim@epita.fr>
5278
5279 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5280 * src/closure.c: here.
5281 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5282 RTC.
5283 * src/warshall.h, src/warshall.c: Remove.
5284 * tests/sets.at (Broken Closure): Adjust.
5285
5286 2002-03-04 Akim Demaille <akim@epita.fr>
5287
5288 * src/output.c (output_skeleton): tempdir is const.
5289 bytes_read is unused.
5290
5291 2002-03-04 Akim Demaille <akim@epita.fr>
5292
5293 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5294 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5295 Update.
5296 From Michael Hayes.
5297
5298 2002-03-04 Akim Demaille <akim@epita.fr>
5299
5300 * src/closure.c (closure): `r' is unused.
5301
5302 2002-03-04 Akim Demaille <akim@epita.fr>
5303
5304 * tests/sets.at (Broken Closure): Add the ending `;'.
5305 * src/reader.at (readgram): Complain if a rule is not ended with a
5306 semi-colon.
5307
5308 2002-03-04 Akim Demaille <akim@epita.fr>
5309
5310 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5311 (count_sr_conflicts): Use bitset_count.
5312 * src/reduce.c (inaccessable_symbols): Ditto.
5313 (bits_size): Remove.
5314 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5315
5316 2002-03-04 Akim Demaille <akim@epita.fr>
5317
5318 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5319 * src/reduce.c: Remove the `bitset_zero's following the
5320 `bitset_create's, as now it is performed by the latter.
5321
5322 2002-03-04 Akim Demaille <akim@epita.fr>
5323
5324 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5325 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5326 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5327 latest sources from Michael.
5328
5329 2002-03-04 Akim Demaille <akim@epita.fr>
5330
5331 * src/output.c (output): Don't free the grammar.
5332 * src/reader.c (grammar_free): New.
5333 * src/main.c (main): Call it and don't free symtab here.
5334
5335 2002-03-04 Akim Demaille <akim@epita.fr>
5336
5337 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5338 before returning.
5339 Reported by Benoit Perrot.
5340
5341 2002-03-04 Akim Demaille <akim@epita.fr>
5342
5343 Use bitset operations when possible, not loops over bits.
5344
5345 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5346 bitset_or.
5347 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5348 * src/reduce.c (useless_nonterminals): Formatting changes.
5349 * src/warshall.c (TC): Use bitset_or.
5350
5351 2002-03-04 Akim Demaille <akim@epita.fr>
5352
5353 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5354 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5355 Ditto.
5356
5357 2002-03-04 Akim Demaille <akim@epita.fr>
5358
5359 * src/lalr.c (F): Now a bitset*.
5360 Adjust all dependencies.
5361
5362 2002-03-04 Akim Demaille <akim@epita.fr>
5363
5364 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5365 Adjust all dependencies.
5366
5367 2002-03-04 Akim Demaille <akim@epita.fr>
5368
5369 * src/L0.c, src/LR0.h (nstates): Be size_t.
5370 Adjust comparisons (signed vs unsigned).
5371 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5372 bitset*.
5373 Adjust all dependencies.
5374
5375 2002-03-04 Akim Demaille <akim@epita.fr>
5376
5377 * src/closure.c (firsts): Now, also a bitset.
5378 Adjust all dependencies.
5379 (varsetsize): Remove, now unused.
5380 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5381
5382 2002-03-04 Akim Demaille <akim@epita.fr>
5383
5384 * src/print.c: Convert to use bitset.h, not hand coded iterations
5385 over ints.
5386
5387 2002-03-04 Akim Demaille <akim@epita.fr>
5388
5389 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5390
5391 2002-03-04 Akim Demaille <akim@epita.fr>
5392
5393 * src/closure.c (ruleset): Be a bitset.
5394 (rulesetsize): Remove.
5395
5396 2002-03-04 Akim Demaille <akim@epita.fr>
5397
5398 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5399 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5400 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5401 * src/closure.c (fderives): Be an array of bitsets.
5402
5403 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5404
5405 * data/bison.c++: Merge the two generated headers. Insert a copyright
5406 notice in each output file.
5407
5408 2002-02-28 Akim Demaille <akim@epita.fr>
5409
5410 * data/bison.c++: Copy the prologue of bison.simple to fetch
5411 useful M4 definitions, such as b4_header_guard.
5412
5413 2002-02-25 Akim Demaille <akim@epita.fr>
5414
5415 * src/getargs.c (version): Give the name of the authors, and use a
5416 translator friendly scheme for the bgr
5417 copyright notice.
5418
5419 2002-02-25 Akim Demaille <akim@epita.fr>
5420
5421 * src/output.c (header_output): Remove, now handled completely via
5422 M4.
5423
5424 2002-02-25 Akim Demaille <akim@epita.fr>
5425
5426 * m4/m4.m4: New, from CVS Autoconf.
5427 * configure.in: Invoke it.
5428 * src/output.c (output_skeleton): Use its result instead of the
5429 hard coded name.
5430
5431 2002-02-25 Akim Demaille <akim@epita.fr>
5432
5433 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5434 Fileutils 4.1.5.
5435 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5436 * src/output.c (output_skeleton): Use mkstemp to create a real
5437 temporary file.
5438 Move the filling of `skeleton' and its muscle to...
5439 (prepare): here.
5440 (output): Move the definition of the prologue muscle to...
5441 (prepare): here.
5442 * src/system.h (DEFAULT_TMPDIR): New.
5443
5444 2002-02-14 Paul Eggert <eggert@twinsun.com>
5445
5446 Remove the support for C++ namespace cleanliness; it was
5447 causing more problems than it was curing, since it didn't work
5448 properly on some nonstandard C++ compilers. This can wait
5449 for a proper C++ parser.
5450
5451 * NEWS: Document this.
5452 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5453 of C++, as it's treated like C now.
5454 * src/bison.simple (YYSTD): Remove.
5455 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5456 Treat C++ just like Standard C instead of trying to support
5457 namespace cleanliness.
5458
5459 2002-02-14 Akim Demaille <akim@epita.fr>
5460
5461 * tests/regression.at (else): Adjust to Andreas' change.
5462
5463 2002-02-14 Akim Demaille <akim@epita.fr>
5464
5465 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5466
5467 2002-02-13 Andreas Schwab <schwab@suse.de>
5468
5469 * src/output.c (output_rule_data): Don't output NULL, it might
5470 not be defined yet.
5471
5472 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5473
5474 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5475 (Copyright notice): Update.
5476
5477 2002-02-11 Akim Demaille <akim@epita.fr>
5478
5479 * tests/regression.at (%nonassoc and eof): Don't include
5480 nonportable headers.
5481
5482 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5483
5484 * data/bison.c++: Correct error recovery. Make the user able to
5485 initialize the starting location.
5486
5487 2002-02-07 Akim Demaille <akim@epita.fr>
5488
5489 * tests/input.at: New.
5490
5491 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5492
5493 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5494 more consistent when naming methods and variables. Put preprocessor
5495 directives around tables only needed for debugging.
5496
5497 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5498
5499 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5500 C++ parsers.
5501 (yy::b4_name::parse): Use print_.
5502
5503 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5504
5505 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5506
5507 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5508
5509 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5510 C++ parsers.
5511 (yy::b4_name::parse): Build verbose error messages, and use error_.
5512
5513 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5514
5515 * data/bison.c++: Fix m4 quoting in comments.
5516
5517 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5518
5519 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5520 not expanded by m4.
5521
5522 2002-02-05 Akim Demaille <akim@epita.fr>
5523
5524 * data/bison.c++: Adjust to the M4 back end.
5525 More is certainly needed.
5526
5527 2002-02-05 Akim Demaille <akim@epita.fr>
5528
5529 Give a try to M4 as a back end.
5530
5531 * lib/readpipe.c: New, from wdiff.
5532 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5533 BISON_HAIRY.
5534 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5535 specific values. Now it is m4 that performs the lookup.
5536 * src/parse-skel.y: Remove.
5537 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5538 * src/output.c (actions_output, guards_output)
5539 (token_definitions_output): No longer keeps track of the output
5540 line number, hence remove the second argument.
5541 (guards_output): Check against the guard member of a rule, not the
5542 action member.
5543 Adjust callers.
5544 (output_skeleton): Don't look for the skeleton location, let m4 do
5545 that.
5546 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5547 file will be used.
5548 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5549 (prepare): Given that for the time being changesyntax is not
5550 usable in M4, rename the muscles using `-' to `_'.
5551 Define `defines_flag', `output_parser_name' and `output_header_name'.
5552 * src/output.h (actions_output, guards_output)
5553 (token_definitions_output): Adjust prototypes.
5554 * src/scan-skel.l: Instead of scanning the skeletons, it now
5555 processes the output of m4: `__oline__' and `#output'.
5556 * data/bison.simple: Adjust to be used by M4(sugar).
5557 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5558 to date.
5559 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5560 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5561 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5562 shamelessly stolen from CVS Autoconf.
5563
5564 2002-02-05 Akim Demaille <akim@epita.fr>
5565
5566 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5567 * configure.in: Check for the declarations of free and malloc.
5568 * src/muscle_tab.c: Adjust.
5569
5570 2002-02-05 Akim Demaille <akim@epita.fr>
5571
5572 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5573 which have no values.
5574
5575 2002-02-05 Akim Demaille <akim@epita.fr>
5576
5577 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5578 * data/: here.
5579
5580 2002-01-29 Paul Eggert <eggert@twinsun.com>
5581
5582 * src/bison.simple (YYSIZE_T): Do not define merely because
5583 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5584 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5585
5586 2002-01-27 Akim Demaille <akim@epita.fr>
5587
5588 Fix `%nonassoc and eof'.
5589
5590 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5591 which were not properly copied! Replace
5592 memcpy (res->errs, src->errs, src->nerrs);
5593 with
5594 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5595 !!!
5596 * tests/regression.at (%nonassoc and eof): Adjust to newest
5597 Autotest: `.' is not in the PATH.
5598
5599 2002-01-27 Akim Demaille <akim@epita.fr>
5600
5601 * tests/sets.at (AT_EXTRACT_SETS): New.
5602 (Nullable): Use it.
5603 (Firsts): New.
5604
5605 2002-01-26 Akim Demaille <akim@epita.fr>
5606
5607 * tests/actions.at, tests/calc.at, tests/headers.at,
5608 * tests/torture.at: Adjust to the newest Autotest which no longer
5609 forces `.' in the PATH.
5610
5611 2002-01-25 Akim Demaille <akim@epita.fr>
5612
5613 * tests/regression.at (%nonassoc and eof): New.
5614 Suggested by Robert Anisko.
5615
5616 2002-01-24 Akim Demaille <akim@epita.fr>
5617
5618 Bison dumps core when trying to complain about broken input files.
5619 Reported by Cris van Pelt.
5620
5621 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5622 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5623 into...
5624 (Invalid inputs): Strengthen: exercise parse_percent_token.
5625
5626 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5627
5628 * src/Makefile.am: Add bison.c++.
5629 * src/bison.c++: New skeleton.
5630
5631 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5632
5633 * po/it.po: New.
5634
5635 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5636
5637 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5638
5639 2002-01-20 Marc Autret <marc@gnu.org>
5640
5641 * src/files.c (compute_output_file_names): Fix
5642
5643 2002-01-20 Marc Autret <marc@gnu.org>
5644
5645 * tests/output.at: New test.
5646 * src/files.c (compute_base_names): Don't map extensions when
5647 the YACC flag is set, use defaults.
5648 Reported by Evgeny Stambulchik.
5649
5650 2002-01-20 Marc Autret <marc@gnu.org>
5651
5652 * src/system.h: Need to define __attribute__ away for non-GCC
5653 compilers as well (i.e. the vendor C compiler).
5654 Suggested by Albert Chin-A-Young.
5655
5656 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5657
5658 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5659 canonical definition.
5660 * src/system.h: Use the canonical definition for PARAMS (avoids
5661 a conflict with the macro from lib/hash.h).
5662
5663 2002-01-11 Akim Demaille <akim@epita.fr>
5664
5665 * configure.in: Use AC_FUNC_STRNLEN.
5666 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5667
5668 2002-01-09 Akim Demaille <akim@epita.fr>
5669
5670 * src/files.c, src/files.h (output_infix): New.
5671 (tab_extension): Remove.
5672 (compute_base_names): Compute the former, drop the latter.
5673 * src/output.c (prepare): Insert the muscles `output-infix', and
5674 `output-suffix'.
5675 * src/parse-skel.y (string, string.1): New.
5676 (section.header): Use it.
5677 (section.yacc): Remove.
5678 (prefix): Remove too.
5679 * src/scan-skel.l: Adjust.
5680 * src/bison.simple, src/bison.hairy: Adjust.
5681
5682 2002-01-09 Akim Demaille <akim@epita.fr>
5683
5684 * configure.in (WERROR_CFLAGS): Compute it.
5685 * src/Makefile.am (CFLAGS): Pass it.
5686 * tests/atlocal.in (CFLAGS): Idem.
5687 * src/files.c: Fix a few warnings.
5688 (get_extension_index): Remove, unused.
5689
5690 2002-01-08 Akim Demaille <akim@epita.fr>
5691
5692 * src/getargs.c (AS_FILE_NAME): New.
5693 (getargs): Use it to convert DOSish file names.
5694 * src/files.c (base_name): Rename as full_base_name to avoid
5695 clashes with `base_name ()'.
5696 (filename_split): New.
5697 (compute_base_names): N-th rewrite, using filename_split.
5698
5699 2002-01-08 Akim Demaille <akim@epita.fr>
5700
5701 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5702 New, stolen from the Fileutils 4.1.
5703 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5704 * configure.in: Check for the presence of memrchr, and of its
5705 prototype.
5706
5707 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5708
5709 * lib/hash.h (__P): Added definition for this macro.
5710 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5711 BUILT_SOURCES, to ensure they are generated first.
5712 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5713 %error-verbose to allow bootstrapping with bison 1.30x.
5714
5715 2002-01-06 Akim Demaille <akim@epita.fr>
5716
5717 * src/reader.c (parse_braces): Don't fetch the next char, the
5718 convention is to fetch on entry.
5719 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5720 'switch' without a following semicolon.
5721 * tests/regression.at (braces parsing): New.
5722
5723 2002-01-06 Akim Demaille <akim@epita.fr>
5724
5725 Bison is dead wrong in its RR conflict reports.
5726
5727 * tests/torture.at (GNU Cim Grammar): New.
5728 * src/conflicts.c (count_rr_conflicts): Fix.
5729
5730 2002-01-06 Akim Demaille <akim@epita.fr>
5731
5732 Creating package.m4 from configure.ac causes too many problems.
5733
5734 * tests/Makefile.am (package.m4): Create it by hand,
5735 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5736
5737 2002-01-06 Akim Demaille <akim@epita.fr>
5738
5739 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5740 skeleton.h.
5741
5742 2002-01-04 Paul Eggert <eggert@twinsun.com>
5743
5744 * doc/bison.texinfo (Debugging):
5745 Remove YYSTDERR; it's no longer defined or used.
5746 Also, s/cstdio.h/cstdio/.
5747
5748 2002-01-03 Akim Demaille <akim@epita.fr>
5749
5750 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5751
5752 2002-01-03 Akim Demaille <akim@epita.fr>
5753
5754 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5755 tracing code to --trace, wait for a better --trace option, with
5756 args.
5757
5758 2002-01-03 Akim Demaille <akim@epita.fr>
5759
5760 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5761 The ISO C++ standard is extremely clear about it: stderr is
5762 considered a macro, not a regular symbol (see table 94 `Header
5763 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5764 Therefore std:: does not apply to it. It still does with fprintf.
5765 Also, s/cstdio.h/cstdio/.
5766
5767 2002-01-03 Akim Demaille <akim@epita.fr>
5768
5769 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5770 for non system headers.
5771
5772 2002-01-02 Akim Demaille <akim@epita.fr>
5773
5774 Equip the skeleton chain with location tracking, runtime trace,
5775 pure parser and scanner.
5776
5777 * src/parse-skel.y: Request a pure parser, locations, and prefix
5778 renaming.
5779 (%union): Having several members with the same type does not help
5780 type mismatches, simplify.
5781 (YYPRINT, yyprint): New.
5782 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5783 (skel_error): this.
5784 Handle locations.
5785 * src/scan-skel.l: Adjust to these changes.
5786 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5787 (LOCATION_PRINT, skel_control_t): New.
5788
5789 2001-12-30 Akim Demaille <akim@epita.fr>
5790
5791 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5792 replace `gb' with BLANKS.
5793 * src/scan-skel.l: Adjust.
5794
5795 2001-12-30 Akim Demaille <akim@epita.fr>
5796
5797 * src/system.h: We don't need nor want bcopy.
5798 Throw away MS-DOS crap: we don't need getpid.
5799 * configure.in: We don't need strndup. It was even causing
5800 problems: because Flex includes the headers *before* us,
5801 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5802 not visible.
5803 * lib/xstrndup.c: New.
5804 * src/scan-skel.l: Use it.
5805 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5806 * src/parse-skel.y: Use %directives instead of #defines.
5807
5808 2001-12-30 Akim Demaille <akim@epita.fr>
5809
5810 * src/skeleton.h: New.
5811 * src/output.c (output_parser, output_master_parser): Remove, dead
5812 code.
5813 * src/output.h (get_lines_number, actions_output, guards_output)
5814 (token_definitions_output): Prototype them.
5815 * src/parse-skel.y: Add the license notice.
5816 Include output.h and skeleton.h.
5817 (process_skeleton): Returns void, and takes a single parameter.
5818 * src/scan-skel.l: Add the license notice.
5819 Include skeleton.h.
5820 Don't use %option yylineno: it seems that then Flex imagines
5821 REJECT has been used, and therefore it won't reallocate its
5822 buffers (which makes no other sense to me than a bug). It results
5823 in warnings for `unused: yy_flex_realloc'.
5824
5825 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5826
5827 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5828 (MUSCLE_INSERT_PREFIX): ...to there.
5829 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5830 (MUSCLE_INSERT_PREFIX): Move from here...
5831
5832 * src/bison.hairy: Add a section directive. Put braces around muscle
5833 names. This parser skeleton is still broken, but Bison should not
5834 choke on a bad muscle 'syntax'.
5835 * src/bison.simple: Add a section directive. Put braces around muscle
5836 names.
5837
5838 * src/files.h (strsuffix, stringappend): Add declarations.
5839 (tab_extension): Add declaration.
5840 (short_base_name): Add declaration.
5841
5842 * src/files.c (strsuffix, stringappend): No longer static. These
5843 functions are used in the skeleton parser.
5844 (tab_extension): New.
5845 (compute_base_names): Use the computations done in this function
5846 to guess if the generated parsers should have '.tab' in their
5847 names.
5848 (short_base_name): No longer static.
5849
5850 * src/output.c (output_skeleton): New.
5851 (output): Disable call to output_master_parser, and give a try to
5852 a new skeleton handling system.
5853 (guards_output, actions_output): No longer static.
5854 (token_definitions_output, get_lines_number): No longer static.
5855
5856 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5857
5858 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5859 parse-skel.y.
5860
5861 * src/parse-skel.y: New file.
5862 * src/scan-skel.l: New file.
5863
5864 2001-12-29 Akim Demaille <akim@epita.fr>
5865
5866 %name-prefix is broken.
5867
5868 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5869 Adjust all dependencies.
5870 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5871 %name-prefix.
5872
5873 Renaming yylval but not yylloc is not consistent. Now we do.
5874
5875 * src/bison.simple: Prefix yylloc if used.
5876 * doc/bison.texinfo (Decl Summary): Document that.
5877
5878 2001-12-29 Akim Demaille <akim@epita.fr>
5879
5880 * doc/bison.texinfo: Promote `%long-directive' over
5881 `%long_directive'.
5882 Remove all references to fixed-output-files, yacc is enough.
5883
5884 2001-12-29 Akim Demaille <akim@epita.fr>
5885
5886 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5887 user prologue. These are defaults.
5888 * tests/actions.at (Mid-rule actions): Make sure the user can
5889 define YYDEBUG and YYERROR_VERBOSE.
5890
5891 2001-12-29 Akim Demaille <akim@epita.fr>
5892
5893 * src/output.c (header_output): Don't forget to export YYLTYPE and
5894 yylloc.
5895 * tests/headers.at (export YYLTYPE): New, make sure it does.
5896 * tests/regression.at (%union and --defines, Invalid CPP headers):
5897 Move to...
5898 * tests/headers.at: here.
5899
5900 2001-12-29 Akim Demaille <akim@epita.fr>
5901
5902 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5903
5904 2001-12-29 Akim Demaille <akim@epita.fr>
5905
5906 * tests/actions.at (Mid-rule actions): Output on a single line
5907 instead of several.
5908
5909 2001-12-29 Akim Demaille <akim@epita.fr>
5910
5911 * doc/bison.texinfo: Formatting changes.
5912
5913 2001-12-29 Akim Demaille <akim@epita.fr>
5914
5915 Don't store the token defs in a muscle, just be ready to output it
5916 on command. Now possible via `symbols'. Fixes a memory leak.
5917
5918 * src/output.c (token_definitions_output): New.
5919 (output_parser, header_output): Use it.
5920 * src/reader.c (symbols_save): Remove.
5921
5922 2001-12-29 Akim Demaille <akim@epita.fr>
5923
5924 * src/bison.simple: Do not provide a default for YYSTYPE and
5925 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5926 default.
5927
5928 2001-12-29 Akim Demaille <akim@epita.fr>
5929
5930 Mid-rule actions are simply... ignored!
5931
5932 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5933 the empty-rule associated to the dummy symbol, not to the host
5934 rule.
5935 * tests/actions.at (Mid-rule actions): New.
5936
5937 2001-12-29 Akim Demaille <akim@epita.fr>
5938
5939 Memory leak.
5940
5941 * src/reader.c (reader): Free grammar.
5942
5943 2001-12-29 Akim Demaille <akim@epita.fr>
5944
5945 Memory leak.
5946
5947 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5948 since it allocates it for each state, although only one is needed.
5949 (allocate_storage): Do it here.
5950
5951 2001-12-29 Akim Demaille <akim@epita.fr>
5952
5953 * src/options.h, src/options.c (create_long_option_table): Rename
5954 as...
5955 (long_option_table_new): this, with a clearer prototype.
5956 (percent_table): Remove, unused,
5957 * src/getargs.c (getargs): Adjust.
5958
5959 2001-12-29 Akim Demaille <akim@epita.fr>
5960
5961 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5962 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5963 as states.
5964
5965 2001-12-29 Akim Demaille <akim@epita.fr>
5966
5967 * src/lalr.c (build_relations): Rename `states' as `states1'.
5968 Sorry, I don't understand exactly what it is, no better name...
5969
5970 2001-12-29 Akim Demaille <akim@epita.fr>
5971
5972 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5973 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5974 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5975 as rules.
5976
5977 2001-12-29 Akim Demaille <akim@epita.fr>
5978
5979 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5980 ago.
5981
5982 2001-12-29 Akim Demaille <akim@epita.fr>
5983
5984 * src/reader.c, src/reader.h (user_toknums): Remove.
5985 Adjust all users to use symbols[i]->user_token_number.
5986
5987 2001-12-29 Akim Demaille <akim@epita.fr>
5988
5989 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5990 Adjust all users to use symbols[i]->prec or ->assoc.
5991
5992 2001-12-29 Akim Demaille <akim@epita.fr>
5993
5994 * src/reader.c, src/reader.h (tags): Remove.
5995 Adjust all users to use symbols[i]->tag.
5996
5997 2001-12-29 Akim Demaille <akim@epita.fr>
5998
5999 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6000 and rule_table.
6001 * src/reader.c (packsymbols): Fill this table.
6002 Drop sprec.
6003 * src/conflicts.c (resolve_sr_conflict): Adjust.
6004 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6005 single table.
6006 Use symbols[i]->tag instead of tags[i].
6007
6008 2001-12-29 Akim Demaille <akim@epita.fr>
6009
6010 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6011 In addition, put a comment in there, to replace...
6012 * tests/regression.at (%union and C comments): Remove.
6013
6014 2001-12-29 Akim Demaille <akim@epita.fr>
6015
6016 * tests/regression.at (Web2c Actions): Blindly move the actual
6017 output as expected output. The contents *seem* right to me, but I
6018 can't pretend reading perfectly parser tables... Nonetheless, all
6019 the other tests pass correctly, the table look OK, even though the
6020 presence of `$axiom' is to be noted: AFAICS it is useless (but
6021 harmless).
6022
6023 2001-12-29 Akim Demaille <akim@epita.fr>
6024
6025 * src/reader.c (readgram): Don't add the rule 0 if there were no
6026 rules read. In other words, add it _after_ having performed
6027 grammar sanity checks.
6028 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6029
6030 2001-12-29 Akim Demaille <akim@epita.fr>
6031
6032 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6033 visible, and some states have now a different number.
6034
6035 2001-12-29 Akim Demaille <akim@epita.fr>
6036
6037 * src/reader.c (readgram): Bind the initial rule's lineno to that
6038 of the first rule.
6039 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6040 (Solved SR Conflicts): Adjust rule 0's line number.
6041
6042 2001-12-29 Akim Demaille <akim@epita.fr>
6043
6044 Fix the `GAWK Grammar' failure.
6045
6046 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6047 the reductions of the first state which was mistakenly confused
6048 with the final state because precisely final_state was initialized
6049 to 0.
6050 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6051 now noticed by Bison.
6052 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6053 have a reduction on $default.
6054
6055 2001-12-29 Akim Demaille <akim@epita.fr>
6056
6057 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6058 rule line numbers.
6059 * src/closure.c (print_closure): Likewise.
6060 * src/derives.c (print_derives): Likewise.
6061 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6062 now.
6063
6064 2001-12-29 Akim Demaille <akim@epita.fr>
6065
6066 * src/lalr.c (lookaheads_print): New.
6067 (lalr): Call it when --trace-flag.
6068 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6069 are dumped.
6070
6071 2001-12-29 Akim Demaille <akim@epita.fr>
6072
6073 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6074 when walking through ritem, even via rule->rhs.
6075 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6076 (useful_production, useless_nonterminals): Likewise.
6077 (reduce_grammar_tables): Likewise, plus update nritems.
6078 * src/nullable.c (set_nullable): Likewise.
6079 * src/lalr.c (build_relations): Likewise.
6080 * tests/sets.at (Nullable): Adjust.
6081 Fortunately, now, the $axiom is no longer nullable.
6082
6083 2001-12-29 Akim Demaille <akim@epita.fr>
6084
6085 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6086 the 0-sentinel.
6087 * src/gram.c (ritem_longest_rhs): Likewise.
6088 * src/reduce.c (nonterminals_reduce): Likewise.
6089 * src/print_graph.c (print_graph): Likewise.
6090 * src/output.c (output_rule_data): Likewise.
6091 * src/nullable.c (set_nullable): Likewise.
6092
6093 2001-12-29 Akim Demaille <akim@epita.fr>
6094
6095 * src/output.c: Comment changes.
6096
6097 2001-12-27 Paul Eggert <eggert@twinsun.com>
6098
6099 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6100 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6101 Sparc, as they were causing more porting problems than the
6102 (minor) performance improvement was worth.
6103
6104 Also, catch up with 1.31's YYSTD.
6105
6106 2001-12-27 Akim Demaille <akim@epita.fr>
6107
6108 * src/output.c (output_gram): Rely on nritems, not the
6109 0-sentinel. See below.
6110 Use -1 as separator, not 0.
6111 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6112 Rely on -1 as separator in yyrhs, instead of 0.
6113 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6114 twice `Now at end of input', therefore there are two lines less to
6115 expect.
6116
6117 2001-12-27 Akim Demaille <akim@epita.fr>
6118
6119 * tests/regression.at (Unresolved SR Conflicts):
6120 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6121 below.
6122
6123 2001-12-27 Akim Demaille <akim@epita.fr>
6124
6125 * src/LR0.c (new_state): Recognize the final state by the fact it
6126 is reached by eoftoken.
6127 (insert_start_shifting_state, insert_eof_shifting_state)
6128 (insert_accepting_state, augment_automaton): Remove, since now
6129 these states are automatically computed from the initial state.
6130 (generate_states): Adjust.
6131 * src/print.c: When reporting a rule number to the user, substract
6132 1, so that the axiom rule is rule 0, and the first user rule is 1.
6133 * src/reduce.c: Likewise.
6134 * src/print_graph.c (print_core): For the time being, just as for
6135 the report, depend upon --trace-flags to dump the full set of
6136 items.
6137 * src/reader.c (readgram): Once the grammar read, insert the rule
6138 0: `$axiom: START-SYMBOL $'.
6139 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6140 number of the states has changed (the final state is no longer
6141 necessarily the last), catch up.
6142
6143 2001-12-27 Akim Demaille <akim@epita.fr>
6144
6145 Try to make the use of the eoftoken valid. Given that its value
6146 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6147 is used instead of > 0 where appropriate, (ii), depend upon nritems
6148 instead of the 0-sentinel.
6149
6150 * src/gram.h, src/gram.c (nritems): New.
6151 Expected to be duplication of nitems, but for the time being...
6152 * src/reader.c (packgram): Assert nritems and nitems are equal.
6153 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6154 * src/closure.c (print_closure, print_fderives): Likewise.
6155 * src/gram.c (ritem_print): Likewise.
6156 * src/print.c (print_core, print_grammar): Likewise.
6157 * src/print_graph.c: Likewise.
6158
6159 2001-12-27 Akim Demaille <akim@epita.fr>
6160
6161 * src/main.c (main): If there are complains after grammar
6162 reductions, then output the report anyway if requested, then die.
6163 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6164 * src/reader.c (eoftoken): New.
6165 (parse_token_decl): If the token being defined has value `0', it
6166 is the eoftoken.
6167 (packsymbols): No longer hack `tags' to insert `$' by hand.
6168 Be sure to preserve the value of the eoftoken.
6169 (reader): Make sure eoftoken is defined.
6170 Initialize nsyms to 0: now eoftoken is created just like the others.
6171 * src/print.c (print_grammar): Don't special case the eof token.
6172 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6173 lie anyway, albeit pleasant.
6174 * tests/calc.at: Exercise error messages with eoftoken.
6175 Change the grammar so that empty input is invalid.
6176 Adjust expectations.
6177 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6178
6179 2001-12-27 Akim Demaille <akim@epita.fr>
6180
6181 * configure.in: Check the protos of strchr ans strspn.
6182 Replace strchr if needed.
6183 * src/system.h: Provide the protos of strchr, strspn and memchr if
6184 missing.
6185 * lib/strchr.c: New.
6186 * src/reader.c (symbols_save): Use strchr.
6187
6188 2001-12-27 Akim Demaille <akim@epita.fr>
6189
6190 * src/print.c, src/print_graph.c (escape): New.
6191 Use it to quote the TAGS outputs.
6192 * src/print_graph.c (print_state): Now errors are in red, and
6193 reductions in green.
6194 Prefer high to wide: output the state number on a line of its own.
6195
6196 2001-12-27 Akim Demaille <akim@epita.fr>
6197
6198 * src/state.h, src/state.c (reductions_new): New.
6199 * src/LR0.c (set_state_table): Let all the states have a
6200 `reductions', even if reduced to 0.
6201 (save_reductions): Adjust.
6202 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6203 * src/print.c (print_reductions, print_actions): Adjust.
6204 * src/output.c (action_row): Adjust.
6205
6206 2001-12-27 Akim Demaille <akim@epita.fr>
6207
6208 * src/state.h, src/state.c (errs_new, errs_dup): New.
6209 * src/LR0.c (set_state_table): Let all the states have an errs,
6210 even if reduced to 0.
6211 * src/print.c (print_errs, print_reductions): Adjust.
6212 * src/output.c (output_actions, action_row): Adjust.
6213 * src/conflicts.c (resolve_sr_conflict): Adjust.
6214
6215 2001-12-27 Akim Demaille <akim@epita.fr>
6216
6217 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6218
6219 2001-12-27 Akim Demaille <akim@epita.fr>
6220
6221 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6222 * src/print.c: here.
6223 (lookaheadset, shiftset): New, used as additional storage by
6224 print_reductions.
6225 (print_results): Adjust.
6226 (print_shifts, print_gotos, print_errs): New, extracted from...
6227 (print_actions): here.
6228 * src/print_graph.c (print_actions): Remove dead code.
6229
6230 2001-12-27 Akim Demaille <akim@epita.fr>
6231
6232 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6233 `$n' and `@n'.
6234
6235 2001-12-27 Akim Demaille <akim@epita.fr>
6236
6237 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6238 (build_relations): Adjust.
6239
6240 2001-12-27 Akim Demaille <akim@epita.fr>
6241
6242 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6243 duplication.
6244
6245 2001-12-27 Akim Demaille <akim@epita.fr>
6246
6247 * src/reader.c (packgram): Catch nitems overflows.
6248
6249 2001-12-27 Akim Demaille <akim@epita.fr>
6250
6251 * src/files.c, src/files.h (guard_obstack): Remove.
6252 * src/output.c (output): Adjust.
6253 * src/reader.c (parse_braces): New, factoring...
6254 (copy_action, copy_guard): these two which are renamed as...
6255 (parse_action, parse_guard): these.
6256 As a voluntary consequence, using braces around guards is now
6257 mandatory.
6258
6259 2001-12-27 Akim Demaille <akim@epita.fr>
6260
6261 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6262 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6263 members.
6264 (symbol_list_new): Adjust.
6265 (copy_action): action_line is the first line, not the last.
6266 (copy_guard): Just as for actions, store the `action' only, not
6267 the switch/case/break flesh.
6268 Don't parse the user action that might follow the guard, let...
6269 (readgram): do it, i.e., now, there can be an action after a
6270 guard.
6271 In other words the guard is just explicitly optional.
6272 (packgram): Adjust.
6273 * src/output.c (guards_output): New.
6274 (output_parser): Call it when needed.
6275 (output): Also free the guard and attrs obstacks.
6276 * src/files.c, src/files.h (obstack_save): Remove.
6277 (output_files): Remove.
6278 As a result, if one needs the former `.act' file, using an
6279 appropriate skeleton which requires actions and guards is now
6280 required.
6281 * src/main.c (main): Adjust.
6282 * tests/semantic.at: New.
6283 * tests/regression.at: Use `input.y' as input file name.
6284 Avoid 8+3 problems by requiring input.c when the test needs the
6285 parser.
6286
6287 2001-12-27 Akim Demaille <akim@epita.fr>
6288
6289 * src/reader.c (symbol_list_new): Be sure to initialize all the
6290 fields.
6291
6292 2001-12-27 Akim Demaille <akim@epita.fr>
6293
6294 All the hacks using a final pseudo state are now useless.
6295
6296 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6297 * src/lalr.c (nLA): New.
6298 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6299 instead of lookaheadsp from the pseudo state (nstate + 1).
6300
6301 2001-12-27 Akim Demaille <akim@epita.fr>
6302
6303 * src/output.c (action_row, token_actions): Use a state_t instead
6304 of a integer, and nlookaheads instead of the following state's
6305 lookaheadsp.
6306
6307 2001-12-27 Akim Demaille <akim@epita.fr>
6308
6309 * src/conflicts.c (log_resolution, flush_shift)
6310 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6311 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6312 (conflicts_print, print_reductions): Use a state_t instead of an
6313 integer when referring to a state.
6314 As much as possible, depend upon nlookaheads, instead of the
6315 `lookaheadsp' member of the following state (since lookaheads of
6316 successive states are successive, the difference between state n + 1
6317 and n served as the number of lookaheads for state n).
6318 * src/lalr.c (add_lookback_edge): Likewise.
6319 * src/print.c (print_core, print_actions, print_state)
6320 (print_results): Likewise.
6321 * src/print_graph.c (print_core, print_actions, print_state)
6322 (print_graph): Likewise.
6323 * src/conflicts.h: Adjust.
6324
6325 2001-12-27 Akim Demaille <akim@epita.fr>
6326
6327 * src/bison.hairy: Formatting/comment changes.
6328 ANSIfy.
6329 Remove `register' indications.
6330 Add plenty of `static'.
6331
6332 2001-12-27 Akim Demaille <akim@epita.fr>
6333
6334 * src/output.c (prepare): Drop the muscle `ntbase' which
6335 duplicates ntokens.
6336 * src/bison.simple: Formatting/comment changes.
6337 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6338 is an undocumented synonym.
6339
6340 2001-12-22 Akim Demaille <akim@epita.fr>
6341
6342 * src/output.c (output_table_data): Change the prototype to use
6343 `int' for array ranges: some invocations do pass an int, not a
6344 short.
6345 Reported by Wayne Green.
6346
6347 2001-12-22 Akim Demaille <akim@epita.fr>
6348
6349 Some actions of web2c.y are improperly triggered.
6350 Reported by Mike Castle.
6351
6352 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6353 * tests/regression.at (Web2c): Rename as...
6354 (Web2c Report): this.
6355 (Web2c Actions): New.
6356
6357 2001-12-22 Akim Demaille <akim@epita.fr>
6358
6359 Reductions in web2c.y are improperly reported.
6360 Reported by Mike Castle.
6361
6362 * src/conflicts.c (print_reductions): Fix.
6363 * tests/regression.at (Web2c): New.
6364
6365 2001-12-18 Akim Demaille <akim@epita.fr>
6366
6367 Some host fail on `assert (!"foo")', which expands to
6368 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6369 Reported by Nelson Beebee.
6370
6371 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6372 `#define it_succeeded 0' and `assert (it_succeeded)'.
6373
6374 2001-12-17 Marc Autret <autret_m@epita.fr>
6375
6376 * src/bison.simple: Don't hard code the skeleton line and filename.
6377 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6378 New line counter 'skeleton_line' (skeleton-line muscle).
6379
6380 2001-12-17 Paul Eggert <eggert@twinsun.com>
6381
6382 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6383 YYDEBUG must be defined to a nonzero value.
6384
6385 * src/bison.simple (yytname): Do not assume that the user defines
6386 YYDEBUG to a properly parenthesized expression.
6387
6388 2001-12-17 Akim Demaille <akim@epita.fr>
6389
6390 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6391 nlookaheads is a new member.
6392 Adjust all users.
6393 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6394 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6395 state.
6396
6397 2001-12-17 Akim Demaille <akim@epita.fr>
6398
6399 * src/files.h, src/files.c (open_files, close_files): Remove.
6400 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6401 let...
6402 * src/reader.c (reader): Do it.
6403
6404 2001-12-17 Akim Demaille <akim@epita.fr>
6405
6406 * src/conflicts.c (print_reductions): Formatting changes.
6407
6408 2001-12-17 Akim Demaille <akim@epita.fr>
6409
6410 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6411 (flush_reduce): New.
6412 (resolve_sr_conflict): Adjust.
6413
6414 2001-12-17 Akim Demaille <akim@epita.fr>
6415
6416 * src/output.c (output_obstack): Be static and rename as...
6417 (format_obstack): this, to avoid any confusion with files.c's
6418 output_obstack.
6419 * src/reader.h (muscle_obstack): Move to...
6420 * src/output.h: here, since it's defined in output.c.
6421
6422 2001-12-17 Akim Demaille <akim@epita.fr>
6423
6424 * src/output.c (action_row, save_column, default_goto)
6425 (sort_actions, matching_state, pack_vector): Better variable
6426 locality.
6427
6428 2001-12-17 Akim Demaille <akim@epita.fr>
6429
6430 * src/output.c: Various formatting changes.
6431
6432 2001-12-17 Akim Demaille <akim@epita.fr>
6433
6434 * src/files.c (output_files): Free the output_obstack.
6435 * src/main.c (main): Call print and print_graph conditionally.
6436 * src/print.c (print): Work unconditionally.
6437 * src/print_graph.c (print_graph): Work unconditionally.
6438 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6439
6440 2001-12-16 Marc Autret <autret_m@epita.fr>
6441
6442 * src/output.c (actions_output): Fix. When we use %no-lines,
6443 there is one less line per action.
6444
6445 2001-12-16 Marc Autret <autret_m@epita.fr>
6446
6447 * src/bison.simple: Remove a useless #line directive.
6448 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6449 * src/output.c (get_lines_number): New.
6450 (output_parser): Adjust, now takes care about the lines of a
6451 output muscles.
6452 Fix line numbering.
6453 (actions_output): Computes the number of lines taken by actions.
6454 (output_master_parser): Insert new skeleton which is the name of
6455 the output parser file name.
6456
6457 2001-12-15 Marc Autret <autret_m@epita.fr>
6458
6459 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6460
6461 2001-12-15 Marc Autret <autret_m@epita.fr>
6462
6463 * src/output.c (output_gram): Keep track of the hairy one.
6464
6465 2001-12-15 Akim Demaille <akim@epita.fr>
6466
6467 Make `make distcheck' work.
6468
6469 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6470 system.h which uses libgettext.h.
6471
6472 2001-12-15 Akim Demaille <akim@epita.fr>
6473
6474 * src/nullable.c (set_nullable): Useless rules must be skipped,
6475 otherwise, since we range over their symbols, we might look at a
6476 nonterminal which no longer ``exists'', i.e., it is not counted in
6477 `nvars', hence we overflow our arrays.
6478
6479 2001-12-15 Akim Demaille <akim@epita.fr>
6480
6481 The header can also be produced directly, without any obstack!
6482 Yahoo!
6483
6484 * src/files.c, src/files.h (defines_obstack): Remove.
6485 (compute_header_macro): Global.
6486 (defines_obstack_save): Remove.
6487 * src/reader.c (parse_union_decl): No longer output to
6488 defines_obstack: its content can be found in the `stype' muscle
6489 anyway.
6490 (output_token_translations): Merge into...
6491 (symbols_output): this.
6492 Rename as...
6493 (symbols_save): this.
6494 (reader): Adjust.
6495 * src/output.c (header_output): New.
6496 (output): Call it.
6497
6498 2001-12-15 Akim Demaille <akim@epita.fr>
6499
6500 * src/reader.c (parse_union_decl): Instead of handling two obstack
6501 simultaneously, use one to define the `stype' muscle, and use the
6502 value of the latter to fill defines_obstack.
6503 (copy_comment): Remove.
6504 (copy_comment2): Work for a single obstack.
6505 Rename as...
6506 (copy_comment): this.
6507
6508 2001-12-15 Akim Demaille <akim@epita.fr>
6509
6510 * src/lex.c, src/lex.h (xgetc): No longer static.
6511 * src/reader.c (parse_union_decl): Revamp.
6512
6513 2001-12-15 Akim Demaille <akim@epita.fr>
6514
6515 Still making progress in separating Bison into (i) input, (ii)
6516 process, (iii) output: now we can directly output the parser file
6517 without using table_obstack at all.
6518
6519 * src/files.c, src/files.h (table_obstack): Bye bye.
6520 (parser_file_name): New.
6521 * src/files.c (compute_output_file_names): Compute it.
6522 * src/output.c (actions_output, output_parser)
6523 (output_master_parser): To a file instead of an obstack.
6524
6525 2001-12-15 Akim Demaille <akim@epita.fr>
6526
6527 Attach actions to rules, instead of pre-outputting them to
6528 actions_obstack.
6529
6530 * src/gram.h (rule_t): action and action_line are new members.
6531 * src/reader.c (symbol_list): Likewise.
6532 (copy_action): Save the actions within the rule.
6533 (packgram): Save them in rule_table.
6534 * src/output.c (actions_output): New.
6535 (output_parser): Use it on `%%actions'.
6536 (output_rule_data): Don't free rule_table.
6537 (output): Do it.
6538 (prepare): Don't save the `action' muscle.
6539 * src/bison.simple: s/%%action/%%actions/.
6540
6541 2001-12-15 Akim Demaille <akim@epita.fr>
6542
6543 * src/reader.c (copy_action): When --yacc, don't append a `;'
6544 to the user action: let it fail if lacking.
6545 Suggested by Arnold Robbins and Tom Tromey.
6546
6547 2001-12-14 Akim Demaille <akim@epita.fr>
6548
6549 * src/lex.c (literalchar): Simply return the char you decoded, non
6550 longer mess around with obstacks and int pointers.
6551 Adjust all callers.
6552
6553 2001-12-14 Akim Demaille <akim@epita.fr>
6554
6555 * src/lex.c (literalchar): Don't escape the special characters,
6556 just decode them, and keep them as char (before, eol was output as
6557 the 2 char string `\n' etc.).
6558 * src/output.c (output_rule_data): Use quotearg to output the
6559 token strings.
6560
6561 2001-12-13 Paul Eggert <eggert@twinsun.com>
6562
6563 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6564 Do not infringe on the global user namespace when using C++.
6565 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6566 All uses of `fprintf' and `stderr' changed.
6567
6568 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6569
6570 2001-12-13 Akim Demaille <akim@epita.fr>
6571
6572 The computation of nullable is broken: it doesn't handle empty
6573 RHS's properly.
6574
6575 * tests/torture.at (GNU AWK Grammar): New.
6576 * tests/sets.at (Nullable): New.
6577 * src/nullable.c (set_nullable): Instead of blindly looping over
6578 `ritems', loop over the rules, and then over their rhs's.
6579
6580 Work around Autotest bugs.
6581
6582 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6583 frame, because Autotest understand lines starting with a `+' as
6584 traces from the shell. Then, they are not processed properly.
6585 Admittedly an Autotest bug, but we don't have time to wait for
6586 Autotest to catch up.
6587 * tests/regression.at (Broken Closure): Adjust to the new table
6588 frames.
6589 Move to...
6590 * tests/sets.at: here.
6591
6592 2001-12-13 Akim Demaille <akim@epita.fr>
6593
6594 * src/closure.c (closure): Use nrules instead of playing tricks
6595 with BITS_PER_WORD.
6596
6597 2001-12-13 Akim Demaille <akim@epita.fr>
6598
6599 * src/print.c (print_actions): Output the handling of `$' as the
6600 traces do: shifting the token EOF. Before EOF was treated as a
6601 nonterminal.
6602 * tests/regression.at: Adjust some tests.
6603 * src/print_graph.c (print_core): Complete the set of items via
6604 closure. The next-to-final and final states are still unsatisfying,
6605 but that's to be addressed elsewhere.
6606 No longer output the rule numbers, but do output the state number.
6607 A single loop for the shifts + gotos is enough, but picked a
6608 distinct color for each.
6609 (print_graph): Initialize and finalize closure.
6610
6611 2001-12-13 Akim Demaille <akim@epita.fr>
6612
6613 * src/reader.c (readgram): Remove dead code, an strip useless
6614 braces.
6615 (get_type): Remove, unused.
6616
6617 2001-12-12 Akim Demaille <akim@epita.fr>
6618
6619 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6620 on that of lib/error.c.
6621
6622 2001-12-12 Akim Demaille <akim@epita.fr>
6623
6624 Some hosts don't like `/' in includes.
6625
6626 * src/system.h: Include libgettext.h without qualifying the path.
6627 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6628 $(top_srcdir).
6629
6630 2001-12-11 Marc Autret <autret_m@epita.fr>
6631
6632 * src/output.c (output_parser): Remove useless muscle.
6633
6634 2001-12-11 Marc Autret <autret_m@epita.fr>
6635
6636 * src/bison.simple: Remove #line just before %%epilogue. It
6637 is now handled in ...
6638 * src/reader.c (read_additionnal_code): Add the output of a
6639 #line for the epilogue.
6640
6641 2001-12-10 Marc Autret <autret_m@epita.fr>
6642
6643 * src/reader.c (copy_definition): Re-use CPP-outed code which
6644 replace precedent remove.
6645 * src/bison.simple: Remove #line before %%prologue because
6646 %%input-line is wrong at this time.
6647
6648 2001-12-10 Marc Autret <autret_m@epita.fr>
6649
6650 * src/reader.c (symbols_output): Clean up.
6651 * src/output.c (output_gram, output): Clean up.
6652
6653 2001-12-10 Akim Demaille <akim@epita.fr>
6654
6655 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6656 * src/LR0.c (set_state_table): here.
6657 * src/lalr.c (lalr): Call it.
6658
6659 2001-12-10 Akim Demaille <akim@epita.fr>
6660
6661 * src/state.h (shifts): Remove the `number' member: shifts are
6662 attached to state, hence no longer need to be labelled with a
6663 state number.
6664
6665 2001-12-10 Akim Demaille <akim@epita.fr>
6666
6667 Now that states have a complete set of members, the linked list of
6668 shifts is useless: just fill directly the state's shifts member.
6669
6670 * src/state.h (shifts): Remove the `next' member.
6671 * src/LR0.c (first_state, last_state): Remove.
6672 Adjust the callers.
6673 (augment_automaton): Don't look for the shifts that must be added
6674 a shift on EOF: it is those of the state we looked for! But now,
6675 since shifts are attached, it is no longer needed to looking
6676 merely by its id: its number.
6677
6678 2001-12-10 Akim Demaille <akim@epita.fr>
6679
6680 * src/LR0.c (augment_automaton): Better variable locality.
6681 Remove an impossible branch: if there is a state corresponding to
6682 the start symbol being shifted, then there is shift for the start
6683 symbol from the initial state.
6684
6685 2001-12-10 Akim Demaille <akim@epita.fr>
6686
6687 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6688 only when appropriate: when insert_start_shifting_state' is not
6689 invoked.
6690 * tests/regression.at (Rule Line Numbers): Adjust.
6691
6692 2001-12-10 Akim Demaille <akim@epita.fr>
6693
6694 * src/LR0.c (augment_automaton): Now that all states have shifts,
6695 merge the two cases addition shifts to the initial state.
6696
6697 2001-12-10 Akim Demaille <akim@epita.fr>
6698
6699 * src/lalr.c (set_state_table): Move to...
6700 * src/LR0.c: here.
6701 * src/lalr.c (lalr): Don't call it...
6702 * src/LR0.c (generate_states): do it.
6703 * src/LR0.h (first_state): Remove, only the table is used.
6704
6705 2001-12-10 Akim Demaille <akim@epita.fr>
6706
6707 * src/LR0.h (first_shift, first_reduction): Remove.
6708 * src/lalr.c: Don't use first_shift: find shifts through the
6709 states.
6710
6711 2001-12-10 Akim Demaille <akim@epita.fr>
6712
6713 * src/LR0.c: Attach shifts to states as soon as they are
6714 computed.
6715 * src/lalr.c (set_state_table): Instead of assigning shifts to
6716 state, just assert that the mapping was properly done.
6717
6718 2001-12-10 Akim Demaille <akim@epita.fr>
6719
6720 * src/LR0.c (insert_start_shift): Rename as...
6721 (insert_start_shifting_state): this.
6722 (insert_eof_shifting_state, insert_accepting_state): New.
6723 (augment_automaton): Adjust.
6724 Better locality of the variables.
6725 When looking if the start_symbol is shifted from the initial
6726 state, using `while (... symbol != start_symbol ...)' sounds
6727 better than `while (... symbol < start_symbol ...)': If fail
6728 to see how the order between symbols could be relevant!
6729
6730 2001-12-10 Akim Demaille <akim@epita.fr>
6731
6732 * src/getargs.h: Don't declare `spec_name_prefix' and
6733 `spec_file_prefix', declared by src/files.h.
6734 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6735 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6736 * src/output.c (prepare): Adjust.
6737 * src/reader.c (symbols_output): Likewise.
6738 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6739
6740 2001-12-10 Akim Demaille <akim@epita.fr>
6741
6742 * src/muscle_tab.c (muscle_init): NULL is a better default than
6743 `"0"'.
6744
6745 2001-12-10 Akim Demaille <akim@epita.fr>
6746
6747 * src/reader.c (reader): Calling symbols_output once is enough.
6748
6749 2001-12-10 Akim Demaille <akim@epita.fr>
6750
6751 Now that states have a complete set of members, the linked list of
6752 reductions is useless: just fill directly the state's reductions
6753 member.
6754
6755 * src/state.h (struct reductions): Remove member `number' and
6756 `next'.
6757 * src/LR0.c (first_reduction, last_reduction): Remove.
6758 (save_reductions): Don't link the new reductions, store them in
6759 this_state.
6760 * src/lalr.c (set_state_table): No need to attach reductions to
6761 states, it's already done.
6762 * src/output.c (output_actions): No longer free the shifts, then
6763 the reductions, then the states: free all the states and their
6764 members.
6765
6766 2001-12-10 Akim Demaille <akim@epita.fr>
6767
6768 * src/options.c (OPTN, DRTV, BOTH): New.
6769 (option_table): Use them.
6770
6771 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6772 the job of system.h.
6773 * src/options.c: Don't include stdio.h and xalloc.h for the same
6774 reasons.
6775
6776 2001-12-10 Akim Demaille <akim@epita.fr>
6777
6778 * src/output.c (output, prepare): Make sure the values of the
6779 muscles `action' and `prologue' are 0-terminated.
6780
6781 2001-12-10 Akim Demaille <akim@epita.fr>
6782
6783 Clean up GCC warnings.
6784
6785 * src/reader.c (copy_action): `buf' is not used.
6786 (parse_skel_decl): Be static.
6787 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6788 * src/options.h (create_long_option_table): Have a real prototype.
6789 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6790 (hash_delete_at): Return const void *.
6791 Adjust casts to preserve the const.
6792
6793 2001-12-10 Akim Demaille <akim@epita.fr>
6794
6795 * configure.in: Require 2.52g.
6796 M4 is not needed, but AUTOM4TE is.
6797 * m4/m4.m4: Remove.
6798 * tests/Makefile.am: Adjust.
6799
6800 2001-12-10 Akim Demaille <akim@epita.fr>
6801
6802 One structure for states is enough, even though theoretically
6803 there are LR(0) states and LALR(1) states.
6804
6805 * src/lalr.h (state_t): Remove.
6806 (state_table): Be state_t **, not state_t *.
6807 * src/state.h (core, CORE_ALLOC): Rename as...
6808 (state_t, STATE_ALLOC): this.
6809 Add the LALR(1) members: shifts, reductions, errs.
6810 * src/LR0.c (state_table): Rename as...
6811 (state_hash): this, to avoid name clashes with the global
6812 `state_table'.
6813 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6814 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6815
6816 2001-12-10 Akim Demaille <akim@epita.fr>
6817
6818 Bison dumps core on bash.y.
6819 Reported by Pascal Bart.
6820
6821 * src/warshall.c (bitmatrix_print): New.
6822 (TC): Use it.
6823 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6824 j must be the outer loop.
6825 * tests/regression.at (Broken Closure): New.
6826
6827 2001-12-05 Akim Demaille <akim@epita.fr>
6828
6829 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6830 its argument.
6831 Reported by Peter Hamorsky.
6832
6833 2001-12-05 Akim Demaille <akim@epita.fr>
6834
6835 * src/conflicts.c (err_table): Remove.
6836 (resolve_sr_conflict): Adjust.
6837 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6838 Rename as...
6839 (state_t.reductions, state_t.shifts): this.
6840
6841 2001-12-05 Akim Demaille <akim@epita.fr>
6842
6843 * src/reduce.c (reduce_grammar_tables): No longer disable the
6844 removal of useless rules via CPP but via `if (0)', so that the
6845 compiler still check the code is valid.
6846 For instance, it should have noticed `rline' no longer exists: use
6847 the `line' member of rule_t.
6848 * src/gram.c (dummy, rline): Remove, unused.
6849
6850 2001-12-05 Akim Demaille <akim@epita.fr>
6851
6852 * src/output.c (pack_vector): Use assert, not berror.
6853 * src/main.c (berror): Remove, unused.
6854
6855 2001-12-05 Akim Demaille <akim@epita.fr>
6856
6857 New experimental feature: if --verbose --trace output all the
6858 items of a state, not only its kernel.
6859
6860 * src/print.c (print_core): If `trace_flag', then invoke closure
6861 before outputting the items of the state (print_core is no longer
6862 a correct name them).
6863 (print_results): Invoke new_closure/free_closure if needed.
6864
6865 2001-12-05 Akim Demaille <akim@epita.fr>
6866
6867 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6868 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6869 (nitemset): for consistency with the rest of the project.
6870
6871 2001-12-05 Akim Demaille <akim@epita.fr>
6872
6873 * src/closure.c (print_closure): Improve.
6874 (closure): Use it for printing input and output.
6875
6876 2001-12-05 Akim Demaille <akim@epita.fr>
6877
6878 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6879 indexed by nonterminals.
6880
6881 2001-12-05 Akim Demaille <akim@epita.fr>
6882
6883 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6884 what it was!).
6885 * src/warshall.h: Remove accidental duplication of the content.
6886
6887 2001-12-05 Akim Demaille <akim@epita.fr>
6888
6889 * src/closure.c (set_fderives): De-obfuscate.
6890
6891 2001-12-05 Akim Demaille <akim@epita.fr>
6892
6893 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6894
6895 2001-12-05 Akim Demaille <akim@epita.fr>
6896
6897 * src/closure.c (set_firsts): De-obfuscate.
6898
6899 2001-12-05 Akim Demaille <akim@epita.fr>
6900
6901 * src/output.c (action_row): De-obfuscate
6902 using the good o' techniques: arrays not pointers, variable
6903 locality, BITISSET, RESETBIT etc.
6904
6905 2001-12-05 Akim Demaille <akim@epita.fr>
6906
6907 Pessimize the code to simplify it: from now on, all the states
6908 have a valid SHIFTS, which NSHIFTS is possibly 0.
6909
6910 * src/LR0.c (shifts_new): Be global and move to..
6911 * src/state.c, src/state.h: here.
6912 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6913 * src/print_graph: Adjust.
6914
6915 2001-12-05 Akim Demaille <akim@epita.fr>
6916
6917 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6918 * src/conflicts.c: Use it.
6919 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6920 incorrectly ``simplified''.
6921
6922 2001-12-05 Akim Demaille <akim@epita.fr>
6923
6924 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6925 using the good o' techniques: arrays not pointers, variable
6926 locality, BITISSET, RESETBIT etc.
6927
6928 2001-12-05 Akim Demaille <akim@epita.fr>
6929
6930 * src/state.h (SHIFT_SYMBOL): New.
6931 * src/conflicts.c: Use it to deobfuscate.
6932
6933 2001-12-05 Akim Demaille <akim@epita.fr>
6934
6935 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6936 (print_reductions): De-obfuscate using the good o' techniques:
6937 arrays not pointers, variable locality, BITISSET.
6938
6939 2001-12-05 Akim Demaille <akim@epita.fr>
6940
6941 * src/conflicts.c (print_reductions): Arrays, not pointers.
6942 Use BITISSET.
6943
6944 2001-12-05 Akim Demaille <akim@epita.fr>
6945
6946 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6947
6948 2001-12-05 Akim Demaille <akim@epita.fr>
6949
6950 * src/conflicts.c (print_reductions): Improve variable locality.
6951
6952 2001-12-05 Akim Demaille <akim@epita.fr>
6953
6954 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6955
6956 2001-12-05 Akim Demaille <akim@epita.fr>
6957
6958 * src/conflicts.c (print_reductions): Improve variable locality.
6959
6960 2001-12-05 Akim Demaille <akim@epita.fr>
6961
6962 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6963 * src/lalr.c: Use them.
6964
6965 2001-12-05 Akim Demaille <akim@epita.fr>
6966
6967 * src/LR0.c (augment_automaton): Formatting changes.
6968 Better variable locality.
6969
6970 2001-12-05 Akim Demaille <akim@epita.fr>
6971
6972 * src/lalr.c (matrix_print): New.
6973 (transpose): Use it.
6974 Use arrays instead of pointers.
6975
6976 2001-12-05 Akim Demaille <akim@epita.fr>
6977
6978 * src/lalr.c (maxrhs): Move to...
6979 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6980 * src/lalr.c (build_relations): Adjust.
6981
6982 2001-12-05 Akim Demaille <akim@epita.fr>
6983
6984 * src/lalr.c (transpose): Free the memory allocated to the
6985 argument, as it is replaced by the results by the unique caller.
6986 (build_relations): Merely invoke transpose: it handles the memory
6987 deallocation.
6988 Improve variable locality.
6989 Avoid variables used as mere abbreviations.
6990 (compute_lookaheads): Use arrays instead of pointers.
6991
6992 2001-12-05 Akim Demaille <akim@epita.fr>
6993
6994 * src/lalr.c (initialize_F): Improve variable locality.
6995 Avoid variables used as mere abbreviations.
6996
6997 2001-12-05 Akim Demaille <akim@epita.fr>
6998
6999 * src/derives.c (print_derives): Display the ruleno.
7000 * src/lalr.c (initialize_F, transpose): Better variable locality
7001 to improve readability.
7002 Avoid variables used as mere abbreviations.
7003
7004 2001-12-05 Akim Demaille <akim@epita.fr>
7005
7006 * src/lalr.c (traverse): Use arrays instead of pointers.
7007
7008 2001-12-05 Akim Demaille <akim@epita.fr>
7009
7010 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7011 the handling of squeue.
7012 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7013
7014 2001-12-05 Akim Demaille <akim@epita.fr>
7015
7016 Because useless nonterminals are now kept alive (instead of being
7017 `destroyed'), we now sometimes examine them, and store information
7018 related to them. Hence we need to know their number, and adjust
7019 memory allocations.
7020
7021 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7022 static.
7023 * src/LR0.c (allocate_itemsets): The memory allocated to
7024 `symbol_count' was used for two different purpose: once to count
7025 the number of occurrences of each symbol, and later reassigned to
7026 `shift_symbol', containing the symbol that can be shifted from a
7027 given state.
7028 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7029 only, and...
7030 (new_itemsets): Allocate `shift_symbol' here.
7031 (allocate_itemsets): symbol_count includes useless nonterminals.
7032 Make room for them.
7033 (free_storage): Use `free', not `XFREE', for pointers that cannot
7034 be null.
7035
7036 2001-12-05 Akim Demaille <akim@epita.fr>
7037
7038 * src/nullable.c (set_nullable): Deobfuscate the handling of
7039 ritem.
7040 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7041
7042 2001-12-05 Akim Demaille <akim@epita.fr>
7043
7044 * src/gram.c, src/gram.h (ritem_print): New.
7045 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7046 (This useless function was defined only to work around VMS linkers
7047 that can't handle compilation units with variables only).
7048 * src/reduce.c (dump_grammar): Use it to trace the construction of
7049 ritem.
7050
7051 2001-12-04 Paul Eggert <eggert@twinsun.com>
7052
7053 * src/bison.simple (union yyalloc): Change member names
7054 to be the same as the stack names.
7055 (yyparse): yyptr is now union yyalloc *, not char *.
7056 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7057 and may generate better code on some machines.
7058 (yystpcpy): Use prototype if __STDC__ is defined, not just
7059 if __cplusplus is defined.
7060
7061 2001-11-30 Akim Demaille <akim@epita.fr>
7062
7063 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7064 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7065 Gettext doesn't compile cleanly, and dies with -Werror.
7066 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7067 Include WARNING_CFLAGS here.
7068 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7069 before being defined.
7070
7071 2001-11-27 Paul Eggert <eggert@twinsun.com>
7072
7073 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7074 First arg is int, not unsigned.
7075 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7076 (SIZE_MAX, UINT_MAX): New macros.
7077 (quotearg_n_options): Abort if N is negative.
7078 Avoid overflow check on hosts where size_t is 64 bits and int
7079 is 32 bits, as overflow is impossible there.
7080 Fix off-by-one typo that caused unnecessary reallocation.
7081
7082 2001-11-29 Paul Eggert <eggert@twinsun.com>
7083
7084 Name space cleanup in generated parser.
7085
7086 * doc/bison.texinfo (Bison Parser): Discuss system headers
7087 and their effect on the user name space.
7088
7089 * src/bison.simple:
7090 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7091 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7092 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7093
7094 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7095 on user names when possible.
7096
7097 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7098 Simplify test for whather <alloca.h> exists.
7099
7100 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7101
7102 (<stdio.h>): Include if YYDEBUG.
7103
7104 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7105 ! defined (yyoverflow) && ! defined (yymemcpy).
7106
7107 (yymemcpy, yyparse): Rename local variables as needed so that
7108 they all begin with 'yy'.
7109
7110 (yystrlen, yystpcpy): New functions.
7111
7112 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7113 All uses changed.
7114
7115 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7116 instead of relying on string.h functions. Use YYSTACK_ALLOC
7117 and YYSTACK_FREE instead of malloc and free.
7118
7119 2001-11-30 Akim Demaille <akim@epita.fr>
7120
7121 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7122 before their first uses.
7123 (YYBISON, YYPURE): Move to the top of the output.
7124
7125 2001-11-30 Akim Demaille <akim@epita.fr>
7126
7127 * tests/reduce.at (Useless Nonterminals): Fix.
7128
7129 2001-11-30 Akim Demaille <akim@epita.fr>
7130
7131 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7132 if body instead of `;' to pacify GCC's warnings.
7133
7134 2001-11-30 Akim Demaille <akim@epita.fr>
7135
7136 Instead of mapping the LHS of unused rules to -1, keep the LHS
7137 valid, but flag the rules as invalid.
7138
7139 * src/gram.h (rule_t): `useful' is a new member.
7140 * src/print.c (print_grammar): Adjust.
7141 * src/derives.c (set_derives): Likewise.
7142 * src/reader.c (packgram, reduce_output): Likewise.
7143 * src/reduce.c (reduce_grammar_tables): Likewise.
7144 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7145
7146 2001-11-30 Akim Demaille <akim@epita.fr>
7147
7148 * src/reduce.c (reduce_output): Formatting changes.
7149 * src/print.c (print_results, print_grammar): Likewise.
7150 * tests/regression.at (Rule Line Numbers)
7151 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7152
7153 2001-11-30 Akim Demaille <akim@epita.fr>
7154
7155 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7156 useless nonterminals, move them at the end of the symbol arrays.
7157 (reduce_output): Adjust.
7158 * tests/reduce.at (Useless Nonterminals): Adjust.
7159
7160 2001-11-30 Akim Demaille <akim@epita.fr>
7161
7162 * src/reduce.c: Various comment/formatting changes.
7163 (nonterminals_reduce): New, extracted from...
7164 (reduce_grammar_tables): here.
7165 (reduce_grammar): Call nonterminals_reduce.
7166
7167 2001-11-29 Paul Eggert <eggert@twinsun.com>
7168
7169 * src/bison.simple (YYSTACK_REALLOC): Remove.
7170 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7171 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7172 New macros.
7173 (union yyalloc): New type.
7174 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7175 an arbitrary restriction on hosts where size_t is wider than int.
7176
7177 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7178 a parser stack overflow. Allocate just one block of memory for all
7179 three stacks, instead of allocating three blocks; this typically is
7180 faster and reduces fragmentation.
7181
7182 Do not limit the number of items in the stack to a value that fits
7183 in 'int', as this is an arbitrary limit on hosts with 64-bit
7184 size_t and 32-bit int.
7185
7186 2001-11-29 Marc Autret <autret_m@epita.fr>
7187
7188 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7189 of defining YYERROR_VERBOSE.
7190 [AT_DATA]: $4 is now out of C declarations in the prologue.
7191
7192 2001-11-28 Marc Autret <autret_m@epita.fr>
7193
7194 * src/reader.c (parse_dquoted_param): New.
7195 (parse_skel_decl): Use it.
7196 * src/lex.h: Add its prototype.
7197 * src/lex.c (literalchar): Become not static.
7198
7199 2001-11-28 Marc Autret <autret_m@epita.fr>
7200
7201 * src/output.h: And put its extern declaration here.
7202 * src/output.c (error_verbose): Define here.
7203 (prepare): Echo name modification.
7204 * src/getargs.h: Clean its extern declaration.
7205 * src/getargs.c (error_verbose_flag): Remove.
7206 (getargs): Remove case 'e'.
7207 * src/options.c (option_table): 'error-verbose' is now seen as simple
7208 percent option.
7209 Include output.h.
7210
7211 * src/reader.c (read_declarations): Remove case tok_include.
7212 (parse_include_decl): Remove.
7213 * src/lex.h (token_t): Remove tok_include.
7214 * src/options.c (option_table): 'include' is now a simple command line
7215 option.
7216
7217 2001-11-28 Marc Autret <autret_m@epita.fr>
7218
7219 * src/bison.simple: Adjust muscle names.
7220 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7221 * src/output.c (prepare): s/_/-/ for the muscles names.
7222 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7223
7224 2001-11-28 Marc Autret <autret_m@epita.fr>
7225
7226 * src/bison.simple: Fix debug.
7227 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7228
7229 2001-11-28 Akim Demaille <akim@epita.fr>
7230
7231 * src/LR0.c (shifts_new): New.
7232 (save_shifts, insert_start_shift, augment_automaton): Use it.
7233
7234 2001-11-28 Akim Demaille <akim@epita.fr>
7235
7236 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7237 keep ruleno only.
7238
7239 2001-11-28 Akim Demaille <akim@epita.fr>
7240
7241 * src/closure.c (closure): Instead of looping over word in array
7242 then bits in words, loop over bits in array.
7243
7244 2001-11-28 Akim Demaille <akim@epita.fr>
7245
7246 * src/closure.c (closure): No longer optimize the special case
7247 where all the bits of `ruleset[r]' are set to 0, to make the code
7248 clearer.
7249
7250 2001-11-28 Akim Demaille <akim@epita.fr>
7251
7252 * src/closure.c (closure): `r' and `c' are new variables, used to
7253 de-obfuscate accesses to RULESET and CORE.
7254
7255 2001-11-28 Akim Demaille <akim@epita.fr>
7256
7257 * src/reduce.c (reduce_print): Use ngettext.
7258 (dump_grammar): Improve the trace accuracy.
7259
7260 2001-11-28 Akim Demaille <akim@epita.fr>
7261
7262 * src/reduce.c (dump_grammar): Don't translate trace messages.
7263
7264 2001-11-28 Akim Demaille <akim@epita.fr>
7265
7266 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7267 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7268 as all tags are free'ed afterwards.
7269 From Enrico Scholz.
7270
7271 2001-11-27 Paul Eggert <eggert@twinsun.com>
7272
7273 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7274 use alloca when we didn't want to, and vice versa.
7275
7276 2001-11-27 Marc Autret <autret_m@epita.fr>
7277
7278 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7279 initialization.
7280 * src/output.c (prepare): Remove its update.
7281
7282 2001-11-27 Marc Autret <autret_m@epita.fr>
7283
7284 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7285 Use %error-verbose.
7286
7287 2001-11-27 Marc Autret <autret_m@epita.fr>
7288
7289 * src/bison.simple: Remove YYERROR_VERBOSE using.
7290 Use %%error_verbose.
7291 (yyparse): Likewise.
7292 * src/output.c (prepare): Give its final value.
7293 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7294 * src/getargs.h: Add its extern declaration.
7295 * src/getargs.c (error_verbose_flag): New int.
7296 (getargs): Update to catch new case.
7297 * src/options.c (option_table): 'error-verbose' is a new option.
7298 (shortopts): Update.
7299
7300 2001-11-27 Akim Demaille <akim@epita.fr>
7301
7302 * src/system.h: Use intl/libgettext.h.
7303 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7304
7305 2001-11-27 Akim Demaille <akim@epita.fr>
7306
7307 * tests/torture.at (Exploding the Stack Size with Malloc):
7308 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7309
7310 2001-11-27 Akim Demaille <akim@epita.fr>
7311
7312 * src/files.c: Include error.h.
7313 Reported by Hans Aberg.
7314
7315 2001-11-26 Marc Autret <autret_m@epita.fr>
7316
7317 * src/reader.c (parse_include_decl): New, not yet implemented.
7318 (read_declarations): Add case tok_include.
7319 * src/getargs.h (include): Add its extern definition.
7320 * src/getargs.c (include): New const char *.
7321 (getargs): Add case '-I'.
7322 * src/options.c (option_table): Add include as command line and
7323 percent option.
7324 * src/lex.h (token_t): Add tok_include.
7325
7326 2001-11-26 Akim Demaille <akim@epita.fr>
7327
7328 * src/reader.c (readgram): Make sure rules for mid-rule actions
7329 have a lineno equal to that of their host rule.
7330 Reported by Hans Aberg.
7331 * tests/regression.at (Rule Line Numbers): New.
7332
7333 2001-11-26 Akim Demaille <akim@epita.fr>
7334
7335 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7336 size_ts.
7337
7338 2001-11-26 Akim Demaille <akim@epita.fr>
7339
7340 * src/complain.c, src/complain.h (error): Remove, provided by
7341 lib/error.[ch].
7342
7343 2001-11-26 Akim Demaille <akim@epita.fr>
7344
7345 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7346 issue an error message.
7347 * tests/regression.at (Invalid %directive): New.
7348 Reported by Hans Aberg.
7349
7350 2001-11-26 Akim Demaille <akim@epita.fr>
7351
7352 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7353 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7354
7355 2001-11-26 Akim Demaille <akim@epita.fr>
7356
7357 * src/conflicts.c (conflicts_print): Don't complain at all when
7358 there are no reduce/reduce conflicts, and as many shift/reduce
7359 conflicts as expected.
7360 * tests/regression.at (%expect right): Adjust.
7361
7362 2001-11-23 Akim Demaille <akim@epita.fr>
7363
7364 * lib/alloca.c: Update, from fileutils.
7365
7366 2001-11-23 Akim Demaille <akim@epita.fr>
7367
7368 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7369
7370 2001-11-23 Akim Demaille <akim@epita.fr>
7371
7372 * src/system.h: Include alloca.h.
7373 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7374
7375 2001-11-23 Akim Demaille <akim@epita.fr>
7376
7377 * src/print_graph.c (print_actions): Remove `rule', unused.
7378 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7379 pacify GCC's signed < unsigned warnings.
7380 * src/closure.c (itemsetsize): Likewise.
7381 * src/reader.c (symbol_list_new): Static.
7382
7383 2001-11-23 Akim Demaille <akim@epita.fr>
7384
7385 Attaching lineno to buckets is stupid, since only one copy of each
7386 symbol is kept, only the line of the first occurrence is kept too.
7387
7388 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7389 * src/reader.c (rline_allocated): Remove, unused.
7390 (symbol_list): Have a `line' member.
7391 (symbol_list_new): New.
7392 (readgram): Use it.
7393 * src/print.c (print_grammar): Output the rule line numbers.
7394 * tests/regression.at (Solved SR Conflicts)
7395 (Unresolved SR Conflicts): Adjust.
7396 Reported by Hans Aberg.
7397
7398 2001-11-22 Marc Autret <autret_m@epita.fr>
7399
7400 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7401
7402 2001-11-22 Marc Autret <autret_m@epita.fr>
7403
7404 * src/muscle_tab.c (muscle_init): Remove initialization of
7405 skeleton muscle.
7406 * src/output.c (output_master_parser): Do it here.
7407
7408 2001-11-20 Akim Demaille <akim@epita.fr>
7409
7410 * po/sv.po: New.
7411 * configure.in (ALL_LINGUAS): Adjust.
7412 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7413 longer contains strings to translate.
7414
7415 2001-11-19 Akim Demaille <akim@epita.fr>
7416
7417 * src/conflicts.c (conflicts_print): Add a missing \n.
7418
7419 2001-11-19 Akim Demaille <akim@epita.fr>
7420
7421 * src/nullable.c (nullable_print): New.
7422 (set_nullable): Call it when tracing.
7423 Better locality of variables.
7424
7425 2001-11-19 Akim Demaille <akim@epita.fr>
7426
7427 * src/print.c (print_actions): Better locality of variables.
7428
7429 2001-11-19 Akim Demaille <akim@epita.fr>
7430
7431 * src/derives.c (print_derives): Fix and enrich.
7432 * src/closure.c (print_fderives): Likewise.
7433
7434 2001-11-19 Akim Demaille <akim@epita.fr>
7435
7436 * src/closure.c (itemsetend): Remove, replaced with...
7437 (itemsetsize): new.
7438
7439 2001-11-19 Akim Demaille <akim@epita.fr>
7440
7441 * src/LR0.c (kernel_end): Remove, replaced with...
7442 (kernel_size): new.
7443
7444 2001-11-19 Akim Demaille <akim@epita.fr>
7445
7446 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7447 to clarify.
7448
7449 2001-11-19 Akim Demaille <akim@epita.fr>
7450
7451 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7452
7453 2001-11-19 Akim Demaille <akim@epita.fr>
7454
7455 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7456 trace messages.
7457 * src/LR0.c: Likewise.
7458 (allocate_itemsets): Use arrays instead of pointers to clarify.
7459
7460 2001-11-19 Akim Demaille <akim@epita.fr>
7461
7462 * src/getargs.c (statistics_flag): Replace with...
7463 (trace_flag): New.
7464 (longopts): Accept --trace instead of --statistics.
7465 * src/getargs.h, src/options.c: Adjust.
7466 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7467 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7468
7469 2001-11-19 Akim Demaille <akim@epita.fr>
7470
7471 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7472 pointers to clarify the code.
7473 (save_reductions, save_shifts): Factor common parts of alternatives.
7474
7475 2001-11-19 Akim Demaille <akim@epita.fr>
7476
7477 * src/LR0.c (new_state, get_state): Complete TRACE code.
7478 * src/closure.c: Include `reader.h' to get `tags', needed by the
7479 trace code.
7480 Rename the conditional DEBUG as TRACE.
7481 Output consistently TRACEs to stderr, not stdout.
7482 * src/derives.c: Likewise.
7483 * src/reduce.c: (inaccessable_symbols): Using if is better style
7484 than goto.
7485 Use `#if TRACE' instead of `#if 0' for tracing code.
7486
7487 2001-11-19 Akim Demaille <akim@epita.fr>
7488
7489 * src/system.h (LIST_FREE, shortcpy): New.
7490 * src/LR0.c: Use them.
7491 * src/output.c (free_itemsets, free_reductions, free_shifts):
7492 Remove, replaced by LIST_FREE.
7493
7494 2001-11-19 Akim Demaille <akim@epita.fr>
7495
7496 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7497 (REDUCTIONS_ALLOC): New.
7498 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7499 allocation.
7500
7501 2001-11-19 Akim Demaille <akim@epita.fr>
7502
7503 * src/LR0.c (new_state): Complete trace code.
7504 * src/nullable.c (set_nullable): Don't translate traces.
7505
7506 2001-11-19 Akim Demaille <akim@epita.fr>
7507
7508 * src/print_graph.c (print_core): Better locality of variables.
7509 * src/print.c (print_core): Likewise.
7510
7511 2001-11-19 Akim Demaille <akim@epita.fr>
7512
7513 * src/vcg.c: You do the output, so you are responsible of the
7514 handling of VCG syntax, in particular: use quotearg.
7515 * src/print_graph.c: Don't.
7516 (print_actions): Don't output the actions as part of the nodes,
7517 since that's the job of the edges.
7518 (print_state): Don't output by hand: fill the node description,
7519 and ask for its output.
7520
7521 2001-11-19 Akim Demaille <akim@epita.fr>
7522
7523 * src/bison.simple (yyparse): When verbosely reporting an error,
7524 no longer put additional quotes around token names.
7525 * tests/calc.at: Adjust.
7526
7527 2001-11-19 Akim Demaille <akim@epita.fr>
7528
7529 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7530 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7531 * src/output.c: Adjust.
7532
7533 2001-11-19 Akim Demaille <akim@epita.fr>
7534
7535 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7536 (rule_t): this.
7537 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7538
7539 2001-11-19 Akim Demaille <akim@epita.fr>
7540
7541 * src/gram.h (rule_t): New.
7542 (rule_table): New.
7543 (rrhs, rlhs): Remove, part of state_t.
7544 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7545 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7546 * src/reader.c, src/reduce.c: Adjust.
7547
7548 2001-11-19 Akim Demaille <akim@epita.fr>
7549
7550 * src/reader.c (symbols_output): New, extracted from...
7551 (packsymbols): Here.
7552 (reader): Call it.
7553
7554 2001-11-19 Akim Demaille <akim@epita.fr>
7555
7556 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7557 (maxrhs): this new function.
7558
7559 2001-11-19 Akim Demaille <akim@epita.fr>
7560
7561 * src/lalr.c (F): New macro to access the variable F.
7562 Adjust.
7563
7564 2001-11-19 Akim Demaille <akim@epita.fr>
7565
7566 * src/lalr.h (LA): New macro to access the variable LA.
7567 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7568 * src/lalr.c: Adjust.
7569
7570 2001-11-19 Akim Demaille <akim@epita.fr>
7571
7572 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7573 (set_state_table): handle the `lookaheads' members.
7574
7575 2001-11-19 Akim Demaille <akim@epita.fr>
7576
7577 * src/lalr.h (lookaheads): Removed array, whose contents is now
7578 a member of...
7579 (state_t): this structure.
7580 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7581 Adjust.
7582
7583 2001-11-19 Akim Demaille <akim@epita.fr>
7584
7585 * src/lalr.h (consistent): Removed array, whose contents is now
7586 a member of...
7587 (state_t): this structure.
7588 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7589 Adjust.
7590
7591 2001-11-19 Akim Demaille <akim@epita.fr>
7592
7593 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7594 contents are now members of...
7595 (state_t): this structure.
7596 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7597 Adjust.
7598
7599 2001-11-19 Akim Demaille <akim@epita.fr>
7600
7601 * src/lalr.h (state_t): New.
7602 (state_table): Be a state_t * instead of a core **.
7603 (accessing_symbol): Remove, part of state_t.
7604 * src/lalr.c: Adjust.
7605 (set_accessing_symbol): Merge into...
7606 (set_state_table): this.
7607 * src/print_graph.c, src/conflicts.c: Adjust.
7608
7609 2001-11-14 Akim Demaille <akim@epita.fr>
7610
7611 * tests/calc.at, tests/output.at, tests/regression.at,
7612 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7613 now the tests are run in private dirs, therefore AC_CLEANUP and
7614 family can be simplified to 0-ary.
7615 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7616 use abs. path to find config.h.
7617 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7618 stderr, there can be way too much random noise.
7619 Instead pass -Werror to GCC and rely on the exit status.
7620 Reported by Wolfram Wagner.
7621
7622 2001-11-14 Akim Demaille <akim@epita.fr>
7623
7624 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7625 defined only if yyoverflow is defined, to avoid `warning: unused
7626 variable `yyvs1''.
7627 Reported by The Test Suite.
7628
7629 2001-11-14 Akim Demaille <akim@epita.fr>
7630
7631 * src/print.c: Include reduce.h.
7632 Reported by Hans Aberg.
7633
7634 2001-11-14 Akim Demaille <akim@epita.fr>
7635
7636 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7637 Revert a previous patch: these are really const.
7638 * src/conflicts.c (conflict_report): Additional useless pair of
7639 braces to pacify GCC's warnings for `if () if () {} else {}'.
7640 * src/lex.c (parse_percent_token): Replace equal_offset with
7641 arg_offset.
7642 arg is const.
7643 Be sure to strdup `arg' when used, since there is no reason for
7644 token_buffer not to change.
7645
7646 2001-11-14 Akim Demaille <akim@epita.fr>
7647
7648 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7649 definition.
7650 * src/main.c (main): Use them.
7651 Suggested by Hans Aberg.
7652
7653 2001-11-12 Akim Demaille <akim@epita.fr>
7654
7655 * src/system.h (ngettext): Now that we use ngettext, be sure to
7656 provide a default definition when NLS are not used.
7657
7658 2001-11-12 Akim Demaille <akim@epita.fr>
7659
7660 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7661 Use @kbd to denote user input.
7662 (Language and Grammar): ANSIfy the example.
7663 Adjust its layout for info/notinfo.
7664 (Location Tracking Calc): Output error messages to stderr.
7665 Output locations in a more GNUtically correct way.
7666 Fix a couple of Englishos.
7667 Adjust @group/@end group pairs.
7668
7669 2001-11-12 Akim Demaille <akim@epita.fr>
7670
7671 %expect was not functioning at all.
7672
7673 * src/conflicts.c (expected_conflicts): Set to -1.
7674 (conflict_report): Use ngettext.
7675 (conflicts_print): Check %expect and make its violation an error.
7676 * doc/bison.texinfo (Expect Decl): Adjust.
7677 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7678 * tests/regression.at (%expect not enough, %expect right)
7679 (%expect too much): New.
7680
7681 2001-11-12 Akim Demaille <akim@epita.fr>
7682
7683 * tests/regression.at (Conflicts): Rename as...
7684 (Unresolved SR Conflicts): this.
7685 (Solved SR Conflicts): New.
7686
7687 2001-11-12 Akim Demaille <akim@epita.fr>
7688
7689 * src/reduce.c (print_results): Rename as...
7690 (reduce_output): This.
7691 Output to OUT, passed as argument, instead of output_obstack.
7692 (dump_grammar): Likewise.
7693 (reduce_free): New.
7694 Also free V1.
7695 (reduce_grammar): No longer call reduce_output, since...
7696 * src/print.c (print_results): do it.
7697 * src/main.c (main): Call reduce_free;
7698
7699 2001-11-12 Akim Demaille <akim@epita.fr>
7700
7701 * src/conflicts.c (print_reductions): Accept OUT as argument.
7702 Output to it, not to output_obstack.
7703 * src/print.c (print_actions): Adjust.
7704
7705 2001-11-12 Akim Demaille <akim@epita.fr>
7706
7707 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7708 the result instead of using...
7709 (src_total, rrc_total, src_count, rrc_count): Remove.
7710 (any_conflicts): Remove.
7711 (print_conflicts): Split into...
7712 (conflicts_print, conflicts_output): New.
7713 * src/conflicts.h: Adjust.
7714 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7715 * src/print.c (print_grammar): Issue `\n' between two rules.
7716 * tests/regression.at (Conflicts): New.
7717 Reported by Tom Lane.
7718
7719 2001-11-12 Akim Demaille <akim@epita.fr>
7720
7721 * tests/regression.at (Invalid input): Remove, duplicate with
7722 ``Invalid input: 1''.
7723
7724 2001-11-12 Akim Demaille <akim@epita.fr>
7725
7726 * tests/torture.at (AT_DATA_STACK_TORTURE)
7727 (Exploding the Stack Size with Alloca)
7728 (Exploding the Stack Size with Malloc): New.
7729
7730 2001-11-12 Akim Demaille <akim@epita.fr>
7731
7732 * src/bison.simple (YYSTACK_REALLOC): New.
7733 (yyparse) [!yyoverflow]: Use it and free the old stack.
7734 Reported by Per Allansson.
7735
7736 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7737
7738 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7739 define CPP macro, which substitute YYSTYPE by yystype.
7740 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7741 with yyltype/YYLTYPE. This allows inclusion of the generated
7742 header within the parser if the compiler, such as GGC, accepts
7743 multiple equivalent #defines.
7744 From Akim.
7745
7746 2001-11-05 Akim Demaille <akim@epita.fr>
7747
7748 * src/reader.c (symbols_output): New, extracted from...
7749 (packsymbols): here.
7750 (reader): Adjust.
7751
7752 2001-11-05 Akim Demaille <akim@epita.fr>
7753
7754 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7755
7756 2001-11-05 Akim Demaille <akim@epita.fr>
7757
7758 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7759 pattern.
7760
7761 2001-11-05 Akim Demaille <akim@epita.fr>
7762
7763 * src/options.h (struct option_table_struct): set_flags is void*.
7764 * src/options.c (longopts): Support `--output' and `%output'.
7765 (usage): Adjust.
7766 * src/lex.h (tok_setopt): Remove, replaced with...
7767 (tok_intopt, tok_stropt): these new guys.
7768 * src/lex.c (getopt.h): Not needed.
7769 (token_buffer, unlexed_token_buffer): Not const.
7770 (percent_table): Promote `-' over `_' in directive names.
7771 Active `%name-prefix', `file-prefix', and `output'.
7772 (parse_percent_token): Accept possible arguments to directives.
7773 Promote `-' over `_' in directive names.
7774
7775 2001-11-04 Akim Demaille <akim@epita.fr>
7776
7777 * doc/bison.texinfo (Decl Summary): Split the list into
7778 `directives for grammars' and `directives for bison'.
7779 Sort'em.
7780 Add description of `%name-prefix', `file-prefix', and `output'.
7781 Promote `-' over `_' in directive names.
7782 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7783 Simplify the description of `--name-prefix'.
7784 Promote `-' over `_' in directive names.
7785 Promote `--output' over `--output-file'.
7786 Fix the description of `--defines'.
7787 * tests/output.at: Exercise %file-prefix and %output.
7788
7789 2001-11-02 Akim Demaille <akim@epita.fr>
7790
7791 * doc/refcard.tex: Update.
7792
7793 2001-11-02 Akim Demaille <akim@epita.fr>
7794
7795 * src/symtab.h (SUNDEF): New.
7796 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7797 stand for `uninitialized', instead of 0.
7798 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7799 * src/lex.c (lex): Adjust.
7800
7801 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7802 Number it 0.
7803 Let yylex return it instead of a plain 0.
7804 Reported by Dick Streefland.
7805
7806 2001-11-02 Akim Demaille <akim@epita.fr>
7807
7808 * tests/regression.at (Mixing %token styles): New test.
7809
7810 2001-11-02 Akim Demaille <akim@epita.fr>
7811
7812 * src/reader.c (parse_thong_decl): Formatting changes.
7813 (token_translations_init): New, extracted from...
7814 (packsymbols): Here.
7815 Adjust.
7816
7817 2001-11-01 Akim Demaille <akim@epita.fr>
7818
7819 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7820 Check that `9foo.y' produces correct cpp guards.
7821 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7822 guards.
7823 Reported by Wwp.
7824
7825 2001-11-01 Akim Demaille <akim@epita.fr>
7826
7827 * tests/regression.at (Invalid input: 2): New.
7828 * src/lex.c (unlexed_token_buffer): New.
7829 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7830 too.
7831 Reported by Wwp.
7832
7833 2001-11-01 Akim Demaille <akim@epita.fr>
7834
7835 * tests/calc.at: Catch up with 1.30.
7836 * configure.in: Bump to 1.49a.
7837 Adjust to newer Autotest.
7838
7839 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7840
7841 * src/conflicts.c: Move global variables rrc_total and src_total ...
7842 (print_conflicts): here.
7843 * src/output.c (output): Free global variable user_toknums.
7844 * src/lex.c (token_obstack): Become static.
7845
7846 2001-10-18 Akim Demaille <akim@epita.fr>
7847
7848 * tests/atlocal.in (GCC): Add.
7849 * tests/calc.at: s/m4_match/m4_bmatch/.
7850 s/m4_patsubst/m4_bpatsubst/.
7851 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7852 * configure.in: AC_SUBST(GCC).
7853
7854 2001-10-14 Marc Autret <autret_m@epita.fr>
7855
7856 * src/options.c (create_long_option_table): Fix.
7857
7858 2001-10-10 Akim Demaille <akim@epita.fr>
7859
7860 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7861
7862 2001-10-04 Akim Demaille <akim@epita.fr>
7863
7864 * src/reader.c (parse_union_decl): Push the caracters in
7865 union_obstack, not attrs_obstack.
7866
7867 2001-10-04 Akim Demaille <akim@epita.fr>
7868
7869 Merge in the branch 1.29.
7870
7871 * src/reader.c (packsymbols): Use a temporary obstack for
7872 `%%tokendef', since output_stack is already used elsewhere.
7873
7874 2001-10-02 Akim Demaille <akim@epita.fr>
7875
7876 Bump 1.29d.
7877
7878 2001-10-02 Akim Demaille <akim@epita.fr>
7879
7880 Version 1.29c.
7881
7882 2001-10-02 Akim Demaille <akim@epita.fr>
7883
7884 * tests/regression.at (Invalid CPP headers): New.
7885 From Alexander Belopolsky.
7886 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7887
7888 2001-10-02 Akim Demaille <akim@epita.fr>
7889
7890 * tests/regression.at (Invalid input): New.
7891 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7892 Reported by Shura.
7893
7894 2001-10-02 Akim Demaille <akim@epita.fr>
7895
7896 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7897
7898 2001-10-02 Akim Demaille <akim@epita.fr>
7899
7900 * src/output.c (output_parser): Assert `skeleton'.
7901 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7902 systems.
7903 From Shura.
7904
7905 2001-10-01 Marc Autret <autret_m@epita.fr>
7906
7907 * src/lex.h: Echo modifications.
7908 * src/lex.c (unlex): Parameter is now token_t.
7909 From Hans Aberg.
7910
7911 2001-10-01 Marc Autret <autret_m@epita.fr>
7912
7913 * src/main.c: Include lex.h.
7914 From Hans Aberg.
7915
7916 2001-09-29 Akim Demaille <akim@epita.fr>
7917
7918 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7919
7920 2001-09-28 Akim Demaille <akim@epita.fr>
7921
7922 * tests/testsuite.at: Update to newer Autotest.
7923 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7924
7925 2001-09-27 Akim Demaille <akim@epita.fr>
7926
7927 Position independent wrapper.
7928
7929 * tests/bison: Remove.
7930 * tests/bison.in: New.
7931 * configure.in: Adjust.
7932
7933 2001-09-27 Paul Eggert <eggert@twinsun.com>
7934
7935 Port quotearg fixes from tar 1.13.24.
7936
7937 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7938 tm to be declared.
7939 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7940 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7941
7942 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7943 * m4/mbrtowc.m4: New file.
7944 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7945 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7946
7947 2001-09-27 Akim Demaille <akim@epita.fr>
7948
7949 Bump to 1.29c.
7950
7951 2001-09-27 Akim Demaille <akim@epita.fr>
7952
7953 Version 1.29b.
7954
7955 2001-09-25 Akim Demaille <akim@epita.fr>
7956
7957 * src/system.h: Include `xalloc.h'.
7958 Remove it from the C files.
7959 * src/files.c (output_files): Free the obstacks.
7960 * src/lex.c (init_lex): Rename as...
7961 (lex_init): this.
7962 (lex_free): New.
7963 * src/main.c (main): Use it.
7964
7965 2001-09-24 Marc Autret <autret_m@epita.fr>
7966
7967 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7968 to output informations in fout (FILE*).
7969 (open_graph, close_graph): Likewise.
7970 (output_graph, output_edge, output_node): Likewise.
7971 * src/vcg.h: Update function prototypes.
7972 * src/print_graph.c (print_graph): Open output graph file.
7973 (print_actions): Adjust.
7974 * src/files.h: Remove extern declaration.
7975 * src/files.c: Remove graph_obstack declaration.
7976 (open_files): Remove graph_obstack initialization.
7977 (output_files): Remove graph_obstack saving.
7978
7979 2001-09-24 Marc Autret <autret_m@epita.fr>
7980
7981 * src/files.c (compute_output_file_names): Fix.
7982
7983 2001-09-24 Marc Autret <autret_m@epita.fr>,
7984 Akim Demaille <akim@epita.fr>
7985
7986 * src/reader.c (reader): Remove call to free_symtab ().
7987 * src/main.c (main): Call it here.
7988 Include symtab.h.
7989 * src/conflicts.c (initialize_conflicts): Rename as...
7990 (solve_conflicts): this.
7991 * src/print.c (print_core, print_actions, print_state)
7992 (print_grammar): Dump to a file instead a `output_obstack'.
7993 (print_results): Dump `output_obstack', and then proceed with the
7994 FILE *.
7995 * src/files.c (compute_output_file_names, close_files): New.
7996 (output_files): Adjust.
7997 * src/main.c (main): Adjust.
7998
7999 2001-09-23 Marc Autret <autret_m@epita.fr>
8000
8001 * src/files.c (compute_header_macro): Computes header macro name
8002 from spec_defines_file when given.
8003
8004 2001-09-23 Marc Autret <autret_m@epita.fr>
8005
8006 * src/files.c (output_files): Add default extensions.
8007
8008 2001-09-22 Akim Demaille <akim@epita.fr>
8009
8010 * src/conflicts.c (finalize_conflicts): Rename as...
8011 (free_conflicts): this.
8012
8013 2001-09-22 Akim Demaille <akim@epita.fr>
8014
8015 * src/gram.c (gram_free): Rename back as...
8016 (dummy): this.
8017 (output_token_translations): Free `token_translations'.
8018 * src/symtab.c (free_symtab): Free the tag field.
8019
8020 2001-09-22 Akim Demaille <akim@epita.fr>
8021
8022 Remove `translations' as it is always set to true.
8023
8024 * src/gram.h: Adjust.
8025 * src/reader.c (packsymbols, parse_token_decl): Adjust
8026 * src/print.c (print_grammar): Adjust.
8027 * src/output.c (output_token_translations): Adjust.
8028 * src/lex.c (lex): Adjust.
8029 * src/gram.c: Be sure the set pointers to NULL.
8030 (dummy): Rename as...
8031 (gram_free): this.
8032
8033 2001-09-22 Akim Demaille <akim@epita.fr>
8034
8035 * configure.in: Invoke AM_LIB_DMALLOC.
8036 * src/system.h: Use dmalloc.
8037 * src/LR0.c: Be sure to have pointers initialized to NULL.
8038 (allocate_itemsets): Allocate kernel_items only if needed.
8039
8040 2001-09-22 Akim Demaille <akim@epita.fr>
8041
8042 * configure.in: Bump to 1.29b.
8043 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8044 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8045 need xmalloc.c in calc.y.
8046 From Pascal Bart.
8047
8048 2001-09-21 Akim Demaille <akim@epita.fr>
8049
8050 Version 1.29a.
8051 * Makefile.maint, config/config.guess, config/config.sub,
8052 * config/missing: Update from masters.
8053 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8054 upon package.m4.
8055 * configure.in (ALL_LINGUAS): Add `tr'.
8056
8057 2001-09-21 Akim Demaille <akim@epita.fr>
8058
8059 * tests/Makefile.am (package.m4): Move to...
8060 ($(srcdir)/$(TESTSUITE)): here.
8061
8062 2001-09-20 Akim Demaille <akim@epita.fr>
8063
8064 * src/complain.c: No longer try to be standalone: use system.h.
8065 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8066 * src/complain.h: Likewise.
8067 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8068 Remove the unused variable `n'.
8069 From Albert Chin-A-Young.
8070
8071 2001-09-18 Marc Autret <autret_m@epita.fr>
8072
8073 * doc/bison.1: Update.
8074 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8075 descriptions.
8076 (Option Cross Key): Update.
8077 Add --graph.
8078
8079 2001-09-18 Marc Autret <autret_m@epita.fr>
8080
8081 * tests/regression.at: New test (comment in %union).
8082
8083 2001-09-18 Marc Autret <autret_m@epita.fr>
8084
8085 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8086 do that.
8087 Reported by Keith Browne.
8088
8089 2001-09-18 Marc Autret <autret_m@epita.fr>
8090
8091 * tests/output.at: Add tests for --defines and --graph.
8092
8093 2001-09-18 Marc Autret <autret_m@epita.fr>
8094
8095 * tests/output.at: Removes tests of %{header,src}_extension features.
8096
8097 2001-09-18 Akim Demaille <akim@epita.fr>
8098
8099 * tests/Makefile.am (package.m4): New.
8100 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8101 (_AT_CHECK_CALC_ERROR): Likewise.
8102 Factor the `, ' part of verbose error messages.
8103
8104 2001-09-18 Marc Autret <autret_m@epita.fr>
8105
8106 * src/getargs.c (longopts): Declare --defines and --graph as options
8107 with optional arguments.
8108 * src/files.h: Add extern declarations.
8109 * src/files.c (spec_graph_file, spec_defines_file): New.
8110 (output_files): Update.
8111 Remove CPP-outed code.
8112
8113 2001-09-18 Marc Autret <autret_m@epita.fr>
8114
8115 Turn off %{source,header}_extension feature.
8116
8117 * src/files.c (compute_exts_from_gf): Update.
8118 (compute_exts_from_src): Update.
8119 (output_files): CPP-out useless code.
8120 * src/files.h: Remove {header,source}_extension extern declarations.
8121 * src/reader.c (parse_dquoted_param): CPP-out.
8122 (parse_header_extension_decl): Remove.
8123 (parse_source_extension_decl): Remove.
8124 (read_declarations): Remove cases tok_{hdrext,srcext}.
8125 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8126 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8127
8128 2001-09-10 Akim Demaille <akim@epita.fr>
8129
8130 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8131 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8132 (AT_CHECK_OUTPUT): this.
8133 Merely check ls' exit status, its output is useless.
8134
8135 2001-09-10 Akim Demaille <akim@epita.fr>
8136
8137 * tests/calc.at: Use m4_match.
8138 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8139
8140 2001-09-10 Marc Autret <autret_m@epita.fr>,
8141 Akim Demaille <akim@epita.fr>
8142
8143 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8144 enum color_e.
8145 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8146 to `normal'.
8147 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8148 * src/lex.h: Adjust prototype.
8149 (token_t): Add `tok_undef'.
8150 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8151 (parse_percent_token): Now returns token_t.
8152 Add default statement in switch.
8153 (lex): Separate `c' as an input variable, from the token_t result
8154 part.
8155 (unlexed): Is a token_t.
8156
8157 2001-09-10 Akim Demaille <akim@epita.fr>
8158
8159 * configure.in: Bump to 1.29a.
8160
8161 2001-09-07 Akim Demaille <akim@epita.fr>
8162
8163 Version 1.29.
8164
8165 2001-08-30 Akim Demaille <akim@epita.fr>
8166
8167 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8168 * m4/atconfig.m4: Remove.
8169 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8170 * tests/bison: New.
8171 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8172 m4_if, m4_patsubst, and m4_regexp.
8173 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8174 `input' file instead of echo.
8175
8176 2001-08-29 Akim Demaille <akim@epita.fr>
8177
8178 Bump to 1.28e.
8179
8180 2001-08-29 Akim Demaille <akim@epita.fr>
8181
8182 Version 1.28d.
8183
8184 2001-08-29 Paul Eggert <eggert@twinsun.com>
8185
8186 * src/bison.simple (yyparse): Don't take the address of an
8187 item before the start of an array, as that doesn't conform to
8188 the C Standard.
8189
8190 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8191
8192 * doc/bison.texinfo (Location Tracking Calc): New node.
8193
8194 2001-08-29 Paul Eggert <eggert@twinsun.com>
8195
8196 * src/output.c (output): Do not define const, as this now
8197 causes more problems than it cures.
8198
8199 2001-08-29 Akim Demaille <akim@epita.fr>
8200
8201 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8202 the nodes.
8203 Be sure to tag the `detailmenu'.
8204
8205 2001-08-29 Akim Demaille <akim@epita.fr>
8206
8207 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8208 download in a tmp dir.
8209
8210 2001-08-28 Marc Autret <autret_m@epita.fr>
8211
8212 * config/depcomp: New file.
8213
8214 2001-08-28 Marc Autret <autret_m@epita.fr>
8215
8216 * doc/bison.1 (mandoc): Adjust.
8217 From Juan Manuel Guerrero.
8218
8219 2001-08-28 Marc Autret <autret_m@epita.fr>
8220
8221 * src/print_graph.c (print_state): Fix.
8222
8223 2001-08-27 Marc Autret <autret_m@epita.fr>
8224
8225 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8226 char * members.
8227 Echo modifications to the functions prototypes.
8228 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8229
8230 2001-08-27 Marc Autret <autret_m@epita.fr>
8231
8232 * src/vcg.c: Include `xalloc.h'.
8233 (add_colorentry): New.
8234 (add_classname): New.
8235 (add_infoname): New.
8236 * src/vcg.h: Add new prototypes.
8237
8238 2001-08-27 Akim Demaille <akim@epita.fr>
8239
8240 * Makefile.maint: Sync. again with CVS Autoconf.
8241
8242 2001-08-27 Akim Demaille <akim@epita.fr>
8243
8244 * Makefile.maint: Formatting changes.
8245 (po-update, cvs-update, update): New targets.
8246 (AMTAR): Remove.
8247
8248 2001-08-27 Akim Demaille <akim@epita.fr>
8249
8250 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8251 * Makefile.maint: Sync. with CVS Autoconf.
8252
8253 2001-08-27 Marc Autret <autret_m@epita.fr>
8254
8255 * src/vcg.h (struct infoname_s): New.
8256 (struct colorentry_s): New.
8257 (graph_s): New fields {vertical,horizontal}_order in structure.
8258 Add `infoname' field.
8259 Add `colorentry' field;
8260 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8261 (G_HORIZONTAL_ORDER): New.
8262 (G_INFONAME): New.
8263 (G_COLORENTRY): New.
8264 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8265 Add output of `infoname'.
8266 Add output of `colorentry'.
8267
8268 2001-08-27 Marc Autret <autret_m@epita.fr>
8269
8270 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8271 This one shadowed a global parameter.
8272
8273 2001-08-24 Marc Autret <autret_m@epita.fr>
8274
8275 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8276 instead of `unsigned'.
8277 (print_state): Do not call obstack_object_size () in obstack_grow ()
8278 to avoid macro variables shadowing.
8279
8280 2001-08-23 Marc Autret <autret_m@epita.fr>
8281
8282 * src/lex.c (percent_table): Typo: s/naem/name/.
8283 Add graph option.
8284 Normalize new options declarations.
8285
8286 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8287
8288 * tests/suite.at: Exercise %header_extension and %source_extension.
8289
8290 2001-08-16 Marc Autret <autret_m@epita.fr>
8291
8292 * src/reader.c (parse_dquoted_param): New.
8293 (parse_header_extension_decl): Use it.
8294 (parse_source_extension_decl): Likewise.
8295
8296 2001-08-16 Marc Autret <autret_m@epita.fr>
8297
8298 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8299 (get_xxxx_str): Use assert () instead of complain ().
8300 Remove return invokations in default cases.
8301 (get_decision_str): Modify default behaviour. Remove second argument.
8302 Echo modifications on calls.
8303 (output_graph): Fix.
8304
8305 2001-08-16 Marc Autret <autret_m@epita.fr>
8306
8307 * src/getargs.c (usage): Update with ``-g, --graph''.
8308
8309 2001-08-16 Marc Autret <autret_m@epita.fr>
8310
8311 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8312 (Option Cross Key): Likewise.
8313 * doc/bison.1: Update.
8314
8315 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8316
8317 * src/output.c (output_master_parser): Don't finish action_obstack.
8318 (output_parser): Don't care about the muscle action, here.
8319 (prepare): Copy the action_obstack in the action muscle.
8320 (output): Free action_obstack.
8321
8322 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8323
8324 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8325 will contain `%union' declaration.
8326 (parse_union_decl): Delete #line directive output.
8327 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8328 informations about %union.
8329 (parse_union_decl): Copy the union_obstack in the muscle stype.
8330 * src/bison.simple: Add new #line directive.
8331 Add typdef %%stype YYSTYPE.
8332
8333 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8334
8335 * src/bison.simple: Add new `#line' directive.
8336
8337 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8338
8339 * src/bison.simple: New `#line' directive.
8340 * src/output.c (output_parser): Support new dynamic muscle input_line.
8341
8342 2001-09-22 Marc Autret <autret_m@epita.fr>
8343
8344 * src/output.c (output_master_parser): New.
8345 (output_parser): Be more re-entrant.
8346
8347 2001-09-21 Marc Autret <autret_m@epita.fr>
8348
8349 * src/reader.c (copy_definition, parse_union_decl): Update and use
8350 `linef' muscle.
8351 (copy_action): Likewise.
8352 Use obstack_1grow ().
8353 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8354
8355 2001-09-21 Marc Autret <autret_m@epita.fr>
8356
8357 * src/options.c (option_table): Adjust.
8358 * src/lex.c (parse_percent_token): Fix.
8359
8360 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8361
8362 * src/options.c (symtab.h): Include it, need by lex.h.
8363
8364 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8365
8366 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8367 is now an option_table_struct*.
8368 (option_strcmp): New function option_strcmp.
8369 (parse_percent_token): Call option_strcmp.
8370 * src/getargs.c (xalloc.h, options.h): Include it.
8371 (getargs): Call create_long_option_table.
8372 (getargs): Free longopts at the end of the function.
8373 (shortopts): Move in options.c.
8374 * src/options.c (create_long_option_table): New function. Convert
8375 information from option_table to option structure.
8376 * src/reader.c (options.h): Include it.
8377
8378 * src/Makefile.am: Adjust.
8379 * src/options.c (option_table): Create from longopts and percent_table.
8380 * src/getargs.c (longopts): Delete.
8381 * src/lex.c (struct percent_table_struct): Delete.
8382 (percent_table): Delete.
8383 (options.h): Include it.
8384 * src/options.c: Create.
8385 * src/options.h: Create.
8386 Declare enum opt_access_e.
8387 Define struct option_table_struct.
8388
8389 2001-09-20 Marc Autret <autret_m@epita.fr>
8390
8391 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8392 sections of Bison.
8393
8394 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8395
8396 * src/bison.simple: s/%%filename/%%skeleton.
8397 * src/muscle_tab.c (getargs.h): Include it.
8398 (muscle_init): Insert new muscle skeleton.
8399
8400 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8401
8402 * src/output.c (output_parser): Delete unused variable actions_dumped.
8403
8404 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8405
8406 * src/output.c (output): Delete call to reader_output_yylsp.
8407 * src/reader.c (reader): Likewise.
8408 * src/reader.h: Delete declaration of reader_output_yylsp.
8409
8410 2001-09-02 Marc Autret <autret_m@epita.fr>
8411
8412 * src/reader.c: Include muscle_tab.h.
8413 (parse_union_decl): Update.
8414 (parse_macro_decl): Rename parse_muscle_decl.
8415 Update to use renamed functions and variable.
8416 (read_declarations, copy_action, read_additionnal_code, : Updated
8417 with correct variables and functions names.
8418 (packsymbols, reader): Likewise.
8419
8420 * src/reader.h (muscle_obstack): Extern declaration update.
8421
8422 * src/output.c: Include muscle_tab.h
8423 In all functions using macro_insert, change by using muscle_insert ().
8424 (macro_obstack): Rename muscle_obstack.
8425 Echo modifications in the whole file.
8426 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8427 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8428 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8429
8430 * src/muscle_tab.h: Update double inclusion macros.
8431 (macro_entry_s): Rename muscle_entry_s.
8432 Update prototypes.
8433
8434 * src/muscle_tab.c: Include muscle_tab.h.
8435 Rename macro_tabble to muscle_table.
8436 (mhash1, mhash2, mcmp): Use muscle_entry.
8437 (macro_init): Rename muscle_init. Update.
8438 (macro_insert): Rename muscle_insert. Update.
8439 (macro_find): Rename muscle_find. Update.
8440
8441 * src/main.c: Include muscle_tab.h.
8442 (main): Call muscle_init ().
8443 * src/Makefile.am (bison_SOURCES): Echo modifications.
8444
8445 2001-09-02 Marc Autret <autret_m@epita.fr>
8446
8447 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8448
8449 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8450
8451 2001-09-02 Marc Autret <autret_m@epita.fr>
8452
8453 * src/macrotab.c, src/macrotab.h: Remove.
8454
8455 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8456
8457 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8458 filename.
8459
8460 2001-09-01 Marc Autret <autret_m@epita.fr>
8461
8462 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8463 to an explicit value to activate the feature. We do it here.
8464
8465 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8466
8467 * src/output.c (prepare): Delete the `filename' muscule insertion.
8468 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8469 (parse_union_decl): Likewise.
8470 * src/macrotab.c (macro_init): Initialize filename by infile.
8471
8472 2001-08-31 Marc Autret <autret_m@epita.fr>
8473
8474 * src/bison.simple (YYLSP_NEEDED): New definition.
8475 * src/output.c (prepare): Add macro insertion of `locations_flag'
8476
8477 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8478
8479 * src/output.c (prepare): Delete insertion of previous muscles,
8480 and insert the `prefix' muscles.
8481 * src/macrotab.c (macro_init): Likewise.
8482 (macro_init): Initialization prefix directive by `yy'.
8483 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8484 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8485 yylval, yydebug, yyerror, yynerrs and yyparse.
8486 New directive `#define' to substitute yydebug, ... with option
8487 name_prefix.
8488
8489 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8490
8491 * src/main.c (main): Standardize.
8492 * src/output.c (output_table_data, output_parser): Likewise.
8493 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8494
8495 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8496
8497 * src/reader.c (read_additionnal_code): Rename %%user_code to
8498 %%epilogue.
8499 * src/output.c (output): Rename %%declarations to %%prologue.
8500 * src/bison.simple: Echo modifications.
8501
8502 2001-08-31 Marc Autret <autret_m@epita.fr>
8503
8504 * src/reader.c (readgram): CleanUp.
8505 (output_token_defines): Likewise.
8506 (packsymbols): Likewise.
8507 (reader): Likewise.
8508 * src/output.c (output): CPP-out useless code.
8509
8510 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8511
8512 * src/reader.c (reader): Delete obsolete call to function
8513 output_trailers and output_headers.
8514 * src/output.h: Remove obsolete functions prototypes of output_headers
8515 and output_trailers.
8516
8517 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8518
8519 * src/main.c: Include macrotab.h.
8520 * src/macrotab.h (macro_entry_s): Constify fields.
8521 Adjust functions prototypes.
8522 * src/macrotab.c (macro_insert): Constify key and value.
8523 (macro_find): Constify key.
8524 (macro_insert): Include 'xalloc.h'
8525 (macro_insert): Use XMALLOC.
8526 (macro_find): Constify return value.
8527 * src/output.c (output_table_data): Rename table to table_data.
8528 (output_parser): Constify macro_key, macro_value.
8529
8530 2001-08-30 Marc Autret <autret_m@epita.fr>
8531
8532 * src/reader.c (parse_skel_decl): New.
8533 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8534 * src/lex.h (token_t): New token `tok_skel'.
8535 * src/lex.c (percent_table): Add skeleton option entry.
8536 Standardize.
8537
8538 2001-08-29 Marc Autret <autret_m@epita.fr>
8539
8540 * src/bison.simple: Add %%user_code directive at the end.
8541 * src/reader.c (read_additionnal_code): New.
8542 (reader): Use it.
8543 * src/output.c (output_program): Remove.
8544 (output): Update.
8545
8546 2001-08-28 Marc Autret <autret_m@epita.fr>
8547
8548 * src/output.c (output_actions): Clean up.
8549 (output_gram): CPP-out useless code.
8550 * src/reader.c (reader): Clean up, CPP-out useless code.
8551
8552 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8553
8554 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8555 directive.
8556 * src/bison.simple: Add `%%definitions'.
8557
8558 2001-08-28 Marc Autret <autret_m@epita.fr>
8559
8560 * config/depcomp: New file.
8561
8562 2001-08-27 Paul Eggert <eggert@twinsun.com>
8563
8564 * src/bison.simple (yyparse): Don't take the address of an
8565 item before the start of an array, as that doesn't conform to
8566 the C Standard.
8567
8568 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8569
8570 * src/output.c (output): Remove the initialization of the macro
8571 obstack. It was done too late here.
8572
8573 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8574 completely wrong.
8575 (reader): Initialize the macro obstack here, since we need it to grow
8576 '%define' directives.
8577
8578 * src/reader.h: Declare the macro obstack as extern.
8579
8580 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8581
8582 * src/output.c (output_parser): Fix. Store single '%' characters in
8583 the output obstack instead of throwing them away.
8584
8585 2001-08-27 Akim Demaille <akim@epita.fr>
8586
8587 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8588
8589 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8590
8591 * lib/Makefile.am: Adjust.
8592
8593 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8594
8595 * src/bison.simple: Update and add '%%' directives.
8596
8597 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8598
8599 * src/reader.c (reader): Remove calls to 'output_headers' and
8600 'output_trailers'. Remove some C output.
8601 (readgram): Disable a piece of code that was writing a default
8602 definition for 'YYSTYPE'.
8603 (reader_output_yylsp): Remove.
8604 (packsymbols): Output token defintions to a macro.
8605 (copy_definition): Disable C output.
8606
8607 * src/reader.c (parse_macro_decl): New function used to parse macro
8608 declarations.
8609 (copy_string2): Put the body of copy_string into this new function.
8610 Add a parameter to let the caller choose whether he wants to copy the
8611 string delimiters or not.
8612 (copy_string): Be a simple call to copy_string2 with the last argument
8613 bound to true.
8614 (read_declarations): Add case for macro definition.
8615 (copy_identifier): New.
8616 (parse_macro_decl): Read macro identifiers using copy_identifier
8617 rather than lex.
8618
8619 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8620
8621 * src/output.c (prepare): Add prefixed names.
8622 (output_parser): Output semantic actions.
8623 (output_parser): Fix bug on '%%line' directives.
8624
8625 * src/output.c (output_headers): Remove. The C code printed by this
8626 function should now be in the skeletons.
8627 (output_trailers): Remove.
8628 (output): Disable call to 'reader_output_yylsp'.
8629 (output_rule_data): Do not output tables to the table obstack.
8630
8631 * src/output.c: Remove some C dedicated output.
8632 Improve the use of macro and output obstacks.
8633 (output_defines): Remove.
8634
8635 * src/output.c (output_token_translations): Associate 'translate'
8636 table with a macro. No output to the table obstack.
8637 (output_gram): Same for 'rhs' and 'prhs'.
8638 (output_stos): Same for 'stos'.
8639 (output_rule_data): Same for 'r1' and 'r2'.
8640 (token_actions): Same for 'defact'.
8641 (goto_actions): Same for 'defgoto'.
8642 (output_base): Same for 'pact' and 'pgoto'.
8643 (output_table): Same for 'table'.
8644 (output_check): Same for 'check'.
8645
8646 * src/output.c (output_table_data): New function.
8647 (output_short_table): Remove.
8648 (output_short_or_char_table): Remove.
8649
8650 * src/output.c (output_parser): Replace most of the skeleton copy code
8651 with something new. Skeletons are now processed character by character
8652 rather than line by line, and Bison looks for '%%' macros. This is the
8653 first step in making Bison's output process (a lot) more flexible.
8654 (output_parser): Use the macro table.
8655
8656 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8657
8658 * src/main.c (main): Initialize the macro table.
8659
8660 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8661
8662 * src/lex.c (percent_table): Add tok_define.
8663 * src/lex.h: Add tok_define.
8664
8665 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8666
8667 * src/macrotab.c: New file.
8668 * src/macrotab.h: New file.
8669 * src/Makefile.am: Update.
8670
8671 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8672
8673 * lib/hash.c: New file.
8674 * lib/hash.h: New file.
8675 * lib/Makefile.am: Update.
8676
8677 2001-08-15 Akim Demaille <akim@epita.fr>
8678
8679 Version 1.28c.
8680
8681 2001-08-15 Marc Autret <autret_m@epita.fr>
8682
8683 * src/reader.c (readgram): Indent output macro YYSTYPE.
8684 (packsymbols): Likewise.
8685 (output_token_defines): Likewise.
8686 * src/files.c: Standardize.
8687 (compute_header_macro): New.
8688 (defines_obstack_save): New. Use compute_header_macro.
8689 (output_files): Update. Use defines_obstack_save.
8690
8691 2001-08-15 Akim Demaille <akim@epita.fr>
8692
8693 * doc/bison.texinfo (Table of Symbols): Document
8694 YYSTACK_USE_ALLOCA.
8695
8696 2001-08-15 Akim Demaille <akim@epita.fr>
8697
8698 * missing: Update from CVS Automake.
8699 * config/config.guess, config/config.sub, config/texinfo.tex:
8700 Update from gnu.org.
8701
8702 2001-08-15 Akim Demaille <akim@epita.fr>
8703
8704 * Makefile.maint: Sync with CVS Autoconf.
8705
8706 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8707
8708 * doc/bison.texinfo: Include GNU Free Documentation License from
8709 `fdl.texi'.
8710 * doc/fdl.texi: Add to package.
8711
8712 2001-08-14 Marc Autret <autret_m@epita.fr>
8713
8714 Turn on %{source,header}_extension features.
8715
8716 * src/lex.c (percent_table): Un-CPP out header_extension and
8717 source_extension.
8718 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8719 (compute_exts_from_src): Remove conditions. It restores priorities
8720 between options.
8721
8722 2001-08-14 Marc Autret <autret_m@epita.fr>
8723
8724 * src/files.c (compute_base_names): Add extensions computing when
8725 `--file-prefix' used.
8726 Standardize function calls.
8727
8728 2001-08-13 Marc Autret <autret_m@epita.fr>
8729
8730 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8731 defining it (defined but null disables alloca).
8732
8733 2001-08-13 Marc Autret <autret_m@epita.fr>
8734
8735 * src/bison.simple (_yy_memcpy): CPP reformat.
8736
8737 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8738
8739 * tests/atconfig.in (CPPFLAGS): Fix.
8740
8741 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8742
8743 * doc/bison.texinfo: Include GNU General Public License from
8744 `gpl.texi'.
8745 * doc/gpl.texi: Add to package.
8746
8747 2001-08-10 Marc Autret <autret_m@epita.fr>
8748
8749 * src/print_graph.h: Fix.
8750 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8751
8752 2001-08-10 Akim Demaille <akim@epita.fr>
8753
8754 * src/system.h: Provide default declarations for stpcpy, strndup,
8755 and strnlen.
8756
8757 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8758
8759 * doc/bison.texinfo (Locations): Update @$ stuff.
8760
8761 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8762
8763 * src/bison.simple (YYLLOC_DEFAULT): Update.
8764 (yyparse): Adjust.
8765
8766 2001-08-08 Marc Autret <autret_m@epita.fr>
8767
8768 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8769 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8770 Reported by Fabrice Bauzac.
8771
8772 2001-08-08 Marc Autret <autret_m@epita.fr>
8773
8774 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8775 * src/vcg.c (output_node): Fix.
8776 * src/vcg.h: Cleanup.
8777 * src/print_graph.c: Add comments.
8778 (node_output_size): New global variable. Simplify the formatting of
8779 the VCG graph output.
8780 (print_actions): Unused code is now used. It notifies the final state
8781 and no action states in the VCG graph. It also give the reduce actions.
8782 The `shift and goto' edges are red and the `go to state' edges are
8783 blue.
8784 Get the current node name and node_obstack by argument.
8785 (node_obstack): New variable.
8786 (print_state): Manage node_obstack.
8787 (print_core): Use node_obstack given by argument.
8788 A node is not only computed here but in print_actions also.
8789 (print_graph): CPP out useless code instead of commenting it.
8790
8791 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8792
8793 * tests/atconfig.in (CPPFLAGS): Fix.
8794
8795 2001-08-07 Akim Demaille <akim@epita.fr>
8796
8797 * src/print_graph.c (quote): New.
8798 (print_core): Use it.
8799
8800 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8801
8802 * src/vcg.c (complain.h): Include it.
8803 Unepitaize `return' invocations.
8804 [NDEBUG] (main): Remove.
8805 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8806 * src/files.c (open_files): Initialize graph_obstack.
8807 * src/print_graph.c (print_actions): CPP out useless code.
8808 (print_core): Don't output the last `\n' in labels.
8809 Use `quote'.
8810 * src/files.c (output_files): Output the VCG file.
8811 * src/main.c (main): Invoke print_graph ();
8812
8813 2001-08-06 Marc Autret <autret_m@epita.fr>
8814
8815 Automaton VCG graph output.
8816 Using option ``-g'' or long option ``--graph'', you can generate
8817 a gram_filename.vcg file containing a VCG description of the LALR (1)
8818 automaton of your grammar.
8819
8820 * src/main.c: Call to print_graph() function.
8821 * src/getargs.h: Update.
8822 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8823 (graph_flag): New flag.
8824 (longopts): Update.
8825 (getargs): Add case `g'.
8826 * src/files.c (graph_obstack): New obstack struct.
8827 (open_files): Initialize new obstack.
8828 (output_files): Saves graph_obstack if required.
8829 * src/files.h (graph_obstack): New extern declaration.
8830 * src/Makefile.am: Add new source files.
8831
8832 2001-08-06 Marc Autret <autret_m@epita.fr>
8833
8834 * src/print_graph.c, src/print_graph.h (graph): New.
8835 * src/vcg.h: New file.
8836 * src/vcg.c: New file, VCG graph handling.
8837
8838 2001-08-06 Marc Autret <autret_m@epita.fr>
8839
8840 Add of %source_extension and %header_extension which specify
8841 the source or/and the header output file extension.
8842
8843 * src/files.c (compute_base_names): Remove initialisation of
8844 src_extension and header_extension.
8845 (compute_exts_from_gf): Update.
8846 (compute_exts_from_src): Update.
8847 (output_files): Update.
8848 * src/reader.c (parse_header_extension_decl): New.
8849 (parse_source_extension_decl): New.
8850 (read_declarations): New case statements for the new tokens.
8851 * src/lex.c (percent_table): Add entries for %source_extension
8852 and %header_extension.
8853 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8854
8855 2001-08-06 Marc Autret <autret_m@epita.fr>
8856
8857 * configure.in: Bump to 1.28c.
8858 * doc/bison.texinfo: Texinfo thingies.
8859
8860 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8861
8862 * tests/atconfig.in (CPPFLAGS): Add.
8863 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8864
8865 2001-08-03 Akim Demaille <akim@epita.fr>
8866
8867 Version 1.28b.
8868
8869 2001-08-03 Akim Demaille <akim@epita.fr>
8870
8871 * tests/Makefile.am (check-local): Ship testsuite.
8872 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8873 Include `string.h'.
8874
8875 2001-08-03 Akim Demaille <akim@epita.fr>
8876
8877 * configure.in: Try using -Wformat when compiling.
8878
8879 2001-08-03 Akim Demaille <akim@epita.fr>
8880
8881 * configure.in: Bump to 1.28b.
8882
8883 2001-08-03 Akim Demaille <akim@epita.fr>
8884
8885 * src/complain.c: Adjust strerror_r portability issues.
8886
8887 2001-08-03 Akim Demaille <akim@epita.fr>
8888
8889 Version 1.28a.
8890
8891 2001-08-03 Akim Demaille <akim@epita.fr>
8892
8893 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8894 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8895 * src/getargs.c: Include complain.h.
8896 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8897 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8898
8899 2001-08-03 Akim Demaille <akim@epita.fr>
8900
8901 * src/reader.c (readgram): Display hidden chars in error messages.
8902
8903 2001-08-03 Akim Demaille <akim@epita.fr>
8904
8905 Update to gettext 0.10.39.
8906
8907 2001-08-03 Akim Demaille <akim@epita.fr>
8908
8909 * lib/strspn.c: New.
8910
8911 2001-08-01 Marc Autret <autret_m@epita.fr>
8912
8913 * doc/bison.texinfo: Update.
8914 * doc/bison.1 (mandoc): Update.
8915 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8916 * src/files.c: Support output files extensions computing.
8917 (src_extension): New static variable.
8918 (header_extension): New static variable.
8919 (tr): New function.
8920 (get_extension_index): New function, gets the index of an extension
8921 filename in a string.
8922 (compute_exts_from_gf): New function, computes extensions from the
8923 grammar file extension.
8924 (compute_exts_from_src): New functions, computes extensions from the
8925 C source file extension, file given by ``-o'' option.
8926 (compute_base_names): Update.
8927 (output_files): Update.
8928
8929 2001-08-01 Robert Anisko <anisko_r@epita.fr>
8930
8931 * doc/bison.texi: Document @$.
8932 (Locations): New section.
8933
8934 2001-07-18 Akim Demaille <akim@epita.fr>
8935
8936 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8937 * config/prev-version.txt, config/move-if-change: New.
8938 * Makefile.am: Adjust.
8939
8940 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
8941
8942 * src/bison.simple (yyparse): Suppress warning `comparaison
8943 between signed and unsigned'.
8944
8945 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
8946
8947 * src/getargs.h (raw_flag): Remove.
8948 * src/getargs.c: Die on `-r'/`--raw'.
8949 * src/lex.c (parse_percent_token): Die on `%raw'.
8950 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8951 * tests/calc.at: Suppress test with option `--raw'.
8952
8953 2001-07-14 Akim Demaille <akim@epita.fr>
8954
8955 * config/: New.
8956 * configure.in: Require Autoconf 2.50.
8957 Update to gettext 0.10.38.
8958
8959 2001-03-16 Akim Demaille <akim@epita.fr>
8960
8961 * doc/bison.texinfo: ANSIfy the examples.
8962
8963 2001-03-16 Akim Demaille <akim@epita.fr>
8964
8965 * getargs.c (skeleton): New variable.
8966 (longopts): --skeleton is a new option.
8967 (shortopts, getargs): -S is a new option.
8968 * getargs.h: Declare skeleton.
8969 * output.c (output_parser): Use it.
8970
8971 2001-03-16 Akim Demaille <akim@epita.fr>
8972
8973 * m4/strerror_r.m4: New.
8974 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8975 * lib/error.h, lib/error.c: Update.
8976
8977 2001-03-16 Akim Demaille <akim@epita.fr>
8978
8979 * src/getargs.c (longopts): Clean up.
8980
8981 2001-02-21 Akim Demaille <akim@epita.fr>
8982
8983 * src/reader.c (gensym): `gensym_count' is your own.
8984 Use a static buf to create the symbol name, as token_buffer is no
8985 longer a buffer.
8986
8987 2001-02-08 Akim Demaille <akim@epita.fr>
8988
8989 * src/conflicts.c (conflict_report): Be sure not to append to res
8990 between two calls, which could happen if both first sprintf were
8991 skipped, but not the first cp += strlen.
8992
8993 2001-02-08 Akim Demaille <akim@epita.fr>
8994
8995 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8996 New, from fileutils 4.0.37.
8997 * configure.in: Require Autoconf 2.49c. I took some time before
8998 making this decision. This is the only way out for portability
8999 issues in Bison, it would mean way too much duplicate effort to
9000 import in Bison features implemented in 2.49c since 2.13.
9001 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9002
9003 2001-02-02 Akim Demaille <akim@epita.fr>
9004
9005 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9006 * lib/xalloc.h, lib/xmalloc.c: Update.
9007
9008 2001-01-19 Akim Demaille <akim@epita.fr>
9009
9010 Get rid of the ad hoc handling of token_buffer in the scanner: use
9011 the obstacks.
9012
9013 * src/lex.c (token_obstack): New.
9014 (init_lex): Initialize it. No longer call...
9015 (grow_token_buffer): this. Remove it.
9016 Adjust all the places which used it to use the obstack.
9017
9018 2001-01-19 Akim Demaille <akim@epita.fr>
9019
9020 * src/lex.h: Rename all the tokens:
9021 s/\bENDFILE\b/tok_eof/g;
9022 s/\bIDENTIFIER\b/tok_identifier/g;
9023 etc.
9024 Let them be enums, not #define, to ease debugging.
9025 Adjust all the code.
9026
9027 2001-01-18 Akim Demaille <akim@epita.fr>
9028
9029 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9030 * src/lex.c (maxtoken, grow_token_buffer): Static.
9031
9032 2001-01-18 Akim Demaille <akim@epita.fr>
9033
9034 Since we now use obstacks, more % directives can be enabled.
9035
9036 * src/lex.c (percent_table): Also accept `%yacc',
9037 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9038 `%debug'.
9039 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9040 instead of returning a token.
9041 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9042 * src/reader.c (read_declarations): Adjust.
9043 * src/files.c (open_files): Don't call `compute_base_names', don't
9044 compute `attrsfile' since they depend upon data which might be
9045 *in* the input file now.
9046 (output_files): Do it here.
9047 * src/output.c (output_headers): Document the fact that this patch
9048 introduces a guaranteed SEGV for semantic parsers.
9049 * doc/bison.texinfo: Document them.
9050 * tests/suite.at: Exercise these %options.
9051
9052 2000-12-20 Akim Demaille <akim@epita.fr>
9053
9054 Also handle the output file (--verbose) with obstacks.
9055
9056 * files.c (foutput): Remove.
9057 (output_obstack): New.
9058 Adjust all dependencies.
9059 * src/conflicts.c: Return a string.
9060 * src/system.h (obstack_grow_string): Rename as...
9061 (obstack_sgrow): this. Be ready to work with non literals.
9062 (obstack_fgrow4): New.
9063
9064 2000-12-20 Akim Demaille <akim@epita.fr>
9065
9066 * src/files.c (open_files): Fix the computation of short_base_name
9067 in the case of `-o foo.tab.c'.
9068
9069 2000-12-20 Akim Demaille <akim@epita.fr>
9070
9071 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9072 (copy_dollar): Now that everything uses obstacks, get rid of the
9073 FILE * parameters.
9074
9075 2000-12-20 Akim Demaille <akim@epita.fr>
9076
9077 * src/files.c (open_files): Actually the `.output' file is based
9078 on the short_base_name, not base_name.
9079 * tests/suite.at (Checking output file names): Adjust.
9080
9081 2000-12-20 Akim Demaille <akim@epita.fr>
9082
9083 * src/bison.s1: Remove, we now use directly...
9084 * src/bison.simple: this.
9085 * src/Makefile.am: Use pkgdata instead of data.
9086
9087 2000-12-20 Akim Demaille <akim@epita.fr>
9088
9089 * src/files.c (guard_obstack): New.
9090 (open_files): Initialize it.
9091 (output_files): Dump it...
9092 * src/files.h: Export it.
9093 * src/reader.c (copy_guard): Use it.
9094
9095 2000-12-19 Akim Demaille <akim@epita.fr>
9096
9097 * src/files.c (outfile, defsfile, actfile): Removed as global
9098 vars.
9099 (open_files): Don't compute them.
9100 (output_files): Adjust.
9101 (base_name, short_base_name): Be global.
9102 Adjust dependencies.
9103
9104 2000-12-19 Akim Demaille <akim@epita.fr>
9105
9106 * src/files.c (strsuffix): New.
9107 (stringappend): Be just like strcat but allocate.
9108 (base_names): Eve out from open_files.
9109 Try to simplify the rather hairy computation of base_name and
9110 short_base_name.
9111 (open_files): Use it.
9112 * tests/suite.at (Checking output file names): New test.
9113
9114 2000-12-19 Akim Demaille <akim@epita.fr>
9115
9116 * src/system.h (obstack_grow_literal_string): Rename as...
9117 (obstack_grow_string): this.
9118 * src/output.c (output_parser): Recognize `%% actions' instead of
9119 `$'.
9120 * src/bison.s1: s/$/%% actions/.
9121 * src/bison.hairy: Likewise.
9122
9123 2000-12-19 Akim Demaille <akim@epita.fr>
9124
9125 * src/output.c (output_parser): Compute the `#line' lines when
9126 there are.
9127 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9128 Suggested by Hans Aberg.
9129
9130 2000-12-19 Akim Demaille <akim@epita.fr>
9131
9132 Let the handling of the skeleton files be local to the procedures
9133 that use it.
9134
9135 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9136 longer static.
9137 (fparser, open_extra_files): Remove.
9138 (open_files, output_files): Don't take care of fparser.
9139 * src/files.h: Adjust.
9140 * src/output.c (output_parser): Open and close the file to the
9141 skeleton.
9142 * src/reader.c (read_declarations): When %semantic_parser, open
9143 fguard.
9144
9145 2000-12-19 Akim Demaille <akim@epita.fr>
9146
9147 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9148 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9149
9150 2000-12-19 Akim Demaille <akim@epita.fr>
9151
9152 * src/files.c (open_files): Yipee! We no longer need all the code
9153 looking for `/tmp' since we have no tmp file.
9154
9155 2000-12-19 Akim Demaille <akim@epita.fr>
9156
9157 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9158 New macros.
9159 * src/files.c (open_files): Less dependency on MSDOS etc.
9160
9161 2000-12-14 Akim Demaille <akim@epita.fr>
9162
9163 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9164 Provide a default definition.
9165 Use it when executing the default @ action.
9166 * src/reader.c (reader_output_yylsp): No longer include
9167 `timestamp' and `text' in the default YYLTYPE.
9168
9169 2000-12-12 Akim Demaille <akim@epita.fr>
9170
9171 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9172 (copy_guard): Quote the file names.
9173 Reported by Laurent Mascherpa.
9174
9175 2000-12-12 Akim Demaille <akim@epita.fr>
9176
9177 * src/output.c (output_headers, output_program, output): Be sure
9178 to escape special characters when outputting filenames.
9179 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9180 (output_headers): Don't depend on them, Use ACTSTR.
9181
9182 2000-11-17 Akim Demaille <akim@epita.fr>
9183
9184 * lib/obstack.h: Formatting changes.
9185 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9186 prevents type checking.
9187 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9188 cast the value to (void *): assigning a `foo *' to a `void *'
9189 variable is valid.
9190 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9191 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9192 append characters.
9193
9194 2000-11-17 Akim Demaille <akim@epita.fr>
9195
9196 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9197 as...
9198 (suite.m4, regression.m4, calc.m4): these.
9199 * tests/atgeneral.m4: Update from CVS Autoconf.
9200
9201 2000-11-17 Akim Demaille <akim@epita.fr>
9202
9203 * tests/regression.m4 (%union and --defines): New test,
9204 demonstrating a current bug in the obstack implementation.
9205
9206 2000-11-17 Akim Demaille <akim@epita.fr>
9207
9208 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9209 macros.
9210 Use them to declare the variables which are global or local to
9211 `yyparse'.
9212
9213 2000-11-17 Akim Demaille <akim@epita.fr>
9214
9215 * acconfig.h: Remove, no longer used.
9216
9217 2000-11-07 Akim Demaille <akim@epita.fr>
9218
9219 * src: s/Copyright (C)/Copyright/g.
9220
9221 2000-11-07 Akim Demaille <akim@epita.fr>
9222
9223 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9224 defining.
9225 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9226
9227 2000-11-07 Akim Demaille <akim@epita.fr>
9228
9229 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9230 Merge in a single CPP if/else.
9231
9232 2000-11-07 Akim Demaille <akim@epita.fr>
9233
9234 * src/output.c (output): Remove useless variables.
9235 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9236 argument `data' for consistency with the prototypes.
9237 Qualify it `const'.
9238 (obstack_copy, obstack_copy0): Rename the second argument as
9239 `address' for consistency. Qualify it `const'.
9240 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9241 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9242 `const' their input argument (`data' or `address').
9243 Adjust the corresponding macros to include `const' in casts.
9244
9245 2000-11-03 Akim Demaille <akim@epita.fr>
9246
9247 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9248 s/PFILE1/BISON_HAIRY/.
9249 Adjust dependencies.
9250
9251 2000-11-03 Akim Demaille <akim@epita.fr>
9252
9253 For some reason, this was not applied.
9254
9255 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9256 `unlink': it's no longer used.
9257
9258 2000-11-03 Akim Demaille <akim@epita.fr>
9259
9260 * src/files.c (skeleton_find): New function, eved out of...
9261 (open_files, open_extra_files): here.
9262
9263 2000-11-03 Akim Demaille <akim@epita.fr>
9264
9265 Don't use `atexit'.
9266
9267 * src/files.c (obstack_save): New function.
9268 (done): Rename as...
9269 (output_files): this.
9270 Use `obstack_save'.
9271 * src/main.c (main): Don't use `atexit' to register `done', since
9272 it no longer has to remove tmp files, just call `output_files'
9273 when there are no errors.
9274
9275 2000-11-02 Akim Demaille <akim@epita.fr>
9276
9277 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9278 `unlink': it's no longer used.
9279 * src/files.h: Formatting changes.
9280
9281 2000-11-02 Akim Demaille <akim@epita.fr>
9282
9283 Remove the last uses of mktemp and unlink/delete.
9284
9285 * src/files.c (fdefines, ftable): Removed.
9286 (defines_ostack, table_obstack): New.
9287 Adjust dependencies of the former into uses of the latter.
9288 * src/output.c (output_short_or_char_table, output_short_table):
9289 Convert to using obstacks.
9290 * src/reader.c (copy_comment2): Accept one FILE * and two
9291 obstacks.
9292 (output_token_defines, reader_output_yylsp): Use obstacks.
9293 * src/system.h (obstack_fgrow3): New.
9294
9295 2000-11-01 Akim Demaille <akim@epita.fr>
9296
9297 Change each use of `fattrs' into a use of `attrs_obstack'.
9298
9299 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9300 * src/files.c (fattrs): Remove.
9301 (attrs_obstack): New.
9302 Adjust all dependencies.
9303 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9304
9305 2000-11-01 Akim Demaille <akim@epita.fr>
9306
9307 Introduce obstacks.
9308 Change each use of `faction' into a use of `action_obstack'.
9309
9310 * lib/obstack.h, lib/obstack.c: New files.
9311 * src/files.c (faction): Remove.
9312 (action_obstack): New.
9313 Adjust all dependencies.
9314
9315 2000-10-20 Akim Demaille <akim@epita.fr>
9316
9317 * lib/quote.h (PARAMS): New macro. Use it.
9318
9319 2000-10-16 Akim Demaille <akim@epita.fr>
9320
9321 * src/output.c (output_short_or_char_table): New function.
9322 (output_short_table, output_token_translations): Use it.
9323 (goto_actions): Use output_short_table.
9324
9325 2000-10-16 Akim Demaille <akim@epita.fr>
9326
9327 * src/symtab.c (bucket_new): New function.
9328 (getsym): Use it.
9329
9330 * src/output.c (output_short_table): New argument to display the
9331 comment associated with the table.
9332 Adjust dependencies.
9333 (output_gram): Use it.
9334 (output_rule_data): Nicer output layout for YYTNAME.
9335
9336 2000-10-16 Akim Demaille <akim@epita.fr>
9337
9338 * src/lex.c (read_typename): New function.
9339 (lex): Use it.
9340 * src/reader.c (copy_dollar): Likewise.
9341
9342 2000-10-16 Akim Demaille <akim@epita.fr>
9343
9344 * src/reader.c (copy_comment2): Expect the input stream to be on
9345 the `/' which is suspected to open a comment, instead of being
9346 called after `//' or `/*' was read.
9347 (copy_comment, copy_definition, parse_union_decl, copy_action)
9348 (copy_guard): Adjust.
9349
9350 2000-10-16 Akim Demaille <akim@epita.fr>
9351
9352 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9353 `read_signed_integer'.
9354
9355 2000-10-16 Akim Demaille <akim@epita.fr>
9356
9357 * src/reader.c (copy_dollar): New function.
9358 (copy_guard, copy_action): Use it.
9359
9360 2000-10-16 Akim Demaille <akim@epita.fr>
9361
9362 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9363 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9364 New files, from Fileutils 4.0.27.
9365 * src/main.c (printable_version): Remove.
9366 * src/lex.c, src/reader.c: Use `quote'.
9367
9368 2000-10-04 Akim Demaille <akim@epita.fr>
9369
9370 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9371
9372 2000-10-04 Akim Demaille <akim@epita.fr>
9373
9374 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9375
9376 2000-10-04 Akim Demaille <akim@epita.fr>
9377
9378 When a literal string is used to define two different tokens,
9379 `bison -v' segfaults.
9380 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9381
9382 * tests/regression.m4: New file.
9383 Include the core of the sample provided by Piotr Gackiewicz.
9384 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9385 properly.
9386
9387 2000-10-04 Akim Demaille <akim@epita.fr>
9388
9389 * src/reader.c (parse_expect_decl): Keep `count' within the size
9390 of `buffer'.
9391 From Neil Booth.
9392
9393 2000-10-02 Paul Eggert <eggert@twinsun.com>
9394
9395 * bison.s1 (yyparse): Assign the default value
9396 unconditionally, to avoid a GCC warning and make the parser a
9397 tad smaller.
9398
9399 2000-10-02 Akim Demaille <akim@epita.fr>
9400
9401 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9402 options.
9403
9404 2000-10-02 Akim Demaille <akim@epita.fr>
9405
9406 * src/derives.c, src/print.c, src/reduce.c: To ease the
9407 translation, move some `\n' out of the translated strings.
9408
9409 2000-10-02 Akim Demaille <akim@epita.fr>
9410
9411 The location tracking mechanism is precious for parse error
9412 messages. Nevertheless, it is enabled only when `@n' is used in
9413 the grammar, which is a different issue (you can use it in error
9414 message, but not in the grammar per se). Therefore, there should
9415 be another means to enable it.
9416
9417 * src/getargs.c (getargs): Support `--locations'.
9418 (usage): Report it.
9419 * src/getargs.h (locationsflag): Export it.
9420 * src/lex.c (percent_table): Support `%locations'.
9421 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9422 with `locationsflag'.
9423 * doc/bison.texinfo: Document `--locations' and `%locations'.
9424 Sort the options.
9425 * tests/calc.m4: Test it.
9426
9427 For regularity of the names, replace each
9428 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9429 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9430 In addition replace each `flag' with `_flag'.
9431
9432 2000-10-02 Akim Demaille <akim@epita.fr>
9433
9434 Also test parse error messages, including with YYERROR_VERBOSE.
9435
9436 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9437 associative).
9438 Use it to check the computations.
9439 Use it to check `nonassoc' is honored.
9440 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9441 `--yyerror-verbose'.
9442 (_AT_CHECK_CALC): Adjust to this option.
9443 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9444
9445 2000-10-02 Akim Demaille <akim@epita.fr>
9446
9447 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9448 the latter demonstrates a flaw in the handling of non debugging
9449 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9450 was used in order to simplify:
9451
9452 #if YYDEBUG
9453 if (yydebug)
9454 {
9455 ...
9456 }
9457 #endif
9458
9459 into
9460
9461 if (yydebug)
9462 {
9463 ...
9464 }
9465
9466 unfortunately this leads to a CPP conflict when
9467 `--name-prefix=foo' is used since it produces `#define yydebug
9468 foodebug'.
9469
9470 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9471 (YYDPRINTF): New macro.
9472 Spread its use.
9473 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9474 the bison options.
9475 Also test `--verbose', `--defines' and `--name-prefix'.
9476
9477 2000-10-02 Akim Demaille <akim@epita.fr>
9478
9479 Improve the readability of the produced parsers.
9480
9481 * src/bison.s1: Formatting changes.
9482 Improve the comment related to the `$' mark.
9483 (yydefault): Don't fall through to `yyresume': `goto' there.
9484 * src/output.c (output_parser): When the `$' is met, skip the end
9485 of its line.
9486 New variable, `number_of_dollar_signs', to check there's exactly
9487 one `$' in the parser skeleton.
9488
9489 2000-10-02 Akim Demaille <akim@epita.fr>
9490
9491 * lib/xstrdup.c: New file, from the fileutils.
9492 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9493 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9494 instead of strlen + xmalloc + strcpy.
9495 * src/symtab.c (copys): Remove, use xstrdup instead.
9496
9497 2000-10-02 Akim Demaille <akim@epita.fr>
9498
9499 * src/gram.h (associativity): New enum type which replaces the
9500 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9501 `right_assoc', `left_assoc' and `non_assoc'.
9502 Adjust all dependencies.
9503 * src/reader.c: Formatting changes.
9504 (LTYPESTR): Don't define it, use it as a literal in
9505 `reader_output_yylsp'.
9506 * src/symtab.h (symbol_class): New enum type which replaces the
9507 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9508 `sunknown', `stoken and `snterm'.
9509
9510 2000-10-02 Akim Demaille <akim@epita.fr>
9511
9512 * src/getargs.c (fixed_outfiles): Rename as...
9513 (yaccflag): for consistency and accuracy.
9514 Adjust dependencies.
9515
9516 2000-10-02 Akim Demaille <akim@epita.fr>
9517
9518 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9519 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9520 difficult and introduced a lot of core dump. It turns out that
9521 Bison used an implementation of `xmalloc' based on `calloc', and
9522 at various places it does depend upon the initialization to 0. I
9523 have not tried to isolate the pertinent places, and all the former
9524 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9525 someone should address this issue.
9526
9527 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9528 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9529 files.
9530 Adjust dependencies.
9531 * src/warshall.h: New file.
9532 Propagate.
9533
9534 2000-10-02 Akim Demaille <akim@epita.fr>
9535
9536 Various anti-`extern in *.c' changes.
9537
9538 * src/system.h: Include `assert.h'.
9539
9540 2000-10-02 Akim Demaille <akim@epita.fr>
9541
9542 * src/state.h (nstates, final_state, first_state, first_shift)
9543 (first_reduction): Move their exportation from here...
9544 * src/LR0.h: to here.
9545 Adjust dependencies.
9546 * src/getargs.c (statisticsflag): New variable.
9547 Add support for `--statistics'.
9548 Adjust dependencies.
9549
9550 Remove a lot of now useless `extern' statements in most files.
9551
9552 2000-10-02 Akim Demaille <akim@epita.fr>
9553
9554 * src/LR0.h: New file.
9555 Propagate its use.
9556
9557 2000-10-02 Akim Demaille <akim@epita.fr>
9558
9559 * src/print.h: New file.
9560 Propagate its use.
9561 * src/print.c: Formatting and ordering changes.
9562 (verbose, terse): Replace with...
9563 (print_results): this new function.
9564 Adjust dependencies.
9565
9566 2000-10-02 Akim Demaille <akim@epita.fr>
9567
9568 * src/conflicts.c (conflict_report): New function.
9569 (conflict_log, verbose_conflict_log): Replace with...
9570 (print_conflicts): this function.
9571 Adjust dependencies.
9572 * src/conflicts.h: New file.
9573 Propagate its inclusion.
9574
9575 2000-10-02 Akim Demaille <akim@epita.fr>
9576
9577 * src/nullable.h: New file.
9578 Propagate its inclusion.
9579 * src/nullable.c: Formatting changes.
9580
9581 2000-10-02 Akim Demaille <akim@epita.fr>
9582
9583 * src/reduce.h: New file.
9584 Propagate its inclusion.
9585 * src/reduce.c: Topological sort and other formatting changes.
9586 (bool, TRUE, FALSE): Move their definition to...
9587 * src/system.h: here.
9588
9589 2000-10-02 Akim Demaille <akim@epita.fr>
9590
9591 * src/files.c: Formatting changes.
9592 (tryopen, tryclose, openfiles): Rename as...
9593 (xfopen, xfclose, open_files): this.
9594 (stringappend): static.
9595 * src/files.h: Complete the list of exported symbols.
9596 Propagate its use.
9597
9598 2000-10-02 Akim Demaille <akim@epita.fr>
9599
9600 * src/reader.h: New file.
9601 Propagate its use instead of tedious list of `extern' and
9602 prototypes.
9603 * src/reader.c: Formatting changes, topological sort,
9604 s/register//.
9605
9606 2000-10-02 Akim Demaille <akim@epita.fr>
9607
9608 * src/lex.h: Prototype `lex.c' exported functions.
9609 * src/reader.c: Adjust.
9610 * src/lex.c: Formatting changes.
9611 (safegetc): Rename as...
9612 (xgetc): this.
9613
9614 2000-10-02 Akim Demaille <akim@epita.fr>
9615
9616 * src/lalr.h: New file.
9617 Propagate its inclusion instead of prototypes and `extern'.
9618 * src/lalr.c: Formatting changes, topological sorting etc.
9619
9620 2000-10-02 Akim Demaille <akim@epita.fr>
9621
9622 * src/output.c (token_actions): Introduce a temporary array,
9623 YYDEFACT, that makes it possible for this function to use
9624 output_short_table.
9625
9626 2000-10-02 Akim Demaille <akim@epita.fr>
9627
9628 `user_toknums' is output as a `short[]' in `output.c', while it is
9629 defined as a `int[]' in `reader.c'. For consistency with the
9630 other output tables, `user_toknums' is now defined as a table of
9631 shorts.
9632
9633 * src/reader.c (user_toknums): Be a short table instead of an int
9634 table.
9635 Adjust dependencies.
9636
9637 Factor the short table outputs.
9638
9639 * src/output.c (output_short_table): New function.
9640 * src/output.c (output_gram, output_stos, output_rule_data)
9641 (output_base, output_table, output_check): Use it.
9642
9643 2000-10-02 Akim Demaille <akim@epita.fr>
9644
9645 * src/output.c (output): Topological sort of the functions, in
9646 order to get rid of the `static' prototypes.
9647 No longer use `register'.
9648 * src/output.h: New file.
9649 Propagate its inclusion in files explicitly prototyping functions
9650 from output.c.
9651
9652 2000-09-21 Akim Demaille <akim@epita.fr>
9653
9654 * src/atgeneral.m4: Update from Autoconf.
9655
9656 2000-09-21 Akim Demaille <akim@epita.fr>
9657
9658 * src/closure.h: New file.
9659 * src/closure.c: Formatting changes, topological sort over the
9660 functions, use of closure.h.
9661 (initialize_closure, finalize_closure): Rename as...
9662 (new_closure, free_closure): these. Adjust dependencies.
9663 * src/LR0.c: Formatting changes, topological sort, use of
9664 cloture.h.
9665 (initialize_states): Rename as...
9666 (new_states): this.
9667 * src/Makefile.am (noinst_HEADERS): Adjust.
9668
9669 2000-09-20 Akim Demaille <akim@epita.fr>
9670
9671 * src/acconfig.h: Don't protect config.h against multiple
9672 inclusion.
9673 Don't define PARAMS.
9674 * src/system.h: Define PARAMS.
9675 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9676 purpose of config.h. system.h must not try to fix wrong
9677 definitions in config.h.
9678
9679 2000-09-20 Akim Demaille <akim@epita.fr>
9680
9681 * src/derives.h: New file.
9682 * src/main.c, src/derives.h: Use it.
9683 Formatting changes.
9684 * src/Makefile.am (noinst_HEADERS): Adjust.
9685
9686 2000-09-20 Akim Demaille <akim@epita.fr>
9687
9688 * tests/atgeneral.m4: Update from Autoconf.
9689 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9690 (AT_CHECK_CALC): New macros.
9691 Use these macros to test bison with options `', `--raw',
9692 `--debug', `--yacc', `--yacc --debug'.
9693
9694 2000-09-19 Akim Demaille <akim@epita.fr>
9695
9696 * src/output.c: Formatting changes.
9697 * src/machine.h: Remove, leaving its contents in...
9698 * src/system.h: here.
9699 Include stdio.h.
9700 Adjust all dependencies on stdio.h and machine.h.
9701 * src/getargs.h: New file.
9702 Let all `extern' declarations about getargs.c be replaced with
9703 inclusion of `getargs.h'.
9704 * src/Makefile.am (noinst_HEADERS): Adjust.
9705
9706 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9707 scope.
9708 (yyerror): Returns void, not int.
9709 * doc/bison.texinfo: Formatting changes.
9710
9711 2000-09-19 Akim Demaille <akim@epita.fr>
9712
9713 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9714 portable.
9715
9716 2000-09-18 Akim Demaille <akim@epita.fr>
9717
9718 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9719 * src/Makefile.am (INCLUDES): Don't.
9720 Be ready to fetch headers in lib/.
9721
9722 2000-09-18 Akim Demaille <akim@epita.fr>
9723
9724 * doc/bison.texinfo: Update the copyright.
9725 ANSIfy and GNUify the examples.
9726 Remove the old menu.
9727
9728 2000-09-18 Akim Demaille <akim@epita.fr>
9729
9730 First set of tests: use the `calc' example from the documentation.
9731
9732 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9733 is defined only when YYDEBUG is.
9734 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9735 * src/files.c (tryopen, tryclose): Formatting changes.
9736 Move to the top and be static.
9737 * src/reader.c (read_signed_integer): Likewise.
9738 * tests/calc.m4: New file.
9739 * Makefile.am, suite.m4: Adjust.
9740 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9741
9742 2000-09-18 Akim Demaille <akim@epita.fr>
9743
9744 Add support for an Autotest test suite for Bison.
9745
9746 * m4/m4.m4, m4/atconfig.m4: New files.
9747 * m4/Makefile.am (EXTRA_DIST): Adjust.
9748 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9749 files.
9750 * src/getargs.c: Display a more standard --version message.
9751 * src/reader.c (reader): Formatting changes.
9752 No longer depend upon VERSION_STRING.
9753 * configure.in: No longer use `dnl'.
9754 Set up the test suite and the new directory `tests/.
9755 (VERSION_STRING): Remove.
9756
9757 2000-04-14 Akim Demaille <akim@epita.fr>
9758
9759 * src/reader.c (copy_comment2): New function, same as former
9760 `copy_comment', but outputs into two FILE *.
9761 (copy_comment): Use it.
9762 (parse_union_decl): Use it.
9763 (get_type, parse_start_decl): Use the same `invalid' message.
9764 (parse_start_decl, parse_union_decl): Use the same `multiple'
9765 message.
9766 (parse_union_decl, copy_guard, copy_action): Use the same
9767 `unmatched' message.
9768 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9769
9770 2000-03-31 Akim Demaille <akim@epita.fr>
9771
9772 * src/files.c (tryopen, tryclose): Move to the top.
9773 Be static.
9774
9775 2000-03-31 Akim Demaille <akim@epita.fr>
9776
9777 * src/main.c (main): Don't call `done', exit does it.
9778
9779 2000-03-31 Akim Demaille <akim@epita.fr>
9780
9781 * allocate.c: s/return (foo)/return foo/.
9782 * lalr.c: Likewise.
9783 * LR0.c: Likewise.
9784 * output.c: Likewise.
9785 * reader.c: Likewise.
9786 * symtab.c: Likewise.
9787 * vmsgetargs.c: Likewise.
9788
9789 2000-03-31 Akim Demaille <akim@epita.fr>
9790
9791 Clean up the error reporting functions.
9792
9793 * src/report.c: New file.
9794 * src/report.h: Likewise.
9795 * src/Makefile.am: Adjust.
9796 * m4/error.m4: New file.
9797 * m4/Makefile.am: Adjust.
9798 * configure.in (jm_PREREQ_ERROR): Call it.
9799 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9800 Remove.
9801 (fatal, fatals): Remove. All callers use complain.c::fatal.
9802 (warn, warni, warns, warnss, warnss): Remove. All callers use
9803 complain.c::complain.
9804 (toomany): Remove, use fatal instead.
9805 * src/files.c (done): No argument, use complain_message_count.
9806 * src/main.c (main): Register `done' to `atexit'.
9807
9808 * src/getargs.c (usage): More `fputs', less `fprintf'.
9809
9810 2000-03-28 Akim Demaille <akim@epita.fr>
9811
9812 * lib/: New directory.
9813 * Makefile.am (SUBDIRS): Adjust.
9814 * configure.in: Adjust.
9815 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9816 useless.
9817 * src/alloca.c: Moved to lib/.
9818 * src/getopt.c: Likewise.
9819 * src/getopt1.c: Likewise.
9820 * src/getopt.h: Likewise.
9821 * src/ansi2knr.c: Likewise.
9822 * src/ansi2knr.1: Likewise.
9823 * src/Makefile.am: Adjust.
9824 * lib/Makefile.am: New file.
9825
9826 2000-03-28 Akim Demaille <akim@epita.fr>
9827
9828 * src/getargs.c (usage): Refresh the help message.
9829
9830 2000-03-17 Akim Demaille <akim@epita.fr>
9831
9832 * src/getopt1.c: Updated from textutils 2.0e
9833 * src/getopt.c: Likewise.
9834 * src/getopt.h: Likewise.
9835
9836 2000-03-17 Akim Demaille <akim@epita.fr>
9837
9838 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9839 the file name, not the whole `#line LINE FILE'.
9840
9841 2000-03-17 Akim Demaille <akim@epita.fr>
9842
9843 On syntax errors, report the token on which we choked.
9844
9845 * src/bison.s1 (yyparse): In the label yyerrlab, when
9846 YYERROR_VERBOSE, add yychar in msg.
9847
9848 2000-03-17 Akim Demaille <akim@epita.fr>
9849
9850 * src/reader.c (copy_at): New function.
9851 (copy_guard): Use it.
9852 (copy_action): Use it.
9853
9854 2000-03-17 Akim Demaille <akim@epita.fr>
9855
9856 Be kind to translators, save some useless translations.
9857
9858 * src/main.c (banner): New function.
9859 (fatal_banner): Use it.
9860 (warn_banner): Use it.
9861
9862 2000-03-17 Akim Demaille <akim@epita.fr>
9863
9864 * src/reader.c (copy_definition): Use copy_string and
9865 copy_comment. Removed now unused `match', `ended',
9866 `cplus_comment'.
9867 (copy_comment, copy_string): Moved, to be visible from
9868 copy_definition.
9869
9870 2000-03-17 Akim Demaille <akim@epita.fr>
9871
9872 * src/reader.c (copy_string): Declare `static inline'. No
9873 problems with inline, since it is checked by configure.
9874 (copy_comment): Likewise.
9875
9876 2000-03-17 Akim Demaille <akim@epita.fr>
9877
9878 * src/reader.c (packsymbols): Formatting changes.
9879
9880 2000-03-17 Akim Demaille <akim@epita.fr>
9881
9882 * src/reader.c (copy_comment): New function, factored out from:
9883 (copy_action): Use it. Removed now unused `match', `ended',
9884 `cplus_comment'.
9885 (copy_guard): Likewise.
9886
9887 2000-03-17 Akim Demaille <akim@epita.fr>
9888
9889 * src/reader.c (copy_string): New function, factored out from:
9890 (copy_action): Use it.
9891 (copy_guard): Likewise.
9892
9893 2000-03-17 Akim Demaille <akim@epita.fr>
9894
9895 Change the handling of @s so that they behave exactly like $s.
9896 There is now a pseudo variable @$ (readble and writable), location
9897 of the lhs of the rule (by default ranging from the location of
9898 the first symbol of the rhs, to the location of the last symbol,
9899 or, if the rhs is empty, YYLLOC).
9900
9901 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9902 yyval.
9903 (yyparse): When providing a default semantic action, provide a
9904 default location action.
9905 (after the $): No longer change `*YYLSP', just stack YYLOC the
9906 same way you stack YYVAL.
9907 * src/reader.c (read_declarations): Use warns.
9908 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9909 (copy_action, case '@'): Likewise.
9910 Use a standard error message, to save useless work from
9911 translators.
9912
9913 2000-03-17 Akim Demaille <akim@epita.fr>
9914
9915 * src/bison.s1: Formatting and cosmetics changes.
9916 * src/reader.c: Likewise.
9917 Update the Copyright notice.
9918
9919 2000-03-17 Akim Demaille <akim@epita.fr>
9920
9921 * src/bison.s1 (#line): All set to `#line' only, since the
9922 Makefile now handles them.
9923
9924 2000-03-16 Akim Demaille <akim@epita.fr>
9925
9926 * src/output.c (output_rule_data): Output the documentation of
9927 some of the tables.
9928 (Copyright notice): Update.
9929 Formatting changes.
9930
9931 2000-03-16 Akim Demaille <akim@epita.fr>
9932
9933 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9934 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9935 One `#if YYDEBUG' remains, since it uses variables which are
9936 defined only if `YYDEBUG != 0'.
9937
9938 2000-03-16 Akim Demaille <akim@epita.fr>
9939
9940 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9941 and related variables so that the similarities are highlighted.
9942
9943 2000-03-16 Akim Demaille <akim@epita.fr>
9944
9945 * src/bison.s1: Properly indent CPP directives.
9946
9947 2000-03-16 Akim Demaille <akim@epita.fr>
9948
9949 * src/bison.s1: Properly indent the `alloca' CPP section.
9950
9951 2000-03-16 Akim Demaille <akim@epita.fr>
9952
9953 Do not hard code values of directories in `configure.in'.
9954 Update the `configure' tool chain.
9955
9956 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9957 src/makefile.am.
9958 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9959 (AC_OUTPUT): Add m4/Makefile.
9960 Bump to bison 1.28a, 1.29 has never been released.
9961 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9962 handled via src/Makefile.am.
9963 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9964 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9965 autoheader.
9966 * Makefile.am (SUBDIRS): Add m4.
9967 (ACLOCAL_AM_FLAGS): New variable.
9968 (AUTOMAKE_OPTIONS): Add check-news.
9969 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9970 the proper line number and file name.
9971 (DEFS): Propagate the location of bison library files and of the
9972 locale files.
9973 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9974 builddir.
9975 * acinclude.m4: Remove, replaced by the directory m4.
9976 * m4/Makefile.am (EXTRA_DIST): New variable.
9977 * m4/gettext.m4: New file, from the fileutils.
9978 * m4/lcmessage.m4: Likewise
9979 * m4/progtest.m4: Likewise.
9980 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9981
9982 2000-03-10 Akim Demaille <akim@epita.fr>
9983
9984 * src/closure.c:
9985 Formatting changes of various comments.
9986 Respect the GNU coding standards at various places.
9987 Don't use `_()' when no translation is needed.
9988
9989 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9990
9991 * src/files.c:
9992 OS/2 honors TMPDIR environment variable.
9993
9994 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9995
9996 * doc/bison.texinfo: Tweaked spelling and grammar.
9997 Updated ISBN.
9998 Removed reference to price of printed copy.
9999 Mention BISON_SIMPLE and BISON_HAIRY.
10000
10001 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10002
10003 * configure.in, NEWS:
10004 Bison 1.29 released.
10005
10006 1999-10-27 Jesse Thilo <jthilo@gnu.org>
10007
10008 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10009 Added reference card.
10010
10011 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10012
10013 * po/ru.po: Added Russian translation.
10014
10015 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10016
10017 * configure.in: Added Russian translation.
10018
10019 1999-07-06 Jesse Thilo <jthilo@gnu.org>
10020
10021 * configure.in, NEWS, README:
10022 Released version 1.28.
10023
10024 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10025
10026 * src/system.h:
10027 Squashed redefinition warning on some systems.
10028
10029 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10030 Have configure build version string instead of relying on ANSI string
10031 concatentation.
10032
10033 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10034
10035 * po/POTFILES.in: Got rid of version.c.
10036
10037 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10038
10039 * acconfig.h, configure.in:
10040 Have configure build version string instead of relying on ANSI string
10041 concatentation.
10042
10043 1999-06-08 Jesse Thilo <jthilo@gnu.org>
10044
10045 * doc/bison.1:
10046 Dropped mention of `+' for long-named options.
10047
10048 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10049
10050 * src/files.c: Added <unistd.h> for unlink().
10051
10052 * src/Makefile.am, src/system.h:
10053 I18n fixes.
10054
10055 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10056
10057 * README: Added a FAQ list.
10058
10059 * configure.in, acconfig.h:
10060 I18n fixes.
10061
10062 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10063
10064 * doc/FAQ, doc/Makefile.am:
10065 Added a FAQ list.
10066
10067 1999-05-19 Jesse Thilo <jthilo@gnu.org>
10068
10069 * src/alloc.h, src/symtab.h, src/version.c:
10070 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10071
10072 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10073
10074 * src/.cvsignore, src/Makefile.am:
10075 Reorganized: sources in `src', documentation in `doc'.
10076
10077 * src/lex.c (literalchar):
10078 fixed the code for escaping double quotes (thanks
10079 Jonathan Czisny.)
10080
10081 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10082
10083 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10084 Adjusted paths to reflect directory reorganization.
10085
10086 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10087
10088 * doc/.cvsignore, doc/Makefile.am:
10089 Reorganized: sources in `src', documentation in `doc'.
10090
10091 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10092
10093 * configure.in:
10094 Updated AC_INIT file to reflect directory reorganization.
10095
10096 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10097 Reorganized: sources in `src', documentation in `doc'.
10098
10099 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10100
10101 * src/allocate.c:
10102 Don't declare calloc() and realloc() if not necessary.
10103
10104 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10105
10106 * configure.in, acconfig.h, acinclude.m4:
10107 Don't declare calloc() and realloc() if not necessary.
10108
10109 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10110
10111 * po/.cvsignore: Added i18n support.
10112
10113 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10114
10115 * acconfig.h, configure.in, Makefile.am:
10116 Added i18n support.
10117
10118 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10119
10120 * src/bison.s1: Fixed #line numbers.
10121
10122 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10123
10124 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10125 Added PO files from Translation Project.
10126
10127 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10128
10129 * Makefile.am:
10130 Added support for non-ANSI compilers (ansi2knr).
10131
10132 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10133
10134 * configure.in: Bumped version number to 1.27.
10135
10136 * Makefile.am:
10137 Added `bison.simple' to list of files removed by `make distclean'.
10138
10139 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10140
10141 * src/files.c, src/files.h:
10142 Defined locations of parser files in config.h instead of Makefile.
10143
10144 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10145
10146 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10147 Defined locations of parser files in config.h instead of Makefile.
10148
10149 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10150
10151 * Makefile.am:
10152 Removed inappropriate use of $< macro.
10153
10154 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10155
10156 * po/Makefile.in.in, po/POTFILES.in:
10157 Add `po' directory skeleton.
10158
10159 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10160
10161 * README: Document help-bison list.
10162
10163 * configure.in: Add check for mkstemp().
10164
10165 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10166
10167 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10168 Hush a few compiler warnings.
10169
10170 * src/files.c:
10171 Add tryclose(), which verifies that fclose was successful.
10172 Hush a couple of compiler warnings.
10173
10174 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10175
10176 * Makefile.am, OChangeLog:
10177 ChangeLog is now automatically generated. Include the old version as
10178 OChangeLog.
10179
10180 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10181
10182 * 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:
10183 Update FSF address.
10184
10185 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10186
10187 * doc/bison.texinfo: Fix formatting glitch.
10188
10189 * doc/bison.texinfo: Update FSF address.
10190
10191 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10192
10193 * acconfig.h: Update FSF address.
10194
10195 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10196
10197 * src/system.h:
10198 Don't define PACKAGE here, since config.h defines it.
10199
10200 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10201
10202 * src/reader.c: Update copyright date.
10203
10204 * src/main.c:
10205 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10206 favor of output directly to stderr (avoids buffer overruns).
10207
10208 * src/reader.c: Some checks for premature EOF.
10209
10210 * 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:
10211 Use prototypes if the compiler understands them.
10212
10213 * src/files.c: Honor TMPDIR on Unix hosts.
10214 Use prototypes if the compiler understands them.
10215
10216 * src/reader.c:
10217 Fix a couple of buffer overrun bugs.
10218 Use prototypes if the compiler understands them.
10219
10220 * src/system.h: Include unistd.h and ctype.h.
10221 Use #ifdef instead of #if for NLS symbols.
10222
10223 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10224
10225 * doc/bison.texinfo:
10226 Delete comment "consider using @set for edition number, etc..." since
10227 we now are doing so.
10228
10229 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10230
10231 * configure.in:
10232 Use prototypes if the compiler understands them.
10233
10234 * NEWS: Document 1.26 highlights.
10235
10236 * Makefile.am: Require Automake 1.3 or later.
10237
10238 * acconfig.h:
10239 Use prototypes if the compiler understands them.
10240
10241 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10242
10243 * src/version.c:
10244 Use VERSION symbol from automake for version number.
10245
10246 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10247
10248 * acconfig.h, configure.in, version.cin:
10249 Use VERSION symbol from automake for version number.
10250
10251 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10252
10253 * Makefile.am:
10254 Distribute original version of simple parser (bison.s1), not built
10255 version (bison.simple).
10256
10257 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10258
10259 * doc/bison.texinfo: Add info dir entry.
10260
10261 * doc/bison.texinfo:
10262 Let automake put version number into documentation.
10263
10264 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10265
10266 * src/bison.cld, src/build.com, src/vmshlp.mar:
10267 Add non-RCS files from /gd/gnu/bison.
10268
10269 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10270
10271 * doc/bison.1:
10272 Document the BISON_HAIRY and BISON_SIMPLE variables.
10273
10274 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10275
10276 * src/version.c: Build version.c automatically.
10277
10278 * src/reader.c:
10279 Fix token numbering (used to start at 258, not 257).
10280
10281 * src/system.h: Include config.h.
10282
10283 * src/getargs.c: Update bug report address.
10284
10285 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10286 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10287
10288 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10289
10290 * Makefile.am:
10291 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10292
10293 * configure.in, version.cin:
10294 Build version.c automatically.
10295
10296 * AUTHORS: Add AUTHORS file.
10297
10298 * README: Update bug report address.
10299
10300 * bison.simple:
10301 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10302
10303 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10304 Add automake stuff.
10305
10306 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10307
10308 * doc/bison.texinfo: Clean up some formatting.
10309
10310 1998-05-05 Richard Stallman <rms@gnu.org>
10311
10312 * doc/bison.texinfo:
10313 Explain better why to make a pure parser.
10314
10315 1998-01-05 Richard Stallman <rms@gnu.org>
10316
10317 * src/files.c (openfiles):
10318 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10319 find a temporary directory, if possible. Do not unlink files while
10320 they are open.
10321
10322 1997-08-25 Richard Stallman <rms@gnu.org>
10323
10324 * src/reader.c (stack_offset;):
10325 Change some warni to warns.
10326
10327 * src/lex.c (literalchar): Use warns, not warni.
10328
10329 1997-06-28 Richard Stallman <rms@gnu.org>
10330
10331 * src/bison.s1: Add a Bison version comment.
10332
10333 * src/main.c (fatal, warn, berror):
10334 Use program_name.
10335
10336 1997-06-28 Richard Stallman <rms@gnu.org>
10337
10338 * Makefile.in (bison_version): New variable.
10339 (dist): Use that variable.
10340 (bison.s1): Substitute the Bison version into bison.simple.
10341
10342 * bison.simple: Add a Bison version comment.
10343
10344 1997-06-18 Richard Stallman <rms@gnu.org>
10345
10346 * src/main.c (fatal, warn, berror):
10347 Make error messages standard.
10348 (toomany): Improve error message text.
10349
10350 * 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:
10351 new.h renamed to alloc.h.
10352
10353 1997-06-18 Richard Stallman <rms@gnu.org>
10354
10355 * Makefile.in: new.h renamed to alloc.h.
10356
10357 1997-05-24 Richard Stallman <rms@gnu.org>
10358
10359 * src/lex.c (literalchar):
10360 Fix the code for escaping \, " and '.
10361
10362 (lex): Avoid trouble when there are many chars
10363 to discard in a char literal with just several chars in it.
10364
10365 1997-05-17 Richard Stallman <rms@gnu.org>
10366
10367 * src/bison.s1:
10368 Use malloc, if using alloca is troublesome.
10369 (YYSTACK_USE_ALLOCA): New flag macro.
10370 Define it for some systems and compilers.
10371 (YYSTACK_ALLOC): New macro.
10372 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10373 If it was malloc'd, free it.
10374
10375 1997-05-17 Richard Stallman <rms@gnu.org>
10376
10377 * bison.simple:
10378 Use malloc, if using alloca is troublesome.
10379 (YYSTACK_USE_ALLOCA): New flag macro.
10380 Define it for some systems and compilers.
10381 (YYSTACK_ALLOC): New macro.
10382 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10383 If it was malloc'd, free it.
10384
10385 1997-04-23 Richard Stallman <rms@gnu.org>
10386
10387 * src/bison.s1:
10388 (alloca) [__hpux]: Always define as __builtin_alloca.
10389
10390 1997-04-23 Richard Stallman <rms@gnu.org>
10391
10392 * bison.simple:
10393 (alloca) [__hpux]: Always define as __builtin_alloca.
10394
10395 1997-04-22 Richard Stallman <rms@gnu.org>
10396
10397 * src/bison.s1:
10398 [__hpux]: Include alloca.h (right for HPUX 10)
10399 instead of declaring alloca (right for HPUX 9).
10400
10401 * src/bison.s1 (__yy_memcpy):
10402 Declare arg `count' as unsigned int.
10403 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10404
10405 1997-04-22 Richard Stallman <rms@gnu.org>
10406
10407 * bison.simple:
10408 [__hpux]: Include alloca.h (right for HPUX 10)
10409 instead of declaring alloca (right for HPUX 9).
10410
10411 * bison.simple (__yy_memcpy):
10412 Declare arg `count' as unsigned int.
10413 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10414
10415 1997-01-03 Richard Stallman <rms@gnu.org>
10416
10417 * src/allocate.c: [__STDC__ or _MSC_VER]:
10418 Declare calloc and realloc to return void *.
10419
10420 1997-01-02 Richard Stallman <rms@gnu.org>
10421
10422 * src/system.h:
10423 [_MSC_VER]: Include stdlib.h and process.h.
10424 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10425
10426 * src/main.c (main): Return FAILURE as a value.
10427 (printable_version): Declare arg as int, not char.
10428
10429 1997-01-02 Richard Stallman <rms@gnu.org>
10430
10431 * Makefile.in (dist):
10432 Explicitly check for symlinks, and copy them.
10433
10434 1996-12-19 Richard Stallman <rms@gnu.org>
10435
10436 * src/files.c:
10437 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10438
10439 1996-12-18 Paul Eggert <eggert@gnu.org>
10440
10441 * src/bison.s1 (yyparse):
10442 If __GNUC__ and YYPARSE_PARAM are both defined,
10443 declare yyparse to have a void * argument.
10444
10445 1996-12-18 Paul Eggert <eggert@gnu.org>
10446
10447 * bison.simple (yyparse):
10448 If __GNUC__ and YYPARSE_PARAM are both defined,
10449 declare yyparse to have a void * argument.
10450
10451 1996-12-17 Richard Stallman <rms@gnu.org>
10452
10453 * src/reduce.c (nbits): Add some casts.
10454
10455 1996-08-12 Richard Stallman <rms@gnu.org>
10456
10457 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10458
10459 1996-08-12 Richard Stallman <rms@gnu.org>
10460
10461 * bison.simple: Test _MSDOS as well as _MSDOS_.
10462
10463 1996-07-31 Richard Stallman <rms@gnu.org>
10464
10465 * src/bison.s1:
10466 [__sun && __i386]: Include alloca.h.
10467
10468 1996-07-31 Richard Stallman <rms@gnu.org>
10469
10470 * bison.simple:
10471 [__sun && __i386]: Include alloca.h.
10472
10473 1996-07-30 Richard Stallman <rms@gnu.org>
10474
10475 * src/bison.s1: Comment change.
10476
10477 * src/bison.s1: Test _MSDOS_, not MSDOS.
10478
10479 1996-07-30 Richard Stallman <rms@gnu.org>
10480
10481 * bison.simple: Comment change.
10482
10483 * bison.simple: Test _MSDOS_, not MSDOS.
10484
10485 1996-06-01 Richard Stallman <rms@gnu.org>
10486
10487 * 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:
10488 Insert `_' macro around many string constants.
10489
10490 * src/main.c:
10491 Insert `_' macro around many string constants.
10492
10493 (main): Call setlocale, bindtextdomain and textdomain.
10494
10495 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10496 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10497 [ENABLE_NLS]: Include libintl.h.
10498 [ENABLE_NLS] (gettext): Define.
10499 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10500 (N_, PACKAGE, LOCALEDIR): New macros.
10501
10502 1996-06-01 Richard Stallman <rms@gnu.org>
10503
10504 * POTFILES.in: New file.
10505
10506 * Makefile.in (allocate.o):
10507 Define target explicitly.
10508
10509 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10510 (LDFLAGS): Set to @LDFLAGS@.
10511 (configure): Run autoconf only if preceding `cd' succeeds.
10512 (bison.s1): Redirect output to temporary file then move the
10513 temporary to the target, rather than redirecting directly to bison.s1.
10514 (clean): Remove config.status and config.log.
10515 (distclean): Don't remove config.status here.
10516
10517 1996-05-12 Richard Stallman <rms@gnu.org>
10518
10519 * src/bison.s1:
10520 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10521
10522 1996-05-12 Richard Stallman <rms@gnu.org>
10523
10524 * bison.simple:
10525 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10526
10527 1996-05-11 Richard Stallman <rms@gnu.org>
10528
10529 * src/bison.s1 (__yy_memcpy):
10530 Really reorder the args, as was supposedly done on Feb 14 1995.
10531 (yyparse): Calls changed accordingly.
10532
10533 1996-05-11 Richard Stallman <rms@gnu.org>
10534
10535 * Makefile.in (dist): Don't use $(srcdir).
10536
10537 * bison.simple (__yy_memcpy):
10538 Really reorder the args, as was supposedly done on Feb 14 1995.
10539 (yyparse): Calls changed accordingly.
10540
10541 1996-01-27 Richard Stallman <rms@gnu.org>
10542
10543 * src/output.c (output_rule_data):
10544 Test YYERROR_VERBOSE in the conditional
10545 around the definition of ttyname.
10546
10547 1995-12-29 Richard Stallman <rms@gnu.org>
10548
10549 * src/bison.s1:
10550 Fix line numbers in #line commands.
10551
10552 1995-12-29 Richard Stallman <rms@gnu.org>
10553
10554 * bison.simple:
10555 Fix line numbers in #line commands.
10556
10557 1995-12-27 Richard Stallman <rms@gnu.org>
10558
10559 * src/bison.s1 (YYPARSE_PARAM_DECL):
10560 In C++, make it always null.
10561 (YYPARSE_PARAM_ARG): New macro.
10562 (yyparse): Use YYPARSE_PARAM_ARG.
10563
10564 1995-12-27 Richard Stallman <rms@gnu.org>
10565
10566 * bison.simple (YYPARSE_PARAM_DECL):
10567 In C++, make it always null.
10568 (YYPARSE_PARAM_ARG): New macro.
10569 (yyparse): Use YYPARSE_PARAM_ARG.
10570
10571 1995-11-29 Richard Stallman <rms@gnu.org>
10572
10573 * doc/bison.texinfo:
10574 Describe literal string tokens, %raw, %no_lines, %token_table.
10575
10576 1995-11-29 Daniel Hagerty <hag@gnu.org>
10577
10578 * doc/bison.texinfo: Fixed update date
10579
10580 1995-10-16 Richard Stallman <rms@gnu.org>
10581
10582 * src/version.c: Version 1.25.
10583
10584 1995-10-16 Richard Stallman <rms@gnu.org>
10585
10586 * NEWS: *** empty log message ***
10587
10588 1995-10-16 Richard Stallman <rms@gnu.org>
10589
10590 * doc/bison.1, doc/bison.rnh:
10591 Add new options.
10592
10593 1995-10-15 Richard Stallman <rms@gnu.org>
10594
10595 * src/vmsgetargs.c, src/getargs.c:
10596 Added -n, -k, and -raw switches.
10597 (noparserflag, toknumflag, rawtoknumflag): New variables.
10598
10599 * src/symtab.h (SALIAS):
10600 New #define for adding aliases to %token.
10601 (struct bucket): Added `alias' field.
10602
10603 * src/reduce.c (reduce_grammar):
10604 Revise error message.
10605 (print_notices): Remove final `.' from error message.
10606
10607 * src/reader.c (reader_output_yylsp):
10608 New function.
10609 (readgram): Use `#if 0' around code that accepted %command
10610 inside grammar rules: The documentation doesn't allow it,
10611 and it will fail since the %command processors scan for the next %.
10612 (parse_token_decl): Extended the %token
10613 declaration to allow a multi-character symbol as an alias.
10614 (parse_thong_decl): New function.
10615 (read_declarations): Added %thong declarations.
10616 (read_declarations): Handle NOOP to deal with allowing
10617 % declarations as another means to specify the flags.
10618 (readgram): Allow %prec prior to semantics embedded in a rule.
10619 (skip_to_char, read_declarations, copy_definition)
10620 (parse_token_decl, parse_start_decl, parse_type_decl)
10621 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10622 (get_type_name, copy_guard, copy_action, readgram)
10623 (get_type, packsymbols): Revised most error messages.
10624 Changed `fatal' to `warnxxx' to avoid aborting for error.
10625 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10626 (read_declarations): Improve the error message for
10627 an invalid character. Do not abort.
10628 (read_declarations, copy_guard, copy_action): Use
10629 printable_version to avoid unprintable characters in printed output.
10630 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10631 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10632 Allow the type of a non-terminal can be given
10633 more than once, as long as all specifications give the same type.
10634
10635 * src/output.c:
10636 (output_headers, output_trailers, output, output_gram)
10637 (output_rule_data): Implement noparserflag variable.
10638 Implement toknumflag variable.
10639 (output): Call reader_output_yylsp to output LTYPESTR.
10640
10641 * src/main.c (main):
10642 If reader sees an error, don't process the grammar.
10643 (fatals): Updated to not use VARARGS1.
10644 (printable_version, int_to_string, warn, warni, warns, warnss)
10645 (warnsss): New error reporting functions. Avoid abort for error.
10646
10647 * src/lex.h:
10648 Added THONG and NOOP for alias processing.
10649 Added SETOPT for the new code that allows setting options with %flags.
10650
10651 * src/lex.c:
10652 Include getopt.h. Add some extern decls.
10653 (safegetc): New function to deal with EOF gracefully.
10654 (literalchar); new function to deal with reading \ escapes.
10655 (lex): Use literalchar.
10656 (lex): Implemented "..." tokens.
10657 (literalchar, lex, parse_percent_token): Made tokenbuffer
10658 always contain the token. This includes growing the token
10659 buffer while reading an integer.
10660 (parse_percent_token): Replaced if-else statement with percent_table.
10661 (parse_percent_token): Added % declarations as another
10662 way to specify the flags -n, -l, and -r. Also added hooks for
10663 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10664 major changes to files.c.
10665 (lex) Retain in the incoming stream a character following
10666 an incorrect '/'.
10667 (skip_white_space, lex): Revised most error messages
10668 and changed fatal to warn to avoid aborting.
10669 (percent_table): Added %thong declarations.
10670
10671 * src/gram.h: Comment changes.
10672
10673 * src/files.c (openfiles, open_extra_files, done):
10674 Add faction flag
10675 and actfile file. Handle noparserflag. Both for -n switch.
10676
10677 * src/conflicts.c (resolve_sr_conflict):
10678 Remove use of alloca.
10679
10680 1995-06-01 Jim Meyering <meyering@gnu.org>
10681
10682 * doc/bison.texinfo: *** empty log message ***
10683
10684 1995-05-06 Richard Stallman <rms@gnu.org>
10685
10686 * src/bison.s1: Comment change.
10687
10688 1995-05-06 Richard Stallman <rms@gnu.org>
10689
10690 * bison.simple: Comment change.
10691
10692 1995-05-03 Richard Stallman <rms@gnu.org>
10693
10694 * src/version.c: Version now 1.24.
10695
10696 * src/bison.s1: Change distribution terms.
10697
10698 * src/version.c: Version now 1.23.
10699
10700 1995-05-03 Richard Stallman <rms@gnu.org>
10701
10702 * doc/bison.texinfo:
10703 Rewrite "Conditions for Using Bison".
10704 Update version to 1.24.
10705
10706 1995-05-03 Richard Stallman <rms@gnu.org>
10707
10708 * bison.simple: Change distribution terms.
10709
10710 1995-02-23 Richard Stallman <rms@gnu.org>
10711
10712 * src/files.c: Test __VMS_POSIX as well as VMS.
10713
10714 1995-02-14 Jim Meyering <meyering@gnu.org>
10715
10716 * src/bison.s1 (__yy_memcpy):
10717 Renamed from __yy_bcopy to avoid
10718 confusion. Reverse FROM and TO arguments to be consistent with
10719 those of memcpy.
10720
10721 1995-02-14 Jim Meyering <meyering@gnu.org>
10722
10723 * bison.simple (__yy_memcpy):
10724 Renamed from __yy_bcopy to avoid
10725 confusion. Reverse FROM and TO arguments to be consistent with
10726 those of memcpy.
10727
10728 1994-11-10 David J. MacKenzie <djm@gnu.org>
10729
10730 * NEWS: reformat
10731
10732 * NEWS: New file.
10733
10734 * Makefile.in (DISTFILES): Include NEWS.
10735
10736 * Makefile.in (DISTFILES):
10737 Include install-sh, not install.sh.
10738
10739 * configure.in: Update to Autoconf v2 macro names.
10740
10741 1994-10-05 David J. MacKenzie <djm@gnu.org>
10742
10743 * Makefile.in: fix typo
10744
10745 * Makefile.in (prefix, exec_prefix):
10746 Let configure set them.
10747
10748 1994-09-28 David J. MacKenzie <djm@gnu.org>
10749
10750 * Makefile.in: Set datadir to $(prefix)/share.
10751
10752 1994-09-15 Richard Stallman <rms@gnu.org>
10753
10754 * src/bison.s1:
10755 Update copyright notice and GPL version.
10756
10757 1994-09-15 Richard Stallman <rms@gnu.org>
10758
10759 * bison.simple:
10760 Update copyright notice and GPL version.
10761
10762 1994-07-12 Richard Stallman <rms@gnu.org>
10763
10764 * src/reduce.c, src/reader.c:
10765 entered into RCS
10766
10767 1994-05-05 David J. MacKenzie <djm@gnu.org>
10768
10769 * Makefile.in: entered into RCS
10770
10771 1994-03-26 Richard Stallman <rms@gnu.org>
10772
10773 * src/bison.s1: entered into RCS
10774
10775 1994-03-26 Richard Stallman <rms@gnu.org>
10776
10777 * bison.simple: entered into RCS
10778
10779 1994-03-25 Richard Stallman <rms@gnu.org>
10780
10781 * src/main.c: entered into RCS
10782
10783 1994-03-24 Richard Stallman <rms@gnu.org>
10784
10785 * src/conflicts.c: entered into RCS
10786
10787 1994-01-02 Richard Stallman <rms@gnu.org>
10788
10789 * Makefile.in: *** empty log message ***
10790
10791 1993-11-21 Richard Stallman <rms@gnu.org>
10792
10793 * src/bison.s1: *** empty log message ***
10794
10795 1993-11-21 Richard Stallman <rms@gnu.org>
10796
10797 * doc/bison.texinfo: entered into RCS
10798
10799 * doc/bison.texinfo: *** empty log message ***
10800
10801 1993-11-21 Richard Stallman <rms@gnu.org>
10802
10803 * bison.simple: *** empty log message ***
10804
10805 1993-10-25 David J. MacKenzie <djm@gnu.org>
10806
10807 * doc/bison.texinfo: *** empty log message ***
10808
10809 1993-10-19 Richard Stallman <rms@gnu.org>
10810
10811 * src/bison.s1: *** empty log message ***
10812
10813 1993-10-19 Richard Stallman <rms@gnu.org>
10814
10815 * bison.simple: *** empty log message ***
10816
10817 1993-10-14 Richard Stallman <rms@gnu.org>
10818
10819 * src/bison.s1: *** empty log message ***
10820
10821 1993-10-14 Richard Stallman <rms@gnu.org>
10822
10823 * bison.simple: *** empty log message ***
10824
10825 1993-09-14 David J. MacKenzie <djm@gnu.org>
10826
10827 * doc/bison.texinfo: *** empty log message ***
10828
10829 1993-09-13 Noah Friedman <friedman@gnu.org>
10830
10831 * Makefile.in: *** empty log message ***
10832
10833 1993-09-10 Richard Stallman <rms@gnu.org>
10834
10835 * src/conflicts.c: *** empty log message ***
10836
10837 * src/system.h: entered into RCS
10838
10839 1993-09-10 Richard Stallman <rms@gnu.org>
10840
10841 * doc/bison.1: entered into RCS
10842
10843 1993-09-06 Noah Friedman <friedman@gnu.org>
10844
10845 * src/version.c: entered into RCS
10846
10847 1993-09-06 Noah Friedman <friedman@gnu.org>
10848
10849 * Makefile.in: *** empty log message ***
10850
10851 1993-07-30 David J. MacKenzie <djm@gnu.org>
10852
10853 * Makefile.in: *** empty log message ***
10854
10855 1993-07-24 Richard Stallman <rms@gnu.org>
10856
10857 * src/bison.s1: *** empty log message ***
10858
10859 1993-07-24 Richard Stallman <rms@gnu.org>
10860
10861 * bison.simple: *** empty log message ***
10862
10863 1993-07-08 David J. MacKenzie <djm@gnu.org>
10864
10865 * Makefile.in: *** empty log message ***
10866
10867 1993-07-04 Richard Stallman <rms@gnu.org>
10868
10869 * src/bison.s1: *** empty log message ***
10870
10871 1993-07-04 Richard Stallman <rms@gnu.org>
10872
10873 * bison.simple: *** empty log message ***
10874
10875 1993-06-26 David J. MacKenzie <djm@gnu.org>
10876
10877 * src/getargs.c: entered into RCS
10878
10879 1993-06-26 David J. MacKenzie <djm@gnu.org>
10880
10881 * doc/bison.texinfo: *** empty log message ***
10882
10883 * doc/bison.1: New file.
10884
10885 1993-06-25 Richard Stallman <rms@gnu.org>
10886
10887 * src/getargs.c: New file.
10888
10889 1993-06-16 Richard Stallman <rms@gnu.org>
10890
10891 * src/bison.s1: *** empty log message ***
10892
10893 1993-06-16 Richard Stallman <rms@gnu.org>
10894
10895 * bison.simple: *** empty log message ***
10896
10897 1993-06-03 Richard Stallman <rms@gnu.org>
10898
10899 * src/bison.s1: New file.
10900
10901 1993-06-03 Richard Stallman <rms@gnu.org>
10902
10903 * doc/bison.texinfo: *** empty log message ***
10904
10905 1993-06-03 Richard Stallman <rms@gnu.org>
10906
10907 * bison.simple: New file.
10908
10909 1993-05-19 Richard Stallman <rms@gnu.org>
10910
10911 * doc/bison.texinfo: New file.
10912
10913 1993-05-07 Noah Friedman <friedman@gnu.org>
10914
10915 * Makefile.in: *** empty log message ***
10916
10917 1993-04-28 Noah Friedman <friedman@gnu.org>
10918
10919 * src/reader.c: *** empty log message ***
10920
10921 1993-04-23 Noah Friedman <friedman@gnu.org>
10922
10923 * src/alloc.h: entered into RCS
10924
10925 1993-04-20 David J. MacKenzie <djm@gnu.org>
10926
10927 * src/version.c: *** empty log message ***
10928
10929 * src/files.c, src/allocate.c:
10930 entered into RCS
10931
10932 * src/reader.c: *** empty log message ***
10933
10934 * src/lex.c: entered into RCS
10935
10936 * src/conflicts.c: New file.
10937
10938 * src/symtab.c: entered into RCS
10939
10940 * src/alloc.h: New file.
10941
10942 * src/LR0.c: entered into RCS
10943
10944 1993-04-18 Noah Friedman <friedman@gnu.org>
10945
10946 * src/reader.c: New file.
10947
10948 * src/version.c: *** empty log message ***
10949
10950 1993-04-18 Noah Friedman <friedman@gnu.org>
10951
10952 * Makefile.in: *** empty log message ***
10953
10954 1993-04-17 Noah Friedman <friedman@gnu.org>
10955
10956 * Makefile.in: *** empty log message ***
10957
10958 1993-04-15 Richard Stallman <rms@gnu.org>
10959
10960 * src/main.c, src/files.c:
10961 New file.
10962
10963 1993-04-15 Noah Friedman <friedman@gnu.org>
10964
10965 * configure.in: entered into RCS
10966
10967 * configure.in: *** empty log message ***
10968
10969 * configure.in: New file.
10970
10971 1993-04-14 Richard Stallman <rms@gnu.org>
10972
10973 * Makefile.in: New file.
10974
10975 1993-04-13 Richard Stallman <rms@gnu.org>
10976
10977 * src/version.c: New file.
10978
10979 1993-03-25 Richard Stallman <rms@gnu.org>
10980
10981 * src/output.c: entered into RCS
10982
10983 1992-09-25 Richard Stallman <rms@gnu.org>
10984
10985 * configure.bat: entered into RCS
10986
10987 1992-06-22 Richard Stallman <rms@gnu.org>
10988
10989 * src/vmsgetargs.c: entered into RCS
10990
10991 1992-06-22 Richard Stallman <rms@gnu.org>
10992
10993 * doc/bison.rnh: entered into RCS
10994
10995 1992-04-20 David J. MacKenzie <djm@gnu.org>
10996
10997 * README: entered into RCS
10998
10999 1992-01-22 Richard Stallman <rms@gnu.org>
11000
11001 * src/machine.h: entered into RCS
11002
11003 1991-12-21 Richard Stallman <rms@gnu.org>
11004
11005 * src/lalr.c, src/closure.c:
11006 entered into RCS
11007
11008 1991-12-20 Richard Stallman <rms@gnu.org>
11009
11010 * src/state.h: entered into RCS
11011
11012 1991-12-18 Richard Stallman <rms@gnu.org>
11013
11014 * src/print.c, src/nullable.c, src/derives.c:
11015 entered into RCS
11016
11017 1991-11-03 David J. MacKenzie <djm@gnu.org>
11018
11019 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11020 entered into RCS
11021
11022 1988-09-09 Richard Stallman <rms@gnu.org>
11023
11024 * src/bison.hairy: entered into RCS
11025
11026 1987-12-16 Richard Stallman <rms@gnu.org>
11027
11028 * REFERENCES: entered into RCS
11029
11030 -----
11031
11032 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11033 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11034
11035 This file is part of Bison, the GNU Compiler Compiler.
11036
11037 Bison is free software; you can redistribute it and/or modify
11038 it under the terms of the GNU General Public License as published by
11039 the Free Software Foundation; either version 2, or (at your option)
11040 any later version.
11041
11042 Bison is distributed in the hope that it will be useful,
11043 but WITHOUT ANY WARRANTY; without even the implied warranty of
11044 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11045 GNU General Public License for more details.
11046
11047 You should have received a copy of the GNU General Public License
11048 along with Bison; see the file COPYING. If not, write to
11049 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11050 Boston, MA 02111-1307, USA.