]> git.saurik.com Git - bison.git/blob - ChangeLog
34de6a3c443823f95c9b44724ab99de45b8e8e5d
[bison.git] / ChangeLog
1 2003-02-20 Akim Demaille <akim@epita.fr>
2
3 * data/lalr1.cc (position.hh): New subfile, including the extended
4 and Doxygen'ed documentation of class Position.
5 (location.hh): Use it.
6 Document a` la Doxygen.
7 With the help of BenoƮt Perrot.
8
9 2003-02-20 Akim Demaille <akim@epita.fr>
10
11 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12 AT_YACC_IF.
13 Redefine AT_YYERROR_SEES_LOC_IF using it.
14 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
15 not defined.
16 Don't use the location in yy::Parser::error_ and
17 yy::Parser::print_ when not %locations.
18 Activate more lalr1.cc tests.
19
20 2003-02-19 Akim Demaille <akim@epita.fr>
21
22 * data/lalr1.cc: When displaying a line number, be sure to make it
23 an int.
24
25 2003-02-19 Akim Demaille <akim@epita.fr>
26
27 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
28 Remove, useless.
29 (YYABORT, YYACCEPT, YYERROR): New.
30 * tests/calc.at: Renable the lalr1.cc test.
31
32 2003-02-19 Akim Demaille <akim@epita.fr>
33
34 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
35 error recovery, mixing with/without pops and discarding of the
36 lookahead.
37 Exercise YYERROR.
38 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
39
40 2003-02-17 Paul Eggert <eggert@twinsun.com>
41
42 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
43 * tests/testsuite.at (AT_COMPILE): Use them.
44 This fixes the testsuite problem reported by Robert Lentz in
45 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
46
47 2003-02-12 Paul Eggert <eggert@twinsun.com>
48
49 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
50 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
51 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
52 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
53 Check for malloc failure, for consistency with yacc.c.
54 (yytname_size): Remove, for consistency with yacc.c.
55
56 The bug still remains in data/lalr1.cc, as I didn't have time
57 to fix it there.
58
59 2003-02-06 Akim Demaille <akim@epita.fr>
60
61 * configure.ac (GXX): Rename as...
62 (CXX): this, to keep the original Autoconf semantics.
63 Require 2.57.
64 * data/lalr1.cc: Fix b4_copyright invocations.
65 If YYDEBUG is not defined, don't depend upon name_ being defined.
66 (location.hh): Include string and iostream.
67 (Position::filename): New member.
68 (Position::Position ()): New.
69 (operator<< (Position)): New.
70 (operator- (Position, int)): New.
71 (Location::first, Location::last): Rename as...
72 (Location::begin, Location::end): these, to mock the conventional
73 iterator names.
74 (operator<< (Location)): New.
75 * tests/atlocal.in (CXX): New.
76 * tests/testsuite.at (AT_COMPILE_CXX): New.
77 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
78 locations in a more synthetic way.
79 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
80 lalr1.cc is used.
81 Adjust the C locations to match those from Emacs: first column is
82 column 0.
83 Change all the expected results.
84 Conform to the GCS: simplify the locations when applicable.
85 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
86 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
87 these CPP macros with the m4 macros new defined by...
88 (AT_CHECK_PUSHDEFS): this, i.e.:
89 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
90 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
91 New macros.
92 (AT_CHECK_POPDEFS): Undefine them.
93 (AT_CHECK_CALC_LALR1_CC): New.
94 Use it for the first lalr1.cc test.
95
96 2003-02-04 Akim Demaille <akim@epita.fr>
97
98 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
99 Location as is defined.
100
101 2003-02-04 Akim Demaille <akim@epita.fr>
102
103 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
104 name_ being defined.
105
106 2003-02-03 Paul Eggert <eggert@twinsun.com>
107
108 * src/gram.h (start_symbol): Remove unused decl.
109
110 Use more-consistent naming conventions for local vars.
111
112 * src/derives.c (derives_compute): Change type of local var from
113 int to rule_number.
114 * src/gram.c (grammar_rules_partial_print): Likewise.
115 * src/print.c (print_core): Likewise.
116 * src/reduce.c (reduce_grammar_tables): Likewise.
117
118 * src/gram.c (grammar_dump): Change name of item_number *
119 local var from r to rp.
120 * src/nullable.c (nullable_compute): Likewise.
121
122 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
123
124 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
125 for symbol or symbol_number var.
126 * src/reader.c (grammar_start_symbol_set): Likewise.
127 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
128 Likewise.
129 * src/state.c (transitions_to): Likewise.
130 * src/state.h: Likewise.
131 * src/tables.c (symbol_number_to_vector_number): Likewise.
132
133 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
134 char * var.
135
136 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
137 var.
138
139 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
140 var.
141
142 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
143 Use str, not s, for char * var. Use ch, not c, for character var.
144 Use size for size var.
145
146 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
147 char * var.
148 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
149 uniqstr var.
150 * src/uniqstr.h: Likewise.
151
152 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
153 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
154 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
155 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
156 param to have same name as that of enum, so that we don't use
157 "s" to stand for a non-state.
158
159 2003-02-02 Akim Demaille <akim@epita.fr>
160
161 * src/scan-skel.l: Scan more than one inert character per yylex
162 invocation.
163
164 2003-02-01 Paul Eggert <eggert@twinsun.com>
165
166 Version 1.875a.
167
168 * po/LINGUAS: Add ms.
169
170 2003-01-30 Akim Demaille <akim@epita.fr>
171
172 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
173
174 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
175
176 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
177 of $1.
178
179 Changes in response to error report by S. Eken: GLR mode does not
180 handle negative $ indices or $ indices in embedded rules correctly.
181 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
182
183 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
184 (b4_rhs_location): Ditto.
185 (yyfill): New function to copy from stack tree into array
186 incrementally.
187 (yyuserAction): Modify to allow incremental move of semantic values
188 to rhs array when in GLR mode.
189 Define YYFILL to use in user-defined actions to fill semantic array
190 as needed.
191 Remove dummy use of yystack, as there is now a guaranteed use.
192 (yydoAction): Modify to allow incremental move of semantic values
193 to rhs array when in GLR mode.
194 (yyresolveAction): Ditto.
195 (yyglrShiftDefer): Update comment.
196 (yyresolveStates): Use X == NULL for pointers, not !X.
197 (yyglrReduce): Ditto.
198 (yydoAction): Ditto
199
200 * tests/glr-regr1.at: Rename to ...
201 * tests/glr-regression.at: Add new regression test for the problems
202 described above (adapted from S. Eken).
203 Update copyright notice.
204 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
205 * tests/Makefile.am: Ditto.
206
207 2003-01-28 Paul Eggert <eggert@twinsun.com>
208
209 * data/lalr1.cc: Do not use @output_header_name@ unless
210 b4_defines_flag is set. This fixes two bugs reported by
211 Tim Van Holder in
212 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
213 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
214
215 2003-01-21 Paul Eggert <eggert@twinsun.com>
216
217 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
218 we don't need to worry about yyerrlab1 being reported as an
219 "unused label" by non-GCC C compilers. The downside is that if
220 locations are used then a couple of statements are duplicated each
221 time YYERROR is invoked, but the upside is that the warnings
222 should vanish.
223 (yyerrlab1): Move code to YERROR.
224 (yyerrlab2): Remove. Change uses back to yyerrlab1.
225 This reverts some of the 2002-12-27 change.
226
227 2003-01-17 Paul Eggert <eggert@twinsun.com>
228
229 * src/output.c (symbol_printers_output): Fix typo that led
230 to core dump. Problem reported by Antonio Rus in
231 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
232
233 2003-01-13 Akim Demaille <akim@epita.fr>,
234 Quoc Peyrot <chojin@lrde.epita.fr>,
235 Robert Anisko <anisko_r@lrde.epita.fr>
236
237 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
238 when the stacks contain one element, as the loop would otherwise
239 free the last state, and then use the top state (the one we just
240 popped). This means that the initial elements will not be freed
241 explicitly, as is the case in yacc.c; it is not a problem, as
242 these elements have fake values.
243
244 2003-01-11 Paul Eggert <eggert@twinsun.com>
245
246 * NEWS: %expect-violations are now just warnings, reverting
247 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
248 bootstrapping problem reported by Matthias Klose; see
249 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
250 * src/conflicts.c (conflicts_print): Likewise.
251 * tests/conflicts.at (%expect not enough, %expect too much,
252 %expect with reduce conflicts): Likewise.
253 * doc/bison.texinfo (Expect Decl): Document this. Also mention
254 that the warning is enabled if the number of conflicts changes
255 (not necessarily increases).
256
257 * src/getargs.c (version): Update copyright year.
258
259 2003-01-09 Akim Demaille <akim@epita.fr>
260
261 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
262
263 2003-01-08 Paul Eggert <eggert@twinsun.com>
264
265 * Makefile.maint (WGETFLAGS):
266 New macro, containing "-C off" to disable proxy caches.
267 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
268 (rel-check): Use $(WGET) instead of wget.
269
270 2003-01-06 Paul Eggert <eggert@twinsun.com>
271
272 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
273 the GLR paper of Scott, Johnstone and Hussain.
274
275 2003-01-04 Paul Eggert <eggert@twinsun.com>
276
277 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
278 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
279 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
280 (EXTRA_LIBRARIES): New var, for liby.a.
281 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
282 (EXTRA_SCRIPTS): New var, for yacc.
283
284 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
285 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
286 Problem reported by Nelson H. F. Beebe.
287
288 2003-01-03 Paul Eggert <eggert@twinsun.com>
289
290 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
291 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
292 when compiling Bison 1.875's `bitset bset = obstack_alloc
293 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
294
295 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
296 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
297 grow to a huge size with typical invocation.
298
299 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
300 Use the pattern recommended by Autoconf 2.57, except also protect
301 against double-definition.
302 * src/system.h: Likewise.
303 Portability issues reported by Nelson H. F. Beebe.
304
305 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
306 All uses changed. Provide a definition in both C and C++.
307 (yytrue, yyfalse): Define even if defined (__cplusplus).
308
309 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
310 Reported by Nelson H. F. Beebe.
311
312 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
313
314 2003-01-02 Paul Eggert <eggert@twinsun.com>
315
316 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
317 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
318 Bug reported by Nelson H. F. Beebe.
319
320 2003-01-01 Paul Eggert <eggert@twinsun.com>
321
322 * Version 1.875.
323
324 2002-12-30 Paul Eggert <eggert@twinsun.com>
325
326 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
327 Moved here from...
328 (<INITIAL>","): Here. This causes stray "," to be treated
329 more uniformly.
330
331 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
332 last brace in braced code when not in Yacc mode, for compatibility
333 with Bison 1.35. This resurrects the 2001-12-15 patch to
334 src/reader.c.
335
336 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
337 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
338
339 2002-12-28 Paul Eggert <eggert@twinsun.com>
340
341 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
342 that of SYM's type. This fixes Debian bug 168069, reported by
343 Thomas Olsson.
344
345 2002-12-28 Paul Eggert <eggert@twinsun.com>
346
347 Version 1.75f.
348
349 Switch back to the Yacc style of conflict reports, undoing some
350 of the 2002-07-30 change.
351 * doc/bison.texinfo (Understanding): Use Yacc style for
352 conflict reports. Also, use new way of locating rules.
353 * src/conflicts.c (conflict_report):
354 Renamed from conflict_report_yacc, removing the old
355 'conflict_report'. Translate the entire conflict report at once,
356 so that we don't assume that "," has the same interpretation in
357 all languages.
358 (conflicts_output): Use Yacc-style conflict report for each state,
359 instead of our more-complicated style.
360 (conflicts_print): Use Yacc-style conflict report, except print
361 the input file name when not emulating Yacc.
362 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
363 Conflicted Reduction, %expect not enough, %expect too much,
364 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
365 * tests/existing.at (GNU Cim Grammar): Likewise.
366 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
367
368 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
369 fatal): Don't invoke fflush; it's not needed and it might even be
370 harmful for stdout, as stdout might not be open.
371 * src/reduce.c (reduce_print): Likewise.
372
373 2002-12-27 Paul Eggert <eggert@twinsun.com>
374
375 Fix a bug where error locations were not being recorded correctly.
376 This problem was originally reported by Paul Hilfinger in
377 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
378
379 * data/yacc.c (yyparse): New local var yylerrsp, to record the
380 top of the location stack's error locations.
381 (yyerrlab): Set it. When discarding a token, push its location
382 onto yylerrsp so that we don't lose track of the error's end.
383 (yyerrlab1): Now is only the target of YYERROR, so that we can
384 properly record the location of the action that failed. For GCC
385 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
386 GCC warning about yyerrlab1 being unused if YYERROR is unused.
387 (yyerrlab2): New label, which yyerrlab now falls through to.
388 Compute the error's location by applying YYLLOC_DEFAULT to
389 the locations of all the symbols that went into the error.
390 * doc/bison.texinfo (Location Default Action): Mention that
391 YYLLOC_DEFAULT is also invoked for syntax errors.
392 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
393 Error locations include the locations of all the tokens that were
394 discarded, not just the last token.
395
396 2002-12-26 Paul Eggert <eggert@twinsun.com>
397
398 * src/files.c: Include quote.h.
399 (compute_output_file_names): Warn if we detect conflicting
400 outputs to the same file. This should catch the misunderstanding
401 exemplified by Debian Bug 165349, reported by Bruce Stephens..
402
403 * src/conflicts.c (conflicts_print): If the user specifies
404 "%expect N", report an error if there are any reduce/reduce
405 conflicts. This is what the manual says should happen.
406 This fixes Debian bug 130890, reported by Anthony DeRobertis.
407 * tests/conflicts.at (%expect with reduce conflicts): New test.
408
409 Don't use m4_include on relative file names, as it doesn't work as
410 desired if there happens to be a file with that name under ".".
411
412 * m4sugar/version.m4: Remove; it was included but it wasn't used.
413 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
414 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
415 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
416 * src/output.c (output_skeleton): Use full path names when
417 specifying a file to include; don't rely on include path, as
418 it's unreliable when the working file contains a file with
419 that name.
420
421 2002-12-25 Paul Eggert <eggert@twinsun.com>
422
423 Remove obsolete references to bison.simple and bison.hairy.
424 Problem mentioned by Aubin Mahe in
425 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
426 * data/glr.c: Comment fix.
427 * doc/bison.1: Remove references. Also, mention "yacc".
428
429 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
430 with -g option.
431
432 * src/parse-gram.y (declaration): Use enum "report_states" rather
433 than its numeric value 1.
434
435 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
436 opening a new one. This fixes Debian bug 165349, reported by
437 Bruce Stephens.
438
439 2002-12-24 Paul Eggert <eggert@twinsun.com>
440
441 Version 1.75e.
442
443 * Makefile.maint (cvs-update): Don't assume that the shell
444 supports $(...), as Solaris sh doesn't.
445
446 * src/parse-gram.y (lloc_default): Remove test for empty
447 nonterminals at the end, since it didn't change the result.
448
449 2002-12-24 Paul Eggert <eggert@twinsun.com>
450
451 If the user does not define YYSTYPE as a macro, Bison now declares it
452 using typedef instead of defining it as a macro. POSIX requires this.
453 For consistency, YYLTYPE is also declared instead of defined.
454
455 %union directives can now have a tag before the `{', e.g., the
456 directive `%union foo {...}' now generates the C code
457 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
458 The default union tag is `YYSTYPE', for compatibility with Solaris 9
459 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
460 instead of `yyltype'.
461
462 `yystype' and `yyltype' are now obsolescent macros instead of being
463 typedefs or tags; they are no longer documented and will be
464 withdrawn in a future release.
465
466 * data/glr.c (b4_location_type): Remove.
467 (YYSTYPE): Renamed from yystype.
468 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
469 (struct YYLTYPE): Renamed from struct yyltype.
470 (YYLTYPE): Renamed from yyltype.
471 (yyltype, yystype): New (and obsolescent) macros,
472 for backward compatibility.
473 * data/yacc.c: Likewise.
474
475 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
476 does not specify a union tag. This is for compatibility with
477 Solaris 9 yacc.
478
479 * src/parse-gram.y (add_param): 2nd arg is now char * not char
480 const *, since it is now modified by stripping surrounding { }.
481 (current_braced_code): Remove.
482 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
483 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
484 trailing " {...}". Now of type <chars>.
485 (grammar_declaration): Adjust to bundled tokens.
486 (code_content): Remove; stripping is now done by add_param.
487 (print_token_value): Print contents of bundled tokens.
488 (token_name): New function.
489
490 * src/reader.h (braced_code, current_braced_code): Remove.
491 (token_name): New decl.
492
493 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
494 token_type, not braced_code code_kind. All uses changed.
495 (SC_PRE_CODE): New state, for scanning after a keyword that
496 has (or usually has) an immediately-following braced code.
497 (token_type): New local var, to keep track of which token type
498 to return when scanning braced code.
499 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
500 <INITIAL>"%parse-param", <INITIAL>"%printer",
501 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
502 instead of returning a token type immediately.
503 (<INITIAL>"{"): Set token type.
504 (<SC_BRACED_CODE>"}"): Use it.
505 (handle_action_dollar, handle_action_at): Now returns bool
506 indicating success. Fail if ! current_rule; this prevents a core dump.
507 (handle_symbol_code_dollar, handle_symbol_code_at):
508 Remove; merge body into caller.
509 (handle_dollar, handle_at): Complain in invalid contexts.
510
511 * NEWS, doc/bison.texinfo: Document the above.
512 * NEWS: Fix years and program names in copyright notice.
513
514 2002-12-17 Paul Eggert <eggert@twinsun.com>
515
516 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
517 Reporting, Table of Symbols): Omit mentions of %lex-param and
518 %parse-param from the documentation for now.
519
520 2002-12-15 Paul Eggert <eggert@twinsun.com>
521
522 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
523 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
524 lookahead symbol, and which sets yychar in parser actions) and it
525 disagreed with the Bison documentation. Bug
526 reported by Andrew Walrond.
527
528 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
529 as the caller now does that.
530 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
531 (YYEMPTY): Parenthesize right hand side, since others use it.
532 (yyparse): Don't assume that our generated code is the only code
533 that sets yychar.
534
535 2002-12-13 Paul Eggert <eggert@twinsun.com>
536
537 Version 1.75d.
538
539 POSIX requires a "yacc" command.
540 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
541 (MOSTLYCLEANFILES): Add yacc.
542 (yacc): New rule.
543 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
544 as an alias for bison y.
545
546 * po/LINGUAS: Add da.
547
548 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
549 problem with latest <getopt.h>.
550 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
551
552 * doc/fdl.texi: Upgrade to 1.2.
553 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
554 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
555 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
556 gnulib.
557 * config/install-sh: Sync with autotools.
558
559 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
560 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
561 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
562 locations are requested.
563 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
564 locations are requested.
565
566 2002-12-12 Paul Eggert <eggert@twinsun.com>
567
568 Remove unportable casts and storage allocation tricks.
569 While we're at it, remove almost all casts, since they
570 usually aren't needed and are a sign of trouble.
571
572 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
573
574 * src/derives.c (derives_compute): Do not subtract NTOKENS from
575 the pointer DSET returned by malloc; this isn't portable.
576 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
577 Similarly for DERIVES.
578 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
579 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
580 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
581
582 * src/derives.c (derives_compute): Do not bother invoking
583 int_of_rule_number, since rule numbers are integers.
584
585 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
586 rather than XMALLOC (char, N).
587
588 * src/files.c (filename_split): Rewrite to avoid cast.
589
590 * src/gram.h (symbol_number_as_item_number,
591 item_number_as_symbol_number, rule_number_as_item_number,
592 item_number_as_rule_number):
593 Now inline functions rather than macros, to avoid casts.
594 * src/state.h (state_number_as_int): Likewise.
595 * src/tables.c (state_number_to_vector_number,
596 symbol_number_to_vector_number): Likewise.
597
598 * src/gram.h (int_of_rule_number): Remove; no longer used.
599
600 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
601 since the resulting storage is always stored into.
602
603 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
604 where it's needed.
605
606 * src/muscle_tab.c (muscle_m4_output):
607 Now inline. Return bool, not int.
608 * src/state.c (state_compare): Likewise.
609 * src/symtab.c (symbol_check_defined,
610 symbol_check_alias_consistency, symbol_pack, symbol_translation,
611 hash_compare_symbol, hash_symbol):
612 Likewise.
613 * src/uniqstr.c (uniqstr_print): Likewise.
614 * src/muscle_tab.c (muscle_m4_output_processor):
615 New function, to avoid casts.
616 * src/state.c (state_comparator, stage_hasher): Likewise.
617 * src/symtab.c (symbol_check_defined_processor,
618 symbol_check_alias_consistency_processor, symbol_pack_processor,
619 symbol_translation_processor, hash_symbol_comparator,
620 hash_symbol_hasher): Likewise.
621 * src/uniqstr.c (uniqstr_print_processor): Likewise.
622 * src/muscle_tab.c (muscles_m4_output):
623 Use new functions instead of casting old functions unportably.
624 * src/state.c (state_hash_new): Likewise.
625 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
626 symbols_token_translations_init):
627 Likewise.
628 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
629
630 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
631 var instead of casting to long, to avoid casts.
632 (prepare_states): Use MALLOC rather than alloca, so that we don't
633 have to worry about alloca.
634 * src/state.c (state_hash_lookup): Likewise.
635
636 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
637 local var instead of casting to unsigned char, to avoid casts.
638
639 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
640 STATE_ALLOC): Remove.
641 (transitions_new, errs_new, reductions_new, state_new): Use malloc
642 rather than calloc, and use offsetof to avoid allocating slightly
643 too much storage.
644 (state_new): Initialize all members.
645
646 * src/state.c (state_hash): Use unsigned accumulator, not signed.
647
648 * src/symtab.c (symbol_free): Remove; unused.
649 (symbol_get): Remove cast in lhs of assignment.
650 (symbols_do): Now static. Accept generic arguments, not
651 hashing-related ones.
652
653 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
654 (symbol_processor): Remove.
655 (symbols_do): Remove decl; now static.
656
657 * src/system.h (alloca): Remove; decl no longer needed.
658 (<stddef.h>): Include, for offsetof.
659 (<inttypes.>, <stdint.h>): Include if available.
660 (uintptr_t): New type, if system lacks it.
661 (CALLOC, MALLOC, REALLOC): New macros.
662 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
663 new macros.
664
665 * src/tables.c (table_size): Now int, to pacify GCC.
666 (table_grow, table_ninf_remap): Use signed table size.
667 (save_row): Don't bother initializing locals when not needed.
668 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
669 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
670
671 * src/vcg.h: Correct misspellings.
672
673 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
674
675
676 * src/getargs.c (getargs): Don't assume EOF == -1.
677
678 2002-12-09 Paul Eggert <eggert@twinsun.com>
679
680 Change identifier spellings to avoid collisions with names
681 that are reserved by POSIX.
682
683 Don't use names ending in _t, since POSIX reserves them.
684 For consistency, remove _e and _s endings -- they're weren't
685 needed to remove ambiguity. All uses changed.
686 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
687 turn was just renamed from struniq_t.
688 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
689 which in turn was just renamed from struniq_processor_t.
690 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
691 in turn was renamed from hash_compare_struniq_t.
692 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
693 (state_list): Renamed from state_list_t.
694 * src/assoc.h (assoc): Renamed from assoc_t.
695 * src/conflicts.c (enum conflict_resolution): Renamed from
696 enum conflict_resolution_e.
697 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
698 (rule_list): Renamed from rule_list_t.
699 * src/getargs.h (enum trace): Renamed from enum trace_e.
700 (enum report): Renamed from enum report_e.
701 * src/gram.h (item_number): Renamed from item_number_t.
702 (rule_number): Renamed from rule_number_t.
703 (struct rule_s): Remove the "rule_s" part; not used.
704 (rule): Renamed from rule_t.
705 (rule_filter): Renamed from rule_filter_t.
706 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
707 (goto_list): Renamed from goto_list_t.
708 * src/lalr.h (goto_number): Renamed from goto_number_t.
709 * src/location.h (location): Renamed from location_t.
710 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
711 and moved here from:
712 * src/muscle_tab.h (muscle_entry_t): here.
713 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
714 (rule_list): Renamed from rule_list_t.
715 * src/print_graph.c (static_graph): Renamed from graph.
716 * src/reader.h (braced_code): Renamed from braced_code_t.
717 Remove brace_code_e tag.
718 * src/relation.h (relation_node): Renamed from relation_node_t.
719 (relation_nodes): Renamed from relation_nodes_t.
720 (relation): Renamed from relation_t.
721 * src/state.h (state_number): Renamed from state_number_t.
722 (struct state): Renamed from struct state_s.
723 (state): Renamed from state_t.
724 (transitions): Renamed from transitions_t. Unused (and
725 misspelled) transtion_s tag removed.
726 (errs): Renamed from errs_t. Unused errs_s tag removed.
727 (reductions): Renamed from reductions_t. Unused tag
728 reductions_s removed.
729 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
730 (struct symbol_list): Renamed from struct symbol_list_s.
731 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
732 (struct symbol): Renamed from struct symbol_s.
733 (symbol): Renamed from symbol_t.
734 * src/tables.c (vector_number): Renamed from vector_number_t.
735 (action_number): Renamed from action_t.
736 * src/tables.h (base_number): Renamed from base_t.
737 * src/vcg.h (enum color): Renamed from enum color_e.
738 (enum textmode): Renamed from enum textmode_e.
739 (enum shape): Renamed from enum shape_e.
740 (struct colorentry): Renamed from struct colorentry_s.
741 (struct classname): Renamed from struct classname_s.
742 (struct infoname): Renamed from struct infoname_s.
743 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
744 (enum decision): Renamed from enum decision_e.
745 (enum orientation): Renamed from enum orientation_e.
746 (enum alignment): Renamed from enum alignment_e.
747 (enum arrow_mode): Renamed from enum arrow_mode_e.
748 (enum crossing_type): Renamed from enum crossing_type_e.
749 (enum view): Renamed from enum view_e.
750 (struct node): Renamed from struct node_s.
751 (node): Renamed from node_t.
752 (enum linestyle): Renamed from enum linestyle_e.
753 (enum arrowstyle): Renamed from enum arrowstyle_e.
754 (struct edge): Renamed from struct edge.
755 (edge): Renamed from edge_t.
756 (struct graph): Renamed from struct graph_s.
757 (graph): Renamed from graph_t.
758 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
759 Rename value_t -> value.
760 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
761 value_t_as_yystype -> value_as_yystype.
762
763 Don't include <errno.h> in the mainstream code, since it
764 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
765 * lib/get-errno.c, lib/get-errno.h: New files.
766 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
767 get-errno.c.
768 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
769 * src/output.c (output_skeleton): Likewise.
770 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
771 instead of errno.
772 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
773 Likewise.
774 (handle_action_dollar, handle_action_at): Likewise.
775 * src/system.h: Do not include <errno.h>.
776 (TAB_EXT): Renamed from EXT_TAB.
777 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
778
779 Avoid str[a-z]*, since <string.h> reserves that name space.
780 Change all instances of "struniq" in names to "uniqstr", and
781 likewise for "STRUNIQ" and "UNIQSTR".
782 * src/uniqstr.c: Renamed from src/struniq.c.
783 * src/uniqstr.h: Renamed from src/struniq.h.
784 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
785 * src/files.c (strsuffix): Remove; unused.
786 (concat2): Renamed from stringappend. Now static.
787 * src/files.h (strsuffix, stringappend): Remove; unused.
788 * src/parse-gram.y (<chars>): Renamed from <string>.
789 (<uniqstr>): Renamed from <struniq>.
790 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
791 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
792 (struct graph_s.expand): Renamed from struct graph_s.stretch.
793 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
794 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
795 (N_EXPAND): Renamed from N_STRETCH.
796
797 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
798 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
799 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
800 Remove; unused.
801 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
802 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
803 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
804 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
805 (BASE_MAXIMUM): Renamed from BASE_MAX.
806 (BASE_MINIMUM): Renamed from BASE_MIN.
807 (ACTION_MAX): Remove; unused.
808 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
809 Unnecessary casts removed from above defines.
810
811
812 Fix misspelling in names.
813 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
814 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
815 G_NODE_ALIGNEMENT.
816
817
818 * lib/timevar.c (timevar_report): Renamed from time_report,
819 for consistency with other names.
820 * lib/timevar.h (timevar_report): New decl.
821 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
822
823
824 Sort include-file uses.
825
826 Reorder all include files under src to be in the order "system.h".
827 then the ../lib include files in angle brackets (alphabetized),
828 then the . include files in double-quotes (alphabetized). Fix
829 dependency breakages encountered in this process, as follows:
830 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
831 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
832 * src/state.h: Include "symtab.h".
833
834 2002-12-08 Paul Eggert <eggert@twinsun.com>
835
836 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
837 since this causes problems when __file__ contains character
838 sequences like "@" that are treated specially by src/scan-skel.l.
839 Instead, just use the file's basename. This fixes the bug
840 reported by Martin Mokrejs in
841 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
842
843 2002-12-06 Paul Eggert <eggert@twinsun.com>
844
845 Add support for rules that do not have trailing semicolons, as
846 POSIX requires. Improve the quality of locations in Bison
847 diagnostics.
848
849 * src/location.c: Include <quotearg.h>.
850 (empty_location): Now const.
851 (location_print): New function. Follow the recommendation of the
852 GNU Coding Standards for locations that span file boundaries.
853 * src/location.h: Do not include <quotearg.h>; no longer needed.
854 (boundary): New type.
855 (location_t): Use it. This allows locations to span file boundaries.
856 All member uses changed: file -> start.file or end.file (as needed),
857 first_line -> start.line, first_column -> start.column,
858 last_line -> end.line, last_column -> end.column.
859 (equal_boundaries): New function.
860 (LOCATION_RESET, LOCATION_STEP): Remove.
861 (LOCATION_PRINT): Remove. All callers changed to use location_print.
862 (empty_location): Now const.
863 (location_print): New decl.
864 * src/parse-gram.y (lloc_default): New function, which handles
865 empty locations more accurately.
866 (YYLLOC_DEFAULT): Use it.
867 (%token COLON): Remove.
868 (%token ID_COLON): New token.
869 (rules): Use it.
870 (declarations, rules): Remove trailing semicolon.
871 (declaration, rules_or_grammar_declaration):
872 Allow empty (";") declaration.
873 (symbol_def): Remove empty actions; no longer needed.
874 (rules_or_grammar_declaration): Remove trailing semicolon.
875 (semi_colon.opt): Remove.
876 * src/reader.h: Include location.h.
877 (scanner_cursor): New decl.
878 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
879 rolling our own.
880 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
881 of *loc.
882 (STEP): Remove. No longer needed, now that adjust_location does
883 the work. All uses removed.
884 (scanner_cursor): New var.
885 (adjust_location): Renamed from extend_location. It now sets
886 *loc and adjusts the scanner cursor. All uses changed.
887 Don't bother testing for CR.
888 (handle_syncline): Remove location arg; now updates scanner cursor.
889 All callers changed.
890 (unexpected_end_of_file): Now accepts start boundary of token or
891 comment, not location. All callers changed. Update scanner cursor,
892 not the location.
893 (SC_AFTER_IDENTIFIER): New state.
894 (context_state): Renamed from c_context. All uses changed.
895 (id_loc, code_start, token_start): New local vars.
896 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
897 processing of Yacc white space and equivalents here.
898 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
899 instead of returning ID immediately, since we need to search for
900 a subsequent colon.
901 (<INITIAL>"'", "\""): Save token_start.
902 (<INITIAL>"%{", "{", "%%"): Save code_start.
903 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
904 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
905 BEGIN context_state at end, not INITIAL.
906 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
907 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
908 Return correct token start.
909 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
910 the start of a character, string or multiline comment is found.
911 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
912 Reduction): Adjust reported locations to match the more-precise
913 results now expected.
914 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
915 * tests/reduce.at (Useless Rules, Reduced Automaton,
916 Underivable Rules): Likewise.
917 * tests/regression.at (Invalid inputs): No longer `expecting ";"
918 or "|"' now that so many other tokens are allowed by the new grammar.
919
920 * src/complain.h (current_file): Remove duplicate decl;
921 current_file is now owned by files.h.
922 * src/complain.c, src/scan-gram.l: Include files.h.
923
924 2002-12-06 Paul Eggert <eggert@twinsun.com>
925
926 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
927 promotes to int; it might be unsigned int.
928 * data/yacc.c (yy_reduce_print): Likewise.
929
930 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
931 be #defined in the prologue, not in the Bison declarations.
932 This fixes Debian Bug 102878, reported by Shaul Karl.
933
934 2002-12-02 Paul Eggert <eggert@twinsun.com>
935
936 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
937 * lib/strtoul.c: New file, from gnulib.
938 This fixes a porting bug reported by Peter Klein in
939 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
940
941 2002-11-30 Paul Eggert <eggert@twinsun.com>
942
943 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
944 and put only a forward declaration in the prologue. This is for
945 consistency with the other scanner helper functions.
946
947 Type clashes now generate warnings, not errors, since it
948 appears that POSIX may allow some grammars with type clashes.
949 * src/reader.c (grammar_current_rule_check): Warn about
950 type clashes instead of complaining.
951 * tests/input.at (Type Clashes): Expect warnings, not complaints.
952
953 Add Yacc library, since POSIX requires it.
954 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
955 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
956 * lib/main.c, lib/yyerror.c: New files.
957
958 gram_error can be static; it need not be extern.
959 * src/reader.h (gram_error): Remove decl.
960 * src/parse-gram.y (gram_error): Now static. Add static decl.
961 (print_token_value): Omit parameter names from forward decl,
962 for consistency.
963
964 2002-11-29 Paul Eggert <eggert@twinsun.com>
965
966 * doc/bison.texinfo: Emphasize that yylex and yyerror must
967 be declared before being used. E.g., one should typically
968 declare them in the prologue. Use GNU coding style in examples.
969 Put "const" consistently after the type it modifies. Mention
970 that C99 supports "inline". Mention that yyerror traditionally
971 returns "int".
972
973 %parse-param and %lex-param now take just one argument, the
974 declaration; the argument name is deduced from the declaration.
975
976 * doc/bison.texinfo (Parser Function, Pure Calling, Error
977 Reporting, Table of Symbols): Document this.
978 * src/parse-gram.y (add_param): New function.
979 (COMMA): Remove.
980 (declaration): Implement new rule for %parse-param and %lex-param.
981 * src/scan-gram.l: "," now elicits a warning, rather than being
982 a token; this is more compatible with byacc.
983 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
984
985 2002-11-27 Paul Eggert <eggert@twinsun.com>
986
987 Rename identifiers to avoid real and potential collisions.
988
989 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
990 to avoid collision with lex macro described by Bruce Lilly in
991 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
992 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
993 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
994 * src/parse-gram.y (print_token_value): Renamed from yyprint.
995 All uses changed.
996 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
997 The name "yycontrol" violates the name space rules, and this stuff
998 wasn't being used anyway.
999 (input): Remove action; this stuff wasn't being used.
1000 (gram_error): Rename local variable yylloc -> loc.
1001 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1002 (YY_DECL): Don't use "yy" at start of local variables.
1003 All uses changed, e.g., yylloc -> loc.
1004 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1005 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1006 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1007 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1008
1009 * src/parse-gram.y (gram_error): loc is now const *.
1010 * src/reader.h (gram_error): Likewise.
1011
1012 2002-11-24 Paul Eggert <eggert@twinsun.com>
1013
1014 Version 1.75c.
1015
1016 * tests/actions.at (Actions after errors): Use an output format
1017 more similar to that of the Printers and Destructors test.
1018 Test the position of the ';' token too.
1019 (Printers and Destructors): Likewise.
1020 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1021 unnecessarily alarming people when the test fails.
1022
1023 * data/yacc.c (yyerrlab1): Move this label down, so that the
1024 parser does not discard the lookahead token if the user code
1025 invokes YYERROR. This change is required for POSIX conformance.
1026
1027 * lib/error.c: Sync with gnulib.
1028
1029 2002-11-22 Paul Eggert <eggert@twinsun.com>
1030
1031 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1032 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1033 * lib/xmalloc.c: Likewise.
1034
1035 2002-11-20 Paul Eggert <eggert@twinsun.com>
1036
1037 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1038
1039 2002-11-20 Paul Eggert <eggert@twinsun.com>
1040
1041 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1042 should use `if (! x) abort ();' rather than `assert (x);', and
1043 anyway it's one less thing to worry about configuring.
1044
1045 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1046 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1047 and replace all instances of assert with abort.
1048 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1049 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1050
1051 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1052 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1053 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1054 hash_find_entry, hash_rehash, hash_insert): Likewise.
1055 * src/conflicts.c (resolve_sr_conflict): Likewise.
1056 * src/lalr.c (set_goto_map, map_goto): Likewise.
1057 * src/nullable.c (nullable_compute): Likewise.
1058 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1059 * src/reader.c (packgram, reader): Likewise.
1060 * src/state.c (state_new, state_free, state_transitions_set,
1061 state_reduction_find): Likewise.
1062 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1063 symbol_pack): Likewise.
1064 * src/tables.c (conflict_row, pack_vector): Likewise.
1065 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1066 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1067 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1068 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1069
1070 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1071 (ARGMATCH_CONSTRAINT): New macro.
1072 (ARGMATCH_ASSERT): Use it.
1073
1074 * src/system.h (verify): New macro.
1075 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1076 rather than assert.
1077 * src/tables.c (tables_generate): Likewise.
1078
1079 * src/struniq.c (struniq_assert): Now returns void, and aborts
1080 if the assertion is false.
1081 (struniq_assert_p): Remove.
1082 * src/struniq.h: Likewise.
1083
1084 2002-11-18 Paul Eggert <eggert@twinsun.com>
1085
1086 * data/glr.c (yygetLRActions): Replace `yyindex' with
1087 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1088 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1089 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1090
1091 2002-11-18 Akim Demaille <akim@epita.fr>
1092
1093 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1094 space.
1095 From Tim Van Holder.
1096
1097 2002-11-17 Paul Eggert <eggert@twinsun.com>
1098
1099 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1100 to "SyntaxError" for consistency with my 2002-11-15 change.
1101
1102 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1103 not define to {}, since this breaks the common use of `YYDPRINTF
1104 ((...));' if a single statement is desired (e.g. before `else').
1105 Work around GCC warnings by surrounding corresponding calls with
1106 {} if needed.
1107 (yyhasResolvedValue): Remove unused function.
1108 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1109 loop body.
1110 (yyreportSyntaxError): Renamed from yyreportParseError.
1111 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1112 All uses changed.
1113 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1114 extern when possible. Remove unused initializations.
1115
1116 2002-11-16 Akim Demaille <akim@epita.fr>
1117
1118 Augment the similarity between GLR and LALR traces.
1119
1120 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1121 (YY_REDUCE_PRINT): New.
1122 (yyparse): Use them.
1123 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1124 YYDPRINT here.
1125 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1126 state reached after the reduction/recovery, since...
1127 (yyparse, yyprocessOneStack): Report the state we are entering in.
1128
1129 2002-11-16 Akim Demaille <akim@epita.fr>
1130
1131 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1132 Add support for --trace=skeleton.
1133 * src/scan-skel.l: %option debug.
1134 Scan strings of non-@ or \n instead of character by character.
1135 (scan_skel): Handle trace_skeleton.
1136 (QPUTS): New.
1137 (@output_parser_name@, @output_header_name@): ``Restore'' their
1138 support (used to be M4 macros).
1139 * data/yacc.c: Quote larger chunks, a la glr.c.
1140 * data/lalr1.cc: Likewise.
1141 The header guards are no longer available, so use some other
1142 string than `YYLSP_NEEDED'.
1143
1144 2002-11-16 Akim Demaille <akim@epita.fr>
1145
1146 Make the ``Printers and Destructors'' test more verbose, taking
1147 `yacc.c''s behavior as (possibly wrong) reference.
1148
1149 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1150 instead of fprint on stdout.
1151 Set and report the last_line of the symbols.
1152 Consistently display values and locations.
1153
1154 2002-11-16 Paul Eggert <eggert@twinsun.com>
1155
1156 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1157
1158 2002-11-15 Paul Eggert <eggert@twinsun.com>
1159
1160 * tests/actions.at (Actions after errors): New test case.
1161
1162 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1163 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1164 tests/action.at, tests/calc.at, tests/conflicts.at,
1165 tests/cxx-type.at, tests/regression.at:
1166 "parse error" -> "syntax error" for POSIX compatibility.
1167 "parsing stack overflow..." -> "parser stack overflow" so
1168 that code matches Bison documentation.
1169
1170 2002-11-15 Akim Demaille <akim@epita.fr>
1171
1172 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1173 take two BRACED_CODE, not two string_content.
1174 Free the scanner's obstack when we are done.
1175 (code_content): New.
1176 * tests/calc.at: Adjust.
1177 * doc/bison.texinfo: Adjust.
1178 Also, make sure to include the `,' for these declarations.
1179
1180 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1181
1182 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1183 definition; avoids potential autoreconf problems.
1184
1185 2002-11-15 Akim Demaille <akim@epita.fr>
1186
1187 Always check the value returned by yyparse.
1188
1189 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1190 returned by yyparse.
1191 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1192 Adjust calls.
1193 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1194 returned by yyparse.
1195
1196 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1197
1198 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1199 on input.at test.
1200
1201 2002-11-14 Paul Eggert <eggert@twinsun.com>
1202
1203 * src/output.c (output_skeleton): Call xfopen instead of
1204 duplicating xfopen's body.
1205
1206 Fix bugs reported by Nelson H. F. Beebe in
1207 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1208
1209 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1210 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1211 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1212 file twice in the grammar, as an extra check.
1213
1214 * tests/input.at (Torturing the Scanner): Surround the
1215 backslash-newline tests with "#if 0", to make it less likely that
1216 we'll run into compiler bugs. Bring back solitary \ inside
1217 comment, but add a closing comment to work around HP C bug. Don't
1218 test backslash-newline in C character constant.
1219
1220 2002-11-14 Akim Demaille <akim@epita.fr>
1221
1222 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1223 status of the compiler.
1224 Calling `exit 1' is no longer needed.
1225 Reported by Nelson H. F. Beebe.
1226
1227 2002-11-14 Akim Demaille <akim@epita.fr>
1228
1229 * tests/atlocal.in (CPPFLAGS): We have config.h.
1230 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1231 New.
1232 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1233 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1234 * tests/regression.at, tests/torture.at: Use them for all the
1235 grammars that are to be compiled.
1236 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1237 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1238 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1239
1240 2002-11-14 Akim Demaille <akim@epita.fr>
1241
1242 * doc/bison.texinfo: Various formatting changes (alignments in
1243 samples, additional @group/@end group, GCS in samples.
1244 Use @deffn instead of simple @table to define the directives,
1245 macros, variables etc.
1246
1247 2002-11-13 Paul Eggert <eggert@twinsun.com>
1248
1249 Fix some bugs reported by Albert Chin-A-Young in
1250 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1251
1252 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1253 -o c"; the HP C compiler chatters during compilation.
1254 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1255 * tests/headers.at (export YYLTYPE): Likewise.
1256
1257 * tests/input.at (Torturing the Scanner): Remove lines containing
1258 solitary backslashes, as they tickle a bug in the HP C compiler.
1259
1260 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1261 comments, since they're not portable. Use GNU coding style.
1262
1263 2002-11-13 Akim Demaille <akim@epita.fr>
1264
1265 * data/yacc.c: Leave bigger chunks of quoted text.
1266 (YYDSYMPRINTF): New.
1267 Use it to report symbol activities.
1268 * data/glr.c (YYDSYMPRINTF): New.
1269 Use it.
1270
1271 2002-11-12 Paul Eggert <eggert@twinsun.com>
1272
1273 Version 1.75b.
1274
1275 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1276 (yyglrReduce): Return yyok, not 0.
1277 This should avoid the enumerated-type warnings reported
1278 by Nelson H. F. Beebe in
1279 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1280
1281 * lib/bbitset.h (BITSET_INLINE): Remove.
1282 * lib/bitset.h [! BITSET_INLINE]: Remove.
1283 (bitset_set, bitset_reset, bitset_test): Rename local vars
1284 to avoid shadowing warnings by GCC.
1285
1286 * data/glr.c (inline): Remove #define. It's the user's
1287 responsibility to #define it away, just like 'const'.
1288 This fixes one of the bugs reported by Nelson H. F. Beebe in
1289 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1290
1291 * Makefile.maint (po-check): Scan .l and .y files instead of the
1292 .c and the .h files that they generate. This fixes the bug
1293 reported by Tim Van Holder in:
1294 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1295 Look for N_ as well as for _. Try to avoid matching #define for
1296 N_ and _.
1297 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1298 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1299 * src/scan-gram.l: Revamp regular expressions so that " and '
1300 do not confuse xgettext.
1301
1302 * src/struniq.h (struniq_new): Do not declare the return type
1303 to be 'const'; this violates the C standard.
1304 * src/struniq.c (struniq_new): Likewise.
1305
1306 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1307
1308 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1309 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1310 linker.
1311
1312 2002-11-12 Akim Demaille <akim@epita.fr>
1313
1314 * Makefile.maint: Sync with Autoconf:
1315 (local_updates): New.
1316
1317 2002-11-12 Akim Demaille <akim@epita.fr>
1318
1319 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1320
1321 2002-11-12 Akim Demaille <akim@epita.fr>
1322
1323 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1324 locations.
1325
1326 2002-11-12 Akim Demaille <akim@epita.fr>
1327
1328 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1329 not yyvalue.
1330
1331 2002-11-12 Akim Demaille <akim@epita.fr>
1332
1333 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1334 Use it to test the GLR parser.
1335
1336 2002-11-12 Akim Demaille <akim@epita.fr>
1337
1338 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1339 defines it.
1340 * data/glr.c (yystos): New.
1341 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1342 (YYDSYMPRINT): New.
1343 (yyval): Don't define it, it is handled via M4.
1344 (yyrecoverParseError): Free verbosely the discarded symbols.
1345 * data/yacc.c (yysymprint): Remove, rather...
1346 (b4_yysymprint_generate): invoke.
1347 * data/c.m4 (b4_yysymprint_generate): New.
1348 Accept pointers as arguments, as opposed to the version from
1349 yacc.c.
1350 (b4_yydestruct_generate): Likewise.
1351 * tests/cations.at (Printers and Destructors): Use Bison directives
1352 instead of CPP macros.
1353 Don't rely on internal details.
1354
1355 2002-11-12 Akim Demaille <akim@epita.fr>
1356
1357 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1358 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1359 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1360 it against YYEMPTY and so forth), work on yytoken (i.e., set
1361 it to YYEMPTY etc.).
1362 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1363 (b4_symbol_actions): Remove.
1364 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1365 for 0, end-of-input.
1366
1367 2002-11-12 Akim Demaille <akim@epita.fr>
1368
1369 * doc/bison.texinfo (Destructor Decl): New.
1370
1371 2002-11-12 Akim Demaille <akim@epita.fr>
1372
1373 * src/tables.c (tables_generate): Use free for pointers that
1374 cannot be NULL, not XFREE.
1375 (pack_vector): Use assert, not fatal, for bound violations.
1376 * src/state.c (state_new): Likewise.
1377 * src/reader.c (reader): Likewise.
1378 * src/lalr.c (set_goto_map): Likewise.
1379 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1380 the file name.
1381
1382 2002-11-12 Akim Demaille <akim@epita.fr>
1383
1384 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1385 Restore.
1386 * src/scan-gram.l (last_string): Is global to the file, not to
1387 yylex.
1388 * src/parse-gram.y (input): Don't append the epilogue here,
1389 (epilogue.opt): do it here, and free the scanner's obstack.
1390 * src/reader.c (epilogue_set): Rename as...
1391 (epilogue_augment): this.
1392 * data/c.m4 (b4_epilogue): Defaults to empty.
1393
1394 2002-11-12 Akim Demaille <akim@epita.fr>
1395
1396 * src/getargs.c (long_options): Remove duplicates.
1397 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1398 Remove.
1399 * doc/bison.rnh: Remove.
1400 * doc/bison.texinfo (VMS Invocation): Remove.
1401
1402 2002-11-12 Akim Demaille <akim@epita.fr>
1403
1404 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1405 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1406
1407 Use struniq for symbols.
1408
1409 * src/symtab.h (symbol_t): The tag member is a struniq.
1410 (symbol_type_set): Adjust.
1411 * src/symtab.c (symbol_new): Takes a struniq.
1412 (symbol_free): Don't free the tag member.
1413 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1414 (hash_compare_symbol, hash_symbol): these.
1415 Use the fact that tags as struniqs.
1416 (symbol_get): Use struniq_new.
1417 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1418 Returns a strniq.
1419 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1420 and type members are struniqs.
1421 * src/reader.c (get_merge_function)
1422 (grammar_current_rule_merge_set): Adjust.
1423 (TYPE, current_type): Are struniq.
1424
1425 Use struniq for file names.
1426
1427 * src/files.h, src/files.c (infile): Split into...
1428 (grammar_file, current_file): these.
1429 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1430 * src/reduce.c (reduce_print): Likewise.
1431 * src/getargs.c (getargs): Likewise.
1432 * src/complain.h, src/complain.c: Likewise.
1433 * src/main.c (main): Call struniqs_new early enough to use it for
1434 file names.
1435 Don't free the input file name.
1436
1437 2002-11-12 Akim Demaille <akim@epita.fr>
1438
1439 * src/symtab.c (symbol_free): Remove dead deactivated code:
1440 type_name are properly removed.
1441 Don't use XFREE to free items that cannot be NULL.
1442 * src/struniq.h, src/struniq.c: New.
1443 * src/main.c (main): Initialize/free struniqs.
1444 * src/parse-gram.y (%union): Add astruniq member.
1445 (yyprint): Adjust.
1446 * src/scan-gram.l (<{tag}>): Return a struniq.
1447 Free the obstack bit that used to store it.
1448 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1449
1450 2002-11-11 Paul Eggert <eggert@twinsun.com>
1451
1452 Revamp to fix many (but not all) of the C- and M4-related quoting
1453 problems. Among other things, this fixes the Bison bug reported
1454 by Jan Hubicka when processing the Bash grammar; see:
1455 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1456
1457 Use new @ escapes consistently. Represent brackets with @{ and @}
1458 rather than @<:@ and @:>@, since this works a bit better with dumb
1459 editors like vi. Represent @ with @@, since @ is now consistently
1460 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1461 __ofile__, to avoid unexpected expansions. Similarly, use @output
1462 rather than #output.
1463
1464 * data/c.m4 (b4_copyright): Omit file name from comment, since
1465 the file name could contain "*/".
1466 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1467 be quoted. All uses changed.
1468
1469 * data/glr.c: Use new @ escapes consistently.
1470 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1471 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1472 Remove, since they couldn't handle arbitrary characters in file
1473 names.
1474 * data/lalr1.cc: Likewise.
1475 * data/yacc.c: Likewise.
1476
1477 * src/files.c (output_infix): Remove; all uses removed.
1478 * src/files.h: Likewise.
1479
1480 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1481 mishandled funny characters in file names, and anyway it isn't
1482 needed any more.
1483 * data/yacc.c: Likewise.
1484 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1485
1486 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1487 * data/yacc.c: Likewise.
1488
1489 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1490 strings now.
1491 (muscle_init): Quote filename as a C string.
1492 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1493 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1494 * src/output.c (escaped_file_name_output): New function.
1495 (prepare_symbols): Quote tokens for M4.
1496 (prepare): Don't insert output_infix, output_prefix,
1497 output_parser_name, output_header_name; this is now down by scan-skel.
1498 Insert skeleton as a C string.
1499
1500 * src/output.c (user_actions_output, symbol_destructors_output,
1501 symbol_printers_output): Quote filenames for C and M4.
1502 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1503
1504 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1505 escapes other than \\ and \'; this simplifies the code.
1506 (<SC_STRING>): Likewise, for \\ and \".
1507 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1508 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1509 Use new escapes @{ and @} for [ and ].
1510
1511 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1512 them with auto vars.
1513 Switch to new escape scheme, where @ is the escape character uniformly.
1514 Abort if a stray escape character is found. Avoid unbounded input
1515 buffer when parsing non-escaped text.
1516
1517 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1518 __oline__, #output, $@, and @{ do not have unintended meanings.
1519
1520 2002-11-09 Paul Eggert <eggert@twinsun.com>
1521
1522 Fix the test failure due to GCC warnings described in
1523 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1524 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1525 evaluate to 0 if it's impossible for NINF to be in the respective
1526 table.
1527 (yygetLRActions, yyrecoverParseError): Use them.
1528
1529 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1530 counted in the token inserted at end of file. Now takes
1531 location_t *, not location_t, so that the location can be
1532 adjusted. All uses changed.
1533
1534 * tests/regression.at (Invalid inputs): Adjust wording in
1535 diagnostic to match the new behavior.
1536
1537 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1538 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1539 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1540 abort ();'. This reduces the runtime of the "Many lookaheads"
1541 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1542 GCC 3.2.
1543
1544 2002-11-07 Paul Eggert <eggert@twinsun.com>
1545
1546 * src/parse-gram.y (CHARACTER): Remove unused token.
1547 All uses removed.
1548
1549 * src/scan-gram.l: Remove stack option. We no longer use the
1550 stack, since the stack was never deeper than 1; instead, use the
1551 new auto var c_context to record the stacked value.
1552
1553 Remove nounput option. At an unexpected end of file, we now unput
1554 the minimal input necessary to end cleanly; this simplifies the
1555 code.
1556
1557 Avoid unbounded token sizes where this is easy.
1558
1559 (unexpected_end_of_file): New function.
1560 Use it to systematize the error message on unexpected EOF.
1561 (last-string): Now auto, not static.
1562 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1563 (scanner_last_string_free): Remove; not used.
1564 (percent_percent_count): Move decl to just before use.
1565 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1566 not the (never otherwised-used) CHARACTER.
1567
1568 2002-11-07 Akim Demaille <akim@epita.fr>
1569
1570 Let yyerror always receive the msg as last argument, so that
1571 yyerror can be variadic.
1572
1573 * data/yacc.c (b4_yyerror_args): New.
1574 Use it when calling yyerror.
1575 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1576 Use it when calling yyerror.
1577 * doc/bison.texinfo (Error Reporting): Adjust.
1578 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1579 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1580
1581 2002-11-06 Akim Demaille <akim@epita.fr>
1582
1583 #line should have quoted strings.
1584 Ideally, this should be done by m4_quotearg.
1585
1586 * src/scan-skel.l: Include quotearg.h.
1587 Quote __ofile__.
1588 * src/output.c (symbol_printers_output)
1589 (symbol_destructors_output): Quote the file name.
1590
1591 2002-11-06 Akim Demaille <akim@epita.fr>
1592
1593 * tests/regression.at (Invalid inputs): Adjust to the recent
1594 messages.
1595
1596 2002-11-06 Akim Demaille <akim@epita.fr>
1597
1598 Restore --no-lines.
1599 Reported by Jim Kent.
1600
1601 * data/c.m4 (b4_syncline): New.
1602 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1603 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1604 * src/output.c (user_actions_output): Likewise.
1605 (prepare): Define 'b4_synclines_flag'.
1606 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1607
1608 2002-11-06 Akim Demaille <akim@epita.fr>
1609
1610 * src/main.c (main): Free `infile'.
1611 * src/scan-gram.l (handle_syncline): New.
1612 Recognize `#line'.
1613 * src/output.c (user_actions_output, symbol_destructors_output)
1614 (symbol_printers_output): Use the location's file name, not
1615 infile.
1616 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1617
1618 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1619
1620 * src/tables.c (matching_state): Don't allow states to match if
1621 either has GLR conflict entries.
1622
1623 2002-11-05 Paul Eggert <eggert@twinsun.com>
1624
1625 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1626 "integer out of range" rather than "invalid value".
1627 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1628 accordingly.
1629
1630 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1631 Also, remove one static variable in the scanner.
1632
1633 * src/scan-gram.l (braces_level): Now auto, not static.
1634 Initialize to zero if the compiler is being picky.
1635 (INITIAL): Clear braces_level instead of incrementing it.
1636 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1637 as POSIX 1003.1-2001 requires.
1638 * src/system.h (IF_LINT): New macro, taken from coreutils.
1639 * configure.ac: Define "lint" if --enable-gcc-warnings.
1640
1641 2002-11-05 Akim Demaille <akim@epita.fr>
1642
1643 * src/scan-gram.l: When it starts with `%', complain about the
1644 whole directive, not just that `invalid character: %'.
1645
1646 2002-11-04 Akim Demaille <akim@epita.fr>
1647
1648 * Makefile.maint: Update from Autoconf.
1649 (update, cvs-update, po-update, do-po-update): New.
1650
1651 2002-11-04 Akim Demaille <akim@epita.fr>
1652
1653 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1654 and yyerror.
1655 Have yyerror `use' its arguments.
1656 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1657 returns true when location & yacc & pure & parse-param.
1658 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1659
1660 2002-11-04 Akim Demaille <akim@epita.fr>
1661
1662 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1663 clashes.
1664 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1665 font-lock-mode.
1666 Use complain_at.
1667 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1668 slot 0.
1669
1670 2002-11-03 Paul Eggert <eggert@twinsun.com>
1671
1672 * src/reader.c (get_merge_function, grammar_current_rule_check):
1673 Use consistent diagnostics for reporting type name clashes.
1674 Quote the types with <>, for consistency with Yacc.
1675 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1676
1677 2002-11-03 Akim Demaille <akim@epita.fr>
1678
1679 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1680 New.
1681 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1682 (b4_parse_param): Remove.
1683 Use b4_identification.
1684 Propagate b4_pure_args where needed to pass them to yyerror.
1685 * data/glr.m4 (b4_parse_param): Remove.
1686 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1687 (b4_lpure_formals): New.
1688 Use b4_identification.
1689 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1690 b4_user_formals and b4_user_args.
1691 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1692 (yyreportAmbiguity): When using a pure parser, also need
1693 the location, and the parse-params.
1694 Adjust callers.
1695 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1696 When using a pure parser, also need the parse-params.
1697 Adjust callers.
1698 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1699 (%pure-parser + %parse-param) LALR and GLR parsers.
1700 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1701 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1702 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1703 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1704 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1705 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1706 * doc/bison.texinfo: Untabify the whole file.
1707 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1708 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1709 (Error Reporting): Adjust to these new directives.
1710 Document %error-verbose, deprecate YYERROR_VERBOSE.
1711
1712 2002-11-03 Akim Demaille <akim@epita.fr>
1713
1714 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1715 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1716 command line options.
1717 * tests/cxx-type.at: Formatting changes.
1718
1719 2002-11-03 Paul Eggert <eggert@twinsun.com>
1720
1721 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1722 to count columns correctly, and to check for invalid inputs.
1723
1724 Use mbsnwidth to count columns correctly. Account for tabs, too.
1725 Include mbswidth.h.
1726 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1727 (extend_location): New function.
1728 (YY_LINES): Remove.
1729
1730 Handle CRLF in C code rather than in Lex code.
1731 (YY_INPUT): New macro.
1732 (no_cr_read): New function.
1733
1734 Scan UCNs, even though we don't fully handle them yet.
1735 (convert_ucn_to_byte): New function.
1736
1737 Handle backslash-newline correctly in C code.
1738 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1739 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1740 all uses changed.
1741 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1742 Use {splice} wherever C allows backslash-newline.
1743 YY_STEP after space, newline, vertical-tab.
1744 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1745
1746 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1747
1748 ({int}, handle_action_dollar, handle_action_at): Check for integer
1749 overflow.
1750
1751 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1752
1753 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1754 as well as \000. Check for UCHAR_MAX, not 255.
1755 Allow \x with an arbitrary positive number of digits, as in C.
1756 Check for overflow here.
1757 Allow \? and UCNs, for compatibility with C.
1758
1759 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1760 with quote slot used by complain_at.
1761
1762 * tests/input.at: Add tests for backslash-newline, m4 quotes
1763 in symbols, long literals, and funny escapes in strings.
1764
1765 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1766 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1767 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1768 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1769 * m4/mbswidth.m4: New file, from GNU coreutils.
1770
1771 * doc/bison.texinfo (Grammar Outline): Document // comments.
1772 (Symbols): Document that trigraphs have no special meaning in Bison,
1773 nor is backslash-newline allowed.
1774 (Actions): Document that trigraphs have no special meaning.
1775
1776 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1777 no longer used.
1778
1779 2002-11-02 Paul Eggert <eggert@twinsun.com>
1780
1781 * src/reader.c: Don't include quote.h; not needed.
1782 (get_merge_function): Reword warning to be consistent with
1783 type clash diagnostic in grammar_current_rule_check.
1784
1785 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1786 bug in trigraph handling.
1787
1788 * src/output.c (prepare_symbols): When printing token names,
1789 escape "[" as "@<:@" and likewise for "]".
1790
1791 * src/system.h (errno): Remove declaration, as we are now
1792 assuming C89 or better, and C89 guarantees errno.
1793
1794 2002-10-30 Paul Eggert <eggert@twinsun.com>
1795
1796 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1797 Check for close failures.
1798 * src/files.h (xfclose): Return void, not int, since it always
1799 returned zero.
1800 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1801 indicates one.
1802 * src/output.c (output_skeleton): Use xfclose rather than fclose
1803 and ferror. xfclose now checks ferror.
1804
1805 * data/glr.c (YYLEFTMOST_STATE): Remove.
1806 (yyreportTree): Use a stack-based leftmost state. This avoids
1807 our continuing battles with bogus warnings about initializers.
1808
1809 2002-10-30 Akim Demaille <akim@epita.fr>
1810
1811 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1812 #if.
1813
1814 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1815
1816 * tests/glr-regr1.at: New test for reported regressions.
1817 * tests/testsuite.at: Add glr-regr1.at test.
1818 * tests/Makefile.am: Add glr-regr1.at test.
1819
1820 2002-10-24 Paul Eggert <eggert@twinsun.com>
1821
1822 Version 1.75a.
1823
1824 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1825 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1826 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1827 Don't assume strdup exists; POSIX says its an XSI extension.
1828 Check for buffer overflow on input.
1829
1830 2002-10-24 Akim Demaille <akim@epita.fr>
1831
1832 * src/output.c (output_skeleton): Don't disable M4sugar comments
1833 too soon: it results in comments being expanded.
1834 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1835 first output.
1836
1837 2002-10-24 Akim Demaille <akim@epita.fr>
1838
1839 * data/yacc.c (m4_int_type): New.
1840 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1841 char' as only yacc.c wants K&R portability.
1842 * data/glr.c (yysigned_char): Remove.
1843 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1844 Reported by Quoc Peyrot.
1845
1846 2002-10-23 Paul Eggert <eggert@twinsun.com>
1847
1848 * src/main.c (main): With --trace=time, report times even if a
1849 non-fatal error occurs. Formerly, the times were reported in some
1850 such cases but not in others.
1851 * src/reader.c (reader): Just return if a complaint has been issued,
1852 instead of exiting, so that 'main' can report times.
1853
1854 2002-10-22 Akim Demaille <akim@epita.fr>
1855
1856 * src/system.h: Include sys/types.
1857 Reported by Bert Deknuydt.
1858
1859 2002-10-23 Paul Eggert <eggert@twinsun.com>
1860
1861 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1862 Suggested by Art Haas.
1863
1864 2002-10-22 Paul Eggert <eggert@twinsun.com>
1865
1866 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1867 decl; not needed any more.
1868 * src/main.c (main): Use return to exit, undoing yesterday's change.
1869 The last OS that we could find where this wouldn't work is
1870 SunOS 3.5, and that's too old to worry about now.
1871
1872 * data/glr.c (struct yyltype): Define members even when not
1873 doing locations. This is more consistent with yacc.c, and it
1874 works around the following bug reports:
1875 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
1876 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
1877
1878 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1879 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1880 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1881
1882 2002-10-22 Akim Demaille <akim@epita.fr>
1883
1884 * data/README: New.
1885
1886 2002-10-21 Paul Eggert <eggert@twinsun.com>
1887
1888 Be consistent about 'bool'; the old code used an enum in one
1889 module and an int in another, and this violates the C standard.
1890 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1891 * configure.ac (AC_HEADER_STDBOOL): Add.
1892 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1893 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1894 * src/symtab.c (hash_compare_symbol_t): Likewise.
1895 * src/system.h (bool, false, true): Use a definition consistent
1896 with ../lib/hash.c. All uses changed.
1897
1898 * src/complain.c (warning_issued): Renamed from warn_message_count,
1899 so that we needn't worry about integer overflow (!).
1900 Now of type bool. All uses changed.
1901 (complaint_issued): Renamed from complain_message_count; likewise.
1902
1903 * src/main.c (main): Use exit to exit with failure.
1904
1905 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
1906 rather than 1 and 0.
1907 * src/main.c (main): Likewise.
1908 * src/getargs.c (getargs): Likewise.
1909 * src/reader.c (reader): Likewise.
1910
1911 * src/getarg.c (getargs): Remove duplicate code for
1912 "Try `bison --help'".
1913
1914 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
1915 What was that "2" for?
1916
1917 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
1918 * src/getargs.c (usage): Likewise.
1919
1920 * src/getargs.c (getargs): When there are too few operands, report
1921 the last one. When there are too many, report the first extra
1922 one. This is how diffutils does it.
1923
1924 2002-10-20 Paul Eggert <eggert@twinsun.com>
1925
1926 Remove K&R vestiges.
1927 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
1928 * src/complain.c (VA_START): Remove. Assume prototypes.
1929 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
1930 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
1931 fatal): Assume prototypes.
1932 * src/complain.h: Assume prototypes.
1933 * src/system.h (PARAMS): Remove.
1934 Include <limits.h> unconditionally, since it's guaranteeed even
1935 for a freestanding C89 compiler.
1936 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
1937 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
1938
1939 2002-10-20 Akim Demaille <akim@epita.fr>
1940
1941 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
1942 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
1943 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
1944 (yyresolveStates, yyresolveAction, yyresolveStack)
1945 (yyprocessOneStack): Use them.
1946 (yy_reduce_print): New.
1947 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
1948
1949 2002-10-20 Akim Demaille <akim@epita.fr>
1950
1951 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
1952 arguments and output `void'.
1953 (b4_c_function): Rename as...
1954 (b4_c_function_def): this.
1955 (b4_c_function_decl, b4_c_ansi_function_def)
1956 (b4_c_ansi_function_decl): New.
1957 Change the interpretation of the arguments: before `int, foo', now
1958 `int foo, foo'.
1959 * data/yacc.c (yyparse): Prototype and define thanks to these.
1960 Adjust b4_c_function_def uses.
1961 * data/glr.c (yyparse): Likewise, but ANSI only.
1962
1963 2002-10-20 Akim Demaille <akim@epita.fr>
1964
1965 * src/output.c (prepare): Move the definition of `tokens_number',
1966 `nterms_number', `undef_token_number', `user_token_number_max'
1967 to...
1968 (prepare_tokens): Here.
1969 (prepare_tokens): Rename as...
1970 (prepare_symbols): this.
1971 (prepare): Move the definition of `rules_number' to...
1972 (prepare_rules): here.
1973 (prepare): Move the definition of `last', `final_state_number',
1974 `states_number' to...
1975 (prepare_states): here.
1976 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
1977
1978 2002-10-20 Akim Demaille <akim@epita.fr>
1979
1980 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1981
1982 2002-10-20 Akim Demaille <akim@epita.fr>
1983
1984 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
1985 * data/c.m4: here.
1986
1987 2002-10-20 Akim Demaille <akim@epita.fr>
1988
1989 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
1990 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
1991 `pair'.
1992 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
1993 `name' to...
1994 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
1995 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
1996 These.
1997
1998 2002-10-19 Paul Eggert <eggert@twinsun.com>
1999
2000 Do not create a temporary file, as that involves security and
2001 cleanup headaches. Instead, use a pair of pipes.
2002 Derived from a suggestion by Florian Krohm.
2003 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2004 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2005 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2006 (BISON_PREREQ_SUBPIPE): Add.
2007 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2008 Add subpipe.h, subpipe.c.
2009 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2010 * po/POTFILES.in: Add lib/subpipe.c.
2011 * src/output.c: Include "subpipe.h".
2012 (m4_invoke): Remove decl.
2013 (scan_skel): New decl.
2014 (output_skeleton): Use pipe rather than temporary file for m4 input.
2015 Check that m4sugar.m4 is readable, to avoid deadlock.
2016 Check for pipe I/O error.
2017 * src/scan-skel.l (readpipe): Remove decl.
2018 (scan_skel): New function, to be used in place of m4_invoke.
2019 Read from stream rather than file.
2020
2021 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2022 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2023 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2024 this generates a more-accurate value anyway.
2025
2026 * lib/timevar.c (timervar_accumulate): Rename locals to
2027 avoid confusion with similarly-named more-global.
2028 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2029
2030 * src/output.c (prepare): Use xstrdup to convert char const *
2031 to char *, to avoid GCC warning.
2032
2033 2002-10-19 Akim Demaille <akim@epita.fr>
2034
2035 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2036 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2037 Use them to have `calc.y' ready for %pure-parser.
2038 * data/yacc.c (YYLEX): Pass a yylex return type to
2039 b4_c_function_call.
2040
2041 2002-10-19 Akim Demaille <akim@epita.fr>
2042
2043 Prototype support of %lex-param and %parse-param.
2044
2045 * src/parse-gram.y: Add the definition of the %lex-param and
2046 %parse-param tokens, plus their rules.
2047 Drop the `_' version of %glr-parser.
2048 Add the "," token.
2049 * src/scan-gram.l (INITIAL): Scan them.
2050 * src/muscle_tab.c: Comment changes.
2051 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2052 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2053 (muscle_entry_s): The `value' member is no longer const.
2054 Adjust all dependencies.
2055 * src/muscle_tab.c (muscle_init): Adjust: use
2056 MUSCLE_INSERT_STRING.
2057 Initialize the obstack earlier.
2058 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2059 (muscle_pair_list_grow): New.
2060 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2061 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2062 * tests/calc.at: Use %locations, not --locations.
2063 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2064
2065 2002-10-19 Akim Demaille <akim@epita.fr>
2066
2067 * src/getargs.c (usage): Take status as argument and exit
2068 accordingly.
2069 Report the traditional `Try ... --help' message when status != 0.
2070 (usage, version): Don't take a FILE * as arg, it is pointless.
2071 (getargs): When there is an incorrect number of arguments, make it
2072 an error, and report it GNUlically thanks to `usage ()'.
2073
2074 2002-10-18 Paul Eggert <eggert@twinsun.com>
2075
2076 * data/glr.c (yyreportParseError): Don't assume that sprintf
2077 yields the length of the printed string, as this is not true
2078 on SunOS 4.1.4. Reported by Peter Klein.
2079
2080 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2081 * tests/conflicts.at (%nonassoc and eof): Likewise.
2082 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2083
2084 2002-10-17 Akim Demaille <akim@epita.fr>
2085
2086 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2087 * src/getargs.c (trace_types, trace_args): Adjust.
2088 * src/reader.c (grammar_current_rule_prec_set)
2089 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2090 Standardize error messages.
2091 And s/@prec/%prec/!
2092 (reader): Use trace_flag to enable scanner/parser debugging,
2093 instead of an adhoc scheme.
2094 * src/scan-gram.l: Remove trailing debugging code.
2095
2096 2002-10-16 Paul Eggert <eggert@twinsun.com>
2097
2098 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2099 MUSCLE_TAB_H.
2100
2101 * NEWS: Officially drop support for building Bison with K&R C,
2102 since it didn't work anyway and it's not worth worrying about.
2103 * Makefile.maint (wget_files): Remove ansi2knr.c.
2104 (ansi2knr.c-url_prefix): Remove.
2105 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2106 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2107 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2108
2109 2002-10-15 Paul Eggert <eggert@twinsun.com>
2110
2111 Stop using the "enum_" trick for K&R-style function definitions;
2112 it confused me, and I was the author! Instead, assume that people
2113 who want to use K&R C compilers (when using these modules in GCC,
2114 perhaps?) will run ansi2knr.
2115
2116 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2117 All uses of "enum_" changed to "enum ".
2118 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2119 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2120
2121 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2122 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2123 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2124 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2125 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2126 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2127 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2128 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2129 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2130 Use function prototypes; this removes the need for declaring
2131 static functions simply to provide their prototypes.
2132 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2133 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2134 bitset_count_, bitset_create, bitset_dump, bitset_first,
2135 bitset_free, bitset_init, bitset_last, bitset_next,
2136 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2137 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2138 bitset_print, bitset_release_memory, bitset_toggle_,
2139 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2140 debug_bitset): Likewise.
2141 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2142 * lib/bitset_stats.c (bitset_log_histogram_print,
2143 bitset_percent_histogram_print, bitset_stats_and,
2144 bitset_stats_and_cmp, bitset_stats_and_or,
2145 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2146 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2147 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2148 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2149 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2150 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2151 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2152 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2153 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2154 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2155 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2156 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2157 bitset_stats_zero): Likewise.
2158 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2159 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2160 bitsetv_dump, debug_bitsetv): Likewise.
2161 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2162 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2163 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2164 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2165 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2166 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2167 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2168 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2169 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2170 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2171 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2172 Likewise.
2173 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2174 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2175 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2176 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2177 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2178 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2179 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2180 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2181 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2182 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2183 lbitset_xor_cmp, lbitset_zero): Likewise.
2184
2185 2002-10-14 Akim Demaille <akim@epita.fr>
2186
2187 Version 1.75.
2188
2189 2002-10-14 Akim Demaille <akim@epita.fr>
2190
2191 * tests/Makefile.am (maintainer-check-posix): New.
2192
2193 2002-10-14 Akim Demaille <akim@epita.fr>
2194
2195 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2196 member.
2197
2198 2002-10-14 Akim Demaille <akim@epita.fr>
2199
2200 * src/tables.c (table_ninf_remap): base -> tab.
2201 Reported by Matt Rosing.
2202
2203 2002-10-14 Paul Eggert <eggert@twinsun.com>
2204
2205 * tests/action.at, tests/calc.at, tests/conflicts.at,
2206 tests/cxx-type.at, tests/headers.at, tests/input.at,
2207 tests/regression.at, tests/synclines.at, tests/torture.at:
2208 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2209 so that the tests still work even if POSIXLY_CORRECT is set.
2210 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2211
2212 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2213 for portability to K&R hosts. Fix typo: signed char is guaranteed
2214 only to 127, not to 128.
2215 * data/glr.c (yysigned_char): New type.
2216 * data/yacc.c (yysigned_char): Likewise.
2217 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2218
2219 2002-10-13 Paul Eggert <eggert@twinsun.com>
2220
2221 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2222 true due to limited range of data type" warning from GCC.
2223
2224 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2225 by wrapping enum yytokentype's definition inside #ifndef
2226 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2227
2228 2002-10-13 Akim Demaille <akim@epita.fr>
2229
2230 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2231 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2232
2233 2002-10-13 Akim Demaille <akim@epita.fr>
2234
2235 * Makefile.maint: Update from Autoconf 2.54.
2236 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2237
2238 2002-10-13 Akim Demaille <akim@epita.fr>
2239
2240 * src/print.c (print_state): Separate the list of solved conflicts
2241 from the other items.
2242 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2243
2244 2002-10-13 Akim Demaille <akim@epita.fr>
2245
2246 Let nondeterministic skeletons be usable with deterministic
2247 tables.
2248
2249 With the patch, GAWK compiled by GCC without -O2 passes its test
2250 suite using a GLR parser driven by LALR tables. It fails with -O2
2251 because `struct stat' gives two different answers on my machine:
2252 88 (definition of an auto var) and later 96 (memset on this var).
2253 Hence the stack is badly corrumpted. The headers inclusion is to
2254 blame: if I move the awk.h inclusion before GLR's system header
2255 inclusion, the two struct stat have the same size.
2256
2257 * src/tables.c (pack_table): Always create conflict_table.
2258 (token_actions): Always create conflict_list.
2259 * data/glr.c (YYFLAG): Remove, unused.
2260
2261 2002-10-13 Akim Demaille <akim@epita.fr>
2262
2263 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2264 (O0FLAGS): New.
2265 (VALGRIND, GXX): New.
2266 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2267 * tests/bison.in: Run $PREBISON a pre-command.
2268 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2269 (maintainer-check-g++): New.
2270 * Makefile.am (maintainer-check): New.
2271
2272 2002-10-13 Akim Demaille <akim@epita.fr>
2273
2274 * data/glr.c: Formatting changes.
2275 Tweak some trace messages to match yacc.c's.
2276
2277 2002-10-13 Akim Demaille <akim@epita.fr>
2278
2279 GLR parsers sometimes raise parse errors instead of performing the
2280 default reduction.
2281 Reported by Charles-Henry de Boysson.
2282
2283 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2284 check the length of the traces when %glr.
2285 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2286 GLR's traces.
2287 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2288 Test GLR parsers.
2289 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2290 (yyltype): Remove the yy prefix from the member names.
2291 (yytable): Complete its comment.
2292 (yygetLRActions): Map error action number from YYTABLE from
2293 YYTABLE_NINF to 0.
2294 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2295 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2296 not satisfying as we could compare an YYACTION computed from
2297 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2298 only value for error actions.
2299 (yyreportParseError): In verbose parse error messages, don't issue
2300 `error' in the list of expected tokens.
2301 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2302 next action to perform to match glr.c's decoding.
2303 (yytable): Complete its comment.
2304
2305 2002-10-13 Paul Eggert <eggert@twinsun.com>
2306
2307 Fix problem reported by Henrik Grubbstroem in
2308 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2309 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2310 because the Bison parser reads the second action before reducing
2311 the first one.
2312 * src/scan-gram.l (rule_length): New static var.
2313 Use it to keep track of the rule length in the scanner, since
2314 we can't expect the parser to be in lock-step sync with the scanner.
2315 (handle_action_dollar, handle_action_at): Use this var.
2316 * tests/actions.at (Exotic Dollars): Test for the problem.
2317
2318 2002-10-12 Paul Eggert <eggert@twinsun.com>
2319
2320 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2321 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2322 Include <sys/time.h> when checking for clock_t and struct tms.
2323 Use same include order as source.
2324 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2325 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2326
2327 * lib/timevar.c: Update copyright date and clarify comments.
2328 (get_time) [IN_GCC]: Keep the GCC version for reference.
2329
2330 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2331 GCC version as of today, then merge Bison's changes.
2332 Change "GCC" to "Bison" in copyright notice. timevar.def's
2333 author is Akim, so change that too.
2334
2335 * src/reader.c (grammar_current_rule_check):
2336 Don't worry about the default action if $$ is untyped.
2337 Prevents bogus warnings reported by Jim Gifford in
2338 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2339
2340 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2341 * data/glr.c, data/lalr1.cc, data/yacc.c:
2342 Output token definitions before the first part of user declarations.
2343 Fixes compatibility problem reported by Jim Gifford for kbd in
2344 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2345
2346 2002-10-11 Paul Eggert <eggert@twinsun.com>
2347
2348 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2349 (yyparse): here. This undoes some of the 2002-07-25 change.
2350 Compatibility problem reported by Ralf S. Engelschall with
2351 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2352
2353 2002-10-11 Akim Demaille <akim@epita.fr>
2354
2355 * tests/regression.at Characters Escapes): New.
2356 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2357 characters.
2358 Reported by Jan Nieuwenhuizen.
2359
2360 2002-10-11 Akim Demaille <akim@epita.fr>
2361
2362 * po/id.po: New.
2363
2364 2002-10-10 Paul Eggert <eggert@twinsun.com>
2365
2366 Portability fixes for bitsets; this also avoids several GCC
2367 warnings.
2368
2369 * lib/abitset.c: Include <stddef.h>, for offsetof.
2370 * lib/lbitset.c: Likewise.
2371
2372 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2373 properly for vectors of objects. Do not assume that adding a
2374 header size to a multiple of a word size yields a value that is
2375 properly aligned for the whole union.
2376 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2377
2378 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2379 unique names for structures.
2380 * lib/ebitset.c (ebitset_bytes): Likewise.
2381 * lib/lbitset.c (lbitset_bytes): Likewise.
2382
2383 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2384 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2385 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2386 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2387 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2388 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2389 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2390 to improve the type-checking that GCC can do.
2391 * lib/bitset.c (bitset_op4_cmp): Likewise.
2392 * lib/bitset_stats.c (bitset_stats_count,
2393 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2394 bitset_stats_copy, bitset_stats_disjoint_p,
2395 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2396 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2397 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2398 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2399 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2400 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2401 bitset_stats_or_and_cmp): Likewise.
2402 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2403 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2404 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2405 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2406
2407 * lib/abitset.h: Include bitset.h, not bbitset.h.
2408 * lib/ebitset.h: Likewise.
2409 * lib/lbitset.h: Likewise.
2410
2411 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2412 All instances of parameters of type enum bitset_opts are now of
2413 type enum_bitset_opts, to conform to the C Standard, and similarly
2414 for enum_bitset_type.
2415 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2416 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2417
2418 Do not use "struct bitset_struct" to mean different things in
2419 different modules. Not only is this confusing, it violates
2420 the C Standard, which requires that structure types in different
2421 modules must be compatible if one is to be passed to the other.
2422 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2423 All instances of "struct bitset_struct *" replaced with "bitset".
2424 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2425 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2426 struct lbitset_struct, struct bitset_stats_struct): New types.
2427 All uses of struct bitset_struct changed to union bitset_union,
2428 etc.
2429 * lib/abitset.c (struct abitset_struct, abitset,
2430 struct bitset_struct): Remove.
2431 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2432 struct bitset_struct): Remove.
2433 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2434 bitset_struct): Remove.
2435 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2436 Likewise.
2437
2438 Do not call a function of type T using a call that assumes the
2439 function is of a different type U. Standard C requires that a
2440 function must be called with a type that is compatible with its
2441 definition.
2442 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2443 New decls.
2444 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2445 New functions.
2446 * lib/ebitset.c (PFV): Remove.
2447 * lib/lbitset.c (PFV): Likewise.
2448 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2449 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2450 decls.
2451 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2452 (ebitset_vtable): Use them.
2453 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2454 lbitset_xor): New functions.
2455 (lbitset_vtable): Use them.
2456
2457 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2458 Declare.
2459
2460 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2461 GCC warning.
2462 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2463 Use offsetof, for simplicity.
2464
2465 2002-10-06 Paul Eggert <eggert@twinsun.com>
2466
2467 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2468 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2469 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2470 which was inadvertently undone by the 2002-09-30 patch.
2471 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2472 the same width as int.
2473
2474 2002-10-04 Paul Eggert <eggert@twinsun.com>
2475
2476 Version 1.50.
2477
2478 * configure.ac (AC_INIT), NEWS: Increment version number.
2479
2480 * doc/bison.texinfo: Minor spelling, grammar, and white space
2481 fixes.
2482 (Symbols): Mention that any negative value returned from yylex
2483 signifies end-of-input. Warn about negative chars. Mention
2484 the portable Standard C character set.
2485
2486 The GNU coding standard says CFLAGS and YFLAGS are reserved
2487 for the installer to set.
2488 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2489 * src/Makefile.am (AM_CFLAGS): Likewise.
2490 (AM_YFLAGS): Renamed from YFLAGS.
2491
2492 Fix some MAX and MIN problems.
2493 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2494 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2495 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2496 * src/reader.c (reader): Use it.
2497
2498 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2499 POSIX 1003.1-2001 has removed fgrep.
2500
2501 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2502
2503 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2504 interpreted as signed.
2505 * lib/ebitset.c (ebitset_list): Fix bug.
2506
2507 2002-10-01 Paul Eggert <eggert@twinsun.com>
2508
2509 More fixes for 64-bit hosts and large bitsets.
2510
2511 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2512 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2513 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2514 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2515 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2516 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2517 bitset_count_): Likewise.
2518 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2519 bitset_first, bitset_last): Likewise.
2520 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2521 bitset_stats_list_reverse, bitset_stats_size,
2522 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2523 Likewise.
2524 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2525 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2526 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2527 bitsetv_reflexive_transitive_closure): Likewise.
2528 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2529 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2530 Likewise.
2531 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2532 Likewise.
2533
2534 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2535 Use size_t, not unsigned int, to count bytes.
2536 * lib/abitset.h (abitset_bytes): Likewise.
2537 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2538 Likewise.
2539 * lib/bitset.h (bitset_bytes): Likewise.
2540 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2541 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2542 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2543 * lib/ebitset.c (ebitset_bytes): Likewise.
2544 * lib/ebitset.h (ebitset_bytes): Likewise.
2545 * lib/lbitset.c (lbitset_bytes): Likewise.
2546 * lib/lbitset.h (lbitset_bytes): Likewise.
2547
2548 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2549 abitset_subset_p, abitset_disjoint_p, abitset_and,
2550 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2551 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2552 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2553 abitset_or_and, abitset_or_and_cmp):
2554 Use bitset_windex instead of unsigned int.
2555 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2556 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2557 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2558 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2559 Likewise.
2560 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2561
2562 * lib/bitset.c (bitset_print):
2563 Use proper printf formats for widths of integer types.
2564 * lib/bitset_stats.c (bitset_percent_histogram_print,
2565 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2566 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2567 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2568 * lib/lbitset.c (lbitset_bytes): Likewise.
2569
2570 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2571 BITSET_SIZE_MAX): New macros.
2572 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2573 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2574 to BITSET_WINDEX_MAX.
2575
2576 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2577 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2578 since we now return the bitset_bindex type (not int).
2579
2580 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2581 when computing sizes.
2582 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2583
2584 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2585 and avoid cast to unsigned.
2586
2587 2002-09-30 Akim Demaille <akim@epita.fr>
2588
2589 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2590 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2591 Updates from Michael Hayes.
2592
2593 2002-09-30 Art Haas <ahaas@neosoft.com>
2594
2595 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2596 invocations.
2597 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2598 defined.
2599
2600 2002-09-27 Akim Demaille <akim@epita.fr>
2601
2602 Version 1.49c.
2603
2604 2002-09-27 Akim Demaille <akim@epita.fr>
2605
2606 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2607 (Because of AC_LIBSOURCE).
2608
2609 2002-09-27 Akim Demaille <akim@epita.fr>
2610
2611 Playing with Autoscan.
2612
2613 * configure.ac: Remove the old LIBOBJ tweaks.
2614 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2615 * lib/strrchr.c: New.
2616 * lib/strtol.c: New, from the Coreutils 4.5.1.
2617
2618 2002-09-27 Akim Demaille <akim@epita.fr>
2619
2620 Playing with Autoscan.
2621
2622 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2623 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2624 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2625 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2626 Coreutils 4.5.1.
2627
2628 2002-09-24 Akim Demaille <akim@epita.fr>
2629
2630 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2631 (Frequently Asked Questions, Parser Stack Overflow): New.
2632
2633 2002-09-13 Akim Demaille <akim@epita.fr>
2634
2635 Playing with autoscan.
2636
2637 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2638 * src/files.c (skeleton_find): Remove, unused.
2639 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2640 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2641
2642 2002-09-13 Akim Demaille <akim@epita.fr>
2643
2644 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2645 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2646
2647 2002-09-13 Akim Demaille <akim@epita.fr>
2648
2649 * configure.ac: Require 2.54.
2650 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2651 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2652 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2653 Remove, provided by Autoconf macros.
2654
2655 2002-09-12 Akim Demaille <akim@epita.fr>
2656
2657 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2658
2659 2002-09-12 Akim Demaille <akim@epita.fr>
2660
2661 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2662 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2663 Reported by Martin Mokrejs.
2664
2665 2002-09-10 Akim Demaille <akim@epita.fr>
2666
2667 * src/parse-gram.y: Associate a human readable string to each
2668 token type.
2669 * tests/regression.at (Invalid inputs): Adjust.
2670
2671 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2672
2673 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2674 with an Autoconf-2.5x style configure.ac.
2675
2676 2002-09-06 Paul Eggert <eggert@twinsun.com>
2677
2678 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2679 exception applies only to yacc.c. This is a modification of a
2680 patch originally suggested by Akim Demaille.
2681
2682 2002-09-06 Akim Demaille <akim@epita.fr>
2683
2684 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2685 here to...
2686 * data/yacc.c: here.
2687
2688 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2689 LocationType.
2690 (b4_ltype): Default to yy::Location from location.hh.
2691
2692 2002-09-04 Jim Meyering <jim@meyering.net>
2693
2694 * data/yacc.c: Guard the declaration of yytoknum also with
2695 `#ifdef YYPRINT', so it is declared only when used.
2696
2697 2002-09-04 Akim Demaille <akim@epita.fr>
2698
2699 * configure.in: Rename as...
2700 * configure.ac: this.
2701 Bump to 1.49c.
2702
2703 2002-09-04 Akim Demaille <akim@epita.fr>
2704
2705 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2706 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2707 translate maintainer only messages.
2708
2709 2002-08-12 Paul Eggert <eggert@twinsun.com>
2710
2711 Version 1.49b.
2712
2713 * Makefile.am (SUBDIRS): Remove intl.
2714 (DISTCLEANFILES): Remove.
2715 * NEWS: Mention that GNU M4 is now required. Clarify what is
2716 meant by "larger grammars". Mention the pt_BR translation.
2717 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2718 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2719 Bump version from 0.11.2 to 0.11.5.
2720 (BISON_PREREQ_STAGE): Remove.
2721 (AM_GNU_GETTEXT): Use external gettext.
2722 (AC_OUTPUT): Remove intl/Makefile.
2723
2724 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2725
2726 * data/glr.c: Include string.h, for strlen.
2727 (yyreportParseError): Use size_t for yysize.
2728 (yy_yypstack): No longer nested inside yypstates, as nested
2729 functions are not portable. Do not assume size_t is the
2730 same width as int.
2731 (yypstates): Do not assume that ptrdiff_t is the same width
2732 as int, and similarly for yyposn and YYINDEX.
2733
2734 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2735
2736 * lib/Makefile.am (INCLUDES): Do not include from the intl
2737 directory, which has been removed.
2738 * src/Makefile.am (INCLUDES): Likewise.
2739
2740 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2741 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2742 New vars.
2743
2744 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2745 * tests/Makefile.am (EXTRA_DIST): Likewise.
2746
2747 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2748 Do not assume that bitset_windex is the same width as unsigned.
2749
2750 * lib/abitset.c (abitset_unused_clear): Do not assume that
2751 bitset_word is the same width as int.
2752 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2753 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2754 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2755 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2756 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2757
2758 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2759 portability to one's complement hosts!).
2760 * lib/ebitset.c (ebitset_op1): Likewise.
2761 * lib/lbitset.c (lbitset_op1): Likewise.
2762
2763 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2764 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2765 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2766 Sync with fileutils.
2767 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2768 lib/gettext.h: Sync with diffutils.
2769
2770 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2771 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2772
2773 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2774 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2775 check for void *.
2776
2777 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2778 size_t; the old version tried to do this but casted improperly.
2779 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2780 (bitset_test): Now returns int, not unsigned long.
2781
2782 * lib/bitset_stats.c: Include "gettext.h".
2783 (_): New macro.
2784 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2785 name locals "index", as it generates unnecessary warnings on some
2786 hosts that have an "index" function.
2787
2788 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2789 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2790 they need translation.
2791 * src/LR0.c (state_list_append, new_itemsets, get_state,
2792 append_states, generate_states): Likewise.
2793 * src/assoc.c (assoc_to_string): Likewise.
2794 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2795 * src/gram.c (grammar_dump): Likewise.
2796 * src/injections.c (injections_compute): Likewise.
2797 * src/lalr.c (lookaheads_print): Likewise.
2798 * src/relation.c (relation_transpose): Likewise.
2799 * src/scan-gram.l: Likewise.
2800 * src/tables.c (table_grow, pack_vector): Likewise.
2801
2802 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2803 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2804 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2805 * m4/mbstate_t.m4: Sync with fileutils.
2806 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2807
2808 * po/LINGUAS: Add pt_BR.
2809 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2810 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2811 lib/timevar.c.
2812 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2813 manual recommends.
2814 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2815
2816 * src/complain.c (strerror_r): Remove decl; not needed.
2817 (strerror): Use same pattern as ../lib/error.c.
2818
2819 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2820
2821 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2822
2823 * src/main.c (main): Cast result of bindtextdomain and textdomain
2824 to void, to avoid a GCC warning when --disable-nls is in effect.
2825
2826 * src/scan-gram.l: Use strings rather than escapes when possible,
2827 to minimize the number of warnings from xgettext.
2828 (handle_action_dollar, handle_action_at): Don't use isdigit,
2829 as it mishandles negative chars and it may not work as expected
2830 outside the C locale.
2831
2832 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2833 this is a GCC extension and is not portable to other compilers.
2834
2835 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2836 Do not include <ctype.h>; no longer needed.
2837 Do not include <malloc.h>; no longer needed (and generates
2838 warnings on OpenBSD 3.0).
2839
2840 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2841 it's not portable.
2842
2843 * tests/regression.at: Do not use 'cc -c input.c -o input';
2844 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2845
2846 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2847 exit status as failure, not just exit status 1. Sun C exits
2848 with status 2 sometimes.
2849
2850 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2851 Use it for the two large tests.
2852
2853 2002-08-02 Akim Demaille <akim@epita.fr>
2854
2855 * src/conflicts.c (conflicts_output): Don't output rules never
2856 reduced here, since anyway that computation doesn't work.
2857 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2858 (rule_useless_p, rule_never_reduced_p): New.
2859 (grammar_rules_partial_print): Use a filter instead of a range.
2860 Display the title only if needed.
2861 (grammar_rules_print): Adjust.
2862 (grammar_rules_never_reduced_report): New.
2863 * src/tables.c (action_row): Move the computation of rules never
2864 reduced to...
2865 (token_actions): here.
2866 * src/main.c (main): Make the parser before making the report, so
2867 that rules never reduced are computed.
2868 Call grammar_rules_never_reduced_report.
2869 * src/print.c (print_results): Report rules never reduced.
2870 * tests/conflicts.at, tests/reduce.at: Adjust.
2871
2872 2002-08-01 Akim Demaille <akim@epita.fr>
2873
2874 Instead of attaching lookaheads and duplicating the rules being
2875 reduced by a state, attach the lookaheads to the reductions.
2876
2877 * src/state.h (state_t): Remove the `lookaheads',
2878 `lookaheads_rule' member.
2879 (reductions_t): Add a `lookaheads' member.
2880 Use a regular array for the `rules'.
2881 * src/state.c (reductions_new): Initialize the lookaheads member
2882 to 0.
2883 (state_rule_lookaheads_print): Adjust.
2884 * src/state.h, src/state.c (state_reductions_find): New.
2885 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2886 (count_rr_conflicts): Adjust.
2887 * src/lalr.c (LArule): Remove.
2888 (add_lookback_edge): Adjust.
2889 (state_lookaheads_count): New.
2890 (states_lookaheads_initialize): Merge into...
2891 (initialize_LA): this.
2892 (lalr_free): Adjust.
2893 * src/main.c (main): Don't free nullable and derives too early: it
2894 is used by --verbose.
2895 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2896
2897 2002-08-01 Akim Demaille <akim@epita.fr>
2898
2899 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
2900 `rule_number_t**'.
2901 (set_derives, free_derives): Rename as...
2902 (derives_compute, derives_free): this.
2903 Adjust all dependencies.
2904 * src/nullable.c (set_nullable, free_nullable): Rename as...
2905 (nullable_compute, nullable_free): these.
2906 (rule_list_t): Store rule_t *, not rule_number_t.
2907 * src/state.c (state_rule_lookaheads_print): Directly compare rule
2908 pointers, instead of their numbers.
2909 * src/main.c (main): Call nullable_free, and derives_free earlier,
2910 as they were lo longer used.
2911
2912 2002-08-01 Akim Demaille <akim@epita.fr>
2913
2914 * lib/timevar.c (get_time): Include children time.
2915 * src/lalr.h (LA, LArule): Don't export them: used with the
2916 state_t.
2917 * src/lalr.c (LA, LArule): Static.
2918 * src/lalr.h, src/lalr.c (lalr_free): New.
2919 * src/main.c (main): Call it.
2920 * src/tables.c (pack_vector): Check whether loc is >= to the
2921 table_size, not >.
2922 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
2923 (tables_generate): do it, since that's also it which allocates
2924 them.
2925 Don't free LA and LArule, main does.
2926
2927 2002-07-31 Akim Demaille <akim@epita.fr>
2928
2929 Separate parser tables computation and output.
2930
2931 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
2932 (conflict_list, conflict_list_cnt, table, check, table_ninf)
2933 (yydefgoto, yydefact, high): Move to...
2934 * src/tables.h, src/tables.c: here.
2935 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2936 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2937 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
2938 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
2939 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
2940 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
2941 (action_row, save_row, token_actions, save_column, default_goto)
2942 (goto_actions, sort_actions, matching_state, pack_vector)
2943 (table_ninf_remap, pack_table, prepare_actions): Move to...
2944 * src/tables.c: here.
2945 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
2946 * src/output.c (token_actions, output_base, output_conflicts)
2947 (output_check): Merge into...
2948 (prepare_actions): this.
2949 (actions_output): Rename as...
2950 (user_actions_output): this.
2951 * src/main.c (main): Call tables_generate and tables_free.
2952
2953 2002-07-31 Akim Demaille <akim@epita.fr>
2954
2955 Steal GCC's --time-report support.
2956
2957 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
2958 stolen/adjusted from GCC.
2959 * m4/stage.m4: Remove time related checks.
2960 * m4/timevar.m4: New.
2961 * configure.in: Adjust.
2962 * src/system.h: Adjust to using timevar.h.
2963 * src/getargs.h, src/getargs.c: Support trace_time for
2964 --trace=time.
2965 * src/main.c (stage): Remove.
2966 (main): Replace `stage' invocations with timevar calls.
2967 * src/output.c: Insert pertinent timevar calls.
2968
2969 2002-07-31 Akim Demaille <akim@epita.fr>
2970
2971 Let --trace have arguments.
2972
2973 * src/getargs.h (enum trace_e): New.
2974 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
2975 (long_options, short_options): --trace/-T takes an optional
2976 argument.
2977 Change all the uses of trace_flag to reflect the new flags.
2978 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
2979
2980 Strengthen `stage' portability.
2981
2982 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
2983 * configure.in: Use it.
2984 Don't check for malloc.h and sys/times.h.
2985 * src/system.h: Include them when appropriate.
2986 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
2987 times and struct tms are available.
2988
2989 2002-07-30 Akim Demaille <akim@epita.fr>
2990
2991 In verbose parse error message, don't report `error' as an
2992 expected token.
2993 * tests/actions.at (Printers and Destructors): Adjust.
2994 * tests/calc.at (Calculator $1): Adjust.
2995 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
2996 error message, do not report the parser accepts the error token in
2997 that state.
2998
2999 2002-07-30 Akim Demaille <akim@epita.fr>
3000
3001 Normalize conflict related messages.
3002
3003 * src/complain.h, src/complain.c (warn, complain): New.
3004 * src/conflicts.c (conflicts_print): Use them.
3005 (conflict_report_yacc): New, extracted from...
3006 (conflicts_print): here.
3007 * tests/conflicts.at, tests/existing.at: Adjust.
3008
3009 2002-07-30 Akim Demaille <akim@epita.fr>
3010
3011 Report rules which are never reduced by the parser: those hidden
3012 by conflicts.
3013
3014 * src/LR0.c (save_reductions): Don't make the final state too
3015 different: save its reduction (accept) instead of having a state
3016 without any action (no shift or goto, no reduce).
3017 Note: the final state is now a ``regular'' state, i.e., the
3018 parsers now contain `reduce 0' as default reduction.
3019 Nevertheless, since they decide to `accept' when yystate =
3020 final_state, they still will not reduce rule 0.
3021 * src/print.c (print_actions, print_reduction): Adjust.
3022 * src/output.c (action_row): Track reduced rules.
3023 (token_actions): Report rules never reduced.
3024 * tests/conflicts.at, tests/regression.at: Adjust.
3025
3026 2002-07-30 Akim Demaille <akim@epita.fr>
3027
3028 `stage' was accidently included in a previous patch.
3029 Initiate its autoconfiscation.
3030
3031 * configure.in: Look for malloc.h and sys/times.h.
3032 * src/main.c (stage): Adjust.
3033 Report only when trace_flag.
3034
3035 2002-07-29 Akim Demaille <akim@epita.fr>
3036
3037 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3038 state_number_t.
3039 (errs_t): symbol_t*, not symbol_number_t.
3040 (reductions_t): rule_t*, not rule_number_t.
3041 (FOR_EACH_SHIFT): New.
3042 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3043 * src/print.c, src/print_graph.c: Adjust.
3044
3045 2002-07-29 Akim Demaille <akim@epita.fr>
3046
3047 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3048
3049 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3050 (endtoken, accept): these.
3051 * src/reader.c (reader): Set endtoken's default tag to "$end".
3052 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3053 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3054 Adjust.
3055
3056 2002-07-29 Akim Demaille <akim@epita.fr>
3057
3058 * src/reduce.c (reduce_grammar): When the language is empty,
3059 complain about the start symbol, not the axiom.
3060 Use its location.
3061 * tests/reduce.at (Empty Language): New.
3062
3063 2002-07-26 Akim Demaille <akim@epita.fr>
3064
3065 * src/reader.h, src/reader.c (gram_error): ... can't get
3066 yycontrol without making too strong assumptions on the parser
3067 itself.
3068 * src/output.c (prepare_tokens): Use the real 0th value of
3069 token_translations instead of `0'.
3070 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3071 visible here.
3072 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3073 for the time being: %locations ought to provide it to yyerror.
3074
3075 2002-07-25 Akim Demaille <akim@epita.fr>
3076
3077 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3078 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3079 * tests/regression.at (Web2c Actions): Adjust.
3080
3081 2002-07-25 Akim Demaille <akim@epita.fr>
3082
3083 Stop storing rules from 1 to nrules + 1.
3084
3085 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3086 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3087 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3088 Iterate from 0 to nrules.
3089 Use rule_number_as_item_number and item_number_as_rule_number.
3090 Adjust to `derive' now containing possibly 0.
3091 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3092 Handle the `- 1' part in rule numbers from/to item numbers.
3093 * src/conflicts.c (log_resolution): Fix the message which reversed
3094 shift and reduce.
3095 * src/output.c (action_row): Initialize default_rule to -1.
3096 (token_actions): Adjust.
3097 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3098 expected output.
3099 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3100
3101 2002-07-25 Akim Demaille <akim@epita.fr>
3102
3103 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3104 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3105 (b4_c_knr_arg_decl): New.
3106 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3107 yyreport_parse_error.
3108
3109 2002-07-25 Akim Demaille <akim@epita.fr>
3110
3111 * data/yacc.c (yyreport_parse_error): New, extracted from...
3112 (yyparse): here.
3113 (yydestruct, yysymprint): Move above yyparse.
3114 Be K&R compliant.
3115
3116 2002-07-25 Akim Demaille <akim@epita.fr>
3117
3118 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3119 replace...
3120 (b4_sint_type, b4_uint_type): these.
3121 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3122 * tests/regression.at (Web2c Actions): Adjust.
3123
3124 2002-07-25 Akim Demaille <akim@epita.fr>
3125
3126 * src/gram.h (TIEM_NUMBER_MAX): New.
3127 (item_number_of_rule_number, rule_number_of_item_number): Rename
3128 as...
3129 (rule_number_as_item_number, item_number_as_rule_number): these.
3130 Adjust dependencies.
3131 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3132 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3133 (symbol_number_to_vector_number): New.
3134 (order): Of vector_number_t* type.
3135 (base_t, BASE_MAX, BASE_MIN): New.
3136 (froms, tos, width, pos, check): Of base_t type.
3137 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3138 (actrow): Of action_number_t type.
3139 (conflrow): Of unsigned int type.
3140 (table_ninf, base_ninf): New.
3141 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3142 (muscle_insert_int_table, muscle_insert_base_table)
3143 (muscle_insert_rule_number_table): New.
3144 (prepare_tokens): Output `toknum' as int_table.
3145 (action_row): Returns a rule_number_t.
3146 Use ACTION_MIN, not SHRT_MIN.
3147 (token_actions): yydefact is rule_number_t*.
3148 (table_ninf_remap): New.
3149 (pack_table): Use it for `base' and `table'.
3150 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3151 replaced with...
3152 (YYPACT_NINF, YYTABLE_NINF): these.
3153 (yypact, yytable): Compute their types instead of hard-coded
3154 `short'.
3155 * tests/regression.at (Web2c Actions): Adjust.
3156
3157 2002-07-19 Akim Demaille <akim@epita.fr>
3158
3159 * src/scan-gram.l (id): Can start with an underscore.
3160
3161 2002-07-16 Akim Demaille <akim@epita.fr>
3162
3163 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3164 Adjust all former `associativity' dependencies.
3165 * src/symtab.c (symbol_new): Default associativity is `undef', not
3166 `right'.
3167 (symbol_check_alias_consistence): Adjust.
3168
3169 2002-07-09 Akim Demaille <akim@epita.fr>
3170
3171 * doc/bison.texinfo: Properly set the ``header'' part.
3172 Use @dircategory ``GNU programming tools'' as per Texinfo's
3173 documentation.
3174 Use @copying.
3175
3176 2002-07-09 Akim Demaille <akim@epita.fr>
3177
3178 * lib/quotearg.h: Protect against multiple inclusions.
3179 * src/location.h (location_t): Add a `file' member.
3180 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3181 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3182 `error_one_per_line' support.
3183
3184 2002-07-09 Akim Demaille <akim@epita.fr>
3185
3186 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3187 * src/reader.c (lineno): Remove.
3188 Adjust all dependencies.
3189 (get_merge_function): Take a location and use complain_at.
3190 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3191 * tests/regression.at (Invalid inputs, Mixing %token styles):
3192 Adjust.
3193
3194 2002-07-09 Akim Demaille <akim@epita.fr>
3195
3196 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3197 recovery rule, and forbid extensions when --yacc.
3198 (gram_error): Use complain_at.
3199 * src/reader.c (reader): Exit if there were parse errors.
3200
3201 2002-07-09 Akim Demaille <akim@epita.fr>
3202
3203 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3204 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3205 Reported by R Blake <blakers@mac.com>.
3206
3207 2002-07-09 Akim Demaille <akim@epita.fr>
3208
3209 * data/yacc.c: Output the copyright notive in the header.
3210
3211 2002-07-03 Akim Demaille <akim@epita.fr>
3212
3213 * src/output.c (froms, tos): Are state_number_t.
3214 (save_column): sp, sp1, and sp2 are state_number_t.
3215 (prepare): Rename `final' as `final_state_number', `nnts' as
3216 `nterms_number', `nrules' as `rules_number', `nstates' as
3217 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3218 unused.
3219 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3220 * data/lalr1.cc (nsym_): Remove, unused.
3221
3222 2002-07-03 Akim Demaille <akim@epita.fr>
3223
3224 * src/lalr.h, src/lalr.c (goto_number_t): New.
3225 * src/lalr.c (goto_list_t): New.
3226 Propagate them.
3227 * src/nullable.c (rule_list_t): New.
3228 Propagate.
3229 * src/types.h: Remove.
3230
3231 2002-07-03 Akim Demaille <akim@epita.fr>
3232
3233 * src/closure.c (print_fderives): Use rule_rhs_print.
3234 * src/derives.c (print_derives): Use rule_rhs_print.
3235 (rule_list_t): New, replaces `shorts'.
3236 (set_derives): Add comments.
3237 * tests/sets.at (Nullable, Firsts): Adjust.
3238
3239 2002-07-03 Akim Demaille <akim@epita.fr>
3240
3241 * src/output.c (prepare_actions): Free `tally' and `width'.
3242 (prepare_actions): Allocate and free `order'.
3243 * src/symtab.c (symbols_free): Free `symbols'.
3244 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3245 * src/output.c (m4_invoke): Move to...
3246 * src/scan-skel.l: here.
3247 (<<EOF>>): Close yyout, and free its name.
3248
3249 2002-07-03 Akim Demaille <akim@epita.fr>
3250
3251 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3252
3253 * src/LR0.c (new_state): Merge into...
3254 (state_list_append): this.
3255 (new_states): Merge into...
3256 (generate_states): here.
3257 (set_states): Don't ensure a proper `errs' state member here, do it...
3258 * src/conflicts.c (conflicts_solve): here.
3259 * src/state.h, src/state.c: Comment changes.
3260 (state_t): Rename member `shifts' as `transitions'.
3261 Adjust all dependencies.
3262 (errs_new): For consistency, also take the values as argument.
3263 (errs_dup): Remove.
3264 (state_errs_set): New.
3265 (state_reductions_set, state_transitions_set): Assert that no
3266 previous value was assigned.
3267 (state_free): New.
3268 (states_free): Use it.
3269 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3270 temporary storage: use `errs' and `nerrs' as elsewhere.
3271 (set_conflicts): Allocate and free this `errs'.
3272
3273 2002-07-02 Akim Demaille <akim@epita.fr>
3274
3275 * lib/libiberty.h: New.
3276 * lib: Update the bitset implementation from upstream.
3277 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3278 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3279 * src/main.c: Adjust bitset stats calls.
3280
3281 2002-07-01 Paul Eggert <eggert@twinsun.com>
3282
3283 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3284 char, so that negative chars don't collide with $.
3285
3286 2002-06-30 Akim Demaille <akim@epita.fr>
3287
3288 Have the GLR tests be `warning' checked, and fix the warnings.
3289
3290 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3291 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3292 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3293 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3294 (yyaddDeferredAction): static.
3295 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3296 (yyreportParseError): yyprefix is const.
3297 yytokenp is used only when verbose.
3298 (yy__GNUC__): Replace with __GNUC__.
3299 (yypdumpstack): yyi is size_t.
3300 (yypreference): Un-yy local variables and arguments, to avoid
3301 clashes with `yyr1'. Anyway, we are not in the user name space.
3302 (yytname_size): be an int, as is compared with ints.
3303 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3304 Use them.
3305 * tests/cxx-gram.at: Use quotation to protect $1.
3306 Use AT_COMPILE to enable warnings hunts.
3307 Prototype yylex and yyerror.
3308 `Use' argc.
3309 Include `string.h', not `strings.h'.
3310 Produce and prototype stmtMerge only when used.
3311 yylex takes a location.
3312
3313 2002-06-30 Akim Demaille <akim@epita.fr>
3314
3315 We spend a lot of time in quotearg, in particular when --verbose.
3316
3317 * src/symtab.c (symbol_get): Store a quoted version of the key.
3318 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3319 Adjust all callers.
3320
3321 2002-06-30 Akim Demaille <akim@epita.fr>
3322
3323 * src/state.h (reductions_t): Rename member `nreds' as num.
3324 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3325 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3326
3327 2002-06-30 Akim Demaille <akim@epita.fr>
3328
3329 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3330 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3331 (shifts_to): Rename as...
3332 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3333 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3334 (TRANSITION_IS_DISABLED, transitions_to): these.
3335
3336 2002-06-30 Akim Demaille <akim@epita.fr>
3337
3338 * src/print.c (print_shifts, print_gotos): Merge into...
3339 (print_transitions): this.
3340 (print_transitions, print_errs, print_reductions): Align the
3341 lookaheads columns.
3342 (print_core, print_transitions, print_errs, print_state,
3343 print_grammar): Output empty lines separator before, not after.
3344 (state_default_rule_compute): Rename as...
3345 (state_default_rule): this.
3346 * tests/conflicts.at (Defaulted Conflicted Reduction),
3347 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3348 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3349
3350 2002-06-30 Akim Demaille <akim@epita.fr>
3351
3352 Display items as we display rules.
3353
3354 * src/gram.h, src/gram.c (rule_lhs_print): New.
3355 * src/gram.c (grammar_rules_partial_print): Use it.
3356 * src/print.c (print_core): Likewise.
3357 * tests/conflicts.at (Defaulted Conflicted Reduction),
3358 (Unresolved SR Conflicts): Adjust.
3359 (Unresolved SR Conflicts): Adjust and rename as...
3360 (Resolved SR Conflicts): this, as was meant.
3361 * tests/regression.at (Web2c Report): Adjust.
3362
3363 2002-06-30 Akim Demaille <akim@epita.fr>
3364
3365 * src/print.c (state_default_rule_compute): New, extracted from...
3366 (print_reductions): here.
3367 Pessimize, but clarify the code.
3368 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3369
3370 2002-06-30 Akim Demaille <akim@epita.fr>
3371
3372 * src/output.c (action_row): Let default_rule be always a rule
3373 number.
3374
3375 2002-06-30 Akim Demaille <akim@epita.fr>
3376
3377 * src/closure.c (print_firsts, print_fderives, closure):
3378 Use BITSET_EXECUTE.
3379 * src/lalr.c (lookaheads_print): Likewise.
3380 * src/state.c (state_rule_lookaheads_print): Likewise.
3381 * src/print_graph.c (print_core): Likewise.
3382 * src/print.c (print_reductions): Likewise.
3383 * src/output.c (action_row): Likewise.
3384 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3385
3386 2002-06-30 Akim Demaille <akim@epita.fr>
3387
3388 * src/print_graph.c: Use report_flag.
3389
3390 2002-06-30 Akim Demaille <akim@epita.fr>
3391
3392 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3393 to...
3394 * src/relation.h, src/relation.c (traverse, relation_digraph)
3395 (relation_print, relation_transpose): New.
3396
3397 2002-06-30 Akim Demaille <akim@epita.fr>
3398
3399 * src/state.h, src/state.c (shifts_to): New.
3400 * src/lalr.c (build_relations): Use it.
3401
3402 2002-06-30 Akim Demaille <akim@epita.fr>
3403
3404 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3405 (item_number_of_rule_number, rule_number_of_item_number): New.
3406 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3407 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3408 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3409 Propagate their use.
3410 Much remains to be done, in particular wrt `shorts' from types.h.
3411
3412 2002-06-30 Akim Demaille <akim@epita.fr>
3413
3414 * src/symtab.c (symbol_new): Initialize the `printer' member.
3415
3416 2002-06-30 Akim Demaille <akim@epita.fr>
3417
3418 * src/LR0.c (save_reductions): Remove, replaced by...
3419 * src/state.h, src/state.c (state_reductions_set): New.
3420 (reductions, errs): Rename as...
3421 (reductions_t, errs_t): these.
3422 Adjust all dependencies.
3423
3424 2002-06-30 Akim Demaille <akim@epita.fr>
3425
3426 * src/LR0.c (state_list_t, state_list_append): New.
3427 (first_state, last_state): Now symbol_list_t.
3428 (this_state): Remove.
3429 (new_itemsets, append_states, save_reductions): Take a state_t as
3430 argument.
3431 (set_states, generate_states): Adjust.
3432 (save_shifts): Remove, replaced by...
3433 * src/state.h, src/state.c (state_shifts_set): New.
3434 (shifts): Rename as...
3435 (shifts_t): this.
3436 Adjust all dependencies.
3437 * src/state.h (state_t): Remove the `next' member.
3438
3439 2002-06-30 Akim Demaille <akim@epita.fr>
3440
3441 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3442 escaped in slot 0.
3443
3444 2002-06-30 Akim Demaille <akim@epita.fr>
3445
3446 Use hash.h for the state hash table.
3447
3448 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3449 (allocate_storage): Use state_hash_new.
3450 (free_storage): Use state_hash_free.
3451 (new_state, get_state): Adjust.
3452 * src/lalr.h, src/lalr.c (states): Move to...
3453 * src/states.h (state_t): Remove the `link' member, no longer
3454 used.
3455 * src/states.h, src/states.c: here.
3456 (state_hash_new, state_hash_free, state_hash_lookup)
3457 (state_hash_insert, states_free): New.
3458 * src/states.c (state_table, state_compare, state_hash): New.
3459 * src/output.c (output_actions): Do not free states now, since we
3460 still need to know the final_state number in `prepare', called
3461 afterwards. Do it...
3462 * src/main.c (main): here: call states_free after `output'.
3463
3464 2002-06-30 Akim Demaille <akim@epita.fr>
3465
3466 * src/state.h, src/state.c (state_new): New, extracted from...
3467 * src/LR0.c (new_state): here.
3468 * src/state.h (STATE_ALLOC): Move to...
3469 * src/state.c: here.
3470 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3471 * src/state.h, src/state.c: here.
3472
3473 2002-06-30 Akim Demaille <akim@epita.fr>
3474
3475 * src/reader.c (gensym): Rename as...
3476 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3477 (getsym): Rename as...
3478 (symbol_get): this.
3479
3480 2002-06-30 Akim Demaille <akim@epita.fr>
3481
3482 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3483 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3484 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3485 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3486
3487 2002-06-30 Akim Demaille <akim@epita.fr>
3488
3489 Make the test suite pass with warnings checked.
3490
3491 * tests/actions.at (Printers and Destructors): Improve.
3492 Avoid unsigned vs. signed issues.
3493 * tests/calc.at: Don't exercise the scanner here, do it...
3494 * tests/input.at (Torturing the Scanner): here.
3495
3496 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3497
3498 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3499 reorganize first lines parallel to yacc.c.
3500
3501 2002-06-28 Akim Demaille <akim@epita.fr>
3502
3503 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3504 (b4_token_enum, b4_token_defines): New, factored from...
3505 * data/lalr1.cc, data/yacc.c, glr.c: here.
3506
3507 2002-06-28 Akim Demaille <akim@epita.fr>
3508
3509 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3510 unused variables.
3511 * src/output.c (merger_output): static.
3512
3513 2002-06-28 Akim Demaille <akim@epita.fr>
3514
3515 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3516 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3517 pacify GCC.
3518 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3519
3520 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3521
3522 Accumulated changelog for new GLR parsing features.
3523
3524 * src/conflicts.c (count_total_conflicts): Change name to
3525 conflicts_total_count.
3526 * src/conflicts.h: Ditto.
3527 * src/output.c (token_actions): Use the new name.
3528 (output_conflicts): Change conflp => conflict_list_heads, and
3529 confl => conflict_list for better readability.
3530 * data/glr.c: Use the new names.
3531 * NEWS: Add self to GLR announcement.
3532
3533 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3534
3535 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3536 Akim Demaille.
3537
3538 * data/bison.glr: Change name to glr.c
3539 * data/glr.c: Renamed from bison.glr.
3540 * data/Makefile.am: Add glr.c
3541
3542 * src/getargs.c:
3543
3544 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3545 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3546
3547 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3548
3549 * data/bison.glr: Be sure to restore the
3550 current #line when returning to the skeleton contents after having
3551 exposed the input file's #line.
3552
3553 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3554
3555 * data/bison.glr: Bring up to date with changes to bison.simple.
3556
3557 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3558
3559 * data/bison.glr: Correct definitions that use b4_prefix.
3560 Various reformatting.
3561 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3562 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3563 yytokenp argument; now part of stack.
3564 (yychar): Define to behave as documented.
3565 (yyclearin): Ditto.
3566
3567 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3568
3569 * src/reader.h: Add declaration for free_merger_functions.
3570
3571 * src/reader.c (merge_functions): New variable.
3572 (get_merge_function): New function.
3573 (free_merger_functions): New function.
3574 (readgram): Check for %prec that is not followed by a symbol.
3575 Handle %dprec and %merge declarations.
3576 (packgram): Initialize dprec and merger fields in rules array.
3577
3578 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3579 conflict_list_cnt, conflict_list_free): New variables.
3580 (table_grow): Also grow conflict_table.
3581 (prepare_rules): Output dprec and merger tables.
3582 (conflict_row): New function.
3583 (action_row): Output conflict lists for GLR parser. Don't use
3584 default reduction in conflicted states for GLR parser so that there
3585 are spaces for the conflict lists.
3586 (save_row): Also save conflict information.
3587 (token_actions): Allocate conflict list.
3588 (merger_output): New function.
3589 (pack_vector): Pack conflict table, too.
3590 (output_conflicts): New function to output yyconflp and yyconfl.
3591 (output_check): Allocate conflict_tos.
3592 (output_actions): Output conflict tables, also.
3593 (output_skeleton): Output b4_mergers definition.
3594 (prepare): Output b4_max_rhs_length definition.
3595 Use 'bison.glr' as default skeleton for GLR parsers.
3596
3597 * src/gram.c (glr_parser): New flag.
3598 (grammar_free): Call free_merger_functions.
3599
3600 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3601 all pairs of conflicting reductions, rather than just all tokens
3602 causing conflicts. Needed to size conflict tables.
3603 (conflicts_output): Modify call to count_rr_conflicts for new
3604 interface.
3605 (conflicts_print): Ditto.
3606 (count_total_conflicts): New function.
3607
3608 * src/reader.h (merger_list): New type.
3609 (merge_functions): New variable.
3610
3611 * src/lex.h (tok_dprec, tok_merge): New token types.
3612
3613 * src/gram.h (rule_s): Add dprec and merger fields.
3614 (glr_parser): New flag.
3615
3616 * src/conflicts.h (count_total_conflicts): New function.
3617
3618 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3619
3620 * doc/bison.texinfo (Generalized LR Parsing): New section.
3621 (GLR Parsers): New section.
3622 (Language and Grammar): Mention GLR parsing.
3623 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3624 Correct typo ("tge" -> "the").
3625
3626 * data/bison.glr: New skeleton for GLR parsing.
3627
3628 * tests/cxx-gram.at: New tests for GLR parsing.
3629
3630 * tests/testsuite.at: Include cxx-gram.at.
3631
3632 * tests/Makefile.am: Add cxx-gram.at.
3633
3634 * src/parse-gram.y:
3635
3636 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3637
3638 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3639
3640 2002-06-27 Akim Demaille <akim@epita.fr>
3641
3642 * src/options.h, src/options.c: Remove.
3643 * src/getargs.c (short_options, long_options): New.
3644
3645 2002-06-27 Akim Demaille <akim@epita.fr>
3646
3647 * data/bison.simple, data/bison.c++: Rename as...
3648 * data/yacc.c, data/lalr1.cc: these.
3649 * doc/bison.texinfo (Environment Variables): Remove.
3650
3651 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3652
3653 * src/getargs.c (report_argmatch): Initialize strtok().
3654
3655 2002-06-20 Akim Demaille <akim@epita.fr>
3656
3657 * data/bison.simple (b4_symbol_actions): New, replaces...
3658 (b4_symbol_destructor, b4_symbol_printer): these.
3659 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3660 user token numbers.
3661
3662 2002-06-20 Akim Demaille <akim@epita.fr>
3663
3664 * data/bison.simple (yydestructor): Rename as...
3665 (yydestruct): this.
3666
3667 2002-06-20 Akim Demaille <akim@epita.fr>
3668
3669 * src/symtab.h, src/symtab.c (symbol_type_set)
3670 (symbol_destructor_set, symbol_precedence_set): The location is
3671 the last argument.
3672 Adjust all callers.
3673
3674 2002-06-20 Akim Demaille <akim@epita.fr>
3675
3676 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3677 internals.
3678 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3679 Takes a location.
3680 * src/symtab.h, src/symtab.c (symbol_class_set)
3681 (symbol_user_token_number_set): Likewise.
3682 Adjust all callers.
3683 Promote complain_at.
3684 * tests/input.at (Type Clashes): Adjust.
3685
3686 2002-06-20 Akim Demaille <akim@epita.fr>
3687
3688 * data/bison.simple (YYLEX): Fix the declaration when
3689 %pure-parser.
3690
3691 2002-06-20 Akim Demaille <akim@epita.fr>
3692
3693 * data/bison.simple (yysymprint): Don't print the token number,
3694 just its name.
3695 * tests/actions.at (Destructors): Rename as...
3696 (Printers and Destructors): this.
3697 Also exercise %printer.
3698
3699 2002-06-20 Akim Demaille <akim@epita.fr>
3700
3701 * data/bison.simple (YYDSYMPRINT): New.
3702 Use it to remove many of the #if YYDEBUG/if (yydebug).
3703
3704 2002-06-20 Akim Demaille <akim@epita.fr>
3705
3706 * src/symtab.h, src/symtab.c (symbol_t): printer and
3707 printer_location are new members.
3708 (symbol_printer_set): New.
3709 * src/parse-gram.y (PERCENT_PRINTER): New token.
3710 Handle its associated rule.
3711 * src/scan-gram.l: Adjust.
3712 (handle_destructor_at, handle_destructor_dollar): Rename as...
3713 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3714 * src/output.c (symbol_printers_output): New.
3715 (output_skeleton): Call it.
3716 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3717 since there are already many grammar files with a user `yyprint'.
3718 Replace the calls to YYPRINT to calls to yysymprint.
3719 * tests/calc.at: Adjust.
3720 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3721 taking advantage of parser very internal details (stack size!).
3722
3723 2002-06-20 Akim Demaille <akim@epita.fr>
3724
3725 * src/scan-gram.l: Complete the scanner with the missing patterns
3726 to pacify Flex.
3727 Use `quote' and `symbol_tag_get' where appropriate.
3728
3729 2002-06-19 Akim Demaille <akim@epita.fr>
3730
3731 * tests/actions.at (Destructors): Augment to test locations.
3732 * data/bison.simple (yydestructor): Pass it the current location
3733 if locations are enabled.
3734 Prototype only when __STDC__ or C++.
3735 Change the argument names to move into the yy name space: there is
3736 user code here.
3737
3738 2002-06-19 Akim Demaille <akim@epita.fr>
3739
3740 * data/bison.simple (b4_pure_if): New.
3741 Use it instead of #ifdef YYPURE.
3742
3743 2002-06-19 Akim Demaille <akim@epita.fr>
3744
3745 * data/bison.simple (b4_location_if): New.
3746 Use it instead of #ifdef YYLSP_NEEDED.
3747
3748 2002-06-19 Akim Demaille <akim@epita.fr>
3749
3750 Prepare @$ in %destructor, but currently don't bind it in the
3751 skeleton, as %location use is not cleaned up yet.
3752
3753 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3754 (handle_action_at): New.
3755 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3756 a braced_code_t and a location as additional arguments.
3757 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3758 unquote one when outputting `b4_dollar_dollar'.
3759 Adjust callers.
3760 * data/bison.simple (b4_eval): Remove.
3761 (b4_symbol_destructor): Adjust.
3762 * tests/input.at (Invalid @n): Adjust.
3763
3764 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3765
3766 * doc/bison.texinfo: Document ability to have multiple
3767 prologue sections.
3768
3769 2002-06-18 Akim Demaille <akim@epita.fr>
3770
3771 * src/files.c (compute_base_names): When computing the output file
3772 names from the input file name, strip the directory part.
3773
3774 2002-06-18 Akim Demaille <akim@epita.fr>
3775
3776 * data/bison.simple.new: Comment changes.
3777 Reported by Andreas Schwab.
3778
3779 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3780
3781 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3782 there are no `label `yyoverflowlab' defined but not used' warnings
3783 when yyoverflow is defined.
3784
3785 2002-06-18 Akim Demaille <akim@epita.fr>
3786
3787 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3788 new member.
3789 (symbol_destructor_set): Adjust.
3790 * src/output.c (symbol_destructors_output): Output the destructor
3791 locations.
3792 Output the symbol name.
3793 * data/bison.simple (b4_symbol_destructor): Adjust.
3794
3795 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3796 and Akim Demaille <akim@epita.fr>
3797
3798 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3799 what's left on the stack when the error recovery hits EOF.
3800 * tests/actions.at (Destructors): Complete to exercise this case.
3801
3802 2002-06-17 Akim Demaille <akim@epita.fr>
3803
3804 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3805 arguments is really empty, not only equal to `[]'.
3806 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3807 member.
3808 (symbol_destructor_set): New.
3809 * src/output.c (symbol_destructors_output): New.
3810 * src/reader.h (brace_code_t, current_braced_code): New.
3811 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3812 (handle_dollar): Rename as...
3813 (handle_action_dollar): this.
3814 (handle_destructor_dollar): New.
3815 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3816 (grammar_declaration): Use it.
3817 * data/bison.simple (yystos): Is always defined.
3818 (yydestructor): New.
3819 * tests/actions.at (Destructors): New.
3820 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3821
3822 2002-06-17 Akim Demaille <akim@epita.fr>
3823
3824 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3825 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3826 rule_length only when needed.
3827 * src/output.c (actions_output, token_definitions_output): Output
3828 the full M4 block.
3829 * src/symtab.c: Don't access directly to the symbol tag, use
3830 symbol_tag_get.
3831 * src/parse-gram.y: Use symbol_list_free.
3832
3833 2002-06-17 Akim Demaille <akim@epita.fr>
3834
3835 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3836 (symbol_list_prepend, get_type_name): Move to...
3837 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3838 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3839 Adjust all callers.
3840 (symbol_list_free): New.
3841 * src/scan-gram.l (handle_dollar): Takes a location.
3842 * tests/input.at (Invalid $n): Adjust.
3843
3844 2002-06-17 Akim Demaille <akim@epita.fr>
3845
3846 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3847 (symbol_list_prepend): New.
3848 * src/parse-gram.y (%union): `list' is a new member.
3849 (symbols.1): New, replaces...
3850 (terms_to_prec.1, nterms_to_type.1): these.
3851 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3852 Take a location as additional argument.
3853 Adjust all callers.
3854
3855 2002-06-15 Akim Demaille <akim@epita.fr>
3856
3857 * src/parse-gram.y: Move %token in the declaration section so that
3858 we don't depend upon CVS Bison.
3859
3860 2002-06-15 Akim Demaille <akim@epita.fr>
3861
3862 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3863 * src/print.c (print_core): Use it.
3864
3865 2002-06-15 Akim Demaille <akim@epita.fr>
3866
3867 * src/conflicts.c (log_resolution): Accept the rule involved in
3868 the sr conflicts instead of the lookahead number that points to
3869 that rule.
3870 (flush_reduce): Accept the current lookahead vector as argument,
3871 instead of the index in LA.
3872 (resolve_sr_conflict): Accept the current number of lookahead
3873 bitset to consider for the STATE, instead of the index in LA.
3874 (set_conflicts): Adjust.
3875 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3876
3877 2002-06-15 Akim Demaille <akim@epita.fr>
3878
3879 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3880 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3881 Adjust all dependencies.
3882 * src/lalr.c (initialize_lookaheads): Split into...
3883 (states_lookaheads_count, states_lookaheads_initialize): these.
3884 (lalr): Adjust.
3885
3886 2002-06-15 Akim Demaille <akim@epita.fr>
3887
3888 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3889 out of...
3890 (grammar_rules_print): here.
3891 * src/reduce.c (reduce_output): Use it.
3892 * tests/reduce.at (Useless Rules, Reduced Automaton)
3893 (Underivable Rules): Adjust.
3894
3895 2002-06-15 Akim Demaille <akim@epita.fr>
3896
3897 Copy BYacc's nice way to report the grammar.
3898
3899 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
3900 New.
3901 Don't print the rules' location, it is confusing and useless.
3902 (rule_print): Use grammar_rhs_print.
3903 * src/print.c (print_grammar): Use grammar_rules_print.
3904
3905 2002-06-15 Akim Demaille <akim@epita.fr>
3906
3907 Complete and rationalize `useless thing' warnings.
3908
3909 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
3910 (symbol_tag_print): New.
3911 Use them everywhere in place of accessing directly the tag member.
3912 * src/gram.h, src/gram.c (rule_print): New.
3913 Use it where a rule used to be printed `by hand'.
3914 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
3915 (reduce_grammar_tables): Report the useless rules.
3916 (reduce_print): Useless things are a warning, not an error.
3917 Report it as such.
3918 * tests/reduce.at (Useless Nonterminals, Useless Rules):
3919 (Reduced Automaton, Underivable Rules): Adjust.
3920 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
3921 * tests/conflicts.at (Unresolved SR Conflicts)
3922 (Solved SR Conflicts): Adjust.
3923
3924 2002-06-15 Akim Demaille <akim@epita.fr>
3925
3926 Let symbols have a location.
3927
3928 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
3929 (getsym): Adjust.
3930 Adjust all callers.
3931 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
3932 Use location_t, not int.
3933 * src/symtab.c (symbol_check_defined): Take advantage of the
3934 location.
3935 * tests/regression.at (Invalid inputs): Adjust.
3936
3937 2002-06-15 Akim Demaille <akim@epita.fr>
3938
3939 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
3940 (input): Don't try to initialize yylloc here, do it in the
3941 scanner.
3942 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
3943 * src/gram.h (rule_t): Change line and action_line into location
3944 and action_location, of location_t type.
3945 Adjust all dependencies.
3946 * src/location.h, src/location.c (empty_location): New.
3947 * src/reader.h, src/reader.c (grammar_start_symbol_set)
3948 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
3949 (grammar_current_rule_symbol_append)
3950 (grammar_current_rule_action_append): Expect a location as argument.
3951 * src/reader.c (grammar_midrule_action): Adjust to attach an
3952 action's location as dummy symbol location.
3953 * src/symtab.h, src/symtab.c (startsymbol_location): New.
3954 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
3955 the line numbers.
3956
3957 2002-06-14 Akim Demaille <akim@epita.fr>
3958
3959 Grammar declarations may be found in the grammar section.
3960
3961 * src/parse-gram.y (rules_or_grammar_declaration): New.
3962 (declarations): Each declaration may end with a semicolon, not
3963 just...
3964 (grammar_declaration): `"%union"'.
3965 (grammar): Branch to rules_or_grammar_declaration.
3966
3967 2002-06-14 Akim Demaille <akim@epita.fr>
3968
3969 * src/main.c (main): Invoke scanner_free.
3970
3971 2002-06-14 Akim Demaille <akim@epita.fr>
3972
3973 * src/output.c (m4_invoke): Extracted from...
3974 (output_skeleton): here.
3975 Free tempfile.
3976
3977 2002-06-14 Akim Demaille <akim@epita.fr>
3978
3979 * src/parse-gram.y (directives, directive, gram)
3980 (grammar_directives, precedence_directives, precedence_directive):
3981 Rename as...
3982 (declarations, declaration, grammar, grammar_declaration)
3983 (precedence_declaration, precedence_declarator): these.
3984 (symbol_declaration): New.
3985
3986 2002-06-14 Akim Demaille <akim@epita.fr>
3987
3988 * src/files.c (action_obstack): Remove, unused.
3989 (output_obstack): Remove it, and all its dependencies, as it is no
3990 longer needed.
3991 * src/reader.c (epilogue_set): Build the epilogue in the
3992 muscle_obstack.
3993 * src/output.h, src/output.c (muscle_obstack): Move to...
3994 * src/muscle_tab.h, src/muscle_tab.h: here.
3995 (muscle_init): Initialize muscle_obstack.
3996 (muscle_free): New.
3997 * src/main.c (main): Call it.
3998
3999 2002-06-14 Akim Demaille <akim@epita.fr>
4000
4001 * src/location.h: New, extracted from...
4002 * src/reader.h: here.
4003 * src/Makefile.am (noinst_HEADERS): Merge into
4004 (bison_SOURCES): this.
4005 Add location.h.
4006 * src/parse-gram.y: Use location_t instead of Bison's.
4007 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4008 Use location_t instead of ints.
4009
4010 2002-06-14 Akim Demaille <akim@epita.fr>
4011
4012 * data/bison.simple, data/bison.c++: Be sure to restore the
4013 current #line when returning to the skeleton contents after having
4014 exposed the input file's #line.
4015
4016 2002-06-12 Akim Demaille <akim@epita.fr>
4017
4018 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4019 eager.
4020 * tests/actions.at (Exotic Dollars): New.
4021
4022 2002-06-12 Akim Demaille <akim@epita.fr>
4023
4024 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4025 ['"/] too eagerly.
4026 * tests/input.at (Torturing the Scanner): New.
4027
4028 2002-06-11 Akim Demaille <akim@epita.fr>
4029
4030 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4031 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4032 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4033 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4034 * src/reader.c (reader): Use it.
4035
4036 2002-06-11 Akim Demaille <akim@epita.fr>
4037
4038 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4039 Adjust all callers.
4040 (scanner_last_string_free): New.
4041
4042 2002-06-11 Akim Demaille <akim@epita.fr>
4043
4044 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4045 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4046 (last_string, YY_OBS_FREE): New.
4047 Use them when returning an ID.
4048
4049 2002-06-11 Akim Demaille <akim@epita.fr>
4050
4051 Have Bison grammars parsed by a Bison grammar.
4052
4053 * src/reader.c, src/reader.h (prologue_augment): New.
4054 * src/reader.c (copy_definition): Remove.
4055
4056 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4057 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4058 (grammar_current_rule_prec_set, grammar_current_rule_check)
4059 (grammar_current_rule_symbol_append)
4060 (grammar_current_rule_action_append): Export.
4061 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4062 (symbol_list_action_append): Remove.
4063 Hook the routines from reader.
4064 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4065 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4066
4067 * src/reader.c (read_declarations): Remove, unused.
4068
4069 * src/parse-gram.y: Handle the epilogue.
4070 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4071 (grammar_start_symbol_set): this.
4072 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4073 * src/reader.c (readgram): Remove, unused.
4074 (reader): Adjust to insert eoftoken and axiom where appropriate.
4075
4076 * src/reader.c (copy_dollar): Replace with...
4077 * src/scan-gram.h (handle_dollar): this.
4078 * src/parse-gram.y: Remove `%thong'.
4079
4080 * src/reader.c (copy_at): Replace with...
4081 * src/scan-gram.h (handle_at): this.
4082
4083 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4084 New.
4085
4086 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4087 time being.
4088
4089 * src/reader.h, src/reader.c (grammar_rule_end): New.
4090
4091 * src/parse.y (current_type, current_class): New.
4092 Implement `%nterm', `%token' support.
4093 Merge `%term' into `%token'.
4094 (string_as_id): New.
4095 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4096 type name.
4097
4098 * src/parse-gram.y: Be sure to handle properly the beginning of
4099 rules.
4100
4101 * src/parse-gram.y: Handle %type.
4102 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4103
4104 * src/parse-gram.y: More directives support.
4105 * src/options.c: No longer handle source directives.
4106
4107 * src/parse-gram.y: Fix %output.
4108
4109 * src/parse-gram.y: Handle %union.
4110 Use the prologue locations.
4111 * src/reader.c (parse_union_decl): Remove.
4112
4113 * src/reader.h, src/reader.c (epilogue_set): New.
4114 * src/parse-gram.y: Use it.
4115
4116 * data/bison.simple, data/bison.c++: b4_stype is now either not
4117 defined, then default to int, or to the contents of %union,
4118 without `union' itself.
4119 Adjust.
4120 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4121
4122 * src/output.c (actions_output): Don't output braces, as they are
4123 already handled by the scanner.
4124
4125 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4126 characters to themselves.
4127
4128 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4129 that the epilogue has a proper #line.
4130
4131 * src/parse-gram.y: Handle precedence/associativity.
4132
4133 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4134 a terminal.
4135 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4136 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4137 at all to define terminals that cannot be emitted.
4138
4139 * src/scan-gram.l: Escape M4 characters.
4140
4141 * src/scan-gram.l: Working properly with escapes in user
4142 strings/characters.
4143
4144 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4145 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4146 grammar.
4147 Use more modest sizes, as for the time being the parser does not
4148 release memory, and therefore the process swallows a huge amount
4149 of memory.
4150
4151 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4152 stricter %token grammar.
4153
4154 * src/symtab.h (associativity): Add `undef_assoc'.
4155 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4156 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4157
4158 * tests/regression.at (Invalid %directive): Remove, as it is now
4159 meaningless.
4160 (Invalid inputs): Adjust to the new error messages.
4161 (Token definitions): The new grammar doesn't allow too many
4162 eccentricities.
4163
4164 * src/lex.h, src/lex.c: Remove.
4165 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4166 (copy_character, copy_string2, copy_string, copy_identifier)
4167 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4168 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4169 (parse_action): Remove.
4170 * po/POTFILES.in: Adjust.
4171
4172 2002-06-11 Akim Demaille <akim@epita.fr>
4173
4174 * src/reader.c (parse_action): Don't store directly into the
4175 rule's action member: return the action as a string.
4176 Don't require `rule_length' as an argument: compute it.
4177 (grammar_current_rule_symbol_append)
4178 (grammar_current_rule_action_append): New, eved out from
4179 (readgram): here.
4180 Remove `action_flag', `rulelength', unused now.
4181
4182 2002-06-11 Akim Demaille <akim@epita.fr>
4183
4184 * src/reader.c (grammar_current_rule_prec_set).
4185 (grammar_current_rule_check): New, eved out from...
4186 (readgram): here.
4187 Remove `xaction', `first_rhs': useless.
4188 * tests/input.at (Type clashes): New.
4189 * tests/existing.at (GNU Cim Grammar): Adjust.
4190
4191 2002-06-11 Akim Demaille <akim@epita.fr>
4192
4193 * src/reader.c (grammar_midrule_action): New, Eved out from
4194 (readgram): here.
4195
4196 2002-06-11 Akim Demaille <akim@epita.fr>
4197
4198 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4199 New.
4200 (readgram): Use them as replacement of inlined code, crule and
4201 crule1.
4202
4203 2002-06-11 Akim Demaille <akim@epita.fr>
4204
4205 * src/reader.c (grammar_end, grammar_symbol_append): New.
4206 (readgram): Use them.
4207 Make the use of `p' as local as possible.
4208
4209 2002-06-10 Akim Demaille <akim@epita.fr>
4210
4211 GCJ's parser requires the tokens to be defined before the prologue.
4212
4213 * data/bison.simple: Output the token definition before the user's
4214 prologue.
4215 * tests/regression.at (Braces parsing, Duplicate string)
4216 (Mixing %token styles): Check the output from bison.
4217 (Early token definitions): New.
4218
4219 2002-06-10 Akim Demaille <akim@epita.fr>
4220
4221 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4222 assigning twice the same user number to a token, so that we can
4223 use it in...
4224 * src/lex.c (lex): here.
4225 Also use `symbol_class_set' instead of hand written code.
4226 * src/reader.c (parse_assoc_decl): Likewise.
4227
4228 2002-06-10 Akim Demaille <akim@epita.fr>
4229
4230 * src/symtab.c, src/symtab.c (symbol_class_set)
4231 (symbol_user_token_number_set): New.
4232 * src/reader.c (parse_token_decl): Use them.
4233 Use a switch instead of ifs.
4234 Use a single argument.
4235
4236 2002-06-10 Akim Demaille <akim@epita.fr>
4237
4238 Remove `%thong' support as it is undocumented, unused, duplicates
4239 `%token's job, and creates useless e-mail traffic with people who
4240 want to know what it is, why it is undocumented, unused, and
4241 duplicates `%token's job.
4242
4243 * src/reader.c (parse_thong_decl): Remove.
4244 * src/options.c (option_table): Remove "thong".
4245 * src/lex.h (tok_thong): Remove.
4246
4247 2002-06-10 Akim Demaille <akim@epita.fr>
4248
4249 * src/symtab.c, src/symtab.c (symbol_type_set)
4250 (symbol_precedence_set): New.
4251 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4252 (value_components_used): Remove, unused.
4253
4254 2002-06-09 Akim Demaille <akim@epita.fr>
4255
4256 Move symbols handling code out of the reader.
4257
4258 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4259 (axiom): Move to...
4260 * src/symtab.h, src/symtab.c: here.
4261
4262 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4263 * src/reader.c (startval): Rename as...
4264 * src/symtab.h, src/symtab.c (startsymbol): this.
4265 * src/reader.c: Adjust.
4266
4267 * src/reader.c (symbol_check_defined, symbol_make_alias)
4268 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4269 (token_translations_init)
4270 Move to...
4271 * src/symtab.c: here.
4272 * src/reader.c (packsymbols): Move to...
4273 * src/symtab.h, src/symtab.c (symbols_pack): here.
4274 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4275 argument.
4276
4277 2002-06-03 Akim Demaille <akim@epita.fr>
4278
4279 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4280 then statements.
4281
4282 2002-06-03 Akim Demaille <akim@epita.fr>
4283
4284 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4285 structs with non literals.
4286 * src/scan-skel.l: never-interactive.
4287 * src/conflicts.c (enum conflict_resolution_e): No trailing
4288 comma.
4289 * src/getargs.c (usage): Split long literal strings.
4290 Reported by Hans Aberg.
4291
4292 2002-05-28 Akim Demaille <akim@epita.fr>
4293
4294 * data/bison.c++: Use C++ ostreams.
4295 (cdebug_): New member.
4296
4297 2002-05-28 Akim Demaille <akim@epita.fr>
4298
4299 * src/output.c (output_skeleton): Be sure to allocate enough room
4300 for `/' _and_ for `\0' in full_skeleton.
4301
4302 2002-05-28 Akim Demaille <akim@epita.fr>
4303
4304 * data/bison.c++: Catch up with bison.simple:
4305 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4306 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4307 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4308 and popping traces.
4309
4310 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4311
4312 * src/output.c (output_skeleton): Put an explicit path in front of
4313 the skeleton file name, rather than relying on the -I directory,
4314 to partially alleviate effects of having a skeleton file lying around
4315 in the current directory.
4316
4317 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4318
4319 * src/conflicts.c (log_resolution): Correct typo:
4320 obstack_printf should be obstack_fgrow1.
4321
4322 2002-05-26 Akim Demaille <akim@epita.fr>
4323
4324 * src/state.h (state_t): `solved_conflicts' is a new member.
4325 * src/LR0.c (new_state): Set it to 0.
4326 * src/conflicts.h, src/conflicts.c (print_conflicts)
4327 (free_conflicts, solve_conflicts): Rename as...
4328 (conflicts_print, conflicts_free, conflicts_solve): these.
4329 Adjust callers.
4330 * src/conflicts.c (enum conflict_resolution_e)
4331 (solved_conflicts_obstack): New, used by...
4332 (log_resolution): this.
4333 Adjust to attach the conflict resolution to each state.
4334 Complete the description with the precedence/associativity
4335 information.
4336 (resolve_sr_conflict): Adjust.
4337 * src/print.c (print_state): Output its solved_conflicts.
4338 * tests/conflicts.at (Unresolved SR Conflicts)
4339 (Solved SR Conflicts): Exercise --report=all.
4340
4341 2002-05-26 Akim Demaille <akim@epita.fr>
4342
4343 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4344 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4345 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4346 (token_number_t, item_number_as_token_number)
4347 (token_number_as_item_number, muscle_insert_token_number_table):
4348 Rename as...
4349 (symbol_number_t, item_number_as_symbol_number)
4350 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4351 these, since it is more appropriate.
4352
4353 2002-05-26 Akim Demaille <akim@epita.fr>
4354
4355 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4356 `Error:' lines.
4357 * data/bison.simple (yystos) [YYDEBUG]: New.
4358 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4359 error recovery.
4360 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4361
4362 2002-05-25 Akim Demaille <akim@epita.fr>
4363
4364 * doc/bison.texinfo (Debugging): Split into...
4365 (Tracing): this new section, its former contents, and...
4366 (Understanding): this new section.
4367 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4368 by...
4369 (report_flag): this.
4370 Adjust all dependencies.
4371 (report_args, report_types, report_argmatch): New.
4372 (usage, getargs): Report/support -r, --report.
4373 * src/options.h
4374 (struct option_table_struct): Rename as..,
4375 (struct option_table_s): this.
4376 Rename the `set_flag' member to `flag' to match with getopt_long's
4377 struct.
4378 * src/options.c (option_table): Split verbose into an entry for
4379 %verbose, and another for --verbose.
4380 Support --report/-r, so remove -r from the obsolete --raw.
4381 * src/print.c: Attach full item sets and lookaheads reports to
4382 report_flag instead of trace_flag.
4383 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4384
4385 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4386 and Paul Eggert <eggert@twinsun.com>
4387
4388 * data/bison.simple (yyparse): Correct error handling to conform to
4389 POSIX and yacc. Specifically, after syntax error is discovered,
4390 do not reduce further before shifting the error token.
4391 Clean up the code a bit by removing the labels yyerrdefault,
4392 yyerrhandle, yyerrpop.
4393 * NEWS: Document the above.
4394
4395 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4396
4397 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4398 type; it isn't always big enough, since it doesn't necessarily
4399 include non-terminals.
4400 (yytranslate): Expand definition of yy_token_number_type, so that
4401 the latter can be removed.
4402 (yy_token_number_type): Remove, only one use.
4403 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4404 don't use TokenNumberType as element type.
4405
4406 * tests/regression.at: Modify expected output to agree with change
4407 to yyr1 and yytranslate.
4408
4409 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4410
4411 * src/reader.c (parse_action): Use copy_character instead of
4412 obstack_1grow.
4413
4414 2002-05-13 Akim Demaille <akim@epita.fr>
4415
4416 * tests/regression.at (Token definitions): Prototype yylex and
4417 yyerror.
4418
4419 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4420
4421 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4422 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4423 32-bit arithmetic.
4424 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4425
4426 2002-05-07 Akim Demaille <akim@epita.fr>
4427
4428 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4429 avoid GCC warnings.
4430
4431 2002-05-07 Akim Demaille <akim@epita.fr>
4432
4433 Kill GCC warnings.
4434
4435 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4436 over the RHS of each rule.
4437 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4438 * src/state.h (state_t): Member `nitems' is unsigned short.
4439 * src/LR0.c (get_state): Adjust.
4440 * src/reader.c (packgram): Likewise.
4441 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4442 `Type'.
4443 (muscle_insert_int_table): Remove, unused.
4444 (prepare_rules): Remove `max'.
4445
4446 2002-05-06 Akim Demaille <akim@epita.fr>
4447
4448 * src/closure.c (print_firsts): Display of the symbol tags.
4449 (bitmatrix_print): Move to...
4450 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4451 here.
4452 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4453
4454 2002-05-06 Akim Demaille <akim@epita.fr>
4455
4456 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4457 hash_do_for_each.
4458
4459 2002-05-06 Akim Demaille <akim@epita.fr>
4460
4461 * src/LR0.c (new_state, get_state): Instead of using the global
4462 `kernel_size' and `kernel_base', have two new arguments:
4463 `core_size' and `core'.
4464 Adjust callers.
4465
4466 2002-05-06 Akim Demaille <akim@epita.fr>
4467
4468 * src/reader.c (packgram): No longer end `ritem' with a 0
4469 sentinel: it is not used.
4470
4471 2002-05-05 Akim Demaille <akim@epita.fr>
4472
4473 New experimental feature: display the lookaheads in the report and
4474 graph.
4475
4476 * src/print (print_core): When --trace-flag, display the rules
4477 lookaheads.
4478 * src/print_graph.c (print_core): Likewise.
4479 Swap the arguments.
4480 Adjust caller.
4481
4482 2002-05-05 Akim Demaille <akim@epita.fr>
4483
4484 * tests/torture.at (Many lookaheads): New test.
4485
4486 2002-05-05 Akim Demaille <akim@epita.fr>
4487
4488 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4489 (GENERATE_MUSCLE_INSERT_TABLE): this.
4490 (output_int_table, output_unsigned_int_table, output_short_table)
4491 (output_token_number_table, output_item_number_table): Replace with...
4492 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4493 (muscle_insert_short_table, muscle_insert_token_number_table)
4494 (muscle_insert_item_number_table): these.
4495 Adjust all callers.
4496 (prepare_tokens): Don't free `translations', since...
4497 * src/reader.h, src/reader.c (grammar_free): do it.
4498 Move to...
4499 * src/gram.h, src/gram.c (grammar_free): here.
4500 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4501 b4_translate_max.
4502
4503 2002-05-05 Akim Demaille <akim@epita.fr>
4504
4505 * src/output.c (output_unsigned_int_table): New.
4506 (prepare_rules): `i' is unsigned.
4507 `prhs', `rline', `r2' are unsigned int.
4508 Rename muscle `rhs_number_max' as `rhs_max'.
4509 Output muscles `prhs_max', `rline_max', and `r2_max'.
4510 Free rline and r1.
4511 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4512 to compute types instead of constant types.
4513 * tests/regression.at (Web2c Actions): Adjust.
4514
4515 2002-05-04 Akim Demaille <akim@epita.fr>
4516
4517 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4518 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4519 Adjust dependencies.
4520 * src/output.c (token_definitions_output): Be sure not to output a
4521 `#define 'a'' when fed with `%token 'a' "a"'.
4522 * tests/regression.at (Token definitions): New.
4523
4524 2002-05-03 Paul Eggert <eggert@twinsun.com>
4525
4526 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4527 for K&R C.
4528
4529 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4530
4531 * Makefile.am (SUBDIRS): Remove intl.
4532 (EXTRA_DIST): Add config/config.rpath.
4533
4534 2002-05-03 Akim Demaille <akim@epita.fr>
4535
4536 * data/bison.simple (m4_if): Don't output empty enums.
4537 And actually, output valid enum definitions :(.
4538
4539 2002-05-03 Akim Demaille <akim@epita.fr>
4540
4541 * configure.bat: Remove, completely obsolete.
4542 * Makefile.am (EXTRA_DIST): Adjust.
4543 Don't distribute config.rpath...
4544 * config/Makefile.am (EXTRA_DIST): Do it.
4545
4546 2002-05-03 Akim Demaille <akim@epita.fr>
4547
4548 * configure.in (GETTEXT_VERSION): New.
4549 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4550
4551 2002-05-03 Akim Demaille <akim@epita.fr>
4552
4553 * data/bison.simple (b4_token_enum): New.
4554 (b4_token_defines): Use it to output tokens both as #define and
4555 enums.
4556 Suggested by Paul Eggert.
4557 * src/output.c (token_definitions_output): Don't output spurious
4558 white spaces.
4559
4560 2002-05-03 Akim Demaille <akim@epita.fr>
4561
4562 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4563
4564 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4565
4566 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4567 Update the stack class, give a try to deque as the default container.
4568
4569 2002-05-02 Akim Demaille <akim@epita.fr>
4570
4571 * data/bison.simple (yyparse): Do not implement @$ = @1.
4572 (YYLLOC_DEFAULT): Adjust to do it.
4573 * doc/bison.texinfo (Location Default Action): Fix.
4574
4575 2002-05-02 Akim Demaille <akim@epita.fr>
4576
4577 * src/reader.c (parse_braces): Merge into...
4578 (parse_action): this.
4579
4580 2002-05-02 Akim Demaille <akim@epita.fr>
4581
4582 * configure.in (ALL_LINGUAS): Remove.
4583 * po/LINGUAS, hr.po: New.
4584
4585 2002-05-02 Akim Demaille <akim@epita.fr>
4586
4587 Remove the so called hairy (semantic) parsers.
4588
4589 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4590 * src/gram.h, src/gram.c (semantic_parser): Remove.
4591 (rule_t): Remove the guard and guard_line members.
4592 * src/lex.h (token_t): remove tok_guard.
4593 * src/options.c (option_table): Remove %guard and %semantic_parser
4594 support.
4595 * src/output.c, src/output.h (guards_output): Remove.
4596 (prepare): Adjust.
4597 (token_definitions_output): Don't output the `T'
4598 tokens (???).
4599 (output_skeleton): Don't output the guards.
4600 * src/files.c, src/files.c (attrsfile): Remove.
4601 * src/reader.c (symbol_list): Remove the guard and guard_line
4602 members.
4603 Adjust dependencies.
4604 (parse_guard): Remove.
4605 * data/bison.hairy: Remove.
4606 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4607 BISON_HAIRY.
4608
4609 2002-05-02 Akim Demaille <akim@epita.fr>
4610
4611 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4612 (parse_guard): Rename the formal argument `stack_offset' as
4613 `rule_length', which is more readable.
4614 Adjust callers.
4615 (copy_at, copy_dollar): Instead of outputting the hard coded
4616 values of $$, $n and so forth, output invocation to b4_lhs_value,
4617 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4618 Note: this patch partially drops `semantic-parser' support: it
4619 always does `rule_length - n', where semantic parsers ought to
4620 always use `-n'.
4621 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4622 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4623
4624 2002-05-02 Akim Demaille <akim@epita.fr>
4625
4626 * configure.in (AC_INIT): Bump to 1.49b.
4627 (AM_INIT_AUTOMAKE): Short invocation.
4628
4629 2002-05-02 Akim Demaille <akim@epita.fr>
4630
4631 Version 1.49a.
4632
4633 2002-05-01 Akim Demaille <akim@epita.fr>
4634
4635 * src/skeleton.h: Remove.
4636
4637 2002-05-01 Akim Demaille <akim@epita.fr>
4638
4639 * src/skeleton.h: Fix the #endif.
4640 Reported by Magnus Fromreide.
4641
4642 2002-04-26 Paul Eggert <eggert@twinsun.com>
4643
4644 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4645 Define if we define YYSTYPE and YYLTYPE, respectively.
4646 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4647
4648 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4649
4650 * src/scan-skel.l: Postprocess quadrigraphs.
4651
4652 * src/reader.c (copy_character): New function, used to output
4653 single characters while replacing `[' and `]' with quadrigraphs, to
4654 avoid troubles with M4 quotes.
4655 (copy_comment): Output characters with copy_character.
4656 (read_additionnal_code): Likewise.
4657 (copy_string2): Likewise.
4658 (copy_definition): Likewise.
4659
4660 * tests/calc.at: Exercise M4 quoting.
4661
4662 2002-04-25 Akim Demaille <akim@epita.fr>
4663
4664 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4665 between `!' and the command.
4666 Reported by Paul Eggert.
4667
4668 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4669
4670 * tests/calc.at: Exercise prologue splitting.
4671
4672 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4673 `b4_post_prologue' instead of `b4_prologue'.
4674
4675 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4676 muscles.
4677 (output): Free pre_prologue_obstack and post_prologue_obstack.
4678 * src/files.h, src/files.c (attrs_obstack): Remove.
4679 (pre_prologue_obstack, post_prologue_obstack): New.
4680 * src/reader.c (copy_definition): Add a parameter to specify the
4681 obstack to fill, instead of using attrs_obstack unconditionally.
4682 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4683 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4684
4685 2002-04-23 Paul Eggert <eggert@twinsun.com>
4686
4687 * data/bison.simple: Remove unnecessary commentary and white
4688 space differences from 1_29-branch.
4689 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4690
4691 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4692 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4693 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4694 constructors or destructors.
4695
4696 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4697
4698 2002-04-23 Akim Demaille <akim@epita.fr>
4699
4700 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4701 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4702 location with columns.
4703 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4704 All reported by Paul Eggert.
4705
4706 2002-04-22 Akim Demaille <akim@epita.fr>
4707
4708 * src/reduce.c (dump_grammar): Move to...
4709 * src/gram.h, src/gram.c (grammar_dump): here.
4710 Be sure to separate long item numbers.
4711 Don't read the members of a rule's prec if its nil.
4712
4713 2002-04-22 Akim Demaille <akim@epita.fr>
4714
4715 * src/output.c (table_size, table_grow): New.
4716 (MAXTABLE): Remove, replace uses with table_size.
4717 (pack_vector): Instead of dying when the table is too big, grow it.
4718
4719 2002-04-22 Akim Demaille <akim@epita.fr>
4720
4721 * data/bison.simple (yyr1): Its type is that of a token number.
4722 * data/bison.c++ (r1_): Likewise.
4723 * tests/regression.at (Web2c Actions): Adjust.
4724
4725 2002-04-22 Akim Demaille <akim@epita.fr>
4726
4727 * src/reader.c (token_translations_init): 256 is now the default
4728 value for the error token, i.e., it will be assigned another
4729 number if the user assigned 256 to one of her tokens.
4730 (reader): Don't force 256 to error.
4731 * doc/bison.texinfo (Symbols): Adjust.
4732 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4733 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4734 etc. instead of 10, 20, 30 (which was used to `jump' over error
4735 (256) and undefined (2)).
4736
4737 2002-04-22 Akim Demaille <akim@epita.fr>
4738
4739 Propagate more token_number_t.
4740
4741 * src/gram.h (token_number_as_item_number)
4742 (item_number_as_token_number): New.
4743 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4744 Use it to create output_item_number_table and
4745 output_token_number_table.
4746 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4747 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4748 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4749 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4750
4751 2002-04-22 Akim Demaille <akim@epita.fr>
4752
4753 * src/output.h, src/output.c (get_lines_number): Remove.
4754
4755 2002-04-19 Akim Demaille <akim@epita.fr>
4756
4757 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4758 as Lex/Flex'.
4759 (Debugging): More details about enabling the debugging features.
4760 (Table of Symbols): Describe $$, $n, @$, and @n.
4761 Suggested by Tim Josling.
4762
4763 2002-04-19 Akim Demaille <akim@epita.fr>
4764
4765 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4766
4767 2002-04-10 Akim Demaille <akim@epita.fr>
4768
4769 * src/system.h: Rely on HAVE_LIMITS_H.
4770 Suggested by Paul Eggert.
4771
4772 2002-04-09 Akim Demaille <akim@epita.fr>
4773
4774 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4775 full stderr, and strip it according to the bison options, instead
4776 of composing the error message from different bits.
4777 This makes it easier to check for several error messages.
4778 Adjust all the invocations.
4779 Add an invocation exercising the error token.
4780 Add an invocation demonstrating a stupid error message.
4781 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4782 Adjust the tests.
4783 Error message are for stderr, not stdout.
4784
4785 2002-04-09 Akim Demaille <akim@epita.fr>
4786
4787 * src/gram.h, src/gram.c (error_token_number): Remove, use
4788 errtoken->number.
4789 * src/reader.c (reader): Don't specify the user token number (2)
4790 for $undefined, as it uselessly prevents using it.
4791 * src/gram.h (token_number_t): Move to...
4792 * src/symtab.h: here.
4793 (state_t.number): Is a token_number_t.
4794 * src/print.c, src/reader.c: Use undeftoken->number instead of
4795 hard coded 2.
4796 (Even though this 2 is not the same as above: the number of the
4797 undeftoken remains being 2, it is its user token number which
4798 might not be 2).
4799 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4800 `user_token_number_max'.
4801 Output `undef_token_number'.
4802 * data/bison.simple, data/bison.c++: Use them.
4803 Be sure to map invalid yylex return values to
4804 `undef_token_number'. This saves us from gratuitous SEGV.
4805
4806 * tests/conflicts.at (Solved SR Conflicts)
4807 (Unresolved SR Conflicts): Adjust.
4808 * tests/regression.at (Web2c Actions): Adjust.
4809
4810 2002-04-08 Akim Demaille <akim@epita.fr>
4811
4812 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4813 Adding #line.
4814 Remove the duplicate `typedefs'.
4815 (RhsNumberType): Fix the declaration and various other typos.
4816 Use __ofile__.
4817 * data/bison.simple: Use __ofile__.
4818 * src/scan-skel.l: Handle __ofile__.
4819
4820 2002-04-08 Akim Demaille <akim@epita.fr>
4821
4822 * src/gram.h (item_number_t): New, the type of item numbers in
4823 RITEM. Note that it must be able to code symbol numbers as
4824 positive number, and the negation of rule numbers as negative
4825 numbers.
4826 Adjust all dependencies (pretty many).
4827 * src/reduce.c (rule): Remove this `short *' pointer: use
4828 item_number_t.
4829 * src/system.h (MINSHORT, MAXSHORT): Remove.
4830 Include `limits.h'.
4831 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4832 (shortcpy): Remove.
4833 (MAXTABLE): Move to...
4834 * src/output.c (MAXTABLE): here.
4835 (prepare_rules): Use output_int_table to output rhs.
4836 * data/bison.simple, data/bison.c++: Adjust.
4837 * tests/torture.at (Big triangle): Move the limit from 254 to
4838 500.
4839 * tests/regression.at (Web2c Actions): Ajust.
4840
4841 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4842 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4843 passes, but produces negative #line number, once fixed, GCC is
4844 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4845 C), it passes.
4846 * src/state.h (state_h): Code input lines on ints, not shorts.
4847
4848 2002-04-08 Akim Demaille <akim@epita.fr>
4849
4850 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4851 and then the grammar.
4852
4853 2002-04-08 Akim Demaille <akim@epita.fr>
4854
4855 * src/system.h: No longer using strndup.
4856
4857 2002-04-07 Akim Demaille <akim@epita.fr>
4858
4859 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4860 * src/output.c (output_table_data): Return the longest number.
4861 (prepare_tokens): Output `token_number_max').
4862 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4863 New.
4864 Use them to define yy_token_number_type/TokenNumberType.
4865 Use this type for yytranslate.
4866 * tests/torture.at (Big triangle): Push the limit from 124 to
4867 253.
4868 * tests/regression.at (Web2c Actions): Adjust.
4869
4870 2002-04-07 Akim Demaille <akim@epita.fr>
4871
4872 * tests/torture.at (Big triangle): New.
4873 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4874 * tests/existing.at: here.
4875
4876 2002-04-07 Akim Demaille <akim@epita.fr>
4877
4878 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4879 nritems.
4880 Adjust dependencies.
4881
4882 2002-04-07 Akim Demaille <akim@epita.fr>
4883
4884 * src/reader.c: Normalize increments to prefix form.
4885
4886 2002-04-07 Akim Demaille <akim@epita.fr>
4887
4888 * src/reader.c, symtab.c: Remove debugging code.
4889
4890 2002-04-07 Akim Demaille <akim@epita.fr>
4891
4892 Rename all the `bucket's as `symbol_t'.
4893
4894 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4895 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4896 * src/symtab.c, src/symtab.h (bucket): Rename as...
4897 (symbol_t): this.
4898 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4899 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
4900 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4901 (buckets_new, buckets_free, buckets_do): Rename as...
4902 (symbol_list_new, symbol_check_defined, symbol_make_alias)
4903 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4904 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
4905 (symbols_new, symbols_free, symbols_do): these.
4906
4907 2002-04-07 Akim Demaille <akim@epita.fr>
4908
4909 Use lib/hash for the symbol table.
4910
4911 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
4912 EOF.
4913 * src/lex.c (lex): Set the `number' member of new terminals.
4914 * src/reader.c (bucket_check_defined, bucket_make_alias)
4915 (bucket_check_alias_consistence, bucket_translation): New.
4916 (reader, grammar_free, readgram, token_translations_init)
4917 (packsymbols): Adjust.
4918 (reader): Number the predefined tokens.
4919 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
4920 for predefined tokens.
4921 * src/symtab.h (bucket): Remove all the hash table related
4922 members.
4923 * src/symtab.c (symtab): Replace by...
4924 (bucket_table): this.
4925 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4926 (buckets_new, buckets_do): New.
4927
4928 2002-04-07 Akim Demaille <akim@epita.fr>
4929
4930 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
4931 (start_symbol, max_user_token_number, semantic_parser)
4932 (error_token_number): Initialize.
4933 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
4934 Initialize.
4935 (reader): Don't.
4936 (errtoken, eoftoken, undeftoken, axiom): Extern.
4937
4938 2002-04-07 Akim Demaille <akim@epita.fr>
4939
4940 * src/gram.h (rule_s): prec and precsym are now pointers
4941 to the bucket giving the priority/associativity.
4942 Member `associativity' removed: useless.
4943 * src/reduce.c, src/conflicts.c: Adjust.
4944
4945 2002-04-07 Akim Demaille <akim@epita.fr>
4946
4947 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
4948 Properly escape the symbols' TAG when outputting them.
4949
4950 2002-04-07 Akim Demaille <akim@epita.fr>
4951
4952 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4953
4954 2002-04-07 Akim Demaille <akim@epita.fr>
4955
4956 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
4957 (LArule): this, which is an array to rule_t*.
4958 * src/print.c, src/conflicts.c: Adjust.
4959
4960 2002-04-07 Akim Demaille <akim@epita.fr>
4961
4962 * src/gram.h (rule_t): Rename `number' as `user_number'.
4963 `number' is a new member.
4964 Adjust dependencies.
4965 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
4966
4967 2002-04-07 Akim Demaille <akim@epita.fr>
4968
4969 As a result of the previous patch, it is no longer needed
4970 to reorder ritem itself.
4971
4972 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
4973
4974 2002-04-07 Akim Demaille <akim@epita.fr>
4975
4976 Be sure never to walk through RITEMS, but use only data related to
4977 the rules themselves. RITEMS should be banished.
4978
4979 * src/output.c (output_token_translations): Rename as...
4980 (prepare_tokens): this.
4981 In addition to `translate', prepare the muscles `tname' and
4982 `toknum', which were handled by...
4983 (output_rule_data): this.
4984 Remove, and move the remainder of its outputs into...
4985 (prepare_rules): this new routines, which also merges content from
4986 (output_gram): this.
4987 (prepare_rules): Be sure never to walk through RITEMS.
4988 (output_stos): Rename as...
4989 (prepare_stos): this.
4990 (output): Always invoke prepare_states, after all, just don't use it
4991 in the output if you don't need it.
4992
4993 2002-04-07 Akim Demaille <akim@epita.fr>
4994
4995 * src/LR0.c (new_state): Display `nstates' as the name of the
4996 newly created state.
4997 Adjust to initialize first_state and last_state if needed.
4998 Be sure to distinguish the initial from the final state.
4999 (new_states): Create the itemset of the initial state, and use
5000 new_state.
5001 * src/closure.c (closure): Now that the initial state has its
5002 items properly set, there is no need for a special case when
5003 creating `ruleset'.
5004
5005 As a result, now the rule 0, reducing to $axiom, is visible in the
5006 outputs. Adjust the test suite.
5007
5008 * tests/conflicts.at (Solved SR Conflicts)
5009 (Unresolved SR Conflicts): Adjust.
5010 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5011 * tests/conflicts.at (S/R in initial): New.
5012
5013 2002-04-07 Akim Demaille <akim@epita.fr>
5014
5015 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5016 the RHS of the rules.
5017 * src/output.c (output_gram): Likewise.
5018
5019 2002-04-07 Akim Demaille <akim@epita.fr>
5020
5021 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5022 bucket.
5023 Adjust all dependencies.
5024 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5025 `number' of the buckets too.
5026 * src/gram.h: Include `symtab.h'.
5027 (associativity): Move to...
5028 * src/symtab.h: here.
5029 No longer include `gram.h'.
5030
5031 2002-04-07 Akim Demaille <akim@epita.fr>
5032
5033 * src/gram.h, src/gram.c (rules_rhs_length): New.
5034 (ritem_longest_rhs): Use it.
5035 * src/gram.h (rule_t): `number' is a new member.
5036 * src/reader.c (packgram): Set it.
5037 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5038 the end of `rules', and count them out of `nrules'.
5039 (reduce_output, dump_grammar): Adjust.
5040 * src/print.c (print_grammar): It is no longer needed to check for
5041 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5042 * tests/reduce.at (Reduced Automaton): New test.
5043
5044 2002-04-07 Akim Demaille <akim@epita.fr>
5045
5046 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5047 lacking `+ 1' to nrules, Bison reported as useless a token if it
5048 was used solely to set the precedence of the last rule...
5049
5050 2002-04-07 Akim Demaille <akim@epita.fr>
5051
5052 * data/bison.c++, data/bison.simple: Don't output the current file
5053 name in #line, to avoid useless diffs between two identical
5054 outputs under different names.
5055
5056 2002-04-07 Akim Demaille <akim@epita.fr>
5057
5058 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5059 Normalize loops to using `< nrules + 1', not `<= nrules'.
5060
5061 2002-04-07 Akim Demaille <akim@epita.fr>
5062
5063 * TODO: Update.
5064
5065 2002-04-07 Akim Demaille <akim@epita.fr>
5066
5067 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5068 bucket.value as bucket.number.
5069
5070 2002-04-07 Akim Demaille <akim@epita.fr>
5071
5072 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5073 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5074 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5075 RHS, instead of being an index in RITEMS.
5076
5077 2002-04-04 Paul Eggert <eggert@twinsun.com>
5078
5079 * doc/bison.texinfo: Update copyright date.
5080 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5081 (Symbols): Warn about running Bison in one character set,
5082 but compiling and/or running in an incompatible one.
5083 Warn about character code 256, too.
5084
5085 2002-04-03 Paul Eggert <eggert@twinsun.com>
5086
5087 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5088 YYERROR_VERBOSE is nonzero, not whether it is defined.
5089
5090 Merge changes from bison-1_29-branch.
5091
5092 2002-03-20 Paul Eggert <eggert@twinsun.com>
5093
5094 Merge fixes from Debian bison_1.34-1.diff.
5095
5096 * configure.in (AC_PREREQ): 2.53.
5097
5098 2002-03-20 Akim Demaille <akim@epita.fr>
5099
5100 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5101
5102 2002-03-19 Paul Eggert <eggert@twinsun.com>
5103
5104 * src/bison.simple (YYCOPY): New macro.
5105 (YYSTACK_RELOCATE): Use it.
5106 Remove Type arg; no longer needed. All callers changed.
5107 (yymemcpy): Remove; no longer needed.
5108
5109 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5110 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5111
5112 2002-03-19 Akim Demaille <akim@epita.fr>
5113
5114 Test and fix the #line outputs.
5115
5116 * tests/atlocal.at (GCC): New.
5117 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5118 (Prologue synch line, ,%union synch line, Postprologue synch line)
5119 (Action synch line, Epilogue synch line): New tests.
5120 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5121 * data/bison.simple, data/bison.c++: Use it.
5122
5123 2002-03-19 Akim Demaille <akim@epita.fr>
5124
5125 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5126 (Solved SR Conflicts, %expect not enough, %expect right)
5127 (%expect too much): Move to...
5128 * tests/conflicts.at: this new file.
5129
5130 2002-03-19 Akim Demaille <akim@epita.fr>
5131
5132 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5133 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5134 that we can move to enums for instance.
5135 * src/output.c (token_definitions_output): Output a list of
5136 `token-name, token-number' instead of the #define.
5137 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5138
5139 2002-03-14 Akim Demaille <akim@epita.fr>
5140
5141 Use Gettext 0.11.1.
5142
5143 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5144
5145 * data/bison.c++: Make the user able to add members to the generated
5146 parser by subclassing.
5147
5148 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5149
5150 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5151 a character.
5152 Reported by Nicolas Tisserand and Nicolas Burrus.
5153
5154 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5155
5156 * src/reader.c: Warn about lacking semi-colons, do not complain.
5157
5158 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5159
5160 * data/bison.c++: Remove a debug line.
5161
5162 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5163
5164 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5165 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5166 provide a default implementation.
5167
5168 2002-03-04 Akim Demaille <akim@epita.fr>
5169
5170 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5171 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5172 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5173 * tests/semantic.at (Parsing Guards): Similarly.
5174 * src/reader.at (readgram): Complain if the last rule is not ended
5175 with a semi-colon.
5176
5177 2002-03-04 Akim Demaille <akim@epita.fr>
5178
5179 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5180 * src/closure.c: here.
5181 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5182 RTC.
5183 * src/warshall.h, src/warshall.c: Remove.
5184 * tests/sets.at (Broken Closure): Adjust.
5185
5186 2002-03-04 Akim Demaille <akim@epita.fr>
5187
5188 * src/output.c (output_skeleton): tempdir is const.
5189 bytes_read is unused.
5190
5191 2002-03-04 Akim Demaille <akim@epita.fr>
5192
5193 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5194 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5195 Update.
5196 From Michael Hayes.
5197
5198 2002-03-04 Akim Demaille <akim@epita.fr>
5199
5200 * src/closure.c (closure): `r' is unused.
5201
5202 2002-03-04 Akim Demaille <akim@epita.fr>
5203
5204 * tests/sets.at (Broken Closure): Add the ending `;'.
5205 * src/reader.at (readgram): Complain if a rule is not ended with a
5206 semi-colon.
5207
5208 2002-03-04 Akim Demaille <akim@epita.fr>
5209
5210 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5211 (count_sr_conflicts): Use bitset_count.
5212 * src/reduce.c (inaccessable_symbols): Ditto.
5213 (bits_size): Remove.
5214 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5215
5216 2002-03-04 Akim Demaille <akim@epita.fr>
5217
5218 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5219 * src/reduce.c: Remove the `bitset_zero's following the
5220 `bitset_create's, as now it is performed by the latter.
5221
5222 2002-03-04 Akim Demaille <akim@epita.fr>
5223
5224 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5225 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5226 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5227 latest sources from Michael.
5228
5229 2002-03-04 Akim Demaille <akim@epita.fr>
5230
5231 * src/output.c (output): Don't free the grammar.
5232 * src/reader.c (grammar_free): New.
5233 * src/main.c (main): Call it and don't free symtab here.
5234
5235 2002-03-04 Akim Demaille <akim@epita.fr>
5236
5237 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5238 before returning.
5239 Reported by Benoit Perrot.
5240
5241 2002-03-04 Akim Demaille <akim@epita.fr>
5242
5243 Use bitset operations when possible, not loops over bits.
5244
5245 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5246 bitset_or.
5247 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5248 * src/reduce.c (useless_nonterminals): Formatting changes.
5249 * src/warshall.c (TC): Use bitset_or.
5250
5251 2002-03-04 Akim Demaille <akim@epita.fr>
5252
5253 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5254 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5255 Ditto.
5256
5257 2002-03-04 Akim Demaille <akim@epita.fr>
5258
5259 * src/lalr.c (F): Now a bitset*.
5260 Adjust all dependencies.
5261
5262 2002-03-04 Akim Demaille <akim@epita.fr>
5263
5264 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5265 Adjust all dependencies.
5266
5267 2002-03-04 Akim Demaille <akim@epita.fr>
5268
5269 * src/L0.c, src/LR0.h (nstates): Be size_t.
5270 Adjust comparisons (signed vs unsigned).
5271 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5272 bitset*.
5273 Adjust all dependencies.
5274
5275 2002-03-04 Akim Demaille <akim@epita.fr>
5276
5277 * src/closure.c (firsts): Now, also a bitset.
5278 Adjust all dependencies.
5279 (varsetsize): Remove, now unused.
5280 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5281
5282 2002-03-04 Akim Demaille <akim@epita.fr>
5283
5284 * src/print.c: Convert to use bitset.h, not hand coded iterations
5285 over ints.
5286
5287 2002-03-04 Akim Demaille <akim@epita.fr>
5288
5289 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5290
5291 2002-03-04 Akim Demaille <akim@epita.fr>
5292
5293 * src/closure.c (ruleset): Be a bitset.
5294 (rulesetsize): Remove.
5295
5296 2002-03-04 Akim Demaille <akim@epita.fr>
5297
5298 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5299 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5300 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5301 * src/closure.c (fderives): Be an array of bitsets.
5302
5303 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5304
5305 * data/bison.c++: Merge the two generated headers. Insert a copyright
5306 notice in each output file.
5307
5308 2002-02-28 Akim Demaille <akim@epita.fr>
5309
5310 * data/bison.c++: Copy the prologue of bison.simple to fetch
5311 useful M4 definitions, such as b4_header_guard.
5312
5313 2002-02-25 Akim Demaille <akim@epita.fr>
5314
5315 * src/getargs.c (version): Give the name of the authors, and use a
5316 translator friendly scheme for the bgr
5317 copyright notice.
5318
5319 2002-02-25 Akim Demaille <akim@epita.fr>
5320
5321 * src/output.c (header_output): Remove, now handled completely via
5322 M4.
5323
5324 2002-02-25 Akim Demaille <akim@epita.fr>
5325
5326 * m4/m4.m4: New, from CVS Autoconf.
5327 * configure.in: Invoke it.
5328 * src/output.c (output_skeleton): Use its result instead of the
5329 hard coded name.
5330
5331 2002-02-25 Akim Demaille <akim@epita.fr>
5332
5333 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5334 Fileutils 4.1.5.
5335 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5336 * src/output.c (output_skeleton): Use mkstemp to create a real
5337 temporary file.
5338 Move the filling of `skeleton' and its muscle to...
5339 (prepare): here.
5340 (output): Move the definition of the prologue muscle to...
5341 (prepare): here.
5342 * src/system.h (DEFAULT_TMPDIR): New.
5343
5344 2002-02-14 Paul Eggert <eggert@twinsun.com>
5345
5346 Remove the support for C++ namespace cleanliness; it was
5347 causing more problems than it was curing, since it didn't work
5348 properly on some nonstandard C++ compilers. This can wait
5349 for a proper C++ parser.
5350
5351 * NEWS: Document this.
5352 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5353 of C++, as it's treated like C now.
5354 * src/bison.simple (YYSTD): Remove.
5355 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5356 Treat C++ just like Standard C instead of trying to support
5357 namespace cleanliness.
5358
5359 2002-02-14 Akim Demaille <akim@epita.fr>
5360
5361 * tests/regression.at (else): Adjust to Andreas' change.
5362
5363 2002-02-14 Akim Demaille <akim@epita.fr>
5364
5365 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5366
5367 2002-02-13 Andreas Schwab <schwab@suse.de>
5368
5369 * src/output.c (output_rule_data): Don't output NULL, it might
5370 not be defined yet.
5371
5372 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5373
5374 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5375 (Copyright notice): Update.
5376
5377 2002-02-11 Akim Demaille <akim@epita.fr>
5378
5379 * tests/regression.at (%nonassoc and eof): Don't include
5380 nonportable headers.
5381
5382 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5383
5384 * data/bison.c++: Correct error recovery. Make the user able to
5385 initialize the starting location.
5386
5387 2002-02-07 Akim Demaille <akim@epita.fr>
5388
5389 * tests/input.at: New.
5390
5391 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5392
5393 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5394 more consistent when naming methods and variables. Put preprocessor
5395 directives around tables only needed for debugging.
5396
5397 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5398
5399 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5400 C++ parsers.
5401 (yy::b4_name::parse): Use print_.
5402
5403 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5404
5405 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5406
5407 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5408
5409 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5410 C++ parsers.
5411 (yy::b4_name::parse): Build verbose error messages, and use error_.
5412
5413 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5414
5415 * data/bison.c++: Fix m4 quoting in comments.
5416
5417 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5418
5419 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5420 not expanded by m4.
5421
5422 2002-02-05 Akim Demaille <akim@epita.fr>
5423
5424 * data/bison.c++: Adjust to the M4 back end.
5425 More is certainly needed.
5426
5427 2002-02-05 Akim Demaille <akim@epita.fr>
5428
5429 Give a try to M4 as a back end.
5430
5431 * lib/readpipe.c: New, from wdiff.
5432 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5433 BISON_HAIRY.
5434 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5435 specific values. Now it is m4 that performs the lookup.
5436 * src/parse-skel.y: Remove.
5437 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5438 * src/output.c (actions_output, guards_output)
5439 (token_definitions_output): No longer keeps track of the output
5440 line number, hence remove the second argument.
5441 (guards_output): Check against the guard member of a rule, not the
5442 action member.
5443 Adjust callers.
5444 (output_skeleton): Don't look for the skeleton location, let m4 do
5445 that.
5446 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5447 file will be used.
5448 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5449 (prepare): Given that for the time being changesyntax is not
5450 usable in M4, rename the muscles using `-' to `_'.
5451 Define `defines_flag', `output_parser_name' and `output_header_name'.
5452 * src/output.h (actions_output, guards_output)
5453 (token_definitions_output): Adjust prototypes.
5454 * src/scan-skel.l: Instead of scanning the skeletons, it now
5455 processes the output of m4: `__oline__' and `#output'.
5456 * data/bison.simple: Adjust to be used by M4(sugar).
5457 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5458 to date.
5459 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5460 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5461 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5462 shamelessly stolen from CVS Autoconf.
5463
5464 2002-02-05 Akim Demaille <akim@epita.fr>
5465
5466 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5467 * configure.in: Check for the declarations of free and malloc.
5468 * src/muscle_tab.c: Adjust.
5469
5470 2002-02-05 Akim Demaille <akim@epita.fr>
5471
5472 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5473 which have no values.
5474
5475 2002-02-05 Akim Demaille <akim@epita.fr>
5476
5477 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5478 * data/: here.
5479
5480 2002-01-29 Paul Eggert <eggert@twinsun.com>
5481
5482 * src/bison.simple (YYSIZE_T): Do not define merely because
5483 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5484 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5485
5486 2002-01-27 Akim Demaille <akim@epita.fr>
5487
5488 Fix `%nonassoc and eof'.
5489
5490 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5491 which were not properly copied! Replace
5492 memcpy (res->errs, src->errs, src->nerrs);
5493 with
5494 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5495 !!!
5496 * tests/regression.at (%nonassoc and eof): Adjust to newest
5497 Autotest: `.' is not in the PATH.
5498
5499 2002-01-27 Akim Demaille <akim@epita.fr>
5500
5501 * tests/sets.at (AT_EXTRACT_SETS): New.
5502 (Nullable): Use it.
5503 (Firsts): New.
5504
5505 2002-01-26 Akim Demaille <akim@epita.fr>
5506
5507 * tests/actions.at, tests/calc.at, tests/headers.at,
5508 * tests/torture.at: Adjust to the newest Autotest which no longer
5509 forces `.' in the PATH.
5510
5511 2002-01-25 Akim Demaille <akim@epita.fr>
5512
5513 * tests/regression.at (%nonassoc and eof): New.
5514 Suggested by Robert Anisko.
5515
5516 2002-01-24 Akim Demaille <akim@epita.fr>
5517
5518 Bison dumps core when trying to complain about broken input files.
5519 Reported by Cris van Pelt.
5520
5521 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5522 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5523 into...
5524 (Invalid inputs): Strengthen: exercise parse_percent_token.
5525
5526 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5527
5528 * src/Makefile.am: Add bison.c++.
5529 * src/bison.c++: New skeleton.
5530
5531 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5532
5533 * po/it.po: New.
5534
5535 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5536
5537 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5538
5539 2002-01-20 Marc Autret <marc@gnu.org>
5540
5541 * src/files.c (compute_output_file_names): Fix
5542
5543 2002-01-20 Marc Autret <marc@gnu.org>
5544
5545 * tests/output.at: New test.
5546 * src/files.c (compute_base_names): Don't map extensions when
5547 the YACC flag is set, use defaults.
5548 Reported by Evgeny Stambulchik.
5549
5550 2002-01-20 Marc Autret <marc@gnu.org>
5551
5552 * src/system.h: Need to define __attribute__ away for non-GCC
5553 compilers as well (i.e. the vendor C compiler).
5554 Suggested by Albert Chin-A-Young.
5555
5556 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5557
5558 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5559 canonical definition.
5560 * src/system.h: Use the canonical definition for PARAMS (avoids
5561 a conflict with the macro from lib/hash.h).
5562
5563 2002-01-11 Akim Demaille <akim@epita.fr>
5564
5565 * configure.in: Use AC_FUNC_STRNLEN.
5566 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5567
5568 2002-01-09 Akim Demaille <akim@epita.fr>
5569
5570 * src/files.c, src/files.h (output_infix): New.
5571 (tab_extension): Remove.
5572 (compute_base_names): Compute the former, drop the latter.
5573 * src/output.c (prepare): Insert the muscles `output-infix', and
5574 `output-suffix'.
5575 * src/parse-skel.y (string, string.1): New.
5576 (section.header): Use it.
5577 (section.yacc): Remove.
5578 (prefix): Remove too.
5579 * src/scan-skel.l: Adjust.
5580 * src/bison.simple, src/bison.hairy: Adjust.
5581
5582 2002-01-09 Akim Demaille <akim@epita.fr>
5583
5584 * configure.in (WERROR_CFLAGS): Compute it.
5585 * src/Makefile.am (CFLAGS): Pass it.
5586 * tests/atlocal.in (CFLAGS): Idem.
5587 * src/files.c: Fix a few warnings.
5588 (get_extension_index): Remove, unused.
5589
5590 2002-01-08 Akim Demaille <akim@epita.fr>
5591
5592 * src/getargs.c (AS_FILE_NAME): New.
5593 (getargs): Use it to convert DOSish file names.
5594 * src/files.c (base_name): Rename as full_base_name to avoid
5595 clashes with `base_name ()'.
5596 (filename_split): New.
5597 (compute_base_names): N-th rewrite, using filename_split.
5598
5599 2002-01-08 Akim Demaille <akim@epita.fr>
5600
5601 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5602 New, stolen from the Fileutils 4.1.
5603 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5604 * configure.in: Check for the presence of memrchr, and of its
5605 prototype.
5606
5607 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5608
5609 * lib/hash.h (__P): Added definition for this macro.
5610 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5611 BUILT_SOURCES, to ensure they are generated first.
5612 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5613 %error-verbose to allow bootstrapping with bison 1.30x.
5614
5615 2002-01-06 Akim Demaille <akim@epita.fr>
5616
5617 * src/reader.c (parse_braces): Don't fetch the next char, the
5618 convention is to fetch on entry.
5619 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5620 'switch' without a following semicolon.
5621 * tests/regression.at (braces parsing): New.
5622
5623 2002-01-06 Akim Demaille <akim@epita.fr>
5624
5625 Bison is dead wrong in its RR conflict reports.
5626
5627 * tests/torture.at (GNU Cim Grammar): New.
5628 * src/conflicts.c (count_rr_conflicts): Fix.
5629
5630 2002-01-06 Akim Demaille <akim@epita.fr>
5631
5632 Creating package.m4 from configure.ac causes too many problems.
5633
5634 * tests/Makefile.am (package.m4): Create it by hand,
5635 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5636
5637 2002-01-06 Akim Demaille <akim@epita.fr>
5638
5639 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5640 skeleton.h.
5641
5642 2002-01-04 Paul Eggert <eggert@twinsun.com>
5643
5644 * doc/bison.texinfo (Debugging):
5645 Remove YYSTDERR; it's no longer defined or used.
5646 Also, s/cstdio.h/cstdio/.
5647
5648 2002-01-03 Akim Demaille <akim@epita.fr>
5649
5650 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5651
5652 2002-01-03 Akim Demaille <akim@epita.fr>
5653
5654 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5655 tracing code to --trace, wait for a better --trace option, with
5656 args.
5657
5658 2002-01-03 Akim Demaille <akim@epita.fr>
5659
5660 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5661 The ISO C++ standard is extremely clear about it: stderr is
5662 considered a macro, not a regular symbol (see table 94 `Header
5663 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5664 Therefore std:: does not apply to it. It still does with fprintf.
5665 Also, s/cstdio.h/cstdio/.
5666
5667 2002-01-03 Akim Demaille <akim@epita.fr>
5668
5669 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5670 for non system headers.
5671
5672 2002-01-02 Akim Demaille <akim@epita.fr>
5673
5674 Equip the skeleton chain with location tracking, runtime trace,
5675 pure parser and scanner.
5676
5677 * src/parse-skel.y: Request a pure parser, locations, and prefix
5678 renaming.
5679 (%union): Having several members with the same type does not help
5680 type mismatches, simplify.
5681 (YYPRINT, yyprint): New.
5682 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5683 (skel_error): this.
5684 Handle locations.
5685 * src/scan-skel.l: Adjust to these changes.
5686 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5687 (LOCATION_PRINT, skel_control_t): New.
5688
5689 2001-12-30 Akim Demaille <akim@epita.fr>
5690
5691 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5692 replace `gb' with BLANKS.
5693 * src/scan-skel.l: Adjust.
5694
5695 2001-12-30 Akim Demaille <akim@epita.fr>
5696
5697 * src/system.h: We don't need nor want bcopy.
5698 Throw away MS-DOS crap: we don't need getpid.
5699 * configure.in: We don't need strndup. It was even causing
5700 problems: because Flex includes the headers *before* us,
5701 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5702 not visible.
5703 * lib/xstrndup.c: New.
5704 * src/scan-skel.l: Use it.
5705 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5706 * src/parse-skel.y: Use %directives instead of #defines.
5707
5708 2001-12-30 Akim Demaille <akim@epita.fr>
5709
5710 * src/skeleton.h: New.
5711 * src/output.c (output_parser, output_master_parser): Remove, dead
5712 code.
5713 * src/output.h (get_lines_number, actions_output, guards_output)
5714 (token_definitions_output): Prototype them.
5715 * src/parse-skel.y: Add the license notice.
5716 Include output.h and skeleton.h.
5717 (process_skeleton): Returns void, and takes a single parameter.
5718 * src/scan-skel.l: Add the license notice.
5719 Include skeleton.h.
5720 Don't use %option yylineno: it seems that then Flex imagines
5721 REJECT has been used, and therefore it won't reallocate its
5722 buffers (which makes no other sense to me than a bug). It results
5723 in warnings for `unused: yy_flex_realloc'.
5724
5725 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5726
5727 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5728 (MUSCLE_INSERT_PREFIX): ...to there.
5729 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5730 (MUSCLE_INSERT_PREFIX): Move from here...
5731
5732 * src/bison.hairy: Add a section directive. Put braces around muscle
5733 names. This parser skeleton is still broken, but Bison should not
5734 choke on a bad muscle 'syntax'.
5735 * src/bison.simple: Add a section directive. Put braces around muscle
5736 names.
5737
5738 * src/files.h (strsuffix, stringappend): Add declarations.
5739 (tab_extension): Add declaration.
5740 (short_base_name): Add declaration.
5741
5742 * src/files.c (strsuffix, stringappend): No longer static. These
5743 functions are used in the skeleton parser.
5744 (tab_extension): New.
5745 (compute_base_names): Use the computations done in this function
5746 to guess if the generated parsers should have '.tab' in their
5747 names.
5748 (short_base_name): No longer static.
5749
5750 * src/output.c (output_skeleton): New.
5751 (output): Disable call to output_master_parser, and give a try to
5752 a new skeleton handling system.
5753 (guards_output, actions_output): No longer static.
5754 (token_definitions_output, get_lines_number): No longer static.
5755
5756 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5757
5758 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5759 parse-skel.y.
5760
5761 * src/parse-skel.y: New file.
5762 * src/scan-skel.l: New file.
5763
5764 2001-12-29 Akim Demaille <akim@epita.fr>
5765
5766 %name-prefix is broken.
5767
5768 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5769 Adjust all dependencies.
5770 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5771 %name-prefix.
5772
5773 Renaming yylval but not yylloc is not consistent. Now we do.
5774
5775 * src/bison.simple: Prefix yylloc if used.
5776 * doc/bison.texinfo (Decl Summary): Document that.
5777
5778 2001-12-29 Akim Demaille <akim@epita.fr>
5779
5780 * doc/bison.texinfo: Promote `%long-directive' over
5781 `%long_directive'.
5782 Remove all references to fixed-output-files, yacc is enough.
5783
5784 2001-12-29 Akim Demaille <akim@epita.fr>
5785
5786 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5787 user prologue. These are defaults.
5788 * tests/actions.at (Mid-rule actions): Make sure the user can
5789 define YYDEBUG and YYERROR_VERBOSE.
5790
5791 2001-12-29 Akim Demaille <akim@epita.fr>
5792
5793 * src/output.c (header_output): Don't forget to export YYLTYPE and
5794 yylloc.
5795 * tests/headers.at (export YYLTYPE): New, make sure it does.
5796 * tests/regression.at (%union and --defines, Invalid CPP headers):
5797 Move to...
5798 * tests/headers.at: here.
5799
5800 2001-12-29 Akim Demaille <akim@epita.fr>
5801
5802 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5803
5804 2001-12-29 Akim Demaille <akim@epita.fr>
5805
5806 * tests/actions.at (Mid-rule actions): Output on a single line
5807 instead of several.
5808
5809 2001-12-29 Akim Demaille <akim@epita.fr>
5810
5811 * doc/bison.texinfo: Formatting changes.
5812
5813 2001-12-29 Akim Demaille <akim@epita.fr>
5814
5815 Don't store the token defs in a muscle, just be ready to output it
5816 on command. Now possible via `symbols'. Fixes a memory leak.
5817
5818 * src/output.c (token_definitions_output): New.
5819 (output_parser, header_output): Use it.
5820 * src/reader.c (symbols_save): Remove.
5821
5822 2001-12-29 Akim Demaille <akim@epita.fr>
5823
5824 * src/bison.simple: Do not provide a default for YYSTYPE and
5825 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5826 default.
5827
5828 2001-12-29 Akim Demaille <akim@epita.fr>
5829
5830 Mid-rule actions are simply... ignored!
5831
5832 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5833 the empty-rule associated to the dummy symbol, not to the host
5834 rule.
5835 * tests/actions.at (Mid-rule actions): New.
5836
5837 2001-12-29 Akim Demaille <akim@epita.fr>
5838
5839 Memory leak.
5840
5841 * src/reader.c (reader): Free grammar.
5842
5843 2001-12-29 Akim Demaille <akim@epita.fr>
5844
5845 Memory leak.
5846
5847 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5848 since it allocates it for each state, although only one is needed.
5849 (allocate_storage): Do it here.
5850
5851 2001-12-29 Akim Demaille <akim@epita.fr>
5852
5853 * src/options.h, src/options.c (create_long_option_table): Rename
5854 as...
5855 (long_option_table_new): this, with a clearer prototype.
5856 (percent_table): Remove, unused,
5857 * src/getargs.c (getargs): Adjust.
5858
5859 2001-12-29 Akim Demaille <akim@epita.fr>
5860
5861 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5862 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5863 as states.
5864
5865 2001-12-29 Akim Demaille <akim@epita.fr>
5866
5867 * src/lalr.c (build_relations): Rename `states' as `states1'.
5868 Sorry, I don't understand exactly what it is, no better name...
5869
5870 2001-12-29 Akim Demaille <akim@epita.fr>
5871
5872 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5873 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5874 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5875 as rules.
5876
5877 2001-12-29 Akim Demaille <akim@epita.fr>
5878
5879 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5880 ago.
5881
5882 2001-12-29 Akim Demaille <akim@epita.fr>
5883
5884 * src/reader.c, src/reader.h (user_toknums): Remove.
5885 Adjust all users to use symbols[i]->user_token_number.
5886
5887 2001-12-29 Akim Demaille <akim@epita.fr>
5888
5889 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5890 Adjust all users to use symbols[i]->prec or ->assoc.
5891
5892 2001-12-29 Akim Demaille <akim@epita.fr>
5893
5894 * src/reader.c, src/reader.h (tags): Remove.
5895 Adjust all users to use symbols[i]->tag.
5896
5897 2001-12-29 Akim Demaille <akim@epita.fr>
5898
5899 * src/gram.h, src/gram.c (symbols): New, similar to state_table
5900 and rule_table.
5901 * src/reader.c (packsymbols): Fill this table.
5902 Drop sprec.
5903 * src/conflicts.c (resolve_sr_conflict): Adjust.
5904 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
5905 single table.
5906 Use symbols[i]->tag instead of tags[i].
5907
5908 2001-12-29 Akim Demaille <akim@epita.fr>
5909
5910 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
5911 In addition, put a comment in there, to replace...
5912 * tests/regression.at (%union and C comments): Remove.
5913
5914 2001-12-29 Akim Demaille <akim@epita.fr>
5915
5916 * tests/regression.at (Web2c Actions): Blindly move the actual
5917 output as expected output. The contents *seem* right to me, but I
5918 can't pretend reading perfectly parser tables... Nonetheless, all
5919 the other tests pass correctly, the table look OK, even though the
5920 presence of `$axiom' is to be noted: AFAICS it is useless (but
5921 harmless).
5922
5923 2001-12-29 Akim Demaille <akim@epita.fr>
5924
5925 * src/reader.c (readgram): Don't add the rule 0 if there were no
5926 rules read. In other words, add it _after_ having performed
5927 grammar sanity checks.
5928 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
5929
5930 2001-12-29 Akim Demaille <akim@epita.fr>
5931
5932 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
5933 visible, and some states have now a different number.
5934
5935 2001-12-29 Akim Demaille <akim@epita.fr>
5936
5937 * src/reader.c (readgram): Bind the initial rule's lineno to that
5938 of the first rule.
5939 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
5940 (Solved SR Conflicts): Adjust rule 0's line number.
5941
5942 2001-12-29 Akim Demaille <akim@epita.fr>
5943
5944 Fix the `GAWK Grammar' failure.
5945
5946 * src/LR0.c (final_state): Initialize to -1 so that we do compute
5947 the reductions of the first state which was mistakenly confused
5948 with the final state because precisely final_state was initialized
5949 to 0.
5950 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
5951 now noticed by Bison.
5952 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
5953 have a reduction on $default.
5954
5955 2001-12-29 Akim Demaille <akim@epita.fr>
5956
5957 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
5958 rule line numbers.
5959 * src/closure.c (print_closure): Likewise.
5960 * src/derives.c (print_derives): Likewise.
5961 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
5962 now.
5963
5964 2001-12-29 Akim Demaille <akim@epita.fr>
5965
5966 * src/lalr.c (lookaheads_print): New.
5967 (lalr): Call it when --trace-flag.
5968 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
5969 are dumped.
5970
5971 2001-12-29 Akim Demaille <akim@epita.fr>
5972
5973 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
5974 when walking through ritem, even via rule->rhs.
5975 * src/reduce.c (dump_grammar, useful_production, reduce_output)
5976 (useful_production, useless_nonterminals): Likewise.
5977 (reduce_grammar_tables): Likewise, plus update nritems.
5978 * src/nullable.c (set_nullable): Likewise.
5979 * src/lalr.c (build_relations): Likewise.
5980 * tests/sets.at (Nullable): Adjust.
5981 Fortunately, now, the $axiom is no longer nullable.
5982
5983 2001-12-29 Akim Demaille <akim@epita.fr>
5984
5985 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
5986 the 0-sentinel.
5987 * src/gram.c (ritem_longest_rhs): Likewise.
5988 * src/reduce.c (nonterminals_reduce): Likewise.
5989 * src/print_graph.c (print_graph): Likewise.
5990 * src/output.c (output_rule_data): Likewise.
5991 * src/nullable.c (set_nullable): Likewise.
5992
5993 2001-12-29 Akim Demaille <akim@epita.fr>
5994
5995 * src/output.c: Comment changes.
5996
5997 2001-12-27 Paul Eggert <eggert@twinsun.com>
5998
5999 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6000 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6001 Sparc, as they were causing more porting problems than the
6002 (minor) performance improvement was worth.
6003
6004 Also, catch up with 1.31's YYSTD.
6005
6006 2001-12-27 Akim Demaille <akim@epita.fr>
6007
6008 * src/output.c (output_gram): Rely on nritems, not the
6009 0-sentinel. See below.
6010 Use -1 as separator, not 0.
6011 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6012 Rely on -1 as separator in yyrhs, instead of 0.
6013 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6014 twice `Now at end of input', therefore there are two lines less to
6015 expect.
6016
6017 2001-12-27 Akim Demaille <akim@epita.fr>
6018
6019 * tests/regression.at (Unresolved SR Conflicts):
6020 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6021 below.
6022
6023 2001-12-27 Akim Demaille <akim@epita.fr>
6024
6025 * src/LR0.c (new_state): Recognize the final state by the fact it
6026 is reached by eoftoken.
6027 (insert_start_shifting_state, insert_eof_shifting_state)
6028 (insert_accepting_state, augment_automaton): Remove, since now
6029 these states are automatically computed from the initial state.
6030 (generate_states): Adjust.
6031 * src/print.c: When reporting a rule number to the user, substract
6032 1, so that the axiom rule is rule 0, and the first user rule is 1.
6033 * src/reduce.c: Likewise.
6034 * src/print_graph.c (print_core): For the time being, just as for
6035 the report, depend upon --trace-flags to dump the full set of
6036 items.
6037 * src/reader.c (readgram): Once the grammar read, insert the rule
6038 0: `$axiom: START-SYMBOL $'.
6039 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6040 number of the states has changed (the final state is no longer
6041 necessarily the last), catch up.
6042
6043 2001-12-27 Akim Demaille <akim@epita.fr>
6044
6045 Try to make the use of the eoftoken valid. Given that its value
6046 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6047 is used instead of > 0 where appropriate, (ii), depend upon nritems
6048 instead of the 0-sentinel.
6049
6050 * src/gram.h, src/gram.c (nritems): New.
6051 Expected to be duplication of nitems, but for the time being...
6052 * src/reader.c (packgram): Assert nritems and nitems are equal.
6053 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6054 * src/closure.c (print_closure, print_fderives): Likewise.
6055 * src/gram.c (ritem_print): Likewise.
6056 * src/print.c (print_core, print_grammar): Likewise.
6057 * src/print_graph.c: Likewise.
6058
6059 2001-12-27 Akim Demaille <akim@epita.fr>
6060
6061 * src/main.c (main): If there are complains after grammar
6062 reductions, then output the report anyway if requested, then die.
6063 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6064 * src/reader.c (eoftoken): New.
6065 (parse_token_decl): If the token being defined has value `0', it
6066 is the eoftoken.
6067 (packsymbols): No longer hack `tags' to insert `$' by hand.
6068 Be sure to preserve the value of the eoftoken.
6069 (reader): Make sure eoftoken is defined.
6070 Initialize nsyms to 0: now eoftoken is created just like the others.
6071 * src/print.c (print_grammar): Don't special case the eof token.
6072 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6073 lie anyway, albeit pleasant.
6074 * tests/calc.at: Exercise error messages with eoftoken.
6075 Change the grammar so that empty input is invalid.
6076 Adjust expectations.
6077 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6078
6079 2001-12-27 Akim Demaille <akim@epita.fr>
6080
6081 * configure.in: Check the protos of strchr ans strspn.
6082 Replace strchr if needed.
6083 * src/system.h: Provide the protos of strchr, strspn and memchr if
6084 missing.
6085 * lib/strchr.c: New.
6086 * src/reader.c (symbols_save): Use strchr.
6087
6088 2001-12-27 Akim Demaille <akim@epita.fr>
6089
6090 * src/print.c, src/print_graph.c (escape): New.
6091 Use it to quote the TAGS outputs.
6092 * src/print_graph.c (print_state): Now errors are in red, and
6093 reductions in green.
6094 Prefer high to wide: output the state number on a line of its own.
6095
6096 2001-12-27 Akim Demaille <akim@epita.fr>
6097
6098 * src/state.h, src/state.c (reductions_new): New.
6099 * src/LR0.c (set_state_table): Let all the states have a
6100 `reductions', even if reduced to 0.
6101 (save_reductions): Adjust.
6102 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6103 * src/print.c (print_reductions, print_actions): Adjust.
6104 * src/output.c (action_row): Adjust.
6105
6106 2001-12-27 Akim Demaille <akim@epita.fr>
6107
6108 * src/state.h, src/state.c (errs_new, errs_dup): New.
6109 * src/LR0.c (set_state_table): Let all the states have an errs,
6110 even if reduced to 0.
6111 * src/print.c (print_errs, print_reductions): Adjust.
6112 * src/output.c (output_actions, action_row): Adjust.
6113 * src/conflicts.c (resolve_sr_conflict): Adjust.
6114
6115 2001-12-27 Akim Demaille <akim@epita.fr>
6116
6117 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6118
6119 2001-12-27 Akim Demaille <akim@epita.fr>
6120
6121 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6122 * src/print.c: here.
6123 (lookaheadset, shiftset): New, used as additional storage by
6124 print_reductions.
6125 (print_results): Adjust.
6126 (print_shifts, print_gotos, print_errs): New, extracted from...
6127 (print_actions): here.
6128 * src/print_graph.c (print_actions): Remove dead code.
6129
6130 2001-12-27 Akim Demaille <akim@epita.fr>
6131
6132 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6133 `$n' and `@n'.
6134
6135 2001-12-27 Akim Demaille <akim@epita.fr>
6136
6137 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6138 (build_relations): Adjust.
6139
6140 2001-12-27 Akim Demaille <akim@epita.fr>
6141
6142 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6143 duplication.
6144
6145 2001-12-27 Akim Demaille <akim@epita.fr>
6146
6147 * src/reader.c (packgram): Catch nitems overflows.
6148
6149 2001-12-27 Akim Demaille <akim@epita.fr>
6150
6151 * src/files.c, src/files.h (guard_obstack): Remove.
6152 * src/output.c (output): Adjust.
6153 * src/reader.c (parse_braces): New, factoring...
6154 (copy_action, copy_guard): these two which are renamed as...
6155 (parse_action, parse_guard): these.
6156 As a voluntary consequence, using braces around guards is now
6157 mandatory.
6158
6159 2001-12-27 Akim Demaille <akim@epita.fr>
6160
6161 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6162 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6163 members.
6164 (symbol_list_new): Adjust.
6165 (copy_action): action_line is the first line, not the last.
6166 (copy_guard): Just as for actions, store the `action' only, not
6167 the switch/case/break flesh.
6168 Don't parse the user action that might follow the guard, let...
6169 (readgram): do it, i.e., now, there can be an action after a
6170 guard.
6171 In other words the guard is just explicitly optional.
6172 (packgram): Adjust.
6173 * src/output.c (guards_output): New.
6174 (output_parser): Call it when needed.
6175 (output): Also free the guard and attrs obstacks.
6176 * src/files.c, src/files.h (obstack_save): Remove.
6177 (output_files): Remove.
6178 As a result, if one needs the former `.act' file, using an
6179 appropriate skeleton which requires actions and guards is now
6180 required.
6181 * src/main.c (main): Adjust.
6182 * tests/semantic.at: New.
6183 * tests/regression.at: Use `input.y' as input file name.
6184 Avoid 8+3 problems by requiring input.c when the test needs the
6185 parser.
6186
6187 2001-12-27 Akim Demaille <akim@epita.fr>
6188
6189 * src/reader.c (symbol_list_new): Be sure to initialize all the
6190 fields.
6191
6192 2001-12-27 Akim Demaille <akim@epita.fr>
6193
6194 All the hacks using a final pseudo state are now useless.
6195
6196 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6197 * src/lalr.c (nLA): New.
6198 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6199 instead of lookaheadsp from the pseudo state (nstate + 1).
6200
6201 2001-12-27 Akim Demaille <akim@epita.fr>
6202
6203 * src/output.c (action_row, token_actions): Use a state_t instead
6204 of a integer, and nlookaheads instead of the following state's
6205 lookaheadsp.
6206
6207 2001-12-27 Akim Demaille <akim@epita.fr>
6208
6209 * src/conflicts.c (log_resolution, flush_shift)
6210 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6211 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6212 (conflicts_print, print_reductions): Use a state_t instead of an
6213 integer when referring to a state.
6214 As much as possible, depend upon nlookaheads, instead of the
6215 `lookaheadsp' member of the following state (since lookaheads of
6216 successive states are successive, the difference between state n + 1
6217 and n served as the number of lookaheads for state n).
6218 * src/lalr.c (add_lookback_edge): Likewise.
6219 * src/print.c (print_core, print_actions, print_state)
6220 (print_results): Likewise.
6221 * src/print_graph.c (print_core, print_actions, print_state)
6222 (print_graph): Likewise.
6223 * src/conflicts.h: Adjust.
6224
6225 2001-12-27 Akim Demaille <akim@epita.fr>
6226
6227 * src/bison.hairy: Formatting/comment changes.
6228 ANSIfy.
6229 Remove `register' indications.
6230 Add plenty of `static'.
6231
6232 2001-12-27 Akim Demaille <akim@epita.fr>
6233
6234 * src/output.c (prepare): Drop the muscle `ntbase' which
6235 duplicates ntokens.
6236 * src/bison.simple: Formatting/comment changes.
6237 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6238 is an undocumented synonym.
6239
6240 2001-12-22 Akim Demaille <akim@epita.fr>
6241
6242 * src/output.c (output_table_data): Change the prototype to use
6243 `int' for array ranges: some invocations do pass an int, not a
6244 short.
6245 Reported by Wayne Green.
6246
6247 2001-12-22 Akim Demaille <akim@epita.fr>
6248
6249 Some actions of web2c.y are improperly triggered.
6250 Reported by Mike Castle.
6251
6252 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6253 * tests/regression.at (Web2c): Rename as...
6254 (Web2c Report): this.
6255 (Web2c Actions): New.
6256
6257 2001-12-22 Akim Demaille <akim@epita.fr>
6258
6259 Reductions in web2c.y are improperly reported.
6260 Reported by Mike Castle.
6261
6262 * src/conflicts.c (print_reductions): Fix.
6263 * tests/regression.at (Web2c): New.
6264
6265 2001-12-18 Akim Demaille <akim@epita.fr>
6266
6267 Some host fail on `assert (!"foo")', which expands to
6268 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6269 Reported by Nelson Beebee.
6270
6271 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6272 `#define it_succeeded 0' and `assert (it_succeeded)'.
6273
6274 2001-12-17 Marc Autret <autret_m@epita.fr>
6275
6276 * src/bison.simple: Don't hard code the skeleton line and filename.
6277 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6278 New line counter 'skeleton_line' (skeleton-line muscle).
6279
6280 2001-12-17 Paul Eggert <eggert@twinsun.com>
6281
6282 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6283 YYDEBUG must be defined to a nonzero value.
6284
6285 * src/bison.simple (yytname): Do not assume that the user defines
6286 YYDEBUG to a properly parenthesized expression.
6287
6288 2001-12-17 Akim Demaille <akim@epita.fr>
6289
6290 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6291 nlookaheads is a new member.
6292 Adjust all users.
6293 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6294 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6295 state.
6296
6297 2001-12-17 Akim Demaille <akim@epita.fr>
6298
6299 * src/files.h, src/files.c (open_files, close_files): Remove.
6300 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6301 let...
6302 * src/reader.c (reader): Do it.
6303
6304 2001-12-17 Akim Demaille <akim@epita.fr>
6305
6306 * src/conflicts.c (print_reductions): Formatting changes.
6307
6308 2001-12-17 Akim Demaille <akim@epita.fr>
6309
6310 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6311 (flush_reduce): New.
6312 (resolve_sr_conflict): Adjust.
6313
6314 2001-12-17 Akim Demaille <akim@epita.fr>
6315
6316 * src/output.c (output_obstack): Be static and rename as...
6317 (format_obstack): this, to avoid any confusion with files.c's
6318 output_obstack.
6319 * src/reader.h (muscle_obstack): Move to...
6320 * src/output.h: here, since it's defined in output.c.
6321
6322 2001-12-17 Akim Demaille <akim@epita.fr>
6323
6324 * src/output.c (action_row, save_column, default_goto)
6325 (sort_actions, matching_state, pack_vector): Better variable
6326 locality.
6327
6328 2001-12-17 Akim Demaille <akim@epita.fr>
6329
6330 * src/output.c: Various formatting changes.
6331
6332 2001-12-17 Akim Demaille <akim@epita.fr>
6333
6334 * src/files.c (output_files): Free the output_obstack.
6335 * src/main.c (main): Call print and print_graph conditionally.
6336 * src/print.c (print): Work unconditionally.
6337 * src/print_graph.c (print_graph): Work unconditionally.
6338 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6339
6340 2001-12-16 Marc Autret <autret_m@epita.fr>
6341
6342 * src/output.c (actions_output): Fix. When we use %no-lines,
6343 there is one less line per action.
6344
6345 2001-12-16 Marc Autret <autret_m@epita.fr>
6346
6347 * src/bison.simple: Remove a useless #line directive.
6348 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6349 * src/output.c (get_lines_number): New.
6350 (output_parser): Adjust, now takes care about the lines of a
6351 output muscles.
6352 Fix line numbering.
6353 (actions_output): Computes the number of lines taken by actions.
6354 (output_master_parser): Insert new skeleton which is the name of
6355 the output parser file name.
6356
6357 2001-12-15 Marc Autret <autret_m@epita.fr>
6358
6359 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6360
6361 2001-12-15 Marc Autret <autret_m@epita.fr>
6362
6363 * src/output.c (output_gram): Keep track of the hairy one.
6364
6365 2001-12-15 Akim Demaille <akim@epita.fr>
6366
6367 Make `make distcheck' work.
6368
6369 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6370 system.h which uses libgettext.h.
6371
6372 2001-12-15 Akim Demaille <akim@epita.fr>
6373
6374 * src/nullable.c (set_nullable): Useless rules must be skipped,
6375 otherwise, since we range over their symbols, we might look at a
6376 nonterminal which no longer ``exists'', i.e., it is not counted in
6377 `nvars', hence we overflow our arrays.
6378
6379 2001-12-15 Akim Demaille <akim@epita.fr>
6380
6381 The header can also be produced directly, without any obstack!
6382 Yahoo!
6383
6384 * src/files.c, src/files.h (defines_obstack): Remove.
6385 (compute_header_macro): Global.
6386 (defines_obstack_save): Remove.
6387 * src/reader.c (parse_union_decl): No longer output to
6388 defines_obstack: its content can be found in the `stype' muscle
6389 anyway.
6390 (output_token_translations): Merge into...
6391 (symbols_output): this.
6392 Rename as...
6393 (symbols_save): this.
6394 (reader): Adjust.
6395 * src/output.c (header_output): New.
6396 (output): Call it.
6397
6398 2001-12-15 Akim Demaille <akim@epita.fr>
6399
6400 * src/reader.c (parse_union_decl): Instead of handling two obstack
6401 simultaneously, use one to define the `stype' muscle, and use the
6402 value of the latter to fill defines_obstack.
6403 (copy_comment): Remove.
6404 (copy_comment2): Work for a single obstack.
6405 Rename as...
6406 (copy_comment): this.
6407
6408 2001-12-15 Akim Demaille <akim@epita.fr>
6409
6410 * src/lex.c, src/lex.h (xgetc): No longer static.
6411 * src/reader.c (parse_union_decl): Revamp.
6412
6413 2001-12-15 Akim Demaille <akim@epita.fr>
6414
6415 Still making progress in separating Bison into (i) input, (ii)
6416 process, (iii) output: now we can directly output the parser file
6417 without using table_obstack at all.
6418
6419 * src/files.c, src/files.h (table_obstack): Bye bye.
6420 (parser_file_name): New.
6421 * src/files.c (compute_output_file_names): Compute it.
6422 * src/output.c (actions_output, output_parser)
6423 (output_master_parser): To a file instead of an obstack.
6424
6425 2001-12-15 Akim Demaille <akim@epita.fr>
6426
6427 Attach actions to rules, instead of pre-outputting them to
6428 actions_obstack.
6429
6430 * src/gram.h (rule_t): action and action_line are new members.
6431 * src/reader.c (symbol_list): Likewise.
6432 (copy_action): Save the actions within the rule.
6433 (packgram): Save them in rule_table.
6434 * src/output.c (actions_output): New.
6435 (output_parser): Use it on `%%actions'.
6436 (output_rule_data): Don't free rule_table.
6437 (output): Do it.
6438 (prepare): Don't save the `action' muscle.
6439 * src/bison.simple: s/%%action/%%actions/.
6440
6441 2001-12-15 Akim Demaille <akim@epita.fr>
6442
6443 * src/reader.c (copy_action): When --yacc, don't append a `;'
6444 to the user action: let it fail if lacking.
6445 Suggested by Arnold Robbins and Tom Tromey.
6446
6447 2001-12-14 Akim Demaille <akim@epita.fr>
6448
6449 * src/lex.c (literalchar): Simply return the char you decoded, non
6450 longer mess around with obstacks and int pointers.
6451 Adjust all callers.
6452
6453 2001-12-14 Akim Demaille <akim@epita.fr>
6454
6455 * src/lex.c (literalchar): Don't escape the special characters,
6456 just decode them, and keep them as char (before, eol was output as
6457 the 2 char string `\n' etc.).
6458 * src/output.c (output_rule_data): Use quotearg to output the
6459 token strings.
6460
6461 2001-12-13 Paul Eggert <eggert@twinsun.com>
6462
6463 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6464 Do not infringe on the global user namespace when using C++.
6465 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6466 All uses of `fprintf' and `stderr' changed.
6467
6468 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6469
6470 2001-12-13 Akim Demaille <akim@epita.fr>
6471
6472 The computation of nullable is broken: it doesn't handle empty
6473 RHS's properly.
6474
6475 * tests/torture.at (GNU AWK Grammar): New.
6476 * tests/sets.at (Nullable): New.
6477 * src/nullable.c (set_nullable): Instead of blindly looping over
6478 `ritems', loop over the rules, and then over their rhs's.
6479
6480 Work around Autotest bugs.
6481
6482 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6483 frame, because Autotest understand lines starting with a `+' as
6484 traces from the shell. Then, they are not processed properly.
6485 Admittedly an Autotest bug, but we don't have time to wait for
6486 Autotest to catch up.
6487 * tests/regression.at (Broken Closure): Adjust to the new table
6488 frames.
6489 Move to...
6490 * tests/sets.at: here.
6491
6492 2001-12-13 Akim Demaille <akim@epita.fr>
6493
6494 * src/closure.c (closure): Use nrules instead of playing tricks
6495 with BITS_PER_WORD.
6496
6497 2001-12-13 Akim Demaille <akim@epita.fr>
6498
6499 * src/print.c (print_actions): Output the handling of `$' as the
6500 traces do: shifting the token EOF. Before EOF was treated as a
6501 nonterminal.
6502 * tests/regression.at: Adjust some tests.
6503 * src/print_graph.c (print_core): Complete the set of items via
6504 closure. The next-to-final and final states are still unsatisfying,
6505 but that's to be addressed elsewhere.
6506 No longer output the rule numbers, but do output the state number.
6507 A single loop for the shifts + gotos is enough, but picked a
6508 distinct color for each.
6509 (print_graph): Initialize and finalize closure.
6510
6511 2001-12-13 Akim Demaille <akim@epita.fr>
6512
6513 * src/reader.c (readgram): Remove dead code, an strip useless
6514 braces.
6515 (get_type): Remove, unused.
6516
6517 2001-12-12 Akim Demaille <akim@epita.fr>
6518
6519 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6520 on that of lib/error.c.
6521
6522 2001-12-12 Akim Demaille <akim@epita.fr>
6523
6524 Some hosts don't like `/' in includes.
6525
6526 * src/system.h: Include libgettext.h without qualifying the path.
6527 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6528 $(top_srcdir).
6529
6530 2001-12-11 Marc Autret <autret_m@epita.fr>
6531
6532 * src/output.c (output_parser): Remove useless muscle.
6533
6534 2001-12-11 Marc Autret <autret_m@epita.fr>
6535
6536 * src/bison.simple: Remove #line just before %%epilogue. It
6537 is now handled in ...
6538 * src/reader.c (read_additionnal_code): Add the output of a
6539 #line for the epilogue.
6540
6541 2001-12-10 Marc Autret <autret_m@epita.fr>
6542
6543 * src/reader.c (copy_definition): Re-use CPP-outed code which
6544 replace precedent remove.
6545 * src/bison.simple: Remove #line before %%prologue because
6546 %%input-line is wrong at this time.
6547
6548 2001-12-10 Marc Autret <autret_m@epita.fr>
6549
6550 * src/reader.c (symbols_output): Clean up.
6551 * src/output.c (output_gram, output): Clean up.
6552
6553 2001-12-10 Akim Demaille <akim@epita.fr>
6554
6555 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6556 * src/LR0.c (set_state_table): here.
6557 * src/lalr.c (lalr): Call it.
6558
6559 2001-12-10 Akim Demaille <akim@epita.fr>
6560
6561 * src/state.h (shifts): Remove the `number' member: shifts are
6562 attached to state, hence no longer need to be labelled with a
6563 state number.
6564
6565 2001-12-10 Akim Demaille <akim@epita.fr>
6566
6567 Now that states have a complete set of members, the linked list of
6568 shifts is useless: just fill directly the state's shifts member.
6569
6570 * src/state.h (shifts): Remove the `next' member.
6571 * src/LR0.c (first_state, last_state): Remove.
6572 Adjust the callers.
6573 (augment_automaton): Don't look for the shifts that must be added
6574 a shift on EOF: it is those of the state we looked for! But now,
6575 since shifts are attached, it is no longer needed to looking
6576 merely by its id: its number.
6577
6578 2001-12-10 Akim Demaille <akim@epita.fr>
6579
6580 * src/LR0.c (augment_automaton): Better variable locality.
6581 Remove an impossible branch: if there is a state corresponding to
6582 the start symbol being shifted, then there is shift for the start
6583 symbol from the initial state.
6584
6585 2001-12-10 Akim Demaille <akim@epita.fr>
6586
6587 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6588 only when appropriate: when insert_start_shifting_state' is not
6589 invoked.
6590 * tests/regression.at (Rule Line Numbers): Adjust.
6591
6592 2001-12-10 Akim Demaille <akim@epita.fr>
6593
6594 * src/LR0.c (augment_automaton): Now that all states have shifts,
6595 merge the two cases addition shifts to the initial state.
6596
6597 2001-12-10 Akim Demaille <akim@epita.fr>
6598
6599 * src/lalr.c (set_state_table): Move to...
6600 * src/LR0.c: here.
6601 * src/lalr.c (lalr): Don't call it...
6602 * src/LR0.c (generate_states): do it.
6603 * src/LR0.h (first_state): Remove, only the table is used.
6604
6605 2001-12-10 Akim Demaille <akim@epita.fr>
6606
6607 * src/LR0.h (first_shift, first_reduction): Remove.
6608 * src/lalr.c: Don't use first_shift: find shifts through the
6609 states.
6610
6611 2001-12-10 Akim Demaille <akim@epita.fr>
6612
6613 * src/LR0.c: Attach shifts to states as soon as they are
6614 computed.
6615 * src/lalr.c (set_state_table): Instead of assigning shifts to
6616 state, just assert that the mapping was properly done.
6617
6618 2001-12-10 Akim Demaille <akim@epita.fr>
6619
6620 * src/LR0.c (insert_start_shift): Rename as...
6621 (insert_start_shifting_state): this.
6622 (insert_eof_shifting_state, insert_accepting_state): New.
6623 (augment_automaton): Adjust.
6624 Better locality of the variables.
6625 When looking if the start_symbol is shifted from the initial
6626 state, using `while (... symbol != start_symbol ...)' sounds
6627 better than `while (... symbol < start_symbol ...)': If fail
6628 to see how the order between symbols could be relevant!
6629
6630 2001-12-10 Akim Demaille <akim@epita.fr>
6631
6632 * src/getargs.h: Don't declare `spec_name_prefix' and
6633 `spec_file_prefix', declared by src/files.h.
6634 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6635 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6636 * src/output.c (prepare): Adjust.
6637 * src/reader.c (symbols_output): Likewise.
6638 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6639
6640 2001-12-10 Akim Demaille <akim@epita.fr>
6641
6642 * src/muscle_tab.c (muscle_init): NULL is a better default than
6643 `"0"'.
6644
6645 2001-12-10 Akim Demaille <akim@epita.fr>
6646
6647 * src/reader.c (reader): Calling symbols_output once is enough.
6648
6649 2001-12-10 Akim Demaille <akim@epita.fr>
6650
6651 Now that states have a complete set of members, the linked list of
6652 reductions is useless: just fill directly the state's reductions
6653 member.
6654
6655 * src/state.h (struct reductions): Remove member `number' and
6656 `next'.
6657 * src/LR0.c (first_reduction, last_reduction): Remove.
6658 (save_reductions): Don't link the new reductions, store them in
6659 this_state.
6660 * src/lalr.c (set_state_table): No need to attach reductions to
6661 states, it's already done.
6662 * src/output.c (output_actions): No longer free the shifts, then
6663 the reductions, then the states: free all the states and their
6664 members.
6665
6666 2001-12-10 Akim Demaille <akim@epita.fr>
6667
6668 * src/options.c (OPTN, DRTV, BOTH): New.
6669 (option_table): Use them.
6670
6671 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6672 the job of system.h.
6673 * src/options.c: Don't include stdio.h and xalloc.h for the same
6674 reasons.
6675
6676 2001-12-10 Akim Demaille <akim@epita.fr>
6677
6678 * src/output.c (output, prepare): Make sure the values of the
6679 muscles `action' and `prologue' are 0-terminated.
6680
6681 2001-12-10 Akim Demaille <akim@epita.fr>
6682
6683 Clean up GCC warnings.
6684
6685 * src/reader.c (copy_action): `buf' is not used.
6686 (parse_skel_decl): Be static.
6687 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6688 * src/options.h (create_long_option_table): Have a real prototype.
6689 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6690 (hash_delete_at): Return const void *.
6691 Adjust casts to preserve the const.
6692
6693 2001-12-10 Akim Demaille <akim@epita.fr>
6694
6695 * configure.in: Require 2.52g.
6696 M4 is not needed, but AUTOM4TE is.
6697 * m4/m4.m4: Remove.
6698 * tests/Makefile.am: Adjust.
6699
6700 2001-12-10 Akim Demaille <akim@epita.fr>
6701
6702 One structure for states is enough, even though theoretically
6703 there are LR(0) states and LALR(1) states.
6704
6705 * src/lalr.h (state_t): Remove.
6706 (state_table): Be state_t **, not state_t *.
6707 * src/state.h (core, CORE_ALLOC): Rename as...
6708 (state_t, STATE_ALLOC): this.
6709 Add the LALR(1) members: shifts, reductions, errs.
6710 * src/LR0.c (state_table): Rename as...
6711 (state_hash): this, to avoid name clashes with the global
6712 `state_table'.
6713 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6714 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6715
6716 2001-12-10 Akim Demaille <akim@epita.fr>
6717
6718 Bison dumps core on bash.y.
6719 Reported by Pascal Bart.
6720
6721 * src/warshall.c (bitmatrix_print): New.
6722 (TC): Use it.
6723 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6724 j must be the outer loop.
6725 * tests/regression.at (Broken Closure): New.
6726
6727 2001-12-05 Akim Demaille <akim@epita.fr>
6728
6729 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6730 its argument.
6731 Reported by Peter HĆ”morskĆ½.
6732
6733 2001-12-05 Akim Demaille <akim@epita.fr>
6734
6735 * src/conflicts.c (err_table): Remove.
6736 (resolve_sr_conflict): Adjust.
6737 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6738 Rename as...
6739 (state_t.reductions, state_t.shifts): this.
6740
6741 2001-12-05 Akim Demaille <akim@epita.fr>
6742
6743 * src/reduce.c (reduce_grammar_tables): No longer disable the
6744 removal of useless rules via CPP but via `if (0)', so that the
6745 compiler still check the code is valid.
6746 For instance, it should have noticed `rline' no longer exists: use
6747 the `line' member of rule_t.
6748 * src/gram.c (dummy, rline): Remove, unused.
6749
6750 2001-12-05 Akim Demaille <akim@epita.fr>
6751
6752 * src/output.c (pack_vector): Use assert, not berror.
6753 * src/main.c (berror): Remove, unused.
6754
6755 2001-12-05 Akim Demaille <akim@epita.fr>
6756
6757 New experimental feature: if --verbose --trace output all the
6758 items of a state, not only its kernel.
6759
6760 * src/print.c (print_core): If `trace_flag', then invoke closure
6761 before outputting the items of the state (print_core is no longer
6762 a correct name them).
6763 (print_results): Invoke new_closure/free_closure if needed.
6764
6765 2001-12-05 Akim Demaille <akim@epita.fr>
6766
6767 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6768 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6769 (nitemset): for consistency with the rest of the project.
6770
6771 2001-12-05 Akim Demaille <akim@epita.fr>
6772
6773 * src/closure.c (print_closure): Improve.
6774 (closure): Use it for printing input and output.
6775
6776 2001-12-05 Akim Demaille <akim@epita.fr>
6777
6778 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6779 indexed by nonterminals.
6780
6781 2001-12-05 Akim Demaille <akim@epita.fr>
6782
6783 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6784 what it was!).
6785 * src/warshall.h: Remove accidental duplication of the content.
6786
6787 2001-12-05 Akim Demaille <akim@epita.fr>
6788
6789 * src/closure.c (set_fderives): De-obfuscate.
6790
6791 2001-12-05 Akim Demaille <akim@epita.fr>
6792
6793 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6794
6795 2001-12-05 Akim Demaille <akim@epita.fr>
6796
6797 * src/closure.c (set_firsts): De-obfuscate.
6798
6799 2001-12-05 Akim Demaille <akim@epita.fr>
6800
6801 * src/output.c (action_row): De-obfuscate
6802 using the good o' techniques: arrays not pointers, variable
6803 locality, BITISSET, RESETBIT etc.
6804
6805 2001-12-05 Akim Demaille <akim@epita.fr>
6806
6807 Pessimize the code to simplify it: from now on, all the states
6808 have a valid SHIFTS, which NSHIFTS is possibly 0.
6809
6810 * src/LR0.c (shifts_new): Be global and move to..
6811 * src/state.c, src/state.h: here.
6812 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6813 * src/print_graph: Adjust.
6814
6815 2001-12-05 Akim Demaille <akim@epita.fr>
6816
6817 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6818 * src/conflicts.c: Use it.
6819 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6820 incorrectly ``simplified''.
6821
6822 2001-12-05 Akim Demaille <akim@epita.fr>
6823
6824 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6825 using the good o' techniques: arrays not pointers, variable
6826 locality, BITISSET, RESETBIT etc.
6827
6828 2001-12-05 Akim Demaille <akim@epita.fr>
6829
6830 * src/state.h (SHIFT_SYMBOL): New.
6831 * src/conflicts.c: Use it to deobfuscate.
6832
6833 2001-12-05 Akim Demaille <akim@epita.fr>
6834
6835 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6836 (print_reductions): De-obfuscate using the good o' techniques:
6837 arrays not pointers, variable locality, BITISSET.
6838
6839 2001-12-05 Akim Demaille <akim@epita.fr>
6840
6841 * src/conflicts.c (print_reductions): Arrays, not pointers.
6842 Use BITISSET.
6843
6844 2001-12-05 Akim Demaille <akim@epita.fr>
6845
6846 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6847
6848 2001-12-05 Akim Demaille <akim@epita.fr>
6849
6850 * src/conflicts.c (print_reductions): Improve variable locality.
6851
6852 2001-12-05 Akim Demaille <akim@epita.fr>
6853
6854 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6855
6856 2001-12-05 Akim Demaille <akim@epita.fr>
6857
6858 * src/conflicts.c (print_reductions): Improve variable locality.
6859
6860 2001-12-05 Akim Demaille <akim@epita.fr>
6861
6862 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6863 * src/lalr.c: Use them.
6864
6865 2001-12-05 Akim Demaille <akim@epita.fr>
6866
6867 * src/LR0.c (augment_automaton): Formatting changes.
6868 Better variable locality.
6869
6870 2001-12-05 Akim Demaille <akim@epita.fr>
6871
6872 * src/lalr.c (matrix_print): New.
6873 (transpose): Use it.
6874 Use arrays instead of pointers.
6875
6876 2001-12-05 Akim Demaille <akim@epita.fr>
6877
6878 * src/lalr.c (maxrhs): Move to...
6879 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6880 * src/lalr.c (build_relations): Adjust.
6881
6882 2001-12-05 Akim Demaille <akim@epita.fr>
6883
6884 * src/lalr.c (transpose): Free the memory allocated to the
6885 argument, as it is replaced by the results by the unique caller.
6886 (build_relations): Merely invoke transpose: it handles the memory
6887 deallocation.
6888 Improve variable locality.
6889 Avoid variables used as mere abbreviations.
6890 (compute_lookaheads): Use arrays instead of pointers.
6891
6892 2001-12-05 Akim Demaille <akim@epita.fr>
6893
6894 * src/lalr.c (initialize_F): Improve variable locality.
6895 Avoid variables used as mere abbreviations.
6896
6897 2001-12-05 Akim Demaille <akim@epita.fr>
6898
6899 * src/derives.c (print_derives): Display the ruleno.
6900 * src/lalr.c (initialize_F, transpose): Better variable locality
6901 to improve readability.
6902 Avoid variables used as mere abbreviations.
6903
6904 2001-12-05 Akim Demaille <akim@epita.fr>
6905
6906 * src/lalr.c (traverse): Use arrays instead of pointers.
6907
6908 2001-12-05 Akim Demaille <akim@epita.fr>
6909
6910 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
6911 the handling of squeue.
6912 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6913
6914 2001-12-05 Akim Demaille <akim@epita.fr>
6915
6916 Because useless nonterminals are now kept alive (instead of being
6917 `destroyed'), we now sometimes examine them, and store information
6918 related to them. Hence we need to know their number, and adjust
6919 memory allocations.
6920
6921 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
6922 static.
6923 * src/LR0.c (allocate_itemsets): The memory allocated to
6924 `symbol_count' was used for two different purpose: once to count
6925 the number of occurrences of each symbol, and later reassigned to
6926 `shift_symbol', containing the symbol that can be shifted from a
6927 given state.
6928 Deobfuscate, i.e., allocate, use and free `symbol_count' here
6929 only, and...
6930 (new_itemsets): Allocate `shift_symbol' here.
6931 (allocate_itemsets): symbol_count includes useless nonterminals.
6932 Make room for them.
6933 (free_storage): Use `free', not `XFREE', for pointers that cannot
6934 be null.
6935
6936 2001-12-05 Akim Demaille <akim@epita.fr>
6937
6938 * src/nullable.c (set_nullable): Deobfuscate the handling of
6939 ritem.
6940 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6941
6942 2001-12-05 Akim Demaille <akim@epita.fr>
6943
6944 * src/gram.c, src/gram.h (ritem_print): New.
6945 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
6946 (This useless function was defined only to work around VMS linkers
6947 that can't handle compilation units with variables only).
6948 * src/reduce.c (dump_grammar): Use it to trace the construction of
6949 ritem.
6950
6951 2001-12-04 Paul Eggert <eggert@twinsun.com>
6952
6953 * src/bison.simple (union yyalloc): Change member names
6954 to be the same as the stack names.
6955 (yyparse): yyptr is now union yyalloc *, not char *.
6956 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
6957 and may generate better code on some machines.
6958 (yystpcpy): Use prototype if __STDC__ is defined, not just
6959 if __cplusplus is defined.
6960
6961 2001-11-30 Akim Demaille <akim@epita.fr>
6962
6963 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
6964 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
6965 Gettext doesn't compile cleanly, and dies with -Werror.
6966 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
6967 Include WARNING_CFLAGS here.
6968 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
6969 before being defined.
6970
6971 2001-11-27 Paul Eggert <eggert@twinsun.com>
6972
6973 * lib/quotearg.h (quotearg_n, quotearg_n_style):
6974 First arg is int, not unsigned.
6975 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
6976 (SIZE_MAX, UINT_MAX): New macros.
6977 (quotearg_n_options): Abort if N is negative.
6978 Avoid overflow check on hosts where size_t is 64 bits and int
6979 is 32 bits, as overflow is impossible there.
6980 Fix off-by-one typo that caused unnecessary reallocation.
6981
6982 2001-11-29 Paul Eggert <eggert@twinsun.com>
6983
6984 Name space cleanup in generated parser.
6985
6986 * doc/bison.texinfo (Bison Parser): Discuss system headers
6987 and their effect on the user name space.
6988
6989 * src/bison.simple:
6990 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
6991 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
6992 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
6993
6994 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
6995 on user names when possible.
6996
6997 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
6998 Simplify test for whather <alloca.h> exists.
6999
7000 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7001
7002 (<stdio.h>): Include if YYDEBUG.
7003
7004 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7005 ! defined (yyoverflow) && ! defined (yymemcpy).
7006
7007 (yymemcpy, yyparse): Rename local variables as needed so that
7008 they all begin with 'yy'.
7009
7010 (yystrlen, yystpcpy): New functions.
7011
7012 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7013 All uses changed.
7014
7015 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7016 instead of relying on string.h functions. Use YYSTACK_ALLOC
7017 and YYSTACK_FREE instead of malloc and free.
7018
7019 2001-11-30 Akim Demaille <akim@epita.fr>
7020
7021 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7022 before their first uses.
7023 (YYBISON, YYPURE): Move to the top of the output.
7024
7025 2001-11-30 Akim Demaille <akim@epita.fr>
7026
7027 * tests/reduce.at (Useless Nonterminals): Fix.
7028
7029 2001-11-30 Akim Demaille <akim@epita.fr>
7030
7031 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7032 if body instead of `;' to pacify GCC's warnings.
7033
7034 2001-11-30 Akim Demaille <akim@epita.fr>
7035
7036 Instead of mapping the LHS of unused rules to -1, keep the LHS
7037 valid, but flag the rules as invalid.
7038
7039 * src/gram.h (rule_t): `useful' is a new member.
7040 * src/print.c (print_grammar): Adjust.
7041 * src/derives.c (set_derives): Likewise.
7042 * src/reader.c (packgram, reduce_output): Likewise.
7043 * src/reduce.c (reduce_grammar_tables): Likewise.
7044 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7045
7046 2001-11-30 Akim Demaille <akim@epita.fr>
7047
7048 * src/reduce.c (reduce_output): Formatting changes.
7049 * src/print.c (print_results, print_grammar): Likewise.
7050 * tests/regression.at (Rule Line Numbers)
7051 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7052
7053 2001-11-30 Akim Demaille <akim@epita.fr>
7054
7055 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7056 useless nonterminals, move them at the end of the symbol arrays.
7057 (reduce_output): Adjust.
7058 * tests/reduce.at (Useless Nonterminals): Adjust.
7059
7060 2001-11-30 Akim Demaille <akim@epita.fr>
7061
7062 * src/reduce.c: Various comment/formatting changes.
7063 (nonterminals_reduce): New, extracted from...
7064 (reduce_grammar_tables): here.
7065 (reduce_grammar): Call nonterminals_reduce.
7066
7067 2001-11-29 Paul Eggert <eggert@twinsun.com>
7068
7069 * src/bison.simple (YYSTACK_REALLOC): Remove.
7070 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7071 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7072 New macros.
7073 (union yyalloc): New type.
7074 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7075 an arbitrary restriction on hosts where size_t is wider than int.
7076
7077 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7078 a parser stack overflow. Allocate just one block of memory for all
7079 three stacks, instead of allocating three blocks; this typically is
7080 faster and reduces fragmentation.
7081
7082 Do not limit the number of items in the stack to a value that fits
7083 in 'int', as this is an arbitrary limit on hosts with 64-bit
7084 size_t and 32-bit int.
7085
7086 2001-11-29 Marc Autret <autret_m@epita.fr>
7087
7088 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7089 of defining YYERROR_VERBOSE.
7090 [AT_DATA]: $4 is now out of C declarations in the prologue.
7091
7092 2001-11-28 Marc Autret <autret_m@epita.fr>
7093
7094 * src/reader.c (parse_dquoted_param): New.
7095 (parse_skel_decl): Use it.
7096 * src/lex.h: Add its prototype.
7097 * src/lex.c (literalchar): Become not static.
7098
7099 2001-11-28 Marc Autret <autret_m@epita.fr>
7100
7101 * src/output.h: And put its extern declaration here.
7102 * src/output.c (error_verbose): Define here.
7103 (prepare): Echo name modification.
7104 * src/getargs.h: Clean its extern declaration.
7105 * src/getargs.c (error_verbose_flag): Remove.
7106 (getargs): Remove case 'e'.
7107 * src/options.c (option_table): 'error-verbose' is now seen as simple
7108 percent option.
7109 Include output.h.
7110
7111 * src/reader.c (read_declarations): Remove case tok_include.
7112 (parse_include_decl): Remove.
7113 * src/lex.h (token_t): Remove tok_include.
7114 * src/options.c (option_table): 'include' is now a simple command line
7115 option.
7116
7117 2001-11-28 Marc Autret <autret_m@epita.fr>
7118
7119 * src/bison.simple: Adjust muscle names.
7120 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7121 * src/output.c (prepare): s/_/-/ for the muscles names.
7122 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7123
7124 2001-11-28 Marc Autret <autret_m@epita.fr>
7125
7126 * src/bison.simple: Fix debug.
7127 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7128
7129 2001-11-28 Akim Demaille <akim@epita.fr>
7130
7131 * src/LR0.c (shifts_new): New.
7132 (save_shifts, insert_start_shift, augment_automaton): Use it.
7133
7134 2001-11-28 Akim Demaille <akim@epita.fr>
7135
7136 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7137 keep ruleno only.
7138
7139 2001-11-28 Akim Demaille <akim@epita.fr>
7140
7141 * src/closure.c (closure): Instead of looping over word in array
7142 then bits in words, loop over bits in array.
7143
7144 2001-11-28 Akim Demaille <akim@epita.fr>
7145
7146 * src/closure.c (closure): No longer optimize the special case
7147 where all the bits of `ruleset[r]' are set to 0, to make the code
7148 clearer.
7149
7150 2001-11-28 Akim Demaille <akim@epita.fr>
7151
7152 * src/closure.c (closure): `r' and `c' are new variables, used to
7153 de-obfuscate accesses to RULESET and CORE.
7154
7155 2001-11-28 Akim Demaille <akim@epita.fr>
7156
7157 * src/reduce.c (reduce_print): Use ngettext.
7158 (dump_grammar): Improve the trace accuracy.
7159
7160 2001-11-28 Akim Demaille <akim@epita.fr>
7161
7162 * src/reduce.c (dump_grammar): Don't translate trace messages.
7163
7164 2001-11-28 Akim Demaille <akim@epita.fr>
7165
7166 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7167 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7168 as all tags are free'ed afterwards.
7169 From Enrico Scholz.
7170
7171 2001-11-27 Paul Eggert <eggert@twinsun.com>
7172
7173 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7174 use alloca when we didn't want to, and vice versa.
7175
7176 2001-11-27 Marc Autret <autret_m@epita.fr>
7177
7178 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7179 initialization.
7180 * src/output.c (prepare): Remove its update.
7181
7182 2001-11-27 Marc Autret <autret_m@epita.fr>
7183
7184 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7185 Use %error-verbose.
7186
7187 2001-11-27 Marc Autret <autret_m@epita.fr>
7188
7189 * src/bison.simple: Remove YYERROR_VERBOSE using.
7190 Use %%error_verbose.
7191 (yyparse): Likewise.
7192 * src/output.c (prepare): Give its final value.
7193 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7194 * src/getargs.h: Add its extern declaration.
7195 * src/getargs.c (error_verbose_flag): New int.
7196 (getargs): Update to catch new case.
7197 * src/options.c (option_table): 'error-verbose' is a new option.
7198 (shortopts): Update.
7199
7200 2001-11-27 Akim Demaille <akim@epita.fr>
7201
7202 * src/system.h: Use intl/libgettext.h.
7203 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7204
7205 2001-11-27 Akim Demaille <akim@epita.fr>
7206
7207 * tests/torture.at (Exploding the Stack Size with Malloc):
7208 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7209
7210 2001-11-27 Akim Demaille <akim@epita.fr>
7211
7212 * src/files.c: Include error.h.
7213 Reported by Hans Aberg.
7214
7215 2001-11-26 Marc Autret <autret_m@epita.fr>
7216
7217 * src/reader.c (parse_include_decl): New, not yet implemented.
7218 (read_declarations): Add case tok_include.
7219 * src/getargs.h (include): Add its extern definition.
7220 * src/getargs.c (include): New const char *.
7221 (getargs): Add case '-I'.
7222 * src/options.c (option_table): Add include as command line and
7223 percent option.
7224 * src/lex.h (token_t): Add tok_include.
7225
7226 2001-11-26 Akim Demaille <akim@epita.fr>
7227
7228 * src/reader.c (readgram): Make sure rules for mid-rule actions
7229 have a lineno equal to that of their host rule.
7230 Reported by Hans Aberg.
7231 * tests/regression.at (Rule Line Numbers): New.
7232
7233 2001-11-26 Akim Demaille <akim@epita.fr>
7234
7235 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7236 size_ts.
7237
7238 2001-11-26 Akim Demaille <akim@epita.fr>
7239
7240 * src/complain.c, src/complain.h (error): Remove, provided by
7241 lib/error.[ch].
7242
7243 2001-11-26 Akim Demaille <akim@epita.fr>
7244
7245 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7246 issue an error message.
7247 * tests/regression.at (Invalid %directive): New.
7248 Reported by Hans Aberg.
7249
7250 2001-11-26 Akim Demaille <akim@epita.fr>
7251
7252 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7253 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7254
7255 2001-11-26 Akim Demaille <akim@epita.fr>
7256
7257 * src/conflicts.c (conflicts_print): Don't complain at all when
7258 there are no reduce/reduce conflicts, and as many shift/reduce
7259 conflicts as expected.
7260 * tests/regression.at (%expect right): Adjust.
7261
7262 2001-11-23 Akim Demaille <akim@epita.fr>
7263
7264 * lib/alloca.c: Update, from fileutils.
7265
7266 2001-11-23 Akim Demaille <akim@epita.fr>
7267
7268 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7269
7270 2001-11-23 Akim Demaille <akim@epita.fr>
7271
7272 * src/system.h: Include alloca.h.
7273 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7274
7275 2001-11-23 Akim Demaille <akim@epita.fr>
7276
7277 * src/print_graph.c (print_actions): Remove `rule', unused.
7278 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7279 pacify GCC's signed < unsigned warnings.
7280 * src/closure.c (itemsetsize): Likewise.
7281 * src/reader.c (symbol_list_new): Static.
7282
7283 2001-11-23 Akim Demaille <akim@epita.fr>
7284
7285 Attaching lineno to buckets is stupid, since only one copy of each
7286 symbol is kept, only the line of the first occurrence is kept too.
7287
7288 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7289 * src/reader.c (rline_allocated): Remove, unused.
7290 (symbol_list): Have a `line' member.
7291 (symbol_list_new): New.
7292 (readgram): Use it.
7293 * src/print.c (print_grammar): Output the rule line numbers.
7294 * tests/regression.at (Solved SR Conflicts)
7295 (Unresolved SR Conflicts): Adjust.
7296 Reported by Hans Aberg.
7297
7298 2001-11-22 Marc Autret <autret_m@epita.fr>
7299
7300 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7301
7302 2001-11-22 Marc Autret <autret_m@epita.fr>
7303
7304 * src/muscle_tab.c (muscle_init): Remove initialization of
7305 skeleton muscle.
7306 * src/output.c (output_master_parser): Do it here.
7307
7308 2001-11-20 Akim Demaille <akim@epita.fr>
7309
7310 * po/sv.po: New.
7311 * configure.in (ALL_LINGUAS): Adjust.
7312 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7313 longer contains strings to translate.
7314
7315 2001-11-19 Akim Demaille <akim@epita.fr>
7316
7317 * src/conflicts.c (conflicts_print): Add a missing \n.
7318
7319 2001-11-19 Akim Demaille <akim@epita.fr>
7320
7321 * src/nullable.c (nullable_print): New.
7322 (set_nullable): Call it when tracing.
7323 Better locality of variables.
7324
7325 2001-11-19 Akim Demaille <akim@epita.fr>
7326
7327 * src/print.c (print_actions): Better locality of variables.
7328
7329 2001-11-19 Akim Demaille <akim@epita.fr>
7330
7331 * src/derives.c (print_derives): Fix and enrich.
7332 * src/closure.c (print_fderives): Likewise.
7333
7334 2001-11-19 Akim Demaille <akim@epita.fr>
7335
7336 * src/closure.c (itemsetend): Remove, replaced with...
7337 (itemsetsize): new.
7338
7339 2001-11-19 Akim Demaille <akim@epita.fr>
7340
7341 * src/LR0.c (kernel_end): Remove, replaced with...
7342 (kernel_size): new.
7343
7344 2001-11-19 Akim Demaille <akim@epita.fr>
7345
7346 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7347 to clarify.
7348
7349 2001-11-19 Akim Demaille <akim@epita.fr>
7350
7351 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7352
7353 2001-11-19 Akim Demaille <akim@epita.fr>
7354
7355 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7356 trace messages.
7357 * src/LR0.c: Likewise.
7358 (allocate_itemsets): Use arrays instead of pointers to clarify.
7359
7360 2001-11-19 Akim Demaille <akim@epita.fr>
7361
7362 * src/getargs.c (statistics_flag): Replace with...
7363 (trace_flag): New.
7364 (longopts): Accept --trace instead of --statistics.
7365 * src/getargs.h, src/options.c: Adjust.
7366 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7367 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7368
7369 2001-11-19 Akim Demaille <akim@epita.fr>
7370
7371 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7372 pointers to clarify the code.
7373 (save_reductions, save_shifts): Factor common parts of alternatives.
7374
7375 2001-11-19 Akim Demaille <akim@epita.fr>
7376
7377 * src/LR0.c (new_state, get_state): Complete TRACE code.
7378 * src/closure.c: Include `reader.h' to get `tags', needed by the
7379 trace code.
7380 Rename the conditional DEBUG as TRACE.
7381 Output consistently TRACEs to stderr, not stdout.
7382 * src/derives.c: Likewise.
7383 * src/reduce.c: (inaccessable_symbols): Using if is better style
7384 than goto.
7385 Use `#if TRACE' instead of `#if 0' for tracing code.
7386
7387 2001-11-19 Akim Demaille <akim@epita.fr>
7388
7389 * src/system.h (LIST_FREE, shortcpy): New.
7390 * src/LR0.c: Use them.
7391 * src/output.c (free_itemsets, free_reductions, free_shifts):
7392 Remove, replaced by LIST_FREE.
7393
7394 2001-11-19 Akim Demaille <akim@epita.fr>
7395
7396 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7397 (REDUCTIONS_ALLOC): New.
7398 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7399 allocation.
7400
7401 2001-11-19 Akim Demaille <akim@epita.fr>
7402
7403 * src/LR0.c (new_state): Complete trace code.
7404 * src/nullable.c (set_nullable): Don't translate traces.
7405
7406 2001-11-19 Akim Demaille <akim@epita.fr>
7407
7408 * src/print_graph.c (print_core): Better locality of variables.
7409 * src/print.c (print_core): Likewise.
7410
7411 2001-11-19 Akim Demaille <akim@epita.fr>
7412
7413 * src/vcg.c: You do the output, so you are responsible of the
7414 handling of VCG syntax, in particular: use quotearg.
7415 * src/print_graph.c: Don't.
7416 (print_actions): Don't output the actions as part of the nodes,
7417 since that's the job of the edges.
7418 (print_state): Don't output by hand: fill the node description,
7419 and ask for its output.
7420
7421 2001-11-19 Akim Demaille <akim@epita.fr>
7422
7423 * src/bison.simple (yyparse): When verbosely reporting an error,
7424 no longer put additional quotes around token names.
7425 * tests/calc.at: Adjust.
7426
7427 2001-11-19 Akim Demaille <akim@epita.fr>
7428
7429 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7430 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7431 * src/output.c: Adjust.
7432
7433 2001-11-19 Akim Demaille <akim@epita.fr>
7434
7435 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7436 (rule_t): this.
7437 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7438
7439 2001-11-19 Akim Demaille <akim@epita.fr>
7440
7441 * src/gram.h (rule_t): New.
7442 (rule_table): New.
7443 (rrhs, rlhs): Remove, part of state_t.
7444 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7445 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7446 * src/reader.c, src/reduce.c: Adjust.
7447
7448 2001-11-19 Akim Demaille <akim@epita.fr>
7449
7450 * src/reader.c (symbols_output): New, extracted from...
7451 (packsymbols): Here.
7452 (reader): Call it.
7453
7454 2001-11-19 Akim Demaille <akim@epita.fr>
7455
7456 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7457 (maxrhs): this new function.
7458
7459 2001-11-19 Akim Demaille <akim@epita.fr>
7460
7461 * src/lalr.c (F): New macro to access the variable F.
7462 Adjust.
7463
7464 2001-11-19 Akim Demaille <akim@epita.fr>
7465
7466 * src/lalr.h (LA): New macro to access the variable LA.
7467 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7468 * src/lalr.c: Adjust.
7469
7470 2001-11-19 Akim Demaille <akim@epita.fr>
7471
7472 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7473 (set_state_table): handle the `lookaheads' members.
7474
7475 2001-11-19 Akim Demaille <akim@epita.fr>
7476
7477 * src/lalr.h (lookaheads): Removed array, whose contents is now
7478 a member of...
7479 (state_t): this structure.
7480 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7481 Adjust.
7482
7483 2001-11-19 Akim Demaille <akim@epita.fr>
7484
7485 * src/lalr.h (consistent): Removed array, whose contents is now
7486 a member of...
7487 (state_t): this structure.
7488 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7489 Adjust.
7490
7491 2001-11-19 Akim Demaille <akim@epita.fr>
7492
7493 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7494 contents are now members of...
7495 (state_t): this structure.
7496 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7497 Adjust.
7498
7499 2001-11-19 Akim Demaille <akim@epita.fr>
7500
7501 * src/lalr.h (state_t): New.
7502 (state_table): Be a state_t * instead of a core **.
7503 (accessing_symbol): Remove, part of state_t.
7504 * src/lalr.c: Adjust.
7505 (set_accessing_symbol): Merge into...
7506 (set_state_table): this.
7507 * src/print_graph.c, src/conflicts.c: Adjust.
7508
7509 2001-11-14 Akim Demaille <akim@epita.fr>
7510
7511 * tests/calc.at, tests/output.at, tests/regression.at,
7512 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7513 now the tests are run in private dirs, therefore AC_CLEANUP and
7514 family can be simplified to 0-ary.
7515 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7516 use abs. path to find config.h.
7517 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7518 stderr, there can be way too much random noise.
7519 Instead pass -Werror to GCC and rely on the exit status.
7520 Reported by Wolfram Wagner.
7521
7522 2001-11-14 Akim Demaille <akim@epita.fr>
7523
7524 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7525 defined only if yyoverflow is defined, to avoid `warning: unused
7526 variable `yyvs1''.
7527 Reported by The Test Suite.
7528
7529 2001-11-14 Akim Demaille <akim@epita.fr>
7530
7531 * src/print.c: Include reduce.h.
7532 Reported by Hans Aberg.
7533
7534 2001-11-14 Akim Demaille <akim@epita.fr>
7535
7536 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7537 Revert a previous patch: these are really const.
7538 * src/conflicts.c (conflict_report): Additional useless pair of
7539 braces to pacify GCC's warnings for `if () if () {} else {}'.
7540 * src/lex.c (parse_percent_token): Replace equal_offset with
7541 arg_offset.
7542 arg is const.
7543 Be sure to strdup `arg' when used, since there is no reason for
7544 token_buffer not to change.
7545
7546 2001-11-14 Akim Demaille <akim@epita.fr>
7547
7548 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7549 definition.
7550 * src/main.c (main): Use them.
7551 Suggested by Hans Aberg.
7552
7553 2001-11-12 Akim Demaille <akim@epita.fr>
7554
7555 * src/system.h (ngettext): Now that we use ngettext, be sure to
7556 provide a default definition when NLS are not used.
7557
7558 2001-11-12 Akim Demaille <akim@epita.fr>
7559
7560 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7561 Use @kbd to denote user input.
7562 (Language and Grammar): ANSIfy the example.
7563 Adjust its layout for info/notinfo.
7564 (Location Tracking Calc): Output error messages to stderr.
7565 Output locations in a more GNUtically correct way.
7566 Fix a couple of Englishos.
7567 Adjust @group/@end group pairs.
7568
7569 2001-11-12 Akim Demaille <akim@epita.fr>
7570
7571 %expect was not functioning at all.
7572
7573 * src/conflicts.c (expected_conflicts): Set to -1.
7574 (conflict_report): Use ngettext.
7575 (conflicts_print): Check %expect and make its violation an error.
7576 * doc/bison.texinfo (Expect Decl): Adjust.
7577 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7578 * tests/regression.at (%expect not enough, %expect right)
7579 (%expect too much): New.
7580
7581 2001-11-12 Akim Demaille <akim@epita.fr>
7582
7583 * tests/regression.at (Conflicts): Rename as...
7584 (Unresolved SR Conflicts): this.
7585 (Solved SR Conflicts): New.
7586
7587 2001-11-12 Akim Demaille <akim@epita.fr>
7588
7589 * src/reduce.c (print_results): Rename as...
7590 (reduce_output): This.
7591 Output to OUT, passed as argument, instead of output_obstack.
7592 (dump_grammar): Likewise.
7593 (reduce_free): New.
7594 Also free V1.
7595 (reduce_grammar): No longer call reduce_output, since...
7596 * src/print.c (print_results): do it.
7597 * src/main.c (main): Call reduce_free;
7598
7599 2001-11-12 Akim Demaille <akim@epita.fr>
7600
7601 * src/conflicts.c (print_reductions): Accept OUT as argument.
7602 Output to it, not to output_obstack.
7603 * src/print.c (print_actions): Adjust.
7604
7605 2001-11-12 Akim Demaille <akim@epita.fr>
7606
7607 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7608 the result instead of using...
7609 (src_total, rrc_total, src_count, rrc_count): Remove.
7610 (any_conflicts): Remove.
7611 (print_conflicts): Split into...
7612 (conflicts_print, conflicts_output): New.
7613 * src/conflicts.h: Adjust.
7614 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7615 * src/print.c (print_grammar): Issue `\n' between two rules.
7616 * tests/regression.at (Conflicts): New.
7617 Reported by Tom Lane.
7618
7619 2001-11-12 Akim Demaille <akim@epita.fr>
7620
7621 * tests/regression.at (Invalid input): Remove, duplicate with
7622 ``Invalid input: 1''.
7623
7624 2001-11-12 Akim Demaille <akim@epita.fr>
7625
7626 * tests/torture.at (AT_DATA_STACK_TORTURE)
7627 (Exploding the Stack Size with Alloca)
7628 (Exploding the Stack Size with Malloc): New.
7629
7630 2001-11-12 Akim Demaille <akim@epita.fr>
7631
7632 * src/bison.simple (YYSTACK_REALLOC): New.
7633 (yyparse) [!yyoverflow]: Use it and free the old stack.
7634 Reported by Per Allansson.
7635
7636 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7637
7638 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7639 define CPP macro, which substitute YYSTYPE by yystype.
7640 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7641 with yyltype/YYLTYPE. This allows inclusion of the generated
7642 header within the parser if the compiler, such as GGC, accepts
7643 multiple equivalent #defines.
7644 From Akim.
7645
7646 2001-11-05 Akim Demaille <akim@epita.fr>
7647
7648 * src/reader.c (symbols_output): New, extracted from...
7649 (packsymbols): here.
7650 (reader): Adjust.
7651
7652 2001-11-05 Akim Demaille <akim@epita.fr>
7653
7654 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7655
7656 2001-11-05 Akim Demaille <akim@epita.fr>
7657
7658 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7659 pattern.
7660
7661 2001-11-05 Akim Demaille <akim@epita.fr>
7662
7663 * src/options.h (struct option_table_struct): set_flags is void*.
7664 * src/options.c (longopts): Support `--output' and `%output'.
7665 (usage): Adjust.
7666 * src/lex.h (tok_setopt): Remove, replaced with...
7667 (tok_intopt, tok_stropt): these new guys.
7668 * src/lex.c (getopt.h): Not needed.
7669 (token_buffer, unlexed_token_buffer): Not const.
7670 (percent_table): Promote `-' over `_' in directive names.
7671 Active `%name-prefix', `file-prefix', and `output'.
7672 (parse_percent_token): Accept possible arguments to directives.
7673 Promote `-' over `_' in directive names.
7674
7675 2001-11-04 Akim Demaille <akim@epita.fr>
7676
7677 * doc/bison.texinfo (Decl Summary): Split the list into
7678 `directives for grammars' and `directives for bison'.
7679 Sort'em.
7680 Add description of `%name-prefix', `file-prefix', and `output'.
7681 Promote `-' over `_' in directive names.
7682 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7683 Simplify the description of `--name-prefix'.
7684 Promote `-' over `_' in directive names.
7685 Promote `--output' over `--output-file'.
7686 Fix the description of `--defines'.
7687 * tests/output.at: Exercise %file-prefix and %output.
7688
7689 2001-11-02 Akim Demaille <akim@epita.fr>
7690
7691 * doc/refcard.tex: Update.
7692
7693 2001-11-02 Akim Demaille <akim@epita.fr>
7694
7695 * src/symtab.h (SUNDEF): New.
7696 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7697 stand for `uninitialized', instead of 0.
7698 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7699 * src/lex.c (lex): Adjust.
7700
7701 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7702 Number it 0.
7703 Let yylex return it instead of a plain 0.
7704 Reported by Dick Streefland.
7705
7706 2001-11-02 Akim Demaille <akim@epita.fr>
7707
7708 * tests/regression.at (Mixing %token styles): New test.
7709
7710 2001-11-02 Akim Demaille <akim@epita.fr>
7711
7712 * src/reader.c (parse_thong_decl): Formatting changes.
7713 (token_translations_init): New, extracted from...
7714 (packsymbols): Here.
7715 Adjust.
7716
7717 2001-11-01 Akim Demaille <akim@epita.fr>
7718
7719 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7720 Check that `9foo.y' produces correct cpp guards.
7721 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7722 guards.
7723 Reported by Wwp.
7724
7725 2001-11-01 Akim Demaille <akim@epita.fr>
7726
7727 * tests/regression.at (Invalid input: 2): New.
7728 * src/lex.c (unlexed_token_buffer): New.
7729 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7730 too.
7731 Reported by Wwp.
7732
7733 2001-11-01 Akim Demaille <akim@epita.fr>
7734
7735 * tests/calc.at: Catch up with 1.30.
7736 * configure.in: Bump to 1.49a.
7737 Adjust to newer Autotest.
7738
7739 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7740
7741 * src/conflicts.c: Move global variables rrc_total and src_total ...
7742 (print_conflicts): here.
7743 * src/output.c (output): Free global variable user_toknums.
7744 * src/lex.c (token_obstack): Become static.
7745
7746 2001-10-18 Akim Demaille <akim@epita.fr>
7747
7748 * tests/atlocal.in (GCC): Add.
7749 * tests/calc.at: s/m4_match/m4_bmatch/.
7750 s/m4_patsubst/m4_bpatsubst/.
7751 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7752 * configure.in: AC_SUBST(GCC).
7753
7754 2001-10-14 Marc Autret <autret_m@epita.fr>
7755
7756 * src/options.c (create_long_option_table): Fix.
7757
7758 2001-10-10 Akim Demaille <akim@epita.fr>
7759
7760 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7761
7762 2001-10-04 Akim Demaille <akim@epita.fr>
7763
7764 * src/reader.c (parse_union_decl): Push the caracters in
7765 union_obstack, not attrs_obstack.
7766
7767 2001-10-04 Akim Demaille <akim@epita.fr>
7768
7769 Merge in the branch 1.29.
7770
7771 * src/reader.c (packsymbols): Use a temporary obstack for
7772 `%%tokendef', since output_stack is already used elsewhere.
7773
7774 2001-10-02 Akim Demaille <akim@epita.fr>
7775
7776 Bump 1.29d.
7777
7778 2001-10-02 Akim Demaille <akim@epita.fr>
7779
7780 Version 1.29c.
7781
7782 2001-10-02 Akim Demaille <akim@epita.fr>
7783
7784 * tests/regression.at (Invalid CPP headers): New.
7785 From Alexander Belopolsky.
7786 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7787
7788 2001-10-02 Akim Demaille <akim@epita.fr>
7789
7790 * tests/regression.at (Invalid input): New.
7791 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7792 Reported by Shura.
7793
7794 2001-10-02 Akim Demaille <akim@epita.fr>
7795
7796 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7797
7798 2001-10-02 Akim Demaille <akim@epita.fr>
7799
7800 * src/output.c (output_parser): Assert `skeleton'.
7801 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7802 systems.
7803 From Shura.
7804
7805 2001-10-01 Marc Autret <autret_m@epita.fr>
7806
7807 * src/lex.h: Echo modifications.
7808 * src/lex.c (unlex): Parameter is now token_t.
7809 From Hans Aberg.
7810
7811 2001-10-01 Marc Autret <autret_m@epita.fr>
7812
7813 * src/main.c: Include lex.h.
7814 From Hans Aberg.
7815
7816 2001-09-29 Akim Demaille <akim@epita.fr>
7817
7818 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7819
7820 2001-09-28 Akim Demaille <akim@epita.fr>
7821
7822 * tests/testsuite.at: Update to newer Autotest.
7823 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7824
7825 2001-09-27 Akim Demaille <akim@epita.fr>
7826
7827 Position independent wrapper.
7828
7829 * tests/bison: Remove.
7830 * tests/bison.in: New.
7831 * configure.in: Adjust.
7832
7833 2001-09-27 Paul Eggert <eggert@twinsun.com>
7834
7835 Port quotearg fixes from tar 1.13.24.
7836
7837 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7838 tm to be declared.
7839 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7840 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7841
7842 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7843 * m4/mbrtowc.m4: New file.
7844 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7845 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7846
7847 2001-09-27 Akim Demaille <akim@epita.fr>
7848
7849 Bump to 1.29c.
7850
7851 2001-09-27 Akim Demaille <akim@epita.fr>
7852
7853 Version 1.29b.
7854
7855 2001-09-25 Akim Demaille <akim@epita.fr>
7856
7857 * src/system.h: Include `xalloc.h'.
7858 Remove it from the C files.
7859 * src/files.c (output_files): Free the obstacks.
7860 * src/lex.c (init_lex): Rename as...
7861 (lex_init): this.
7862 (lex_free): New.
7863 * src/main.c (main): Use it.
7864
7865 2001-09-24 Marc Autret <autret_m@epita.fr>
7866
7867 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7868 to output informations in fout (FILE*).
7869 (open_graph, close_graph): Likewise.
7870 (output_graph, output_edge, output_node): Likewise.
7871 * src/vcg.h: Update function prototypes.
7872 * src/print_graph.c (print_graph): Open output graph file.
7873 (print_actions): Adjust.
7874 * src/files.h: Remove extern declaration.
7875 * src/files.c: Remove graph_obstack declaration.
7876 (open_files): Remove graph_obstack initialization.
7877 (output_files): Remove graph_obstack saving.
7878
7879 2001-09-24 Marc Autret <autret_m@epita.fr>
7880
7881 * src/files.c (compute_output_file_names): Fix.
7882
7883 2001-09-24 Marc Autret <autret_m@epita.fr>,
7884 Akim Demaille <akim@epita.fr>
7885
7886 * src/reader.c (reader): Remove call to free_symtab ().
7887 * src/main.c (main): Call it here.
7888 Include symtab.h.
7889 * src/conflicts.c (initialize_conflicts): Rename as...
7890 (solve_conflicts): this.
7891 * src/print.c (print_core, print_actions, print_state)
7892 (print_grammar): Dump to a file instead a `output_obstack'.
7893 (print_results): Dump `output_obstack', and then proceed with the
7894 FILE *.
7895 * src/files.c (compute_output_file_names, close_files): New.
7896 (output_files): Adjust.
7897 * src/main.c (main): Adjust.
7898
7899 2001-09-23 Marc Autret <autret_m@epita.fr>
7900
7901 * src/files.c (compute_header_macro): Computes header macro name
7902 from spec_defines_file when given.
7903
7904 2001-09-23 Marc Autret <autret_m@epita.fr>
7905
7906 * src/files.c (output_files): Add default extensions.
7907
7908 2001-09-22 Akim Demaille <akim@epita.fr>
7909
7910 * src/conflicts.c (finalize_conflicts): Rename as...
7911 (free_conflicts): this.
7912
7913 2001-09-22 Akim Demaille <akim@epita.fr>
7914
7915 * src/gram.c (gram_free): Rename back as...
7916 (dummy): this.
7917 (output_token_translations): Free `token_translations'.
7918 * src/symtab.c (free_symtab): Free the tag field.
7919
7920 2001-09-22 Akim Demaille <akim@epita.fr>
7921
7922 Remove `translations' as it is always set to true.
7923
7924 * src/gram.h: Adjust.
7925 * src/reader.c (packsymbols, parse_token_decl): Adjust
7926 * src/print.c (print_grammar): Adjust.
7927 * src/output.c (output_token_translations): Adjust.
7928 * src/lex.c (lex): Adjust.
7929 * src/gram.c: Be sure the set pointers to NULL.
7930 (dummy): Rename as...
7931 (gram_free): this.
7932
7933 2001-09-22 Akim Demaille <akim@epita.fr>
7934
7935 * configure.in: Invoke AM_LIB_DMALLOC.
7936 * src/system.h: Use dmalloc.
7937 * src/LR0.c: Be sure to have pointers initialized to NULL.
7938 (allocate_itemsets): Allocate kernel_items only if needed.
7939
7940 2001-09-22 Akim Demaille <akim@epita.fr>
7941
7942 * configure.in: Bump to 1.29b.
7943 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
7944 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
7945 need xmalloc.c in calc.y.
7946 From Pascal Bart.
7947
7948 2001-09-21 Akim Demaille <akim@epita.fr>
7949
7950 Version 1.29a.
7951 * Makefile.maint, config/config.guess, config/config.sub,
7952 * config/missing: Update from masters.
7953 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
7954 upon package.m4.
7955 * configure.in (ALL_LINGUAS): Add `tr'.
7956
7957 2001-09-21 Akim Demaille <akim@epita.fr>
7958
7959 * tests/Makefile.am (package.m4): Move to...
7960 ($(srcdir)/$(TESTSUITE)): here.
7961
7962 2001-09-20 Akim Demaille <akim@epita.fr>
7963
7964 * src/complain.c: No longer try to be standalone: use system.h.
7965 Don't assume __STDC__ is defined to 1. Just test if it is defined.
7966 * src/complain.h: Likewise.
7967 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
7968 Remove the unused variable `n'.
7969 From Albert Chin-A-Young.
7970
7971 2001-09-18 Marc Autret <autret_m@epita.fr>
7972
7973 * doc/bison.1: Update.
7974 * doc/bison.texinfo (Bison Options): Update --defines and --graph
7975 descriptions.
7976 (Option Cross Key): Update.
7977 Add --graph.
7978
7979 2001-09-18 Marc Autret <autret_m@epita.fr>
7980
7981 * tests/regression.at: New test (comment in %union).
7982
7983 2001-09-18 Marc Autret <autret_m@epita.fr>
7984
7985 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
7986 do that.
7987 Reported by Keith Browne.
7988
7989 2001-09-18 Marc Autret <autret_m@epita.fr>
7990
7991 * tests/output.at: Add tests for --defines and --graph.
7992
7993 2001-09-18 Marc Autret <autret_m@epita.fr>
7994
7995 * tests/output.at: Removes tests of %{header,src}_extension features.
7996
7997 2001-09-18 Akim Demaille <akim@epita.fr>
7998
7999 * tests/Makefile.am (package.m4): New.
8000 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8001 (_AT_CHECK_CALC_ERROR): Likewise.
8002 Factor the `, ' part of verbose error messages.
8003
8004 2001-09-18 Marc Autret <autret_m@epita.fr>
8005
8006 * src/getargs.c (longopts): Declare --defines and --graph as options
8007 with optional arguments.
8008 * src/files.h: Add extern declarations.
8009 * src/files.c (spec_graph_file, spec_defines_file): New.
8010 (output_files): Update.
8011 Remove CPP-outed code.
8012
8013 2001-09-18 Marc Autret <autret_m@epita.fr>
8014
8015 Turn off %{source,header}_extension feature.
8016
8017 * src/files.c (compute_exts_from_gf): Update.
8018 (compute_exts_from_src): Update.
8019 (output_files): CPP-out useless code.
8020 * src/files.h: Remove {header,source}_extension extern declarations.
8021 * src/reader.c (parse_dquoted_param): CPP-out.
8022 (parse_header_extension_decl): Remove.
8023 (parse_source_extension_decl): Remove.
8024 (read_declarations): Remove cases tok_{hdrext,srcext}.
8025 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8026 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8027
8028 2001-09-10 Akim Demaille <akim@epita.fr>
8029
8030 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8031 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8032 (AT_CHECK_OUTPUT): this.
8033 Merely check ls' exit status, its output is useless.
8034
8035 2001-09-10 Akim Demaille <akim@epita.fr>
8036
8037 * tests/calc.at: Use m4_match.
8038 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8039
8040 2001-09-10 Marc Autret <autret_m@epita.fr>,
8041 Akim Demaille <akim@epita.fr>
8042
8043 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8044 enum color_e.
8045 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8046 to `normal'.
8047 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8048 * src/lex.h: Adjust prototype.
8049 (token_t): Add `tok_undef'.
8050 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8051 (parse_percent_token): Now returns token_t.
8052 Add default statement in switch.
8053 (lex): Separate `c' as an input variable, from the token_t result
8054 part.
8055 (unlexed): Is a token_t.
8056
8057 2001-09-10 Akim Demaille <akim@epita.fr>
8058
8059 * configure.in: Bump to 1.29a.
8060
8061 2001-09-07 Akim Demaille <akim@epita.fr>
8062
8063 Version 1.29.
8064
8065 2001-08-30 Akim Demaille <akim@epita.fr>
8066
8067 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8068 * m4/atconfig.m4: Remove.
8069 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8070 * tests/bison: New.
8071 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8072 m4_if, m4_patsubst, and m4_regexp.
8073 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8074 `input' file instead of echo.
8075
8076 2001-08-29 Akim Demaille <akim@epita.fr>
8077
8078 Bump to 1.28e.
8079
8080 2001-08-29 Akim Demaille <akim@epita.fr>
8081
8082 Version 1.28d.
8083
8084 2001-08-29 Paul Eggert <eggert@twinsun.com>
8085
8086 * src/bison.simple (yyparse): Don't take the address of an
8087 item before the start of an array, as that doesn't conform to
8088 the C Standard.
8089
8090 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8091
8092 * doc/bison.texinfo (Location Tracking Calc): New node.
8093
8094 2001-08-29 Paul Eggert <eggert@twinsun.com>
8095
8096 * src/output.c (output): Do not define const, as this now
8097 causes more problems than it cures.
8098
8099 2001-08-29 Akim Demaille <akim@epita.fr>
8100
8101 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8102 the nodes.
8103 Be sure to tag the `detailmenu'.
8104
8105 2001-08-29 Akim Demaille <akim@epita.fr>
8106
8107 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8108 download in a tmp dir.
8109
8110 2001-08-28 Marc Autret <autret_m@epita.fr>
8111
8112 * config/depcomp: New file.
8113
8114 2001-08-28 Marc Autret <autret_m@epita.fr>
8115
8116 * doc/bison.1 (mandoc): Adjust.
8117 From Juan Manuel Guerrero.
8118
8119 2001-08-28 Marc Autret <autret_m@epita.fr>
8120
8121 * src/print_graph.c (print_state): Fix.
8122
8123 2001-08-27 Marc Autret <autret_m@epita.fr>
8124
8125 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8126 char * members.
8127 Echo modifications to the functions prototypes.
8128 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8129
8130 2001-08-27 Marc Autret <autret_m@epita.fr>
8131
8132 * src/vcg.c: Include `xalloc.h'.
8133 (add_colorentry): New.
8134 (add_classname): New.
8135 (add_infoname): New.
8136 * src/vcg.h: Add new prototypes.
8137
8138 2001-08-27 Akim Demaille <akim@epita.fr>
8139
8140 * Makefile.maint: Sync. again with CVS Autoconf.
8141
8142 2001-08-27 Akim Demaille <akim@epita.fr>
8143
8144 * Makefile.maint: Formatting changes.
8145 (po-update, cvs-update, update): New targets.
8146 (AMTAR): Remove.
8147
8148 2001-08-27 Akim Demaille <akim@epita.fr>
8149
8150 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8151 * Makefile.maint: Sync. with CVS Autoconf.
8152
8153 2001-08-27 Marc Autret <autret_m@epita.fr>
8154
8155 * src/vcg.h (struct infoname_s): New.
8156 (struct colorentry_s): New.
8157 (graph_s): New fields {vertical,horizontal}_order in structure.
8158 Add `infoname' field.
8159 Add `colorentry' field;
8160 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8161 (G_HORIZONTAL_ORDER): New.
8162 (G_INFONAME): New.
8163 (G_COLORENTRY): New.
8164 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8165 Add output of `infoname'.
8166 Add output of `colorentry'.
8167
8168 2001-08-27 Marc Autret <autret_m@epita.fr>
8169
8170 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8171 This one shadowed a global parameter.
8172
8173 2001-08-24 Marc Autret <autret_m@epita.fr>
8174
8175 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8176 instead of `unsigned'.
8177 (print_state): Do not call obstack_object_size () in obstack_grow ()
8178 to avoid macro variables shadowing.
8179
8180 2001-08-23 Marc Autret <autret_m@epita.fr>
8181
8182 * src/lex.c (percent_table): Typo: s/naem/name/.
8183 Add graph option.
8184 Normalize new options declarations.
8185
8186 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8187
8188 * tests/suite.at: Exercise %header_extension and %source_extension.
8189
8190 2001-08-16 Marc Autret <autret_m@epita.fr>
8191
8192 * src/reader.c (parse_dquoted_param): New.
8193 (parse_header_extension_decl): Use it.
8194 (parse_source_extension_decl): Likewise.
8195
8196 2001-08-16 Marc Autret <autret_m@epita.fr>
8197
8198 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8199 (get_xxxx_str): Use assert () instead of complain ().
8200 Remove return invokations in default cases.
8201 (get_decision_str): Modify default behaviour. Remove second argument.
8202 Echo modifications on calls.
8203 (output_graph): Fix.
8204
8205 2001-08-16 Marc Autret <autret_m@epita.fr>
8206
8207 * src/getargs.c (usage): Update with ``-g, --graph''.
8208
8209 2001-08-16 Marc Autret <autret_m@epita.fr>
8210
8211 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8212 (Option Cross Key): Likewise.
8213 * doc/bison.1: Update.
8214
8215 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8216
8217 * src/output.c (output_master_parser): Don't finish action_obstack.
8218 (output_parser): Don't care about the muscle action, here.
8219 (prepare): Copy the action_obstack in the action muscle.
8220 (output): Free action_obstack.
8221
8222 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8223
8224 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8225 will contain `%union' declaration.
8226 (parse_union_decl): Delete #line directive output.
8227 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8228 informations about %union.
8229 (parse_union_decl): Copy the union_obstack in the muscle stype.
8230 * src/bison.simple: Add new #line directive.
8231 Add typdef %%stype YYSTYPE.
8232
8233 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8234
8235 * src/bison.simple: Add new `#line' directive.
8236
8237 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8238
8239 * src/bison.simple: New `#line' directive.
8240 * src/output.c (output_parser): Support new dynamic muscle input_line.
8241
8242 2001-09-22 Marc Autret <autret_m@epita.fr>
8243
8244 * src/output.c (output_master_parser): New.
8245 (output_parser): Be more re-entrant.
8246
8247 2001-09-21 Marc Autret <autret_m@epita.fr>
8248
8249 * src/reader.c (copy_definition, parse_union_decl): Update and use
8250 `linef' muscle.
8251 (copy_action): Likewise.
8252 Use obstack_1grow ().
8253 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8254
8255 2001-09-21 Marc Autret <autret_m@epita.fr>
8256
8257 * src/options.c (option_table): Adjust.
8258 * src/lex.c (parse_percent_token): Fix.
8259
8260 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8261
8262 * src/options.c (symtab.h): Include it, need by lex.h.
8263
8264 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8265
8266 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8267 is now an option_table_struct*.
8268 (option_strcmp): New function option_strcmp.
8269 (parse_percent_token): Call option_strcmp.
8270 * src/getargs.c (xalloc.h, options.h): Include it.
8271 (getargs): Call create_long_option_table.
8272 (getargs): Free longopts at the end of the function.
8273 (shortopts): Move in options.c.
8274 * src/options.c (create_long_option_table): New function. Convert
8275 information from option_table to option structure.
8276 * src/reader.c (options.h): Include it.
8277
8278 * src/Makefile.am: Adjust.
8279 * src/options.c (option_table): Create from longopts and percent_table.
8280 * src/getargs.c (longopts): Delete.
8281 * src/lex.c (struct percent_table_struct): Delete.
8282 (percent_table): Delete.
8283 (options.h): Include it.
8284 * src/options.c: Create.
8285 * src/options.h: Create.
8286 Declare enum opt_access_e.
8287 Define struct option_table_struct.
8288
8289 2001-09-20 Marc Autret <autret_m@epita.fr>
8290
8291 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8292 sections of Bison.
8293
8294 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8295
8296 * src/bison.simple: s/%%filename/%%skeleton.
8297 * src/muscle_tab.c (getargs.h): Include it.
8298 (muscle_init): Insert new muscle skeleton.
8299
8300 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8301
8302 * src/output.c (output_parser): Delete unused variable actions_dumped.
8303
8304 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8305
8306 * src/output.c (output): Delete call to reader_output_yylsp.
8307 * src/reader.c (reader): Likewise.
8308 * src/reader.h: Delete declaration of reader_output_yylsp.
8309
8310 2001-09-02 Marc Autret <autret_m@epita.fr>
8311
8312 * src/reader.c: Include muscle_tab.h.
8313 (parse_union_decl): Update.
8314 (parse_macro_decl): Rename parse_muscle_decl.
8315 Update to use renamed functions and variable.
8316 (read_declarations, copy_action, read_additionnal_code, : Updated
8317 with correct variables and functions names.
8318 (packsymbols, reader): Likewise.
8319
8320 * src/reader.h (muscle_obstack): Extern declaration update.
8321
8322 * src/output.c: Include muscle_tab.h
8323 In all functions using macro_insert, change by using muscle_insert ().
8324 (macro_obstack): Rename muscle_obstack.
8325 Echo modifications in the whole file.
8326 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8327 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8328 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8329
8330 * src/muscle_tab.h: Update double inclusion macros.
8331 (macro_entry_s): Rename muscle_entry_s.
8332 Update prototypes.
8333
8334 * src/muscle_tab.c: Include muscle_tab.h.
8335 Rename macro_tabble to muscle_table.
8336 (mhash1, mhash2, mcmp): Use muscle_entry.
8337 (macro_init): Rename muscle_init. Update.
8338 (macro_insert): Rename muscle_insert. Update.
8339 (macro_find): Rename muscle_find. Update.
8340
8341 * src/main.c: Include muscle_tab.h.
8342 (main): Call muscle_init ().
8343 * src/Makefile.am (bison_SOURCES): Echo modifications.
8344
8345 2001-09-02 Marc Autret <autret_m@epita.fr>
8346
8347 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8348
8349 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8350
8351 2001-09-02 Marc Autret <autret_m@epita.fr>
8352
8353 * src/macrotab.c, src/macrotab.h: Remove.
8354
8355 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8356
8357 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8358 filename.
8359
8360 2001-09-01 Marc Autret <autret_m@epita.fr>
8361
8362 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8363 to an explicit value to activate the feature. We do it here.
8364
8365 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8366
8367 * src/output.c (prepare): Delete the `filename' muscule insertion.
8368 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8369 (parse_union_decl): Likewise.
8370 * src/macrotab.c (macro_init): Initialize filename by infile.
8371
8372 2001-08-31 Marc Autret <autret_m@epita.fr>
8373
8374 * src/bison.simple (YYLSP_NEEDED): New definition.
8375 * src/output.c (prepare): Add macro insertion of `locations_flag'
8376
8377 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8378
8379 * src/output.c (prepare): Delete insertion of previous muscles,
8380 and insert the `prefix' muscles.
8381 * src/macrotab.c (macro_init): Likewise.
8382 (macro_init): Initialization prefix directive by `yy'.
8383 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8384 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8385 yylval, yydebug, yyerror, yynerrs and yyparse.
8386 New directive `#define' to substitute yydebug, ... with option
8387 name_prefix.
8388
8389 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8390
8391 * src/main.c (main): Standardize.
8392 * src/output.c (output_table_data, output_parser): Likewise.
8393 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8394
8395 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8396
8397 * src/reader.c (read_additionnal_code): Rename %%user_code to
8398 %%epilogue.
8399 * src/output.c (output): Rename %%declarations to %%prologue.
8400 * src/bison.simple: Echo modifications.
8401
8402 2001-08-31 Marc Autret <autret_m@epita.fr>
8403
8404 * src/reader.c (readgram): CleanUp.
8405 (output_token_defines): Likewise.
8406 (packsymbols): Likewise.
8407 (reader): Likewise.
8408 * src/output.c (output): CPP-out useless code.
8409
8410 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8411
8412 * src/reader.c (reader): Delete obsolete call to function
8413 output_trailers and output_headers.
8414 * src/output.h: Remove obsolete functions prototypes of output_headers
8415 and output_trailers.
8416
8417 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8418
8419 * src/main.c: Include macrotab.h.
8420 * src/macrotab.h (macro_entry_s): Constify fields.
8421 Adjust functions prototypes.
8422 * src/macrotab.c (macro_insert): Constify key and value.
8423 (macro_find): Constify key.
8424 (macro_insert): Include 'xalloc.h'
8425 (macro_insert): Use XMALLOC.
8426 (macro_find): Constify return value.
8427 * src/output.c (output_table_data): Rename table to table_data.
8428 (output_parser): Constify macro_key, macro_value.
8429
8430 2001-08-30 Marc Autret <autret_m@epita.fr>
8431
8432 * src/reader.c (parse_skel_decl): New.
8433 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8434 * src/lex.h (token_t): New token `tok_skel'.
8435 * src/lex.c (percent_table): Add skeleton option entry.
8436 Standardize.
8437
8438 2001-08-29 Marc Autret <autret_m@epita.fr>
8439
8440 * src/bison.simple: Add %%user_code directive at the end.
8441 * src/reader.c (read_additionnal_code): New.
8442 (reader): Use it.
8443 * src/output.c (output_program): Remove.
8444 (output): Update.
8445
8446 2001-08-28 Marc Autret <autret_m@epita.fr>
8447
8448 * src/output.c (output_actions): Clean up.
8449 (output_gram): CPP-out useless code.
8450 * src/reader.c (reader): Clean up, CPP-out useless code.
8451
8452 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8453
8454 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8455 directive.
8456 * src/bison.simple: Add `%%definitions'.
8457
8458 2001-08-28 Marc Autret <autret_m@epita.fr>
8459
8460 * config/depcomp: New file.
8461
8462 2001-08-27 Paul Eggert <eggert@twinsun.com>
8463
8464 * src/bison.simple (yyparse): Don't take the address of an
8465 item before the start of an array, as that doesn't conform to
8466 the C Standard.
8467
8468 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8469
8470 * src/output.c (output): Remove the initialization of the macro
8471 obstack. It was done too late here.
8472
8473 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8474 completely wrong.
8475 (reader): Initialize the macro obstack here, since we need it to grow
8476 '%define' directives.
8477
8478 * src/reader.h: Declare the macro obstack as extern.
8479
8480 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8481
8482 * src/output.c (output_parser): Fix. Store single '%' characters in
8483 the output obstack instead of throwing them away.
8484
8485 2001-08-27 Akim Demaille <akim@epita.fr>
8486
8487 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8488
8489 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8490
8491 * lib/Makefile.am: Adjust.
8492
8493 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8494
8495 * src/bison.simple: Update and add '%%' directives.
8496
8497 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8498
8499 * src/reader.c (reader): Remove calls to 'output_headers' and
8500 'output_trailers'. Remove some C output.
8501 (readgram): Disable a piece of code that was writing a default
8502 definition for 'YYSTYPE'.
8503 (reader_output_yylsp): Remove.
8504 (packsymbols): Output token defintions to a macro.
8505 (copy_definition): Disable C output.
8506
8507 * src/reader.c (parse_macro_decl): New function used to parse macro
8508 declarations.
8509 (copy_string2): Put the body of copy_string into this new function.
8510 Add a parameter to let the caller choose whether he wants to copy the
8511 string delimiters or not.
8512 (copy_string): Be a simple call to copy_string2 with the last argument
8513 bound to true.
8514 (read_declarations): Add case for macro definition.
8515 (copy_identifier): New.
8516 (parse_macro_decl): Read macro identifiers using copy_identifier
8517 rather than lex.
8518
8519 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8520
8521 * src/output.c (prepare): Add prefixed names.
8522 (output_parser): Output semantic actions.
8523 (output_parser): Fix bug on '%%line' directives.
8524
8525 * src/output.c (output_headers): Remove. The C code printed by this
8526 function should now be in the skeletons.
8527 (output_trailers): Remove.
8528 (output): Disable call to 'reader_output_yylsp'.
8529 (output_rule_data): Do not output tables to the table obstack.
8530
8531 * src/output.c: Remove some C dedicated output.
8532 Improve the use of macro and output obstacks.
8533 (output_defines): Remove.
8534
8535 * src/output.c (output_token_translations): Associate 'translate'
8536 table with a macro. No output to the table obstack.
8537 (output_gram): Same for 'rhs' and 'prhs'.
8538 (output_stos): Same for 'stos'.
8539 (output_rule_data): Same for 'r1' and 'r2'.
8540 (token_actions): Same for 'defact'.
8541 (goto_actions): Same for 'defgoto'.
8542 (output_base): Same for 'pact' and 'pgoto'.
8543 (output_table): Same for 'table'.
8544 (output_check): Same for 'check'.
8545
8546 * src/output.c (output_table_data): New function.
8547 (output_short_table): Remove.
8548 (output_short_or_char_table): Remove.
8549
8550 * src/output.c (output_parser): Replace most of the skeleton copy code
8551 with something new. Skeletons are now processed character by character
8552 rather than line by line, and Bison looks for '%%' macros. This is the
8553 first step in making Bison's output process (a lot) more flexible.
8554 (output_parser): Use the macro table.
8555
8556 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8557
8558 * src/main.c (main): Initialize the macro table.
8559
8560 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8561
8562 * src/lex.c (percent_table): Add tok_define.
8563 * src/lex.h: Add tok_define.
8564
8565 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8566
8567 * src/macrotab.c: New file.
8568 * src/macrotab.h: New file.
8569 * src/Makefile.am: Update.
8570
8571 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8572
8573 * lib/hash.c: New file.
8574 * lib/hash.h: New file.
8575 * lib/Makefile.am: Update.
8576
8577 2001-08-15 Akim Demaille <akim@epita.fr>
8578
8579 Version 1.28c.
8580
8581 2001-08-15 Marc Autret <autret_m@epita.fr>
8582
8583 * src/reader.c (readgram): Indent output macro YYSTYPE.
8584 (packsymbols): Likewise.
8585 (output_token_defines): Likewise.
8586 * src/files.c: Standardize.
8587 (compute_header_macro): New.
8588 (defines_obstack_save): New. Use compute_header_macro.
8589 (output_files): Update. Use defines_obstack_save.
8590
8591 2001-08-15 Akim Demaille <akim@epita.fr>
8592
8593 * doc/bison.texinfo (Table of Symbols): Document
8594 YYSTACK_USE_ALLOCA.
8595
8596 2001-08-15 Akim Demaille <akim@epita.fr>
8597
8598 * missing: Update from CVS Automake.
8599 * config/config.guess, config/config.sub, config/texinfo.tex:
8600 Update from gnu.org.
8601
8602 2001-08-15 Akim Demaille <akim@epita.fr>
8603
8604 * Makefile.maint: Sync with CVS Autoconf.
8605
8606 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8607
8608 * doc/bison.texinfo: Include GNU Free Documentation License from
8609 `fdl.texi'.
8610 * doc/fdl.texi: Add to package.
8611
8612 2001-08-14 Marc Autret <autret_m@epita.fr>
8613
8614 Turn on %{source,header}_extension features.
8615
8616 * src/lex.c (percent_table): Un-CPP out header_extension and
8617 source_extension.
8618 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8619 (compute_exts_from_src): Remove conditions. It restores priorities
8620 between options.
8621
8622 2001-08-14 Marc Autret <autret_m@epita.fr>
8623
8624 * src/files.c (compute_base_names): Add extensions computing when
8625 `--file-prefix' used.
8626 Standardize function calls.
8627
8628 2001-08-13 Marc Autret <autret_m@epita.fr>
8629
8630 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8631 defining it (defined but null disables alloca).
8632
8633 2001-08-13 Marc Autret <autret_m@epita.fr>
8634
8635 * src/bison.simple (_yy_memcpy): CPP reformat.
8636
8637 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8638
8639 * tests/atconfig.in (CPPFLAGS): Fix.
8640
8641 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8642
8643 * doc/bison.texinfo: Include GNU General Public License from
8644 `gpl.texi'.
8645 * doc/gpl.texi: Add to package.
8646
8647 2001-08-10 Marc Autret <autret_m@epita.fr>
8648
8649 * src/print_graph.h: Fix.
8650 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8651
8652 2001-08-10 Akim Demaille <akim@epita.fr>
8653
8654 * src/system.h: Provide default declarations for stpcpy, strndup,
8655 and strnlen.
8656
8657 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8658
8659 * doc/bison.texinfo (Locations): Update @$ stuff.
8660
8661 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8662
8663 * src/bison.simple (YYLLOC_DEFAULT): Update.
8664 (yyparse): Adjust.
8665
8666 2001-08-08 Marc Autret <autret_m@epita.fr>
8667
8668 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8669 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8670 Reported by Fabrice Bauzac.
8671
8672 2001-08-08 Marc Autret <autret_m@epita.fr>
8673
8674 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8675 * src/vcg.c (output_node): Fix.
8676 * src/vcg.h: Cleanup.
8677 * src/print_graph.c: Add comments.
8678 (node_output_size): New global variable. Simplify the formatting of
8679 the VCG graph output.
8680 (print_actions): Unused code is now used. It notifies the final state
8681 and no action states in the VCG graph. It also give the reduce actions.
8682 The `shift and goto' edges are red and the `go to state' edges are
8683 blue.
8684 Get the current node name and node_obstack by argument.
8685 (node_obstack): New variable.
8686 (print_state): Manage node_obstack.
8687 (print_core): Use node_obstack given by argument.
8688 A node is not only computed here but in print_actions also.
8689 (print_graph): CPP out useless code instead of commenting it.
8690
8691 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8692
8693 * tests/atconfig.in (CPPFLAGS): Fix.
8694
8695 2001-08-07 Akim Demaille <akim@epita.fr>
8696
8697 * src/print_graph.c (quote): New.
8698 (print_core): Use it.
8699
8700 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8701
8702 * src/vcg.c (complain.h): Include it.
8703 Unepitaize `return' invocations.
8704 [NDEBUG] (main): Remove.
8705 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8706 * src/files.c (open_files): Initialize graph_obstack.
8707 * src/print_graph.c (print_actions): CPP out useless code.
8708 (print_core): Don't output the last `\n' in labels.
8709 Use `quote'.
8710 * src/files.c (output_files): Output the VCG file.
8711 * src/main.c (main): Invoke print_graph ();
8712
8713 2001-08-06 Marc Autret <autret_m@epita.fr>
8714
8715 Automaton VCG graph output.
8716 Using option ``-g'' or long option ``--graph'', you can generate
8717 a gram_filename.vcg file containing a VCG description of the LALR (1)
8718 automaton of your grammar.
8719
8720 * src/main.c: Call to print_graph() function.
8721 * src/getargs.h: Update.
8722 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8723 (graph_flag): New flag.
8724 (longopts): Update.
8725 (getargs): Add case `g'.
8726 * src/files.c (graph_obstack): New obstack struct.
8727 (open_files): Initialize new obstack.
8728 (output_files): Saves graph_obstack if required.
8729 * src/files.h (graph_obstack): New extern declaration.
8730 * src/Makefile.am: Add new source files.
8731
8732 2001-08-06 Marc Autret <autret_m@epita.fr>
8733
8734 * src/print_graph.c, src/print_graph.h (graph): New.
8735 * src/vcg.h: New file.
8736 * src/vcg.c: New file, VCG graph handling.
8737
8738 2001-08-06 Marc Autret <autret_m@epita.fr>
8739
8740 Add of %source_extension and %header_extension which specify
8741 the source or/and the header output file extension.
8742
8743 * src/files.c (compute_base_names): Remove initialisation of
8744 src_extension and header_extension.
8745 (compute_exts_from_gf): Update.
8746 (compute_exts_from_src): Update.
8747 (output_files): Update.
8748 * src/reader.c (parse_header_extension_decl): New.
8749 (parse_source_extension_decl): New.
8750 (read_declarations): New case statements for the new tokens.
8751 * src/lex.c (percent_table): Add entries for %source_extension
8752 and %header_extension.
8753 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8754
8755 2001-08-06 Marc Autret <autret_m@epita.fr>
8756
8757 * configure.in: Bump to 1.28c.
8758 * doc/bison.texinfo: Texinfo thingies.
8759
8760 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8761
8762 * tests/atconfig.in (CPPFLAGS): Add.
8763 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8764
8765 2001-08-03 Akim Demaille <akim@epita.fr>
8766
8767 Version 1.28b.
8768
8769 2001-08-03 Akim Demaille <akim@epita.fr>
8770
8771 * tests/Makefile.am (check-local): Ship testsuite.
8772 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8773 Include `string.h'.
8774
8775 2001-08-03 Akim Demaille <akim@epita.fr>
8776
8777 * configure.in: Try using -Wformat when compiling.
8778
8779 2001-08-03 Akim Demaille <akim@epita.fr>
8780
8781 * configure.in: Bump to 1.28b.
8782
8783 2001-08-03 Akim Demaille <akim@epita.fr>
8784
8785 * src/complain.c: Adjust strerror_r portability issues.
8786
8787 2001-08-03 Akim Demaille <akim@epita.fr>
8788
8789 Version 1.28a.
8790
8791 2001-08-03 Akim Demaille <akim@epita.fr>
8792
8793 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8794 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8795 * src/getargs.c: Include complain.h.
8796 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8797 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8798
8799 2001-08-03 Akim Demaille <akim@epita.fr>
8800
8801 * src/reader.c (readgram): Display hidden chars in error messages.
8802
8803 2001-08-03 Akim Demaille <akim@epita.fr>
8804
8805 Update to gettext 0.10.39.
8806
8807 2001-08-03 Akim Demaille <akim@epita.fr>
8808
8809 * lib/strspn.c: New.
8810
8811 2001-08-01 Marc Autret <autret_m@epita.fr>
8812
8813 * doc/bison.texinfo: Update.
8814 * doc/bison.1 (mandoc): Update.
8815 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8816 * src/files.c: Support output files extensions computing.
8817 (src_extension): New static variable.
8818 (header_extension): New static variable.
8819 (tr): New function.
8820 (get_extension_index): New function, gets the index of an extension
8821 filename in a string.
8822 (compute_exts_from_gf): New function, computes extensions from the
8823 grammar file extension.
8824 (compute_exts_from_src): New functions, computes extensions from the
8825 C source file extension, file given by ``-o'' option.
8826 (compute_base_names): Update.
8827 (output_files): Update.
8828
8829 2001-08-01 Robert Anisko <anisko_r@epita.fr>
8830
8831 * doc/bison.texi: Document @$.
8832 (Locations): New section.
8833
8834 2001-07-18 Akim Demaille <akim@epita.fr>
8835
8836 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8837 * config/prev-version.txt, config/move-if-change: New.
8838 * Makefile.am: Adjust.
8839
8840 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
8841
8842 * src/bison.simple (yyparse): Suppress warning `comparaison
8843 between signed and unsigned'.
8844
8845 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
8846
8847 * src/getargs.h (raw_flag): Remove.
8848 * src/getargs.c: Die on `-r'/`--raw'.
8849 * src/lex.c (parse_percent_token): Die on `%raw'.
8850 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8851 * tests/calc.at: Suppress test with option `--raw'.
8852
8853 2001-07-14 Akim Demaille <akim@epita.fr>
8854
8855 * config/: New.
8856 * configure.in: Require Autoconf 2.50.
8857 Update to gettext 0.10.38.
8858
8859 2001-03-16 Akim Demaille <akim@epita.fr>
8860
8861 * doc/bison.texinfo: ANSIfy the examples.
8862
8863 2001-03-16 Akim Demaille <akim@epita.fr>
8864
8865 * getargs.c (skeleton): New variable.
8866 (longopts): --skeleton is a new option.
8867 (shortopts, getargs): -S is a new option.
8868 * getargs.h: Declare skeleton.
8869 * output.c (output_parser): Use it.
8870
8871 2001-03-16 Akim Demaille <akim@epita.fr>
8872
8873 * m4/strerror_r.m4: New.
8874 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8875 * lib/error.h, lib/error.c: Update.
8876
8877 2001-03-16 Akim Demaille <akim@epita.fr>
8878
8879 * src/getargs.c (longopts): Clean up.
8880
8881 2001-02-21 Akim Demaille <akim@epita.fr>
8882
8883 * src/reader.c (gensym): `gensym_count' is your own.
8884 Use a static buf to create the symbol name, as token_buffer is no
8885 longer a buffer.
8886
8887 2001-02-08 Akim Demaille <akim@epita.fr>
8888
8889 * src/conflicts.c (conflict_report): Be sure not to append to res
8890 between two calls, which could happen if both first sprintf were
8891 skipped, but not the first cp += strlen.
8892
8893 2001-02-08 Akim Demaille <akim@epita.fr>
8894
8895 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8896 New, from fileutils 4.0.37.
8897 * configure.in: Require Autoconf 2.49c. I took some time before
8898 making this decision. This is the only way out for portability
8899 issues in Bison, it would mean way too much duplicate effort to
8900 import in Bison features implemented in 2.49c since 2.13.
8901 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
8902
8903 2001-02-02 Akim Demaille <akim@epita.fr>
8904
8905 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
8906 * lib/xalloc.h, lib/xmalloc.c: Update.
8907
8908 2001-01-19 Akim Demaille <akim@epita.fr>
8909
8910 Get rid of the ad hoc handling of token_buffer in the scanner: use
8911 the obstacks.
8912
8913 * src/lex.c (token_obstack): New.
8914 (init_lex): Initialize it. No longer call...
8915 (grow_token_buffer): this. Remove it.
8916 Adjust all the places which used it to use the obstack.
8917
8918 2001-01-19 Akim Demaille <akim@epita.fr>
8919
8920 * src/lex.h: Rename all the tokens:
8921 s/\bENDFILE\b/tok_eof/g;
8922 s/\bIDENTIFIER\b/tok_identifier/g;
8923 etc.
8924 Let them be enums, not #define, to ease debugging.
8925 Adjust all the code.
8926
8927 2001-01-18 Akim Demaille <akim@epita.fr>
8928
8929 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
8930 * src/lex.c (maxtoken, grow_token_buffer): Static.
8931
8932 2001-01-18 Akim Demaille <akim@epita.fr>
8933
8934 Since we now use obstacks, more % directives can be enabled.
8935
8936 * src/lex.c (percent_table): Also accept `%yacc',
8937 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
8938 `%debug'.
8939 Handle the actions for `%semantic_parser' and `%pure_parser' here,
8940 instead of returning a token.
8941 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
8942 * src/reader.c (read_declarations): Adjust.
8943 * src/files.c (open_files): Don't call `compute_base_names', don't
8944 compute `attrsfile' since they depend upon data which might be
8945 *in* the input file now.
8946 (output_files): Do it here.
8947 * src/output.c (output_headers): Document the fact that this patch
8948 introduces a guaranteed SEGV for semantic parsers.
8949 * doc/bison.texinfo: Document them.
8950 * tests/suite.at: Exercise these %options.
8951
8952 2000-12-20 Akim Demaille <akim@epita.fr>
8953
8954 Also handle the output file (--verbose) with obstacks.
8955
8956 * files.c (foutput): Remove.
8957 (output_obstack): New.
8958 Adjust all dependencies.
8959 * src/conflicts.c: Return a string.
8960 * src/system.h (obstack_grow_string): Rename as...
8961 (obstack_sgrow): this. Be ready to work with non literals.
8962 (obstack_fgrow4): New.
8963
8964 2000-12-20 Akim Demaille <akim@epita.fr>
8965
8966 * src/files.c (open_files): Fix the computation of short_base_name
8967 in the case of `-o foo.tab.c'.
8968
8969 2000-12-20 Akim Demaille <akim@epita.fr>
8970
8971 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
8972 (copy_dollar): Now that everything uses obstacks, get rid of the
8973 FILE * parameters.
8974
8975 2000-12-20 Akim Demaille <akim@epita.fr>
8976
8977 * src/files.c (open_files): Actually the `.output' file is based
8978 on the short_base_name, not base_name.
8979 * tests/suite.at (Checking output file names): Adjust.
8980
8981 2000-12-20 Akim Demaille <akim@epita.fr>
8982
8983 * src/bison.s1: Remove, we now use directly...
8984 * src/bison.simple: this.
8985 * src/Makefile.am: Use pkgdata instead of data.
8986
8987 2000-12-20 Akim Demaille <akim@epita.fr>
8988
8989 * src/files.c (guard_obstack): New.
8990 (open_files): Initialize it.
8991 (output_files): Dump it...
8992 * src/files.h: Export it.
8993 * src/reader.c (copy_guard): Use it.
8994
8995 2000-12-19 Akim Demaille <akim@epita.fr>
8996
8997 * src/files.c (outfile, defsfile, actfile): Removed as global
8998 vars.
8999 (open_files): Don't compute them.
9000 (output_files): Adjust.
9001 (base_name, short_base_name): Be global.
9002 Adjust dependencies.
9003
9004 2000-12-19 Akim Demaille <akim@epita.fr>
9005
9006 * src/files.c (strsuffix): New.
9007 (stringappend): Be just like strcat but allocate.
9008 (base_names): Eve out from open_files.
9009 Try to simplify the rather hairy computation of base_name and
9010 short_base_name.
9011 (open_files): Use it.
9012 * tests/suite.at (Checking output file names): New test.
9013
9014 2000-12-19 Akim Demaille <akim@epita.fr>
9015
9016 * src/system.h (obstack_grow_literal_string): Rename as...
9017 (obstack_grow_string): this.
9018 * src/output.c (output_parser): Recognize `%% actions' instead of
9019 `$'.
9020 * src/bison.s1: s/$/%% actions/.
9021 * src/bison.hairy: Likewise.
9022
9023 2000-12-19 Akim Demaille <akim@epita.fr>
9024
9025 * src/output.c (output_parser): Compute the `#line' lines when
9026 there are.
9027 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9028 Suggested by Hans Aberg.
9029
9030 2000-12-19 Akim Demaille <akim@epita.fr>
9031
9032 Let the handling of the skeleton files be local to the procedures
9033 that use it.
9034
9035 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9036 longer static.
9037 (fparser, open_extra_files): Remove.
9038 (open_files, output_files): Don't take care of fparser.
9039 * src/files.h: Adjust.
9040 * src/output.c (output_parser): Open and close the file to the
9041 skeleton.
9042 * src/reader.c (read_declarations): When %semantic_parser, open
9043 fguard.
9044
9045 2000-12-19 Akim Demaille <akim@epita.fr>
9046
9047 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9048 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9049
9050 2000-12-19 Akim Demaille <akim@epita.fr>
9051
9052 * src/files.c (open_files): Yipee! We no longer need all the code
9053 looking for `/tmp' since we have no tmp file.
9054
9055 2000-12-19 Akim Demaille <akim@epita.fr>
9056
9057 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9058 New macros.
9059 * src/files.c (open_files): Less dependency on MSDOS etc.
9060
9061 2000-12-14 Akim Demaille <akim@epita.fr>
9062
9063 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9064 Provide a default definition.
9065 Use it when executing the default @ action.
9066 * src/reader.c (reader_output_yylsp): No longer include
9067 `timestamp' and `text' in the default YYLTYPE.
9068
9069 2000-12-12 Akim Demaille <akim@epita.fr>
9070
9071 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9072 (copy_guard): Quote the file names.
9073 Reported by Laurent Mascherpa.
9074
9075 2000-12-12 Akim Demaille <akim@epita.fr>
9076
9077 * src/output.c (output_headers, output_program, output): Be sure
9078 to escape special characters when outputting filenames.
9079 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9080 (output_headers): Don't depend on them, Use ACTSTR.
9081
9082 2000-11-17 Akim Demaille <akim@epita.fr>
9083
9084 * lib/obstack.h: Formatting changes.
9085 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9086 prevents type checking.
9087 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9088 cast the value to (void *): assigning a `foo *' to a `void *'
9089 variable is valid.
9090 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9091 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9092 append characters.
9093
9094 2000-11-17 Akim Demaille <akim@epita.fr>
9095
9096 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9097 as...
9098 (suite.m4, regression.m4, calc.m4): these.
9099 * tests/atgeneral.m4: Update from CVS Autoconf.
9100
9101 2000-11-17 Akim Demaille <akim@epita.fr>
9102
9103 * tests/regression.m4 (%union and --defines): New test,
9104 demonstrating a current bug in the obstack implementation.
9105
9106 2000-11-17 Akim Demaille <akim@epita.fr>
9107
9108 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9109 macros.
9110 Use them to declare the variables which are global or local to
9111 `yyparse'.
9112
9113 2000-11-17 Akim Demaille <akim@epita.fr>
9114
9115 * acconfig.h: Remove, no longer used.
9116
9117 2000-11-07 Akim Demaille <akim@epita.fr>
9118
9119 * src: s/Copyright (C)/Copyright/g.
9120
9121 2000-11-07 Akim Demaille <akim@epita.fr>
9122
9123 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9124 defining.
9125 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9126
9127 2000-11-07 Akim Demaille <akim@epita.fr>
9128
9129 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9130 Merge in a single CPP if/else.
9131
9132 2000-11-07 Akim Demaille <akim@epita.fr>
9133
9134 * src/output.c (output): Remove useless variables.
9135 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9136 argument `data' for consistency with the prototypes.
9137 Qualify it `const'.
9138 (obstack_copy, obstack_copy0): Rename the second argument as
9139 `address' for consistency. Qualify it `const'.
9140 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9141 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9142 `const' their input argument (`data' or `address').
9143 Adjust the corresponding macros to include `const' in casts.
9144
9145 2000-11-03 Akim Demaille <akim@epita.fr>
9146
9147 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9148 s/PFILE1/BISON_HAIRY/.
9149 Adjust dependencies.
9150
9151 2000-11-03 Akim Demaille <akim@epita.fr>
9152
9153 For some reason, this was not applied.
9154
9155 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9156 `unlink': it's no longer used.
9157
9158 2000-11-03 Akim Demaille <akim@epita.fr>
9159
9160 * src/files.c (skeleton_find): New function, eved out of...
9161 (open_files, open_extra_files): here.
9162
9163 2000-11-03 Akim Demaille <akim@epita.fr>
9164
9165 Don't use `atexit'.
9166
9167 * src/files.c (obstack_save): New function.
9168 (done): Rename as...
9169 (output_files): this.
9170 Use `obstack_save'.
9171 * src/main.c (main): Don't use `atexit' to register `done', since
9172 it no longer has to remove tmp files, just call `output_files'
9173 when there are no errors.
9174
9175 2000-11-02 Akim Demaille <akim@epita.fr>
9176
9177 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9178 `unlink': it's no longer used.
9179 * src/files.h: Formatting changes.
9180
9181 2000-11-02 Akim Demaille <akim@epita.fr>
9182
9183 Remove the last uses of mktemp and unlink/delete.
9184
9185 * src/files.c (fdefines, ftable): Removed.
9186 (defines_ostack, table_obstack): New.
9187 Adjust dependencies of the former into uses of the latter.
9188 * src/output.c (output_short_or_char_table, output_short_table):
9189 Convert to using obstacks.
9190 * src/reader.c (copy_comment2): Accept one FILE * and two
9191 obstacks.
9192 (output_token_defines, reader_output_yylsp): Use obstacks.
9193 * src/system.h (obstack_fgrow3): New.
9194
9195 2000-11-01 Akim Demaille <akim@epita.fr>
9196
9197 Change each use of `fattrs' into a use of `attrs_obstack'.
9198
9199 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9200 * src/files.c (fattrs): Remove.
9201 (attrs_obstack): New.
9202 Adjust all dependencies.
9203 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9204
9205 2000-11-01 Akim Demaille <akim@epita.fr>
9206
9207 Introduce obstacks.
9208 Change each use of `faction' into a use of `action_obstack'.
9209
9210 * lib/obstack.h, lib/obstack.c: New files.
9211 * src/files.c (faction): Remove.
9212 (action_obstack): New.
9213 Adjust all dependencies.
9214
9215 2000-10-20 Akim Demaille <akim@epita.fr>
9216
9217 * lib/quote.h (PARAMS): New macro. Use it.
9218
9219 2000-10-16 Akim Demaille <akim@epita.fr>
9220
9221 * src/output.c (output_short_or_char_table): New function.
9222 (output_short_table, output_token_translations): Use it.
9223 (goto_actions): Use output_short_table.
9224
9225 2000-10-16 Akim Demaille <akim@epita.fr>
9226
9227 * src/symtab.c (bucket_new): New function.
9228 (getsym): Use it.
9229
9230 * src/output.c (output_short_table): New argument to display the
9231 comment associated with the table.
9232 Adjust dependencies.
9233 (output_gram): Use it.
9234 (output_rule_data): Nicer output layout for YYTNAME.
9235
9236 2000-10-16 Akim Demaille <akim@epita.fr>
9237
9238 * src/lex.c (read_typename): New function.
9239 (lex): Use it.
9240 * src/reader.c (copy_dollar): Likewise.
9241
9242 2000-10-16 Akim Demaille <akim@epita.fr>
9243
9244 * src/reader.c (copy_comment2): Expect the input stream to be on
9245 the `/' which is suspected to open a comment, instead of being
9246 called after `//' or `/*' was read.
9247 (copy_comment, copy_definition, parse_union_decl, copy_action)
9248 (copy_guard): Adjust.
9249
9250 2000-10-16 Akim Demaille <akim@epita.fr>
9251
9252 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9253 `read_signed_integer'.
9254
9255 2000-10-16 Akim Demaille <akim@epita.fr>
9256
9257 * src/reader.c (copy_dollar): New function.
9258 (copy_guard, copy_action): Use it.
9259
9260 2000-10-16 Akim Demaille <akim@epita.fr>
9261
9262 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9263 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9264 New files, from Fileutils 4.0.27.
9265 * src/main.c (printable_version): Remove.
9266 * src/lex.c, src/reader.c: Use `quote'.
9267
9268 2000-10-04 Akim Demaille <akim@epita.fr>
9269
9270 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9271
9272 2000-10-04 Akim Demaille <akim@epita.fr>
9273
9274 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9275
9276 2000-10-04 Akim Demaille <akim@epita.fr>
9277
9278 When a literal string is used to define two different tokens,
9279 `bison -v' segfaults.
9280 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9281
9282 * tests/regression.m4: New file.
9283 Include the core of the sample provided by Piotr Gackiewicz.
9284 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9285 properly.
9286
9287 2000-10-04 Akim Demaille <akim@epita.fr>
9288
9289 * src/reader.c (parse_expect_decl): Keep `count' within the size
9290 of `buffer'.
9291 From Neil Booth.
9292
9293 2000-10-02 Paul Eggert <eggert@twinsun.com>
9294
9295 * bison.s1 (yyparse): Assign the default value
9296 unconditionally, to avoid a GCC warning and make the parser a
9297 tad smaller.
9298
9299 2000-10-02 Akim Demaille <akim@epita.fr>
9300
9301 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9302 options.
9303
9304 2000-10-02 Akim Demaille <akim@epita.fr>
9305
9306 * src/derives.c, src/print.c, src/reduce.c: To ease the
9307 translation, move some `\n' out of the translated strings.
9308
9309 2000-10-02 Akim Demaille <akim@epita.fr>
9310
9311 The location tracking mechanism is precious for parse error
9312 messages. Nevertheless, it is enabled only when `@n' is used in
9313 the grammar, which is a different issue (you can use it in error
9314 message, but not in the grammar per se). Therefore, there should
9315 be another means to enable it.
9316
9317 * src/getargs.c (getargs): Support `--locations'.
9318 (usage): Report it.
9319 * src/getargs.h (locationsflag): Export it.
9320 * src/lex.c (percent_table): Support `%locations'.
9321 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9322 with `locationsflag'.
9323 * doc/bison.texinfo: Document `--locations' and `%locations'.
9324 Sort the options.
9325 * tests/calc.m4: Test it.
9326
9327 For regularity of the names, replace each
9328 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9329 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9330 In addition replace each `flag' with `_flag'.
9331
9332 2000-10-02 Akim Demaille <akim@epita.fr>
9333
9334 Also test parse error messages, including with YYERROR_VERBOSE.
9335
9336 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9337 associative).
9338 Use it to check the computations.
9339 Use it to check `nonassoc' is honored.
9340 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9341 `--yyerror-verbose'.
9342 (_AT_CHECK_CALC): Adjust to this option.
9343 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9344
9345 2000-10-02 Akim Demaille <akim@epita.fr>
9346
9347 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9348 the latter demonstrates a flaw in the handling of non debugging
9349 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9350 was used in order to simplify:
9351
9352 #if YYDEBUG
9353 if (yydebug)
9354 {
9355 ...
9356 }
9357 #endif
9358
9359 into
9360
9361 if (yydebug)
9362 {
9363 ...
9364 }
9365
9366 unfortunately this leads to a CPP conflict when
9367 `--name-prefix=foo' is used since it produces `#define yydebug
9368 foodebug'.
9369
9370 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9371 (YYDPRINTF): New macro.
9372 Spread its use.
9373 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9374 the bison options.
9375 Also test `--verbose', `--defines' and `--name-prefix'.
9376
9377 2000-10-02 Akim Demaille <akim@epita.fr>
9378
9379 Improve the readability of the produced parsers.
9380
9381 * src/bison.s1: Formatting changes.
9382 Improve the comment related to the `$' mark.
9383 (yydefault): Don't fall through to `yyresume': `goto' there.
9384 * src/output.c (output_parser): When the `$' is met, skip the end
9385 of its line.
9386 New variable, `number_of_dollar_signs', to check there's exactly
9387 one `$' in the parser skeleton.
9388
9389 2000-10-02 Akim Demaille <akim@epita.fr>
9390
9391 * lib/xstrdup.c: New file, from the fileutils.
9392 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9393 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9394 instead of strlen + xmalloc + strcpy.
9395 * src/symtab.c (copys): Remove, use xstrdup instead.
9396
9397 2000-10-02 Akim Demaille <akim@epita.fr>
9398
9399 * src/gram.h (associativity): New enum type which replaces the
9400 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9401 `right_assoc', `left_assoc' and `non_assoc'.
9402 Adjust all dependencies.
9403 * src/reader.c: Formatting changes.
9404 (LTYPESTR): Don't define it, use it as a literal in
9405 `reader_output_yylsp'.
9406 * src/symtab.h (symbol_class): New enum type which replaces the
9407 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9408 `sunknown', `stoken and `snterm'.
9409
9410 2000-10-02 Akim Demaille <akim@epita.fr>
9411
9412 * src/getargs.c (fixed_outfiles): Rename as...
9413 (yaccflag): for consistency and accuracy.
9414 Adjust dependencies.
9415
9416 2000-10-02 Akim Demaille <akim@epita.fr>
9417
9418 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9419 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9420 difficult and introduced a lot of core dump. It turns out that
9421 Bison used an implementation of `xmalloc' based on `calloc', and
9422 at various places it does depend upon the initialization to 0. I
9423 have not tried to isolate the pertinent places, and all the former
9424 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9425 someone should address this issue.
9426
9427 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9428 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9429 files.
9430 Adjust dependencies.
9431 * src/warshall.h: New file.
9432 Propagate.
9433
9434 2000-10-02 Akim Demaille <akim@epita.fr>
9435
9436 Various anti-`extern in *.c' changes.
9437
9438 * src/system.h: Include `assert.h'.
9439
9440 2000-10-02 Akim Demaille <akim@epita.fr>
9441
9442 * src/state.h (nstates, final_state, first_state, first_shift)
9443 (first_reduction): Move their exportation from here...
9444 * src/LR0.h: to here.
9445 Adjust dependencies.
9446 * src/getargs.c (statisticsflag): New variable.
9447 Add support for `--statistics'.
9448 Adjust dependencies.
9449
9450 Remove a lot of now useless `extern' statements in most files.
9451
9452 2000-10-02 Akim Demaille <akim@epita.fr>
9453
9454 * src/LR0.h: New file.
9455 Propagate its use.
9456
9457 2000-10-02 Akim Demaille <akim@epita.fr>
9458
9459 * src/print.h: New file.
9460 Propagate its use.
9461 * src/print.c: Formatting and ordering changes.
9462 (verbose, terse): Replace with...
9463 (print_results): this new function.
9464 Adjust dependencies.
9465
9466 2000-10-02 Akim Demaille <akim@epita.fr>
9467
9468 * src/conflicts.c (conflict_report): New function.
9469 (conflict_log, verbose_conflict_log): Replace with...
9470 (print_conflicts): this function.
9471 Adjust dependencies.
9472 * src/conflicts.h: New file.
9473 Propagate its inclusion.
9474
9475 2000-10-02 Akim Demaille <akim@epita.fr>
9476
9477 * src/nullable.h: New file.
9478 Propagate its inclusion.
9479 * src/nullable.c: Formatting changes.
9480
9481 2000-10-02 Akim Demaille <akim@epita.fr>
9482
9483 * src/reduce.h: New file.
9484 Propagate its inclusion.
9485 * src/reduce.c: Topological sort and other formatting changes.
9486 (bool, TRUE, FALSE): Move their definition to...
9487 * src/system.h: here.
9488
9489 2000-10-02 Akim Demaille <akim@epita.fr>
9490
9491 * src/files.c: Formatting changes.
9492 (tryopen, tryclose, openfiles): Rename as...
9493 (xfopen, xfclose, open_files): this.
9494 (stringappend): static.
9495 * src/files.h: Complete the list of exported symbols.
9496 Propagate its use.
9497
9498 2000-10-02 Akim Demaille <akim@epita.fr>
9499
9500 * src/reader.h: New file.
9501 Propagate its use instead of tedious list of `extern' and
9502 prototypes.
9503 * src/reader.c: Formatting changes, topological sort,
9504 s/register//.
9505
9506 2000-10-02 Akim Demaille <akim@epita.fr>
9507
9508 * src/lex.h: Prototype `lex.c' exported functions.
9509 * src/reader.c: Adjust.
9510 * src/lex.c: Formatting changes.
9511 (safegetc): Rename as...
9512 (xgetc): this.
9513
9514 2000-10-02 Akim Demaille <akim@epita.fr>
9515
9516 * src/lalr.h: New file.
9517 Propagate its inclusion instead of prototypes and `extern'.
9518 * src/lalr.c: Formatting changes, topological sorting etc.
9519
9520 2000-10-02 Akim Demaille <akim@epita.fr>
9521
9522 * src/output.c (token_actions): Introduce a temporary array,
9523 YYDEFACT, that makes it possible for this function to use
9524 output_short_table.
9525
9526 2000-10-02 Akim Demaille <akim@epita.fr>
9527
9528 `user_toknums' is output as a `short[]' in `output.c', while it is
9529 defined as a `int[]' in `reader.c'. For consistency with the
9530 other output tables, `user_toknums' is now defined as a table of
9531 shorts.
9532
9533 * src/reader.c (user_toknums): Be a short table instead of an int
9534 table.
9535 Adjust dependencies.
9536
9537 Factor the short table outputs.
9538
9539 * src/output.c (output_short_table): New function.
9540 * src/output.c (output_gram, output_stos, output_rule_data)
9541 (output_base, output_table, output_check): Use it.
9542
9543 2000-10-02 Akim Demaille <akim@epita.fr>
9544
9545 * src/output.c (output): Topological sort of the functions, in
9546 order to get rid of the `static' prototypes.
9547 No longer use `register'.
9548 * src/output.h: New file.
9549 Propagate its inclusion in files explicitly prototyping functions
9550 from output.c.
9551
9552 2000-09-21 Akim Demaille <akim@epita.fr>
9553
9554 * src/atgeneral.m4: Update from Autoconf.
9555
9556 2000-09-21 Akim Demaille <akim@epita.fr>
9557
9558 * src/closure.h: New file.
9559 * src/closure.c: Formatting changes, topological sort over the
9560 functions, use of closure.h.
9561 (initialize_closure, finalize_closure): Rename as...
9562 (new_closure, free_closure): these. Adjust dependencies.
9563 * src/LR0.c: Formatting changes, topological sort, use of
9564 cloture.h.
9565 (initialize_states): Rename as...
9566 (new_states): this.
9567 * src/Makefile.am (noinst_HEADERS): Adjust.
9568
9569 2000-09-20 Akim Demaille <akim@epita.fr>
9570
9571 * src/acconfig.h: Don't protect config.h against multiple
9572 inclusion.
9573 Don't define PARAMS.
9574 * src/system.h: Define PARAMS.
9575 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9576 purpose of config.h. system.h must not try to fix wrong
9577 definitions in config.h.
9578
9579 2000-09-20 Akim Demaille <akim@epita.fr>
9580
9581 * src/derives.h: New file.
9582 * src/main.c, src/derives.h: Use it.
9583 Formatting changes.
9584 * src/Makefile.am (noinst_HEADERS): Adjust.
9585
9586 2000-09-20 Akim Demaille <akim@epita.fr>
9587
9588 * tests/atgeneral.m4: Update from Autoconf.
9589 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9590 (AT_CHECK_CALC): New macros.
9591 Use these macros to test bison with options `', `--raw',
9592 `--debug', `--yacc', `--yacc --debug'.
9593
9594 2000-09-19 Akim Demaille <akim@epita.fr>
9595
9596 * src/output.c: Formatting changes.
9597 * src/machine.h: Remove, leaving its contents in...
9598 * src/system.h: here.
9599 Include stdio.h.
9600 Adjust all dependencies on stdio.h and machine.h.
9601 * src/getargs.h: New file.
9602 Let all `extern' declarations about getargs.c be replaced with
9603 inclusion of `getargs.h'.
9604 * src/Makefile.am (noinst_HEADERS): Adjust.
9605
9606 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9607 scope.
9608 (yyerror): Returns void, not int.
9609 * doc/bison.texinfo: Formatting changes.
9610
9611 2000-09-19 Akim Demaille <akim@epita.fr>
9612
9613 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9614 portable.
9615
9616 2000-09-18 Akim Demaille <akim@epita.fr>
9617
9618 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9619 * src/Makefile.am (INCLUDES): Don't.
9620 Be ready to fetch headers in lib/.
9621
9622 2000-09-18 Akim Demaille <akim@epita.fr>
9623
9624 * doc/bison.texinfo: Update the copyright.
9625 ANSIfy and GNUify the examples.
9626 Remove the old menu.
9627
9628 2000-09-18 Akim Demaille <akim@epita.fr>
9629
9630 First set of tests: use the `calc' example from the documentation.
9631
9632 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9633 is defined only when YYDEBUG is.
9634 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9635 * src/files.c (tryopen, tryclose): Formatting changes.
9636 Move to the top and be static.
9637 * src/reader.c (read_signed_integer): Likewise.
9638 * tests/calc.m4: New file.
9639 * Makefile.am, suite.m4: Adjust.
9640 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9641
9642 2000-09-18 Akim Demaille <akim@epita.fr>
9643
9644 Add support for an Autotest test suite for Bison.
9645
9646 * m4/m4.m4, m4/atconfig.m4: New files.
9647 * m4/Makefile.am (EXTRA_DIST): Adjust.
9648 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9649 files.
9650 * src/getargs.c: Display a more standard --version message.
9651 * src/reader.c (reader): Formatting changes.
9652 No longer depend upon VERSION_STRING.
9653 * configure.in: No longer use `dnl'.
9654 Set up the test suite and the new directory `tests/.
9655 (VERSION_STRING): Remove.
9656
9657 2000-04-14 Akim Demaille <akim@epita.fr>
9658
9659 * src/reader.c (copy_comment2): New function, same as former
9660 `copy_comment', but outputs into two FILE *.
9661 (copy_comment): Use it.
9662 (parse_union_decl): Use it.
9663 (get_type, parse_start_decl): Use the same `invalid' message.
9664 (parse_start_decl, parse_union_decl): Use the same `multiple'
9665 message.
9666 (parse_union_decl, copy_guard, copy_action): Use the same
9667 `unmatched' message.
9668 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9669
9670 2000-03-31 Akim Demaille <akim@epita.fr>
9671
9672 * src/files.c (tryopen, tryclose): Move to the top.
9673 Be static.
9674
9675 2000-03-31 Akim Demaille <akim@epita.fr>
9676
9677 * src/main.c (main): Don't call `done', exit does it.
9678
9679 2000-03-31 Akim Demaille <akim@epita.fr>
9680
9681 * allocate.c: s/return (foo)/return foo/.
9682 * lalr.c: Likewise.
9683 * LR0.c: Likewise.
9684 * output.c: Likewise.
9685 * reader.c: Likewise.
9686 * symtab.c: Likewise.
9687 * vmsgetargs.c: Likewise.
9688
9689 2000-03-31 Akim Demaille <akim@epita.fr>
9690
9691 Clean up the error reporting functions.
9692
9693 * src/report.c: New file.
9694 * src/report.h: Likewise.
9695 * src/Makefile.am: Adjust.
9696 * m4/error.m4: New file.
9697 * m4/Makefile.am: Adjust.
9698 * configure.in (jm_PREREQ_ERROR): Call it.
9699 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9700 Remove.
9701 (fatal, fatals): Remove. All callers use complain.c::fatal.
9702 (warn, warni, warns, warnss, warnss): Remove. All callers use
9703 complain.c::complain.
9704 (toomany): Remove, use fatal instead.
9705 * src/files.c (done): No argument, use complain_message_count.
9706 * src/main.c (main): Register `done' to `atexit'.
9707
9708 * src/getargs.c (usage): More `fputs', less `fprintf'.
9709
9710 2000-03-28 Akim Demaille <akim@epita.fr>
9711
9712 * lib/: New directory.
9713 * Makefile.am (SUBDIRS): Adjust.
9714 * configure.in: Adjust.
9715 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9716 useless.
9717 * src/alloca.c: Moved to lib/.
9718 * src/getopt.c: Likewise.
9719 * src/getopt1.c: Likewise.
9720 * src/getopt.h: Likewise.
9721 * src/ansi2knr.c: Likewise.
9722 * src/ansi2knr.1: Likewise.
9723 * src/Makefile.am: Adjust.
9724 * lib/Makefile.am: New file.
9725
9726 2000-03-28 Akim Demaille <akim@epita.fr>
9727
9728 * src/getargs.c (usage): Refresh the help message.
9729
9730 2000-03-17 Akim Demaille <akim@epita.fr>
9731
9732 * src/getopt1.c: Updated from textutils 2.0e
9733 * src/getopt.c: Likewise.
9734 * src/getopt.h: Likewise.
9735
9736 2000-03-17 Akim Demaille <akim@epita.fr>
9737
9738 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9739 the file name, not the whole `#line LINE FILE'.
9740
9741 2000-03-17 Akim Demaille <akim@epita.fr>
9742
9743 On syntax errors, report the token on which we choked.
9744
9745 * src/bison.s1 (yyparse): In the label yyerrlab, when
9746 YYERROR_VERBOSE, add yychar in msg.
9747
9748 2000-03-17 Akim Demaille <akim@epita.fr>
9749
9750 * src/reader.c (copy_at): New function.
9751 (copy_guard): Use it.
9752 (copy_action): Use it.
9753
9754 2000-03-17 Akim Demaille <akim@epita.fr>
9755
9756 Be kind to translators, save some useless translations.
9757
9758 * src/main.c (banner): New function.
9759 (fatal_banner): Use it.
9760 (warn_banner): Use it.
9761
9762 2000-03-17 Akim Demaille <akim@epita.fr>
9763
9764 * src/reader.c (copy_definition): Use copy_string and
9765 copy_comment. Removed now unused `match', `ended',
9766 `cplus_comment'.
9767 (copy_comment, copy_string): Moved, to be visible from
9768 copy_definition.
9769
9770 2000-03-17 Akim Demaille <akim@epita.fr>
9771
9772 * src/reader.c (copy_string): Declare `static inline'. No
9773 problems with inline, since it is checked by configure.
9774 (copy_comment): Likewise.
9775
9776 2000-03-17 Akim Demaille <akim@epita.fr>
9777
9778 * src/reader.c (packsymbols): Formatting changes.
9779
9780 2000-03-17 Akim Demaille <akim@epita.fr>
9781
9782 * src/reader.c (copy_comment): New function, factored out from:
9783 (copy_action): Use it. Removed now unused `match', `ended',
9784 `cplus_comment'.
9785 (copy_guard): Likewise.
9786
9787 2000-03-17 Akim Demaille <akim@epita.fr>
9788
9789 * src/reader.c (copy_string): New function, factored out from:
9790 (copy_action): Use it.
9791 (copy_guard): Likewise.
9792
9793 2000-03-17 Akim Demaille <akim@epita.fr>
9794
9795 Change the handling of @s so that they behave exactly like $s.
9796 There is now a pseudo variable @$ (readble and writable), location
9797 of the lhs of the rule (by default ranging from the location of
9798 the first symbol of the rhs, to the location of the last symbol,
9799 or, if the rhs is empty, YYLLOC).
9800
9801 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9802 yyval.
9803 (yyparse): When providing a default semantic action, provide a
9804 default location action.
9805 (after the $): No longer change `*YYLSP', just stack YYLOC the
9806 same way you stack YYVAL.
9807 * src/reader.c (read_declarations): Use warns.
9808 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9809 (copy_action, case '@'): Likewise.
9810 Use a standard error message, to save useless work from
9811 translators.
9812
9813 2000-03-17 Akim Demaille <akim@epita.fr>
9814
9815 * src/bison.s1: Formatting and cosmetics changes.
9816 * src/reader.c: Likewise.
9817 Update the Copyright notice.
9818
9819 2000-03-17 Akim Demaille <akim@epita.fr>
9820
9821 * src/bison.s1 (#line): All set to `#line' only, since the
9822 Makefile now handles them.
9823
9824 2000-03-16 Akim Demaille <akim@epita.fr>
9825
9826 * src/output.c (output_rule_data): Output the documentation of
9827 some of the tables.
9828 (Copyright notice): Update.
9829 Formatting changes.
9830
9831 2000-03-16 Akim Demaille <akim@epita.fr>
9832
9833 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9834 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9835 One `#if YYDEBUG' remains, since it uses variables which are
9836 defined only if `YYDEBUG != 0'.
9837
9838 2000-03-16 Akim Demaille <akim@epita.fr>
9839
9840 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9841 and related variables so that the similarities are highlighted.
9842
9843 2000-03-16 Akim Demaille <akim@epita.fr>
9844
9845 * src/bison.s1: Properly indent CPP directives.
9846
9847 2000-03-16 Akim Demaille <akim@epita.fr>
9848
9849 * src/bison.s1: Properly indent the `alloca' CPP section.
9850
9851 2000-03-16 Akim Demaille <akim@epita.fr>
9852
9853 Do not hard code values of directories in `configure.in'.
9854 Update the `configure' tool chain.
9855
9856 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9857 src/makefile.am.
9858 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9859 (AC_OUTPUT): Add m4/Makefile.
9860 Bump to bison 1.28a, 1.29 has never been released.
9861 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9862 handled via src/Makefile.am.
9863 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9864 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9865 autoheader.
9866 * Makefile.am (SUBDIRS): Add m4.
9867 (ACLOCAL_AM_FLAGS): New variable.
9868 (AUTOMAKE_OPTIONS): Add check-news.
9869 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9870 the proper line number and file name.
9871 (DEFS): Propagate the location of bison library files and of the
9872 locale files.
9873 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9874 builddir.
9875 * acinclude.m4: Remove, replaced by the directory m4.
9876 * m4/Makefile.am (EXTRA_DIST): New variable.
9877 * m4/gettext.m4: New file, from the fileutils.
9878 * m4/lcmessage.m4: Likewise
9879 * m4/progtest.m4: Likewise.
9880 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9881
9882 2000-03-10 Akim Demaille <akim@epita.fr>
9883
9884 * src/closure.c:
9885 Formatting changes of various comments.
9886 Respect the GNU coding standards at various places.
9887 Don't use `_()' when no translation is needed.
9888
9889 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9890
9891 * src/files.c:
9892 OS/2 honors TMPDIR environment variable.
9893
9894 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9895
9896 * doc/bison.texinfo: Tweaked spelling and grammar.
9897 Updated ISBN.
9898 Removed reference to price of printed copy.
9899 Mention BISON_SIMPLE and BISON_HAIRY.
9900
9901 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9902
9903 * configure.in, NEWS:
9904 Bison 1.29 released.
9905
9906 1999-10-27 Jesse Thilo <jthilo@gnu.org>
9907
9908 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
9909 Added reference card.
9910
9911 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9912
9913 * po/ru.po: Added Russian translation.
9914
9915 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9916
9917 * configure.in: Added Russian translation.
9918
9919 1999-07-06 Jesse Thilo <jthilo@gnu.org>
9920
9921 * configure.in, NEWS, README:
9922 Released version 1.28.
9923
9924 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9925
9926 * src/system.h:
9927 Squashed redefinition warning on some systems.
9928
9929 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
9930 Have configure build version string instead of relying on ANSI string
9931 concatentation.
9932
9933 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9934
9935 * po/POTFILES.in: Got rid of version.c.
9936
9937 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9938
9939 * acconfig.h, configure.in:
9940 Have configure build version string instead of relying on ANSI string
9941 concatentation.
9942
9943 1999-06-08 Jesse Thilo <jthilo@gnu.org>
9944
9945 * doc/bison.1:
9946 Dropped mention of `+' for long-named options.
9947
9948 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9949
9950 * src/files.c: Added <unistd.h> for unlink().
9951
9952 * src/Makefile.am, src/system.h:
9953 I18n fixes.
9954
9955 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9956
9957 * README: Added a FAQ list.
9958
9959 * configure.in, acconfig.h:
9960 I18n fixes.
9961
9962 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9963
9964 * doc/FAQ, doc/Makefile.am:
9965 Added a FAQ list.
9966
9967 1999-05-19 Jesse Thilo <jthilo@gnu.org>
9968
9969 * src/alloc.h, src/symtab.h, src/version.c:
9970 Protected inclusion of "config.h" with HAVE_CONFIG_H.
9971
9972 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9973
9974 * src/.cvsignore, src/Makefile.am:
9975 Reorganized: sources in `src', documentation in `doc'.
9976
9977 * src/lex.c (literalchar):
9978 fixed the code for escaping double quotes (thanks
9979 Jonathan Czisny.)
9980
9981 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9982
9983 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
9984 Adjusted paths to reflect directory reorganization.
9985
9986 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9987
9988 * doc/.cvsignore, doc/Makefile.am:
9989 Reorganized: sources in `src', documentation in `doc'.
9990
9991 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9992
9993 * configure.in:
9994 Updated AC_INIT file to reflect directory reorganization.
9995
9996 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
9997 Reorganized: sources in `src', documentation in `doc'.
9998
9999 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10000
10001 * src/allocate.c:
10002 Don't declare calloc() and realloc() if not necessary.
10003
10004 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10005
10006 * configure.in, acconfig.h, acinclude.m4:
10007 Don't declare calloc() and realloc() if not necessary.
10008
10009 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10010
10011 * po/.cvsignore: Added i18n support.
10012
10013 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10014
10015 * acconfig.h, configure.in, Makefile.am:
10016 Added i18n support.
10017
10018 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10019
10020 * src/bison.s1: Fixed #line numbers.
10021
10022 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10023
10024 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10025 Added PO files from Translation Project.
10026
10027 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10028
10029 * Makefile.am:
10030 Added support for non-ANSI compilers (ansi2knr).
10031
10032 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10033
10034 * configure.in: Bumped version number to 1.27.
10035
10036 * Makefile.am:
10037 Added `bison.simple' to list of files removed by `make distclean'.
10038
10039 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10040
10041 * src/files.c, src/files.h:
10042 Defined locations of parser files in config.h instead of Makefile.
10043
10044 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10045
10046 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10047 Defined locations of parser files in config.h instead of Makefile.
10048
10049 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10050
10051 * Makefile.am:
10052 Removed inappropriate use of $< macro.
10053
10054 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10055
10056 * po/Makefile.in.in, po/POTFILES.in:
10057 Add `po' directory skeleton.
10058
10059 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10060
10061 * README: Document help-bison list.
10062
10063 * configure.in: Add check for mkstemp().
10064
10065 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10066
10067 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10068 Hush a few compiler warnings.
10069
10070 * src/files.c:
10071 Add tryclose(), which verifies that fclose was successful.
10072 Hush a couple of compiler warnings.
10073
10074 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10075
10076 * Makefile.am, OChangeLog:
10077 ChangeLog is now automatically generated. Include the old version as
10078 OChangeLog.
10079
10080 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10081
10082 * 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:
10083 Update FSF address.
10084
10085 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10086
10087 * doc/bison.texinfo: Fix formatting glitch.
10088
10089 * doc/bison.texinfo: Update FSF address.
10090
10091 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10092
10093 * acconfig.h: Update FSF address.
10094
10095 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10096
10097 * src/system.h:
10098 Don't define PACKAGE here, since config.h defines it.
10099
10100 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10101
10102 * src/reader.c: Update copyright date.
10103
10104 * src/main.c:
10105 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10106 favor of output directly to stderr (avoids buffer overruns).
10107
10108 * src/reader.c: Some checks for premature EOF.
10109
10110 * 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:
10111 Use prototypes if the compiler understands them.
10112
10113 * src/files.c: Honor TMPDIR on Unix hosts.
10114 Use prototypes if the compiler understands them.
10115
10116 * src/reader.c:
10117 Fix a couple of buffer overrun bugs.
10118 Use prototypes if the compiler understands them.
10119
10120 * src/system.h: Include unistd.h and ctype.h.
10121 Use #ifdef instead of #if for NLS symbols.
10122
10123 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10124
10125 * doc/bison.texinfo:
10126 Delete comment "consider using @set for edition number, etc..." since
10127 we now are doing so.
10128
10129 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10130
10131 * configure.in:
10132 Use prototypes if the compiler understands them.
10133
10134 * NEWS: Document 1.26 highlights.
10135
10136 * Makefile.am: Require Automake 1.3 or later.
10137
10138 * acconfig.h:
10139 Use prototypes if the compiler understands them.
10140
10141 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10142
10143 * src/version.c:
10144 Use VERSION symbol from automake for version number.
10145
10146 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10147
10148 * acconfig.h, configure.in, version.cin:
10149 Use VERSION symbol from automake for version number.
10150
10151 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10152
10153 * Makefile.am:
10154 Distribute original version of simple parser (bison.s1), not built
10155 version (bison.simple).
10156
10157 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10158
10159 * doc/bison.texinfo: Add info dir entry.
10160
10161 * doc/bison.texinfo:
10162 Let automake put version number into documentation.
10163
10164 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10165
10166 * src/bison.cld, src/build.com, src/vmshlp.mar:
10167 Add non-RCS files from /gd/gnu/bison.
10168
10169 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10170
10171 * doc/bison.1:
10172 Document the BISON_HAIRY and BISON_SIMPLE variables.
10173
10174 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10175
10176 * src/version.c: Build version.c automatically.
10177
10178 * src/reader.c:
10179 Fix token numbering (used to start at 258, not 257).
10180
10181 * src/system.h: Include config.h.
10182
10183 * src/getargs.c: Update bug report address.
10184
10185 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10186 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10187
10188 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10189
10190 * Makefile.am:
10191 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10192
10193 * configure.in, version.cin:
10194 Build version.c automatically.
10195
10196 * AUTHORS: Add AUTHORS file.
10197
10198 * README: Update bug report address.
10199
10200 * bison.simple:
10201 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10202
10203 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10204 Add automake stuff.
10205
10206 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10207
10208 * doc/bison.texinfo: Clean up some formatting.
10209
10210 1998-05-05 Richard Stallman <rms@gnu.org>
10211
10212 * doc/bison.texinfo:
10213 Explain better why to make a pure parser.
10214
10215 1998-01-05 Richard Stallman <rms@gnu.org>
10216
10217 * src/files.c (openfiles):
10218 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10219 find a temporary directory, if possible. Do not unlink files while
10220 they are open.
10221
10222 1997-08-25 Richard Stallman <rms@gnu.org>
10223
10224 * src/reader.c (stack_offset;):
10225 Change some warni to warns.
10226
10227 * src/lex.c (literalchar): Use warns, not warni.
10228
10229 1997-06-28 Richard Stallman <rms@gnu.org>
10230
10231 * src/bison.s1: Add a Bison version comment.
10232
10233 * src/main.c (fatal, warn, berror):
10234 Use program_name.
10235
10236 1997-06-28 Richard Stallman <rms@gnu.org>
10237
10238 * Makefile.in (bison_version): New variable.
10239 (dist): Use that variable.
10240 (bison.s1): Substitute the Bison version into bison.simple.
10241
10242 * bison.simple: Add a Bison version comment.
10243
10244 1997-06-18 Richard Stallman <rms@gnu.org>
10245
10246 * src/main.c (fatal, warn, berror):
10247 Make error messages standard.
10248 (toomany): Improve error message text.
10249
10250 * 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:
10251 new.h renamed to alloc.h.
10252
10253 1997-06-18 Richard Stallman <rms@gnu.org>
10254
10255 * Makefile.in: new.h renamed to alloc.h.
10256
10257 1997-05-24 Richard Stallman <rms@gnu.org>
10258
10259 * src/lex.c (literalchar):
10260 Fix the code for escaping \, " and '.
10261
10262 (lex): Avoid trouble when there are many chars
10263 to discard in a char literal with just several chars in it.
10264
10265 1997-05-17 Richard Stallman <rms@gnu.org>
10266
10267 * src/bison.s1:
10268 Use malloc, if using alloca is troublesome.
10269 (YYSTACK_USE_ALLOCA): New flag macro.
10270 Define it for some systems and compilers.
10271 (YYSTACK_ALLOC): New macro.
10272 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10273 If it was malloc'd, free it.
10274
10275 1997-05-17 Richard Stallman <rms@gnu.org>
10276
10277 * bison.simple:
10278 Use malloc, if using alloca is troublesome.
10279 (YYSTACK_USE_ALLOCA): New flag macro.
10280 Define it for some systems and compilers.
10281 (YYSTACK_ALLOC): New macro.
10282 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10283 If it was malloc'd, free it.
10284
10285 1997-04-23 Richard Stallman <rms@gnu.org>
10286
10287 * src/bison.s1:
10288 (alloca) [__hpux]: Always define as __builtin_alloca.
10289
10290 1997-04-23 Richard Stallman <rms@gnu.org>
10291
10292 * bison.simple:
10293 (alloca) [__hpux]: Always define as __builtin_alloca.
10294
10295 1997-04-22 Richard Stallman <rms@gnu.org>
10296
10297 * src/bison.s1:
10298 [__hpux]: Include alloca.h (right for HPUX 10)
10299 instead of declaring alloca (right for HPUX 9).
10300
10301 * src/bison.s1 (__yy_memcpy):
10302 Declare arg `count' as unsigned int.
10303 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10304
10305 1997-04-22 Richard Stallman <rms@gnu.org>
10306
10307 * bison.simple:
10308 [__hpux]: Include alloca.h (right for HPUX 10)
10309 instead of declaring alloca (right for HPUX 9).
10310
10311 * bison.simple (__yy_memcpy):
10312 Declare arg `count' as unsigned int.
10313 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10314
10315 1997-01-03 Richard Stallman <rms@gnu.org>
10316
10317 * src/allocate.c: [__STDC__ or _MSC_VER]:
10318 Declare calloc and realloc to return void *.
10319
10320 1997-01-02 Richard Stallman <rms@gnu.org>
10321
10322 * src/system.h:
10323 [_MSC_VER]: Include stdlib.h and process.h.
10324 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10325
10326 * src/main.c (main): Return FAILURE as a value.
10327 (printable_version): Declare arg as int, not char.
10328
10329 1997-01-02 Richard Stallman <rms@gnu.org>
10330
10331 * Makefile.in (dist):
10332 Explicitly check for symlinks, and copy them.
10333
10334 1996-12-19 Richard Stallman <rms@gnu.org>
10335
10336 * src/files.c:
10337 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10338
10339 1996-12-18 Paul Eggert <eggert@gnu.org>
10340
10341 * src/bison.s1 (yyparse):
10342 If __GNUC__ and YYPARSE_PARAM are both defined,
10343 declare yyparse to have a void * argument.
10344
10345 1996-12-18 Paul Eggert <eggert@gnu.org>
10346
10347 * bison.simple (yyparse):
10348 If __GNUC__ and YYPARSE_PARAM are both defined,
10349 declare yyparse to have a void * argument.
10350
10351 1996-12-17 Richard Stallman <rms@gnu.org>
10352
10353 * src/reduce.c (nbits): Add some casts.
10354
10355 1996-08-12 Richard Stallman <rms@gnu.org>
10356
10357 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10358
10359 1996-08-12 Richard Stallman <rms@gnu.org>
10360
10361 * bison.simple: Test _MSDOS as well as _MSDOS_.
10362
10363 1996-07-31 Richard Stallman <rms@gnu.org>
10364
10365 * src/bison.s1:
10366 [__sun && __i386]: Include alloca.h.
10367
10368 1996-07-31 Richard Stallman <rms@gnu.org>
10369
10370 * bison.simple:
10371 [__sun && __i386]: Include alloca.h.
10372
10373 1996-07-30 Richard Stallman <rms@gnu.org>
10374
10375 * src/bison.s1: Comment change.
10376
10377 * src/bison.s1: Test _MSDOS_, not MSDOS.
10378
10379 1996-07-30 Richard Stallman <rms@gnu.org>
10380
10381 * bison.simple: Comment change.
10382
10383 * bison.simple: Test _MSDOS_, not MSDOS.
10384
10385 1996-06-01 Richard Stallman <rms@gnu.org>
10386
10387 * 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:
10388 Insert `_' macro around many string constants.
10389
10390 * src/main.c:
10391 Insert `_' macro around many string constants.
10392
10393 (main): Call setlocale, bindtextdomain and textdomain.
10394
10395 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10396 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10397 [ENABLE_NLS]: Include libintl.h.
10398 [ENABLE_NLS] (gettext): Define.
10399 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10400 (N_, PACKAGE, LOCALEDIR): New macros.
10401
10402 1996-06-01 Richard Stallman <rms@gnu.org>
10403
10404 * POTFILES.in: New file.
10405
10406 * Makefile.in (allocate.o):
10407 Define target explicitly.
10408
10409 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10410 (LDFLAGS): Set to @LDFLAGS@.
10411 (configure): Run autoconf only if preceding `cd' succeeds.
10412 (bison.s1): Redirect output to temporary file then move the
10413 temporary to the target, rather than redirecting directly to bison.s1.
10414 (clean): Remove config.status and config.log.
10415 (distclean): Don't remove config.status here.
10416
10417 1996-05-12 Richard Stallman <rms@gnu.org>
10418
10419 * src/bison.s1:
10420 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10421
10422 1996-05-12 Richard Stallman <rms@gnu.org>
10423
10424 * bison.simple:
10425 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10426
10427 1996-05-11 Richard Stallman <rms@gnu.org>
10428
10429 * src/bison.s1 (__yy_memcpy):
10430 Really reorder the args, as was supposedly done on Feb 14 1995.
10431 (yyparse): Calls changed accordingly.
10432
10433 1996-05-11 Richard Stallman <rms@gnu.org>
10434
10435 * Makefile.in (dist): Don't use $(srcdir).
10436
10437 * bison.simple (__yy_memcpy):
10438 Really reorder the args, as was supposedly done on Feb 14 1995.
10439 (yyparse): Calls changed accordingly.
10440
10441 1996-01-27 Richard Stallman <rms@gnu.org>
10442
10443 * src/output.c (output_rule_data):
10444 Test YYERROR_VERBOSE in the conditional
10445 around the definition of ttyname.
10446
10447 1995-12-29 Richard Stallman <rms@gnu.org>
10448
10449 * src/bison.s1:
10450 Fix line numbers in #line commands.
10451
10452 1995-12-29 Richard Stallman <rms@gnu.org>
10453
10454 * bison.simple:
10455 Fix line numbers in #line commands.
10456
10457 1995-12-27 Richard Stallman <rms@gnu.org>
10458
10459 * src/bison.s1 (YYPARSE_PARAM_DECL):
10460 In C++, make it always null.
10461 (YYPARSE_PARAM_ARG): New macro.
10462 (yyparse): Use YYPARSE_PARAM_ARG.
10463
10464 1995-12-27 Richard Stallman <rms@gnu.org>
10465
10466 * bison.simple (YYPARSE_PARAM_DECL):
10467 In C++, make it always null.
10468 (YYPARSE_PARAM_ARG): New macro.
10469 (yyparse): Use YYPARSE_PARAM_ARG.
10470
10471 1995-11-29 Richard Stallman <rms@gnu.org>
10472
10473 * doc/bison.texinfo:
10474 Describe literal string tokens, %raw, %no_lines, %token_table.
10475
10476 1995-11-29 Daniel Hagerty <hag@gnu.org>
10477
10478 * doc/bison.texinfo: Fixed update date
10479
10480 1995-10-16 Richard Stallman <rms@gnu.org>
10481
10482 * src/version.c: Version 1.25.
10483
10484 1995-10-16 Richard Stallman <rms@gnu.org>
10485
10486 * NEWS: *** empty log message ***
10487
10488 1995-10-16 Richard Stallman <rms@gnu.org>
10489
10490 * doc/bison.1, doc/bison.rnh:
10491 Add new options.
10492
10493 1995-10-15 Richard Stallman <rms@gnu.org>
10494
10495 * src/vmsgetargs.c, src/getargs.c:
10496 Added -n, -k, and -raw switches.
10497 (noparserflag, toknumflag, rawtoknumflag): New variables.
10498
10499 * src/symtab.h (SALIAS):
10500 New #define for adding aliases to %token.
10501 (struct bucket): Added `alias' field.
10502
10503 * src/reduce.c (reduce_grammar):
10504 Revise error message.
10505 (print_notices): Remove final `.' from error message.
10506
10507 * src/reader.c (reader_output_yylsp):
10508 New function.
10509 (readgram): Use `#if 0' around code that accepted %command
10510 inside grammar rules: The documentation doesn't allow it,
10511 and it will fail since the %command processors scan for the next %.
10512 (parse_token_decl): Extended the %token
10513 declaration to allow a multi-character symbol as an alias.
10514 (parse_thong_decl): New function.
10515 (read_declarations): Added %thong declarations.
10516 (read_declarations): Handle NOOP to deal with allowing
10517 % declarations as another means to specify the flags.
10518 (readgram): Allow %prec prior to semantics embedded in a rule.
10519 (skip_to_char, read_declarations, copy_definition)
10520 (parse_token_decl, parse_start_decl, parse_type_decl)
10521 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10522 (get_type_name, copy_guard, copy_action, readgram)
10523 (get_type, packsymbols): Revised most error messages.
10524 Changed `fatal' to `warnxxx' to avoid aborting for error.
10525 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10526 (read_declarations): Improve the error message for
10527 an invalid character. Do not abort.
10528 (read_declarations, copy_guard, copy_action): Use
10529 printable_version to avoid unprintable characters in printed output.
10530 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10531 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10532 Allow the type of a non-terminal can be given
10533 more than once, as long as all specifications give the same type.
10534
10535 * src/output.c:
10536 (output_headers, output_trailers, output, output_gram)
10537 (output_rule_data): Implement noparserflag variable.
10538 Implement toknumflag variable.
10539 (output): Call reader_output_yylsp to output LTYPESTR.
10540
10541 * src/main.c (main):
10542 If reader sees an error, don't process the grammar.
10543 (fatals): Updated to not use VARARGS1.
10544 (printable_version, int_to_string, warn, warni, warns, warnss)
10545 (warnsss): New error reporting functions. Avoid abort for error.
10546
10547 * src/lex.h:
10548 Added THONG and NOOP for alias processing.
10549 Added SETOPT for the new code that allows setting options with %flags.
10550
10551 * src/lex.c:
10552 Include getopt.h. Add some extern decls.
10553 (safegetc): New function to deal with EOF gracefully.
10554 (literalchar); new function to deal with reading \ escapes.
10555 (lex): Use literalchar.
10556 (lex): Implemented "..." tokens.
10557 (literalchar, lex, parse_percent_token): Made tokenbuffer
10558 always contain the token. This includes growing the token
10559 buffer while reading an integer.
10560 (parse_percent_token): Replaced if-else statement with percent_table.
10561 (parse_percent_token): Added % declarations as another
10562 way to specify the flags -n, -l, and -r. Also added hooks for
10563 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10564 major changes to files.c.
10565 (lex) Retain in the incoming stream a character following
10566 an incorrect '/'.
10567 (skip_white_space, lex): Revised most error messages
10568 and changed fatal to warn to avoid aborting.
10569 (percent_table): Added %thong declarations.
10570
10571 * src/gram.h: Comment changes.
10572
10573 * src/files.c (openfiles, open_extra_files, done):
10574 Add faction flag
10575 and actfile file. Handle noparserflag. Both for -n switch.
10576
10577 * src/conflicts.c (resolve_sr_conflict):
10578 Remove use of alloca.
10579
10580 1995-06-01 Jim Meyering <meyering@gnu.org>
10581
10582 * doc/bison.texinfo: *** empty log message ***
10583
10584 1995-05-06 Richard Stallman <rms@gnu.org>
10585
10586 * src/bison.s1: Comment change.
10587
10588 1995-05-06 Richard Stallman <rms@gnu.org>
10589
10590 * bison.simple: Comment change.
10591
10592 1995-05-03 Richard Stallman <rms@gnu.org>
10593
10594 * src/version.c: Version now 1.24.
10595
10596 * src/bison.s1: Change distribution terms.
10597
10598 * src/version.c: Version now 1.23.
10599
10600 1995-05-03 Richard Stallman <rms@gnu.org>
10601
10602 * doc/bison.texinfo:
10603 Rewrite "Conditions for Using Bison".
10604 Update version to 1.24.
10605
10606 1995-05-03 Richard Stallman <rms@gnu.org>
10607
10608 * bison.simple: Change distribution terms.
10609
10610 1995-02-23 Richard Stallman <rms@gnu.org>
10611
10612 * src/files.c: Test __VMS_POSIX as well as VMS.
10613
10614 1995-02-14 Jim Meyering <meyering@gnu.org>
10615
10616 * src/bison.s1 (__yy_memcpy):
10617 Renamed from __yy_bcopy to avoid
10618 confusion. Reverse FROM and TO arguments to be consistent with
10619 those of memcpy.
10620
10621 1995-02-14 Jim Meyering <meyering@gnu.org>
10622
10623 * bison.simple (__yy_memcpy):
10624 Renamed from __yy_bcopy to avoid
10625 confusion. Reverse FROM and TO arguments to be consistent with
10626 those of memcpy.
10627
10628 1994-11-10 David J. MacKenzie <djm@gnu.org>
10629
10630 * NEWS: reformat
10631
10632 * NEWS: New file.
10633
10634 * Makefile.in (DISTFILES): Include NEWS.
10635
10636 * Makefile.in (DISTFILES):
10637 Include install-sh, not install.sh.
10638
10639 * configure.in: Update to Autoconf v2 macro names.
10640
10641 1994-10-05 David J. MacKenzie <djm@gnu.org>
10642
10643 * Makefile.in: fix typo
10644
10645 * Makefile.in (prefix, exec_prefix):
10646 Let configure set them.
10647
10648 1994-09-28 David J. MacKenzie <djm@gnu.org>
10649
10650 * Makefile.in: Set datadir to $(prefix)/share.
10651
10652 1994-09-15 Richard Stallman <rms@gnu.org>
10653
10654 * src/bison.s1:
10655 Update copyright notice and GPL version.
10656
10657 1994-09-15 Richard Stallman <rms@gnu.org>
10658
10659 * bison.simple:
10660 Update copyright notice and GPL version.
10661
10662 1994-07-12 Richard Stallman <rms@gnu.org>
10663
10664 * src/reduce.c, src/reader.c:
10665 entered into RCS
10666
10667 1994-05-05 David J. MacKenzie <djm@gnu.org>
10668
10669 * Makefile.in: entered into RCS
10670
10671 1994-03-26 Richard Stallman <rms@gnu.org>
10672
10673 * src/bison.s1: entered into RCS
10674
10675 1994-03-26 Richard Stallman <rms@gnu.org>
10676
10677 * bison.simple: entered into RCS
10678
10679 1994-03-25 Richard Stallman <rms@gnu.org>
10680
10681 * src/main.c: entered into RCS
10682
10683 1994-03-24 Richard Stallman <rms@gnu.org>
10684
10685 * src/conflicts.c: entered into RCS
10686
10687 1994-01-02 Richard Stallman <rms@gnu.org>
10688
10689 * Makefile.in: *** empty log message ***
10690
10691 1993-11-21 Richard Stallman <rms@gnu.org>
10692
10693 * src/bison.s1: *** empty log message ***
10694
10695 1993-11-21 Richard Stallman <rms@gnu.org>
10696
10697 * doc/bison.texinfo: entered into RCS
10698
10699 * doc/bison.texinfo: *** empty log message ***
10700
10701 1993-11-21 Richard Stallman <rms@gnu.org>
10702
10703 * bison.simple: *** empty log message ***
10704
10705 1993-10-25 David J. MacKenzie <djm@gnu.org>
10706
10707 * doc/bison.texinfo: *** empty log message ***
10708
10709 1993-10-19 Richard Stallman <rms@gnu.org>
10710
10711 * src/bison.s1: *** empty log message ***
10712
10713 1993-10-19 Richard Stallman <rms@gnu.org>
10714
10715 * bison.simple: *** empty log message ***
10716
10717 1993-10-14 Richard Stallman <rms@gnu.org>
10718
10719 * src/bison.s1: *** empty log message ***
10720
10721 1993-10-14 Richard Stallman <rms@gnu.org>
10722
10723 * bison.simple: *** empty log message ***
10724
10725 1993-09-14 David J. MacKenzie <djm@gnu.org>
10726
10727 * doc/bison.texinfo: *** empty log message ***
10728
10729 1993-09-13 Noah Friedman <friedman@gnu.org>
10730
10731 * Makefile.in: *** empty log message ***
10732
10733 1993-09-10 Richard Stallman <rms@gnu.org>
10734
10735 * src/conflicts.c: *** empty log message ***
10736
10737 * src/system.h: entered into RCS
10738
10739 1993-09-10 Richard Stallman <rms@gnu.org>
10740
10741 * doc/bison.1: entered into RCS
10742
10743 1993-09-06 Noah Friedman <friedman@gnu.org>
10744
10745 * src/version.c: entered into RCS
10746
10747 1993-09-06 Noah Friedman <friedman@gnu.org>
10748
10749 * Makefile.in: *** empty log message ***
10750
10751 1993-07-30 David J. MacKenzie <djm@gnu.org>
10752
10753 * Makefile.in: *** empty log message ***
10754
10755 1993-07-24 Richard Stallman <rms@gnu.org>
10756
10757 * src/bison.s1: *** empty log message ***
10758
10759 1993-07-24 Richard Stallman <rms@gnu.org>
10760
10761 * bison.simple: *** empty log message ***
10762
10763 1993-07-08 David J. MacKenzie <djm@gnu.org>
10764
10765 * Makefile.in: *** empty log message ***
10766
10767 1993-07-04 Richard Stallman <rms@gnu.org>
10768
10769 * src/bison.s1: *** empty log message ***
10770
10771 1993-07-04 Richard Stallman <rms@gnu.org>
10772
10773 * bison.simple: *** empty log message ***
10774
10775 1993-06-26 David J. MacKenzie <djm@gnu.org>
10776
10777 * src/getargs.c: entered into RCS
10778
10779 1993-06-26 David J. MacKenzie <djm@gnu.org>
10780
10781 * doc/bison.texinfo: *** empty log message ***
10782
10783 * doc/bison.1: New file.
10784
10785 1993-06-25 Richard Stallman <rms@gnu.org>
10786
10787 * src/getargs.c: New file.
10788
10789 1993-06-16 Richard Stallman <rms@gnu.org>
10790
10791 * src/bison.s1: *** empty log message ***
10792
10793 1993-06-16 Richard Stallman <rms@gnu.org>
10794
10795 * bison.simple: *** empty log message ***
10796
10797 1993-06-03 Richard Stallman <rms@gnu.org>
10798
10799 * src/bison.s1: New file.
10800
10801 1993-06-03 Richard Stallman <rms@gnu.org>
10802
10803 * doc/bison.texinfo: *** empty log message ***
10804
10805 1993-06-03 Richard Stallman <rms@gnu.org>
10806
10807 * bison.simple: New file.
10808
10809 1993-05-19 Richard Stallman <rms@gnu.org>
10810
10811 * doc/bison.texinfo: New file.
10812
10813 1993-05-07 Noah Friedman <friedman@gnu.org>
10814
10815 * Makefile.in: *** empty log message ***
10816
10817 1993-04-28 Noah Friedman <friedman@gnu.org>
10818
10819 * src/reader.c: *** empty log message ***
10820
10821 1993-04-23 Noah Friedman <friedman@gnu.org>
10822
10823 * src/alloc.h: entered into RCS
10824
10825 1993-04-20 David J. MacKenzie <djm@gnu.org>
10826
10827 * src/version.c: *** empty log message ***
10828
10829 * src/files.c, src/allocate.c:
10830 entered into RCS
10831
10832 * src/reader.c: *** empty log message ***
10833
10834 * src/lex.c: entered into RCS
10835
10836 * src/conflicts.c: New file.
10837
10838 * src/symtab.c: entered into RCS
10839
10840 * src/alloc.h: New file.
10841
10842 * src/LR0.c: entered into RCS
10843
10844 1993-04-18 Noah Friedman <friedman@gnu.org>
10845
10846 * src/reader.c: New file.
10847
10848 * src/version.c: *** empty log message ***
10849
10850 1993-04-18 Noah Friedman <friedman@gnu.org>
10851
10852 * Makefile.in: *** empty log message ***
10853
10854 1993-04-17 Noah Friedman <friedman@gnu.org>
10855
10856 * Makefile.in: *** empty log message ***
10857
10858 1993-04-15 Richard Stallman <rms@gnu.org>
10859
10860 * src/main.c, src/files.c:
10861 New file.
10862
10863 1993-04-15 Noah Friedman <friedman@gnu.org>
10864
10865 * configure.in: entered into RCS
10866
10867 * configure.in: *** empty log message ***
10868
10869 * configure.in: New file.
10870
10871 1993-04-14 Richard Stallman <rms@gnu.org>
10872
10873 * Makefile.in: New file.
10874
10875 1993-04-13 Richard Stallman <rms@gnu.org>
10876
10877 * src/version.c: New file.
10878
10879 1993-03-25 Richard Stallman <rms@gnu.org>
10880
10881 * src/output.c: entered into RCS
10882
10883 1992-09-25 Richard Stallman <rms@gnu.org>
10884
10885 * configure.bat: entered into RCS
10886
10887 1992-06-22 Richard Stallman <rms@gnu.org>
10888
10889 * src/vmsgetargs.c: entered into RCS
10890
10891 1992-06-22 Richard Stallman <rms@gnu.org>
10892
10893 * doc/bison.rnh: entered into RCS
10894
10895 1992-04-20 David J. MacKenzie <djm@gnu.org>
10896
10897 * README: entered into RCS
10898
10899 1992-01-22 Richard Stallman <rms@gnu.org>
10900
10901 * src/machine.h: entered into RCS
10902
10903 1991-12-21 Richard Stallman <rms@gnu.org>
10904
10905 * src/lalr.c, src/closure.c:
10906 entered into RCS
10907
10908 1991-12-20 Richard Stallman <rms@gnu.org>
10909
10910 * src/state.h: entered into RCS
10911
10912 1991-12-18 Richard Stallman <rms@gnu.org>
10913
10914 * src/print.c, src/nullable.c, src/derives.c:
10915 entered into RCS
10916
10917 1991-11-03 David J. MacKenzie <djm@gnu.org>
10918
10919 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
10920 entered into RCS
10921
10922 1988-09-09 Richard Stallman <rms@gnu.org>
10923
10924 * src/bison.hairy: entered into RCS
10925
10926 1987-12-16 Richard Stallman <rms@gnu.org>
10927
10928 * REFERENCES: entered into RCS
10929
10930 -----
10931
10932 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
10933 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10934
10935 This file is part of Bison, the GNU Compiler Compiler.
10936
10937 Bison is free software; you can redistribute it and/or modify
10938 it under the terms of the GNU General Public License as published by
10939 the Free Software Foundation; either version 2, or (at your option)
10940 any later version.
10941
10942 Bison is distributed in the hope that it will be useful,
10943 but WITHOUT ANY WARRANTY; without even the implied warranty of
10944 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10945 GNU General Public License for more details.
10946
10947 You should have received a copy of the GNU General Public License
10948 along with Bison; see the file COPYING. If not, write to
10949 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
10950 Boston, MA 02111-1307, USA.