]> git.saurik.com Git - bison.git/blob - ChangeLog
9866c18ca0cb53247fbc68f01a1bd7bc733f68cd
[bison.git] / ChangeLog
1 2003-02-20 Akim Demaille <akim@epita.fr>
2
3 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
4 before initial_columns.
5 (location.hh): Use consistent variable names when defining the
6 operator<<.
7 Use "last" so that we subtract from Positions, not from unsigned.
8
9 2003-02-20 Akim Demaille <akim@epita.fr>
10
11 * data/lalr1.cc (position.hh): New subfile, including the extended
12 and Doxygen'ed documentation of class Position.
13 (location.hh): Use it.
14 Document a` la Doxygen.
15 With the help of BenoƮt Perrot.
16
17 2003-02-20 Akim Demaille <akim@epita.fr>
18
19 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
20 AT_YACC_IF.
21 Redefine AT_YYERROR_SEES_LOC_IF using it.
22 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
23 not defined.
24 Don't use the location in yy::Parser::error_ and
25 yy::Parser::print_ when not %locations.
26 Activate more lalr1.cc tests.
27
28 2003-02-19 Akim Demaille <akim@epita.fr>
29
30 * data/lalr1.cc: When displaying a line number, be sure to make it
31 an int.
32
33 2003-02-19 Akim Demaille <akim@epita.fr>
34
35 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
36 Remove, useless.
37 (YYABORT, YYACCEPT, YYERROR): New.
38 * tests/calc.at: Renable the lalr1.cc test.
39
40 2003-02-19 Akim Demaille <akim@epita.fr>
41
42 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
43 error recovery, mixing with/without pops and discarding of the
44 lookahead.
45 Exercise YYERROR.
46 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
47
48 2003-02-17 Paul Eggert <eggert@twinsun.com>
49
50 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
51 * tests/testsuite.at (AT_COMPILE): Use them.
52 This fixes the testsuite problem reported by Robert Lentz in
53 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
54
55 2003-02-12 Paul Eggert <eggert@twinsun.com>
56
57 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
58 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
59 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
60 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
61 Check for malloc failure, for consistency with yacc.c.
62 (yytname_size): Remove, for consistency with yacc.c.
63
64 The bug still remains in data/lalr1.cc, as I didn't have time
65 to fix it there.
66
67 2003-02-06 Akim Demaille <akim@epita.fr>
68
69 * configure.ac (GXX): Rename as...
70 (CXX): this, to keep the original Autoconf semantics.
71 Require 2.57.
72 * data/lalr1.cc: Fix b4_copyright invocations.
73 If YYDEBUG is not defined, don't depend upon name_ being defined.
74 (location.hh): Include string and iostream.
75 (Position::filename): New member.
76 (Position::Position ()): New.
77 (operator<< (Position)): New.
78 (operator- (Position, int)): New.
79 (Location::first, Location::last): Rename as...
80 (Location::begin, Location::end): these, to mock the conventional
81 iterator names.
82 (operator<< (Location)): New.
83 * tests/atlocal.in (CXX): New.
84 * tests/testsuite.at (AT_COMPILE_CXX): New.
85 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
86 locations in a more synthetic way.
87 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
88 lalr1.cc is used.
89 Adjust the C locations to match those from Emacs: first column is
90 column 0.
91 Change all the expected results.
92 Conform to the GCS: simplify the locations when applicable.
93 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
94 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
95 these CPP macros with the m4 macros new defined by...
96 (AT_CHECK_PUSHDEFS): this, i.e.:
97 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
98 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
99 New macros.
100 (AT_CHECK_POPDEFS): Undefine them.
101 (AT_CHECK_CALC_LALR1_CC): New.
102 Use it for the first lalr1.cc test.
103
104 2003-02-04 Akim Demaille <akim@epita.fr>
105
106 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
107 Location as is defined.
108
109 2003-02-04 Akim Demaille <akim@epita.fr>
110
111 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
112 name_ being defined.
113
114 2003-02-03 Paul Eggert <eggert@twinsun.com>
115
116 * src/gram.h (start_symbol): Remove unused decl.
117
118 Use more-consistent naming conventions for local vars.
119
120 * src/derives.c (derives_compute): Change type of local var from
121 int to rule_number.
122 * src/gram.c (grammar_rules_partial_print): Likewise.
123 * src/print.c (print_core): Likewise.
124 * src/reduce.c (reduce_grammar_tables): Likewise.
125
126 * src/gram.c (grammar_dump): Change name of item_number *
127 local var from r to rp.
128 * src/nullable.c (nullable_compute): Likewise.
129
130 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
131
132 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
133 for symbol or symbol_number var.
134 * src/reader.c (grammar_start_symbol_set): Likewise.
135 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
136 Likewise.
137 * src/state.c (transitions_to): Likewise.
138 * src/state.h: Likewise.
139 * src/tables.c (symbol_number_to_vector_number): Likewise.
140
141 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
142 char * var.
143
144 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
145 var.
146
147 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
148 var.
149
150 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
151 Use str, not s, for char * var. Use ch, not c, for character var.
152 Use size for size var.
153
154 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
155 char * var.
156 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
157 uniqstr var.
158 * src/uniqstr.h: Likewise.
159
160 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
161 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
162 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
163 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
164 param to have same name as that of enum, so that we don't use
165 "s" to stand for a non-state.
166
167 2003-02-02 Akim Demaille <akim@epita.fr>
168
169 * src/scan-skel.l: Scan more than one inert character per yylex
170 invocation.
171
172 2003-02-01 Paul Eggert <eggert@twinsun.com>
173
174 Version 1.875a.
175
176 * po/LINGUAS: Add ms.
177
178 2003-01-30 Akim Demaille <akim@epita.fr>
179
180 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
181
182 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
183
184 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
185 of $1.
186
187 Changes in response to error report by S. Eken: GLR mode does not
188 handle negative $ indices or $ indices in embedded rules correctly.
189 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
190
191 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
192 (b4_rhs_location): Ditto.
193 (yyfill): New function to copy from stack tree into array
194 incrementally.
195 (yyuserAction): Modify to allow incremental move of semantic values
196 to rhs array when in GLR mode.
197 Define YYFILL to use in user-defined actions to fill semantic array
198 as needed.
199 Remove dummy use of yystack, as there is now a guaranteed use.
200 (yydoAction): Modify to allow incremental move of semantic values
201 to rhs array when in GLR mode.
202 (yyresolveAction): Ditto.
203 (yyglrShiftDefer): Update comment.
204 (yyresolveStates): Use X == NULL for pointers, not !X.
205 (yyglrReduce): Ditto.
206 (yydoAction): Ditto
207
208 * tests/glr-regr1.at: Rename to ...
209 * tests/glr-regression.at: Add new regression test for the problems
210 described above (adapted from S. Eken).
211 Update copyright notice.
212 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
213 * tests/Makefile.am: Ditto.
214
215 2003-01-28 Paul Eggert <eggert@twinsun.com>
216
217 * data/lalr1.cc: Do not use @output_header_name@ unless
218 b4_defines_flag is set. This fixes two bugs reported by
219 Tim Van Holder in
220 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
221 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
222
223 2003-01-21 Paul Eggert <eggert@twinsun.com>
224
225 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
226 we don't need to worry about yyerrlab1 being reported as an
227 "unused label" by non-GCC C compilers. The downside is that if
228 locations are used then a couple of statements are duplicated each
229 time YYERROR is invoked, but the upside is that the warnings
230 should vanish.
231 (yyerrlab1): Move code to YERROR.
232 (yyerrlab2): Remove. Change uses back to yyerrlab1.
233 This reverts some of the 2002-12-27 change.
234
235 2003-01-17 Paul Eggert <eggert@twinsun.com>
236
237 * src/output.c (symbol_printers_output): Fix typo that led
238 to core dump. Problem reported by Antonio Rus in
239 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
240
241 2003-01-13 Akim Demaille <akim@epita.fr>,
242 Quoc Peyrot <chojin@lrde.epita.fr>,
243 Robert Anisko <anisko_r@lrde.epita.fr>
244
245 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
246 when the stacks contain one element, as the loop would otherwise
247 free the last state, and then use the top state (the one we just
248 popped). This means that the initial elements will not be freed
249 explicitly, as is the case in yacc.c; it is not a problem, as
250 these elements have fake values.
251
252 2003-01-11 Paul Eggert <eggert@twinsun.com>
253
254 * NEWS: %expect-violations are now just warnings, reverting
255 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
256 bootstrapping problem reported by Matthias Klose; see
257 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
258 * src/conflicts.c (conflicts_print): Likewise.
259 * tests/conflicts.at (%expect not enough, %expect too much,
260 %expect with reduce conflicts): Likewise.
261 * doc/bison.texinfo (Expect Decl): Document this. Also mention
262 that the warning is enabled if the number of conflicts changes
263 (not necessarily increases).
264
265 * src/getargs.c (version): Update copyright year.
266
267 2003-01-09 Akim Demaille <akim@epita.fr>
268
269 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
270
271 2003-01-08 Paul Eggert <eggert@twinsun.com>
272
273 * Makefile.maint (WGETFLAGS):
274 New macro, containing "-C off" to disable proxy caches.
275 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
276 (rel-check): Use $(WGET) instead of wget.
277
278 2003-01-06 Paul Eggert <eggert@twinsun.com>
279
280 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
281 the GLR paper of Scott, Johnstone and Hussain.
282
283 2003-01-04 Paul Eggert <eggert@twinsun.com>
284
285 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
286 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
287 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
288 (EXTRA_LIBRARIES): New var, for liby.a.
289 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
290 (EXTRA_SCRIPTS): New var, for yacc.
291
292 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
293 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
294 Problem reported by Nelson H. F. Beebe.
295
296 2003-01-03 Paul Eggert <eggert@twinsun.com>
297
298 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
299 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
300 when compiling Bison 1.875's `bitset bset = obstack_alloc
301 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
302
303 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
304 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
305 grow to a huge size with typical invocation.
306
307 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
308 Use the pattern recommended by Autoconf 2.57, except also protect
309 against double-definition.
310 * src/system.h: Likewise.
311 Portability issues reported by Nelson H. F. Beebe.
312
313 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
314 All uses changed. Provide a definition in both C and C++.
315 (yytrue, yyfalse): Define even if defined (__cplusplus).
316
317 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
318 Reported by Nelson H. F. Beebe.
319
320 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
321
322 2003-01-02 Paul Eggert <eggert@twinsun.com>
323
324 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
325 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
326 Bug reported by Nelson H. F. Beebe.
327
328 2003-01-01 Paul Eggert <eggert@twinsun.com>
329
330 * Version 1.875.
331
332 2002-12-30 Paul Eggert <eggert@twinsun.com>
333
334 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
335 Moved here from...
336 (<INITIAL>","): Here. This causes stray "," to be treated
337 more uniformly.
338
339 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
340 last brace in braced code when not in Yacc mode, for compatibility
341 with Bison 1.35. This resurrects the 2001-12-15 patch to
342 src/reader.c.
343
344 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
345 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
346
347 2002-12-28 Paul Eggert <eggert@twinsun.com>
348
349 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
350 that of SYM's type. This fixes Debian bug 168069, reported by
351 Thomas Olsson.
352
353 2002-12-28 Paul Eggert <eggert@twinsun.com>
354
355 Version 1.75f.
356
357 Switch back to the Yacc style of conflict reports, undoing some
358 of the 2002-07-30 change.
359 * doc/bison.texinfo (Understanding): Use Yacc style for
360 conflict reports. Also, use new way of locating rules.
361 * src/conflicts.c (conflict_report):
362 Renamed from conflict_report_yacc, removing the old
363 'conflict_report'. Translate the entire conflict report at once,
364 so that we don't assume that "," has the same interpretation in
365 all languages.
366 (conflicts_output): Use Yacc-style conflict report for each state,
367 instead of our more-complicated style.
368 (conflicts_print): Use Yacc-style conflict report, except print
369 the input file name when not emulating Yacc.
370 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
371 Conflicted Reduction, %expect not enough, %expect too much,
372 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
373 * tests/existing.at (GNU Cim Grammar): Likewise.
374 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
375
376 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
377 fatal): Don't invoke fflush; it's not needed and it might even be
378 harmful for stdout, as stdout might not be open.
379 * src/reduce.c (reduce_print): Likewise.
380
381 2002-12-27 Paul Eggert <eggert@twinsun.com>
382
383 Fix a bug where error locations were not being recorded correctly.
384 This problem was originally reported by Paul Hilfinger in
385 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
386
387 * data/yacc.c (yyparse): New local var yylerrsp, to record the
388 top of the location stack's error locations.
389 (yyerrlab): Set it. When discarding a token, push its location
390 onto yylerrsp so that we don't lose track of the error's end.
391 (yyerrlab1): Now is only the target of YYERROR, so that we can
392 properly record the location of the action that failed. For GCC
393 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
394 GCC warning about yyerrlab1 being unused if YYERROR is unused.
395 (yyerrlab2): New label, which yyerrlab now falls through to.
396 Compute the error's location by applying YYLLOC_DEFAULT to
397 the locations of all the symbols that went into the error.
398 * doc/bison.texinfo (Location Default Action): Mention that
399 YYLLOC_DEFAULT is also invoked for syntax errors.
400 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
401 Error locations include the locations of all the tokens that were
402 discarded, not just the last token.
403
404 2002-12-26 Paul Eggert <eggert@twinsun.com>
405
406 * src/files.c: Include quote.h.
407 (compute_output_file_names): Warn if we detect conflicting
408 outputs to the same file. This should catch the misunderstanding
409 exemplified by Debian Bug 165349, reported by Bruce Stephens..
410
411 * src/conflicts.c (conflicts_print): If the user specifies
412 "%expect N", report an error if there are any reduce/reduce
413 conflicts. This is what the manual says should happen.
414 This fixes Debian bug 130890, reported by Anthony DeRobertis.
415 * tests/conflicts.at (%expect with reduce conflicts): New test.
416
417 Don't use m4_include on relative file names, as it doesn't work as
418 desired if there happens to be a file with that name under ".".
419
420 * m4sugar/version.m4: Remove; it was included but it wasn't used.
421 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
422 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
423 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
424 * src/output.c (output_skeleton): Use full path names when
425 specifying a file to include; don't rely on include path, as
426 it's unreliable when the working file contains a file with
427 that name.
428
429 2002-12-25 Paul Eggert <eggert@twinsun.com>
430
431 Remove obsolete references to bison.simple and bison.hairy.
432 Problem mentioned by Aubin Mahe in
433 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
434 * data/glr.c: Comment fix.
435 * doc/bison.1: Remove references. Also, mention "yacc".
436
437 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
438 with -g option.
439
440 * src/parse-gram.y (declaration): Use enum "report_states" rather
441 than its numeric value 1.
442
443 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
444 opening a new one. This fixes Debian bug 165349, reported by
445 Bruce Stephens.
446
447 2002-12-24 Paul Eggert <eggert@twinsun.com>
448
449 Version 1.75e.
450
451 * Makefile.maint (cvs-update): Don't assume that the shell
452 supports $(...), as Solaris sh doesn't.
453
454 * src/parse-gram.y (lloc_default): Remove test for empty
455 nonterminals at the end, since it didn't change the result.
456
457 2002-12-24 Paul Eggert <eggert@twinsun.com>
458
459 If the user does not define YYSTYPE as a macro, Bison now declares it
460 using typedef instead of defining it as a macro. POSIX requires this.
461 For consistency, YYLTYPE is also declared instead of defined.
462
463 %union directives can now have a tag before the `{', e.g., the
464 directive `%union foo {...}' now generates the C code
465 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
466 The default union tag is `YYSTYPE', for compatibility with Solaris 9
467 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
468 instead of `yyltype'.
469
470 `yystype' and `yyltype' are now obsolescent macros instead of being
471 typedefs or tags; they are no longer documented and will be
472 withdrawn in a future release.
473
474 * data/glr.c (b4_location_type): Remove.
475 (YYSTYPE): Renamed from yystype.
476 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
477 (struct YYLTYPE): Renamed from struct yyltype.
478 (YYLTYPE): Renamed from yyltype.
479 (yyltype, yystype): New (and obsolescent) macros,
480 for backward compatibility.
481 * data/yacc.c: Likewise.
482
483 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
484 does not specify a union tag. This is for compatibility with
485 Solaris 9 yacc.
486
487 * src/parse-gram.y (add_param): 2nd arg is now char * not char
488 const *, since it is now modified by stripping surrounding { }.
489 (current_braced_code): Remove.
490 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
491 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
492 trailing " {...}". Now of type <chars>.
493 (grammar_declaration): Adjust to bundled tokens.
494 (code_content): Remove; stripping is now done by add_param.
495 (print_token_value): Print contents of bundled tokens.
496 (token_name): New function.
497
498 * src/reader.h (braced_code, current_braced_code): Remove.
499 (token_name): New decl.
500
501 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
502 token_type, not braced_code code_kind. All uses changed.
503 (SC_PRE_CODE): New state, for scanning after a keyword that
504 has (or usually has) an immediately-following braced code.
505 (token_type): New local var, to keep track of which token type
506 to return when scanning braced code.
507 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
508 <INITIAL>"%parse-param", <INITIAL>"%printer",
509 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
510 instead of returning a token type immediately.
511 (<INITIAL>"{"): Set token type.
512 (<SC_BRACED_CODE>"}"): Use it.
513 (handle_action_dollar, handle_action_at): Now returns bool
514 indicating success. Fail if ! current_rule; this prevents a core dump.
515 (handle_symbol_code_dollar, handle_symbol_code_at):
516 Remove; merge body into caller.
517 (handle_dollar, handle_at): Complain in invalid contexts.
518
519 * NEWS, doc/bison.texinfo: Document the above.
520 * NEWS: Fix years and program names in copyright notice.
521
522 2002-12-17 Paul Eggert <eggert@twinsun.com>
523
524 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
525 Reporting, Table of Symbols): Omit mentions of %lex-param and
526 %parse-param from the documentation for now.
527
528 2002-12-15 Paul Eggert <eggert@twinsun.com>
529
530 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
531 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
532 lookahead symbol, and which sets yychar in parser actions) and it
533 disagreed with the Bison documentation. Bug
534 reported by Andrew Walrond.
535
536 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
537 as the caller now does that.
538 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
539 (YYEMPTY): Parenthesize right hand side, since others use it.
540 (yyparse): Don't assume that our generated code is the only code
541 that sets yychar.
542
543 2002-12-13 Paul Eggert <eggert@twinsun.com>
544
545 Version 1.75d.
546
547 POSIX requires a "yacc" command.
548 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
549 (MOSTLYCLEANFILES): Add yacc.
550 (yacc): New rule.
551 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
552 as an alias for bison y.
553
554 * po/LINGUAS: Add da.
555
556 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
557 problem with latest <getopt.h>.
558 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
559
560 * doc/fdl.texi: Upgrade to 1.2.
561 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
562 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
563 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
564 gnulib.
565 * config/install-sh: Sync with autotools.
566
567 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
568 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
569 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
570 locations are requested.
571 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
572 locations are requested.
573
574 2002-12-12 Paul Eggert <eggert@twinsun.com>
575
576 Remove unportable casts and storage allocation tricks.
577 While we're at it, remove almost all casts, since they
578 usually aren't needed and are a sign of trouble.
579
580 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
581
582 * src/derives.c (derives_compute): Do not subtract NTOKENS from
583 the pointer DSET returned by malloc; this isn't portable.
584 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
585 Similarly for DERIVES.
586 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
587 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
588 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
589
590 * src/derives.c (derives_compute): Do not bother invoking
591 int_of_rule_number, since rule numbers are integers.
592
593 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
594 rather than XMALLOC (char, N).
595
596 * src/files.c (filename_split): Rewrite to avoid cast.
597
598 * src/gram.h (symbol_number_as_item_number,
599 item_number_as_symbol_number, rule_number_as_item_number,
600 item_number_as_rule_number):
601 Now inline functions rather than macros, to avoid casts.
602 * src/state.h (state_number_as_int): Likewise.
603 * src/tables.c (state_number_to_vector_number,
604 symbol_number_to_vector_number): Likewise.
605
606 * src/gram.h (int_of_rule_number): Remove; no longer used.
607
608 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
609 since the resulting storage is always stored into.
610
611 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
612 where it's needed.
613
614 * src/muscle_tab.c (muscle_m4_output):
615 Now inline. Return bool, not int.
616 * src/state.c (state_compare): Likewise.
617 * src/symtab.c (symbol_check_defined,
618 symbol_check_alias_consistency, symbol_pack, symbol_translation,
619 hash_compare_symbol, hash_symbol):
620 Likewise.
621 * src/uniqstr.c (uniqstr_print): Likewise.
622 * src/muscle_tab.c (muscle_m4_output_processor):
623 New function, to avoid casts.
624 * src/state.c (state_comparator, stage_hasher): Likewise.
625 * src/symtab.c (symbol_check_defined_processor,
626 symbol_check_alias_consistency_processor, symbol_pack_processor,
627 symbol_translation_processor, hash_symbol_comparator,
628 hash_symbol_hasher): Likewise.
629 * src/uniqstr.c (uniqstr_print_processor): Likewise.
630 * src/muscle_tab.c (muscles_m4_output):
631 Use new functions instead of casting old functions unportably.
632 * src/state.c (state_hash_new): Likewise.
633 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
634 symbols_token_translations_init):
635 Likewise.
636 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
637
638 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
639 var instead of casting to long, to avoid casts.
640 (prepare_states): Use MALLOC rather than alloca, so that we don't
641 have to worry about alloca.
642 * src/state.c (state_hash_lookup): Likewise.
643
644 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
645 local var instead of casting to unsigned char, to avoid casts.
646
647 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
648 STATE_ALLOC): Remove.
649 (transitions_new, errs_new, reductions_new, state_new): Use malloc
650 rather than calloc, and use offsetof to avoid allocating slightly
651 too much storage.
652 (state_new): Initialize all members.
653
654 * src/state.c (state_hash): Use unsigned accumulator, not signed.
655
656 * src/symtab.c (symbol_free): Remove; unused.
657 (symbol_get): Remove cast in lhs of assignment.
658 (symbols_do): Now static. Accept generic arguments, not
659 hashing-related ones.
660
661 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
662 (symbol_processor): Remove.
663 (symbols_do): Remove decl; now static.
664
665 * src/system.h (alloca): Remove; decl no longer needed.
666 (<stddef.h>): Include, for offsetof.
667 (<inttypes.>, <stdint.h>): Include if available.
668 (uintptr_t): New type, if system lacks it.
669 (CALLOC, MALLOC, REALLOC): New macros.
670 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
671 new macros.
672
673 * src/tables.c (table_size): Now int, to pacify GCC.
674 (table_grow, table_ninf_remap): Use signed table size.
675 (save_row): Don't bother initializing locals when not needed.
676 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
677 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
678
679 * src/vcg.h: Correct misspellings.
680
681 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
682
683
684 * src/getargs.c (getargs): Don't assume EOF == -1.
685
686 2002-12-09 Paul Eggert <eggert@twinsun.com>
687
688 Change identifier spellings to avoid collisions with names
689 that are reserved by POSIX.
690
691 Don't use names ending in _t, since POSIX reserves them.
692 For consistency, remove _e and _s endings -- they're weren't
693 needed to remove ambiguity. All uses changed.
694 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
695 turn was just renamed from struniq_t.
696 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
697 which in turn was just renamed from struniq_processor_t.
698 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
699 in turn was renamed from hash_compare_struniq_t.
700 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
701 (state_list): Renamed from state_list_t.
702 * src/assoc.h (assoc): Renamed from assoc_t.
703 * src/conflicts.c (enum conflict_resolution): Renamed from
704 enum conflict_resolution_e.
705 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
706 (rule_list): Renamed from rule_list_t.
707 * src/getargs.h (enum trace): Renamed from enum trace_e.
708 (enum report): Renamed from enum report_e.
709 * src/gram.h (item_number): Renamed from item_number_t.
710 (rule_number): Renamed from rule_number_t.
711 (struct rule_s): Remove the "rule_s" part; not used.
712 (rule): Renamed from rule_t.
713 (rule_filter): Renamed from rule_filter_t.
714 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
715 (goto_list): Renamed from goto_list_t.
716 * src/lalr.h (goto_number): Renamed from goto_number_t.
717 * src/location.h (location): Renamed from location_t.
718 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
719 and moved here from:
720 * src/muscle_tab.h (muscle_entry_t): here.
721 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
722 (rule_list): Renamed from rule_list_t.
723 * src/print_graph.c (static_graph): Renamed from graph.
724 * src/reader.h (braced_code): Renamed from braced_code_t.
725 Remove brace_code_e tag.
726 * src/relation.h (relation_node): Renamed from relation_node_t.
727 (relation_nodes): Renamed from relation_nodes_t.
728 (relation): Renamed from relation_t.
729 * src/state.h (state_number): Renamed from state_number_t.
730 (struct state): Renamed from struct state_s.
731 (state): Renamed from state_t.
732 (transitions): Renamed from transitions_t. Unused (and
733 misspelled) transtion_s tag removed.
734 (errs): Renamed from errs_t. Unused errs_s tag removed.
735 (reductions): Renamed from reductions_t. Unused tag
736 reductions_s removed.
737 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
738 (struct symbol_list): Renamed from struct symbol_list_s.
739 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
740 (struct symbol): Renamed from struct symbol_s.
741 (symbol): Renamed from symbol_t.
742 * src/tables.c (vector_number): Renamed from vector_number_t.
743 (action_number): Renamed from action_t.
744 * src/tables.h (base_number): Renamed from base_t.
745 * src/vcg.h (enum color): Renamed from enum color_e.
746 (enum textmode): Renamed from enum textmode_e.
747 (enum shape): Renamed from enum shape_e.
748 (struct colorentry): Renamed from struct colorentry_s.
749 (struct classname): Renamed from struct classname_s.
750 (struct infoname): Renamed from struct infoname_s.
751 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
752 (enum decision): Renamed from enum decision_e.
753 (enum orientation): Renamed from enum orientation_e.
754 (enum alignment): Renamed from enum alignment_e.
755 (enum arrow_mode): Renamed from enum arrow_mode_e.
756 (enum crossing_type): Renamed from enum crossing_type_e.
757 (enum view): Renamed from enum view_e.
758 (struct node): Renamed from struct node_s.
759 (node): Renamed from node_t.
760 (enum linestyle): Renamed from enum linestyle_e.
761 (enum arrowstyle): Renamed from enum arrowstyle_e.
762 (struct edge): Renamed from struct edge.
763 (edge): Renamed from edge_t.
764 (struct graph): Renamed from struct graph_s.
765 (graph): Renamed from graph_t.
766 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
767 Rename value_t -> value.
768 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
769 value_t_as_yystype -> value_as_yystype.
770
771 Don't include <errno.h> in the mainstream code, since it
772 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
773 * lib/get-errno.c, lib/get-errno.h: New files.
774 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
775 get-errno.c.
776 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
777 * src/output.c (output_skeleton): Likewise.
778 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
779 instead of errno.
780 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
781 Likewise.
782 (handle_action_dollar, handle_action_at): Likewise.
783 * src/system.h: Do not include <errno.h>.
784 (TAB_EXT): Renamed from EXT_TAB.
785 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
786
787 Avoid str[a-z]*, since <string.h> reserves that name space.
788 Change all instances of "struniq" in names to "uniqstr", and
789 likewise for "STRUNIQ" and "UNIQSTR".
790 * src/uniqstr.c: Renamed from src/struniq.c.
791 * src/uniqstr.h: Renamed from src/struniq.h.
792 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
793 * src/files.c (strsuffix): Remove; unused.
794 (concat2): Renamed from stringappend. Now static.
795 * src/files.h (strsuffix, stringappend): Remove; unused.
796 * src/parse-gram.y (<chars>): Renamed from <string>.
797 (<uniqstr>): Renamed from <struniq>.
798 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
799 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
800 (struct graph_s.expand): Renamed from struct graph_s.stretch.
801 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
802 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
803 (N_EXPAND): Renamed from N_STRETCH.
804
805 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
806 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
807 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
808 Remove; unused.
809 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
810 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
811 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
812 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
813 (BASE_MAXIMUM): Renamed from BASE_MAX.
814 (BASE_MINIMUM): Renamed from BASE_MIN.
815 (ACTION_MAX): Remove; unused.
816 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
817 Unnecessary casts removed from above defines.
818
819
820 Fix misspelling in names.
821 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
822 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
823 G_NODE_ALIGNEMENT.
824
825
826 * lib/timevar.c (timevar_report): Renamed from time_report,
827 for consistency with other names.
828 * lib/timevar.h (timevar_report): New decl.
829 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
830
831
832 Sort include-file uses.
833
834 Reorder all include files under src to be in the order "system.h".
835 then the ../lib include files in angle brackets (alphabetized),
836 then the . include files in double-quotes (alphabetized). Fix
837 dependency breakages encountered in this process, as follows:
838 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
839 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
840 * src/state.h: Include "symtab.h".
841
842 2002-12-08 Paul Eggert <eggert@twinsun.com>
843
844 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
845 since this causes problems when __file__ contains character
846 sequences like "@" that are treated specially by src/scan-skel.l.
847 Instead, just use the file's basename. This fixes the bug
848 reported by Martin Mokrejs in
849 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
850
851 2002-12-06 Paul Eggert <eggert@twinsun.com>
852
853 Add support for rules that do not have trailing semicolons, as
854 POSIX requires. Improve the quality of locations in Bison
855 diagnostics.
856
857 * src/location.c: Include <quotearg.h>.
858 (empty_location): Now const.
859 (location_print): New function. Follow the recommendation of the
860 GNU Coding Standards for locations that span file boundaries.
861 * src/location.h: Do not include <quotearg.h>; no longer needed.
862 (boundary): New type.
863 (location_t): Use it. This allows locations to span file boundaries.
864 All member uses changed: file -> start.file or end.file (as needed),
865 first_line -> start.line, first_column -> start.column,
866 last_line -> end.line, last_column -> end.column.
867 (equal_boundaries): New function.
868 (LOCATION_RESET, LOCATION_STEP): Remove.
869 (LOCATION_PRINT): Remove. All callers changed to use location_print.
870 (empty_location): Now const.
871 (location_print): New decl.
872 * src/parse-gram.y (lloc_default): New function, which handles
873 empty locations more accurately.
874 (YYLLOC_DEFAULT): Use it.
875 (%token COLON): Remove.
876 (%token ID_COLON): New token.
877 (rules): Use it.
878 (declarations, rules): Remove trailing semicolon.
879 (declaration, rules_or_grammar_declaration):
880 Allow empty (";") declaration.
881 (symbol_def): Remove empty actions; no longer needed.
882 (rules_or_grammar_declaration): Remove trailing semicolon.
883 (semi_colon.opt): Remove.
884 * src/reader.h: Include location.h.
885 (scanner_cursor): New decl.
886 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
887 rolling our own.
888 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
889 of *loc.
890 (STEP): Remove. No longer needed, now that adjust_location does
891 the work. All uses removed.
892 (scanner_cursor): New var.
893 (adjust_location): Renamed from extend_location. It now sets
894 *loc and adjusts the scanner cursor. All uses changed.
895 Don't bother testing for CR.
896 (handle_syncline): Remove location arg; now updates scanner cursor.
897 All callers changed.
898 (unexpected_end_of_file): Now accepts start boundary of token or
899 comment, not location. All callers changed. Update scanner cursor,
900 not the location.
901 (SC_AFTER_IDENTIFIER): New state.
902 (context_state): Renamed from c_context. All uses changed.
903 (id_loc, code_start, token_start): New local vars.
904 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
905 processing of Yacc white space and equivalents here.
906 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
907 instead of returning ID immediately, since we need to search for
908 a subsequent colon.
909 (<INITIAL>"'", "\""): Save token_start.
910 (<INITIAL>"%{", "{", "%%"): Save code_start.
911 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
912 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
913 BEGIN context_state at end, not INITIAL.
914 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
915 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
916 Return correct token start.
917 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
918 the start of a character, string or multiline comment is found.
919 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
920 Reduction): Adjust reported locations to match the more-precise
921 results now expected.
922 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
923 * tests/reduce.at (Useless Rules, Reduced Automaton,
924 Underivable Rules): Likewise.
925 * tests/regression.at (Invalid inputs): No longer `expecting ";"
926 or "|"' now that so many other tokens are allowed by the new grammar.
927
928 * src/complain.h (current_file): Remove duplicate decl;
929 current_file is now owned by files.h.
930 * src/complain.c, src/scan-gram.l: Include files.h.
931
932 2002-12-06 Paul Eggert <eggert@twinsun.com>
933
934 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
935 promotes to int; it might be unsigned int.
936 * data/yacc.c (yy_reduce_print): Likewise.
937
938 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
939 be #defined in the prologue, not in the Bison declarations.
940 This fixes Debian Bug 102878, reported by Shaul Karl.
941
942 2002-12-02 Paul Eggert <eggert@twinsun.com>
943
944 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
945 * lib/strtoul.c: New file, from gnulib.
946 This fixes a porting bug reported by Peter Klein in
947 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
948
949 2002-11-30 Paul Eggert <eggert@twinsun.com>
950
951 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
952 and put only a forward declaration in the prologue. This is for
953 consistency with the other scanner helper functions.
954
955 Type clashes now generate warnings, not errors, since it
956 appears that POSIX may allow some grammars with type clashes.
957 * src/reader.c (grammar_current_rule_check): Warn about
958 type clashes instead of complaining.
959 * tests/input.at (Type Clashes): Expect warnings, not complaints.
960
961 Add Yacc library, since POSIX requires it.
962 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
963 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
964 * lib/main.c, lib/yyerror.c: New files.
965
966 gram_error can be static; it need not be extern.
967 * src/reader.h (gram_error): Remove decl.
968 * src/parse-gram.y (gram_error): Now static. Add static decl.
969 (print_token_value): Omit parameter names from forward decl,
970 for consistency.
971
972 2002-11-29 Paul Eggert <eggert@twinsun.com>
973
974 * doc/bison.texinfo: Emphasize that yylex and yyerror must
975 be declared before being used. E.g., one should typically
976 declare them in the prologue. Use GNU coding style in examples.
977 Put "const" consistently after the type it modifies. Mention
978 that C99 supports "inline". Mention that yyerror traditionally
979 returns "int".
980
981 %parse-param and %lex-param now take just one argument, the
982 declaration; the argument name is deduced from the declaration.
983
984 * doc/bison.texinfo (Parser Function, Pure Calling, Error
985 Reporting, Table of Symbols): Document this.
986 * src/parse-gram.y (add_param): New function.
987 (COMMA): Remove.
988 (declaration): Implement new rule for %parse-param and %lex-param.
989 * src/scan-gram.l: "," now elicits a warning, rather than being
990 a token; this is more compatible with byacc.
991 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
992
993 2002-11-27 Paul Eggert <eggert@twinsun.com>
994
995 Rename identifiers to avoid real and potential collisions.
996
997 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
998 to avoid collision with lex macro described by Bruce Lilly in
999 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1000 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1001 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1002 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1003 All uses changed.
1004 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1005 The name "yycontrol" violates the name space rules, and this stuff
1006 wasn't being used anyway.
1007 (input): Remove action; this stuff wasn't being used.
1008 (gram_error): Rename local variable yylloc -> loc.
1009 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1010 (YY_DECL): Don't use "yy" at start of local variables.
1011 All uses changed, e.g., yylloc -> loc.
1012 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1013 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1014 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1015 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1016
1017 * src/parse-gram.y (gram_error): loc is now const *.
1018 * src/reader.h (gram_error): Likewise.
1019
1020 2002-11-24 Paul Eggert <eggert@twinsun.com>
1021
1022 Version 1.75c.
1023
1024 * tests/actions.at (Actions after errors): Use an output format
1025 more similar to that of the Printers and Destructors test.
1026 Test the position of the ';' token too.
1027 (Printers and Destructors): Likewise.
1028 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1029 unnecessarily alarming people when the test fails.
1030
1031 * data/yacc.c (yyerrlab1): Move this label down, so that the
1032 parser does not discard the lookahead token if the user code
1033 invokes YYERROR. This change is required for POSIX conformance.
1034
1035 * lib/error.c: Sync with gnulib.
1036
1037 2002-11-22 Paul Eggert <eggert@twinsun.com>
1038
1039 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1040 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1041 * lib/xmalloc.c: Likewise.
1042
1043 2002-11-20 Paul Eggert <eggert@twinsun.com>
1044
1045 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1046
1047 2002-11-20 Paul Eggert <eggert@twinsun.com>
1048
1049 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1050 should use `if (! x) abort ();' rather than `assert (x);', and
1051 anyway it's one less thing to worry about configuring.
1052
1053 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1054 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1055 and replace all instances of assert with abort.
1056 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1057 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1058
1059 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1060 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1061 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1062 hash_find_entry, hash_rehash, hash_insert): Likewise.
1063 * src/conflicts.c (resolve_sr_conflict): Likewise.
1064 * src/lalr.c (set_goto_map, map_goto): Likewise.
1065 * src/nullable.c (nullable_compute): Likewise.
1066 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1067 * src/reader.c (packgram, reader): Likewise.
1068 * src/state.c (state_new, state_free, state_transitions_set,
1069 state_reduction_find): Likewise.
1070 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1071 symbol_pack): Likewise.
1072 * src/tables.c (conflict_row, pack_vector): Likewise.
1073 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1074 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1075 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1076 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1077
1078 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1079 (ARGMATCH_CONSTRAINT): New macro.
1080 (ARGMATCH_ASSERT): Use it.
1081
1082 * src/system.h (verify): New macro.
1083 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1084 rather than assert.
1085 * src/tables.c (tables_generate): Likewise.
1086
1087 * src/struniq.c (struniq_assert): Now returns void, and aborts
1088 if the assertion is false.
1089 (struniq_assert_p): Remove.
1090 * src/struniq.h: Likewise.
1091
1092 2002-11-18 Paul Eggert <eggert@twinsun.com>
1093
1094 * data/glr.c (yygetLRActions): Replace `yyindex' with
1095 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1096 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1097 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1098
1099 2002-11-18 Akim Demaille <akim@epita.fr>
1100
1101 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1102 space.
1103 From Tim Van Holder.
1104
1105 2002-11-17 Paul Eggert <eggert@twinsun.com>
1106
1107 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1108 to "SyntaxError" for consistency with my 2002-11-15 change.
1109
1110 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1111 not define to {}, since this breaks the common use of `YYDPRINTF
1112 ((...));' if a single statement is desired (e.g. before `else').
1113 Work around GCC warnings by surrounding corresponding calls with
1114 {} if needed.
1115 (yyhasResolvedValue): Remove unused function.
1116 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1117 loop body.
1118 (yyreportSyntaxError): Renamed from yyreportParseError.
1119 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1120 All uses changed.
1121 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1122 extern when possible. Remove unused initializations.
1123
1124 2002-11-16 Akim Demaille <akim@epita.fr>
1125
1126 Augment the similarity between GLR and LALR traces.
1127
1128 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1129 (YY_REDUCE_PRINT): New.
1130 (yyparse): Use them.
1131 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1132 YYDPRINT here.
1133 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1134 state reached after the reduction/recovery, since...
1135 (yyparse, yyprocessOneStack): Report the state we are entering in.
1136
1137 2002-11-16 Akim Demaille <akim@epita.fr>
1138
1139 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1140 Add support for --trace=skeleton.
1141 * src/scan-skel.l: %option debug.
1142 Scan strings of non-@ or \n instead of character by character.
1143 (scan_skel): Handle trace_skeleton.
1144 (QPUTS): New.
1145 (@output_parser_name@, @output_header_name@): ``Restore'' their
1146 support (used to be M4 macros).
1147 * data/yacc.c: Quote larger chunks, a la glr.c.
1148 * data/lalr1.cc: Likewise.
1149 The header guards are no longer available, so use some other
1150 string than `YYLSP_NEEDED'.
1151
1152 2002-11-16 Akim Demaille <akim@epita.fr>
1153
1154 Make the ``Printers and Destructors'' test more verbose, taking
1155 `yacc.c''s behavior as (possibly wrong) reference.
1156
1157 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1158 instead of fprint on stdout.
1159 Set and report the last_line of the symbols.
1160 Consistently display values and locations.
1161
1162 2002-11-16 Paul Eggert <eggert@twinsun.com>
1163
1164 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1165
1166 2002-11-15 Paul Eggert <eggert@twinsun.com>
1167
1168 * tests/actions.at (Actions after errors): New test case.
1169
1170 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1171 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1172 tests/action.at, tests/calc.at, tests/conflicts.at,
1173 tests/cxx-type.at, tests/regression.at:
1174 "parse error" -> "syntax error" for POSIX compatibility.
1175 "parsing stack overflow..." -> "parser stack overflow" so
1176 that code matches Bison documentation.
1177
1178 2002-11-15 Akim Demaille <akim@epita.fr>
1179
1180 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1181 take two BRACED_CODE, not two string_content.
1182 Free the scanner's obstack when we are done.
1183 (code_content): New.
1184 * tests/calc.at: Adjust.
1185 * doc/bison.texinfo: Adjust.
1186 Also, make sure to include the `,' for these declarations.
1187
1188 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1189
1190 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1191 definition; avoids potential autoreconf problems.
1192
1193 2002-11-15 Akim Demaille <akim@epita.fr>
1194
1195 Always check the value returned by yyparse.
1196
1197 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1198 returned by yyparse.
1199 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1200 Adjust calls.
1201 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1202 returned by yyparse.
1203
1204 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1205
1206 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1207 on input.at test.
1208
1209 2002-11-14 Paul Eggert <eggert@twinsun.com>
1210
1211 * src/output.c (output_skeleton): Call xfopen instead of
1212 duplicating xfopen's body.
1213
1214 Fix bugs reported by Nelson H. F. Beebe in
1215 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1216
1217 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1218 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1219 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1220 file twice in the grammar, as an extra check.
1221
1222 * tests/input.at (Torturing the Scanner): Surround the
1223 backslash-newline tests with "#if 0", to make it less likely that
1224 we'll run into compiler bugs. Bring back solitary \ inside
1225 comment, but add a closing comment to work around HP C bug. Don't
1226 test backslash-newline in C character constant.
1227
1228 2002-11-14 Akim Demaille <akim@epita.fr>
1229
1230 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1231 status of the compiler.
1232 Calling `exit 1' is no longer needed.
1233 Reported by Nelson H. F. Beebe.
1234
1235 2002-11-14 Akim Demaille <akim@epita.fr>
1236
1237 * tests/atlocal.in (CPPFLAGS): We have config.h.
1238 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1239 New.
1240 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1241 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1242 * tests/regression.at, tests/torture.at: Use them for all the
1243 grammars that are to be compiled.
1244 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1245 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1246 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1247
1248 2002-11-14 Akim Demaille <akim@epita.fr>
1249
1250 * doc/bison.texinfo: Various formatting changes (alignments in
1251 samples, additional @group/@end group, GCS in samples.
1252 Use @deffn instead of simple @table to define the directives,
1253 macros, variables etc.
1254
1255 2002-11-13 Paul Eggert <eggert@twinsun.com>
1256
1257 Fix some bugs reported by Albert Chin-A-Young in
1258 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1259
1260 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1261 -o c"; the HP C compiler chatters during compilation.
1262 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1263 * tests/headers.at (export YYLTYPE): Likewise.
1264
1265 * tests/input.at (Torturing the Scanner): Remove lines containing
1266 solitary backslashes, as they tickle a bug in the HP C compiler.
1267
1268 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1269 comments, since they're not portable. Use GNU coding style.
1270
1271 2002-11-13 Akim Demaille <akim@epita.fr>
1272
1273 * data/yacc.c: Leave bigger chunks of quoted text.
1274 (YYDSYMPRINTF): New.
1275 Use it to report symbol activities.
1276 * data/glr.c (YYDSYMPRINTF): New.
1277 Use it.
1278
1279 2002-11-12 Paul Eggert <eggert@twinsun.com>
1280
1281 Version 1.75b.
1282
1283 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1284 (yyglrReduce): Return yyok, not 0.
1285 This should avoid the enumerated-type warnings reported
1286 by Nelson H. F. Beebe in
1287 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1288
1289 * lib/bbitset.h (BITSET_INLINE): Remove.
1290 * lib/bitset.h [! BITSET_INLINE]: Remove.
1291 (bitset_set, bitset_reset, bitset_test): Rename local vars
1292 to avoid shadowing warnings by GCC.
1293
1294 * data/glr.c (inline): Remove #define. It's the user's
1295 responsibility to #define it away, just like 'const'.
1296 This fixes one of the bugs reported by Nelson H. F. Beebe in
1297 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1298
1299 * Makefile.maint (po-check): Scan .l and .y files instead of the
1300 .c and the .h files that they generate. This fixes the bug
1301 reported by Tim Van Holder in:
1302 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1303 Look for N_ as well as for _. Try to avoid matching #define for
1304 N_ and _.
1305 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1306 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1307 * src/scan-gram.l: Revamp regular expressions so that " and '
1308 do not confuse xgettext.
1309
1310 * src/struniq.h (struniq_new): Do not declare the return type
1311 to be 'const'; this violates the C standard.
1312 * src/struniq.c (struniq_new): Likewise.
1313
1314 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1315
1316 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1317 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1318 linker.
1319
1320 2002-11-12 Akim Demaille <akim@epita.fr>
1321
1322 * Makefile.maint: Sync with Autoconf:
1323 (local_updates): New.
1324
1325 2002-11-12 Akim Demaille <akim@epita.fr>
1326
1327 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1328
1329 2002-11-12 Akim Demaille <akim@epita.fr>
1330
1331 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1332 locations.
1333
1334 2002-11-12 Akim Demaille <akim@epita.fr>
1335
1336 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1337 not yyvalue.
1338
1339 2002-11-12 Akim Demaille <akim@epita.fr>
1340
1341 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1342 Use it to test the GLR parser.
1343
1344 2002-11-12 Akim Demaille <akim@epita.fr>
1345
1346 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1347 defines it.
1348 * data/glr.c (yystos): New.
1349 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1350 (YYDSYMPRINT): New.
1351 (yyval): Don't define it, it is handled via M4.
1352 (yyrecoverParseError): Free verbosely the discarded symbols.
1353 * data/yacc.c (yysymprint): Remove, rather...
1354 (b4_yysymprint_generate): invoke.
1355 * data/c.m4 (b4_yysymprint_generate): New.
1356 Accept pointers as arguments, as opposed to the version from
1357 yacc.c.
1358 (b4_yydestruct_generate): Likewise.
1359 * tests/cations.at (Printers and Destructors): Use Bison directives
1360 instead of CPP macros.
1361 Don't rely on internal details.
1362
1363 2002-11-12 Akim Demaille <akim@epita.fr>
1364
1365 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1366 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1367 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1368 it against YYEMPTY and so forth), work on yytoken (i.e., set
1369 it to YYEMPTY etc.).
1370 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1371 (b4_symbol_actions): Remove.
1372 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1373 for 0, end-of-input.
1374
1375 2002-11-12 Akim Demaille <akim@epita.fr>
1376
1377 * doc/bison.texinfo (Destructor Decl): New.
1378
1379 2002-11-12 Akim Demaille <akim@epita.fr>
1380
1381 * src/tables.c (tables_generate): Use free for pointers that
1382 cannot be NULL, not XFREE.
1383 (pack_vector): Use assert, not fatal, for bound violations.
1384 * src/state.c (state_new): Likewise.
1385 * src/reader.c (reader): Likewise.
1386 * src/lalr.c (set_goto_map): Likewise.
1387 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1388 the file name.
1389
1390 2002-11-12 Akim Demaille <akim@epita.fr>
1391
1392 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1393 Restore.
1394 * src/scan-gram.l (last_string): Is global to the file, not to
1395 yylex.
1396 * src/parse-gram.y (input): Don't append the epilogue here,
1397 (epilogue.opt): do it here, and free the scanner's obstack.
1398 * src/reader.c (epilogue_set): Rename as...
1399 (epilogue_augment): this.
1400 * data/c.m4 (b4_epilogue): Defaults to empty.
1401
1402 2002-11-12 Akim Demaille <akim@epita.fr>
1403
1404 * src/getargs.c (long_options): Remove duplicates.
1405 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1406 Remove.
1407 * doc/bison.rnh: Remove.
1408 * doc/bison.texinfo (VMS Invocation): Remove.
1409
1410 2002-11-12 Akim Demaille <akim@epita.fr>
1411
1412 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1413 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1414
1415 Use struniq for symbols.
1416
1417 * src/symtab.h (symbol_t): The tag member is a struniq.
1418 (symbol_type_set): Adjust.
1419 * src/symtab.c (symbol_new): Takes a struniq.
1420 (symbol_free): Don't free the tag member.
1421 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1422 (hash_compare_symbol, hash_symbol): these.
1423 Use the fact that tags as struniqs.
1424 (symbol_get): Use struniq_new.
1425 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1426 Returns a strniq.
1427 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1428 and type members are struniqs.
1429 * src/reader.c (get_merge_function)
1430 (grammar_current_rule_merge_set): Adjust.
1431 (TYPE, current_type): Are struniq.
1432
1433 Use struniq for file names.
1434
1435 * src/files.h, src/files.c (infile): Split into...
1436 (grammar_file, current_file): these.
1437 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1438 * src/reduce.c (reduce_print): Likewise.
1439 * src/getargs.c (getargs): Likewise.
1440 * src/complain.h, src/complain.c: Likewise.
1441 * src/main.c (main): Call struniqs_new early enough to use it for
1442 file names.
1443 Don't free the input file name.
1444
1445 2002-11-12 Akim Demaille <akim@epita.fr>
1446
1447 * src/symtab.c (symbol_free): Remove dead deactivated code:
1448 type_name are properly removed.
1449 Don't use XFREE to free items that cannot be NULL.
1450 * src/struniq.h, src/struniq.c: New.
1451 * src/main.c (main): Initialize/free struniqs.
1452 * src/parse-gram.y (%union): Add astruniq member.
1453 (yyprint): Adjust.
1454 * src/scan-gram.l (<{tag}>): Return a struniq.
1455 Free the obstack bit that used to store it.
1456 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1457
1458 2002-11-11 Paul Eggert <eggert@twinsun.com>
1459
1460 Revamp to fix many (but not all) of the C- and M4-related quoting
1461 problems. Among other things, this fixes the Bison bug reported
1462 by Jan Hubicka when processing the Bash grammar; see:
1463 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1464
1465 Use new @ escapes consistently. Represent brackets with @{ and @}
1466 rather than @<:@ and @:>@, since this works a bit better with dumb
1467 editors like vi. Represent @ with @@, since @ is now consistently
1468 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1469 __ofile__, to avoid unexpected expansions. Similarly, use @output
1470 rather than #output.
1471
1472 * data/c.m4 (b4_copyright): Omit file name from comment, since
1473 the file name could contain "*/".
1474 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1475 be quoted. All uses changed.
1476
1477 * data/glr.c: Use new @ escapes consistently.
1478 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1479 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1480 Remove, since they couldn't handle arbitrary characters in file
1481 names.
1482 * data/lalr1.cc: Likewise.
1483 * data/yacc.c: Likewise.
1484
1485 * src/files.c (output_infix): Remove; all uses removed.
1486 * src/files.h: Likewise.
1487
1488 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1489 mishandled funny characters in file names, and anyway it isn't
1490 needed any more.
1491 * data/yacc.c: Likewise.
1492 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1493
1494 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1495 * data/yacc.c: Likewise.
1496
1497 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1498 strings now.
1499 (muscle_init): Quote filename as a C string.
1500 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1501 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1502 * src/output.c (escaped_file_name_output): New function.
1503 (prepare_symbols): Quote tokens for M4.
1504 (prepare): Don't insert output_infix, output_prefix,
1505 output_parser_name, output_header_name; this is now down by scan-skel.
1506 Insert skeleton as a C string.
1507
1508 * src/output.c (user_actions_output, symbol_destructors_output,
1509 symbol_printers_output): Quote filenames for C and M4.
1510 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1511
1512 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1513 escapes other than \\ and \'; this simplifies the code.
1514 (<SC_STRING>): Likewise, for \\ and \".
1515 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1516 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1517 Use new escapes @{ and @} for [ and ].
1518
1519 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1520 them with auto vars.
1521 Switch to new escape scheme, where @ is the escape character uniformly.
1522 Abort if a stray escape character is found. Avoid unbounded input
1523 buffer when parsing non-escaped text.
1524
1525 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1526 __oline__, #output, $@, and @{ do not have unintended meanings.
1527
1528 2002-11-09 Paul Eggert <eggert@twinsun.com>
1529
1530 Fix the test failure due to GCC warnings described in
1531 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1532 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1533 evaluate to 0 if it's impossible for NINF to be in the respective
1534 table.
1535 (yygetLRActions, yyrecoverParseError): Use them.
1536
1537 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1538 counted in the token inserted at end of file. Now takes
1539 location_t *, not location_t, so that the location can be
1540 adjusted. All uses changed.
1541
1542 * tests/regression.at (Invalid inputs): Adjust wording in
1543 diagnostic to match the new behavior.
1544
1545 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1546 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1547 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1548 abort ();'. This reduces the runtime of the "Many lookaheads"
1549 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1550 GCC 3.2.
1551
1552 2002-11-07 Paul Eggert <eggert@twinsun.com>
1553
1554 * src/parse-gram.y (CHARACTER): Remove unused token.
1555 All uses removed.
1556
1557 * src/scan-gram.l: Remove stack option. We no longer use the
1558 stack, since the stack was never deeper than 1; instead, use the
1559 new auto var c_context to record the stacked value.
1560
1561 Remove nounput option. At an unexpected end of file, we now unput
1562 the minimal input necessary to end cleanly; this simplifies the
1563 code.
1564
1565 Avoid unbounded token sizes where this is easy.
1566
1567 (unexpected_end_of_file): New function.
1568 Use it to systematize the error message on unexpected EOF.
1569 (last-string): Now auto, not static.
1570 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1571 (scanner_last_string_free): Remove; not used.
1572 (percent_percent_count): Move decl to just before use.
1573 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1574 not the (never otherwised-used) CHARACTER.
1575
1576 2002-11-07 Akim Demaille <akim@epita.fr>
1577
1578 Let yyerror always receive the msg as last argument, so that
1579 yyerror can be variadic.
1580
1581 * data/yacc.c (b4_yyerror_args): New.
1582 Use it when calling yyerror.
1583 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1584 Use it when calling yyerror.
1585 * doc/bison.texinfo (Error Reporting): Adjust.
1586 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1587 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1588
1589 2002-11-06 Akim Demaille <akim@epita.fr>
1590
1591 #line should have quoted strings.
1592 Ideally, this should be done by m4_quotearg.
1593
1594 * src/scan-skel.l: Include quotearg.h.
1595 Quote __ofile__.
1596 * src/output.c (symbol_printers_output)
1597 (symbol_destructors_output): Quote the file name.
1598
1599 2002-11-06 Akim Demaille <akim@epita.fr>
1600
1601 * tests/regression.at (Invalid inputs): Adjust to the recent
1602 messages.
1603
1604 2002-11-06 Akim Demaille <akim@epita.fr>
1605
1606 Restore --no-lines.
1607 Reported by Jim Kent.
1608
1609 * data/c.m4 (b4_syncline): New.
1610 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1611 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1612 * src/output.c (user_actions_output): Likewise.
1613 (prepare): Define 'b4_synclines_flag'.
1614 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1615
1616 2002-11-06 Akim Demaille <akim@epita.fr>
1617
1618 * src/main.c (main): Free `infile'.
1619 * src/scan-gram.l (handle_syncline): New.
1620 Recognize `#line'.
1621 * src/output.c (user_actions_output, symbol_destructors_output)
1622 (symbol_printers_output): Use the location's file name, not
1623 infile.
1624 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1625
1626 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1627
1628 * src/tables.c (matching_state): Don't allow states to match if
1629 either has GLR conflict entries.
1630
1631 2002-11-05 Paul Eggert <eggert@twinsun.com>
1632
1633 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1634 "integer out of range" rather than "invalid value".
1635 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1636 accordingly.
1637
1638 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1639 Also, remove one static variable in the scanner.
1640
1641 * src/scan-gram.l (braces_level): Now auto, not static.
1642 Initialize to zero if the compiler is being picky.
1643 (INITIAL): Clear braces_level instead of incrementing it.
1644 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1645 as POSIX 1003.1-2001 requires.
1646 * src/system.h (IF_LINT): New macro, taken from coreutils.
1647 * configure.ac: Define "lint" if --enable-gcc-warnings.
1648
1649 2002-11-05 Akim Demaille <akim@epita.fr>
1650
1651 * src/scan-gram.l: When it starts with `%', complain about the
1652 whole directive, not just that `invalid character: %'.
1653
1654 2002-11-04 Akim Demaille <akim@epita.fr>
1655
1656 * Makefile.maint: Update from Autoconf.
1657 (update, cvs-update, po-update, do-po-update): New.
1658
1659 2002-11-04 Akim Demaille <akim@epita.fr>
1660
1661 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1662 and yyerror.
1663 Have yyerror `use' its arguments.
1664 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1665 returns true when location & yacc & pure & parse-param.
1666 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1667
1668 2002-11-04 Akim Demaille <akim@epita.fr>
1669
1670 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1671 clashes.
1672 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1673 font-lock-mode.
1674 Use complain_at.
1675 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1676 slot 0.
1677
1678 2002-11-03 Paul Eggert <eggert@twinsun.com>
1679
1680 * src/reader.c (get_merge_function, grammar_current_rule_check):
1681 Use consistent diagnostics for reporting type name clashes.
1682 Quote the types with <>, for consistency with Yacc.
1683 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1684
1685 2002-11-03 Akim Demaille <akim@epita.fr>
1686
1687 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1688 New.
1689 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1690 (b4_parse_param): Remove.
1691 Use b4_identification.
1692 Propagate b4_pure_args where needed to pass them to yyerror.
1693 * data/glr.m4 (b4_parse_param): Remove.
1694 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1695 (b4_lpure_formals): New.
1696 Use b4_identification.
1697 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1698 b4_user_formals and b4_user_args.
1699 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1700 (yyreportAmbiguity): When using a pure parser, also need
1701 the location, and the parse-params.
1702 Adjust callers.
1703 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1704 When using a pure parser, also need the parse-params.
1705 Adjust callers.
1706 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1707 (%pure-parser + %parse-param) LALR and GLR parsers.
1708 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1709 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1710 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1711 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1712 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1713 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1714 * doc/bison.texinfo: Untabify the whole file.
1715 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1716 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1717 (Error Reporting): Adjust to these new directives.
1718 Document %error-verbose, deprecate YYERROR_VERBOSE.
1719
1720 2002-11-03 Akim Demaille <akim@epita.fr>
1721
1722 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1723 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1724 command line options.
1725 * tests/cxx-type.at: Formatting changes.
1726
1727 2002-11-03 Paul Eggert <eggert@twinsun.com>
1728
1729 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1730 to count columns correctly, and to check for invalid inputs.
1731
1732 Use mbsnwidth to count columns correctly. Account for tabs, too.
1733 Include mbswidth.h.
1734 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1735 (extend_location): New function.
1736 (YY_LINES): Remove.
1737
1738 Handle CRLF in C code rather than in Lex code.
1739 (YY_INPUT): New macro.
1740 (no_cr_read): New function.
1741
1742 Scan UCNs, even though we don't fully handle them yet.
1743 (convert_ucn_to_byte): New function.
1744
1745 Handle backslash-newline correctly in C code.
1746 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1747 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1748 all uses changed.
1749 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1750 Use {splice} wherever C allows backslash-newline.
1751 YY_STEP after space, newline, vertical-tab.
1752 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1753
1754 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1755
1756 ({int}, handle_action_dollar, handle_action_at): Check for integer
1757 overflow.
1758
1759 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1760
1761 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1762 as well as \000. Check for UCHAR_MAX, not 255.
1763 Allow \x with an arbitrary positive number of digits, as in C.
1764 Check for overflow here.
1765 Allow \? and UCNs, for compatibility with C.
1766
1767 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1768 with quote slot used by complain_at.
1769
1770 * tests/input.at: Add tests for backslash-newline, m4 quotes
1771 in symbols, long literals, and funny escapes in strings.
1772
1773 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1774 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1775 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1776 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1777 * m4/mbswidth.m4: New file, from GNU coreutils.
1778
1779 * doc/bison.texinfo (Grammar Outline): Document // comments.
1780 (Symbols): Document that trigraphs have no special meaning in Bison,
1781 nor is backslash-newline allowed.
1782 (Actions): Document that trigraphs have no special meaning.
1783
1784 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1785 no longer used.
1786
1787 2002-11-02 Paul Eggert <eggert@twinsun.com>
1788
1789 * src/reader.c: Don't include quote.h; not needed.
1790 (get_merge_function): Reword warning to be consistent with
1791 type clash diagnostic in grammar_current_rule_check.
1792
1793 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1794 bug in trigraph handling.
1795
1796 * src/output.c (prepare_symbols): When printing token names,
1797 escape "[" as "@<:@" and likewise for "]".
1798
1799 * src/system.h (errno): Remove declaration, as we are now
1800 assuming C89 or better, and C89 guarantees errno.
1801
1802 2002-10-30 Paul Eggert <eggert@twinsun.com>
1803
1804 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1805 Check for close failures.
1806 * src/files.h (xfclose): Return void, not int, since it always
1807 returned zero.
1808 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1809 indicates one.
1810 * src/output.c (output_skeleton): Use xfclose rather than fclose
1811 and ferror. xfclose now checks ferror.
1812
1813 * data/glr.c (YYLEFTMOST_STATE): Remove.
1814 (yyreportTree): Use a stack-based leftmost state. This avoids
1815 our continuing battles with bogus warnings about initializers.
1816
1817 2002-10-30 Akim Demaille <akim@epita.fr>
1818
1819 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1820 #if.
1821
1822 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1823
1824 * tests/glr-regr1.at: New test for reported regressions.
1825 * tests/testsuite.at: Add glr-regr1.at test.
1826 * tests/Makefile.am: Add glr-regr1.at test.
1827
1828 2002-10-24 Paul Eggert <eggert@twinsun.com>
1829
1830 Version 1.75a.
1831
1832 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1833 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1834 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1835 Don't assume strdup exists; POSIX says its an XSI extension.
1836 Check for buffer overflow on input.
1837
1838 2002-10-24 Akim Demaille <akim@epita.fr>
1839
1840 * src/output.c (output_skeleton): Don't disable M4sugar comments
1841 too soon: it results in comments being expanded.
1842 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1843 first output.
1844
1845 2002-10-24 Akim Demaille <akim@epita.fr>
1846
1847 * data/yacc.c (m4_int_type): New.
1848 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1849 char' as only yacc.c wants K&R portability.
1850 * data/glr.c (yysigned_char): Remove.
1851 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1852 Reported by Quoc Peyrot.
1853
1854 2002-10-23 Paul Eggert <eggert@twinsun.com>
1855
1856 * src/main.c (main): With --trace=time, report times even if a
1857 non-fatal error occurs. Formerly, the times were reported in some
1858 such cases but not in others.
1859 * src/reader.c (reader): Just return if a complaint has been issued,
1860 instead of exiting, so that 'main' can report times.
1861
1862 2002-10-22 Akim Demaille <akim@epita.fr>
1863
1864 * src/system.h: Include sys/types.
1865 Reported by Bert Deknuydt.
1866
1867 2002-10-23 Paul Eggert <eggert@twinsun.com>
1868
1869 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1870 Suggested by Art Haas.
1871
1872 2002-10-22 Paul Eggert <eggert@twinsun.com>
1873
1874 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1875 decl; not needed any more.
1876 * src/main.c (main): Use return to exit, undoing yesterday's change.
1877 The last OS that we could find where this wouldn't work is
1878 SunOS 3.5, and that's too old to worry about now.
1879
1880 * data/glr.c (struct yyltype): Define members even when not
1881 doing locations. This is more consistent with yacc.c, and it
1882 works around the following bug reports:
1883 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
1884 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
1885
1886 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1887 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1888 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1889
1890 2002-10-22 Akim Demaille <akim@epita.fr>
1891
1892 * data/README: New.
1893
1894 2002-10-21 Paul Eggert <eggert@twinsun.com>
1895
1896 Be consistent about 'bool'; the old code used an enum in one
1897 module and an int in another, and this violates the C standard.
1898 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1899 * configure.ac (AC_HEADER_STDBOOL): Add.
1900 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1901 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1902 * src/symtab.c (hash_compare_symbol_t): Likewise.
1903 * src/system.h (bool, false, true): Use a definition consistent
1904 with ../lib/hash.c. All uses changed.
1905
1906 * src/complain.c (warning_issued): Renamed from warn_message_count,
1907 so that we needn't worry about integer overflow (!).
1908 Now of type bool. All uses changed.
1909 (complaint_issued): Renamed from complain_message_count; likewise.
1910
1911 * src/main.c (main): Use exit to exit with failure.
1912
1913 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
1914 rather than 1 and 0.
1915 * src/main.c (main): Likewise.
1916 * src/getargs.c (getargs): Likewise.
1917 * src/reader.c (reader): Likewise.
1918
1919 * src/getarg.c (getargs): Remove duplicate code for
1920 "Try `bison --help'".
1921
1922 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
1923 What was that "2" for?
1924
1925 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
1926 * src/getargs.c (usage): Likewise.
1927
1928 * src/getargs.c (getargs): When there are too few operands, report
1929 the last one. When there are too many, report the first extra
1930 one. This is how diffutils does it.
1931
1932 2002-10-20 Paul Eggert <eggert@twinsun.com>
1933
1934 Remove K&R vestiges.
1935 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
1936 * src/complain.c (VA_START): Remove. Assume prototypes.
1937 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
1938 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
1939 fatal): Assume prototypes.
1940 * src/complain.h: Assume prototypes.
1941 * src/system.h (PARAMS): Remove.
1942 Include <limits.h> unconditionally, since it's guaranteeed even
1943 for a freestanding C89 compiler.
1944 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
1945 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
1946
1947 2002-10-20 Akim Demaille <akim@epita.fr>
1948
1949 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
1950 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
1951 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
1952 (yyresolveStates, yyresolveAction, yyresolveStack)
1953 (yyprocessOneStack): Use them.
1954 (yy_reduce_print): New.
1955 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
1956
1957 2002-10-20 Akim Demaille <akim@epita.fr>
1958
1959 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
1960 arguments and output `void'.
1961 (b4_c_function): Rename as...
1962 (b4_c_function_def): this.
1963 (b4_c_function_decl, b4_c_ansi_function_def)
1964 (b4_c_ansi_function_decl): New.
1965 Change the interpretation of the arguments: before `int, foo', now
1966 `int foo, foo'.
1967 * data/yacc.c (yyparse): Prototype and define thanks to these.
1968 Adjust b4_c_function_def uses.
1969 * data/glr.c (yyparse): Likewise, but ANSI only.
1970
1971 2002-10-20 Akim Demaille <akim@epita.fr>
1972
1973 * src/output.c (prepare): Move the definition of `tokens_number',
1974 `nterms_number', `undef_token_number', `user_token_number_max'
1975 to...
1976 (prepare_tokens): Here.
1977 (prepare_tokens): Rename as...
1978 (prepare_symbols): this.
1979 (prepare): Move the definition of `rules_number' to...
1980 (prepare_rules): here.
1981 (prepare): Move the definition of `last', `final_state_number',
1982 `states_number' to...
1983 (prepare_states): here.
1984 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
1985
1986 2002-10-20 Akim Demaille <akim@epita.fr>
1987
1988 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1989
1990 2002-10-20 Akim Demaille <akim@epita.fr>
1991
1992 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
1993 * data/c.m4: here.
1994
1995 2002-10-20 Akim Demaille <akim@epita.fr>
1996
1997 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
1998 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
1999 `pair'.
2000 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2001 `name' to...
2002 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2003 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2004 These.
2005
2006 2002-10-19 Paul Eggert <eggert@twinsun.com>
2007
2008 Do not create a temporary file, as that involves security and
2009 cleanup headaches. Instead, use a pair of pipes.
2010 Derived from a suggestion by Florian Krohm.
2011 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2012 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2013 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2014 (BISON_PREREQ_SUBPIPE): Add.
2015 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2016 Add subpipe.h, subpipe.c.
2017 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2018 * po/POTFILES.in: Add lib/subpipe.c.
2019 * src/output.c: Include "subpipe.h".
2020 (m4_invoke): Remove decl.
2021 (scan_skel): New decl.
2022 (output_skeleton): Use pipe rather than temporary file for m4 input.
2023 Check that m4sugar.m4 is readable, to avoid deadlock.
2024 Check for pipe I/O error.
2025 * src/scan-skel.l (readpipe): Remove decl.
2026 (scan_skel): New function, to be used in place of m4_invoke.
2027 Read from stream rather than file.
2028
2029 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2030 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2031 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2032 this generates a more-accurate value anyway.
2033
2034 * lib/timevar.c (timervar_accumulate): Rename locals to
2035 avoid confusion with similarly-named more-global.
2036 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2037
2038 * src/output.c (prepare): Use xstrdup to convert char const *
2039 to char *, to avoid GCC warning.
2040
2041 2002-10-19 Akim Demaille <akim@epita.fr>
2042
2043 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2044 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2045 Use them to have `calc.y' ready for %pure-parser.
2046 * data/yacc.c (YYLEX): Pass a yylex return type to
2047 b4_c_function_call.
2048
2049 2002-10-19 Akim Demaille <akim@epita.fr>
2050
2051 Prototype support of %lex-param and %parse-param.
2052
2053 * src/parse-gram.y: Add the definition of the %lex-param and
2054 %parse-param tokens, plus their rules.
2055 Drop the `_' version of %glr-parser.
2056 Add the "," token.
2057 * src/scan-gram.l (INITIAL): Scan them.
2058 * src/muscle_tab.c: Comment changes.
2059 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2060 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2061 (muscle_entry_s): The `value' member is no longer const.
2062 Adjust all dependencies.
2063 * src/muscle_tab.c (muscle_init): Adjust: use
2064 MUSCLE_INSERT_STRING.
2065 Initialize the obstack earlier.
2066 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2067 (muscle_pair_list_grow): New.
2068 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2069 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2070 * tests/calc.at: Use %locations, not --locations.
2071 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2072
2073 2002-10-19 Akim Demaille <akim@epita.fr>
2074
2075 * src/getargs.c (usage): Take status as argument and exit
2076 accordingly.
2077 Report the traditional `Try ... --help' message when status != 0.
2078 (usage, version): Don't take a FILE * as arg, it is pointless.
2079 (getargs): When there is an incorrect number of arguments, make it
2080 an error, and report it GNUlically thanks to `usage ()'.
2081
2082 2002-10-18 Paul Eggert <eggert@twinsun.com>
2083
2084 * data/glr.c (yyreportParseError): Don't assume that sprintf
2085 yields the length of the printed string, as this is not true
2086 on SunOS 4.1.4. Reported by Peter Klein.
2087
2088 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2089 * tests/conflicts.at (%nonassoc and eof): Likewise.
2090 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2091
2092 2002-10-17 Akim Demaille <akim@epita.fr>
2093
2094 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2095 * src/getargs.c (trace_types, trace_args): Adjust.
2096 * src/reader.c (grammar_current_rule_prec_set)
2097 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2098 Standardize error messages.
2099 And s/@prec/%prec/!
2100 (reader): Use trace_flag to enable scanner/parser debugging,
2101 instead of an adhoc scheme.
2102 * src/scan-gram.l: Remove trailing debugging code.
2103
2104 2002-10-16 Paul Eggert <eggert@twinsun.com>
2105
2106 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2107 MUSCLE_TAB_H.
2108
2109 * NEWS: Officially drop support for building Bison with K&R C,
2110 since it didn't work anyway and it's not worth worrying about.
2111 * Makefile.maint (wget_files): Remove ansi2knr.c.
2112 (ansi2knr.c-url_prefix): Remove.
2113 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2114 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2115 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2116
2117 2002-10-15 Paul Eggert <eggert@twinsun.com>
2118
2119 Stop using the "enum_" trick for K&R-style function definitions;
2120 it confused me, and I was the author! Instead, assume that people
2121 who want to use K&R C compilers (when using these modules in GCC,
2122 perhaps?) will run ansi2knr.
2123
2124 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2125 All uses of "enum_" changed to "enum ".
2126 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2127 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2128
2129 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2130 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2131 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2132 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2133 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2134 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2135 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2136 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2137 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2138 Use function prototypes; this removes the need for declaring
2139 static functions simply to provide their prototypes.
2140 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2141 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2142 bitset_count_, bitset_create, bitset_dump, bitset_first,
2143 bitset_free, bitset_init, bitset_last, bitset_next,
2144 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2145 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2146 bitset_print, bitset_release_memory, bitset_toggle_,
2147 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2148 debug_bitset): Likewise.
2149 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2150 * lib/bitset_stats.c (bitset_log_histogram_print,
2151 bitset_percent_histogram_print, bitset_stats_and,
2152 bitset_stats_and_cmp, bitset_stats_and_or,
2153 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2154 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2155 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2156 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2157 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2158 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2159 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2160 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2161 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2162 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2163 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2164 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2165 bitset_stats_zero): Likewise.
2166 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2167 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2168 bitsetv_dump, debug_bitsetv): Likewise.
2169 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2170 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2171 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2172 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2173 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2174 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2175 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2176 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2177 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2178 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2179 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2180 Likewise.
2181 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2182 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2183 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2184 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2185 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2186 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2187 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2188 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2189 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2190 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2191 lbitset_xor_cmp, lbitset_zero): Likewise.
2192
2193 2002-10-14 Akim Demaille <akim@epita.fr>
2194
2195 Version 1.75.
2196
2197 2002-10-14 Akim Demaille <akim@epita.fr>
2198
2199 * tests/Makefile.am (maintainer-check-posix): New.
2200
2201 2002-10-14 Akim Demaille <akim@epita.fr>
2202
2203 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2204 member.
2205
2206 2002-10-14 Akim Demaille <akim@epita.fr>
2207
2208 * src/tables.c (table_ninf_remap): base -> tab.
2209 Reported by Matt Rosing.
2210
2211 2002-10-14 Paul Eggert <eggert@twinsun.com>
2212
2213 * tests/action.at, tests/calc.at, tests/conflicts.at,
2214 tests/cxx-type.at, tests/headers.at, tests/input.at,
2215 tests/regression.at, tests/synclines.at, tests/torture.at:
2216 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2217 so that the tests still work even if POSIXLY_CORRECT is set.
2218 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2219
2220 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2221 for portability to K&R hosts. Fix typo: signed char is guaranteed
2222 only to 127, not to 128.
2223 * data/glr.c (yysigned_char): New type.
2224 * data/yacc.c (yysigned_char): Likewise.
2225 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2226
2227 2002-10-13 Paul Eggert <eggert@twinsun.com>
2228
2229 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2230 true due to limited range of data type" warning from GCC.
2231
2232 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2233 by wrapping enum yytokentype's definition inside #ifndef
2234 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2235
2236 2002-10-13 Akim Demaille <akim@epita.fr>
2237
2238 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2239 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2240
2241 2002-10-13 Akim Demaille <akim@epita.fr>
2242
2243 * Makefile.maint: Update from Autoconf 2.54.
2244 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2245
2246 2002-10-13 Akim Demaille <akim@epita.fr>
2247
2248 * src/print.c (print_state): Separate the list of solved conflicts
2249 from the other items.
2250 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2251
2252 2002-10-13 Akim Demaille <akim@epita.fr>
2253
2254 Let nondeterministic skeletons be usable with deterministic
2255 tables.
2256
2257 With the patch, GAWK compiled by GCC without -O2 passes its test
2258 suite using a GLR parser driven by LALR tables. It fails with -O2
2259 because `struct stat' gives two different answers on my machine:
2260 88 (definition of an auto var) and later 96 (memset on this var).
2261 Hence the stack is badly corrumpted. The headers inclusion is to
2262 blame: if I move the awk.h inclusion before GLR's system header
2263 inclusion, the two struct stat have the same size.
2264
2265 * src/tables.c (pack_table): Always create conflict_table.
2266 (token_actions): Always create conflict_list.
2267 * data/glr.c (YYFLAG): Remove, unused.
2268
2269 2002-10-13 Akim Demaille <akim@epita.fr>
2270
2271 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2272 (O0FLAGS): New.
2273 (VALGRIND, GXX): New.
2274 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2275 * tests/bison.in: Run $PREBISON a pre-command.
2276 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2277 (maintainer-check-g++): New.
2278 * Makefile.am (maintainer-check): New.
2279
2280 2002-10-13 Akim Demaille <akim@epita.fr>
2281
2282 * data/glr.c: Formatting changes.
2283 Tweak some trace messages to match yacc.c's.
2284
2285 2002-10-13 Akim Demaille <akim@epita.fr>
2286
2287 GLR parsers sometimes raise parse errors instead of performing the
2288 default reduction.
2289 Reported by Charles-Henry de Boysson.
2290
2291 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2292 check the length of the traces when %glr.
2293 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2294 GLR's traces.
2295 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2296 Test GLR parsers.
2297 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2298 (yyltype): Remove the yy prefix from the member names.
2299 (yytable): Complete its comment.
2300 (yygetLRActions): Map error action number from YYTABLE from
2301 YYTABLE_NINF to 0.
2302 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2303 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2304 not satisfying as we could compare an YYACTION computed from
2305 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2306 only value for error actions.
2307 (yyreportParseError): In verbose parse error messages, don't issue
2308 `error' in the list of expected tokens.
2309 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2310 next action to perform to match glr.c's decoding.
2311 (yytable): Complete its comment.
2312
2313 2002-10-13 Paul Eggert <eggert@twinsun.com>
2314
2315 Fix problem reported by Henrik Grubbstroem in
2316 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2317 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2318 because the Bison parser reads the second action before reducing
2319 the first one.
2320 * src/scan-gram.l (rule_length): New static var.
2321 Use it to keep track of the rule length in the scanner, since
2322 we can't expect the parser to be in lock-step sync with the scanner.
2323 (handle_action_dollar, handle_action_at): Use this var.
2324 * tests/actions.at (Exotic Dollars): Test for the problem.
2325
2326 2002-10-12 Paul Eggert <eggert@twinsun.com>
2327
2328 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2329 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2330 Include <sys/time.h> when checking for clock_t and struct tms.
2331 Use same include order as source.
2332 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2333 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2334
2335 * lib/timevar.c: Update copyright date and clarify comments.
2336 (get_time) [IN_GCC]: Keep the GCC version for reference.
2337
2338 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2339 GCC version as of today, then merge Bison's changes.
2340 Change "GCC" to "Bison" in copyright notice. timevar.def's
2341 author is Akim, so change that too.
2342
2343 * src/reader.c (grammar_current_rule_check):
2344 Don't worry about the default action if $$ is untyped.
2345 Prevents bogus warnings reported by Jim Gifford in
2346 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2347
2348 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2349 * data/glr.c, data/lalr1.cc, data/yacc.c:
2350 Output token definitions before the first part of user declarations.
2351 Fixes compatibility problem reported by Jim Gifford for kbd in
2352 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2353
2354 2002-10-11 Paul Eggert <eggert@twinsun.com>
2355
2356 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2357 (yyparse): here. This undoes some of the 2002-07-25 change.
2358 Compatibility problem reported by Ralf S. Engelschall with
2359 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2360
2361 2002-10-11 Akim Demaille <akim@epita.fr>
2362
2363 * tests/regression.at Characters Escapes): New.
2364 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2365 characters.
2366 Reported by Jan Nieuwenhuizen.
2367
2368 2002-10-11 Akim Demaille <akim@epita.fr>
2369
2370 * po/id.po: New.
2371
2372 2002-10-10 Paul Eggert <eggert@twinsun.com>
2373
2374 Portability fixes for bitsets; this also avoids several GCC
2375 warnings.
2376
2377 * lib/abitset.c: Include <stddef.h>, for offsetof.
2378 * lib/lbitset.c: Likewise.
2379
2380 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2381 properly for vectors of objects. Do not assume that adding a
2382 header size to a multiple of a word size yields a value that is
2383 properly aligned for the whole union.
2384 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2385
2386 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2387 unique names for structures.
2388 * lib/ebitset.c (ebitset_bytes): Likewise.
2389 * lib/lbitset.c (lbitset_bytes): Likewise.
2390
2391 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2392 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2393 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2394 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2395 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2396 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2397 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2398 to improve the type-checking that GCC can do.
2399 * lib/bitset.c (bitset_op4_cmp): Likewise.
2400 * lib/bitset_stats.c (bitset_stats_count,
2401 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2402 bitset_stats_copy, bitset_stats_disjoint_p,
2403 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2404 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2405 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2406 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2407 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2408 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2409 bitset_stats_or_and_cmp): Likewise.
2410 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2411 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2412 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2413 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2414
2415 * lib/abitset.h: Include bitset.h, not bbitset.h.
2416 * lib/ebitset.h: Likewise.
2417 * lib/lbitset.h: Likewise.
2418
2419 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2420 All instances of parameters of type enum bitset_opts are now of
2421 type enum_bitset_opts, to conform to the C Standard, and similarly
2422 for enum_bitset_type.
2423 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2424 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2425
2426 Do not use "struct bitset_struct" to mean different things in
2427 different modules. Not only is this confusing, it violates
2428 the C Standard, which requires that structure types in different
2429 modules must be compatible if one is to be passed to the other.
2430 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2431 All instances of "struct bitset_struct *" replaced with "bitset".
2432 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2433 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2434 struct lbitset_struct, struct bitset_stats_struct): New types.
2435 All uses of struct bitset_struct changed to union bitset_union,
2436 etc.
2437 * lib/abitset.c (struct abitset_struct, abitset,
2438 struct bitset_struct): Remove.
2439 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2440 struct bitset_struct): Remove.
2441 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2442 bitset_struct): Remove.
2443 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2444 Likewise.
2445
2446 Do not call a function of type T using a call that assumes the
2447 function is of a different type U. Standard C requires that a
2448 function must be called with a type that is compatible with its
2449 definition.
2450 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2451 New decls.
2452 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2453 New functions.
2454 * lib/ebitset.c (PFV): Remove.
2455 * lib/lbitset.c (PFV): Likewise.
2456 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2457 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2458 decls.
2459 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2460 (ebitset_vtable): Use them.
2461 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2462 lbitset_xor): New functions.
2463 (lbitset_vtable): Use them.
2464
2465 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2466 Declare.
2467
2468 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2469 GCC warning.
2470 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2471 Use offsetof, for simplicity.
2472
2473 2002-10-06 Paul Eggert <eggert@twinsun.com>
2474
2475 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2476 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2477 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2478 which was inadvertently undone by the 2002-09-30 patch.
2479 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2480 the same width as int.
2481
2482 2002-10-04 Paul Eggert <eggert@twinsun.com>
2483
2484 Version 1.50.
2485
2486 * configure.ac (AC_INIT), NEWS: Increment version number.
2487
2488 * doc/bison.texinfo: Minor spelling, grammar, and white space
2489 fixes.
2490 (Symbols): Mention that any negative value returned from yylex
2491 signifies end-of-input. Warn about negative chars. Mention
2492 the portable Standard C character set.
2493
2494 The GNU coding standard says CFLAGS and YFLAGS are reserved
2495 for the installer to set.
2496 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2497 * src/Makefile.am (AM_CFLAGS): Likewise.
2498 (AM_YFLAGS): Renamed from YFLAGS.
2499
2500 Fix some MAX and MIN problems.
2501 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2502 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2503 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2504 * src/reader.c (reader): Use it.
2505
2506 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2507 POSIX 1003.1-2001 has removed fgrep.
2508
2509 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2510
2511 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2512 interpreted as signed.
2513 * lib/ebitset.c (ebitset_list): Fix bug.
2514
2515 2002-10-01 Paul Eggert <eggert@twinsun.com>
2516
2517 More fixes for 64-bit hosts and large bitsets.
2518
2519 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2520 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2521 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2522 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2523 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2524 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2525 bitset_count_): Likewise.
2526 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2527 bitset_first, bitset_last): Likewise.
2528 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2529 bitset_stats_list_reverse, bitset_stats_size,
2530 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2531 Likewise.
2532 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2533 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2534 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2535 bitsetv_reflexive_transitive_closure): Likewise.
2536 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2537 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2538 Likewise.
2539 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2540 Likewise.
2541
2542 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2543 Use size_t, not unsigned int, to count bytes.
2544 * lib/abitset.h (abitset_bytes): Likewise.
2545 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2546 Likewise.
2547 * lib/bitset.h (bitset_bytes): Likewise.
2548 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2549 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2550 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2551 * lib/ebitset.c (ebitset_bytes): Likewise.
2552 * lib/ebitset.h (ebitset_bytes): Likewise.
2553 * lib/lbitset.c (lbitset_bytes): Likewise.
2554 * lib/lbitset.h (lbitset_bytes): Likewise.
2555
2556 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2557 abitset_subset_p, abitset_disjoint_p, abitset_and,
2558 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2559 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2560 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2561 abitset_or_and, abitset_or_and_cmp):
2562 Use bitset_windex instead of unsigned int.
2563 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2564 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2565 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2566 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2567 Likewise.
2568 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2569
2570 * lib/bitset.c (bitset_print):
2571 Use proper printf formats for widths of integer types.
2572 * lib/bitset_stats.c (bitset_percent_histogram_print,
2573 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2574 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2575 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2576 * lib/lbitset.c (lbitset_bytes): Likewise.
2577
2578 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2579 BITSET_SIZE_MAX): New macros.
2580 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2581 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2582 to BITSET_WINDEX_MAX.
2583
2584 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2585 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2586 since we now return the bitset_bindex type (not int).
2587
2588 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2589 when computing sizes.
2590 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2591
2592 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2593 and avoid cast to unsigned.
2594
2595 2002-09-30 Akim Demaille <akim@epita.fr>
2596
2597 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2598 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2599 Updates from Michael Hayes.
2600
2601 2002-09-30 Art Haas <ahaas@neosoft.com>
2602
2603 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2604 invocations.
2605 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2606 defined.
2607
2608 2002-09-27 Akim Demaille <akim@epita.fr>
2609
2610 Version 1.49c.
2611
2612 2002-09-27 Akim Demaille <akim@epita.fr>
2613
2614 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2615 (Because of AC_LIBSOURCE).
2616
2617 2002-09-27 Akim Demaille <akim@epita.fr>
2618
2619 Playing with Autoscan.
2620
2621 * configure.ac: Remove the old LIBOBJ tweaks.
2622 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2623 * lib/strrchr.c: New.
2624 * lib/strtol.c: New, from the Coreutils 4.5.1.
2625
2626 2002-09-27 Akim Demaille <akim@epita.fr>
2627
2628 Playing with Autoscan.
2629
2630 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2631 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2632 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2633 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2634 Coreutils 4.5.1.
2635
2636 2002-09-24 Akim Demaille <akim@epita.fr>
2637
2638 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2639 (Frequently Asked Questions, Parser Stack Overflow): New.
2640
2641 2002-09-13 Akim Demaille <akim@epita.fr>
2642
2643 Playing with autoscan.
2644
2645 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2646 * src/files.c (skeleton_find): Remove, unused.
2647 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2648 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2649
2650 2002-09-13 Akim Demaille <akim@epita.fr>
2651
2652 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2653 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2654
2655 2002-09-13 Akim Demaille <akim@epita.fr>
2656
2657 * configure.ac: Require 2.54.
2658 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2659 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2660 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2661 Remove, provided by Autoconf macros.
2662
2663 2002-09-12 Akim Demaille <akim@epita.fr>
2664
2665 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2666
2667 2002-09-12 Akim Demaille <akim@epita.fr>
2668
2669 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2670 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2671 Reported by Martin Mokrejs.
2672
2673 2002-09-10 Akim Demaille <akim@epita.fr>
2674
2675 * src/parse-gram.y: Associate a human readable string to each
2676 token type.
2677 * tests/regression.at (Invalid inputs): Adjust.
2678
2679 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2680
2681 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2682 with an Autoconf-2.5x style configure.ac.
2683
2684 2002-09-06 Paul Eggert <eggert@twinsun.com>
2685
2686 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2687 exception applies only to yacc.c. This is a modification of a
2688 patch originally suggested by Akim Demaille.
2689
2690 2002-09-06 Akim Demaille <akim@epita.fr>
2691
2692 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2693 here to...
2694 * data/yacc.c: here.
2695
2696 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2697 LocationType.
2698 (b4_ltype): Default to yy::Location from location.hh.
2699
2700 2002-09-04 Jim Meyering <jim@meyering.net>
2701
2702 * data/yacc.c: Guard the declaration of yytoknum also with
2703 `#ifdef YYPRINT', so it is declared only when used.
2704
2705 2002-09-04 Akim Demaille <akim@epita.fr>
2706
2707 * configure.in: Rename as...
2708 * configure.ac: this.
2709 Bump to 1.49c.
2710
2711 2002-09-04 Akim Demaille <akim@epita.fr>
2712
2713 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2714 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2715 translate maintainer only messages.
2716
2717 2002-08-12 Paul Eggert <eggert@twinsun.com>
2718
2719 Version 1.49b.
2720
2721 * Makefile.am (SUBDIRS): Remove intl.
2722 (DISTCLEANFILES): Remove.
2723 * NEWS: Mention that GNU M4 is now required. Clarify what is
2724 meant by "larger grammars". Mention the pt_BR translation.
2725 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2726 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2727 Bump version from 0.11.2 to 0.11.5.
2728 (BISON_PREREQ_STAGE): Remove.
2729 (AM_GNU_GETTEXT): Use external gettext.
2730 (AC_OUTPUT): Remove intl/Makefile.
2731
2732 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2733
2734 * data/glr.c: Include string.h, for strlen.
2735 (yyreportParseError): Use size_t for yysize.
2736 (yy_yypstack): No longer nested inside yypstates, as nested
2737 functions are not portable. Do not assume size_t is the
2738 same width as int.
2739 (yypstates): Do not assume that ptrdiff_t is the same width
2740 as int, and similarly for yyposn and YYINDEX.
2741
2742 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2743
2744 * lib/Makefile.am (INCLUDES): Do not include from the intl
2745 directory, which has been removed.
2746 * src/Makefile.am (INCLUDES): Likewise.
2747
2748 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2749 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2750 New vars.
2751
2752 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2753 * tests/Makefile.am (EXTRA_DIST): Likewise.
2754
2755 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2756 Do not assume that bitset_windex is the same width as unsigned.
2757
2758 * lib/abitset.c (abitset_unused_clear): Do not assume that
2759 bitset_word is the same width as int.
2760 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2761 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2762 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2763 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2764 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2765
2766 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2767 portability to one's complement hosts!).
2768 * lib/ebitset.c (ebitset_op1): Likewise.
2769 * lib/lbitset.c (lbitset_op1): Likewise.
2770
2771 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2772 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2773 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2774 Sync with fileutils.
2775 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2776 lib/gettext.h: Sync with diffutils.
2777
2778 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2779 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2780
2781 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2782 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2783 check for void *.
2784
2785 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2786 size_t; the old version tried to do this but casted improperly.
2787 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2788 (bitset_test): Now returns int, not unsigned long.
2789
2790 * lib/bitset_stats.c: Include "gettext.h".
2791 (_): New macro.
2792 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2793 name locals "index", as it generates unnecessary warnings on some
2794 hosts that have an "index" function.
2795
2796 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2797 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2798 they need translation.
2799 * src/LR0.c (state_list_append, new_itemsets, get_state,
2800 append_states, generate_states): Likewise.
2801 * src/assoc.c (assoc_to_string): Likewise.
2802 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2803 * src/gram.c (grammar_dump): Likewise.
2804 * src/injections.c (injections_compute): Likewise.
2805 * src/lalr.c (lookaheads_print): Likewise.
2806 * src/relation.c (relation_transpose): Likewise.
2807 * src/scan-gram.l: Likewise.
2808 * src/tables.c (table_grow, pack_vector): Likewise.
2809
2810 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2811 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2812 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2813 * m4/mbstate_t.m4: Sync with fileutils.
2814 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2815
2816 * po/LINGUAS: Add pt_BR.
2817 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2818 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2819 lib/timevar.c.
2820 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2821 manual recommends.
2822 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2823
2824 * src/complain.c (strerror_r): Remove decl; not needed.
2825 (strerror): Use same pattern as ../lib/error.c.
2826
2827 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2828
2829 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2830
2831 * src/main.c (main): Cast result of bindtextdomain and textdomain
2832 to void, to avoid a GCC warning when --disable-nls is in effect.
2833
2834 * src/scan-gram.l: Use strings rather than escapes when possible,
2835 to minimize the number of warnings from xgettext.
2836 (handle_action_dollar, handle_action_at): Don't use isdigit,
2837 as it mishandles negative chars and it may not work as expected
2838 outside the C locale.
2839
2840 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2841 this is a GCC extension and is not portable to other compilers.
2842
2843 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2844 Do not include <ctype.h>; no longer needed.
2845 Do not include <malloc.h>; no longer needed (and generates
2846 warnings on OpenBSD 3.0).
2847
2848 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2849 it's not portable.
2850
2851 * tests/regression.at: Do not use 'cc -c input.c -o input';
2852 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2853
2854 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2855 exit status as failure, not just exit status 1. Sun C exits
2856 with status 2 sometimes.
2857
2858 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2859 Use it for the two large tests.
2860
2861 2002-08-02 Akim Demaille <akim@epita.fr>
2862
2863 * src/conflicts.c (conflicts_output): Don't output rules never
2864 reduced here, since anyway that computation doesn't work.
2865 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2866 (rule_useless_p, rule_never_reduced_p): New.
2867 (grammar_rules_partial_print): Use a filter instead of a range.
2868 Display the title only if needed.
2869 (grammar_rules_print): Adjust.
2870 (grammar_rules_never_reduced_report): New.
2871 * src/tables.c (action_row): Move the computation of rules never
2872 reduced to...
2873 (token_actions): here.
2874 * src/main.c (main): Make the parser before making the report, so
2875 that rules never reduced are computed.
2876 Call grammar_rules_never_reduced_report.
2877 * src/print.c (print_results): Report rules never reduced.
2878 * tests/conflicts.at, tests/reduce.at: Adjust.
2879
2880 2002-08-01 Akim Demaille <akim@epita.fr>
2881
2882 Instead of attaching lookaheads and duplicating the rules being
2883 reduced by a state, attach the lookaheads to the reductions.
2884
2885 * src/state.h (state_t): Remove the `lookaheads',
2886 `lookaheads_rule' member.
2887 (reductions_t): Add a `lookaheads' member.
2888 Use a regular array for the `rules'.
2889 * src/state.c (reductions_new): Initialize the lookaheads member
2890 to 0.
2891 (state_rule_lookaheads_print): Adjust.
2892 * src/state.h, src/state.c (state_reductions_find): New.
2893 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2894 (count_rr_conflicts): Adjust.
2895 * src/lalr.c (LArule): Remove.
2896 (add_lookback_edge): Adjust.
2897 (state_lookaheads_count): New.
2898 (states_lookaheads_initialize): Merge into...
2899 (initialize_LA): this.
2900 (lalr_free): Adjust.
2901 * src/main.c (main): Don't free nullable and derives too early: it
2902 is used by --verbose.
2903 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2904
2905 2002-08-01 Akim Demaille <akim@epita.fr>
2906
2907 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
2908 `rule_number_t**'.
2909 (set_derives, free_derives): Rename as...
2910 (derives_compute, derives_free): this.
2911 Adjust all dependencies.
2912 * src/nullable.c (set_nullable, free_nullable): Rename as...
2913 (nullable_compute, nullable_free): these.
2914 (rule_list_t): Store rule_t *, not rule_number_t.
2915 * src/state.c (state_rule_lookaheads_print): Directly compare rule
2916 pointers, instead of their numbers.
2917 * src/main.c (main): Call nullable_free, and derives_free earlier,
2918 as they were lo longer used.
2919
2920 2002-08-01 Akim Demaille <akim@epita.fr>
2921
2922 * lib/timevar.c (get_time): Include children time.
2923 * src/lalr.h (LA, LArule): Don't export them: used with the
2924 state_t.
2925 * src/lalr.c (LA, LArule): Static.
2926 * src/lalr.h, src/lalr.c (lalr_free): New.
2927 * src/main.c (main): Call it.
2928 * src/tables.c (pack_vector): Check whether loc is >= to the
2929 table_size, not >.
2930 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
2931 (tables_generate): do it, since that's also it which allocates
2932 them.
2933 Don't free LA and LArule, main does.
2934
2935 2002-07-31 Akim Demaille <akim@epita.fr>
2936
2937 Separate parser tables computation and output.
2938
2939 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
2940 (conflict_list, conflict_list_cnt, table, check, table_ninf)
2941 (yydefgoto, yydefact, high): Move to...
2942 * src/tables.h, src/tables.c: here.
2943 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2944 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2945 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
2946 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
2947 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
2948 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
2949 (action_row, save_row, token_actions, save_column, default_goto)
2950 (goto_actions, sort_actions, matching_state, pack_vector)
2951 (table_ninf_remap, pack_table, prepare_actions): Move to...
2952 * src/tables.c: here.
2953 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
2954 * src/output.c (token_actions, output_base, output_conflicts)
2955 (output_check): Merge into...
2956 (prepare_actions): this.
2957 (actions_output): Rename as...
2958 (user_actions_output): this.
2959 * src/main.c (main): Call tables_generate and tables_free.
2960
2961 2002-07-31 Akim Demaille <akim@epita.fr>
2962
2963 Steal GCC's --time-report support.
2964
2965 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
2966 stolen/adjusted from GCC.
2967 * m4/stage.m4: Remove time related checks.
2968 * m4/timevar.m4: New.
2969 * configure.in: Adjust.
2970 * src/system.h: Adjust to using timevar.h.
2971 * src/getargs.h, src/getargs.c: Support trace_time for
2972 --trace=time.
2973 * src/main.c (stage): Remove.
2974 (main): Replace `stage' invocations with timevar calls.
2975 * src/output.c: Insert pertinent timevar calls.
2976
2977 2002-07-31 Akim Demaille <akim@epita.fr>
2978
2979 Let --trace have arguments.
2980
2981 * src/getargs.h (enum trace_e): New.
2982 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
2983 (long_options, short_options): --trace/-T takes an optional
2984 argument.
2985 Change all the uses of trace_flag to reflect the new flags.
2986 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
2987
2988 Strengthen `stage' portability.
2989
2990 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
2991 * configure.in: Use it.
2992 Don't check for malloc.h and sys/times.h.
2993 * src/system.h: Include them when appropriate.
2994 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
2995 times and struct tms are available.
2996
2997 2002-07-30 Akim Demaille <akim@epita.fr>
2998
2999 In verbose parse error message, don't report `error' as an
3000 expected token.
3001 * tests/actions.at (Printers and Destructors): Adjust.
3002 * tests/calc.at (Calculator $1): Adjust.
3003 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3004 error message, do not report the parser accepts the error token in
3005 that state.
3006
3007 2002-07-30 Akim Demaille <akim@epita.fr>
3008
3009 Normalize conflict related messages.
3010
3011 * src/complain.h, src/complain.c (warn, complain): New.
3012 * src/conflicts.c (conflicts_print): Use them.
3013 (conflict_report_yacc): New, extracted from...
3014 (conflicts_print): here.
3015 * tests/conflicts.at, tests/existing.at: Adjust.
3016
3017 2002-07-30 Akim Demaille <akim@epita.fr>
3018
3019 Report rules which are never reduced by the parser: those hidden
3020 by conflicts.
3021
3022 * src/LR0.c (save_reductions): Don't make the final state too
3023 different: save its reduction (accept) instead of having a state
3024 without any action (no shift or goto, no reduce).
3025 Note: the final state is now a ``regular'' state, i.e., the
3026 parsers now contain `reduce 0' as default reduction.
3027 Nevertheless, since they decide to `accept' when yystate =
3028 final_state, they still will not reduce rule 0.
3029 * src/print.c (print_actions, print_reduction): Adjust.
3030 * src/output.c (action_row): Track reduced rules.
3031 (token_actions): Report rules never reduced.
3032 * tests/conflicts.at, tests/regression.at: Adjust.
3033
3034 2002-07-30 Akim Demaille <akim@epita.fr>
3035
3036 `stage' was accidently included in a previous patch.
3037 Initiate its autoconfiscation.
3038
3039 * configure.in: Look for malloc.h and sys/times.h.
3040 * src/main.c (stage): Adjust.
3041 Report only when trace_flag.
3042
3043 2002-07-29 Akim Demaille <akim@epita.fr>
3044
3045 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3046 state_number_t.
3047 (errs_t): symbol_t*, not symbol_number_t.
3048 (reductions_t): rule_t*, not rule_number_t.
3049 (FOR_EACH_SHIFT): New.
3050 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3051 * src/print.c, src/print_graph.c: Adjust.
3052
3053 2002-07-29 Akim Demaille <akim@epita.fr>
3054
3055 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3056
3057 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3058 (endtoken, accept): these.
3059 * src/reader.c (reader): Set endtoken's default tag to "$end".
3060 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3061 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3062 Adjust.
3063
3064 2002-07-29 Akim Demaille <akim@epita.fr>
3065
3066 * src/reduce.c (reduce_grammar): When the language is empty,
3067 complain about the start symbol, not the axiom.
3068 Use its location.
3069 * tests/reduce.at (Empty Language): New.
3070
3071 2002-07-26 Akim Demaille <akim@epita.fr>
3072
3073 * src/reader.h, src/reader.c (gram_error): ... can't get
3074 yycontrol without making too strong assumptions on the parser
3075 itself.
3076 * src/output.c (prepare_tokens): Use the real 0th value of
3077 token_translations instead of `0'.
3078 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3079 visible here.
3080 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3081 for the time being: %locations ought to provide it to yyerror.
3082
3083 2002-07-25 Akim Demaille <akim@epita.fr>
3084
3085 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3086 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3087 * tests/regression.at (Web2c Actions): Adjust.
3088
3089 2002-07-25 Akim Demaille <akim@epita.fr>
3090
3091 Stop storing rules from 1 to nrules + 1.
3092
3093 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3094 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3095 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3096 Iterate from 0 to nrules.
3097 Use rule_number_as_item_number and item_number_as_rule_number.
3098 Adjust to `derive' now containing possibly 0.
3099 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3100 Handle the `- 1' part in rule numbers from/to item numbers.
3101 * src/conflicts.c (log_resolution): Fix the message which reversed
3102 shift and reduce.
3103 * src/output.c (action_row): Initialize default_rule to -1.
3104 (token_actions): Adjust.
3105 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3106 expected output.
3107 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3108
3109 2002-07-25 Akim Demaille <akim@epita.fr>
3110
3111 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3112 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3113 (b4_c_knr_arg_decl): New.
3114 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3115 yyreport_parse_error.
3116
3117 2002-07-25 Akim Demaille <akim@epita.fr>
3118
3119 * data/yacc.c (yyreport_parse_error): New, extracted from...
3120 (yyparse): here.
3121 (yydestruct, yysymprint): Move above yyparse.
3122 Be K&R compliant.
3123
3124 2002-07-25 Akim Demaille <akim@epita.fr>
3125
3126 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3127 replace...
3128 (b4_sint_type, b4_uint_type): these.
3129 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3130 * tests/regression.at (Web2c Actions): Adjust.
3131
3132 2002-07-25 Akim Demaille <akim@epita.fr>
3133
3134 * src/gram.h (TIEM_NUMBER_MAX): New.
3135 (item_number_of_rule_number, rule_number_of_item_number): Rename
3136 as...
3137 (rule_number_as_item_number, item_number_as_rule_number): these.
3138 Adjust dependencies.
3139 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3140 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3141 (symbol_number_to_vector_number): New.
3142 (order): Of vector_number_t* type.
3143 (base_t, BASE_MAX, BASE_MIN): New.
3144 (froms, tos, width, pos, check): Of base_t type.
3145 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3146 (actrow): Of action_number_t type.
3147 (conflrow): Of unsigned int type.
3148 (table_ninf, base_ninf): New.
3149 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3150 (muscle_insert_int_table, muscle_insert_base_table)
3151 (muscle_insert_rule_number_table): New.
3152 (prepare_tokens): Output `toknum' as int_table.
3153 (action_row): Returns a rule_number_t.
3154 Use ACTION_MIN, not SHRT_MIN.
3155 (token_actions): yydefact is rule_number_t*.
3156 (table_ninf_remap): New.
3157 (pack_table): Use it for `base' and `table'.
3158 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3159 replaced with...
3160 (YYPACT_NINF, YYTABLE_NINF): these.
3161 (yypact, yytable): Compute their types instead of hard-coded
3162 `short'.
3163 * tests/regression.at (Web2c Actions): Adjust.
3164
3165 2002-07-19 Akim Demaille <akim@epita.fr>
3166
3167 * src/scan-gram.l (id): Can start with an underscore.
3168
3169 2002-07-16 Akim Demaille <akim@epita.fr>
3170
3171 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3172 Adjust all former `associativity' dependencies.
3173 * src/symtab.c (symbol_new): Default associativity is `undef', not
3174 `right'.
3175 (symbol_check_alias_consistence): Adjust.
3176
3177 2002-07-09 Akim Demaille <akim@epita.fr>
3178
3179 * doc/bison.texinfo: Properly set the ``header'' part.
3180 Use @dircategory ``GNU programming tools'' as per Texinfo's
3181 documentation.
3182 Use @copying.
3183
3184 2002-07-09 Akim Demaille <akim@epita.fr>
3185
3186 * lib/quotearg.h: Protect against multiple inclusions.
3187 * src/location.h (location_t): Add a `file' member.
3188 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3189 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3190 `error_one_per_line' support.
3191
3192 2002-07-09 Akim Demaille <akim@epita.fr>
3193
3194 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3195 * src/reader.c (lineno): Remove.
3196 Adjust all dependencies.
3197 (get_merge_function): Take a location and use complain_at.
3198 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3199 * tests/regression.at (Invalid inputs, Mixing %token styles):
3200 Adjust.
3201
3202 2002-07-09 Akim Demaille <akim@epita.fr>
3203
3204 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3205 recovery rule, and forbid extensions when --yacc.
3206 (gram_error): Use complain_at.
3207 * src/reader.c (reader): Exit if there were parse errors.
3208
3209 2002-07-09 Akim Demaille <akim@epita.fr>
3210
3211 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3212 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3213 Reported by R Blake <blakers@mac.com>.
3214
3215 2002-07-09 Akim Demaille <akim@epita.fr>
3216
3217 * data/yacc.c: Output the copyright notive in the header.
3218
3219 2002-07-03 Akim Demaille <akim@epita.fr>
3220
3221 * src/output.c (froms, tos): Are state_number_t.
3222 (save_column): sp, sp1, and sp2 are state_number_t.
3223 (prepare): Rename `final' as `final_state_number', `nnts' as
3224 `nterms_number', `nrules' as `rules_number', `nstates' as
3225 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3226 unused.
3227 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3228 * data/lalr1.cc (nsym_): Remove, unused.
3229
3230 2002-07-03 Akim Demaille <akim@epita.fr>
3231
3232 * src/lalr.h, src/lalr.c (goto_number_t): New.
3233 * src/lalr.c (goto_list_t): New.
3234 Propagate them.
3235 * src/nullable.c (rule_list_t): New.
3236 Propagate.
3237 * src/types.h: Remove.
3238
3239 2002-07-03 Akim Demaille <akim@epita.fr>
3240
3241 * src/closure.c (print_fderives): Use rule_rhs_print.
3242 * src/derives.c (print_derives): Use rule_rhs_print.
3243 (rule_list_t): New, replaces `shorts'.
3244 (set_derives): Add comments.
3245 * tests/sets.at (Nullable, Firsts): Adjust.
3246
3247 2002-07-03 Akim Demaille <akim@epita.fr>
3248
3249 * src/output.c (prepare_actions): Free `tally' and `width'.
3250 (prepare_actions): Allocate and free `order'.
3251 * src/symtab.c (symbols_free): Free `symbols'.
3252 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3253 * src/output.c (m4_invoke): Move to...
3254 * src/scan-skel.l: here.
3255 (<<EOF>>): Close yyout, and free its name.
3256
3257 2002-07-03 Akim Demaille <akim@epita.fr>
3258
3259 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3260
3261 * src/LR0.c (new_state): Merge into...
3262 (state_list_append): this.
3263 (new_states): Merge into...
3264 (generate_states): here.
3265 (set_states): Don't ensure a proper `errs' state member here, do it...
3266 * src/conflicts.c (conflicts_solve): here.
3267 * src/state.h, src/state.c: Comment changes.
3268 (state_t): Rename member `shifts' as `transitions'.
3269 Adjust all dependencies.
3270 (errs_new): For consistency, also take the values as argument.
3271 (errs_dup): Remove.
3272 (state_errs_set): New.
3273 (state_reductions_set, state_transitions_set): Assert that no
3274 previous value was assigned.
3275 (state_free): New.
3276 (states_free): Use it.
3277 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3278 temporary storage: use `errs' and `nerrs' as elsewhere.
3279 (set_conflicts): Allocate and free this `errs'.
3280
3281 2002-07-02 Akim Demaille <akim@epita.fr>
3282
3283 * lib/libiberty.h: New.
3284 * lib: Update the bitset implementation from upstream.
3285 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3286 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3287 * src/main.c: Adjust bitset stats calls.
3288
3289 2002-07-01 Paul Eggert <eggert@twinsun.com>
3290
3291 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3292 char, so that negative chars don't collide with $.
3293
3294 2002-06-30 Akim Demaille <akim@epita.fr>
3295
3296 Have the GLR tests be `warning' checked, and fix the warnings.
3297
3298 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3299 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3300 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3301 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3302 (yyaddDeferredAction): static.
3303 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3304 (yyreportParseError): yyprefix is const.
3305 yytokenp is used only when verbose.
3306 (yy__GNUC__): Replace with __GNUC__.
3307 (yypdumpstack): yyi is size_t.
3308 (yypreference): Un-yy local variables and arguments, to avoid
3309 clashes with `yyr1'. Anyway, we are not in the user name space.
3310 (yytname_size): be an int, as is compared with ints.
3311 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3312 Use them.
3313 * tests/cxx-gram.at: Use quotation to protect $1.
3314 Use AT_COMPILE to enable warnings hunts.
3315 Prototype yylex and yyerror.
3316 `Use' argc.
3317 Include `string.h', not `strings.h'.
3318 Produce and prototype stmtMerge only when used.
3319 yylex takes a location.
3320
3321 2002-06-30 Akim Demaille <akim@epita.fr>
3322
3323 We spend a lot of time in quotearg, in particular when --verbose.
3324
3325 * src/symtab.c (symbol_get): Store a quoted version of the key.
3326 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3327 Adjust all callers.
3328
3329 2002-06-30 Akim Demaille <akim@epita.fr>
3330
3331 * src/state.h (reductions_t): Rename member `nreds' as num.
3332 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3333 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3334
3335 2002-06-30 Akim Demaille <akim@epita.fr>
3336
3337 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3338 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3339 (shifts_to): Rename as...
3340 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3341 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3342 (TRANSITION_IS_DISABLED, transitions_to): these.
3343
3344 2002-06-30 Akim Demaille <akim@epita.fr>
3345
3346 * src/print.c (print_shifts, print_gotos): Merge into...
3347 (print_transitions): this.
3348 (print_transitions, print_errs, print_reductions): Align the
3349 lookaheads columns.
3350 (print_core, print_transitions, print_errs, print_state,
3351 print_grammar): Output empty lines separator before, not after.
3352 (state_default_rule_compute): Rename as...
3353 (state_default_rule): this.
3354 * tests/conflicts.at (Defaulted Conflicted Reduction),
3355 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3356 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3357
3358 2002-06-30 Akim Demaille <akim@epita.fr>
3359
3360 Display items as we display rules.
3361
3362 * src/gram.h, src/gram.c (rule_lhs_print): New.
3363 * src/gram.c (grammar_rules_partial_print): Use it.
3364 * src/print.c (print_core): Likewise.
3365 * tests/conflicts.at (Defaulted Conflicted Reduction),
3366 (Unresolved SR Conflicts): Adjust.
3367 (Unresolved SR Conflicts): Adjust and rename as...
3368 (Resolved SR Conflicts): this, as was meant.
3369 * tests/regression.at (Web2c Report): Adjust.
3370
3371 2002-06-30 Akim Demaille <akim@epita.fr>
3372
3373 * src/print.c (state_default_rule_compute): New, extracted from...
3374 (print_reductions): here.
3375 Pessimize, but clarify the code.
3376 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3377
3378 2002-06-30 Akim Demaille <akim@epita.fr>
3379
3380 * src/output.c (action_row): Let default_rule be always a rule
3381 number.
3382
3383 2002-06-30 Akim Demaille <akim@epita.fr>
3384
3385 * src/closure.c (print_firsts, print_fderives, closure):
3386 Use BITSET_EXECUTE.
3387 * src/lalr.c (lookaheads_print): Likewise.
3388 * src/state.c (state_rule_lookaheads_print): Likewise.
3389 * src/print_graph.c (print_core): Likewise.
3390 * src/print.c (print_reductions): Likewise.
3391 * src/output.c (action_row): Likewise.
3392 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3393
3394 2002-06-30 Akim Demaille <akim@epita.fr>
3395
3396 * src/print_graph.c: Use report_flag.
3397
3398 2002-06-30 Akim Demaille <akim@epita.fr>
3399
3400 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3401 to...
3402 * src/relation.h, src/relation.c (traverse, relation_digraph)
3403 (relation_print, relation_transpose): New.
3404
3405 2002-06-30 Akim Demaille <akim@epita.fr>
3406
3407 * src/state.h, src/state.c (shifts_to): New.
3408 * src/lalr.c (build_relations): Use it.
3409
3410 2002-06-30 Akim Demaille <akim@epita.fr>
3411
3412 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3413 (item_number_of_rule_number, rule_number_of_item_number): New.
3414 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3415 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3416 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3417 Propagate their use.
3418 Much remains to be done, in particular wrt `shorts' from types.h.
3419
3420 2002-06-30 Akim Demaille <akim@epita.fr>
3421
3422 * src/symtab.c (symbol_new): Initialize the `printer' member.
3423
3424 2002-06-30 Akim Demaille <akim@epita.fr>
3425
3426 * src/LR0.c (save_reductions): Remove, replaced by...
3427 * src/state.h, src/state.c (state_reductions_set): New.
3428 (reductions, errs): Rename as...
3429 (reductions_t, errs_t): these.
3430 Adjust all dependencies.
3431
3432 2002-06-30 Akim Demaille <akim@epita.fr>
3433
3434 * src/LR0.c (state_list_t, state_list_append): New.
3435 (first_state, last_state): Now symbol_list_t.
3436 (this_state): Remove.
3437 (new_itemsets, append_states, save_reductions): Take a state_t as
3438 argument.
3439 (set_states, generate_states): Adjust.
3440 (save_shifts): Remove, replaced by...
3441 * src/state.h, src/state.c (state_shifts_set): New.
3442 (shifts): Rename as...
3443 (shifts_t): this.
3444 Adjust all dependencies.
3445 * src/state.h (state_t): Remove the `next' member.
3446
3447 2002-06-30 Akim Demaille <akim@epita.fr>
3448
3449 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3450 escaped in slot 0.
3451
3452 2002-06-30 Akim Demaille <akim@epita.fr>
3453
3454 Use hash.h for the state hash table.
3455
3456 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3457 (allocate_storage): Use state_hash_new.
3458 (free_storage): Use state_hash_free.
3459 (new_state, get_state): Adjust.
3460 * src/lalr.h, src/lalr.c (states): Move to...
3461 * src/states.h (state_t): Remove the `link' member, no longer
3462 used.
3463 * src/states.h, src/states.c: here.
3464 (state_hash_new, state_hash_free, state_hash_lookup)
3465 (state_hash_insert, states_free): New.
3466 * src/states.c (state_table, state_compare, state_hash): New.
3467 * src/output.c (output_actions): Do not free states now, since we
3468 still need to know the final_state number in `prepare', called
3469 afterwards. Do it...
3470 * src/main.c (main): here: call states_free after `output'.
3471
3472 2002-06-30 Akim Demaille <akim@epita.fr>
3473
3474 * src/state.h, src/state.c (state_new): New, extracted from...
3475 * src/LR0.c (new_state): here.
3476 * src/state.h (STATE_ALLOC): Move to...
3477 * src/state.c: here.
3478 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3479 * src/state.h, src/state.c: here.
3480
3481 2002-06-30 Akim Demaille <akim@epita.fr>
3482
3483 * src/reader.c (gensym): Rename as...
3484 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3485 (getsym): Rename as...
3486 (symbol_get): this.
3487
3488 2002-06-30 Akim Demaille <akim@epita.fr>
3489
3490 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3491 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3492 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3493 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3494
3495 2002-06-30 Akim Demaille <akim@epita.fr>
3496
3497 Make the test suite pass with warnings checked.
3498
3499 * tests/actions.at (Printers and Destructors): Improve.
3500 Avoid unsigned vs. signed issues.
3501 * tests/calc.at: Don't exercise the scanner here, do it...
3502 * tests/input.at (Torturing the Scanner): here.
3503
3504 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3505
3506 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3507 reorganize first lines parallel to yacc.c.
3508
3509 2002-06-28 Akim Demaille <akim@epita.fr>
3510
3511 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3512 (b4_token_enum, b4_token_defines): New, factored from...
3513 * data/lalr1.cc, data/yacc.c, glr.c: here.
3514
3515 2002-06-28 Akim Demaille <akim@epita.fr>
3516
3517 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3518 unused variables.
3519 * src/output.c (merger_output): static.
3520
3521 2002-06-28 Akim Demaille <akim@epita.fr>
3522
3523 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3524 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3525 pacify GCC.
3526 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3527
3528 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3529
3530 Accumulated changelog for new GLR parsing features.
3531
3532 * src/conflicts.c (count_total_conflicts): Change name to
3533 conflicts_total_count.
3534 * src/conflicts.h: Ditto.
3535 * src/output.c (token_actions): Use the new name.
3536 (output_conflicts): Change conflp => conflict_list_heads, and
3537 confl => conflict_list for better readability.
3538 * data/glr.c: Use the new names.
3539 * NEWS: Add self to GLR announcement.
3540
3541 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3542
3543 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3544 Akim Demaille.
3545
3546 * data/bison.glr: Change name to glr.c
3547 * data/glr.c: Renamed from bison.glr.
3548 * data/Makefile.am: Add glr.c
3549
3550 * src/getargs.c:
3551
3552 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3553 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3554
3555 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3556
3557 * data/bison.glr: Be sure to restore the
3558 current #line when returning to the skeleton contents after having
3559 exposed the input file's #line.
3560
3561 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3562
3563 * data/bison.glr: Bring up to date with changes to bison.simple.
3564
3565 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3566
3567 * data/bison.glr: Correct definitions that use b4_prefix.
3568 Various reformatting.
3569 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3570 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3571 yytokenp argument; now part of stack.
3572 (yychar): Define to behave as documented.
3573 (yyclearin): Ditto.
3574
3575 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3576
3577 * src/reader.h: Add declaration for free_merger_functions.
3578
3579 * src/reader.c (merge_functions): New variable.
3580 (get_merge_function): New function.
3581 (free_merger_functions): New function.
3582 (readgram): Check for %prec that is not followed by a symbol.
3583 Handle %dprec and %merge declarations.
3584 (packgram): Initialize dprec and merger fields in rules array.
3585
3586 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3587 conflict_list_cnt, conflict_list_free): New variables.
3588 (table_grow): Also grow conflict_table.
3589 (prepare_rules): Output dprec and merger tables.
3590 (conflict_row): New function.
3591 (action_row): Output conflict lists for GLR parser. Don't use
3592 default reduction in conflicted states for GLR parser so that there
3593 are spaces for the conflict lists.
3594 (save_row): Also save conflict information.
3595 (token_actions): Allocate conflict list.
3596 (merger_output): New function.
3597 (pack_vector): Pack conflict table, too.
3598 (output_conflicts): New function to output yyconflp and yyconfl.
3599 (output_check): Allocate conflict_tos.
3600 (output_actions): Output conflict tables, also.
3601 (output_skeleton): Output b4_mergers definition.
3602 (prepare): Output b4_max_rhs_length definition.
3603 Use 'bison.glr' as default skeleton for GLR parsers.
3604
3605 * src/gram.c (glr_parser): New flag.
3606 (grammar_free): Call free_merger_functions.
3607
3608 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3609 all pairs of conflicting reductions, rather than just all tokens
3610 causing conflicts. Needed to size conflict tables.
3611 (conflicts_output): Modify call to count_rr_conflicts for new
3612 interface.
3613 (conflicts_print): Ditto.
3614 (count_total_conflicts): New function.
3615
3616 * src/reader.h (merger_list): New type.
3617 (merge_functions): New variable.
3618
3619 * src/lex.h (tok_dprec, tok_merge): New token types.
3620
3621 * src/gram.h (rule_s): Add dprec and merger fields.
3622 (glr_parser): New flag.
3623
3624 * src/conflicts.h (count_total_conflicts): New function.
3625
3626 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3627
3628 * doc/bison.texinfo (Generalized LR Parsing): New section.
3629 (GLR Parsers): New section.
3630 (Language and Grammar): Mention GLR parsing.
3631 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3632 Correct typo ("tge" -> "the").
3633
3634 * data/bison.glr: New skeleton for GLR parsing.
3635
3636 * tests/cxx-gram.at: New tests for GLR parsing.
3637
3638 * tests/testsuite.at: Include cxx-gram.at.
3639
3640 * tests/Makefile.am: Add cxx-gram.at.
3641
3642 * src/parse-gram.y:
3643
3644 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3645
3646 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3647
3648 2002-06-27 Akim Demaille <akim@epita.fr>
3649
3650 * src/options.h, src/options.c: Remove.
3651 * src/getargs.c (short_options, long_options): New.
3652
3653 2002-06-27 Akim Demaille <akim@epita.fr>
3654
3655 * data/bison.simple, data/bison.c++: Rename as...
3656 * data/yacc.c, data/lalr1.cc: these.
3657 * doc/bison.texinfo (Environment Variables): Remove.
3658
3659 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3660
3661 * src/getargs.c (report_argmatch): Initialize strtok().
3662
3663 2002-06-20 Akim Demaille <akim@epita.fr>
3664
3665 * data/bison.simple (b4_symbol_actions): New, replaces...
3666 (b4_symbol_destructor, b4_symbol_printer): these.
3667 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3668 user token numbers.
3669
3670 2002-06-20 Akim Demaille <akim@epita.fr>
3671
3672 * data/bison.simple (yydestructor): Rename as...
3673 (yydestruct): this.
3674
3675 2002-06-20 Akim Demaille <akim@epita.fr>
3676
3677 * src/symtab.h, src/symtab.c (symbol_type_set)
3678 (symbol_destructor_set, symbol_precedence_set): The location is
3679 the last argument.
3680 Adjust all callers.
3681
3682 2002-06-20 Akim Demaille <akim@epita.fr>
3683
3684 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3685 internals.
3686 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3687 Takes a location.
3688 * src/symtab.h, src/symtab.c (symbol_class_set)
3689 (symbol_user_token_number_set): Likewise.
3690 Adjust all callers.
3691 Promote complain_at.
3692 * tests/input.at (Type Clashes): Adjust.
3693
3694 2002-06-20 Akim Demaille <akim@epita.fr>
3695
3696 * data/bison.simple (YYLEX): Fix the declaration when
3697 %pure-parser.
3698
3699 2002-06-20 Akim Demaille <akim@epita.fr>
3700
3701 * data/bison.simple (yysymprint): Don't print the token number,
3702 just its name.
3703 * tests/actions.at (Destructors): Rename as...
3704 (Printers and Destructors): this.
3705 Also exercise %printer.
3706
3707 2002-06-20 Akim Demaille <akim@epita.fr>
3708
3709 * data/bison.simple (YYDSYMPRINT): New.
3710 Use it to remove many of the #if YYDEBUG/if (yydebug).
3711
3712 2002-06-20 Akim Demaille <akim@epita.fr>
3713
3714 * src/symtab.h, src/symtab.c (symbol_t): printer and
3715 printer_location are new members.
3716 (symbol_printer_set): New.
3717 * src/parse-gram.y (PERCENT_PRINTER): New token.
3718 Handle its associated rule.
3719 * src/scan-gram.l: Adjust.
3720 (handle_destructor_at, handle_destructor_dollar): Rename as...
3721 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3722 * src/output.c (symbol_printers_output): New.
3723 (output_skeleton): Call it.
3724 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3725 since there are already many grammar files with a user `yyprint'.
3726 Replace the calls to YYPRINT to calls to yysymprint.
3727 * tests/calc.at: Adjust.
3728 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3729 taking advantage of parser very internal details (stack size!).
3730
3731 2002-06-20 Akim Demaille <akim@epita.fr>
3732
3733 * src/scan-gram.l: Complete the scanner with the missing patterns
3734 to pacify Flex.
3735 Use `quote' and `symbol_tag_get' where appropriate.
3736
3737 2002-06-19 Akim Demaille <akim@epita.fr>
3738
3739 * tests/actions.at (Destructors): Augment to test locations.
3740 * data/bison.simple (yydestructor): Pass it the current location
3741 if locations are enabled.
3742 Prototype only when __STDC__ or C++.
3743 Change the argument names to move into the yy name space: there is
3744 user code here.
3745
3746 2002-06-19 Akim Demaille <akim@epita.fr>
3747
3748 * data/bison.simple (b4_pure_if): New.
3749 Use it instead of #ifdef YYPURE.
3750
3751 2002-06-19 Akim Demaille <akim@epita.fr>
3752
3753 * data/bison.simple (b4_location_if): New.
3754 Use it instead of #ifdef YYLSP_NEEDED.
3755
3756 2002-06-19 Akim Demaille <akim@epita.fr>
3757
3758 Prepare @$ in %destructor, but currently don't bind it in the
3759 skeleton, as %location use is not cleaned up yet.
3760
3761 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3762 (handle_action_at): New.
3763 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3764 a braced_code_t and a location as additional arguments.
3765 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3766 unquote one when outputting `b4_dollar_dollar'.
3767 Adjust callers.
3768 * data/bison.simple (b4_eval): Remove.
3769 (b4_symbol_destructor): Adjust.
3770 * tests/input.at (Invalid @n): Adjust.
3771
3772 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3773
3774 * doc/bison.texinfo: Document ability to have multiple
3775 prologue sections.
3776
3777 2002-06-18 Akim Demaille <akim@epita.fr>
3778
3779 * src/files.c (compute_base_names): When computing the output file
3780 names from the input file name, strip the directory part.
3781
3782 2002-06-18 Akim Demaille <akim@epita.fr>
3783
3784 * data/bison.simple.new: Comment changes.
3785 Reported by Andreas Schwab.
3786
3787 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3788
3789 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3790 there are no `label `yyoverflowlab' defined but not used' warnings
3791 when yyoverflow is defined.
3792
3793 2002-06-18 Akim Demaille <akim@epita.fr>
3794
3795 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3796 new member.
3797 (symbol_destructor_set): Adjust.
3798 * src/output.c (symbol_destructors_output): Output the destructor
3799 locations.
3800 Output the symbol name.
3801 * data/bison.simple (b4_symbol_destructor): Adjust.
3802
3803 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3804 and Akim Demaille <akim@epita.fr>
3805
3806 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3807 what's left on the stack when the error recovery hits EOF.
3808 * tests/actions.at (Destructors): Complete to exercise this case.
3809
3810 2002-06-17 Akim Demaille <akim@epita.fr>
3811
3812 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3813 arguments is really empty, not only equal to `[]'.
3814 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3815 member.
3816 (symbol_destructor_set): New.
3817 * src/output.c (symbol_destructors_output): New.
3818 * src/reader.h (brace_code_t, current_braced_code): New.
3819 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3820 (handle_dollar): Rename as...
3821 (handle_action_dollar): this.
3822 (handle_destructor_dollar): New.
3823 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3824 (grammar_declaration): Use it.
3825 * data/bison.simple (yystos): Is always defined.
3826 (yydestructor): New.
3827 * tests/actions.at (Destructors): New.
3828 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3829
3830 2002-06-17 Akim Demaille <akim@epita.fr>
3831
3832 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3833 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3834 rule_length only when needed.
3835 * src/output.c (actions_output, token_definitions_output): Output
3836 the full M4 block.
3837 * src/symtab.c: Don't access directly to the symbol tag, use
3838 symbol_tag_get.
3839 * src/parse-gram.y: Use symbol_list_free.
3840
3841 2002-06-17 Akim Demaille <akim@epita.fr>
3842
3843 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3844 (symbol_list_prepend, get_type_name): Move to...
3845 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3846 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3847 Adjust all callers.
3848 (symbol_list_free): New.
3849 * src/scan-gram.l (handle_dollar): Takes a location.
3850 * tests/input.at (Invalid $n): Adjust.
3851
3852 2002-06-17 Akim Demaille <akim@epita.fr>
3853
3854 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3855 (symbol_list_prepend): New.
3856 * src/parse-gram.y (%union): `list' is a new member.
3857 (symbols.1): New, replaces...
3858 (terms_to_prec.1, nterms_to_type.1): these.
3859 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3860 Take a location as additional argument.
3861 Adjust all callers.
3862
3863 2002-06-15 Akim Demaille <akim@epita.fr>
3864
3865 * src/parse-gram.y: Move %token in the declaration section so that
3866 we don't depend upon CVS Bison.
3867
3868 2002-06-15 Akim Demaille <akim@epita.fr>
3869
3870 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3871 * src/print.c (print_core): Use it.
3872
3873 2002-06-15 Akim Demaille <akim@epita.fr>
3874
3875 * src/conflicts.c (log_resolution): Accept the rule involved in
3876 the sr conflicts instead of the lookahead number that points to
3877 that rule.
3878 (flush_reduce): Accept the current lookahead vector as argument,
3879 instead of the index in LA.
3880 (resolve_sr_conflict): Accept the current number of lookahead
3881 bitset to consider for the STATE, instead of the index in LA.
3882 (set_conflicts): Adjust.
3883 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3884
3885 2002-06-15 Akim Demaille <akim@epita.fr>
3886
3887 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3888 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3889 Adjust all dependencies.
3890 * src/lalr.c (initialize_lookaheads): Split into...
3891 (states_lookaheads_count, states_lookaheads_initialize): these.
3892 (lalr): Adjust.
3893
3894 2002-06-15 Akim Demaille <akim@epita.fr>
3895
3896 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3897 out of...
3898 (grammar_rules_print): here.
3899 * src/reduce.c (reduce_output): Use it.
3900 * tests/reduce.at (Useless Rules, Reduced Automaton)
3901 (Underivable Rules): Adjust.
3902
3903 2002-06-15 Akim Demaille <akim@epita.fr>
3904
3905 Copy BYacc's nice way to report the grammar.
3906
3907 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
3908 New.
3909 Don't print the rules' location, it is confusing and useless.
3910 (rule_print): Use grammar_rhs_print.
3911 * src/print.c (print_grammar): Use grammar_rules_print.
3912
3913 2002-06-15 Akim Demaille <akim@epita.fr>
3914
3915 Complete and rationalize `useless thing' warnings.
3916
3917 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
3918 (symbol_tag_print): New.
3919 Use them everywhere in place of accessing directly the tag member.
3920 * src/gram.h, src/gram.c (rule_print): New.
3921 Use it where a rule used to be printed `by hand'.
3922 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
3923 (reduce_grammar_tables): Report the useless rules.
3924 (reduce_print): Useless things are a warning, not an error.
3925 Report it as such.
3926 * tests/reduce.at (Useless Nonterminals, Useless Rules):
3927 (Reduced Automaton, Underivable Rules): Adjust.
3928 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
3929 * tests/conflicts.at (Unresolved SR Conflicts)
3930 (Solved SR Conflicts): Adjust.
3931
3932 2002-06-15 Akim Demaille <akim@epita.fr>
3933
3934 Let symbols have a location.
3935
3936 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
3937 (getsym): Adjust.
3938 Adjust all callers.
3939 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
3940 Use location_t, not int.
3941 * src/symtab.c (symbol_check_defined): Take advantage of the
3942 location.
3943 * tests/regression.at (Invalid inputs): Adjust.
3944
3945 2002-06-15 Akim Demaille <akim@epita.fr>
3946
3947 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
3948 (input): Don't try to initialize yylloc here, do it in the
3949 scanner.
3950 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
3951 * src/gram.h (rule_t): Change line and action_line into location
3952 and action_location, of location_t type.
3953 Adjust all dependencies.
3954 * src/location.h, src/location.c (empty_location): New.
3955 * src/reader.h, src/reader.c (grammar_start_symbol_set)
3956 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
3957 (grammar_current_rule_symbol_append)
3958 (grammar_current_rule_action_append): Expect a location as argument.
3959 * src/reader.c (grammar_midrule_action): Adjust to attach an
3960 action's location as dummy symbol location.
3961 * src/symtab.h, src/symtab.c (startsymbol_location): New.
3962 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
3963 the line numbers.
3964
3965 2002-06-14 Akim Demaille <akim@epita.fr>
3966
3967 Grammar declarations may be found in the grammar section.
3968
3969 * src/parse-gram.y (rules_or_grammar_declaration): New.
3970 (declarations): Each declaration may end with a semicolon, not
3971 just...
3972 (grammar_declaration): `"%union"'.
3973 (grammar): Branch to rules_or_grammar_declaration.
3974
3975 2002-06-14 Akim Demaille <akim@epita.fr>
3976
3977 * src/main.c (main): Invoke scanner_free.
3978
3979 2002-06-14 Akim Demaille <akim@epita.fr>
3980
3981 * src/output.c (m4_invoke): Extracted from...
3982 (output_skeleton): here.
3983 Free tempfile.
3984
3985 2002-06-14 Akim Demaille <akim@epita.fr>
3986
3987 * src/parse-gram.y (directives, directive, gram)
3988 (grammar_directives, precedence_directives, precedence_directive):
3989 Rename as...
3990 (declarations, declaration, grammar, grammar_declaration)
3991 (precedence_declaration, precedence_declarator): these.
3992 (symbol_declaration): New.
3993
3994 2002-06-14 Akim Demaille <akim@epita.fr>
3995
3996 * src/files.c (action_obstack): Remove, unused.
3997 (output_obstack): Remove it, and all its dependencies, as it is no
3998 longer needed.
3999 * src/reader.c (epilogue_set): Build the epilogue in the
4000 muscle_obstack.
4001 * src/output.h, src/output.c (muscle_obstack): Move to...
4002 * src/muscle_tab.h, src/muscle_tab.h: here.
4003 (muscle_init): Initialize muscle_obstack.
4004 (muscle_free): New.
4005 * src/main.c (main): Call it.
4006
4007 2002-06-14 Akim Demaille <akim@epita.fr>
4008
4009 * src/location.h: New, extracted from...
4010 * src/reader.h: here.
4011 * src/Makefile.am (noinst_HEADERS): Merge into
4012 (bison_SOURCES): this.
4013 Add location.h.
4014 * src/parse-gram.y: Use location_t instead of Bison's.
4015 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4016 Use location_t instead of ints.
4017
4018 2002-06-14 Akim Demaille <akim@epita.fr>
4019
4020 * data/bison.simple, data/bison.c++: Be sure to restore the
4021 current #line when returning to the skeleton contents after having
4022 exposed the input file's #line.
4023
4024 2002-06-12 Akim Demaille <akim@epita.fr>
4025
4026 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4027 eager.
4028 * tests/actions.at (Exotic Dollars): New.
4029
4030 2002-06-12 Akim Demaille <akim@epita.fr>
4031
4032 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4033 ['"/] too eagerly.
4034 * tests/input.at (Torturing the Scanner): New.
4035
4036 2002-06-11 Akim Demaille <akim@epita.fr>
4037
4038 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4039 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4040 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4041 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4042 * src/reader.c (reader): Use it.
4043
4044 2002-06-11 Akim Demaille <akim@epita.fr>
4045
4046 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4047 Adjust all callers.
4048 (scanner_last_string_free): New.
4049
4050 2002-06-11 Akim Demaille <akim@epita.fr>
4051
4052 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4053 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4054 (last_string, YY_OBS_FREE): New.
4055 Use them when returning an ID.
4056
4057 2002-06-11 Akim Demaille <akim@epita.fr>
4058
4059 Have Bison grammars parsed by a Bison grammar.
4060
4061 * src/reader.c, src/reader.h (prologue_augment): New.
4062 * src/reader.c (copy_definition): Remove.
4063
4064 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4065 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4066 (grammar_current_rule_prec_set, grammar_current_rule_check)
4067 (grammar_current_rule_symbol_append)
4068 (grammar_current_rule_action_append): Export.
4069 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4070 (symbol_list_action_append): Remove.
4071 Hook the routines from reader.
4072 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4073 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4074
4075 * src/reader.c (read_declarations): Remove, unused.
4076
4077 * src/parse-gram.y: Handle the epilogue.
4078 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4079 (grammar_start_symbol_set): this.
4080 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4081 * src/reader.c (readgram): Remove, unused.
4082 (reader): Adjust to insert eoftoken and axiom where appropriate.
4083
4084 * src/reader.c (copy_dollar): Replace with...
4085 * src/scan-gram.h (handle_dollar): this.
4086 * src/parse-gram.y: Remove `%thong'.
4087
4088 * src/reader.c (copy_at): Replace with...
4089 * src/scan-gram.h (handle_at): this.
4090
4091 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4092 New.
4093
4094 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4095 time being.
4096
4097 * src/reader.h, src/reader.c (grammar_rule_end): New.
4098
4099 * src/parse.y (current_type, current_class): New.
4100 Implement `%nterm', `%token' support.
4101 Merge `%term' into `%token'.
4102 (string_as_id): New.
4103 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4104 type name.
4105
4106 * src/parse-gram.y: Be sure to handle properly the beginning of
4107 rules.
4108
4109 * src/parse-gram.y: Handle %type.
4110 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4111
4112 * src/parse-gram.y: More directives support.
4113 * src/options.c: No longer handle source directives.
4114
4115 * src/parse-gram.y: Fix %output.
4116
4117 * src/parse-gram.y: Handle %union.
4118 Use the prologue locations.
4119 * src/reader.c (parse_union_decl): Remove.
4120
4121 * src/reader.h, src/reader.c (epilogue_set): New.
4122 * src/parse-gram.y: Use it.
4123
4124 * data/bison.simple, data/bison.c++: b4_stype is now either not
4125 defined, then default to int, or to the contents of %union,
4126 without `union' itself.
4127 Adjust.
4128 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4129
4130 * src/output.c (actions_output): Don't output braces, as they are
4131 already handled by the scanner.
4132
4133 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4134 characters to themselves.
4135
4136 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4137 that the epilogue has a proper #line.
4138
4139 * src/parse-gram.y: Handle precedence/associativity.
4140
4141 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4142 a terminal.
4143 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4144 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4145 at all to define terminals that cannot be emitted.
4146
4147 * src/scan-gram.l: Escape M4 characters.
4148
4149 * src/scan-gram.l: Working properly with escapes in user
4150 strings/characters.
4151
4152 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4153 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4154 grammar.
4155 Use more modest sizes, as for the time being the parser does not
4156 release memory, and therefore the process swallows a huge amount
4157 of memory.
4158
4159 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4160 stricter %token grammar.
4161
4162 * src/symtab.h (associativity): Add `undef_assoc'.
4163 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4164 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4165
4166 * tests/regression.at (Invalid %directive): Remove, as it is now
4167 meaningless.
4168 (Invalid inputs): Adjust to the new error messages.
4169 (Token definitions): The new grammar doesn't allow too many
4170 eccentricities.
4171
4172 * src/lex.h, src/lex.c: Remove.
4173 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4174 (copy_character, copy_string2, copy_string, copy_identifier)
4175 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4176 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4177 (parse_action): Remove.
4178 * po/POTFILES.in: Adjust.
4179
4180 2002-06-11 Akim Demaille <akim@epita.fr>
4181
4182 * src/reader.c (parse_action): Don't store directly into the
4183 rule's action member: return the action as a string.
4184 Don't require `rule_length' as an argument: compute it.
4185 (grammar_current_rule_symbol_append)
4186 (grammar_current_rule_action_append): New, eved out from
4187 (readgram): here.
4188 Remove `action_flag', `rulelength', unused now.
4189
4190 2002-06-11 Akim Demaille <akim@epita.fr>
4191
4192 * src/reader.c (grammar_current_rule_prec_set).
4193 (grammar_current_rule_check): New, eved out from...
4194 (readgram): here.
4195 Remove `xaction', `first_rhs': useless.
4196 * tests/input.at (Type clashes): New.
4197 * tests/existing.at (GNU Cim Grammar): Adjust.
4198
4199 2002-06-11 Akim Demaille <akim@epita.fr>
4200
4201 * src/reader.c (grammar_midrule_action): New, Eved out from
4202 (readgram): here.
4203
4204 2002-06-11 Akim Demaille <akim@epita.fr>
4205
4206 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4207 New.
4208 (readgram): Use them as replacement of inlined code, crule and
4209 crule1.
4210
4211 2002-06-11 Akim Demaille <akim@epita.fr>
4212
4213 * src/reader.c (grammar_end, grammar_symbol_append): New.
4214 (readgram): Use them.
4215 Make the use of `p' as local as possible.
4216
4217 2002-06-10 Akim Demaille <akim@epita.fr>
4218
4219 GCJ's parser requires the tokens to be defined before the prologue.
4220
4221 * data/bison.simple: Output the token definition before the user's
4222 prologue.
4223 * tests/regression.at (Braces parsing, Duplicate string)
4224 (Mixing %token styles): Check the output from bison.
4225 (Early token definitions): New.
4226
4227 2002-06-10 Akim Demaille <akim@epita.fr>
4228
4229 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4230 assigning twice the same user number to a token, so that we can
4231 use it in...
4232 * src/lex.c (lex): here.
4233 Also use `symbol_class_set' instead of hand written code.
4234 * src/reader.c (parse_assoc_decl): Likewise.
4235
4236 2002-06-10 Akim Demaille <akim@epita.fr>
4237
4238 * src/symtab.c, src/symtab.c (symbol_class_set)
4239 (symbol_user_token_number_set): New.
4240 * src/reader.c (parse_token_decl): Use them.
4241 Use a switch instead of ifs.
4242 Use a single argument.
4243
4244 2002-06-10 Akim Demaille <akim@epita.fr>
4245
4246 Remove `%thong' support as it is undocumented, unused, duplicates
4247 `%token's job, and creates useless e-mail traffic with people who
4248 want to know what it is, why it is undocumented, unused, and
4249 duplicates `%token's job.
4250
4251 * src/reader.c (parse_thong_decl): Remove.
4252 * src/options.c (option_table): Remove "thong".
4253 * src/lex.h (tok_thong): Remove.
4254
4255 2002-06-10 Akim Demaille <akim@epita.fr>
4256
4257 * src/symtab.c, src/symtab.c (symbol_type_set)
4258 (symbol_precedence_set): New.
4259 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4260 (value_components_used): Remove, unused.
4261
4262 2002-06-09 Akim Demaille <akim@epita.fr>
4263
4264 Move symbols handling code out of the reader.
4265
4266 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4267 (axiom): Move to...
4268 * src/symtab.h, src/symtab.c: here.
4269
4270 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4271 * src/reader.c (startval): Rename as...
4272 * src/symtab.h, src/symtab.c (startsymbol): this.
4273 * src/reader.c: Adjust.
4274
4275 * src/reader.c (symbol_check_defined, symbol_make_alias)
4276 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4277 (token_translations_init)
4278 Move to...
4279 * src/symtab.c: here.
4280 * src/reader.c (packsymbols): Move to...
4281 * src/symtab.h, src/symtab.c (symbols_pack): here.
4282 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4283 argument.
4284
4285 2002-06-03 Akim Demaille <akim@epita.fr>
4286
4287 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4288 then statements.
4289
4290 2002-06-03 Akim Demaille <akim@epita.fr>
4291
4292 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4293 structs with non literals.
4294 * src/scan-skel.l: never-interactive.
4295 * src/conflicts.c (enum conflict_resolution_e): No trailing
4296 comma.
4297 * src/getargs.c (usage): Split long literal strings.
4298 Reported by Hans Aberg.
4299
4300 2002-05-28 Akim Demaille <akim@epita.fr>
4301
4302 * data/bison.c++: Use C++ ostreams.
4303 (cdebug_): New member.
4304
4305 2002-05-28 Akim Demaille <akim@epita.fr>
4306
4307 * src/output.c (output_skeleton): Be sure to allocate enough room
4308 for `/' _and_ for `\0' in full_skeleton.
4309
4310 2002-05-28 Akim Demaille <akim@epita.fr>
4311
4312 * data/bison.c++: Catch up with bison.simple:
4313 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4314 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4315 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4316 and popping traces.
4317
4318 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4319
4320 * src/output.c (output_skeleton): Put an explicit path in front of
4321 the skeleton file name, rather than relying on the -I directory,
4322 to partially alleviate effects of having a skeleton file lying around
4323 in the current directory.
4324
4325 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4326
4327 * src/conflicts.c (log_resolution): Correct typo:
4328 obstack_printf should be obstack_fgrow1.
4329
4330 2002-05-26 Akim Demaille <akim@epita.fr>
4331
4332 * src/state.h (state_t): `solved_conflicts' is a new member.
4333 * src/LR0.c (new_state): Set it to 0.
4334 * src/conflicts.h, src/conflicts.c (print_conflicts)
4335 (free_conflicts, solve_conflicts): Rename as...
4336 (conflicts_print, conflicts_free, conflicts_solve): these.
4337 Adjust callers.
4338 * src/conflicts.c (enum conflict_resolution_e)
4339 (solved_conflicts_obstack): New, used by...
4340 (log_resolution): this.
4341 Adjust to attach the conflict resolution to each state.
4342 Complete the description with the precedence/associativity
4343 information.
4344 (resolve_sr_conflict): Adjust.
4345 * src/print.c (print_state): Output its solved_conflicts.
4346 * tests/conflicts.at (Unresolved SR Conflicts)
4347 (Solved SR Conflicts): Exercise --report=all.
4348
4349 2002-05-26 Akim Demaille <akim@epita.fr>
4350
4351 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4352 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4353 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4354 (token_number_t, item_number_as_token_number)
4355 (token_number_as_item_number, muscle_insert_token_number_table):
4356 Rename as...
4357 (symbol_number_t, item_number_as_symbol_number)
4358 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4359 these, since it is more appropriate.
4360
4361 2002-05-26 Akim Demaille <akim@epita.fr>
4362
4363 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4364 `Error:' lines.
4365 * data/bison.simple (yystos) [YYDEBUG]: New.
4366 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4367 error recovery.
4368 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4369
4370 2002-05-25 Akim Demaille <akim@epita.fr>
4371
4372 * doc/bison.texinfo (Debugging): Split into...
4373 (Tracing): this new section, its former contents, and...
4374 (Understanding): this new section.
4375 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4376 by...
4377 (report_flag): this.
4378 Adjust all dependencies.
4379 (report_args, report_types, report_argmatch): New.
4380 (usage, getargs): Report/support -r, --report.
4381 * src/options.h
4382 (struct option_table_struct): Rename as..,
4383 (struct option_table_s): this.
4384 Rename the `set_flag' member to `flag' to match with getopt_long's
4385 struct.
4386 * src/options.c (option_table): Split verbose into an entry for
4387 %verbose, and another for --verbose.
4388 Support --report/-r, so remove -r from the obsolete --raw.
4389 * src/print.c: Attach full item sets and lookaheads reports to
4390 report_flag instead of trace_flag.
4391 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4392
4393 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4394 and Paul Eggert <eggert@twinsun.com>
4395
4396 * data/bison.simple (yyparse): Correct error handling to conform to
4397 POSIX and yacc. Specifically, after syntax error is discovered,
4398 do not reduce further before shifting the error token.
4399 Clean up the code a bit by removing the labels yyerrdefault,
4400 yyerrhandle, yyerrpop.
4401 * NEWS: Document the above.
4402
4403 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4404
4405 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4406 type; it isn't always big enough, since it doesn't necessarily
4407 include non-terminals.
4408 (yytranslate): Expand definition of yy_token_number_type, so that
4409 the latter can be removed.
4410 (yy_token_number_type): Remove, only one use.
4411 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4412 don't use TokenNumberType as element type.
4413
4414 * tests/regression.at: Modify expected output to agree with change
4415 to yyr1 and yytranslate.
4416
4417 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4418
4419 * src/reader.c (parse_action): Use copy_character instead of
4420 obstack_1grow.
4421
4422 2002-05-13 Akim Demaille <akim@epita.fr>
4423
4424 * tests/regression.at (Token definitions): Prototype yylex and
4425 yyerror.
4426
4427 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4428
4429 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4430 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4431 32-bit arithmetic.
4432 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4433
4434 2002-05-07 Akim Demaille <akim@epita.fr>
4435
4436 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4437 avoid GCC warnings.
4438
4439 2002-05-07 Akim Demaille <akim@epita.fr>
4440
4441 Kill GCC warnings.
4442
4443 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4444 over the RHS of each rule.
4445 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4446 * src/state.h (state_t): Member `nitems' is unsigned short.
4447 * src/LR0.c (get_state): Adjust.
4448 * src/reader.c (packgram): Likewise.
4449 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4450 `Type'.
4451 (muscle_insert_int_table): Remove, unused.
4452 (prepare_rules): Remove `max'.
4453
4454 2002-05-06 Akim Demaille <akim@epita.fr>
4455
4456 * src/closure.c (print_firsts): Display of the symbol tags.
4457 (bitmatrix_print): Move to...
4458 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4459 here.
4460 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4461
4462 2002-05-06 Akim Demaille <akim@epita.fr>
4463
4464 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4465 hash_do_for_each.
4466
4467 2002-05-06 Akim Demaille <akim@epita.fr>
4468
4469 * src/LR0.c (new_state, get_state): Instead of using the global
4470 `kernel_size' and `kernel_base', have two new arguments:
4471 `core_size' and `core'.
4472 Adjust callers.
4473
4474 2002-05-06 Akim Demaille <akim@epita.fr>
4475
4476 * src/reader.c (packgram): No longer end `ritem' with a 0
4477 sentinel: it is not used.
4478
4479 2002-05-05 Akim Demaille <akim@epita.fr>
4480
4481 New experimental feature: display the lookaheads in the report and
4482 graph.
4483
4484 * src/print (print_core): When --trace-flag, display the rules
4485 lookaheads.
4486 * src/print_graph.c (print_core): Likewise.
4487 Swap the arguments.
4488 Adjust caller.
4489
4490 2002-05-05 Akim Demaille <akim@epita.fr>
4491
4492 * tests/torture.at (Many lookaheads): New test.
4493
4494 2002-05-05 Akim Demaille <akim@epita.fr>
4495
4496 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4497 (GENERATE_MUSCLE_INSERT_TABLE): this.
4498 (output_int_table, output_unsigned_int_table, output_short_table)
4499 (output_token_number_table, output_item_number_table): Replace with...
4500 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4501 (muscle_insert_short_table, muscle_insert_token_number_table)
4502 (muscle_insert_item_number_table): these.
4503 Adjust all callers.
4504 (prepare_tokens): Don't free `translations', since...
4505 * src/reader.h, src/reader.c (grammar_free): do it.
4506 Move to...
4507 * src/gram.h, src/gram.c (grammar_free): here.
4508 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4509 b4_translate_max.
4510
4511 2002-05-05 Akim Demaille <akim@epita.fr>
4512
4513 * src/output.c (output_unsigned_int_table): New.
4514 (prepare_rules): `i' is unsigned.
4515 `prhs', `rline', `r2' are unsigned int.
4516 Rename muscle `rhs_number_max' as `rhs_max'.
4517 Output muscles `prhs_max', `rline_max', and `r2_max'.
4518 Free rline and r1.
4519 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4520 to compute types instead of constant types.
4521 * tests/regression.at (Web2c Actions): Adjust.
4522
4523 2002-05-04 Akim Demaille <akim@epita.fr>
4524
4525 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4526 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4527 Adjust dependencies.
4528 * src/output.c (token_definitions_output): Be sure not to output a
4529 `#define 'a'' when fed with `%token 'a' "a"'.
4530 * tests/regression.at (Token definitions): New.
4531
4532 2002-05-03 Paul Eggert <eggert@twinsun.com>
4533
4534 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4535 for K&R C.
4536
4537 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4538
4539 * Makefile.am (SUBDIRS): Remove intl.
4540 (EXTRA_DIST): Add config/config.rpath.
4541
4542 2002-05-03 Akim Demaille <akim@epita.fr>
4543
4544 * data/bison.simple (m4_if): Don't output empty enums.
4545 And actually, output valid enum definitions :(.
4546
4547 2002-05-03 Akim Demaille <akim@epita.fr>
4548
4549 * configure.bat: Remove, completely obsolete.
4550 * Makefile.am (EXTRA_DIST): Adjust.
4551 Don't distribute config.rpath...
4552 * config/Makefile.am (EXTRA_DIST): Do it.
4553
4554 2002-05-03 Akim Demaille <akim@epita.fr>
4555
4556 * configure.in (GETTEXT_VERSION): New.
4557 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4558
4559 2002-05-03 Akim Demaille <akim@epita.fr>
4560
4561 * data/bison.simple (b4_token_enum): New.
4562 (b4_token_defines): Use it to output tokens both as #define and
4563 enums.
4564 Suggested by Paul Eggert.
4565 * src/output.c (token_definitions_output): Don't output spurious
4566 white spaces.
4567
4568 2002-05-03 Akim Demaille <akim@epita.fr>
4569
4570 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4571
4572 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4573
4574 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4575 Update the stack class, give a try to deque as the default container.
4576
4577 2002-05-02 Akim Demaille <akim@epita.fr>
4578
4579 * data/bison.simple (yyparse): Do not implement @$ = @1.
4580 (YYLLOC_DEFAULT): Adjust to do it.
4581 * doc/bison.texinfo (Location Default Action): Fix.
4582
4583 2002-05-02 Akim Demaille <akim@epita.fr>
4584
4585 * src/reader.c (parse_braces): Merge into...
4586 (parse_action): this.
4587
4588 2002-05-02 Akim Demaille <akim@epita.fr>
4589
4590 * configure.in (ALL_LINGUAS): Remove.
4591 * po/LINGUAS, hr.po: New.
4592
4593 2002-05-02 Akim Demaille <akim@epita.fr>
4594
4595 Remove the so called hairy (semantic) parsers.
4596
4597 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4598 * src/gram.h, src/gram.c (semantic_parser): Remove.
4599 (rule_t): Remove the guard and guard_line members.
4600 * src/lex.h (token_t): remove tok_guard.
4601 * src/options.c (option_table): Remove %guard and %semantic_parser
4602 support.
4603 * src/output.c, src/output.h (guards_output): Remove.
4604 (prepare): Adjust.
4605 (token_definitions_output): Don't output the `T'
4606 tokens (???).
4607 (output_skeleton): Don't output the guards.
4608 * src/files.c, src/files.c (attrsfile): Remove.
4609 * src/reader.c (symbol_list): Remove the guard and guard_line
4610 members.
4611 Adjust dependencies.
4612 (parse_guard): Remove.
4613 * data/bison.hairy: Remove.
4614 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4615 BISON_HAIRY.
4616
4617 2002-05-02 Akim Demaille <akim@epita.fr>
4618
4619 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4620 (parse_guard): Rename the formal argument `stack_offset' as
4621 `rule_length', which is more readable.
4622 Adjust callers.
4623 (copy_at, copy_dollar): Instead of outputting the hard coded
4624 values of $$, $n and so forth, output invocation to b4_lhs_value,
4625 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4626 Note: this patch partially drops `semantic-parser' support: it
4627 always does `rule_length - n', where semantic parsers ought to
4628 always use `-n'.
4629 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4630 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4631
4632 2002-05-02 Akim Demaille <akim@epita.fr>
4633
4634 * configure.in (AC_INIT): Bump to 1.49b.
4635 (AM_INIT_AUTOMAKE): Short invocation.
4636
4637 2002-05-02 Akim Demaille <akim@epita.fr>
4638
4639 Version 1.49a.
4640
4641 2002-05-01 Akim Demaille <akim@epita.fr>
4642
4643 * src/skeleton.h: Remove.
4644
4645 2002-05-01 Akim Demaille <akim@epita.fr>
4646
4647 * src/skeleton.h: Fix the #endif.
4648 Reported by Magnus Fromreide.
4649
4650 2002-04-26 Paul Eggert <eggert@twinsun.com>
4651
4652 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4653 Define if we define YYSTYPE and YYLTYPE, respectively.
4654 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4655
4656 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4657
4658 * src/scan-skel.l: Postprocess quadrigraphs.
4659
4660 * src/reader.c (copy_character): New function, used to output
4661 single characters while replacing `[' and `]' with quadrigraphs, to
4662 avoid troubles with M4 quotes.
4663 (copy_comment): Output characters with copy_character.
4664 (read_additionnal_code): Likewise.
4665 (copy_string2): Likewise.
4666 (copy_definition): Likewise.
4667
4668 * tests/calc.at: Exercise M4 quoting.
4669
4670 2002-04-25 Akim Demaille <akim@epita.fr>
4671
4672 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4673 between `!' and the command.
4674 Reported by Paul Eggert.
4675
4676 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4677
4678 * tests/calc.at: Exercise prologue splitting.
4679
4680 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4681 `b4_post_prologue' instead of `b4_prologue'.
4682
4683 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4684 muscles.
4685 (output): Free pre_prologue_obstack and post_prologue_obstack.
4686 * src/files.h, src/files.c (attrs_obstack): Remove.
4687 (pre_prologue_obstack, post_prologue_obstack): New.
4688 * src/reader.c (copy_definition): Add a parameter to specify the
4689 obstack to fill, instead of using attrs_obstack unconditionally.
4690 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4691 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4692
4693 2002-04-23 Paul Eggert <eggert@twinsun.com>
4694
4695 * data/bison.simple: Remove unnecessary commentary and white
4696 space differences from 1_29-branch.
4697 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4698
4699 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4700 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4701 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4702 constructors or destructors.
4703
4704 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4705
4706 2002-04-23 Akim Demaille <akim@epita.fr>
4707
4708 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4709 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4710 location with columns.
4711 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4712 All reported by Paul Eggert.
4713
4714 2002-04-22 Akim Demaille <akim@epita.fr>
4715
4716 * src/reduce.c (dump_grammar): Move to...
4717 * src/gram.h, src/gram.c (grammar_dump): here.
4718 Be sure to separate long item numbers.
4719 Don't read the members of a rule's prec if its nil.
4720
4721 2002-04-22 Akim Demaille <akim@epita.fr>
4722
4723 * src/output.c (table_size, table_grow): New.
4724 (MAXTABLE): Remove, replace uses with table_size.
4725 (pack_vector): Instead of dying when the table is too big, grow it.
4726
4727 2002-04-22 Akim Demaille <akim@epita.fr>
4728
4729 * data/bison.simple (yyr1): Its type is that of a token number.
4730 * data/bison.c++ (r1_): Likewise.
4731 * tests/regression.at (Web2c Actions): Adjust.
4732
4733 2002-04-22 Akim Demaille <akim@epita.fr>
4734
4735 * src/reader.c (token_translations_init): 256 is now the default
4736 value for the error token, i.e., it will be assigned another
4737 number if the user assigned 256 to one of her tokens.
4738 (reader): Don't force 256 to error.
4739 * doc/bison.texinfo (Symbols): Adjust.
4740 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4741 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4742 etc. instead of 10, 20, 30 (which was used to `jump' over error
4743 (256) and undefined (2)).
4744
4745 2002-04-22 Akim Demaille <akim@epita.fr>
4746
4747 Propagate more token_number_t.
4748
4749 * src/gram.h (token_number_as_item_number)
4750 (item_number_as_token_number): New.
4751 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4752 Use it to create output_item_number_table and
4753 output_token_number_table.
4754 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4755 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4756 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4757 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4758
4759 2002-04-22 Akim Demaille <akim@epita.fr>
4760
4761 * src/output.h, src/output.c (get_lines_number): Remove.
4762
4763 2002-04-19 Akim Demaille <akim@epita.fr>
4764
4765 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4766 as Lex/Flex'.
4767 (Debugging): More details about enabling the debugging features.
4768 (Table of Symbols): Describe $$, $n, @$, and @n.
4769 Suggested by Tim Josling.
4770
4771 2002-04-19 Akim Demaille <akim@epita.fr>
4772
4773 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4774
4775 2002-04-10 Akim Demaille <akim@epita.fr>
4776
4777 * src/system.h: Rely on HAVE_LIMITS_H.
4778 Suggested by Paul Eggert.
4779
4780 2002-04-09 Akim Demaille <akim@epita.fr>
4781
4782 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4783 full stderr, and strip it according to the bison options, instead
4784 of composing the error message from different bits.
4785 This makes it easier to check for several error messages.
4786 Adjust all the invocations.
4787 Add an invocation exercising the error token.
4788 Add an invocation demonstrating a stupid error message.
4789 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4790 Adjust the tests.
4791 Error message are for stderr, not stdout.
4792
4793 2002-04-09 Akim Demaille <akim@epita.fr>
4794
4795 * src/gram.h, src/gram.c (error_token_number): Remove, use
4796 errtoken->number.
4797 * src/reader.c (reader): Don't specify the user token number (2)
4798 for $undefined, as it uselessly prevents using it.
4799 * src/gram.h (token_number_t): Move to...
4800 * src/symtab.h: here.
4801 (state_t.number): Is a token_number_t.
4802 * src/print.c, src/reader.c: Use undeftoken->number instead of
4803 hard coded 2.
4804 (Even though this 2 is not the same as above: the number of the
4805 undeftoken remains being 2, it is its user token number which
4806 might not be 2).
4807 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4808 `user_token_number_max'.
4809 Output `undef_token_number'.
4810 * data/bison.simple, data/bison.c++: Use them.
4811 Be sure to map invalid yylex return values to
4812 `undef_token_number'. This saves us from gratuitous SEGV.
4813
4814 * tests/conflicts.at (Solved SR Conflicts)
4815 (Unresolved SR Conflicts): Adjust.
4816 * tests/regression.at (Web2c Actions): Adjust.
4817
4818 2002-04-08 Akim Demaille <akim@epita.fr>
4819
4820 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4821 Adding #line.
4822 Remove the duplicate `typedefs'.
4823 (RhsNumberType): Fix the declaration and various other typos.
4824 Use __ofile__.
4825 * data/bison.simple: Use __ofile__.
4826 * src/scan-skel.l: Handle __ofile__.
4827
4828 2002-04-08 Akim Demaille <akim@epita.fr>
4829
4830 * src/gram.h (item_number_t): New, the type of item numbers in
4831 RITEM. Note that it must be able to code symbol numbers as
4832 positive number, and the negation of rule numbers as negative
4833 numbers.
4834 Adjust all dependencies (pretty many).
4835 * src/reduce.c (rule): Remove this `short *' pointer: use
4836 item_number_t.
4837 * src/system.h (MINSHORT, MAXSHORT): Remove.
4838 Include `limits.h'.
4839 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4840 (shortcpy): Remove.
4841 (MAXTABLE): Move to...
4842 * src/output.c (MAXTABLE): here.
4843 (prepare_rules): Use output_int_table to output rhs.
4844 * data/bison.simple, data/bison.c++: Adjust.
4845 * tests/torture.at (Big triangle): Move the limit from 254 to
4846 500.
4847 * tests/regression.at (Web2c Actions): Ajust.
4848
4849 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4850 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4851 passes, but produces negative #line number, once fixed, GCC is
4852 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4853 C), it passes.
4854 * src/state.h (state_h): Code input lines on ints, not shorts.
4855
4856 2002-04-08 Akim Demaille <akim@epita.fr>
4857
4858 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4859 and then the grammar.
4860
4861 2002-04-08 Akim Demaille <akim@epita.fr>
4862
4863 * src/system.h: No longer using strndup.
4864
4865 2002-04-07 Akim Demaille <akim@epita.fr>
4866
4867 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4868 * src/output.c (output_table_data): Return the longest number.
4869 (prepare_tokens): Output `token_number_max').
4870 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4871 New.
4872 Use them to define yy_token_number_type/TokenNumberType.
4873 Use this type for yytranslate.
4874 * tests/torture.at (Big triangle): Push the limit from 124 to
4875 253.
4876 * tests/regression.at (Web2c Actions): Adjust.
4877
4878 2002-04-07 Akim Demaille <akim@epita.fr>
4879
4880 * tests/torture.at (Big triangle): New.
4881 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4882 * tests/existing.at: here.
4883
4884 2002-04-07 Akim Demaille <akim@epita.fr>
4885
4886 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4887 nritems.
4888 Adjust dependencies.
4889
4890 2002-04-07 Akim Demaille <akim@epita.fr>
4891
4892 * src/reader.c: Normalize increments to prefix form.
4893
4894 2002-04-07 Akim Demaille <akim@epita.fr>
4895
4896 * src/reader.c, symtab.c: Remove debugging code.
4897
4898 2002-04-07 Akim Demaille <akim@epita.fr>
4899
4900 Rename all the `bucket's as `symbol_t'.
4901
4902 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4903 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4904 * src/symtab.c, src/symtab.h (bucket): Rename as...
4905 (symbol_t): this.
4906 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4907 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
4908 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4909 (buckets_new, buckets_free, buckets_do): Rename as...
4910 (symbol_list_new, symbol_check_defined, symbol_make_alias)
4911 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4912 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
4913 (symbols_new, symbols_free, symbols_do): these.
4914
4915 2002-04-07 Akim Demaille <akim@epita.fr>
4916
4917 Use lib/hash for the symbol table.
4918
4919 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
4920 EOF.
4921 * src/lex.c (lex): Set the `number' member of new terminals.
4922 * src/reader.c (bucket_check_defined, bucket_make_alias)
4923 (bucket_check_alias_consistence, bucket_translation): New.
4924 (reader, grammar_free, readgram, token_translations_init)
4925 (packsymbols): Adjust.
4926 (reader): Number the predefined tokens.
4927 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
4928 for predefined tokens.
4929 * src/symtab.h (bucket): Remove all the hash table related
4930 members.
4931 * src/symtab.c (symtab): Replace by...
4932 (bucket_table): this.
4933 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4934 (buckets_new, buckets_do): New.
4935
4936 2002-04-07 Akim Demaille <akim@epita.fr>
4937
4938 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
4939 (start_symbol, max_user_token_number, semantic_parser)
4940 (error_token_number): Initialize.
4941 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
4942 Initialize.
4943 (reader): Don't.
4944 (errtoken, eoftoken, undeftoken, axiom): Extern.
4945
4946 2002-04-07 Akim Demaille <akim@epita.fr>
4947
4948 * src/gram.h (rule_s): prec and precsym are now pointers
4949 to the bucket giving the priority/associativity.
4950 Member `associativity' removed: useless.
4951 * src/reduce.c, src/conflicts.c: Adjust.
4952
4953 2002-04-07 Akim Demaille <akim@epita.fr>
4954
4955 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
4956 Properly escape the symbols' TAG when outputting them.
4957
4958 2002-04-07 Akim Demaille <akim@epita.fr>
4959
4960 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4961
4962 2002-04-07 Akim Demaille <akim@epita.fr>
4963
4964 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
4965 (LArule): this, which is an array to rule_t*.
4966 * src/print.c, src/conflicts.c: Adjust.
4967
4968 2002-04-07 Akim Demaille <akim@epita.fr>
4969
4970 * src/gram.h (rule_t): Rename `number' as `user_number'.
4971 `number' is a new member.
4972 Adjust dependencies.
4973 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
4974
4975 2002-04-07 Akim Demaille <akim@epita.fr>
4976
4977 As a result of the previous patch, it is no longer needed
4978 to reorder ritem itself.
4979
4980 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
4981
4982 2002-04-07 Akim Demaille <akim@epita.fr>
4983
4984 Be sure never to walk through RITEMS, but use only data related to
4985 the rules themselves. RITEMS should be banished.
4986
4987 * src/output.c (output_token_translations): Rename as...
4988 (prepare_tokens): this.
4989 In addition to `translate', prepare the muscles `tname' and
4990 `toknum', which were handled by...
4991 (output_rule_data): this.
4992 Remove, and move the remainder of its outputs into...
4993 (prepare_rules): this new routines, which also merges content from
4994 (output_gram): this.
4995 (prepare_rules): Be sure never to walk through RITEMS.
4996 (output_stos): Rename as...
4997 (prepare_stos): this.
4998 (output): Always invoke prepare_states, after all, just don't use it
4999 in the output if you don't need it.
5000
5001 2002-04-07 Akim Demaille <akim@epita.fr>
5002
5003 * src/LR0.c (new_state): Display `nstates' as the name of the
5004 newly created state.
5005 Adjust to initialize first_state and last_state if needed.
5006 Be sure to distinguish the initial from the final state.
5007 (new_states): Create the itemset of the initial state, and use
5008 new_state.
5009 * src/closure.c (closure): Now that the initial state has its
5010 items properly set, there is no need for a special case when
5011 creating `ruleset'.
5012
5013 As a result, now the rule 0, reducing to $axiom, is visible in the
5014 outputs. Adjust the test suite.
5015
5016 * tests/conflicts.at (Solved SR Conflicts)
5017 (Unresolved SR Conflicts): Adjust.
5018 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5019 * tests/conflicts.at (S/R in initial): New.
5020
5021 2002-04-07 Akim Demaille <akim@epita.fr>
5022
5023 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5024 the RHS of the rules.
5025 * src/output.c (output_gram): Likewise.
5026
5027 2002-04-07 Akim Demaille <akim@epita.fr>
5028
5029 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5030 bucket.
5031 Adjust all dependencies.
5032 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5033 `number' of the buckets too.
5034 * src/gram.h: Include `symtab.h'.
5035 (associativity): Move to...
5036 * src/symtab.h: here.
5037 No longer include `gram.h'.
5038
5039 2002-04-07 Akim Demaille <akim@epita.fr>
5040
5041 * src/gram.h, src/gram.c (rules_rhs_length): New.
5042 (ritem_longest_rhs): Use it.
5043 * src/gram.h (rule_t): `number' is a new member.
5044 * src/reader.c (packgram): Set it.
5045 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5046 the end of `rules', and count them out of `nrules'.
5047 (reduce_output, dump_grammar): Adjust.
5048 * src/print.c (print_grammar): It is no longer needed to check for
5049 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5050 * tests/reduce.at (Reduced Automaton): New test.
5051
5052 2002-04-07 Akim Demaille <akim@epita.fr>
5053
5054 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5055 lacking `+ 1' to nrules, Bison reported as useless a token if it
5056 was used solely to set the precedence of the last rule...
5057
5058 2002-04-07 Akim Demaille <akim@epita.fr>
5059
5060 * data/bison.c++, data/bison.simple: Don't output the current file
5061 name in #line, to avoid useless diffs between two identical
5062 outputs under different names.
5063
5064 2002-04-07 Akim Demaille <akim@epita.fr>
5065
5066 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5067 Normalize loops to using `< nrules + 1', not `<= nrules'.
5068
5069 2002-04-07 Akim Demaille <akim@epita.fr>
5070
5071 * TODO: Update.
5072
5073 2002-04-07 Akim Demaille <akim@epita.fr>
5074
5075 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5076 bucket.value as bucket.number.
5077
5078 2002-04-07 Akim Demaille <akim@epita.fr>
5079
5080 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5081 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5082 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5083 RHS, instead of being an index in RITEMS.
5084
5085 2002-04-04 Paul Eggert <eggert@twinsun.com>
5086
5087 * doc/bison.texinfo: Update copyright date.
5088 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5089 (Symbols): Warn about running Bison in one character set,
5090 but compiling and/or running in an incompatible one.
5091 Warn about character code 256, too.
5092
5093 2002-04-03 Paul Eggert <eggert@twinsun.com>
5094
5095 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5096 YYERROR_VERBOSE is nonzero, not whether it is defined.
5097
5098 Merge changes from bison-1_29-branch.
5099
5100 2002-03-20 Paul Eggert <eggert@twinsun.com>
5101
5102 Merge fixes from Debian bison_1.34-1.diff.
5103
5104 * configure.in (AC_PREREQ): 2.53.
5105
5106 2002-03-20 Akim Demaille <akim@epita.fr>
5107
5108 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5109
5110 2002-03-19 Paul Eggert <eggert@twinsun.com>
5111
5112 * src/bison.simple (YYCOPY): New macro.
5113 (YYSTACK_RELOCATE): Use it.
5114 Remove Type arg; no longer needed. All callers changed.
5115 (yymemcpy): Remove; no longer needed.
5116
5117 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5118 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5119
5120 2002-03-19 Akim Demaille <akim@epita.fr>
5121
5122 Test and fix the #line outputs.
5123
5124 * tests/atlocal.at (GCC): New.
5125 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5126 (Prologue synch line, ,%union synch line, Postprologue synch line)
5127 (Action synch line, Epilogue synch line): New tests.
5128 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5129 * data/bison.simple, data/bison.c++: Use it.
5130
5131 2002-03-19 Akim Demaille <akim@epita.fr>
5132
5133 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5134 (Solved SR Conflicts, %expect not enough, %expect right)
5135 (%expect too much): Move to...
5136 * tests/conflicts.at: this new file.
5137
5138 2002-03-19 Akim Demaille <akim@epita.fr>
5139
5140 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5141 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5142 that we can move to enums for instance.
5143 * src/output.c (token_definitions_output): Output a list of
5144 `token-name, token-number' instead of the #define.
5145 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5146
5147 2002-03-14 Akim Demaille <akim@epita.fr>
5148
5149 Use Gettext 0.11.1.
5150
5151 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5152
5153 * data/bison.c++: Make the user able to add members to the generated
5154 parser by subclassing.
5155
5156 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5157
5158 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5159 a character.
5160 Reported by Nicolas Tisserand and Nicolas Burrus.
5161
5162 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5163
5164 * src/reader.c: Warn about lacking semi-colons, do not complain.
5165
5166 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5167
5168 * data/bison.c++: Remove a debug line.
5169
5170 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5171
5172 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5173 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5174 provide a default implementation.
5175
5176 2002-03-04 Akim Demaille <akim@epita.fr>
5177
5178 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5179 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5180 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5181 * tests/semantic.at (Parsing Guards): Similarly.
5182 * src/reader.at (readgram): Complain if the last rule is not ended
5183 with a semi-colon.
5184
5185 2002-03-04 Akim Demaille <akim@epita.fr>
5186
5187 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5188 * src/closure.c: here.
5189 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5190 RTC.
5191 * src/warshall.h, src/warshall.c: Remove.
5192 * tests/sets.at (Broken Closure): Adjust.
5193
5194 2002-03-04 Akim Demaille <akim@epita.fr>
5195
5196 * src/output.c (output_skeleton): tempdir is const.
5197 bytes_read is unused.
5198
5199 2002-03-04 Akim Demaille <akim@epita.fr>
5200
5201 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5202 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5203 Update.
5204 From Michael Hayes.
5205
5206 2002-03-04 Akim Demaille <akim@epita.fr>
5207
5208 * src/closure.c (closure): `r' is unused.
5209
5210 2002-03-04 Akim Demaille <akim@epita.fr>
5211
5212 * tests/sets.at (Broken Closure): Add the ending `;'.
5213 * src/reader.at (readgram): Complain if a rule is not ended with a
5214 semi-colon.
5215
5216 2002-03-04 Akim Demaille <akim@epita.fr>
5217
5218 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5219 (count_sr_conflicts): Use bitset_count.
5220 * src/reduce.c (inaccessable_symbols): Ditto.
5221 (bits_size): Remove.
5222 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5223
5224 2002-03-04 Akim Demaille <akim@epita.fr>
5225
5226 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5227 * src/reduce.c: Remove the `bitset_zero's following the
5228 `bitset_create's, as now it is performed by the latter.
5229
5230 2002-03-04 Akim Demaille <akim@epita.fr>
5231
5232 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5233 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5234 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5235 latest sources from Michael.
5236
5237 2002-03-04 Akim Demaille <akim@epita.fr>
5238
5239 * src/output.c (output): Don't free the grammar.
5240 * src/reader.c (grammar_free): New.
5241 * src/main.c (main): Call it and don't free symtab here.
5242
5243 2002-03-04 Akim Demaille <akim@epita.fr>
5244
5245 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5246 before returning.
5247 Reported by Benoit Perrot.
5248
5249 2002-03-04 Akim Demaille <akim@epita.fr>
5250
5251 Use bitset operations when possible, not loops over bits.
5252
5253 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5254 bitset_or.
5255 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5256 * src/reduce.c (useless_nonterminals): Formatting changes.
5257 * src/warshall.c (TC): Use bitset_or.
5258
5259 2002-03-04 Akim Demaille <akim@epita.fr>
5260
5261 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5262 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5263 Ditto.
5264
5265 2002-03-04 Akim Demaille <akim@epita.fr>
5266
5267 * src/lalr.c (F): Now a bitset*.
5268 Adjust all dependencies.
5269
5270 2002-03-04 Akim Demaille <akim@epita.fr>
5271
5272 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5273 Adjust all dependencies.
5274
5275 2002-03-04 Akim Demaille <akim@epita.fr>
5276
5277 * src/L0.c, src/LR0.h (nstates): Be size_t.
5278 Adjust comparisons (signed vs unsigned).
5279 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5280 bitset*.
5281 Adjust all dependencies.
5282
5283 2002-03-04 Akim Demaille <akim@epita.fr>
5284
5285 * src/closure.c (firsts): Now, also a bitset.
5286 Adjust all dependencies.
5287 (varsetsize): Remove, now unused.
5288 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5289
5290 2002-03-04 Akim Demaille <akim@epita.fr>
5291
5292 * src/print.c: Convert to use bitset.h, not hand coded iterations
5293 over ints.
5294
5295 2002-03-04 Akim Demaille <akim@epita.fr>
5296
5297 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5298
5299 2002-03-04 Akim Demaille <akim@epita.fr>
5300
5301 * src/closure.c (ruleset): Be a bitset.
5302 (rulesetsize): Remove.
5303
5304 2002-03-04 Akim Demaille <akim@epita.fr>
5305
5306 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5307 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5308 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5309 * src/closure.c (fderives): Be an array of bitsets.
5310
5311 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5312
5313 * data/bison.c++: Merge the two generated headers. Insert a copyright
5314 notice in each output file.
5315
5316 2002-02-28 Akim Demaille <akim@epita.fr>
5317
5318 * data/bison.c++: Copy the prologue of bison.simple to fetch
5319 useful M4 definitions, such as b4_header_guard.
5320
5321 2002-02-25 Akim Demaille <akim@epita.fr>
5322
5323 * src/getargs.c (version): Give the name of the authors, and use a
5324 translator friendly scheme for the bgr
5325 copyright notice.
5326
5327 2002-02-25 Akim Demaille <akim@epita.fr>
5328
5329 * src/output.c (header_output): Remove, now handled completely via
5330 M4.
5331
5332 2002-02-25 Akim Demaille <akim@epita.fr>
5333
5334 * m4/m4.m4: New, from CVS Autoconf.
5335 * configure.in: Invoke it.
5336 * src/output.c (output_skeleton): Use its result instead of the
5337 hard coded name.
5338
5339 2002-02-25 Akim Demaille <akim@epita.fr>
5340
5341 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5342 Fileutils 4.1.5.
5343 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5344 * src/output.c (output_skeleton): Use mkstemp to create a real
5345 temporary file.
5346 Move the filling of `skeleton' and its muscle to...
5347 (prepare): here.
5348 (output): Move the definition of the prologue muscle to...
5349 (prepare): here.
5350 * src/system.h (DEFAULT_TMPDIR): New.
5351
5352 2002-02-14 Paul Eggert <eggert@twinsun.com>
5353
5354 Remove the support for C++ namespace cleanliness; it was
5355 causing more problems than it was curing, since it didn't work
5356 properly on some nonstandard C++ compilers. This can wait
5357 for a proper C++ parser.
5358
5359 * NEWS: Document this.
5360 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5361 of C++, as it's treated like C now.
5362 * src/bison.simple (YYSTD): Remove.
5363 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5364 Treat C++ just like Standard C instead of trying to support
5365 namespace cleanliness.
5366
5367 2002-02-14 Akim Demaille <akim@epita.fr>
5368
5369 * tests/regression.at (else): Adjust to Andreas' change.
5370
5371 2002-02-14 Akim Demaille <akim@epita.fr>
5372
5373 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5374
5375 2002-02-13 Andreas Schwab <schwab@suse.de>
5376
5377 * src/output.c (output_rule_data): Don't output NULL, it might
5378 not be defined yet.
5379
5380 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5381
5382 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5383 (Copyright notice): Update.
5384
5385 2002-02-11 Akim Demaille <akim@epita.fr>
5386
5387 * tests/regression.at (%nonassoc and eof): Don't include
5388 nonportable headers.
5389
5390 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5391
5392 * data/bison.c++: Correct error recovery. Make the user able to
5393 initialize the starting location.
5394
5395 2002-02-07 Akim Demaille <akim@epita.fr>
5396
5397 * tests/input.at: New.
5398
5399 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5400
5401 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5402 more consistent when naming methods and variables. Put preprocessor
5403 directives around tables only needed for debugging.
5404
5405 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5406
5407 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5408 C++ parsers.
5409 (yy::b4_name::parse): Use print_.
5410
5411 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5412
5413 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5414
5415 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5416
5417 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5418 C++ parsers.
5419 (yy::b4_name::parse): Build verbose error messages, and use error_.
5420
5421 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5422
5423 * data/bison.c++: Fix m4 quoting in comments.
5424
5425 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5426
5427 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5428 not expanded by m4.
5429
5430 2002-02-05 Akim Demaille <akim@epita.fr>
5431
5432 * data/bison.c++: Adjust to the M4 back end.
5433 More is certainly needed.
5434
5435 2002-02-05 Akim Demaille <akim@epita.fr>
5436
5437 Give a try to M4 as a back end.
5438
5439 * lib/readpipe.c: New, from wdiff.
5440 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5441 BISON_HAIRY.
5442 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5443 specific values. Now it is m4 that performs the lookup.
5444 * src/parse-skel.y: Remove.
5445 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5446 * src/output.c (actions_output, guards_output)
5447 (token_definitions_output): No longer keeps track of the output
5448 line number, hence remove the second argument.
5449 (guards_output): Check against the guard member of a rule, not the
5450 action member.
5451 Adjust callers.
5452 (output_skeleton): Don't look for the skeleton location, let m4 do
5453 that.
5454 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5455 file will be used.
5456 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5457 (prepare): Given that for the time being changesyntax is not
5458 usable in M4, rename the muscles using `-' to `_'.
5459 Define `defines_flag', `output_parser_name' and `output_header_name'.
5460 * src/output.h (actions_output, guards_output)
5461 (token_definitions_output): Adjust prototypes.
5462 * src/scan-skel.l: Instead of scanning the skeletons, it now
5463 processes the output of m4: `__oline__' and `#output'.
5464 * data/bison.simple: Adjust to be used by M4(sugar).
5465 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5466 to date.
5467 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5468 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5469 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5470 shamelessly stolen from CVS Autoconf.
5471
5472 2002-02-05 Akim Demaille <akim@epita.fr>
5473
5474 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5475 * configure.in: Check for the declarations of free and malloc.
5476 * src/muscle_tab.c: Adjust.
5477
5478 2002-02-05 Akim Demaille <akim@epita.fr>
5479
5480 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5481 which have no values.
5482
5483 2002-02-05 Akim Demaille <akim@epita.fr>
5484
5485 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5486 * data/: here.
5487
5488 2002-01-29 Paul Eggert <eggert@twinsun.com>
5489
5490 * src/bison.simple (YYSIZE_T): Do not define merely because
5491 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5492 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5493
5494 2002-01-27 Akim Demaille <akim@epita.fr>
5495
5496 Fix `%nonassoc and eof'.
5497
5498 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5499 which were not properly copied! Replace
5500 memcpy (res->errs, src->errs, src->nerrs);
5501 with
5502 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5503 !!!
5504 * tests/regression.at (%nonassoc and eof): Adjust to newest
5505 Autotest: `.' is not in the PATH.
5506
5507 2002-01-27 Akim Demaille <akim@epita.fr>
5508
5509 * tests/sets.at (AT_EXTRACT_SETS): New.
5510 (Nullable): Use it.
5511 (Firsts): New.
5512
5513 2002-01-26 Akim Demaille <akim@epita.fr>
5514
5515 * tests/actions.at, tests/calc.at, tests/headers.at,
5516 * tests/torture.at: Adjust to the newest Autotest which no longer
5517 forces `.' in the PATH.
5518
5519 2002-01-25 Akim Demaille <akim@epita.fr>
5520
5521 * tests/regression.at (%nonassoc and eof): New.
5522 Suggested by Robert Anisko.
5523
5524 2002-01-24 Akim Demaille <akim@epita.fr>
5525
5526 Bison dumps core when trying to complain about broken input files.
5527 Reported by Cris van Pelt.
5528
5529 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5530 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5531 into...
5532 (Invalid inputs): Strengthen: exercise parse_percent_token.
5533
5534 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5535
5536 * src/Makefile.am: Add bison.c++.
5537 * src/bison.c++: New skeleton.
5538
5539 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5540
5541 * po/it.po: New.
5542
5543 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5544
5545 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5546
5547 2002-01-20 Marc Autret <marc@gnu.org>
5548
5549 * src/files.c (compute_output_file_names): Fix
5550
5551 2002-01-20 Marc Autret <marc@gnu.org>
5552
5553 * tests/output.at: New test.
5554 * src/files.c (compute_base_names): Don't map extensions when
5555 the YACC flag is set, use defaults.
5556 Reported by Evgeny Stambulchik.
5557
5558 2002-01-20 Marc Autret <marc@gnu.org>
5559
5560 * src/system.h: Need to define __attribute__ away for non-GCC
5561 compilers as well (i.e. the vendor C compiler).
5562 Suggested by Albert Chin-A-Young.
5563
5564 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5565
5566 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5567 canonical definition.
5568 * src/system.h: Use the canonical definition for PARAMS (avoids
5569 a conflict with the macro from lib/hash.h).
5570
5571 2002-01-11 Akim Demaille <akim@epita.fr>
5572
5573 * configure.in: Use AC_FUNC_STRNLEN.
5574 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5575
5576 2002-01-09 Akim Demaille <akim@epita.fr>
5577
5578 * src/files.c, src/files.h (output_infix): New.
5579 (tab_extension): Remove.
5580 (compute_base_names): Compute the former, drop the latter.
5581 * src/output.c (prepare): Insert the muscles `output-infix', and
5582 `output-suffix'.
5583 * src/parse-skel.y (string, string.1): New.
5584 (section.header): Use it.
5585 (section.yacc): Remove.
5586 (prefix): Remove too.
5587 * src/scan-skel.l: Adjust.
5588 * src/bison.simple, src/bison.hairy: Adjust.
5589
5590 2002-01-09 Akim Demaille <akim@epita.fr>
5591
5592 * configure.in (WERROR_CFLAGS): Compute it.
5593 * src/Makefile.am (CFLAGS): Pass it.
5594 * tests/atlocal.in (CFLAGS): Idem.
5595 * src/files.c: Fix a few warnings.
5596 (get_extension_index): Remove, unused.
5597
5598 2002-01-08 Akim Demaille <akim@epita.fr>
5599
5600 * src/getargs.c (AS_FILE_NAME): New.
5601 (getargs): Use it to convert DOSish file names.
5602 * src/files.c (base_name): Rename as full_base_name to avoid
5603 clashes with `base_name ()'.
5604 (filename_split): New.
5605 (compute_base_names): N-th rewrite, using filename_split.
5606
5607 2002-01-08 Akim Demaille <akim@epita.fr>
5608
5609 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5610 New, stolen from the Fileutils 4.1.
5611 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5612 * configure.in: Check for the presence of memrchr, and of its
5613 prototype.
5614
5615 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5616
5617 * lib/hash.h (__P): Added definition for this macro.
5618 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5619 BUILT_SOURCES, to ensure they are generated first.
5620 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5621 %error-verbose to allow bootstrapping with bison 1.30x.
5622
5623 2002-01-06 Akim Demaille <akim@epita.fr>
5624
5625 * src/reader.c (parse_braces): Don't fetch the next char, the
5626 convention is to fetch on entry.
5627 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5628 'switch' without a following semicolon.
5629 * tests/regression.at (braces parsing): New.
5630
5631 2002-01-06 Akim Demaille <akim@epita.fr>
5632
5633 Bison is dead wrong in its RR conflict reports.
5634
5635 * tests/torture.at (GNU Cim Grammar): New.
5636 * src/conflicts.c (count_rr_conflicts): Fix.
5637
5638 2002-01-06 Akim Demaille <akim@epita.fr>
5639
5640 Creating package.m4 from configure.ac causes too many problems.
5641
5642 * tests/Makefile.am (package.m4): Create it by hand,
5643 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5644
5645 2002-01-06 Akim Demaille <akim@epita.fr>
5646
5647 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5648 skeleton.h.
5649
5650 2002-01-04 Paul Eggert <eggert@twinsun.com>
5651
5652 * doc/bison.texinfo (Debugging):
5653 Remove YYSTDERR; it's no longer defined or used.
5654 Also, s/cstdio.h/cstdio/.
5655
5656 2002-01-03 Akim Demaille <akim@epita.fr>
5657
5658 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5659
5660 2002-01-03 Akim Demaille <akim@epita.fr>
5661
5662 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5663 tracing code to --trace, wait for a better --trace option, with
5664 args.
5665
5666 2002-01-03 Akim Demaille <akim@epita.fr>
5667
5668 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5669 The ISO C++ standard is extremely clear about it: stderr is
5670 considered a macro, not a regular symbol (see table 94 `Header
5671 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5672 Therefore std:: does not apply to it. It still does with fprintf.
5673 Also, s/cstdio.h/cstdio/.
5674
5675 2002-01-03 Akim Demaille <akim@epita.fr>
5676
5677 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5678 for non system headers.
5679
5680 2002-01-02 Akim Demaille <akim@epita.fr>
5681
5682 Equip the skeleton chain with location tracking, runtime trace,
5683 pure parser and scanner.
5684
5685 * src/parse-skel.y: Request a pure parser, locations, and prefix
5686 renaming.
5687 (%union): Having several members with the same type does not help
5688 type mismatches, simplify.
5689 (YYPRINT, yyprint): New.
5690 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5691 (skel_error): this.
5692 Handle locations.
5693 * src/scan-skel.l: Adjust to these changes.
5694 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5695 (LOCATION_PRINT, skel_control_t): New.
5696
5697 2001-12-30 Akim Demaille <akim@epita.fr>
5698
5699 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5700 replace `gb' with BLANKS.
5701 * src/scan-skel.l: Adjust.
5702
5703 2001-12-30 Akim Demaille <akim@epita.fr>
5704
5705 * src/system.h: We don't need nor want bcopy.
5706 Throw away MS-DOS crap: we don't need getpid.
5707 * configure.in: We don't need strndup. It was even causing
5708 problems: because Flex includes the headers *before* us,
5709 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5710 not visible.
5711 * lib/xstrndup.c: New.
5712 * src/scan-skel.l: Use it.
5713 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5714 * src/parse-skel.y: Use %directives instead of #defines.
5715
5716 2001-12-30 Akim Demaille <akim@epita.fr>
5717
5718 * src/skeleton.h: New.
5719 * src/output.c (output_parser, output_master_parser): Remove, dead
5720 code.
5721 * src/output.h (get_lines_number, actions_output, guards_output)
5722 (token_definitions_output): Prototype them.
5723 * src/parse-skel.y: Add the license notice.
5724 Include output.h and skeleton.h.
5725 (process_skeleton): Returns void, and takes a single parameter.
5726 * src/scan-skel.l: Add the license notice.
5727 Include skeleton.h.
5728 Don't use %option yylineno: it seems that then Flex imagines
5729 REJECT has been used, and therefore it won't reallocate its
5730 buffers (which makes no other sense to me than a bug). It results
5731 in warnings for `unused: yy_flex_realloc'.
5732
5733 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5734
5735 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5736 (MUSCLE_INSERT_PREFIX): ...to there.
5737 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5738 (MUSCLE_INSERT_PREFIX): Move from here...
5739
5740 * src/bison.hairy: Add a section directive. Put braces around muscle
5741 names. This parser skeleton is still broken, but Bison should not
5742 choke on a bad muscle 'syntax'.
5743 * src/bison.simple: Add a section directive. Put braces around muscle
5744 names.
5745
5746 * src/files.h (strsuffix, stringappend): Add declarations.
5747 (tab_extension): Add declaration.
5748 (short_base_name): Add declaration.
5749
5750 * src/files.c (strsuffix, stringappend): No longer static. These
5751 functions are used in the skeleton parser.
5752 (tab_extension): New.
5753 (compute_base_names): Use the computations done in this function
5754 to guess if the generated parsers should have '.tab' in their
5755 names.
5756 (short_base_name): No longer static.
5757
5758 * src/output.c (output_skeleton): New.
5759 (output): Disable call to output_master_parser, and give a try to
5760 a new skeleton handling system.
5761 (guards_output, actions_output): No longer static.
5762 (token_definitions_output, get_lines_number): No longer static.
5763
5764 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5765
5766 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5767 parse-skel.y.
5768
5769 * src/parse-skel.y: New file.
5770 * src/scan-skel.l: New file.
5771
5772 2001-12-29 Akim Demaille <akim@epita.fr>
5773
5774 %name-prefix is broken.
5775
5776 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5777 Adjust all dependencies.
5778 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5779 %name-prefix.
5780
5781 Renaming yylval but not yylloc is not consistent. Now we do.
5782
5783 * src/bison.simple: Prefix yylloc if used.
5784 * doc/bison.texinfo (Decl Summary): Document that.
5785
5786 2001-12-29 Akim Demaille <akim@epita.fr>
5787
5788 * doc/bison.texinfo: Promote `%long-directive' over
5789 `%long_directive'.
5790 Remove all references to fixed-output-files, yacc is enough.
5791
5792 2001-12-29 Akim Demaille <akim@epita.fr>
5793
5794 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5795 user prologue. These are defaults.
5796 * tests/actions.at (Mid-rule actions): Make sure the user can
5797 define YYDEBUG and YYERROR_VERBOSE.
5798
5799 2001-12-29 Akim Demaille <akim@epita.fr>
5800
5801 * src/output.c (header_output): Don't forget to export YYLTYPE and
5802 yylloc.
5803 * tests/headers.at (export YYLTYPE): New, make sure it does.
5804 * tests/regression.at (%union and --defines, Invalid CPP headers):
5805 Move to...
5806 * tests/headers.at: here.
5807
5808 2001-12-29 Akim Demaille <akim@epita.fr>
5809
5810 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5811
5812 2001-12-29 Akim Demaille <akim@epita.fr>
5813
5814 * tests/actions.at (Mid-rule actions): Output on a single line
5815 instead of several.
5816
5817 2001-12-29 Akim Demaille <akim@epita.fr>
5818
5819 * doc/bison.texinfo: Formatting changes.
5820
5821 2001-12-29 Akim Demaille <akim@epita.fr>
5822
5823 Don't store the token defs in a muscle, just be ready to output it
5824 on command. Now possible via `symbols'. Fixes a memory leak.
5825
5826 * src/output.c (token_definitions_output): New.
5827 (output_parser, header_output): Use it.
5828 * src/reader.c (symbols_save): Remove.
5829
5830 2001-12-29 Akim Demaille <akim@epita.fr>
5831
5832 * src/bison.simple: Do not provide a default for YYSTYPE and
5833 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5834 default.
5835
5836 2001-12-29 Akim Demaille <akim@epita.fr>
5837
5838 Mid-rule actions are simply... ignored!
5839
5840 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5841 the empty-rule associated to the dummy symbol, not to the host
5842 rule.
5843 * tests/actions.at (Mid-rule actions): New.
5844
5845 2001-12-29 Akim Demaille <akim@epita.fr>
5846
5847 Memory leak.
5848
5849 * src/reader.c (reader): Free grammar.
5850
5851 2001-12-29 Akim Demaille <akim@epita.fr>
5852
5853 Memory leak.
5854
5855 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5856 since it allocates it for each state, although only one is needed.
5857 (allocate_storage): Do it here.
5858
5859 2001-12-29 Akim Demaille <akim@epita.fr>
5860
5861 * src/options.h, src/options.c (create_long_option_table): Rename
5862 as...
5863 (long_option_table_new): this, with a clearer prototype.
5864 (percent_table): Remove, unused,
5865 * src/getargs.c (getargs): Adjust.
5866
5867 2001-12-29 Akim Demaille <akim@epita.fr>
5868
5869 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5870 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5871 as states.
5872
5873 2001-12-29 Akim Demaille <akim@epita.fr>
5874
5875 * src/lalr.c (build_relations): Rename `states' as `states1'.
5876 Sorry, I don't understand exactly what it is, no better name...
5877
5878 2001-12-29 Akim Demaille <akim@epita.fr>
5879
5880 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5881 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5882 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5883 as rules.
5884
5885 2001-12-29 Akim Demaille <akim@epita.fr>
5886
5887 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5888 ago.
5889
5890 2001-12-29 Akim Demaille <akim@epita.fr>
5891
5892 * src/reader.c, src/reader.h (user_toknums): Remove.
5893 Adjust all users to use symbols[i]->user_token_number.
5894
5895 2001-12-29 Akim Demaille <akim@epita.fr>
5896
5897 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5898 Adjust all users to use symbols[i]->prec or ->assoc.
5899
5900 2001-12-29 Akim Demaille <akim@epita.fr>
5901
5902 * src/reader.c, src/reader.h (tags): Remove.
5903 Adjust all users to use symbols[i]->tag.
5904
5905 2001-12-29 Akim Demaille <akim@epita.fr>
5906
5907 * src/gram.h, src/gram.c (symbols): New, similar to state_table
5908 and rule_table.
5909 * src/reader.c (packsymbols): Fill this table.
5910 Drop sprec.
5911 * src/conflicts.c (resolve_sr_conflict): Adjust.
5912 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
5913 single table.
5914 Use symbols[i]->tag instead of tags[i].
5915
5916 2001-12-29 Akim Demaille <akim@epita.fr>
5917
5918 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
5919 In addition, put a comment in there, to replace...
5920 * tests/regression.at (%union and C comments): Remove.
5921
5922 2001-12-29 Akim Demaille <akim@epita.fr>
5923
5924 * tests/regression.at (Web2c Actions): Blindly move the actual
5925 output as expected output. The contents *seem* right to me, but I
5926 can't pretend reading perfectly parser tables... Nonetheless, all
5927 the other tests pass correctly, the table look OK, even though the
5928 presence of `$axiom' is to be noted: AFAICS it is useless (but
5929 harmless).
5930
5931 2001-12-29 Akim Demaille <akim@epita.fr>
5932
5933 * src/reader.c (readgram): Don't add the rule 0 if there were no
5934 rules read. In other words, add it _after_ having performed
5935 grammar sanity checks.
5936 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
5937
5938 2001-12-29 Akim Demaille <akim@epita.fr>
5939
5940 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
5941 visible, and some states have now a different number.
5942
5943 2001-12-29 Akim Demaille <akim@epita.fr>
5944
5945 * src/reader.c (readgram): Bind the initial rule's lineno to that
5946 of the first rule.
5947 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
5948 (Solved SR Conflicts): Adjust rule 0's line number.
5949
5950 2001-12-29 Akim Demaille <akim@epita.fr>
5951
5952 Fix the `GAWK Grammar' failure.
5953
5954 * src/LR0.c (final_state): Initialize to -1 so that we do compute
5955 the reductions of the first state which was mistakenly confused
5956 with the final state because precisely final_state was initialized
5957 to 0.
5958 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
5959 now noticed by Bison.
5960 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
5961 have a reduction on $default.
5962
5963 2001-12-29 Akim Demaille <akim@epita.fr>
5964
5965 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
5966 rule line numbers.
5967 * src/closure.c (print_closure): Likewise.
5968 * src/derives.c (print_derives): Likewise.
5969 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
5970 now.
5971
5972 2001-12-29 Akim Demaille <akim@epita.fr>
5973
5974 * src/lalr.c (lookaheads_print): New.
5975 (lalr): Call it when --trace-flag.
5976 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
5977 are dumped.
5978
5979 2001-12-29 Akim Demaille <akim@epita.fr>
5980
5981 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
5982 when walking through ritem, even via rule->rhs.
5983 * src/reduce.c (dump_grammar, useful_production, reduce_output)
5984 (useful_production, useless_nonterminals): Likewise.
5985 (reduce_grammar_tables): Likewise, plus update nritems.
5986 * src/nullable.c (set_nullable): Likewise.
5987 * src/lalr.c (build_relations): Likewise.
5988 * tests/sets.at (Nullable): Adjust.
5989 Fortunately, now, the $axiom is no longer nullable.
5990
5991 2001-12-29 Akim Demaille <akim@epita.fr>
5992
5993 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
5994 the 0-sentinel.
5995 * src/gram.c (ritem_longest_rhs): Likewise.
5996 * src/reduce.c (nonterminals_reduce): Likewise.
5997 * src/print_graph.c (print_graph): Likewise.
5998 * src/output.c (output_rule_data): Likewise.
5999 * src/nullable.c (set_nullable): Likewise.
6000
6001 2001-12-29 Akim Demaille <akim@epita.fr>
6002
6003 * src/output.c: Comment changes.
6004
6005 2001-12-27 Paul Eggert <eggert@twinsun.com>
6006
6007 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6008 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6009 Sparc, as they were causing more porting problems than the
6010 (minor) performance improvement was worth.
6011
6012 Also, catch up with 1.31's YYSTD.
6013
6014 2001-12-27 Akim Demaille <akim@epita.fr>
6015
6016 * src/output.c (output_gram): Rely on nritems, not the
6017 0-sentinel. See below.
6018 Use -1 as separator, not 0.
6019 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6020 Rely on -1 as separator in yyrhs, instead of 0.
6021 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6022 twice `Now at end of input', therefore there are two lines less to
6023 expect.
6024
6025 2001-12-27 Akim Demaille <akim@epita.fr>
6026
6027 * tests/regression.at (Unresolved SR Conflicts):
6028 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6029 below.
6030
6031 2001-12-27 Akim Demaille <akim@epita.fr>
6032
6033 * src/LR0.c (new_state): Recognize the final state by the fact it
6034 is reached by eoftoken.
6035 (insert_start_shifting_state, insert_eof_shifting_state)
6036 (insert_accepting_state, augment_automaton): Remove, since now
6037 these states are automatically computed from the initial state.
6038 (generate_states): Adjust.
6039 * src/print.c: When reporting a rule number to the user, substract
6040 1, so that the axiom rule is rule 0, and the first user rule is 1.
6041 * src/reduce.c: Likewise.
6042 * src/print_graph.c (print_core): For the time being, just as for
6043 the report, depend upon --trace-flags to dump the full set of
6044 items.
6045 * src/reader.c (readgram): Once the grammar read, insert the rule
6046 0: `$axiom: START-SYMBOL $'.
6047 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6048 number of the states has changed (the final state is no longer
6049 necessarily the last), catch up.
6050
6051 2001-12-27 Akim Demaille <akim@epita.fr>
6052
6053 Try to make the use of the eoftoken valid. Given that its value
6054 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6055 is used instead of > 0 where appropriate, (ii), depend upon nritems
6056 instead of the 0-sentinel.
6057
6058 * src/gram.h, src/gram.c (nritems): New.
6059 Expected to be duplication of nitems, but for the time being...
6060 * src/reader.c (packgram): Assert nritems and nitems are equal.
6061 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6062 * src/closure.c (print_closure, print_fderives): Likewise.
6063 * src/gram.c (ritem_print): Likewise.
6064 * src/print.c (print_core, print_grammar): Likewise.
6065 * src/print_graph.c: Likewise.
6066
6067 2001-12-27 Akim Demaille <akim@epita.fr>
6068
6069 * src/main.c (main): If there are complains after grammar
6070 reductions, then output the report anyway if requested, then die.
6071 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6072 * src/reader.c (eoftoken): New.
6073 (parse_token_decl): If the token being defined has value `0', it
6074 is the eoftoken.
6075 (packsymbols): No longer hack `tags' to insert `$' by hand.
6076 Be sure to preserve the value of the eoftoken.
6077 (reader): Make sure eoftoken is defined.
6078 Initialize nsyms to 0: now eoftoken is created just like the others.
6079 * src/print.c (print_grammar): Don't special case the eof token.
6080 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6081 lie anyway, albeit pleasant.
6082 * tests/calc.at: Exercise error messages with eoftoken.
6083 Change the grammar so that empty input is invalid.
6084 Adjust expectations.
6085 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6086
6087 2001-12-27 Akim Demaille <akim@epita.fr>
6088
6089 * configure.in: Check the protos of strchr ans strspn.
6090 Replace strchr if needed.
6091 * src/system.h: Provide the protos of strchr, strspn and memchr if
6092 missing.
6093 * lib/strchr.c: New.
6094 * src/reader.c (symbols_save): Use strchr.
6095
6096 2001-12-27 Akim Demaille <akim@epita.fr>
6097
6098 * src/print.c, src/print_graph.c (escape): New.
6099 Use it to quote the TAGS outputs.
6100 * src/print_graph.c (print_state): Now errors are in red, and
6101 reductions in green.
6102 Prefer high to wide: output the state number on a line of its own.
6103
6104 2001-12-27 Akim Demaille <akim@epita.fr>
6105
6106 * src/state.h, src/state.c (reductions_new): New.
6107 * src/LR0.c (set_state_table): Let all the states have a
6108 `reductions', even if reduced to 0.
6109 (save_reductions): Adjust.
6110 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6111 * src/print.c (print_reductions, print_actions): Adjust.
6112 * src/output.c (action_row): Adjust.
6113
6114 2001-12-27 Akim Demaille <akim@epita.fr>
6115
6116 * src/state.h, src/state.c (errs_new, errs_dup): New.
6117 * src/LR0.c (set_state_table): Let all the states have an errs,
6118 even if reduced to 0.
6119 * src/print.c (print_errs, print_reductions): Adjust.
6120 * src/output.c (output_actions, action_row): Adjust.
6121 * src/conflicts.c (resolve_sr_conflict): Adjust.
6122
6123 2001-12-27 Akim Demaille <akim@epita.fr>
6124
6125 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6126
6127 2001-12-27 Akim Demaille <akim@epita.fr>
6128
6129 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6130 * src/print.c: here.
6131 (lookaheadset, shiftset): New, used as additional storage by
6132 print_reductions.
6133 (print_results): Adjust.
6134 (print_shifts, print_gotos, print_errs): New, extracted from...
6135 (print_actions): here.
6136 * src/print_graph.c (print_actions): Remove dead code.
6137
6138 2001-12-27 Akim Demaille <akim@epita.fr>
6139
6140 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6141 `$n' and `@n'.
6142
6143 2001-12-27 Akim Demaille <akim@epita.fr>
6144
6145 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6146 (build_relations): Adjust.
6147
6148 2001-12-27 Akim Demaille <akim@epita.fr>
6149
6150 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6151 duplication.
6152
6153 2001-12-27 Akim Demaille <akim@epita.fr>
6154
6155 * src/reader.c (packgram): Catch nitems overflows.
6156
6157 2001-12-27 Akim Demaille <akim@epita.fr>
6158
6159 * src/files.c, src/files.h (guard_obstack): Remove.
6160 * src/output.c (output): Adjust.
6161 * src/reader.c (parse_braces): New, factoring...
6162 (copy_action, copy_guard): these two which are renamed as...
6163 (parse_action, parse_guard): these.
6164 As a voluntary consequence, using braces around guards is now
6165 mandatory.
6166
6167 2001-12-27 Akim Demaille <akim@epita.fr>
6168
6169 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6170 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6171 members.
6172 (symbol_list_new): Adjust.
6173 (copy_action): action_line is the first line, not the last.
6174 (copy_guard): Just as for actions, store the `action' only, not
6175 the switch/case/break flesh.
6176 Don't parse the user action that might follow the guard, let...
6177 (readgram): do it, i.e., now, there can be an action after a
6178 guard.
6179 In other words the guard is just explicitly optional.
6180 (packgram): Adjust.
6181 * src/output.c (guards_output): New.
6182 (output_parser): Call it when needed.
6183 (output): Also free the guard and attrs obstacks.
6184 * src/files.c, src/files.h (obstack_save): Remove.
6185 (output_files): Remove.
6186 As a result, if one needs the former `.act' file, using an
6187 appropriate skeleton which requires actions and guards is now
6188 required.
6189 * src/main.c (main): Adjust.
6190 * tests/semantic.at: New.
6191 * tests/regression.at: Use `input.y' as input file name.
6192 Avoid 8+3 problems by requiring input.c when the test needs the
6193 parser.
6194
6195 2001-12-27 Akim Demaille <akim@epita.fr>
6196
6197 * src/reader.c (symbol_list_new): Be sure to initialize all the
6198 fields.
6199
6200 2001-12-27 Akim Demaille <akim@epita.fr>
6201
6202 All the hacks using a final pseudo state are now useless.
6203
6204 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6205 * src/lalr.c (nLA): New.
6206 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6207 instead of lookaheadsp from the pseudo state (nstate + 1).
6208
6209 2001-12-27 Akim Demaille <akim@epita.fr>
6210
6211 * src/output.c (action_row, token_actions): Use a state_t instead
6212 of a integer, and nlookaheads instead of the following state's
6213 lookaheadsp.
6214
6215 2001-12-27 Akim Demaille <akim@epita.fr>
6216
6217 * src/conflicts.c (log_resolution, flush_shift)
6218 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6219 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6220 (conflicts_print, print_reductions): Use a state_t instead of an
6221 integer when referring to a state.
6222 As much as possible, depend upon nlookaheads, instead of the
6223 `lookaheadsp' member of the following state (since lookaheads of
6224 successive states are successive, the difference between state n + 1
6225 and n served as the number of lookaheads for state n).
6226 * src/lalr.c (add_lookback_edge): Likewise.
6227 * src/print.c (print_core, print_actions, print_state)
6228 (print_results): Likewise.
6229 * src/print_graph.c (print_core, print_actions, print_state)
6230 (print_graph): Likewise.
6231 * src/conflicts.h: Adjust.
6232
6233 2001-12-27 Akim Demaille <akim@epita.fr>
6234
6235 * src/bison.hairy: Formatting/comment changes.
6236 ANSIfy.
6237 Remove `register' indications.
6238 Add plenty of `static'.
6239
6240 2001-12-27 Akim Demaille <akim@epita.fr>
6241
6242 * src/output.c (prepare): Drop the muscle `ntbase' which
6243 duplicates ntokens.
6244 * src/bison.simple: Formatting/comment changes.
6245 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6246 is an undocumented synonym.
6247
6248 2001-12-22 Akim Demaille <akim@epita.fr>
6249
6250 * src/output.c (output_table_data): Change the prototype to use
6251 `int' for array ranges: some invocations do pass an int, not a
6252 short.
6253 Reported by Wayne Green.
6254
6255 2001-12-22 Akim Demaille <akim@epita.fr>
6256
6257 Some actions of web2c.y are improperly triggered.
6258 Reported by Mike Castle.
6259
6260 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6261 * tests/regression.at (Web2c): Rename as...
6262 (Web2c Report): this.
6263 (Web2c Actions): New.
6264
6265 2001-12-22 Akim Demaille <akim@epita.fr>
6266
6267 Reductions in web2c.y are improperly reported.
6268 Reported by Mike Castle.
6269
6270 * src/conflicts.c (print_reductions): Fix.
6271 * tests/regression.at (Web2c): New.
6272
6273 2001-12-18 Akim Demaille <akim@epita.fr>
6274
6275 Some host fail on `assert (!"foo")', which expands to
6276 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6277 Reported by Nelson Beebee.
6278
6279 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6280 `#define it_succeeded 0' and `assert (it_succeeded)'.
6281
6282 2001-12-17 Marc Autret <autret_m@epita.fr>
6283
6284 * src/bison.simple: Don't hard code the skeleton line and filename.
6285 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6286 New line counter 'skeleton_line' (skeleton-line muscle).
6287
6288 2001-12-17 Paul Eggert <eggert@twinsun.com>
6289
6290 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6291 YYDEBUG must be defined to a nonzero value.
6292
6293 * src/bison.simple (yytname): Do not assume that the user defines
6294 YYDEBUG to a properly parenthesized expression.
6295
6296 2001-12-17 Akim Demaille <akim@epita.fr>
6297
6298 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6299 nlookaheads is a new member.
6300 Adjust all users.
6301 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6302 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6303 state.
6304
6305 2001-12-17 Akim Demaille <akim@epita.fr>
6306
6307 * src/files.h, src/files.c (open_files, close_files): Remove.
6308 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6309 let...
6310 * src/reader.c (reader): Do it.
6311
6312 2001-12-17 Akim Demaille <akim@epita.fr>
6313
6314 * src/conflicts.c (print_reductions): Formatting changes.
6315
6316 2001-12-17 Akim Demaille <akim@epita.fr>
6317
6318 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6319 (flush_reduce): New.
6320 (resolve_sr_conflict): Adjust.
6321
6322 2001-12-17 Akim Demaille <akim@epita.fr>
6323
6324 * src/output.c (output_obstack): Be static and rename as...
6325 (format_obstack): this, to avoid any confusion with files.c's
6326 output_obstack.
6327 * src/reader.h (muscle_obstack): Move to...
6328 * src/output.h: here, since it's defined in output.c.
6329
6330 2001-12-17 Akim Demaille <akim@epita.fr>
6331
6332 * src/output.c (action_row, save_column, default_goto)
6333 (sort_actions, matching_state, pack_vector): Better variable
6334 locality.
6335
6336 2001-12-17 Akim Demaille <akim@epita.fr>
6337
6338 * src/output.c: Various formatting changes.
6339
6340 2001-12-17 Akim Demaille <akim@epita.fr>
6341
6342 * src/files.c (output_files): Free the output_obstack.
6343 * src/main.c (main): Call print and print_graph conditionally.
6344 * src/print.c (print): Work unconditionally.
6345 * src/print_graph.c (print_graph): Work unconditionally.
6346 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6347
6348 2001-12-16 Marc Autret <autret_m@epita.fr>
6349
6350 * src/output.c (actions_output): Fix. When we use %no-lines,
6351 there is one less line per action.
6352
6353 2001-12-16 Marc Autret <autret_m@epita.fr>
6354
6355 * src/bison.simple: Remove a useless #line directive.
6356 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6357 * src/output.c (get_lines_number): New.
6358 (output_parser): Adjust, now takes care about the lines of a
6359 output muscles.
6360 Fix line numbering.
6361 (actions_output): Computes the number of lines taken by actions.
6362 (output_master_parser): Insert new skeleton which is the name of
6363 the output parser file name.
6364
6365 2001-12-15 Marc Autret <autret_m@epita.fr>
6366
6367 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6368
6369 2001-12-15 Marc Autret <autret_m@epita.fr>
6370
6371 * src/output.c (output_gram): Keep track of the hairy one.
6372
6373 2001-12-15 Akim Demaille <akim@epita.fr>
6374
6375 Make `make distcheck' work.
6376
6377 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6378 system.h which uses libgettext.h.
6379
6380 2001-12-15 Akim Demaille <akim@epita.fr>
6381
6382 * src/nullable.c (set_nullable): Useless rules must be skipped,
6383 otherwise, since we range over their symbols, we might look at a
6384 nonterminal which no longer ``exists'', i.e., it is not counted in
6385 `nvars', hence we overflow our arrays.
6386
6387 2001-12-15 Akim Demaille <akim@epita.fr>
6388
6389 The header can also be produced directly, without any obstack!
6390 Yahoo!
6391
6392 * src/files.c, src/files.h (defines_obstack): Remove.
6393 (compute_header_macro): Global.
6394 (defines_obstack_save): Remove.
6395 * src/reader.c (parse_union_decl): No longer output to
6396 defines_obstack: its content can be found in the `stype' muscle
6397 anyway.
6398 (output_token_translations): Merge into...
6399 (symbols_output): this.
6400 Rename as...
6401 (symbols_save): this.
6402 (reader): Adjust.
6403 * src/output.c (header_output): New.
6404 (output): Call it.
6405
6406 2001-12-15 Akim Demaille <akim@epita.fr>
6407
6408 * src/reader.c (parse_union_decl): Instead of handling two obstack
6409 simultaneously, use one to define the `stype' muscle, and use the
6410 value of the latter to fill defines_obstack.
6411 (copy_comment): Remove.
6412 (copy_comment2): Work for a single obstack.
6413 Rename as...
6414 (copy_comment): this.
6415
6416 2001-12-15 Akim Demaille <akim@epita.fr>
6417
6418 * src/lex.c, src/lex.h (xgetc): No longer static.
6419 * src/reader.c (parse_union_decl): Revamp.
6420
6421 2001-12-15 Akim Demaille <akim@epita.fr>
6422
6423 Still making progress in separating Bison into (i) input, (ii)
6424 process, (iii) output: now we can directly output the parser file
6425 without using table_obstack at all.
6426
6427 * src/files.c, src/files.h (table_obstack): Bye bye.
6428 (parser_file_name): New.
6429 * src/files.c (compute_output_file_names): Compute it.
6430 * src/output.c (actions_output, output_parser)
6431 (output_master_parser): To a file instead of an obstack.
6432
6433 2001-12-15 Akim Demaille <akim@epita.fr>
6434
6435 Attach actions to rules, instead of pre-outputting them to
6436 actions_obstack.
6437
6438 * src/gram.h (rule_t): action and action_line are new members.
6439 * src/reader.c (symbol_list): Likewise.
6440 (copy_action): Save the actions within the rule.
6441 (packgram): Save them in rule_table.
6442 * src/output.c (actions_output): New.
6443 (output_parser): Use it on `%%actions'.
6444 (output_rule_data): Don't free rule_table.
6445 (output): Do it.
6446 (prepare): Don't save the `action' muscle.
6447 * src/bison.simple: s/%%action/%%actions/.
6448
6449 2001-12-15 Akim Demaille <akim@epita.fr>
6450
6451 * src/reader.c (copy_action): When --yacc, don't append a `;'
6452 to the user action: let it fail if lacking.
6453 Suggested by Arnold Robbins and Tom Tromey.
6454
6455 2001-12-14 Akim Demaille <akim@epita.fr>
6456
6457 * src/lex.c (literalchar): Simply return the char you decoded, non
6458 longer mess around with obstacks and int pointers.
6459 Adjust all callers.
6460
6461 2001-12-14 Akim Demaille <akim@epita.fr>
6462
6463 * src/lex.c (literalchar): Don't escape the special characters,
6464 just decode them, and keep them as char (before, eol was output as
6465 the 2 char string `\n' etc.).
6466 * src/output.c (output_rule_data): Use quotearg to output the
6467 token strings.
6468
6469 2001-12-13 Paul Eggert <eggert@twinsun.com>
6470
6471 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6472 Do not infringe on the global user namespace when using C++.
6473 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6474 All uses of `fprintf' and `stderr' changed.
6475
6476 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6477
6478 2001-12-13 Akim Demaille <akim@epita.fr>
6479
6480 The computation of nullable is broken: it doesn't handle empty
6481 RHS's properly.
6482
6483 * tests/torture.at (GNU AWK Grammar): New.
6484 * tests/sets.at (Nullable): New.
6485 * src/nullable.c (set_nullable): Instead of blindly looping over
6486 `ritems', loop over the rules, and then over their rhs's.
6487
6488 Work around Autotest bugs.
6489
6490 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6491 frame, because Autotest understand lines starting with a `+' as
6492 traces from the shell. Then, they are not processed properly.
6493 Admittedly an Autotest bug, but we don't have time to wait for
6494 Autotest to catch up.
6495 * tests/regression.at (Broken Closure): Adjust to the new table
6496 frames.
6497 Move to...
6498 * tests/sets.at: here.
6499
6500 2001-12-13 Akim Demaille <akim@epita.fr>
6501
6502 * src/closure.c (closure): Use nrules instead of playing tricks
6503 with BITS_PER_WORD.
6504
6505 2001-12-13 Akim Demaille <akim@epita.fr>
6506
6507 * src/print.c (print_actions): Output the handling of `$' as the
6508 traces do: shifting the token EOF. Before EOF was treated as a
6509 nonterminal.
6510 * tests/regression.at: Adjust some tests.
6511 * src/print_graph.c (print_core): Complete the set of items via
6512 closure. The next-to-final and final states are still unsatisfying,
6513 but that's to be addressed elsewhere.
6514 No longer output the rule numbers, but do output the state number.
6515 A single loop for the shifts + gotos is enough, but picked a
6516 distinct color for each.
6517 (print_graph): Initialize and finalize closure.
6518
6519 2001-12-13 Akim Demaille <akim@epita.fr>
6520
6521 * src/reader.c (readgram): Remove dead code, an strip useless
6522 braces.
6523 (get_type): Remove, unused.
6524
6525 2001-12-12 Akim Demaille <akim@epita.fr>
6526
6527 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6528 on that of lib/error.c.
6529
6530 2001-12-12 Akim Demaille <akim@epita.fr>
6531
6532 Some hosts don't like `/' in includes.
6533
6534 * src/system.h: Include libgettext.h without qualifying the path.
6535 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6536 $(top_srcdir).
6537
6538 2001-12-11 Marc Autret <autret_m@epita.fr>
6539
6540 * src/output.c (output_parser): Remove useless muscle.
6541
6542 2001-12-11 Marc Autret <autret_m@epita.fr>
6543
6544 * src/bison.simple: Remove #line just before %%epilogue. It
6545 is now handled in ...
6546 * src/reader.c (read_additionnal_code): Add the output of a
6547 #line for the epilogue.
6548
6549 2001-12-10 Marc Autret <autret_m@epita.fr>
6550
6551 * src/reader.c (copy_definition): Re-use CPP-outed code which
6552 replace precedent remove.
6553 * src/bison.simple: Remove #line before %%prologue because
6554 %%input-line is wrong at this time.
6555
6556 2001-12-10 Marc Autret <autret_m@epita.fr>
6557
6558 * src/reader.c (symbols_output): Clean up.
6559 * src/output.c (output_gram, output): Clean up.
6560
6561 2001-12-10 Akim Demaille <akim@epita.fr>
6562
6563 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6564 * src/LR0.c (set_state_table): here.
6565 * src/lalr.c (lalr): Call it.
6566
6567 2001-12-10 Akim Demaille <akim@epita.fr>
6568
6569 * src/state.h (shifts): Remove the `number' member: shifts are
6570 attached to state, hence no longer need to be labelled with a
6571 state number.
6572
6573 2001-12-10 Akim Demaille <akim@epita.fr>
6574
6575 Now that states have a complete set of members, the linked list of
6576 shifts is useless: just fill directly the state's shifts member.
6577
6578 * src/state.h (shifts): Remove the `next' member.
6579 * src/LR0.c (first_state, last_state): Remove.
6580 Adjust the callers.
6581 (augment_automaton): Don't look for the shifts that must be added
6582 a shift on EOF: it is those of the state we looked for! But now,
6583 since shifts are attached, it is no longer needed to looking
6584 merely by its id: its number.
6585
6586 2001-12-10 Akim Demaille <akim@epita.fr>
6587
6588 * src/LR0.c (augment_automaton): Better variable locality.
6589 Remove an impossible branch: if there is a state corresponding to
6590 the start symbol being shifted, then there is shift for the start
6591 symbol from the initial state.
6592
6593 2001-12-10 Akim Demaille <akim@epita.fr>
6594
6595 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6596 only when appropriate: when insert_start_shifting_state' is not
6597 invoked.
6598 * tests/regression.at (Rule Line Numbers): Adjust.
6599
6600 2001-12-10 Akim Demaille <akim@epita.fr>
6601
6602 * src/LR0.c (augment_automaton): Now that all states have shifts,
6603 merge the two cases addition shifts to the initial state.
6604
6605 2001-12-10 Akim Demaille <akim@epita.fr>
6606
6607 * src/lalr.c (set_state_table): Move to...
6608 * src/LR0.c: here.
6609 * src/lalr.c (lalr): Don't call it...
6610 * src/LR0.c (generate_states): do it.
6611 * src/LR0.h (first_state): Remove, only the table is used.
6612
6613 2001-12-10 Akim Demaille <akim@epita.fr>
6614
6615 * src/LR0.h (first_shift, first_reduction): Remove.
6616 * src/lalr.c: Don't use first_shift: find shifts through the
6617 states.
6618
6619 2001-12-10 Akim Demaille <akim@epita.fr>
6620
6621 * src/LR0.c: Attach shifts to states as soon as they are
6622 computed.
6623 * src/lalr.c (set_state_table): Instead of assigning shifts to
6624 state, just assert that the mapping was properly done.
6625
6626 2001-12-10 Akim Demaille <akim@epita.fr>
6627
6628 * src/LR0.c (insert_start_shift): Rename as...
6629 (insert_start_shifting_state): this.
6630 (insert_eof_shifting_state, insert_accepting_state): New.
6631 (augment_automaton): Adjust.
6632 Better locality of the variables.
6633 When looking if the start_symbol is shifted from the initial
6634 state, using `while (... symbol != start_symbol ...)' sounds
6635 better than `while (... symbol < start_symbol ...)': If fail
6636 to see how the order between symbols could be relevant!
6637
6638 2001-12-10 Akim Demaille <akim@epita.fr>
6639
6640 * src/getargs.h: Don't declare `spec_name_prefix' and
6641 `spec_file_prefix', declared by src/files.h.
6642 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6643 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6644 * src/output.c (prepare): Adjust.
6645 * src/reader.c (symbols_output): Likewise.
6646 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6647
6648 2001-12-10 Akim Demaille <akim@epita.fr>
6649
6650 * src/muscle_tab.c (muscle_init): NULL is a better default than
6651 `"0"'.
6652
6653 2001-12-10 Akim Demaille <akim@epita.fr>
6654
6655 * src/reader.c (reader): Calling symbols_output once is enough.
6656
6657 2001-12-10 Akim Demaille <akim@epita.fr>
6658
6659 Now that states have a complete set of members, the linked list of
6660 reductions is useless: just fill directly the state's reductions
6661 member.
6662
6663 * src/state.h (struct reductions): Remove member `number' and
6664 `next'.
6665 * src/LR0.c (first_reduction, last_reduction): Remove.
6666 (save_reductions): Don't link the new reductions, store them in
6667 this_state.
6668 * src/lalr.c (set_state_table): No need to attach reductions to
6669 states, it's already done.
6670 * src/output.c (output_actions): No longer free the shifts, then
6671 the reductions, then the states: free all the states and their
6672 members.
6673
6674 2001-12-10 Akim Demaille <akim@epita.fr>
6675
6676 * src/options.c (OPTN, DRTV, BOTH): New.
6677 (option_table): Use them.
6678
6679 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6680 the job of system.h.
6681 * src/options.c: Don't include stdio.h and xalloc.h for the same
6682 reasons.
6683
6684 2001-12-10 Akim Demaille <akim@epita.fr>
6685
6686 * src/output.c (output, prepare): Make sure the values of the
6687 muscles `action' and `prologue' are 0-terminated.
6688
6689 2001-12-10 Akim Demaille <akim@epita.fr>
6690
6691 Clean up GCC warnings.
6692
6693 * src/reader.c (copy_action): `buf' is not used.
6694 (parse_skel_decl): Be static.
6695 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6696 * src/options.h (create_long_option_table): Have a real prototype.
6697 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6698 (hash_delete_at): Return const void *.
6699 Adjust casts to preserve the const.
6700
6701 2001-12-10 Akim Demaille <akim@epita.fr>
6702
6703 * configure.in: Require 2.52g.
6704 M4 is not needed, but AUTOM4TE is.
6705 * m4/m4.m4: Remove.
6706 * tests/Makefile.am: Adjust.
6707
6708 2001-12-10 Akim Demaille <akim@epita.fr>
6709
6710 One structure for states is enough, even though theoretically
6711 there are LR(0) states and LALR(1) states.
6712
6713 * src/lalr.h (state_t): Remove.
6714 (state_table): Be state_t **, not state_t *.
6715 * src/state.h (core, CORE_ALLOC): Rename as...
6716 (state_t, STATE_ALLOC): this.
6717 Add the LALR(1) members: shifts, reductions, errs.
6718 * src/LR0.c (state_table): Rename as...
6719 (state_hash): this, to avoid name clashes with the global
6720 `state_table'.
6721 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6722 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6723
6724 2001-12-10 Akim Demaille <akim@epita.fr>
6725
6726 Bison dumps core on bash.y.
6727 Reported by Pascal Bart.
6728
6729 * src/warshall.c (bitmatrix_print): New.
6730 (TC): Use it.
6731 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6732 j must be the outer loop.
6733 * tests/regression.at (Broken Closure): New.
6734
6735 2001-12-05 Akim Demaille <akim@epita.fr>
6736
6737 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6738 its argument.
6739 Reported by Peter HĆ”morskĆ½.
6740
6741 2001-12-05 Akim Demaille <akim@epita.fr>
6742
6743 * src/conflicts.c (err_table): Remove.
6744 (resolve_sr_conflict): Adjust.
6745 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6746 Rename as...
6747 (state_t.reductions, state_t.shifts): this.
6748
6749 2001-12-05 Akim Demaille <akim@epita.fr>
6750
6751 * src/reduce.c (reduce_grammar_tables): No longer disable the
6752 removal of useless rules via CPP but via `if (0)', so that the
6753 compiler still check the code is valid.
6754 For instance, it should have noticed `rline' no longer exists: use
6755 the `line' member of rule_t.
6756 * src/gram.c (dummy, rline): Remove, unused.
6757
6758 2001-12-05 Akim Demaille <akim@epita.fr>
6759
6760 * src/output.c (pack_vector): Use assert, not berror.
6761 * src/main.c (berror): Remove, unused.
6762
6763 2001-12-05 Akim Demaille <akim@epita.fr>
6764
6765 New experimental feature: if --verbose --trace output all the
6766 items of a state, not only its kernel.
6767
6768 * src/print.c (print_core): If `trace_flag', then invoke closure
6769 before outputting the items of the state (print_core is no longer
6770 a correct name them).
6771 (print_results): Invoke new_closure/free_closure if needed.
6772
6773 2001-12-05 Akim Demaille <akim@epita.fr>
6774
6775 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6776 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6777 (nitemset): for consistency with the rest of the project.
6778
6779 2001-12-05 Akim Demaille <akim@epita.fr>
6780
6781 * src/closure.c (print_closure): Improve.
6782 (closure): Use it for printing input and output.
6783
6784 2001-12-05 Akim Demaille <akim@epita.fr>
6785
6786 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6787 indexed by nonterminals.
6788
6789 2001-12-05 Akim Demaille <akim@epita.fr>
6790
6791 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6792 what it was!).
6793 * src/warshall.h: Remove accidental duplication of the content.
6794
6795 2001-12-05 Akim Demaille <akim@epita.fr>
6796
6797 * src/closure.c (set_fderives): De-obfuscate.
6798
6799 2001-12-05 Akim Demaille <akim@epita.fr>
6800
6801 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6802
6803 2001-12-05 Akim Demaille <akim@epita.fr>
6804
6805 * src/closure.c (set_firsts): De-obfuscate.
6806
6807 2001-12-05 Akim Demaille <akim@epita.fr>
6808
6809 * src/output.c (action_row): De-obfuscate
6810 using the good o' techniques: arrays not pointers, variable
6811 locality, BITISSET, RESETBIT etc.
6812
6813 2001-12-05 Akim Demaille <akim@epita.fr>
6814
6815 Pessimize the code to simplify it: from now on, all the states
6816 have a valid SHIFTS, which NSHIFTS is possibly 0.
6817
6818 * src/LR0.c (shifts_new): Be global and move to..
6819 * src/state.c, src/state.h: here.
6820 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6821 * src/print_graph: Adjust.
6822
6823 2001-12-05 Akim Demaille <akim@epita.fr>
6824
6825 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6826 * src/conflicts.c: Use it.
6827 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6828 incorrectly ``simplified''.
6829
6830 2001-12-05 Akim Demaille <akim@epita.fr>
6831
6832 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6833 using the good o' techniques: arrays not pointers, variable
6834 locality, BITISSET, RESETBIT etc.
6835
6836 2001-12-05 Akim Demaille <akim@epita.fr>
6837
6838 * src/state.h (SHIFT_SYMBOL): New.
6839 * src/conflicts.c: Use it to deobfuscate.
6840
6841 2001-12-05 Akim Demaille <akim@epita.fr>
6842
6843 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6844 (print_reductions): De-obfuscate using the good o' techniques:
6845 arrays not pointers, variable locality, BITISSET.
6846
6847 2001-12-05 Akim Demaille <akim@epita.fr>
6848
6849 * src/conflicts.c (print_reductions): Arrays, not pointers.
6850 Use BITISSET.
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/conflicts.c (print_reductions): Pessimize, but clarify.
6863
6864 2001-12-05 Akim Demaille <akim@epita.fr>
6865
6866 * src/conflicts.c (print_reductions): Improve variable locality.
6867
6868 2001-12-05 Akim Demaille <akim@epita.fr>
6869
6870 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6871 * src/lalr.c: Use them.
6872
6873 2001-12-05 Akim Demaille <akim@epita.fr>
6874
6875 * src/LR0.c (augment_automaton): Formatting changes.
6876 Better variable locality.
6877
6878 2001-12-05 Akim Demaille <akim@epita.fr>
6879
6880 * src/lalr.c (matrix_print): New.
6881 (transpose): Use it.
6882 Use arrays instead of pointers.
6883
6884 2001-12-05 Akim Demaille <akim@epita.fr>
6885
6886 * src/lalr.c (maxrhs): Move to...
6887 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6888 * src/lalr.c (build_relations): Adjust.
6889
6890 2001-12-05 Akim Demaille <akim@epita.fr>
6891
6892 * src/lalr.c (transpose): Free the memory allocated to the
6893 argument, as it is replaced by the results by the unique caller.
6894 (build_relations): Merely invoke transpose: it handles the memory
6895 deallocation.
6896 Improve variable locality.
6897 Avoid variables used as mere abbreviations.
6898 (compute_lookaheads): Use arrays instead of pointers.
6899
6900 2001-12-05 Akim Demaille <akim@epita.fr>
6901
6902 * src/lalr.c (initialize_F): Improve variable locality.
6903 Avoid variables used as mere abbreviations.
6904
6905 2001-12-05 Akim Demaille <akim@epita.fr>
6906
6907 * src/derives.c (print_derives): Display the ruleno.
6908 * src/lalr.c (initialize_F, transpose): Better variable locality
6909 to improve readability.
6910 Avoid variables used as mere abbreviations.
6911
6912 2001-12-05 Akim Demaille <akim@epita.fr>
6913
6914 * src/lalr.c (traverse): Use arrays instead of pointers.
6915
6916 2001-12-05 Akim Demaille <akim@epita.fr>
6917
6918 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
6919 the handling of squeue.
6920 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6921
6922 2001-12-05 Akim Demaille <akim@epita.fr>
6923
6924 Because useless nonterminals are now kept alive (instead of being
6925 `destroyed'), we now sometimes examine them, and store information
6926 related to them. Hence we need to know their number, and adjust
6927 memory allocations.
6928
6929 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
6930 static.
6931 * src/LR0.c (allocate_itemsets): The memory allocated to
6932 `symbol_count' was used for two different purpose: once to count
6933 the number of occurrences of each symbol, and later reassigned to
6934 `shift_symbol', containing the symbol that can be shifted from a
6935 given state.
6936 Deobfuscate, i.e., allocate, use and free `symbol_count' here
6937 only, and...
6938 (new_itemsets): Allocate `shift_symbol' here.
6939 (allocate_itemsets): symbol_count includes useless nonterminals.
6940 Make room for them.
6941 (free_storage): Use `free', not `XFREE', for pointers that cannot
6942 be null.
6943
6944 2001-12-05 Akim Demaille <akim@epita.fr>
6945
6946 * src/nullable.c (set_nullable): Deobfuscate the handling of
6947 ritem.
6948 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6949
6950 2001-12-05 Akim Demaille <akim@epita.fr>
6951
6952 * src/gram.c, src/gram.h (ritem_print): New.
6953 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
6954 (This useless function was defined only to work around VMS linkers
6955 that can't handle compilation units with variables only).
6956 * src/reduce.c (dump_grammar): Use it to trace the construction of
6957 ritem.
6958
6959 2001-12-04 Paul Eggert <eggert@twinsun.com>
6960
6961 * src/bison.simple (union yyalloc): Change member names
6962 to be the same as the stack names.
6963 (yyparse): yyptr is now union yyalloc *, not char *.
6964 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
6965 and may generate better code on some machines.
6966 (yystpcpy): Use prototype if __STDC__ is defined, not just
6967 if __cplusplus is defined.
6968
6969 2001-11-30 Akim Demaille <akim@epita.fr>
6970
6971 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
6972 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
6973 Gettext doesn't compile cleanly, and dies with -Werror.
6974 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
6975 Include WARNING_CFLAGS here.
6976 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
6977 before being defined.
6978
6979 2001-11-27 Paul Eggert <eggert@twinsun.com>
6980
6981 * lib/quotearg.h (quotearg_n, quotearg_n_style):
6982 First arg is int, not unsigned.
6983 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
6984 (SIZE_MAX, UINT_MAX): New macros.
6985 (quotearg_n_options): Abort if N is negative.
6986 Avoid overflow check on hosts where size_t is 64 bits and int
6987 is 32 bits, as overflow is impossible there.
6988 Fix off-by-one typo that caused unnecessary reallocation.
6989
6990 2001-11-29 Paul Eggert <eggert@twinsun.com>
6991
6992 Name space cleanup in generated parser.
6993
6994 * doc/bison.texinfo (Bison Parser): Discuss system headers
6995 and their effect on the user name space.
6996
6997 * src/bison.simple:
6998 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
6999 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7000 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7001
7002 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7003 on user names when possible.
7004
7005 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7006 Simplify test for whather <alloca.h> exists.
7007
7008 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7009
7010 (<stdio.h>): Include if YYDEBUG.
7011
7012 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7013 ! defined (yyoverflow) && ! defined (yymemcpy).
7014
7015 (yymemcpy, yyparse): Rename local variables as needed so that
7016 they all begin with 'yy'.
7017
7018 (yystrlen, yystpcpy): New functions.
7019
7020 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7021 All uses changed.
7022
7023 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7024 instead of relying on string.h functions. Use YYSTACK_ALLOC
7025 and YYSTACK_FREE instead of malloc and free.
7026
7027 2001-11-30 Akim Demaille <akim@epita.fr>
7028
7029 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7030 before their first uses.
7031 (YYBISON, YYPURE): Move to the top of the output.
7032
7033 2001-11-30 Akim Demaille <akim@epita.fr>
7034
7035 * tests/reduce.at (Useless Nonterminals): Fix.
7036
7037 2001-11-30 Akim Demaille <akim@epita.fr>
7038
7039 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7040 if body instead of `;' to pacify GCC's warnings.
7041
7042 2001-11-30 Akim Demaille <akim@epita.fr>
7043
7044 Instead of mapping the LHS of unused rules to -1, keep the LHS
7045 valid, but flag the rules as invalid.
7046
7047 * src/gram.h (rule_t): `useful' is a new member.
7048 * src/print.c (print_grammar): Adjust.
7049 * src/derives.c (set_derives): Likewise.
7050 * src/reader.c (packgram, reduce_output): Likewise.
7051 * src/reduce.c (reduce_grammar_tables): Likewise.
7052 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7053
7054 2001-11-30 Akim Demaille <akim@epita.fr>
7055
7056 * src/reduce.c (reduce_output): Formatting changes.
7057 * src/print.c (print_results, print_grammar): Likewise.
7058 * tests/regression.at (Rule Line Numbers)
7059 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7060
7061 2001-11-30 Akim Demaille <akim@epita.fr>
7062
7063 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7064 useless nonterminals, move them at the end of the symbol arrays.
7065 (reduce_output): Adjust.
7066 * tests/reduce.at (Useless Nonterminals): Adjust.
7067
7068 2001-11-30 Akim Demaille <akim@epita.fr>
7069
7070 * src/reduce.c: Various comment/formatting changes.
7071 (nonterminals_reduce): New, extracted from...
7072 (reduce_grammar_tables): here.
7073 (reduce_grammar): Call nonterminals_reduce.
7074
7075 2001-11-29 Paul Eggert <eggert@twinsun.com>
7076
7077 * src/bison.simple (YYSTACK_REALLOC): Remove.
7078 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7079 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7080 New macros.
7081 (union yyalloc): New type.
7082 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7083 an arbitrary restriction on hosts where size_t is wider than int.
7084
7085 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7086 a parser stack overflow. Allocate just one block of memory for all
7087 three stacks, instead of allocating three blocks; this typically is
7088 faster and reduces fragmentation.
7089
7090 Do not limit the number of items in the stack to a value that fits
7091 in 'int', as this is an arbitrary limit on hosts with 64-bit
7092 size_t and 32-bit int.
7093
7094 2001-11-29 Marc Autret <autret_m@epita.fr>
7095
7096 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7097 of defining YYERROR_VERBOSE.
7098 [AT_DATA]: $4 is now out of C declarations in the prologue.
7099
7100 2001-11-28 Marc Autret <autret_m@epita.fr>
7101
7102 * src/reader.c (parse_dquoted_param): New.
7103 (parse_skel_decl): Use it.
7104 * src/lex.h: Add its prototype.
7105 * src/lex.c (literalchar): Become not static.
7106
7107 2001-11-28 Marc Autret <autret_m@epita.fr>
7108
7109 * src/output.h: And put its extern declaration here.
7110 * src/output.c (error_verbose): Define here.
7111 (prepare): Echo name modification.
7112 * src/getargs.h: Clean its extern declaration.
7113 * src/getargs.c (error_verbose_flag): Remove.
7114 (getargs): Remove case 'e'.
7115 * src/options.c (option_table): 'error-verbose' is now seen as simple
7116 percent option.
7117 Include output.h.
7118
7119 * src/reader.c (read_declarations): Remove case tok_include.
7120 (parse_include_decl): Remove.
7121 * src/lex.h (token_t): Remove tok_include.
7122 * src/options.c (option_table): 'include' is now a simple command line
7123 option.
7124
7125 2001-11-28 Marc Autret <autret_m@epita.fr>
7126
7127 * src/bison.simple: Adjust muscle names.
7128 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7129 * src/output.c (prepare): s/_/-/ for the muscles names.
7130 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7131
7132 2001-11-28 Marc Autret <autret_m@epita.fr>
7133
7134 * src/bison.simple: Fix debug.
7135 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7136
7137 2001-11-28 Akim Demaille <akim@epita.fr>
7138
7139 * src/LR0.c (shifts_new): New.
7140 (save_shifts, insert_start_shift, augment_automaton): Use it.
7141
7142 2001-11-28 Akim Demaille <akim@epita.fr>
7143
7144 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7145 keep ruleno only.
7146
7147 2001-11-28 Akim Demaille <akim@epita.fr>
7148
7149 * src/closure.c (closure): Instead of looping over word in array
7150 then bits in words, loop over bits in array.
7151
7152 2001-11-28 Akim Demaille <akim@epita.fr>
7153
7154 * src/closure.c (closure): No longer optimize the special case
7155 where all the bits of `ruleset[r]' are set to 0, to make the code
7156 clearer.
7157
7158 2001-11-28 Akim Demaille <akim@epita.fr>
7159
7160 * src/closure.c (closure): `r' and `c' are new variables, used to
7161 de-obfuscate accesses to RULESET and CORE.
7162
7163 2001-11-28 Akim Demaille <akim@epita.fr>
7164
7165 * src/reduce.c (reduce_print): Use ngettext.
7166 (dump_grammar): Improve the trace accuracy.
7167
7168 2001-11-28 Akim Demaille <akim@epita.fr>
7169
7170 * src/reduce.c (dump_grammar): Don't translate trace messages.
7171
7172 2001-11-28 Akim Demaille <akim@epita.fr>
7173
7174 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7175 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7176 as all tags are free'ed afterwards.
7177 From Enrico Scholz.
7178
7179 2001-11-27 Paul Eggert <eggert@twinsun.com>
7180
7181 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7182 use alloca when we didn't want to, and vice versa.
7183
7184 2001-11-27 Marc Autret <autret_m@epita.fr>
7185
7186 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7187 initialization.
7188 * src/output.c (prepare): Remove its update.
7189
7190 2001-11-27 Marc Autret <autret_m@epita.fr>
7191
7192 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7193 Use %error-verbose.
7194
7195 2001-11-27 Marc Autret <autret_m@epita.fr>
7196
7197 * src/bison.simple: Remove YYERROR_VERBOSE using.
7198 Use %%error_verbose.
7199 (yyparse): Likewise.
7200 * src/output.c (prepare): Give its final value.
7201 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7202 * src/getargs.h: Add its extern declaration.
7203 * src/getargs.c (error_verbose_flag): New int.
7204 (getargs): Update to catch new case.
7205 * src/options.c (option_table): 'error-verbose' is a new option.
7206 (shortopts): Update.
7207
7208 2001-11-27 Akim Demaille <akim@epita.fr>
7209
7210 * src/system.h: Use intl/libgettext.h.
7211 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7212
7213 2001-11-27 Akim Demaille <akim@epita.fr>
7214
7215 * tests/torture.at (Exploding the Stack Size with Malloc):
7216 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7217
7218 2001-11-27 Akim Demaille <akim@epita.fr>
7219
7220 * src/files.c: Include error.h.
7221 Reported by Hans Aberg.
7222
7223 2001-11-26 Marc Autret <autret_m@epita.fr>
7224
7225 * src/reader.c (parse_include_decl): New, not yet implemented.
7226 (read_declarations): Add case tok_include.
7227 * src/getargs.h (include): Add its extern definition.
7228 * src/getargs.c (include): New const char *.
7229 (getargs): Add case '-I'.
7230 * src/options.c (option_table): Add include as command line and
7231 percent option.
7232 * src/lex.h (token_t): Add tok_include.
7233
7234 2001-11-26 Akim Demaille <akim@epita.fr>
7235
7236 * src/reader.c (readgram): Make sure rules for mid-rule actions
7237 have a lineno equal to that of their host rule.
7238 Reported by Hans Aberg.
7239 * tests/regression.at (Rule Line Numbers): New.
7240
7241 2001-11-26 Akim Demaille <akim@epita.fr>
7242
7243 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7244 size_ts.
7245
7246 2001-11-26 Akim Demaille <akim@epita.fr>
7247
7248 * src/complain.c, src/complain.h (error): Remove, provided by
7249 lib/error.[ch].
7250
7251 2001-11-26 Akim Demaille <akim@epita.fr>
7252
7253 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7254 issue an error message.
7255 * tests/regression.at (Invalid %directive): New.
7256 Reported by Hans Aberg.
7257
7258 2001-11-26 Akim Demaille <akim@epita.fr>
7259
7260 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7261 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7262
7263 2001-11-26 Akim Demaille <akim@epita.fr>
7264
7265 * src/conflicts.c (conflicts_print): Don't complain at all when
7266 there are no reduce/reduce conflicts, and as many shift/reduce
7267 conflicts as expected.
7268 * tests/regression.at (%expect right): Adjust.
7269
7270 2001-11-23 Akim Demaille <akim@epita.fr>
7271
7272 * lib/alloca.c: Update, from fileutils.
7273
7274 2001-11-23 Akim Demaille <akim@epita.fr>
7275
7276 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7277
7278 2001-11-23 Akim Demaille <akim@epita.fr>
7279
7280 * src/system.h: Include alloca.h.
7281 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7282
7283 2001-11-23 Akim Demaille <akim@epita.fr>
7284
7285 * src/print_graph.c (print_actions): Remove `rule', unused.
7286 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7287 pacify GCC's signed < unsigned warnings.
7288 * src/closure.c (itemsetsize): Likewise.
7289 * src/reader.c (symbol_list_new): Static.
7290
7291 2001-11-23 Akim Demaille <akim@epita.fr>
7292
7293 Attaching lineno to buckets is stupid, since only one copy of each
7294 symbol is kept, only the line of the first occurrence is kept too.
7295
7296 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7297 * src/reader.c (rline_allocated): Remove, unused.
7298 (symbol_list): Have a `line' member.
7299 (symbol_list_new): New.
7300 (readgram): Use it.
7301 * src/print.c (print_grammar): Output the rule line numbers.
7302 * tests/regression.at (Solved SR Conflicts)
7303 (Unresolved SR Conflicts): Adjust.
7304 Reported by Hans Aberg.
7305
7306 2001-11-22 Marc Autret <autret_m@epita.fr>
7307
7308 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7309
7310 2001-11-22 Marc Autret <autret_m@epita.fr>
7311
7312 * src/muscle_tab.c (muscle_init): Remove initialization of
7313 skeleton muscle.
7314 * src/output.c (output_master_parser): Do it here.
7315
7316 2001-11-20 Akim Demaille <akim@epita.fr>
7317
7318 * po/sv.po: New.
7319 * configure.in (ALL_LINGUAS): Adjust.
7320 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7321 longer contains strings to translate.
7322
7323 2001-11-19 Akim Demaille <akim@epita.fr>
7324
7325 * src/conflicts.c (conflicts_print): Add a missing \n.
7326
7327 2001-11-19 Akim Demaille <akim@epita.fr>
7328
7329 * src/nullable.c (nullable_print): New.
7330 (set_nullable): Call it when tracing.
7331 Better locality of variables.
7332
7333 2001-11-19 Akim Demaille <akim@epita.fr>
7334
7335 * src/print.c (print_actions): Better locality of variables.
7336
7337 2001-11-19 Akim Demaille <akim@epita.fr>
7338
7339 * src/derives.c (print_derives): Fix and enrich.
7340 * src/closure.c (print_fderives): Likewise.
7341
7342 2001-11-19 Akim Demaille <akim@epita.fr>
7343
7344 * src/closure.c (itemsetend): Remove, replaced with...
7345 (itemsetsize): new.
7346
7347 2001-11-19 Akim Demaille <akim@epita.fr>
7348
7349 * src/LR0.c (kernel_end): Remove, replaced with...
7350 (kernel_size): new.
7351
7352 2001-11-19 Akim Demaille <akim@epita.fr>
7353
7354 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7355 to clarify.
7356
7357 2001-11-19 Akim Demaille <akim@epita.fr>
7358
7359 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7360
7361 2001-11-19 Akim Demaille <akim@epita.fr>
7362
7363 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7364 trace messages.
7365 * src/LR0.c: Likewise.
7366 (allocate_itemsets): Use arrays instead of pointers to clarify.
7367
7368 2001-11-19 Akim Demaille <akim@epita.fr>
7369
7370 * src/getargs.c (statistics_flag): Replace with...
7371 (trace_flag): New.
7372 (longopts): Accept --trace instead of --statistics.
7373 * src/getargs.h, src/options.c: Adjust.
7374 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7375 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7376
7377 2001-11-19 Akim Demaille <akim@epita.fr>
7378
7379 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7380 pointers to clarify the code.
7381 (save_reductions, save_shifts): Factor common parts of alternatives.
7382
7383 2001-11-19 Akim Demaille <akim@epita.fr>
7384
7385 * src/LR0.c (new_state, get_state): Complete TRACE code.
7386 * src/closure.c: Include `reader.h' to get `tags', needed by the
7387 trace code.
7388 Rename the conditional DEBUG as TRACE.
7389 Output consistently TRACEs to stderr, not stdout.
7390 * src/derives.c: Likewise.
7391 * src/reduce.c: (inaccessable_symbols): Using if is better style
7392 than goto.
7393 Use `#if TRACE' instead of `#if 0' for tracing code.
7394
7395 2001-11-19 Akim Demaille <akim@epita.fr>
7396
7397 * src/system.h (LIST_FREE, shortcpy): New.
7398 * src/LR0.c: Use them.
7399 * src/output.c (free_itemsets, free_reductions, free_shifts):
7400 Remove, replaced by LIST_FREE.
7401
7402 2001-11-19 Akim Demaille <akim@epita.fr>
7403
7404 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7405 (REDUCTIONS_ALLOC): New.
7406 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7407 allocation.
7408
7409 2001-11-19 Akim Demaille <akim@epita.fr>
7410
7411 * src/LR0.c (new_state): Complete trace code.
7412 * src/nullable.c (set_nullable): Don't translate traces.
7413
7414 2001-11-19 Akim Demaille <akim@epita.fr>
7415
7416 * src/print_graph.c (print_core): Better locality of variables.
7417 * src/print.c (print_core): Likewise.
7418
7419 2001-11-19 Akim Demaille <akim@epita.fr>
7420
7421 * src/vcg.c: You do the output, so you are responsible of the
7422 handling of VCG syntax, in particular: use quotearg.
7423 * src/print_graph.c: Don't.
7424 (print_actions): Don't output the actions as part of the nodes,
7425 since that's the job of the edges.
7426 (print_state): Don't output by hand: fill the node description,
7427 and ask for its output.
7428
7429 2001-11-19 Akim Demaille <akim@epita.fr>
7430
7431 * src/bison.simple (yyparse): When verbosely reporting an error,
7432 no longer put additional quotes around token names.
7433 * tests/calc.at: Adjust.
7434
7435 2001-11-19 Akim Demaille <akim@epita.fr>
7436
7437 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7438 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7439 * src/output.c: Adjust.
7440
7441 2001-11-19 Akim Demaille <akim@epita.fr>
7442
7443 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7444 (rule_t): this.
7445 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7446
7447 2001-11-19 Akim Demaille <akim@epita.fr>
7448
7449 * src/gram.h (rule_t): New.
7450 (rule_table): New.
7451 (rrhs, rlhs): Remove, part of state_t.
7452 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7453 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7454 * src/reader.c, src/reduce.c: Adjust.
7455
7456 2001-11-19 Akim Demaille <akim@epita.fr>
7457
7458 * src/reader.c (symbols_output): New, extracted from...
7459 (packsymbols): Here.
7460 (reader): Call it.
7461
7462 2001-11-19 Akim Demaille <akim@epita.fr>
7463
7464 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7465 (maxrhs): this new function.
7466
7467 2001-11-19 Akim Demaille <akim@epita.fr>
7468
7469 * src/lalr.c (F): New macro to access the variable F.
7470 Adjust.
7471
7472 2001-11-19 Akim Demaille <akim@epita.fr>
7473
7474 * src/lalr.h (LA): New macro to access the variable LA.
7475 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7476 * src/lalr.c: Adjust.
7477
7478 2001-11-19 Akim Demaille <akim@epita.fr>
7479
7480 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7481 (set_state_table): handle the `lookaheads' members.
7482
7483 2001-11-19 Akim Demaille <akim@epita.fr>
7484
7485 * src/lalr.h (lookaheads): 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 (consistent): Removed array, whose contents is now
7494 a member 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 (reduction_table, shift_table): Removed arrays, whose
7502 contents are now members of...
7503 (state_t): this structure.
7504 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7505 Adjust.
7506
7507 2001-11-19 Akim Demaille <akim@epita.fr>
7508
7509 * src/lalr.h (state_t): New.
7510 (state_table): Be a state_t * instead of a core **.
7511 (accessing_symbol): Remove, part of state_t.
7512 * src/lalr.c: Adjust.
7513 (set_accessing_symbol): Merge into...
7514 (set_state_table): this.
7515 * src/print_graph.c, src/conflicts.c: Adjust.
7516
7517 2001-11-14 Akim Demaille <akim@epita.fr>
7518
7519 * tests/calc.at, tests/output.at, tests/regression.at,
7520 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7521 now the tests are run in private dirs, therefore AC_CLEANUP and
7522 family can be simplified to 0-ary.
7523 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7524 use abs. path to find config.h.
7525 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7526 stderr, there can be way too much random noise.
7527 Instead pass -Werror to GCC and rely on the exit status.
7528 Reported by Wolfram Wagner.
7529
7530 2001-11-14 Akim Demaille <akim@epita.fr>
7531
7532 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7533 defined only if yyoverflow is defined, to avoid `warning: unused
7534 variable `yyvs1''.
7535 Reported by The Test Suite.
7536
7537 2001-11-14 Akim Demaille <akim@epita.fr>
7538
7539 * src/print.c: Include reduce.h.
7540 Reported by Hans Aberg.
7541
7542 2001-11-14 Akim Demaille <akim@epita.fr>
7543
7544 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7545 Revert a previous patch: these are really const.
7546 * src/conflicts.c (conflict_report): Additional useless pair of
7547 braces to pacify GCC's warnings for `if () if () {} else {}'.
7548 * src/lex.c (parse_percent_token): Replace equal_offset with
7549 arg_offset.
7550 arg is const.
7551 Be sure to strdup `arg' when used, since there is no reason for
7552 token_buffer not to change.
7553
7554 2001-11-14 Akim Demaille <akim@epita.fr>
7555
7556 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7557 definition.
7558 * src/main.c (main): Use them.
7559 Suggested by Hans Aberg.
7560
7561 2001-11-12 Akim Demaille <akim@epita.fr>
7562
7563 * src/system.h (ngettext): Now that we use ngettext, be sure to
7564 provide a default definition when NLS are not used.
7565
7566 2001-11-12 Akim Demaille <akim@epita.fr>
7567
7568 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7569 Use @kbd to denote user input.
7570 (Language and Grammar): ANSIfy the example.
7571 Adjust its layout for info/notinfo.
7572 (Location Tracking Calc): Output error messages to stderr.
7573 Output locations in a more GNUtically correct way.
7574 Fix a couple of Englishos.
7575 Adjust @group/@end group pairs.
7576
7577 2001-11-12 Akim Demaille <akim@epita.fr>
7578
7579 %expect was not functioning at all.
7580
7581 * src/conflicts.c (expected_conflicts): Set to -1.
7582 (conflict_report): Use ngettext.
7583 (conflicts_print): Check %expect and make its violation an error.
7584 * doc/bison.texinfo (Expect Decl): Adjust.
7585 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7586 * tests/regression.at (%expect not enough, %expect right)
7587 (%expect too much): New.
7588
7589 2001-11-12 Akim Demaille <akim@epita.fr>
7590
7591 * tests/regression.at (Conflicts): Rename as...
7592 (Unresolved SR Conflicts): this.
7593 (Solved SR Conflicts): New.
7594
7595 2001-11-12 Akim Demaille <akim@epita.fr>
7596
7597 * src/reduce.c (print_results): Rename as...
7598 (reduce_output): This.
7599 Output to OUT, passed as argument, instead of output_obstack.
7600 (dump_grammar): Likewise.
7601 (reduce_free): New.
7602 Also free V1.
7603 (reduce_grammar): No longer call reduce_output, since...
7604 * src/print.c (print_results): do it.
7605 * src/main.c (main): Call reduce_free;
7606
7607 2001-11-12 Akim Demaille <akim@epita.fr>
7608
7609 * src/conflicts.c (print_reductions): Accept OUT as argument.
7610 Output to it, not to output_obstack.
7611 * src/print.c (print_actions): Adjust.
7612
7613 2001-11-12 Akim Demaille <akim@epita.fr>
7614
7615 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7616 the result instead of using...
7617 (src_total, rrc_total, src_count, rrc_count): Remove.
7618 (any_conflicts): Remove.
7619 (print_conflicts): Split into...
7620 (conflicts_print, conflicts_output): New.
7621 * src/conflicts.h: Adjust.
7622 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7623 * src/print.c (print_grammar): Issue `\n' between two rules.
7624 * tests/regression.at (Conflicts): New.
7625 Reported by Tom Lane.
7626
7627 2001-11-12 Akim Demaille <akim@epita.fr>
7628
7629 * tests/regression.at (Invalid input): Remove, duplicate with
7630 ``Invalid input: 1''.
7631
7632 2001-11-12 Akim Demaille <akim@epita.fr>
7633
7634 * tests/torture.at (AT_DATA_STACK_TORTURE)
7635 (Exploding the Stack Size with Alloca)
7636 (Exploding the Stack Size with Malloc): New.
7637
7638 2001-11-12 Akim Demaille <akim@epita.fr>
7639
7640 * src/bison.simple (YYSTACK_REALLOC): New.
7641 (yyparse) [!yyoverflow]: Use it and free the old stack.
7642 Reported by Per Allansson.
7643
7644 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7645
7646 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7647 define CPP macro, which substitute YYSTYPE by yystype.
7648 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7649 with yyltype/YYLTYPE. This allows inclusion of the generated
7650 header within the parser if the compiler, such as GGC, accepts
7651 multiple equivalent #defines.
7652 From Akim.
7653
7654 2001-11-05 Akim Demaille <akim@epita.fr>
7655
7656 * src/reader.c (symbols_output): New, extracted from...
7657 (packsymbols): here.
7658 (reader): Adjust.
7659
7660 2001-11-05 Akim Demaille <akim@epita.fr>
7661
7662 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7663
7664 2001-11-05 Akim Demaille <akim@epita.fr>
7665
7666 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7667 pattern.
7668
7669 2001-11-05 Akim Demaille <akim@epita.fr>
7670
7671 * src/options.h (struct option_table_struct): set_flags is void*.
7672 * src/options.c (longopts): Support `--output' and `%output'.
7673 (usage): Adjust.
7674 * src/lex.h (tok_setopt): Remove, replaced with...
7675 (tok_intopt, tok_stropt): these new guys.
7676 * src/lex.c (getopt.h): Not needed.
7677 (token_buffer, unlexed_token_buffer): Not const.
7678 (percent_table): Promote `-' over `_' in directive names.
7679 Active `%name-prefix', `file-prefix', and `output'.
7680 (parse_percent_token): Accept possible arguments to directives.
7681 Promote `-' over `_' in directive names.
7682
7683 2001-11-04 Akim Demaille <akim@epita.fr>
7684
7685 * doc/bison.texinfo (Decl Summary): Split the list into
7686 `directives for grammars' and `directives for bison'.
7687 Sort'em.
7688 Add description of `%name-prefix', `file-prefix', and `output'.
7689 Promote `-' over `_' in directive names.
7690 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7691 Simplify the description of `--name-prefix'.
7692 Promote `-' over `_' in directive names.
7693 Promote `--output' over `--output-file'.
7694 Fix the description of `--defines'.
7695 * tests/output.at: Exercise %file-prefix and %output.
7696
7697 2001-11-02 Akim Demaille <akim@epita.fr>
7698
7699 * doc/refcard.tex: Update.
7700
7701 2001-11-02 Akim Demaille <akim@epita.fr>
7702
7703 * src/symtab.h (SUNDEF): New.
7704 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7705 stand for `uninitialized', instead of 0.
7706 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7707 * src/lex.c (lex): Adjust.
7708
7709 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7710 Number it 0.
7711 Let yylex return it instead of a plain 0.
7712 Reported by Dick Streefland.
7713
7714 2001-11-02 Akim Demaille <akim@epita.fr>
7715
7716 * tests/regression.at (Mixing %token styles): New test.
7717
7718 2001-11-02 Akim Demaille <akim@epita.fr>
7719
7720 * src/reader.c (parse_thong_decl): Formatting changes.
7721 (token_translations_init): New, extracted from...
7722 (packsymbols): Here.
7723 Adjust.
7724
7725 2001-11-01 Akim Demaille <akim@epita.fr>
7726
7727 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7728 Check that `9foo.y' produces correct cpp guards.
7729 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7730 guards.
7731 Reported by Wwp.
7732
7733 2001-11-01 Akim Demaille <akim@epita.fr>
7734
7735 * tests/regression.at (Invalid input: 2): New.
7736 * src/lex.c (unlexed_token_buffer): New.
7737 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7738 too.
7739 Reported by Wwp.
7740
7741 2001-11-01 Akim Demaille <akim@epita.fr>
7742
7743 * tests/calc.at: Catch up with 1.30.
7744 * configure.in: Bump to 1.49a.
7745 Adjust to newer Autotest.
7746
7747 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7748
7749 * src/conflicts.c: Move global variables rrc_total and src_total ...
7750 (print_conflicts): here.
7751 * src/output.c (output): Free global variable user_toknums.
7752 * src/lex.c (token_obstack): Become static.
7753
7754 2001-10-18 Akim Demaille <akim@epita.fr>
7755
7756 * tests/atlocal.in (GCC): Add.
7757 * tests/calc.at: s/m4_match/m4_bmatch/.
7758 s/m4_patsubst/m4_bpatsubst/.
7759 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7760 * configure.in: AC_SUBST(GCC).
7761
7762 2001-10-14 Marc Autret <autret_m@epita.fr>
7763
7764 * src/options.c (create_long_option_table): Fix.
7765
7766 2001-10-10 Akim Demaille <akim@epita.fr>
7767
7768 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7769
7770 2001-10-04 Akim Demaille <akim@epita.fr>
7771
7772 * src/reader.c (parse_union_decl): Push the caracters in
7773 union_obstack, not attrs_obstack.
7774
7775 2001-10-04 Akim Demaille <akim@epita.fr>
7776
7777 Merge in the branch 1.29.
7778
7779 * src/reader.c (packsymbols): Use a temporary obstack for
7780 `%%tokendef', since output_stack is already used elsewhere.
7781
7782 2001-10-02 Akim Demaille <akim@epita.fr>
7783
7784 Bump 1.29d.
7785
7786 2001-10-02 Akim Demaille <akim@epita.fr>
7787
7788 Version 1.29c.
7789
7790 2001-10-02 Akim Demaille <akim@epita.fr>
7791
7792 * tests/regression.at (Invalid CPP headers): New.
7793 From Alexander Belopolsky.
7794 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7795
7796 2001-10-02 Akim Demaille <akim@epita.fr>
7797
7798 * tests/regression.at (Invalid input): New.
7799 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7800 Reported by Shura.
7801
7802 2001-10-02 Akim Demaille <akim@epita.fr>
7803
7804 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7805
7806 2001-10-02 Akim Demaille <akim@epita.fr>
7807
7808 * src/output.c (output_parser): Assert `skeleton'.
7809 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7810 systems.
7811 From Shura.
7812
7813 2001-10-01 Marc Autret <autret_m@epita.fr>
7814
7815 * src/lex.h: Echo modifications.
7816 * src/lex.c (unlex): Parameter is now token_t.
7817 From Hans Aberg.
7818
7819 2001-10-01 Marc Autret <autret_m@epita.fr>
7820
7821 * src/main.c: Include lex.h.
7822 From Hans Aberg.
7823
7824 2001-09-29 Akim Demaille <akim@epita.fr>
7825
7826 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7827
7828 2001-09-28 Akim Demaille <akim@epita.fr>
7829
7830 * tests/testsuite.at: Update to newer Autotest.
7831 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7832
7833 2001-09-27 Akim Demaille <akim@epita.fr>
7834
7835 Position independent wrapper.
7836
7837 * tests/bison: Remove.
7838 * tests/bison.in: New.
7839 * configure.in: Adjust.
7840
7841 2001-09-27 Paul Eggert <eggert@twinsun.com>
7842
7843 Port quotearg fixes from tar 1.13.24.
7844
7845 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7846 tm to be declared.
7847 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7848 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7849
7850 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7851 * m4/mbrtowc.m4: New file.
7852 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7853 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7854
7855 2001-09-27 Akim Demaille <akim@epita.fr>
7856
7857 Bump to 1.29c.
7858
7859 2001-09-27 Akim Demaille <akim@epita.fr>
7860
7861 Version 1.29b.
7862
7863 2001-09-25 Akim Demaille <akim@epita.fr>
7864
7865 * src/system.h: Include `xalloc.h'.
7866 Remove it from the C files.
7867 * src/files.c (output_files): Free the obstacks.
7868 * src/lex.c (init_lex): Rename as...
7869 (lex_init): this.
7870 (lex_free): New.
7871 * src/main.c (main): Use it.
7872
7873 2001-09-24 Marc Autret <autret_m@epita.fr>
7874
7875 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7876 to output informations in fout (FILE*).
7877 (open_graph, close_graph): Likewise.
7878 (output_graph, output_edge, output_node): Likewise.
7879 * src/vcg.h: Update function prototypes.
7880 * src/print_graph.c (print_graph): Open output graph file.
7881 (print_actions): Adjust.
7882 * src/files.h: Remove extern declaration.
7883 * src/files.c: Remove graph_obstack declaration.
7884 (open_files): Remove graph_obstack initialization.
7885 (output_files): Remove graph_obstack saving.
7886
7887 2001-09-24 Marc Autret <autret_m@epita.fr>
7888
7889 * src/files.c (compute_output_file_names): Fix.
7890
7891 2001-09-24 Marc Autret <autret_m@epita.fr>,
7892 Akim Demaille <akim@epita.fr>
7893
7894 * src/reader.c (reader): Remove call to free_symtab ().
7895 * src/main.c (main): Call it here.
7896 Include symtab.h.
7897 * src/conflicts.c (initialize_conflicts): Rename as...
7898 (solve_conflicts): this.
7899 * src/print.c (print_core, print_actions, print_state)
7900 (print_grammar): Dump to a file instead a `output_obstack'.
7901 (print_results): Dump `output_obstack', and then proceed with the
7902 FILE *.
7903 * src/files.c (compute_output_file_names, close_files): New.
7904 (output_files): Adjust.
7905 * src/main.c (main): Adjust.
7906
7907 2001-09-23 Marc Autret <autret_m@epita.fr>
7908
7909 * src/files.c (compute_header_macro): Computes header macro name
7910 from spec_defines_file when given.
7911
7912 2001-09-23 Marc Autret <autret_m@epita.fr>
7913
7914 * src/files.c (output_files): Add default extensions.
7915
7916 2001-09-22 Akim Demaille <akim@epita.fr>
7917
7918 * src/conflicts.c (finalize_conflicts): Rename as...
7919 (free_conflicts): this.
7920
7921 2001-09-22 Akim Demaille <akim@epita.fr>
7922
7923 * src/gram.c (gram_free): Rename back as...
7924 (dummy): this.
7925 (output_token_translations): Free `token_translations'.
7926 * src/symtab.c (free_symtab): Free the tag field.
7927
7928 2001-09-22 Akim Demaille <akim@epita.fr>
7929
7930 Remove `translations' as it is always set to true.
7931
7932 * src/gram.h: Adjust.
7933 * src/reader.c (packsymbols, parse_token_decl): Adjust
7934 * src/print.c (print_grammar): Adjust.
7935 * src/output.c (output_token_translations): Adjust.
7936 * src/lex.c (lex): Adjust.
7937 * src/gram.c: Be sure the set pointers to NULL.
7938 (dummy): Rename as...
7939 (gram_free): this.
7940
7941 2001-09-22 Akim Demaille <akim@epita.fr>
7942
7943 * configure.in: Invoke AM_LIB_DMALLOC.
7944 * src/system.h: Use dmalloc.
7945 * src/LR0.c: Be sure to have pointers initialized to NULL.
7946 (allocate_itemsets): Allocate kernel_items only if needed.
7947
7948 2001-09-22 Akim Demaille <akim@epita.fr>
7949
7950 * configure.in: Bump to 1.29b.
7951 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
7952 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
7953 need xmalloc.c in calc.y.
7954 From Pascal Bart.
7955
7956 2001-09-21 Akim Demaille <akim@epita.fr>
7957
7958 Version 1.29a.
7959 * Makefile.maint, config/config.guess, config/config.sub,
7960 * config/missing: Update from masters.
7961 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
7962 upon package.m4.
7963 * configure.in (ALL_LINGUAS): Add `tr'.
7964
7965 2001-09-21 Akim Demaille <akim@epita.fr>
7966
7967 * tests/Makefile.am (package.m4): Move to...
7968 ($(srcdir)/$(TESTSUITE)): here.
7969
7970 2001-09-20 Akim Demaille <akim@epita.fr>
7971
7972 * src/complain.c: No longer try to be standalone: use system.h.
7973 Don't assume __STDC__ is defined to 1. Just test if it is defined.
7974 * src/complain.h: Likewise.
7975 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
7976 Remove the unused variable `n'.
7977 From Albert Chin-A-Young.
7978
7979 2001-09-18 Marc Autret <autret_m@epita.fr>
7980
7981 * doc/bison.1: Update.
7982 * doc/bison.texinfo (Bison Options): Update --defines and --graph
7983 descriptions.
7984 (Option Cross Key): Update.
7985 Add --graph.
7986
7987 2001-09-18 Marc Autret <autret_m@epita.fr>
7988
7989 * tests/regression.at: New test (comment in %union).
7990
7991 2001-09-18 Marc Autret <autret_m@epita.fr>
7992
7993 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
7994 do that.
7995 Reported by Keith Browne.
7996
7997 2001-09-18 Marc Autret <autret_m@epita.fr>
7998
7999 * tests/output.at: Add tests for --defines and --graph.
8000
8001 2001-09-18 Marc Autret <autret_m@epita.fr>
8002
8003 * tests/output.at: Removes tests of %{header,src}_extension features.
8004
8005 2001-09-18 Akim Demaille <akim@epita.fr>
8006
8007 * tests/Makefile.am (package.m4): New.
8008 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8009 (_AT_CHECK_CALC_ERROR): Likewise.
8010 Factor the `, ' part of verbose error messages.
8011
8012 2001-09-18 Marc Autret <autret_m@epita.fr>
8013
8014 * src/getargs.c (longopts): Declare --defines and --graph as options
8015 with optional arguments.
8016 * src/files.h: Add extern declarations.
8017 * src/files.c (spec_graph_file, spec_defines_file): New.
8018 (output_files): Update.
8019 Remove CPP-outed code.
8020
8021 2001-09-18 Marc Autret <autret_m@epita.fr>
8022
8023 Turn off %{source,header}_extension feature.
8024
8025 * src/files.c (compute_exts_from_gf): Update.
8026 (compute_exts_from_src): Update.
8027 (output_files): CPP-out useless code.
8028 * src/files.h: Remove {header,source}_extension extern declarations.
8029 * src/reader.c (parse_dquoted_param): CPP-out.
8030 (parse_header_extension_decl): Remove.
8031 (parse_source_extension_decl): Remove.
8032 (read_declarations): Remove cases tok_{hdrext,srcext}.
8033 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8034 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8035
8036 2001-09-10 Akim Demaille <akim@epita.fr>
8037
8038 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8039 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8040 (AT_CHECK_OUTPUT): this.
8041 Merely check ls' exit status, its output is useless.
8042
8043 2001-09-10 Akim Demaille <akim@epita.fr>
8044
8045 * tests/calc.at: Use m4_match.
8046 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8047
8048 2001-09-10 Marc Autret <autret_m@epita.fr>,
8049 Akim Demaille <akim@epita.fr>
8050
8051 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8052 enum color_e.
8053 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8054 to `normal'.
8055 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8056 * src/lex.h: Adjust prototype.
8057 (token_t): Add `tok_undef'.
8058 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8059 (parse_percent_token): Now returns token_t.
8060 Add default statement in switch.
8061 (lex): Separate `c' as an input variable, from the token_t result
8062 part.
8063 (unlexed): Is a token_t.
8064
8065 2001-09-10 Akim Demaille <akim@epita.fr>
8066
8067 * configure.in: Bump to 1.29a.
8068
8069 2001-09-07 Akim Demaille <akim@epita.fr>
8070
8071 Version 1.29.
8072
8073 2001-08-30 Akim Demaille <akim@epita.fr>
8074
8075 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8076 * m4/atconfig.m4: Remove.
8077 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8078 * tests/bison: New.
8079 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8080 m4_if, m4_patsubst, and m4_regexp.
8081 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8082 `input' file instead of echo.
8083
8084 2001-08-29 Akim Demaille <akim@epita.fr>
8085
8086 Bump to 1.28e.
8087
8088 2001-08-29 Akim Demaille <akim@epita.fr>
8089
8090 Version 1.28d.
8091
8092 2001-08-29 Paul Eggert <eggert@twinsun.com>
8093
8094 * src/bison.simple (yyparse): Don't take the address of an
8095 item before the start of an array, as that doesn't conform to
8096 the C Standard.
8097
8098 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8099
8100 * doc/bison.texinfo (Location Tracking Calc): New node.
8101
8102 2001-08-29 Paul Eggert <eggert@twinsun.com>
8103
8104 * src/output.c (output): Do not define const, as this now
8105 causes more problems than it cures.
8106
8107 2001-08-29 Akim Demaille <akim@epita.fr>
8108
8109 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8110 the nodes.
8111 Be sure to tag the `detailmenu'.
8112
8113 2001-08-29 Akim Demaille <akim@epita.fr>
8114
8115 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8116 download in a tmp dir.
8117
8118 2001-08-28 Marc Autret <autret_m@epita.fr>
8119
8120 * config/depcomp: New file.
8121
8122 2001-08-28 Marc Autret <autret_m@epita.fr>
8123
8124 * doc/bison.1 (mandoc): Adjust.
8125 From Juan Manuel Guerrero.
8126
8127 2001-08-28 Marc Autret <autret_m@epita.fr>
8128
8129 * src/print_graph.c (print_state): Fix.
8130
8131 2001-08-27 Marc Autret <autret_m@epita.fr>
8132
8133 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8134 char * members.
8135 Echo modifications to the functions prototypes.
8136 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8137
8138 2001-08-27 Marc Autret <autret_m@epita.fr>
8139
8140 * src/vcg.c: Include `xalloc.h'.
8141 (add_colorentry): New.
8142 (add_classname): New.
8143 (add_infoname): New.
8144 * src/vcg.h: Add new prototypes.
8145
8146 2001-08-27 Akim Demaille <akim@epita.fr>
8147
8148 * Makefile.maint: Sync. again with CVS Autoconf.
8149
8150 2001-08-27 Akim Demaille <akim@epita.fr>
8151
8152 * Makefile.maint: Formatting changes.
8153 (po-update, cvs-update, update): New targets.
8154 (AMTAR): Remove.
8155
8156 2001-08-27 Akim Demaille <akim@epita.fr>
8157
8158 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8159 * Makefile.maint: Sync. with CVS Autoconf.
8160
8161 2001-08-27 Marc Autret <autret_m@epita.fr>
8162
8163 * src/vcg.h (struct infoname_s): New.
8164 (struct colorentry_s): New.
8165 (graph_s): New fields {vertical,horizontal}_order in structure.
8166 Add `infoname' field.
8167 Add `colorentry' field;
8168 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8169 (G_HORIZONTAL_ORDER): New.
8170 (G_INFONAME): New.
8171 (G_COLORENTRY): New.
8172 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8173 Add output of `infoname'.
8174 Add output of `colorentry'.
8175
8176 2001-08-27 Marc Autret <autret_m@epita.fr>
8177
8178 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8179 This one shadowed a global parameter.
8180
8181 2001-08-24 Marc Autret <autret_m@epita.fr>
8182
8183 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8184 instead of `unsigned'.
8185 (print_state): Do not call obstack_object_size () in obstack_grow ()
8186 to avoid macro variables shadowing.
8187
8188 2001-08-23 Marc Autret <autret_m@epita.fr>
8189
8190 * src/lex.c (percent_table): Typo: s/naem/name/.
8191 Add graph option.
8192 Normalize new options declarations.
8193
8194 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8195
8196 * tests/suite.at: Exercise %header_extension and %source_extension.
8197
8198 2001-08-16 Marc Autret <autret_m@epita.fr>
8199
8200 * src/reader.c (parse_dquoted_param): New.
8201 (parse_header_extension_decl): Use it.
8202 (parse_source_extension_decl): Likewise.
8203
8204 2001-08-16 Marc Autret <autret_m@epita.fr>
8205
8206 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8207 (get_xxxx_str): Use assert () instead of complain ().
8208 Remove return invokations in default cases.
8209 (get_decision_str): Modify default behaviour. Remove second argument.
8210 Echo modifications on calls.
8211 (output_graph): Fix.
8212
8213 2001-08-16 Marc Autret <autret_m@epita.fr>
8214
8215 * src/getargs.c (usage): Update with ``-g, --graph''.
8216
8217 2001-08-16 Marc Autret <autret_m@epita.fr>
8218
8219 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8220 (Option Cross Key): Likewise.
8221 * doc/bison.1: Update.
8222
8223 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8224
8225 * src/output.c (output_master_parser): Don't finish action_obstack.
8226 (output_parser): Don't care about the muscle action, here.
8227 (prepare): Copy the action_obstack in the action muscle.
8228 (output): Free action_obstack.
8229
8230 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8231
8232 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8233 will contain `%union' declaration.
8234 (parse_union_decl): Delete #line directive output.
8235 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8236 informations about %union.
8237 (parse_union_decl): Copy the union_obstack in the muscle stype.
8238 * src/bison.simple: Add new #line directive.
8239 Add typdef %%stype YYSTYPE.
8240
8241 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8242
8243 * src/bison.simple: Add new `#line' directive.
8244
8245 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8246
8247 * src/bison.simple: New `#line' directive.
8248 * src/output.c (output_parser): Support new dynamic muscle input_line.
8249
8250 2001-09-22 Marc Autret <autret_m@epita.fr>
8251
8252 * src/output.c (output_master_parser): New.
8253 (output_parser): Be more re-entrant.
8254
8255 2001-09-21 Marc Autret <autret_m@epita.fr>
8256
8257 * src/reader.c (copy_definition, parse_union_decl): Update and use
8258 `linef' muscle.
8259 (copy_action): Likewise.
8260 Use obstack_1grow ().
8261 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8262
8263 2001-09-21 Marc Autret <autret_m@epita.fr>
8264
8265 * src/options.c (option_table): Adjust.
8266 * src/lex.c (parse_percent_token): Fix.
8267
8268 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8269
8270 * src/options.c (symtab.h): Include it, need by lex.h.
8271
8272 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8273
8274 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8275 is now an option_table_struct*.
8276 (option_strcmp): New function option_strcmp.
8277 (parse_percent_token): Call option_strcmp.
8278 * src/getargs.c (xalloc.h, options.h): Include it.
8279 (getargs): Call create_long_option_table.
8280 (getargs): Free longopts at the end of the function.
8281 (shortopts): Move in options.c.
8282 * src/options.c (create_long_option_table): New function. Convert
8283 information from option_table to option structure.
8284 * src/reader.c (options.h): Include it.
8285
8286 * src/Makefile.am: Adjust.
8287 * src/options.c (option_table): Create from longopts and percent_table.
8288 * src/getargs.c (longopts): Delete.
8289 * src/lex.c (struct percent_table_struct): Delete.
8290 (percent_table): Delete.
8291 (options.h): Include it.
8292 * src/options.c: Create.
8293 * src/options.h: Create.
8294 Declare enum opt_access_e.
8295 Define struct option_table_struct.
8296
8297 2001-09-20 Marc Autret <autret_m@epita.fr>
8298
8299 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8300 sections of Bison.
8301
8302 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8303
8304 * src/bison.simple: s/%%filename/%%skeleton.
8305 * src/muscle_tab.c (getargs.h): Include it.
8306 (muscle_init): Insert new muscle skeleton.
8307
8308 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8309
8310 * src/output.c (output_parser): Delete unused variable actions_dumped.
8311
8312 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8313
8314 * src/output.c (output): Delete call to reader_output_yylsp.
8315 * src/reader.c (reader): Likewise.
8316 * src/reader.h: Delete declaration of reader_output_yylsp.
8317
8318 2001-09-02 Marc Autret <autret_m@epita.fr>
8319
8320 * src/reader.c: Include muscle_tab.h.
8321 (parse_union_decl): Update.
8322 (parse_macro_decl): Rename parse_muscle_decl.
8323 Update to use renamed functions and variable.
8324 (read_declarations, copy_action, read_additionnal_code, : Updated
8325 with correct variables and functions names.
8326 (packsymbols, reader): Likewise.
8327
8328 * src/reader.h (muscle_obstack): Extern declaration update.
8329
8330 * src/output.c: Include muscle_tab.h
8331 In all functions using macro_insert, change by using muscle_insert ().
8332 (macro_obstack): Rename muscle_obstack.
8333 Echo modifications in the whole file.
8334 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8335 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8336 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8337
8338 * src/muscle_tab.h: Update double inclusion macros.
8339 (macro_entry_s): Rename muscle_entry_s.
8340 Update prototypes.
8341
8342 * src/muscle_tab.c: Include muscle_tab.h.
8343 Rename macro_tabble to muscle_table.
8344 (mhash1, mhash2, mcmp): Use muscle_entry.
8345 (macro_init): Rename muscle_init. Update.
8346 (macro_insert): Rename muscle_insert. Update.
8347 (macro_find): Rename muscle_find. Update.
8348
8349 * src/main.c: Include muscle_tab.h.
8350 (main): Call muscle_init ().
8351 * src/Makefile.am (bison_SOURCES): Echo modifications.
8352
8353 2001-09-02 Marc Autret <autret_m@epita.fr>
8354
8355 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8356
8357 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8358
8359 2001-09-02 Marc Autret <autret_m@epita.fr>
8360
8361 * src/macrotab.c, src/macrotab.h: Remove.
8362
8363 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8364
8365 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8366 filename.
8367
8368 2001-09-01 Marc Autret <autret_m@epita.fr>
8369
8370 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8371 to an explicit value to activate the feature. We do it here.
8372
8373 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8374
8375 * src/output.c (prepare): Delete the `filename' muscule insertion.
8376 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8377 (parse_union_decl): Likewise.
8378 * src/macrotab.c (macro_init): Initialize filename by infile.
8379
8380 2001-08-31 Marc Autret <autret_m@epita.fr>
8381
8382 * src/bison.simple (YYLSP_NEEDED): New definition.
8383 * src/output.c (prepare): Add macro insertion of `locations_flag'
8384
8385 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8386
8387 * src/output.c (prepare): Delete insertion of previous muscles,
8388 and insert the `prefix' muscles.
8389 * src/macrotab.c (macro_init): Likewise.
8390 (macro_init): Initialization prefix directive by `yy'.
8391 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8392 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8393 yylval, yydebug, yyerror, yynerrs and yyparse.
8394 New directive `#define' to substitute yydebug, ... with option
8395 name_prefix.
8396
8397 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8398
8399 * src/main.c (main): Standardize.
8400 * src/output.c (output_table_data, output_parser): Likewise.
8401 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8402
8403 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8404
8405 * src/reader.c (read_additionnal_code): Rename %%user_code to
8406 %%epilogue.
8407 * src/output.c (output): Rename %%declarations to %%prologue.
8408 * src/bison.simple: Echo modifications.
8409
8410 2001-08-31 Marc Autret <autret_m@epita.fr>
8411
8412 * src/reader.c (readgram): CleanUp.
8413 (output_token_defines): Likewise.
8414 (packsymbols): Likewise.
8415 (reader): Likewise.
8416 * src/output.c (output): CPP-out useless code.
8417
8418 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8419
8420 * src/reader.c (reader): Delete obsolete call to function
8421 output_trailers and output_headers.
8422 * src/output.h: Remove obsolete functions prototypes of output_headers
8423 and output_trailers.
8424
8425 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8426
8427 * src/main.c: Include macrotab.h.
8428 * src/macrotab.h (macro_entry_s): Constify fields.
8429 Adjust functions prototypes.
8430 * src/macrotab.c (macro_insert): Constify key and value.
8431 (macro_find): Constify key.
8432 (macro_insert): Include 'xalloc.h'
8433 (macro_insert): Use XMALLOC.
8434 (macro_find): Constify return value.
8435 * src/output.c (output_table_data): Rename table to table_data.
8436 (output_parser): Constify macro_key, macro_value.
8437
8438 2001-08-30 Marc Autret <autret_m@epita.fr>
8439
8440 * src/reader.c (parse_skel_decl): New.
8441 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8442 * src/lex.h (token_t): New token `tok_skel'.
8443 * src/lex.c (percent_table): Add skeleton option entry.
8444 Standardize.
8445
8446 2001-08-29 Marc Autret <autret_m@epita.fr>
8447
8448 * src/bison.simple: Add %%user_code directive at the end.
8449 * src/reader.c (read_additionnal_code): New.
8450 (reader): Use it.
8451 * src/output.c (output_program): Remove.
8452 (output): Update.
8453
8454 2001-08-28 Marc Autret <autret_m@epita.fr>
8455
8456 * src/output.c (output_actions): Clean up.
8457 (output_gram): CPP-out useless code.
8458 * src/reader.c (reader): Clean up, CPP-out useless code.
8459
8460 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8461
8462 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8463 directive.
8464 * src/bison.simple: Add `%%definitions'.
8465
8466 2001-08-28 Marc Autret <autret_m@epita.fr>
8467
8468 * config/depcomp: New file.
8469
8470 2001-08-27 Paul Eggert <eggert@twinsun.com>
8471
8472 * src/bison.simple (yyparse): Don't take the address of an
8473 item before the start of an array, as that doesn't conform to
8474 the C Standard.
8475
8476 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8477
8478 * src/output.c (output): Remove the initialization of the macro
8479 obstack. It was done too late here.
8480
8481 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8482 completely wrong.
8483 (reader): Initialize the macro obstack here, since we need it to grow
8484 '%define' directives.
8485
8486 * src/reader.h: Declare the macro obstack as extern.
8487
8488 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8489
8490 * src/output.c (output_parser): Fix. Store single '%' characters in
8491 the output obstack instead of throwing them away.
8492
8493 2001-08-27 Akim Demaille <akim@epita.fr>
8494
8495 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8496
8497 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8498
8499 * lib/Makefile.am: Adjust.
8500
8501 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8502
8503 * src/bison.simple: Update and add '%%' directives.
8504
8505 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8506
8507 * src/reader.c (reader): Remove calls to 'output_headers' and
8508 'output_trailers'. Remove some C output.
8509 (readgram): Disable a piece of code that was writing a default
8510 definition for 'YYSTYPE'.
8511 (reader_output_yylsp): Remove.
8512 (packsymbols): Output token defintions to a macro.
8513 (copy_definition): Disable C output.
8514
8515 * src/reader.c (parse_macro_decl): New function used to parse macro
8516 declarations.
8517 (copy_string2): Put the body of copy_string into this new function.
8518 Add a parameter to let the caller choose whether he wants to copy the
8519 string delimiters or not.
8520 (copy_string): Be a simple call to copy_string2 with the last argument
8521 bound to true.
8522 (read_declarations): Add case for macro definition.
8523 (copy_identifier): New.
8524 (parse_macro_decl): Read macro identifiers using copy_identifier
8525 rather than lex.
8526
8527 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8528
8529 * src/output.c (prepare): Add prefixed names.
8530 (output_parser): Output semantic actions.
8531 (output_parser): Fix bug on '%%line' directives.
8532
8533 * src/output.c (output_headers): Remove. The C code printed by this
8534 function should now be in the skeletons.
8535 (output_trailers): Remove.
8536 (output): Disable call to 'reader_output_yylsp'.
8537 (output_rule_data): Do not output tables to the table obstack.
8538
8539 * src/output.c: Remove some C dedicated output.
8540 Improve the use of macro and output obstacks.
8541 (output_defines): Remove.
8542
8543 * src/output.c (output_token_translations): Associate 'translate'
8544 table with a macro. No output to the table obstack.
8545 (output_gram): Same for 'rhs' and 'prhs'.
8546 (output_stos): Same for 'stos'.
8547 (output_rule_data): Same for 'r1' and 'r2'.
8548 (token_actions): Same for 'defact'.
8549 (goto_actions): Same for 'defgoto'.
8550 (output_base): Same for 'pact' and 'pgoto'.
8551 (output_table): Same for 'table'.
8552 (output_check): Same for 'check'.
8553
8554 * src/output.c (output_table_data): New function.
8555 (output_short_table): Remove.
8556 (output_short_or_char_table): Remove.
8557
8558 * src/output.c (output_parser): Replace most of the skeleton copy code
8559 with something new. Skeletons are now processed character by character
8560 rather than line by line, and Bison looks for '%%' macros. This is the
8561 first step in making Bison's output process (a lot) more flexible.
8562 (output_parser): Use the macro table.
8563
8564 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8565
8566 * src/main.c (main): Initialize the macro table.
8567
8568 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8569
8570 * src/lex.c (percent_table): Add tok_define.
8571 * src/lex.h: Add tok_define.
8572
8573 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8574
8575 * src/macrotab.c: New file.
8576 * src/macrotab.h: New file.
8577 * src/Makefile.am: Update.
8578
8579 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8580
8581 * lib/hash.c: New file.
8582 * lib/hash.h: New file.
8583 * lib/Makefile.am: Update.
8584
8585 2001-08-15 Akim Demaille <akim@epita.fr>
8586
8587 Version 1.28c.
8588
8589 2001-08-15 Marc Autret <autret_m@epita.fr>
8590
8591 * src/reader.c (readgram): Indent output macro YYSTYPE.
8592 (packsymbols): Likewise.
8593 (output_token_defines): Likewise.
8594 * src/files.c: Standardize.
8595 (compute_header_macro): New.
8596 (defines_obstack_save): New. Use compute_header_macro.
8597 (output_files): Update. Use defines_obstack_save.
8598
8599 2001-08-15 Akim Demaille <akim@epita.fr>
8600
8601 * doc/bison.texinfo (Table of Symbols): Document
8602 YYSTACK_USE_ALLOCA.
8603
8604 2001-08-15 Akim Demaille <akim@epita.fr>
8605
8606 * missing: Update from CVS Automake.
8607 * config/config.guess, config/config.sub, config/texinfo.tex:
8608 Update from gnu.org.
8609
8610 2001-08-15 Akim Demaille <akim@epita.fr>
8611
8612 * Makefile.maint: Sync with CVS Autoconf.
8613
8614 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8615
8616 * doc/bison.texinfo: Include GNU Free Documentation License from
8617 `fdl.texi'.
8618 * doc/fdl.texi: Add to package.
8619
8620 2001-08-14 Marc Autret <autret_m@epita.fr>
8621
8622 Turn on %{source,header}_extension features.
8623
8624 * src/lex.c (percent_table): Un-CPP out header_extension and
8625 source_extension.
8626 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8627 (compute_exts_from_src): Remove conditions. It restores priorities
8628 between options.
8629
8630 2001-08-14 Marc Autret <autret_m@epita.fr>
8631
8632 * src/files.c (compute_base_names): Add extensions computing when
8633 `--file-prefix' used.
8634 Standardize function calls.
8635
8636 2001-08-13 Marc Autret <autret_m@epita.fr>
8637
8638 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8639 defining it (defined but null disables alloca).
8640
8641 2001-08-13 Marc Autret <autret_m@epita.fr>
8642
8643 * src/bison.simple (_yy_memcpy): CPP reformat.
8644
8645 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8646
8647 * tests/atconfig.in (CPPFLAGS): Fix.
8648
8649 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8650
8651 * doc/bison.texinfo: Include GNU General Public License from
8652 `gpl.texi'.
8653 * doc/gpl.texi: Add to package.
8654
8655 2001-08-10 Marc Autret <autret_m@epita.fr>
8656
8657 * src/print_graph.h: Fix.
8658 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8659
8660 2001-08-10 Akim Demaille <akim@epita.fr>
8661
8662 * src/system.h: Provide default declarations for stpcpy, strndup,
8663 and strnlen.
8664
8665 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8666
8667 * doc/bison.texinfo (Locations): Update @$ stuff.
8668
8669 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8670
8671 * src/bison.simple (YYLLOC_DEFAULT): Update.
8672 (yyparse): Adjust.
8673
8674 2001-08-08 Marc Autret <autret_m@epita.fr>
8675
8676 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8677 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8678 Reported by Fabrice Bauzac.
8679
8680 2001-08-08 Marc Autret <autret_m@epita.fr>
8681
8682 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8683 * src/vcg.c (output_node): Fix.
8684 * src/vcg.h: Cleanup.
8685 * src/print_graph.c: Add comments.
8686 (node_output_size): New global variable. Simplify the formatting of
8687 the VCG graph output.
8688 (print_actions): Unused code is now used. It notifies the final state
8689 and no action states in the VCG graph. It also give the reduce actions.
8690 The `shift and goto' edges are red and the `go to state' edges are
8691 blue.
8692 Get the current node name and node_obstack by argument.
8693 (node_obstack): New variable.
8694 (print_state): Manage node_obstack.
8695 (print_core): Use node_obstack given by argument.
8696 A node is not only computed here but in print_actions also.
8697 (print_graph): CPP out useless code instead of commenting it.
8698
8699 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8700
8701 * tests/atconfig.in (CPPFLAGS): Fix.
8702
8703 2001-08-07 Akim Demaille <akim@epita.fr>
8704
8705 * src/print_graph.c (quote): New.
8706 (print_core): Use it.
8707
8708 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8709
8710 * src/vcg.c (complain.h): Include it.
8711 Unepitaize `return' invocations.
8712 [NDEBUG] (main): Remove.
8713 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8714 * src/files.c (open_files): Initialize graph_obstack.
8715 * src/print_graph.c (print_actions): CPP out useless code.
8716 (print_core): Don't output the last `\n' in labels.
8717 Use `quote'.
8718 * src/files.c (output_files): Output the VCG file.
8719 * src/main.c (main): Invoke print_graph ();
8720
8721 2001-08-06 Marc Autret <autret_m@epita.fr>
8722
8723 Automaton VCG graph output.
8724 Using option ``-g'' or long option ``--graph'', you can generate
8725 a gram_filename.vcg file containing a VCG description of the LALR (1)
8726 automaton of your grammar.
8727
8728 * src/main.c: Call to print_graph() function.
8729 * src/getargs.h: Update.
8730 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8731 (graph_flag): New flag.
8732 (longopts): Update.
8733 (getargs): Add case `g'.
8734 * src/files.c (graph_obstack): New obstack struct.
8735 (open_files): Initialize new obstack.
8736 (output_files): Saves graph_obstack if required.
8737 * src/files.h (graph_obstack): New extern declaration.
8738 * src/Makefile.am: Add new source files.
8739
8740 2001-08-06 Marc Autret <autret_m@epita.fr>
8741
8742 * src/print_graph.c, src/print_graph.h (graph): New.
8743 * src/vcg.h: New file.
8744 * src/vcg.c: New file, VCG graph handling.
8745
8746 2001-08-06 Marc Autret <autret_m@epita.fr>
8747
8748 Add of %source_extension and %header_extension which specify
8749 the source or/and the header output file extension.
8750
8751 * src/files.c (compute_base_names): Remove initialisation of
8752 src_extension and header_extension.
8753 (compute_exts_from_gf): Update.
8754 (compute_exts_from_src): Update.
8755 (output_files): Update.
8756 * src/reader.c (parse_header_extension_decl): New.
8757 (parse_source_extension_decl): New.
8758 (read_declarations): New case statements for the new tokens.
8759 * src/lex.c (percent_table): Add entries for %source_extension
8760 and %header_extension.
8761 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8762
8763 2001-08-06 Marc Autret <autret_m@epita.fr>
8764
8765 * configure.in: Bump to 1.28c.
8766 * doc/bison.texinfo: Texinfo thingies.
8767
8768 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8769
8770 * tests/atconfig.in (CPPFLAGS): Add.
8771 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8772
8773 2001-08-03 Akim Demaille <akim@epita.fr>
8774
8775 Version 1.28b.
8776
8777 2001-08-03 Akim Demaille <akim@epita.fr>
8778
8779 * tests/Makefile.am (check-local): Ship testsuite.
8780 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8781 Include `string.h'.
8782
8783 2001-08-03 Akim Demaille <akim@epita.fr>
8784
8785 * configure.in: Try using -Wformat when compiling.
8786
8787 2001-08-03 Akim Demaille <akim@epita.fr>
8788
8789 * configure.in: Bump to 1.28b.
8790
8791 2001-08-03 Akim Demaille <akim@epita.fr>
8792
8793 * src/complain.c: Adjust strerror_r portability issues.
8794
8795 2001-08-03 Akim Demaille <akim@epita.fr>
8796
8797 Version 1.28a.
8798
8799 2001-08-03 Akim Demaille <akim@epita.fr>
8800
8801 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8802 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8803 * src/getargs.c: Include complain.h.
8804 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8805 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8806
8807 2001-08-03 Akim Demaille <akim@epita.fr>
8808
8809 * src/reader.c (readgram): Display hidden chars in error messages.
8810
8811 2001-08-03 Akim Demaille <akim@epita.fr>
8812
8813 Update to gettext 0.10.39.
8814
8815 2001-08-03 Akim Demaille <akim@epita.fr>
8816
8817 * lib/strspn.c: New.
8818
8819 2001-08-01 Marc Autret <autret_m@epita.fr>
8820
8821 * doc/bison.texinfo: Update.
8822 * doc/bison.1 (mandoc): Update.
8823 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8824 * src/files.c: Support output files extensions computing.
8825 (src_extension): New static variable.
8826 (header_extension): New static variable.
8827 (tr): New function.
8828 (get_extension_index): New function, gets the index of an extension
8829 filename in a string.
8830 (compute_exts_from_gf): New function, computes extensions from the
8831 grammar file extension.
8832 (compute_exts_from_src): New functions, computes extensions from the
8833 C source file extension, file given by ``-o'' option.
8834 (compute_base_names): Update.
8835 (output_files): Update.
8836
8837 2001-08-01 Robert Anisko <anisko_r@epita.fr>
8838
8839 * doc/bison.texi: Document @$.
8840 (Locations): New section.
8841
8842 2001-07-18 Akim Demaille <akim@epita.fr>
8843
8844 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8845 * config/prev-version.txt, config/move-if-change: New.
8846 * Makefile.am: Adjust.
8847
8848 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
8849
8850 * src/bison.simple (yyparse): Suppress warning `comparaison
8851 between signed and unsigned'.
8852
8853 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
8854
8855 * src/getargs.h (raw_flag): Remove.
8856 * src/getargs.c: Die on `-r'/`--raw'.
8857 * src/lex.c (parse_percent_token): Die on `%raw'.
8858 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8859 * tests/calc.at: Suppress test with option `--raw'.
8860
8861 2001-07-14 Akim Demaille <akim@epita.fr>
8862
8863 * config/: New.
8864 * configure.in: Require Autoconf 2.50.
8865 Update to gettext 0.10.38.
8866
8867 2001-03-16 Akim Demaille <akim@epita.fr>
8868
8869 * doc/bison.texinfo: ANSIfy the examples.
8870
8871 2001-03-16 Akim Demaille <akim@epita.fr>
8872
8873 * getargs.c (skeleton): New variable.
8874 (longopts): --skeleton is a new option.
8875 (shortopts, getargs): -S is a new option.
8876 * getargs.h: Declare skeleton.
8877 * output.c (output_parser): Use it.
8878
8879 2001-03-16 Akim Demaille <akim@epita.fr>
8880
8881 * m4/strerror_r.m4: New.
8882 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8883 * lib/error.h, lib/error.c: Update.
8884
8885 2001-03-16 Akim Demaille <akim@epita.fr>
8886
8887 * src/getargs.c (longopts): Clean up.
8888
8889 2001-02-21 Akim Demaille <akim@epita.fr>
8890
8891 * src/reader.c (gensym): `gensym_count' is your own.
8892 Use a static buf to create the symbol name, as token_buffer is no
8893 longer a buffer.
8894
8895 2001-02-08 Akim Demaille <akim@epita.fr>
8896
8897 * src/conflicts.c (conflict_report): Be sure not to append to res
8898 between two calls, which could happen if both first sprintf were
8899 skipped, but not the first cp += strlen.
8900
8901 2001-02-08 Akim Demaille <akim@epita.fr>
8902
8903 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8904 New, from fileutils 4.0.37.
8905 * configure.in: Require Autoconf 2.49c. I took some time before
8906 making this decision. This is the only way out for portability
8907 issues in Bison, it would mean way too much duplicate effort to
8908 import in Bison features implemented in 2.49c since 2.13.
8909 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
8910
8911 2001-02-02 Akim Demaille <akim@epita.fr>
8912
8913 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
8914 * lib/xalloc.h, lib/xmalloc.c: Update.
8915
8916 2001-01-19 Akim Demaille <akim@epita.fr>
8917
8918 Get rid of the ad hoc handling of token_buffer in the scanner: use
8919 the obstacks.
8920
8921 * src/lex.c (token_obstack): New.
8922 (init_lex): Initialize it. No longer call...
8923 (grow_token_buffer): this. Remove it.
8924 Adjust all the places which used it to use the obstack.
8925
8926 2001-01-19 Akim Demaille <akim@epita.fr>
8927
8928 * src/lex.h: Rename all the tokens:
8929 s/\bENDFILE\b/tok_eof/g;
8930 s/\bIDENTIFIER\b/tok_identifier/g;
8931 etc.
8932 Let them be enums, not #define, to ease debugging.
8933 Adjust all the code.
8934
8935 2001-01-18 Akim Demaille <akim@epita.fr>
8936
8937 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
8938 * src/lex.c (maxtoken, grow_token_buffer): Static.
8939
8940 2001-01-18 Akim Demaille <akim@epita.fr>
8941
8942 Since we now use obstacks, more % directives can be enabled.
8943
8944 * src/lex.c (percent_table): Also accept `%yacc',
8945 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
8946 `%debug'.
8947 Handle the actions for `%semantic_parser' and `%pure_parser' here,
8948 instead of returning a token.
8949 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
8950 * src/reader.c (read_declarations): Adjust.
8951 * src/files.c (open_files): Don't call `compute_base_names', don't
8952 compute `attrsfile' since they depend upon data which might be
8953 *in* the input file now.
8954 (output_files): Do it here.
8955 * src/output.c (output_headers): Document the fact that this patch
8956 introduces a guaranteed SEGV for semantic parsers.
8957 * doc/bison.texinfo: Document them.
8958 * tests/suite.at: Exercise these %options.
8959
8960 2000-12-20 Akim Demaille <akim@epita.fr>
8961
8962 Also handle the output file (--verbose) with obstacks.
8963
8964 * files.c (foutput): Remove.
8965 (output_obstack): New.
8966 Adjust all dependencies.
8967 * src/conflicts.c: Return a string.
8968 * src/system.h (obstack_grow_string): Rename as...
8969 (obstack_sgrow): this. Be ready to work with non literals.
8970 (obstack_fgrow4): New.
8971
8972 2000-12-20 Akim Demaille <akim@epita.fr>
8973
8974 * src/files.c (open_files): Fix the computation of short_base_name
8975 in the case of `-o foo.tab.c'.
8976
8977 2000-12-20 Akim Demaille <akim@epita.fr>
8978
8979 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
8980 (copy_dollar): Now that everything uses obstacks, get rid of the
8981 FILE * parameters.
8982
8983 2000-12-20 Akim Demaille <akim@epita.fr>
8984
8985 * src/files.c (open_files): Actually the `.output' file is based
8986 on the short_base_name, not base_name.
8987 * tests/suite.at (Checking output file names): Adjust.
8988
8989 2000-12-20 Akim Demaille <akim@epita.fr>
8990
8991 * src/bison.s1: Remove, we now use directly...
8992 * src/bison.simple: this.
8993 * src/Makefile.am: Use pkgdata instead of data.
8994
8995 2000-12-20 Akim Demaille <akim@epita.fr>
8996
8997 * src/files.c (guard_obstack): New.
8998 (open_files): Initialize it.
8999 (output_files): Dump it...
9000 * src/files.h: Export it.
9001 * src/reader.c (copy_guard): Use it.
9002
9003 2000-12-19 Akim Demaille <akim@epita.fr>
9004
9005 * src/files.c (outfile, defsfile, actfile): Removed as global
9006 vars.
9007 (open_files): Don't compute them.
9008 (output_files): Adjust.
9009 (base_name, short_base_name): Be global.
9010 Adjust dependencies.
9011
9012 2000-12-19 Akim Demaille <akim@epita.fr>
9013
9014 * src/files.c (strsuffix): New.
9015 (stringappend): Be just like strcat but allocate.
9016 (base_names): Eve out from open_files.
9017 Try to simplify the rather hairy computation of base_name and
9018 short_base_name.
9019 (open_files): Use it.
9020 * tests/suite.at (Checking output file names): New test.
9021
9022 2000-12-19 Akim Demaille <akim@epita.fr>
9023
9024 * src/system.h (obstack_grow_literal_string): Rename as...
9025 (obstack_grow_string): this.
9026 * src/output.c (output_parser): Recognize `%% actions' instead of
9027 `$'.
9028 * src/bison.s1: s/$/%% actions/.
9029 * src/bison.hairy: Likewise.
9030
9031 2000-12-19 Akim Demaille <akim@epita.fr>
9032
9033 * src/output.c (output_parser): Compute the `#line' lines when
9034 there are.
9035 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9036 Suggested by Hans Aberg.
9037
9038 2000-12-19 Akim Demaille <akim@epita.fr>
9039
9040 Let the handling of the skeleton files be local to the procedures
9041 that use it.
9042
9043 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9044 longer static.
9045 (fparser, open_extra_files): Remove.
9046 (open_files, output_files): Don't take care of fparser.
9047 * src/files.h: Adjust.
9048 * src/output.c (output_parser): Open and close the file to the
9049 skeleton.
9050 * src/reader.c (read_declarations): When %semantic_parser, open
9051 fguard.
9052
9053 2000-12-19 Akim Demaille <akim@epita.fr>
9054
9055 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9056 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9057
9058 2000-12-19 Akim Demaille <akim@epita.fr>
9059
9060 * src/files.c (open_files): Yipee! We no longer need all the code
9061 looking for `/tmp' since we have no tmp file.
9062
9063 2000-12-19 Akim Demaille <akim@epita.fr>
9064
9065 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9066 New macros.
9067 * src/files.c (open_files): Less dependency on MSDOS etc.
9068
9069 2000-12-14 Akim Demaille <akim@epita.fr>
9070
9071 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9072 Provide a default definition.
9073 Use it when executing the default @ action.
9074 * src/reader.c (reader_output_yylsp): No longer include
9075 `timestamp' and `text' in the default YYLTYPE.
9076
9077 2000-12-12 Akim Demaille <akim@epita.fr>
9078
9079 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9080 (copy_guard): Quote the file names.
9081 Reported by Laurent Mascherpa.
9082
9083 2000-12-12 Akim Demaille <akim@epita.fr>
9084
9085 * src/output.c (output_headers, output_program, output): Be sure
9086 to escape special characters when outputting filenames.
9087 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9088 (output_headers): Don't depend on them, Use ACTSTR.
9089
9090 2000-11-17 Akim Demaille <akim@epita.fr>
9091
9092 * lib/obstack.h: Formatting changes.
9093 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9094 prevents type checking.
9095 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9096 cast the value to (void *): assigning a `foo *' to a `void *'
9097 variable is valid.
9098 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9099 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9100 append characters.
9101
9102 2000-11-17 Akim Demaille <akim@epita.fr>
9103
9104 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9105 as...
9106 (suite.m4, regression.m4, calc.m4): these.
9107 * tests/atgeneral.m4: Update from CVS Autoconf.
9108
9109 2000-11-17 Akim Demaille <akim@epita.fr>
9110
9111 * tests/regression.m4 (%union and --defines): New test,
9112 demonstrating a current bug in the obstack implementation.
9113
9114 2000-11-17 Akim Demaille <akim@epita.fr>
9115
9116 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9117 macros.
9118 Use them to declare the variables which are global or local to
9119 `yyparse'.
9120
9121 2000-11-17 Akim Demaille <akim@epita.fr>
9122
9123 * acconfig.h: Remove, no longer used.
9124
9125 2000-11-07 Akim Demaille <akim@epita.fr>
9126
9127 * src: s/Copyright (C)/Copyright/g.
9128
9129 2000-11-07 Akim Demaille <akim@epita.fr>
9130
9131 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9132 defining.
9133 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9134
9135 2000-11-07 Akim Demaille <akim@epita.fr>
9136
9137 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9138 Merge in a single CPP if/else.
9139
9140 2000-11-07 Akim Demaille <akim@epita.fr>
9141
9142 * src/output.c (output): Remove useless variables.
9143 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9144 argument `data' for consistency with the prototypes.
9145 Qualify it `const'.
9146 (obstack_copy, obstack_copy0): Rename the second argument as
9147 `address' for consistency. Qualify it `const'.
9148 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9149 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9150 `const' their input argument (`data' or `address').
9151 Adjust the corresponding macros to include `const' in casts.
9152
9153 2000-11-03 Akim Demaille <akim@epita.fr>
9154
9155 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9156 s/PFILE1/BISON_HAIRY/.
9157 Adjust dependencies.
9158
9159 2000-11-03 Akim Demaille <akim@epita.fr>
9160
9161 For some reason, this was not applied.
9162
9163 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9164 `unlink': it's no longer used.
9165
9166 2000-11-03 Akim Demaille <akim@epita.fr>
9167
9168 * src/files.c (skeleton_find): New function, eved out of...
9169 (open_files, open_extra_files): here.
9170
9171 2000-11-03 Akim Demaille <akim@epita.fr>
9172
9173 Don't use `atexit'.
9174
9175 * src/files.c (obstack_save): New function.
9176 (done): Rename as...
9177 (output_files): this.
9178 Use `obstack_save'.
9179 * src/main.c (main): Don't use `atexit' to register `done', since
9180 it no longer has to remove tmp files, just call `output_files'
9181 when there are no errors.
9182
9183 2000-11-02 Akim Demaille <akim@epita.fr>
9184
9185 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9186 `unlink': it's no longer used.
9187 * src/files.h: Formatting changes.
9188
9189 2000-11-02 Akim Demaille <akim@epita.fr>
9190
9191 Remove the last uses of mktemp and unlink/delete.
9192
9193 * src/files.c (fdefines, ftable): Removed.
9194 (defines_ostack, table_obstack): New.
9195 Adjust dependencies of the former into uses of the latter.
9196 * src/output.c (output_short_or_char_table, output_short_table):
9197 Convert to using obstacks.
9198 * src/reader.c (copy_comment2): Accept one FILE * and two
9199 obstacks.
9200 (output_token_defines, reader_output_yylsp): Use obstacks.
9201 * src/system.h (obstack_fgrow3): New.
9202
9203 2000-11-01 Akim Demaille <akim@epita.fr>
9204
9205 Change each use of `fattrs' into a use of `attrs_obstack'.
9206
9207 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9208 * src/files.c (fattrs): Remove.
9209 (attrs_obstack): New.
9210 Adjust all dependencies.
9211 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9212
9213 2000-11-01 Akim Demaille <akim@epita.fr>
9214
9215 Introduce obstacks.
9216 Change each use of `faction' into a use of `action_obstack'.
9217
9218 * lib/obstack.h, lib/obstack.c: New files.
9219 * src/files.c (faction): Remove.
9220 (action_obstack): New.
9221 Adjust all dependencies.
9222
9223 2000-10-20 Akim Demaille <akim@epita.fr>
9224
9225 * lib/quote.h (PARAMS): New macro. Use it.
9226
9227 2000-10-16 Akim Demaille <akim@epita.fr>
9228
9229 * src/output.c (output_short_or_char_table): New function.
9230 (output_short_table, output_token_translations): Use it.
9231 (goto_actions): Use output_short_table.
9232
9233 2000-10-16 Akim Demaille <akim@epita.fr>
9234
9235 * src/symtab.c (bucket_new): New function.
9236 (getsym): Use it.
9237
9238 * src/output.c (output_short_table): New argument to display the
9239 comment associated with the table.
9240 Adjust dependencies.
9241 (output_gram): Use it.
9242 (output_rule_data): Nicer output layout for YYTNAME.
9243
9244 2000-10-16 Akim Demaille <akim@epita.fr>
9245
9246 * src/lex.c (read_typename): New function.
9247 (lex): Use it.
9248 * src/reader.c (copy_dollar): Likewise.
9249
9250 2000-10-16 Akim Demaille <akim@epita.fr>
9251
9252 * src/reader.c (copy_comment2): Expect the input stream to be on
9253 the `/' which is suspected to open a comment, instead of being
9254 called after `//' or `/*' was read.
9255 (copy_comment, copy_definition, parse_union_decl, copy_action)
9256 (copy_guard): Adjust.
9257
9258 2000-10-16 Akim Demaille <akim@epita.fr>
9259
9260 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9261 `read_signed_integer'.
9262
9263 2000-10-16 Akim Demaille <akim@epita.fr>
9264
9265 * src/reader.c (copy_dollar): New function.
9266 (copy_guard, copy_action): Use it.
9267
9268 2000-10-16 Akim Demaille <akim@epita.fr>
9269
9270 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9271 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9272 New files, from Fileutils 4.0.27.
9273 * src/main.c (printable_version): Remove.
9274 * src/lex.c, src/reader.c: Use `quote'.
9275
9276 2000-10-04 Akim Demaille <akim@epita.fr>
9277
9278 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9279
9280 2000-10-04 Akim Demaille <akim@epita.fr>
9281
9282 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9283
9284 2000-10-04 Akim Demaille <akim@epita.fr>
9285
9286 When a literal string is used to define two different tokens,
9287 `bison -v' segfaults.
9288 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9289
9290 * tests/regression.m4: New file.
9291 Include the core of the sample provided by Piotr Gackiewicz.
9292 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9293 properly.
9294
9295 2000-10-04 Akim Demaille <akim@epita.fr>
9296
9297 * src/reader.c (parse_expect_decl): Keep `count' within the size
9298 of `buffer'.
9299 From Neil Booth.
9300
9301 2000-10-02 Paul Eggert <eggert@twinsun.com>
9302
9303 * bison.s1 (yyparse): Assign the default value
9304 unconditionally, to avoid a GCC warning and make the parser a
9305 tad smaller.
9306
9307 2000-10-02 Akim Demaille <akim@epita.fr>
9308
9309 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9310 options.
9311
9312 2000-10-02 Akim Demaille <akim@epita.fr>
9313
9314 * src/derives.c, src/print.c, src/reduce.c: To ease the
9315 translation, move some `\n' out of the translated strings.
9316
9317 2000-10-02 Akim Demaille <akim@epita.fr>
9318
9319 The location tracking mechanism is precious for parse error
9320 messages. Nevertheless, it is enabled only when `@n' is used in
9321 the grammar, which is a different issue (you can use it in error
9322 message, but not in the grammar per se). Therefore, there should
9323 be another means to enable it.
9324
9325 * src/getargs.c (getargs): Support `--locations'.
9326 (usage): Report it.
9327 * src/getargs.h (locationsflag): Export it.
9328 * src/lex.c (percent_table): Support `%locations'.
9329 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9330 with `locationsflag'.
9331 * doc/bison.texinfo: Document `--locations' and `%locations'.
9332 Sort the options.
9333 * tests/calc.m4: Test it.
9334
9335 For regularity of the names, replace each
9336 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9337 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9338 In addition replace each `flag' with `_flag'.
9339
9340 2000-10-02 Akim Demaille <akim@epita.fr>
9341
9342 Also test parse error messages, including with YYERROR_VERBOSE.
9343
9344 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9345 associative).
9346 Use it to check the computations.
9347 Use it to check `nonassoc' is honored.
9348 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9349 `--yyerror-verbose'.
9350 (_AT_CHECK_CALC): Adjust to this option.
9351 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9352
9353 2000-10-02 Akim Demaille <akim@epita.fr>
9354
9355 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9356 the latter demonstrates a flaw in the handling of non debugging
9357 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9358 was used in order to simplify:
9359
9360 #if YYDEBUG
9361 if (yydebug)
9362 {
9363 ...
9364 }
9365 #endif
9366
9367 into
9368
9369 if (yydebug)
9370 {
9371 ...
9372 }
9373
9374 unfortunately this leads to a CPP conflict when
9375 `--name-prefix=foo' is used since it produces `#define yydebug
9376 foodebug'.
9377
9378 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9379 (YYDPRINTF): New macro.
9380 Spread its use.
9381 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9382 the bison options.
9383 Also test `--verbose', `--defines' and `--name-prefix'.
9384
9385 2000-10-02 Akim Demaille <akim@epita.fr>
9386
9387 Improve the readability of the produced parsers.
9388
9389 * src/bison.s1: Formatting changes.
9390 Improve the comment related to the `$' mark.
9391 (yydefault): Don't fall through to `yyresume': `goto' there.
9392 * src/output.c (output_parser): When the `$' is met, skip the end
9393 of its line.
9394 New variable, `number_of_dollar_signs', to check there's exactly
9395 one `$' in the parser skeleton.
9396
9397 2000-10-02 Akim Demaille <akim@epita.fr>
9398
9399 * lib/xstrdup.c: New file, from the fileutils.
9400 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9401 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9402 instead of strlen + xmalloc + strcpy.
9403 * src/symtab.c (copys): Remove, use xstrdup instead.
9404
9405 2000-10-02 Akim Demaille <akim@epita.fr>
9406
9407 * src/gram.h (associativity): New enum type which replaces the
9408 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9409 `right_assoc', `left_assoc' and `non_assoc'.
9410 Adjust all dependencies.
9411 * src/reader.c: Formatting changes.
9412 (LTYPESTR): Don't define it, use it as a literal in
9413 `reader_output_yylsp'.
9414 * src/symtab.h (symbol_class): New enum type which replaces the
9415 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9416 `sunknown', `stoken and `snterm'.
9417
9418 2000-10-02 Akim Demaille <akim@epita.fr>
9419
9420 * src/getargs.c (fixed_outfiles): Rename as...
9421 (yaccflag): for consistency and accuracy.
9422 Adjust dependencies.
9423
9424 2000-10-02 Akim Demaille <akim@epita.fr>
9425
9426 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9427 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9428 difficult and introduced a lot of core dump. It turns out that
9429 Bison used an implementation of `xmalloc' based on `calloc', and
9430 at various places it does depend upon the initialization to 0. I
9431 have not tried to isolate the pertinent places, and all the former
9432 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9433 someone should address this issue.
9434
9435 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9436 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9437 files.
9438 Adjust dependencies.
9439 * src/warshall.h: New file.
9440 Propagate.
9441
9442 2000-10-02 Akim Demaille <akim@epita.fr>
9443
9444 Various anti-`extern in *.c' changes.
9445
9446 * src/system.h: Include `assert.h'.
9447
9448 2000-10-02 Akim Demaille <akim@epita.fr>
9449
9450 * src/state.h (nstates, final_state, first_state, first_shift)
9451 (first_reduction): Move their exportation from here...
9452 * src/LR0.h: to here.
9453 Adjust dependencies.
9454 * src/getargs.c (statisticsflag): New variable.
9455 Add support for `--statistics'.
9456 Adjust dependencies.
9457
9458 Remove a lot of now useless `extern' statements in most files.
9459
9460 2000-10-02 Akim Demaille <akim@epita.fr>
9461
9462 * src/LR0.h: New file.
9463 Propagate its use.
9464
9465 2000-10-02 Akim Demaille <akim@epita.fr>
9466
9467 * src/print.h: New file.
9468 Propagate its use.
9469 * src/print.c: Formatting and ordering changes.
9470 (verbose, terse): Replace with...
9471 (print_results): this new function.
9472 Adjust dependencies.
9473
9474 2000-10-02 Akim Demaille <akim@epita.fr>
9475
9476 * src/conflicts.c (conflict_report): New function.
9477 (conflict_log, verbose_conflict_log): Replace with...
9478 (print_conflicts): this function.
9479 Adjust dependencies.
9480 * src/conflicts.h: New file.
9481 Propagate its inclusion.
9482
9483 2000-10-02 Akim Demaille <akim@epita.fr>
9484
9485 * src/nullable.h: New file.
9486 Propagate its inclusion.
9487 * src/nullable.c: Formatting changes.
9488
9489 2000-10-02 Akim Demaille <akim@epita.fr>
9490
9491 * src/reduce.h: New file.
9492 Propagate its inclusion.
9493 * src/reduce.c: Topological sort and other formatting changes.
9494 (bool, TRUE, FALSE): Move their definition to...
9495 * src/system.h: here.
9496
9497 2000-10-02 Akim Demaille <akim@epita.fr>
9498
9499 * src/files.c: Formatting changes.
9500 (tryopen, tryclose, openfiles): Rename as...
9501 (xfopen, xfclose, open_files): this.
9502 (stringappend): static.
9503 * src/files.h: Complete the list of exported symbols.
9504 Propagate its use.
9505
9506 2000-10-02 Akim Demaille <akim@epita.fr>
9507
9508 * src/reader.h: New file.
9509 Propagate its use instead of tedious list of `extern' and
9510 prototypes.
9511 * src/reader.c: Formatting changes, topological sort,
9512 s/register//.
9513
9514 2000-10-02 Akim Demaille <akim@epita.fr>
9515
9516 * src/lex.h: Prototype `lex.c' exported functions.
9517 * src/reader.c: Adjust.
9518 * src/lex.c: Formatting changes.
9519 (safegetc): Rename as...
9520 (xgetc): this.
9521
9522 2000-10-02 Akim Demaille <akim@epita.fr>
9523
9524 * src/lalr.h: New file.
9525 Propagate its inclusion instead of prototypes and `extern'.
9526 * src/lalr.c: Formatting changes, topological sorting etc.
9527
9528 2000-10-02 Akim Demaille <akim@epita.fr>
9529
9530 * src/output.c (token_actions): Introduce a temporary array,
9531 YYDEFACT, that makes it possible for this function to use
9532 output_short_table.
9533
9534 2000-10-02 Akim Demaille <akim@epita.fr>
9535
9536 `user_toknums' is output as a `short[]' in `output.c', while it is
9537 defined as a `int[]' in `reader.c'. For consistency with the
9538 other output tables, `user_toknums' is now defined as a table of
9539 shorts.
9540
9541 * src/reader.c (user_toknums): Be a short table instead of an int
9542 table.
9543 Adjust dependencies.
9544
9545 Factor the short table outputs.
9546
9547 * src/output.c (output_short_table): New function.
9548 * src/output.c (output_gram, output_stos, output_rule_data)
9549 (output_base, output_table, output_check): Use it.
9550
9551 2000-10-02 Akim Demaille <akim@epita.fr>
9552
9553 * src/output.c (output): Topological sort of the functions, in
9554 order to get rid of the `static' prototypes.
9555 No longer use `register'.
9556 * src/output.h: New file.
9557 Propagate its inclusion in files explicitly prototyping functions
9558 from output.c.
9559
9560 2000-09-21 Akim Demaille <akim@epita.fr>
9561
9562 * src/atgeneral.m4: Update from Autoconf.
9563
9564 2000-09-21 Akim Demaille <akim@epita.fr>
9565
9566 * src/closure.h: New file.
9567 * src/closure.c: Formatting changes, topological sort over the
9568 functions, use of closure.h.
9569 (initialize_closure, finalize_closure): Rename as...
9570 (new_closure, free_closure): these. Adjust dependencies.
9571 * src/LR0.c: Formatting changes, topological sort, use of
9572 cloture.h.
9573 (initialize_states): Rename as...
9574 (new_states): this.
9575 * src/Makefile.am (noinst_HEADERS): Adjust.
9576
9577 2000-09-20 Akim Demaille <akim@epita.fr>
9578
9579 * src/acconfig.h: Don't protect config.h against multiple
9580 inclusion.
9581 Don't define PARAMS.
9582 * src/system.h: Define PARAMS.
9583 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9584 purpose of config.h. system.h must not try to fix wrong
9585 definitions in config.h.
9586
9587 2000-09-20 Akim Demaille <akim@epita.fr>
9588
9589 * src/derives.h: New file.
9590 * src/main.c, src/derives.h: Use it.
9591 Formatting changes.
9592 * src/Makefile.am (noinst_HEADERS): Adjust.
9593
9594 2000-09-20 Akim Demaille <akim@epita.fr>
9595
9596 * tests/atgeneral.m4: Update from Autoconf.
9597 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9598 (AT_CHECK_CALC): New macros.
9599 Use these macros to test bison with options `', `--raw',
9600 `--debug', `--yacc', `--yacc --debug'.
9601
9602 2000-09-19 Akim Demaille <akim@epita.fr>
9603
9604 * src/output.c: Formatting changes.
9605 * src/machine.h: Remove, leaving its contents in...
9606 * src/system.h: here.
9607 Include stdio.h.
9608 Adjust all dependencies on stdio.h and machine.h.
9609 * src/getargs.h: New file.
9610 Let all `extern' declarations about getargs.c be replaced with
9611 inclusion of `getargs.h'.
9612 * src/Makefile.am (noinst_HEADERS): Adjust.
9613
9614 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9615 scope.
9616 (yyerror): Returns void, not int.
9617 * doc/bison.texinfo: Formatting changes.
9618
9619 2000-09-19 Akim Demaille <akim@epita.fr>
9620
9621 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9622 portable.
9623
9624 2000-09-18 Akim Demaille <akim@epita.fr>
9625
9626 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9627 * src/Makefile.am (INCLUDES): Don't.
9628 Be ready to fetch headers in lib/.
9629
9630 2000-09-18 Akim Demaille <akim@epita.fr>
9631
9632 * doc/bison.texinfo: Update the copyright.
9633 ANSIfy and GNUify the examples.
9634 Remove the old menu.
9635
9636 2000-09-18 Akim Demaille <akim@epita.fr>
9637
9638 First set of tests: use the `calc' example from the documentation.
9639
9640 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9641 is defined only when YYDEBUG is.
9642 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9643 * src/files.c (tryopen, tryclose): Formatting changes.
9644 Move to the top and be static.
9645 * src/reader.c (read_signed_integer): Likewise.
9646 * tests/calc.m4: New file.
9647 * Makefile.am, suite.m4: Adjust.
9648 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9649
9650 2000-09-18 Akim Demaille <akim@epita.fr>
9651
9652 Add support for an Autotest test suite for Bison.
9653
9654 * m4/m4.m4, m4/atconfig.m4: New files.
9655 * m4/Makefile.am (EXTRA_DIST): Adjust.
9656 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9657 files.
9658 * src/getargs.c: Display a more standard --version message.
9659 * src/reader.c (reader): Formatting changes.
9660 No longer depend upon VERSION_STRING.
9661 * configure.in: No longer use `dnl'.
9662 Set up the test suite and the new directory `tests/.
9663 (VERSION_STRING): Remove.
9664
9665 2000-04-14 Akim Demaille <akim@epita.fr>
9666
9667 * src/reader.c (copy_comment2): New function, same as former
9668 `copy_comment', but outputs into two FILE *.
9669 (copy_comment): Use it.
9670 (parse_union_decl): Use it.
9671 (get_type, parse_start_decl): Use the same `invalid' message.
9672 (parse_start_decl, parse_union_decl): Use the same `multiple'
9673 message.
9674 (parse_union_decl, copy_guard, copy_action): Use the same
9675 `unmatched' message.
9676 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9677
9678 2000-03-31 Akim Demaille <akim@epita.fr>
9679
9680 * src/files.c (tryopen, tryclose): Move to the top.
9681 Be static.
9682
9683 2000-03-31 Akim Demaille <akim@epita.fr>
9684
9685 * src/main.c (main): Don't call `done', exit does it.
9686
9687 2000-03-31 Akim Demaille <akim@epita.fr>
9688
9689 * allocate.c: s/return (foo)/return foo/.
9690 * lalr.c: Likewise.
9691 * LR0.c: Likewise.
9692 * output.c: Likewise.
9693 * reader.c: Likewise.
9694 * symtab.c: Likewise.
9695 * vmsgetargs.c: Likewise.
9696
9697 2000-03-31 Akim Demaille <akim@epita.fr>
9698
9699 Clean up the error reporting functions.
9700
9701 * src/report.c: New file.
9702 * src/report.h: Likewise.
9703 * src/Makefile.am: Adjust.
9704 * m4/error.m4: New file.
9705 * m4/Makefile.am: Adjust.
9706 * configure.in (jm_PREREQ_ERROR): Call it.
9707 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9708 Remove.
9709 (fatal, fatals): Remove. All callers use complain.c::fatal.
9710 (warn, warni, warns, warnss, warnss): Remove. All callers use
9711 complain.c::complain.
9712 (toomany): Remove, use fatal instead.
9713 * src/files.c (done): No argument, use complain_message_count.
9714 * src/main.c (main): Register `done' to `atexit'.
9715
9716 * src/getargs.c (usage): More `fputs', less `fprintf'.
9717
9718 2000-03-28 Akim Demaille <akim@epita.fr>
9719
9720 * lib/: New directory.
9721 * Makefile.am (SUBDIRS): Adjust.
9722 * configure.in: Adjust.
9723 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9724 useless.
9725 * src/alloca.c: Moved to lib/.
9726 * src/getopt.c: Likewise.
9727 * src/getopt1.c: Likewise.
9728 * src/getopt.h: Likewise.
9729 * src/ansi2knr.c: Likewise.
9730 * src/ansi2knr.1: Likewise.
9731 * src/Makefile.am: Adjust.
9732 * lib/Makefile.am: New file.
9733
9734 2000-03-28 Akim Demaille <akim@epita.fr>
9735
9736 * src/getargs.c (usage): Refresh the help message.
9737
9738 2000-03-17 Akim Demaille <akim@epita.fr>
9739
9740 * src/getopt1.c: Updated from textutils 2.0e
9741 * src/getopt.c: Likewise.
9742 * src/getopt.h: Likewise.
9743
9744 2000-03-17 Akim Demaille <akim@epita.fr>
9745
9746 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9747 the file name, not the whole `#line LINE FILE'.
9748
9749 2000-03-17 Akim Demaille <akim@epita.fr>
9750
9751 On syntax errors, report the token on which we choked.
9752
9753 * src/bison.s1 (yyparse): In the label yyerrlab, when
9754 YYERROR_VERBOSE, add yychar in msg.
9755
9756 2000-03-17 Akim Demaille <akim@epita.fr>
9757
9758 * src/reader.c (copy_at): New function.
9759 (copy_guard): Use it.
9760 (copy_action): Use it.
9761
9762 2000-03-17 Akim Demaille <akim@epita.fr>
9763
9764 Be kind to translators, save some useless translations.
9765
9766 * src/main.c (banner): New function.
9767 (fatal_banner): Use it.
9768 (warn_banner): Use it.
9769
9770 2000-03-17 Akim Demaille <akim@epita.fr>
9771
9772 * src/reader.c (copy_definition): Use copy_string and
9773 copy_comment. Removed now unused `match', `ended',
9774 `cplus_comment'.
9775 (copy_comment, copy_string): Moved, to be visible from
9776 copy_definition.
9777
9778 2000-03-17 Akim Demaille <akim@epita.fr>
9779
9780 * src/reader.c (copy_string): Declare `static inline'. No
9781 problems with inline, since it is checked by configure.
9782 (copy_comment): Likewise.
9783
9784 2000-03-17 Akim Demaille <akim@epita.fr>
9785
9786 * src/reader.c (packsymbols): Formatting changes.
9787
9788 2000-03-17 Akim Demaille <akim@epita.fr>
9789
9790 * src/reader.c (copy_comment): New function, factored out from:
9791 (copy_action): Use it. Removed now unused `match', `ended',
9792 `cplus_comment'.
9793 (copy_guard): Likewise.
9794
9795 2000-03-17 Akim Demaille <akim@epita.fr>
9796
9797 * src/reader.c (copy_string): New function, factored out from:
9798 (copy_action): Use it.
9799 (copy_guard): Likewise.
9800
9801 2000-03-17 Akim Demaille <akim@epita.fr>
9802
9803 Change the handling of @s so that they behave exactly like $s.
9804 There is now a pseudo variable @$ (readble and writable), location
9805 of the lhs of the rule (by default ranging from the location of
9806 the first symbol of the rhs, to the location of the last symbol,
9807 or, if the rhs is empty, YYLLOC).
9808
9809 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9810 yyval.
9811 (yyparse): When providing a default semantic action, provide a
9812 default location action.
9813 (after the $): No longer change `*YYLSP', just stack YYLOC the
9814 same way you stack YYVAL.
9815 * src/reader.c (read_declarations): Use warns.
9816 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9817 (copy_action, case '@'): Likewise.
9818 Use a standard error message, to save useless work from
9819 translators.
9820
9821 2000-03-17 Akim Demaille <akim@epita.fr>
9822
9823 * src/bison.s1: Formatting and cosmetics changes.
9824 * src/reader.c: Likewise.
9825 Update the Copyright notice.
9826
9827 2000-03-17 Akim Demaille <akim@epita.fr>
9828
9829 * src/bison.s1 (#line): All set to `#line' only, since the
9830 Makefile now handles them.
9831
9832 2000-03-16 Akim Demaille <akim@epita.fr>
9833
9834 * src/output.c (output_rule_data): Output the documentation of
9835 some of the tables.
9836 (Copyright notice): Update.
9837 Formatting changes.
9838
9839 2000-03-16 Akim Demaille <akim@epita.fr>
9840
9841 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9842 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9843 One `#if YYDEBUG' remains, since it uses variables which are
9844 defined only if `YYDEBUG != 0'.
9845
9846 2000-03-16 Akim Demaille <akim@epita.fr>
9847
9848 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9849 and related variables so that the similarities are highlighted.
9850
9851 2000-03-16 Akim Demaille <akim@epita.fr>
9852
9853 * src/bison.s1: Properly indent CPP directives.
9854
9855 2000-03-16 Akim Demaille <akim@epita.fr>
9856
9857 * src/bison.s1: Properly indent the `alloca' CPP section.
9858
9859 2000-03-16 Akim Demaille <akim@epita.fr>
9860
9861 Do not hard code values of directories in `configure.in'.
9862 Update the `configure' tool chain.
9863
9864 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9865 src/makefile.am.
9866 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9867 (AC_OUTPUT): Add m4/Makefile.
9868 Bump to bison 1.28a, 1.29 has never been released.
9869 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9870 handled via src/Makefile.am.
9871 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9872 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9873 autoheader.
9874 * Makefile.am (SUBDIRS): Add m4.
9875 (ACLOCAL_AM_FLAGS): New variable.
9876 (AUTOMAKE_OPTIONS): Add check-news.
9877 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9878 the proper line number and file name.
9879 (DEFS): Propagate the location of bison library files and of the
9880 locale files.
9881 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9882 builddir.
9883 * acinclude.m4: Remove, replaced by the directory m4.
9884 * m4/Makefile.am (EXTRA_DIST): New variable.
9885 * m4/gettext.m4: New file, from the fileutils.
9886 * m4/lcmessage.m4: Likewise
9887 * m4/progtest.m4: Likewise.
9888 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9889
9890 2000-03-10 Akim Demaille <akim@epita.fr>
9891
9892 * src/closure.c:
9893 Formatting changes of various comments.
9894 Respect the GNU coding standards at various places.
9895 Don't use `_()' when no translation is needed.
9896
9897 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9898
9899 * src/files.c:
9900 OS/2 honors TMPDIR environment variable.
9901
9902 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9903
9904 * doc/bison.texinfo: Tweaked spelling and grammar.
9905 Updated ISBN.
9906 Removed reference to price of printed copy.
9907 Mention BISON_SIMPLE and BISON_HAIRY.
9908
9909 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9910
9911 * configure.in, NEWS:
9912 Bison 1.29 released.
9913
9914 1999-10-27 Jesse Thilo <jthilo@gnu.org>
9915
9916 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
9917 Added reference card.
9918
9919 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9920
9921 * po/ru.po: Added Russian translation.
9922
9923 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9924
9925 * configure.in: Added Russian translation.
9926
9927 1999-07-06 Jesse Thilo <jthilo@gnu.org>
9928
9929 * configure.in, NEWS, README:
9930 Released version 1.28.
9931
9932 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9933
9934 * src/system.h:
9935 Squashed redefinition warning on some systems.
9936
9937 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
9938 Have configure build version string instead of relying on ANSI string
9939 concatentation.
9940
9941 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9942
9943 * po/POTFILES.in: Got rid of version.c.
9944
9945 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9946
9947 * acconfig.h, configure.in:
9948 Have configure build version string instead of relying on ANSI string
9949 concatentation.
9950
9951 1999-06-08 Jesse Thilo <jthilo@gnu.org>
9952
9953 * doc/bison.1:
9954 Dropped mention of `+' for long-named options.
9955
9956 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9957
9958 * src/files.c: Added <unistd.h> for unlink().
9959
9960 * src/Makefile.am, src/system.h:
9961 I18n fixes.
9962
9963 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9964
9965 * README: Added a FAQ list.
9966
9967 * configure.in, acconfig.h:
9968 I18n fixes.
9969
9970 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9971
9972 * doc/FAQ, doc/Makefile.am:
9973 Added a FAQ list.
9974
9975 1999-05-19 Jesse Thilo <jthilo@gnu.org>
9976
9977 * src/alloc.h, src/symtab.h, src/version.c:
9978 Protected inclusion of "config.h" with HAVE_CONFIG_H.
9979
9980 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9981
9982 * src/.cvsignore, src/Makefile.am:
9983 Reorganized: sources in `src', documentation in `doc'.
9984
9985 * src/lex.c (literalchar):
9986 fixed the code for escaping double quotes (thanks
9987 Jonathan Czisny.)
9988
9989 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9990
9991 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
9992 Adjusted paths to reflect directory reorganization.
9993
9994 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9995
9996 * doc/.cvsignore, doc/Makefile.am:
9997 Reorganized: sources in `src', documentation in `doc'.
9998
9999 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10000
10001 * configure.in:
10002 Updated AC_INIT file to reflect directory reorganization.
10003
10004 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10005 Reorganized: sources in `src', documentation in `doc'.
10006
10007 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10008
10009 * src/allocate.c:
10010 Don't declare calloc() and realloc() if not necessary.
10011
10012 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10013
10014 * configure.in, acconfig.h, acinclude.m4:
10015 Don't declare calloc() and realloc() if not necessary.
10016
10017 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10018
10019 * po/.cvsignore: Added i18n support.
10020
10021 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10022
10023 * acconfig.h, configure.in, Makefile.am:
10024 Added i18n support.
10025
10026 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10027
10028 * src/bison.s1: Fixed #line numbers.
10029
10030 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10031
10032 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10033 Added PO files from Translation Project.
10034
10035 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10036
10037 * Makefile.am:
10038 Added support for non-ANSI compilers (ansi2knr).
10039
10040 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10041
10042 * configure.in: Bumped version number to 1.27.
10043
10044 * Makefile.am:
10045 Added `bison.simple' to list of files removed by `make distclean'.
10046
10047 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10048
10049 * src/files.c, src/files.h:
10050 Defined locations of parser files in config.h instead of Makefile.
10051
10052 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10053
10054 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10055 Defined locations of parser files in config.h instead of Makefile.
10056
10057 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10058
10059 * Makefile.am:
10060 Removed inappropriate use of $< macro.
10061
10062 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10063
10064 * po/Makefile.in.in, po/POTFILES.in:
10065 Add `po' directory skeleton.
10066
10067 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10068
10069 * README: Document help-bison list.
10070
10071 * configure.in: Add check for mkstemp().
10072
10073 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10074
10075 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10076 Hush a few compiler warnings.
10077
10078 * src/files.c:
10079 Add tryclose(), which verifies that fclose was successful.
10080 Hush a couple of compiler warnings.
10081
10082 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10083
10084 * Makefile.am, OChangeLog:
10085 ChangeLog is now automatically generated. Include the old version as
10086 OChangeLog.
10087
10088 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10089
10090 * 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:
10091 Update FSF address.
10092
10093 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10094
10095 * doc/bison.texinfo: Fix formatting glitch.
10096
10097 * doc/bison.texinfo: Update FSF address.
10098
10099 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10100
10101 * acconfig.h: Update FSF address.
10102
10103 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10104
10105 * src/system.h:
10106 Don't define PACKAGE here, since config.h defines it.
10107
10108 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10109
10110 * src/reader.c: Update copyright date.
10111
10112 * src/main.c:
10113 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10114 favor of output directly to stderr (avoids buffer overruns).
10115
10116 * src/reader.c: Some checks for premature EOF.
10117
10118 * 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:
10119 Use prototypes if the compiler understands them.
10120
10121 * src/files.c: Honor TMPDIR on Unix hosts.
10122 Use prototypes if the compiler understands them.
10123
10124 * src/reader.c:
10125 Fix a couple of buffer overrun bugs.
10126 Use prototypes if the compiler understands them.
10127
10128 * src/system.h: Include unistd.h and ctype.h.
10129 Use #ifdef instead of #if for NLS symbols.
10130
10131 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10132
10133 * doc/bison.texinfo:
10134 Delete comment "consider using @set for edition number, etc..." since
10135 we now are doing so.
10136
10137 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10138
10139 * configure.in:
10140 Use prototypes if the compiler understands them.
10141
10142 * NEWS: Document 1.26 highlights.
10143
10144 * Makefile.am: Require Automake 1.3 or later.
10145
10146 * acconfig.h:
10147 Use prototypes if the compiler understands them.
10148
10149 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10150
10151 * src/version.c:
10152 Use VERSION symbol from automake for version number.
10153
10154 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10155
10156 * acconfig.h, configure.in, version.cin:
10157 Use VERSION symbol from automake for version number.
10158
10159 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10160
10161 * Makefile.am:
10162 Distribute original version of simple parser (bison.s1), not built
10163 version (bison.simple).
10164
10165 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10166
10167 * doc/bison.texinfo: Add info dir entry.
10168
10169 * doc/bison.texinfo:
10170 Let automake put version number into documentation.
10171
10172 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10173
10174 * src/bison.cld, src/build.com, src/vmshlp.mar:
10175 Add non-RCS files from /gd/gnu/bison.
10176
10177 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10178
10179 * doc/bison.1:
10180 Document the BISON_HAIRY and BISON_SIMPLE variables.
10181
10182 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10183
10184 * src/version.c: Build version.c automatically.
10185
10186 * src/reader.c:
10187 Fix token numbering (used to start at 258, not 257).
10188
10189 * src/system.h: Include config.h.
10190
10191 * src/getargs.c: Update bug report address.
10192
10193 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10194 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10195
10196 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10197
10198 * Makefile.am:
10199 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10200
10201 * configure.in, version.cin:
10202 Build version.c automatically.
10203
10204 * AUTHORS: Add AUTHORS file.
10205
10206 * README: Update bug report address.
10207
10208 * bison.simple:
10209 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10210
10211 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10212 Add automake stuff.
10213
10214 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10215
10216 * doc/bison.texinfo: Clean up some formatting.
10217
10218 1998-05-05 Richard Stallman <rms@gnu.org>
10219
10220 * doc/bison.texinfo:
10221 Explain better why to make a pure parser.
10222
10223 1998-01-05 Richard Stallman <rms@gnu.org>
10224
10225 * src/files.c (openfiles):
10226 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10227 find a temporary directory, if possible. Do not unlink files while
10228 they are open.
10229
10230 1997-08-25 Richard Stallman <rms@gnu.org>
10231
10232 * src/reader.c (stack_offset;):
10233 Change some warni to warns.
10234
10235 * src/lex.c (literalchar): Use warns, not warni.
10236
10237 1997-06-28 Richard Stallman <rms@gnu.org>
10238
10239 * src/bison.s1: Add a Bison version comment.
10240
10241 * src/main.c (fatal, warn, berror):
10242 Use program_name.
10243
10244 1997-06-28 Richard Stallman <rms@gnu.org>
10245
10246 * Makefile.in (bison_version): New variable.
10247 (dist): Use that variable.
10248 (bison.s1): Substitute the Bison version into bison.simple.
10249
10250 * bison.simple: Add a Bison version comment.
10251
10252 1997-06-18 Richard Stallman <rms@gnu.org>
10253
10254 * src/main.c (fatal, warn, berror):
10255 Make error messages standard.
10256 (toomany): Improve error message text.
10257
10258 * 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:
10259 new.h renamed to alloc.h.
10260
10261 1997-06-18 Richard Stallman <rms@gnu.org>
10262
10263 * Makefile.in: new.h renamed to alloc.h.
10264
10265 1997-05-24 Richard Stallman <rms@gnu.org>
10266
10267 * src/lex.c (literalchar):
10268 Fix the code for escaping \, " and '.
10269
10270 (lex): Avoid trouble when there are many chars
10271 to discard in a char literal with just several chars in it.
10272
10273 1997-05-17 Richard Stallman <rms@gnu.org>
10274
10275 * src/bison.s1:
10276 Use malloc, if using alloca is troublesome.
10277 (YYSTACK_USE_ALLOCA): New flag macro.
10278 Define it for some systems and compilers.
10279 (YYSTACK_ALLOC): New macro.
10280 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10281 If it was malloc'd, free it.
10282
10283 1997-05-17 Richard Stallman <rms@gnu.org>
10284
10285 * bison.simple:
10286 Use malloc, if using alloca is troublesome.
10287 (YYSTACK_USE_ALLOCA): New flag macro.
10288 Define it for some systems and compilers.
10289 (YYSTACK_ALLOC): New macro.
10290 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10291 If it was malloc'd, free it.
10292
10293 1997-04-23 Richard Stallman <rms@gnu.org>
10294
10295 * src/bison.s1:
10296 (alloca) [__hpux]: Always define as __builtin_alloca.
10297
10298 1997-04-23 Richard Stallman <rms@gnu.org>
10299
10300 * bison.simple:
10301 (alloca) [__hpux]: Always define as __builtin_alloca.
10302
10303 1997-04-22 Richard Stallman <rms@gnu.org>
10304
10305 * src/bison.s1:
10306 [__hpux]: Include alloca.h (right for HPUX 10)
10307 instead of declaring alloca (right for HPUX 9).
10308
10309 * src/bison.s1 (__yy_memcpy):
10310 Declare arg `count' as unsigned int.
10311 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10312
10313 1997-04-22 Richard Stallman <rms@gnu.org>
10314
10315 * bison.simple:
10316 [__hpux]: Include alloca.h (right for HPUX 10)
10317 instead of declaring alloca (right for HPUX 9).
10318
10319 * bison.simple (__yy_memcpy):
10320 Declare arg `count' as unsigned int.
10321 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10322
10323 1997-01-03 Richard Stallman <rms@gnu.org>
10324
10325 * src/allocate.c: [__STDC__ or _MSC_VER]:
10326 Declare calloc and realloc to return void *.
10327
10328 1997-01-02 Richard Stallman <rms@gnu.org>
10329
10330 * src/system.h:
10331 [_MSC_VER]: Include stdlib.h and process.h.
10332 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10333
10334 * src/main.c (main): Return FAILURE as a value.
10335 (printable_version): Declare arg as int, not char.
10336
10337 1997-01-02 Richard Stallman <rms@gnu.org>
10338
10339 * Makefile.in (dist):
10340 Explicitly check for symlinks, and copy them.
10341
10342 1996-12-19 Richard Stallman <rms@gnu.org>
10343
10344 * src/files.c:
10345 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10346
10347 1996-12-18 Paul Eggert <eggert@gnu.org>
10348
10349 * src/bison.s1 (yyparse):
10350 If __GNUC__ and YYPARSE_PARAM are both defined,
10351 declare yyparse to have a void * argument.
10352
10353 1996-12-18 Paul Eggert <eggert@gnu.org>
10354
10355 * bison.simple (yyparse):
10356 If __GNUC__ and YYPARSE_PARAM are both defined,
10357 declare yyparse to have a void * argument.
10358
10359 1996-12-17 Richard Stallman <rms@gnu.org>
10360
10361 * src/reduce.c (nbits): Add some casts.
10362
10363 1996-08-12 Richard Stallman <rms@gnu.org>
10364
10365 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10366
10367 1996-08-12 Richard Stallman <rms@gnu.org>
10368
10369 * bison.simple: Test _MSDOS as well as _MSDOS_.
10370
10371 1996-07-31 Richard Stallman <rms@gnu.org>
10372
10373 * src/bison.s1:
10374 [__sun && __i386]: Include alloca.h.
10375
10376 1996-07-31 Richard Stallman <rms@gnu.org>
10377
10378 * bison.simple:
10379 [__sun && __i386]: Include alloca.h.
10380
10381 1996-07-30 Richard Stallman <rms@gnu.org>
10382
10383 * src/bison.s1: Comment change.
10384
10385 * src/bison.s1: Test _MSDOS_, not MSDOS.
10386
10387 1996-07-30 Richard Stallman <rms@gnu.org>
10388
10389 * bison.simple: Comment change.
10390
10391 * bison.simple: Test _MSDOS_, not MSDOS.
10392
10393 1996-06-01 Richard Stallman <rms@gnu.org>
10394
10395 * 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:
10396 Insert `_' macro around many string constants.
10397
10398 * src/main.c:
10399 Insert `_' macro around many string constants.
10400
10401 (main): Call setlocale, bindtextdomain and textdomain.
10402
10403 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10404 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10405 [ENABLE_NLS]: Include libintl.h.
10406 [ENABLE_NLS] (gettext): Define.
10407 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10408 (N_, PACKAGE, LOCALEDIR): New macros.
10409
10410 1996-06-01 Richard Stallman <rms@gnu.org>
10411
10412 * POTFILES.in: New file.
10413
10414 * Makefile.in (allocate.o):
10415 Define target explicitly.
10416
10417 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10418 (LDFLAGS): Set to @LDFLAGS@.
10419 (configure): Run autoconf only if preceding `cd' succeeds.
10420 (bison.s1): Redirect output to temporary file then move the
10421 temporary to the target, rather than redirecting directly to bison.s1.
10422 (clean): Remove config.status and config.log.
10423 (distclean): Don't remove config.status here.
10424
10425 1996-05-12 Richard Stallman <rms@gnu.org>
10426
10427 * src/bison.s1:
10428 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10429
10430 1996-05-12 Richard Stallman <rms@gnu.org>
10431
10432 * bison.simple:
10433 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10434
10435 1996-05-11 Richard Stallman <rms@gnu.org>
10436
10437 * src/bison.s1 (__yy_memcpy):
10438 Really reorder the args, as was supposedly done on Feb 14 1995.
10439 (yyparse): Calls changed accordingly.
10440
10441 1996-05-11 Richard Stallman <rms@gnu.org>
10442
10443 * Makefile.in (dist): Don't use $(srcdir).
10444
10445 * bison.simple (__yy_memcpy):
10446 Really reorder the args, as was supposedly done on Feb 14 1995.
10447 (yyparse): Calls changed accordingly.
10448
10449 1996-01-27 Richard Stallman <rms@gnu.org>
10450
10451 * src/output.c (output_rule_data):
10452 Test YYERROR_VERBOSE in the conditional
10453 around the definition of ttyname.
10454
10455 1995-12-29 Richard Stallman <rms@gnu.org>
10456
10457 * src/bison.s1:
10458 Fix line numbers in #line commands.
10459
10460 1995-12-29 Richard Stallman <rms@gnu.org>
10461
10462 * bison.simple:
10463 Fix line numbers in #line commands.
10464
10465 1995-12-27 Richard Stallman <rms@gnu.org>
10466
10467 * src/bison.s1 (YYPARSE_PARAM_DECL):
10468 In C++, make it always null.
10469 (YYPARSE_PARAM_ARG): New macro.
10470 (yyparse): Use YYPARSE_PARAM_ARG.
10471
10472 1995-12-27 Richard Stallman <rms@gnu.org>
10473
10474 * bison.simple (YYPARSE_PARAM_DECL):
10475 In C++, make it always null.
10476 (YYPARSE_PARAM_ARG): New macro.
10477 (yyparse): Use YYPARSE_PARAM_ARG.
10478
10479 1995-11-29 Richard Stallman <rms@gnu.org>
10480
10481 * doc/bison.texinfo:
10482 Describe literal string tokens, %raw, %no_lines, %token_table.
10483
10484 1995-11-29 Daniel Hagerty <hag@gnu.org>
10485
10486 * doc/bison.texinfo: Fixed update date
10487
10488 1995-10-16 Richard Stallman <rms@gnu.org>
10489
10490 * src/version.c: Version 1.25.
10491
10492 1995-10-16 Richard Stallman <rms@gnu.org>
10493
10494 * NEWS: *** empty log message ***
10495
10496 1995-10-16 Richard Stallman <rms@gnu.org>
10497
10498 * doc/bison.1, doc/bison.rnh:
10499 Add new options.
10500
10501 1995-10-15 Richard Stallman <rms@gnu.org>
10502
10503 * src/vmsgetargs.c, src/getargs.c:
10504 Added -n, -k, and -raw switches.
10505 (noparserflag, toknumflag, rawtoknumflag): New variables.
10506
10507 * src/symtab.h (SALIAS):
10508 New #define for adding aliases to %token.
10509 (struct bucket): Added `alias' field.
10510
10511 * src/reduce.c (reduce_grammar):
10512 Revise error message.
10513 (print_notices): Remove final `.' from error message.
10514
10515 * src/reader.c (reader_output_yylsp):
10516 New function.
10517 (readgram): Use `#if 0' around code that accepted %command
10518 inside grammar rules: The documentation doesn't allow it,
10519 and it will fail since the %command processors scan for the next %.
10520 (parse_token_decl): Extended the %token
10521 declaration to allow a multi-character symbol as an alias.
10522 (parse_thong_decl): New function.
10523 (read_declarations): Added %thong declarations.
10524 (read_declarations): Handle NOOP to deal with allowing
10525 % declarations as another means to specify the flags.
10526 (readgram): Allow %prec prior to semantics embedded in a rule.
10527 (skip_to_char, read_declarations, copy_definition)
10528 (parse_token_decl, parse_start_decl, parse_type_decl)
10529 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10530 (get_type_name, copy_guard, copy_action, readgram)
10531 (get_type, packsymbols): Revised most error messages.
10532 Changed `fatal' to `warnxxx' to avoid aborting for error.
10533 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10534 (read_declarations): Improve the error message for
10535 an invalid character. Do not abort.
10536 (read_declarations, copy_guard, copy_action): Use
10537 printable_version to avoid unprintable characters in printed output.
10538 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10539 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10540 Allow the type of a non-terminal can be given
10541 more than once, as long as all specifications give the same type.
10542
10543 * src/output.c:
10544 (output_headers, output_trailers, output, output_gram)
10545 (output_rule_data): Implement noparserflag variable.
10546 Implement toknumflag variable.
10547 (output): Call reader_output_yylsp to output LTYPESTR.
10548
10549 * src/main.c (main):
10550 If reader sees an error, don't process the grammar.
10551 (fatals): Updated to not use VARARGS1.
10552 (printable_version, int_to_string, warn, warni, warns, warnss)
10553 (warnsss): New error reporting functions. Avoid abort for error.
10554
10555 * src/lex.h:
10556 Added THONG and NOOP for alias processing.
10557 Added SETOPT for the new code that allows setting options with %flags.
10558
10559 * src/lex.c:
10560 Include getopt.h. Add some extern decls.
10561 (safegetc): New function to deal with EOF gracefully.
10562 (literalchar); new function to deal with reading \ escapes.
10563 (lex): Use literalchar.
10564 (lex): Implemented "..." tokens.
10565 (literalchar, lex, parse_percent_token): Made tokenbuffer
10566 always contain the token. This includes growing the token
10567 buffer while reading an integer.
10568 (parse_percent_token): Replaced if-else statement with percent_table.
10569 (parse_percent_token): Added % declarations as another
10570 way to specify the flags -n, -l, and -r. Also added hooks for
10571 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10572 major changes to files.c.
10573 (lex) Retain in the incoming stream a character following
10574 an incorrect '/'.
10575 (skip_white_space, lex): Revised most error messages
10576 and changed fatal to warn to avoid aborting.
10577 (percent_table): Added %thong declarations.
10578
10579 * src/gram.h: Comment changes.
10580
10581 * src/files.c (openfiles, open_extra_files, done):
10582 Add faction flag
10583 and actfile file. Handle noparserflag. Both for -n switch.
10584
10585 * src/conflicts.c (resolve_sr_conflict):
10586 Remove use of alloca.
10587
10588 1995-06-01 Jim Meyering <meyering@gnu.org>
10589
10590 * doc/bison.texinfo: *** empty log message ***
10591
10592 1995-05-06 Richard Stallman <rms@gnu.org>
10593
10594 * src/bison.s1: Comment change.
10595
10596 1995-05-06 Richard Stallman <rms@gnu.org>
10597
10598 * bison.simple: Comment change.
10599
10600 1995-05-03 Richard Stallman <rms@gnu.org>
10601
10602 * src/version.c: Version now 1.24.
10603
10604 * src/bison.s1: Change distribution terms.
10605
10606 * src/version.c: Version now 1.23.
10607
10608 1995-05-03 Richard Stallman <rms@gnu.org>
10609
10610 * doc/bison.texinfo:
10611 Rewrite "Conditions for Using Bison".
10612 Update version to 1.24.
10613
10614 1995-05-03 Richard Stallman <rms@gnu.org>
10615
10616 * bison.simple: Change distribution terms.
10617
10618 1995-02-23 Richard Stallman <rms@gnu.org>
10619
10620 * src/files.c: Test __VMS_POSIX as well as VMS.
10621
10622 1995-02-14 Jim Meyering <meyering@gnu.org>
10623
10624 * src/bison.s1 (__yy_memcpy):
10625 Renamed from __yy_bcopy to avoid
10626 confusion. Reverse FROM and TO arguments to be consistent with
10627 those of memcpy.
10628
10629 1995-02-14 Jim Meyering <meyering@gnu.org>
10630
10631 * bison.simple (__yy_memcpy):
10632 Renamed from __yy_bcopy to avoid
10633 confusion. Reverse FROM and TO arguments to be consistent with
10634 those of memcpy.
10635
10636 1994-11-10 David J. MacKenzie <djm@gnu.org>
10637
10638 * NEWS: reformat
10639
10640 * NEWS: New file.
10641
10642 * Makefile.in (DISTFILES): Include NEWS.
10643
10644 * Makefile.in (DISTFILES):
10645 Include install-sh, not install.sh.
10646
10647 * configure.in: Update to Autoconf v2 macro names.
10648
10649 1994-10-05 David J. MacKenzie <djm@gnu.org>
10650
10651 * Makefile.in: fix typo
10652
10653 * Makefile.in (prefix, exec_prefix):
10654 Let configure set them.
10655
10656 1994-09-28 David J. MacKenzie <djm@gnu.org>
10657
10658 * Makefile.in: Set datadir to $(prefix)/share.
10659
10660 1994-09-15 Richard Stallman <rms@gnu.org>
10661
10662 * src/bison.s1:
10663 Update copyright notice and GPL version.
10664
10665 1994-09-15 Richard Stallman <rms@gnu.org>
10666
10667 * bison.simple:
10668 Update copyright notice and GPL version.
10669
10670 1994-07-12 Richard Stallman <rms@gnu.org>
10671
10672 * src/reduce.c, src/reader.c:
10673 entered into RCS
10674
10675 1994-05-05 David J. MacKenzie <djm@gnu.org>
10676
10677 * Makefile.in: entered into RCS
10678
10679 1994-03-26 Richard Stallman <rms@gnu.org>
10680
10681 * src/bison.s1: entered into RCS
10682
10683 1994-03-26 Richard Stallman <rms@gnu.org>
10684
10685 * bison.simple: entered into RCS
10686
10687 1994-03-25 Richard Stallman <rms@gnu.org>
10688
10689 * src/main.c: entered into RCS
10690
10691 1994-03-24 Richard Stallman <rms@gnu.org>
10692
10693 * src/conflicts.c: entered into RCS
10694
10695 1994-01-02 Richard Stallman <rms@gnu.org>
10696
10697 * Makefile.in: *** empty log message ***
10698
10699 1993-11-21 Richard Stallman <rms@gnu.org>
10700
10701 * src/bison.s1: *** empty log message ***
10702
10703 1993-11-21 Richard Stallman <rms@gnu.org>
10704
10705 * doc/bison.texinfo: entered into RCS
10706
10707 * doc/bison.texinfo: *** empty log message ***
10708
10709 1993-11-21 Richard Stallman <rms@gnu.org>
10710
10711 * bison.simple: *** empty log message ***
10712
10713 1993-10-25 David J. MacKenzie <djm@gnu.org>
10714
10715 * doc/bison.texinfo: *** empty log message ***
10716
10717 1993-10-19 Richard Stallman <rms@gnu.org>
10718
10719 * src/bison.s1: *** empty log message ***
10720
10721 1993-10-19 Richard Stallman <rms@gnu.org>
10722
10723 * bison.simple: *** empty log message ***
10724
10725 1993-10-14 Richard Stallman <rms@gnu.org>
10726
10727 * src/bison.s1: *** empty log message ***
10728
10729 1993-10-14 Richard Stallman <rms@gnu.org>
10730
10731 * bison.simple: *** empty log message ***
10732
10733 1993-09-14 David J. MacKenzie <djm@gnu.org>
10734
10735 * doc/bison.texinfo: *** empty log message ***
10736
10737 1993-09-13 Noah Friedman <friedman@gnu.org>
10738
10739 * Makefile.in: *** empty log message ***
10740
10741 1993-09-10 Richard Stallman <rms@gnu.org>
10742
10743 * src/conflicts.c: *** empty log message ***
10744
10745 * src/system.h: entered into RCS
10746
10747 1993-09-10 Richard Stallman <rms@gnu.org>
10748
10749 * doc/bison.1: entered into RCS
10750
10751 1993-09-06 Noah Friedman <friedman@gnu.org>
10752
10753 * src/version.c: entered into RCS
10754
10755 1993-09-06 Noah Friedman <friedman@gnu.org>
10756
10757 * Makefile.in: *** empty log message ***
10758
10759 1993-07-30 David J. MacKenzie <djm@gnu.org>
10760
10761 * Makefile.in: *** empty log message ***
10762
10763 1993-07-24 Richard Stallman <rms@gnu.org>
10764
10765 * src/bison.s1: *** empty log message ***
10766
10767 1993-07-24 Richard Stallman <rms@gnu.org>
10768
10769 * bison.simple: *** empty log message ***
10770
10771 1993-07-08 David J. MacKenzie <djm@gnu.org>
10772
10773 * Makefile.in: *** empty log message ***
10774
10775 1993-07-04 Richard Stallman <rms@gnu.org>
10776
10777 * src/bison.s1: *** empty log message ***
10778
10779 1993-07-04 Richard Stallman <rms@gnu.org>
10780
10781 * bison.simple: *** empty log message ***
10782
10783 1993-06-26 David J. MacKenzie <djm@gnu.org>
10784
10785 * src/getargs.c: entered into RCS
10786
10787 1993-06-26 David J. MacKenzie <djm@gnu.org>
10788
10789 * doc/bison.texinfo: *** empty log message ***
10790
10791 * doc/bison.1: New file.
10792
10793 1993-06-25 Richard Stallman <rms@gnu.org>
10794
10795 * src/getargs.c: New file.
10796
10797 1993-06-16 Richard Stallman <rms@gnu.org>
10798
10799 * src/bison.s1: *** empty log message ***
10800
10801 1993-06-16 Richard Stallman <rms@gnu.org>
10802
10803 * bison.simple: *** empty log message ***
10804
10805 1993-06-03 Richard Stallman <rms@gnu.org>
10806
10807 * src/bison.s1: New file.
10808
10809 1993-06-03 Richard Stallman <rms@gnu.org>
10810
10811 * doc/bison.texinfo: *** empty log message ***
10812
10813 1993-06-03 Richard Stallman <rms@gnu.org>
10814
10815 * bison.simple: New file.
10816
10817 1993-05-19 Richard Stallman <rms@gnu.org>
10818
10819 * doc/bison.texinfo: New file.
10820
10821 1993-05-07 Noah Friedman <friedman@gnu.org>
10822
10823 * Makefile.in: *** empty log message ***
10824
10825 1993-04-28 Noah Friedman <friedman@gnu.org>
10826
10827 * src/reader.c: *** empty log message ***
10828
10829 1993-04-23 Noah Friedman <friedman@gnu.org>
10830
10831 * src/alloc.h: entered into RCS
10832
10833 1993-04-20 David J. MacKenzie <djm@gnu.org>
10834
10835 * src/version.c: *** empty log message ***
10836
10837 * src/files.c, src/allocate.c:
10838 entered into RCS
10839
10840 * src/reader.c: *** empty log message ***
10841
10842 * src/lex.c: entered into RCS
10843
10844 * src/conflicts.c: New file.
10845
10846 * src/symtab.c: entered into RCS
10847
10848 * src/alloc.h: New file.
10849
10850 * src/LR0.c: entered into RCS
10851
10852 1993-04-18 Noah Friedman <friedman@gnu.org>
10853
10854 * src/reader.c: New file.
10855
10856 * src/version.c: *** empty log message ***
10857
10858 1993-04-18 Noah Friedman <friedman@gnu.org>
10859
10860 * Makefile.in: *** empty log message ***
10861
10862 1993-04-17 Noah Friedman <friedman@gnu.org>
10863
10864 * Makefile.in: *** empty log message ***
10865
10866 1993-04-15 Richard Stallman <rms@gnu.org>
10867
10868 * src/main.c, src/files.c:
10869 New file.
10870
10871 1993-04-15 Noah Friedman <friedman@gnu.org>
10872
10873 * configure.in: entered into RCS
10874
10875 * configure.in: *** empty log message ***
10876
10877 * configure.in: New file.
10878
10879 1993-04-14 Richard Stallman <rms@gnu.org>
10880
10881 * Makefile.in: New file.
10882
10883 1993-04-13 Richard Stallman <rms@gnu.org>
10884
10885 * src/version.c: New file.
10886
10887 1993-03-25 Richard Stallman <rms@gnu.org>
10888
10889 * src/output.c: entered into RCS
10890
10891 1992-09-25 Richard Stallman <rms@gnu.org>
10892
10893 * configure.bat: entered into RCS
10894
10895 1992-06-22 Richard Stallman <rms@gnu.org>
10896
10897 * src/vmsgetargs.c: entered into RCS
10898
10899 1992-06-22 Richard Stallman <rms@gnu.org>
10900
10901 * doc/bison.rnh: entered into RCS
10902
10903 1992-04-20 David J. MacKenzie <djm@gnu.org>
10904
10905 * README: entered into RCS
10906
10907 1992-01-22 Richard Stallman <rms@gnu.org>
10908
10909 * src/machine.h: entered into RCS
10910
10911 1991-12-21 Richard Stallman <rms@gnu.org>
10912
10913 * src/lalr.c, src/closure.c:
10914 entered into RCS
10915
10916 1991-12-20 Richard Stallman <rms@gnu.org>
10917
10918 * src/state.h: entered into RCS
10919
10920 1991-12-18 Richard Stallman <rms@gnu.org>
10921
10922 * src/print.c, src/nullable.c, src/derives.c:
10923 entered into RCS
10924
10925 1991-11-03 David J. MacKenzie <djm@gnu.org>
10926
10927 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
10928 entered into RCS
10929
10930 1988-09-09 Richard Stallman <rms@gnu.org>
10931
10932 * src/bison.hairy: entered into RCS
10933
10934 1987-12-16 Richard Stallman <rms@gnu.org>
10935
10936 * REFERENCES: entered into RCS
10937
10938 -----
10939
10940 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
10941 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10942
10943 This file is part of Bison, the GNU Compiler Compiler.
10944
10945 Bison is free software; you can redistribute it and/or modify
10946 it under the terms of the GNU General Public License as published by
10947 the Free Software Foundation; either version 2, or (at your option)
10948 any later version.
10949
10950 Bison is distributed in the hope that it will be useful,
10951 but WITHOUT ANY WARRANTY; without even the implied warranty of
10952 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10953 GNU General Public License for more details.
10954
10955 You should have received a copy of the GNU General Public License
10956 along with Bison; see the file COPYING. If not, write to
10957 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
10958 Boston, MA 02111-1307, USA.