]> git.saurik.com Git - bison.git/blob - ChangeLog
d722b41ec56eba16c285b28fedec14e4d7d3c928
[bison.git] / ChangeLog
1 2003-02-19 Akim Demaille <akim@epita.fr>
2
3 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
4 error recovery, mixing with/without pops and discarding of the
5 lookahead.
6 Exercise YYERROR.
7 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
8
9 2003-02-17 Paul Eggert <eggert@twinsun.com>
10
11 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12 * tests/testsuite.at (AT_COMPILE): Use them.
13 This fixes the testsuite problem reported by Robert Lentz in
14 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
15
16 2003-02-12 Paul Eggert <eggert@twinsun.com>
17
18 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
19 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
20 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
21 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
22 Check for malloc failure, for consistency with yacc.c.
23 (yytname_size): Remove, for consistency with yacc.c.
24
25 The bug still remains in data/lalr1.cc, as I didn't have time
26 to fix it there.
27
28 2003-02-06 Akim Demaille <akim@epita.fr>
29
30 * configure.ac (GXX): Rename as...
31 (CXX): this, to keep the original Autoconf semantics.
32 Require 2.57.
33 * data/lalr1.cc: Fix b4_copyright invocations.
34 If YYDEBUG is not defined, don't depend upon name_ being defined.
35 (location.hh): Include string and iostream.
36 (Position::filename): New member.
37 (Position::Position ()): New.
38 (operator<< (Position)): New.
39 (operator- (Position, int)): New.
40 (Location::first, Location::last): Rename as...
41 (Location::begin, Location::end): these, to mock the conventional
42 iterator names.
43 (operator<< (Location)): New.
44 * tests/atlocal.in (CXX): New.
45 * tests/testsuite.at (AT_COMPILE_CXX): New.
46 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
47 locations in a more synthetic way.
48 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
49 lalr1.cc is used.
50 Adjust the C locations to match those from Emacs: first column is
51 column 0.
52 Change all the expected results.
53 Conform to the GCS: simplify the locations when applicable.
54 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
55 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
56 these CPP macros with the m4 macros new defined by...
57 (AT_CHECK_PUSHDEFS): this, i.e.:
58 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
59 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALSm AT_LEX_PRE_ARGS)
60 New macros.
61 (AT_CHECK_POPDEFS): Undefine them.
62 (AT_CHECK_CALC_LALR1_CC): New.
63 Use it for the first lalr1.cc test.
64
65 2003-02-04 Akim Demaille <akim@epita.fr>
66
67 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
68 Location as is defined.
69
70 2003-02-04 Akim Demaille <akim@epita.fr>
71
72 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
73 name_ being defined.
74
75 2003-02-03 Paul Eggert <eggert@twinsun.com>
76
77 * src/gram.h (start_symbol): Remove unused decl.
78
79 Use more-consistent naming conventions for local vars.
80
81 * src/derives.c (derives_compute): Change type of local var from
82 int to rule_number.
83 * src/gram.c (grammar_rules_partial_print): Likewise.
84 * src/print.c (print_core): Likewise.
85 * src/reduce.c (reduce_grammar_tables): Likewise.
86
87 * src/gram.c (grammar_dump): Change name of item_number *
88 local var from r to rp.
89 * src/nullable.c (nullable_compute): Likewise.
90
91 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
92
93 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
94 for symbol or symbol_number var.
95 * src/reader.c (grammar_start_symbol_set): Likewise.
96 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
97 Likewise.
98 * src/state.c (transitions_to): Likewise.
99 * src/state.h: Likewise.
100 * src/tables.c (symbol_number_to_vector_number): Likewise.
101
102 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
103 char * var.
104
105 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
106 var.
107
108 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
109 var.
110
111 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
112 Use str, not s, for char * var. Use ch, not c, for character var.
113 Use size for size var.
114
115 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
116 char * var.
117 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
118 uniqstr var.
119 * src/uniqstr.h: Likewise.
120
121 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
122 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
123 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
124 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
125 param to have same name as that of enum, so that we don't use
126 "s" to stand for a non-state.
127
128 2003-02-02 Akim Demaille <akim@epita.fr>
129
130 * src/scan-skel.l: Scan more than one inert character per yylex
131 invocation.
132
133 2003-02-01 Paul Eggert <eggert@twinsun.com>
134
135 Version 1.875a.
136
137 * po/LINGUAS: Add ms.
138
139 2003-01-30 Akim Demaille <akim@epita.fr>
140
141 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
142
143 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
144
145 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
146 of $1.
147
148 Changes in response to error report by S. Eken: GLR mode does not
149 handle negative $ indices or $ indices in embedded rules correctly.
150 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
151
152 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
153 (b4_rhs_location): Ditto.
154 (yyfill): New function to copy from stack tree into array
155 incrementally.
156 (yyuserAction): Modify to allow incremental move of semantic values
157 to rhs array when in GLR mode.
158 Define YYFILL to use in user-defined actions to fill semantic array
159 as needed.
160 Remove dummy use of yystack, as there is now a guaranteed use.
161 (yydoAction): Modify to allow incremental move of semantic values
162 to rhs array when in GLR mode.
163 (yyresolveAction): Ditto.
164 (yyglrShiftDefer): Update comment.
165 (yyresolveStates): Use X == NULL for pointers, not !X.
166 (yyglrReduce): Ditto.
167 (yydoAction): Ditto
168
169 * tests/glr-regr1.at: Rename to ...
170 * tests/glr-regression.at: Add new regression test for the problems
171 described above (adapted from S. Eken).
172 Update copyright notice.
173 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
174 * tests/Makefile.am: Ditto.
175
176 2003-01-28 Paul Eggert <eggert@twinsun.com>
177
178 * data/lalr1.cc: Do not use @output_header_name@ unless
179 b4_defines_flag is set. This fixes two bugs reported by
180 Tim Van Holder in
181 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
182 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
183
184 2003-01-21 Paul Eggert <eggert@twinsun.com>
185
186 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
187 we don't need to worry about yyerrlab1 being reported as an
188 "unused label" by non-GCC C compilers. The downside is that if
189 locations are used then a couple of statements are duplicated each
190 time YYERROR is invoked, but the upside is that the warnings
191 should vanish.
192 (yyerrlab1): Move code to YERROR.
193 (yyerrlab2): Remove. Change uses back to yyerrlab1.
194 This reverts some of the 2002-12-27 change.
195
196 2003-01-17 Paul Eggert <eggert@twinsun.com>
197
198 * src/output.c (symbol_printers_output): Fix typo that led
199 to core dump. Problem reported by Antonio Rus in
200 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
201
202 2003-01-13 Akim Demaille <akim@epita.fr>,
203 Quoc Peyrot <chojin@lrde.epita.fr>,
204 Robert Anisko <anisko_r@lrde.epita.fr>
205
206 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
207 when the stacks contain one element, as the loop would otherwise
208 free the last state, and then use the top state (the one we just
209 popped). This means that the initial elements will not be freed
210 explicitly, as is the case in yacc.c; it is not a problem, as
211 these elements have fake values.
212
213 2003-01-11 Paul Eggert <eggert@twinsun.com>
214
215 * NEWS: %expect-violations are now just warnings, reverting
216 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
217 bootstrapping problem reported by Matthias Klose; see
218 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
219 * src/conflicts.c (conflicts_print): Likewise.
220 * tests/conflicts.at (%expect not enough, %expect too much,
221 %expect with reduce conflicts): Likewise.
222 * doc/bison.texinfo (Expect Decl): Document this. Also mention
223 that the warning is enabled if the number of conflicts changes
224 (not necessarily increases).
225
226 * src/getargs.c (version): Update copyright year.
227
228 2003-01-09 Akim Demaille <akim@epita.fr>
229
230 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
231
232 2003-01-08 Paul Eggert <eggert@twinsun.com>
233
234 * Makefile.maint (WGETFLAGS):
235 New macro, containing "-C off" to disable proxy caches.
236 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
237 (rel-check): Use $(WGET) instead of wget.
238
239 2003-01-06 Paul Eggert <eggert@twinsun.com>
240
241 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
242 the GLR paper of Scott, Johnstone and Hussain.
243
244 2003-01-04 Paul Eggert <eggert@twinsun.com>
245
246 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
247 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
248 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
249 (EXTRA_LIBRARIES): New var, for liby.a.
250 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
251 (EXTRA_SCRIPTS): New var, for yacc.
252
253 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
254 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
255 Problem reported by Nelson H. F. Beebe.
256
257 2003-01-03 Paul Eggert <eggert@twinsun.com>
258
259 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
260 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
261 when compiling Bison 1.875's `bitset bset = obstack_alloc
262 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
263
264 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
265 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
266 grow to a huge size with typical invocation.
267
268 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
269 Use the pattern recommended by Autoconf 2.57, except also protect
270 against double-definition.
271 * src/system.h: Likewise.
272 Portability issues reported by Nelson H. F. Beebe.
273
274 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
275 All uses changed. Provide a definition in both C and C++.
276 (yytrue, yyfalse): Define even if defined (__cplusplus).
277
278 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
279 Reported by Nelson H. F. Beebe.
280
281 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
282
283 2003-01-02 Paul Eggert <eggert@twinsun.com>
284
285 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
286 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
287 Bug reported by Nelson H. F. Beebe.
288
289 2003-01-01 Paul Eggert <eggert@twinsun.com>
290
291 * Version 1.875.
292
293 2002-12-30 Paul Eggert <eggert@twinsun.com>
294
295 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
296 Moved here from...
297 (<INITIAL>","): Here. This causes stray "," to be treated
298 more uniformly.
299
300 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
301 last brace in braced code when not in Yacc mode, for compatibility
302 with Bison 1.35. This resurrects the 2001-12-15 patch to
303 src/reader.c.
304
305 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
306 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
307
308 2002-12-28 Paul Eggert <eggert@twinsun.com>
309
310 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
311 that of SYM's type. This fixes Debian bug 168069, reported by
312 Thomas Olsson.
313
314 2002-12-28 Paul Eggert <eggert@twinsun.com>
315
316 Version 1.75f.
317
318 Switch back to the Yacc style of conflict reports, undoing some
319 of the 2002-07-30 change.
320 * doc/bison.texinfo (Understanding): Use Yacc style for
321 conflict reports. Also, use new way of locating rules.
322 * src/conflicts.c (conflict_report):
323 Renamed from conflict_report_yacc, removing the old
324 'conflict_report'. Translate the entire conflict report at once,
325 so that we don't assume that "," has the same interpretation in
326 all languages.
327 (conflicts_output): Use Yacc-style conflict report for each state,
328 instead of our more-complicated style.
329 (conflicts_print): Use Yacc-style conflict report, except print
330 the input file name when not emulating Yacc.
331 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
332 Conflicted Reduction, %expect not enough, %expect too much,
333 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
334 * tests/existing.at (GNU Cim Grammar): Likewise.
335 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
336
337 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
338 fatal): Don't invoke fflush; it's not needed and it might even be
339 harmful for stdout, as stdout might not be open.
340 * src/reduce.c (reduce_print): Likewise.
341
342 2002-12-27 Paul Eggert <eggert@twinsun.com>
343
344 Fix a bug where error locations were not being recorded correctly.
345 This problem was originally reported by Paul Hilfinger in
346 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
347
348 * data/yacc.c (yyparse): New local var yylerrsp, to record the
349 top of the location stack's error locations.
350 (yyerrlab): Set it. When discarding a token, push its location
351 onto yylerrsp so that we don't lose track of the error's end.
352 (yyerrlab1): Now is only the target of YYERROR, so that we can
353 properly record the location of the action that failed. For GCC
354 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
355 GCC warning about yyerrlab1 being unused if YYERROR is unused.
356 (yyerrlab2): New label, which yyerrlab now falls through to.
357 Compute the error's location by applying YYLLOC_DEFAULT to
358 the locations of all the symbols that went into the error.
359 * doc/bison.texinfo (Location Default Action): Mention that
360 YYLLOC_DEFAULT is also invoked for syntax errors.
361 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
362 Error locations include the locations of all the tokens that were
363 discarded, not just the last token.
364
365 2002-12-26 Paul Eggert <eggert@twinsun.com>
366
367 * src/files.c: Include quote.h.
368 (compute_output_file_names): Warn if we detect conflicting
369 outputs to the same file. This should catch the misunderstanding
370 exemplified by Debian Bug 165349, reported by Bruce Stephens..
371
372 * src/conflicts.c (conflicts_print): If the user specifies
373 "%expect N", report an error if there are any reduce/reduce
374 conflicts. This is what the manual says should happen.
375 This fixes Debian bug 130890, reported by Anthony DeRobertis.
376 * tests/conflicts.at (%expect with reduce conflicts): New test.
377
378 Don't use m4_include on relative file names, as it doesn't work as
379 desired if there happens to be a file with that name under ".".
380
381 * m4sugar/version.m4: Remove; it was included but it wasn't used.
382 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
383 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
384 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
385 * src/output.c (output_skeleton): Use full path names when
386 specifying a file to include; don't rely on include path, as
387 it's unreliable when the working file contains a file with
388 that name.
389
390 2002-12-25 Paul Eggert <eggert@twinsun.com>
391
392 Remove obsolete references to bison.simple and bison.hairy.
393 Problem mentioned by Aubin Mahe in
394 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
395 * data/glr.c: Comment fix.
396 * doc/bison.1: Remove references. Also, mention "yacc".
397
398 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
399 with -g option.
400
401 * src/parse-gram.y (declaration): Use enum "report_states" rather
402 than its numeric value 1.
403
404 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
405 opening a new one. This fixes Debian bug 165349, reported by
406 Bruce Stephens.
407
408 2002-12-24 Paul Eggert <eggert@twinsun.com>
409
410 Version 1.75e.
411
412 * Makefile.maint (cvs-update): Don't assume that the shell
413 supports $(...), as Solaris sh doesn't.
414
415 * src/parse-gram.y (lloc_default): Remove test for empty
416 nonterminals at the end, since it didn't change the result.
417
418 2002-12-24 Paul Eggert <eggert@twinsun.com>
419
420 If the user does not define YYSTYPE as a macro, Bison now declares it
421 using typedef instead of defining it as a macro. POSIX requires this.
422 For consistency, YYLTYPE is also declared instead of defined.
423
424 %union directives can now have a tag before the `{', e.g., the
425 directive `%union foo {...}' now generates the C code
426 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
427 The default union tag is `YYSTYPE', for compatibility with Solaris 9
428 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
429 instead of `yyltype'.
430
431 `yystype' and `yyltype' are now obsolescent macros instead of being
432 typedefs or tags; they are no longer documented and will be
433 withdrawn in a future release.
434
435 * data/glr.c (b4_location_type): Remove.
436 (YYSTYPE): Renamed from yystype.
437 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
438 (struct YYLTYPE): Renamed from struct yyltype.
439 (YYLTYPE): Renamed from yyltype.
440 (yyltype, yystype): New (and obsolescent) macros,
441 for backward compatibility.
442 * data/yacc.c: Likewise.
443
444 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
445 does not specify a union tag. This is for compatibility with
446 Solaris 9 yacc.
447
448 * src/parse-gram.y (add_param): 2nd arg is now char * not char
449 const *, since it is now modified by stripping surrounding { }.
450 (current_braced_code): Remove.
451 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
452 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
453 trailing " {...}". Now of type <chars>.
454 (grammar_declaration): Adjust to bundled tokens.
455 (code_content): Remove; stripping is now done by add_param.
456 (print_token_value): Print contents of bundled tokens.
457 (token_name): New function.
458
459 * src/reader.h (braced_code, current_braced_code): Remove.
460 (token_name): New decl.
461
462 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
463 token_type, not braced_code code_kind. All uses changed.
464 (SC_PRE_CODE): New state, for scanning after a keyword that
465 has (or usually has) an immediately-following braced code.
466 (token_type): New local var, to keep track of which token type
467 to return when scanning braced code.
468 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
469 <INITIAL>"%parse-param", <INITIAL>"%printer",
470 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
471 instead of returning a token type immediately.
472 (<INITIAL>"{"): Set token type.
473 (<SC_BRACED_CODE>"}"): Use it.
474 (handle_action_dollar, handle_action_at): Now returns bool
475 indicating success. Fail if ! current_rule; this prevents a core dump.
476 (handle_symbol_code_dollar, handle_symbol_code_at):
477 Remove; merge body into caller.
478 (handle_dollar, handle_at): Complain in invalid contexts.
479
480 * NEWS, doc/bison.texinfo: Document the above.
481 * NEWS: Fix years and program names in copyright notice.
482
483 2002-12-17 Paul Eggert <eggert@twinsun.com>
484
485 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
486 Reporting, Table of Symbols): Omit mentions of %lex-param and
487 %parse-param from the documentation for now.
488
489 2002-12-15 Paul Eggert <eggert@twinsun.com>
490
491 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
492 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
493 lookahead symbol, and which sets yychar in parser actions) and it
494 disagreed with the Bison documentation. Bug
495 reported by Andrew Walrond.
496
497 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
498 as the caller now does that.
499 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
500 (YYEMPTY): Parenthesize right hand side, since others use it.
501 (yyparse): Don't assume that our generated code is the only code
502 that sets yychar.
503
504 2002-12-13 Paul Eggert <eggert@twinsun.com>
505
506 Version 1.75d.
507
508 POSIX requires a "yacc" command.
509 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
510 (MOSTLYCLEANFILES): Add yacc.
511 (yacc): New rule.
512 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
513 as an alias for bison y.
514
515 * po/LINGUAS: Add da.
516
517 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
518 problem with latest <getopt.h>.
519 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
520
521 * doc/fdl.texi: Upgrade to 1.2.
522 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
523 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
524 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
525 gnulib.
526 * config/install-sh: Sync with autotools.
527
528 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
529 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
530 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
531 locations are requested.
532 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
533 locations are requested.
534
535 2002-12-12 Paul Eggert <eggert@twinsun.com>
536
537 Remove unportable casts and storage allocation tricks.
538 While we're at it, remove almost all casts, since they
539 usually aren't needed and are a sign of trouble.
540
541 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
542
543 * src/derives.c (derives_compute): Do not subtract NTOKENS from
544 the pointer DSET returned by malloc; this isn't portable.
545 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
546 Similarly for DERIVES.
547 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
548 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
549 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
550
551 * src/derives.c (derives_compute): Do not bother invoking
552 int_of_rule_number, since rule numbers are integers.
553
554 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
555 rather than XMALLOC (char, N).
556
557 * src/files.c (filename_split): Rewrite to avoid cast.
558
559 * src/gram.h (symbol_number_as_item_number,
560 item_number_as_symbol_number, rule_number_as_item_number,
561 item_number_as_rule_number):
562 Now inline functions rather than macros, to avoid casts.
563 * src/state.h (state_number_as_int): Likewise.
564 * src/tables.c (state_number_to_vector_number,
565 symbol_number_to_vector_number): Likewise.
566
567 * src/gram.h (int_of_rule_number): Remove; no longer used.
568
569 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
570 since the resulting storage is always stored into.
571
572 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
573 where it's needed.
574
575 * src/muscle_tab.c (muscle_m4_output):
576 Now inline. Return bool, not int.
577 * src/state.c (state_compare): Likewise.
578 * src/symtab.c (symbol_check_defined,
579 symbol_check_alias_consistency, symbol_pack, symbol_translation,
580 hash_compare_symbol, hash_symbol):
581 Likewise.
582 * src/uniqstr.c (uniqstr_print): Likewise.
583 * src/muscle_tab.c (muscle_m4_output_processor):
584 New function, to avoid casts.
585 * src/state.c (state_comparator, stage_hasher): Likewise.
586 * src/symtab.c (symbol_check_defined_processor,
587 symbol_check_alias_consistency_processor, symbol_pack_processor,
588 symbol_translation_processor, hash_symbol_comparator,
589 hash_symbol_hasher): Likewise.
590 * src/uniqstr.c (uniqstr_print_processor): Likewise.
591 * src/muscle_tab.c (muscles_m4_output):
592 Use new functions instead of casting old functions unportably.
593 * src/state.c (state_hash_new): Likewise.
594 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
595 symbols_token_translations_init):
596 Likewise.
597 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
598
599 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
600 var instead of casting to long, to avoid casts.
601 (prepare_states): Use MALLOC rather than alloca, so that we don't
602 have to worry about alloca.
603 * src/state.c (state_hash_lookup): Likewise.
604
605 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
606 local var instead of casting to unsigned char, to avoid casts.
607
608 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
609 STATE_ALLOC): Remove.
610 (transitions_new, errs_new, reductions_new, state_new): Use malloc
611 rather than calloc, and use offsetof to avoid allocating slightly
612 too much storage.
613 (state_new): Initialize all members.
614
615 * src/state.c (state_hash): Use unsigned accumulator, not signed.
616
617 * src/symtab.c (symbol_free): Remove; unused.
618 (symbol_get): Remove cast in lhs of assignment.
619 (symbols_do): Now static. Accept generic arguments, not
620 hashing-related ones.
621
622 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
623 (symbol_processor): Remove.
624 (symbols_do): Remove decl; now static.
625
626 * src/system.h (alloca): Remove; decl no longer needed.
627 (<stddef.h>): Include, for offsetof.
628 (<inttypes.>, <stdint.h>): Include if available.
629 (uintptr_t): New type, if system lacks it.
630 (CALLOC, MALLOC, REALLOC): New macros.
631 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
632 new macros.
633
634 * src/tables.c (table_size): Now int, to pacify GCC.
635 (table_grow, table_ninf_remap): Use signed table size.
636 (save_row): Don't bother initializing locals when not needed.
637 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
638 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
639
640 * src/vcg.h: Correct misspellings.
641
642 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
643
644
645 * src/getargs.c (getargs): Don't assume EOF == -1.
646
647 2002-12-09 Paul Eggert <eggert@twinsun.com>
648
649 Change identifier spellings to avoid collisions with names
650 that are reserved by POSIX.
651
652 Don't use names ending in _t, since POSIX reserves them.
653 For consistency, remove _e and _s endings -- they're weren't
654 needed to remove ambiguity. All uses changed.
655 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
656 turn was just renamed from struniq_t.
657 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
658 which in turn was just renamed from struniq_processor_t.
659 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
660 in turn was renamed from hash_compare_struniq_t.
661 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
662 (state_list): Renamed from state_list_t.
663 * src/assoc.h (assoc): Renamed from assoc_t.
664 * src/conflicts.c (enum conflict_resolution): Renamed from
665 enum conflict_resolution_e.
666 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
667 (rule_list): Renamed from rule_list_t.
668 * src/getargs.h (enum trace): Renamed from enum trace_e.
669 (enum report): Renamed from enum report_e.
670 * src/gram.h (item_number): Renamed from item_number_t.
671 (rule_number): Renamed from rule_number_t.
672 (struct rule_s): Remove the "rule_s" part; not used.
673 (rule): Renamed from rule_t.
674 (rule_filter): Renamed from rule_filter_t.
675 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
676 (goto_list): Renamed from goto_list_t.
677 * src/lalr.h (goto_number): Renamed from goto_number_t.
678 * src/location.h (location): Renamed from location_t.
679 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
680 and moved here from:
681 * src/muscle_tab.h (muscle_entry_t): here.
682 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
683 (rule_list): Renamed from rule_list_t.
684 * src/print_graph.c (static_graph): Renamed from graph.
685 * src/reader.h (braced_code): Renamed from braced_code_t.
686 Remove brace_code_e tag.
687 * src/relation.h (relation_node): Renamed from relation_node_t.
688 (relation_nodes): Renamed from relation_nodes_t.
689 (relation): Renamed from relation_t.
690 * src/state.h (state_number): Renamed from state_number_t.
691 (struct state): Renamed from struct state_s.
692 (state): Renamed from state_t.
693 (transitions): Renamed from transitions_t. Unused (and
694 misspelled) transtion_s tag removed.
695 (errs): Renamed from errs_t. Unused errs_s tag removed.
696 (reductions): Renamed from reductions_t. Unused tag
697 reductions_s removed.
698 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
699 (struct symbol_list): Renamed from struct symbol_list_s.
700 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
701 (struct symbol): Renamed from struct symbol_s.
702 (symbol): Renamed from symbol_t.
703 * src/tables.c (vector_number): Renamed from vector_number_t.
704 (action_number): Renamed from action_t.
705 * src/tables.h (base_number): Renamed from base_t.
706 * src/vcg.h (enum color): Renamed from enum color_e.
707 (enum textmode): Renamed from enum textmode_e.
708 (enum shape): Renamed from enum shape_e.
709 (struct colorentry): Renamed from struct colorentry_s.
710 (struct classname): Renamed from struct classname_s.
711 (struct infoname): Renamed from struct infoname_s.
712 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
713 (enum decision): Renamed from enum decision_e.
714 (enum orientation): Renamed from enum orientation_e.
715 (enum alignment): Renamed from enum alignment_e.
716 (enum arrow_mode): Renamed from enum arrow_mode_e.
717 (enum crossing_type): Renamed from enum crossing_type_e.
718 (enum view): Renamed from enum view_e.
719 (struct node): Renamed from struct node_s.
720 (node): Renamed from node_t.
721 (enum linestyle): Renamed from enum linestyle_e.
722 (enum arrowstyle): Renamed from enum arrowstyle_e.
723 (struct edge): Renamed from struct edge.
724 (edge): Renamed from edge_t.
725 (struct graph): Renamed from struct graph_s.
726 (graph): Renamed from graph_t.
727 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
728 Rename value_t -> value.
729 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
730 value_t_as_yystype -> value_as_yystype.
731
732 Don't include <errno.h> in the mainstream code, since it
733 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
734 * lib/get-errno.c, lib/get-errno.h: New files.
735 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
736 get-errno.c.
737 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
738 * src/output.c (output_skeleton): Likewise.
739 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
740 instead of errno.
741 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
742 Likewise.
743 (handle_action_dollar, handle_action_at): Likewise.
744 * src/system.h: Do not include <errno.h>.
745 (TAB_EXT): Renamed from EXT_TAB.
746 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
747
748 Avoid str[a-z]*, since <string.h> reserves that name space.
749 Change all instances of "struniq" in names to "uniqstr", and
750 likewise for "STRUNIQ" and "UNIQSTR".
751 * src/uniqstr.c: Renamed from src/struniq.c.
752 * src/uniqstr.h: Renamed from src/struniq.h.
753 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
754 * src/files.c (strsuffix): Remove; unused.
755 (concat2): Renamed from stringappend. Now static.
756 * src/files.h (strsuffix, stringappend): Remove; unused.
757 * src/parse-gram.y (<chars>): Renamed from <string>.
758 (<uniqstr>): Renamed from <struniq>.
759 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
760 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
761 (struct graph_s.expand): Renamed from struct graph_s.stretch.
762 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
763 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
764 (N_EXPAND): Renamed from N_STRETCH.
765
766 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
767 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
768 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
769 Remove; unused.
770 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
771 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
772 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
773 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
774 (BASE_MAXIMUM): Renamed from BASE_MAX.
775 (BASE_MINIMUM): Renamed from BASE_MIN.
776 (ACTION_MAX): Remove; unused.
777 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
778 Unnecessary casts removed from above defines.
779
780
781 Fix misspelling in names.
782 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
783 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
784 G_NODE_ALIGNEMENT.
785
786
787 * lib/timevar.c (timevar_report): Renamed from time_report,
788 for consistency with other names.
789 * lib/timevar.h (timevar_report): New decl.
790 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
791
792
793 Sort include-file uses.
794
795 Reorder all include files under src to be in the order "system.h".
796 then the ../lib include files in angle brackets (alphabetized),
797 then the . include files in double-quotes (alphabetized). Fix
798 dependency breakages encountered in this process, as follows:
799 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
800 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
801 * src/state.h: Include "symtab.h".
802
803 2002-12-08 Paul Eggert <eggert@twinsun.com>
804
805 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
806 since this causes problems when __file__ contains character
807 sequences like "@" that are treated specially by src/scan-skel.l.
808 Instead, just use the file's basename. This fixes the bug
809 reported by Martin Mokrejs in
810 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
811
812 2002-12-06 Paul Eggert <eggert@twinsun.com>
813
814 Add support for rules that do not have trailing semicolons, as
815 POSIX requires. Improve the quality of locations in Bison
816 diagnostics.
817
818 * src/location.c: Include <quotearg.h>.
819 (empty_location): Now const.
820 (location_print): New function. Follow the recommendation of the
821 GNU Coding Standards for locations that span file boundaries.
822 * src/location.h: Do not include <quotearg.h>; no longer needed.
823 (boundary): New type.
824 (location_t): Use it. This allows locations to span file boundaries.
825 All member uses changed: file -> start.file or end.file (as needed),
826 first_line -> start.line, first_column -> start.column,
827 last_line -> end.line, last_column -> end.column.
828 (equal_boundaries): New function.
829 (LOCATION_RESET, LOCATION_STEP): Remove.
830 (LOCATION_PRINT): Remove. All callers changed to use location_print.
831 (empty_location): Now const.
832 (location_print): New decl.
833 * src/parse-gram.y (lloc_default): New function, which handles
834 empty locations more accurately.
835 (YYLLOC_DEFAULT): Use it.
836 (%token COLON): Remove.
837 (%token ID_COLON): New token.
838 (rules): Use it.
839 (declarations, rules): Remove trailing semicolon.
840 (declaration, rules_or_grammar_declaration):
841 Allow empty (";") declaration.
842 (symbol_def): Remove empty actions; no longer needed.
843 (rules_or_grammar_declaration): Remove trailing semicolon.
844 (semi_colon.opt): Remove.
845 * src/reader.h: Include location.h.
846 (scanner_cursor): New decl.
847 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
848 rolling our own.
849 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
850 of *loc.
851 (STEP): Remove. No longer needed, now that adjust_location does
852 the work. All uses removed.
853 (scanner_cursor): New var.
854 (adjust_location): Renamed from extend_location. It now sets
855 *loc and adjusts the scanner cursor. All uses changed.
856 Don't bother testing for CR.
857 (handle_syncline): Remove location arg; now updates scanner cursor.
858 All callers changed.
859 (unexpected_end_of_file): Now accepts start boundary of token or
860 comment, not location. All callers changed. Update scanner cursor,
861 not the location.
862 (SC_AFTER_IDENTIFIER): New state.
863 (context_state): Renamed from c_context. All uses changed.
864 (id_loc, code_start, token_start): New local vars.
865 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
866 processing of Yacc white space and equivalents here.
867 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
868 instead of returning ID immediately, since we need to search for
869 a subsequent colon.
870 (<INITIAL>"'", "\""): Save token_start.
871 (<INITIAL>"%{", "{", "%%"): Save code_start.
872 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
873 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
874 BEGIN context_state at end, not INITIAL.
875 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
876 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
877 Return correct token start.
878 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
879 the start of a character, string or multiline comment is found.
880 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
881 Reduction): Adjust reported locations to match the more-precise
882 results now expected.
883 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
884 * tests/reduce.at (Useless Rules, Reduced Automaton,
885 Underivable Rules): Likewise.
886 * tests/regression.at (Invalid inputs): No longer `expecting ";"
887 or "|"' now that so many other tokens are allowed by the new grammar.
888
889 * src/complain.h (current_file): Remove duplicate decl;
890 current_file is now owned by files.h.
891 * src/complain.c, src/scan-gram.l: Include files.h.
892
893 2002-12-06 Paul Eggert <eggert@twinsun.com>
894
895 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
896 promotes to int; it might be unsigned int.
897 * data/yacc.c (yy_reduce_print): Likewise.
898
899 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
900 be #defined in the prologue, not in the Bison declarations.
901 This fixes Debian Bug 102878, reported by Shaul Karl.
902
903 2002-12-02 Paul Eggert <eggert@twinsun.com>
904
905 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
906 * lib/strtoul.c: New file, from gnulib.
907 This fixes a porting bug reported by Peter Klein in
908 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
909
910 2002-11-30 Paul Eggert <eggert@twinsun.com>
911
912 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
913 and put only a forward declaration in the prologue. This is for
914 consistency with the other scanner helper functions.
915
916 Type clashes now generate warnings, not errors, since it
917 appears that POSIX may allow some grammars with type clashes.
918 * src/reader.c (grammar_current_rule_check): Warn about
919 type clashes instead of complaining.
920 * tests/input.at (Type Clashes): Expect warnings, not complaints.
921
922 Add Yacc library, since POSIX requires it.
923 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
924 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
925 * lib/main.c, lib/yyerror.c: New files.
926
927 gram_error can be static; it need not be extern.
928 * src/reader.h (gram_error): Remove decl.
929 * src/parse-gram.y (gram_error): Now static. Add static decl.
930 (print_token_value): Omit parameter names from forward decl,
931 for consistency.
932
933 2002-11-29 Paul Eggert <eggert@twinsun.com>
934
935 * doc/bison.texinfo: Emphasize that yylex and yyerror must
936 be declared before being used. E.g., one should typically
937 declare them in the prologue. Use GNU coding style in examples.
938 Put "const" consistently after the type it modifies. Mention
939 that C99 supports "inline". Mention that yyerror traditionally
940 returns "int".
941
942 %parse-param and %lex-param now take just one argument, the
943 declaration; the argument name is deduced from the declaration.
944
945 * doc/bison.texinfo (Parser Function, Pure Calling, Error
946 Reporting, Table of Symbols): Document this.
947 * src/parse-gram.y (add_param): New function.
948 (COMMA): Remove.
949 (declaration): Implement new rule for %parse-param and %lex-param.
950 * src/scan-gram.l: "," now elicits a warning, rather than being
951 a token; this is more compatible with byacc.
952 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
953
954 2002-11-27 Paul Eggert <eggert@twinsun.com>
955
956 Rename identifiers to avoid real and potential collisions.
957
958 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
959 to avoid collision with lex macro described by Bruce Lilly in
960 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
961 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
962 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
963 * src/parse-gram.y (print_token_value): Renamed from yyprint.
964 All uses changed.
965 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
966 The name "yycontrol" violates the name space rules, and this stuff
967 wasn't being used anyway.
968 (input): Remove action; this stuff wasn't being used.
969 (gram_error): Rename local variable yylloc -> loc.
970 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
971 (YY_DECL): Don't use "yy" at start of local variables.
972 All uses changed, e.g., yylloc -> loc.
973 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
974 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
975 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
976 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
977
978 * src/parse-gram.y (gram_error): loc is now const *.
979 * src/reader.h (gram_error): Likewise.
980
981 2002-11-24 Paul Eggert <eggert@twinsun.com>
982
983 Version 1.75c.
984
985 * tests/actions.at (Actions after errors): Use an output format
986 more similar to that of the Printers and Destructors test.
987 Test the position of the ';' token too.
988 (Printers and Destructors): Likewise.
989 (Printers and Destructors: %glr-parser): Remove for now, to avoid
990 unnecessarily alarming people when the test fails.
991
992 * data/yacc.c (yyerrlab1): Move this label down, so that the
993 parser does not discard the lookahead token if the user code
994 invokes YYERROR. This change is required for POSIX conformance.
995
996 * lib/error.c: Sync with gnulib.
997
998 2002-11-22 Paul Eggert <eggert@twinsun.com>
999
1000 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1001 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1002 * lib/xmalloc.c: Likewise.
1003
1004 2002-11-20 Paul Eggert <eggert@twinsun.com>
1005
1006 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1007
1008 2002-11-20 Paul Eggert <eggert@twinsun.com>
1009
1010 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1011 should use `if (! x) abort ();' rather than `assert (x);', and
1012 anyway it's one less thing to worry about configuring.
1013
1014 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1015 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1016 and replace all instances of assert with abort.
1017 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1018 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1019
1020 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1021 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1022 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1023 hash_find_entry, hash_rehash, hash_insert): Likewise.
1024 * src/conflicts.c (resolve_sr_conflict): Likewise.
1025 * src/lalr.c (set_goto_map, map_goto): Likewise.
1026 * src/nullable.c (nullable_compute): Likewise.
1027 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1028 * src/reader.c (packgram, reader): Likewise.
1029 * src/state.c (state_new, state_free, state_transitions_set,
1030 state_reduction_find): Likewise.
1031 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1032 symbol_pack): Likewise.
1033 * src/tables.c (conflict_row, pack_vector): Likewise.
1034 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1035 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1036 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1037 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1038
1039 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1040 (ARGMATCH_CONSTRAINT): New macro.
1041 (ARGMATCH_ASSERT): Use it.
1042
1043 * src/system.h (verify): New macro.
1044 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1045 rather than assert.
1046 * src/tables.c (tables_generate): Likewise.
1047
1048 * src/struniq.c (struniq_assert): Now returns void, and aborts
1049 if the assertion is false.
1050 (struniq_assert_p): Remove.
1051 * src/struniq.h: Likewise.
1052
1053 2002-11-18 Paul Eggert <eggert@twinsun.com>
1054
1055 * data/glr.c (yygetLRActions): Replace `yyindex' with
1056 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1057 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1058 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1059
1060 2002-11-18 Akim Demaille <akim@epita.fr>
1061
1062 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1063 space.
1064 From Tim Van Holder.
1065
1066 2002-11-17 Paul Eggert <eggert@twinsun.com>
1067
1068 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1069 to "SyntaxError" for consistency with my 2002-11-15 change.
1070
1071 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1072 not define to {}, since this breaks the common use of `YYDPRINTF
1073 ((...));' if a single statement is desired (e.g. before `else').
1074 Work around GCC warnings by surrounding corresponding calls with
1075 {} if needed.
1076 (yyhasResolvedValue): Remove unused function.
1077 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1078 loop body.
1079 (yyreportSyntaxError): Renamed from yyreportParseError.
1080 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1081 All uses changed.
1082 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1083 extern when possible. Remove unused initializations.
1084
1085 2002-11-16 Akim Demaille <akim@epita.fr>
1086
1087 Augment the similarity between GLR and LALR traces.
1088
1089 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1090 (YY_REDUCE_PRINT): New.
1091 (yyparse): Use them.
1092 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1093 YYDPRINT here.
1094 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1095 state reached after the reduction/recovery, since...
1096 (yyparse, yyprocessOneStack): Report the state we are entering in.
1097
1098 2002-11-16 Akim Demaille <akim@epita.fr>
1099
1100 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1101 Add support for --trace=skeleton.
1102 * src/scan-skel.l: %option debug.
1103 Scan strings of non-@ or \n instead of character by character.
1104 (scan_skel): Handle trace_skeleton.
1105 (QPUTS): New.
1106 (@output_parser_name@, @output_header_name@): ``Restore'' their
1107 support (used to be M4 macros).
1108 * data/yacc.c: Quote larger chunks, a la glr.c.
1109 * data/lalr1.cc: Likewise.
1110 The header guards are no longer available, so use some other
1111 string than `YYLSP_NEEDED'.
1112
1113 2002-11-16 Akim Demaille <akim@epita.fr>
1114
1115 Make the ``Printers and Destructors'' test more verbose, taking
1116 `yacc.c''s behavior as (possibly wrong) reference.
1117
1118 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1119 instead of fprint on stdout.
1120 Set and report the last_line of the symbols.
1121 Consistently display values and locations.
1122
1123 2002-11-16 Paul Eggert <eggert@twinsun.com>
1124
1125 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1126
1127 2002-11-15 Paul Eggert <eggert@twinsun.com>
1128
1129 * tests/actions.at (Actions after errors): New test case.
1130
1131 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1132 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1133 tests/action.at, tests/calc.at, tests/conflicts.at,
1134 tests/cxx-type.at, tests/regression.at:
1135 "parse error" -> "syntax error" for POSIX compatibility.
1136 "parsing stack overflow..." -> "parser stack overflow" so
1137 that code matches Bison documentation.
1138
1139 2002-11-15 Akim Demaille <akim@epita.fr>
1140
1141 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1142 take two BRACED_CODE, not two string_content.
1143 Free the scanner's obstack when we are done.
1144 (code_content): New.
1145 * tests/calc.at: Adjust.
1146 * doc/bison.texinfo: Adjust.
1147 Also, make sure to include the `,' for these declarations.
1148
1149 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1150
1151 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1152 definition; avoids potential autoreconf problems.
1153
1154 2002-11-15 Akim Demaille <akim@epita.fr>
1155
1156 Always check the value returned by yyparse.
1157
1158 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1159 returned by yyparse.
1160 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1161 Adjust calls.
1162 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1163 returned by yyparse.
1164
1165 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1166
1167 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1168 on input.at test.
1169
1170 2002-11-14 Paul Eggert <eggert@twinsun.com>
1171
1172 * src/output.c (output_skeleton): Call xfopen instead of
1173 duplicating xfopen's body.
1174
1175 Fix bugs reported by Nelson H. F. Beebe in
1176 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1177
1178 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1179 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1180 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1181 file twice in the grammar, as an extra check.
1182
1183 * tests/input.at (Torturing the Scanner): Surround the
1184 backslash-newline tests with "#if 0", to make it less likely that
1185 we'll run into compiler bugs. Bring back solitary \ inside
1186 comment, but add a closing comment to work around HP C bug. Don't
1187 test backslash-newline in C character constant.
1188
1189 2002-11-14 Akim Demaille <akim@epita.fr>
1190
1191 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1192 status of the compiler.
1193 Calling `exit 1' is no longer needed.
1194 Reported by Nelson H. F. Beebe.
1195
1196 2002-11-14 Akim Demaille <akim@epita.fr>
1197
1198 * tests/atlocal.in (CPPFLAGS): We have config.h.
1199 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1200 New.
1201 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1202 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1203 * tests/regression.at, tests/torture.at: Use them for all the
1204 grammars that are to be compiled.
1205 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1206 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1207 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1208
1209 2002-11-14 Akim Demaille <akim@epita.fr>
1210
1211 * doc/bison.texinfo: Various formatting changes (alignments in
1212 samples, additional @group/@end group, GCS in samples.
1213 Use @deffn instead of simple @table to define the directives,
1214 macros, variables etc.
1215
1216 2002-11-13 Paul Eggert <eggert@twinsun.com>
1217
1218 Fix some bugs reported by Albert Chin-A-Young in
1219 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1220
1221 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1222 -o c"; the HP C compiler chatters during compilation.
1223 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1224 * tests/headers.at (export YYLTYPE): Likewise.
1225
1226 * tests/input.at (Torturing the Scanner): Remove lines containing
1227 solitary backslashes, as they tickle a bug in the HP C compiler.
1228
1229 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1230 comments, since they're not portable. Use GNU coding style.
1231
1232 2002-11-13 Akim Demaille <akim@epita.fr>
1233
1234 * data/yacc.c: Leave bigger chunks of quoted text.
1235 (YYDSYMPRINTF): New.
1236 Use it to report symbol activities.
1237 * data/glr.c (YYDSYMPRINTF): New.
1238 Use it.
1239
1240 2002-11-12 Paul Eggert <eggert@twinsun.com>
1241
1242 Version 1.75b.
1243
1244 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1245 (yyglrReduce): Return yyok, not 0.
1246 This should avoid the enumerated-type warnings reported
1247 by Nelson H. F. Beebe in
1248 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1249
1250 * lib/bbitset.h (BITSET_INLINE): Remove.
1251 * lib/bitset.h [! BITSET_INLINE]: Remove.
1252 (bitset_set, bitset_reset, bitset_test): Rename local vars
1253 to avoid shadowing warnings by GCC.
1254
1255 * data/glr.c (inline): Remove #define. It's the user's
1256 responsibility to #define it away, just like 'const'.
1257 This fixes one of the bugs reported by Nelson H. F. Beebe in
1258 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1259
1260 * Makefile.maint (po-check): Scan .l and .y files instead of the
1261 .c and the .h files that they generate. This fixes the bug
1262 reported by Tim Van Holder in:
1263 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1264 Look for N_ as well as for _. Try to avoid matching #define for
1265 N_ and _.
1266 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1267 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1268 * src/scan-gram.l: Revamp regular expressions so that " and '
1269 do not confuse xgettext.
1270
1271 * src/struniq.h (struniq_new): Do not declare the return type
1272 to be 'const'; this violates the C standard.
1273 * src/struniq.c (struniq_new): Likewise.
1274
1275 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1276
1277 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1278 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1279 linker.
1280
1281 2002-11-12 Akim Demaille <akim@epita.fr>
1282
1283 * Makefile.maint: Sync with Autoconf:
1284 (local_updates): New.
1285
1286 2002-11-12 Akim Demaille <akim@epita.fr>
1287
1288 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1289
1290 2002-11-12 Akim Demaille <akim@epita.fr>
1291
1292 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1293 locations.
1294
1295 2002-11-12 Akim Demaille <akim@epita.fr>
1296
1297 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1298 not yyvalue.
1299
1300 2002-11-12 Akim Demaille <akim@epita.fr>
1301
1302 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1303 Use it to test the GLR parser.
1304
1305 2002-11-12 Akim Demaille <akim@epita.fr>
1306
1307 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1308 defines it.
1309 * data/glr.c (yystos): New.
1310 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1311 (YYDSYMPRINT): New.
1312 (yyval): Don't define it, it is handled via M4.
1313 (yyrecoverParseError): Free verbosely the discarded symbols.
1314 * data/yacc.c (yysymprint): Remove, rather...
1315 (b4_yysymprint_generate): invoke.
1316 * data/c.m4 (b4_yysymprint_generate): New.
1317 Accept pointers as arguments, as opposed to the version from
1318 yacc.c.
1319 (b4_yydestruct_generate): Likewise.
1320 * tests/cations.at (Printers and Destructors): Use Bison directives
1321 instead of CPP macros.
1322 Don't rely on internal details.
1323
1324 2002-11-12 Akim Demaille <akim@epita.fr>
1325
1326 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1327 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1328 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1329 it against YYEMPTY and so forth), work on yytoken (i.e., set
1330 it to YYEMPTY etc.).
1331 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1332 (b4_symbol_actions): Remove.
1333 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1334 for 0, end-of-input.
1335
1336 2002-11-12 Akim Demaille <akim@epita.fr>
1337
1338 * doc/bison.texinfo (Destructor Decl): New.
1339
1340 2002-11-12 Akim Demaille <akim@epita.fr>
1341
1342 * src/tables.c (tables_generate): Use free for pointers that
1343 cannot be NULL, not XFREE.
1344 (pack_vector): Use assert, not fatal, for bound violations.
1345 * src/state.c (state_new): Likewise.
1346 * src/reader.c (reader): Likewise.
1347 * src/lalr.c (set_goto_map): Likewise.
1348 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1349 the file name.
1350
1351 2002-11-12 Akim Demaille <akim@epita.fr>
1352
1353 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1354 Restore.
1355 * src/scan-gram.l (last_string): Is global to the file, not to
1356 yylex.
1357 * src/parse-gram.y (input): Don't append the epilogue here,
1358 (epilogue.opt): do it here, and free the scanner's obstack.
1359 * src/reader.c (epilogue_set): Rename as...
1360 (epilogue_augment): this.
1361 * data/c.m4 (b4_epilogue): Defaults to empty.
1362
1363 2002-11-12 Akim Demaille <akim@epita.fr>
1364
1365 * src/getargs.c (long_options): Remove duplicates.
1366 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1367 Remove.
1368 * doc/bison.rnh: Remove.
1369 * doc/bison.texinfo (VMS Invocation): Remove.
1370
1371 2002-11-12 Akim Demaille <akim@epita.fr>
1372
1373 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1374 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1375
1376 Use struniq for symbols.
1377
1378 * src/symtab.h (symbol_t): The tag member is a struniq.
1379 (symbol_type_set): Adjust.
1380 * src/symtab.c (symbol_new): Takes a struniq.
1381 (symbol_free): Don't free the tag member.
1382 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1383 (hash_compare_symbol, hash_symbol): these.
1384 Use the fact that tags as struniqs.
1385 (symbol_get): Use struniq_new.
1386 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1387 Returns a strniq.
1388 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1389 and type members are struniqs.
1390 * src/reader.c (get_merge_function)
1391 (grammar_current_rule_merge_set): Adjust.
1392 (TYPE, current_type): Are struniq.
1393
1394 Use struniq for file names.
1395
1396 * src/files.h, src/files.c (infile): Split into...
1397 (grammar_file, current_file): these.
1398 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1399 * src/reduce.c (reduce_print): Likewise.
1400 * src/getargs.c (getargs): Likewise.
1401 * src/complain.h, src/complain.c: Likewise.
1402 * src/main.c (main): Call struniqs_new early enough to use it for
1403 file names.
1404 Don't free the input file name.
1405
1406 2002-11-12 Akim Demaille <akim@epita.fr>
1407
1408 * src/symtab.c (symbol_free): Remove dead deactivated code:
1409 type_name are properly removed.
1410 Don't use XFREE to free items that cannot be NULL.
1411 * src/struniq.h, src/struniq.c: New.
1412 * src/main.c (main): Initialize/free struniqs.
1413 * src/parse-gram.y (%union): Add astruniq member.
1414 (yyprint): Adjust.
1415 * src/scan-gram.l (<{tag}>): Return a struniq.
1416 Free the obstack bit that used to store it.
1417 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1418
1419 2002-11-11 Paul Eggert <eggert@twinsun.com>
1420
1421 Revamp to fix many (but not all) of the C- and M4-related quoting
1422 problems. Among other things, this fixes the Bison bug reported
1423 by Jan Hubicka when processing the Bash grammar; see:
1424 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1425
1426 Use new @ escapes consistently. Represent brackets with @{ and @}
1427 rather than @<:@ and @:>@, since this works a bit better with dumb
1428 editors like vi. Represent @ with @@, since @ is now consistently
1429 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1430 __ofile__, to avoid unexpected expansions. Similarly, use @output
1431 rather than #output.
1432
1433 * data/c.m4 (b4_copyright): Omit file name from comment, since
1434 the file name could contain "*/".
1435 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1436 be quoted. All uses changed.
1437
1438 * data/glr.c: Use new @ escapes consistently.
1439 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1440 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1441 Remove, since they couldn't handle arbitrary characters in file
1442 names.
1443 * data/lalr1.cc: Likewise.
1444 * data/yacc.c: Likewise.
1445
1446 * src/files.c (output_infix): Remove; all uses removed.
1447 * src/files.h: Likewise.
1448
1449 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1450 mishandled funny characters in file names, and anyway it isn't
1451 needed any more.
1452 * data/yacc.c: Likewise.
1453 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1454
1455 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1456 * data/yacc.c: Likewise.
1457
1458 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1459 strings now.
1460 (muscle_init): Quote filename as a C string.
1461 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1462 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1463 * src/output.c (escaped_file_name_output): New function.
1464 (prepare_symbols): Quote tokens for M4.
1465 (prepare): Don't insert output_infix, output_prefix,
1466 output_parser_name, output_header_name; this is now down by scan-skel.
1467 Insert skeleton as a C string.
1468
1469 * src/output.c (user_actions_output, symbol_destructors_output,
1470 symbol_printers_output): Quote filenames for C and M4.
1471 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1472
1473 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1474 escapes other than \\ and \'; this simplifies the code.
1475 (<SC_STRING>): Likewise, for \\ and \".
1476 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1477 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1478 Use new escapes @{ and @} for [ and ].
1479
1480 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1481 them with auto vars.
1482 Switch to new escape scheme, where @ is the escape character uniformly.
1483 Abort if a stray escape character is found. Avoid unbounded input
1484 buffer when parsing non-escaped text.
1485
1486 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1487 __oline__, #output, $@, and @{ do not have unintended meanings.
1488
1489 2002-11-09 Paul Eggert <eggert@twinsun.com>
1490
1491 Fix the test failure due to GCC warnings described in
1492 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1493 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1494 evaluate to 0 if it's impossible for NINF to be in the respective
1495 table.
1496 (yygetLRActions, yyrecoverParseError): Use them.
1497
1498 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1499 counted in the token inserted at end of file. Now takes
1500 location_t *, not location_t, so that the location can be
1501 adjusted. All uses changed.
1502
1503 * tests/regression.at (Invalid inputs): Adjust wording in
1504 diagnostic to match the new behavior.
1505
1506 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1507 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1508 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1509 abort ();'. This reduces the runtime of the "Many lookaheads"
1510 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1511 GCC 3.2.
1512
1513 2002-11-07 Paul Eggert <eggert@twinsun.com>
1514
1515 * src/parse-gram.y (CHARACTER): Remove unused token.
1516 All uses removed.
1517
1518 * src/scan-gram.l: Remove stack option. We no longer use the
1519 stack, since the stack was never deeper than 1; instead, use the
1520 new auto var c_context to record the stacked value.
1521
1522 Remove nounput option. At an unexpected end of file, we now unput
1523 the minimal input necessary to end cleanly; this simplifies the
1524 code.
1525
1526 Avoid unbounded token sizes where this is easy.
1527
1528 (unexpected_end_of_file): New function.
1529 Use it to systematize the error message on unexpected EOF.
1530 (last-string): Now auto, not static.
1531 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1532 (scanner_last_string_free): Remove; not used.
1533 (percent_percent_count): Move decl to just before use.
1534 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1535 not the (never otherwised-used) CHARACTER.
1536
1537 2002-11-07 Akim Demaille <akim@epita.fr>
1538
1539 Let yyerror always receive the msg as last argument, so that
1540 yyerror can be variadic.
1541
1542 * data/yacc.c (b4_yyerror_args): New.
1543 Use it when calling yyerror.
1544 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1545 Use it when calling yyerror.
1546 * doc/bison.texinfo (Error Reporting): Adjust.
1547 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1548 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1549
1550 2002-11-06 Akim Demaille <akim@epita.fr>
1551
1552 #line should have quoted strings.
1553 Ideally, this should be done by m4_quotearg.
1554
1555 * src/scan-skel.l: Include quotearg.h.
1556 Quote __ofile__.
1557 * src/output.c (symbol_printers_output)
1558 (symbol_destructors_output): Quote the file name.
1559
1560 2002-11-06 Akim Demaille <akim@epita.fr>
1561
1562 * tests/regression.at (Invalid inputs): Adjust to the recent
1563 messages.
1564
1565 2002-11-06 Akim Demaille <akim@epita.fr>
1566
1567 Restore --no-lines.
1568 Reported by Jim Kent.
1569
1570 * data/c.m4 (b4_syncline): New.
1571 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1572 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1573 * src/output.c (user_actions_output): Likewise.
1574 (prepare): Define 'b4_synclines_flag'.
1575 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1576
1577 2002-11-06 Akim Demaille <akim@epita.fr>
1578
1579 * src/main.c (main): Free `infile'.
1580 * src/scan-gram.l (handle_syncline): New.
1581 Recognize `#line'.
1582 * src/output.c (user_actions_output, symbol_destructors_output)
1583 (symbol_printers_output): Use the location's file name, not
1584 infile.
1585 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1586
1587 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1588
1589 * src/tables.c (matching_state): Don't allow states to match if
1590 either has GLR conflict entries.
1591
1592 2002-11-05 Paul Eggert <eggert@twinsun.com>
1593
1594 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1595 "integer out of range" rather than "invalid value".
1596 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1597 accordingly.
1598
1599 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1600 Also, remove one static variable in the scanner.
1601
1602 * src/scan-gram.l (braces_level): Now auto, not static.
1603 Initialize to zero if the compiler is being picky.
1604 (INITIAL): Clear braces_level instead of incrementing it.
1605 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1606 as POSIX 1003.1-2001 requires.
1607 * src/system.h (IF_LINT): New macro, taken from coreutils.
1608 * configure.ac: Define "lint" if --enable-gcc-warnings.
1609
1610 2002-11-05 Akim Demaille <akim@epita.fr>
1611
1612 * src/scan-gram.l: When it starts with `%', complain about the
1613 whole directive, not just that `invalid character: %'.
1614
1615 2002-11-04 Akim Demaille <akim@epita.fr>
1616
1617 * Makefile.maint: Update from Autoconf.
1618 (update, cvs-update, po-update, do-po-update): New.
1619
1620 2002-11-04 Akim Demaille <akim@epita.fr>
1621
1622 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1623 and yyerror.
1624 Have yyerror `use' its arguments.
1625 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1626 returns true when location & yacc & pure & parse-param.
1627 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1628
1629 2002-11-04 Akim Demaille <akim@epita.fr>
1630
1631 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1632 clashes.
1633 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1634 font-lock-mode.
1635 Use complain_at.
1636 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1637 slot 0.
1638
1639 2002-11-03 Paul Eggert <eggert@twinsun.com>
1640
1641 * src/reader.c (get_merge_function, grammar_current_rule_check):
1642 Use consistent diagnostics for reporting type name clashes.
1643 Quote the types with <>, for consistency with Yacc.
1644 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1645
1646 2002-11-03 Akim Demaille <akim@epita.fr>
1647
1648 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1649 New.
1650 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1651 (b4_parse_param): Remove.
1652 Use b4_identification.
1653 Propagate b4_pure_args where needed to pass them to yyerror.
1654 * data/glr.m4 (b4_parse_param): Remove.
1655 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1656 (b4_lpure_formals): New.
1657 Use b4_identification.
1658 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1659 b4_user_formals and b4_user_args.
1660 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1661 (yyreportAmbiguity): When using a pure parser, also need
1662 the location, and the parse-params.
1663 Adjust callers.
1664 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1665 When using a pure parser, also need the parse-params.
1666 Adjust callers.
1667 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1668 (%pure-parser + %parse-param) LALR and GLR parsers.
1669 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1670 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1671 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1672 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1673 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1674 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1675 * doc/bison.texinfo: Untabify the whole file.
1676 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1677 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1678 (Error Reporting): Adjust to these new directives.
1679 Document %error-verbose, deprecate YYERROR_VERBOSE.
1680
1681 2002-11-03 Akim Demaille <akim@epita.fr>
1682
1683 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1684 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1685 command line options.
1686 * tests/cxx-type.at: Formatting changes.
1687
1688 2002-11-03 Paul Eggert <eggert@twinsun.com>
1689
1690 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1691 to count columns correctly, and to check for invalid inputs.
1692
1693 Use mbsnwidth to count columns correctly. Account for tabs, too.
1694 Include mbswidth.h.
1695 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1696 (extend_location): New function.
1697 (YY_LINES): Remove.
1698
1699 Handle CRLF in C code rather than in Lex code.
1700 (YY_INPUT): New macro.
1701 (no_cr_read): New function.
1702
1703 Scan UCNs, even though we don't fully handle them yet.
1704 (convert_ucn_to_byte): New function.
1705
1706 Handle backslash-newline correctly in C code.
1707 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1708 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1709 all uses changed.
1710 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1711 Use {splice} wherever C allows backslash-newline.
1712 YY_STEP after space, newline, vertical-tab.
1713 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1714
1715 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1716
1717 ({int}, handle_action_dollar, handle_action_at): Check for integer
1718 overflow.
1719
1720 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1721
1722 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1723 as well as \000. Check for UCHAR_MAX, not 255.
1724 Allow \x with an arbitrary positive number of digits, as in C.
1725 Check for overflow here.
1726 Allow \? and UCNs, for compatibility with C.
1727
1728 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1729 with quote slot used by complain_at.
1730
1731 * tests/input.at: Add tests for backslash-newline, m4 quotes
1732 in symbols, long literals, and funny escapes in strings.
1733
1734 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1735 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1736 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1737 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1738 * m4/mbswidth.m4: New file, from GNU coreutils.
1739
1740 * doc/bison.texinfo (Grammar Outline): Document // comments.
1741 (Symbols): Document that trigraphs have no special meaning in Bison,
1742 nor is backslash-newline allowed.
1743 (Actions): Document that trigraphs have no special meaning.
1744
1745 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1746 no longer used.
1747
1748 2002-11-02 Paul Eggert <eggert@twinsun.com>
1749
1750 * src/reader.c: Don't include quote.h; not needed.
1751 (get_merge_function): Reword warning to be consistent with
1752 type clash diagnostic in grammar_current_rule_check.
1753
1754 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1755 bug in trigraph handling.
1756
1757 * src/output.c (prepare_symbols): When printing token names,
1758 escape "[" as "@<:@" and likewise for "]".
1759
1760 * src/system.h (errno): Remove declaration, as we are now
1761 assuming C89 or better, and C89 guarantees errno.
1762
1763 2002-10-30 Paul Eggert <eggert@twinsun.com>
1764
1765 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1766 Check for close failures.
1767 * src/files.h (xfclose): Return void, not int, since it always
1768 returned zero.
1769 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1770 indicates one.
1771 * src/output.c (output_skeleton): Use xfclose rather than fclose
1772 and ferror. xfclose now checks ferror.
1773
1774 * data/glr.c (YYLEFTMOST_STATE): Remove.
1775 (yyreportTree): Use a stack-based leftmost state. This avoids
1776 our continuing battles with bogus warnings about initializers.
1777
1778 2002-10-30 Akim Demaille <akim@epita.fr>
1779
1780 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1781 #if.
1782
1783 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1784
1785 * tests/glr-regr1.at: New test for reported regressions.
1786 * tests/testsuite.at: Add glr-regr1.at test.
1787 * tests/Makefile.am: Add glr-regr1.at test.
1788
1789 2002-10-24 Paul Eggert <eggert@twinsun.com>
1790
1791 Version 1.75a.
1792
1793 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1794 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1795 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1796 Don't assume strdup exists; POSIX says its an XSI extension.
1797 Check for buffer overflow on input.
1798
1799 2002-10-24 Akim Demaille <akim@epita.fr>
1800
1801 * src/output.c (output_skeleton): Don't disable M4sugar comments
1802 too soon: it results in comments being expanded.
1803 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1804 first output.
1805
1806 2002-10-24 Akim Demaille <akim@epita.fr>
1807
1808 * data/yacc.c (m4_int_type): New.
1809 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1810 char' as only yacc.c wants K&R portability.
1811 * data/glr.c (yysigned_char): Remove.
1812 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1813 Reported by Quoc Peyrot.
1814
1815 2002-10-23 Paul Eggert <eggert@twinsun.com>
1816
1817 * src/main.c (main): With --trace=time, report times even if a
1818 non-fatal error occurs. Formerly, the times were reported in some
1819 such cases but not in others.
1820 * src/reader.c (reader): Just return if a complaint has been issued,
1821 instead of exiting, so that 'main' can report times.
1822
1823 2002-10-22 Akim Demaille <akim@epita.fr>
1824
1825 * src/system.h: Include sys/types.
1826 Reported by Bert Deknuydt.
1827
1828 2002-10-23 Paul Eggert <eggert@twinsun.com>
1829
1830 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1831 Suggested by Art Haas.
1832
1833 2002-10-22 Paul Eggert <eggert@twinsun.com>
1834
1835 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1836 decl; not needed any more.
1837 * src/main.c (main): Use return to exit, undoing yesterday's change.
1838 The last OS that we could find where this wouldn't work is
1839 SunOS 3.5, and that's too old to worry about now.
1840
1841 * data/glr.c (struct yyltype): Define members even when not
1842 doing locations. This is more consistent with yacc.c, and it
1843 works around the following bug reports:
1844 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
1845 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
1846
1847 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1848 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1849 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1850
1851 2002-10-22 Akim Demaille <akim@epita.fr>
1852
1853 * data/README: New.
1854
1855 2002-10-21 Paul Eggert <eggert@twinsun.com>
1856
1857 Be consistent about 'bool'; the old code used an enum in one
1858 module and an int in another, and this violates the C standard.
1859 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1860 * configure.ac (AC_HEADER_STDBOOL): Add.
1861 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1862 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1863 * src/symtab.c (hash_compare_symbol_t): Likewise.
1864 * src/system.h (bool, false, true): Use a definition consistent
1865 with ../lib/hash.c. All uses changed.
1866
1867 * src/complain.c (warning_issued): Renamed from warn_message_count,
1868 so that we needn't worry about integer overflow (!).
1869 Now of type bool. All uses changed.
1870 (complaint_issued): Renamed from complain_message_count; likewise.
1871
1872 * src/main.c (main): Use exit to exit with failure.
1873
1874 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
1875 rather than 1 and 0.
1876 * src/main.c (main): Likewise.
1877 * src/getargs.c (getargs): Likewise.
1878 * src/reader.c (reader): Likewise.
1879
1880 * src/getarg.c (getargs): Remove duplicate code for
1881 "Try `bison --help'".
1882
1883 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
1884 What was that "2" for?
1885
1886 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
1887 * src/getargs.c (usage): Likewise.
1888
1889 * src/getargs.c (getargs): When there are too few operands, report
1890 the last one. When there are too many, report the first extra
1891 one. This is how diffutils does it.
1892
1893 2002-10-20 Paul Eggert <eggert@twinsun.com>
1894
1895 Remove K&R vestiges.
1896 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
1897 * src/complain.c (VA_START): Remove. Assume prototypes.
1898 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
1899 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
1900 fatal): Assume prototypes.
1901 * src/complain.h: Assume prototypes.
1902 * src/system.h (PARAMS): Remove.
1903 Include <limits.h> unconditionally, since it's guaranteeed even
1904 for a freestanding C89 compiler.
1905 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
1906 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
1907
1908 2002-10-20 Akim Demaille <akim@epita.fr>
1909
1910 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
1911 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
1912 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
1913 (yyresolveStates, yyresolveAction, yyresolveStack)
1914 (yyprocessOneStack): Use them.
1915 (yy_reduce_print): New.
1916 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
1917
1918 2002-10-20 Akim Demaille <akim@epita.fr>
1919
1920 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
1921 arguments and output `void'.
1922 (b4_c_function): Rename as...
1923 (b4_c_function_def): this.
1924 (b4_c_function_decl, b4_c_ansi_function_def)
1925 (b4_c_ansi_function_decl): New.
1926 Change the interpretation of the arguments: before `int, foo', now
1927 `int foo, foo'.
1928 * data/yacc.c (yyparse): Prototype and define thanks to these.
1929 Adjust b4_c_function_def uses.
1930 * data/glr.c (yyparse): Likewise, but ANSI only.
1931
1932 2002-10-20 Akim Demaille <akim@epita.fr>
1933
1934 * src/output.c (prepare): Move the definition of `tokens_number',
1935 `nterms_number', `undef_token_number', `user_token_number_max'
1936 to...
1937 (prepare_tokens): Here.
1938 (prepare_tokens): Rename as...
1939 (prepare_symbols): this.
1940 (prepare): Move the definition of `rules_number' to...
1941 (prepare_rules): here.
1942 (prepare): Move the definition of `last', `final_state_number',
1943 `states_number' to...
1944 (prepare_states): here.
1945 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
1946
1947 2002-10-20 Akim Demaille <akim@epita.fr>
1948
1949 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1950
1951 2002-10-20 Akim Demaille <akim@epita.fr>
1952
1953 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
1954 * data/c.m4: here.
1955
1956 2002-10-20 Akim Demaille <akim@epita.fr>
1957
1958 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
1959 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
1960 `pair'.
1961 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
1962 `name' to...
1963 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
1964 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
1965 These.
1966
1967 2002-10-19 Paul Eggert <eggert@twinsun.com>
1968
1969 Do not create a temporary file, as that involves security and
1970 cleanup headaches. Instead, use a pair of pipes.
1971 Derived from a suggestion by Florian Krohm.
1972 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
1973 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
1974 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
1975 (BISON_PREREQ_SUBPIPE): Add.
1976 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
1977 Add subpipe.h, subpipe.c.
1978 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
1979 * po/POTFILES.in: Add lib/subpipe.c.
1980 * src/output.c: Include "subpipe.h".
1981 (m4_invoke): Remove decl.
1982 (scan_skel): New decl.
1983 (output_skeleton): Use pipe rather than temporary file for m4 input.
1984 Check that m4sugar.m4 is readable, to avoid deadlock.
1985 Check for pipe I/O error.
1986 * src/scan-skel.l (readpipe): Remove decl.
1987 (scan_skel): New function, to be used in place of m4_invoke.
1988 Read from stream rather than file.
1989
1990 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
1991 float, as this generates a warning on Solaris 8 + GCC 3.2 with
1992 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
1993 this generates a more-accurate value anyway.
1994
1995 * lib/timevar.c (timervar_accumulate): Rename locals to
1996 avoid confusion with similarly-named more-global.
1997 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
1998
1999 * src/output.c (prepare): Use xstrdup to convert char const *
2000 to char *, to avoid GCC warning.
2001
2002 2002-10-19 Akim Demaille <akim@epita.fr>
2003
2004 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2005 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2006 Use them to have `calc.y' ready for %pure-parser.
2007 * data/yacc.c (YYLEX): Pass a yylex return type to
2008 b4_c_function_call.
2009
2010 2002-10-19 Akim Demaille <akim@epita.fr>
2011
2012 Prototype support of %lex-param and %parse-param.
2013
2014 * src/parse-gram.y: Add the definition of the %lex-param and
2015 %parse-param tokens, plus their rules.
2016 Drop the `_' version of %glr-parser.
2017 Add the "," token.
2018 * src/scan-gram.l (INITIAL): Scan them.
2019 * src/muscle_tab.c: Comment changes.
2020 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2021 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2022 (muscle_entry_s): The `value' member is no longer const.
2023 Adjust all dependencies.
2024 * src/muscle_tab.c (muscle_init): Adjust: use
2025 MUSCLE_INSERT_STRING.
2026 Initialize the obstack earlier.
2027 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2028 (muscle_pair_list_grow): New.
2029 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2030 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2031 * tests/calc.at: Use %locations, not --locations.
2032 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2033
2034 2002-10-19 Akim Demaille <akim@epita.fr>
2035
2036 * src/getargs.c (usage): Take status as argument and exit
2037 accordingly.
2038 Report the traditional `Try ... --help' message when status != 0.
2039 (usage, version): Don't take a FILE * as arg, it is pointless.
2040 (getargs): When there is an incorrect number of arguments, make it
2041 an error, and report it GNUlically thanks to `usage ()'.
2042
2043 2002-10-18 Paul Eggert <eggert@twinsun.com>
2044
2045 * data/glr.c (yyreportParseError): Don't assume that sprintf
2046 yields the length of the printed string, as this is not true
2047 on SunOS 4.1.4. Reported by Peter Klein.
2048
2049 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2050 * tests/conflicts.at (%nonassoc and eof): Likewise.
2051 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2052
2053 2002-10-17 Akim Demaille <akim@epita.fr>
2054
2055 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2056 * src/getargs.c (trace_types, trace_args): Adjust.
2057 * src/reader.c (grammar_current_rule_prec_set)
2058 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2059 Standardize error messages.
2060 And s/@prec/%prec/!
2061 (reader): Use trace_flag to enable scanner/parser debugging,
2062 instead of an adhoc scheme.
2063 * src/scan-gram.l: Remove trailing debugging code.
2064
2065 2002-10-16 Paul Eggert <eggert@twinsun.com>
2066
2067 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2068 MUSCLE_TAB_H.
2069
2070 * NEWS: Officially drop support for building Bison with K&R C,
2071 since it didn't work anyway and it's not worth worrying about.
2072 * Makefile.maint (wget_files): Remove ansi2knr.c.
2073 (ansi2knr.c-url_prefix): Remove.
2074 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2075 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2076 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2077
2078 2002-10-15 Paul Eggert <eggert@twinsun.com>
2079
2080 Stop using the "enum_" trick for K&R-style function definitions;
2081 it confused me, and I was the author! Instead, assume that people
2082 who want to use K&R C compilers (when using these modules in GCC,
2083 perhaps?) will run ansi2knr.
2084
2085 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2086 All uses of "enum_" changed to "enum ".
2087 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2088 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2089
2090 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2091 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2092 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2093 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2094 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2095 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2096 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2097 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2098 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2099 Use function prototypes; this removes the need for declaring
2100 static functions simply to provide their prototypes.
2101 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2102 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2103 bitset_count_, bitset_create, bitset_dump, bitset_first,
2104 bitset_free, bitset_init, bitset_last, bitset_next,
2105 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2106 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2107 bitset_print, bitset_release_memory, bitset_toggle_,
2108 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2109 debug_bitset): Likewise.
2110 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2111 * lib/bitset_stats.c (bitset_log_histogram_print,
2112 bitset_percent_histogram_print, bitset_stats_and,
2113 bitset_stats_and_cmp, bitset_stats_and_or,
2114 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2115 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2116 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2117 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2118 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2119 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2120 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2121 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2122 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2123 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2124 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2125 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2126 bitset_stats_zero): Likewise.
2127 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2128 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2129 bitsetv_dump, debug_bitsetv): Likewise.
2130 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2131 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2132 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2133 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2134 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2135 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2136 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2137 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2138 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2139 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2140 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2141 Likewise.
2142 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2143 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2144 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2145 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2146 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2147 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2148 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2149 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2150 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2151 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2152 lbitset_xor_cmp, lbitset_zero): Likewise.
2153
2154 2002-10-14 Akim Demaille <akim@epita.fr>
2155
2156 Version 1.75.
2157
2158 2002-10-14 Akim Demaille <akim@epita.fr>
2159
2160 * tests/Makefile.am (maintainer-check-posix): New.
2161
2162 2002-10-14 Akim Demaille <akim@epita.fr>
2163
2164 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2165 member.
2166
2167 2002-10-14 Akim Demaille <akim@epita.fr>
2168
2169 * src/tables.c (table_ninf_remap): base -> tab.
2170 Reported by Matt Rosing.
2171
2172 2002-10-14 Paul Eggert <eggert@twinsun.com>
2173
2174 * tests/action.at, tests/calc.at, tests/conflicts.at,
2175 tests/cxx-type.at, tests/headers.at, tests/input.at,
2176 tests/regression.at, tests/synclines.at, tests/torture.at:
2177 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2178 so that the tests still work even if POSIXLY_CORRECT is set.
2179 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2180
2181 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2182 for portability to K&R hosts. Fix typo: signed char is guaranteed
2183 only to 127, not to 128.
2184 * data/glr.c (yysigned_char): New type.
2185 * data/yacc.c (yysigned_char): Likewise.
2186 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2187
2188 2002-10-13 Paul Eggert <eggert@twinsun.com>
2189
2190 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2191 true due to limited range of data type" warning from GCC.
2192
2193 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2194 by wrapping enum yytokentype's definition inside #ifndef
2195 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2196
2197 2002-10-13 Akim Demaille <akim@epita.fr>
2198
2199 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2200 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2201
2202 2002-10-13 Akim Demaille <akim@epita.fr>
2203
2204 * Makefile.maint: Update from Autoconf 2.54.
2205 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2206
2207 2002-10-13 Akim Demaille <akim@epita.fr>
2208
2209 * src/print.c (print_state): Separate the list of solved conflicts
2210 from the other items.
2211 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2212
2213 2002-10-13 Akim Demaille <akim@epita.fr>
2214
2215 Let nondeterministic skeletons be usable with deterministic
2216 tables.
2217
2218 With the patch, GAWK compiled by GCC without -O2 passes its test
2219 suite using a GLR parser driven by LALR tables. It fails with -O2
2220 because `struct stat' gives two different answers on my machine:
2221 88 (definition of an auto var) and later 96 (memset on this var).
2222 Hence the stack is badly corrumpted. The headers inclusion is to
2223 blame: if I move the awk.h inclusion before GLR's system header
2224 inclusion, the two struct stat have the same size.
2225
2226 * src/tables.c (pack_table): Always create conflict_table.
2227 (token_actions): Always create conflict_list.
2228 * data/glr.c (YYFLAG): Remove, unused.
2229
2230 2002-10-13 Akim Demaille <akim@epita.fr>
2231
2232 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2233 (O0FLAGS): New.
2234 (VALGRIND, GXX): New.
2235 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2236 * tests/bison.in: Run $PREBISON a pre-command.
2237 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2238 (maintainer-check-g++): New.
2239 * Makefile.am (maintainer-check): New.
2240
2241 2002-10-13 Akim Demaille <akim@epita.fr>
2242
2243 * data/glr.c: Formatting changes.
2244 Tweak some trace messages to match yacc.c's.
2245
2246 2002-10-13 Akim Demaille <akim@epita.fr>
2247
2248 GLR parsers sometimes raise parse errors instead of performing the
2249 default reduction.
2250 Reported by Charles-Henry de Boysson.
2251
2252 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2253 check the length of the traces when %glr.
2254 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2255 GLR's traces.
2256 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2257 Test GLR parsers.
2258 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2259 (yyltype): Remove the yy prefix from the member names.
2260 (yytable): Complete its comment.
2261 (yygetLRActions): Map error action number from YYTABLE from
2262 YYTABLE_NINF to 0.
2263 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2264 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2265 not satisfying as we could compare an YYACTION computed from
2266 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2267 only value for error actions.
2268 (yyreportParseError): In verbose parse error messages, don't issue
2269 `error' in the list of expected tokens.
2270 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2271 next action to perform to match glr.c's decoding.
2272 (yytable): Complete its comment.
2273
2274 2002-10-13 Paul Eggert <eggert@twinsun.com>
2275
2276 Fix problem reported by Henrik Grubbstroem in
2277 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2278 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2279 because the Bison parser reads the second action before reducing
2280 the first one.
2281 * src/scan-gram.l (rule_length): New static var.
2282 Use it to keep track of the rule length in the scanner, since
2283 we can't expect the parser to be in lock-step sync with the scanner.
2284 (handle_action_dollar, handle_action_at): Use this var.
2285 * tests/actions.at (Exotic Dollars): Test for the problem.
2286
2287 2002-10-12 Paul Eggert <eggert@twinsun.com>
2288
2289 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2290 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2291 Include <sys/time.h> when checking for clock_t and struct tms.
2292 Use same include order as source.
2293 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2294 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2295
2296 * lib/timevar.c: Update copyright date and clarify comments.
2297 (get_time) [IN_GCC]: Keep the GCC version for reference.
2298
2299 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2300 GCC version as of today, then merge Bison's changes.
2301 Change "GCC" to "Bison" in copyright notice. timevar.def's
2302 author is Akim, so change that too.
2303
2304 * src/reader.c (grammar_current_rule_check):
2305 Don't worry about the default action if $$ is untyped.
2306 Prevents bogus warnings reported by Jim Gifford in
2307 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2308
2309 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2310 * data/glr.c, data/lalr1.cc, data/yacc.c:
2311 Output token definitions before the first part of user declarations.
2312 Fixes compatibility problem reported by Jim Gifford for kbd in
2313 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2314
2315 2002-10-11 Paul Eggert <eggert@twinsun.com>
2316
2317 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2318 (yyparse): here. This undoes some of the 2002-07-25 change.
2319 Compatibility problem reported by Ralf S. Engelschall with
2320 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2321
2322 2002-10-11 Akim Demaille <akim@epita.fr>
2323
2324 * tests/regression.at Characters Escapes): New.
2325 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2326 characters.
2327 Reported by Jan Nieuwenhuizen.
2328
2329 2002-10-11 Akim Demaille <akim@epita.fr>
2330
2331 * po/id.po: New.
2332
2333 2002-10-10 Paul Eggert <eggert@twinsun.com>
2334
2335 Portability fixes for bitsets; this also avoids several GCC
2336 warnings.
2337
2338 * lib/abitset.c: Include <stddef.h>, for offsetof.
2339 * lib/lbitset.c: Likewise.
2340
2341 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2342 properly for vectors of objects. Do not assume that adding a
2343 header size to a multiple of a word size yields a value that is
2344 properly aligned for the whole union.
2345 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2346
2347 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2348 unique names for structures.
2349 * lib/ebitset.c (ebitset_bytes): Likewise.
2350 * lib/lbitset.c (lbitset_bytes): Likewise.
2351
2352 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2353 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2354 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2355 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2356 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2357 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2358 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2359 to improve the type-checking that GCC can do.
2360 * lib/bitset.c (bitset_op4_cmp): Likewise.
2361 * lib/bitset_stats.c (bitset_stats_count,
2362 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2363 bitset_stats_copy, bitset_stats_disjoint_p,
2364 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2365 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2366 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2367 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2368 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2369 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2370 bitset_stats_or_and_cmp): Likewise.
2371 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2372 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2373 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2374 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2375
2376 * lib/abitset.h: Include bitset.h, not bbitset.h.
2377 * lib/ebitset.h: Likewise.
2378 * lib/lbitset.h: Likewise.
2379
2380 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2381 All instances of parameters of type enum bitset_opts are now of
2382 type enum_bitset_opts, to conform to the C Standard, and similarly
2383 for enum_bitset_type.
2384 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2385 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2386
2387 Do not use "struct bitset_struct" to mean different things in
2388 different modules. Not only is this confusing, it violates
2389 the C Standard, which requires that structure types in different
2390 modules must be compatible if one is to be passed to the other.
2391 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2392 All instances of "struct bitset_struct *" replaced with "bitset".
2393 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2394 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2395 struct lbitset_struct, struct bitset_stats_struct): New types.
2396 All uses of struct bitset_struct changed to union bitset_union,
2397 etc.
2398 * lib/abitset.c (struct abitset_struct, abitset,
2399 struct bitset_struct): Remove.
2400 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2401 struct bitset_struct): Remove.
2402 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2403 bitset_struct): Remove.
2404 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2405 Likewise.
2406
2407 Do not call a function of type T using a call that assumes the
2408 function is of a different type U. Standard C requires that a
2409 function must be called with a type that is compatible with its
2410 definition.
2411 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2412 New decls.
2413 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2414 New functions.
2415 * lib/ebitset.c (PFV): Remove.
2416 * lib/lbitset.c (PFV): Likewise.
2417 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2418 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2419 decls.
2420 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2421 (ebitset_vtable): Use them.
2422 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2423 lbitset_xor): New functions.
2424 (lbitset_vtable): Use them.
2425
2426 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2427 Declare.
2428
2429 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2430 GCC warning.
2431 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2432 Use offsetof, for simplicity.
2433
2434 2002-10-06 Paul Eggert <eggert@twinsun.com>
2435
2436 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2437 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2438 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2439 which was inadvertently undone by the 2002-09-30 patch.
2440 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2441 the same width as int.
2442
2443 2002-10-04 Paul Eggert <eggert@twinsun.com>
2444
2445 Version 1.50.
2446
2447 * configure.ac (AC_INIT), NEWS: Increment version number.
2448
2449 * doc/bison.texinfo: Minor spelling, grammar, and white space
2450 fixes.
2451 (Symbols): Mention that any negative value returned from yylex
2452 signifies end-of-input. Warn about negative chars. Mention
2453 the portable Standard C character set.
2454
2455 The GNU coding standard says CFLAGS and YFLAGS are reserved
2456 for the installer to set.
2457 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2458 * src/Makefile.am (AM_CFLAGS): Likewise.
2459 (AM_YFLAGS): Renamed from YFLAGS.
2460
2461 Fix some MAX and MIN problems.
2462 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2463 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2464 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2465 * src/reader.c (reader): Use it.
2466
2467 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2468 POSIX 1003.1-2001 has removed fgrep.
2469
2470 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2471
2472 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2473 interpreted as signed.
2474 * lib/ebitset.c (ebitset_list): Fix bug.
2475
2476 2002-10-01 Paul Eggert <eggert@twinsun.com>
2477
2478 More fixes for 64-bit hosts and large bitsets.
2479
2480 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2481 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2482 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2483 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2484 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2485 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2486 bitset_count_): Likewise.
2487 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2488 bitset_first, bitset_last): Likewise.
2489 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2490 bitset_stats_list_reverse, bitset_stats_size,
2491 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2492 Likewise.
2493 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2494 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2495 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2496 bitsetv_reflexive_transitive_closure): Likewise.
2497 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2498 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2499 Likewise.
2500 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2501 Likewise.
2502
2503 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2504 Use size_t, not unsigned int, to count bytes.
2505 * lib/abitset.h (abitset_bytes): Likewise.
2506 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2507 Likewise.
2508 * lib/bitset.h (bitset_bytes): Likewise.
2509 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2510 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2511 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2512 * lib/ebitset.c (ebitset_bytes): Likewise.
2513 * lib/ebitset.h (ebitset_bytes): Likewise.
2514 * lib/lbitset.c (lbitset_bytes): Likewise.
2515 * lib/lbitset.h (lbitset_bytes): Likewise.
2516
2517 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2518 abitset_subset_p, abitset_disjoint_p, abitset_and,
2519 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2520 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2521 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2522 abitset_or_and, abitset_or_and_cmp):
2523 Use bitset_windex instead of unsigned int.
2524 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2525 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2526 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2527 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2528 Likewise.
2529 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2530
2531 * lib/bitset.c (bitset_print):
2532 Use proper printf formats for widths of integer types.
2533 * lib/bitset_stats.c (bitset_percent_histogram_print,
2534 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2535 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2536 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2537 * lib/lbitset.c (lbitset_bytes): Likewise.
2538
2539 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2540 BITSET_SIZE_MAX): New macros.
2541 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2542 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2543 to BITSET_WINDEX_MAX.
2544
2545 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2546 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2547 since we now return the bitset_bindex type (not int).
2548
2549 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2550 when computing sizes.
2551 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2552
2553 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2554 and avoid cast to unsigned.
2555
2556 2002-09-30 Akim Demaille <akim@epita.fr>
2557
2558 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2559 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2560 Updates from Michael Hayes.
2561
2562 2002-09-30 Art Haas <ahaas@neosoft.com>
2563
2564 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2565 invocations.
2566 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2567 defined.
2568
2569 2002-09-27 Akim Demaille <akim@epita.fr>
2570
2571 Version 1.49c.
2572
2573 2002-09-27 Akim Demaille <akim@epita.fr>
2574
2575 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2576 (Because of AC_LIBSOURCE).
2577
2578 2002-09-27 Akim Demaille <akim@epita.fr>
2579
2580 Playing with Autoscan.
2581
2582 * configure.ac: Remove the old LIBOBJ tweaks.
2583 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2584 * lib/strrchr.c: New.
2585 * lib/strtol.c: New, from the Coreutils 4.5.1.
2586
2587 2002-09-27 Akim Demaille <akim@epita.fr>
2588
2589 Playing with Autoscan.
2590
2591 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2592 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2593 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2594 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2595 Coreutils 4.5.1.
2596
2597 2002-09-24 Akim Demaille <akim@epita.fr>
2598
2599 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2600 (Frequently Asked Questions, Parser Stack Overflow): New.
2601
2602 2002-09-13 Akim Demaille <akim@epita.fr>
2603
2604 Playing with autoscan.
2605
2606 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2607 * src/files.c (skeleton_find): Remove, unused.
2608 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2609 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2610
2611 2002-09-13 Akim Demaille <akim@epita.fr>
2612
2613 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2614 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2615
2616 2002-09-13 Akim Demaille <akim@epita.fr>
2617
2618 * configure.ac: Require 2.54.
2619 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2620 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2621 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2622 Remove, provided by Autoconf macros.
2623
2624 2002-09-12 Akim Demaille <akim@epita.fr>
2625
2626 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2627
2628 2002-09-12 Akim Demaille <akim@epita.fr>
2629
2630 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2631 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2632 Reported by Martin Mokrejs.
2633
2634 2002-09-10 Akim Demaille <akim@epita.fr>
2635
2636 * src/parse-gram.y: Associate a human readable string to each
2637 token type.
2638 * tests/regression.at (Invalid inputs): Adjust.
2639
2640 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2641
2642 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2643 with an Autoconf-2.5x style configure.ac.
2644
2645 2002-09-06 Paul Eggert <eggert@twinsun.com>
2646
2647 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2648 exception applies only to yacc.c. This is a modification of a
2649 patch originally suggested by Akim Demaille.
2650
2651 2002-09-06 Akim Demaille <akim@epita.fr>
2652
2653 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2654 here to...
2655 * data/yacc.c: here.
2656
2657 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2658 LocationType.
2659 (b4_ltype): Default to yy::Location from location.hh.
2660
2661 2002-09-04 Jim Meyering <jim@meyering.net>
2662
2663 * data/yacc.c: Guard the declaration of yytoknum also with
2664 `#ifdef YYPRINT', so it is declared only when used.
2665
2666 2002-09-04 Akim Demaille <akim@epita.fr>
2667
2668 * configure.in: Rename as...
2669 * configure.ac: this.
2670 Bump to 1.49c.
2671
2672 2002-09-04 Akim Demaille <akim@epita.fr>
2673
2674 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2675 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2676 translate maintainer only messages.
2677
2678 2002-08-12 Paul Eggert <eggert@twinsun.com>
2679
2680 Version 1.49b.
2681
2682 * Makefile.am (SUBDIRS): Remove intl.
2683 (DISTCLEANFILES): Remove.
2684 * NEWS: Mention that GNU M4 is now required. Clarify what is
2685 meant by "larger grammars". Mention the pt_BR translation.
2686 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2687 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2688 Bump version from 0.11.2 to 0.11.5.
2689 (BISON_PREREQ_STAGE): Remove.
2690 (AM_GNU_GETTEXT): Use external gettext.
2691 (AC_OUTPUT): Remove intl/Makefile.
2692
2693 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2694
2695 * data/glr.c: Include string.h, for strlen.
2696 (yyreportParseError): Use size_t for yysize.
2697 (yy_yypstack): No longer nested inside yypstates, as nested
2698 functions are not portable. Do not assume size_t is the
2699 same width as int.
2700 (yypstates): Do not assume that ptrdiff_t is the same width
2701 as int, and similarly for yyposn and YYINDEX.
2702
2703 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2704
2705 * lib/Makefile.am (INCLUDES): Do not include from the intl
2706 directory, which has been removed.
2707 * src/Makefile.am (INCLUDES): Likewise.
2708
2709 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2710 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2711 New vars.
2712
2713 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2714 * tests/Makefile.am (EXTRA_DIST): Likewise.
2715
2716 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2717 Do not assume that bitset_windex is the same width as unsigned.
2718
2719 * lib/abitset.c (abitset_unused_clear): Do not assume that
2720 bitset_word is the same width as int.
2721 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2722 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2723 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2724 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2725 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2726
2727 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2728 portability to one's complement hosts!).
2729 * lib/ebitset.c (ebitset_op1): Likewise.
2730 * lib/lbitset.c (lbitset_op1): Likewise.
2731
2732 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2733 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2734 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2735 Sync with fileutils.
2736 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2737 lib/gettext.h: Sync with diffutils.
2738
2739 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2740 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2741
2742 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2743 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2744 check for void *.
2745
2746 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2747 size_t; the old version tried to do this but casted improperly.
2748 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2749 (bitset_test): Now returns int, not unsigned long.
2750
2751 * lib/bitset_stats.c: Include "gettext.h".
2752 (_): New macro.
2753 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2754 name locals "index", as it generates unnecessary warnings on some
2755 hosts that have an "index" function.
2756
2757 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2758 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2759 they need translation.
2760 * src/LR0.c (state_list_append, new_itemsets, get_state,
2761 append_states, generate_states): Likewise.
2762 * src/assoc.c (assoc_to_string): Likewise.
2763 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2764 * src/gram.c (grammar_dump): Likewise.
2765 * src/injections.c (injections_compute): Likewise.
2766 * src/lalr.c (lookaheads_print): Likewise.
2767 * src/relation.c (relation_transpose): Likewise.
2768 * src/scan-gram.l: Likewise.
2769 * src/tables.c (table_grow, pack_vector): Likewise.
2770
2771 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2772 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2773 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2774 * m4/mbstate_t.m4: Sync with fileutils.
2775 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2776
2777 * po/LINGUAS: Add pt_BR.
2778 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2779 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2780 lib/timevar.c.
2781 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2782 manual recommends.
2783 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2784
2785 * src/complain.c (strerror_r): Remove decl; not needed.
2786 (strerror): Use same pattern as ../lib/error.c.
2787
2788 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2789
2790 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2791
2792 * src/main.c (main): Cast result of bindtextdomain and textdomain
2793 to void, to avoid a GCC warning when --disable-nls is in effect.
2794
2795 * src/scan-gram.l: Use strings rather than escapes when possible,
2796 to minimize the number of warnings from xgettext.
2797 (handle_action_dollar, handle_action_at): Don't use isdigit,
2798 as it mishandles negative chars and it may not work as expected
2799 outside the C locale.
2800
2801 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2802 this is a GCC extension and is not portable to other compilers.
2803
2804 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2805 Do not include <ctype.h>; no longer needed.
2806 Do not include <malloc.h>; no longer needed (and generates
2807 warnings on OpenBSD 3.0).
2808
2809 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2810 it's not portable.
2811
2812 * tests/regression.at: Do not use 'cc -c input.c -o input';
2813 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2814
2815 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2816 exit status as failure, not just exit status 1. Sun C exits
2817 with status 2 sometimes.
2818
2819 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2820 Use it for the two large tests.
2821
2822 2002-08-02 Akim Demaille <akim@epita.fr>
2823
2824 * src/conflicts.c (conflicts_output): Don't output rules never
2825 reduced here, since anyway that computation doesn't work.
2826 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2827 (rule_useless_p, rule_never_reduced_p): New.
2828 (grammar_rules_partial_print): Use a filter instead of a range.
2829 Display the title only if needed.
2830 (grammar_rules_print): Adjust.
2831 (grammar_rules_never_reduced_report): New.
2832 * src/tables.c (action_row): Move the computation of rules never
2833 reduced to...
2834 (token_actions): here.
2835 * src/main.c (main): Make the parser before making the report, so
2836 that rules never reduced are computed.
2837 Call grammar_rules_never_reduced_report.
2838 * src/print.c (print_results): Report rules never reduced.
2839 * tests/conflicts.at, tests/reduce.at: Adjust.
2840
2841 2002-08-01 Akim Demaille <akim@epita.fr>
2842
2843 Instead of attaching lookaheads and duplicating the rules being
2844 reduced by a state, attach the lookaheads to the reductions.
2845
2846 * src/state.h (state_t): Remove the `lookaheads',
2847 `lookaheads_rule' member.
2848 (reductions_t): Add a `lookaheads' member.
2849 Use a regular array for the `rules'.
2850 * src/state.c (reductions_new): Initialize the lookaheads member
2851 to 0.
2852 (state_rule_lookaheads_print): Adjust.
2853 * src/state.h, src/state.c (state_reductions_find): New.
2854 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2855 (count_rr_conflicts): Adjust.
2856 * src/lalr.c (LArule): Remove.
2857 (add_lookback_edge): Adjust.
2858 (state_lookaheads_count): New.
2859 (states_lookaheads_initialize): Merge into...
2860 (initialize_LA): this.
2861 (lalr_free): Adjust.
2862 * src/main.c (main): Don't free nullable and derives too early: it
2863 is used by --verbose.
2864 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2865
2866 2002-08-01 Akim Demaille <akim@epita.fr>
2867
2868 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
2869 `rule_number_t**'.
2870 (set_derives, free_derives): Rename as...
2871 (derives_compute, derives_free): this.
2872 Adjust all dependencies.
2873 * src/nullable.c (set_nullable, free_nullable): Rename as...
2874 (nullable_compute, nullable_free): these.
2875 (rule_list_t): Store rule_t *, not rule_number_t.
2876 * src/state.c (state_rule_lookaheads_print): Directly compare rule
2877 pointers, instead of their numbers.
2878 * src/main.c (main): Call nullable_free, and derives_free earlier,
2879 as they were lo longer used.
2880
2881 2002-08-01 Akim Demaille <akim@epita.fr>
2882
2883 * lib/timevar.c (get_time): Include children time.
2884 * src/lalr.h (LA, LArule): Don't export them: used with the
2885 state_t.
2886 * src/lalr.c (LA, LArule): Static.
2887 * src/lalr.h, src/lalr.c (lalr_free): New.
2888 * src/main.c (main): Call it.
2889 * src/tables.c (pack_vector): Check whether loc is >= to the
2890 table_size, not >.
2891 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
2892 (tables_generate): do it, since that's also it which allocates
2893 them.
2894 Don't free LA and LArule, main does.
2895
2896 2002-07-31 Akim Demaille <akim@epita.fr>
2897
2898 Separate parser tables computation and output.
2899
2900 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
2901 (conflict_list, conflict_list_cnt, table, check, table_ninf)
2902 (yydefgoto, yydefact, high): Move to...
2903 * src/tables.h, src/tables.c: here.
2904 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2905 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2906 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
2907 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
2908 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
2909 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
2910 (action_row, save_row, token_actions, save_column, default_goto)
2911 (goto_actions, sort_actions, matching_state, pack_vector)
2912 (table_ninf_remap, pack_table, prepare_actions): Move to...
2913 * src/tables.c: here.
2914 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
2915 * src/output.c (token_actions, output_base, output_conflicts)
2916 (output_check): Merge into...
2917 (prepare_actions): this.
2918 (actions_output): Rename as...
2919 (user_actions_output): this.
2920 * src/main.c (main): Call tables_generate and tables_free.
2921
2922 2002-07-31 Akim Demaille <akim@epita.fr>
2923
2924 Steal GCC's --time-report support.
2925
2926 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
2927 stolen/adjusted from GCC.
2928 * m4/stage.m4: Remove time related checks.
2929 * m4/timevar.m4: New.
2930 * configure.in: Adjust.
2931 * src/system.h: Adjust to using timevar.h.
2932 * src/getargs.h, src/getargs.c: Support trace_time for
2933 --trace=time.
2934 * src/main.c (stage): Remove.
2935 (main): Replace `stage' invocations with timevar calls.
2936 * src/output.c: Insert pertinent timevar calls.
2937
2938 2002-07-31 Akim Demaille <akim@epita.fr>
2939
2940 Let --trace have arguments.
2941
2942 * src/getargs.h (enum trace_e): New.
2943 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
2944 (long_options, short_options): --trace/-T takes an optional
2945 argument.
2946 Change all the uses of trace_flag to reflect the new flags.
2947 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
2948
2949 Strengthen `stage' portability.
2950
2951 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
2952 * configure.in: Use it.
2953 Don't check for malloc.h and sys/times.h.
2954 * src/system.h: Include them when appropriate.
2955 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
2956 times and struct tms are available.
2957
2958 2002-07-30 Akim Demaille <akim@epita.fr>
2959
2960 In verbose parse error message, don't report `error' as an
2961 expected token.
2962 * tests/actions.at (Printers and Destructors): Adjust.
2963 * tests/calc.at (Calculator $1): Adjust.
2964 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
2965 error message, do not report the parser accepts the error token in
2966 that state.
2967
2968 2002-07-30 Akim Demaille <akim@epita.fr>
2969
2970 Normalize conflict related messages.
2971
2972 * src/complain.h, src/complain.c (warn, complain): New.
2973 * src/conflicts.c (conflicts_print): Use them.
2974 (conflict_report_yacc): New, extracted from...
2975 (conflicts_print): here.
2976 * tests/conflicts.at, tests/existing.at: Adjust.
2977
2978 2002-07-30 Akim Demaille <akim@epita.fr>
2979
2980 Report rules which are never reduced by the parser: those hidden
2981 by conflicts.
2982
2983 * src/LR0.c (save_reductions): Don't make the final state too
2984 different: save its reduction (accept) instead of having a state
2985 without any action (no shift or goto, no reduce).
2986 Note: the final state is now a ``regular'' state, i.e., the
2987 parsers now contain `reduce 0' as default reduction.
2988 Nevertheless, since they decide to `accept' when yystate =
2989 final_state, they still will not reduce rule 0.
2990 * src/print.c (print_actions, print_reduction): Adjust.
2991 * src/output.c (action_row): Track reduced rules.
2992 (token_actions): Report rules never reduced.
2993 * tests/conflicts.at, tests/regression.at: Adjust.
2994
2995 2002-07-30 Akim Demaille <akim@epita.fr>
2996
2997 `stage' was accidently included in a previous patch.
2998 Initiate its autoconfiscation.
2999
3000 * configure.in: Look for malloc.h and sys/times.h.
3001 * src/main.c (stage): Adjust.
3002 Report only when trace_flag.
3003
3004 2002-07-29 Akim Demaille <akim@epita.fr>
3005
3006 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3007 state_number_t.
3008 (errs_t): symbol_t*, not symbol_number_t.
3009 (reductions_t): rule_t*, not rule_number_t.
3010 (FOR_EACH_SHIFT): New.
3011 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3012 * src/print.c, src/print_graph.c: Adjust.
3013
3014 2002-07-29 Akim Demaille <akim@epita.fr>
3015
3016 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3017
3018 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3019 (endtoken, accept): these.
3020 * src/reader.c (reader): Set endtoken's default tag to "$end".
3021 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3022 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3023 Adjust.
3024
3025 2002-07-29 Akim Demaille <akim@epita.fr>
3026
3027 * src/reduce.c (reduce_grammar): When the language is empty,
3028 complain about the start symbol, not the axiom.
3029 Use its location.
3030 * tests/reduce.at (Empty Language): New.
3031
3032 2002-07-26 Akim Demaille <akim@epita.fr>
3033
3034 * src/reader.h, src/reader.c (gram_error): ... can't get
3035 yycontrol without making too strong assumptions on the parser
3036 itself.
3037 * src/output.c (prepare_tokens): Use the real 0th value of
3038 token_translations instead of `0'.
3039 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3040 visible here.
3041 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3042 for the time being: %locations ought to provide it to yyerror.
3043
3044 2002-07-25 Akim Demaille <akim@epita.fr>
3045
3046 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3047 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3048 * tests/regression.at (Web2c Actions): Adjust.
3049
3050 2002-07-25 Akim Demaille <akim@epita.fr>
3051
3052 Stop storing rules from 1 to nrules + 1.
3053
3054 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3055 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3056 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3057 Iterate from 0 to nrules.
3058 Use rule_number_as_item_number and item_number_as_rule_number.
3059 Adjust to `derive' now containing possibly 0.
3060 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3061 Handle the `- 1' part in rule numbers from/to item numbers.
3062 * src/conflicts.c (log_resolution): Fix the message which reversed
3063 shift and reduce.
3064 * src/output.c (action_row): Initialize default_rule to -1.
3065 (token_actions): Adjust.
3066 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3067 expected output.
3068 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3069
3070 2002-07-25 Akim Demaille <akim@epita.fr>
3071
3072 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3073 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3074 (b4_c_knr_arg_decl): New.
3075 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3076 yyreport_parse_error.
3077
3078 2002-07-25 Akim Demaille <akim@epita.fr>
3079
3080 * data/yacc.c (yyreport_parse_error): New, extracted from...
3081 (yyparse): here.
3082 (yydestruct, yysymprint): Move above yyparse.
3083 Be K&R compliant.
3084
3085 2002-07-25 Akim Demaille <akim@epita.fr>
3086
3087 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3088 replace...
3089 (b4_sint_type, b4_uint_type): these.
3090 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3091 * tests/regression.at (Web2c Actions): Adjust.
3092
3093 2002-07-25 Akim Demaille <akim@epita.fr>
3094
3095 * src/gram.h (TIEM_NUMBER_MAX): New.
3096 (item_number_of_rule_number, rule_number_of_item_number): Rename
3097 as...
3098 (rule_number_as_item_number, item_number_as_rule_number): these.
3099 Adjust dependencies.
3100 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3101 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3102 (symbol_number_to_vector_number): New.
3103 (order): Of vector_number_t* type.
3104 (base_t, BASE_MAX, BASE_MIN): New.
3105 (froms, tos, width, pos, check): Of base_t type.
3106 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3107 (actrow): Of action_number_t type.
3108 (conflrow): Of unsigned int type.
3109 (table_ninf, base_ninf): New.
3110 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3111 (muscle_insert_int_table, muscle_insert_base_table)
3112 (muscle_insert_rule_number_table): New.
3113 (prepare_tokens): Output `toknum' as int_table.
3114 (action_row): Returns a rule_number_t.
3115 Use ACTION_MIN, not SHRT_MIN.
3116 (token_actions): yydefact is rule_number_t*.
3117 (table_ninf_remap): New.
3118 (pack_table): Use it for `base' and `table'.
3119 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3120 replaced with...
3121 (YYPACT_NINF, YYTABLE_NINF): these.
3122 (yypact, yytable): Compute their types instead of hard-coded
3123 `short'.
3124 * tests/regression.at (Web2c Actions): Adjust.
3125
3126 2002-07-19 Akim Demaille <akim@epita.fr>
3127
3128 * src/scan-gram.l (id): Can start with an underscore.
3129
3130 2002-07-16 Akim Demaille <akim@epita.fr>
3131
3132 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3133 Adjust all former `associativity' dependencies.
3134 * src/symtab.c (symbol_new): Default associativity is `undef', not
3135 `right'.
3136 (symbol_check_alias_consistence): Adjust.
3137
3138 2002-07-09 Akim Demaille <akim@epita.fr>
3139
3140 * doc/bison.texinfo: Properly set the ``header'' part.
3141 Use @dircategory ``GNU programming tools'' as per Texinfo's
3142 documentation.
3143 Use @copying.
3144
3145 2002-07-09 Akim Demaille <akim@epita.fr>
3146
3147 * lib/quotearg.h: Protect against multiple inclusions.
3148 * src/location.h (location_t): Add a `file' member.
3149 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3150 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3151 `error_one_per_line' support.
3152
3153 2002-07-09 Akim Demaille <akim@epita.fr>
3154
3155 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3156 * src/reader.c (lineno): Remove.
3157 Adjust all dependencies.
3158 (get_merge_function): Take a location and use complain_at.
3159 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3160 * tests/regression.at (Invalid inputs, Mixing %token styles):
3161 Adjust.
3162
3163 2002-07-09 Akim Demaille <akim@epita.fr>
3164
3165 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3166 recovery rule, and forbid extensions when --yacc.
3167 (gram_error): Use complain_at.
3168 * src/reader.c (reader): Exit if there were parse errors.
3169
3170 2002-07-09 Akim Demaille <akim@epita.fr>
3171
3172 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3173 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3174 Reported by R Blake <blakers@mac.com>.
3175
3176 2002-07-09 Akim Demaille <akim@epita.fr>
3177
3178 * data/yacc.c: Output the copyright notive in the header.
3179
3180 2002-07-03 Akim Demaille <akim@epita.fr>
3181
3182 * src/output.c (froms, tos): Are state_number_t.
3183 (save_column): sp, sp1, and sp2 are state_number_t.
3184 (prepare): Rename `final' as `final_state_number', `nnts' as
3185 `nterms_number', `nrules' as `rules_number', `nstates' as
3186 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3187 unused.
3188 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3189 * data/lalr1.cc (nsym_): Remove, unused.
3190
3191 2002-07-03 Akim Demaille <akim@epita.fr>
3192
3193 * src/lalr.h, src/lalr.c (goto_number_t): New.
3194 * src/lalr.c (goto_list_t): New.
3195 Propagate them.
3196 * src/nullable.c (rule_list_t): New.
3197 Propagate.
3198 * src/types.h: Remove.
3199
3200 2002-07-03 Akim Demaille <akim@epita.fr>
3201
3202 * src/closure.c (print_fderives): Use rule_rhs_print.
3203 * src/derives.c (print_derives): Use rule_rhs_print.
3204 (rule_list_t): New, replaces `shorts'.
3205 (set_derives): Add comments.
3206 * tests/sets.at (Nullable, Firsts): Adjust.
3207
3208 2002-07-03 Akim Demaille <akim@epita.fr>
3209
3210 * src/output.c (prepare_actions): Free `tally' and `width'.
3211 (prepare_actions): Allocate and free `order'.
3212 * src/symtab.c (symbols_free): Free `symbols'.
3213 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3214 * src/output.c (m4_invoke): Move to...
3215 * src/scan-skel.l: here.
3216 (<<EOF>>): Close yyout, and free its name.
3217
3218 2002-07-03 Akim Demaille <akim@epita.fr>
3219
3220 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3221
3222 * src/LR0.c (new_state): Merge into...
3223 (state_list_append): this.
3224 (new_states): Merge into...
3225 (generate_states): here.
3226 (set_states): Don't ensure a proper `errs' state member here, do it...
3227 * src/conflicts.c (conflicts_solve): here.
3228 * src/state.h, src/state.c: Comment changes.
3229 (state_t): Rename member `shifts' as `transitions'.
3230 Adjust all dependencies.
3231 (errs_new): For consistency, also take the values as argument.
3232 (errs_dup): Remove.
3233 (state_errs_set): New.
3234 (state_reductions_set, state_transitions_set): Assert that no
3235 previous value was assigned.
3236 (state_free): New.
3237 (states_free): Use it.
3238 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3239 temporary storage: use `errs' and `nerrs' as elsewhere.
3240 (set_conflicts): Allocate and free this `errs'.
3241
3242 2002-07-02 Akim Demaille <akim@epita.fr>
3243
3244 * lib/libiberty.h: New.
3245 * lib: Update the bitset implementation from upstream.
3246 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3247 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3248 * src/main.c: Adjust bitset stats calls.
3249
3250 2002-07-01 Paul Eggert <eggert@twinsun.com>
3251
3252 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3253 char, so that negative chars don't collide with $.
3254
3255 2002-06-30 Akim Demaille <akim@epita.fr>
3256
3257 Have the GLR tests be `warning' checked, and fix the warnings.
3258
3259 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3260 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3261 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3262 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3263 (yyaddDeferredAction): static.
3264 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3265 (yyreportParseError): yyprefix is const.
3266 yytokenp is used only when verbose.
3267 (yy__GNUC__): Replace with __GNUC__.
3268 (yypdumpstack): yyi is size_t.
3269 (yypreference): Un-yy local variables and arguments, to avoid
3270 clashes with `yyr1'. Anyway, we are not in the user name space.
3271 (yytname_size): be an int, as is compared with ints.
3272 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3273 Use them.
3274 * tests/cxx-gram.at: Use quotation to protect $1.
3275 Use AT_COMPILE to enable warnings hunts.
3276 Prototype yylex and yyerror.
3277 `Use' argc.
3278 Include `string.h', not `strings.h'.
3279 Produce and prototype stmtMerge only when used.
3280 yylex takes a location.
3281
3282 2002-06-30 Akim Demaille <akim@epita.fr>
3283
3284 We spend a lot of time in quotearg, in particular when --verbose.
3285
3286 * src/symtab.c (symbol_get): Store a quoted version of the key.
3287 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3288 Adjust all callers.
3289
3290 2002-06-30 Akim Demaille <akim@epita.fr>
3291
3292 * src/state.h (reductions_t): Rename member `nreds' as num.
3293 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3294 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3295
3296 2002-06-30 Akim Demaille <akim@epita.fr>
3297
3298 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3299 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3300 (shifts_to): Rename as...
3301 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3302 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3303 (TRANSITION_IS_DISABLED, transitions_to): these.
3304
3305 2002-06-30 Akim Demaille <akim@epita.fr>
3306
3307 * src/print.c (print_shifts, print_gotos): Merge into...
3308 (print_transitions): this.
3309 (print_transitions, print_errs, print_reductions): Align the
3310 lookaheads columns.
3311 (print_core, print_transitions, print_errs, print_state,
3312 print_grammar): Output empty lines separator before, not after.
3313 (state_default_rule_compute): Rename as...
3314 (state_default_rule): this.
3315 * tests/conflicts.at (Defaulted Conflicted Reduction),
3316 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3317 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3318
3319 2002-06-30 Akim Demaille <akim@epita.fr>
3320
3321 Display items as we display rules.
3322
3323 * src/gram.h, src/gram.c (rule_lhs_print): New.
3324 * src/gram.c (grammar_rules_partial_print): Use it.
3325 * src/print.c (print_core): Likewise.
3326 * tests/conflicts.at (Defaulted Conflicted Reduction),
3327 (Unresolved SR Conflicts): Adjust.
3328 (Unresolved SR Conflicts): Adjust and rename as...
3329 (Resolved SR Conflicts): this, as was meant.
3330 * tests/regression.at (Web2c Report): Adjust.
3331
3332 2002-06-30 Akim Demaille <akim@epita.fr>
3333
3334 * src/print.c (state_default_rule_compute): New, extracted from...
3335 (print_reductions): here.
3336 Pessimize, but clarify the code.
3337 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3338
3339 2002-06-30 Akim Demaille <akim@epita.fr>
3340
3341 * src/output.c (action_row): Let default_rule be always a rule
3342 number.
3343
3344 2002-06-30 Akim Demaille <akim@epita.fr>
3345
3346 * src/closure.c (print_firsts, print_fderives, closure):
3347 Use BITSET_EXECUTE.
3348 * src/lalr.c (lookaheads_print): Likewise.
3349 * src/state.c (state_rule_lookaheads_print): Likewise.
3350 * src/print_graph.c (print_core): Likewise.
3351 * src/print.c (print_reductions): Likewise.
3352 * src/output.c (action_row): Likewise.
3353 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3354
3355 2002-06-30 Akim Demaille <akim@epita.fr>
3356
3357 * src/print_graph.c: Use report_flag.
3358
3359 2002-06-30 Akim Demaille <akim@epita.fr>
3360
3361 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3362 to...
3363 * src/relation.h, src/relation.c (traverse, relation_digraph)
3364 (relation_print, relation_transpose): New.
3365
3366 2002-06-30 Akim Demaille <akim@epita.fr>
3367
3368 * src/state.h, src/state.c (shifts_to): New.
3369 * src/lalr.c (build_relations): Use it.
3370
3371 2002-06-30 Akim Demaille <akim@epita.fr>
3372
3373 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3374 (item_number_of_rule_number, rule_number_of_item_number): New.
3375 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3376 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3377 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3378 Propagate their use.
3379 Much remains to be done, in particular wrt `shorts' from types.h.
3380
3381 2002-06-30 Akim Demaille <akim@epita.fr>
3382
3383 * src/symtab.c (symbol_new): Initialize the `printer' member.
3384
3385 2002-06-30 Akim Demaille <akim@epita.fr>
3386
3387 * src/LR0.c (save_reductions): Remove, replaced by...
3388 * src/state.h, src/state.c (state_reductions_set): New.
3389 (reductions, errs): Rename as...
3390 (reductions_t, errs_t): these.
3391 Adjust all dependencies.
3392
3393 2002-06-30 Akim Demaille <akim@epita.fr>
3394
3395 * src/LR0.c (state_list_t, state_list_append): New.
3396 (first_state, last_state): Now symbol_list_t.
3397 (this_state): Remove.
3398 (new_itemsets, append_states, save_reductions): Take a state_t as
3399 argument.
3400 (set_states, generate_states): Adjust.
3401 (save_shifts): Remove, replaced by...
3402 * src/state.h, src/state.c (state_shifts_set): New.
3403 (shifts): Rename as...
3404 (shifts_t): this.
3405 Adjust all dependencies.
3406 * src/state.h (state_t): Remove the `next' member.
3407
3408 2002-06-30 Akim Demaille <akim@epita.fr>
3409
3410 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3411 escaped in slot 0.
3412
3413 2002-06-30 Akim Demaille <akim@epita.fr>
3414
3415 Use hash.h for the state hash table.
3416
3417 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3418 (allocate_storage): Use state_hash_new.
3419 (free_storage): Use state_hash_free.
3420 (new_state, get_state): Adjust.
3421 * src/lalr.h, src/lalr.c (states): Move to...
3422 * src/states.h (state_t): Remove the `link' member, no longer
3423 used.
3424 * src/states.h, src/states.c: here.
3425 (state_hash_new, state_hash_free, state_hash_lookup)
3426 (state_hash_insert, states_free): New.
3427 * src/states.c (state_table, state_compare, state_hash): New.
3428 * src/output.c (output_actions): Do not free states now, since we
3429 still need to know the final_state number in `prepare', called
3430 afterwards. Do it...
3431 * src/main.c (main): here: call states_free after `output'.
3432
3433 2002-06-30 Akim Demaille <akim@epita.fr>
3434
3435 * src/state.h, src/state.c (state_new): New, extracted from...
3436 * src/LR0.c (new_state): here.
3437 * src/state.h (STATE_ALLOC): Move to...
3438 * src/state.c: here.
3439 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3440 * src/state.h, src/state.c: here.
3441
3442 2002-06-30 Akim Demaille <akim@epita.fr>
3443
3444 * src/reader.c (gensym): Rename as...
3445 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3446 (getsym): Rename as...
3447 (symbol_get): this.
3448
3449 2002-06-30 Akim Demaille <akim@epita.fr>
3450
3451 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3452 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3453 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3454 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3455
3456 2002-06-30 Akim Demaille <akim@epita.fr>
3457
3458 Make the test suite pass with warnings checked.
3459
3460 * tests/actions.at (Printers and Destructors): Improve.
3461 Avoid unsigned vs. signed issues.
3462 * tests/calc.at: Don't exercise the scanner here, do it...
3463 * tests/input.at (Torturing the Scanner): here.
3464
3465 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3466
3467 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3468 reorganize first lines parallel to yacc.c.
3469
3470 2002-06-28 Akim Demaille <akim@epita.fr>
3471
3472 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3473 (b4_token_enum, b4_token_defines): New, factored from...
3474 * data/lalr1.cc, data/yacc.c, glr.c: here.
3475
3476 2002-06-28 Akim Demaille <akim@epita.fr>
3477
3478 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3479 unused variables.
3480 * src/output.c (merger_output): static.
3481
3482 2002-06-28 Akim Demaille <akim@epita.fr>
3483
3484 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3485 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3486 pacify GCC.
3487 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3488
3489 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3490
3491 Accumulated changelog for new GLR parsing features.
3492
3493 * src/conflicts.c (count_total_conflicts): Change name to
3494 conflicts_total_count.
3495 * src/conflicts.h: Ditto.
3496 * src/output.c (token_actions): Use the new name.
3497 (output_conflicts): Change conflp => conflict_list_heads, and
3498 confl => conflict_list for better readability.
3499 * data/glr.c: Use the new names.
3500 * NEWS: Add self to GLR announcement.
3501
3502 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3503
3504 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3505 Akim Demaille.
3506
3507 * data/bison.glr: Change name to glr.c
3508 * data/glr.c: Renamed from bison.glr.
3509 * data/Makefile.am: Add glr.c
3510
3511 * src/getargs.c:
3512
3513 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3514 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3515
3516 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3517
3518 * data/bison.glr: Be sure to restore the
3519 current #line when returning to the skeleton contents after having
3520 exposed the input file's #line.
3521
3522 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3523
3524 * data/bison.glr: Bring up to date with changes to bison.simple.
3525
3526 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3527
3528 * data/bison.glr: Correct definitions that use b4_prefix.
3529 Various reformatting.
3530 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3531 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3532 yytokenp argument; now part of stack.
3533 (yychar): Define to behave as documented.
3534 (yyclearin): Ditto.
3535
3536 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3537
3538 * src/reader.h: Add declaration for free_merger_functions.
3539
3540 * src/reader.c (merge_functions): New variable.
3541 (get_merge_function): New function.
3542 (free_merger_functions): New function.
3543 (readgram): Check for %prec that is not followed by a symbol.
3544 Handle %dprec and %merge declarations.
3545 (packgram): Initialize dprec and merger fields in rules array.
3546
3547 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3548 conflict_list_cnt, conflict_list_free): New variables.
3549 (table_grow): Also grow conflict_table.
3550 (prepare_rules): Output dprec and merger tables.
3551 (conflict_row): New function.
3552 (action_row): Output conflict lists for GLR parser. Don't use
3553 default reduction in conflicted states for GLR parser so that there
3554 are spaces for the conflict lists.
3555 (save_row): Also save conflict information.
3556 (token_actions): Allocate conflict list.
3557 (merger_output): New function.
3558 (pack_vector): Pack conflict table, too.
3559 (output_conflicts): New function to output yyconflp and yyconfl.
3560 (output_check): Allocate conflict_tos.
3561 (output_actions): Output conflict tables, also.
3562 (output_skeleton): Output b4_mergers definition.
3563 (prepare): Output b4_max_rhs_length definition.
3564 Use 'bison.glr' as default skeleton for GLR parsers.
3565
3566 * src/gram.c (glr_parser): New flag.
3567 (grammar_free): Call free_merger_functions.
3568
3569 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3570 all pairs of conflicting reductions, rather than just all tokens
3571 causing conflicts. Needed to size conflict tables.
3572 (conflicts_output): Modify call to count_rr_conflicts for new
3573 interface.
3574 (conflicts_print): Ditto.
3575 (count_total_conflicts): New function.
3576
3577 * src/reader.h (merger_list): New type.
3578 (merge_functions): New variable.
3579
3580 * src/lex.h (tok_dprec, tok_merge): New token types.
3581
3582 * src/gram.h (rule_s): Add dprec and merger fields.
3583 (glr_parser): New flag.
3584
3585 * src/conflicts.h (count_total_conflicts): New function.
3586
3587 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3588
3589 * doc/bison.texinfo (Generalized LR Parsing): New section.
3590 (GLR Parsers): New section.
3591 (Language and Grammar): Mention GLR parsing.
3592 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3593 Correct typo ("tge" -> "the").
3594
3595 * data/bison.glr: New skeleton for GLR parsing.
3596
3597 * tests/cxx-gram.at: New tests for GLR parsing.
3598
3599 * tests/testsuite.at: Include cxx-gram.at.
3600
3601 * tests/Makefile.am: Add cxx-gram.at.
3602
3603 * src/parse-gram.y:
3604
3605 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3606
3607 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3608
3609 2002-06-27 Akim Demaille <akim@epita.fr>
3610
3611 * src/options.h, src/options.c: Remove.
3612 * src/getargs.c (short_options, long_options): New.
3613
3614 2002-06-27 Akim Demaille <akim@epita.fr>
3615
3616 * data/bison.simple, data/bison.c++: Rename as...
3617 * data/yacc.c, data/lalr1.cc: these.
3618 * doc/bison.texinfo (Environment Variables): Remove.
3619
3620 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3621
3622 * src/getargs.c (report_argmatch): Initialize strtok().
3623
3624 2002-06-20 Akim Demaille <akim@epita.fr>
3625
3626 * data/bison.simple (b4_symbol_actions): New, replaces...
3627 (b4_symbol_destructor, b4_symbol_printer): these.
3628 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3629 user token numbers.
3630
3631 2002-06-20 Akim Demaille <akim@epita.fr>
3632
3633 * data/bison.simple (yydestructor): Rename as...
3634 (yydestruct): this.
3635
3636 2002-06-20 Akim Demaille <akim@epita.fr>
3637
3638 * src/symtab.h, src/symtab.c (symbol_type_set)
3639 (symbol_destructor_set, symbol_precedence_set): The location is
3640 the last argument.
3641 Adjust all callers.
3642
3643 2002-06-20 Akim Demaille <akim@epita.fr>
3644
3645 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3646 internals.
3647 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3648 Takes a location.
3649 * src/symtab.h, src/symtab.c (symbol_class_set)
3650 (symbol_user_token_number_set): Likewise.
3651 Adjust all callers.
3652 Promote complain_at.
3653 * tests/input.at (Type Clashes): Adjust.
3654
3655 2002-06-20 Akim Demaille <akim@epita.fr>
3656
3657 * data/bison.simple (YYLEX): Fix the declaration when
3658 %pure-parser.
3659
3660 2002-06-20 Akim Demaille <akim@epita.fr>
3661
3662 * data/bison.simple (yysymprint): Don't print the token number,
3663 just its name.
3664 * tests/actions.at (Destructors): Rename as...
3665 (Printers and Destructors): this.
3666 Also exercise %printer.
3667
3668 2002-06-20 Akim Demaille <akim@epita.fr>
3669
3670 * data/bison.simple (YYDSYMPRINT): New.
3671 Use it to remove many of the #if YYDEBUG/if (yydebug).
3672
3673 2002-06-20 Akim Demaille <akim@epita.fr>
3674
3675 * src/symtab.h, src/symtab.c (symbol_t): printer and
3676 printer_location are new members.
3677 (symbol_printer_set): New.
3678 * src/parse-gram.y (PERCENT_PRINTER): New token.
3679 Handle its associated rule.
3680 * src/scan-gram.l: Adjust.
3681 (handle_destructor_at, handle_destructor_dollar): Rename as...
3682 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3683 * src/output.c (symbol_printers_output): New.
3684 (output_skeleton): Call it.
3685 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3686 since there are already many grammar files with a user `yyprint'.
3687 Replace the calls to YYPRINT to calls to yysymprint.
3688 * tests/calc.at: Adjust.
3689 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3690 taking advantage of parser very internal details (stack size!).
3691
3692 2002-06-20 Akim Demaille <akim@epita.fr>
3693
3694 * src/scan-gram.l: Complete the scanner with the missing patterns
3695 to pacify Flex.
3696 Use `quote' and `symbol_tag_get' where appropriate.
3697
3698 2002-06-19 Akim Demaille <akim@epita.fr>
3699
3700 * tests/actions.at (Destructors): Augment to test locations.
3701 * data/bison.simple (yydestructor): Pass it the current location
3702 if locations are enabled.
3703 Prototype only when __STDC__ or C++.
3704 Change the argument names to move into the yy name space: there is
3705 user code here.
3706
3707 2002-06-19 Akim Demaille <akim@epita.fr>
3708
3709 * data/bison.simple (b4_pure_if): New.
3710 Use it instead of #ifdef YYPURE.
3711
3712 2002-06-19 Akim Demaille <akim@epita.fr>
3713
3714 * data/bison.simple (b4_location_if): New.
3715 Use it instead of #ifdef YYLSP_NEEDED.
3716
3717 2002-06-19 Akim Demaille <akim@epita.fr>
3718
3719 Prepare @$ in %destructor, but currently don't bind it in the
3720 skeleton, as %location use is not cleaned up yet.
3721
3722 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3723 (handle_action_at): New.
3724 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3725 a braced_code_t and a location as additional arguments.
3726 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3727 unquote one when outputting `b4_dollar_dollar'.
3728 Adjust callers.
3729 * data/bison.simple (b4_eval): Remove.
3730 (b4_symbol_destructor): Adjust.
3731 * tests/input.at (Invalid @n): Adjust.
3732
3733 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3734
3735 * doc/bison.texinfo: Document ability to have multiple
3736 prologue sections.
3737
3738 2002-06-18 Akim Demaille <akim@epita.fr>
3739
3740 * src/files.c (compute_base_names): When computing the output file
3741 names from the input file name, strip the directory part.
3742
3743 2002-06-18 Akim Demaille <akim@epita.fr>
3744
3745 * data/bison.simple.new: Comment changes.
3746 Reported by Andreas Schwab.
3747
3748 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3749
3750 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3751 there are no `label `yyoverflowlab' defined but not used' warnings
3752 when yyoverflow is defined.
3753
3754 2002-06-18 Akim Demaille <akim@epita.fr>
3755
3756 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3757 new member.
3758 (symbol_destructor_set): Adjust.
3759 * src/output.c (symbol_destructors_output): Output the destructor
3760 locations.
3761 Output the symbol name.
3762 * data/bison.simple (b4_symbol_destructor): Adjust.
3763
3764 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3765 and Akim Demaille <akim@epita.fr>
3766
3767 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3768 what's left on the stack when the error recovery hits EOF.
3769 * tests/actions.at (Destructors): Complete to exercise this case.
3770
3771 2002-06-17 Akim Demaille <akim@epita.fr>
3772
3773 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3774 arguments is really empty, not only equal to `[]'.
3775 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3776 member.
3777 (symbol_destructor_set): New.
3778 * src/output.c (symbol_destructors_output): New.
3779 * src/reader.h (brace_code_t, current_braced_code): New.
3780 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3781 (handle_dollar): Rename as...
3782 (handle_action_dollar): this.
3783 (handle_destructor_dollar): New.
3784 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3785 (grammar_declaration): Use it.
3786 * data/bison.simple (yystos): Is always defined.
3787 (yydestructor): New.
3788 * tests/actions.at (Destructors): New.
3789 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3790
3791 2002-06-17 Akim Demaille <akim@epita.fr>
3792
3793 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3794 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3795 rule_length only when needed.
3796 * src/output.c (actions_output, token_definitions_output): Output
3797 the full M4 block.
3798 * src/symtab.c: Don't access directly to the symbol tag, use
3799 symbol_tag_get.
3800 * src/parse-gram.y: Use symbol_list_free.
3801
3802 2002-06-17 Akim Demaille <akim@epita.fr>
3803
3804 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3805 (symbol_list_prepend, get_type_name): Move to...
3806 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3807 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3808 Adjust all callers.
3809 (symbol_list_free): New.
3810 * src/scan-gram.l (handle_dollar): Takes a location.
3811 * tests/input.at (Invalid $n): Adjust.
3812
3813 2002-06-17 Akim Demaille <akim@epita.fr>
3814
3815 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3816 (symbol_list_prepend): New.
3817 * src/parse-gram.y (%union): `list' is a new member.
3818 (symbols.1): New, replaces...
3819 (terms_to_prec.1, nterms_to_type.1): these.
3820 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3821 Take a location as additional argument.
3822 Adjust all callers.
3823
3824 2002-06-15 Akim Demaille <akim@epita.fr>
3825
3826 * src/parse-gram.y: Move %token in the declaration section so that
3827 we don't depend upon CVS Bison.
3828
3829 2002-06-15 Akim Demaille <akim@epita.fr>
3830
3831 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3832 * src/print.c (print_core): Use it.
3833
3834 2002-06-15 Akim Demaille <akim@epita.fr>
3835
3836 * src/conflicts.c (log_resolution): Accept the rule involved in
3837 the sr conflicts instead of the lookahead number that points to
3838 that rule.
3839 (flush_reduce): Accept the current lookahead vector as argument,
3840 instead of the index in LA.
3841 (resolve_sr_conflict): Accept the current number of lookahead
3842 bitset to consider for the STATE, instead of the index in LA.
3843 (set_conflicts): Adjust.
3844 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3845
3846 2002-06-15 Akim Demaille <akim@epita.fr>
3847
3848 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3849 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3850 Adjust all dependencies.
3851 * src/lalr.c (initialize_lookaheads): Split into...
3852 (states_lookaheads_count, states_lookaheads_initialize): these.
3853 (lalr): Adjust.
3854
3855 2002-06-15 Akim Demaille <akim@epita.fr>
3856
3857 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3858 out of...
3859 (grammar_rules_print): here.
3860 * src/reduce.c (reduce_output): Use it.
3861 * tests/reduce.at (Useless Rules, Reduced Automaton)
3862 (Underivable Rules): Adjust.
3863
3864 2002-06-15 Akim Demaille <akim@epita.fr>
3865
3866 Copy BYacc's nice way to report the grammar.
3867
3868 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
3869 New.
3870 Don't print the rules' location, it is confusing and useless.
3871 (rule_print): Use grammar_rhs_print.
3872 * src/print.c (print_grammar): Use grammar_rules_print.
3873
3874 2002-06-15 Akim Demaille <akim@epita.fr>
3875
3876 Complete and rationalize `useless thing' warnings.
3877
3878 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
3879 (symbol_tag_print): New.
3880 Use them everywhere in place of accessing directly the tag member.
3881 * src/gram.h, src/gram.c (rule_print): New.
3882 Use it where a rule used to be printed `by hand'.
3883 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
3884 (reduce_grammar_tables): Report the useless rules.
3885 (reduce_print): Useless things are a warning, not an error.
3886 Report it as such.
3887 * tests/reduce.at (Useless Nonterminals, Useless Rules):
3888 (Reduced Automaton, Underivable Rules): Adjust.
3889 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
3890 * tests/conflicts.at (Unresolved SR Conflicts)
3891 (Solved SR Conflicts): Adjust.
3892
3893 2002-06-15 Akim Demaille <akim@epita.fr>
3894
3895 Let symbols have a location.
3896
3897 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
3898 (getsym): Adjust.
3899 Adjust all callers.
3900 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
3901 Use location_t, not int.
3902 * src/symtab.c (symbol_check_defined): Take advantage of the
3903 location.
3904 * tests/regression.at (Invalid inputs): Adjust.
3905
3906 2002-06-15 Akim Demaille <akim@epita.fr>
3907
3908 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
3909 (input): Don't try to initialize yylloc here, do it in the
3910 scanner.
3911 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
3912 * src/gram.h (rule_t): Change line and action_line into location
3913 and action_location, of location_t type.
3914 Adjust all dependencies.
3915 * src/location.h, src/location.c (empty_location): New.
3916 * src/reader.h, src/reader.c (grammar_start_symbol_set)
3917 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
3918 (grammar_current_rule_symbol_append)
3919 (grammar_current_rule_action_append): Expect a location as argument.
3920 * src/reader.c (grammar_midrule_action): Adjust to attach an
3921 action's location as dummy symbol location.
3922 * src/symtab.h, src/symtab.c (startsymbol_location): New.
3923 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
3924 the line numbers.
3925
3926 2002-06-14 Akim Demaille <akim@epita.fr>
3927
3928 Grammar declarations may be found in the grammar section.
3929
3930 * src/parse-gram.y (rules_or_grammar_declaration): New.
3931 (declarations): Each declaration may end with a semicolon, not
3932 just...
3933 (grammar_declaration): `"%union"'.
3934 (grammar): Branch to rules_or_grammar_declaration.
3935
3936 2002-06-14 Akim Demaille <akim@epita.fr>
3937
3938 * src/main.c (main): Invoke scanner_free.
3939
3940 2002-06-14 Akim Demaille <akim@epita.fr>
3941
3942 * src/output.c (m4_invoke): Extracted from...
3943 (output_skeleton): here.
3944 Free tempfile.
3945
3946 2002-06-14 Akim Demaille <akim@epita.fr>
3947
3948 * src/parse-gram.y (directives, directive, gram)
3949 (grammar_directives, precedence_directives, precedence_directive):
3950 Rename as...
3951 (declarations, declaration, grammar, grammar_declaration)
3952 (precedence_declaration, precedence_declarator): these.
3953 (symbol_declaration): New.
3954
3955 2002-06-14 Akim Demaille <akim@epita.fr>
3956
3957 * src/files.c (action_obstack): Remove, unused.
3958 (output_obstack): Remove it, and all its dependencies, as it is no
3959 longer needed.
3960 * src/reader.c (epilogue_set): Build the epilogue in the
3961 muscle_obstack.
3962 * src/output.h, src/output.c (muscle_obstack): Move to...
3963 * src/muscle_tab.h, src/muscle_tab.h: here.
3964 (muscle_init): Initialize muscle_obstack.
3965 (muscle_free): New.
3966 * src/main.c (main): Call it.
3967
3968 2002-06-14 Akim Demaille <akim@epita.fr>
3969
3970 * src/location.h: New, extracted from...
3971 * src/reader.h: here.
3972 * src/Makefile.am (noinst_HEADERS): Merge into
3973 (bison_SOURCES): this.
3974 Add location.h.
3975 * src/parse-gram.y: Use location_t instead of Bison's.
3976 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
3977 Use location_t instead of ints.
3978
3979 2002-06-14 Akim Demaille <akim@epita.fr>
3980
3981 * data/bison.simple, data/bison.c++: Be sure to restore the
3982 current #line when returning to the skeleton contents after having
3983 exposed the input file's #line.
3984
3985 2002-06-12 Akim Demaille <akim@epita.fr>
3986
3987 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
3988 eager.
3989 * tests/actions.at (Exotic Dollars): New.
3990
3991 2002-06-12 Akim Demaille <akim@epita.fr>
3992
3993 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
3994 ['"/] too eagerly.
3995 * tests/input.at (Torturing the Scanner): New.
3996
3997 2002-06-11 Akim Demaille <akim@epita.fr>
3998
3999 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4000 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4001 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4002 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4003 * src/reader.c (reader): Use it.
4004
4005 2002-06-11 Akim Demaille <akim@epita.fr>
4006
4007 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4008 Adjust all callers.
4009 (scanner_last_string_free): New.
4010
4011 2002-06-11 Akim Demaille <akim@epita.fr>
4012
4013 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4014 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4015 (last_string, YY_OBS_FREE): New.
4016 Use them when returning an ID.
4017
4018 2002-06-11 Akim Demaille <akim@epita.fr>
4019
4020 Have Bison grammars parsed by a Bison grammar.
4021
4022 * src/reader.c, src/reader.h (prologue_augment): New.
4023 * src/reader.c (copy_definition): Remove.
4024
4025 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4026 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4027 (grammar_current_rule_prec_set, grammar_current_rule_check)
4028 (grammar_current_rule_symbol_append)
4029 (grammar_current_rule_action_append): Export.
4030 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4031 (symbol_list_action_append): Remove.
4032 Hook the routines from reader.
4033 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4034 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4035
4036 * src/reader.c (read_declarations): Remove, unused.
4037
4038 * src/parse-gram.y: Handle the epilogue.
4039 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4040 (grammar_start_symbol_set): this.
4041 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4042 * src/reader.c (readgram): Remove, unused.
4043 (reader): Adjust to insert eoftoken and axiom where appropriate.
4044
4045 * src/reader.c (copy_dollar): Replace with...
4046 * src/scan-gram.h (handle_dollar): this.
4047 * src/parse-gram.y: Remove `%thong'.
4048
4049 * src/reader.c (copy_at): Replace with...
4050 * src/scan-gram.h (handle_at): this.
4051
4052 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4053 New.
4054
4055 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4056 time being.
4057
4058 * src/reader.h, src/reader.c (grammar_rule_end): New.
4059
4060 * src/parse.y (current_type, current_class): New.
4061 Implement `%nterm', `%token' support.
4062 Merge `%term' into `%token'.
4063 (string_as_id): New.
4064 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4065 type name.
4066
4067 * src/parse-gram.y: Be sure to handle properly the beginning of
4068 rules.
4069
4070 * src/parse-gram.y: Handle %type.
4071 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4072
4073 * src/parse-gram.y: More directives support.
4074 * src/options.c: No longer handle source directives.
4075
4076 * src/parse-gram.y: Fix %output.
4077
4078 * src/parse-gram.y: Handle %union.
4079 Use the prologue locations.
4080 * src/reader.c (parse_union_decl): Remove.
4081
4082 * src/reader.h, src/reader.c (epilogue_set): New.
4083 * src/parse-gram.y: Use it.
4084
4085 * data/bison.simple, data/bison.c++: b4_stype is now either not
4086 defined, then default to int, or to the contents of %union,
4087 without `union' itself.
4088 Adjust.
4089 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4090
4091 * src/output.c (actions_output): Don't output braces, as they are
4092 already handled by the scanner.
4093
4094 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4095 characters to themselves.
4096
4097 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4098 that the epilogue has a proper #line.
4099
4100 * src/parse-gram.y: Handle precedence/associativity.
4101
4102 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4103 a terminal.
4104 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4105 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4106 at all to define terminals that cannot be emitted.
4107
4108 * src/scan-gram.l: Escape M4 characters.
4109
4110 * src/scan-gram.l: Working properly with escapes in user
4111 strings/characters.
4112
4113 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4114 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4115 grammar.
4116 Use more modest sizes, as for the time being the parser does not
4117 release memory, and therefore the process swallows a huge amount
4118 of memory.
4119
4120 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4121 stricter %token grammar.
4122
4123 * src/symtab.h (associativity): Add `undef_assoc'.
4124 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4125 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4126
4127 * tests/regression.at (Invalid %directive): Remove, as it is now
4128 meaningless.
4129 (Invalid inputs): Adjust to the new error messages.
4130 (Token definitions): The new grammar doesn't allow too many
4131 eccentricities.
4132
4133 * src/lex.h, src/lex.c: Remove.
4134 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4135 (copy_character, copy_string2, copy_string, copy_identifier)
4136 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4137 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4138 (parse_action): Remove.
4139 * po/POTFILES.in: Adjust.
4140
4141 2002-06-11 Akim Demaille <akim@epita.fr>
4142
4143 * src/reader.c (parse_action): Don't store directly into the
4144 rule's action member: return the action as a string.
4145 Don't require `rule_length' as an argument: compute it.
4146 (grammar_current_rule_symbol_append)
4147 (grammar_current_rule_action_append): New, eved out from
4148 (readgram): here.
4149 Remove `action_flag', `rulelength', unused now.
4150
4151 2002-06-11 Akim Demaille <akim@epita.fr>
4152
4153 * src/reader.c (grammar_current_rule_prec_set).
4154 (grammar_current_rule_check): New, eved out from...
4155 (readgram): here.
4156 Remove `xaction', `first_rhs': useless.
4157 * tests/input.at (Type clashes): New.
4158 * tests/existing.at (GNU Cim Grammar): Adjust.
4159
4160 2002-06-11 Akim Demaille <akim@epita.fr>
4161
4162 * src/reader.c (grammar_midrule_action): New, Eved out from
4163 (readgram): here.
4164
4165 2002-06-11 Akim Demaille <akim@epita.fr>
4166
4167 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4168 New.
4169 (readgram): Use them as replacement of inlined code, crule and
4170 crule1.
4171
4172 2002-06-11 Akim Demaille <akim@epita.fr>
4173
4174 * src/reader.c (grammar_end, grammar_symbol_append): New.
4175 (readgram): Use them.
4176 Make the use of `p' as local as possible.
4177
4178 2002-06-10 Akim Demaille <akim@epita.fr>
4179
4180 GCJ's parser requires the tokens to be defined before the prologue.
4181
4182 * data/bison.simple: Output the token definition before the user's
4183 prologue.
4184 * tests/regression.at (Braces parsing, Duplicate string)
4185 (Mixing %token styles): Check the output from bison.
4186 (Early token definitions): New.
4187
4188 2002-06-10 Akim Demaille <akim@epita.fr>
4189
4190 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4191 assigning twice the same user number to a token, so that we can
4192 use it in...
4193 * src/lex.c (lex): here.
4194 Also use `symbol_class_set' instead of hand written code.
4195 * src/reader.c (parse_assoc_decl): Likewise.
4196
4197 2002-06-10 Akim Demaille <akim@epita.fr>
4198
4199 * src/symtab.c, src/symtab.c (symbol_class_set)
4200 (symbol_user_token_number_set): New.
4201 * src/reader.c (parse_token_decl): Use them.
4202 Use a switch instead of ifs.
4203 Use a single argument.
4204
4205 2002-06-10 Akim Demaille <akim@epita.fr>
4206
4207 Remove `%thong' support as it is undocumented, unused, duplicates
4208 `%token's job, and creates useless e-mail traffic with people who
4209 want to know what it is, why it is undocumented, unused, and
4210 duplicates `%token's job.
4211
4212 * src/reader.c (parse_thong_decl): Remove.
4213 * src/options.c (option_table): Remove "thong".
4214 * src/lex.h (tok_thong): Remove.
4215
4216 2002-06-10 Akim Demaille <akim@epita.fr>
4217
4218 * src/symtab.c, src/symtab.c (symbol_type_set)
4219 (symbol_precedence_set): New.
4220 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4221 (value_components_used): Remove, unused.
4222
4223 2002-06-09 Akim Demaille <akim@epita.fr>
4224
4225 Move symbols handling code out of the reader.
4226
4227 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4228 (axiom): Move to...
4229 * src/symtab.h, src/symtab.c: here.
4230
4231 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4232 * src/reader.c (startval): Rename as...
4233 * src/symtab.h, src/symtab.c (startsymbol): this.
4234 * src/reader.c: Adjust.
4235
4236 * src/reader.c (symbol_check_defined, symbol_make_alias)
4237 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4238 (token_translations_init)
4239 Move to...
4240 * src/symtab.c: here.
4241 * src/reader.c (packsymbols): Move to...
4242 * src/symtab.h, src/symtab.c (symbols_pack): here.
4243 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4244 argument.
4245
4246 2002-06-03 Akim Demaille <akim@epita.fr>
4247
4248 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4249 then statements.
4250
4251 2002-06-03 Akim Demaille <akim@epita.fr>
4252
4253 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4254 structs with non literals.
4255 * src/scan-skel.l: never-interactive.
4256 * src/conflicts.c (enum conflict_resolution_e): No trailing
4257 comma.
4258 * src/getargs.c (usage): Split long literal strings.
4259 Reported by Hans Aberg.
4260
4261 2002-05-28 Akim Demaille <akim@epita.fr>
4262
4263 * data/bison.c++: Use C++ ostreams.
4264 (cdebug_): New member.
4265
4266 2002-05-28 Akim Demaille <akim@epita.fr>
4267
4268 * src/output.c (output_skeleton): Be sure to allocate enough room
4269 for `/' _and_ for `\0' in full_skeleton.
4270
4271 2002-05-28 Akim Demaille <akim@epita.fr>
4272
4273 * data/bison.c++: Catch up with bison.simple:
4274 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4275 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4276 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4277 and popping traces.
4278
4279 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4280
4281 * src/output.c (output_skeleton): Put an explicit path in front of
4282 the skeleton file name, rather than relying on the -I directory,
4283 to partially alleviate effects of having a skeleton file lying around
4284 in the current directory.
4285
4286 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4287
4288 * src/conflicts.c (log_resolution): Correct typo:
4289 obstack_printf should be obstack_fgrow1.
4290
4291 2002-05-26 Akim Demaille <akim@epita.fr>
4292
4293 * src/state.h (state_t): `solved_conflicts' is a new member.
4294 * src/LR0.c (new_state): Set it to 0.
4295 * src/conflicts.h, src/conflicts.c (print_conflicts)
4296 (free_conflicts, solve_conflicts): Rename as...
4297 (conflicts_print, conflicts_free, conflicts_solve): these.
4298 Adjust callers.
4299 * src/conflicts.c (enum conflict_resolution_e)
4300 (solved_conflicts_obstack): New, used by...
4301 (log_resolution): this.
4302 Adjust to attach the conflict resolution to each state.
4303 Complete the description with the precedence/associativity
4304 information.
4305 (resolve_sr_conflict): Adjust.
4306 * src/print.c (print_state): Output its solved_conflicts.
4307 * tests/conflicts.at (Unresolved SR Conflicts)
4308 (Solved SR Conflicts): Exercise --report=all.
4309
4310 2002-05-26 Akim Demaille <akim@epita.fr>
4311
4312 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4313 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4314 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4315 (token_number_t, item_number_as_token_number)
4316 (token_number_as_item_number, muscle_insert_token_number_table):
4317 Rename as...
4318 (symbol_number_t, item_number_as_symbol_number)
4319 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4320 these, since it is more appropriate.
4321
4322 2002-05-26 Akim Demaille <akim@epita.fr>
4323
4324 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4325 `Error:' lines.
4326 * data/bison.simple (yystos) [YYDEBUG]: New.
4327 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4328 error recovery.
4329 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4330
4331 2002-05-25 Akim Demaille <akim@epita.fr>
4332
4333 * doc/bison.texinfo (Debugging): Split into...
4334 (Tracing): this new section, its former contents, and...
4335 (Understanding): this new section.
4336 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4337 by...
4338 (report_flag): this.
4339 Adjust all dependencies.
4340 (report_args, report_types, report_argmatch): New.
4341 (usage, getargs): Report/support -r, --report.
4342 * src/options.h
4343 (struct option_table_struct): Rename as..,
4344 (struct option_table_s): this.
4345 Rename the `set_flag' member to `flag' to match with getopt_long's
4346 struct.
4347 * src/options.c (option_table): Split verbose into an entry for
4348 %verbose, and another for --verbose.
4349 Support --report/-r, so remove -r from the obsolete --raw.
4350 * src/print.c: Attach full item sets and lookaheads reports to
4351 report_flag instead of trace_flag.
4352 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4353
4354 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4355 and Paul Eggert <eggert@twinsun.com>
4356
4357 * data/bison.simple (yyparse): Correct error handling to conform to
4358 POSIX and yacc. Specifically, after syntax error is discovered,
4359 do not reduce further before shifting the error token.
4360 Clean up the code a bit by removing the labels yyerrdefault,
4361 yyerrhandle, yyerrpop.
4362 * NEWS: Document the above.
4363
4364 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4365
4366 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4367 type; it isn't always big enough, since it doesn't necessarily
4368 include non-terminals.
4369 (yytranslate): Expand definition of yy_token_number_type, so that
4370 the latter can be removed.
4371 (yy_token_number_type): Remove, only one use.
4372 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4373 don't use TokenNumberType as element type.
4374
4375 * tests/regression.at: Modify expected output to agree with change
4376 to yyr1 and yytranslate.
4377
4378 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4379
4380 * src/reader.c (parse_action): Use copy_character instead of
4381 obstack_1grow.
4382
4383 2002-05-13 Akim Demaille <akim@epita.fr>
4384
4385 * tests/regression.at (Token definitions): Prototype yylex and
4386 yyerror.
4387
4388 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4389
4390 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4391 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4392 32-bit arithmetic.
4393 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4394
4395 2002-05-07 Akim Demaille <akim@epita.fr>
4396
4397 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4398 avoid GCC warnings.
4399
4400 2002-05-07 Akim Demaille <akim@epita.fr>
4401
4402 Kill GCC warnings.
4403
4404 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4405 over the RHS of each rule.
4406 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4407 * src/state.h (state_t): Member `nitems' is unsigned short.
4408 * src/LR0.c (get_state): Adjust.
4409 * src/reader.c (packgram): Likewise.
4410 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4411 `Type'.
4412 (muscle_insert_int_table): Remove, unused.
4413 (prepare_rules): Remove `max'.
4414
4415 2002-05-06 Akim Demaille <akim@epita.fr>
4416
4417 * src/closure.c (print_firsts): Display of the symbol tags.
4418 (bitmatrix_print): Move to...
4419 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4420 here.
4421 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4422
4423 2002-05-06 Akim Demaille <akim@epita.fr>
4424
4425 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4426 hash_do_for_each.
4427
4428 2002-05-06 Akim Demaille <akim@epita.fr>
4429
4430 * src/LR0.c (new_state, get_state): Instead of using the global
4431 `kernel_size' and `kernel_base', have two new arguments:
4432 `core_size' and `core'.
4433 Adjust callers.
4434
4435 2002-05-06 Akim Demaille <akim@epita.fr>
4436
4437 * src/reader.c (packgram): No longer end `ritem' with a 0
4438 sentinel: it is not used.
4439
4440 2002-05-05 Akim Demaille <akim@epita.fr>
4441
4442 New experimental feature: display the lookaheads in the report and
4443 graph.
4444
4445 * src/print (print_core): When --trace-flag, display the rules
4446 lookaheads.
4447 * src/print_graph.c (print_core): Likewise.
4448 Swap the arguments.
4449 Adjust caller.
4450
4451 2002-05-05 Akim Demaille <akim@epita.fr>
4452
4453 * tests/torture.at (Many lookaheads): New test.
4454
4455 2002-05-05 Akim Demaille <akim@epita.fr>
4456
4457 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4458 (GENERATE_MUSCLE_INSERT_TABLE): this.
4459 (output_int_table, output_unsigned_int_table, output_short_table)
4460 (output_token_number_table, output_item_number_table): Replace with...
4461 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4462 (muscle_insert_short_table, muscle_insert_token_number_table)
4463 (muscle_insert_item_number_table): these.
4464 Adjust all callers.
4465 (prepare_tokens): Don't free `translations', since...
4466 * src/reader.h, src/reader.c (grammar_free): do it.
4467 Move to...
4468 * src/gram.h, src/gram.c (grammar_free): here.
4469 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4470 b4_translate_max.
4471
4472 2002-05-05 Akim Demaille <akim@epita.fr>
4473
4474 * src/output.c (output_unsigned_int_table): New.
4475 (prepare_rules): `i' is unsigned.
4476 `prhs', `rline', `r2' are unsigned int.
4477 Rename muscle `rhs_number_max' as `rhs_max'.
4478 Output muscles `prhs_max', `rline_max', and `r2_max'.
4479 Free rline and r1.
4480 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4481 to compute types instead of constant types.
4482 * tests/regression.at (Web2c Actions): Adjust.
4483
4484 2002-05-04 Akim Demaille <akim@epita.fr>
4485
4486 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4487 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4488 Adjust dependencies.
4489 * src/output.c (token_definitions_output): Be sure not to output a
4490 `#define 'a'' when fed with `%token 'a' "a"'.
4491 * tests/regression.at (Token definitions): New.
4492
4493 2002-05-03 Paul Eggert <eggert@twinsun.com>
4494
4495 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4496 for K&R C.
4497
4498 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4499
4500 * Makefile.am (SUBDIRS): Remove intl.
4501 (EXTRA_DIST): Add config/config.rpath.
4502
4503 2002-05-03 Akim Demaille <akim@epita.fr>
4504
4505 * data/bison.simple (m4_if): Don't output empty enums.
4506 And actually, output valid enum definitions :(.
4507
4508 2002-05-03 Akim Demaille <akim@epita.fr>
4509
4510 * configure.bat: Remove, completely obsolete.
4511 * Makefile.am (EXTRA_DIST): Adjust.
4512 Don't distribute config.rpath...
4513 * config/Makefile.am (EXTRA_DIST): Do it.
4514
4515 2002-05-03 Akim Demaille <akim@epita.fr>
4516
4517 * configure.in (GETTEXT_VERSION): New.
4518 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4519
4520 2002-05-03 Akim Demaille <akim@epita.fr>
4521
4522 * data/bison.simple (b4_token_enum): New.
4523 (b4_token_defines): Use it to output tokens both as #define and
4524 enums.
4525 Suggested by Paul Eggert.
4526 * src/output.c (token_definitions_output): Don't output spurious
4527 white spaces.
4528
4529 2002-05-03 Akim Demaille <akim@epita.fr>
4530
4531 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4532
4533 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4534
4535 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4536 Update the stack class, give a try to deque as the default container.
4537
4538 2002-05-02 Akim Demaille <akim@epita.fr>
4539
4540 * data/bison.simple (yyparse): Do not implement @$ = @1.
4541 (YYLLOC_DEFAULT): Adjust to do it.
4542 * doc/bison.texinfo (Location Default Action): Fix.
4543
4544 2002-05-02 Akim Demaille <akim@epita.fr>
4545
4546 * src/reader.c (parse_braces): Merge into...
4547 (parse_action): this.
4548
4549 2002-05-02 Akim Demaille <akim@epita.fr>
4550
4551 * configure.in (ALL_LINGUAS): Remove.
4552 * po/LINGUAS, hr.po: New.
4553
4554 2002-05-02 Akim Demaille <akim@epita.fr>
4555
4556 Remove the so called hairy (semantic) parsers.
4557
4558 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4559 * src/gram.h, src/gram.c (semantic_parser): Remove.
4560 (rule_t): Remove the guard and guard_line members.
4561 * src/lex.h (token_t): remove tok_guard.
4562 * src/options.c (option_table): Remove %guard and %semantic_parser
4563 support.
4564 * src/output.c, src/output.h (guards_output): Remove.
4565 (prepare): Adjust.
4566 (token_definitions_output): Don't output the `T'
4567 tokens (???).
4568 (output_skeleton): Don't output the guards.
4569 * src/files.c, src/files.c (attrsfile): Remove.
4570 * src/reader.c (symbol_list): Remove the guard and guard_line
4571 members.
4572 Adjust dependencies.
4573 (parse_guard): Remove.
4574 * data/bison.hairy: Remove.
4575 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4576 BISON_HAIRY.
4577
4578 2002-05-02 Akim Demaille <akim@epita.fr>
4579
4580 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4581 (parse_guard): Rename the formal argument `stack_offset' as
4582 `rule_length', which is more readable.
4583 Adjust callers.
4584 (copy_at, copy_dollar): Instead of outputting the hard coded
4585 values of $$, $n and so forth, output invocation to b4_lhs_value,
4586 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4587 Note: this patch partially drops `semantic-parser' support: it
4588 always does `rule_length - n', where semantic parsers ought to
4589 always use `-n'.
4590 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4591 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4592
4593 2002-05-02 Akim Demaille <akim@epita.fr>
4594
4595 * configure.in (AC_INIT): Bump to 1.49b.
4596 (AM_INIT_AUTOMAKE): Short invocation.
4597
4598 2002-05-02 Akim Demaille <akim@epita.fr>
4599
4600 Version 1.49a.
4601
4602 2002-05-01 Akim Demaille <akim@epita.fr>
4603
4604 * src/skeleton.h: Remove.
4605
4606 2002-05-01 Akim Demaille <akim@epita.fr>
4607
4608 * src/skeleton.h: Fix the #endif.
4609 Reported by Magnus Fromreide.
4610
4611 2002-04-26 Paul Eggert <eggert@twinsun.com>
4612
4613 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4614 Define if we define YYSTYPE and YYLTYPE, respectively.
4615 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4616
4617 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4618
4619 * src/scan-skel.l: Postprocess quadrigraphs.
4620
4621 * src/reader.c (copy_character): New function, used to output
4622 single characters while replacing `[' and `]' with quadrigraphs, to
4623 avoid troubles with M4 quotes.
4624 (copy_comment): Output characters with copy_character.
4625 (read_additionnal_code): Likewise.
4626 (copy_string2): Likewise.
4627 (copy_definition): Likewise.
4628
4629 * tests/calc.at: Exercise M4 quoting.
4630
4631 2002-04-25 Akim Demaille <akim@epita.fr>
4632
4633 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4634 between `!' and the command.
4635 Reported by Paul Eggert.
4636
4637 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4638
4639 * tests/calc.at: Exercise prologue splitting.
4640
4641 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4642 `b4_post_prologue' instead of `b4_prologue'.
4643
4644 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4645 muscles.
4646 (output): Free pre_prologue_obstack and post_prologue_obstack.
4647 * src/files.h, src/files.c (attrs_obstack): Remove.
4648 (pre_prologue_obstack, post_prologue_obstack): New.
4649 * src/reader.c (copy_definition): Add a parameter to specify the
4650 obstack to fill, instead of using attrs_obstack unconditionally.
4651 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4652 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4653
4654 2002-04-23 Paul Eggert <eggert@twinsun.com>
4655
4656 * data/bison.simple: Remove unnecessary commentary and white
4657 space differences from 1_29-branch.
4658 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4659
4660 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4661 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4662 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4663 constructors or destructors.
4664
4665 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4666
4667 2002-04-23 Akim Demaille <akim@epita.fr>
4668
4669 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4670 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4671 location with columns.
4672 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4673 All reported by Paul Eggert.
4674
4675 2002-04-22 Akim Demaille <akim@epita.fr>
4676
4677 * src/reduce.c (dump_grammar): Move to...
4678 * src/gram.h, src/gram.c (grammar_dump): here.
4679 Be sure to separate long item numbers.
4680 Don't read the members of a rule's prec if its nil.
4681
4682 2002-04-22 Akim Demaille <akim@epita.fr>
4683
4684 * src/output.c (table_size, table_grow): New.
4685 (MAXTABLE): Remove, replace uses with table_size.
4686 (pack_vector): Instead of dying when the table is too big, grow it.
4687
4688 2002-04-22 Akim Demaille <akim@epita.fr>
4689
4690 * data/bison.simple (yyr1): Its type is that of a token number.
4691 * data/bison.c++ (r1_): Likewise.
4692 * tests/regression.at (Web2c Actions): Adjust.
4693
4694 2002-04-22 Akim Demaille <akim@epita.fr>
4695
4696 * src/reader.c (token_translations_init): 256 is now the default
4697 value for the error token, i.e., it will be assigned another
4698 number if the user assigned 256 to one of her tokens.
4699 (reader): Don't force 256 to error.
4700 * doc/bison.texinfo (Symbols): Adjust.
4701 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4702 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4703 etc. instead of 10, 20, 30 (which was used to `jump' over error
4704 (256) and undefined (2)).
4705
4706 2002-04-22 Akim Demaille <akim@epita.fr>
4707
4708 Propagate more token_number_t.
4709
4710 * src/gram.h (token_number_as_item_number)
4711 (item_number_as_token_number): New.
4712 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4713 Use it to create output_item_number_table and
4714 output_token_number_table.
4715 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4716 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4717 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4718 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4719
4720 2002-04-22 Akim Demaille <akim@epita.fr>
4721
4722 * src/output.h, src/output.c (get_lines_number): Remove.
4723
4724 2002-04-19 Akim Demaille <akim@epita.fr>
4725
4726 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4727 as Lex/Flex'.
4728 (Debugging): More details about enabling the debugging features.
4729 (Table of Symbols): Describe $$, $n, @$, and @n.
4730 Suggested by Tim Josling.
4731
4732 2002-04-19 Akim Demaille <akim@epita.fr>
4733
4734 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4735
4736 2002-04-10 Akim Demaille <akim@epita.fr>
4737
4738 * src/system.h: Rely on HAVE_LIMITS_H.
4739 Suggested by Paul Eggert.
4740
4741 2002-04-09 Akim Demaille <akim@epita.fr>
4742
4743 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4744 full stderr, and strip it according to the bison options, instead
4745 of composing the error message from different bits.
4746 This makes it easier to check for several error messages.
4747 Adjust all the invocations.
4748 Add an invocation exercising the error token.
4749 Add an invocation demonstrating a stupid error message.
4750 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4751 Adjust the tests.
4752 Error message are for stderr, not stdout.
4753
4754 2002-04-09 Akim Demaille <akim@epita.fr>
4755
4756 * src/gram.h, src/gram.c (error_token_number): Remove, use
4757 errtoken->number.
4758 * src/reader.c (reader): Don't specify the user token number (2)
4759 for $undefined, as it uselessly prevents using it.
4760 * src/gram.h (token_number_t): Move to...
4761 * src/symtab.h: here.
4762 (state_t.number): Is a token_number_t.
4763 * src/print.c, src/reader.c: Use undeftoken->number instead of
4764 hard coded 2.
4765 (Even though this 2 is not the same as above: the number of the
4766 undeftoken remains being 2, it is its user token number which
4767 might not be 2).
4768 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4769 `user_token_number_max'.
4770 Output `undef_token_number'.
4771 * data/bison.simple, data/bison.c++: Use them.
4772 Be sure to map invalid yylex return values to
4773 `undef_token_number'. This saves us from gratuitous SEGV.
4774
4775 * tests/conflicts.at (Solved SR Conflicts)
4776 (Unresolved SR Conflicts): Adjust.
4777 * tests/regression.at (Web2c Actions): Adjust.
4778
4779 2002-04-08 Akim Demaille <akim@epita.fr>
4780
4781 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4782 Adding #line.
4783 Remove the duplicate `typedefs'.
4784 (RhsNumberType): Fix the declaration and various other typos.
4785 Use __ofile__.
4786 * data/bison.simple: Use __ofile__.
4787 * src/scan-skel.l: Handle __ofile__.
4788
4789 2002-04-08 Akim Demaille <akim@epita.fr>
4790
4791 * src/gram.h (item_number_t): New, the type of item numbers in
4792 RITEM. Note that it must be able to code symbol numbers as
4793 positive number, and the negation of rule numbers as negative
4794 numbers.
4795 Adjust all dependencies (pretty many).
4796 * src/reduce.c (rule): Remove this `short *' pointer: use
4797 item_number_t.
4798 * src/system.h (MINSHORT, MAXSHORT): Remove.
4799 Include `limits.h'.
4800 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4801 (shortcpy): Remove.
4802 (MAXTABLE): Move to...
4803 * src/output.c (MAXTABLE): here.
4804 (prepare_rules): Use output_int_table to output rhs.
4805 * data/bison.simple, data/bison.c++: Adjust.
4806 * tests/torture.at (Big triangle): Move the limit from 254 to
4807 500.
4808 * tests/regression.at (Web2c Actions): Ajust.
4809
4810 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4811 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4812 passes, but produces negative #line number, once fixed, GCC is
4813 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4814 C), it passes.
4815 * src/state.h (state_h): Code input lines on ints, not shorts.
4816
4817 2002-04-08 Akim Demaille <akim@epita.fr>
4818
4819 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4820 and then the grammar.
4821
4822 2002-04-08 Akim Demaille <akim@epita.fr>
4823
4824 * src/system.h: No longer using strndup.
4825
4826 2002-04-07 Akim Demaille <akim@epita.fr>
4827
4828 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4829 * src/output.c (output_table_data): Return the longest number.
4830 (prepare_tokens): Output `token_number_max').
4831 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4832 New.
4833 Use them to define yy_token_number_type/TokenNumberType.
4834 Use this type for yytranslate.
4835 * tests/torture.at (Big triangle): Push the limit from 124 to
4836 253.
4837 * tests/regression.at (Web2c Actions): Adjust.
4838
4839 2002-04-07 Akim Demaille <akim@epita.fr>
4840
4841 * tests/torture.at (Big triangle): New.
4842 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4843 * tests/existing.at: here.
4844
4845 2002-04-07 Akim Demaille <akim@epita.fr>
4846
4847 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4848 nritems.
4849 Adjust dependencies.
4850
4851 2002-04-07 Akim Demaille <akim@epita.fr>
4852
4853 * src/reader.c: Normalize increments to prefix form.
4854
4855 2002-04-07 Akim Demaille <akim@epita.fr>
4856
4857 * src/reader.c, symtab.c: Remove debugging code.
4858
4859 2002-04-07 Akim Demaille <akim@epita.fr>
4860
4861 Rename all the `bucket's as `symbol_t'.
4862
4863 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4864 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4865 * src/symtab.c, src/symtab.h (bucket): Rename as...
4866 (symbol_t): this.
4867 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4868 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
4869 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4870 (buckets_new, buckets_free, buckets_do): Rename as...
4871 (symbol_list_new, symbol_check_defined, symbol_make_alias)
4872 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4873 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
4874 (symbols_new, symbols_free, symbols_do): these.
4875
4876 2002-04-07 Akim Demaille <akim@epita.fr>
4877
4878 Use lib/hash for the symbol table.
4879
4880 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
4881 EOF.
4882 * src/lex.c (lex): Set the `number' member of new terminals.
4883 * src/reader.c (bucket_check_defined, bucket_make_alias)
4884 (bucket_check_alias_consistence, bucket_translation): New.
4885 (reader, grammar_free, readgram, token_translations_init)
4886 (packsymbols): Adjust.
4887 (reader): Number the predefined tokens.
4888 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
4889 for predefined tokens.
4890 * src/symtab.h (bucket): Remove all the hash table related
4891 members.
4892 * src/symtab.c (symtab): Replace by...
4893 (bucket_table): this.
4894 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4895 (buckets_new, buckets_do): New.
4896
4897 2002-04-07 Akim Demaille <akim@epita.fr>
4898
4899 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
4900 (start_symbol, max_user_token_number, semantic_parser)
4901 (error_token_number): Initialize.
4902 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
4903 Initialize.
4904 (reader): Don't.
4905 (errtoken, eoftoken, undeftoken, axiom): Extern.
4906
4907 2002-04-07 Akim Demaille <akim@epita.fr>
4908
4909 * src/gram.h (rule_s): prec and precsym are now pointers
4910 to the bucket giving the priority/associativity.
4911 Member `associativity' removed: useless.
4912 * src/reduce.c, src/conflicts.c: Adjust.
4913
4914 2002-04-07 Akim Demaille <akim@epita.fr>
4915
4916 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
4917 Properly escape the symbols' TAG when outputting them.
4918
4919 2002-04-07 Akim Demaille <akim@epita.fr>
4920
4921 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4922
4923 2002-04-07 Akim Demaille <akim@epita.fr>
4924
4925 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
4926 (LArule): this, which is an array to rule_t*.
4927 * src/print.c, src/conflicts.c: Adjust.
4928
4929 2002-04-07 Akim Demaille <akim@epita.fr>
4930
4931 * src/gram.h (rule_t): Rename `number' as `user_number'.
4932 `number' is a new member.
4933 Adjust dependencies.
4934 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
4935
4936 2002-04-07 Akim Demaille <akim@epita.fr>
4937
4938 As a result of the previous patch, it is no longer needed
4939 to reorder ritem itself.
4940
4941 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
4942
4943 2002-04-07 Akim Demaille <akim@epita.fr>
4944
4945 Be sure never to walk through RITEMS, but use only data related to
4946 the rules themselves. RITEMS should be banished.
4947
4948 * src/output.c (output_token_translations): Rename as...
4949 (prepare_tokens): this.
4950 In addition to `translate', prepare the muscles `tname' and
4951 `toknum', which were handled by...
4952 (output_rule_data): this.
4953 Remove, and move the remainder of its outputs into...
4954 (prepare_rules): this new routines, which also merges content from
4955 (output_gram): this.
4956 (prepare_rules): Be sure never to walk through RITEMS.
4957 (output_stos): Rename as...
4958 (prepare_stos): this.
4959 (output): Always invoke prepare_states, after all, just don't use it
4960 in the output if you don't need it.
4961
4962 2002-04-07 Akim Demaille <akim@epita.fr>
4963
4964 * src/LR0.c (new_state): Display `nstates' as the name of the
4965 newly created state.
4966 Adjust to initialize first_state and last_state if needed.
4967 Be sure to distinguish the initial from the final state.
4968 (new_states): Create the itemset of the initial state, and use
4969 new_state.
4970 * src/closure.c (closure): Now that the initial state has its
4971 items properly set, there is no need for a special case when
4972 creating `ruleset'.
4973
4974 As a result, now the rule 0, reducing to $axiom, is visible in the
4975 outputs. Adjust the test suite.
4976
4977 * tests/conflicts.at (Solved SR Conflicts)
4978 (Unresolved SR Conflicts): Adjust.
4979 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
4980 * tests/conflicts.at (S/R in initial): New.
4981
4982 2002-04-07 Akim Demaille <akim@epita.fr>
4983
4984 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
4985 the RHS of the rules.
4986 * src/output.c (output_gram): Likewise.
4987
4988 2002-04-07 Akim Demaille <akim@epita.fr>
4989
4990 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
4991 bucket.
4992 Adjust all dependencies.
4993 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
4994 `number' of the buckets too.
4995 * src/gram.h: Include `symtab.h'.
4996 (associativity): Move to...
4997 * src/symtab.h: here.
4998 No longer include `gram.h'.
4999
5000 2002-04-07 Akim Demaille <akim@epita.fr>
5001
5002 * src/gram.h, src/gram.c (rules_rhs_length): New.
5003 (ritem_longest_rhs): Use it.
5004 * src/gram.h (rule_t): `number' is a new member.
5005 * src/reader.c (packgram): Set it.
5006 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5007 the end of `rules', and count them out of `nrules'.
5008 (reduce_output, dump_grammar): Adjust.
5009 * src/print.c (print_grammar): It is no longer needed to check for
5010 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5011 * tests/reduce.at (Reduced Automaton): New test.
5012
5013 2002-04-07 Akim Demaille <akim@epita.fr>
5014
5015 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5016 lacking `+ 1' to nrules, Bison reported as useless a token if it
5017 was used solely to set the precedence of the last rule...
5018
5019 2002-04-07 Akim Demaille <akim@epita.fr>
5020
5021 * data/bison.c++, data/bison.simple: Don't output the current file
5022 name in #line, to avoid useless diffs between two identical
5023 outputs under different names.
5024
5025 2002-04-07 Akim Demaille <akim@epita.fr>
5026
5027 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5028 Normalize loops to using `< nrules + 1', not `<= nrules'.
5029
5030 2002-04-07 Akim Demaille <akim@epita.fr>
5031
5032 * TODO: Update.
5033
5034 2002-04-07 Akim Demaille <akim@epita.fr>
5035
5036 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5037 bucket.value as bucket.number.
5038
5039 2002-04-07 Akim Demaille <akim@epita.fr>
5040
5041 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5042 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5043 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5044 RHS, instead of being an index in RITEMS.
5045
5046 2002-04-04 Paul Eggert <eggert@twinsun.com>
5047
5048 * doc/bison.texinfo: Update copyright date.
5049 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5050 (Symbols): Warn about running Bison in one character set,
5051 but compiling and/or running in an incompatible one.
5052 Warn about character code 256, too.
5053
5054 2002-04-03 Paul Eggert <eggert@twinsun.com>
5055
5056 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5057 YYERROR_VERBOSE is nonzero, not whether it is defined.
5058
5059 Merge changes from bison-1_29-branch.
5060
5061 2002-03-20 Paul Eggert <eggert@twinsun.com>
5062
5063 Merge fixes from Debian bison_1.34-1.diff.
5064
5065 * configure.in (AC_PREREQ): 2.53.
5066
5067 2002-03-20 Akim Demaille <akim@epita.fr>
5068
5069 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5070
5071 2002-03-19 Paul Eggert <eggert@twinsun.com>
5072
5073 * src/bison.simple (YYCOPY): New macro.
5074 (YYSTACK_RELOCATE): Use it.
5075 Remove Type arg; no longer needed. All callers changed.
5076 (yymemcpy): Remove; no longer needed.
5077
5078 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5079 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5080
5081 2002-03-19 Akim Demaille <akim@epita.fr>
5082
5083 Test and fix the #line outputs.
5084
5085 * tests/atlocal.at (GCC): New.
5086 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5087 (Prologue synch line, ,%union synch line, Postprologue synch line)
5088 (Action synch line, Epilogue synch line): New tests.
5089 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5090 * data/bison.simple, data/bison.c++: Use it.
5091
5092 2002-03-19 Akim Demaille <akim@epita.fr>
5093
5094 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5095 (Solved SR Conflicts, %expect not enough, %expect right)
5096 (%expect too much): Move to...
5097 * tests/conflicts.at: this new file.
5098
5099 2002-03-19 Akim Demaille <akim@epita.fr>
5100
5101 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5102 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5103 that we can move to enums for instance.
5104 * src/output.c (token_definitions_output): Output a list of
5105 `token-name, token-number' instead of the #define.
5106 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5107
5108 2002-03-14 Akim Demaille <akim@epita.fr>
5109
5110 Use Gettext 0.11.1.
5111
5112 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5113
5114 * data/bison.c++: Make the user able to add members to the generated
5115 parser by subclassing.
5116
5117 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5118
5119 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5120 a character.
5121 Reported by Nicolas Tisserand and Nicolas Burrus.
5122
5123 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5124
5125 * src/reader.c: Warn about lacking semi-colons, do not complain.
5126
5127 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5128
5129 * data/bison.c++: Remove a debug line.
5130
5131 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5132
5133 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5134 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5135 provide a default implementation.
5136
5137 2002-03-04 Akim Demaille <akim@epita.fr>
5138
5139 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5140 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5141 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5142 * tests/semantic.at (Parsing Guards): Similarly.
5143 * src/reader.at (readgram): Complain if the last rule is not ended
5144 with a semi-colon.
5145
5146 2002-03-04 Akim Demaille <akim@epita.fr>
5147
5148 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5149 * src/closure.c: here.
5150 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5151 RTC.
5152 * src/warshall.h, src/warshall.c: Remove.
5153 * tests/sets.at (Broken Closure): Adjust.
5154
5155 2002-03-04 Akim Demaille <akim@epita.fr>
5156
5157 * src/output.c (output_skeleton): tempdir is const.
5158 bytes_read is unused.
5159
5160 2002-03-04 Akim Demaille <akim@epita.fr>
5161
5162 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5163 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5164 Update.
5165 From Michael Hayes.
5166
5167 2002-03-04 Akim Demaille <akim@epita.fr>
5168
5169 * src/closure.c (closure): `r' is unused.
5170
5171 2002-03-04 Akim Demaille <akim@epita.fr>
5172
5173 * tests/sets.at (Broken Closure): Add the ending `;'.
5174 * src/reader.at (readgram): Complain if a rule is not ended with a
5175 semi-colon.
5176
5177 2002-03-04 Akim Demaille <akim@epita.fr>
5178
5179 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5180 (count_sr_conflicts): Use bitset_count.
5181 * src/reduce.c (inaccessable_symbols): Ditto.
5182 (bits_size): Remove.
5183 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5184
5185 2002-03-04 Akim Demaille <akim@epita.fr>
5186
5187 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5188 * src/reduce.c: Remove the `bitset_zero's following the
5189 `bitset_create's, as now it is performed by the latter.
5190
5191 2002-03-04 Akim Demaille <akim@epita.fr>
5192
5193 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5194 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5195 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5196 latest sources from Michael.
5197
5198 2002-03-04 Akim Demaille <akim@epita.fr>
5199
5200 * src/output.c (output): Don't free the grammar.
5201 * src/reader.c (grammar_free): New.
5202 * src/main.c (main): Call it and don't free symtab here.
5203
5204 2002-03-04 Akim Demaille <akim@epita.fr>
5205
5206 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5207 before returning.
5208 Reported by Benoit Perrot.
5209
5210 2002-03-04 Akim Demaille <akim@epita.fr>
5211
5212 Use bitset operations when possible, not loops over bits.
5213
5214 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5215 bitset_or.
5216 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5217 * src/reduce.c (useless_nonterminals): Formatting changes.
5218 * src/warshall.c (TC): Use bitset_or.
5219
5220 2002-03-04 Akim Demaille <akim@epita.fr>
5221
5222 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5223 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5224 Ditto.
5225
5226 2002-03-04 Akim Demaille <akim@epita.fr>
5227
5228 * src/lalr.c (F): Now a bitset*.
5229 Adjust all dependencies.
5230
5231 2002-03-04 Akim Demaille <akim@epita.fr>
5232
5233 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5234 Adjust all dependencies.
5235
5236 2002-03-04 Akim Demaille <akim@epita.fr>
5237
5238 * src/L0.c, src/LR0.h (nstates): Be size_t.
5239 Adjust comparisons (signed vs unsigned).
5240 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5241 bitset*.
5242 Adjust all dependencies.
5243
5244 2002-03-04 Akim Demaille <akim@epita.fr>
5245
5246 * src/closure.c (firsts): Now, also a bitset.
5247 Adjust all dependencies.
5248 (varsetsize): Remove, now unused.
5249 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5250
5251 2002-03-04 Akim Demaille <akim@epita.fr>
5252
5253 * src/print.c: Convert to use bitset.h, not hand coded iterations
5254 over ints.
5255
5256 2002-03-04 Akim Demaille <akim@epita.fr>
5257
5258 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5259
5260 2002-03-04 Akim Demaille <akim@epita.fr>
5261
5262 * src/closure.c (ruleset): Be a bitset.
5263 (rulesetsize): Remove.
5264
5265 2002-03-04 Akim Demaille <akim@epita.fr>
5266
5267 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5268 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5269 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5270 * src/closure.c (fderives): Be an array of bitsets.
5271
5272 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5273
5274 * data/bison.c++: Merge the two generated headers. Insert a copyright
5275 notice in each output file.
5276
5277 2002-02-28 Akim Demaille <akim@epita.fr>
5278
5279 * data/bison.c++: Copy the prologue of bison.simple to fetch
5280 useful M4 definitions, such as b4_header_guard.
5281
5282 2002-02-25 Akim Demaille <akim@epita.fr>
5283
5284 * src/getargs.c (version): Give the name of the authors, and use a
5285 translator friendly scheme for the bgr
5286 copyright notice.
5287
5288 2002-02-25 Akim Demaille <akim@epita.fr>
5289
5290 * src/output.c (header_output): Remove, now handled completely via
5291 M4.
5292
5293 2002-02-25 Akim Demaille <akim@epita.fr>
5294
5295 * m4/m4.m4: New, from CVS Autoconf.
5296 * configure.in: Invoke it.
5297 * src/output.c (output_skeleton): Use its result instead of the
5298 hard coded name.
5299
5300 2002-02-25 Akim Demaille <akim@epita.fr>
5301
5302 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5303 Fileutils 4.1.5.
5304 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5305 * src/output.c (output_skeleton): Use mkstemp to create a real
5306 temporary file.
5307 Move the filling of `skeleton' and its muscle to...
5308 (prepare): here.
5309 (output): Move the definition of the prologue muscle to...
5310 (prepare): here.
5311 * src/system.h (DEFAULT_TMPDIR): New.
5312
5313 2002-02-14 Paul Eggert <eggert@twinsun.com>
5314
5315 Remove the support for C++ namespace cleanliness; it was
5316 causing more problems than it was curing, since it didn't work
5317 properly on some nonstandard C++ compilers. This can wait
5318 for a proper C++ parser.
5319
5320 * NEWS: Document this.
5321 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5322 of C++, as it's treated like C now.
5323 * src/bison.simple (YYSTD): Remove.
5324 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5325 Treat C++ just like Standard C instead of trying to support
5326 namespace cleanliness.
5327
5328 2002-02-14 Akim Demaille <akim@epita.fr>
5329
5330 * tests/regression.at (else): Adjust to Andreas' change.
5331
5332 2002-02-14 Akim Demaille <akim@epita.fr>
5333
5334 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5335
5336 2002-02-13 Andreas Schwab <schwab@suse.de>
5337
5338 * src/output.c (output_rule_data): Don't output NULL, it might
5339 not be defined yet.
5340
5341 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5342
5343 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5344 (Copyright notice): Update.
5345
5346 2002-02-11 Akim Demaille <akim@epita.fr>
5347
5348 * tests/regression.at (%nonassoc and eof): Don't include
5349 nonportable headers.
5350
5351 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5352
5353 * data/bison.c++: Correct error recovery. Make the user able to
5354 initialize the starting location.
5355
5356 2002-02-07 Akim Demaille <akim@epita.fr>
5357
5358 * tests/input.at: New.
5359
5360 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5361
5362 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5363 more consistent when naming methods and variables. Put preprocessor
5364 directives around tables only needed for debugging.
5365
5366 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5367
5368 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5369 C++ parsers.
5370 (yy::b4_name::parse): Use print_.
5371
5372 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5373
5374 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5375
5376 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5377
5378 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5379 C++ parsers.
5380 (yy::b4_name::parse): Build verbose error messages, and use error_.
5381
5382 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5383
5384 * data/bison.c++: Fix m4 quoting in comments.
5385
5386 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5387
5388 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5389 not expanded by m4.
5390
5391 2002-02-05 Akim Demaille <akim@epita.fr>
5392
5393 * data/bison.c++: Adjust to the M4 back end.
5394 More is certainly needed.
5395
5396 2002-02-05 Akim Demaille <akim@epita.fr>
5397
5398 Give a try to M4 as a back end.
5399
5400 * lib/readpipe.c: New, from wdiff.
5401 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5402 BISON_HAIRY.
5403 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5404 specific values. Now it is m4 that performs the lookup.
5405 * src/parse-skel.y: Remove.
5406 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5407 * src/output.c (actions_output, guards_output)
5408 (token_definitions_output): No longer keeps track of the output
5409 line number, hence remove the second argument.
5410 (guards_output): Check against the guard member of a rule, not the
5411 action member.
5412 Adjust callers.
5413 (output_skeleton): Don't look for the skeleton location, let m4 do
5414 that.
5415 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5416 file will be used.
5417 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5418 (prepare): Given that for the time being changesyntax is not
5419 usable in M4, rename the muscles using `-' to `_'.
5420 Define `defines_flag', `output_parser_name' and `output_header_name'.
5421 * src/output.h (actions_output, guards_output)
5422 (token_definitions_output): Adjust prototypes.
5423 * src/scan-skel.l: Instead of scanning the skeletons, it now
5424 processes the output of m4: `__oline__' and `#output'.
5425 * data/bison.simple: Adjust to be used by M4(sugar).
5426 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5427 to date.
5428 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5429 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5430 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5431 shamelessly stolen from CVS Autoconf.
5432
5433 2002-02-05 Akim Demaille <akim@epita.fr>
5434
5435 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5436 * configure.in: Check for the declarations of free and malloc.
5437 * src/muscle_tab.c: Adjust.
5438
5439 2002-02-05 Akim Demaille <akim@epita.fr>
5440
5441 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5442 which have no values.
5443
5444 2002-02-05 Akim Demaille <akim@epita.fr>
5445
5446 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5447 * data/: here.
5448
5449 2002-01-29 Paul Eggert <eggert@twinsun.com>
5450
5451 * src/bison.simple (YYSIZE_T): Do not define merely because
5452 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5453 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5454
5455 2002-01-27 Akim Demaille <akim@epita.fr>
5456
5457 Fix `%nonassoc and eof'.
5458
5459 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5460 which were not properly copied! Replace
5461 memcpy (res->errs, src->errs, src->nerrs);
5462 with
5463 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5464 !!!
5465 * tests/regression.at (%nonassoc and eof): Adjust to newest
5466 Autotest: `.' is not in the PATH.
5467
5468 2002-01-27 Akim Demaille <akim@epita.fr>
5469
5470 * tests/sets.at (AT_EXTRACT_SETS): New.
5471 (Nullable): Use it.
5472 (Firsts): New.
5473
5474 2002-01-26 Akim Demaille <akim@epita.fr>
5475
5476 * tests/actions.at, tests/calc.at, tests/headers.at,
5477 * tests/torture.at: Adjust to the newest Autotest which no longer
5478 forces `.' in the PATH.
5479
5480 2002-01-25 Akim Demaille <akim@epita.fr>
5481
5482 * tests/regression.at (%nonassoc and eof): New.
5483 Suggested by Robert Anisko.
5484
5485 2002-01-24 Akim Demaille <akim@epita.fr>
5486
5487 Bison dumps core when trying to complain about broken input files.
5488 Reported by Cris van Pelt.
5489
5490 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5491 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5492 into...
5493 (Invalid inputs): Strengthen: exercise parse_percent_token.
5494
5495 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5496
5497 * src/Makefile.am: Add bison.c++.
5498 * src/bison.c++: New skeleton.
5499
5500 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5501
5502 * po/it.po: New.
5503
5504 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5505
5506 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5507
5508 2002-01-20 Marc Autret <marc@gnu.org>
5509
5510 * src/files.c (compute_output_file_names): Fix
5511
5512 2002-01-20 Marc Autret <marc@gnu.org>
5513
5514 * tests/output.at: New test.
5515 * src/files.c (compute_base_names): Don't map extensions when
5516 the YACC flag is set, use defaults.
5517 Reported by Evgeny Stambulchik.
5518
5519 2002-01-20 Marc Autret <marc@gnu.org>
5520
5521 * src/system.h: Need to define __attribute__ away for non-GCC
5522 compilers as well (i.e. the vendor C compiler).
5523 Suggested by Albert Chin-A-Young.
5524
5525 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5526
5527 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5528 canonical definition.
5529 * src/system.h: Use the canonical definition for PARAMS (avoids
5530 a conflict with the macro from lib/hash.h).
5531
5532 2002-01-11 Akim Demaille <akim@epita.fr>
5533
5534 * configure.in: Use AC_FUNC_STRNLEN.
5535 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5536
5537 2002-01-09 Akim Demaille <akim@epita.fr>
5538
5539 * src/files.c, src/files.h (output_infix): New.
5540 (tab_extension): Remove.
5541 (compute_base_names): Compute the former, drop the latter.
5542 * src/output.c (prepare): Insert the muscles `output-infix', and
5543 `output-suffix'.
5544 * src/parse-skel.y (string, string.1): New.
5545 (section.header): Use it.
5546 (section.yacc): Remove.
5547 (prefix): Remove too.
5548 * src/scan-skel.l: Adjust.
5549 * src/bison.simple, src/bison.hairy: Adjust.
5550
5551 2002-01-09 Akim Demaille <akim@epita.fr>
5552
5553 * configure.in (WERROR_CFLAGS): Compute it.
5554 * src/Makefile.am (CFLAGS): Pass it.
5555 * tests/atlocal.in (CFLAGS): Idem.
5556 * src/files.c: Fix a few warnings.
5557 (get_extension_index): Remove, unused.
5558
5559 2002-01-08 Akim Demaille <akim@epita.fr>
5560
5561 * src/getargs.c (AS_FILE_NAME): New.
5562 (getargs): Use it to convert DOSish file names.
5563 * src/files.c (base_name): Rename as full_base_name to avoid
5564 clashes with `base_name ()'.
5565 (filename_split): New.
5566 (compute_base_names): N-th rewrite, using filename_split.
5567
5568 2002-01-08 Akim Demaille <akim@epita.fr>
5569
5570 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5571 New, stolen from the Fileutils 4.1.
5572 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5573 * configure.in: Check for the presence of memrchr, and of its
5574 prototype.
5575
5576 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5577
5578 * lib/hash.h (__P): Added definition for this macro.
5579 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5580 BUILT_SOURCES, to ensure they are generated first.
5581 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5582 %error-verbose to allow bootstrapping with bison 1.30x.
5583
5584 2002-01-06 Akim Demaille <akim@epita.fr>
5585
5586 * src/reader.c (parse_braces): Don't fetch the next char, the
5587 convention is to fetch on entry.
5588 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5589 'switch' without a following semicolon.
5590 * tests/regression.at (braces parsing): New.
5591
5592 2002-01-06 Akim Demaille <akim@epita.fr>
5593
5594 Bison is dead wrong in its RR conflict reports.
5595
5596 * tests/torture.at (GNU Cim Grammar): New.
5597 * src/conflicts.c (count_rr_conflicts): Fix.
5598
5599 2002-01-06 Akim Demaille <akim@epita.fr>
5600
5601 Creating package.m4 from configure.ac causes too many problems.
5602
5603 * tests/Makefile.am (package.m4): Create it by hand,
5604 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5605
5606 2002-01-06 Akim Demaille <akim@epita.fr>
5607
5608 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5609 skeleton.h.
5610
5611 2002-01-04 Paul Eggert <eggert@twinsun.com>
5612
5613 * doc/bison.texinfo (Debugging):
5614 Remove YYSTDERR; it's no longer defined or used.
5615 Also, s/cstdio.h/cstdio/.
5616
5617 2002-01-03 Akim Demaille <akim@epita.fr>
5618
5619 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5620
5621 2002-01-03 Akim Demaille <akim@epita.fr>
5622
5623 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5624 tracing code to --trace, wait for a better --trace option, with
5625 args.
5626
5627 2002-01-03 Akim Demaille <akim@epita.fr>
5628
5629 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5630 The ISO C++ standard is extremely clear about it: stderr is
5631 considered a macro, not a regular symbol (see table 94 `Header
5632 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5633 Therefore std:: does not apply to it. It still does with fprintf.
5634 Also, s/cstdio.h/cstdio/.
5635
5636 2002-01-03 Akim Demaille <akim@epita.fr>
5637
5638 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5639 for non system headers.
5640
5641 2002-01-02 Akim Demaille <akim@epita.fr>
5642
5643 Equip the skeleton chain with location tracking, runtime trace,
5644 pure parser and scanner.
5645
5646 * src/parse-skel.y: Request a pure parser, locations, and prefix
5647 renaming.
5648 (%union): Having several members with the same type does not help
5649 type mismatches, simplify.
5650 (YYPRINT, yyprint): New.
5651 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5652 (skel_error): this.
5653 Handle locations.
5654 * src/scan-skel.l: Adjust to these changes.
5655 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5656 (LOCATION_PRINT, skel_control_t): New.
5657
5658 2001-12-30 Akim Demaille <akim@epita.fr>
5659
5660 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5661 replace `gb' with BLANKS.
5662 * src/scan-skel.l: Adjust.
5663
5664 2001-12-30 Akim Demaille <akim@epita.fr>
5665
5666 * src/system.h: We don't need nor want bcopy.
5667 Throw away MS-DOS crap: we don't need getpid.
5668 * configure.in: We don't need strndup. It was even causing
5669 problems: because Flex includes the headers *before* us,
5670 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5671 not visible.
5672 * lib/xstrndup.c: New.
5673 * src/scan-skel.l: Use it.
5674 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5675 * src/parse-skel.y: Use %directives instead of #defines.
5676
5677 2001-12-30 Akim Demaille <akim@epita.fr>
5678
5679 * src/skeleton.h: New.
5680 * src/output.c (output_parser, output_master_parser): Remove, dead
5681 code.
5682 * src/output.h (get_lines_number, actions_output, guards_output)
5683 (token_definitions_output): Prototype them.
5684 * src/parse-skel.y: Add the license notice.
5685 Include output.h and skeleton.h.
5686 (process_skeleton): Returns void, and takes a single parameter.
5687 * src/scan-skel.l: Add the license notice.
5688 Include skeleton.h.
5689 Don't use %option yylineno: it seems that then Flex imagines
5690 REJECT has been used, and therefore it won't reallocate its
5691 buffers (which makes no other sense to me than a bug). It results
5692 in warnings for `unused: yy_flex_realloc'.
5693
5694 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5695
5696 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5697 (MUSCLE_INSERT_PREFIX): ...to there.
5698 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5699 (MUSCLE_INSERT_PREFIX): Move from here...
5700
5701 * src/bison.hairy: Add a section directive. Put braces around muscle
5702 names. This parser skeleton is still broken, but Bison should not
5703 choke on a bad muscle 'syntax'.
5704 * src/bison.simple: Add a section directive. Put braces around muscle
5705 names.
5706
5707 * src/files.h (strsuffix, stringappend): Add declarations.
5708 (tab_extension): Add declaration.
5709 (short_base_name): Add declaration.
5710
5711 * src/files.c (strsuffix, stringappend): No longer static. These
5712 functions are used in the skeleton parser.
5713 (tab_extension): New.
5714 (compute_base_names): Use the computations done in this function
5715 to guess if the generated parsers should have '.tab' in their
5716 names.
5717 (short_base_name): No longer static.
5718
5719 * src/output.c (output_skeleton): New.
5720 (output): Disable call to output_master_parser, and give a try to
5721 a new skeleton handling system.
5722 (guards_output, actions_output): No longer static.
5723 (token_definitions_output, get_lines_number): No longer static.
5724
5725 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5726
5727 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5728 parse-skel.y.
5729
5730 * src/parse-skel.y: New file.
5731 * src/scan-skel.l: New file.
5732
5733 2001-12-29 Akim Demaille <akim@epita.fr>
5734
5735 %name-prefix is broken.
5736
5737 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5738 Adjust all dependencies.
5739 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5740 %name-prefix.
5741
5742 Renaming yylval but not yylloc is not consistent. Now we do.
5743
5744 * src/bison.simple: Prefix yylloc if used.
5745 * doc/bison.texinfo (Decl Summary): Document that.
5746
5747 2001-12-29 Akim Demaille <akim@epita.fr>
5748
5749 * doc/bison.texinfo: Promote `%long-directive' over
5750 `%long_directive'.
5751 Remove all references to fixed-output-files, yacc is enough.
5752
5753 2001-12-29 Akim Demaille <akim@epita.fr>
5754
5755 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5756 user prologue. These are defaults.
5757 * tests/actions.at (Mid-rule actions): Make sure the user can
5758 define YYDEBUG and YYERROR_VERBOSE.
5759
5760 2001-12-29 Akim Demaille <akim@epita.fr>
5761
5762 * src/output.c (header_output): Don't forget to export YYLTYPE and
5763 yylloc.
5764 * tests/headers.at (export YYLTYPE): New, make sure it does.
5765 * tests/regression.at (%union and --defines, Invalid CPP headers):
5766 Move to...
5767 * tests/headers.at: here.
5768
5769 2001-12-29 Akim Demaille <akim@epita.fr>
5770
5771 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5772
5773 2001-12-29 Akim Demaille <akim@epita.fr>
5774
5775 * tests/actions.at (Mid-rule actions): Output on a single line
5776 instead of several.
5777
5778 2001-12-29 Akim Demaille <akim@epita.fr>
5779
5780 * doc/bison.texinfo: Formatting changes.
5781
5782 2001-12-29 Akim Demaille <akim@epita.fr>
5783
5784 Don't store the token defs in a muscle, just be ready to output it
5785 on command. Now possible via `symbols'. Fixes a memory leak.
5786
5787 * src/output.c (token_definitions_output): New.
5788 (output_parser, header_output): Use it.
5789 * src/reader.c (symbols_save): Remove.
5790
5791 2001-12-29 Akim Demaille <akim@epita.fr>
5792
5793 * src/bison.simple: Do not provide a default for YYSTYPE and
5794 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5795 default.
5796
5797 2001-12-29 Akim Demaille <akim@epita.fr>
5798
5799 Mid-rule actions are simply... ignored!
5800
5801 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5802 the empty-rule associated to the dummy symbol, not to the host
5803 rule.
5804 * tests/actions.at (Mid-rule actions): New.
5805
5806 2001-12-29 Akim Demaille <akim@epita.fr>
5807
5808 Memory leak.
5809
5810 * src/reader.c (reader): Free grammar.
5811
5812 2001-12-29 Akim Demaille <akim@epita.fr>
5813
5814 Memory leak.
5815
5816 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5817 since it allocates it for each state, although only one is needed.
5818 (allocate_storage): Do it here.
5819
5820 2001-12-29 Akim Demaille <akim@epita.fr>
5821
5822 * src/options.h, src/options.c (create_long_option_table): Rename
5823 as...
5824 (long_option_table_new): this, with a clearer prototype.
5825 (percent_table): Remove, unused,
5826 * src/getargs.c (getargs): Adjust.
5827
5828 2001-12-29 Akim Demaille <akim@epita.fr>
5829
5830 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5831 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5832 as states.
5833
5834 2001-12-29 Akim Demaille <akim@epita.fr>
5835
5836 * src/lalr.c (build_relations): Rename `states' as `states1'.
5837 Sorry, I don't understand exactly what it is, no better name...
5838
5839 2001-12-29 Akim Demaille <akim@epita.fr>
5840
5841 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5842 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5843 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5844 as rules.
5845
5846 2001-12-29 Akim Demaille <akim@epita.fr>
5847
5848 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5849 ago.
5850
5851 2001-12-29 Akim Demaille <akim@epita.fr>
5852
5853 * src/reader.c, src/reader.h (user_toknums): Remove.
5854 Adjust all users to use symbols[i]->user_token_number.
5855
5856 2001-12-29 Akim Demaille <akim@epita.fr>
5857
5858 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5859 Adjust all users to use symbols[i]->prec or ->assoc.
5860
5861 2001-12-29 Akim Demaille <akim@epita.fr>
5862
5863 * src/reader.c, src/reader.h (tags): Remove.
5864 Adjust all users to use symbols[i]->tag.
5865
5866 2001-12-29 Akim Demaille <akim@epita.fr>
5867
5868 * src/gram.h, src/gram.c (symbols): New, similar to state_table
5869 and rule_table.
5870 * src/reader.c (packsymbols): Fill this table.
5871 Drop sprec.
5872 * src/conflicts.c (resolve_sr_conflict): Adjust.
5873 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
5874 single table.
5875 Use symbols[i]->tag instead of tags[i].
5876
5877 2001-12-29 Akim Demaille <akim@epita.fr>
5878
5879 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
5880 In addition, put a comment in there, to replace...
5881 * tests/regression.at (%union and C comments): Remove.
5882
5883 2001-12-29 Akim Demaille <akim@epita.fr>
5884
5885 * tests/regression.at (Web2c Actions): Blindly move the actual
5886 output as expected output. The contents *seem* right to me, but I
5887 can't pretend reading perfectly parser tables... Nonetheless, all
5888 the other tests pass correctly, the table look OK, even though the
5889 presence of `$axiom' is to be noted: AFAICS it is useless (but
5890 harmless).
5891
5892 2001-12-29 Akim Demaille <akim@epita.fr>
5893
5894 * src/reader.c (readgram): Don't add the rule 0 if there were no
5895 rules read. In other words, add it _after_ having performed
5896 grammar sanity checks.
5897 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
5898
5899 2001-12-29 Akim Demaille <akim@epita.fr>
5900
5901 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
5902 visible, and some states have now a different number.
5903
5904 2001-12-29 Akim Demaille <akim@epita.fr>
5905
5906 * src/reader.c (readgram): Bind the initial rule's lineno to that
5907 of the first rule.
5908 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
5909 (Solved SR Conflicts): Adjust rule 0's line number.
5910
5911 2001-12-29 Akim Demaille <akim@epita.fr>
5912
5913 Fix the `GAWK Grammar' failure.
5914
5915 * src/LR0.c (final_state): Initialize to -1 so that we do compute
5916 the reductions of the first state which was mistakenly confused
5917 with the final state because precisely final_state was initialized
5918 to 0.
5919 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
5920 now noticed by Bison.
5921 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
5922 have a reduction on $default.
5923
5924 2001-12-29 Akim Demaille <akim@epita.fr>
5925
5926 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
5927 rule line numbers.
5928 * src/closure.c (print_closure): Likewise.
5929 * src/derives.c (print_derives): Likewise.
5930 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
5931 now.
5932
5933 2001-12-29 Akim Demaille <akim@epita.fr>
5934
5935 * src/lalr.c (lookaheads_print): New.
5936 (lalr): Call it when --trace-flag.
5937 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
5938 are dumped.
5939
5940 2001-12-29 Akim Demaille <akim@epita.fr>
5941
5942 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
5943 when walking through ritem, even via rule->rhs.
5944 * src/reduce.c (dump_grammar, useful_production, reduce_output)
5945 (useful_production, useless_nonterminals): Likewise.
5946 (reduce_grammar_tables): Likewise, plus update nritems.
5947 * src/nullable.c (set_nullable): Likewise.
5948 * src/lalr.c (build_relations): Likewise.
5949 * tests/sets.at (Nullable): Adjust.
5950 Fortunately, now, the $axiom is no longer nullable.
5951
5952 2001-12-29 Akim Demaille <akim@epita.fr>
5953
5954 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
5955 the 0-sentinel.
5956 * src/gram.c (ritem_longest_rhs): Likewise.
5957 * src/reduce.c (nonterminals_reduce): Likewise.
5958 * src/print_graph.c (print_graph): Likewise.
5959 * src/output.c (output_rule_data): Likewise.
5960 * src/nullable.c (set_nullable): Likewise.
5961
5962 2001-12-29 Akim Demaille <akim@epita.fr>
5963
5964 * src/output.c: Comment changes.
5965
5966 2001-12-27 Paul Eggert <eggert@twinsun.com>
5967
5968 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
5969 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
5970 Sparc, as they were causing more porting problems than the
5971 (minor) performance improvement was worth.
5972
5973 Also, catch up with 1.31's YYSTD.
5974
5975 2001-12-27 Akim Demaille <akim@epita.fr>
5976
5977 * src/output.c (output_gram): Rely on nritems, not the
5978 0-sentinel. See below.
5979 Use -1 as separator, not 0.
5980 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
5981 Rely on -1 as separator in yyrhs, instead of 0.
5982 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
5983 twice `Now at end of input', therefore there are two lines less to
5984 expect.
5985
5986 2001-12-27 Akim Demaille <akim@epita.fr>
5987
5988 * tests/regression.at (Unresolved SR Conflicts):
5989 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
5990 below.
5991
5992 2001-12-27 Akim Demaille <akim@epita.fr>
5993
5994 * src/LR0.c (new_state): Recognize the final state by the fact it
5995 is reached by eoftoken.
5996 (insert_start_shifting_state, insert_eof_shifting_state)
5997 (insert_accepting_state, augment_automaton): Remove, since now
5998 these states are automatically computed from the initial state.
5999 (generate_states): Adjust.
6000 * src/print.c: When reporting a rule number to the user, substract
6001 1, so that the axiom rule is rule 0, and the first user rule is 1.
6002 * src/reduce.c: Likewise.
6003 * src/print_graph.c (print_core): For the time being, just as for
6004 the report, depend upon --trace-flags to dump the full set of
6005 items.
6006 * src/reader.c (readgram): Once the grammar read, insert the rule
6007 0: `$axiom: START-SYMBOL $'.
6008 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6009 number of the states has changed (the final state is no longer
6010 necessarily the last), catch up.
6011
6012 2001-12-27 Akim Demaille <akim@epita.fr>
6013
6014 Try to make the use of the eoftoken valid. Given that its value
6015 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6016 is used instead of > 0 where appropriate, (ii), depend upon nritems
6017 instead of the 0-sentinel.
6018
6019 * src/gram.h, src/gram.c (nritems): New.
6020 Expected to be duplication of nitems, but for the time being...
6021 * src/reader.c (packgram): Assert nritems and nitems are equal.
6022 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6023 * src/closure.c (print_closure, print_fderives): Likewise.
6024 * src/gram.c (ritem_print): Likewise.
6025 * src/print.c (print_core, print_grammar): Likewise.
6026 * src/print_graph.c: Likewise.
6027
6028 2001-12-27 Akim Demaille <akim@epita.fr>
6029
6030 * src/main.c (main): If there are complains after grammar
6031 reductions, then output the report anyway if requested, then die.
6032 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6033 * src/reader.c (eoftoken): New.
6034 (parse_token_decl): If the token being defined has value `0', it
6035 is the eoftoken.
6036 (packsymbols): No longer hack `tags' to insert `$' by hand.
6037 Be sure to preserve the value of the eoftoken.
6038 (reader): Make sure eoftoken is defined.
6039 Initialize nsyms to 0: now eoftoken is created just like the others.
6040 * src/print.c (print_grammar): Don't special case the eof token.
6041 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6042 lie anyway, albeit pleasant.
6043 * tests/calc.at: Exercise error messages with eoftoken.
6044 Change the grammar so that empty input is invalid.
6045 Adjust expectations.
6046 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6047
6048 2001-12-27 Akim Demaille <akim@epita.fr>
6049
6050 * configure.in: Check the protos of strchr ans strspn.
6051 Replace strchr if needed.
6052 * src/system.h: Provide the protos of strchr, strspn and memchr if
6053 missing.
6054 * lib/strchr.c: New.
6055 * src/reader.c (symbols_save): Use strchr.
6056
6057 2001-12-27 Akim Demaille <akim@epita.fr>
6058
6059 * src/print.c, src/print_graph.c (escape): New.
6060 Use it to quote the TAGS outputs.
6061 * src/print_graph.c (print_state): Now errors are in red, and
6062 reductions in green.
6063 Prefer high to wide: output the state number on a line of its own.
6064
6065 2001-12-27 Akim Demaille <akim@epita.fr>
6066
6067 * src/state.h, src/state.c (reductions_new): New.
6068 * src/LR0.c (set_state_table): Let all the states have a
6069 `reductions', even if reduced to 0.
6070 (save_reductions): Adjust.
6071 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6072 * src/print.c (print_reductions, print_actions): Adjust.
6073 * src/output.c (action_row): Adjust.
6074
6075 2001-12-27 Akim Demaille <akim@epita.fr>
6076
6077 * src/state.h, src/state.c (errs_new, errs_dup): New.
6078 * src/LR0.c (set_state_table): Let all the states have an errs,
6079 even if reduced to 0.
6080 * src/print.c (print_errs, print_reductions): Adjust.
6081 * src/output.c (output_actions, action_row): Adjust.
6082 * src/conflicts.c (resolve_sr_conflict): Adjust.
6083
6084 2001-12-27 Akim Demaille <akim@epita.fr>
6085
6086 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6087
6088 2001-12-27 Akim Demaille <akim@epita.fr>
6089
6090 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6091 * src/print.c: here.
6092 (lookaheadset, shiftset): New, used as additional storage by
6093 print_reductions.
6094 (print_results): Adjust.
6095 (print_shifts, print_gotos, print_errs): New, extracted from...
6096 (print_actions): here.
6097 * src/print_graph.c (print_actions): Remove dead code.
6098
6099 2001-12-27 Akim Demaille <akim@epita.fr>
6100
6101 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6102 `$n' and `@n'.
6103
6104 2001-12-27 Akim Demaille <akim@epita.fr>
6105
6106 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6107 (build_relations): Adjust.
6108
6109 2001-12-27 Akim Demaille <akim@epita.fr>
6110
6111 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6112 duplication.
6113
6114 2001-12-27 Akim Demaille <akim@epita.fr>
6115
6116 * src/reader.c (packgram): Catch nitems overflows.
6117
6118 2001-12-27 Akim Demaille <akim@epita.fr>
6119
6120 * src/files.c, src/files.h (guard_obstack): Remove.
6121 * src/output.c (output): Adjust.
6122 * src/reader.c (parse_braces): New, factoring...
6123 (copy_action, copy_guard): these two which are renamed as...
6124 (parse_action, parse_guard): these.
6125 As a voluntary consequence, using braces around guards is now
6126 mandatory.
6127
6128 2001-12-27 Akim Demaille <akim@epita.fr>
6129
6130 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6131 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6132 members.
6133 (symbol_list_new): Adjust.
6134 (copy_action): action_line is the first line, not the last.
6135 (copy_guard): Just as for actions, store the `action' only, not
6136 the switch/case/break flesh.
6137 Don't parse the user action that might follow the guard, let...
6138 (readgram): do it, i.e., now, there can be an action after a
6139 guard.
6140 In other words the guard is just explicitly optional.
6141 (packgram): Adjust.
6142 * src/output.c (guards_output): New.
6143 (output_parser): Call it when needed.
6144 (output): Also free the guard and attrs obstacks.
6145 * src/files.c, src/files.h (obstack_save): Remove.
6146 (output_files): Remove.
6147 As a result, if one needs the former `.act' file, using an
6148 appropriate skeleton which requires actions and guards is now
6149 required.
6150 * src/main.c (main): Adjust.
6151 * tests/semantic.at: New.
6152 * tests/regression.at: Use `input.y' as input file name.
6153 Avoid 8+3 problems by requiring input.c when the test needs the
6154 parser.
6155
6156 2001-12-27 Akim Demaille <akim@epita.fr>
6157
6158 * src/reader.c (symbol_list_new): Be sure to initialize all the
6159 fields.
6160
6161 2001-12-27 Akim Demaille <akim@epita.fr>
6162
6163 All the hacks using a final pseudo state are now useless.
6164
6165 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6166 * src/lalr.c (nLA): New.
6167 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6168 instead of lookaheadsp from the pseudo state (nstate + 1).
6169
6170 2001-12-27 Akim Demaille <akim@epita.fr>
6171
6172 * src/output.c (action_row, token_actions): Use a state_t instead
6173 of a integer, and nlookaheads instead of the following state's
6174 lookaheadsp.
6175
6176 2001-12-27 Akim Demaille <akim@epita.fr>
6177
6178 * src/conflicts.c (log_resolution, flush_shift)
6179 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6180 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6181 (conflicts_print, print_reductions): Use a state_t instead of an
6182 integer when referring to a state.
6183 As much as possible, depend upon nlookaheads, instead of the
6184 `lookaheadsp' member of the following state (since lookaheads of
6185 successive states are successive, the difference between state n + 1
6186 and n served as the number of lookaheads for state n).
6187 * src/lalr.c (add_lookback_edge): Likewise.
6188 * src/print.c (print_core, print_actions, print_state)
6189 (print_results): Likewise.
6190 * src/print_graph.c (print_core, print_actions, print_state)
6191 (print_graph): Likewise.
6192 * src/conflicts.h: Adjust.
6193
6194 2001-12-27 Akim Demaille <akim@epita.fr>
6195
6196 * src/bison.hairy: Formatting/comment changes.
6197 ANSIfy.
6198 Remove `register' indications.
6199 Add plenty of `static'.
6200
6201 2001-12-27 Akim Demaille <akim@epita.fr>
6202
6203 * src/output.c (prepare): Drop the muscle `ntbase' which
6204 duplicates ntokens.
6205 * src/bison.simple: Formatting/comment changes.
6206 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6207 is an undocumented synonym.
6208
6209 2001-12-22 Akim Demaille <akim@epita.fr>
6210
6211 * src/output.c (output_table_data): Change the prototype to use
6212 `int' for array ranges: some invocations do pass an int, not a
6213 short.
6214 Reported by Wayne Green.
6215
6216 2001-12-22 Akim Demaille <akim@epita.fr>
6217
6218 Some actions of web2c.y are improperly triggered.
6219 Reported by Mike Castle.
6220
6221 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6222 * tests/regression.at (Web2c): Rename as...
6223 (Web2c Report): this.
6224 (Web2c Actions): New.
6225
6226 2001-12-22 Akim Demaille <akim@epita.fr>
6227
6228 Reductions in web2c.y are improperly reported.
6229 Reported by Mike Castle.
6230
6231 * src/conflicts.c (print_reductions): Fix.
6232 * tests/regression.at (Web2c): New.
6233
6234 2001-12-18 Akim Demaille <akim@epita.fr>
6235
6236 Some host fail on `assert (!"foo")', which expands to
6237 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6238 Reported by Nelson Beebee.
6239
6240 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6241 `#define it_succeeded 0' and `assert (it_succeeded)'.
6242
6243 2001-12-17 Marc Autret <autret_m@epita.fr>
6244
6245 * src/bison.simple: Don't hard code the skeleton line and filename.
6246 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6247 New line counter 'skeleton_line' (skeleton-line muscle).
6248
6249 2001-12-17 Paul Eggert <eggert@twinsun.com>
6250
6251 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6252 YYDEBUG must be defined to a nonzero value.
6253
6254 * src/bison.simple (yytname): Do not assume that the user defines
6255 YYDEBUG to a properly parenthesized expression.
6256
6257 2001-12-17 Akim Demaille <akim@epita.fr>
6258
6259 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6260 nlookaheads is a new member.
6261 Adjust all users.
6262 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6263 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6264 state.
6265
6266 2001-12-17 Akim Demaille <akim@epita.fr>
6267
6268 * src/files.h, src/files.c (open_files, close_files): Remove.
6269 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6270 let...
6271 * src/reader.c (reader): Do it.
6272
6273 2001-12-17 Akim Demaille <akim@epita.fr>
6274
6275 * src/conflicts.c (print_reductions): Formatting changes.
6276
6277 2001-12-17 Akim Demaille <akim@epita.fr>
6278
6279 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6280 (flush_reduce): New.
6281 (resolve_sr_conflict): Adjust.
6282
6283 2001-12-17 Akim Demaille <akim@epita.fr>
6284
6285 * src/output.c (output_obstack): Be static and rename as...
6286 (format_obstack): this, to avoid any confusion with files.c's
6287 output_obstack.
6288 * src/reader.h (muscle_obstack): Move to...
6289 * src/output.h: here, since it's defined in output.c.
6290
6291 2001-12-17 Akim Demaille <akim@epita.fr>
6292
6293 * src/output.c (action_row, save_column, default_goto)
6294 (sort_actions, matching_state, pack_vector): Better variable
6295 locality.
6296
6297 2001-12-17 Akim Demaille <akim@epita.fr>
6298
6299 * src/output.c: Various formatting changes.
6300
6301 2001-12-17 Akim Demaille <akim@epita.fr>
6302
6303 * src/files.c (output_files): Free the output_obstack.
6304 * src/main.c (main): Call print and print_graph conditionally.
6305 * src/print.c (print): Work unconditionally.
6306 * src/print_graph.c (print_graph): Work unconditionally.
6307 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6308
6309 2001-12-16 Marc Autret <autret_m@epita.fr>
6310
6311 * src/output.c (actions_output): Fix. When we use %no-lines,
6312 there is one less line per action.
6313
6314 2001-12-16 Marc Autret <autret_m@epita.fr>
6315
6316 * src/bison.simple: Remove a useless #line directive.
6317 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6318 * src/output.c (get_lines_number): New.
6319 (output_parser): Adjust, now takes care about the lines of a
6320 output muscles.
6321 Fix line numbering.
6322 (actions_output): Computes the number of lines taken by actions.
6323 (output_master_parser): Insert new skeleton which is the name of
6324 the output parser file name.
6325
6326 2001-12-15 Marc Autret <autret_m@epita.fr>
6327
6328 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6329
6330 2001-12-15 Marc Autret <autret_m@epita.fr>
6331
6332 * src/output.c (output_gram): Keep track of the hairy one.
6333
6334 2001-12-15 Akim Demaille <akim@epita.fr>
6335
6336 Make `make distcheck' work.
6337
6338 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6339 system.h which uses libgettext.h.
6340
6341 2001-12-15 Akim Demaille <akim@epita.fr>
6342
6343 * src/nullable.c (set_nullable): Useless rules must be skipped,
6344 otherwise, since we range over their symbols, we might look at a
6345 nonterminal which no longer ``exists'', i.e., it is not counted in
6346 `nvars', hence we overflow our arrays.
6347
6348 2001-12-15 Akim Demaille <akim@epita.fr>
6349
6350 The header can also be produced directly, without any obstack!
6351 Yahoo!
6352
6353 * src/files.c, src/files.h (defines_obstack): Remove.
6354 (compute_header_macro): Global.
6355 (defines_obstack_save): Remove.
6356 * src/reader.c (parse_union_decl): No longer output to
6357 defines_obstack: its content can be found in the `stype' muscle
6358 anyway.
6359 (output_token_translations): Merge into...
6360 (symbols_output): this.
6361 Rename as...
6362 (symbols_save): this.
6363 (reader): Adjust.
6364 * src/output.c (header_output): New.
6365 (output): Call it.
6366
6367 2001-12-15 Akim Demaille <akim@epita.fr>
6368
6369 * src/reader.c (parse_union_decl): Instead of handling two obstack
6370 simultaneously, use one to define the `stype' muscle, and use the
6371 value of the latter to fill defines_obstack.
6372 (copy_comment): Remove.
6373 (copy_comment2): Work for a single obstack.
6374 Rename as...
6375 (copy_comment): this.
6376
6377 2001-12-15 Akim Demaille <akim@epita.fr>
6378
6379 * src/lex.c, src/lex.h (xgetc): No longer static.
6380 * src/reader.c (parse_union_decl): Revamp.
6381
6382 2001-12-15 Akim Demaille <akim@epita.fr>
6383
6384 Still making progress in separating Bison into (i) input, (ii)
6385 process, (iii) output: now we can directly output the parser file
6386 without using table_obstack at all.
6387
6388 * src/files.c, src/files.h (table_obstack): Bye bye.
6389 (parser_file_name): New.
6390 * src/files.c (compute_output_file_names): Compute it.
6391 * src/output.c (actions_output, output_parser)
6392 (output_master_parser): To a file instead of an obstack.
6393
6394 2001-12-15 Akim Demaille <akim@epita.fr>
6395
6396 Attach actions to rules, instead of pre-outputting them to
6397 actions_obstack.
6398
6399 * src/gram.h (rule_t): action and action_line are new members.
6400 * src/reader.c (symbol_list): Likewise.
6401 (copy_action): Save the actions within the rule.
6402 (packgram): Save them in rule_table.
6403 * src/output.c (actions_output): New.
6404 (output_parser): Use it on `%%actions'.
6405 (output_rule_data): Don't free rule_table.
6406 (output): Do it.
6407 (prepare): Don't save the `action' muscle.
6408 * src/bison.simple: s/%%action/%%actions/.
6409
6410 2001-12-15 Akim Demaille <akim@epita.fr>
6411
6412 * src/reader.c (copy_action): When --yacc, don't append a `;'
6413 to the user action: let it fail if lacking.
6414 Suggested by Arnold Robbins and Tom Tromey.
6415
6416 2001-12-14 Akim Demaille <akim@epita.fr>
6417
6418 * src/lex.c (literalchar): Simply return the char you decoded, non
6419 longer mess around with obstacks and int pointers.
6420 Adjust all callers.
6421
6422 2001-12-14 Akim Demaille <akim@epita.fr>
6423
6424 * src/lex.c (literalchar): Don't escape the special characters,
6425 just decode them, and keep them as char (before, eol was output as
6426 the 2 char string `\n' etc.).
6427 * src/output.c (output_rule_data): Use quotearg to output the
6428 token strings.
6429
6430 2001-12-13 Paul Eggert <eggert@twinsun.com>
6431
6432 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6433 Do not infringe on the global user namespace when using C++.
6434 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6435 All uses of `fprintf' and `stderr' changed.
6436
6437 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6438
6439 2001-12-13 Akim Demaille <akim@epita.fr>
6440
6441 The computation of nullable is broken: it doesn't handle empty
6442 RHS's properly.
6443
6444 * tests/torture.at (GNU AWK Grammar): New.
6445 * tests/sets.at (Nullable): New.
6446 * src/nullable.c (set_nullable): Instead of blindly looping over
6447 `ritems', loop over the rules, and then over their rhs's.
6448
6449 Work around Autotest bugs.
6450
6451 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6452 frame, because Autotest understand lines starting with a `+' as
6453 traces from the shell. Then, they are not processed properly.
6454 Admittedly an Autotest bug, but we don't have time to wait for
6455 Autotest to catch up.
6456 * tests/regression.at (Broken Closure): Adjust to the new table
6457 frames.
6458 Move to...
6459 * tests/sets.at: here.
6460
6461 2001-12-13 Akim Demaille <akim@epita.fr>
6462
6463 * src/closure.c (closure): Use nrules instead of playing tricks
6464 with BITS_PER_WORD.
6465
6466 2001-12-13 Akim Demaille <akim@epita.fr>
6467
6468 * src/print.c (print_actions): Output the handling of `$' as the
6469 traces do: shifting the token EOF. Before EOF was treated as a
6470 nonterminal.
6471 * tests/regression.at: Adjust some tests.
6472 * src/print_graph.c (print_core): Complete the set of items via
6473 closure. The next-to-final and final states are still unsatisfying,
6474 but that's to be addressed elsewhere.
6475 No longer output the rule numbers, but do output the state number.
6476 A single loop for the shifts + gotos is enough, but picked a
6477 distinct color for each.
6478 (print_graph): Initialize and finalize closure.
6479
6480 2001-12-13 Akim Demaille <akim@epita.fr>
6481
6482 * src/reader.c (readgram): Remove dead code, an strip useless
6483 braces.
6484 (get_type): Remove, unused.
6485
6486 2001-12-12 Akim Demaille <akim@epita.fr>
6487
6488 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6489 on that of lib/error.c.
6490
6491 2001-12-12 Akim Demaille <akim@epita.fr>
6492
6493 Some hosts don't like `/' in includes.
6494
6495 * src/system.h: Include libgettext.h without qualifying the path.
6496 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6497 $(top_srcdir).
6498
6499 2001-12-11 Marc Autret <autret_m@epita.fr>
6500
6501 * src/output.c (output_parser): Remove useless muscle.
6502
6503 2001-12-11 Marc Autret <autret_m@epita.fr>
6504
6505 * src/bison.simple: Remove #line just before %%epilogue. It
6506 is now handled in ...
6507 * src/reader.c (read_additionnal_code): Add the output of a
6508 #line for the epilogue.
6509
6510 2001-12-10 Marc Autret <autret_m@epita.fr>
6511
6512 * src/reader.c (copy_definition): Re-use CPP-outed code which
6513 replace precedent remove.
6514 * src/bison.simple: Remove #line before %%prologue because
6515 %%input-line is wrong at this time.
6516
6517 2001-12-10 Marc Autret <autret_m@epita.fr>
6518
6519 * src/reader.c (symbols_output): Clean up.
6520 * src/output.c (output_gram, output): Clean up.
6521
6522 2001-12-10 Akim Demaille <akim@epita.fr>
6523
6524 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6525 * src/LR0.c (set_state_table): here.
6526 * src/lalr.c (lalr): Call it.
6527
6528 2001-12-10 Akim Demaille <akim@epita.fr>
6529
6530 * src/state.h (shifts): Remove the `number' member: shifts are
6531 attached to state, hence no longer need to be labelled with a
6532 state number.
6533
6534 2001-12-10 Akim Demaille <akim@epita.fr>
6535
6536 Now that states have a complete set of members, the linked list of
6537 shifts is useless: just fill directly the state's shifts member.
6538
6539 * src/state.h (shifts): Remove the `next' member.
6540 * src/LR0.c (first_state, last_state): Remove.
6541 Adjust the callers.
6542 (augment_automaton): Don't look for the shifts that must be added
6543 a shift on EOF: it is those of the state we looked for! But now,
6544 since shifts are attached, it is no longer needed to looking
6545 merely by its id: its number.
6546
6547 2001-12-10 Akim Demaille <akim@epita.fr>
6548
6549 * src/LR0.c (augment_automaton): Better variable locality.
6550 Remove an impossible branch: if there is a state corresponding to
6551 the start symbol being shifted, then there is shift for the start
6552 symbol from the initial state.
6553
6554 2001-12-10 Akim Demaille <akim@epita.fr>
6555
6556 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6557 only when appropriate: when insert_start_shifting_state' is not
6558 invoked.
6559 * tests/regression.at (Rule Line Numbers): Adjust.
6560
6561 2001-12-10 Akim Demaille <akim@epita.fr>
6562
6563 * src/LR0.c (augment_automaton): Now that all states have shifts,
6564 merge the two cases addition shifts to the initial state.
6565
6566 2001-12-10 Akim Demaille <akim@epita.fr>
6567
6568 * src/lalr.c (set_state_table): Move to...
6569 * src/LR0.c: here.
6570 * src/lalr.c (lalr): Don't call it...
6571 * src/LR0.c (generate_states): do it.
6572 * src/LR0.h (first_state): Remove, only the table is used.
6573
6574 2001-12-10 Akim Demaille <akim@epita.fr>
6575
6576 * src/LR0.h (first_shift, first_reduction): Remove.
6577 * src/lalr.c: Don't use first_shift: find shifts through the
6578 states.
6579
6580 2001-12-10 Akim Demaille <akim@epita.fr>
6581
6582 * src/LR0.c: Attach shifts to states as soon as they are
6583 computed.
6584 * src/lalr.c (set_state_table): Instead of assigning shifts to
6585 state, just assert that the mapping was properly done.
6586
6587 2001-12-10 Akim Demaille <akim@epita.fr>
6588
6589 * src/LR0.c (insert_start_shift): Rename as...
6590 (insert_start_shifting_state): this.
6591 (insert_eof_shifting_state, insert_accepting_state): New.
6592 (augment_automaton): Adjust.
6593 Better locality of the variables.
6594 When looking if the start_symbol is shifted from the initial
6595 state, using `while (... symbol != start_symbol ...)' sounds
6596 better than `while (... symbol < start_symbol ...)': If fail
6597 to see how the order between symbols could be relevant!
6598
6599 2001-12-10 Akim Demaille <akim@epita.fr>
6600
6601 * src/getargs.h: Don't declare `spec_name_prefix' and
6602 `spec_file_prefix', declared by src/files.h.
6603 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6604 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6605 * src/output.c (prepare): Adjust.
6606 * src/reader.c (symbols_output): Likewise.
6607 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6608
6609 2001-12-10 Akim Demaille <akim@epita.fr>
6610
6611 * src/muscle_tab.c (muscle_init): NULL is a better default than
6612 `"0"'.
6613
6614 2001-12-10 Akim Demaille <akim@epita.fr>
6615
6616 * src/reader.c (reader): Calling symbols_output once is enough.
6617
6618 2001-12-10 Akim Demaille <akim@epita.fr>
6619
6620 Now that states have a complete set of members, the linked list of
6621 reductions is useless: just fill directly the state's reductions
6622 member.
6623
6624 * src/state.h (struct reductions): Remove member `number' and
6625 `next'.
6626 * src/LR0.c (first_reduction, last_reduction): Remove.
6627 (save_reductions): Don't link the new reductions, store them in
6628 this_state.
6629 * src/lalr.c (set_state_table): No need to attach reductions to
6630 states, it's already done.
6631 * src/output.c (output_actions): No longer free the shifts, then
6632 the reductions, then the states: free all the states and their
6633 members.
6634
6635 2001-12-10 Akim Demaille <akim@epita.fr>
6636
6637 * src/options.c (OPTN, DRTV, BOTH): New.
6638 (option_table): Use them.
6639
6640 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6641 the job of system.h.
6642 * src/options.c: Don't include stdio.h and xalloc.h for the same
6643 reasons.
6644
6645 2001-12-10 Akim Demaille <akim@epita.fr>
6646
6647 * src/output.c (output, prepare): Make sure the values of the
6648 muscles `action' and `prologue' are 0-terminated.
6649
6650 2001-12-10 Akim Demaille <akim@epita.fr>
6651
6652 Clean up GCC warnings.
6653
6654 * src/reader.c (copy_action): `buf' is not used.
6655 (parse_skel_decl): Be static.
6656 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6657 * src/options.h (create_long_option_table): Have a real prototype.
6658 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6659 (hash_delete_at): Return const void *.
6660 Adjust casts to preserve the const.
6661
6662 2001-12-10 Akim Demaille <akim@epita.fr>
6663
6664 * configure.in: Require 2.52g.
6665 M4 is not needed, but AUTOM4TE is.
6666 * m4/m4.m4: Remove.
6667 * tests/Makefile.am: Adjust.
6668
6669 2001-12-10 Akim Demaille <akim@epita.fr>
6670
6671 One structure for states is enough, even though theoretically
6672 there are LR(0) states and LALR(1) states.
6673
6674 * src/lalr.h (state_t): Remove.
6675 (state_table): Be state_t **, not state_t *.
6676 * src/state.h (core, CORE_ALLOC): Rename as...
6677 (state_t, STATE_ALLOC): this.
6678 Add the LALR(1) members: shifts, reductions, errs.
6679 * src/LR0.c (state_table): Rename as...
6680 (state_hash): this, to avoid name clashes with the global
6681 `state_table'.
6682 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6683 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6684
6685 2001-12-10 Akim Demaille <akim@epita.fr>
6686
6687 Bison dumps core on bash.y.
6688 Reported by Pascal Bart.
6689
6690 * src/warshall.c (bitmatrix_print): New.
6691 (TC): Use it.
6692 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6693 j must be the outer loop.
6694 * tests/regression.at (Broken Closure): New.
6695
6696 2001-12-05 Akim Demaille <akim@epita.fr>
6697
6698 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6699 its argument.
6700 Reported by Peter Hámorský.
6701
6702 2001-12-05 Akim Demaille <akim@epita.fr>
6703
6704 * src/conflicts.c (err_table): Remove.
6705 (resolve_sr_conflict): Adjust.
6706 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6707 Rename as...
6708 (state_t.reductions, state_t.shifts): this.
6709
6710 2001-12-05 Akim Demaille <akim@epita.fr>
6711
6712 * src/reduce.c (reduce_grammar_tables): No longer disable the
6713 removal of useless rules via CPP but via `if (0)', so that the
6714 compiler still check the code is valid.
6715 For instance, it should have noticed `rline' no longer exists: use
6716 the `line' member of rule_t.
6717 * src/gram.c (dummy, rline): Remove, unused.
6718
6719 2001-12-05 Akim Demaille <akim@epita.fr>
6720
6721 * src/output.c (pack_vector): Use assert, not berror.
6722 * src/main.c (berror): Remove, unused.
6723
6724 2001-12-05 Akim Demaille <akim@epita.fr>
6725
6726 New experimental feature: if --verbose --trace output all the
6727 items of a state, not only its kernel.
6728
6729 * src/print.c (print_core): If `trace_flag', then invoke closure
6730 before outputting the items of the state (print_core is no longer
6731 a correct name them).
6732 (print_results): Invoke new_closure/free_closure if needed.
6733
6734 2001-12-05 Akim Demaille <akim@epita.fr>
6735
6736 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6737 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6738 (nitemset): for consistency with the rest of the project.
6739
6740 2001-12-05 Akim Demaille <akim@epita.fr>
6741
6742 * src/closure.c (print_closure): Improve.
6743 (closure): Use it for printing input and output.
6744
6745 2001-12-05 Akim Demaille <akim@epita.fr>
6746
6747 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6748 indexed by nonterminals.
6749
6750 2001-12-05 Akim Demaille <akim@epita.fr>
6751
6752 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6753 what it was!).
6754 * src/warshall.h: Remove accidental duplication of the content.
6755
6756 2001-12-05 Akim Demaille <akim@epita.fr>
6757
6758 * src/closure.c (set_fderives): De-obfuscate.
6759
6760 2001-12-05 Akim Demaille <akim@epita.fr>
6761
6762 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6763
6764 2001-12-05 Akim Demaille <akim@epita.fr>
6765
6766 * src/closure.c (set_firsts): De-obfuscate.
6767
6768 2001-12-05 Akim Demaille <akim@epita.fr>
6769
6770 * src/output.c (action_row): De-obfuscate
6771 using the good o' techniques: arrays not pointers, variable
6772 locality, BITISSET, RESETBIT etc.
6773
6774 2001-12-05 Akim Demaille <akim@epita.fr>
6775
6776 Pessimize the code to simplify it: from now on, all the states
6777 have a valid SHIFTS, which NSHIFTS is possibly 0.
6778
6779 * src/LR0.c (shifts_new): Be global and move to..
6780 * src/state.c, src/state.h: here.
6781 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6782 * src/print_graph: Adjust.
6783
6784 2001-12-05 Akim Demaille <akim@epita.fr>
6785
6786 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6787 * src/conflicts.c: Use it.
6788 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6789 incorrectly ``simplified''.
6790
6791 2001-12-05 Akim Demaille <akim@epita.fr>
6792
6793 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6794 using the good o' techniques: arrays not pointers, variable
6795 locality, BITISSET, RESETBIT etc.
6796
6797 2001-12-05 Akim Demaille <akim@epita.fr>
6798
6799 * src/state.h (SHIFT_SYMBOL): New.
6800 * src/conflicts.c: Use it to deobfuscate.
6801
6802 2001-12-05 Akim Demaille <akim@epita.fr>
6803
6804 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6805 (print_reductions): De-obfuscate using the good o' techniques:
6806 arrays not pointers, variable locality, BITISSET.
6807
6808 2001-12-05 Akim Demaille <akim@epita.fr>
6809
6810 * src/conflicts.c (print_reductions): Arrays, not pointers.
6811 Use BITISSET.
6812
6813 2001-12-05 Akim Demaille <akim@epita.fr>
6814
6815 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6816
6817 2001-12-05 Akim Demaille <akim@epita.fr>
6818
6819 * src/conflicts.c (print_reductions): Improve variable locality.
6820
6821 2001-12-05 Akim Demaille <akim@epita.fr>
6822
6823 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6824
6825 2001-12-05 Akim Demaille <akim@epita.fr>
6826
6827 * src/conflicts.c (print_reductions): Improve variable locality.
6828
6829 2001-12-05 Akim Demaille <akim@epita.fr>
6830
6831 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6832 * src/lalr.c: Use them.
6833
6834 2001-12-05 Akim Demaille <akim@epita.fr>
6835
6836 * src/LR0.c (augment_automaton): Formatting changes.
6837 Better variable locality.
6838
6839 2001-12-05 Akim Demaille <akim@epita.fr>
6840
6841 * src/lalr.c (matrix_print): New.
6842 (transpose): Use it.
6843 Use arrays instead of pointers.
6844
6845 2001-12-05 Akim Demaille <akim@epita.fr>
6846
6847 * src/lalr.c (maxrhs): Move to...
6848 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6849 * src/lalr.c (build_relations): Adjust.
6850
6851 2001-12-05 Akim Demaille <akim@epita.fr>
6852
6853 * src/lalr.c (transpose): Free the memory allocated to the
6854 argument, as it is replaced by the results by the unique caller.
6855 (build_relations): Merely invoke transpose: it handles the memory
6856 deallocation.
6857 Improve variable locality.
6858 Avoid variables used as mere abbreviations.
6859 (compute_lookaheads): Use arrays instead of pointers.
6860
6861 2001-12-05 Akim Demaille <akim@epita.fr>
6862
6863 * src/lalr.c (initialize_F): Improve variable locality.
6864 Avoid variables used as mere abbreviations.
6865
6866 2001-12-05 Akim Demaille <akim@epita.fr>
6867
6868 * src/derives.c (print_derives): Display the ruleno.
6869 * src/lalr.c (initialize_F, transpose): Better variable locality
6870 to improve readability.
6871 Avoid variables used as mere abbreviations.
6872
6873 2001-12-05 Akim Demaille <akim@epita.fr>
6874
6875 * src/lalr.c (traverse): Use arrays instead of pointers.
6876
6877 2001-12-05 Akim Demaille <akim@epita.fr>
6878
6879 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
6880 the handling of squeue.
6881 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6882
6883 2001-12-05 Akim Demaille <akim@epita.fr>
6884
6885 Because useless nonterminals are now kept alive (instead of being
6886 `destroyed'), we now sometimes examine them, and store information
6887 related to them. Hence we need to know their number, and adjust
6888 memory allocations.
6889
6890 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
6891 static.
6892 * src/LR0.c (allocate_itemsets): The memory allocated to
6893 `symbol_count' was used for two different purpose: once to count
6894 the number of occurrences of each symbol, and later reassigned to
6895 `shift_symbol', containing the symbol that can be shifted from a
6896 given state.
6897 Deobfuscate, i.e., allocate, use and free `symbol_count' here
6898 only, and...
6899 (new_itemsets): Allocate `shift_symbol' here.
6900 (allocate_itemsets): symbol_count includes useless nonterminals.
6901 Make room for them.
6902 (free_storage): Use `free', not `XFREE', for pointers that cannot
6903 be null.
6904
6905 2001-12-05 Akim Demaille <akim@epita.fr>
6906
6907 * src/nullable.c (set_nullable): Deobfuscate the handling of
6908 ritem.
6909 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6910
6911 2001-12-05 Akim Demaille <akim@epita.fr>
6912
6913 * src/gram.c, src/gram.h (ritem_print): New.
6914 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
6915 (This useless function was defined only to work around VMS linkers
6916 that can't handle compilation units with variables only).
6917 * src/reduce.c (dump_grammar): Use it to trace the construction of
6918 ritem.
6919
6920 2001-12-04 Paul Eggert <eggert@twinsun.com>
6921
6922 * src/bison.simple (union yyalloc): Change member names
6923 to be the same as the stack names.
6924 (yyparse): yyptr is now union yyalloc *, not char *.
6925 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
6926 and may generate better code on some machines.
6927 (yystpcpy): Use prototype if __STDC__ is defined, not just
6928 if __cplusplus is defined.
6929
6930 2001-11-30 Akim Demaille <akim@epita.fr>
6931
6932 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
6933 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
6934 Gettext doesn't compile cleanly, and dies with -Werror.
6935 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
6936 Include WARNING_CFLAGS here.
6937 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
6938 before being defined.
6939
6940 2001-11-27 Paul Eggert <eggert@twinsun.com>
6941
6942 * lib/quotearg.h (quotearg_n, quotearg_n_style):
6943 First arg is int, not unsigned.
6944 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
6945 (SIZE_MAX, UINT_MAX): New macros.
6946 (quotearg_n_options): Abort if N is negative.
6947 Avoid overflow check on hosts where size_t is 64 bits and int
6948 is 32 bits, as overflow is impossible there.
6949 Fix off-by-one typo that caused unnecessary reallocation.
6950
6951 2001-11-29 Paul Eggert <eggert@twinsun.com>
6952
6953 Name space cleanup in generated parser.
6954
6955 * doc/bison.texinfo (Bison Parser): Discuss system headers
6956 and their effect on the user name space.
6957
6958 * src/bison.simple:
6959 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
6960 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
6961 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
6962
6963 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
6964 on user names when possible.
6965
6966 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
6967 Simplify test for whather <alloca.h> exists.
6968
6969 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
6970
6971 (<stdio.h>): Include if YYDEBUG.
6972
6973 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
6974 ! defined (yyoverflow) && ! defined (yymemcpy).
6975
6976 (yymemcpy, yyparse): Rename local variables as needed so that
6977 they all begin with 'yy'.
6978
6979 (yystrlen, yystpcpy): New functions.
6980
6981 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
6982 All uses changed.
6983
6984 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
6985 instead of relying on string.h functions. Use YYSTACK_ALLOC
6986 and YYSTACK_FREE instead of malloc and free.
6987
6988 2001-11-30 Akim Demaille <akim@epita.fr>
6989
6990 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
6991 before their first uses.
6992 (YYBISON, YYPURE): Move to the top of the output.
6993
6994 2001-11-30 Akim Demaille <akim@epita.fr>
6995
6996 * tests/reduce.at (Useless Nonterminals): Fix.
6997
6998 2001-11-30 Akim Demaille <akim@epita.fr>
6999
7000 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7001 if body instead of `;' to pacify GCC's warnings.
7002
7003 2001-11-30 Akim Demaille <akim@epita.fr>
7004
7005 Instead of mapping the LHS of unused rules to -1, keep the LHS
7006 valid, but flag the rules as invalid.
7007
7008 * src/gram.h (rule_t): `useful' is a new member.
7009 * src/print.c (print_grammar): Adjust.
7010 * src/derives.c (set_derives): Likewise.
7011 * src/reader.c (packgram, reduce_output): Likewise.
7012 * src/reduce.c (reduce_grammar_tables): Likewise.
7013 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7014
7015 2001-11-30 Akim Demaille <akim@epita.fr>
7016
7017 * src/reduce.c (reduce_output): Formatting changes.
7018 * src/print.c (print_results, print_grammar): Likewise.
7019 * tests/regression.at (Rule Line Numbers)
7020 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7021
7022 2001-11-30 Akim Demaille <akim@epita.fr>
7023
7024 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7025 useless nonterminals, move them at the end of the symbol arrays.
7026 (reduce_output): Adjust.
7027 * tests/reduce.at (Useless Nonterminals): Adjust.
7028
7029 2001-11-30 Akim Demaille <akim@epita.fr>
7030
7031 * src/reduce.c: Various comment/formatting changes.
7032 (nonterminals_reduce): New, extracted from...
7033 (reduce_grammar_tables): here.
7034 (reduce_grammar): Call nonterminals_reduce.
7035
7036 2001-11-29 Paul Eggert <eggert@twinsun.com>
7037
7038 * src/bison.simple (YYSTACK_REALLOC): Remove.
7039 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7040 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7041 New macros.
7042 (union yyalloc): New type.
7043 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7044 an arbitrary restriction on hosts where size_t is wider than int.
7045
7046 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7047 a parser stack overflow. Allocate just one block of memory for all
7048 three stacks, instead of allocating three blocks; this typically is
7049 faster and reduces fragmentation.
7050
7051 Do not limit the number of items in the stack to a value that fits
7052 in 'int', as this is an arbitrary limit on hosts with 64-bit
7053 size_t and 32-bit int.
7054
7055 2001-11-29 Marc Autret <autret_m@epita.fr>
7056
7057 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7058 of defining YYERROR_VERBOSE.
7059 [AT_DATA]: $4 is now out of C declarations in the prologue.
7060
7061 2001-11-28 Marc Autret <autret_m@epita.fr>
7062
7063 * src/reader.c (parse_dquoted_param): New.
7064 (parse_skel_decl): Use it.
7065 * src/lex.h: Add its prototype.
7066 * src/lex.c (literalchar): Become not static.
7067
7068 2001-11-28 Marc Autret <autret_m@epita.fr>
7069
7070 * src/output.h: And put its extern declaration here.
7071 * src/output.c (error_verbose): Define here.
7072 (prepare): Echo name modification.
7073 * src/getargs.h: Clean its extern declaration.
7074 * src/getargs.c (error_verbose_flag): Remove.
7075 (getargs): Remove case 'e'.
7076 * src/options.c (option_table): 'error-verbose' is now seen as simple
7077 percent option.
7078 Include output.h.
7079
7080 * src/reader.c (read_declarations): Remove case tok_include.
7081 (parse_include_decl): Remove.
7082 * src/lex.h (token_t): Remove tok_include.
7083 * src/options.c (option_table): 'include' is now a simple command line
7084 option.
7085
7086 2001-11-28 Marc Autret <autret_m@epita.fr>
7087
7088 * src/bison.simple: Adjust muscle names.
7089 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7090 * src/output.c (prepare): s/_/-/ for the muscles names.
7091 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7092
7093 2001-11-28 Marc Autret <autret_m@epita.fr>
7094
7095 * src/bison.simple: Fix debug.
7096 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7097
7098 2001-11-28 Akim Demaille <akim@epita.fr>
7099
7100 * src/LR0.c (shifts_new): New.
7101 (save_shifts, insert_start_shift, augment_automaton): Use it.
7102
7103 2001-11-28 Akim Demaille <akim@epita.fr>
7104
7105 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7106 keep ruleno only.
7107
7108 2001-11-28 Akim Demaille <akim@epita.fr>
7109
7110 * src/closure.c (closure): Instead of looping over word in array
7111 then bits in words, loop over bits in array.
7112
7113 2001-11-28 Akim Demaille <akim@epita.fr>
7114
7115 * src/closure.c (closure): No longer optimize the special case
7116 where all the bits of `ruleset[r]' are set to 0, to make the code
7117 clearer.
7118
7119 2001-11-28 Akim Demaille <akim@epita.fr>
7120
7121 * src/closure.c (closure): `r' and `c' are new variables, used to
7122 de-obfuscate accesses to RULESET and CORE.
7123
7124 2001-11-28 Akim Demaille <akim@epita.fr>
7125
7126 * src/reduce.c (reduce_print): Use ngettext.
7127 (dump_grammar): Improve the trace accuracy.
7128
7129 2001-11-28 Akim Demaille <akim@epita.fr>
7130
7131 * src/reduce.c (dump_grammar): Don't translate trace messages.
7132
7133 2001-11-28 Akim Demaille <akim@epita.fr>
7134
7135 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7136 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7137 as all tags are free'ed afterwards.
7138 From Enrico Scholz.
7139
7140 2001-11-27 Paul Eggert <eggert@twinsun.com>
7141
7142 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7143 use alloca when we didn't want to, and vice versa.
7144
7145 2001-11-27 Marc Autret <autret_m@epita.fr>
7146
7147 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7148 initialization.
7149 * src/output.c (prepare): Remove its update.
7150
7151 2001-11-27 Marc Autret <autret_m@epita.fr>
7152
7153 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7154 Use %error-verbose.
7155
7156 2001-11-27 Marc Autret <autret_m@epita.fr>
7157
7158 * src/bison.simple: Remove YYERROR_VERBOSE using.
7159 Use %%error_verbose.
7160 (yyparse): Likewise.
7161 * src/output.c (prepare): Give its final value.
7162 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7163 * src/getargs.h: Add its extern declaration.
7164 * src/getargs.c (error_verbose_flag): New int.
7165 (getargs): Update to catch new case.
7166 * src/options.c (option_table): 'error-verbose' is a new option.
7167 (shortopts): Update.
7168
7169 2001-11-27 Akim Demaille <akim@epita.fr>
7170
7171 * src/system.h: Use intl/libgettext.h.
7172 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7173
7174 2001-11-27 Akim Demaille <akim@epita.fr>
7175
7176 * tests/torture.at (Exploding the Stack Size with Malloc):
7177 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7178
7179 2001-11-27 Akim Demaille <akim@epita.fr>
7180
7181 * src/files.c: Include error.h.
7182 Reported by Hans Aberg.
7183
7184 2001-11-26 Marc Autret <autret_m@epita.fr>
7185
7186 * src/reader.c (parse_include_decl): New, not yet implemented.
7187 (read_declarations): Add case tok_include.
7188 * src/getargs.h (include): Add its extern definition.
7189 * src/getargs.c (include): New const char *.
7190 (getargs): Add case '-I'.
7191 * src/options.c (option_table): Add include as command line and
7192 percent option.
7193 * src/lex.h (token_t): Add tok_include.
7194
7195 2001-11-26 Akim Demaille <akim@epita.fr>
7196
7197 * src/reader.c (readgram): Make sure rules for mid-rule actions
7198 have a lineno equal to that of their host rule.
7199 Reported by Hans Aberg.
7200 * tests/regression.at (Rule Line Numbers): New.
7201
7202 2001-11-26 Akim Demaille <akim@epita.fr>
7203
7204 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7205 size_ts.
7206
7207 2001-11-26 Akim Demaille <akim@epita.fr>
7208
7209 * src/complain.c, src/complain.h (error): Remove, provided by
7210 lib/error.[ch].
7211
7212 2001-11-26 Akim Demaille <akim@epita.fr>
7213
7214 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7215 issue an error message.
7216 * tests/regression.at (Invalid %directive): New.
7217 Reported by Hans Aberg.
7218
7219 2001-11-26 Akim Demaille <akim@epita.fr>
7220
7221 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7222 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7223
7224 2001-11-26 Akim Demaille <akim@epita.fr>
7225
7226 * src/conflicts.c (conflicts_print): Don't complain at all when
7227 there are no reduce/reduce conflicts, and as many shift/reduce
7228 conflicts as expected.
7229 * tests/regression.at (%expect right): Adjust.
7230
7231 2001-11-23 Akim Demaille <akim@epita.fr>
7232
7233 * lib/alloca.c: Update, from fileutils.
7234
7235 2001-11-23 Akim Demaille <akim@epita.fr>
7236
7237 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7238
7239 2001-11-23 Akim Demaille <akim@epita.fr>
7240
7241 * src/system.h: Include alloca.h.
7242 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7243
7244 2001-11-23 Akim Demaille <akim@epita.fr>
7245
7246 * src/print_graph.c (print_actions): Remove `rule', unused.
7247 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7248 pacify GCC's signed < unsigned warnings.
7249 * src/closure.c (itemsetsize): Likewise.
7250 * src/reader.c (symbol_list_new): Static.
7251
7252 2001-11-23 Akim Demaille <akim@epita.fr>
7253
7254 Attaching lineno to buckets is stupid, since only one copy of each
7255 symbol is kept, only the line of the first occurrence is kept too.
7256
7257 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7258 * src/reader.c (rline_allocated): Remove, unused.
7259 (symbol_list): Have a `line' member.
7260 (symbol_list_new): New.
7261 (readgram): Use it.
7262 * src/print.c (print_grammar): Output the rule line numbers.
7263 * tests/regression.at (Solved SR Conflicts)
7264 (Unresolved SR Conflicts): Adjust.
7265 Reported by Hans Aberg.
7266
7267 2001-11-22 Marc Autret <autret_m@epita.fr>
7268
7269 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7270
7271 2001-11-22 Marc Autret <autret_m@epita.fr>
7272
7273 * src/muscle_tab.c (muscle_init): Remove initialization of
7274 skeleton muscle.
7275 * src/output.c (output_master_parser): Do it here.
7276
7277 2001-11-20 Akim Demaille <akim@epita.fr>
7278
7279 * po/sv.po: New.
7280 * configure.in (ALL_LINGUAS): Adjust.
7281 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7282 longer contains strings to translate.
7283
7284 2001-11-19 Akim Demaille <akim@epita.fr>
7285
7286 * src/conflicts.c (conflicts_print): Add a missing \n.
7287
7288 2001-11-19 Akim Demaille <akim@epita.fr>
7289
7290 * src/nullable.c (nullable_print): New.
7291 (set_nullable): Call it when tracing.
7292 Better locality of variables.
7293
7294 2001-11-19 Akim Demaille <akim@epita.fr>
7295
7296 * src/print.c (print_actions): Better locality of variables.
7297
7298 2001-11-19 Akim Demaille <akim@epita.fr>
7299
7300 * src/derives.c (print_derives): Fix and enrich.
7301 * src/closure.c (print_fderives): Likewise.
7302
7303 2001-11-19 Akim Demaille <akim@epita.fr>
7304
7305 * src/closure.c (itemsetend): Remove, replaced with...
7306 (itemsetsize): new.
7307
7308 2001-11-19 Akim Demaille <akim@epita.fr>
7309
7310 * src/LR0.c (kernel_end): Remove, replaced with...
7311 (kernel_size): new.
7312
7313 2001-11-19 Akim Demaille <akim@epita.fr>
7314
7315 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7316 to clarify.
7317
7318 2001-11-19 Akim Demaille <akim@epita.fr>
7319
7320 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7321
7322 2001-11-19 Akim Demaille <akim@epita.fr>
7323
7324 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7325 trace messages.
7326 * src/LR0.c: Likewise.
7327 (allocate_itemsets): Use arrays instead of pointers to clarify.
7328
7329 2001-11-19 Akim Demaille <akim@epita.fr>
7330
7331 * src/getargs.c (statistics_flag): Replace with...
7332 (trace_flag): New.
7333 (longopts): Accept --trace instead of --statistics.
7334 * src/getargs.h, src/options.c: Adjust.
7335 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7336 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7337
7338 2001-11-19 Akim Demaille <akim@epita.fr>
7339
7340 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7341 pointers to clarify the code.
7342 (save_reductions, save_shifts): Factor common parts of alternatives.
7343
7344 2001-11-19 Akim Demaille <akim@epita.fr>
7345
7346 * src/LR0.c (new_state, get_state): Complete TRACE code.
7347 * src/closure.c: Include `reader.h' to get `tags', needed by the
7348 trace code.
7349 Rename the conditional DEBUG as TRACE.
7350 Output consistently TRACEs to stderr, not stdout.
7351 * src/derives.c: Likewise.
7352 * src/reduce.c: (inaccessable_symbols): Using if is better style
7353 than goto.
7354 Use `#if TRACE' instead of `#if 0' for tracing code.
7355
7356 2001-11-19 Akim Demaille <akim@epita.fr>
7357
7358 * src/system.h (LIST_FREE, shortcpy): New.
7359 * src/LR0.c: Use them.
7360 * src/output.c (free_itemsets, free_reductions, free_shifts):
7361 Remove, replaced by LIST_FREE.
7362
7363 2001-11-19 Akim Demaille <akim@epita.fr>
7364
7365 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7366 (REDUCTIONS_ALLOC): New.
7367 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7368 allocation.
7369
7370 2001-11-19 Akim Demaille <akim@epita.fr>
7371
7372 * src/LR0.c (new_state): Complete trace code.
7373 * src/nullable.c (set_nullable): Don't translate traces.
7374
7375 2001-11-19 Akim Demaille <akim@epita.fr>
7376
7377 * src/print_graph.c (print_core): Better locality of variables.
7378 * src/print.c (print_core): Likewise.
7379
7380 2001-11-19 Akim Demaille <akim@epita.fr>
7381
7382 * src/vcg.c: You do the output, so you are responsible of the
7383 handling of VCG syntax, in particular: use quotearg.
7384 * src/print_graph.c: Don't.
7385 (print_actions): Don't output the actions as part of the nodes,
7386 since that's the job of the edges.
7387 (print_state): Don't output by hand: fill the node description,
7388 and ask for its output.
7389
7390 2001-11-19 Akim Demaille <akim@epita.fr>
7391
7392 * src/bison.simple (yyparse): When verbosely reporting an error,
7393 no longer put additional quotes around token names.
7394 * tests/calc.at: Adjust.
7395
7396 2001-11-19 Akim Demaille <akim@epita.fr>
7397
7398 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7399 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7400 * src/output.c: Adjust.
7401
7402 2001-11-19 Akim Demaille <akim@epita.fr>
7403
7404 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7405 (rule_t): this.
7406 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7407
7408 2001-11-19 Akim Demaille <akim@epita.fr>
7409
7410 * src/gram.h (rule_t): New.
7411 (rule_table): New.
7412 (rrhs, rlhs): Remove, part of state_t.
7413 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7414 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7415 * src/reader.c, src/reduce.c: Adjust.
7416
7417 2001-11-19 Akim Demaille <akim@epita.fr>
7418
7419 * src/reader.c (symbols_output): New, extracted from...
7420 (packsymbols): Here.
7421 (reader): Call it.
7422
7423 2001-11-19 Akim Demaille <akim@epita.fr>
7424
7425 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7426 (maxrhs): this new function.
7427
7428 2001-11-19 Akim Demaille <akim@epita.fr>
7429
7430 * src/lalr.c (F): New macro to access the variable F.
7431 Adjust.
7432
7433 2001-11-19 Akim Demaille <akim@epita.fr>
7434
7435 * src/lalr.h (LA): New macro to access the variable LA.
7436 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7437 * src/lalr.c: Adjust.
7438
7439 2001-11-19 Akim Demaille <akim@epita.fr>
7440
7441 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7442 (set_state_table): handle the `lookaheads' members.
7443
7444 2001-11-19 Akim Demaille <akim@epita.fr>
7445
7446 * src/lalr.h (lookaheads): Removed array, whose contents is now
7447 a member of...
7448 (state_t): this structure.
7449 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7450 Adjust.
7451
7452 2001-11-19 Akim Demaille <akim@epita.fr>
7453
7454 * src/lalr.h (consistent): Removed array, whose contents is now
7455 a member of...
7456 (state_t): this structure.
7457 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7458 Adjust.
7459
7460 2001-11-19 Akim Demaille <akim@epita.fr>
7461
7462 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7463 contents are now members of...
7464 (state_t): this structure.
7465 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7466 Adjust.
7467
7468 2001-11-19 Akim Demaille <akim@epita.fr>
7469
7470 * src/lalr.h (state_t): New.
7471 (state_table): Be a state_t * instead of a core **.
7472 (accessing_symbol): Remove, part of state_t.
7473 * src/lalr.c: Adjust.
7474 (set_accessing_symbol): Merge into...
7475 (set_state_table): this.
7476 * src/print_graph.c, src/conflicts.c: Adjust.
7477
7478 2001-11-14 Akim Demaille <akim@epita.fr>
7479
7480 * tests/calc.at, tests/output.at, tests/regression.at,
7481 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7482 now the tests are run in private dirs, therefore AC_CLEANUP and
7483 family can be simplified to 0-ary.
7484 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7485 use abs. path to find config.h.
7486 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7487 stderr, there can be way too much random noise.
7488 Instead pass -Werror to GCC and rely on the exit status.
7489 Reported by Wolfram Wagner.
7490
7491 2001-11-14 Akim Demaille <akim@epita.fr>
7492
7493 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7494 defined only if yyoverflow is defined, to avoid `warning: unused
7495 variable `yyvs1''.
7496 Reported by The Test Suite.
7497
7498 2001-11-14 Akim Demaille <akim@epita.fr>
7499
7500 * src/print.c: Include reduce.h.
7501 Reported by Hans Aberg.
7502
7503 2001-11-14 Akim Demaille <akim@epita.fr>
7504
7505 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7506 Revert a previous patch: these are really const.
7507 * src/conflicts.c (conflict_report): Additional useless pair of
7508 braces to pacify GCC's warnings for `if () if () {} else {}'.
7509 * src/lex.c (parse_percent_token): Replace equal_offset with
7510 arg_offset.
7511 arg is const.
7512 Be sure to strdup `arg' when used, since there is no reason for
7513 token_buffer not to change.
7514
7515 2001-11-14 Akim Demaille <akim@epita.fr>
7516
7517 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7518 definition.
7519 * src/main.c (main): Use them.
7520 Suggested by Hans Aberg.
7521
7522 2001-11-12 Akim Demaille <akim@epita.fr>
7523
7524 * src/system.h (ngettext): Now that we use ngettext, be sure to
7525 provide a default definition when NLS are not used.
7526
7527 2001-11-12 Akim Demaille <akim@epita.fr>
7528
7529 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7530 Use @kbd to denote user input.
7531 (Language and Grammar): ANSIfy the example.
7532 Adjust its layout for info/notinfo.
7533 (Location Tracking Calc): Output error messages to stderr.
7534 Output locations in a more GNUtically correct way.
7535 Fix a couple of Englishos.
7536 Adjust @group/@end group pairs.
7537
7538 2001-11-12 Akim Demaille <akim@epita.fr>
7539
7540 %expect was not functioning at all.
7541
7542 * src/conflicts.c (expected_conflicts): Set to -1.
7543 (conflict_report): Use ngettext.
7544 (conflicts_print): Check %expect and make its violation an error.
7545 * doc/bison.texinfo (Expect Decl): Adjust.
7546 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7547 * tests/regression.at (%expect not enough, %expect right)
7548 (%expect too much): New.
7549
7550 2001-11-12 Akim Demaille <akim@epita.fr>
7551
7552 * tests/regression.at (Conflicts): Rename as...
7553 (Unresolved SR Conflicts): this.
7554 (Solved SR Conflicts): New.
7555
7556 2001-11-12 Akim Demaille <akim@epita.fr>
7557
7558 * src/reduce.c (print_results): Rename as...
7559 (reduce_output): This.
7560 Output to OUT, passed as argument, instead of output_obstack.
7561 (dump_grammar): Likewise.
7562 (reduce_free): New.
7563 Also free V1.
7564 (reduce_grammar): No longer call reduce_output, since...
7565 * src/print.c (print_results): do it.
7566 * src/main.c (main): Call reduce_free;
7567
7568 2001-11-12 Akim Demaille <akim@epita.fr>
7569
7570 * src/conflicts.c (print_reductions): Accept OUT as argument.
7571 Output to it, not to output_obstack.
7572 * src/print.c (print_actions): Adjust.
7573
7574 2001-11-12 Akim Demaille <akim@epita.fr>
7575
7576 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7577 the result instead of using...
7578 (src_total, rrc_total, src_count, rrc_count): Remove.
7579 (any_conflicts): Remove.
7580 (print_conflicts): Split into...
7581 (conflicts_print, conflicts_output): New.
7582 * src/conflicts.h: Adjust.
7583 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7584 * src/print.c (print_grammar): Issue `\n' between two rules.
7585 * tests/regression.at (Conflicts): New.
7586 Reported by Tom Lane.
7587
7588 2001-11-12 Akim Demaille <akim@epita.fr>
7589
7590 * tests/regression.at (Invalid input): Remove, duplicate with
7591 ``Invalid input: 1''.
7592
7593 2001-11-12 Akim Demaille <akim@epita.fr>
7594
7595 * tests/torture.at (AT_DATA_STACK_TORTURE)
7596 (Exploding the Stack Size with Alloca)
7597 (Exploding the Stack Size with Malloc): New.
7598
7599 2001-11-12 Akim Demaille <akim@epita.fr>
7600
7601 * src/bison.simple (YYSTACK_REALLOC): New.
7602 (yyparse) [!yyoverflow]: Use it and free the old stack.
7603 Reported by Per Allansson.
7604
7605 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7606
7607 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7608 define CPP macro, which substitute YYSTYPE by yystype.
7609 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7610 with yyltype/YYLTYPE. This allows inclusion of the generated
7611 header within the parser if the compiler, such as GGC, accepts
7612 multiple equivalent #defines.
7613 From Akim.
7614
7615 2001-11-05 Akim Demaille <akim@epita.fr>
7616
7617 * src/reader.c (symbols_output): New, extracted from...
7618 (packsymbols): here.
7619 (reader): Adjust.
7620
7621 2001-11-05 Akim Demaille <akim@epita.fr>
7622
7623 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7624
7625 2001-11-05 Akim Demaille <akim@epita.fr>
7626
7627 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7628 pattern.
7629
7630 2001-11-05 Akim Demaille <akim@epita.fr>
7631
7632 * src/options.h (struct option_table_struct): set_flags is void*.
7633 * src/options.c (longopts): Support `--output' and `%output'.
7634 (usage): Adjust.
7635 * src/lex.h (tok_setopt): Remove, replaced with...
7636 (tok_intopt, tok_stropt): these new guys.
7637 * src/lex.c (getopt.h): Not needed.
7638 (token_buffer, unlexed_token_buffer): Not const.
7639 (percent_table): Promote `-' over `_' in directive names.
7640 Active `%name-prefix', `file-prefix', and `output'.
7641 (parse_percent_token): Accept possible arguments to directives.
7642 Promote `-' over `_' in directive names.
7643
7644 2001-11-04 Akim Demaille <akim@epita.fr>
7645
7646 * doc/bison.texinfo (Decl Summary): Split the list into
7647 `directives for grammars' and `directives for bison'.
7648 Sort'em.
7649 Add description of `%name-prefix', `file-prefix', and `output'.
7650 Promote `-' over `_' in directive names.
7651 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7652 Simplify the description of `--name-prefix'.
7653 Promote `-' over `_' in directive names.
7654 Promote `--output' over `--output-file'.
7655 Fix the description of `--defines'.
7656 * tests/output.at: Exercise %file-prefix and %output.
7657
7658 2001-11-02 Akim Demaille <akim@epita.fr>
7659
7660 * doc/refcard.tex: Update.
7661
7662 2001-11-02 Akim Demaille <akim@epita.fr>
7663
7664 * src/symtab.h (SUNDEF): New.
7665 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7666 stand for `uninitialized', instead of 0.
7667 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7668 * src/lex.c (lex): Adjust.
7669
7670 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7671 Number it 0.
7672 Let yylex return it instead of a plain 0.
7673 Reported by Dick Streefland.
7674
7675 2001-11-02 Akim Demaille <akim@epita.fr>
7676
7677 * tests/regression.at (Mixing %token styles): New test.
7678
7679 2001-11-02 Akim Demaille <akim@epita.fr>
7680
7681 * src/reader.c (parse_thong_decl): Formatting changes.
7682 (token_translations_init): New, extracted from...
7683 (packsymbols): Here.
7684 Adjust.
7685
7686 2001-11-01 Akim Demaille <akim@epita.fr>
7687
7688 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7689 Check that `9foo.y' produces correct cpp guards.
7690 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7691 guards.
7692 Reported by Wwp.
7693
7694 2001-11-01 Akim Demaille <akim@epita.fr>
7695
7696 * tests/regression.at (Invalid input: 2): New.
7697 * src/lex.c (unlexed_token_buffer): New.
7698 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7699 too.
7700 Reported by Wwp.
7701
7702 2001-11-01 Akim Demaille <akim@epita.fr>
7703
7704 * tests/calc.at: Catch up with 1.30.
7705 * configure.in: Bump to 1.49a.
7706 Adjust to newer Autotest.
7707
7708 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7709
7710 * src/conflicts.c: Move global variables rrc_total and src_total ...
7711 (print_conflicts): here.
7712 * src/output.c (output): Free global variable user_toknums.
7713 * src/lex.c (token_obstack): Become static.
7714
7715 2001-10-18 Akim Demaille <akim@epita.fr>
7716
7717 * tests/atlocal.in (GCC): Add.
7718 * tests/calc.at: s/m4_match/m4_bmatch/.
7719 s/m4_patsubst/m4_bpatsubst/.
7720 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7721 * configure.in: AC_SUBST(GCC).
7722
7723 2001-10-14 Marc Autret <autret_m@epita.fr>
7724
7725 * src/options.c (create_long_option_table): Fix.
7726
7727 2001-10-10 Akim Demaille <akim@epita.fr>
7728
7729 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7730
7731 2001-10-04 Akim Demaille <akim@epita.fr>
7732
7733 * src/reader.c (parse_union_decl): Push the caracters in
7734 union_obstack, not attrs_obstack.
7735
7736 2001-10-04 Akim Demaille <akim@epita.fr>
7737
7738 Merge in the branch 1.29.
7739
7740 * src/reader.c (packsymbols): Use a temporary obstack for
7741 `%%tokendef', since output_stack is already used elsewhere.
7742
7743 2001-10-02 Akim Demaille <akim@epita.fr>
7744
7745 Bump 1.29d.
7746
7747 2001-10-02 Akim Demaille <akim@epita.fr>
7748
7749 Version 1.29c.
7750
7751 2001-10-02 Akim Demaille <akim@epita.fr>
7752
7753 * tests/regression.at (Invalid CPP headers): New.
7754 From Alexander Belopolsky.
7755 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7756
7757 2001-10-02 Akim Demaille <akim@epita.fr>
7758
7759 * tests/regression.at (Invalid input): New.
7760 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7761 Reported by Shura.
7762
7763 2001-10-02 Akim Demaille <akim@epita.fr>
7764
7765 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7766
7767 2001-10-02 Akim Demaille <akim@epita.fr>
7768
7769 * src/output.c (output_parser): Assert `skeleton'.
7770 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7771 systems.
7772 From Shura.
7773
7774 2001-10-01 Marc Autret <autret_m@epita.fr>
7775
7776 * src/lex.h: Echo modifications.
7777 * src/lex.c (unlex): Parameter is now token_t.
7778 From Hans Aberg.
7779
7780 2001-10-01 Marc Autret <autret_m@epita.fr>
7781
7782 * src/main.c: Include lex.h.
7783 From Hans Aberg.
7784
7785 2001-09-29 Akim Demaille <akim@epita.fr>
7786
7787 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7788
7789 2001-09-28 Akim Demaille <akim@epita.fr>
7790
7791 * tests/testsuite.at: Update to newer Autotest.
7792 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7793
7794 2001-09-27 Akim Demaille <akim@epita.fr>
7795
7796 Position independent wrapper.
7797
7798 * tests/bison: Remove.
7799 * tests/bison.in: New.
7800 * configure.in: Adjust.
7801
7802 2001-09-27 Paul Eggert <eggert@twinsun.com>
7803
7804 Port quotearg fixes from tar 1.13.24.
7805
7806 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7807 tm to be declared.
7808 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7809 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7810
7811 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7812 * m4/mbrtowc.m4: New file.
7813 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7814 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7815
7816 2001-09-27 Akim Demaille <akim@epita.fr>
7817
7818 Bump to 1.29c.
7819
7820 2001-09-27 Akim Demaille <akim@epita.fr>
7821
7822 Version 1.29b.
7823
7824 2001-09-25 Akim Demaille <akim@epita.fr>
7825
7826 * src/system.h: Include `xalloc.h'.
7827 Remove it from the C files.
7828 * src/files.c (output_files): Free the obstacks.
7829 * src/lex.c (init_lex): Rename as...
7830 (lex_init): this.
7831 (lex_free): New.
7832 * src/main.c (main): Use it.
7833
7834 2001-09-24 Marc Autret <autret_m@epita.fr>
7835
7836 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7837 to output informations in fout (FILE*).
7838 (open_graph, close_graph): Likewise.
7839 (output_graph, output_edge, output_node): Likewise.
7840 * src/vcg.h: Update function prototypes.
7841 * src/print_graph.c (print_graph): Open output graph file.
7842 (print_actions): Adjust.
7843 * src/files.h: Remove extern declaration.
7844 * src/files.c: Remove graph_obstack declaration.
7845 (open_files): Remove graph_obstack initialization.
7846 (output_files): Remove graph_obstack saving.
7847
7848 2001-09-24 Marc Autret <autret_m@epita.fr>
7849
7850 * src/files.c (compute_output_file_names): Fix.
7851
7852 2001-09-24 Marc Autret <autret_m@epita.fr>,
7853 Akim Demaille <akim@epita.fr>
7854
7855 * src/reader.c (reader): Remove call to free_symtab ().
7856 * src/main.c (main): Call it here.
7857 Include symtab.h.
7858 * src/conflicts.c (initialize_conflicts): Rename as...
7859 (solve_conflicts): this.
7860 * src/print.c (print_core, print_actions, print_state)
7861 (print_grammar): Dump to a file instead a `output_obstack'.
7862 (print_results): Dump `output_obstack', and then proceed with the
7863 FILE *.
7864 * src/files.c (compute_output_file_names, close_files): New.
7865 (output_files): Adjust.
7866 * src/main.c (main): Adjust.
7867
7868 2001-09-23 Marc Autret <autret_m@epita.fr>
7869
7870 * src/files.c (compute_header_macro): Computes header macro name
7871 from spec_defines_file when given.
7872
7873 2001-09-23 Marc Autret <autret_m@epita.fr>
7874
7875 * src/files.c (output_files): Add default extensions.
7876
7877 2001-09-22 Akim Demaille <akim@epita.fr>
7878
7879 * src/conflicts.c (finalize_conflicts): Rename as...
7880 (free_conflicts): this.
7881
7882 2001-09-22 Akim Demaille <akim@epita.fr>
7883
7884 * src/gram.c (gram_free): Rename back as...
7885 (dummy): this.
7886 (output_token_translations): Free `token_translations'.
7887 * src/symtab.c (free_symtab): Free the tag field.
7888
7889 2001-09-22 Akim Demaille <akim@epita.fr>
7890
7891 Remove `translations' as it is always set to true.
7892
7893 * src/gram.h: Adjust.
7894 * src/reader.c (packsymbols, parse_token_decl): Adjust
7895 * src/print.c (print_grammar): Adjust.
7896 * src/output.c (output_token_translations): Adjust.
7897 * src/lex.c (lex): Adjust.
7898 * src/gram.c: Be sure the set pointers to NULL.
7899 (dummy): Rename as...
7900 (gram_free): this.
7901
7902 2001-09-22 Akim Demaille <akim@epita.fr>
7903
7904 * configure.in: Invoke AM_LIB_DMALLOC.
7905 * src/system.h: Use dmalloc.
7906 * src/LR0.c: Be sure to have pointers initialized to NULL.
7907 (allocate_itemsets): Allocate kernel_items only if needed.
7908
7909 2001-09-22 Akim Demaille <akim@epita.fr>
7910
7911 * configure.in: Bump to 1.29b.
7912 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
7913 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
7914 need xmalloc.c in calc.y.
7915 From Pascal Bart.
7916
7917 2001-09-21 Akim Demaille <akim@epita.fr>
7918
7919 Version 1.29a.
7920 * Makefile.maint, config/config.guess, config/config.sub,
7921 * config/missing: Update from masters.
7922 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
7923 upon package.m4.
7924 * configure.in (ALL_LINGUAS): Add `tr'.
7925
7926 2001-09-21 Akim Demaille <akim@epita.fr>
7927
7928 * tests/Makefile.am (package.m4): Move to...
7929 ($(srcdir)/$(TESTSUITE)): here.
7930
7931 2001-09-20 Akim Demaille <akim@epita.fr>
7932
7933 * src/complain.c: No longer try to be standalone: use system.h.
7934 Don't assume __STDC__ is defined to 1. Just test if it is defined.
7935 * src/complain.h: Likewise.
7936 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
7937 Remove the unused variable `n'.
7938 From Albert Chin-A-Young.
7939
7940 2001-09-18 Marc Autret <autret_m@epita.fr>
7941
7942 * doc/bison.1: Update.
7943 * doc/bison.texinfo (Bison Options): Update --defines and --graph
7944 descriptions.
7945 (Option Cross Key): Update.
7946 Add --graph.
7947
7948 2001-09-18 Marc Autret <autret_m@epita.fr>
7949
7950 * tests/regression.at: New test (comment in %union).
7951
7952 2001-09-18 Marc Autret <autret_m@epita.fr>
7953
7954 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
7955 do that.
7956 Reported by Keith Browne.
7957
7958 2001-09-18 Marc Autret <autret_m@epita.fr>
7959
7960 * tests/output.at: Add tests for --defines and --graph.
7961
7962 2001-09-18 Marc Autret <autret_m@epita.fr>
7963
7964 * tests/output.at: Removes tests of %{header,src}_extension features.
7965
7966 2001-09-18 Akim Demaille <akim@epita.fr>
7967
7968 * tests/Makefile.am (package.m4): New.
7969 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
7970 (_AT_CHECK_CALC_ERROR): Likewise.
7971 Factor the `, ' part of verbose error messages.
7972
7973 2001-09-18 Marc Autret <autret_m@epita.fr>
7974
7975 * src/getargs.c (longopts): Declare --defines and --graph as options
7976 with optional arguments.
7977 * src/files.h: Add extern declarations.
7978 * src/files.c (spec_graph_file, spec_defines_file): New.
7979 (output_files): Update.
7980 Remove CPP-outed code.
7981
7982 2001-09-18 Marc Autret <autret_m@epita.fr>
7983
7984 Turn off %{source,header}_extension feature.
7985
7986 * src/files.c (compute_exts_from_gf): Update.
7987 (compute_exts_from_src): Update.
7988 (output_files): CPP-out useless code.
7989 * src/files.h: Remove {header,source}_extension extern declarations.
7990 * src/reader.c (parse_dquoted_param): CPP-out.
7991 (parse_header_extension_decl): Remove.
7992 (parse_source_extension_decl): Remove.
7993 (read_declarations): Remove cases tok_{hdrext,srcext}.
7994 * src/lex.c (percent_table): Remove {header,source}_extension entries.
7995 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
7996
7997 2001-09-10 Akim Demaille <akim@epita.fr>
7998
7999 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8000 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8001 (AT_CHECK_OUTPUT): this.
8002 Merely check ls' exit status, its output is useless.
8003
8004 2001-09-10 Akim Demaille <akim@epita.fr>
8005
8006 * tests/calc.at: Use m4_match.
8007 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8008
8009 2001-09-10 Marc Autret <autret_m@epita.fr>,
8010 Akim Demaille <akim@epita.fr>
8011
8012 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8013 enum color_e.
8014 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8015 to `normal'.
8016 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8017 * src/lex.h: Adjust prototype.
8018 (token_t): Add `tok_undef'.
8019 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8020 (parse_percent_token): Now returns token_t.
8021 Add default statement in switch.
8022 (lex): Separate `c' as an input variable, from the token_t result
8023 part.
8024 (unlexed): Is a token_t.
8025
8026 2001-09-10 Akim Demaille <akim@epita.fr>
8027
8028 * configure.in: Bump to 1.29a.
8029
8030 2001-09-07 Akim Demaille <akim@epita.fr>
8031
8032 Version 1.29.
8033
8034 2001-08-30 Akim Demaille <akim@epita.fr>
8035
8036 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8037 * m4/atconfig.m4: Remove.
8038 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8039 * tests/bison: New.
8040 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8041 m4_if, m4_patsubst, and m4_regexp.
8042 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8043 `input' file instead of echo.
8044
8045 2001-08-29 Akim Demaille <akim@epita.fr>
8046
8047 Bump to 1.28e.
8048
8049 2001-08-29 Akim Demaille <akim@epita.fr>
8050
8051 Version 1.28d.
8052
8053 2001-08-29 Paul Eggert <eggert@twinsun.com>
8054
8055 * src/bison.simple (yyparse): Don't take the address of an
8056 item before the start of an array, as that doesn't conform to
8057 the C Standard.
8058
8059 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8060
8061 * doc/bison.texinfo (Location Tracking Calc): New node.
8062
8063 2001-08-29 Paul Eggert <eggert@twinsun.com>
8064
8065 * src/output.c (output): Do not define const, as this now
8066 causes more problems than it cures.
8067
8068 2001-08-29 Akim Demaille <akim@epita.fr>
8069
8070 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8071 the nodes.
8072 Be sure to tag the `detailmenu'.
8073
8074 2001-08-29 Akim Demaille <akim@epita.fr>
8075
8076 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8077 download in a tmp dir.
8078
8079 2001-08-28 Marc Autret <autret_m@epita.fr>
8080
8081 * config/depcomp: New file.
8082
8083 2001-08-28 Marc Autret <autret_m@epita.fr>
8084
8085 * doc/bison.1 (mandoc): Adjust.
8086 From Juan Manuel Guerrero.
8087
8088 2001-08-28 Marc Autret <autret_m@epita.fr>
8089
8090 * src/print_graph.c (print_state): Fix.
8091
8092 2001-08-27 Marc Autret <autret_m@epita.fr>
8093
8094 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8095 char * members.
8096 Echo modifications to the functions prototypes.
8097 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8098
8099 2001-08-27 Marc Autret <autret_m@epita.fr>
8100
8101 * src/vcg.c: Include `xalloc.h'.
8102 (add_colorentry): New.
8103 (add_classname): New.
8104 (add_infoname): New.
8105 * src/vcg.h: Add new prototypes.
8106
8107 2001-08-27 Akim Demaille <akim@epita.fr>
8108
8109 * Makefile.maint: Sync. again with CVS Autoconf.
8110
8111 2001-08-27 Akim Demaille <akim@epita.fr>
8112
8113 * Makefile.maint: Formatting changes.
8114 (po-update, cvs-update, update): New targets.
8115 (AMTAR): Remove.
8116
8117 2001-08-27 Akim Demaille <akim@epita.fr>
8118
8119 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8120 * Makefile.maint: Sync. with CVS Autoconf.
8121
8122 2001-08-27 Marc Autret <autret_m@epita.fr>
8123
8124 * src/vcg.h (struct infoname_s): New.
8125 (struct colorentry_s): New.
8126 (graph_s): New fields {vertical,horizontal}_order in structure.
8127 Add `infoname' field.
8128 Add `colorentry' field;
8129 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8130 (G_HORIZONTAL_ORDER): New.
8131 (G_INFONAME): New.
8132 (G_COLORENTRY): New.
8133 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8134 Add output of `infoname'.
8135 Add output of `colorentry'.
8136
8137 2001-08-27 Marc Autret <autret_m@epita.fr>
8138
8139 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8140 This one shadowed a global parameter.
8141
8142 2001-08-24 Marc Autret <autret_m@epita.fr>
8143
8144 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8145 instead of `unsigned'.
8146 (print_state): Do not call obstack_object_size () in obstack_grow ()
8147 to avoid macro variables shadowing.
8148
8149 2001-08-23 Marc Autret <autret_m@epita.fr>
8150
8151 * src/lex.c (percent_table): Typo: s/naem/name/.
8152 Add graph option.
8153 Normalize new options declarations.
8154
8155 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8156
8157 * tests/suite.at: Exercise %header_extension and %source_extension.
8158
8159 2001-08-16 Marc Autret <autret_m@epita.fr>
8160
8161 * src/reader.c (parse_dquoted_param): New.
8162 (parse_header_extension_decl): Use it.
8163 (parse_source_extension_decl): Likewise.
8164
8165 2001-08-16 Marc Autret <autret_m@epita.fr>
8166
8167 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8168 (get_xxxx_str): Use assert () instead of complain ().
8169 Remove return invokations in default cases.
8170 (get_decision_str): Modify default behaviour. Remove second argument.
8171 Echo modifications on calls.
8172 (output_graph): Fix.
8173
8174 2001-08-16 Marc Autret <autret_m@epita.fr>
8175
8176 * src/getargs.c (usage): Update with ``-g, --graph''.
8177
8178 2001-08-16 Marc Autret <autret_m@epita.fr>
8179
8180 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8181 (Option Cross Key): Likewise.
8182 * doc/bison.1: Update.
8183
8184 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8185
8186 * src/output.c (output_master_parser): Don't finish action_obstack.
8187 (output_parser): Don't care about the muscle action, here.
8188 (prepare): Copy the action_obstack in the action muscle.
8189 (output): Free action_obstack.
8190
8191 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8192
8193 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8194 will contain `%union' declaration.
8195 (parse_union_decl): Delete #line directive output.
8196 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8197 informations about %union.
8198 (parse_union_decl): Copy the union_obstack in the muscle stype.
8199 * src/bison.simple: Add new #line directive.
8200 Add typdef %%stype YYSTYPE.
8201
8202 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8203
8204 * src/bison.simple: Add new `#line' directive.
8205
8206 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8207
8208 * src/bison.simple: New `#line' directive.
8209 * src/output.c (output_parser): Support new dynamic muscle input_line.
8210
8211 2001-09-22 Marc Autret <autret_m@epita.fr>
8212
8213 * src/output.c (output_master_parser): New.
8214 (output_parser): Be more re-entrant.
8215
8216 2001-09-21 Marc Autret <autret_m@epita.fr>
8217
8218 * src/reader.c (copy_definition, parse_union_decl): Update and use
8219 `linef' muscle.
8220 (copy_action): Likewise.
8221 Use obstack_1grow ().
8222 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8223
8224 2001-09-21 Marc Autret <autret_m@epita.fr>
8225
8226 * src/options.c (option_table): Adjust.
8227 * src/lex.c (parse_percent_token): Fix.
8228
8229 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8230
8231 * src/options.c (symtab.h): Include it, need by lex.h.
8232
8233 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8234
8235 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8236 is now an option_table_struct*.
8237 (option_strcmp): New function option_strcmp.
8238 (parse_percent_token): Call option_strcmp.
8239 * src/getargs.c (xalloc.h, options.h): Include it.
8240 (getargs): Call create_long_option_table.
8241 (getargs): Free longopts at the end of the function.
8242 (shortopts): Move in options.c.
8243 * src/options.c (create_long_option_table): New function. Convert
8244 information from option_table to option structure.
8245 * src/reader.c (options.h): Include it.
8246
8247 * src/Makefile.am: Adjust.
8248 * src/options.c (option_table): Create from longopts and percent_table.
8249 * src/getargs.c (longopts): Delete.
8250 * src/lex.c (struct percent_table_struct): Delete.
8251 (percent_table): Delete.
8252 (options.h): Include it.
8253 * src/options.c: Create.
8254 * src/options.h: Create.
8255 Declare enum opt_access_e.
8256 Define struct option_table_struct.
8257
8258 2001-09-20 Marc Autret <autret_m@epita.fr>
8259
8260 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8261 sections of Bison.
8262
8263 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8264
8265 * src/bison.simple: s/%%filename/%%skeleton.
8266 * src/muscle_tab.c (getargs.h): Include it.
8267 (muscle_init): Insert new muscle skeleton.
8268
8269 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8270
8271 * src/output.c (output_parser): Delete unused variable actions_dumped.
8272
8273 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8274
8275 * src/output.c (output): Delete call to reader_output_yylsp.
8276 * src/reader.c (reader): Likewise.
8277 * src/reader.h: Delete declaration of reader_output_yylsp.
8278
8279 2001-09-02 Marc Autret <autret_m@epita.fr>
8280
8281 * src/reader.c: Include muscle_tab.h.
8282 (parse_union_decl): Update.
8283 (parse_macro_decl): Rename parse_muscle_decl.
8284 Update to use renamed functions and variable.
8285 (read_declarations, copy_action, read_additionnal_code, : Updated
8286 with correct variables and functions names.
8287 (packsymbols, reader): Likewise.
8288
8289 * src/reader.h (muscle_obstack): Extern declaration update.
8290
8291 * src/output.c: Include muscle_tab.h
8292 In all functions using macro_insert, change by using muscle_insert ().
8293 (macro_obstack): Rename muscle_obstack.
8294 Echo modifications in the whole file.
8295 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8296 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8297 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8298
8299 * src/muscle_tab.h: Update double inclusion macros.
8300 (macro_entry_s): Rename muscle_entry_s.
8301 Update prototypes.
8302
8303 * src/muscle_tab.c: Include muscle_tab.h.
8304 Rename macro_tabble to muscle_table.
8305 (mhash1, mhash2, mcmp): Use muscle_entry.
8306 (macro_init): Rename muscle_init. Update.
8307 (macro_insert): Rename muscle_insert. Update.
8308 (macro_find): Rename muscle_find. Update.
8309
8310 * src/main.c: Include muscle_tab.h.
8311 (main): Call muscle_init ().
8312 * src/Makefile.am (bison_SOURCES): Echo modifications.
8313
8314 2001-09-02 Marc Autret <autret_m@epita.fr>
8315
8316 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8317
8318 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8319
8320 2001-09-02 Marc Autret <autret_m@epita.fr>
8321
8322 * src/macrotab.c, src/macrotab.h: Remove.
8323
8324 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8325
8326 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8327 filename.
8328
8329 2001-09-01 Marc Autret <autret_m@epita.fr>
8330
8331 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8332 to an explicit value to activate the feature. We do it here.
8333
8334 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8335
8336 * src/output.c (prepare): Delete the `filename' muscule insertion.
8337 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8338 (parse_union_decl): Likewise.
8339 * src/macrotab.c (macro_init): Initialize filename by infile.
8340
8341 2001-08-31 Marc Autret <autret_m@epita.fr>
8342
8343 * src/bison.simple (YYLSP_NEEDED): New definition.
8344 * src/output.c (prepare): Add macro insertion of `locations_flag'
8345
8346 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8347
8348 * src/output.c (prepare): Delete insertion of previous muscles,
8349 and insert the `prefix' muscles.
8350 * src/macrotab.c (macro_init): Likewise.
8351 (macro_init): Initialization prefix directive by `yy'.
8352 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8353 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8354 yylval, yydebug, yyerror, yynerrs and yyparse.
8355 New directive `#define' to substitute yydebug, ... with option
8356 name_prefix.
8357
8358 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8359
8360 * src/main.c (main): Standardize.
8361 * src/output.c (output_table_data, output_parser): Likewise.
8362 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8363
8364 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8365
8366 * src/reader.c (read_additionnal_code): Rename %%user_code to
8367 %%epilogue.
8368 * src/output.c (output): Rename %%declarations to %%prologue.
8369 * src/bison.simple: Echo modifications.
8370
8371 2001-08-31 Marc Autret <autret_m@epita.fr>
8372
8373 * src/reader.c (readgram): CleanUp.
8374 (output_token_defines): Likewise.
8375 (packsymbols): Likewise.
8376 (reader): Likewise.
8377 * src/output.c (output): CPP-out useless code.
8378
8379 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8380
8381 * src/reader.c (reader): Delete obsolete call to function
8382 output_trailers and output_headers.
8383 * src/output.h: Remove obsolete functions prototypes of output_headers
8384 and output_trailers.
8385
8386 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8387
8388 * src/main.c: Include macrotab.h.
8389 * src/macrotab.h (macro_entry_s): Constify fields.
8390 Adjust functions prototypes.
8391 * src/macrotab.c (macro_insert): Constify key and value.
8392 (macro_find): Constify key.
8393 (macro_insert): Include 'xalloc.h'
8394 (macro_insert): Use XMALLOC.
8395 (macro_find): Constify return value.
8396 * src/output.c (output_table_data): Rename table to table_data.
8397 (output_parser): Constify macro_key, macro_value.
8398
8399 2001-08-30 Marc Autret <autret_m@epita.fr>
8400
8401 * src/reader.c (parse_skel_decl): New.
8402 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8403 * src/lex.h (token_t): New token `tok_skel'.
8404 * src/lex.c (percent_table): Add skeleton option entry.
8405 Standardize.
8406
8407 2001-08-29 Marc Autret <autret_m@epita.fr>
8408
8409 * src/bison.simple: Add %%user_code directive at the end.
8410 * src/reader.c (read_additionnal_code): New.
8411 (reader): Use it.
8412 * src/output.c (output_program): Remove.
8413 (output): Update.
8414
8415 2001-08-28 Marc Autret <autret_m@epita.fr>
8416
8417 * src/output.c (output_actions): Clean up.
8418 (output_gram): CPP-out useless code.
8419 * src/reader.c (reader): Clean up, CPP-out useless code.
8420
8421 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8422
8423 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8424 directive.
8425 * src/bison.simple: Add `%%definitions'.
8426
8427 2001-08-28 Marc Autret <autret_m@epita.fr>
8428
8429 * config/depcomp: New file.
8430
8431 2001-08-27 Paul Eggert <eggert@twinsun.com>
8432
8433 * src/bison.simple (yyparse): Don't take the address of an
8434 item before the start of an array, as that doesn't conform to
8435 the C Standard.
8436
8437 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8438
8439 * src/output.c (output): Remove the initialization of the macro
8440 obstack. It was done too late here.
8441
8442 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8443 completely wrong.
8444 (reader): Initialize the macro obstack here, since we need it to grow
8445 '%define' directives.
8446
8447 * src/reader.h: Declare the macro obstack as extern.
8448
8449 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8450
8451 * src/output.c (output_parser): Fix. Store single '%' characters in
8452 the output obstack instead of throwing them away.
8453
8454 2001-08-27 Akim Demaille <akim@epita.fr>
8455
8456 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8457
8458 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8459
8460 * lib/Makefile.am: Adjust.
8461
8462 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8463
8464 * src/bison.simple: Update and add '%%' directives.
8465
8466 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8467
8468 * src/reader.c (reader): Remove calls to 'output_headers' and
8469 'output_trailers'. Remove some C output.
8470 (readgram): Disable a piece of code that was writing a default
8471 definition for 'YYSTYPE'.
8472 (reader_output_yylsp): Remove.
8473 (packsymbols): Output token defintions to a macro.
8474 (copy_definition): Disable C output.
8475
8476 * src/reader.c (parse_macro_decl): New function used to parse macro
8477 declarations.
8478 (copy_string2): Put the body of copy_string into this new function.
8479 Add a parameter to let the caller choose whether he wants to copy the
8480 string delimiters or not.
8481 (copy_string): Be a simple call to copy_string2 with the last argument
8482 bound to true.
8483 (read_declarations): Add case for macro definition.
8484 (copy_identifier): New.
8485 (parse_macro_decl): Read macro identifiers using copy_identifier
8486 rather than lex.
8487
8488 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8489
8490 * src/output.c (prepare): Add prefixed names.
8491 (output_parser): Output semantic actions.
8492 (output_parser): Fix bug on '%%line' directives.
8493
8494 * src/output.c (output_headers): Remove. The C code printed by this
8495 function should now be in the skeletons.
8496 (output_trailers): Remove.
8497 (output): Disable call to 'reader_output_yylsp'.
8498 (output_rule_data): Do not output tables to the table obstack.
8499
8500 * src/output.c: Remove some C dedicated output.
8501 Improve the use of macro and output obstacks.
8502 (output_defines): Remove.
8503
8504 * src/output.c (output_token_translations): Associate 'translate'
8505 table with a macro. No output to the table obstack.
8506 (output_gram): Same for 'rhs' and 'prhs'.
8507 (output_stos): Same for 'stos'.
8508 (output_rule_data): Same for 'r1' and 'r2'.
8509 (token_actions): Same for 'defact'.
8510 (goto_actions): Same for 'defgoto'.
8511 (output_base): Same for 'pact' and 'pgoto'.
8512 (output_table): Same for 'table'.
8513 (output_check): Same for 'check'.
8514
8515 * src/output.c (output_table_data): New function.
8516 (output_short_table): Remove.
8517 (output_short_or_char_table): Remove.
8518
8519 * src/output.c (output_parser): Replace most of the skeleton copy code
8520 with something new. Skeletons are now processed character by character
8521 rather than line by line, and Bison looks for '%%' macros. This is the
8522 first step in making Bison's output process (a lot) more flexible.
8523 (output_parser): Use the macro table.
8524
8525 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8526
8527 * src/main.c (main): Initialize the macro table.
8528
8529 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8530
8531 * src/lex.c (percent_table): Add tok_define.
8532 * src/lex.h: Add tok_define.
8533
8534 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8535
8536 * src/macrotab.c: New file.
8537 * src/macrotab.h: New file.
8538 * src/Makefile.am: Update.
8539
8540 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8541
8542 * lib/hash.c: New file.
8543 * lib/hash.h: New file.
8544 * lib/Makefile.am: Update.
8545
8546 2001-08-15 Akim Demaille <akim@epita.fr>
8547
8548 Version 1.28c.
8549
8550 2001-08-15 Marc Autret <autret_m@epita.fr>
8551
8552 * src/reader.c (readgram): Indent output macro YYSTYPE.
8553 (packsymbols): Likewise.
8554 (output_token_defines): Likewise.
8555 * src/files.c: Standardize.
8556 (compute_header_macro): New.
8557 (defines_obstack_save): New. Use compute_header_macro.
8558 (output_files): Update. Use defines_obstack_save.
8559
8560 2001-08-15 Akim Demaille <akim@epita.fr>
8561
8562 * doc/bison.texinfo (Table of Symbols): Document
8563 YYSTACK_USE_ALLOCA.
8564
8565 2001-08-15 Akim Demaille <akim@epita.fr>
8566
8567 * missing: Update from CVS Automake.
8568 * config/config.guess, config/config.sub, config/texinfo.tex:
8569 Update from gnu.org.
8570
8571 2001-08-15 Akim Demaille <akim@epita.fr>
8572
8573 * Makefile.maint: Sync with CVS Autoconf.
8574
8575 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8576
8577 * doc/bison.texinfo: Include GNU Free Documentation License from
8578 `fdl.texi'.
8579 * doc/fdl.texi: Add to package.
8580
8581 2001-08-14 Marc Autret <autret_m@epita.fr>
8582
8583 Turn on %{source,header}_extension features.
8584
8585 * src/lex.c (percent_table): Un-CPP out header_extension and
8586 source_extension.
8587 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8588 (compute_exts_from_src): Remove conditions. It restores priorities
8589 between options.
8590
8591 2001-08-14 Marc Autret <autret_m@epita.fr>
8592
8593 * src/files.c (compute_base_names): Add extensions computing when
8594 `--file-prefix' used.
8595 Standardize function calls.
8596
8597 2001-08-13 Marc Autret <autret_m@epita.fr>
8598
8599 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8600 defining it (defined but null disables alloca).
8601
8602 2001-08-13 Marc Autret <autret_m@epita.fr>
8603
8604 * src/bison.simple (_yy_memcpy): CPP reformat.
8605
8606 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8607
8608 * tests/atconfig.in (CPPFLAGS): Fix.
8609
8610 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8611
8612 * doc/bison.texinfo: Include GNU General Public License from
8613 `gpl.texi'.
8614 * doc/gpl.texi: Add to package.
8615
8616 2001-08-10 Marc Autret <autret_m@epita.fr>
8617
8618 * src/print_graph.h: Fix.
8619 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8620
8621 2001-08-10 Akim Demaille <akim@epita.fr>
8622
8623 * src/system.h: Provide default declarations for stpcpy, strndup,
8624 and strnlen.
8625
8626 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8627
8628 * doc/bison.texinfo (Locations): Update @$ stuff.
8629
8630 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8631
8632 * src/bison.simple (YYLLOC_DEFAULT): Update.
8633 (yyparse): Adjust.
8634
8635 2001-08-08 Marc Autret <autret_m@epita.fr>
8636
8637 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8638 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8639 Reported by Fabrice Bauzac.
8640
8641 2001-08-08 Marc Autret <autret_m@epita.fr>
8642
8643 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8644 * src/vcg.c (output_node): Fix.
8645 * src/vcg.h: Cleanup.
8646 * src/print_graph.c: Add comments.
8647 (node_output_size): New global variable. Simplify the formatting of
8648 the VCG graph output.
8649 (print_actions): Unused code is now used. It notifies the final state
8650 and no action states in the VCG graph. It also give the reduce actions.
8651 The `shift and goto' edges are red and the `go to state' edges are
8652 blue.
8653 Get the current node name and node_obstack by argument.
8654 (node_obstack): New variable.
8655 (print_state): Manage node_obstack.
8656 (print_core): Use node_obstack given by argument.
8657 A node is not only computed here but in print_actions also.
8658 (print_graph): CPP out useless code instead of commenting it.
8659
8660 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8661
8662 * tests/atconfig.in (CPPFLAGS): Fix.
8663
8664 2001-08-07 Akim Demaille <akim@epita.fr>
8665
8666 * src/print_graph.c (quote): New.
8667 (print_core): Use it.
8668
8669 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8670
8671 * src/vcg.c (complain.h): Include it.
8672 Unepitaize `return' invocations.
8673 [NDEBUG] (main): Remove.
8674 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8675 * src/files.c (open_files): Initialize graph_obstack.
8676 * src/print_graph.c (print_actions): CPP out useless code.
8677 (print_core): Don't output the last `\n' in labels.
8678 Use `quote'.
8679 * src/files.c (output_files): Output the VCG file.
8680 * src/main.c (main): Invoke print_graph ();
8681
8682 2001-08-06 Marc Autret <autret_m@epita.fr>
8683
8684 Automaton VCG graph output.
8685 Using option ``-g'' or long option ``--graph'', you can generate
8686 a gram_filename.vcg file containing a VCG description of the LALR (1)
8687 automaton of your grammar.
8688
8689 * src/main.c: Call to print_graph() function.
8690 * src/getargs.h: Update.
8691 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8692 (graph_flag): New flag.
8693 (longopts): Update.
8694 (getargs): Add case `g'.
8695 * src/files.c (graph_obstack): New obstack struct.
8696 (open_files): Initialize new obstack.
8697 (output_files): Saves graph_obstack if required.
8698 * src/files.h (graph_obstack): New extern declaration.
8699 * src/Makefile.am: Add new source files.
8700
8701 2001-08-06 Marc Autret <autret_m@epita.fr>
8702
8703 * src/print_graph.c, src/print_graph.h (graph): New.
8704 * src/vcg.h: New file.
8705 * src/vcg.c: New file, VCG graph handling.
8706
8707 2001-08-06 Marc Autret <autret_m@epita.fr>
8708
8709 Add of %source_extension and %header_extension which specify
8710 the source or/and the header output file extension.
8711
8712 * src/files.c (compute_base_names): Remove initialisation of
8713 src_extension and header_extension.
8714 (compute_exts_from_gf): Update.
8715 (compute_exts_from_src): Update.
8716 (output_files): Update.
8717 * src/reader.c (parse_header_extension_decl): New.
8718 (parse_source_extension_decl): New.
8719 (read_declarations): New case statements for the new tokens.
8720 * src/lex.c (percent_table): Add entries for %source_extension
8721 and %header_extension.
8722 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8723
8724 2001-08-06 Marc Autret <autret_m@epita.fr>
8725
8726 * configure.in: Bump to 1.28c.
8727 * doc/bison.texinfo: Texinfo thingies.
8728
8729 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8730
8731 * tests/atconfig.in (CPPFLAGS): Add.
8732 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8733
8734 2001-08-03 Akim Demaille <akim@epita.fr>
8735
8736 Version 1.28b.
8737
8738 2001-08-03 Akim Demaille <akim@epita.fr>
8739
8740 * tests/Makefile.am (check-local): Ship testsuite.
8741 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8742 Include `string.h'.
8743
8744 2001-08-03 Akim Demaille <akim@epita.fr>
8745
8746 * configure.in: Try using -Wformat when compiling.
8747
8748 2001-08-03 Akim Demaille <akim@epita.fr>
8749
8750 * configure.in: Bump to 1.28b.
8751
8752 2001-08-03 Akim Demaille <akim@epita.fr>
8753
8754 * src/complain.c: Adjust strerror_r portability issues.
8755
8756 2001-08-03 Akim Demaille <akim@epita.fr>
8757
8758 Version 1.28a.
8759
8760 2001-08-03 Akim Demaille <akim@epita.fr>
8761
8762 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8763 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8764 * src/getargs.c: Include complain.h.
8765 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8766 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8767
8768 2001-08-03 Akim Demaille <akim@epita.fr>
8769
8770 * src/reader.c (readgram): Display hidden chars in error messages.
8771
8772 2001-08-03 Akim Demaille <akim@epita.fr>
8773
8774 Update to gettext 0.10.39.
8775
8776 2001-08-03 Akim Demaille <akim@epita.fr>
8777
8778 * lib/strspn.c: New.
8779
8780 2001-08-01 Marc Autret <autret_m@epita.fr>
8781
8782 * doc/bison.texinfo: Update.
8783 * doc/bison.1 (mandoc): Update.
8784 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8785 * src/files.c: Support output files extensions computing.
8786 (src_extension): New static variable.
8787 (header_extension): New static variable.
8788 (tr): New function.
8789 (get_extension_index): New function, gets the index of an extension
8790 filename in a string.
8791 (compute_exts_from_gf): New function, computes extensions from the
8792 grammar file extension.
8793 (compute_exts_from_src): New functions, computes extensions from the
8794 C source file extension, file given by ``-o'' option.
8795 (compute_base_names): Update.
8796 (output_files): Update.
8797
8798 2001-08-01 Robert Anisko <anisko_r@epita.fr>
8799
8800 * doc/bison.texi: Document @$.
8801 (Locations): New section.
8802
8803 2001-07-18 Akim Demaille <akim@epita.fr>
8804
8805 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8806 * config/prev-version.txt, config/move-if-change: New.
8807 * Makefile.am: Adjust.
8808
8809 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
8810
8811 * src/bison.simple (yyparse): Suppress warning `comparaison
8812 between signed and unsigned'.
8813
8814 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
8815
8816 * src/getargs.h (raw_flag): Remove.
8817 * src/getargs.c: Die on `-r'/`--raw'.
8818 * src/lex.c (parse_percent_token): Die on `%raw'.
8819 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8820 * tests/calc.at: Suppress test with option `--raw'.
8821
8822 2001-07-14 Akim Demaille <akim@epita.fr>
8823
8824 * config/: New.
8825 * configure.in: Require Autoconf 2.50.
8826 Update to gettext 0.10.38.
8827
8828 2001-03-16 Akim Demaille <akim@epita.fr>
8829
8830 * doc/bison.texinfo: ANSIfy the examples.
8831
8832 2001-03-16 Akim Demaille <akim@epita.fr>
8833
8834 * getargs.c (skeleton): New variable.
8835 (longopts): --skeleton is a new option.
8836 (shortopts, getargs): -S is a new option.
8837 * getargs.h: Declare skeleton.
8838 * output.c (output_parser): Use it.
8839
8840 2001-03-16 Akim Demaille <akim@epita.fr>
8841
8842 * m4/strerror_r.m4: New.
8843 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8844 * lib/error.h, lib/error.c: Update.
8845
8846 2001-03-16 Akim Demaille <akim@epita.fr>
8847
8848 * src/getargs.c (longopts): Clean up.
8849
8850 2001-02-21 Akim Demaille <akim@epita.fr>
8851
8852 * src/reader.c (gensym): `gensym_count' is your own.
8853 Use a static buf to create the symbol name, as token_buffer is no
8854 longer a buffer.
8855
8856 2001-02-08 Akim Demaille <akim@epita.fr>
8857
8858 * src/conflicts.c (conflict_report): Be sure not to append to res
8859 between two calls, which could happen if both first sprintf were
8860 skipped, but not the first cp += strlen.
8861
8862 2001-02-08 Akim Demaille <akim@epita.fr>
8863
8864 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8865 New, from fileutils 4.0.37.
8866 * configure.in: Require Autoconf 2.49c. I took some time before
8867 making this decision. This is the only way out for portability
8868 issues in Bison, it would mean way too much duplicate effort to
8869 import in Bison features implemented in 2.49c since 2.13.
8870 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
8871
8872 2001-02-02 Akim Demaille <akim@epita.fr>
8873
8874 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
8875 * lib/xalloc.h, lib/xmalloc.c: Update.
8876
8877 2001-01-19 Akim Demaille <akim@epita.fr>
8878
8879 Get rid of the ad hoc handling of token_buffer in the scanner: use
8880 the obstacks.
8881
8882 * src/lex.c (token_obstack): New.
8883 (init_lex): Initialize it. No longer call...
8884 (grow_token_buffer): this. Remove it.
8885 Adjust all the places which used it to use the obstack.
8886
8887 2001-01-19 Akim Demaille <akim@epita.fr>
8888
8889 * src/lex.h: Rename all the tokens:
8890 s/\bENDFILE\b/tok_eof/g;
8891 s/\bIDENTIFIER\b/tok_identifier/g;
8892 etc.
8893 Let them be enums, not #define, to ease debugging.
8894 Adjust all the code.
8895
8896 2001-01-18 Akim Demaille <akim@epita.fr>
8897
8898 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
8899 * src/lex.c (maxtoken, grow_token_buffer): Static.
8900
8901 2001-01-18 Akim Demaille <akim@epita.fr>
8902
8903 Since we now use obstacks, more % directives can be enabled.
8904
8905 * src/lex.c (percent_table): Also accept `%yacc',
8906 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
8907 `%debug'.
8908 Handle the actions for `%semantic_parser' and `%pure_parser' here,
8909 instead of returning a token.
8910 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
8911 * src/reader.c (read_declarations): Adjust.
8912 * src/files.c (open_files): Don't call `compute_base_names', don't
8913 compute `attrsfile' since they depend upon data which might be
8914 *in* the input file now.
8915 (output_files): Do it here.
8916 * src/output.c (output_headers): Document the fact that this patch
8917 introduces a guaranteed SEGV for semantic parsers.
8918 * doc/bison.texinfo: Document them.
8919 * tests/suite.at: Exercise these %options.
8920
8921 2000-12-20 Akim Demaille <akim@epita.fr>
8922
8923 Also handle the output file (--verbose) with obstacks.
8924
8925 * files.c (foutput): Remove.
8926 (output_obstack): New.
8927 Adjust all dependencies.
8928 * src/conflicts.c: Return a string.
8929 * src/system.h (obstack_grow_string): Rename as...
8930 (obstack_sgrow): this. Be ready to work with non literals.
8931 (obstack_fgrow4): New.
8932
8933 2000-12-20 Akim Demaille <akim@epita.fr>
8934
8935 * src/files.c (open_files): Fix the computation of short_base_name
8936 in the case of `-o foo.tab.c'.
8937
8938 2000-12-20 Akim Demaille <akim@epita.fr>
8939
8940 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
8941 (copy_dollar): Now that everything uses obstacks, get rid of the
8942 FILE * parameters.
8943
8944 2000-12-20 Akim Demaille <akim@epita.fr>
8945
8946 * src/files.c (open_files): Actually the `.output' file is based
8947 on the short_base_name, not base_name.
8948 * tests/suite.at (Checking output file names): Adjust.
8949
8950 2000-12-20 Akim Demaille <akim@epita.fr>
8951
8952 * src/bison.s1: Remove, we now use directly...
8953 * src/bison.simple: this.
8954 * src/Makefile.am: Use pkgdata instead of data.
8955
8956 2000-12-20 Akim Demaille <akim@epita.fr>
8957
8958 * src/files.c (guard_obstack): New.
8959 (open_files): Initialize it.
8960 (output_files): Dump it...
8961 * src/files.h: Export it.
8962 * src/reader.c (copy_guard): Use it.
8963
8964 2000-12-19 Akim Demaille <akim@epita.fr>
8965
8966 * src/files.c (outfile, defsfile, actfile): Removed as global
8967 vars.
8968 (open_files): Don't compute them.
8969 (output_files): Adjust.
8970 (base_name, short_base_name): Be global.
8971 Adjust dependencies.
8972
8973 2000-12-19 Akim Demaille <akim@epita.fr>
8974
8975 * src/files.c (strsuffix): New.
8976 (stringappend): Be just like strcat but allocate.
8977 (base_names): Eve out from open_files.
8978 Try to simplify the rather hairy computation of base_name and
8979 short_base_name.
8980 (open_files): Use it.
8981 * tests/suite.at (Checking output file names): New test.
8982
8983 2000-12-19 Akim Demaille <akim@epita.fr>
8984
8985 * src/system.h (obstack_grow_literal_string): Rename as...
8986 (obstack_grow_string): this.
8987 * src/output.c (output_parser): Recognize `%% actions' instead of
8988 `$'.
8989 * src/bison.s1: s/$/%% actions/.
8990 * src/bison.hairy: Likewise.
8991
8992 2000-12-19 Akim Demaille <akim@epita.fr>
8993
8994 * src/output.c (output_parser): Compute the `#line' lines when
8995 there are.
8996 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
8997 Suggested by Hans Aberg.
8998
8999 2000-12-19 Akim Demaille <akim@epita.fr>
9000
9001 Let the handling of the skeleton files be local to the procedures
9002 that use it.
9003
9004 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9005 longer static.
9006 (fparser, open_extra_files): Remove.
9007 (open_files, output_files): Don't take care of fparser.
9008 * src/files.h: Adjust.
9009 * src/output.c (output_parser): Open and close the file to the
9010 skeleton.
9011 * src/reader.c (read_declarations): When %semantic_parser, open
9012 fguard.
9013
9014 2000-12-19 Akim Demaille <akim@epita.fr>
9015
9016 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9017 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9018
9019 2000-12-19 Akim Demaille <akim@epita.fr>
9020
9021 * src/files.c (open_files): Yipee! We no longer need all the code
9022 looking for `/tmp' since we have no tmp file.
9023
9024 2000-12-19 Akim Demaille <akim@epita.fr>
9025
9026 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9027 New macros.
9028 * src/files.c (open_files): Less dependency on MSDOS etc.
9029
9030 2000-12-14 Akim Demaille <akim@epita.fr>
9031
9032 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9033 Provide a default definition.
9034 Use it when executing the default @ action.
9035 * src/reader.c (reader_output_yylsp): No longer include
9036 `timestamp' and `text' in the default YYLTYPE.
9037
9038 2000-12-12 Akim Demaille <akim@epita.fr>
9039
9040 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9041 (copy_guard): Quote the file names.
9042 Reported by Laurent Mascherpa.
9043
9044 2000-12-12 Akim Demaille <akim@epita.fr>
9045
9046 * src/output.c (output_headers, output_program, output): Be sure
9047 to escape special characters when outputting filenames.
9048 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9049 (output_headers): Don't depend on them, Use ACTSTR.
9050
9051 2000-11-17 Akim Demaille <akim@epita.fr>
9052
9053 * lib/obstack.h: Formatting changes.
9054 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9055 prevents type checking.
9056 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9057 cast the value to (void *): assigning a `foo *' to a `void *'
9058 variable is valid.
9059 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9060 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9061 append characters.
9062
9063 2000-11-17 Akim Demaille <akim@epita.fr>
9064
9065 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9066 as...
9067 (suite.m4, regression.m4, calc.m4): these.
9068 * tests/atgeneral.m4: Update from CVS Autoconf.
9069
9070 2000-11-17 Akim Demaille <akim@epita.fr>
9071
9072 * tests/regression.m4 (%union and --defines): New test,
9073 demonstrating a current bug in the obstack implementation.
9074
9075 2000-11-17 Akim Demaille <akim@epita.fr>
9076
9077 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9078 macros.
9079 Use them to declare the variables which are global or local to
9080 `yyparse'.
9081
9082 2000-11-17 Akim Demaille <akim@epita.fr>
9083
9084 * acconfig.h: Remove, no longer used.
9085
9086 2000-11-07 Akim Demaille <akim@epita.fr>
9087
9088 * src: s/Copyright (C)/Copyright/g.
9089
9090 2000-11-07 Akim Demaille <akim@epita.fr>
9091
9092 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9093 defining.
9094 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9095
9096 2000-11-07 Akim Demaille <akim@epita.fr>
9097
9098 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9099 Merge in a single CPP if/else.
9100
9101 2000-11-07 Akim Demaille <akim@epita.fr>
9102
9103 * src/output.c (output): Remove useless variables.
9104 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9105 argument `data' for consistency with the prototypes.
9106 Qualify it `const'.
9107 (obstack_copy, obstack_copy0): Rename the second argument as
9108 `address' for consistency. Qualify it `const'.
9109 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9110 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9111 `const' their input argument (`data' or `address').
9112 Adjust the corresponding macros to include `const' in casts.
9113
9114 2000-11-03 Akim Demaille <akim@epita.fr>
9115
9116 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9117 s/PFILE1/BISON_HAIRY/.
9118 Adjust dependencies.
9119
9120 2000-11-03 Akim Demaille <akim@epita.fr>
9121
9122 For some reason, this was not applied.
9123
9124 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9125 `unlink': it's no longer used.
9126
9127 2000-11-03 Akim Demaille <akim@epita.fr>
9128
9129 * src/files.c (skeleton_find): New function, eved out of...
9130 (open_files, open_extra_files): here.
9131
9132 2000-11-03 Akim Demaille <akim@epita.fr>
9133
9134 Don't use `atexit'.
9135
9136 * src/files.c (obstack_save): New function.
9137 (done): Rename as...
9138 (output_files): this.
9139 Use `obstack_save'.
9140 * src/main.c (main): Don't use `atexit' to register `done', since
9141 it no longer has to remove tmp files, just call `output_files'
9142 when there are no errors.
9143
9144 2000-11-02 Akim Demaille <akim@epita.fr>
9145
9146 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9147 `unlink': it's no longer used.
9148 * src/files.h: Formatting changes.
9149
9150 2000-11-02 Akim Demaille <akim@epita.fr>
9151
9152 Remove the last uses of mktemp and unlink/delete.
9153
9154 * src/files.c (fdefines, ftable): Removed.
9155 (defines_ostack, table_obstack): New.
9156 Adjust dependencies of the former into uses of the latter.
9157 * src/output.c (output_short_or_char_table, output_short_table):
9158 Convert to using obstacks.
9159 * src/reader.c (copy_comment2): Accept one FILE * and two
9160 obstacks.
9161 (output_token_defines, reader_output_yylsp): Use obstacks.
9162 * src/system.h (obstack_fgrow3): New.
9163
9164 2000-11-01 Akim Demaille <akim@epita.fr>
9165
9166 Change each use of `fattrs' into a use of `attrs_obstack'.
9167
9168 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9169 * src/files.c (fattrs): Remove.
9170 (attrs_obstack): New.
9171 Adjust all dependencies.
9172 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9173
9174 2000-11-01 Akim Demaille <akim@epita.fr>
9175
9176 Introduce obstacks.
9177 Change each use of `faction' into a use of `action_obstack'.
9178
9179 * lib/obstack.h, lib/obstack.c: New files.
9180 * src/files.c (faction): Remove.
9181 (action_obstack): New.
9182 Adjust all dependencies.
9183
9184 2000-10-20 Akim Demaille <akim@epita.fr>
9185
9186 * lib/quote.h (PARAMS): New macro. Use it.
9187
9188 2000-10-16 Akim Demaille <akim@epita.fr>
9189
9190 * src/output.c (output_short_or_char_table): New function.
9191 (output_short_table, output_token_translations): Use it.
9192 (goto_actions): Use output_short_table.
9193
9194 2000-10-16 Akim Demaille <akim@epita.fr>
9195
9196 * src/symtab.c (bucket_new): New function.
9197 (getsym): Use it.
9198
9199 * src/output.c (output_short_table): New argument to display the
9200 comment associated with the table.
9201 Adjust dependencies.
9202 (output_gram): Use it.
9203 (output_rule_data): Nicer output layout for YYTNAME.
9204
9205 2000-10-16 Akim Demaille <akim@epita.fr>
9206
9207 * src/lex.c (read_typename): New function.
9208 (lex): Use it.
9209 * src/reader.c (copy_dollar): Likewise.
9210
9211 2000-10-16 Akim Demaille <akim@epita.fr>
9212
9213 * src/reader.c (copy_comment2): Expect the input stream to be on
9214 the `/' which is suspected to open a comment, instead of being
9215 called after `//' or `/*' was read.
9216 (copy_comment, copy_definition, parse_union_decl, copy_action)
9217 (copy_guard): Adjust.
9218
9219 2000-10-16 Akim Demaille <akim@epita.fr>
9220
9221 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9222 `read_signed_integer'.
9223
9224 2000-10-16 Akim Demaille <akim@epita.fr>
9225
9226 * src/reader.c (copy_dollar): New function.
9227 (copy_guard, copy_action): Use it.
9228
9229 2000-10-16 Akim Demaille <akim@epita.fr>
9230
9231 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9232 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9233 New files, from Fileutils 4.0.27.
9234 * src/main.c (printable_version): Remove.
9235 * src/lex.c, src/reader.c: Use `quote'.
9236
9237 2000-10-04 Akim Demaille <akim@epita.fr>
9238
9239 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9240
9241 2000-10-04 Akim Demaille <akim@epita.fr>
9242
9243 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9244
9245 2000-10-04 Akim Demaille <akim@epita.fr>
9246
9247 When a literal string is used to define two different tokens,
9248 `bison -v' segfaults.
9249 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9250
9251 * tests/regression.m4: New file.
9252 Include the core of the sample provided by Piotr Gackiewicz.
9253 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9254 properly.
9255
9256 2000-10-04 Akim Demaille <akim@epita.fr>
9257
9258 * src/reader.c (parse_expect_decl): Keep `count' within the size
9259 of `buffer'.
9260 From Neil Booth.
9261
9262 2000-10-02 Paul Eggert <eggert@twinsun.com>
9263
9264 * bison.s1 (yyparse): Assign the default value
9265 unconditionally, to avoid a GCC warning and make the parser a
9266 tad smaller.
9267
9268 2000-10-02 Akim Demaille <akim@epita.fr>
9269
9270 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9271 options.
9272
9273 2000-10-02 Akim Demaille <akim@epita.fr>
9274
9275 * src/derives.c, src/print.c, src/reduce.c: To ease the
9276 translation, move some `\n' out of the translated strings.
9277
9278 2000-10-02 Akim Demaille <akim@epita.fr>
9279
9280 The location tracking mechanism is precious for parse error
9281 messages. Nevertheless, it is enabled only when `@n' is used in
9282 the grammar, which is a different issue (you can use it in error
9283 message, but not in the grammar per se). Therefore, there should
9284 be another means to enable it.
9285
9286 * src/getargs.c (getargs): Support `--locations'.
9287 (usage): Report it.
9288 * src/getargs.h (locationsflag): Export it.
9289 * src/lex.c (percent_table): Support `%locations'.
9290 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9291 with `locationsflag'.
9292 * doc/bison.texinfo: Document `--locations' and `%locations'.
9293 Sort the options.
9294 * tests/calc.m4: Test it.
9295
9296 For regularity of the names, replace each
9297 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9298 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9299 In addition replace each `flag' with `_flag'.
9300
9301 2000-10-02 Akim Demaille <akim@epita.fr>
9302
9303 Also test parse error messages, including with YYERROR_VERBOSE.
9304
9305 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9306 associative).
9307 Use it to check the computations.
9308 Use it to check `nonassoc' is honored.
9309 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9310 `--yyerror-verbose'.
9311 (_AT_CHECK_CALC): Adjust to this option.
9312 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9313
9314 2000-10-02 Akim Demaille <akim@epita.fr>
9315
9316 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9317 the latter demonstrates a flaw in the handling of non debugging
9318 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9319 was used in order to simplify:
9320
9321 #if YYDEBUG
9322 if (yydebug)
9323 {
9324 ...
9325 }
9326 #endif
9327
9328 into
9329
9330 if (yydebug)
9331 {
9332 ...
9333 }
9334
9335 unfortunately this leads to a CPP conflict when
9336 `--name-prefix=foo' is used since it produces `#define yydebug
9337 foodebug'.
9338
9339 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9340 (YYDPRINTF): New macro.
9341 Spread its use.
9342 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9343 the bison options.
9344 Also test `--verbose', `--defines' and `--name-prefix'.
9345
9346 2000-10-02 Akim Demaille <akim@epita.fr>
9347
9348 Improve the readability of the produced parsers.
9349
9350 * src/bison.s1: Formatting changes.
9351 Improve the comment related to the `$' mark.
9352 (yydefault): Don't fall through to `yyresume': `goto' there.
9353 * src/output.c (output_parser): When the `$' is met, skip the end
9354 of its line.
9355 New variable, `number_of_dollar_signs', to check there's exactly
9356 one `$' in the parser skeleton.
9357
9358 2000-10-02 Akim Demaille <akim@epita.fr>
9359
9360 * lib/xstrdup.c: New file, from the fileutils.
9361 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9362 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9363 instead of strlen + xmalloc + strcpy.
9364 * src/symtab.c (copys): Remove, use xstrdup instead.
9365
9366 2000-10-02 Akim Demaille <akim@epita.fr>
9367
9368 * src/gram.h (associativity): New enum type which replaces the
9369 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9370 `right_assoc', `left_assoc' and `non_assoc'.
9371 Adjust all dependencies.
9372 * src/reader.c: Formatting changes.
9373 (LTYPESTR): Don't define it, use it as a literal in
9374 `reader_output_yylsp'.
9375 * src/symtab.h (symbol_class): New enum type which replaces the
9376 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9377 `sunknown', `stoken and `snterm'.
9378
9379 2000-10-02 Akim Demaille <akim@epita.fr>
9380
9381 * src/getargs.c (fixed_outfiles): Rename as...
9382 (yaccflag): for consistency and accuracy.
9383 Adjust dependencies.
9384
9385 2000-10-02 Akim Demaille <akim@epita.fr>
9386
9387 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9388 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9389 difficult and introduced a lot of core dump. It turns out that
9390 Bison used an implementation of `xmalloc' based on `calloc', and
9391 at various places it does depend upon the initialization to 0. I
9392 have not tried to isolate the pertinent places, and all the former
9393 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9394 someone should address this issue.
9395
9396 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9397 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9398 files.
9399 Adjust dependencies.
9400 * src/warshall.h: New file.
9401 Propagate.
9402
9403 2000-10-02 Akim Demaille <akim@epita.fr>
9404
9405 Various anti-`extern in *.c' changes.
9406
9407 * src/system.h: Include `assert.h'.
9408
9409 2000-10-02 Akim Demaille <akim@epita.fr>
9410
9411 * src/state.h (nstates, final_state, first_state, first_shift)
9412 (first_reduction): Move their exportation from here...
9413 * src/LR0.h: to here.
9414 Adjust dependencies.
9415 * src/getargs.c (statisticsflag): New variable.
9416 Add support for `--statistics'.
9417 Adjust dependencies.
9418
9419 Remove a lot of now useless `extern' statements in most files.
9420
9421 2000-10-02 Akim Demaille <akim@epita.fr>
9422
9423 * src/LR0.h: New file.
9424 Propagate its use.
9425
9426 2000-10-02 Akim Demaille <akim@epita.fr>
9427
9428 * src/print.h: New file.
9429 Propagate its use.
9430 * src/print.c: Formatting and ordering changes.
9431 (verbose, terse): Replace with...
9432 (print_results): this new function.
9433 Adjust dependencies.
9434
9435 2000-10-02 Akim Demaille <akim@epita.fr>
9436
9437 * src/conflicts.c (conflict_report): New function.
9438 (conflict_log, verbose_conflict_log): Replace with...
9439 (print_conflicts): this function.
9440 Adjust dependencies.
9441 * src/conflicts.h: New file.
9442 Propagate its inclusion.
9443
9444 2000-10-02 Akim Demaille <akim@epita.fr>
9445
9446 * src/nullable.h: New file.
9447 Propagate its inclusion.
9448 * src/nullable.c: Formatting changes.
9449
9450 2000-10-02 Akim Demaille <akim@epita.fr>
9451
9452 * src/reduce.h: New file.
9453 Propagate its inclusion.
9454 * src/reduce.c: Topological sort and other formatting changes.
9455 (bool, TRUE, FALSE): Move their definition to...
9456 * src/system.h: here.
9457
9458 2000-10-02 Akim Demaille <akim@epita.fr>
9459
9460 * src/files.c: Formatting changes.
9461 (tryopen, tryclose, openfiles): Rename as...
9462 (xfopen, xfclose, open_files): this.
9463 (stringappend): static.
9464 * src/files.h: Complete the list of exported symbols.
9465 Propagate its use.
9466
9467 2000-10-02 Akim Demaille <akim@epita.fr>
9468
9469 * src/reader.h: New file.
9470 Propagate its use instead of tedious list of `extern' and
9471 prototypes.
9472 * src/reader.c: Formatting changes, topological sort,
9473 s/register//.
9474
9475 2000-10-02 Akim Demaille <akim@epita.fr>
9476
9477 * src/lex.h: Prototype `lex.c' exported functions.
9478 * src/reader.c: Adjust.
9479 * src/lex.c: Formatting changes.
9480 (safegetc): Rename as...
9481 (xgetc): this.
9482
9483 2000-10-02 Akim Demaille <akim@epita.fr>
9484
9485 * src/lalr.h: New file.
9486 Propagate its inclusion instead of prototypes and `extern'.
9487 * src/lalr.c: Formatting changes, topological sorting etc.
9488
9489 2000-10-02 Akim Demaille <akim@epita.fr>
9490
9491 * src/output.c (token_actions): Introduce a temporary array,
9492 YYDEFACT, that makes it possible for this function to use
9493 output_short_table.
9494
9495 2000-10-02 Akim Demaille <akim@epita.fr>
9496
9497 `user_toknums' is output as a `short[]' in `output.c', while it is
9498 defined as a `int[]' in `reader.c'. For consistency with the
9499 other output tables, `user_toknums' is now defined as a table of
9500 shorts.
9501
9502 * src/reader.c (user_toknums): Be a short table instead of an int
9503 table.
9504 Adjust dependencies.
9505
9506 Factor the short table outputs.
9507
9508 * src/output.c (output_short_table): New function.
9509 * src/output.c (output_gram, output_stos, output_rule_data)
9510 (output_base, output_table, output_check): Use it.
9511
9512 2000-10-02 Akim Demaille <akim@epita.fr>
9513
9514 * src/output.c (output): Topological sort of the functions, in
9515 order to get rid of the `static' prototypes.
9516 No longer use `register'.
9517 * src/output.h: New file.
9518 Propagate its inclusion in files explicitly prototyping functions
9519 from output.c.
9520
9521 2000-09-21 Akim Demaille <akim@epita.fr>
9522
9523 * src/atgeneral.m4: Update from Autoconf.
9524
9525 2000-09-21 Akim Demaille <akim@epita.fr>
9526
9527 * src/closure.h: New file.
9528 * src/closure.c: Formatting changes, topological sort over the
9529 functions, use of closure.h.
9530 (initialize_closure, finalize_closure): Rename as...
9531 (new_closure, free_closure): these. Adjust dependencies.
9532 * src/LR0.c: Formatting changes, topological sort, use of
9533 cloture.h.
9534 (initialize_states): Rename as...
9535 (new_states): this.
9536 * src/Makefile.am (noinst_HEADERS): Adjust.
9537
9538 2000-09-20 Akim Demaille <akim@epita.fr>
9539
9540 * src/acconfig.h: Don't protect config.h against multiple
9541 inclusion.
9542 Don't define PARAMS.
9543 * src/system.h: Define PARAMS.
9544 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9545 purpose of config.h. system.h must not try to fix wrong
9546 definitions in config.h.
9547
9548 2000-09-20 Akim Demaille <akim@epita.fr>
9549
9550 * src/derives.h: New file.
9551 * src/main.c, src/derives.h: Use it.
9552 Formatting changes.
9553 * src/Makefile.am (noinst_HEADERS): Adjust.
9554
9555 2000-09-20 Akim Demaille <akim@epita.fr>
9556
9557 * tests/atgeneral.m4: Update from Autoconf.
9558 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9559 (AT_CHECK_CALC): New macros.
9560 Use these macros to test bison with options `', `--raw',
9561 `--debug', `--yacc', `--yacc --debug'.
9562
9563 2000-09-19 Akim Demaille <akim@epita.fr>
9564
9565 * src/output.c: Formatting changes.
9566 * src/machine.h: Remove, leaving its contents in...
9567 * src/system.h: here.
9568 Include stdio.h.
9569 Adjust all dependencies on stdio.h and machine.h.
9570 * src/getargs.h: New file.
9571 Let all `extern' declarations about getargs.c be replaced with
9572 inclusion of `getargs.h'.
9573 * src/Makefile.am (noinst_HEADERS): Adjust.
9574
9575 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9576 scope.
9577 (yyerror): Returns void, not int.
9578 * doc/bison.texinfo: Formatting changes.
9579
9580 2000-09-19 Akim Demaille <akim@epita.fr>
9581
9582 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9583 portable.
9584
9585 2000-09-18 Akim Demaille <akim@epita.fr>
9586
9587 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9588 * src/Makefile.am (INCLUDES): Don't.
9589 Be ready to fetch headers in lib/.
9590
9591 2000-09-18 Akim Demaille <akim@epita.fr>
9592
9593 * doc/bison.texinfo: Update the copyright.
9594 ANSIfy and GNUify the examples.
9595 Remove the old menu.
9596
9597 2000-09-18 Akim Demaille <akim@epita.fr>
9598
9599 First set of tests: use the `calc' example from the documentation.
9600
9601 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9602 is defined only when YYDEBUG is.
9603 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9604 * src/files.c (tryopen, tryclose): Formatting changes.
9605 Move to the top and be static.
9606 * src/reader.c (read_signed_integer): Likewise.
9607 * tests/calc.m4: New file.
9608 * Makefile.am, suite.m4: Adjust.
9609 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9610
9611 2000-09-18 Akim Demaille <akim@epita.fr>
9612
9613 Add support for an Autotest test suite for Bison.
9614
9615 * m4/m4.m4, m4/atconfig.m4: New files.
9616 * m4/Makefile.am (EXTRA_DIST): Adjust.
9617 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9618 files.
9619 * src/getargs.c: Display a more standard --version message.
9620 * src/reader.c (reader): Formatting changes.
9621 No longer depend upon VERSION_STRING.
9622 * configure.in: No longer use `dnl'.
9623 Set up the test suite and the new directory `tests/.
9624 (VERSION_STRING): Remove.
9625
9626 2000-04-14 Akim Demaille <akim@epita.fr>
9627
9628 * src/reader.c (copy_comment2): New function, same as former
9629 `copy_comment', but outputs into two FILE *.
9630 (copy_comment): Use it.
9631 (parse_union_decl): Use it.
9632 (get_type, parse_start_decl): Use the same `invalid' message.
9633 (parse_start_decl, parse_union_decl): Use the same `multiple'
9634 message.
9635 (parse_union_decl, copy_guard, copy_action): Use the same
9636 `unmatched' message.
9637 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9638
9639 2000-03-31 Akim Demaille <akim@epita.fr>
9640
9641 * src/files.c (tryopen, tryclose): Move to the top.
9642 Be static.
9643
9644 2000-03-31 Akim Demaille <akim@epita.fr>
9645
9646 * src/main.c (main): Don't call `done', exit does it.
9647
9648 2000-03-31 Akim Demaille <akim@epita.fr>
9649
9650 * allocate.c: s/return (foo)/return foo/.
9651 * lalr.c: Likewise.
9652 * LR0.c: Likewise.
9653 * output.c: Likewise.
9654 * reader.c: Likewise.
9655 * symtab.c: Likewise.
9656 * vmsgetargs.c: Likewise.
9657
9658 2000-03-31 Akim Demaille <akim@epita.fr>
9659
9660 Clean up the error reporting functions.
9661
9662 * src/report.c: New file.
9663 * src/report.h: Likewise.
9664 * src/Makefile.am: Adjust.
9665 * m4/error.m4: New file.
9666 * m4/Makefile.am: Adjust.
9667 * configure.in (jm_PREREQ_ERROR): Call it.
9668 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9669 Remove.
9670 (fatal, fatals): Remove. All callers use complain.c::fatal.
9671 (warn, warni, warns, warnss, warnss): Remove. All callers use
9672 complain.c::complain.
9673 (toomany): Remove, use fatal instead.
9674 * src/files.c (done): No argument, use complain_message_count.
9675 * src/main.c (main): Register `done' to `atexit'.
9676
9677 * src/getargs.c (usage): More `fputs', less `fprintf'.
9678
9679 2000-03-28 Akim Demaille <akim@epita.fr>
9680
9681 * lib/: New directory.
9682 * Makefile.am (SUBDIRS): Adjust.
9683 * configure.in: Adjust.
9684 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9685 useless.
9686 * src/alloca.c: Moved to lib/.
9687 * src/getopt.c: Likewise.
9688 * src/getopt1.c: Likewise.
9689 * src/getopt.h: Likewise.
9690 * src/ansi2knr.c: Likewise.
9691 * src/ansi2knr.1: Likewise.
9692 * src/Makefile.am: Adjust.
9693 * lib/Makefile.am: New file.
9694
9695 2000-03-28 Akim Demaille <akim@epita.fr>
9696
9697 * src/getargs.c (usage): Refresh the help message.
9698
9699 2000-03-17 Akim Demaille <akim@epita.fr>
9700
9701 * src/getopt1.c: Updated from textutils 2.0e
9702 * src/getopt.c: Likewise.
9703 * src/getopt.h: Likewise.
9704
9705 2000-03-17 Akim Demaille <akim@epita.fr>
9706
9707 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9708 the file name, not the whole `#line LINE FILE'.
9709
9710 2000-03-17 Akim Demaille <akim@epita.fr>
9711
9712 On syntax errors, report the token on which we choked.
9713
9714 * src/bison.s1 (yyparse): In the label yyerrlab, when
9715 YYERROR_VERBOSE, add yychar in msg.
9716
9717 2000-03-17 Akim Demaille <akim@epita.fr>
9718
9719 * src/reader.c (copy_at): New function.
9720 (copy_guard): Use it.
9721 (copy_action): Use it.
9722
9723 2000-03-17 Akim Demaille <akim@epita.fr>
9724
9725 Be kind to translators, save some useless translations.
9726
9727 * src/main.c (banner): New function.
9728 (fatal_banner): Use it.
9729 (warn_banner): Use it.
9730
9731 2000-03-17 Akim Demaille <akim@epita.fr>
9732
9733 * src/reader.c (copy_definition): Use copy_string and
9734 copy_comment. Removed now unused `match', `ended',
9735 `cplus_comment'.
9736 (copy_comment, copy_string): Moved, to be visible from
9737 copy_definition.
9738
9739 2000-03-17 Akim Demaille <akim@epita.fr>
9740
9741 * src/reader.c (copy_string): Declare `static inline'. No
9742 problems with inline, since it is checked by configure.
9743 (copy_comment): Likewise.
9744
9745 2000-03-17 Akim Demaille <akim@epita.fr>
9746
9747 * src/reader.c (packsymbols): Formatting changes.
9748
9749 2000-03-17 Akim Demaille <akim@epita.fr>
9750
9751 * src/reader.c (copy_comment): New function, factored out from:
9752 (copy_action): Use it. Removed now unused `match', `ended',
9753 `cplus_comment'.
9754 (copy_guard): Likewise.
9755
9756 2000-03-17 Akim Demaille <akim@epita.fr>
9757
9758 * src/reader.c (copy_string): New function, factored out from:
9759 (copy_action): Use it.
9760 (copy_guard): Likewise.
9761
9762 2000-03-17 Akim Demaille <akim@epita.fr>
9763
9764 Change the handling of @s so that they behave exactly like $s.
9765 There is now a pseudo variable @$ (readble and writable), location
9766 of the lhs of the rule (by default ranging from the location of
9767 the first symbol of the rhs, to the location of the last symbol,
9768 or, if the rhs is empty, YYLLOC).
9769
9770 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9771 yyval.
9772 (yyparse): When providing a default semantic action, provide a
9773 default location action.
9774 (after the $): No longer change `*YYLSP', just stack YYLOC the
9775 same way you stack YYVAL.
9776 * src/reader.c (read_declarations): Use warns.
9777 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9778 (copy_action, case '@'): Likewise.
9779 Use a standard error message, to save useless work from
9780 translators.
9781
9782 2000-03-17 Akim Demaille <akim@epita.fr>
9783
9784 * src/bison.s1: Formatting and cosmetics changes.
9785 * src/reader.c: Likewise.
9786 Update the Copyright notice.
9787
9788 2000-03-17 Akim Demaille <akim@epita.fr>
9789
9790 * src/bison.s1 (#line): All set to `#line' only, since the
9791 Makefile now handles them.
9792
9793 2000-03-16 Akim Demaille <akim@epita.fr>
9794
9795 * src/output.c (output_rule_data): Output the documentation of
9796 some of the tables.
9797 (Copyright notice): Update.
9798 Formatting changes.
9799
9800 2000-03-16 Akim Demaille <akim@epita.fr>
9801
9802 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9803 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9804 One `#if YYDEBUG' remains, since it uses variables which are
9805 defined only if `YYDEBUG != 0'.
9806
9807 2000-03-16 Akim Demaille <akim@epita.fr>
9808
9809 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9810 and related variables so that the similarities are highlighted.
9811
9812 2000-03-16 Akim Demaille <akim@epita.fr>
9813
9814 * src/bison.s1: Properly indent CPP directives.
9815
9816 2000-03-16 Akim Demaille <akim@epita.fr>
9817
9818 * src/bison.s1: Properly indent the `alloca' CPP section.
9819
9820 2000-03-16 Akim Demaille <akim@epita.fr>
9821
9822 Do not hard code values of directories in `configure.in'.
9823 Update the `configure' tool chain.
9824
9825 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9826 src/makefile.am.
9827 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9828 (AC_OUTPUT): Add m4/Makefile.
9829 Bump to bison 1.28a, 1.29 has never been released.
9830 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9831 handled via src/Makefile.am.
9832 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9833 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9834 autoheader.
9835 * Makefile.am (SUBDIRS): Add m4.
9836 (ACLOCAL_AM_FLAGS): New variable.
9837 (AUTOMAKE_OPTIONS): Add check-news.
9838 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9839 the proper line number and file name.
9840 (DEFS): Propagate the location of bison library files and of the
9841 locale files.
9842 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9843 builddir.
9844 * acinclude.m4: Remove, replaced by the directory m4.
9845 * m4/Makefile.am (EXTRA_DIST): New variable.
9846 * m4/gettext.m4: New file, from the fileutils.
9847 * m4/lcmessage.m4: Likewise
9848 * m4/progtest.m4: Likewise.
9849 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9850
9851 2000-03-10 Akim Demaille <akim@epita.fr>
9852
9853 * src/closure.c:
9854 Formatting changes of various comments.
9855 Respect the GNU coding standards at various places.
9856 Don't use `_()' when no translation is needed.
9857
9858 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9859
9860 * src/files.c:
9861 OS/2 honors TMPDIR environment variable.
9862
9863 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9864
9865 * doc/bison.texinfo: Tweaked spelling and grammar.
9866 Updated ISBN.
9867 Removed reference to price of printed copy.
9868 Mention BISON_SIMPLE and BISON_HAIRY.
9869
9870 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9871
9872 * configure.in, NEWS:
9873 Bison 1.29 released.
9874
9875 1999-10-27 Jesse Thilo <jthilo@gnu.org>
9876
9877 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
9878 Added reference card.
9879
9880 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9881
9882 * po/ru.po: Added Russian translation.
9883
9884 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9885
9886 * configure.in: Added Russian translation.
9887
9888 1999-07-06 Jesse Thilo <jthilo@gnu.org>
9889
9890 * configure.in, NEWS, README:
9891 Released version 1.28.
9892
9893 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9894
9895 * src/system.h:
9896 Squashed redefinition warning on some systems.
9897
9898 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
9899 Have configure build version string instead of relying on ANSI string
9900 concatentation.
9901
9902 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9903
9904 * po/POTFILES.in: Got rid of version.c.
9905
9906 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9907
9908 * acconfig.h, configure.in:
9909 Have configure build version string instead of relying on ANSI string
9910 concatentation.
9911
9912 1999-06-08 Jesse Thilo <jthilo@gnu.org>
9913
9914 * doc/bison.1:
9915 Dropped mention of `+' for long-named options.
9916
9917 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9918
9919 * src/files.c: Added <unistd.h> for unlink().
9920
9921 * src/Makefile.am, src/system.h:
9922 I18n fixes.
9923
9924 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9925
9926 * README: Added a FAQ list.
9927
9928 * configure.in, acconfig.h:
9929 I18n fixes.
9930
9931 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9932
9933 * doc/FAQ, doc/Makefile.am:
9934 Added a FAQ list.
9935
9936 1999-05-19 Jesse Thilo <jthilo@gnu.org>
9937
9938 * src/alloc.h, src/symtab.h, src/version.c:
9939 Protected inclusion of "config.h" with HAVE_CONFIG_H.
9940
9941 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9942
9943 * src/.cvsignore, src/Makefile.am:
9944 Reorganized: sources in `src', documentation in `doc'.
9945
9946 * src/lex.c (literalchar):
9947 fixed the code for escaping double quotes (thanks
9948 Jonathan Czisny.)
9949
9950 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9951
9952 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
9953 Adjusted paths to reflect directory reorganization.
9954
9955 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9956
9957 * doc/.cvsignore, doc/Makefile.am:
9958 Reorganized: sources in `src', documentation in `doc'.
9959
9960 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9961
9962 * configure.in:
9963 Updated AC_INIT file to reflect directory reorganization.
9964
9965 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
9966 Reorganized: sources in `src', documentation in `doc'.
9967
9968 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9969
9970 * src/allocate.c:
9971 Don't declare calloc() and realloc() if not necessary.
9972
9973 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9974
9975 * configure.in, acconfig.h, acinclude.m4:
9976 Don't declare calloc() and realloc() if not necessary.
9977
9978 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9979
9980 * po/.cvsignore: Added i18n support.
9981
9982 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9983
9984 * acconfig.h, configure.in, Makefile.am:
9985 Added i18n support.
9986
9987 1999-03-22 Jesse Thilo <jthilo@gnu.org>
9988
9989 * src/bison.s1: Fixed #line numbers.
9990
9991 1999-03-15 Jesse Thilo <jthilo@gnu.org>
9992
9993 * po/es.po, po/fr.po, po/nl.po, po/de.po:
9994 Added PO files from Translation Project.
9995
9996 1999-03-03 Jesse Thilo <jthilo@gnu.org>
9997
9998 * Makefile.am:
9999 Added support for non-ANSI compilers (ansi2knr).
10000
10001 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10002
10003 * configure.in: Bumped version number to 1.27.
10004
10005 * Makefile.am:
10006 Added `bison.simple' to list of files removed by `make distclean'.
10007
10008 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10009
10010 * src/files.c, src/files.h:
10011 Defined locations of parser files in config.h instead of Makefile.
10012
10013 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10014
10015 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10016 Defined locations of parser files in config.h instead of Makefile.
10017
10018 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10019
10020 * Makefile.am:
10021 Removed inappropriate use of $< macro.
10022
10023 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10024
10025 * po/Makefile.in.in, po/POTFILES.in:
10026 Add `po' directory skeleton.
10027
10028 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10029
10030 * README: Document help-bison list.
10031
10032 * configure.in: Add check for mkstemp().
10033
10034 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10035
10036 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10037 Hush a few compiler warnings.
10038
10039 * src/files.c:
10040 Add tryclose(), which verifies that fclose was successful.
10041 Hush a couple of compiler warnings.
10042
10043 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10044
10045 * Makefile.am, OChangeLog:
10046 ChangeLog is now automatically generated. Include the old version as
10047 OChangeLog.
10048
10049 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10050
10051 * 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:
10052 Update FSF address.
10053
10054 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10055
10056 * doc/bison.texinfo: Fix formatting glitch.
10057
10058 * doc/bison.texinfo: Update FSF address.
10059
10060 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10061
10062 * acconfig.h: Update FSF address.
10063
10064 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10065
10066 * src/system.h:
10067 Don't define PACKAGE here, since config.h defines it.
10068
10069 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10070
10071 * src/reader.c: Update copyright date.
10072
10073 * src/main.c:
10074 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10075 favor of output directly to stderr (avoids buffer overruns).
10076
10077 * src/reader.c: Some checks for premature EOF.
10078
10079 * 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:
10080 Use prototypes if the compiler understands them.
10081
10082 * src/files.c: Honor TMPDIR on Unix hosts.
10083 Use prototypes if the compiler understands them.
10084
10085 * src/reader.c:
10086 Fix a couple of buffer overrun bugs.
10087 Use prototypes if the compiler understands them.
10088
10089 * src/system.h: Include unistd.h and ctype.h.
10090 Use #ifdef instead of #if for NLS symbols.
10091
10092 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10093
10094 * doc/bison.texinfo:
10095 Delete comment "consider using @set for edition number, etc..." since
10096 we now are doing so.
10097
10098 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10099
10100 * configure.in:
10101 Use prototypes if the compiler understands them.
10102
10103 * NEWS: Document 1.26 highlights.
10104
10105 * Makefile.am: Require Automake 1.3 or later.
10106
10107 * acconfig.h:
10108 Use prototypes if the compiler understands them.
10109
10110 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10111
10112 * src/version.c:
10113 Use VERSION symbol from automake for version number.
10114
10115 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10116
10117 * acconfig.h, configure.in, version.cin:
10118 Use VERSION symbol from automake for version number.
10119
10120 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10121
10122 * Makefile.am:
10123 Distribute original version of simple parser (bison.s1), not built
10124 version (bison.simple).
10125
10126 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10127
10128 * doc/bison.texinfo: Add info dir entry.
10129
10130 * doc/bison.texinfo:
10131 Let automake put version number into documentation.
10132
10133 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10134
10135 * src/bison.cld, src/build.com, src/vmshlp.mar:
10136 Add non-RCS files from /gd/gnu/bison.
10137
10138 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10139
10140 * doc/bison.1:
10141 Document the BISON_HAIRY and BISON_SIMPLE variables.
10142
10143 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10144
10145 * src/version.c: Build version.c automatically.
10146
10147 * src/reader.c:
10148 Fix token numbering (used to start at 258, not 257).
10149
10150 * src/system.h: Include config.h.
10151
10152 * src/getargs.c: Update bug report address.
10153
10154 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10155 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10156
10157 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10158
10159 * Makefile.am:
10160 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10161
10162 * configure.in, version.cin:
10163 Build version.c automatically.
10164
10165 * AUTHORS: Add AUTHORS file.
10166
10167 * README: Update bug report address.
10168
10169 * bison.simple:
10170 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10171
10172 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10173 Add automake stuff.
10174
10175 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10176
10177 * doc/bison.texinfo: Clean up some formatting.
10178
10179 1998-05-05 Richard Stallman <rms@gnu.org>
10180
10181 * doc/bison.texinfo:
10182 Explain better why to make a pure parser.
10183
10184 1998-01-05 Richard Stallman <rms@gnu.org>
10185
10186 * src/files.c (openfiles):
10187 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10188 find a temporary directory, if possible. Do not unlink files while
10189 they are open.
10190
10191 1997-08-25 Richard Stallman <rms@gnu.org>
10192
10193 * src/reader.c (stack_offset;):
10194 Change some warni to warns.
10195
10196 * src/lex.c (literalchar): Use warns, not warni.
10197
10198 1997-06-28 Richard Stallman <rms@gnu.org>
10199
10200 * src/bison.s1: Add a Bison version comment.
10201
10202 * src/main.c (fatal, warn, berror):
10203 Use program_name.
10204
10205 1997-06-28 Richard Stallman <rms@gnu.org>
10206
10207 * Makefile.in (bison_version): New variable.
10208 (dist): Use that variable.
10209 (bison.s1): Substitute the Bison version into bison.simple.
10210
10211 * bison.simple: Add a Bison version comment.
10212
10213 1997-06-18 Richard Stallman <rms@gnu.org>
10214
10215 * src/main.c (fatal, warn, berror):
10216 Make error messages standard.
10217 (toomany): Improve error message text.
10218
10219 * 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:
10220 new.h renamed to alloc.h.
10221
10222 1997-06-18 Richard Stallman <rms@gnu.org>
10223
10224 * Makefile.in: new.h renamed to alloc.h.
10225
10226 1997-05-24 Richard Stallman <rms@gnu.org>
10227
10228 * src/lex.c (literalchar):
10229 Fix the code for escaping \, " and '.
10230
10231 (lex): Avoid trouble when there are many chars
10232 to discard in a char literal with just several chars in it.
10233
10234 1997-05-17 Richard Stallman <rms@gnu.org>
10235
10236 * src/bison.s1:
10237 Use malloc, if using alloca is troublesome.
10238 (YYSTACK_USE_ALLOCA): New flag macro.
10239 Define it for some systems and compilers.
10240 (YYSTACK_ALLOC): New macro.
10241 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10242 If it was malloc'd, free it.
10243
10244 1997-05-17 Richard Stallman <rms@gnu.org>
10245
10246 * bison.simple:
10247 Use malloc, if using alloca is troublesome.
10248 (YYSTACK_USE_ALLOCA): New flag macro.
10249 Define it for some systems and compilers.
10250 (YYSTACK_ALLOC): New macro.
10251 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10252 If it was malloc'd, free it.
10253
10254 1997-04-23 Richard Stallman <rms@gnu.org>
10255
10256 * src/bison.s1:
10257 (alloca) [__hpux]: Always define as __builtin_alloca.
10258
10259 1997-04-23 Richard Stallman <rms@gnu.org>
10260
10261 * bison.simple:
10262 (alloca) [__hpux]: Always define as __builtin_alloca.
10263
10264 1997-04-22 Richard Stallman <rms@gnu.org>
10265
10266 * src/bison.s1:
10267 [__hpux]: Include alloca.h (right for HPUX 10)
10268 instead of declaring alloca (right for HPUX 9).
10269
10270 * src/bison.s1 (__yy_memcpy):
10271 Declare arg `count' as unsigned int.
10272 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10273
10274 1997-04-22 Richard Stallman <rms@gnu.org>
10275
10276 * bison.simple:
10277 [__hpux]: Include alloca.h (right for HPUX 10)
10278 instead of declaring alloca (right for HPUX 9).
10279
10280 * bison.simple (__yy_memcpy):
10281 Declare arg `count' as unsigned int.
10282 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10283
10284 1997-01-03 Richard Stallman <rms@gnu.org>
10285
10286 * src/allocate.c: [__STDC__ or _MSC_VER]:
10287 Declare calloc and realloc to return void *.
10288
10289 1997-01-02 Richard Stallman <rms@gnu.org>
10290
10291 * src/system.h:
10292 [_MSC_VER]: Include stdlib.h and process.h.
10293 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10294
10295 * src/main.c (main): Return FAILURE as a value.
10296 (printable_version): Declare arg as int, not char.
10297
10298 1997-01-02 Richard Stallman <rms@gnu.org>
10299
10300 * Makefile.in (dist):
10301 Explicitly check for symlinks, and copy them.
10302
10303 1996-12-19 Richard Stallman <rms@gnu.org>
10304
10305 * src/files.c:
10306 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10307
10308 1996-12-18 Paul Eggert <eggert@gnu.org>
10309
10310 * src/bison.s1 (yyparse):
10311 If __GNUC__ and YYPARSE_PARAM are both defined,
10312 declare yyparse to have a void * argument.
10313
10314 1996-12-18 Paul Eggert <eggert@gnu.org>
10315
10316 * bison.simple (yyparse):
10317 If __GNUC__ and YYPARSE_PARAM are both defined,
10318 declare yyparse to have a void * argument.
10319
10320 1996-12-17 Richard Stallman <rms@gnu.org>
10321
10322 * src/reduce.c (nbits): Add some casts.
10323
10324 1996-08-12 Richard Stallman <rms@gnu.org>
10325
10326 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10327
10328 1996-08-12 Richard Stallman <rms@gnu.org>
10329
10330 * bison.simple: Test _MSDOS as well as _MSDOS_.
10331
10332 1996-07-31 Richard Stallman <rms@gnu.org>
10333
10334 * src/bison.s1:
10335 [__sun && __i386]: Include alloca.h.
10336
10337 1996-07-31 Richard Stallman <rms@gnu.org>
10338
10339 * bison.simple:
10340 [__sun && __i386]: Include alloca.h.
10341
10342 1996-07-30 Richard Stallman <rms@gnu.org>
10343
10344 * src/bison.s1: Comment change.
10345
10346 * src/bison.s1: Test _MSDOS_, not MSDOS.
10347
10348 1996-07-30 Richard Stallman <rms@gnu.org>
10349
10350 * bison.simple: Comment change.
10351
10352 * bison.simple: Test _MSDOS_, not MSDOS.
10353
10354 1996-06-01 Richard Stallman <rms@gnu.org>
10355
10356 * 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:
10357 Insert `_' macro around many string constants.
10358
10359 * src/main.c:
10360 Insert `_' macro around many string constants.
10361
10362 (main): Call setlocale, bindtextdomain and textdomain.
10363
10364 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10365 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10366 [ENABLE_NLS]: Include libintl.h.
10367 [ENABLE_NLS] (gettext): Define.
10368 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10369 (N_, PACKAGE, LOCALEDIR): New macros.
10370
10371 1996-06-01 Richard Stallman <rms@gnu.org>
10372
10373 * POTFILES.in: New file.
10374
10375 * Makefile.in (allocate.o):
10376 Define target explicitly.
10377
10378 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10379 (LDFLAGS): Set to @LDFLAGS@.
10380 (configure): Run autoconf only if preceding `cd' succeeds.
10381 (bison.s1): Redirect output to temporary file then move the
10382 temporary to the target, rather than redirecting directly to bison.s1.
10383 (clean): Remove config.status and config.log.
10384 (distclean): Don't remove config.status here.
10385
10386 1996-05-12 Richard Stallman <rms@gnu.org>
10387
10388 * src/bison.s1:
10389 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10390
10391 1996-05-12 Richard Stallman <rms@gnu.org>
10392
10393 * bison.simple:
10394 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10395
10396 1996-05-11 Richard Stallman <rms@gnu.org>
10397
10398 * src/bison.s1 (__yy_memcpy):
10399 Really reorder the args, as was supposedly done on Feb 14 1995.
10400 (yyparse): Calls changed accordingly.
10401
10402 1996-05-11 Richard Stallman <rms@gnu.org>
10403
10404 * Makefile.in (dist): Don't use $(srcdir).
10405
10406 * bison.simple (__yy_memcpy):
10407 Really reorder the args, as was supposedly done on Feb 14 1995.
10408 (yyparse): Calls changed accordingly.
10409
10410 1996-01-27 Richard Stallman <rms@gnu.org>
10411
10412 * src/output.c (output_rule_data):
10413 Test YYERROR_VERBOSE in the conditional
10414 around the definition of ttyname.
10415
10416 1995-12-29 Richard Stallman <rms@gnu.org>
10417
10418 * src/bison.s1:
10419 Fix line numbers in #line commands.
10420
10421 1995-12-29 Richard Stallman <rms@gnu.org>
10422
10423 * bison.simple:
10424 Fix line numbers in #line commands.
10425
10426 1995-12-27 Richard Stallman <rms@gnu.org>
10427
10428 * src/bison.s1 (YYPARSE_PARAM_DECL):
10429 In C++, make it always null.
10430 (YYPARSE_PARAM_ARG): New macro.
10431 (yyparse): Use YYPARSE_PARAM_ARG.
10432
10433 1995-12-27 Richard Stallman <rms@gnu.org>
10434
10435 * bison.simple (YYPARSE_PARAM_DECL):
10436 In C++, make it always null.
10437 (YYPARSE_PARAM_ARG): New macro.
10438 (yyparse): Use YYPARSE_PARAM_ARG.
10439
10440 1995-11-29 Richard Stallman <rms@gnu.org>
10441
10442 * doc/bison.texinfo:
10443 Describe literal string tokens, %raw, %no_lines, %token_table.
10444
10445 1995-11-29 Daniel Hagerty <hag@gnu.org>
10446
10447 * doc/bison.texinfo: Fixed update date
10448
10449 1995-10-16 Richard Stallman <rms@gnu.org>
10450
10451 * src/version.c: Version 1.25.
10452
10453 1995-10-16 Richard Stallman <rms@gnu.org>
10454
10455 * NEWS: *** empty log message ***
10456
10457 1995-10-16 Richard Stallman <rms@gnu.org>
10458
10459 * doc/bison.1, doc/bison.rnh:
10460 Add new options.
10461
10462 1995-10-15 Richard Stallman <rms@gnu.org>
10463
10464 * src/vmsgetargs.c, src/getargs.c:
10465 Added -n, -k, and -raw switches.
10466 (noparserflag, toknumflag, rawtoknumflag): New variables.
10467
10468 * src/symtab.h (SALIAS):
10469 New #define for adding aliases to %token.
10470 (struct bucket): Added `alias' field.
10471
10472 * src/reduce.c (reduce_grammar):
10473 Revise error message.
10474 (print_notices): Remove final `.' from error message.
10475
10476 * src/reader.c (reader_output_yylsp):
10477 New function.
10478 (readgram): Use `#if 0' around code that accepted %command
10479 inside grammar rules: The documentation doesn't allow it,
10480 and it will fail since the %command processors scan for the next %.
10481 (parse_token_decl): Extended the %token
10482 declaration to allow a multi-character symbol as an alias.
10483 (parse_thong_decl): New function.
10484 (read_declarations): Added %thong declarations.
10485 (read_declarations): Handle NOOP to deal with allowing
10486 % declarations as another means to specify the flags.
10487 (readgram): Allow %prec prior to semantics embedded in a rule.
10488 (skip_to_char, read_declarations, copy_definition)
10489 (parse_token_decl, parse_start_decl, parse_type_decl)
10490 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10491 (get_type_name, copy_guard, copy_action, readgram)
10492 (get_type, packsymbols): Revised most error messages.
10493 Changed `fatal' to `warnxxx' to avoid aborting for error.
10494 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10495 (read_declarations): Improve the error message for
10496 an invalid character. Do not abort.
10497 (read_declarations, copy_guard, copy_action): Use
10498 printable_version to avoid unprintable characters in printed output.
10499 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10500 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10501 Allow the type of a non-terminal can be given
10502 more than once, as long as all specifications give the same type.
10503
10504 * src/output.c:
10505 (output_headers, output_trailers, output, output_gram)
10506 (output_rule_data): Implement noparserflag variable.
10507 Implement toknumflag variable.
10508 (output): Call reader_output_yylsp to output LTYPESTR.
10509
10510 * src/main.c (main):
10511 If reader sees an error, don't process the grammar.
10512 (fatals): Updated to not use VARARGS1.
10513 (printable_version, int_to_string, warn, warni, warns, warnss)
10514 (warnsss): New error reporting functions. Avoid abort for error.
10515
10516 * src/lex.h:
10517 Added THONG and NOOP for alias processing.
10518 Added SETOPT for the new code that allows setting options with %flags.
10519
10520 * src/lex.c:
10521 Include getopt.h. Add some extern decls.
10522 (safegetc): New function to deal with EOF gracefully.
10523 (literalchar); new function to deal with reading \ escapes.
10524 (lex): Use literalchar.
10525 (lex): Implemented "..." tokens.
10526 (literalchar, lex, parse_percent_token): Made tokenbuffer
10527 always contain the token. This includes growing the token
10528 buffer while reading an integer.
10529 (parse_percent_token): Replaced if-else statement with percent_table.
10530 (parse_percent_token): Added % declarations as another
10531 way to specify the flags -n, -l, and -r. Also added hooks for
10532 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10533 major changes to files.c.
10534 (lex) Retain in the incoming stream a character following
10535 an incorrect '/'.
10536 (skip_white_space, lex): Revised most error messages
10537 and changed fatal to warn to avoid aborting.
10538 (percent_table): Added %thong declarations.
10539
10540 * src/gram.h: Comment changes.
10541
10542 * src/files.c (openfiles, open_extra_files, done):
10543 Add faction flag
10544 and actfile file. Handle noparserflag. Both for -n switch.
10545
10546 * src/conflicts.c (resolve_sr_conflict):
10547 Remove use of alloca.
10548
10549 1995-06-01 Jim Meyering <meyering@gnu.org>
10550
10551 * doc/bison.texinfo: *** empty log message ***
10552
10553 1995-05-06 Richard Stallman <rms@gnu.org>
10554
10555 * src/bison.s1: Comment change.
10556
10557 1995-05-06 Richard Stallman <rms@gnu.org>
10558
10559 * bison.simple: Comment change.
10560
10561 1995-05-03 Richard Stallman <rms@gnu.org>
10562
10563 * src/version.c: Version now 1.24.
10564
10565 * src/bison.s1: Change distribution terms.
10566
10567 * src/version.c: Version now 1.23.
10568
10569 1995-05-03 Richard Stallman <rms@gnu.org>
10570
10571 * doc/bison.texinfo:
10572 Rewrite "Conditions for Using Bison".
10573 Update version to 1.24.
10574
10575 1995-05-03 Richard Stallman <rms@gnu.org>
10576
10577 * bison.simple: Change distribution terms.
10578
10579 1995-02-23 Richard Stallman <rms@gnu.org>
10580
10581 * src/files.c: Test __VMS_POSIX as well as VMS.
10582
10583 1995-02-14 Jim Meyering <meyering@gnu.org>
10584
10585 * src/bison.s1 (__yy_memcpy):
10586 Renamed from __yy_bcopy to avoid
10587 confusion. Reverse FROM and TO arguments to be consistent with
10588 those of memcpy.
10589
10590 1995-02-14 Jim Meyering <meyering@gnu.org>
10591
10592 * bison.simple (__yy_memcpy):
10593 Renamed from __yy_bcopy to avoid
10594 confusion. Reverse FROM and TO arguments to be consistent with
10595 those of memcpy.
10596
10597 1994-11-10 David J. MacKenzie <djm@gnu.org>
10598
10599 * NEWS: reformat
10600
10601 * NEWS: New file.
10602
10603 * Makefile.in (DISTFILES): Include NEWS.
10604
10605 * Makefile.in (DISTFILES):
10606 Include install-sh, not install.sh.
10607
10608 * configure.in: Update to Autoconf v2 macro names.
10609
10610 1994-10-05 David J. MacKenzie <djm@gnu.org>
10611
10612 * Makefile.in: fix typo
10613
10614 * Makefile.in (prefix, exec_prefix):
10615 Let configure set them.
10616
10617 1994-09-28 David J. MacKenzie <djm@gnu.org>
10618
10619 * Makefile.in: Set datadir to $(prefix)/share.
10620
10621 1994-09-15 Richard Stallman <rms@gnu.org>
10622
10623 * src/bison.s1:
10624 Update copyright notice and GPL version.
10625
10626 1994-09-15 Richard Stallman <rms@gnu.org>
10627
10628 * bison.simple:
10629 Update copyright notice and GPL version.
10630
10631 1994-07-12 Richard Stallman <rms@gnu.org>
10632
10633 * src/reduce.c, src/reader.c:
10634 entered into RCS
10635
10636 1994-05-05 David J. MacKenzie <djm@gnu.org>
10637
10638 * Makefile.in: entered into RCS
10639
10640 1994-03-26 Richard Stallman <rms@gnu.org>
10641
10642 * src/bison.s1: entered into RCS
10643
10644 1994-03-26 Richard Stallman <rms@gnu.org>
10645
10646 * bison.simple: entered into RCS
10647
10648 1994-03-25 Richard Stallman <rms@gnu.org>
10649
10650 * src/main.c: entered into RCS
10651
10652 1994-03-24 Richard Stallman <rms@gnu.org>
10653
10654 * src/conflicts.c: entered into RCS
10655
10656 1994-01-02 Richard Stallman <rms@gnu.org>
10657
10658 * Makefile.in: *** empty log message ***
10659
10660 1993-11-21 Richard Stallman <rms@gnu.org>
10661
10662 * src/bison.s1: *** empty log message ***
10663
10664 1993-11-21 Richard Stallman <rms@gnu.org>
10665
10666 * doc/bison.texinfo: entered into RCS
10667
10668 * doc/bison.texinfo: *** empty log message ***
10669
10670 1993-11-21 Richard Stallman <rms@gnu.org>
10671
10672 * bison.simple: *** empty log message ***
10673
10674 1993-10-25 David J. MacKenzie <djm@gnu.org>
10675
10676 * doc/bison.texinfo: *** empty log message ***
10677
10678 1993-10-19 Richard Stallman <rms@gnu.org>
10679
10680 * src/bison.s1: *** empty log message ***
10681
10682 1993-10-19 Richard Stallman <rms@gnu.org>
10683
10684 * bison.simple: *** empty log message ***
10685
10686 1993-10-14 Richard Stallman <rms@gnu.org>
10687
10688 * src/bison.s1: *** empty log message ***
10689
10690 1993-10-14 Richard Stallman <rms@gnu.org>
10691
10692 * bison.simple: *** empty log message ***
10693
10694 1993-09-14 David J. MacKenzie <djm@gnu.org>
10695
10696 * doc/bison.texinfo: *** empty log message ***
10697
10698 1993-09-13 Noah Friedman <friedman@gnu.org>
10699
10700 * Makefile.in: *** empty log message ***
10701
10702 1993-09-10 Richard Stallman <rms@gnu.org>
10703
10704 * src/conflicts.c: *** empty log message ***
10705
10706 * src/system.h: entered into RCS
10707
10708 1993-09-10 Richard Stallman <rms@gnu.org>
10709
10710 * doc/bison.1: entered into RCS
10711
10712 1993-09-06 Noah Friedman <friedman@gnu.org>
10713
10714 * src/version.c: entered into RCS
10715
10716 1993-09-06 Noah Friedman <friedman@gnu.org>
10717
10718 * Makefile.in: *** empty log message ***
10719
10720 1993-07-30 David J. MacKenzie <djm@gnu.org>
10721
10722 * Makefile.in: *** empty log message ***
10723
10724 1993-07-24 Richard Stallman <rms@gnu.org>
10725
10726 * src/bison.s1: *** empty log message ***
10727
10728 1993-07-24 Richard Stallman <rms@gnu.org>
10729
10730 * bison.simple: *** empty log message ***
10731
10732 1993-07-08 David J. MacKenzie <djm@gnu.org>
10733
10734 * Makefile.in: *** empty log message ***
10735
10736 1993-07-04 Richard Stallman <rms@gnu.org>
10737
10738 * src/bison.s1: *** empty log message ***
10739
10740 1993-07-04 Richard Stallman <rms@gnu.org>
10741
10742 * bison.simple: *** empty log message ***
10743
10744 1993-06-26 David J. MacKenzie <djm@gnu.org>
10745
10746 * src/getargs.c: entered into RCS
10747
10748 1993-06-26 David J. MacKenzie <djm@gnu.org>
10749
10750 * doc/bison.texinfo: *** empty log message ***
10751
10752 * doc/bison.1: New file.
10753
10754 1993-06-25 Richard Stallman <rms@gnu.org>
10755
10756 * src/getargs.c: New file.
10757
10758 1993-06-16 Richard Stallman <rms@gnu.org>
10759
10760 * src/bison.s1: *** empty log message ***
10761
10762 1993-06-16 Richard Stallman <rms@gnu.org>
10763
10764 * bison.simple: *** empty log message ***
10765
10766 1993-06-03 Richard Stallman <rms@gnu.org>
10767
10768 * src/bison.s1: New file.
10769
10770 1993-06-03 Richard Stallman <rms@gnu.org>
10771
10772 * doc/bison.texinfo: *** empty log message ***
10773
10774 1993-06-03 Richard Stallman <rms@gnu.org>
10775
10776 * bison.simple: New file.
10777
10778 1993-05-19 Richard Stallman <rms@gnu.org>
10779
10780 * doc/bison.texinfo: New file.
10781
10782 1993-05-07 Noah Friedman <friedman@gnu.org>
10783
10784 * Makefile.in: *** empty log message ***
10785
10786 1993-04-28 Noah Friedman <friedman@gnu.org>
10787
10788 * src/reader.c: *** empty log message ***
10789
10790 1993-04-23 Noah Friedman <friedman@gnu.org>
10791
10792 * src/alloc.h: entered into RCS
10793
10794 1993-04-20 David J. MacKenzie <djm@gnu.org>
10795
10796 * src/version.c: *** empty log message ***
10797
10798 * src/files.c, src/allocate.c:
10799 entered into RCS
10800
10801 * src/reader.c: *** empty log message ***
10802
10803 * src/lex.c: entered into RCS
10804
10805 * src/conflicts.c: New file.
10806
10807 * src/symtab.c: entered into RCS
10808
10809 * src/alloc.h: New file.
10810
10811 * src/LR0.c: entered into RCS
10812
10813 1993-04-18 Noah Friedman <friedman@gnu.org>
10814
10815 * src/reader.c: New file.
10816
10817 * src/version.c: *** empty log message ***
10818
10819 1993-04-18 Noah Friedman <friedman@gnu.org>
10820
10821 * Makefile.in: *** empty log message ***
10822
10823 1993-04-17 Noah Friedman <friedman@gnu.org>
10824
10825 * Makefile.in: *** empty log message ***
10826
10827 1993-04-15 Richard Stallman <rms@gnu.org>
10828
10829 * src/main.c, src/files.c:
10830 New file.
10831
10832 1993-04-15 Noah Friedman <friedman@gnu.org>
10833
10834 * configure.in: entered into RCS
10835
10836 * configure.in: *** empty log message ***
10837
10838 * configure.in: New file.
10839
10840 1993-04-14 Richard Stallman <rms@gnu.org>
10841
10842 * Makefile.in: New file.
10843
10844 1993-04-13 Richard Stallman <rms@gnu.org>
10845
10846 * src/version.c: New file.
10847
10848 1993-03-25 Richard Stallman <rms@gnu.org>
10849
10850 * src/output.c: entered into RCS
10851
10852 1992-09-25 Richard Stallman <rms@gnu.org>
10853
10854 * configure.bat: entered into RCS
10855
10856 1992-06-22 Richard Stallman <rms@gnu.org>
10857
10858 * src/vmsgetargs.c: entered into RCS
10859
10860 1992-06-22 Richard Stallman <rms@gnu.org>
10861
10862 * doc/bison.rnh: entered into RCS
10863
10864 1992-04-20 David J. MacKenzie <djm@gnu.org>
10865
10866 * README: entered into RCS
10867
10868 1992-01-22 Richard Stallman <rms@gnu.org>
10869
10870 * src/machine.h: entered into RCS
10871
10872 1991-12-21 Richard Stallman <rms@gnu.org>
10873
10874 * src/lalr.c, src/closure.c:
10875 entered into RCS
10876
10877 1991-12-20 Richard Stallman <rms@gnu.org>
10878
10879 * src/state.h: entered into RCS
10880
10881 1991-12-18 Richard Stallman <rms@gnu.org>
10882
10883 * src/print.c, src/nullable.c, src/derives.c:
10884 entered into RCS
10885
10886 1991-11-03 David J. MacKenzie <djm@gnu.org>
10887
10888 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
10889 entered into RCS
10890
10891 1988-09-09 Richard Stallman <rms@gnu.org>
10892
10893 * src/bison.hairy: entered into RCS
10894
10895 1987-12-16 Richard Stallman <rms@gnu.org>
10896
10897 * REFERENCES: entered into RCS
10898
10899 -----
10900
10901 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
10902 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10903
10904 This file is part of Bison, the GNU Compiler Compiler.
10905
10906 Bison is free software; you can redistribute it and/or modify
10907 it under the terms of the GNU General Public License as published by
10908 the Free Software Foundation; either version 2, or (at your option)
10909 any later version.
10910
10911 Bison is distributed in the hope that it will be useful,
10912 but WITHOUT ANY WARRANTY; without even the implied warranty of
10913 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10914 GNU General Public License for more details.
10915
10916 You should have received a copy of the GNU General Public License
10917 along with Bison; see the file COPYING. If not, write to
10918 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
10919 Boston, MA 02111-1307, USA.