]> git.saurik.com Git - bison.git/blame - ChangeLog
Typo.
[bison.git] / ChangeLog
CommitLineData
22e304a6
AD
12003-03-02 Akim Demaille <akim@epita.fr>
2
22e304a6
AD
3 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
4 Use them to exercise yycheck overrun.
5 Based on Andrew Suffield's grammar.
6
67a25fed
AD
72003-03-02 Akim Demaille <akim@epita.fr>
8
9 Create tests/local.at for Bison generic testing macros.
10
11 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13 This new file.
14 * tests/calc.at (AT_CHECK_CALC): Adjust.
15 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
16 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
17 * tests/local.at: here.
18 (AT_COMPILE_CXX): Tags the tests using it as c++.
19 Ignore the test if CXX is not functional.
20
9c2b381f
PE
212003-03-01 Paul Eggert <eggert@twinsun.com>
22
23 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
24 not loc->end, since loc->end might contain garbage and this leads
25 to undefined behavior on some platforms.
26 (id_loc, token_start): Use (IF_LINTed) initial values that do not
27 depend on *loc, so that the reader doesn't give the the false
28 impression that *loc is initialized.
29 (<INITIAL>"%%"): Do not bother setting code_start, since its value
30 does not survive the return.
31
0433ba88
AD
322003-03-01 Akim Demaille <akim@epita.fr>
33
34 * src/scan-gram.l (code_start): Always initialize it when entering
35 into yylex, as SC_EPILOGUE is activated *before* the corresponding
36 yylex invocation. An alternative would be making it static, but
37 then it starts with the second %%'s beginning, instead of its end.
38
b305ea69
PE
392003-02-28 Paul Eggert <eggert@twinsun.com>
40
41 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
42 around a UnixWare 7.1.1 porting bug reported by John Hughes in
43 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
44
c3d25e01
PE
452003-02-26 Paul Eggert <eggert@twinsun.com>
46
47 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
48 Remove Sequent/Pyramid discussion (nobody uses them any more).
49 Merge VMS and MS-DOS discussion; these ports may well be dead
50 but let's keep mentioning them for now. Put <> around email
51 addresses. Add copyright notice.
52
c267ffbc
PE
532003-02-24 Paul Eggert <eggert@twinsun.com>
54
55 * data/glr.c (yy_reduce_print): yylineno -> yylno,
56 to avoid collision with flex use of yylineno.
57 Problem reported by Bruce Lilly in
58 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
59 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
60 * data/yacc.c (yy_reduce_print): Likewise.
61
62 * config/depcomp: Sync with Automake 1.7.3.
63
f939fc12
AD
642003-02-21 Akim Demaille <akim@epita.fr>
65
66 * data/lalr1.cc: Use temporary variables instead of casts to
67 change integer types.
68 Suggested by Paul Eggert.
69
95923bd6
AD
702003-02-21 Akim Demaille <akim@epita.fr>
71
72 * doc/bison.texinfo: Use "location" consistently to refer to @n,
73 to avoid confusions with lalr1.cc's notion of Position.
74 Suggested by Paul Eggert.
75
2cdc240e
AD
762003-02-20 Akim Demaille <akim@epita.fr>
77
78 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
79 before initial_columns.
80 (location.hh): Use consistent variable names when defining the
81 operator<<.
82 Use "last" so that we subtract from Positions, not from unsigned.
83
5d003116
AD
842003-02-20 Akim Demaille <akim@epita.fr>
85
86 * data/lalr1.cc (position.hh): New subfile, including the extended
87 and Doxygen'ed documentation of class Position.
88 (location.hh): Use it.
89 Document a` la Doxygen.
ba1ecc07 90 With the help of Benoit Perrot.
5d003116 91
d02b25f9
AD
922003-02-20 Akim Demaille <akim@epita.fr>
93
94 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
95 AT_YACC_IF.
96 Redefine AT_YYERROR_SEES_LOC_IF using it.
97 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
98 not defined.
99 Don't use the location in yy::Parser::error_ and
100 yy::Parser::print_ when not %locations.
101 Activate more lalr1.cc tests.
102
0d1c3a04
AD
1032003-02-19 Akim Demaille <akim@epita.fr>
104
105 * data/lalr1.cc: When displaying a line number, be sure to make it
106 an int.
107
60a777aa
AD
1082003-02-19 Akim Demaille <akim@epita.fr>
109
110 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
111 Remove, useless.
112 (YYABORT, YYACCEPT, YYERROR): New.
113 * tests/calc.at: Renable the lalr1.cc test.
114
0b86fc41
AD
1152003-02-19 Akim Demaille <akim@epita.fr>
116
117 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
118 error recovery, mixing with/without pops and discarding of the
119 lookahead.
120 Exercise YYERROR.
121 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
122
da99a5dc
PE
1232003-02-17 Paul Eggert <eggert@twinsun.com>
124
125 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
126 * tests/testsuite.at (AT_COMPILE): Use them.
127 This fixes the testsuite problem reported by Robert Lentz in
128 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
129
93b8c255
PE
1302003-02-12 Paul Eggert <eggert@twinsun.com>
131
132 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
133 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
134 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
135 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
136 Check for malloc failure, for consistency with yacc.c.
137 (yytname_size): Remove, for consistency with yacc.c.
138
139 The bug still remains in data/lalr1.cc, as I didn't have time
140 to fix it there.
141
7548fed2
AD
1422003-02-06 Akim Demaille <akim@epita.fr>
143
144 * configure.ac (GXX): Rename as...
145 (CXX): this, to keep the original Autoconf semantics.
146 Require 2.57.
147 * data/lalr1.cc: Fix b4_copyright invocations.
148 If YYDEBUG is not defined, don't depend upon name_ being defined.
149 (location.hh): Include string and iostream.
150 (Position::filename): New member.
151 (Position::Position ()): New.
152 (operator<< (Position)): New.
153 (operator- (Position, int)): New.
154 (Location::first, Location::last): Rename as...
155 (Location::begin, Location::end): these, to mock the conventional
156 iterator names.
157 (operator<< (Location)): New.
158 * tests/atlocal.in (CXX): New.
159 * tests/testsuite.at (AT_COMPILE_CXX): New.
160 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
161 locations in a more synthetic way.
162 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
163 lalr1.cc is used.
164 Adjust the C locations to match those from Emacs: first column is
165 column 0.
166 Change all the expected results.
167 Conform to the GCS: simplify the locations when applicable.
168 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
169 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
170 these CPP macros with the m4 macros new defined by...
171 (AT_CHECK_PUSHDEFS): this, i.e.:
172 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 173 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
174 New macros.
175 (AT_CHECK_POPDEFS): Undefine them.
176 (AT_CHECK_CALC_LALR1_CC): New.
177 Use it for the first lalr1.cc test.
178
43a176ef
AD
1792003-02-04 Akim Demaille <akim@epita.fr>
180
181 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
182 Location as is defined.
183
fc049e9c
AD
1842003-02-04 Akim Demaille <akim@epita.fr>
185
186 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
187 name_ being defined.
188
a737b216
PE
1892003-02-03 Paul Eggert <eggert@twinsun.com>
190
191 * src/gram.h (start_symbol): Remove unused decl.
192
193 Use more-consistent naming conventions for local vars.
194
195 * src/derives.c (derives_compute): Change type of local var from
196 int to rule_number.
197 * src/gram.c (grammar_rules_partial_print): Likewise.
198 * src/print.c (print_core): Likewise.
199 * src/reduce.c (reduce_grammar_tables): Likewise.
200
201 * src/gram.c (grammar_dump): Change name of item_number *
202 local var from r to rp.
203 * src/nullable.c (nullable_compute): Likewise.
204
205 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
206
207 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
208 for symbol or symbol_number var.
209 * src/reader.c (grammar_start_symbol_set): Likewise.
210 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
211 Likewise.
212 * src/state.c (transitions_to): Likewise.
213 * src/state.h: Likewise.
214 * src/tables.c (symbol_number_to_vector_number): Likewise.
215
216 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
217 char * var.
218
219 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
220 var.
221
222 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
223 var.
224
225 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
226 Use str, not s, for char * var. Use ch, not c, for character var.
227 Use size for size var.
228
229 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
230 char * var.
231 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
232 uniqstr var.
233 * src/uniqstr.h: Likewise.
234
235 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
236 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
237 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
238 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
239 param to have same name as that of enum, so that we don't use
240 "s" to stand for a non-state.
241
68e93ad5
AD
2422003-02-02 Akim Demaille <akim@epita.fr>
243
244 * src/scan-skel.l: Scan more than one inert character per yylex
245 invocation.
246
92898986
PE
2472003-02-01 Paul Eggert <eggert@twinsun.com>
248
249 Version 1.875a.
250
1d9d5d71
PE
251 * po/LINGUAS: Add ms.
252
0435d061
AD
2532003-01-30 Akim Demaille <akim@epita.fr>
254
255 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
256
6029a57f
PH
2572003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
258
259 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
260 of $1.
0435d061
AD
261
262 Changes in response to error report by S. Eken: GLR mode does not
6029a57f
PH
263 handle negative $ indices or $ indices in embedded rules correctly.
264 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 265
6029a57f
PH
266 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
267 (b4_rhs_location): Ditto.
0435d061 268 (yyfill): New function to copy from stack tree into array
6029a57f 269 incrementally.
0435d061
AD
270 (yyuserAction): Modify to allow incremental move of semantic values
271 to rhs array when in GLR mode.
272 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
273 as needed.
274 Remove dummy use of yystack, as there is now a guaranteed use.
275 (yydoAction): Modify to allow incremental move of semantic values
276 to rhs array when in GLR mode.
277 (yyresolveAction): Ditto.
278 (yyglrShiftDefer): Update comment.
0435d061 279 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
280 (yyglrReduce): Ditto.
281 (yydoAction): Ditto
0435d061 282
6029a57f
PH
283 * tests/glr-regr1.at: Rename to ...
284 * tests/glr-regression.at: Add new regression test for the problems
285 described above (adapted from S. Eken).
286 Update copyright notice.
287 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
288 * tests/Makefile.am: Ditto.
289
6cee6297
PE
2902003-01-28 Paul Eggert <eggert@twinsun.com>
291
292 * data/lalr1.cc: Do not use @output_header_name@ unless
293 b4_defines_flag is set. This fixes two bugs reported by
294 Tim Van Holder in
295 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
296 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
297
b2a836b5
PE
2982003-01-21 Paul Eggert <eggert@twinsun.com>
299
300 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
301 we don't need to worry about yyerrlab1 being reported as an
302 "unused label" by non-GCC C compilers. The downside is that if
303 locations are used then a couple of statements are duplicated each
304 time YYERROR is invoked, but the upside is that the warnings
305 should vanish.
306 (yyerrlab1): Move code to YERROR.
307 (yyerrlab2): Remove. Change uses back to yyerrlab1.
308 This reverts some of the 2002-12-27 change.
309
4196b931
PE
3102003-01-17 Paul Eggert <eggert@twinsun.com>
311
312 * src/output.c (symbol_printers_output): Fix typo that led
313 to core dump. Problem reported by Antonio Rus in
314 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
315
3ae831b4
AD
3162003-01-13 Akim Demaille <akim@epita.fr>,
317 Quoc Peyrot <chojin@lrde.epita.fr>,
318 Robert Anisko <anisko_r@lrde.epita.fr>
319
320 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
321 when the stacks contain one element, as the loop would otherwise
322 free the last state, and then use the top state (the one we just
323 popped). This means that the initial elements will not be freed
324 explicitly, as is the case in yacc.c; it is not a problem, as
325 these elements have fake values.
326
e3aa65c5
PE
3272003-01-11 Paul Eggert <eggert@twinsun.com>
328
329 * NEWS: %expect-violations are now just warnings, reverting
330 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
331 bootstrapping problem reported by Matthias Klose; see
332 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
333 * src/conflicts.c (conflicts_print): Likewise.
334 * tests/conflicts.at (%expect not enough, %expect too much,
335 %expect with reduce conflicts): Likewise.
336 * doc/bison.texinfo (Expect Decl): Document this. Also mention
337 that the warning is enabled if the number of conflicts changes
338 (not necessarily increases).
339
340 * src/getargs.c (version): Update copyright year.
341
f0057011
AD
3422003-01-09 Akim Demaille <akim@epita.fr>
343
344 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
345
1ee6d2a0
PE
3462003-01-08 Paul Eggert <eggert@twinsun.com>
347
348 * Makefile.maint (WGETFLAGS):
349 New macro, containing "-C off" to disable proxy caches.
350 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
351 (rel-check): Use $(WGET) instead of wget.
352
d4fd77c4
PE
3532003-01-06 Paul Eggert <eggert@twinsun.com>
354
355 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
356 the GLR paper of Scott, Johnstone and Hussain.
357
464c6927
PE
3582003-01-04 Paul Eggert <eggert@twinsun.com>
359
d600ee67
PE
360 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
361 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
362 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
363 (EXTRA_LIBRARIES): New var, for liby.a.
364 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
365 (EXTRA_SCRIPTS): New var, for yacc.
366
464c6927
PE
367 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
368 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
369 Problem reported by Nelson H. F. Beebe.
370
3712003-01-03 Paul Eggert <eggert@twinsun.com>
372
373 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
374 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
375 when compiling Bison 1.875's `bitset bset = obstack_alloc
376 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
377
378 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
379 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
380 grow to a huge size with typical invocation.
d600ee67 381
464c6927
PE
382 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
383 Use the pattern recommended by Autoconf 2.57, except also protect
384 against double-definition.
385 * src/system.h: Likewise.
386 Portability issues reported by Nelson H. F. Beebe.
d600ee67 387
464c6927
PE
388 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
389 All uses changed. Provide a definition in both C and C++.
390 (yytrue, yyfalse): Define even if defined (__cplusplus).
391
392 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
393 Reported by Nelson H. F. Beebe.
d600ee67 394
464c6927
PE
395 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
396
0f42c7d5
PE
3972003-01-02 Paul Eggert <eggert@twinsun.com>
398
399 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
400 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
401 Bug reported by Nelson H. F. Beebe.
402
dc546b0f
PE
4032003-01-01 Paul Eggert <eggert@twinsun.com>
404
405 * Version 1.875.
406
2c09b6a7
PE
4072002-12-30 Paul Eggert <eggert@twinsun.com>
408
409 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
410 Moved here from...
411 (<INITIAL>","): Here. This causes stray "," to be treated
412 more uniformly.
413
dc546b0f 414 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
415 last brace in braced code when not in Yacc mode, for compatibility
416 with Bison 1.35. This resurrects the 2001-12-15 patch to
417 src/reader.c.
418
419 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
420 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
421
535c0f63
PE
4222002-12-28 Paul Eggert <eggert@twinsun.com>
423
424 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
425 that of SYM's type. This fixes Debian bug 168069, reported by
426 Thomas Olsson.
d600ee67 427
963fcc17
PE
4282002-12-28 Paul Eggert <eggert@twinsun.com>
429
430 Version 1.75f.
431
432 Switch back to the Yacc style of conflict reports, undoing some
433 of the 2002-07-30 change.
434 * doc/bison.texinfo (Understanding): Use Yacc style for
435 conflict reports. Also, use new way of locating rules.
436 * src/conflicts.c (conflict_report):
437 Renamed from conflict_report_yacc, removing the old
438 'conflict_report'. Translate the entire conflict report at once,
439 so that we don't assume that "," has the same interpretation in
440 all languages.
441 (conflicts_output): Use Yacc-style conflict report for each state,
442 instead of our more-complicated style.
443 (conflicts_print): Use Yacc-style conflict report, except print
444 the input file name when not emulating Yacc.
445 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
446 Conflicted Reduction, %expect not enough, %expect too much,
447 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
448 * tests/existing.at (GNU Cim Grammar): Likewise.
449 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
450
451 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
452 fatal): Don't invoke fflush; it's not needed and it might even be
453 harmful for stdout, as stdout might not be open.
454 * src/reduce.c (reduce_print): Likewise.
455
b1efe548
PE
4562002-12-27 Paul Eggert <eggert@twinsun.com>
457
458 Fix a bug where error locations were not being recorded correctly.
459 This problem was originally reported by Paul Hilfinger in
e3aa65c5 460 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
461
462 * data/yacc.c (yyparse): New local var yylerrsp, to record the
463 top of the location stack's error locations.
464 (yyerrlab): Set it. When discarding a token, push its location
465 onto yylerrsp so that we don't lose track of the error's end.
466 (yyerrlab1): Now is only the target of YYERROR, so that we can
467 properly record the location of the action that failed. For GCC
468 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
469 GCC warning about yyerrlab1 being unused if YYERROR is unused.
470 (yyerrlab2): New label, which yyerrlab now falls through to.
471 Compute the error's location by applying YYLLOC_DEFAULT to
472 the locations of all the symbols that went into the error.
473 * doc/bison.texinfo (Location Default Action): Mention that
474 YYLLOC_DEFAULT is also invoked for syntax errors.
475 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
476 Error locations include the locations of all the tokens that were
477 discarded, not just the last token.
d600ee67 478
983c5c2c
PE
4792002-12-26 Paul Eggert <eggert@twinsun.com>
480
b1efe548
PE
481 * src/files.c: Include quote.h.
482 (compute_output_file_names): Warn if we detect conflicting
483 outputs to the same file. This should catch the misunderstanding
484 exemplified by Debian Bug 165349, reported by Bruce Stephens..
485
486 * src/conflicts.c (conflicts_print): If the user specifies
487 "%expect N", report an error if there are any reduce/reduce
488 conflicts. This is what the manual says should happen.
489 This fixes Debian bug 130890, reported by Anthony DeRobertis.
490 * tests/conflicts.at (%expect with reduce conflicts): New test.
491
983c5c2c
PE
492 Don't use m4_include on relative file names, as it doesn't work as
493 desired if there happens to be a file with that name under ".".
d600ee67 494
983c5c2c
PE
495 * m4sugar/version.m4: Remove; it was included but it wasn't used.
496 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
497 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
498 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
499 * src/output.c (output_skeleton): Use full path names when
500 specifying a file to include; don't rely on include path, as
501 it's unreliable when the working file contains a file with
502 that name.
d600ee67 503
983c5c2c
PE
5042002-12-25 Paul Eggert <eggert@twinsun.com>
505
506 Remove obsolete references to bison.simple and bison.hairy.
507 Problem mentioned by Aubin Mahe in
e3aa65c5 508 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
509 * data/glr.c: Comment fix.
510 * doc/bison.1: Remove references. Also, mention "yacc".
511
512 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
513 with -g option.
514
515 * src/parse-gram.y (declaration): Use enum "report_states" rather
516 than its numeric value 1.
517
518 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
519 opening a new one. This fixes Debian bug 165349, reported by
520 Bruce Stephens.
521
23f2d9dc
PE
5222002-12-24 Paul Eggert <eggert@twinsun.com>
523
524 Version 1.75e.
525
526 * Makefile.maint (cvs-update): Don't assume that the shell
527 supports $(...), as Solaris sh doesn't.
528
529 * src/parse-gram.y (lloc_default): Remove test for empty
530 nonterminals at the end, since it didn't change the result.
531
5322002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
533
534 If the user does not define YYSTYPE as a macro, Bison now declares it
535 using typedef instead of defining it as a macro. POSIX requires this.
536 For consistency, YYLTYPE is also declared instead of defined.
537
538 %union directives can now have a tag before the `{', e.g., the
539 directive `%union foo {...}' now generates the C code
540 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
541 The default union tag is `YYSTYPE', for compatibility with Solaris 9
542 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
543 instead of `yyltype'.
544
545 `yystype' and `yyltype' are now obsolescent macros instead of being
546 typedefs or tags; they are no longer documented and will be
547 withdrawn in a future release.
548
549 * data/glr.c (b4_location_type): Remove.
550 (YYSTYPE): Renamed from yystype.
551 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
552 (struct YYLTYPE): Renamed from struct yyltype.
553 (YYLTYPE): Renamed from yyltype.
554 (yyltype, yystype): New (and obsolescent) macros,
555 for backward compatibility.
556 * data/yacc.c: Likewise.
557
558 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
559 does not specify a union tag. This is for compatibility with
560 Solaris 9 yacc.
561
562 * src/parse-gram.y (add_param): 2nd arg is now char * not char
563 const *, since it is now modified by stripping surrounding { }.
564 (current_braced_code): Remove.
565 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
566 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
567 trailing " {...}". Now of type <chars>.
568 (grammar_declaration): Adjust to bundled tokens.
569 (code_content): Remove; stripping is now done by add_param.
570 (print_token_value): Print contents of bundled tokens.
571 (token_name): New function.
572
573 * src/reader.h (braced_code, current_braced_code): Remove.
574 (token_name): New decl.
575
576 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
577 token_type, not braced_code code_kind. All uses changed.
578 (SC_PRE_CODE): New state, for scanning after a keyword that
579 has (or usually has) an immediately-following braced code.
580 (token_type): New local var, to keep track of which token type
581 to return when scanning braced code.
582 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 583 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
584 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
585 instead of returning a token type immediately.
586 (<INITIAL>"{"): Set token type.
587 (<SC_BRACED_CODE>"}"): Use it.
588 (handle_action_dollar, handle_action_at): Now returns bool
589 indicating success. Fail if ! current_rule; this prevents a core dump.
590 (handle_symbol_code_dollar, handle_symbol_code_at):
591 Remove; merge body into caller.
592 (handle_dollar, handle_at): Complain in invalid contexts.
593
594 * NEWS, doc/bison.texinfo: Document the above.
595 * NEWS: Fix years and program names in copyright notice.
596
879ca4f8
PE
5972002-12-17 Paul Eggert <eggert@twinsun.com>
598
599 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
600 Reporting, Table of Symbols): Omit mentions of %lex-param and
601 %parse-param from the documentation for now.
602
1c5fe69d
PE
6032002-12-15 Paul Eggert <eggert@twinsun.com>
604
605 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
606 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
607 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
608 disagreed with the Bison documentation. Bug
609 reported by Andrew Walrond.
d600ee67 610
1c5fe69d
PE
611 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
612 as the caller now does that.
613 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
614 (YYEMPTY): Parenthesize right hand side, since others use it.
615 (yyparse): Don't assume that our generated code is the only code
616 that sets yychar.
617
d1de5372
PE
6182002-12-13 Paul Eggert <eggert@twinsun.com>
619
620 Version 1.75d.
621
622 POSIX requires a "yacc" command.
623 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
624 (MOSTLYCLEANFILES): Add yacc.
625 (yacc): New rule.
1c5fe69d 626 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
627 as an alias for bison y.
628
629 * po/LINGUAS: Add da.
d600ee67 630
d1de5372
PE
631 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
632 problem with latest <getopt.h>.
633 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
634
635 * doc/fdl.texi: Upgrade to 1.2.
636 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
637 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
638 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
639 gnulib.
640 * config/install-sh: Sync with autotools.
641
642 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
e3aa65c5 643 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
644 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
645 locations are requested.
646 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
647 locations are requested.
648
d0f3fe23
PE
6492002-12-12 Paul Eggert <eggert@twinsun.com>
650
651 Remove unportable casts and storage allocation tricks.
652 While we're at it, remove almost all casts, since they
653 usually aren't needed and are a sign of trouble.
654
655 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
656
657 * src/derives.c (derives_compute): Do not subtract NTOKENS from
658 the pointer DSET returned by malloc; this isn't portable.
659 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
660 Similarly for DERIVES.
661 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
662 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
663 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
664
665 * src/derives.c (derives_compute): Do not bother invoking
666 int_of_rule_number, since rule numbers are integers.
667
668 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
669 rather than XMALLOC (char, N).
670
671 * src/files.c (filename_split): Rewrite to avoid cast.
672
673 * src/gram.h (symbol_number_as_item_number,
674 item_number_as_symbol_number, rule_number_as_item_number,
675 item_number_as_rule_number):
676 Now inline functions rather than macros, to avoid casts.
677 * src/state.h (state_number_as_int): Likewise.
678 * src/tables.c (state_number_to_vector_number,
679 symbol_number_to_vector_number): Likewise.
680
681 * src/gram.h (int_of_rule_number): Remove; no longer used.
682
683 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
684 since the resulting storage is always stored into.
685
686 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
687 where it's needed.
688
689 * src/muscle_tab.c (muscle_m4_output):
690 Now inline. Return bool, not int.
691 * src/state.c (state_compare): Likewise.
692 * src/symtab.c (symbol_check_defined,
693 symbol_check_alias_consistency, symbol_pack, symbol_translation,
694 hash_compare_symbol, hash_symbol):
695 Likewise.
696 * src/uniqstr.c (uniqstr_print): Likewise.
697 * src/muscle_tab.c (muscle_m4_output_processor):
698 New function, to avoid casts.
699 * src/state.c (state_comparator, stage_hasher): Likewise.
700 * src/symtab.c (symbol_check_defined_processor,
701 symbol_check_alias_consistency_processor, symbol_pack_processor,
702 symbol_translation_processor, hash_symbol_comparator,
703 hash_symbol_hasher): Likewise.
704 * src/uniqstr.c (uniqstr_print_processor): Likewise.
705 * src/muscle_tab.c (muscles_m4_output):
706 Use new functions instead of casting old functions unportably.
707 * src/state.c (state_hash_new): Likewise.
708 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
709 symbols_token_translations_init):
710 Likewise.
711 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
712
713 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
714 var instead of casting to long, to avoid casts.
715 (prepare_states): Use MALLOC rather than alloca, so that we don't
716 have to worry about alloca.
717 * src/state.c (state_hash_lookup): Likewise.
718
719 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
720 local var instead of casting to unsigned char, to avoid casts.
721
722 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
723 STATE_ALLOC): Remove.
724 (transitions_new, errs_new, reductions_new, state_new): Use malloc
725 rather than calloc, and use offsetof to avoid allocating slightly
726 too much storage.
727 (state_new): Initialize all members.
728
729 * src/state.c (state_hash): Use unsigned accumulator, not signed.
730
731 * src/symtab.c (symbol_free): Remove; unused.
732 (symbol_get): Remove cast in lhs of assignment.
733 (symbols_do): Now static. Accept generic arguments, not
734 hashing-related ones.
735
736 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
737 (symbol_processor): Remove.
738 (symbols_do): Remove decl; now static.
739
740 * src/system.h (alloca): Remove; decl no longer needed.
741 (<stddef.h>): Include, for offsetof.
742 (<inttypes.>, <stdint.h>): Include if available.
743 (uintptr_t): New type, if system lacks it.
744 (CALLOC, MALLOC, REALLOC): New macros.
745 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
746 new macros.
747
748 * src/tables.c (table_size): Now int, to pacify GCC.
749 (table_grow, table_ninf_remap): Use signed table size.
750 (save_row): Don't bother initializing locals when not needed.
751 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
752 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
753
754 * src/vcg.h: Correct misspellings.
755
756 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
757
758
759 * src/getargs.c (getargs): Don't assume EOF == -1.
760
26b4a969
PE
7612002-12-09 Paul Eggert <eggert@twinsun.com>
762
763 Change identifier spellings to avoid collisions with names
764 that are reserved by POSIX.
765
766 Don't use names ending in _t, since POSIX reserves them.
767 For consistency, remove _e and _s endings -- they're weren't
768 needed to remove ambiguity. All uses changed.
769 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
770 turn was just renamed from struniq_t.
771 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
772 which in turn was just renamed from struniq_processor_t.
773 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
774 in turn was renamed from hash_compare_struniq_t.
775 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
776 (state_list): Renamed from state_list_t.
777 * src/assoc.h (assoc): Renamed from assoc_t.
778 * src/conflicts.c (enum conflict_resolution): Renamed from
779 enum conflict_resolution_e.
780 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
781 (rule_list): Renamed from rule_list_t.
782 * src/getargs.h (enum trace): Renamed from enum trace_e.
783 (enum report): Renamed from enum report_e.
784 * src/gram.h (item_number): Renamed from item_number_t.
785 (rule_number): Renamed from rule_number_t.
786 (struct rule_s): Remove the "rule_s" part; not used.
787 (rule): Renamed from rule_t.
788 (rule_filter): Renamed from rule_filter_t.
789 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
790 (goto_list): Renamed from goto_list_t.
791 * src/lalr.h (goto_number): Renamed from goto_number_t.
792 * src/location.h (location): Renamed from location_t.
793 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
794 and moved here from:
795 * src/muscle_tab.h (muscle_entry_t): here.
796 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
797 (rule_list): Renamed from rule_list_t.
798 * src/print_graph.c (static_graph): Renamed from graph.
799 * src/reader.h (braced_code): Renamed from braced_code_t.
800 Remove brace_code_e tag.
801 * src/relation.h (relation_node): Renamed from relation_node_t.
802 (relation_nodes): Renamed from relation_nodes_t.
803 (relation): Renamed from relation_t.
804 * src/state.h (state_number): Renamed from state_number_t.
805 (struct state): Renamed from struct state_s.
806 (state): Renamed from state_t.
807 (transitions): Renamed from transitions_t. Unused (and
808 misspelled) transtion_s tag removed.
809 (errs): Renamed from errs_t. Unused errs_s tag removed.
810 (reductions): Renamed from reductions_t. Unused tag
811 reductions_s removed.
812 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
813 (struct symbol_list): Renamed from struct symbol_list_s.
814 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
815 (struct symbol): Renamed from struct symbol_s.
816 (symbol): Renamed from symbol_t.
817 * src/tables.c (vector_number): Renamed from vector_number_t.
818 (action_number): Renamed from action_t.
819 * src/tables.h (base_number): Renamed from base_t.
820 * src/vcg.h (enum color): Renamed from enum color_e.
821 (enum textmode): Renamed from enum textmode_e.
822 (enum shape): Renamed from enum shape_e.
823 (struct colorentry): Renamed from struct colorentry_s.
824 (struct classname): Renamed from struct classname_s.
825 (struct infoname): Renamed from struct infoname_s.
826 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
827 (enum decision): Renamed from enum decision_e.
828 (enum orientation): Renamed from enum orientation_e.
829 (enum alignment): Renamed from enum alignment_e.
830 (enum arrow_mode): Renamed from enum arrow_mode_e.
831 (enum crossing_type): Renamed from enum crossing_type_e.
832 (enum view): Renamed from enum view_e.
833 (struct node): Renamed from struct node_s.
834 (node): Renamed from node_t.
835 (enum linestyle): Renamed from enum linestyle_e.
836 (enum arrowstyle): Renamed from enum arrowstyle_e.
837 (struct edge): Renamed from struct edge.
838 (edge): Renamed from edge_t.
839 (struct graph): Renamed from struct graph_s.
840 (graph): Renamed from graph_t.
841 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
842 Rename value_t -> value.
843 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
844 value_t_as_yystype -> value_as_yystype.
845
846 Don't include <errno.h> in the mainstream code, since it
847 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
848 * lib/get-errno.c, lib/get-errno.h: New files.
849 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
850 get-errno.c.
851 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
852 * src/output.c (output_skeleton): Likewise.
853 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
854 instead of errno.
855 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
856 Likewise.
857 (handle_action_dollar, handle_action_at): Likewise.
858 * src/system.h: Do not include <errno.h>.
859 (TAB_EXT): Renamed from EXT_TAB.
860 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
861
862 Avoid str[a-z]*, since <string.h> reserves that name space.
863 Change all instances of "struniq" in names to "uniqstr", and
864 likewise for "STRUNIQ" and "UNIQSTR".
865 * src/uniqstr.c: Renamed from src/struniq.c.
866 * src/uniqstr.h: Renamed from src/struniq.h.
867 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
868 * src/files.c (strsuffix): Remove; unused.
869 (concat2): Renamed from stringappend. Now static.
870 * src/files.h (strsuffix, stringappend): Remove; unused.
871 * src/parse-gram.y (<chars>): Renamed from <string>.
872 (<uniqstr>): Renamed from <struniq>.
873 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
874 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
875 (struct graph_s.expand): Renamed from struct graph_s.stretch.
876 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
877 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
878 (N_EXPAND): Renamed from N_STRETCH.
879
880 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
881 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
882 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
883 Remove; unused.
884 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
885 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
886 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
887 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
888 (BASE_MAXIMUM): Renamed from BASE_MAX.
889 (BASE_MINIMUM): Renamed from BASE_MIN.
890 (ACTION_MAX): Remove; unused.
891 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
892 Unnecessary casts removed from above defines.
893
894
895 Fix misspelling in names.
896 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
897 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
898 G_NODE_ALIGNEMENT.
899
900
901 * lib/timevar.c (timevar_report): Renamed from time_report,
902 for consistency with other names.
903 * lib/timevar.h (timevar_report): New decl.
904 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
905
906
907 Sort include-file uses.
908
909 Reorder all include files under src to be in the order "system.h".
910 then the ../lib include files in angle brackets (alphabetized),
911 then the . include files in double-quotes (alphabetized). Fix
912 dependency breakages encountered in this process, as follows:
913 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
914 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
915 * src/state.h: Include "symtab.h".
916
996b1c7e
PE
9172002-12-08 Paul Eggert <eggert@twinsun.com>
918
919 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
920 since this causes problems when __file__ contains character
921 sequences like "@" that are treated specially by src/scan-skel.l.
922 Instead, just use the file's basename. This fixes the bug
923 reported by Martin Mokrejs in
e3aa65c5 924 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 925
e19c4e5d
PE
9262002-12-06 Paul Eggert <eggert@twinsun.com>
927
928 Add support for rules that do not have trailing semicolons, as
929 POSIX requires. Improve the quality of locations in Bison
930 diagnostics.
26b4a969 931
e19c4e5d
PE
932 * src/location.c: Include <quotearg.h>.
933 (empty_location): Now const.
934 (location_print): New function. Follow the recommendation of the
935 GNU Coding Standards for locations that span file boundaries.
936 * src/location.h: Do not include <quotearg.h>; no longer needed.
937 (boundary): New type.
938 (location_t): Use it. This allows locations to span file boundaries.
939 All member uses changed: file -> start.file or end.file (as needed),
940 first_line -> start.line, first_column -> start.column,
941 last_line -> end.line, last_column -> end.column.
942 (equal_boundaries): New function.
943 (LOCATION_RESET, LOCATION_STEP): Remove.
944 (LOCATION_PRINT): Remove. All callers changed to use location_print.
945 (empty_location): Now const.
946 (location_print): New decl.
947 * src/parse-gram.y (lloc_default): New function, which handles
948 empty locations more accurately.
949 (YYLLOC_DEFAULT): Use it.
950 (%token COLON): Remove.
951 (%token ID_COLON): New token.
26b4a969 952 (rules): Use it.
e19c4e5d
PE
953 (declarations, rules): Remove trailing semicolon.
954 (declaration, rules_or_grammar_declaration):
955 Allow empty (";") declaration.
956 (symbol_def): Remove empty actions; no longer needed.
957 (rules_or_grammar_declaration): Remove trailing semicolon.
958 (semi_colon.opt): Remove.
959 * src/reader.h: Include location.h.
960 (scanner_cursor): New decl.
961 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
962 rolling our own.
963 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
964 of *loc.
965 (STEP): Remove. No longer needed, now that adjust_location does
966 the work. All uses removed.
967 (scanner_cursor): New var.
968 (adjust_location): Renamed from extend_location. It now sets
969 *loc and adjusts the scanner cursor. All uses changed.
970 Don't bother testing for CR.
971 (handle_syncline): Remove location arg; now updates scanner cursor.
972 All callers changed.
973 (unexpected_end_of_file): Now accepts start boundary of token or
974 comment, not location. All callers changed. Update scanner cursor,
975 not the location.
976 (SC_AFTER_IDENTIFIER): New state.
977 (context_state): Renamed from c_context. All uses changed.
978 (id_loc, code_start, token_start): New local vars.
979 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
980 processing of Yacc white space and equivalents here.
981 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
982 instead of returning ID immediately, since we need to search for
983 a subsequent colon.
984 (<INITIAL>"'", "\""): Save token_start.
985 (<INITIAL>"%{", "{", "%%"): Save code_start.
986 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
987 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
988 BEGIN context_state at end, not INITIAL.
989 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
990 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
991 Return correct token start.
992 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
993 the start of a character, string or multiline comment is found.
994 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
995 Reduction): Adjust reported locations to match the more-precise
996 results now expected.
997 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
998 * tests/reduce.at (Useless Rules, Reduced Automaton,
999 Underivable Rules): Likewise.
1000 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1001 or "|"' now that so many other tokens are allowed by the new grammar.
1002
1003 * src/complain.h (current_file): Remove duplicate decl;
1004 current_file is now owned by files.h.
1005 * src/complain.c, src/scan-gram.l: Include files.h.
1006
10072002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 1008
e19c4e5d
PE
1009 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1010 promotes to int; it might be unsigned int.
1011 * data/yacc.c (yy_reduce_print): Likewise.
1012
1013 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1014 be #defined in the prologue, not in the Bison declarations.
1015 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 1016
b64755e3
PE
10172002-12-02 Paul Eggert <eggert@twinsun.com>
1018
1019 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1020 * lib/strtoul.c: New file, from gnulib.
1021 This fixes a porting bug reported by Peter Klein in
e3aa65c5 1022 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 1023
6e746484
PE
10242002-11-30 Paul Eggert <eggert@twinsun.com>
1025
b64755e3
PE
1026 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1027 and put only a forward declaration in the prologue. This is for
1028 consistency with the other scanner helper functions.
1029
6ba55592
PE
1030 Type clashes now generate warnings, not errors, since it
1031 appears that POSIX may allow some grammars with type clashes.
1032 * src/reader.c (grammar_current_rule_check): Warn about
1033 type clashes instead of complaining.
1034 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1035
6e746484
PE
1036 Add Yacc library, since POSIX requires it.
1037 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1038 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1039 * lib/main.c, lib/yyerror.c: New files.
1040
1041 gram_error can be static; it need not be extern.
1042 * src/reader.h (gram_error): Remove decl.
1043 * src/parse-gram.y (gram_error): Now static. Add static decl.
1044 (print_token_value): Omit parameter names from forward decl,
1045 for consistency.
1046
88510f9c
PE
10472002-11-29 Paul Eggert <eggert@twinsun.com>
1048
6e746484
PE
1049 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1050 be declared before being used. E.g., one should typically
1051 declare them in the prologue. Use GNU coding style in examples.
1052 Put "const" consistently after the type it modifies. Mention
1053 that C99 supports "inline". Mention that yyerror traditionally
1054 returns "int".
1055
88510f9c
PE
1056 %parse-param and %lex-param now take just one argument, the
1057 declaration; the argument name is deduced from the declaration.
1058
1059 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1060 Reporting, Table of Symbols): Document this.
1061 * src/parse-gram.y (add_param): New function.
1062 (COMMA): Remove.
1063 (declaration): Implement new rule for %parse-param and %lex-param.
1064 * src/scan-gram.l: "," now elicits a warning, rather than being
1065 a token; this is more compatible with byacc.
1066 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1067
bb92250c
PE
10682002-11-27 Paul Eggert <eggert@twinsun.com>
1069
1070 Rename identifiers to avoid real and potential collisions.
1071
1072 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1073 to avoid collision with lex macro described by Bruce Lilly in
e3aa65c5 1074 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
1075 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1076 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1077 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1078 All uses changed.
1079 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1080 The name "yycontrol" violates the name space rules, and this stuff
1081 wasn't being used anyway.
1082 (input): Remove action; this stuff wasn't being used.
1083 (gram_error): Rename local variable yylloc -> loc.
1084 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1085 (YY_DECL): Don't use "yy" at start of local variables.
1086 All uses changed, e.g., yylloc -> loc.
1087 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1088 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1089 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1090 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1091
1092 * src/parse-gram.y (gram_error): loc is now const *.
1093 * src/reader.h (gram_error): Likewise.
1094
3af4feb2
PE
10952002-11-24 Paul Eggert <eggert@twinsun.com>
1096
1097 Version 1.75c.
1098
1099 * tests/actions.at (Actions after errors): Use an output format
1100 more similar to that of the Printers and Destructors test.
1101 Test the position of the ';' token too.
1102 (Printers and Destructors): Likewise.
1103 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1104 unnecessarily alarming people when the test fails.
1105
1106 * data/yacc.c (yyerrlab1): Move this label down, so that the
1107 parser does not discard the lookahead token if the user code
1108 invokes YYERROR. This change is required for POSIX conformance.
1109
1110 * lib/error.c: Sync with gnulib.
1111
11122002-11-22 Paul Eggert <eggert@twinsun.com>
1113
1114 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1115 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1116 * lib/xmalloc.c: Likewise.
26b4a969 1117
58004308
PE
11182002-11-20 Paul Eggert <eggert@twinsun.com>
1119
1120 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1121
11222002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 1123
58004308
PE
1124 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1125 should use `if (! x) abort ();' rather than `assert (x);', and
1126 anyway it's one less thing to worry about configuring.
1127
1128 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1129 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1130 and replace all instances of assert with abort.
1131 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1132 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1133
1134 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1135 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1136 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1137 hash_find_entry, hash_rehash, hash_insert): Likewise.
1138 * src/conflicts.c (resolve_sr_conflict): Likewise.
1139 * src/lalr.c (set_goto_map, map_goto): Likewise.
1140 * src/nullable.c (nullable_compute): Likewise.
1141 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1142 * src/reader.c (packgram, reader): Likewise.
1143 * src/state.c (state_new, state_free, state_transitions_set,
1144 state_reduction_find): Likewise.
1145 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1146 symbol_pack): Likewise.
1147 * src/tables.c (conflict_row, pack_vector): Likewise.
1148 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1149 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1150 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1151 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1152
1153 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1154 (ARGMATCH_CONSTRAINT): New macro.
1155 (ARGMATCH_ASSERT): Use it.
1156
1157 * src/system.h (verify): New macro.
1158 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1159 rather than assert.
1160 * src/tables.c (tables_generate): Likewise.
1161
1162 * src/struniq.c (struniq_assert): Now returns void, and aborts
1163 if the assertion is false.
1164 (struniq_assert_p): Remove.
1165 * src/struniq.h: Likewise.
1166
76ae8198
PE
11672002-11-18 Paul Eggert <eggert@twinsun.com>
1168
1169 * data/glr.c (yygetLRActions): Replace `yyindex' with
1170 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1171 This fixes the regression with Sun ONE Studio 7 cc that I reported in
e3aa65c5 1172 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 1173
d3c4e709
AD
11742002-11-18 Akim Demaille <akim@epita.fr>
1175
1176 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1177 space.
1178 From Tim Van Holder.
1179
8d8a7238
PE
11802002-11-17 Paul Eggert <eggert@twinsun.com>
1181
1182 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1183 to "SyntaxError" for consistency with my 2002-11-15 change.
1184
1185 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1186 not define to {}, since this breaks the common use of `YYDPRINTF
1187 ((...));' if a single statement is desired (e.g. before `else').
1188 Work around GCC warnings by surrounding corresponding calls with
1189 {} if needed.
1190 (yyhasResolvedValue): Remove unused function.
1191 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1192 loop body.
1193 (yyreportSyntaxError): Renamed from yyreportParseError.
1194 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1195 All uses changed.
1196 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1197 extern when possible. Remove unused initializations.
1198
b0937b22
AD
11992002-11-16 Akim Demaille <akim@epita.fr>
1200
1201 Augment the similarity between GLR and LALR traces.
1202
1203 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1204 (YY_REDUCE_PRINT): New.
1205 (yyparse): Use them.
1206 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1207 YYDPRINT here.
1208 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1209 state reached after the reduction/recovery, since...
1210 (yyparse, yyprocessOneStack): Report the state we are entering in.
1211
c5e3e510
AD
12122002-11-16 Akim Demaille <akim@epita.fr>
1213
1214 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1215 Add support for --trace=skeleton.
1216 * src/scan-skel.l: %option debug.
1217 Scan strings of non-@ or \n instead of character by character.
1218 (scan_skel): Handle trace_skeleton.
1219 (QPUTS): New.
1220 (@output_parser_name@, @output_header_name@): ``Restore'' their
1221 support (used to be M4 macros).
1222 * data/yacc.c: Quote larger chunks, a la glr.c.
1223 * data/lalr1.cc: Likewise.
1224 The header guards are no longer available, so use some other
1225 string than `YYLSP_NEEDED'.
1226
4c6cc1db
AD
12272002-11-16 Akim Demaille <akim@epita.fr>
1228
1229 Make the ``Printers and Destructors'' test more verbose, taking
1230 `yacc.c''s behavior as (possibly wrong) reference.
1231
1232 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1233 instead of fprint on stdout.
1234 Set and report the last_line of the symbols.
1235 Consistently display values and locations.
1236
6d9e8019
PE
12372002-11-16 Paul Eggert <eggert@twinsun.com>
1238
1239 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1240
6e649e65
PE
12412002-11-15 Paul Eggert <eggert@twinsun.com>
1242
b25d88f6
PE
1243 * tests/actions.at (Actions after errors): New test case.
1244
6e649e65
PE
1245 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1246 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1247 tests/action.at, tests/calc.at, tests/conflicts.at,
1248 tests/cxx-type.at, tests/regression.at:
1249 "parse error" -> "syntax error" for POSIX compatibility.
1250 "parsing stack overflow..." -> "parser stack overflow" so
1251 that code matches Bison documentation.
1252
0f39aab9
AD
12532002-11-15 Akim Demaille <akim@epita.fr>
1254
1255 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1256 take two BRACED_CODE, not two string_content.
1257 Free the scanner's obstack when we are done.
1258 (code_content): New.
1259 * tests/calc.at: Adjust.
1260 * doc/bison.texinfo: Adjust.
1261 Also, make sure to include the `,' for these declarations.
1262
761c1926
AD
12632002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1264
1265 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1266 definition; avoids potential autoreconf problems.
1267
b0f98b10
AD
12682002-11-15 Akim Demaille <akim@epita.fr>
1269
1270 Always check the value returned by yyparse.
1271
1272 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1273 returned by yyparse.
1274 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1275 Adjust calls.
1276 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1277 returned by yyparse.
1278
970785f1
PH
12792002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1280
1281 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1282 on input.at test.
1283
8fcc7db1
PE
12842002-11-14 Paul Eggert <eggert@twinsun.com>
1285
7ec1b48e
PE
1286 * src/output.c (output_skeleton): Call xfopen instead of
1287 duplicating xfopen's body.
1288
cfff7583 1289 Fix bugs reported by Nelson H. F. Beebe in
e3aa65c5 1290 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 1291
8fcc7db1
PE
1292 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1293 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1294 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1295 file twice in the grammar, as an extra check.
1296
1297 * tests/input.at (Torturing the Scanner): Surround the
1298 backslash-newline tests with "#if 0", to make it less likely that
1299 we'll run into compiler bugs. Bring back solitary \ inside
1300 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 1301 test backslash-newline in C character constant.
8fcc7db1 1302
4e8d992c
AD
13032002-11-14 Akim Demaille <akim@epita.fr>
1304
1305 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1306 status of the compiler.
f32b346d 1307 Calling `exit 1' is no longer needed.
4e8d992c
AD
1308 Reported by Nelson H. F. Beebe.
1309
9501dc6e
AD
13102002-11-14 Akim Demaille <akim@epita.fr>
1311
1312 * tests/atlocal.in (CPPFLAGS): We have config.h.
1313 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1314 New.
1315 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1316 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1317 * tests/regression.at, tests/torture.at: Use them for all the
1318 grammars that are to be compiled.
1319 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1320 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1321 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1322
18b519c0
AD
13232002-11-14 Akim Demaille <akim@epita.fr>
1324
1325 * doc/bison.texinfo: Various formatting changes (alignments in
1326 samples, additional @group/@end group, GCS in samples.
1327 Use @deffn instead of simple @table to define the directives,
1328 macros, variables etc.
1329
9a86cdb9
PE
13302002-11-13 Paul Eggert <eggert@twinsun.com>
1331
daa33def 1332 Fix some bugs reported by Albert Chin-A-Young in
e3aa65c5 1333 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 1334
daa33def 1335 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 1336 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
1337 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1338 * tests/headers.at (export YYLTYPE): Likewise.
1339
1340 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 1341 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 1342
9a86cdb9
PE
1343 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1344 comments, since they're not portable. Use GNU coding style.
1345
9c1e26bd
AD
13462002-11-13 Akim Demaille <akim@epita.fr>
1347
1348 * data/yacc.c: Leave bigger chunks of quoted text.
1349 (YYDSYMPRINTF): New.
1350 Use it to report symbol activities.
1351 * data/glr.c (YYDSYMPRINTF): New.
1352 Use it.
1353
87f721cc
PE
13542002-11-12 Paul Eggert <eggert@twinsun.com>
1355
1356 Version 1.75b.
1357
1358 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1359 (yyglrReduce): Return yyok, not 0.
1360 This should avoid the enumerated-type warnings reported
464c6927 1361 by Nelson H. F. Beebe in
e3aa65c5 1362 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
1363
1364 * lib/bbitset.h (BITSET_INLINE): Remove.
1365 * lib/bitset.h [! BITSET_INLINE]: Remove.
1366 (bitset_set, bitset_reset, bitset_test): Rename local vars
1367 to avoid shadowing warnings by GCC.
1368
1369 * data/glr.c (inline): Remove #define. It's the user's
1370 responsibility to #define it away, just like 'const'.
464c6927 1371 This fixes one of the bugs reported by Nelson H. F. Beebe in
e3aa65c5 1372 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 1373
87f721cc
PE
1374 * Makefile.maint (po-check): Scan .l and .y files instead of the
1375 .c and the .h files that they generate. This fixes the bug
1376 reported by Tim Van Holder in:
e3aa65c5 1377 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
1378 Look for N_ as well as for _. Try to avoid matching #define for
1379 N_ and _.
1380 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1381 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1382 * src/scan-gram.l: Revamp regular expressions so that " and '
1383 do not confuse xgettext.
1384
1385 * src/struniq.h (struniq_new): Do not declare the return type
1386 to be 'const'; this violates the C standard.
1387 * src/struniq.c (struniq_new): Likewise.
1388
be14ade5
AD
13892002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1390
1391 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1392 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1393 linker.
1394
05291fbc
AD
13952002-11-12 Akim Demaille <akim@epita.fr>
1396
1397 * Makefile.maint: Sync with Autoconf:
1398 (local_updates): New.
1399
1f5fd52e
AD
14002002-11-12 Akim Demaille <akim@epita.fr>
1401
1402 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1403
283f1e64
AD
14042002-11-12 Akim Demaille <akim@epita.fr>
1405
1406 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1407 locations.
1408
886b69d1
AD
14092002-11-12 Akim Demaille <akim@epita.fr>
1410
1411 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1412 not yyvalue.
1413
3df37415
AD
14142002-11-12 Akim Demaille <akim@epita.fr>
1415
1416 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1417 Use it to test the GLR parser.
1418
7bd6c77e
AD
14192002-11-12 Akim Demaille <akim@epita.fr>
1420
1421 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1422 defines it.
1423 * data/glr.c (yystos): New.
1424 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1425 (YYDSYMPRINT): New.
1426 (yyval): Don't define it, it is handled via M4.
1427 (yyrecoverParseError): Free verbosely the discarded symbols.
1428 * data/yacc.c (yysymprint): Remove, rather...
1429 (b4_yysymprint_generate): invoke.
1430 * data/c.m4 (b4_yysymprint_generate): New.
1431 Accept pointers as arguments, as opposed to the version from
1432 yacc.c.
1433 (b4_yydestruct_generate): Likewise.
1434 * tests/cations.at (Printers and Destructors): Use Bison directives
1435 instead of CPP macros.
1436 Don't rely on internal details.
1437
b0400cc6
AD
14382002-11-12 Akim Demaille <akim@epita.fr>
1439
1440 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1441 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1442 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1443 it against YYEMPTY and so forth), work on yytoken (i.e., set
1444 it to YYEMPTY etc.).
1445 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1446 (b4_symbol_actions): Remove.
1447 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1448 for 0, end-of-input.
1449
72f889cc
AD
14502002-11-12 Akim Demaille <akim@epita.fr>
1451
1452 * doc/bison.texinfo (Destructor Decl): New.
1453
b1ae9233
AD
14542002-11-12 Akim Demaille <akim@epita.fr>
1455
1456 * src/tables.c (tables_generate): Use free for pointers that
1457 cannot be NULL, not XFREE.
1458 (pack_vector): Use assert, not fatal, for bound violations.
1459 * src/state.c (state_new): Likewise.
1460 * src/reader.c (reader): Likewise.
1461 * src/lalr.c (set_goto_map): Likewise.
72f889cc 1462 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
1463 the file name.
1464
7ec2d4cd
AD
14652002-11-12 Akim Demaille <akim@epita.fr>
1466
1467 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1468 Restore.
1469 * src/scan-gram.l (last_string): Is global to the file, not to
1470 yylex.
1471 * src/parse-gram.y (input): Don't append the epilogue here,
1472 (epilogue.opt): do it here, and free the scanner's obstack.
1473 * src/reader.c (epilogue_set): Rename as...
1474 (epilogue_augment): this.
1475 * data/c.m4 (b4_epilogue): Defaults to empty.
1476
573a6cd3
AD
14772002-11-12 Akim Demaille <akim@epita.fr>
1478
1479 * src/getargs.c (long_options): Remove duplicates.
1480 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1481 Remove.
1482 * doc/bison.rnh: Remove.
1483 * doc/bison.texinfo (VMS Invocation): Remove.
1484
95612cfa
AD
14852002-11-12 Akim Demaille <akim@epita.fr>
1486
1487 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1488 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1489
1490 Use struniq for symbols.
1491
1492 * src/symtab.h (symbol_t): The tag member is a struniq.
1493 (symbol_type_set): Adjust.
1494 * src/symtab.c (symbol_new): Takes a struniq.
1495 (symbol_free): Don't free the tag member.
1496 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1497 (hash_compare_symbol, hash_symbol): these.
1498 Use the fact that tags as struniqs.
1499 (symbol_get): Use struniq_new.
1500 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1501 Returns a strniq.
1502 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1503 and type members are struniqs.
1504 * src/reader.c (get_merge_function)
1505 (grammar_current_rule_merge_set): Adjust.
1506 (TYPE, current_type): Are struniq.
1507
1508 Use struniq for file names.
1509
1510 * src/files.h, src/files.c (infile): Split into...
1511 (grammar_file, current_file): these.
1512 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1513 * src/reduce.c (reduce_print): Likewise.
1514 * src/getargs.c (getargs): Likewise.
1515 * src/complain.h, src/complain.c: Likewise.
1516 * src/main.c (main): Call struniqs_new early enough to use it for
1517 file names.
1518 Don't free the input file name.
1519
3e6656f9
AD
15202002-11-12 Akim Demaille <akim@epita.fr>
1521
1522 * src/symtab.c (symbol_free): Remove dead deactivated code:
1523 type_name are properly removed.
1524 Don't use XFREE to free items that cannot be NULL.
1525 * src/struniq.h, src/struniq.c: New.
1526 * src/main.c (main): Initialize/free struniqs.
1527 * src/parse-gram.y (%union): Add astruniq member.
1528 (yyprint): Adjust.
1529 * src/scan-gram.l (<{tag}>): Return a struniq.
1530 Free the obstack bit that used to store it.
1531 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1532
7672019c
PE
15332002-11-11 Paul Eggert <eggert@twinsun.com>
1534
1535 Revamp to fix many (but not all) of the C- and M4-related quoting
1536 problems. Among other things, this fixes the Bison bug reported
1537 by Jan Hubicka when processing the Bash grammar; see:
e3aa65c5 1538 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
1539
1540 Use new @ escapes consistently. Represent brackets with @{ and @}
1541 rather than @<:@ and @:>@, since this works a bit better with dumb
1542 editors like vi. Represent @ with @@, since @ is now consistently
1543 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1544 __ofile__, to avoid unexpected expansions. Similarly, use @output
1545 rather than #output.
1546
1547 * data/c.m4 (b4_copyright): Omit file name from comment, since
1548 the file name could contain "*/".
1549 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1550 be quoted. All uses changed.
1551
1552 * data/glr.c: Use new @ escapes consistently.
1553 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1554 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1555 Remove, since they couldn't handle arbitrary characters in file
1556 names.
1557 * data/lalr1.cc: Likewise.
1558 * data/yacc.c: Likewise.
1559
1560 * src/files.c (output_infix): Remove; all uses removed.
1561 * src/files.h: Likewise.
1562
1563 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1564 mishandled funny characters in file names, and anyway it isn't
1565 needed any more.
1566 * data/yacc.c: Likewise.
1567 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1568
1569 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1570 * data/yacc.c: Likewise.
1571
1572 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1573 strings now.
1574 (muscle_init): Quote filename as a C string.
1575 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1576 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1577 * src/output.c (escaped_file_name_output): New function.
1578 (prepare_symbols): Quote tokens for M4.
1579 (prepare): Don't insert output_infix, output_prefix,
1580 output_parser_name, output_header_name; this is now down by scan-skel.
1581 Insert skeleton as a C string.
1582
1583 * src/output.c (user_actions_output, symbol_destructors_output,
1584 symbol_printers_output): Quote filenames for C and M4.
1585 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1586
1587 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1588 escapes other than \\ and \'; this simplifies the code.
1589 (<SC_STRING>): Likewise, for \\ and \".
1590 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1591 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1592 Use new escapes @{ and @} for [ and ].
1593
1594 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1595 them with auto vars.
1596 Switch to new escape scheme, where @ is the escape character uniformly.
1597 Abort if a stray escape character is found. Avoid unbounded input
1598 buffer when parsing non-escaped text.
1599
1600 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1601 __oline__, #output, $@, and @{ do not have unintended meanings.
1602
acea4f3b
PE
16032002-11-09 Paul Eggert <eggert@twinsun.com>
1604
1605 Fix the test failure due to GCC warnings described in
e3aa65c5 1606 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
1607 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1608 evaluate to 0 if it's impossible for NINF to be in the respective
1609 table.
1610 (yygetLRActions, yyrecoverParseError): Use them.
1611
1612 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1613 counted in the token inserted at end of file. Now takes
1614 location_t *, not location_t, so that the location can be
1615 adjusted. All uses changed.
1616
1617 * tests/regression.at (Invalid inputs): Adjust wording in
1618 diagnostic to match the new behavior.
1619
1620 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1621 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1622 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1623 abort ();'. This reduces the runtime of the "Many lookaheads"
1624 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1625 GCC 3.2.
1626
20ef1ad5
PE
16272002-11-07 Paul Eggert <eggert@twinsun.com>
1628
1629 * src/parse-gram.y (CHARACTER): Remove unused token.
1630 All uses removed.
1631
1632 * src/scan-gram.l: Remove stack option. We no longer use the
1633 stack, since the stack was never deeper than 1; instead, use the
1634 new auto var c_context to record the stacked value.
1635
1636 Remove nounput option. At an unexpected end of file, we now unput
1637 the minimal input necessary to end cleanly; this simplifies the
1638 code.
1639
1640 Avoid unbounded token sizes where this is easy.
1641
1642 (unexpected_end_of_file): New function.
1643 Use it to systematize the error message on unexpected EOF.
1644 (last-string): Now auto, not static.
1645 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1646 (scanner_last_string_free): Remove; not used.
1647 (percent_percent_count): Move decl to just before use.
1648 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1649 not the (never otherwised-used) CHARACTER.
1650
93724f13
AD
16512002-11-07 Akim Demaille <akim@epita.fr>
1652
1653 Let yyerror always receive the msg as last argument, so that
1654 yyerror can be variadic.
1655
1656 * data/yacc.c (b4_yyerror_args): New.
1657 Use it when calling yyerror.
1658 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1659 Use it when calling yyerror.
1660 * doc/bison.texinfo (Error Reporting): Adjust.
1661 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1662 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1663
6e40b4eb
AD
16642002-11-06 Akim Demaille <akim@epita.fr>
1665
1666 #line should have quoted strings.
1667 Ideally, this should be done by m4_quotearg.
1668
1669 * src/scan-skel.l: Include quotearg.h.
1670 Quote __ofile__.
1671 * src/output.c (symbol_printers_output)
1672 (symbol_destructors_output): Quote the file name.
1673
2dfbfc12
AD
16742002-11-06 Akim Demaille <akim@epita.fr>
1675
1676 * tests/regression.at (Invalid inputs): Adjust to the recent
1677 messages.
1678
437c2d80
AD
16792002-11-06 Akim Demaille <akim@epita.fr>
1680
1681 Restore --no-lines.
1682 Reported by Jim Kent.
1683
1684 * data/c.m4 (b4_syncline): New.
1685 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1686 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1687 * src/output.c (user_actions_output): Likewise.
1688 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 1689 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 1690
900c5db5
AD
16912002-11-06 Akim Demaille <akim@epita.fr>
1692
1693 * src/main.c (main): Free `infile'.
1694 * src/scan-gram.l (handle_syncline): New.
1695 Recognize `#line'.
1696 * src/output.c (user_actions_output, symbol_destructors_output)
1697 (symbol_printers_output): Use the location's file name, not
1698 infile.
1699 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1700
e183b123 17012002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 1702
e183b123 1703 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 1704 either has GLR conflict entries.
e183b123 1705
193eb6b7
PE
17062002-11-05 Paul Eggert <eggert@twinsun.com>
1707
e183b123
PE
1708 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1709 "integer out of range" rather than "invalid value".
1710 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1711 accordingly.
1712
193eb6b7
PE
1713 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1714 Also, remove one static variable in the scanner.
1715
1716 * src/scan-gram.l (braces_level): Now auto, not static.
1717 Initialize to zero if the compiler is being picky.
1718 (INITIAL): Clear braces_level instead of incrementing it.
1719 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1720 as POSIX 1003.1-2001 requires.
1721 * src/system.h (IF_LINT): New macro, taken from coreutils.
1722 * configure.ac: Define "lint" if --enable-gcc-warnings.
1723
29c01725
AD
17242002-11-05 Akim Demaille <akim@epita.fr>
1725
1726 * src/scan-gram.l: When it starts with `%', complain about the
1727 whole directive, not just that `invalid character: %'.
1728
8aeac3ca
AD
17292002-11-04 Akim Demaille <akim@epita.fr>
1730
1731 * Makefile.maint: Update from Autoconf.
1732 (update, cvs-update, po-update, do-po-update): New.
1733
793a58bb
AD
17342002-11-04 Akim Demaille <akim@epita.fr>
1735
1736 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1737 and yyerror.
1738 Have yyerror `use' its arguments.
1739 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1740 returns true when location & yacc & pure & parse-param.
1741 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1742
c4d720cd
AD
17432002-11-04 Akim Demaille <akim@epita.fr>
1744
1745 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1746 clashes.
1747 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1748 font-lock-mode.
1749 Use complain_at.
1750 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1751 slot 0.
1752
613a0dc5
PE
17532002-11-03 Paul Eggert <eggert@twinsun.com>
1754
1755 * src/reader.c (get_merge_function, grammar_current_rule_check):
1756 Use consistent diagnostics for reporting type name clashes.
1757 Quote the types with <>, for consistency with Yacc.
1758 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1759
2a8d363a
AD
17602002-11-03 Akim Demaille <akim@epita.fr>
1761
1762 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1763 New.
1764 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1765 (b4_parse_param): Remove.
1766 Use b4_identification.
1767 Propagate b4_pure_args where needed to pass them to yyerror.
1768 * data/glr.m4 (b4_parse_param): Remove.
1769 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1770 (b4_lpure_formals): New.
1771 Use b4_identification.
1772 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1773 b4_user_formals and b4_user_args.
1774 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1775 (yyreportAmbiguity): When using a pure parser, also need
1776 the location, and the parse-params.
1777 Adjust callers.
1778 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1779 When using a pure parser, also need the parse-params.
1780 Adjust callers.
1781 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1782 (%pure-parser + %parse-param) LALR and GLR parsers.
1783 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1784 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1785 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1786 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1787 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1788 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1789 * doc/bison.texinfo: Untabify the whole file.
1790 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1791 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1792 (Error Reporting): Adjust to these new directives.
1793 Document %error-verbose, deprecate YYERROR_VERBOSE.
1794
9e32add8
AD
17952002-11-03 Akim Demaille <akim@epita.fr>
1796
1797 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1798 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1799 command line options.
1800 * tests/cxx-type.at: Formatting changes.
1801
b02d90a5
PE
18022002-11-03 Paul Eggert <eggert@twinsun.com>
1803
1804 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1805 to count columns correctly, and to check for invalid inputs.
9e32add8 1806
b02d90a5
PE
1807 Use mbsnwidth to count columns correctly. Account for tabs, too.
1808 Include mbswidth.h.
1809 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1810 (extend_location): New function.
1811 (YY_LINES): Remove.
1812
1813 Handle CRLF in C code rather than in Lex code.
1814 (YY_INPUT): New macro.
1815 (no_cr_read): New function.
1816
1817 Scan UCNs, even though we don't fully handle them yet.
1818 (convert_ucn_to_byte): New function.
1819
1820 Handle backslash-newline correctly in C code.
1821 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1822 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1823 all uses changed.
1824 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1825 Use {splice} wherever C allows backslash-newline.
1826 YY_STEP after space, newline, vertical-tab.
1827 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 1828
b02d90a5
PE
1829 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1830
1831 ({int}, handle_action_dollar, handle_action_at): Check for integer
1832 overflow.
9e32add8 1833
b02d90a5
PE
1834 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1835
1836 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1837 as well as \000. Check for UCHAR_MAX, not 255.
1838 Allow \x with an arbitrary positive number of digits, as in C.
1839 Check for overflow here.
1840 Allow \? and UCNs, for compatibility with C.
1841
1842 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1843 with quote slot used by complain_at.
1844
1845 * tests/input.at: Add tests for backslash-newline, m4 quotes
1846 in symbols, long literals, and funny escapes in strings.
1847
1848 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1849 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1850 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1851 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1852 * m4/mbswidth.m4: New file, from GNU coreutils.
1853
1854 * doc/bison.texinfo (Grammar Outline): Document // comments.
1855 (Symbols): Document that trigraphs have no special meaning in Bison,
1856 nor is backslash-newline allowed.
1857 (Actions): Document that trigraphs have no special meaning.
1858
1859 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1860 no longer used.
1861
18622002-11-02 Paul Eggert <eggert@twinsun.com>
1863
1864 * src/reader.c: Don't include quote.h; not needed.
1865 (get_merge_function): Reword warning to be consistent with
1866 type clash diagnostic in grammar_current_rule_check.
1867
1868 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1869 bug in trigraph handling.
1870
1871 * src/output.c (prepare_symbols): When printing token names,
1872 escape "[" as "@<:@" and likewise for "]".
1873
1874 * src/system.h (errno): Remove declaration, as we are now
1875 assuming C89 or better, and C89 guarantees errno.
1876
762b212b
PE
18772002-10-30 Paul Eggert <eggert@twinsun.com>
1878
1879 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1880 Check for close failures.
1881 * src/files.h (xfclose): Return void, not int, since it always
1882 returned zero.
1883 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1884 indicates one.
1885 * src/output.c (output_skeleton): Use xfclose rather than fclose
1886 and ferror. xfclose now checks ferror.
1887
1888 * data/glr.c (YYLEFTMOST_STATE): Remove.
1889 (yyreportTree): Use a stack-based leftmost state. This avoids
1890 our continuing battles with bogus warnings about initializers.
1891
56100c60
AD
18922002-10-30 Akim Demaille <akim@epita.fr>
1893
1894 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1895 #if.
1896
51b4a04c
PH
18972002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1898
1899 * tests/glr-regr1.at: New test for reported regressions.
1900 * tests/testsuite.at: Add glr-regr1.at test.
1901 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 1902
bf1ebda2
PE
19032002-10-24 Paul Eggert <eggert@twinsun.com>
1904
5c16c6b1
PE
1905 Version 1.75a.
1906
bf1ebda2
PE
1907 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1908 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1909 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1910 Don't assume strdup exists; POSIX says its an XSI extension.
1911 Check for buffer overflow on input.
1912
b526ee61
AD
19132002-10-24 Akim Demaille <akim@epita.fr>
1914
1915 * src/output.c (output_skeleton): Don't disable M4sugar comments
1916 too soon: it results in comments being expanded.
1917 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1918 first output.
1919
f1886bb2
AD
19202002-10-24 Akim Demaille <akim@epita.fr>
1921
1922 * data/yacc.c (m4_int_type): New.
1923 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1924 char' as only yacc.c wants K&R portability.
1925 * data/glr.c (yysigned_char): Remove.
1926 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1927 Reported by Quoc Peyrot.
1928
c5576256
PE
19292002-10-23 Paul Eggert <eggert@twinsun.com>
1930
1931 * src/main.c (main): With --trace=time, report times even if a
1932 non-fatal error occurs. Formerly, the times were reported in some
1933 such cases but not in others.
1934 * src/reader.c (reader): Just return if a complaint has been issued,
1935 instead of exiting, so that 'main' can report times.
1936
27b0ffea
AD
19372002-10-22 Akim Demaille <akim@epita.fr>
1938
1939 * src/system.h: Include sys/types.
1940 Reported by Bert Deknuydt.
1941
223a7883
PE
19422002-10-23 Paul Eggert <eggert@twinsun.com>
1943
1944 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1945 Suggested by Art Haas.
1946
19472002-10-22 Paul Eggert <eggert@twinsun.com>
1948
1949 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1950 decl; not needed any more.
1951 * src/main.c (main): Use return to exit, undoing yesterday's change.
1952 The last OS that we could find where this wouldn't work is
1953 SunOS 3.5, and that's too old to worry about now.
1954
1955 * data/glr.c (struct yyltype): Define members even when not
1956 doing locations. This is more consistent with yacc.c, and it
1957 works around the following bug reports:
e3aa65c5
PE
1958 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
1959 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 1960
223a7883
PE
1961 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1962 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1963 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1964
8b76775a
AD
19652002-10-22 Akim Demaille <akim@epita.fr>
1966
1967 * data/README: New.
1968
6db10d14
PE
19692002-10-21 Paul Eggert <eggert@twinsun.com>
1970
1971 Be consistent about 'bool'; the old code used an enum in one
1972 module and an int in another, and this violates the C standard.
1973 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1974 * configure.ac (AC_HEADER_STDBOOL): Add.
1975 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1976 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1977 * src/symtab.c (hash_compare_symbol_t): Likewise.
1978 * src/system.h (bool, false, true): Use a definition consistent
1979 with ../lib/hash.c. All uses changed.
1980
1981 * src/complain.c (warning_issued): Renamed from warn_message_count,
1982 so that we needn't worry about integer overflow (!).
1983 Now of type bool. All uses changed.
1984 (complaint_issued): Renamed from complain_message_count; likewise.
1985
1986 * src/main.c (main): Use exit to exit with failure.
27b0ffea 1987
6db10d14
PE
1988 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
1989 rather than 1 and 0.
1990 * src/main.c (main): Likewise.
1991 * src/getargs.c (getargs): Likewise.
1992 * src/reader.c (reader): Likewise.
1993
1994 * src/getarg.c (getargs): Remove duplicate code for
1995 "Try `bison --help'".
1996
1997 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
1998 What was that "2" for?
1999
2000 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2001 * src/getargs.c (usage): Likewise.
2002
2003 * src/getargs.c (getargs): When there are too few operands, report
2004 the last one. When there are too many, report the first extra
2005 one. This is how diffutils does it.
2006
92a060fd
PE
20072002-10-20 Paul Eggert <eggert@twinsun.com>
2008
2009 Remove K&R vestiges.
2010 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2011 * src/complain.c (VA_START): Remove. Assume prototypes.
2012 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2013 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2014 fatal): Assume prototypes.
2015 * src/complain.h: Assume prototypes.
2016 * src/system.h (PARAMS): Remove.
2017 Include <limits.h> unconditionally, since it's guaranteeed even
2018 for a freestanding C89 compiler.
2019 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2020 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 2021
e7cb57c0
AD
20222002-10-20 Akim Demaille <akim@epita.fr>
2023
2024 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2025 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2026 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2027 (yyresolveStates, yyresolveAction, yyresolveStack)
2028 (yyprocessOneStack): Use them.
2029 (yy_reduce_print): New.
2030 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2031
0245f82d
AD
20322002-10-20 Akim Demaille <akim@epita.fr>
2033
2034 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2035 arguments and output `void'.
2036 (b4_c_function): Rename as...
2037 (b4_c_function_def): this.
2038 (b4_c_function_decl, b4_c_ansi_function_def)
2039 (b4_c_ansi_function_decl): New.
2040 Change the interpretation of the arguments: before `int, foo', now
2041 `int foo, foo'.
2042 * data/yacc.c (yyparse): Prototype and define thanks to these.
2043 Adjust b4_c_function_def uses.
2044 * data/glr.c (yyparse): Likewise, but ANSI only.
2045
39912f52
AD
20462002-10-20 Akim Demaille <akim@epita.fr>
2047
2048 * src/output.c (prepare): Move the definition of `tokens_number',
2049 `nterms_number', `undef_token_number', `user_token_number_max'
2050 to...
2051 (prepare_tokens): Here.
2052 (prepare_tokens): Rename as...
2053 (prepare_symbols): this.
2054 (prepare): Move the definition of `rules_number' to...
2055 (prepare_rules): here.
2056 (prepare): Move the definition of `last', `final_state_number',
2057 `states_number' to...
2058 (prepare_states): here.
2059 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2060
20c1e2ad
AD
20612002-10-20 Akim Demaille <akim@epita.fr>
2062
2063 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2064
21964f43
AD
20652002-10-20 Akim Demaille <akim@epita.fr>
2066
2067 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2068 * data/c.m4: here.
2069
66d30cd4
AD
20702002-10-20 Akim Demaille <akim@epita.fr>
2071
2072 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2073 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2074 `pair'.
2075 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2076 `name' to...
2077 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2078 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2079 These.
2080
95f2c9fe
PE
20812002-10-19 Paul Eggert <eggert@twinsun.com>
2082
2083 Do not create a temporary file, as that involves security and
2084 cleanup headaches. Instead, use a pair of pipes.
2085 Derived from a suggestion by Florian Krohm.
2086 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2087 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2088 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2089 (BISON_PREREQ_SUBPIPE): Add.
2090 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2091 Add subpipe.h, subpipe.c.
2092 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2093 * po/POTFILES.in: Add lib/subpipe.c.
2094 * src/output.c: Include "subpipe.h".
2095 (m4_invoke): Remove decl.
2096 (scan_skel): New decl.
2097 (output_skeleton): Use pipe rather than temporary file for m4 input.
2098 Check that m4sugar.m4 is readable, to avoid deadlock.
2099 Check for pipe I/O error.
2100 * src/scan-skel.l (readpipe): Remove decl.
2101 (scan_skel): New function, to be used in place of m4_invoke.
2102 Read from stream rather than file.
66d30cd4 2103
95f2c9fe
PE
2104 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2105 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2106 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2107 this generates a more-accurate value anyway.
2108
2109 * lib/timevar.c (timervar_accumulate): Rename locals to
2110 avoid confusion with similarly-named more-global.
2111 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2112
2113 * src/output.c (prepare): Use xstrdup to convert char const *
2114 to char *, to avoid GCC warning.
2115
c19988b7
AD
21162002-10-19 Akim Demaille <akim@epita.fr>
2117
2118 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2119 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2120 Use them to have `calc.y' ready for %pure-parser.
2121 * data/yacc.c (YYLEX): Pass a yylex return type to
2122 b4_c_function_call.
2123
ae7453f2
AD
21242002-10-19 Akim Demaille <akim@epita.fr>
2125
2126 Prototype support of %lex-param and %parse-param.
2127
2128 * src/parse-gram.y: Add the definition of the %lex-param and
2129 %parse-param tokens, plus their rules.
2130 Drop the `_' version of %glr-parser.
2131 Add the "," token.
2132 * src/scan-gram.l (INITIAL): Scan them.
2133 * src/muscle_tab.c: Comment changes.
2134 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2135 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2136 (muscle_entry_s): The `value' member is no longer const.
2137 Adjust all dependencies.
2138 * src/muscle_tab.c (muscle_init): Adjust: use
2139 MUSCLE_INSERT_STRING.
2140 Initialize the obstack earlier.
2141 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2142 (muscle_pair_list_grow): New.
2143 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2144 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2145 * tests/calc.at: Use %locations, not --locations.
2146 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2147
0e575721
AD
21482002-10-19 Akim Demaille <akim@epita.fr>
2149
2150 * src/getargs.c (usage): Take status as argument and exit
2151 accordingly.
2152 Report the traditional `Try ... --help' message when status != 0.
2153 (usage, version): Don't take a FILE * as arg, it is pointless.
2154 (getargs): When there is an incorrect number of arguments, make it
2155 an error, and report it GNUlically thanks to `usage ()'.
2156
724ce7f5
PE
21572002-10-18 Paul Eggert <eggert@twinsun.com>
2158
3a781eb2
PE
2159 * data/glr.c (yyreportParseError): Don't assume that sprintf
2160 yields the length of the printed string, as this is not true
2161 on SunOS 4.1.4. Reported by Peter Klein.
2162
724ce7f5
PE
2163 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2164 * tests/conflicts.at (%nonassoc and eof): Likewise.
2165 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2166
473d0a75
AD
21672002-10-17 Akim Demaille <akim@epita.fr>
2168
2169 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2170 * src/getargs.c (trace_types, trace_args): Adjust.
2171 * src/reader.c (grammar_current_rule_prec_set)
2172 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2173 Standardize error messages.
2174 And s/@prec/%prec/!
2175 (reader): Use trace_flag to enable scanner/parser debugging,
2176 instead of an adhoc scheme.
2177 * src/scan-gram.l: Remove trailing debugging code.
2178
e76d2469
PE
21792002-10-16 Paul Eggert <eggert@twinsun.com>
2180
93e2236a
PE
2181 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2182 MUSCLE_TAB_H.
2183
e76d2469
PE
2184 * NEWS: Officially drop support for building Bison with K&R C,
2185 since it didn't work anyway and it's not worth worrying about.
2186 * Makefile.maint (wget_files): Remove ansi2knr.c.
2187 (ansi2knr.c-url_prefix): Remove.
2188 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2189 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2190 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2191
5bd1c419
PE
21922002-10-15 Paul Eggert <eggert@twinsun.com>
2193
2194 Stop using the "enum_" trick for K&R-style function definitions;
2195 it confused me, and I was the author! Instead, assume that people
2196 who want to use K&R C compilers (when using these modules in GCC,
2197 perhaps?) will run ansi2knr.
2198
2199 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2200 All uses of "enum_" changed to "enum ".
2201 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2202 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 2203
5bd1c419
PE
2204 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2205 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2206 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2207 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2208 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2209 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2210 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2211 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2212 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2213 Use function prototypes; this removes the need for declaring
2214 static functions simply to provide their prototypes.
2215 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2216 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2217 bitset_count_, bitset_create, bitset_dump, bitset_first,
2218 bitset_free, bitset_init, bitset_last, bitset_next,
2219 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2220 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2221 bitset_print, bitset_release_memory, bitset_toggle_,
2222 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2223 debug_bitset): Likewise.
2224 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2225 * lib/bitset_stats.c (bitset_log_histogram_print,
2226 bitset_percent_histogram_print, bitset_stats_and,
2227 bitset_stats_and_cmp, bitset_stats_and_or,
2228 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2229 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2230 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2231 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2232 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2233 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2234 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2235 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2236 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2237 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2238 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2239 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2240 bitset_stats_zero): Likewise.
2241 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2242 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2243 bitsetv_dump, debug_bitsetv): Likewise.
2244 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2245 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2246 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2247 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2248 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2249 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2250 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2251 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2252 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2253 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2254 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2255 Likewise.
2256 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2257 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2258 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2259 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2260 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2261 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2262 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2263 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2264 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2265 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2266 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 2267
ae26e1f0
AD
22682002-10-14 Akim Demaille <akim@epita.fr>
2269
2270 Version 1.75.
2271
d43baf71
AD
22722002-10-14 Akim Demaille <akim@epita.fr>
2273
2274 * tests/Makefile.am (maintainer-check-posix): New.
2275
7ebc83e3
AD
22762002-10-14 Akim Demaille <akim@epita.fr>
2277
2278 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2279 member.
2280
05846dae
AD
22812002-10-14 Akim Demaille <akim@epita.fr>
2282
2283 * src/tables.c (table_ninf_remap): base -> tab.
2284 Reported by Matt Rosing.
2285
1318e37d
PE
22862002-10-14 Paul Eggert <eggert@twinsun.com>
2287
447fbb17
PE
2288 * tests/action.at, tests/calc.at, tests/conflicts.at,
2289 tests/cxx-type.at, tests/headers.at, tests/input.at,
2290 tests/regression.at, tests/synclines.at, tests/torture.at:
2291 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2292 so that the tests still work even if POSIXLY_CORRECT is set.
2293 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 2294
1318e37d
PE
2295 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2296 for portability to K&R hosts. Fix typo: signed char is guaranteed
2297 only to 127, not to 128.
2298 * data/glr.c (yysigned_char): New type.
2299 * data/yacc.c (yysigned_char): Likewise.
2300 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2301
cc0f0794
PE
23022002-10-13 Paul Eggert <eggert@twinsun.com>
2303
5038f418
PE
2304 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2305 true due to limited range of data type" warning from GCC.
2306
cc0f0794
PE
2307 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2308 by wrapping enum yytokentype's definition inside #ifndef
2309 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2310
6fed0802
AD
23112002-10-13 Akim Demaille <akim@epita.fr>
2312
2313 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2314 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2315
32f0598d
AD
23162002-10-13 Akim Demaille <akim@epita.fr>
2317
2318 * Makefile.maint: Update from Autoconf 2.54.
2319 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2320
7ea9a33f
AD
23212002-10-13 Akim Demaille <akim@epita.fr>
2322
2323 * src/print.c (print_state): Separate the list of solved conflicts
2324 from the other items.
2325 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2326
ea99527d
AD
23272002-10-13 Akim Demaille <akim@epita.fr>
2328
2329 Let nondeterministic skeletons be usable with deterministic
2330 tables.
2331
2332 With the patch, GAWK compiled by GCC without -O2 passes its test
2333 suite using a GLR parser driven by LALR tables. It fails with -O2
2334 because `struct stat' gives two different answers on my machine:
2335 88 (definition of an auto var) and later 96 (memset on this var).
2336 Hence the stack is badly corrumpted. The headers inclusion is to
2337 blame: if I move the awk.h inclusion before GLR's system header
2338 inclusion, the two struct stat have the same size.
2339
2340 * src/tables.c (pack_table): Always create conflict_table.
2341 (token_actions): Always create conflict_list.
2342 * data/glr.c (YYFLAG): Remove, unused.
2343
f377f69f
AD
23442002-10-13 Akim Demaille <akim@epita.fr>
2345
2346 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2347 (O0FLAGS): New.
2348 (VALGRIND, GXX): New.
2349 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2350 * tests/bison.in: Run $PREBISON a pre-command.
2351 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2352 (maintainer-check-g++): New.
2353 * Makefile.am (maintainer-check): New.
2354
2a1fe6ed
AD
23552002-10-13 Akim Demaille <akim@epita.fr>
2356
2357 * data/glr.c: Formatting changes.
2358 Tweak some trace messages to match yacc.c's.
2359
f50adbbd
AD
23602002-10-13 Akim Demaille <akim@epita.fr>
2361
2362 GLR parsers sometimes raise parse errors instead of performing the
2363 default reduction.
2364 Reported by Charles-Henry de Boysson.
2365
2366 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2367 check the length of the traces when %glr.
2368 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2369 GLR's traces.
2370 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2371 Test GLR parsers.
2372 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2373 (yyltype): Remove the yy prefix from the member names.
2374 (yytable): Complete its comment.
2375 (yygetLRActions): Map error action number from YYTABLE from
2376 YYTABLE_NINF to 0.
2377 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2378 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2379 not satisfying as we could compare an YYACTION computed from
2380 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2381 only value for error actions.
2382 (yyreportParseError): In verbose parse error messages, don't issue
2383 `error' in the list of expected tokens.
2384 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2385 next action to perform to match glr.c's decoding.
2386 (yytable): Complete its comment.
2387
bcbad5b9
PE
23882002-10-13 Paul Eggert <eggert@twinsun.com>
2389
2390 Fix problem reported by Henrik Grubbstroem in
e3aa65c5 2391 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
2392 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2393 because the Bison parser reads the second action before reducing
2394 the first one.
2395 * src/scan-gram.l (rule_length): New static var.
2396 Use it to keep track of the rule length in the scanner, since
2397 we can't expect the parser to be in lock-step sync with the scanner.
2398 (handle_action_dollar, handle_action_at): Use this var.
2399 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 2400
14904b89
PE
24012002-10-12 Paul Eggert <eggert@twinsun.com>
2402
1fe611e5
PE
2403 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2404 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2405 Include <sys/time.h> when checking for clock_t and struct tms.
2406 Use same include order as source.
2407 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
e3aa65c5 2408 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 2409
1fe611e5
PE
2410 * lib/timevar.c: Update copyright date and clarify comments.
2411 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 2412
1fe611e5
PE
2413 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2414 GCC version as of today, then merge Bison's changes.
2415 Change "GCC" to "Bison" in copyright notice. timevar.def's
2416 author is Akim, so change that too.
2417
98194095
PE
2418 * src/reader.c (grammar_current_rule_check):
2419 Don't worry about the default action if $$ is untyped.
2420 Prevents bogus warnings reported by Jim Gifford in
e3aa65c5 2421 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 2422
14904b89
PE
2423 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2424 * data/glr.c, data/lalr1.cc, data/yacc.c:
2425 Output token definitions before the first part of user declarations.
2426 Fixes compatibility problem reported by Jim Gifford for kbd in
e3aa65c5 2427 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 2428
ff6dca18
PE
24292002-10-11 Paul Eggert <eggert@twinsun.com>
2430
2431 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2432 (yyparse): here. This undoes some of the 2002-07-25 change.
2433 Compatibility problem reported by Ralf S. Engelschall with
2434 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2435
eb714592
AD
24362002-10-11 Akim Demaille <akim@epita.fr>
2437
2438 * tests/regression.at Characters Escapes): New.
2439 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2440 characters.
2441 Reported by Jan Nieuwenhuizen.
2442
b7195100
AD
24432002-10-11 Akim Demaille <akim@epita.fr>
2444
2445 * po/id.po: New.
2446
f28a0f2d
PE
24472002-10-10 Paul Eggert <eggert@twinsun.com>
2448
2449 Portability fixes for bitsets; this also avoids several GCC
2450 warnings.
2451
2452 * lib/abitset.c: Include <stddef.h>, for offsetof.
2453 * lib/lbitset.c: Likewise.
2454
2455 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2456 properly for vectors of objects. Do not assume that adding a
2457 header size to a multiple of a word size yields a value that is
2458 properly aligned for the whole union.
2459 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2460
2461 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2462 unique names for structures.
2463 * lib/ebitset.c (ebitset_bytes): Likewise.
2464 * lib/lbitset.c (lbitset_bytes): Likewise.
2465
2466 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2467 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2468 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2469 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2470 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2471 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2472 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2473 to improve the type-checking that GCC can do.
2474 * lib/bitset.c (bitset_op4_cmp): Likewise.
2475 * lib/bitset_stats.c (bitset_stats_count,
2476 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2477 bitset_stats_copy, bitset_stats_disjoint_p,
2478 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2479 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2480 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2481 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2482 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2483 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2484 bitset_stats_or_and_cmp): Likewise.
2485 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2486 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2487 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2488 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2489
2490 * lib/abitset.h: Include bitset.h, not bbitset.h.
2491 * lib/ebitset.h: Likewise.
2492 * lib/lbitset.h: Likewise.
2493
2494 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2495 All instances of parameters of type enum bitset_opts are now of
2496 type enum_bitset_opts, to conform to the C Standard, and similarly
2497 for enum_bitset_type.
2498 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2499 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2500
2501 Do not use "struct bitset_struct" to mean different things in
2502 different modules. Not only is this confusing, it violates
2503 the C Standard, which requires that structure types in different
2504 modules must be compatible if one is to be passed to the other.
2505 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2506 All instances of "struct bitset_struct *" replaced with "bitset".
2507 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2508 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2509 struct lbitset_struct, struct bitset_stats_struct): New types.
2510 All uses of struct bitset_struct changed to union bitset_union,
2511 etc.
2512 * lib/abitset.c (struct abitset_struct, abitset,
2513 struct bitset_struct): Remove.
2514 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2515 struct bitset_struct): Remove.
2516 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2517 bitset_struct): Remove.
2518 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2519 Likewise.
2520
2521 Do not call a function of type T using a call that assumes the
2522 function is of a different type U. Standard C requires that a
2523 function must be called with a type that is compatible with its
2524 definition.
2525 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2526 New decls.
2527 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2528 New functions.
2529 * lib/ebitset.c (PFV): Remove.
2530 * lib/lbitset.c (PFV): Likewise.
2531 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2532 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2533 decls.
2534 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2535 (ebitset_vtable): Use them.
2536 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2537 lbitset_xor): New functions.
2538 (lbitset_vtable): Use them.
2539
2540 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2541 Declare.
2542
2543 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2544 GCC warning.
2545 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2546 Use offsetof, for simplicity.
2547
6fbe4984
PE
25482002-10-06 Paul Eggert <eggert@twinsun.com>
2549
2550 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2551 the same width as int. This reapplies a hunk of the 2002-08-12 patch
e3aa65c5 2552 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
2553 which was inadvertently undone by the 2002-09-30 patch.
2554 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2555 the same width as int.
2556
420f93c8
PE
25572002-10-04 Paul Eggert <eggert@twinsun.com>
2558
2559 Version 1.50.
2560
2561 * configure.ac (AC_INIT), NEWS: Increment version number.
2562
2563 * doc/bison.texinfo: Minor spelling, grammar, and white space
2564 fixes.
2565 (Symbols): Mention that any negative value returned from yylex
2566 signifies end-of-input. Warn about negative chars. Mention
2567 the portable Standard C character set.
2568
2569 The GNU coding standard says CFLAGS and YFLAGS are reserved
2570 for the installer to set.
2571 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2572 * src/Makefile.am (AM_CFLAGS): Likewise.
2573 (AM_YFLAGS): Renamed from YFLAGS.
2574
2575 Fix some MAX and MIN problems.
2576 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2577 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2578 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2579 * src/reader.c (reader): Use it.
2580
2581 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2582 POSIX 1003.1-2001 has removed fgrep.
2583
25842002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2585
2586 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2587 interpreted as signed.
2588 * lib/ebitset.c (ebitset_list): Fix bug.
2589
ff68026d
PE
25902002-10-01 Paul Eggert <eggert@twinsun.com>
2591
2592 More fixes for 64-bit hosts and large bitsets.
2593
2594 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2595 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2596 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2597 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2598 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2599 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2600 bitset_count_): Likewise.
2601 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2602 bitset_first, bitset_last): Likewise.
2603 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2604 bitset_stats_list_reverse, bitset_stats_size,
2605 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2606 Likewise.
2607 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2608 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2609 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2610 bitsetv_reflexive_transitive_closure): Likewise.
2611 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2612 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2613 Likewise.
2614 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2615 Likewise.
420f93c8 2616
ff68026d
PE
2617 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2618 Use size_t, not unsigned int, to count bytes.
2619 * lib/abitset.h (abitset_bytes): Likewise.
2620 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2621 Likewise.
2622 * lib/bitset.h (bitset_bytes): Likewise.
2623 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2624 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2625 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2626 * lib/ebitset.c (ebitset_bytes): Likewise.
2627 * lib/ebitset.h (ebitset_bytes): Likewise.
2628 * lib/lbitset.c (lbitset_bytes): Likewise.
2629 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 2630
ff68026d
PE
2631 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2632 abitset_subset_p, abitset_disjoint_p, abitset_and,
2633 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2634 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2635 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2636 abitset_or_and, abitset_or_and_cmp):
2637 Use bitset_windex instead of unsigned int.
2638 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2639 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2640 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2641 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2642 Likewise.
2643 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 2644
ff68026d
PE
2645 * lib/bitset.c (bitset_print):
2646 Use proper printf formats for widths of integer types.
2647 * lib/bitset_stats.c (bitset_percent_histogram_print,
2648 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2649 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2650 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2651 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 2652
ff68026d
PE
2653 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2654 BITSET_SIZE_MAX): New macros.
2655 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2656 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2657 to BITSET_WINDEX_MAX.
2658
2659 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2660 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2661 since we now return the bitset_bindex type (not int).
2662
2663 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2664 when computing sizes.
2665 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2666
2667 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2668 and avoid cast to unsigned.
2669
6aa452a6
AD
26702002-09-30 Akim Demaille <akim@epita.fr>
2671
2672 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2673 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2674 Updates from Michael Hayes.
2675
927f7817
AD
26762002-09-30 Art Haas <ahaas@neosoft.com>
2677
2678 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2679 invocations.
2680 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2681 defined.
2682
9738f41e
AD
26832002-09-27 Akim Demaille <akim@epita.fr>
2684
2685 Version 1.49c.
2686
a5c75d7f
AD
26872002-09-27 Akim Demaille <akim@epita.fr>
2688
2689 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2690 (Because of AC_LIBSOURCE).
2691
8280e179
AD
26922002-09-27 Akim Demaille <akim@epita.fr>
2693
2694 Playing with Autoscan.
2695
2696 * configure.ac: Remove the old LIBOBJ tweaks.
2697 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2698 * lib/strrchr.c: New.
2699 * lib/strtol.c: New, from the Coreutils 4.5.1.
2700
ae64af35
AD
27012002-09-27 Akim Demaille <akim@epita.fr>
2702
2703 Playing with Autoscan.
2704
2705 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2706 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2707 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2708 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2709 Coreutils 4.5.1.
2710
d1a1114f
AD
27112002-09-24 Akim Demaille <akim@epita.fr>
2712
2713 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2714 (Frequently Asked Questions, Parser Stack Overflow): New.
2715
b906441c
AD
27162002-09-13 Akim Demaille <akim@epita.fr>
2717
2718 Playing with autoscan.
2719
2720 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2721 * src/files.c (skeleton_find): Remove, unused.
2722 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2723 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2724
bd701811
AD
27252002-09-13 Akim Demaille <akim@epita.fr>
2726
2727 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2728 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2729
e0a13e7b
AD
27302002-09-13 Akim Demaille <akim@epita.fr>
2731
2732 * configure.ac: Require 2.54.
2733 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2734 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2735 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2736 Remove, provided by Autoconf macros.
2737
c97011bf
AD
27382002-09-12 Akim Demaille <akim@epita.fr>
2739
2740 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2741
d862b1be
AD
27422002-09-12 Akim Demaille <akim@epita.fr>
2743
2744 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2745 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2746 Reported by Martin Mokrejs.
2747
3d38c03a
AD
27482002-09-10 Akim Demaille <akim@epita.fr>
2749
2750 * src/parse-gram.y: Associate a human readable string to each
2751 token type.
2752 * tests/regression.at (Invalid inputs): Adjust.
2753
b6347355
AD
27542002-09-10 Gary V. Vaughan <gary@gnu.org>
2755
2756 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2757 with an Autoconf-2.5x style configure.ac.
2758
09ba4ab2
PE
27592002-09-06 Paul Eggert <eggert@twinsun.com>
2760
2761 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2762 exception applies only to yacc.c. This is a modification of a
2763 patch originally suggested by Akim Demaille.
2764
21846f69
AD
27652002-09-06 Akim Demaille <akim@epita.fr>
2766
09ba4ab2
PE
2767 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2768 here to...
2769 * data/yacc.c: here.
2770
21846f69
AD
2771 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2772 LocationType.
2773 (b4_ltype): Default to yy::Location from location.hh.
2774
c0ad8bf3
AD
27752002-09-04 Jim Meyering <jim@meyering.net>
2776
2777 * data/yacc.c: Guard the declaration of yytoknum also with
2778 `#ifdef YYPRINT', so it is declared only when used.
2779
3a93251e
AD
27802002-09-04 Akim Demaille <akim@epita.fr>
2781
2782 * configure.in: Rename as...
2783 * configure.ac: this.
2784 Bump to 1.49c.
2785
427c0dda
AD
27862002-09-04 Akim Demaille <akim@epita.fr>
2787
2788 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2789 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2790 translate maintainer only messages.
2791
6a254321
PE
27922002-08-12 Paul Eggert <eggert@twinsun.com>
2793
645e30d1
PE
2794 Version 1.49b.
2795
6a254321
PE
2796 * Makefile.am (SUBDIRS): Remove intl.
2797 (DISTCLEANFILES): Remove.
2798 * NEWS: Mention that GNU M4 is now required. Clarify what is
2799 meant by "larger grammars". Mention the pt_BR translation.
2800 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2801 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2802 Bump version from 0.11.2 to 0.11.5.
2803 (BISON_PREREQ_STAGE): Remove.
2804 (AM_GNU_GETTEXT): Use external gettext.
2805 (AC_OUTPUT): Remove intl/Makefile.
2806
2807 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2808
2809 * data/glr.c: Include string.h, for strlen.
2810 (yyreportParseError): Use size_t for yysize.
2811 (yy_yypstack): No longer nested inside yypstates, as nested
2812 functions are not portable. Do not assume size_t is the
2813 same width as int.
2814 (yypstates): Do not assume that ptrdiff_t is the same width
2815 as int, and similarly for yyposn and YYINDEX.
2816
2817 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2818
2819 * lib/Makefile.am (INCLUDES): Do not include from the intl
2820 directory, which has been removed.
2821 * src/Makefile.am (INCLUDES): Likewise.
2822
2823 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2824 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2825 New vars.
2826
2827 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2828 * tests/Makefile.am (EXTRA_DIST): Likewise.
2829
2830 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2831 Do not assume that bitset_windex is the same width as unsigned.
2832
2833 * lib/abitset.c (abitset_unused_clear): Do not assume that
2834 bitset_word is the same width as int.
2835 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2836 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2837 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2838 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2839 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2840
2841 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2842 portability to one's complement hosts!).
2843 * lib/ebitset.c (ebitset_op1): Likewise.
2844 * lib/lbitset.c (lbitset_op1): Likewise.
2845
2846 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2847 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2848 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2849 Sync with fileutils.
2850 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2851 lib/gettext.h: Sync with diffutils.
2852
2853 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2854 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2855
2856 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2857 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2858 check for void *.
2859
2860 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2861 size_t; the old version tried to do this but casted improperly.
2862 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2863 (bitset_test): Now returns int, not unsigned long.
2864
2865 * lib/bitset_stats.c: Include "gettext.h".
2866 (_): New macro.
2867 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2868 name locals "index", as it generates unnecessary warnings on some
2869 hosts that have an "index" function.
2870
2871 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2872 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2873 they need translation.
2874 * src/LR0.c (state_list_append, new_itemsets, get_state,
2875 append_states, generate_states): Likewise.
2876 * src/assoc.c (assoc_to_string): Likewise.
2877 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2878 * src/gram.c (grammar_dump): Likewise.
2879 * src/injections.c (injections_compute): Likewise.
2880 * src/lalr.c (lookaheads_print): Likewise.
2881 * src/relation.c (relation_transpose): Likewise.
2882 * src/scan-gram.l: Likewise.
2883 * src/tables.c (table_grow, pack_vector): Likewise.
2884
2885 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2886 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2887 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2888 * m4/mbstate_t.m4: Sync with fileutils.
2889 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2890
2891 * po/LINGUAS: Add pt_BR.
2892 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2893 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2894 lib/timevar.c.
2895 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2896 manual recommends.
2897 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2898
2899 * src/complain.c (strerror_r): Remove decl; not needed.
2900 (strerror): Use same pattern as ../lib/error.c.
2901
2902 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2903
2904 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2905
2906 * src/main.c (main): Cast result of bindtextdomain and textdomain
2907 to void, to avoid a GCC warning when --disable-nls is in effect.
2908
2909 * src/scan-gram.l: Use strings rather than escapes when possible,
2910 to minimize the number of warnings from xgettext.
2911 (handle_action_dollar, handle_action_at): Don't use isdigit,
2912 as it mishandles negative chars and it may not work as expected
2913 outside the C locale.
2914
2915 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2916 this is a GCC extension and is not portable to other compilers.
2917
2918 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2919 Do not include <ctype.h>; no longer needed.
2920 Do not include <malloc.h>; no longer needed (and generates
2921 warnings on OpenBSD 3.0).
2922
2923 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2924 it's not portable.
2925
2926 * tests/regression.at: Do not use 'cc -c input.c -o input';
2927 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2928
2929 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2930 exit status as failure, not just exit status 1. Sun C exits
2931 with status 2 sometimes.
2932
2933 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2934 Use it for the two large tests.
2935
c8f002c7
AD
29362002-08-02 Akim Demaille <akim@epita.fr>
2937
2938 * src/conflicts.c (conflicts_output): Don't output rules never
2939 reduced here, since anyway that computation doesn't work.
2940 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2941 (rule_useless_p, rule_never_reduced_p): New.
2942 (grammar_rules_partial_print): Use a filter instead of a range.
2943 Display the title only if needed.
2944 (grammar_rules_print): Adjust.
2945 (grammar_rules_never_reduced_report): New.
2946 * src/tables.c (action_row): Move the computation of rules never
2947 reduced to...
2948 (token_actions): here.
2949 * src/main.c (main): Make the parser before making the report, so
2950 that rules never reduced are computed.
2951 Call grammar_rules_never_reduced_report.
2952 * src/print.c (print_results): Report rules never reduced.
2953 * tests/conflicts.at, tests/reduce.at: Adjust.
2954
cd08e51e
AD
29552002-08-01 Akim Demaille <akim@epita.fr>
2956
2957 Instead of attaching lookaheads and duplicating the rules being
2958 reduced by a state, attach the lookaheads to the reductions.
2959
2960 * src/state.h (state_t): Remove the `lookaheads',
2961 `lookaheads_rule' member.
2962 (reductions_t): Add a `lookaheads' member.
2963 Use a regular array for the `rules'.
2964 * src/state.c (reductions_new): Initialize the lookaheads member
2965 to 0.
2966 (state_rule_lookaheads_print): Adjust.
2967 * src/state.h, src/state.c (state_reductions_find): New.
2968 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2969 (count_rr_conflicts): Adjust.
2970 * src/lalr.c (LArule): Remove.
2971 (add_lookback_edge): Adjust.
2972 (state_lookaheads_count): New.
2973 (states_lookaheads_initialize): Merge into...
2974 (initialize_LA): this.
2975 (lalr_free): Adjust.
2976 * src/main.c (main): Don't free nullable and derives too early: it
2977 is used by --verbose.
2978 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2979
bb0027a9
AD
29802002-08-01 Akim Demaille <akim@epita.fr>
2981
2982 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
2983 `rule_number_t**'.
2984 (set_derives, free_derives): Rename as...
2985 (derives_compute, derives_free): this.
2986 Adjust all dependencies.
2987 * src/nullable.c (set_nullable, free_nullable): Rename as...
2988 (nullable_compute, nullable_free): these.
2989 (rule_list_t): Store rule_t *, not rule_number_t.
2990 * src/state.c (state_rule_lookaheads_print): Directly compare rule
2991 pointers, instead of their numbers.
2992 * src/main.c (main): Call nullable_free, and derives_free earlier,
2993 as they were lo longer used.
2994
3325ddc4
AD
29952002-08-01 Akim Demaille <akim@epita.fr>
2996
2997 * lib/timevar.c (get_time): Include children time.
2998 * src/lalr.h (LA, LArule): Don't export them: used with the
2999 state_t.
3000 * src/lalr.c (LA, LArule): Static.
3001 * src/lalr.h, src/lalr.c (lalr_free): New.
3002 * src/main.c (main): Call it.
3003 * src/tables.c (pack_vector): Check whether loc is >= to the
3004 table_size, not >.
3005 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3006 (tables_generate): do it, since that's also it which allocates
3007 them.
3008 Don't free LA and LArule, main does.
3009
c6f1a33c
AD
30102002-07-31 Akim Demaille <akim@epita.fr>
3011
3012 Separate parser tables computation and output.
3013
3014 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3015 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3016 (yydefgoto, yydefact, high): Move to...
3017 * src/tables.h, src/tables.c: here.
3018 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3019 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3020 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3021 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3022 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3023 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3024 (action_row, save_row, token_actions, save_column, default_goto)
3025 (goto_actions, sort_actions, matching_state, pack_vector)
3026 (table_ninf_remap, pack_table, prepare_actions): Move to...
3027 * src/tables.c: here.
3028 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3029 * src/output.c (token_actions, output_base, output_conflicts)
3030 (output_check): Merge into...
3031 (prepare_actions): this.
3032 (actions_output): Rename as...
3033 (user_actions_output): this.
3034 * src/main.c (main): Call tables_generate and tables_free.
3035
1509d42f
AD
30362002-07-31 Akim Demaille <akim@epita.fr>
3037
3038 Steal GCC's --time-report support.
3039
3040 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3041 stolen/adjusted from GCC.
3042 * m4/stage.m4: Remove time related checks.
3043 * m4/timevar.m4: New.
3044 * configure.in: Adjust.
3045 * src/system.h: Adjust to using timevar.h.
3046 * src/getargs.h, src/getargs.c: Support trace_time for
3047 --trace=time.
3048 * src/main.c (stage): Remove.
3049 (main): Replace `stage' invocations with timevar calls.
3050 * src/output.c: Insert pertinent timevar calls.
3051
273a74fa
AD
30522002-07-31 Akim Demaille <akim@epita.fr>
3053
3054 Let --trace have arguments.
3055
3056 * src/getargs.h (enum trace_e): New.
3057 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3058 (long_options, short_options): --trace/-T takes an optional
3059 argument.
3060 Change all the uses of trace_flag to reflect the new flags.
3061 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3062
3063 Strengthen `stage' portability.
3064
3065 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3066 * configure.in: Use it.
3067 Don't check for malloc.h and sys/times.h.
3068 * src/system.h: Include them when appropriate.
3069 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3070 times and struct tms are available.
3071
217598da
AD
30722002-07-30 Akim Demaille <akim@epita.fr>
3073
3074 In verbose parse error message, don't report `error' as an
3075 expected token.
3076 * tests/actions.at (Printers and Destructors): Adjust.
3077 * tests/calc.at (Calculator $1): Adjust.
3078 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3079 error message, do not report the parser accepts the error token in
3080 that state.
3081
52489d44
AD
30822002-07-30 Akim Demaille <akim@epita.fr>
3083
3084 Normalize conflict related messages.
3085
3086 * src/complain.h, src/complain.c (warn, complain): New.
3087 * src/conflicts.c (conflicts_print): Use them.
3088 (conflict_report_yacc): New, extracted from...
3089 (conflicts_print): here.
3090 * tests/conflicts.at, tests/existing.at: Adjust.
3091
e8832397
AD
30922002-07-30 Akim Demaille <akim@epita.fr>
3093
3094 Report rules which are never reduced by the parser: those hidden
3095 by conflicts.
3096
3097 * src/LR0.c (save_reductions): Don't make the final state too
3098 different: save its reduction (accept) instead of having a state
3099 without any action (no shift or goto, no reduce).
3100 Note: the final state is now a ``regular'' state, i.e., the
3101 parsers now contain `reduce 0' as default reduction.
3102 Nevertheless, since they decide to `accept' when yystate =
3103 final_state, they still will not reduce rule 0.
3104 * src/print.c (print_actions, print_reduction): Adjust.
3105 * src/output.c (action_row): Track reduced rules.
3106 (token_actions): Report rules never reduced.
3107 * tests/conflicts.at, tests/regression.at: Adjust.
3108
caf23d24
AD
31092002-07-30 Akim Demaille <akim@epita.fr>
3110
3111 `stage' was accidently included in a previous patch.
3112 Initiate its autoconfiscation.
3113
3114 * configure.in: Look for malloc.h and sys/times.h.
3115 * src/main.c (stage): Adjust.
3116 Report only when trace_flag.
3117
640748ee
AD
31182002-07-29 Akim Demaille <akim@epita.fr>
3119
3120 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3121 state_number_t.
3122 (errs_t): symbol_t*, not symbol_number_t.
3123 (reductions_t): rule_t*, not rule_number_t.
3124 (FOR_EACH_SHIFT): New.
3125 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3126 * src/print.c, src/print_graph.c: Adjust.
3127
88bce5a2
AD
31282002-07-29 Akim Demaille <akim@epita.fr>
3129
3130 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3131
3132 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3133 (endtoken, accept): these.
3134 * src/reader.c (reader): Set endtoken's default tag to "$end".
3135 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3136 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3137 Adjust.
3138
1bfb97db
AD
31392002-07-29 Akim Demaille <akim@epita.fr>
3140
3141 * src/reduce.c (reduce_grammar): When the language is empty,
3142 complain about the start symbol, not the axiom.
3143 Use its location.
3144 * tests/reduce.at (Empty Language): New.
3145
fc5734fe
AD
31462002-07-26 Akim Demaille <akim@epita.fr>
3147
3148 * src/reader.h, src/reader.c (gram_error): ... can't get
3149 yycontrol without making too strong assumptions on the parser
3150 itself.
3151 * src/output.c (prepare_tokens): Use the real 0th value of
3152 token_translations instead of `0'.
3153 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3154 visible here.
3155 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3156 for the time being: %locations ought to provide it to yyerror.
3157
3650b4b8
AD
31582002-07-25 Akim Demaille <akim@epita.fr>
3159
3160 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3161 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3162 * tests/regression.at (Web2c Actions): Adjust.
3163
4b3d3a8e
AD
31642002-07-25 Akim Demaille <akim@epita.fr>
3165
3166 Stop storing rules from 1 to nrules + 1.
3167
3168 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3169 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3170 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3171 Iterate from 0 to nrules.
3172 Use rule_number_as_item_number and item_number_as_rule_number.
3173 Adjust to `derive' now containing possibly 0.
3174 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3175 Handle the `- 1' part in rule numbers from/to item numbers.
3176 * src/conflicts.c (log_resolution): Fix the message which reversed
3177 shift and reduce.
3178 * src/output.c (action_row): Initialize default_rule to -1.
3179 (token_actions): Adjust.
3180 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3181 expected output.
3182 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3183
4a2a22f4
AD
31842002-07-25 Akim Demaille <akim@epita.fr>
3185
3186 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3187 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3188 (b4_c_knr_arg_decl): New.
3189 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3190 yyreport_parse_error.
3191
b8df3223
AD
31922002-07-25 Akim Demaille <akim@epita.fr>
3193
3194 * data/yacc.c (yyreport_parse_error): New, extracted from...
3195 (yyparse): here.
3196 (yydestruct, yysymprint): Move above yyparse.
3197 Be K&R compliant.
3198
a762e609
AD
31992002-07-25 Akim Demaille <akim@epita.fr>
3200
3201 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3202 replace...
3203 (b4_sint_type, b4_uint_type): these.
3204 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3205 * tests/regression.at (Web2c Actions): Adjust.
3206
12b0043a
AD
32072002-07-25 Akim Demaille <akim@epita.fr>
3208
3209 * src/gram.h (TIEM_NUMBER_MAX): New.
3210 (item_number_of_rule_number, rule_number_of_item_number): Rename
3211 as...
3212 (rule_number_as_item_number, item_number_as_rule_number): these.
3213 Adjust dependencies.
3214 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3215 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3216 (symbol_number_to_vector_number): New.
3217 (order): Of vector_number_t* type.
3218 (base_t, BASE_MAX, BASE_MIN): New.
3219 (froms, tos, width, pos, check): Of base_t type.
3220 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3221 (actrow): Of action_number_t type.
3222 (conflrow): Of unsigned int type.
3223 (table_ninf, base_ninf): New.
3224 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3225 (muscle_insert_int_table, muscle_insert_base_table)
3226 (muscle_insert_rule_number_table): New.
3227 (prepare_tokens): Output `toknum' as int_table.
3228 (action_row): Returns a rule_number_t.
3229 Use ACTION_MIN, not SHRT_MIN.
3230 (token_actions): yydefact is rule_number_t*.
3231 (table_ninf_remap): New.
3232 (pack_table): Use it for `base' and `table'.
3233 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3234 replaced with...
3235 (YYPACT_NINF, YYTABLE_NINF): these.
3236 (yypact, yytable): Compute their types instead of hard-coded
3237 `short'.
3238 * tests/regression.at (Web2c Actions): Adjust.
3239
5dde258a
AD
32402002-07-19 Akim Demaille <akim@epita.fr>
3241
3242 * src/scan-gram.l (id): Can start with an underscore.
3243
a945ec39
AD
32442002-07-16 Akim Demaille <akim@epita.fr>
3245
3246 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3247 Adjust all former `associativity' dependencies.
3248 * src/symtab.c (symbol_new): Default associativity is `undef', not
3249 `right'.
3250 (symbol_check_alias_consistence): Adjust.
3251
fae437e8
AD
32522002-07-09 Akim Demaille <akim@epita.fr>
3253
3254 * doc/bison.texinfo: Properly set the ``header'' part.
3255 Use @dircategory ``GNU programming tools'' as per Texinfo's
3256 documentation.
3257 Use @copying.
3258
1a715ef2
AD
32592002-07-09 Akim Demaille <akim@epita.fr>
3260
3261 * lib/quotearg.h: Protect against multiple inclusions.
3262 * src/location.h (location_t): Add a `file' member.
3263 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3264 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3265 `error_one_per_line' support.
3266
a5d50994
AD
32672002-07-09 Akim Demaille <akim@epita.fr>
3268
3269 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3270 * src/reader.c (lineno): Remove.
3271 Adjust all dependencies.
3272 (get_merge_function): Take a location and use complain_at.
3273 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3274 * tests/regression.at (Invalid inputs, Mixing %token styles):
3275 Adjust.
3276
b275314e
AD
32772002-07-09 Akim Demaille <akim@epita.fr>
3278
3279 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3280 recovery rule, and forbid extensions when --yacc.
3281 (gram_error): Use complain_at.
3282 * src/reader.c (reader): Exit if there were parse errors.
3283
865b9df1
AD
32842002-07-09 Akim Demaille <akim@epita.fr>
3285
3286 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3287 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3288 Reported by R Blake <blakers@mac.com>.
3289
c76e14da
AD
32902002-07-09 Akim Demaille <akim@epita.fr>
3291
3292 * data/yacc.c: Output the copyright notive in the header.
3293
7db2ed2d
AD
32942002-07-03 Akim Demaille <akim@epita.fr>
3295
3296 * src/output.c (froms, tos): Are state_number_t.
3297 (save_column): sp, sp1, and sp2 are state_number_t.
3298 (prepare): Rename `final' as `final_state_number', `nnts' as
3299 `nterms_number', `nrules' as `rules_number', `nstates' as
3300 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3301 unused.
3302 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3303 * data/lalr1.cc (nsym_): Remove, unused.
3304
e68e0410
AD
33052002-07-03 Akim Demaille <akim@epita.fr>
3306
3307 * src/lalr.h, src/lalr.c (goto_number_t): New.
3308 * src/lalr.c (goto_list_t): New.
3309 Propagate them.
3310 * src/nullable.c (rule_list_t): New.
3311 Propagate.
3312 * src/types.h: Remove.
3313
e1a4f3a4
AD
33142002-07-03 Akim Demaille <akim@epita.fr>
3315
3316 * src/closure.c (print_fderives): Use rule_rhs_print.
3317 * src/derives.c (print_derives): Use rule_rhs_print.
3318 (rule_list_t): New, replaces `shorts'.
3319 (set_derives): Add comments.
3320 * tests/sets.at (Nullable, Firsts): Adjust.
3321
536545f3
AD
33222002-07-03 Akim Demaille <akim@epita.fr>
3323
3324 * src/output.c (prepare_actions): Free `tally' and `width'.
3325 (prepare_actions): Allocate and free `order'.
3326 * src/symtab.c (symbols_free): Free `symbols'.
3327 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3328 * src/output.c (m4_invoke): Move to...
3329 * src/scan-skel.l: here.
3330 (<<EOF>>): Close yyout, and free its name.
3331
8b752b00
AD
33322002-07-03 Akim Demaille <akim@epita.fr>
3333
3334 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3335
3336 * src/LR0.c (new_state): Merge into...
3337 (state_list_append): this.
3338 (new_states): Merge into...
3339 (generate_states): here.
3340 (set_states): Don't ensure a proper `errs' state member here, do it...
3341 * src/conflicts.c (conflicts_solve): here.
3342 * src/state.h, src/state.c: Comment changes.
3343 (state_t): Rename member `shifts' as `transitions'.
3344 Adjust all dependencies.
3345 (errs_new): For consistency, also take the values as argument.
3346 (errs_dup): Remove.
3347 (state_errs_set): New.
3348 (state_reductions_set, state_transitions_set): Assert that no
3349 previous value was assigned.
3350 (state_free): New.
3351 (states_free): Use it.
3352 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3353 temporary storage: use `errs' and `nerrs' as elsewhere.
3354 (set_conflicts): Allocate and free this `errs'.
3355
613f5e1a
AD
33562002-07-02 Akim Demaille <akim@epita.fr>
3357
3358 * lib/libiberty.h: New.
3359 * lib: Update the bitset implementation from upstream.
3360 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3361 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3362 * src/main.c: Adjust bitset stats calls.
3363
26e0cadc
PE
33642002-07-01 Paul Eggert <eggert@twinsun.com>
3365
3366 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3367 char, so that negative chars don't collide with $.
3368
1154cced
AD
33692002-06-30 Akim Demaille <akim@epita.fr>
3370
3371 Have the GLR tests be `warning' checked, and fix the warnings.
3372
3373 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3374 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3375 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3376 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3377 (yyaddDeferredAction): static.
3378 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3379 (yyreportParseError): yyprefix is const.
3380 yytokenp is used only when verbose.
3381 (yy__GNUC__): Replace with __GNUC__.
3382 (yypdumpstack): yyi is size_t.
3383 (yypreference): Un-yy local variables and arguments, to avoid
3384 clashes with `yyr1'. Anyway, we are not in the user name space.
3385 (yytname_size): be an int, as is compared with ints.
3386 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3387 Use them.
3388 * tests/cxx-gram.at: Use quotation to protect $1.
3389 Use AT_COMPILE to enable warnings hunts.
3390 Prototype yylex and yyerror.
3391 `Use' argc.
3392 Include `string.h', not `strings.h'.
3393 Produce and prototype stmtMerge only when used.
3394 yylex takes a location.
3395
97650f4e
AD
33962002-06-30 Akim Demaille <akim@epita.fr>
3397
3398 We spend a lot of time in quotearg, in particular when --verbose.
3399
3400 * src/symtab.c (symbol_get): Store a quoted version of the key.
3401 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3402 Adjust all callers.
3403
d2576365
AD
34042002-06-30 Akim Demaille <akim@epita.fr>
3405
3406 * src/state.h (reductions_t): Rename member `nreds' as num.
3407 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3408 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3409
ccaf65bc
AD
34102002-06-30 Akim Demaille <akim@epita.fr>
3411
3412 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3413 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3414 (shifts_to): Rename as...
3415 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3416 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3417 (TRANSITION_IS_DISABLED, transitions_to): these.
3418
87675353
AD
34192002-06-30 Akim Demaille <akim@epita.fr>
3420
3421 * src/print.c (print_shifts, print_gotos): Merge into...
3422 (print_transitions): this.
3423 (print_transitions, print_errs, print_reductions): Align the
3424 lookaheads columns.
3425 (print_core, print_transitions, print_errs, print_state,
3426 print_grammar): Output empty lines separator before, not after.
3427 (state_default_rule_compute): Rename as...
3428 (state_default_rule): this.
3429 * tests/conflicts.at (Defaulted Conflicted Reduction),
3430 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3431 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3432
ce4ccb4b
AD
34332002-06-30 Akim Demaille <akim@epita.fr>
3434
3435 Display items as we display rules.
3436
3437 * src/gram.h, src/gram.c (rule_lhs_print): New.
3438 * src/gram.c (grammar_rules_partial_print): Use it.
3439 * src/print.c (print_core): Likewise.
3440 * tests/conflicts.at (Defaulted Conflicted Reduction),
3441 (Unresolved SR Conflicts): Adjust.
3442 (Unresolved SR Conflicts): Adjust and rename as...
3443 (Resolved SR Conflicts): this, as was meant.
3444 * tests/regression.at (Web2c Report): Adjust.
3445
bc933ef1
AD
34462002-06-30 Akim Demaille <akim@epita.fr>
3447
3448 * src/print.c (state_default_rule_compute): New, extracted from...
3449 (print_reductions): here.
3450 Pessimize, but clarify the code.
3451 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3452
53d4308d
AD
34532002-06-30 Akim Demaille <akim@epita.fr>
3454
3455 * src/output.c (action_row): Let default_rule be always a rule
3456 number.
3457
574fb2d5
AD
34582002-06-30 Akim Demaille <akim@epita.fr>
3459
3460 * src/closure.c (print_firsts, print_fderives, closure):
3461 Use BITSET_EXECUTE.
3462 * src/lalr.c (lookaheads_print): Likewise.
3463 * src/state.c (state_rule_lookaheads_print): Likewise.
3464 * src/print_graph.c (print_core): Likewise.
3465 * src/print.c (print_reductions): Likewise.
3466 * src/output.c (action_row): Likewise.
3467 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3468
05811fd7
AD
34692002-06-30 Akim Demaille <akim@epita.fr>
3470
3471 * src/print_graph.c: Use report_flag.
3472
0e4d5753
AD
34732002-06-30 Akim Demaille <akim@epita.fr>
3474
3475 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3476 to...
3477 * src/relation.h, src/relation.c (traverse, relation_digraph)
3478 (relation_print, relation_transpose): New.
3479
24c7d800
AD
34802002-06-30 Akim Demaille <akim@epita.fr>
3481
3482 * src/state.h, src/state.c (shifts_to): New.
3483 * src/lalr.c (build_relations): Use it.
3484
9222837b
AD
34852002-06-30 Akim Demaille <akim@epita.fr>
3486
3487 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3488 (item_number_of_rule_number, rule_number_of_item_number): New.
3489 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3490 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3491 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3492 Propagate their use.
3493 Much remains to be done, in particular wrt `shorts' from types.h.
3494
260008e5
AD
34952002-06-30 Akim Demaille <akim@epita.fr>
3496
3497 * src/symtab.c (symbol_new): Initialize the `printer' member.
3498
8a731ca8
AD
34992002-06-30 Akim Demaille <akim@epita.fr>
3500
3501 * src/LR0.c (save_reductions): Remove, replaced by...
3502 * src/state.h, src/state.c (state_reductions_set): New.
3503 (reductions, errs): Rename as...
3504 (reductions_t, errs_t): these.
3505 Adjust all dependencies.
3506
32e1e0a4
AD
35072002-06-30 Akim Demaille <akim@epita.fr>
3508
3509 * src/LR0.c (state_list_t, state_list_append): New.
3510 (first_state, last_state): Now symbol_list_t.
3511 (this_state): Remove.
3512 (new_itemsets, append_states, save_reductions): Take a state_t as
3513 argument.
3514 (set_states, generate_states): Adjust.
3515 (save_shifts): Remove, replaced by...
3516 * src/state.h, src/state.c (state_shifts_set): New.
3517 (shifts): Rename as...
3518 (shifts_t): this.
3519 Adjust all dependencies.
3520 * src/state.h (state_t): Remove the `next' member.
3521
e5fb6710
AD
35222002-06-30 Akim Demaille <akim@epita.fr>
3523
3524 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3525 escaped in slot 0.
3526
c7ca99d4
AD
35272002-06-30 Akim Demaille <akim@epita.fr>
3528
3529 Use hash.h for the state hash table.
3530
3531 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3532 (allocate_storage): Use state_hash_new.
3533 (free_storage): Use state_hash_free.
3534 (new_state, get_state): Adjust.
3535 * src/lalr.h, src/lalr.c (states): Move to...
3536 * src/states.h (state_t): Remove the `link' member, no longer
3537 used.
3538 * src/states.h, src/states.c: here.
3539 (state_hash_new, state_hash_free, state_hash_lookup)
3540 (state_hash_insert, states_free): New.
3541 * src/states.c (state_table, state_compare, state_hash): New.
3542 * src/output.c (output_actions): Do not free states now, since we
3543 still need to know the final_state number in `prepare', called
3544 afterwards. Do it...
3545 * src/main.c (main): here: call states_free after `output'.
3546
df0e7316
AD
35472002-06-30 Akim Demaille <akim@epita.fr>
3548
3549 * src/state.h, src/state.c (state_new): New, extracted from...
3550 * src/LR0.c (new_state): here.
3551 * src/state.h (STATE_ALLOC): Move to...
3552 * src/state.c: here.
3553 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3554 * src/state.h, src/state.c: here.
3555
39f41916
AD
35562002-06-30 Akim Demaille <akim@epita.fr>
3557
3558 * src/reader.c (gensym): Rename as...
3559 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3560 (getsym): Rename as...
3561 (symbol_get): this.
3562
d57650a5
AD
35632002-06-30 Akim Demaille <akim@epita.fr>
3564
3565 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3566 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3567 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3568 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3569
5a08f1ce
AD
35702002-06-30 Akim Demaille <akim@epita.fr>
3571
3572 Make the test suite pass with warnings checked.
3573
3574 * tests/actions.at (Printers and Destructors): Improve.
3575 Avoid unsigned vs. signed issues.
3576 * tests/calc.at: Don't exercise the scanner here, do it...
3577 * tests/input.at (Torturing the Scanner): here.
3578
720623af
PH
35792002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3580
88e7e941 3581 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
3582 reorganize first lines parallel to yacc.c.
3583
fb8135fa
AD
35842002-06-28 Akim Demaille <akim@epita.fr>
3585
3586 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3587 (b4_token_enum, b4_token_defines): New, factored from...
3588 * data/lalr1.cc, data/yacc.c, glr.c: here.
3589
41442480
AD
35902002-06-28 Akim Demaille <akim@epita.fr>
3591
3592 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3593 unused variables.
3594 * src/output.c (merger_output): static.
3595
e0e5bf84
AD
35962002-06-28 Akim Demaille <akim@epita.fr>
3597
3598 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3599 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3600 pacify GCC.
3601 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 3602
676385e2
PH
36032002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3604
3605 Accumulated changelog for new GLR parsing features.
3606
6a254321 3607 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
3608 conflicts_total_count.
3609 * src/conflicts.h: Ditto.
3610 * src/output.c (token_actions): Use the new name.
3611 (output_conflicts): Change conflp => conflict_list_heads, and
3612 confl => conflict_list for better readability.
3613 * data/glr.c: Use the new names.
3614 * NEWS: Add self to GLR announcement.
e0e5bf84 3615
676385e2
PH
3616 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3617
3618 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3619 Akim Demaille.
3620
3621 * data/bison.glr: Change name to glr.c
3622 * data/glr.c: Renamed from bison.glr.
3623 * data/Makefile.am: Add glr.c
e0e5bf84
AD
3624
3625 * src/getargs.c:
3626
676385e2
PH
3627 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3628 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 3629
676385e2
PH
3630 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3631
3632 * data/bison.glr: Be sure to restore the
3633 current #line when returning to the skeleton contents after having
3634 exposed the input file's #line.
3635
3636 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3637
3638 * data/bison.glr: Bring up to date with changes to bison.simple.
3639
3640 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3641
3642 * data/bison.glr: Correct definitions that use b4_prefix.
3643 Various reformatting.
3644 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3645 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3646 yytokenp argument; now part of stack.
3647 (yychar): Define to behave as documented.
3648 (yyclearin): Ditto.
e0e5bf84 3649
676385e2
PH
3650 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3651
3652 * src/reader.h: Add declaration for free_merger_functions.
3653
3654 * src/reader.c (merge_functions): New variable.
3655 (get_merge_function): New function.
3656 (free_merger_functions): New function.
3657 (readgram): Check for %prec that is not followed by a symbol.
3658 Handle %dprec and %merge declarations.
3659 (packgram): Initialize dprec and merger fields in rules array.
3660
3661 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3662 conflict_list_cnt, conflict_list_free): New variables.
3663 (table_grow): Also grow conflict_table.
e0e5bf84 3664 (prepare_rules): Output dprec and merger tables.
676385e2 3665 (conflict_row): New function.
e0e5bf84 3666 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
3667 default reduction in conflicted states for GLR parser so that there
3668 are spaces for the conflict lists.
3669 (save_row): Also save conflict information.
3670 (token_actions): Allocate conflict list.
3671 (merger_output): New function.
3672 (pack_vector): Pack conflict table, too.
3673 (output_conflicts): New function to output yyconflp and yyconfl.
3674 (output_check): Allocate conflict_tos.
3675 (output_actions): Output conflict tables, also.
3676 (output_skeleton): Output b4_mergers definition.
3677 (prepare): Output b4_max_rhs_length definition.
3678 Use 'bison.glr' as default skeleton for GLR parsers.
3679
3680 * src/gram.c (glr_parser): New flag.
3681 (grammar_free): Call free_merger_functions.
3682
3683 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3684 all pairs of conflicting reductions, rather than just all tokens
3685 causing conflicts. Needed to size conflict tables.
e0e5bf84 3686 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
3687 interface.
3688 (conflicts_print): Ditto.
3689 (count_total_conflicts): New function.
3690
3691 * src/reader.h (merger_list): New type.
3692 (merge_functions): New variable.
3693
3694 * src/lex.h (tok_dprec, tok_merge): New token types.
3695
3696 * src/gram.h (rule_s): Add dprec and merger fields.
3697 (glr_parser): New flag.
3698
3699 * src/conflicts.h (count_total_conflicts): New function.
3700
3701 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3702
3703 * doc/bison.texinfo (Generalized LR Parsing): New section.
3704 (GLR Parsers): New section.
3705 (Language and Grammar): Mention GLR parsing.
3706 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3707 Correct typo ("tge" -> "the").
3708
3709 * data/bison.glr: New skeleton for GLR parsing.
3710
3711 * tests/cxx-gram.at: New tests for GLR parsing.
3712
3713 * tests/testsuite.at: Include cxx-gram.at.
3714
3715 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 3716
676385e2
PH
3717 * src/parse-gram.y:
3718
3719 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3720
3721 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 3722
b5480d74 37232002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
3724
3725 * src/options.h, src/options.c: Remove.
3726 * src/getargs.c (short_options, long_options): New.
3727
60491a94
AD
37282002-06-27 Akim Demaille <akim@epita.fr>
3729
3730 * data/bison.simple, data/bison.c++: Rename as...
3731 * data/yacc.c, data/lalr1.cc: these.
3732 * doc/bison.texinfo (Environment Variables): Remove.
3733
9be0c25b
AD
37342002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3735
3736 * src/getargs.c (report_argmatch): Initialize strtok().
3737
1ae72863
AD
37382002-06-20 Akim Demaille <akim@epita.fr>
3739
3740 * data/bison.simple (b4_symbol_actions): New, replaces...
3741 (b4_symbol_destructor, b4_symbol_printer): these.
3742 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3743 user token numbers.
3744
87542d29
AD
37452002-06-20 Akim Demaille <akim@epita.fr>
3746
3747 * data/bison.simple (yydestructor): Rename as...
3748 (yydestruct): this.
3749
1a31ed21
AD
37502002-06-20 Akim Demaille <akim@epita.fr>
3751
3752 * src/symtab.h, src/symtab.c (symbol_type_set)
3753 (symbol_destructor_set, symbol_precedence_set): The location is
3754 the last argument.
3755 Adjust all callers.
3756
e776192e
AD
37572002-06-20 Akim Demaille <akim@epita.fr>
3758
3759 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3760 internals.
3761 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3762 Takes a location.
3763 * src/symtab.h, src/symtab.c (symbol_class_set)
3764 (symbol_user_token_number_set): Likewise.
3765 Adjust all callers.
3766 Promote complain_at.
3767 * tests/input.at (Type Clashes): Adjust.
3768
5c1180b3
AD
37692002-06-20 Akim Demaille <akim@epita.fr>
3770
3771 * data/bison.simple (YYLEX): Fix the declaration when
3772 %pure-parser.
3773
e3170060
AD
37742002-06-20 Akim Demaille <akim@epita.fr>
3775
3776 * data/bison.simple (yysymprint): Don't print the token number,
3777 just its name.
3778 * tests/actions.at (Destructors): Rename as...
3779 (Printers and Destructors): this.
3780 Also exercise %printer.
3781
253862fd
AD
37822002-06-20 Akim Demaille <akim@epita.fr>
3783
3784 * data/bison.simple (YYDSYMPRINT): New.
3785 Use it to remove many of the #if YYDEBUG/if (yydebug).
3786
366eea36
AD
37872002-06-20 Akim Demaille <akim@epita.fr>
3788
3789 * src/symtab.h, src/symtab.c (symbol_t): printer and
3790 printer_location are new members.
3791 (symbol_printer_set): New.
3792 * src/parse-gram.y (PERCENT_PRINTER): New token.
3793 Handle its associated rule.
3794 * src/scan-gram.l: Adjust.
3795 (handle_destructor_at, handle_destructor_dollar): Rename as...
3796 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3797 * src/output.c (symbol_printers_output): New.
3798 (output_skeleton): Call it.
3799 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3800 since there are already many grammar files with a user `yyprint'.
3801 Replace the calls to YYPRINT to calls to yysymprint.
3802 * tests/calc.at: Adjust.
3803 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3804 taking advantage of parser very internal details (stack size!).
3805
4f25ebb0
AD
38062002-06-20 Akim Demaille <akim@epita.fr>
3807
3808 * src/scan-gram.l: Complete the scanner with the missing patterns
3809 to pacify Flex.
3810 Use `quote' and `symbol_tag_get' where appropriate.
3811
93b68a0e
AD
38122002-06-19 Akim Demaille <akim@epita.fr>
3813
3814 * tests/actions.at (Destructors): Augment to test locations.
3815 * data/bison.simple (yydestructor): Pass it the current location
3816 if locations are enabled.
3817 Prototype only when __STDC__ or C++.
3818 Change the argument names to move into the yy name space: there is
3819 user code here.
3820
58612f1d
AD
38212002-06-19 Akim Demaille <akim@epita.fr>
3822
74310291
AD
3823 * data/bison.simple (b4_pure_if): New.
3824 Use it instead of #ifdef YYPURE.
3825
38262002-06-19 Akim Demaille <akim@epita.fr>
3827
3828 * data/bison.simple (b4_location_if): New.
58612f1d
AD
3829 Use it instead of #ifdef YYLSP_NEEDED.
3830
f25bfb75
AD
38312002-06-19 Akim Demaille <akim@epita.fr>
3832
3833 Prepare @$ in %destructor, but currently don't bind it in the
3834 skeleton, as %location use is not cleaned up yet.
3835
3836 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3837 (handle_action_at): New.
3838 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3839 a braced_code_t and a location as additional arguments.
3840 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3841 unquote one when outputting `b4_dollar_dollar'.
3842 Adjust callers.
3843 * data/bison.simple (b4_eval): Remove.
3844 (b4_symbol_destructor): Adjust.
3845 * tests/input.at (Invalid @n): Adjust.
3846
c732d2c6
AD
38472002-06-19 Zack Weinberg <zack@codesourcery.com>
3848
3849 * doc/bison.texinfo: Document ability to have multiple
3850 prologue sections.
3851
8c165d89
AD
38522002-06-18 Akim Demaille <akim@epita.fr>
3853
3854 * src/files.c (compute_base_names): When computing the output file
3855 names from the input file name, strip the directory part.
3856
ca98bf57
AD
38572002-06-18 Akim Demaille <akim@epita.fr>
3858
3859 * data/bison.simple.new: Comment changes.
3860 Reported by Andreas Schwab.
3861
0bfb02ff
AD
38622002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3863
3864 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3865 there are no `label `yyoverflowlab' defined but not used' warnings
3866 when yyoverflow is defined.
3867
24c0aad7
AD
38682002-06-18 Akim Demaille <akim@epita.fr>
3869
3870 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3871 new member.
3872 (symbol_destructor_set): Adjust.
3873 * src/output.c (symbol_destructors_output): Output the destructor
3874 locations.
3875 Output the symbol name.
3876 * data/bison.simple (b4_symbol_destructor): Adjust.
3877
5719c109
AD
38782002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3879 and Akim Demaille <akim@epita.fr>
3880
3881 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3882 what's left on the stack when the error recovery hits EOF.
3883 * tests/actions.at (Destructors): Complete to exercise this case.
3884
9280d3ef
AD
38852002-06-17 Akim Demaille <akim@epita.fr>
3886
3887 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3888 arguments is really empty, not only equal to `[]'.
3889 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3890 member.
3891 (symbol_destructor_set): New.
3892 * src/output.c (symbol_destructors_output): New.
3893 * src/reader.h (brace_code_t, current_braced_code): New.
3894 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3895 (handle_dollar): Rename as...
3896 (handle_action_dollar): this.
3897 (handle_destructor_dollar): New.
3898 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3899 (grammar_declaration): Use it.
3900 * data/bison.simple (yystos): Is always defined.
3901 (yydestructor): New.
3902 * tests/actions.at (Destructors): New.
3903 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3904
dafdc66f
AD
39052002-06-17 Akim Demaille <akim@epita.fr>
3906
3907 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3908 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3909 rule_length only when needed.
3910 * src/output.c (actions_output, token_definitions_output): Output
3911 the full M4 block.
3912 * src/symtab.c: Don't access directly to the symbol tag, use
3913 symbol_tag_get.
3914 * src/parse-gram.y: Use symbol_list_free.
3915
56c47203
AD
39162002-06-17 Akim Demaille <akim@epita.fr>
3917
3918 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3919 (symbol_list_prepend, get_type_name): Move to...
3920 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3921 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3922 Adjust all callers.
3923 (symbol_list_free): New.
3924 * src/scan-gram.l (handle_dollar): Takes a location.
3925 * tests/input.at (Invalid $n): Adjust.
3926
1e0bab92
AD
39272002-06-17 Akim Demaille <akim@epita.fr>
3928
3929 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3930 (symbol_list_prepend): New.
3931 * src/parse-gram.y (%union): `list' is a new member.
3932 (symbols.1): New, replaces...
3933 (terms_to_prec.1, nterms_to_type.1): these.
3934 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3935 Take a location as additional argument.
3936 Adjust all callers.
3937
04e60654
AD
39382002-06-15 Akim Demaille <akim@epita.fr>
3939
3940 * src/parse-gram.y: Move %token in the declaration section so that
3941 we don't depend upon CVS Bison.
3942
10e5b8bd
AD
39432002-06-15 Akim Demaille <akim@epita.fr>
3944
3945 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3946 * src/print.c (print_core): Use it.
3947
9801d40c
AD
39482002-06-15 Akim Demaille <akim@epita.fr>
3949
3950 * src/conflicts.c (log_resolution): Accept the rule involved in
3951 the sr conflicts instead of the lookahead number that points to
3952 that rule.
3953 (flush_reduce): Accept the current lookahead vector as argument,
3954 instead of the index in LA.
3955 (resolve_sr_conflict): Accept the current number of lookahead
3956 bitset to consider for the STATE, instead of the index in LA.
3957 (set_conflicts): Adjust.
3958 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3959
c0263492
AD
39602002-06-15 Akim Demaille <akim@epita.fr>
3961
3962 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3963 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3964 Adjust all dependencies.
3965 * src/lalr.c (initialize_lookaheads): Split into...
3966 (states_lookaheads_count, states_lookaheads_initialize): these.
3967 (lalr): Adjust.
3968
9757c359
AD
39692002-06-15 Akim Demaille <akim@epita.fr>
3970
3971 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3972 out of...
3973 (grammar_rules_print): here.
3974 * src/reduce.c (reduce_output): Use it.
3975 * tests/reduce.at (Useless Rules, Reduced Automaton)
3976 (Underivable Rules): Adjust.
3977
6b98e4b5
AD
39782002-06-15 Akim Demaille <akim@epita.fr>
3979
3980 Copy BYacc's nice way to report the grammar.
3981
3982 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
3983 New.
3984 Don't print the rules' location, it is confusing and useless.
3985 (rule_print): Use grammar_rhs_print.
3986 * src/print.c (print_grammar): Use grammar_rules_print.
3987
6b98e4b5
AD
39882002-06-15 Akim Demaille <akim@epita.fr>
3989
3990 Complete and rationalize `useless thing' warnings.
3991
3992 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
3993 (symbol_tag_print): New.
3994 Use them everywhere in place of accessing directly the tag member.
3995 * src/gram.h, src/gram.c (rule_print): New.
3996 Use it where a rule used to be printed `by hand'.
3997 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
3998 (reduce_grammar_tables): Report the useless rules.
3999 (reduce_print): Useless things are a warning, not an error.
4000 Report it as such.
4001 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4002 (Reduced Automaton, Underivable Rules): Adjust.
4003 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4004 * tests/conflicts.at (Unresolved SR Conflicts)
4005 (Solved SR Conflicts): Adjust.
4006
ee000ba4
AD
40072002-06-15 Akim Demaille <akim@epita.fr>
4008
4009 Let symbols have a location.
4010
4011 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4012 (getsym): Adjust.
4013 Adjust all callers.
4014 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4015 Use location_t, not int.
4016 * src/symtab.c (symbol_check_defined): Take advantage of the
4017 location.
4018 * tests/regression.at (Invalid inputs): Adjust.
4019
8efe435c
AD
40202002-06-15 Akim Demaille <akim@epita.fr>
4021
4022 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4023 (input): Don't try to initialize yylloc here, do it in the
4024 scanner.
4025 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4026 * src/gram.h (rule_t): Change line and action_line into location
4027 and action_location, of location_t type.
4028 Adjust all dependencies.
4029 * src/location.h, src/location.c (empty_location): New.
4030 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4031 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4032 (grammar_current_rule_symbol_append)
4033 (grammar_current_rule_action_append): Expect a location as argument.
4034 * src/reader.c (grammar_midrule_action): Adjust to attach an
4035 action's location as dummy symbol location.
4036 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4037 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4038 the line numbers.
4039
1921f1d7
AD
40402002-06-14 Akim Demaille <akim@epita.fr>
4041
4042 Grammar declarations may be found in the grammar section.
4043
4044 * src/parse-gram.y (rules_or_grammar_declaration): New.
4045 (declarations): Each declaration may end with a semicolon, not
4046 just...
4047 (grammar_declaration): `"%union"'.
4048 (grammar): Branch to rules_or_grammar_declaration.
4049
4515534c
AD
40502002-06-14 Akim Demaille <akim@epita.fr>
4051
4052 * src/main.c (main): Invoke scanner_free.
4053
f958596b
AD
40542002-06-14 Akim Demaille <akim@epita.fr>
4055
4056 * src/output.c (m4_invoke): Extracted from...
4057 (output_skeleton): here.
4058 Free tempfile.
4059
2c569025
AD
40602002-06-14 Akim Demaille <akim@epita.fr>
4061
4062 * src/parse-gram.y (directives, directive, gram)
4063 (grammar_directives, precedence_directives, precedence_directive):
4064 Rename as...
4065 (declarations, declaration, grammar, grammar_declaration)
4066 (precedence_declaration, precedence_declarator): these.
4067 (symbol_declaration): New.
4068
592e8d4d
AD
40692002-06-14 Akim Demaille <akim@epita.fr>
4070
4071 * src/files.c (action_obstack): Remove, unused.
4072 (output_obstack): Remove it, and all its dependencies, as it is no
4073 longer needed.
4074 * src/reader.c (epilogue_set): Build the epilogue in the
4075 muscle_obstack.
4076 * src/output.h, src/output.c (muscle_obstack): Move to...
4077 * src/muscle_tab.h, src/muscle_tab.h: here.
4078 (muscle_init): Initialize muscle_obstack.
4079 (muscle_free): New.
4080 * src/main.c (main): Call it.
4081
0c15323d
AD
40822002-06-14 Akim Demaille <akim@epita.fr>
4083
4084 * src/location.h: New, extracted from...
4085 * src/reader.h: here.
4086 * src/Makefile.am (noinst_HEADERS): Merge into
4087 (bison_SOURCES): this.
4088 Add location.h.
4089 * src/parse-gram.y: Use location_t instead of Bison's.
4090 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4091 Use location_t instead of ints.
4092
e96c9728
AD
40932002-06-14 Akim Demaille <akim@epita.fr>
4094
4095 * data/bison.simple, data/bison.c++: Be sure to restore the
4096 current #line when returning to the skeleton contents after having
4097 exposed the input file's #line.
4098
75d1fe16
AD
40992002-06-12 Akim Demaille <akim@epita.fr>
4100
4101 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4102 eager.
4103 * tests/actions.at (Exotic Dollars): New.
4104
6c35d22c
AD
41052002-06-12 Akim Demaille <akim@epita.fr>
4106
4107 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4108 ['"/] too eagerly.
4109 * tests/input.at (Torturing the Scanner): New.
4110
1d6412ad
AD
41112002-06-11 Akim Demaille <akim@epita.fr>
4112
4113 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4114 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4115 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4116 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4117 * src/reader.c (reader): Use it.
4118
4cdb01db
AD
41192002-06-11 Akim Demaille <akim@epita.fr>
4120
4121 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4122 Adjust all callers.
4123 (scanner_last_string_free): New.
4124
44995b2e
AD
41252002-06-11 Akim Demaille <akim@epita.fr>
4126
4127 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4128 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4129 (last_string, YY_OBS_FREE): New.
4130 Use them when returning an ID.
4131
e9955c83
AD
41322002-06-11 Akim Demaille <akim@epita.fr>
4133
4134 Have Bison grammars parsed by a Bison grammar.
4135
4136 * src/reader.c, src/reader.h (prologue_augment): New.
4137 * src/reader.c (copy_definition): Remove.
4138
4139 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4140 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4141 (grammar_current_rule_prec_set, grammar_current_rule_check)
4142 (grammar_current_rule_symbol_append)
4143 (grammar_current_rule_action_append): Export.
4144 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4145 (symbol_list_action_append): Remove.
4146 Hook the routines from reader.
4147 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4148 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4149
4150 * src/reader.c (read_declarations): Remove, unused.
4151
4152 * src/parse-gram.y: Handle the epilogue.
4153 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4154 (grammar_start_symbol_set): this.
4155 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4156 * src/reader.c (readgram): Remove, unused.
4157 (reader): Adjust to insert eoftoken and axiom where appropriate.
4158
4159 * src/reader.c (copy_dollar): Replace with...
4160 * src/scan-gram.h (handle_dollar): this.
4161 * src/parse-gram.y: Remove `%thong'.
4162
4163 * src/reader.c (copy_at): Replace with...
4164 * src/scan-gram.h (handle_at): this.
4165
4166 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4167 New.
4168
4169 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4170 time being.
4171
4172 * src/reader.h, src/reader.c (grammar_rule_end): New.
4173
4174 * src/parse.y (current_type, current_class): New.
4175 Implement `%nterm', `%token' support.
4176 Merge `%term' into `%token'.
4177 (string_as_id): New.
4178 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4179 type name.
4180
4181 * src/parse-gram.y: Be sure to handle properly the beginning of
4182 rules.
4183
4184 * src/parse-gram.y: Handle %type.
4185 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4186
4187 * src/parse-gram.y: More directives support.
4188 * src/options.c: No longer handle source directives.
4189
4190 * src/parse-gram.y: Fix %output.
4191
4192 * src/parse-gram.y: Handle %union.
4193 Use the prologue locations.
4194 * src/reader.c (parse_union_decl): Remove.
4195
4196 * src/reader.h, src/reader.c (epilogue_set): New.
4197 * src/parse-gram.y: Use it.
4198
4199 * data/bison.simple, data/bison.c++: b4_stype is now either not
4200 defined, then default to int, or to the contents of %union,
4201 without `union' itself.
4202 Adjust.
4203 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4204
4205 * src/output.c (actions_output): Don't output braces, as they are
4206 already handled by the scanner.
4207
4208 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4209 characters to themselves.
4210
4211 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4212 that the epilogue has a proper #line.
4213
4214 * src/parse-gram.y: Handle precedence/associativity.
4215
4216 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4217 a terminal.
4218 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4219 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4220 at all to define terminals that cannot be emitted.
4221
4222 * src/scan-gram.l: Escape M4 characters.
4223
4224 * src/scan-gram.l: Working properly with escapes in user
4225 strings/characters.
4226
4227 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4228 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4229 grammar.
4230 Use more modest sizes, as for the time being the parser does not
4231 release memory, and therefore the process swallows a huge amount
4232 of memory.
4233
4234 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4235 stricter %token grammar.
4236
4237 * src/symtab.h (associativity): Add `undef_assoc'.
4238 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4239 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4240
4241 * tests/regression.at (Invalid %directive): Remove, as it is now
4242 meaningless.
4243 (Invalid inputs): Adjust to the new error messages.
4244 (Token definitions): The new grammar doesn't allow too many
4245 eccentricities.
4246
4247 * src/lex.h, src/lex.c: Remove.
4248 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4249 (copy_character, copy_string2, copy_string, copy_identifier)
4250 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4251 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4252 (parse_action): Remove.
4253 * po/POTFILES.in: Adjust.
4254
2e047461
AD
42552002-06-11 Akim Demaille <akim@epita.fr>
4256
4257 * src/reader.c (parse_action): Don't store directly into the
4258 rule's action member: return the action as a string.
4259 Don't require `rule_length' as an argument: compute it.
4260 (grammar_current_rule_symbol_append)
4261 (grammar_current_rule_action_append): New, eved out from
4262 (readgram): here.
4263 Remove `action_flag', `rulelength', unused now.
4264
9af3fbce
AD
42652002-06-11 Akim Demaille <akim@epita.fr>
4266
4267 * src/reader.c (grammar_current_rule_prec_set).
4268 (grammar_current_rule_check): New, eved out from...
4269 (readgram): here.
4270 Remove `xaction', `first_rhs': useless.
4271 * tests/input.at (Type clashes): New.
4272 * tests/existing.at (GNU Cim Grammar): Adjust.
4273
1485e106
AD
42742002-06-11 Akim Demaille <akim@epita.fr>
4275
4276 * src/reader.c (grammar_midrule_action): New, Eved out from
4277 (readgram): here.
4278
da4160c3
AD
42792002-06-11 Akim Demaille <akim@epita.fr>
4280
4281 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4282 New.
4283 (readgram): Use them as replacement of inlined code, crule and
4284 crule1.
4285
f6d0f937
AD
42862002-06-11 Akim Demaille <akim@epita.fr>
4287
4288 * src/reader.c (grammar_end, grammar_symbol_append): New.
4289 (readgram): Use them.
4290 Make the use of `p' as local as possible.
4291
69078d4b
AD
42922002-06-10 Akim Demaille <akim@epita.fr>
4293
4294 GCJ's parser requires the tokens to be defined before the prologue.
4295
4296 * data/bison.simple: Output the token definition before the user's
4297 prologue.
4298 * tests/regression.at (Braces parsing, Duplicate string)
4299 (Mixing %token styles): Check the output from bison.
4300 (Early token definitions): New.
4301
5e424082
AD
43022002-06-10 Akim Demaille <akim@epita.fr>
4303
4304 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4305 assigning twice the same user number to a token, so that we can
4306 use it in...
4307 * src/lex.c (lex): here.
4308 Also use `symbol_class_set' instead of hand written code.
4309 * src/reader.c (parse_assoc_decl): Likewise.
4310
44536b35
AD
43112002-06-10 Akim Demaille <akim@epita.fr>
4312
4313 * src/symtab.c, src/symtab.c (symbol_class_set)
4314 (symbol_user_token_number_set): New.
4315 * src/reader.c (parse_token_decl): Use them.
4316 Use a switch instead of ifs.
4317 Use a single argument.
4318
8b9f2372
AD
43192002-06-10 Akim Demaille <akim@epita.fr>
4320
4321 Remove `%thong' support as it is undocumented, unused, duplicates
4322 `%token's job, and creates useless e-mail traffic with people who
4323 want to know what it is, why it is undocumented, unused, and
4324 duplicates `%token's job.
4325
4326 * src/reader.c (parse_thong_decl): Remove.
4327 * src/options.c (option_table): Remove "thong".
4328 * src/lex.h (tok_thong): Remove.
4329
3ae2b51f
AD
43302002-06-10 Akim Demaille <akim@epita.fr>
4331
4332 * src/symtab.c, src/symtab.c (symbol_type_set)
4333 (symbol_precedence_set): New.
4334 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4335 (value_components_used): Remove, unused.
4336
2f1afb73
AD
43372002-06-09 Akim Demaille <akim@epita.fr>
4338
4339 Move symbols handling code out of the reader.
4340
4341 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4342 (axiom): Move to...
4343 * src/symtab.h, src/symtab.c: here.
4344
4345 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4346 * src/reader.c (startval): Rename as...
4347 * src/symtab.h, src/symtab.c (startsymbol): this.
4348 * src/reader.c: Adjust.
4349
4350 * src/reader.c (symbol_check_defined, symbol_make_alias)
4351 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4352 (token_translations_init)
4353 Move to...
4354 * src/symtab.c: here.
4355 * src/reader.c (packsymbols): Move to...
4356 * src/symtab.h, src/symtab.c (symbols_pack): here.
4357 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4358 argument.
4359
e9bca3ad
AD
43602002-06-03 Akim Demaille <akim@epita.fr>
4361
4362 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4363 then statements.
4364
86eff183
AD
43652002-06-03 Akim Demaille <akim@epita.fr>
4366
4367 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4368 structs with non literals.
4369 * src/scan-skel.l: never-interactive.
4370 * src/conflicts.c (enum conflict_resolution_e): No trailing
4371 comma.
4372 * src/getargs.c (usage): Split long literal strings.
4373 Reported by Hans Aberg.
4374
717be197
AD
43752002-05-28 Akim Demaille <akim@epita.fr>
4376
4377 * data/bison.c++: Use C++ ostreams.
4378 (cdebug_): New member.
4379
670ddffd
AD
43802002-05-28 Akim Demaille <akim@epita.fr>
4381
4382 * src/output.c (output_skeleton): Be sure to allocate enough room
4383 for `/' _and_ for `\0' in full_skeleton.
4384
769b430f
AD
43852002-05-28 Akim Demaille <akim@epita.fr>
4386
4387 * data/bison.c++: Catch up with bison.simple:
4388 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4389 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4390 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4391 and popping traces.
4392
7067cb36
PH
43932002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4394
4395 * src/output.c (output_skeleton): Put an explicit path in front of
4396 the skeleton file name, rather than relying on the -I directory,
4397 to partially alleviate effects of having a skeleton file lying around
4398 in the current directory.
769b430f 4399
4a713ec2
PH
44002002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4401
769b430f 4402 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
4403 obstack_printf should be obstack_fgrow1.
4404
b408954b
AD
44052002-05-26 Akim Demaille <akim@epita.fr>
4406
4407 * src/state.h (state_t): `solved_conflicts' is a new member.
4408 * src/LR0.c (new_state): Set it to 0.
4409 * src/conflicts.h, src/conflicts.c (print_conflicts)
4410 (free_conflicts, solve_conflicts): Rename as...
4411 (conflicts_print, conflicts_free, conflicts_solve): these.
4412 Adjust callers.
4413 * src/conflicts.c (enum conflict_resolution_e)
4414 (solved_conflicts_obstack): New, used by...
4415 (log_resolution): this.
4416 Adjust to attach the conflict resolution to each state.
4417 Complete the description with the precedence/associativity
4418 information.
4419 (resolve_sr_conflict): Adjust.
4420 * src/print.c (print_state): Output its solved_conflicts.
4421 * tests/conflicts.at (Unresolved SR Conflicts)
4422 (Solved SR Conflicts): Exercise --report=all.
4423
a49aecd5
AD
44242002-05-26 Akim Demaille <akim@epita.fr>
4425
4426 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4427 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4428 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4429 (token_number_t, item_number_as_token_number)
4430 (token_number_as_item_number, muscle_insert_token_number_table):
4431 Rename as...
4432 (symbol_number_t, item_number_as_symbol_number)
4433 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4434 these, since it is more appropriate.
4435
5504898e
AD
44362002-05-26 Akim Demaille <akim@epita.fr>
4437
4438 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4439 `Error:' lines.
4440 * data/bison.simple (yystos) [YYDEBUG]: New.
4441 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4442 error recovery.
4443 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4444
ec3bc396
AD
44452002-05-25 Akim Demaille <akim@epita.fr>
4446
4447 * doc/bison.texinfo (Debugging): Split into...
4448 (Tracing): this new section, its former contents, and...
4449 (Understanding): this new section.
4450 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4451 by...
4452 (report_flag): this.
4453 Adjust all dependencies.
4454 (report_args, report_types, report_argmatch): New.
4455 (usage, getargs): Report/support -r, --report.
4456 * src/options.h
4457 (struct option_table_struct): Rename as..,
4458 (struct option_table_s): this.
4459 Rename the `set_flag' member to `flag' to match with getopt_long's
4460 struct.
4461 * src/options.c (option_table): Split verbose into an entry for
4462 %verbose, and another for --verbose.
4463 Support --report/-r, so remove -r from the obsolete --raw.
4464 * src/print.c: Attach full item sets and lookaheads reports to
4465 report_flag instead of trace_flag.
4466 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4467
78df8250
PE
44682002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4469 and Paul Eggert <eggert@twinsun.com>
769b430f 4470
78df8250
PE
4471 * data/bison.simple (yyparse): Correct error handling to conform to
4472 POSIX and yacc. Specifically, after syntax error is discovered,
4473 do not reduce further before shifting the error token.
4474 Clean up the code a bit by removing the labels yyerrdefault,
4475 yyerrhandle, yyerrpop.
4476 * NEWS: Document the above.
4477
c0c9ea05
PH
44782002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4479
4480 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4481 type; it isn't always big enough, since it doesn't necessarily
4482 include non-terminals.
769b430f 4483 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
4484 the latter can be removed.
4485 (yy_token_number_type): Remove, only one use.
4486 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4487 don't use TokenNumberType as element type.
769b430f 4488
c0c9ea05
PH
4489 * tests/regression.at: Modify expected output to agree with change
4490 to yyr1 and yytranslate.
769b430f 4491
6390a83f
FK
44922002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4493
4494 * src/reader.c (parse_action): Use copy_character instead of
4495 obstack_1grow.
4496
db7c8e9a
AD
44972002-05-13 Akim Demaille <akim@epita.fr>
4498
4499 * tests/regression.at (Token definitions): Prototype yylex and
4500 yyerror.
4501
fcc61800
PH
45022002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4503
158c687b 4504 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
4505 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4506 32-bit arithmetic.
4507 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4508
5683e9b2
AD
45092002-05-07 Akim Demaille <akim@epita.fr>
4510
4511 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4512 avoid GCC warnings.
4513
0c2d3f4c
AD
45142002-05-07 Akim Demaille <akim@epita.fr>
4515
4516 Kill GCC warnings.
4517
4518 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4519 over the RHS of each rule.
4520 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4521 * src/state.h (state_t): Member `nitems' is unsigned short.
4522 * src/LR0.c (get_state): Adjust.
4523 * src/reader.c (packgram): Likewise.
4524 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4525 `Type'.
4526 (muscle_insert_int_table): Remove, unused.
4527 (prepare_rules): Remove `max'.
4528
1565b720
AD
45292002-05-06 Akim Demaille <akim@epita.fr>
4530
4531 * src/closure.c (print_firsts): Display of the symbol tags.
4532 (bitmatrix_print): Move to...
4533 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4534 here.
4535 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4536
cfaee611
AD
45372002-05-06 Akim Demaille <akim@epita.fr>
4538
4539 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4540 hash_do_for_each.
4541
458be8e0
AD
45422002-05-06 Akim Demaille <akim@epita.fr>
4543
4544 * src/LR0.c (new_state, get_state): Instead of using the global
4545 `kernel_size' and `kernel_base', have two new arguments:
4546 `core_size' and `core'.
4547 Adjust callers.
4548
a900a624
AD
45492002-05-06 Akim Demaille <akim@epita.fr>
4550
4551 * src/reader.c (packgram): No longer end `ritem' with a 0
4552 sentinel: it is not used.
4553
d4e7d3a1
AD
45542002-05-05 Akim Demaille <akim@epita.fr>
4555
4556 New experimental feature: display the lookaheads in the report and
4557 graph.
4558
4559 * src/print (print_core): When --trace-flag, display the rules
4560 lookaheads.
4561 * src/print_graph.c (print_core): Likewise.
4562 Swap the arguments.
4563 Adjust caller.
4564
39ceb25b
AD
45652002-05-05 Akim Demaille <akim@epita.fr>
4566
4567 * tests/torture.at (Many lookaheads): New test.
4568
5372019f
AD
45692002-05-05 Akim Demaille <akim@epita.fr>
4570
4571 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4572 (GENERATE_MUSCLE_INSERT_TABLE): this.
4573 (output_int_table, output_unsigned_int_table, output_short_table)
4574 (output_token_number_table, output_item_number_table): Replace with...
4575 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4576 (muscle_insert_short_table, muscle_insert_token_number_table)
4577 (muscle_insert_item_number_table): these.
4578 Adjust all callers.
4579 (prepare_tokens): Don't free `translations', since...
4580 * src/reader.h, src/reader.c (grammar_free): do it.
4581 Move to...
4582 * src/gram.h, src/gram.c (grammar_free): here.
4583 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4584 b4_translate_max.
4585
5df5f6d5
AD
45862002-05-05 Akim Demaille <akim@epita.fr>
4587
4588 * src/output.c (output_unsigned_int_table): New.
4589 (prepare_rules): `i' is unsigned.
4590 `prhs', `rline', `r2' are unsigned int.
4591 Rename muscle `rhs_number_max' as `rhs_max'.
4592 Output muscles `prhs_max', `rline_max', and `r2_max'.
4593 Free rline and r1.
4594 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4595 to compute types instead of constant types.
4596 * tests/regression.at (Web2c Actions): Adjust.
4597
b87f8b21
AD
45982002-05-04 Akim Demaille <akim@epita.fr>
4599
4600 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4601 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4602 Adjust dependencies.
4603 * src/output.c (token_definitions_output): Be sure not to output a
4604 `#define 'a'' when fed with `%token 'a' "a"'.
4605 * tests/regression.at (Token definitions): New.
4606
8bb936e4
PE
46072002-05-03 Paul Eggert <eggert@twinsun.com>
4608
4609 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4610 for K&R C.
4611
46122002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4613
4614 * Makefile.am (SUBDIRS): Remove intl.
4615 (EXTRA_DIST): Add config/config.rpath.
4616
53c71a12
AD
46172002-05-03 Akim Demaille <akim@epita.fr>
4618
4619 * data/bison.simple (m4_if): Don't output empty enums.
4620 And actually, output valid enum definitions :(.
4621
289dd0cf
AD
46222002-05-03 Akim Demaille <akim@epita.fr>
4623
4624 * configure.bat: Remove, completely obsolete.
4625 * Makefile.am (EXTRA_DIST): Adjust.
4626 Don't distribute config.rpath...
4627 * config/Makefile.am (EXTRA_DIST): Do it.
4628
db85e524
AD
46292002-05-03 Akim Demaille <akim@epita.fr>
4630
4631 * configure.in (GETTEXT_VERSION): New.
4632 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4633
83ccf991
AD
46342002-05-03 Akim Demaille <akim@epita.fr>
4635
4636 * data/bison.simple (b4_token_enum): New.
4637 (b4_token_defines): Use it to output tokens both as #define and
4638 enums.
4639 Suggested by Paul Eggert.
4640 * src/output.c (token_definitions_output): Don't output spurious
4641 white spaces.
4642
1f418995
AD
46432002-05-03 Akim Demaille <akim@epita.fr>
4644
4645 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4646
45119f04
RA
46472002-05-02 Robert Anisko <robert@lrde.epita.fr>
4648
4649 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4650 Update the stack class, give a try to deque as the default container.
4651
b2d52318
AD
46522002-05-02 Akim Demaille <akim@epita.fr>
4653
4654 * data/bison.simple (yyparse): Do not implement @$ = @1.
4655 (YYLLOC_DEFAULT): Adjust to do it.
4656 * doc/bison.texinfo (Location Default Action): Fix.
4657
3a8b4109
AD
46582002-05-02 Akim Demaille <akim@epita.fr>
4659
4660 * src/reader.c (parse_braces): Merge into...
4661 (parse_action): this.
4662
84614e13
AD
46632002-05-02 Akim Demaille <akim@epita.fr>
4664
4665 * configure.in (ALL_LINGUAS): Remove.
4666 * po/LINGUAS, hr.po: New.
4667
fdbcd8e2
AD
46682002-05-02 Akim Demaille <akim@epita.fr>
4669
4670 Remove the so called hairy (semantic) parsers.
4671
4672 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4673 * src/gram.h, src/gram.c (semantic_parser): Remove.
4674 (rule_t): Remove the guard and guard_line members.
4675 * src/lex.h (token_t): remove tok_guard.
4676 * src/options.c (option_table): Remove %guard and %semantic_parser
4677 support.
4678 * src/output.c, src/output.h (guards_output): Remove.
4679 (prepare): Adjust.
4680 (token_definitions_output): Don't output the `T'
4681 tokens (???).
4682 (output_skeleton): Don't output the guards.
4683 * src/files.c, src/files.c (attrsfile): Remove.
4684 * src/reader.c (symbol_list): Remove the guard and guard_line
4685 members.
4686 Adjust dependencies.
4687 (parse_guard): Remove.
4688 * data/bison.hairy: Remove.
4689 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4690 BISON_HAIRY.
4691
82b6cb3f
AD
46922002-05-02 Akim Demaille <akim@epita.fr>
4693
4694 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4695 (parse_guard): Rename the formal argument `stack_offset' as
4696 `rule_length', which is more readable.
4697 Adjust callers.
4698 (copy_at, copy_dollar): Instead of outputting the hard coded
4699 values of $$, $n and so forth, output invocation to b4_lhs_value,
4700 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
4701 Note: this patch partially drops `semantic-parser' support: it
4702 always does `rule_length - n', where semantic parsers ought to
4703 always use `-n'.
82b6cb3f
AD
4704 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4705 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4706
6cbfbcc5
AD
47072002-05-02 Akim Demaille <akim@epita.fr>
4708
4709 * configure.in (AC_INIT): Bump to 1.49b.
4710 (AM_INIT_AUTOMAKE): Short invocation.
4711
b8548114
AD
47122002-05-02 Akim Demaille <akim@epita.fr>
4713
4714 Version 1.49a.
4715
c20cd1fa
AD
47162002-05-01 Akim Demaille <akim@epita.fr>
4717
4718 * src/skeleton.h: Remove.
4719
8a9566d4
AD
47202002-05-01 Akim Demaille <akim@epita.fr>
4721
4722 * src/skeleton.h: Fix the #endif.
4723 Reported by Magnus Fromreide.
4724
8c6d399a
PE
47252002-04-26 Paul Eggert <eggert@twinsun.com>
4726
4727 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4728 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 4729 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 4730
2b7ed18a
RA
47312002-04-25 Robert Anisko <robert@lrde.epita.fr>
4732
4733 * src/scan-skel.l: Postprocess quadrigraphs.
4734
4735 * src/reader.c (copy_character): New function, used to output
4736 single characters while replacing `[' and `]' with quadrigraphs, to
4737 avoid troubles with M4 quotes.
4738 (copy_comment): Output characters with copy_character.
4739 (read_additionnal_code): Likewise.
4740 (copy_string2): Likewise.
4741 (copy_definition): Likewise.
4742
4743 * tests/calc.at: Exercise M4 quoting.
4744
34a89c50
AD
47452002-04-25 Akim Demaille <akim@epita.fr>
4746
4747 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4748 between `!' and the command.
4749 Reported by Paul Eggert.
4750
0dd1580a
RA
47512002-04-24 Robert Anisko <robert@lrde.epita.fr>
4752
4753 * tests/calc.at: Exercise prologue splitting.
4754
4755 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4756 `b4_post_prologue' instead of `b4_prologue'.
4757
4758 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4759 muscles.
4760 (output): Free pre_prologue_obstack and post_prologue_obstack.
4761 * src/files.h, src/files.c (attrs_obstack): Remove.
4762 (pre_prologue_obstack, post_prologue_obstack): New.
4763 * src/reader.c (copy_definition): Add a parameter to specify the
4764 obstack to fill, instead of using attrs_obstack unconditionally.
4765 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4766 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4767
83c1796f
PE
47682002-04-23 Paul Eggert <eggert@twinsun.com>
4769
4770 * data/bison.simple: Remove unnecessary commentary and white
4771 space differences from 1_29-branch.
4772 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4773
4774 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4775 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4776 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4777 constructors or destructors.
4778
4779 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4780
1207eeac
AD
47812002-04-23 Akim Demaille <akim@epita.fr>
4782
4783 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4784 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4785 location with columns.
4786 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4787 All reported by Paul Eggert.
4788
78ab8f67
AD
47892002-04-22 Akim Demaille <akim@epita.fr>
4790
4791 * src/reduce.c (dump_grammar): Move to...
4792 * src/gram.h, src/gram.c (grammar_dump): here.
4793 Be sure to separate long item numbers.
4794 Don't read the members of a rule's prec if its nil.
4795
133c20e2
AD
47962002-04-22 Akim Demaille <akim@epita.fr>
4797
4798 * src/output.c (table_size, table_grow): New.
4799 (MAXTABLE): Remove, replace uses with table_size.
4800 (pack_vector): Instead of dying when the table is too big, grow it.
4801
9515e8a7
AD
48022002-04-22 Akim Demaille <akim@epita.fr>
4803
4804 * data/bison.simple (yyr1): Its type is that of a token number.
4805 * data/bison.c++ (r1_): Likewise.
4806 * tests/regression.at (Web2c Actions): Adjust.
4807
23c5a174
AD
48082002-04-22 Akim Demaille <akim@epita.fr>
4809
4810 * src/reader.c (token_translations_init): 256 is now the default
4811 value for the error token, i.e., it will be assigned another
4812 number if the user assigned 256 to one of her tokens.
4813 (reader): Don't force 256 to error.
4814 * doc/bison.texinfo (Symbols): Adjust.
4815 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4816 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4817 etc. instead of 10, 20, 30 (which was used to `jump' over error
4818 (256) and undefined (2)).
4819
5fbb0954
AD
48202002-04-22 Akim Demaille <akim@epita.fr>
4821
4822 Propagate more token_number_t.
4823
4824 * src/gram.h (token_number_as_item_number)
4825 (item_number_as_token_number): New.
4826 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4827 Use it to create output_item_number_table and
4828 output_token_number_table.
4829 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4830 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4831 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4832 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4833
4f940944
AD
48342002-04-22 Akim Demaille <akim@epita.fr>
4835
4836 * src/output.h, src/output.c (get_lines_number): Remove.
4837
3ded9a63
AD
48382002-04-19 Akim Demaille <akim@epita.fr>
4839
4840 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4841 as Lex/Flex'.
4842 (Debugging): More details about enabling the debugging features.
4843 (Table of Symbols): Describe $$, $n, @$, and @n.
4844 Suggested by Tim Josling.
4845
e0c471a9
AD
48462002-04-19 Akim Demaille <akim@epita.fr>
4847
4848 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4849
fecc10cd
AD
48502002-04-10 Akim Demaille <akim@epita.fr>
4851
4852 * src/system.h: Rely on HAVE_LIMITS_H.
4853 Suggested by Paul Eggert.
4854
51dec47b
AD
48552002-04-09 Akim Demaille <akim@epita.fr>
4856
4857 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4858 full stderr, and strip it according to the bison options, instead
4859 of composing the error message from different bits.
4860 This makes it easier to check for several error messages.
4861 Adjust all the invocations.
4862 Add an invocation exercising the error token.
4863 Add an invocation demonstrating a stupid error message.
4864 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4865 Adjust the tests.
4866 Error message are for stderr, not stdout.
4867
007a50a4
AD
48682002-04-09 Akim Demaille <akim@epita.fr>
4869
4870 * src/gram.h, src/gram.c (error_token_number): Remove, use
4871 errtoken->number.
4872 * src/reader.c (reader): Don't specify the user token number (2)
4873 for $undefined, as it uselessly prevents using it.
4874 * src/gram.h (token_number_t): Move to...
4875 * src/symtab.h: here.
4876 (state_t.number): Is a token_number_t.
4877 * src/print.c, src/reader.c: Use undeftoken->number instead of
4878 hard coded 2.
4879 (Even though this 2 is not the same as above: the number of the
4880 undeftoken remains being 2, it is its user token number which
4881 might not be 2).
4882 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4883 `user_token_number_max'.
4884 Output `undef_token_number'.
4885 * data/bison.simple, data/bison.c++: Use them.
4886 Be sure to map invalid yylex return values to
4887 `undef_token_number'. This saves us from gratuitous SEGV.
4888
4889 * tests/conflicts.at (Solved SR Conflicts)
4890 (Unresolved SR Conflicts): Adjust.
4891 * tests/regression.at (Web2c Actions): Adjust.
4892
06446ccf
AD
48932002-04-08 Akim Demaille <akim@epita.fr>
4894
4895 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4896 Adding #line.
4897 Remove the duplicate `typedefs'.
4898 (RhsNumberType): Fix the declaration and various other typos.
4899 Use __ofile__.
4900 * data/bison.simple: Use __ofile__.
4901 * src/scan-skel.l: Handle __ofile__.
4902
62a3e4f0
AD
49032002-04-08 Akim Demaille <akim@epita.fr>
4904
4905 * src/gram.h (item_number_t): New, the type of item numbers in
4906 RITEM. Note that it must be able to code symbol numbers as
4907 positive number, and the negation of rule numbers as negative
4908 numbers.
4909 Adjust all dependencies (pretty many).
4910 * src/reduce.c (rule): Remove this `short *' pointer: use
4911 item_number_t.
4912 * src/system.h (MINSHORT, MAXSHORT): Remove.
4913 Include `limits.h'.
4914 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4915 (shortcpy): Remove.
4916 (MAXTABLE): Move to...
4917 * src/output.c (MAXTABLE): here.
4918 (prepare_rules): Use output_int_table to output rhs.
4919 * data/bison.simple, data/bison.c++: Adjust.
4920 * tests/torture.at (Big triangle): Move the limit from 254 to
4921 500.
4922 * tests/regression.at (Web2c Actions): Ajust.
4923
4924 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4925 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4926 passes, but produces negative #line number, once fixed, GCC is
4927 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4928 C), it passes.
4929 * src/state.h (state_h): Code input lines on ints, not shorts.
4930
bb88b0fc
AD
49312002-04-08 Akim Demaille <akim@epita.fr>
4932
4933 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4934 and then the grammar.
4935
9a636f47
AD
49362002-04-08 Akim Demaille <akim@epita.fr>
4937
4938 * src/system.h: No longer using strndup.
4939
680e8701
AD
49402002-04-07 Akim Demaille <akim@epita.fr>
4941
4942 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4943 * src/output.c (output_table_data): Return the longest number.
4944 (prepare_tokens): Output `token_number_max').
4945 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4946 New.
4947 Use them to define yy_token_number_type/TokenNumberType.
4948 Use this type for yytranslate.
4949 * tests/torture.at (Big triangle): Push the limit from 124 to
4950 253.
4951 * tests/regression.at (Web2c Actions): Adjust.
4952
817e9f41
AD
49532002-04-07 Akim Demaille <akim@epita.fr>
4954
4955 * tests/torture.at (Big triangle): New.
4956 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4957 * tests/existing.at: here.
4958
5123689b
AD
49592002-04-07 Akim Demaille <akim@epita.fr>
4960
4961 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4962 nritems.
4963 Adjust dependencies.
4964
f3849179
AD
49652002-04-07 Akim Demaille <akim@epita.fr>
4966
4967 * src/reader.c: Normalize increments to prefix form.
4968
bd02036a
AD
49692002-04-07 Akim Demaille <akim@epita.fr>
4970
4971 * src/reader.c, symtab.c: Remove debugging code.
4972
db8837cb
AD
49732002-04-07 Akim Demaille <akim@epita.fr>
4974
4975 Rename all the `bucket's as `symbol_t'.
4976
4977 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4978 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4979 * src/symtab.c, src/symtab.h (bucket): Rename as...
4980 (symbol_t): this.
4981 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4982 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
4983 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4984 (buckets_new, buckets_free, buckets_do): Rename as...
4985 (symbol_list_new, symbol_check_defined, symbol_make_alias)
4986 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4987 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
4988 (symbols_new, symbols_free, symbols_do): these.
4989
72a23c97
AD
49902002-04-07 Akim Demaille <akim@epita.fr>
4991
4992 Use lib/hash for the symbol table.
4993
4994 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
4995 EOF.
4996 * src/lex.c (lex): Set the `number' member of new terminals.
4997 * src/reader.c (bucket_check_defined, bucket_make_alias)
4998 (bucket_check_alias_consistence, bucket_translation): New.
4999 (reader, grammar_free, readgram, token_translations_init)
5000 (packsymbols): Adjust.
5001 (reader): Number the predefined tokens.
5002 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5003 for predefined tokens.
5004 * src/symtab.h (bucket): Remove all the hash table related
5005 members.
5006 * src/symtab.c (symtab): Replace by...
5007 (bucket_table): this.
5008 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5009 (buckets_new, buckets_do): New.
5010
280a38c3
AD
50112002-04-07 Akim Demaille <akim@epita.fr>
5012
5013 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5014 (start_symbol, max_user_token_number, semantic_parser)
5015 (error_token_number): Initialize.
5016 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5017 Initialize.
5018 (reader): Don't.
5019 (errtoken, eoftoken, undeftoken, axiom): Extern.
5020
03b31c0c
AD
50212002-04-07 Akim Demaille <akim@epita.fr>
5022
5023 * src/gram.h (rule_s): prec and precsym are now pointers
5024 to the bucket giving the priority/associativity.
5025 Member `associativity' removed: useless.
5026 * src/reduce.c, src/conflicts.c: Adjust.
5027
8b3df748
AD
50282002-04-07 Akim Demaille <akim@epita.fr>
5029
5030 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5031 Properly escape the symbols' TAG when outputting them.
5032
e601aa1d
AD
50332002-04-07 Akim Demaille <akim@epita.fr>
5034
5035 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5036
b0299a2e
AD
50372002-04-07 Akim Demaille <akim@epita.fr>
5038
5039 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5040 (LArule): this, which is an array to rule_t*.
5041 * src/print.c, src/conflicts.c: Adjust.
5042
d7e1f00c
AD
50432002-04-07 Akim Demaille <akim@epita.fr>
5044
5045 * src/gram.h (rule_t): Rename `number' as `user_number'.
5046 `number' is a new member.
5047 Adjust dependencies.
5048 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5049
cc9305dd
AD
50502002-04-07 Akim Demaille <akim@epita.fr>
5051
5052 As a result of the previous patch, it is no longer needed
5053 to reorder ritem itself.
5054
5055 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5056
b0940840
AD
50572002-04-07 Akim Demaille <akim@epita.fr>
5058
5059 Be sure never to walk through RITEMS, but use only data related to
5060 the rules themselves. RITEMS should be banished.
5061
5062 * src/output.c (output_token_translations): Rename as...
5063 (prepare_tokens): this.
5064 In addition to `translate', prepare the muscles `tname' and
5065 `toknum', which were handled by...
5066 (output_rule_data): this.
5067 Remove, and move the remainder of its outputs into...
5068 (prepare_rules): this new routines, which also merges content from
5069 (output_gram): this.
5070 (prepare_rules): Be sure never to walk through RITEMS.
5071 (output_stos): Rename as...
5072 (prepare_stos): this.
5073 (output): Always invoke prepare_states, after all, just don't use it
5074 in the output if you don't need it.
5075
643a5994
AD
50762002-04-07 Akim Demaille <akim@epita.fr>
5077
5078 * src/LR0.c (new_state): Display `nstates' as the name of the
5079 newly created state.
5080 Adjust to initialize first_state and last_state if needed.
5081 Be sure to distinguish the initial from the final state.
5082 (new_states): Create the itemset of the initial state, and use
5083 new_state.
5084 * src/closure.c (closure): Now that the initial state has its
5085 items properly set, there is no need for a special case when
5086 creating `ruleset'.
5087
5088 As a result, now the rule 0, reducing to $axiom, is visible in the
5089 outputs. Adjust the test suite.
5090
5091 * tests/conflicts.at (Solved SR Conflicts)
5092 (Unresolved SR Conflicts): Adjust.
5093 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5094 * tests/conflicts.at (S/R in initial): New.
5095
b4c4ccc2
AD
50962002-04-07 Akim Demaille <akim@epita.fr>
5097
5098 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5099 the RHS of the rules.
5100 * src/output.c (output_gram): Likewise.
5101
bba97eb2
AD
51022002-04-07 Akim Demaille <akim@epita.fr>
5103
5104 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5105 bucket.
5106 Adjust all dependencies.
5107 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5108 `number' of the buckets too.
5109 * src/gram.h: Include `symtab.h'.
5110 (associativity): Move to...
5111 * src/symtab.h: here.
5112 No longer include `gram.h'.
5113
c3b407f4
AD
51142002-04-07 Akim Demaille <akim@epita.fr>
5115
5116 * src/gram.h, src/gram.c (rules_rhs_length): New.
5117 (ritem_longest_rhs): Use it.
5118 * src/gram.h (rule_t): `number' is a new member.
5119 * src/reader.c (packgram): Set it.
5120 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5121 the end of `rules', and count them out of `nrules'.
5122 (reduce_output, dump_grammar): Adjust.
5123 * src/print.c (print_grammar): It is no longer needed to check for
5124 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5125 * tests/reduce.at (Reduced Automaton): New test.
5126
11652ab3
AD
51272002-04-07 Akim Demaille <akim@epita.fr>
5128
5129 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5130 lacking `+ 1' to nrules, Bison reported as useless a token if it
5131 was used solely to set the precedence of the last rule...
5132
26b23c1a
AD
51332002-04-07 Akim Demaille <akim@epita.fr>
5134
5135 * data/bison.c++, data/bison.simple: Don't output the current file
5136 name in #line, to avoid useless diffs between two identical
5137 outputs under different names.
5138
18bcecb0
AD
51392002-04-07 Akim Demaille <akim@epita.fr>
5140
5141 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5142 Normalize loops to using `< nrules + 1', not `<= nrules'.
5143
fa770c86
AD
51442002-04-07 Akim Demaille <akim@epita.fr>
5145
5146 * TODO: Update.
5147
d9b739c3
AD
51482002-04-07 Akim Demaille <akim@epita.fr>
5149
5150 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5151 bucket.value as bucket.number.
5152
99013900
AD
51532002-04-07 Akim Demaille <akim@epita.fr>
5154
5155 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5156 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5157 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5158 RHS, instead of being an index in RITEMS.
5159
e966383b
PE
51602002-04-04 Paul Eggert <eggert@twinsun.com>
5161
5162 * doc/bison.texinfo: Update copyright date.
5163 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5164 (Symbols): Warn about running Bison in one character set,
5165 but compiling and/or running in an incompatible one.
5166 Warn about character code 256, too.
5167
51682002-04-03 Paul Eggert <eggert@twinsun.com>
5169
5170 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5171 YYERROR_VERBOSE is nonzero, not whether it is defined.
5172
5173 Merge changes from bison-1_29-branch.
c307773e 5174
8d6c48b9
PE
51752002-03-20 Paul Eggert <eggert@twinsun.com>
5176
5177 Merge fixes from Debian bison_1.34-1.diff.
5178
5179 * configure.in (AC_PREREQ): 2.53.
5180
e53c6322
AD
51812002-03-20 Akim Demaille <akim@epita.fr>
5182
5183 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5184
9ffbeca7
PE
51852002-03-19 Paul Eggert <eggert@twinsun.com>
5186
21db0b2a
PE
5187 * src/bison.simple (YYCOPY): New macro.
5188 (YYSTACK_RELOCATE): Use it.
5189 Remove Type arg; no longer needed. All callers changed.
5190 (yymemcpy): Remove; no longer needed.
5191
9ffbeca7
PE
5192 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5193 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5194
642cb8f8
AD
51952002-03-19 Akim Demaille <akim@epita.fr>
5196
5197 Test and fix the #line outputs.
5198
5199 * tests/atlocal.at (GCC): New.
5200 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5201 (Prologue synch line, ,%union synch line, Postprologue synch line)
5202 (Action synch line, Epilogue synch line): New tests.
5203 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5204 * data/bison.simple, data/bison.c++: Use it.
5205
3c31a486
AD
52062002-03-19 Akim Demaille <akim@epita.fr>
5207
5208 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5209 (Solved SR Conflicts, %expect not enough, %expect right)
5210 (%expect too much): Move to...
5211 * tests/conflicts.at: this new file.
5212
0d8bed56
AD
52132002-03-19 Akim Demaille <akim@epita.fr>
5214
5215 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5216 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5217 that we can move to enums for instance.
5218 * src/output.c (token_definitions_output): Output a list of
5219 `token-name, token-number' instead of the #define.
5220 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5221
9208d17f
AD
52222002-03-14 Akim Demaille <akim@epita.fr>
5223
5224 Use Gettext 0.11.1.
5225
af27eacb
RA
52262002-03-09 Robert Anisko <robert@lrde.epita.fr>
5227
5228 * data/bison.c++: Make the user able to add members to the generated
5229 parser by subclassing.
5230
9101a310
RA
52312002-03-05 Robert Anisko <robert@lrde.epita.fr>
5232
5233 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5234 a character.
5235 Reported by Nicolas Tisserand and Nicolas Burrus.
5236
fff9bf0b
RA
52372002-03-04 Robert Anisko <robert@lrde.epita.fr>
5238
5239 * src/reader.c: Warn about lacking semi-colons, do not complain.
5240
64dba31e
RA
52412002-03-04 Robert Anisko <robert@lrde.epita.fr>
5242
5243 * data/bison.c++: Remove a debug line.
5244
374f5a14
RA
52452002-03-04 Robert Anisko <robert@lrde.epita.fr>
5246
5247 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5248 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5249 provide a default implementation.
5250
bfcf1f3a
AD
52512002-03-04 Akim Demaille <akim@epita.fr>
5252
5253 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5254 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5255 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5256 * tests/semantic.at (Parsing Guards): Similarly.
5257 * src/reader.at (readgram): Complain if the last rule is not ended
5258 with a semi-colon.
5259
65ccf9fc
AD
52602002-03-04 Akim Demaille <akim@epita.fr>
5261
5262 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5263 * src/closure.c: here.
5264 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5265 RTC.
5266 * src/warshall.h, src/warshall.c: Remove.
5267 * tests/sets.at (Broken Closure): Adjust.
5268
d0039cbc
AD
52692002-03-04 Akim Demaille <akim@epita.fr>
5270
5271 * src/output.c (output_skeleton): tempdir is const.
5272 bytes_read is unused.
5273
345cea78
AD
52742002-03-04 Akim Demaille <akim@epita.fr>
5275
5276 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5277 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5278 Update.
5279 From Michael Hayes.
5280
564801f7
AD
52812002-03-04 Akim Demaille <akim@epita.fr>
5282
5283 * src/closure.c (closure): `r' is unused.
5284
e5352bc7
AD
52852002-03-04 Akim Demaille <akim@epita.fr>
5286
5287 * tests/sets.at (Broken Closure): Add the ending `;'.
5288 * src/reader.at (readgram): Complain if a rule is not ended with a
5289 semi-colon.
5290
914feea9
AD
52912002-03-04 Akim Demaille <akim@epita.fr>
5292
5293 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5294 (count_sr_conflicts): Use bitset_count.
5295 * src/reduce.c (inaccessable_symbols): Ditto.
5296 (bits_size): Remove.
5297 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5298
f0250de6
AD
52992002-03-04 Akim Demaille <akim@epita.fr>
5300
5301 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5302 * src/reduce.c: Remove the `bitset_zero's following the
5303 `bitset_create's, as now it is performed by the latter.
5304
ef017502
AD
53052002-03-04 Akim Demaille <akim@epita.fr>
5306
5307 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5308 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5309 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5310 latest sources from Michael.
5311
76514394
AD
53122002-03-04 Akim Demaille <akim@epita.fr>
5313
5314 * src/output.c (output): Don't free the grammar.
5315 * src/reader.c (grammar_free): New.
5316 * src/main.c (main): Call it and don't free symtab here.
5317
55024580
AD
53182002-03-04 Akim Demaille <akim@epita.fr>
5319
5320 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5321 before returning.
5322 Reported by Benoit Perrot.
5323
f9abaa2c
AD
53242002-03-04 Akim Demaille <akim@epita.fr>
5325
5326 Use bitset operations when possible, not loops over bits.
5327
5328 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5329 bitset_or.
5330 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5331 * src/reduce.c (useless_nonterminals): Formatting changes.
5332 * src/warshall.c (TC): Use bitset_or.
5333
0e721e75
AD
53342002-03-04 Akim Demaille <akim@epita.fr>
5335
5336 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5337 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5338 Ditto.
5339
0fb1ffb1
AD
53402002-03-04 Akim Demaille <akim@epita.fr>
5341
5342 * src/lalr.c (F): Now a bitset*.
5343 Adjust all dependencies.
5344
b86796bf
AD
53452002-03-04 Akim Demaille <akim@epita.fr>
5346
5347 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5348 Adjust all dependencies.
5349
602bbf31
AD
53502002-03-04 Akim Demaille <akim@epita.fr>
5351
5352 * src/L0.c, src/LR0.h (nstates): Be size_t.
5353 Adjust comparisons (signed vs unsigned).
5354 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5355 bitset*.
5356 Adjust all dependencies.
5357
d8a0245c
AD
53582002-03-04 Akim Demaille <akim@epita.fr>
5359
5360 * src/closure.c (firsts): Now, also a bitset.
5361 Adjust all dependencies.
5362 (varsetsize): Remove, now unused.
5363 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5364
34ba9743
AD
53652002-03-04 Akim Demaille <akim@epita.fr>
5366
5367 * src/print.c: Convert to use bitset.h, not hand coded iterations
5368 over ints.
5369
ed86e78c
AD
53702002-03-04 Akim Demaille <akim@epita.fr>
5371
5372 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5373
dfdb1797
AD
53742002-03-04 Akim Demaille <akim@epita.fr>
5375
5376 * src/closure.c (ruleset): Be a bitset.
5377 (rulesetsize): Remove.
5378
7086e707
AD
53792002-03-04 Akim Demaille <akim@epita.fr>
5380
5381 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5382 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5383 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5384 * src/closure.c (fderives): Be an array of bitsets.
5385
98254360
RA
53862002-02-28 Robert Anisko <robert@lrde.epita.fr>
5387
5388 * data/bison.c++: Merge the two generated headers. Insert a copyright
5389 notice in each output file.
5390
a75c057f
AD
53912002-02-28 Akim Demaille <akim@epita.fr>
5392
5393 * data/bison.c++: Copy the prologue of bison.simple to fetch
5394 useful M4 definitions, such as b4_header_guard.
5395
06b00abc
AD
53962002-02-25 Akim Demaille <akim@epita.fr>
5397
5398 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
5399 translator friendly scheme for the bgr
5400 copyright notice.
06b00abc 5401
70e7d534
AD
54022002-02-25 Akim Demaille <akim@epita.fr>
5403
5404 * src/output.c (header_output): Remove, now handled completely via
5405 M4.
5406
abe017f6
AD
54072002-02-25 Akim Demaille <akim@epita.fr>
5408
5409 * m4/m4.m4: New, from CVS Autoconf.
5410 * configure.in: Invoke it.
5411 * src/output.c (output_skeleton): Use its result instead of the
5412 hard coded name.
5413
381fb12e
AD
54142002-02-25 Akim Demaille <akim@epita.fr>
5415
5416 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5417 Fileutils 4.1.5.
5418 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5419 * src/output.c (output_skeleton): Use mkstemp to create a real
5420 temporary file.
5421 Move the filling of `skeleton' and its muscle to...
5422 (prepare): here.
5423 (output): Move the definition of the prologue muscle to...
5424 (prepare): here.
5425 * src/system.h (DEFAULT_TMPDIR): New.
5426
6f38107f
PE
54272002-02-14 Paul Eggert <eggert@twinsun.com>
5428
5429 Remove the support for C++ namespace cleanliness; it was
5430 causing more problems than it was curing, since it didn't work
5431 properly on some nonstandard C++ compilers. This can wait
5432 for a proper C++ parser.
5433
5434 * NEWS: Document this.
5435 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5436 of C++, as it's treated like C now.
5437 * src/bison.simple (YYSTD): Remove.
5438 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5439 Treat C++ just like Standard C instead of trying to support
5440 namespace cleanliness.
5441
80cce3da
AD
54422002-02-14 Akim Demaille <akim@epita.fr>
5443
5444 * tests/regression.at (else): Adjust to Andreas' change.
5445
842e8679
AD
54462002-02-14 Akim Demaille <akim@epita.fr>
5447
5448 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5449
4bda3f10
AD
54502002-02-13 Andreas Schwab <schwab@suse.de>
5451
5452 * src/output.c (output_rule_data): Don't output NULL, it might
5453 not be defined yet.
5454
4162fa07 54552002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 5456
4162fa07
RA
5457 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5458 (Copyright notice): Update.
b418ecd8 5459
bd16a5dc
AD
54602002-02-11 Akim Demaille <akim@epita.fr>
5461
5462 * tests/regression.at (%nonassoc and eof): Don't include
5463 nonportable headers.
5464
8d69a1a3
RA
54652002-02-08 Robert Anisko <robert@lrde.epita.fr>
5466
5467 * data/bison.c++: Correct error recovery. Make the user able to
5468 initialize the starting location.
5469
9b2d0677
AD
54702002-02-07 Akim Demaille <akim@epita.fr>
5471
5472 * tests/input.at: New.
5473
69e2658b
RA
54742002-02-07 Robert Anisko <robert@lrde.epita.fr>
5475
5476 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 5477 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
5478 directives around tables only needed for debugging.
5479
4aacc3a7
RA
54802002-02-07 Robert Anisko <robert@lrde.epita.fr>
5481
5482 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5483 C++ parsers.
5484 (yy::b4_name::parse): Use print_.
5485
762a801e
RA
54862002-02-07 Robert Anisko <robert@lrde.epita.fr>
5487
5488 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5489
4bb2bc3f
RA
54902002-02-07 Robert Anisko <robert@lrde.epita.fr>
5491
5492 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5493 C++ parsers.
5494 (yy::b4_name::parse): Build verbose error messages, and use error_.
5495
6b45a3ca
RA
54962002-02-06 Robert Anisko <robert@lrde.epita.fr>
5497
5498 * data/bison.c++: Fix m4 quoting in comments.
5499
50997c6e
RA
55002002-02-06 Robert Anisko <robert@lrde.epita.fr>
5501
5502 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5503 not expanded by m4.
5504
3f3eed27
AD
55052002-02-05 Akim Demaille <akim@epita.fr>
5506
5507 * data/bison.c++: Adjust to the M4 back end.
5508 More is certainly needed.
5509
be2a1a68
AD
55102002-02-05 Akim Demaille <akim@epita.fr>
5511
5512 Give a try to M4 as a back end.
5513
5514 * lib/readpipe.c: New, from wdiff.
5515 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5516 BISON_HAIRY.
5517 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5518 specific values. Now it is m4 that performs the lookup.
5519 * src/parse-skel.y: Remove.
5520 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5521 * src/output.c (actions_output, guards_output)
5522 (token_definitions_output): No longer keeps track of the output
5523 line number, hence remove the second argument.
5524 (guards_output): Check against the guard member of a rule, not the
5525 action member.
5526 Adjust callers.
5527 (output_skeleton): Don't look for the skeleton location, let m4 do
5528 that.
5529 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5530 file will be used.
5531 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5532 (prepare): Given that for the time being changesyntax is not
5533 usable in M4, rename the muscles using `-' to `_'.
5534 Define `defines_flag', `output_parser_name' and `output_header_name'.
5535 * src/output.h (actions_output, guards_output)
5536 (token_definitions_output): Adjust prototypes.
5537 * src/scan-skel.l: Instead of scanning the skeletons, it now
5538 processes the output of m4: `__oline__' and `#output'.
5539 * data/bison.simple: Adjust to be used by M4(sugar).
5540 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5541 to date.
5542 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5543 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5544 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5545 shamelessly stolen from CVS Autoconf.
5546
beda758b
AD
55472002-02-05 Akim Demaille <akim@epita.fr>
5548
5549 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5550 * configure.in: Check for the declarations of free and malloc.
5551 * src/muscle_tab.c: Adjust.
5552
5ece6d43
AD
55532002-02-05 Akim Demaille <akim@epita.fr>
5554
5555 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5556 which have no values.
5557
5bb18f9a
AD
55582002-02-05 Akim Demaille <akim@epita.fr>
5559
5560 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5561 * data/: here.
5562
894dd62e
PE
55632002-01-29 Paul Eggert <eggert@twinsun.com>
5564
5565 * src/bison.simple (YYSIZE_T): Do not define merely because
5566 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5567 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5568
82841af7
AD
55692002-01-27 Akim Demaille <akim@epita.fr>
5570
5571 Fix `%nonassoc and eof'.
5572
5573 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5574 which were not properly copied! Replace
5575 memcpy (res->errs, src->errs, src->nerrs);
5576 with
5577 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5578 !!!
5579 * tests/regression.at (%nonassoc and eof): Adjust to newest
5580 Autotest: `.' is not in the PATH.
5581
318b76e9
AD
55822002-01-27 Akim Demaille <akim@epita.fr>
5583
5584 * tests/sets.at (AT_EXTRACT_SETS): New.
5585 (Nullable): Use it.
5586 (Firsts): New.
5587
30d2f3d5
AD
55882002-01-26 Akim Demaille <akim@epita.fr>
5589
5590 * tests/actions.at, tests/calc.at, tests/headers.at,
5591 * tests/torture.at: Adjust to the newest Autotest which no longer
5592 forces `.' in the PATH.
5593
30f8c395
AD
55942002-01-25 Akim Demaille <akim@epita.fr>
5595
5596 * tests/regression.at (%nonassoc and eof): New.
5597 Suggested by Robert Anisko.
5598
29ae55f1
AD
55992002-01-24 Akim Demaille <akim@epita.fr>
5600
5601 Bison dumps core when trying to complain about broken input files.
5602 Reported by Cris van Pelt.
5603
5604 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5605 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5606 into...
5607 (Invalid inputs): Strengthen: exercise parse_percent_token.
5608
2b548aa6
RA
56092002-01-24 Robert Anisko <robert.anisko@epita.fr>
5610
5611 * src/Makefile.am: Add bison.c++.
5612 * src/bison.c++: New skeleton.
5613
bb0146c2
AD
56142002-01-21 Paolo Bonzini <bonzini@gnu.org>
5615
5616 * po/it.po: New.
5617
bec30531
AD
56182002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5619
5620 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5621
fc6edc45
MA
56222002-01-20 Marc Autret <marc@gnu.org>
5623
5624 * src/files.c (compute_output_file_names): Fix
5625
5e5d5415
MA
56262002-01-20 Marc Autret <marc@gnu.org>
5627
5628 * tests/output.at: New test.
5629 * src/files.c (compute_base_names): Don't map extensions when
5630 the YACC flag is set, use defaults.
5631 Reported by Evgeny Stambulchik.
5632
44ea3fbd
MA
56332002-01-20 Marc Autret <marc@gnu.org>
5634
bb0146c2 5635 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
5636 compilers as well (i.e. the vendor C compiler).
5637 Suggested by Albert Chin-A-Young.
5638
338963d1
TVH
56392002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5640
5641 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5642 canonical definition.
5643 * src/system.h: Use the canonical definition for PARAMS (avoids
5644 a conflict with the macro from lib/hash.h).
5645
c57b2479
AD
56462002-01-11 Akim Demaille <akim@epita.fr>
5647
5648 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 5649 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 5650
b85810ae
AD
56512002-01-09 Akim Demaille <akim@epita.fr>
5652
5653 * src/files.c, src/files.h (output_infix): New.
5654 (tab_extension): Remove.
5655 (compute_base_names): Compute the former, drop the latter.
5656 * src/output.c (prepare): Insert the muscles `output-infix', and
5657 `output-suffix'.
5658 * src/parse-skel.y (string, string.1): New.
5659 (section.header): Use it.
5660 (section.yacc): Remove.
5661 (prefix): Remove too.
5662 * src/scan-skel.l: Adjust.
5663 * src/bison.simple, src/bison.hairy: Adjust.
5664
cae60122
AD
56652002-01-09 Akim Demaille <akim@epita.fr>
5666
5667 * configure.in (WERROR_CFLAGS): Compute it.
5668 * src/Makefile.am (CFLAGS): Pass it.
5669 * tests/atlocal.in (CFLAGS): Idem.
5670 * src/files.c: Fix a few warnings.
5671 (get_extension_index): Remove, unused.
5672
ae404801
AD
56732002-01-08 Akim Demaille <akim@epita.fr>
5674
5675 * src/getargs.c (AS_FILE_NAME): New.
5676 (getargs): Use it to convert DOSish file names.
5677 * src/files.c (base_name): Rename as full_base_name to avoid
5678 clashes with `base_name ()'.
5679 (filename_split): New.
5680 (compute_base_names): N-th rewrite, using filename_split.
5681
22312b71
AD
56822002-01-08 Akim Demaille <akim@epita.fr>
5683
5684 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5685 New, stolen from the Fileutils 4.1.
5686 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5687 * configure.in: Check for the presence of memrchr, and of its
5688 prototype.
5689
a67cef01
TVH
56902002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5691
5692 * lib/hash.h (__P): Added definition for this macro.
5693 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5694 BUILT_SOURCES, to ensure they are generated first.
5695 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5696 %error-verbose to allow bootstrapping with bison 1.30x.
5697
2b25d624
AD
56982002-01-06 Akim Demaille <akim@epita.fr>
5699
5700 * src/reader.c (parse_braces): Don't fetch the next char, the
5701 convention is to fetch on entry.
5702 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5703 'switch' without a following semicolon.
5704 * tests/regression.at (braces parsing): New.
5705
3460813b
AD
57062002-01-06 Akim Demaille <akim@epita.fr>
5707
5708 Bison is dead wrong in its RR conflict reports.
5709
5710 * tests/torture.at (GNU Cim Grammar): New.
5711 * src/conflicts.c (count_rr_conflicts): Fix.
5712
73784c64
AD
57132002-01-06 Akim Demaille <akim@epita.fr>
5714
5715 Creating package.m4 from configure.ac causes too many problems.
5716
5717 * tests/Makefile.am (package.m4): Create it by hand,
5718 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5719
25d81090
AD
57202002-01-06 Akim Demaille <akim@epita.fr>
5721
5722 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5723 skeleton.h.
5724
a9b8959e
PE
57252002-01-04 Paul Eggert <eggert@twinsun.com>
5726
5727 * doc/bison.texinfo (Debugging):
5728 Remove YYSTDERR; it's no longer defined or used.
5729 Also, s/cstdio.h/cstdio/.
5730
25d81090
AD
57312002-01-03 Akim Demaille <akim@epita.fr>
5732
5733 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5734
1109455c
AD
57352002-01-03 Akim Demaille <akim@epita.fr>
5736
5737 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5738 tracing code to --trace, wait for a better --trace option, with
5739 args.
5740
7ea5e977
AD
57412002-01-03 Akim Demaille <akim@epita.fr>
5742
5743 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5744 The ISO C++ standard is extremely clear about it: stderr is
5745 considered a macro, not a regular symbol (see table 94 `Header
5746 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5747 Therefore std:: does not apply to it. It still does with fprintf.
5748 Also, s/cstdio.h/cstdio/.
5749
fab5b110
AD
57502002-01-03 Akim Demaille <akim@epita.fr>
5751
5752 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5753 for non system headers.
5754
aed7fd9b
AD
57552002-01-02 Akim Demaille <akim@epita.fr>
5756
5757 Equip the skeleton chain with location tracking, runtime trace,
5758 pure parser and scanner.
5759
5760 * src/parse-skel.y: Request a pure parser, locations, and prefix
5761 renaming.
5762 (%union): Having several members with the same type does not help
5763 type mismatches, simplify.
5764 (YYPRINT, yyprint): New.
5765 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5766 (skel_error): this.
5767 Handle locations.
5768 * src/scan-skel.l: Adjust to these changes.
5769 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5770 (LOCATION_PRINT, skel_control_t): New.
5771
24fad99e
AD
57722001-12-30 Akim Demaille <akim@epita.fr>
5773
5774 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5775 replace `gb' with BLANKS.
5776 * src/scan-skel.l: Adjust.
5777
a4b36db4
AD
57782001-12-30 Akim Demaille <akim@epita.fr>
5779
5780 * src/system.h: We don't need nor want bcopy.
5781 Throw away MS-DOS crap: we don't need getpid.
5782 * configure.in: We don't need strndup. It was even causing
5783 problems: because Flex includes the headers *before* us,
5784 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5785 not visible.
5786 * lib/xstrndup.c: New.
5787 * src/scan-skel.l: Use it.
5788 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5789 * src/parse-skel.y: Use %directives instead of #defines.
5790
1239777d
AD
57912001-12-30 Akim Demaille <akim@epita.fr>
5792
5793 * src/skeleton.h: New.
5794 * src/output.c (output_parser, output_master_parser): Remove, dead
5795 code.
5796 * src/output.h (get_lines_number, actions_output, guards_output)
5797 (token_definitions_output): Prototype them.
5798 * src/parse-skel.y: Add the license notice.
5799 Include output.h and skeleton.h.
5800 (process_skeleton): Returns void, and takes a single parameter.
5801 * src/scan-skel.l: Add the license notice.
5802 Include skeleton.h.
5803 Don't use %option yylineno: it seems that then Flex imagines
5804 REJECT has been used, and therefore it won't reallocate its
5805 buffers (which makes no other sense to me than a bug). It results
5806 in warnings for `unused: yy_flex_realloc'.
5807
9b3add5b
RA
58082001-12-30 Robert Anisko <robert.anisko@epita.fr>
5809
5810 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5811 (MUSCLE_INSERT_PREFIX): ...to there.
5812 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5813 (MUSCLE_INSERT_PREFIX): Move from here...
5814
5815 * src/bison.hairy: Add a section directive. Put braces around muscle
5816 names. This parser skeleton is still broken, but Bison should not
5817 choke on a bad muscle 'syntax'.
5818 * src/bison.simple: Add a section directive. Put braces around muscle
5819 names.
5820
5821 * src/files.h (strsuffix, stringappend): Add declarations.
5822 (tab_extension): Add declaration.
5823 (short_base_name): Add declaration.
5824
5825 * src/files.c (strsuffix, stringappend): No longer static. These
5826 functions are used in the skeleton parser.
5827 (tab_extension): New.
5828 (compute_base_names): Use the computations done in this function
fab5b110 5829 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
5830 names.
5831 (short_base_name): No longer static.
5832
5833 * src/output.c (output_skeleton): New.
5834 (output): Disable call to output_master_parser, and give a try to
5835 a new skeleton handling system.
5836 (guards_output, actions_output): No longer static.
5837 (token_definitions_output, get_lines_number): No longer static.
5838
5839 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5840
fab5b110 5841 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
5842 parse-skel.y.
5843
5844 * src/parse-skel.y: New file.
5845 * src/scan-skel.l: New file.
5846
b5b61c61
AD
58472001-12-29 Akim Demaille <akim@epita.fr>
5848
5849 %name-prefix is broken.
5850
5851 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5852 Adjust all dependencies.
5853 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5854 %name-prefix.
5855
5856 Renaming yylval but not yylloc is not consistent. Now we do.
5857
5858 * src/bison.simple: Prefix yylloc if used.
5859 * doc/bison.texinfo (Decl Summary): Document that.
5860
8c9a50be
AD
58612001-12-29 Akim Demaille <akim@epita.fr>
5862
5863 * doc/bison.texinfo: Promote `%long-directive' over
5864 `%long_directive'.
5865 Remove all references to fixed-output-files, yacc is enough.
5866
d99361e6
AD
58672001-12-29 Akim Demaille <akim@epita.fr>
5868
5869 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5870 user prologue. These are defaults.
5871 * tests/actions.at (Mid-rule actions): Make sure the user can
5872 define YYDEBUG and YYERROR_VERBOSE.
5873
b9cecb91
AD
58742001-12-29 Akim Demaille <akim@epita.fr>
5875
5876 * src/output.c (header_output): Don't forget to export YYLTYPE and
5877 yylloc.
5878 * tests/headers.at (export YYLTYPE): New, make sure it does.
5879 * tests/regression.at (%union and --defines, Invalid CPP headers):
5880 Move to...
5881 * tests/headers.at: here.
5882
aea13e97
AD
58832001-12-29 Akim Demaille <akim@epita.fr>
5884
5885 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5886
931394cb
AD
58872001-12-29 Akim Demaille <akim@epita.fr>
5888
5889 * tests/actions.at (Mid-rule actions): Output on a single line
5890 instead of several.
5891
704a47c4
AD
58922001-12-29 Akim Demaille <akim@epita.fr>
5893
5894 * doc/bison.texinfo: Formatting changes.
5895
091e20bb
AD
58962001-12-29 Akim Demaille <akim@epita.fr>
5897
5898 Don't store the token defs in a muscle, just be ready to output it
5899 on command. Now possible via `symbols'. Fixes a memory leak.
5900
5901 * src/output.c (token_definitions_output): New.
5902 (output_parser, header_output): Use it.
5903 * src/reader.c (symbols_save): Remove.
5904
cce71710
AD
59052001-12-29 Akim Demaille <akim@epita.fr>
5906
5907 * src/bison.simple: Do not provide a default for YYSTYPE and
5908 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5909 default.
5910
82c035a8
AD
59112001-12-29 Akim Demaille <akim@epita.fr>
5912
5913 Mid-rule actions are simply... ignored!
5914
5915 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5916 the empty-rule associated to the dummy symbol, not to the host
5917 rule.
5918 * tests/actions.at (Mid-rule actions): New.
5919
8419d367
AD
59202001-12-29 Akim Demaille <akim@epita.fr>
5921
5922 Memory leak.
5923
5924 * src/reader.c (reader): Free grammar.
5925
375d5806
AD
59262001-12-29 Akim Demaille <akim@epita.fr>
5927
5928 Memory leak.
5929
5930 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5931 since it allocates it for each state, although only one is needed.
5932 (allocate_storage): Do it here.
5933
f51cb8ff
AD
59342001-12-29 Akim Demaille <akim@epita.fr>
5935
5936 * src/options.h, src/options.c (create_long_option_table): Rename
5937 as...
5938 (long_option_table_new): this, with a clearer prototype.
5939 (percent_table): Remove, unused,
5940 * src/getargs.c (getargs): Adjust.
5941
29e88316
AD
59422001-12-29 Akim Demaille <akim@epita.fr>
5943
5944 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5945 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5946 as states.
5947
b9f71f19
AD
59482001-12-29 Akim Demaille <akim@epita.fr>
5949
5950 * src/lalr.c (build_relations): Rename `states' as `states1'.
5951 Sorry, I don't understand exactly what it is, no better name...
5952
1a2b5d37
AD
59532001-12-29 Akim Demaille <akim@epita.fr>
5954
5955 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5956 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5957 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5958 as rules.
5959
1cca533e
AD
59602001-12-29 Akim Demaille <akim@epita.fr>
5961
5962 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5963 ago.
5964
c03ae966
AD
59652001-12-29 Akim Demaille <akim@epita.fr>
5966
5967 * src/reader.c, src/reader.h (user_toknums): Remove.
5968 Adjust all users to use symbols[i]->user_token_number.
5969
5a670b1e
AD
59702001-12-29 Akim Demaille <akim@epita.fr>
5971
5972 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5973 Adjust all users to use symbols[i]->prec or ->assoc.
5974
ad949da9
AD
59752001-12-29 Akim Demaille <akim@epita.fr>
5976
5977 * src/reader.c, src/reader.h (tags): Remove.
5978 Adjust all users to use symbols[i]->tag.
5979
0e78e603
AD
59802001-12-29 Akim Demaille <akim@epita.fr>
5981
5982 * src/gram.h, src/gram.c (symbols): New, similar to state_table
5983 and rule_table.
5984 * src/reader.c (packsymbols): Fill this table.
5985 Drop sprec.
5986 * src/conflicts.c (resolve_sr_conflict): Adjust.
5987 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
5988 single table.
5989 Use symbols[i]->tag instead of tags[i].
5990
213e640e
AD
59912001-12-29 Akim Demaille <akim@epita.fr>
5992
5993 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
5994 In addition, put a comment in there, to replace...
5995 * tests/regression.at (%union and C comments): Remove.
5996
e7b8bef1
AD
59972001-12-29 Akim Demaille <akim@epita.fr>
5998
5999 * tests/regression.at (Web2c Actions): Blindly move the actual
6000 output as expected output. The contents *seem* right to me, but I
6001 can't pretend reading perfectly parser tables... Nonetheless, all
6002 the other tests pass correctly, the table look OK, even though the
6003 presence of `$axiom' is to be noted: AFAICS it is useless (but
6004 harmless).
6005
b68e7744
AD
60062001-12-29 Akim Demaille <akim@epita.fr>
6007
6008 * src/reader.c (readgram): Don't add the rule 0 if there were no
6009 rules read. In other words, add it _after_ having performed
6010 grammar sanity checks.
6011 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6012
78d5bae9
AD
60132001-12-29 Akim Demaille <akim@epita.fr>
6014
6015 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6016 visible, and some states have now a different number.
6017
ff442794
AD
60182001-12-29 Akim Demaille <akim@epita.fr>
6019
6020 * src/reader.c (readgram): Bind the initial rule's lineno to that
6021 of the first rule.
6022 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6023 (Solved SR Conflicts): Adjust rule 0's line number.
6024
610ab194
AD
60252001-12-29 Akim Demaille <akim@epita.fr>
6026
6027 Fix the `GAWK Grammar' failure.
6028
6029 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6030 the reductions of the first state which was mistakenly confused
6031 with the final state because precisely final_state was initialized
6032 to 0.
6033 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6034 now noticed by Bison.
6035 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6036 have a reduction on $default.
6037
29d29c8f
AD
60382001-12-29 Akim Demaille <akim@epita.fr>
6039
6040 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6041 rule line numbers.
6042 * src/closure.c (print_closure): Likewise.
6043 * src/derives.c (print_derives): Likewise.
6044 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6045 now.
6046
7c6b64d0
AD
60472001-12-29 Akim Demaille <akim@epita.fr>
6048
6049 * src/lalr.c (lookaheads_print): New.
6050 (lalr): Call it when --trace-flag.
6051 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6052 are dumped.
6053
3d4daee3
AD
60542001-12-29 Akim Demaille <akim@epita.fr>
6055
6056 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6057 when walking through ritem, even via rule->rhs.
6058 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6059 (useful_production, useless_nonterminals): Likewise.
6060 (reduce_grammar_tables): Likewise, plus update nritems.
6061 * src/nullable.c (set_nullable): Likewise.
6062 * src/lalr.c (build_relations): Likewise.
6063 * tests/sets.at (Nullable): Adjust.
6064 Fortunately, now, the $axiom is no longer nullable.
6065
9e7f6bbd
AD
60662001-12-29 Akim Demaille <akim@epita.fr>
6067
6068 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6069 the 0-sentinel.
6070 * src/gram.c (ritem_longest_rhs): Likewise.
6071 * src/reduce.c (nonterminals_reduce): Likewise.
6072 * src/print_graph.c (print_graph): Likewise.
6073 * src/output.c (output_rule_data): Likewise.
6074 * src/nullable.c (set_nullable): Likewise.
6075
255ef638
AD
60762001-12-29 Akim Demaille <akim@epita.fr>
6077
6078 * src/output.c: Comment changes.
6079
0d8a7363
AD
60802001-12-27 Paul Eggert <eggert@twinsun.com>
6081
6082 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6083 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6084 Sparc, as they were causing more porting problems than the
6085 (minor) performance improvement was worth.
6086
6087 Also, catch up with 1.31's YYSTD.
6088
3db472b9
AD
60892001-12-27 Akim Demaille <akim@epita.fr>
6090
6091 * src/output.c (output_gram): Rely on nritems, not the
6092 0-sentinel. See below.
6093 Use -1 as separator, not 0.
6094 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6095 Rely on -1 as separator in yyrhs, instead of 0.
6096 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6097 twice `Now at end of input', therefore there are two lines less to
6098 expect.
6099
b365aa05
AD
61002001-12-27 Akim Demaille <akim@epita.fr>
6101
6102 * tests/regression.at (Unresolved SR Conflicts):
6103 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6104 below.
6105
30171f79
AD
61062001-12-27 Akim Demaille <akim@epita.fr>
6107
6108 * src/LR0.c (new_state): Recognize the final state by the fact it
6109 is reached by eoftoken.
6110 (insert_start_shifting_state, insert_eof_shifting_state)
6111 (insert_accepting_state, augment_automaton): Remove, since now
6112 these states are automatically computed from the initial state.
6113 (generate_states): Adjust.
6114 * src/print.c: When reporting a rule number to the user, substract
6115 1, so that the axiom rule is rule 0, and the first user rule is 1.
6116 * src/reduce.c: Likewise.
6117 * src/print_graph.c (print_core): For the time being, just as for
6118 the report, depend upon --trace-flags to dump the full set of
6119 items.
6120 * src/reader.c (readgram): Once the grammar read, insert the rule
6121 0: `$axiom: START-SYMBOL $'.
6122 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6123 number of the states has changed (the final state is no longer
6124 necessarily the last), catch up.
6125
75142d45
AD
61262001-12-27 Akim Demaille <akim@epita.fr>
6127
6128 Try to make the use of the eoftoken valid. Given that its value
6129 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6130 is used instead of > 0 where appropriate, (ii), depend upon nritems
6131 instead of the 0-sentinel.
6132
6133 * src/gram.h, src/gram.c (nritems): New.
6134 Expected to be duplication of nitems, but for the time being...
6135 * src/reader.c (packgram): Assert nritems and nitems are equal.
6136 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6137 * src/closure.c (print_closure, print_fderives): Likewise.
6138 * src/gram.c (ritem_print): Likewise.
6139 * src/print.c (print_core, print_grammar): Likewise.
6140 * src/print_graph.c: Likewise.
6141
b7c49edf
AD
61422001-12-27 Akim Demaille <akim@epita.fr>
6143
6144 * src/main.c (main): If there are complains after grammar
6145 reductions, then output the report anyway if requested, then die.
6146 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6147 * src/reader.c (eoftoken): New.
6148 (parse_token_decl): If the token being defined has value `0', it
6149 is the eoftoken.
6150 (packsymbols): No longer hack `tags' to insert `$' by hand.
6151 Be sure to preserve the value of the eoftoken.
6152 (reader): Make sure eoftoken is defined.
6153 Initialize nsyms to 0: now eoftoken is created just like the others.
6154 * src/print.c (print_grammar): Don't special case the eof token.
6155 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6156 lie anyway, albeit pleasant.
6157 * tests/calc.at: Exercise error messages with eoftoken.
6158 Change the grammar so that empty input is invalid.
6159 Adjust expectations.
6160 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6161
ec2da99f
AD
61622001-12-27 Akim Demaille <akim@epita.fr>
6163
6164 * configure.in: Check the protos of strchr ans strspn.
6165 Replace strchr if needed.
6166 * src/system.h: Provide the protos of strchr, strspn and memchr if
6167 missing.
6168 * lib/strchr.c: New.
6169 * src/reader.c (symbols_save): Use strchr.
6170
8adfa272
AD
61712001-12-27 Akim Demaille <akim@epita.fr>
6172
6173 * src/print.c, src/print_graph.c (escape): New.
6174 Use it to quote the TAGS outputs.
6175 * src/print_graph.c (print_state): Now errors are in red, and
6176 reductions in green.
6177 Prefer high to wide: output the state number on a line of its own.
6178
80dac38c
AD
61792001-12-27 Akim Demaille <akim@epita.fr>
6180
6181 * src/state.h, src/state.c (reductions_new): New.
6182 * src/LR0.c (set_state_table): Let all the states have a
6183 `reductions', even if reduced to 0.
6184 (save_reductions): Adjust.
6185 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6186 * src/print.c (print_reductions, print_actions): Adjust.
6187 * src/output.c (action_row): Adjust.
6188
2cec70b9
AD
61892001-12-27 Akim Demaille <akim@epita.fr>
6190
6191 * src/state.h, src/state.c (errs_new, errs_dup): New.
6192 * src/LR0.c (set_state_table): Let all the states have an errs,
6193 even if reduced to 0.
6194 * src/print.c (print_errs, print_reductions): Adjust.
6195 * src/output.c (output_actions, action_row): Adjust.
6196 * src/conflicts.c (resolve_sr_conflict): Adjust.
6197
13ca549a
AD
61982001-12-27 Akim Demaille <akim@epita.fr>
6199
6200 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6201
5092aba5
AD
62022001-12-27 Akim Demaille <akim@epita.fr>
6203
6204 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6205 * src/print.c: here.
6206 (lookaheadset, shiftset): New, used as additional storage by
6207 print_reductions.
6208 (print_results): Adjust.
6209 (print_shifts, print_gotos, print_errs): New, extracted from...
6210 (print_actions): here.
6211 * src/print_graph.c (print_actions): Remove dead code.
6212
11e2beca
AD
62132001-12-27 Akim Demaille <akim@epita.fr>
6214
6215 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6216 `$n' and `@n'.
6217
dac3c910
AD
62182001-12-27 Akim Demaille <akim@epita.fr>
6219
6220 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6221 (build_relations): Adjust.
6222
d0b0fefa
AD
62232001-12-27 Akim Demaille <akim@epita.fr>
6224
6225 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6226 duplication.
6227
adc8c848
AD
62282001-12-27 Akim Demaille <akim@epita.fr>
6229
6230 * src/reader.c (packgram): Catch nitems overflows.
6231
14d293ac
AD
62322001-12-27 Akim Demaille <akim@epita.fr>
6233
6234 * src/files.c, src/files.h (guard_obstack): Remove.
6235 * src/output.c (output): Adjust.
6236 * src/reader.c (parse_braces): New, factoring...
6237 (copy_action, copy_guard): these two which are renamed as...
6238 (parse_action, parse_guard): these.
6239 As a voluntary consequence, using braces around guards is now
6240 mandatory.
6241
f499b062
AD
62422001-12-27 Akim Demaille <akim@epita.fr>
6243
6244 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6245 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6246 members.
6247 (symbol_list_new): Adjust.
6248 (copy_action): action_line is the first line, not the last.
6249 (copy_guard): Just as for actions, store the `action' only, not
6250 the switch/case/break flesh.
6251 Don't parse the user action that might follow the guard, let...
6252 (readgram): do it, i.e., now, there can be an action after a
6253 guard.
6254 In other words the guard is just explicitly optional.
6255 (packgram): Adjust.
6256 * src/output.c (guards_output): New.
6257 (output_parser): Call it when needed.
6258 (output): Also free the guard and attrs obstacks.
6259 * src/files.c, src/files.h (obstack_save): Remove.
6260 (output_files): Remove.
6261 As a result, if one needs the former `.act' file, using an
6262 appropriate skeleton which requires actions and guards is now
6263 required.
6264 * src/main.c (main): Adjust.
6265 * tests/semantic.at: New.
6266 * tests/regression.at: Use `input.y' as input file name.
6267 Avoid 8+3 problems by requiring input.c when the test needs the
6268 parser.
6269
d945f5cd
AD
62702001-12-27 Akim Demaille <akim@epita.fr>
6271
6272 * src/reader.c (symbol_list_new): Be sure to initialize all the
6273 fields.
6274
d200e455
AD
62752001-12-27 Akim Demaille <akim@epita.fr>
6276
6277 All the hacks using a final pseudo state are now useless.
6278
6279 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6280 * src/lalr.c (nLA): New.
6281 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6282 instead of lookaheadsp from the pseudo state (nstate + 1).
6283
f9507c28
AD
62842001-12-27 Akim Demaille <akim@epita.fr>
6285
6286 * src/output.c (action_row, token_actions): Use a state_t instead
6287 of a integer, and nlookaheads instead of the following state's
6288 lookaheadsp.
6289
065fbd27
AD
62902001-12-27 Akim Demaille <akim@epita.fr>
6291
6292 * src/conflicts.c (log_resolution, flush_shift)
6293 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6294 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6295 (conflicts_print, print_reductions): Use a state_t instead of an
6296 integer when referring to a state.
6297 As much as possible, depend upon nlookaheads, instead of the
6298 `lookaheadsp' member of the following state (since lookaheads of
6299 successive states are successive, the difference between state n + 1
6300 and n served as the number of lookaheads for state n).
6301 * src/lalr.c (add_lookback_edge): Likewise.
6302 * src/print.c (print_core, print_actions, print_state)
6303 (print_results): Likewise.
6304 * src/print_graph.c (print_core, print_actions, print_state)
6305 (print_graph): Likewise.
6306 * src/conflicts.h: Adjust.
6307
1b177bd7
AD
63082001-12-27 Akim Demaille <akim@epita.fr>
6309
6310 * src/bison.hairy: Formatting/comment changes.
6311 ANSIfy.
6312 Remove `register' indications.
6313 Add plenty of `static'.
6314
7742ddeb
AD
63152001-12-27 Akim Demaille <akim@epita.fr>
6316
6317 * src/output.c (prepare): Drop the muscle `ntbase' which
6318 duplicates ntokens.
6319 * src/bison.simple: Formatting/comment changes.
6320 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6321 is an undocumented synonym.
6322
1fa14068
AD
63232001-12-22 Akim Demaille <akim@epita.fr>
6324
6325 * src/output.c (output_table_data): Change the prototype to use
6326 `int' for array ranges: some invocations do pass an int, not a
6327 short.
6328 Reported by Wayne Green.
6329
b9752825
AD
63302001-12-22 Akim Demaille <akim@epita.fr>
6331
6332 Some actions of web2c.y are improperly triggered.
6333 Reported by Mike Castle.
6334
6335 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6336 * tests/regression.at (Web2c): Rename as...
6337 (Web2c Report): this.
6338 (Web2c Actions): New.
6339
776209d6
AD
63402001-12-22 Akim Demaille <akim@epita.fr>
6341
6342 Reductions in web2c.y are improperly reported.
6343 Reported by Mike Castle.
6344
6345 * src/conflicts.c (print_reductions): Fix.
6346 * tests/regression.at (Web2c): New.
6347
275fc3ad
AD
63482001-12-18 Akim Demaille <akim@epita.fr>
6349
6350 Some host fail on `assert (!"foo")', which expands to
6351 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6352 Reported by Nelson Beebee.
6353
6354 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6355 `#define it_succeeded 0' and `assert (it_succeeded)'.
6356
897668ee
MA
63572001-12-17 Marc Autret <autret_m@epita.fr>
6358
6359 * src/bison.simple: Don't hard code the skeleton line and filename.
6360 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6361 New line counter 'skeleton_line' (skeleton-line muscle).
6362
ab3399e0
PE
63632001-12-17 Paul Eggert <eggert@twinsun.com>
6364
6365 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6366 YYDEBUG must be defined to a nonzero value.
6367
6368 * src/bison.simple (yytname): Do not assume that the user defines
6369 YYDEBUG to a properly parenthesized expression.
6370
3877f72b
AD
63712001-12-17 Akim Demaille <akim@epita.fr>
6372
6373 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6374 nlookaheads is a new member.
6375 Adjust all users.
6376 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6377 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6378 state.
776209d6 6379
331dbc1b
AD
63802001-12-17 Akim Demaille <akim@epita.fr>
6381
6382 * src/files.h, src/files.c (open_files, close_files): Remove.
6383 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6384 let...
6385 * src/reader.c (reader): Do it.
776209d6 6386
be750e4c
AD
63872001-12-17 Akim Demaille <akim@epita.fr>
6388
6389 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 6390
709ae8c6
AD
63912001-12-17 Akim Demaille <akim@epita.fr>
6392
6393 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6394 (flush_reduce): New.
6395 (resolve_sr_conflict): Adjust.
776209d6 6396
f87685c3
AD
63972001-12-17 Akim Demaille <akim@epita.fr>
6398
6399 * src/output.c (output_obstack): Be static and rename as...
6400 (format_obstack): this, to avoid any confusion with files.c's
6401 output_obstack.
6402 * src/reader.h (muscle_obstack): Move to...
6403 * src/output.h: here, since it's defined in output.c.
6404
837491d8
AD
64052001-12-17 Akim Demaille <akim@epita.fr>
6406
6407 * src/output.c (action_row, save_column, default_goto)
6408 (sort_actions, matching_state, pack_vector): Better variable
6409 locality.
6410
796d61fb
AD
64112001-12-17 Akim Demaille <akim@epita.fr>
6412
6413 * src/output.c: Various formatting changes.
776209d6 6414
64d15509
AD
64152001-12-17 Akim Demaille <akim@epita.fr>
6416
6417 * src/files.c (output_files): Free the output_obstack.
6418 * src/main.c (main): Call print and print_graph conditionally.
6419 * src/print.c (print): Work unconditionally.
6420 * src/print_graph.c (print_graph): Work unconditionally.
6421 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6422
fbc8ecb7
MA
64232001-12-16 Marc Autret <autret_m@epita.fr>
6424
6425 * src/output.c (actions_output): Fix. When we use %no-lines,
6426 there is one less line per action.
6427
f0440388
MA
64282001-12-16 Marc Autret <autret_m@epita.fr>
6429
6430 * src/bison.simple: Remove a useless #line directive.
6431 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6432 * src/output.c (get_lines_number): New.
776209d6 6433 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
6434 output muscles.
6435 Fix line numbering.
6436 (actions_output): Computes the number of lines taken by actions.
6437 (output_master_parser): Insert new skeleton which is the name of
6438 the output parser file name.
6439
a79986b8
MA
64402001-12-15 Marc Autret <autret_m@epita.fr>
6441
6442 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6443
4ec8e00f
MA
64442001-12-15 Marc Autret <autret_m@epita.fr>
6445
6446 * src/output.c (output_gram): Keep track of the hairy one.
6447
1a4648ff
AD
64482001-12-15 Akim Demaille <akim@epita.fr>
6449
6450 Make `make distcheck' work.
6451
6452 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6453 system.h which uses libgettext.h.
6454
9c2c67e6
AD
64552001-12-15 Akim Demaille <akim@epita.fr>
6456
6457 * src/nullable.c (set_nullable): Useless rules must be skipped,
6458 otherwise, since we range over their symbols, we might look at a
6459 nonterminal which no longer ``exists'', i.e., it is not counted in
6460 `nvars', hence we overflow our arrays.
6461
93ede233
AD
64622001-12-15 Akim Demaille <akim@epita.fr>
6463
6464 The header can also be produced directly, without any obstack!
6465 Yahoo!
6466
6467 * src/files.c, src/files.h (defines_obstack): Remove.
6468 (compute_header_macro): Global.
6469 (defines_obstack_save): Remove.
6470 * src/reader.c (parse_union_decl): No longer output to
6471 defines_obstack: its content can be found in the `stype' muscle
6472 anyway.
6473 (output_token_translations): Merge into...
6474 (symbols_output): this.
6475 Rename as...
6476 (symbols_save): this.
6477 (reader): Adjust.
6478 * src/output.c (header_output): New.
6479 (output): Call it.
6480
2666f928
AD
64812001-12-15 Akim Demaille <akim@epita.fr>
6482
6483 * src/reader.c (parse_union_decl): Instead of handling two obstack
6484 simultaneously, use one to define the `stype' muscle, and use the
6485 value of the latter to fill defines_obstack.
6486 (copy_comment): Remove.
6487 (copy_comment2): Work for a single obstack.
6488 Rename as...
6489 (copy_comment): this.
6490
428046f8
AD
64912001-12-15 Akim Demaille <akim@epita.fr>
6492
6493 * src/lex.c, src/lex.h (xgetc): No longer static.
6494 * src/reader.c (parse_union_decl): Revamp.
6495
ea52d706
AD
64962001-12-15 Akim Demaille <akim@epita.fr>
6497
6498 Still making progress in separating Bison into (i) input, (ii)
6499 process, (iii) output: now we can directly output the parser file
6500 without using table_obstack at all.
6501
6502 * src/files.c, src/files.h (table_obstack): Bye bye.
6503 (parser_file_name): New.
6504 * src/files.c (compute_output_file_names): Compute it.
6505 * src/output.c (actions_output, output_parser)
6506 (output_master_parser): To a file instead of an obstack.
6507
3f96f4dc
AD
65082001-12-15 Akim Demaille <akim@epita.fr>
6509
6510 Attach actions to rules, instead of pre-outputting them to
6511 actions_obstack.
6512
6513 * src/gram.h (rule_t): action and action_line are new members.
6514 * src/reader.c (symbol_list): Likewise.
6515 (copy_action): Save the actions within the rule.
6516 (packgram): Save them in rule_table.
6517 * src/output.c (actions_output): New.
6518 (output_parser): Use it on `%%actions'.
6519 (output_rule_data): Don't free rule_table.
6520 (output): Do it.
6521 (prepare): Don't save the `action' muscle.
6522 * src/bison.simple: s/%%action/%%actions/.
6523
51576fb3
AD
65242001-12-15 Akim Demaille <akim@epita.fr>
6525
6526 * src/reader.c (copy_action): When --yacc, don't append a `;'
6527 to the user action: let it fail if lacking.
dee049eb 6528 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 6529
2648a72d
AD
65302001-12-14 Akim Demaille <akim@epita.fr>
6531
6532 * src/lex.c (literalchar): Simply return the char you decoded, non
6533 longer mess around with obstacks and int pointers.
6534 Adjust all callers.
6535
92790e5b
AD
65362001-12-14 Akim Demaille <akim@epita.fr>
6537
6538 * src/lex.c (literalchar): Don't escape the special characters,
6539 just decode them, and keep them as char (before, eol was output as
6540 the 2 char string `\n' etc.).
6541 * src/output.c (output_rule_data): Use quotearg to output the
6542 token strings.
6543
927c1557
PE
65442001-12-13 Paul Eggert <eggert@twinsun.com>
6545
6546 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6547 Do not infringe on the global user namespace when using C++.
6548 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6549 All uses of `fprintf' and `stderr' changed.
6550
6551 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6552
ed8e1f68
AD
65532001-12-13 Akim Demaille <akim@epita.fr>
6554
6555 The computation of nullable is broken: it doesn't handle empty
6556 RHS's properly.
6557
6558 * tests/torture.at (GNU AWK Grammar): New.
6559 * tests/sets.at (Nullable): New.
6560 * src/nullable.c (set_nullable): Instead of blindly looping over
6561 `ritems', loop over the rules, and then over their rhs's.
6562
6563 Work around Autotest bugs.
6564
6565 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6566 frame, because Autotest understand lines starting with a `+' as
6567 traces from the shell. Then, they are not processed properly.
6568 Admittedly an Autotest bug, but we don't have time to wait for
6569 Autotest to catch up.
6570 * tests/regression.at (Broken Closure): Adjust to the new table
6571 frames.
6572 Move to...
6573 * tests/sets.at: here.
6574
cb581495
AD
65752001-12-13 Akim Demaille <akim@epita.fr>
6576
6577 * src/closure.c (closure): Use nrules instead of playing tricks
6578 with BITS_PER_WORD.
6579
2e729273
AD
65802001-12-13 Akim Demaille <akim@epita.fr>
6581
6582 * src/print.c (print_actions): Output the handling of `$' as the
6583 traces do: shifting the token EOF. Before EOF was treated as a
6584 nonterminal.
6585 * tests/regression.at: Adjust some tests.
6586 * src/print_graph.c (print_core): Complete the set of items via
6587 closure. The next-to-final and final states are still unsatisfying,
6588 but that's to be addressed elsewhere.
6589 No longer output the rule numbers, but do output the state number.
6590 A single loop for the shifts + gotos is enough, but picked a
6591 distinct color for each.
6592 (print_graph): Initialize and finalize closure.
6593
107f7dfb
AD
65942001-12-13 Akim Demaille <akim@epita.fr>
6595
6596 * src/reader.c (readgram): Remove dead code, an strip useless
6597 braces.
6598 (get_type): Remove, unused.
6599
9b53a24f
AD
66002001-12-12 Akim Demaille <akim@epita.fr>
6601
6602 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6603 on that of lib/error.c.
6604
dbfb6dcd
AD
66052001-12-12 Akim Demaille <akim@epita.fr>
6606
6607 Some hosts don't like `/' in includes.
6608
6609 * src/system.h: Include libgettext.h without qualifying the path.
6610 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6611 $(top_srcdir).
6612
c25fb648
MA
66132001-12-11 Marc Autret <autret_m@epita.fr>
6614
6615 * src/output.c (output_parser): Remove useless muscle.
6616
710ddc4f
MA
66172001-12-11 Marc Autret <autret_m@epita.fr>
6618
6619 * src/bison.simple: Remove #line just before %%epilogue. It
6620 is now handled in ...
6621 * src/reader.c (read_additionnal_code): Add the output of a
6622 #line for the epilogue.
6623
e83d80b8
MA
66242001-12-10 Marc Autret <autret_m@epita.fr>
6625
927c1557 6626 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
6627 replace precedent remove.
6628 * src/bison.simple: Remove #line before %%prologue because
6629 %%input-line is wrong at this time.
6630
971d5158
MA
66312001-12-10 Marc Autret <autret_m@epita.fr>
6632
6633 * src/reader.c (symbols_output): Clean up.
927c1557 6634 * src/output.c (output_gram, output): Clean up.
971d5158 6635
5edafffd
AD
66362001-12-10 Akim Demaille <akim@epita.fr>
6637
6638 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6639 * src/LR0.c (set_state_table): here.
6640 * src/lalr.c (lalr): Call it.
6641
0279f8e9
AD
66422001-12-10 Akim Demaille <akim@epita.fr>
6643
6644 * src/state.h (shifts): Remove the `number' member: shifts are
6645 attached to state, hence no longer need to be labelled with a
6646 state number.
6647
190c4f5f
AD
66482001-12-10 Akim Demaille <akim@epita.fr>
6649
6650 Now that states have a complete set of members, the linked list of
6651 shifts is useless: just fill directly the state's shifts member.
6652
6653 * src/state.h (shifts): Remove the `next' member.
6654 * src/LR0.c (first_state, last_state): Remove.
6655 Adjust the callers.
6656 (augment_automaton): Don't look for the shifts that must be added
6657 a shift on EOF: it is those of the state we looked for! But now,
6658 since shifts are attached, it is no longer needed to looking
6659 merely by its id: its number.
6660
2a73b93d
AD
66612001-12-10 Akim Demaille <akim@epita.fr>
6662
6663 * src/LR0.c (augment_automaton): Better variable locality.
6664 Remove an impossible branch: if there is a state corresponding to
6665 the start symbol being shifted, then there is shift for the start
6666 symbol from the initial state.
6667
74392f6a
AD
66682001-12-10 Akim Demaille <akim@epita.fr>
6669
6670 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6671 only when appropriate: when insert_start_shifting_state' is not
6672 invoked.
6673 * tests/regression.at (Rule Line Numbers): Adjust.
6674
37c82725
AD
66752001-12-10 Akim Demaille <akim@epita.fr>
6676
6677 * src/LR0.c (augment_automaton): Now that all states have shifts,
6678 merge the two cases addition shifts to the initial state.
6679
6a164e0c
AD
66802001-12-10 Akim Demaille <akim@epita.fr>
6681
6682 * src/lalr.c (set_state_table): Move to...
6683 * src/LR0.c: here.
6684 * src/lalr.c (lalr): Don't call it...
6685 * src/LR0.c (generate_states): do it.
6686 * src/LR0.h (first_state): Remove, only the table is used.
6687
7215de24
AD
66882001-12-10 Akim Demaille <akim@epita.fr>
6689
6690 * src/LR0.h (first_shift, first_reduction): Remove.
6691 * src/lalr.c: Don't use first_shift: find shifts through the
6692 states.
6693
80e25d4d
AD
66942001-12-10 Akim Demaille <akim@epita.fr>
6695
6696 * src/LR0.c: Attach shifts to states as soon as they are
6697 computed.
6698 * src/lalr.c (set_state_table): Instead of assigning shifts to
6699 state, just assert that the mapping was properly done.
6700
0ab3728b
AD
67012001-12-10 Akim Demaille <akim@epita.fr>
6702
6703 * src/LR0.c (insert_start_shift): Rename as...
6704 (insert_start_shifting_state): this.
6705 (insert_eof_shifting_state, insert_accepting_state): New.
6706 (augment_automaton): Adjust.
6707 Better locality of the variables.
6708 When looking if the start_symbol is shifted from the initial
6709 state, using `while (... symbol != start_symbol ...)' sounds
6710 better than `while (... symbol < start_symbol ...)': If fail
6711 to see how the order between symbols could be relevant!
6712
78af9bbc
AD
67132001-12-10 Akim Demaille <akim@epita.fr>
6714
6715 * src/getargs.h: Don't declare `spec_name_prefix' and
6716 `spec_file_prefix', declared by src/files.h.
6717 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6718 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6719 * src/output.c (prepare): Adjust.
6720 * src/reader.c (symbols_output): Likewise.
6721 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6722
bdef2a41
AD
67232001-12-10 Akim Demaille <akim@epita.fr>
6724
6725 * src/muscle_tab.c (muscle_init): NULL is a better default than
6726 `"0"'.
6727
3735969c
AD
67282001-12-10 Akim Demaille <akim@epita.fr>
6729
6730 * src/reader.c (reader): Calling symbols_output once is enough.
6731
49701457
AD
67322001-12-10 Akim Demaille <akim@epita.fr>
6733
6734 Now that states have a complete set of members, the linked list of
6735 reductions is useless: just fill directly the state's reductions
6736 member.
6737
6738 * src/state.h (struct reductions): Remove member `number' and
6739 `next'.
6740 * src/LR0.c (first_reduction, last_reduction): Remove.
6741 (save_reductions): Don't link the new reductions, store them in
6742 this_state.
6743 * src/lalr.c (set_state_table): No need to attach reductions to
6744 states, it's already done.
6745 * src/output.c (output_actions): No longer free the shifts, then
6746 the reductions, then the states: free all the states and their
6747 members.
6748
0edad749
AD
67492001-12-10 Akim Demaille <akim@epita.fr>
6750
6751 * src/options.c (OPTN, DRTV, BOTH): New.
6752 (option_table): Use them.
6753
0edad749
AD
6754 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6755 the job of system.h.
6756 * src/options.c: Don't include stdio.h and xalloc.h for the same
6757 reasons.
6758
5449dd0f
AD
67592001-12-10 Akim Demaille <akim@epita.fr>
6760
6761 * src/output.c (output, prepare): Make sure the values of the
6762 muscles `action' and `prologue' are 0-terminated.
6763
a870c567
AD
67642001-12-10 Akim Demaille <akim@epita.fr>
6765
6766 Clean up GCC warnings.
6767
6768 * src/reader.c (copy_action): `buf' is not used.
6769 (parse_skel_decl): Be static.
6770 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6771 * src/options.h (create_long_option_table): Have a real prototype.
6772 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6773 (hash_delete_at): Return const void *.
6774 Adjust casts to preserve the const.
6775
80df8768
AD
67762001-12-10 Akim Demaille <akim@epita.fr>
6777
6778 * configure.in: Require 2.52g.
6779 M4 is not needed, but AUTOM4TE is.
6780 * m4/m4.m4: Remove.
6781 * tests/Makefile.am: Adjust.
6782
f693ad14
AD
67832001-12-10 Akim Demaille <akim@epita.fr>
6784
6785 One structure for states is enough, even though theoretically
6786 there are LR(0) states and LALR(1) states.
6787
6788 * src/lalr.h (state_t): Remove.
6789 (state_table): Be state_t **, not state_t *.
6790 * src/state.h (core, CORE_ALLOC): Rename as...
6791 (state_t, STATE_ALLOC): this.
6792 Add the LALR(1) members: shifts, reductions, errs.
6793 * src/LR0.c (state_table): Rename as...
6794 (state_hash): this, to avoid name clashes with the global
6795 `state_table'.
6796 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6797 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6798
74ffbcb6
AD
67992001-12-10 Akim Demaille <akim@epita.fr>
6800
6801 Bison dumps core on bash.y.
6802 Reported by Pascal Bart.
6803
6804 * src/warshall.c (bitmatrix_print): New.
6805 (TC): Use it.
6806 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6807 j must be the outer loop.
6808 * tests/regression.at (Broken Closure): New.
6809
07708e19
AD
68102001-12-05 Akim Demaille <akim@epita.fr>
6811
6812 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6813 its argument.
ba1ecc07 6814 Reported by Peter Hamorsky.
07708e19 6815
92b16366
AD
68162001-12-05 Akim Demaille <akim@epita.fr>
6817
6818 * src/conflicts.c (err_table): Remove.
6819 (resolve_sr_conflict): Adjust.
6820 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6821 Rename as...
6822 (state_t.reductions, state_t.shifts): this.
6823
076ab033
AD
68242001-12-05 Akim Demaille <akim@epita.fr>
6825
6826 * src/reduce.c (reduce_grammar_tables): No longer disable the
6827 removal of useless rules via CPP but via `if (0)', so that the
6828 compiler still check the code is valid.
6829 For instance, it should have noticed `rline' no longer exists: use
6830 the `line' member of rule_t.
6831 * src/gram.c (dummy, rline): Remove, unused.
6832
3843c413
AD
68332001-12-05 Akim Demaille <akim@epita.fr>
6834
6835 * src/output.c (pack_vector): Use assert, not berror.
6836 * src/main.c (berror): Remove, unused.
6837
43168960
AD
68382001-12-05 Akim Demaille <akim@epita.fr>
6839
6840 New experimental feature: if --verbose --trace output all the
6841 items of a state, not only its kernel.
6842
6843 * src/print.c (print_core): If `trace_flag', then invoke closure
6844 before outputting the items of the state (print_core is no longer
6845 a correct name them).
6846 (print_results): Invoke new_closure/free_closure if needed.
6847
b2872512
AD
68482001-12-05 Akim Demaille <akim@epita.fr>
6849
6850 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6851 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6852 (nitemset): for consistency with the rest of the project.
6853
23cbcc6c
AD
68542001-12-05 Akim Demaille <akim@epita.fr>
6855
6856 * src/closure.c (print_closure): Improve.
6857 (closure): Use it for printing input and output.
6858
03ec521c
AD
68592001-12-05 Akim Demaille <akim@epita.fr>
6860
6861 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6862 indexed by nonterminals.
6863
3a7456dd
AD
68642001-12-05 Akim Demaille <akim@epita.fr>
6865
6866 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6867 what it was!).
6868 * src/warshall.h: Remove accidental duplication of the content.
6869
1cbcf2e7
AD
68702001-12-05 Akim Demaille <akim@epita.fr>
6871
6872 * src/closure.c (set_fderives): De-obfuscate.
6873
84182270
AD
68742001-12-05 Akim Demaille <akim@epita.fr>
6875
6876 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6877
3f6f053c
AD
68782001-12-05 Akim Demaille <akim@epita.fr>
6879
6880 * src/closure.c (set_firsts): De-obfuscate.
6881
7a5350ba
AD
68822001-12-05 Akim Demaille <akim@epita.fr>
6883
6884 * src/output.c (action_row): De-obfuscate
6885 using the good o' techniques: arrays not pointers, variable
6886 locality, BITISSET, RESETBIT etc.
6887
d954473d
AD
68882001-12-05 Akim Demaille <akim@epita.fr>
6889
6890 Pessimize the code to simplify it: from now on, all the states
6891 have a valid SHIFTS, which NSHIFTS is possibly 0.
6892
6893 * src/LR0.c (shifts_new): Be global and move to..
6894 * src/state.c, src/state.h: here.
6895 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6896 * src/print_graph: Adjust.
6897
9839bbe5
AD
68982001-12-05 Akim Demaille <akim@epita.fr>
6899
6900 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6901 * src/conflicts.c: Use it.
6902 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6903 incorrectly ``simplified''.
6904
9f136c07
AD
69052001-12-05 Akim Demaille <akim@epita.fr>
6906
6907 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6908 using the good o' techniques: arrays not pointers, variable
6909 locality, BITISSET, RESETBIT etc.
6910
b608206e
AD
69112001-12-05 Akim Demaille <akim@epita.fr>
6912
6913 * src/state.h (SHIFT_SYMBOL): New.
6914 * src/conflicts.c: Use it to deobfuscate.
6915
52afa962
AD
69162001-12-05 Akim Demaille <akim@epita.fr>
6917
6918 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6919 (print_reductions): De-obfuscate using the good o' techniques:
6920 arrays not pointers, variable locality, BITISSET.
6921
e74dc321
AD
69222001-12-05 Akim Demaille <akim@epita.fr>
6923
6924 * src/conflicts.c (print_reductions): Arrays, not pointers.
6925 Use BITISSET.
6926
768fca83
AD
69272001-12-05 Akim Demaille <akim@epita.fr>
6928
6929 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6930
a17e599f
AD
69312001-12-05 Akim Demaille <akim@epita.fr>
6932
6933 * src/conflicts.c (print_reductions): Improve variable locality.
6934
a04bc341
AD
69352001-12-05 Akim Demaille <akim@epita.fr>
6936
6937 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6938
c8ea038e
AD
69392001-12-05 Akim Demaille <akim@epita.fr>
6940
6941 * src/conflicts.c (print_reductions): Improve variable locality.
6942
aa2aab3c
AD
69432001-12-05 Akim Demaille <akim@epita.fr>
6944
6945 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6946 * src/lalr.c: Use them.
6947
b178c8cc
AD
69482001-12-05 Akim Demaille <akim@epita.fr>
6949
6950 * src/LR0.c (augment_automaton): Formatting changes.
6951 Better variable locality.
6952
f67d13aa
AD
69532001-12-05 Akim Demaille <akim@epita.fr>
6954
6955 * src/lalr.c (matrix_print): New.
6956 (transpose): Use it.
6957 Use arrays instead of pointers.
6958
c2713865
AD
69592001-12-05 Akim Demaille <akim@epita.fr>
6960
6961 * src/lalr.c (maxrhs): Move to...
6962 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6963 * src/lalr.c (build_relations): Adjust.
6964
9887c18a
AD
69652001-12-05 Akim Demaille <akim@epita.fr>
6966
6967 * src/lalr.c (transpose): Free the memory allocated to the
6968 argument, as it is replaced by the results by the unique caller.
6969 (build_relations): Merely invoke transpose: it handles the memory
6970 deallocation.
6971 Improve variable locality.
6972 Avoid variables used as mere abbreviations.
6973 (compute_lookaheads): Use arrays instead of pointers.
6974
4d4f699c
AD
69752001-12-05 Akim Demaille <akim@epita.fr>
6976
6977 * src/lalr.c (initialize_F): Improve variable locality.
6978 Avoid variables used as mere abbreviations.
6979
80a69750
AD
69802001-12-05 Akim Demaille <akim@epita.fr>
6981
6982 * src/derives.c (print_derives): Display the ruleno.
6983 * src/lalr.c (initialize_F, transpose): Better variable locality
6984 to improve readability.
6985 Avoid variables used as mere abbreviations.
6986
fe961097
AD
69872001-12-05 Akim Demaille <akim@epita.fr>
6988
6989 * src/lalr.c (traverse): Use arrays instead of pointers.
6990
e3e4e814
AD
69912001-12-05 Akim Demaille <akim@epita.fr>
6992
6993 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
6994 the handling of squeue.
6995 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6996
630e182b
AD
69972001-12-05 Akim Demaille <akim@epita.fr>
6998
6999 Because useless nonterminals are now kept alive (instead of being
7000 `destroyed'), we now sometimes examine them, and store information
7001 related to them. Hence we need to know their number, and adjust
7002 memory allocations.
7003
7004 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7005 static.
7006 * src/LR0.c (allocate_itemsets): The memory allocated to
7007 `symbol_count' was used for two different purpose: once to count
7008 the number of occurrences of each symbol, and later reassigned to
7009 `shift_symbol', containing the symbol that can be shifted from a
7010 given state.
7011 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7012 only, and...
7013 (new_itemsets): Allocate `shift_symbol' here.
7014 (allocate_itemsets): symbol_count includes useless nonterminals.
7015 Make room for them.
7016 (free_storage): Use `free', not `XFREE', for pointers that cannot
7017 be null.
7018
81b51460
AD
70192001-12-05 Akim Demaille <akim@epita.fr>
7020
7021 * src/nullable.c (set_nullable): Deobfuscate the handling of
7022 ritem.
7023 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7024
3067fbef
AD
70252001-12-05 Akim Demaille <akim@epita.fr>
7026
7027 * src/gram.c, src/gram.h (ritem_print): New.
7028 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7029 (This useless function was defined only to work around VMS linkers
7030 that can't handle compilation units with variables only).
7031 * src/reduce.c (dump_grammar): Use it to trace the construction of
7032 ritem.
7033
c2bea5f9
PE
70342001-12-04 Paul Eggert <eggert@twinsun.com>
7035
7d27c823
PE
7036 * src/bison.simple (union yyalloc): Change member names
7037 to be the same as the stack names.
7038 (yyparse): yyptr is now union yyalloc *, not char *.
7039 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7040 and may generate better code on some machines.
c2bea5f9
PE
7041 (yystpcpy): Use prototype if __STDC__ is defined, not just
7042 if __cplusplus is defined.
35687a9d 7043
2c8a9dfa
AD
70442001-11-30 Akim Demaille <akim@epita.fr>
7045
7046 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7047 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7048 Gettext doesn't compile cleanly, and dies with -Werror.
7049 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7050 Include WARNING_CFLAGS here.
7051 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7052 before being defined.
7053
f4e421e6
AD
70542001-11-27 Paul Eggert <eggert@twinsun.com>
7055
7056 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7057 First arg is int, not unsigned.
7058 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7059 (SIZE_MAX, UINT_MAX): New macros.
7060 (quotearg_n_options): Abort if N is negative.
7061 Avoid overflow check on hosts where size_t is 64 bits and int
7062 is 32 bits, as overflow is impossible there.
7063 Fix off-by-one typo that caused unnecessary reallocation.
7064
7093d0f5
AD
70652001-11-29 Paul Eggert <eggert@twinsun.com>
7066
7067 Name space cleanup in generated parser.
7068
7069 * doc/bison.texinfo (Bison Parser): Discuss system headers
7070 and their effect on the user name space.
7071
7072 * src/bison.simple:
7073 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7074 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7075 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7076
7077 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7078 on user names when possible.
7079
7080 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7081 Simplify test for whather <alloca.h> exists.
7082
7083 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7084
7085 (<stdio.h>): Include if YYDEBUG.
7086
7087 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7088 ! defined (yyoverflow) && ! defined (yymemcpy).
7089
7090 (yymemcpy, yyparse): Rename local variables as needed so that
7091 they all begin with 'yy'.
7092
7093 (yystrlen, yystpcpy): New functions.
7094
7095 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7096 All uses changed.
7097
7098 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7099 instead of relying on string.h functions. Use YYSTACK_ALLOC
7100 and YYSTACK_FREE instead of malloc and free.
7101
fd51e5ff
AD
71022001-11-30 Akim Demaille <akim@epita.fr>
7103
7104 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7105 before their first uses.
7106 (YYBISON, YYPURE): Move to the top of the output.
7107
7d13ff5f
AD
71082001-11-30 Akim Demaille <akim@epita.fr>
7109
7110 * tests/reduce.at (Useless Nonterminals): Fix.
7111
892a3995
AD
71122001-11-30 Akim Demaille <akim@epita.fr>
7113
7114 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7115 if body instead of `;' to pacify GCC's warnings.
7116
68f1e3ed
AD
71172001-11-30 Akim Demaille <akim@epita.fr>
7118
7119 Instead of mapping the LHS of unused rules to -1, keep the LHS
7120 valid, but flag the rules as invalid.
7121
7122 * src/gram.h (rule_t): `useful' is a new member.
7123 * src/print.c (print_grammar): Adjust.
7124 * src/derives.c (set_derives): Likewise.
7125 * src/reader.c (packgram, reduce_output): Likewise.
7126 * src/reduce.c (reduce_grammar_tables): Likewise.
7127 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7128
d2d1b42b
AD
71292001-11-30 Akim Demaille <akim@epita.fr>
7130
7131 * src/reduce.c (reduce_output): Formatting changes.
7132 * src/print.c (print_results, print_grammar): Likewise.
7133 * tests/regression.at (Rule Line Numbers)
7134 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7135
760b53a8
AD
71362001-11-30 Akim Demaille <akim@epita.fr>
7137
7138 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7139 useless nonterminals, move them at the end of the symbol arrays.
7140 (reduce_output): Adjust.
7141 * tests/reduce.at (Useless Nonterminals): Adjust.
7142
00238958
AD
71432001-11-30 Akim Demaille <akim@epita.fr>
7144
7145 * src/reduce.c: Various comment/formatting changes.
7146 (nonterminals_reduce): New, extracted from...
7147 (reduce_grammar_tables): here.
7148 (reduce_grammar): Call nonterminals_reduce.
7149
396452de
PE
71502001-11-29 Paul Eggert <eggert@twinsun.com>
7151
7152 * src/bison.simple (YYSTACK_REALLOC): Remove.
7153 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7154 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7155 New macros.
7156 (union yyalloc): New type.
7157 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7158 an arbitrary restriction on hosts where size_t is wider than int.
7159
7160 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7161 a parser stack overflow. Allocate just one block of memory for all
7162 three stacks, instead of allocating three blocks; this typically is
7163 faster and reduces fragmentation.
7164
7165 Do not limit the number of items in the stack to a value that fits
7166 in 'int', as this is an arbitrary limit on hosts with 64-bit
7167 size_t and 32-bit int.
7168
147e184c
MA
71692001-11-29 Marc Autret <autret_m@epita.fr>
7170
7171 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7172 of defining YYERROR_VERBOSE.
7173 [AT_DATA]: $4 is now out of C declarations in the prologue.
7174
426cf563
MA
71752001-11-28 Marc Autret <autret_m@epita.fr>
7176
7177 * src/reader.c (parse_dquoted_param): New.
7178 (parse_skel_decl): Use it.
7179 * src/lex.h: Add its prototype.
7180 * src/lex.c (literalchar): Become not static.
7181
c7925b99
MA
71822001-11-28 Marc Autret <autret_m@epita.fr>
7183
7184 * src/output.h: And put its extern declaration here.
7185 * src/output.c (error_verbose): Define here.
7186 (prepare): Echo name modification.
7187 * src/getargs.h: Clean its extern declaration.
7188 * src/getargs.c (error_verbose_flag): Remove.
7189 (getargs): Remove case 'e'.
7190 * src/options.c (option_table): 'error-verbose' is now seen as simple
7191 percent option.
7192 Include output.h.
7193
7194 * src/reader.c (read_declarations): Remove case tok_include.
7195 (parse_include_decl): Remove.
7196 * src/lex.h (token_t): Remove tok_include.
7197 * src/options.c (option_table): 'include' is now a simple command line
7198 option.
7199
5b5d1929
MA
72002001-11-28 Marc Autret <autret_m@epita.fr>
7201
7202 * src/bison.simple: Adjust muscle names.
7203 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7204 * src/output.c (prepare): s/_/-/ for the muscles names.
7205 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7206
8850be4b
MA
72072001-11-28 Marc Autret <autret_m@epita.fr>
7208
7209 * src/bison.simple: Fix debug.
7210 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7211
4a38e613
AD
72122001-11-28 Akim Demaille <akim@epita.fr>
7213
7214 * src/LR0.c (shifts_new): New.
7215 (save_shifts, insert_start_shift, augment_automaton): Use it.
7216
4b35e1c1
AD
72172001-11-28 Akim Demaille <akim@epita.fr>
7218
7219 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7220 keep ruleno only.
7221
d2b04478
AD
72222001-11-28 Akim Demaille <akim@epita.fr>
7223
7224 * src/closure.c (closure): Instead of looping over word in array
7225 then bits in words, loop over bits in array.
7226
2c4c30aa
AD
72272001-11-28 Akim Demaille <akim@epita.fr>
7228
7229 * src/closure.c (closure): No longer optimize the special case
7230 where all the bits of `ruleset[r]' are set to 0, to make the code
7231 clearer.
7232
576890b7
AD
72332001-11-28 Akim Demaille <akim@epita.fr>
7234
7235 * src/closure.c (closure): `r' and `c' are new variables, used to
7236 de-obfuscate accesses to RULESET and CORE.
7237
cb487d7d
AD
72382001-11-28 Akim Demaille <akim@epita.fr>
7239
7240 * src/reduce.c (reduce_print): Use ngettext.
7241 (dump_grammar): Improve the trace accuracy.
7242
6013d43f
AD
72432001-11-28 Akim Demaille <akim@epita.fr>
7244
7245 * src/reduce.c (dump_grammar): Don't translate trace messages.
7246
cb4956ee
AD
72472001-11-28 Akim Demaille <akim@epita.fr>
7248
7249 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7250 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7251 as all tags are free'ed afterwards.
7252 From Enrico Scholz.
7253
648185ab
PE
72542001-11-27 Paul Eggert <eggert@twinsun.com>
7255
7256 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7257 use alloca when we didn't want to, and vice versa.
7258
68254a03
MA
72592001-11-27 Marc Autret <autret_m@epita.fr>
7260
9113b58f
AD
7261 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7262 initialization.
68254a03
MA
7263 * src/output.c (prepare): Remove its update.
7264
04d843a2
MA
72652001-11-27 Marc Autret <autret_m@epita.fr>
7266
7267 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7268 Use %error-verbose.
7269
d2079671 72702001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
7271
7272 * src/bison.simple: Remove YYERROR_VERBOSE using.
7273 Use %%error_verbose.
7274 (yyparse): Likewise.
7275 * src/output.c (prepare): Give its final value.
7276 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7277 * src/getargs.h: Add its extern declaration.
7278 * src/getargs.c (error_verbose_flag): New int.
7279 (getargs): Update to catch new case.
7280 * src/options.c (option_table): 'error-verbose' is a new option.
7281 (shortopts): Update.
7282
e0327bc8
AD
72832001-11-27 Akim Demaille <akim@epita.fr>
7284
7285 * src/system.h: Use intl/libgettext.h.
7286 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7287
000f1a3c
AD
72882001-11-27 Akim Demaille <akim@epita.fr>
7289
7290 * tests/torture.at (Exploding the Stack Size with Malloc):
7291 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7292
26cfe0be
AD
72932001-11-27 Akim Demaille <akim@epita.fr>
7294
7295 * src/files.c: Include error.h.
7296 Reported by Hans Aberg.
7297
f6bd5427
MA
72982001-11-26 Marc Autret <autret_m@epita.fr>
7299
d2079671 7300 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
7301 (read_declarations): Add case tok_include.
7302 * src/getargs.h (include): Add its extern definition.
7303 * src/getargs.c (include): New const char *.
7304 (getargs): Add case '-I'.
7305 * src/options.c (option_table): Add include as command line and
7306 percent option.
7307 * src/lex.h (token_t): Add tok_include.
7308
2ca209c1
AD
73092001-11-26 Akim Demaille <akim@epita.fr>
7310
7311 * src/reader.c (readgram): Make sure rules for mid-rule actions
7312 have a lineno equal to that of their host rule.
7313 Reported by Hans Aberg.
7314 * tests/regression.at (Rule Line Numbers): New.
7315
0e41b407
AD
73162001-11-26 Akim Demaille <akim@epita.fr>
7317
7318 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7319 size_ts.
7320
73212001-11-26 Akim Demaille <akim@epita.fr>
7322
7323 * src/complain.c, src/complain.h (error): Remove, provided by
7324 lib/error.[ch].
7325
e0c40012
AD
73262001-11-26 Akim Demaille <akim@epita.fr>
7327
7328 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7329 issue an error message.
7330 * tests/regression.at (Invalid %directive): New.
7331 Reported by Hans Aberg.
7332
5e147124
AD
73332001-11-26 Akim Demaille <akim@epita.fr>
7334
7335 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7336 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7337
a034c8b8
AD
73382001-11-26 Akim Demaille <akim@epita.fr>
7339
7340 * src/conflicts.c (conflicts_print): Don't complain at all when
7341 there are no reduce/reduce conflicts, and as many shift/reduce
7342 conflicts as expected.
7343 * tests/regression.at (%expect right): Adjust.
7344
c64a20f3
AD
73452001-11-23 Akim Demaille <akim@epita.fr>
7346
7347 * lib/alloca.c: Update, from fileutils.
7348
5b0d29bb
AD
73492001-11-23 Akim Demaille <akim@epita.fr>
7350
7351 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7352
722c4bfe
AD
73532001-11-23 Akim Demaille <akim@epita.fr>
7354
7355 * src/system.h: Include alloca.h.
7356 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7357
6255b435
AD
73582001-11-23 Akim Demaille <akim@epita.fr>
7359
7360 * src/print_graph.c (print_actions): Remove `rule', unused.
7361 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7362 pacify GCC's signed < unsigned warnings.
7363 * src/closure.c (itemsetsize): Likewise.
7364 * src/reader.c (symbol_list_new): Static.
7365
b29b2ed5
AD
73662001-11-23 Akim Demaille <akim@epita.fr>
7367
7368 Attaching lineno to buckets is stupid, since only one copy of each
7369 symbol is kept, only the line of the first occurrence is kept too.
7370
7371 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7372 * src/reader.c (rline_allocated): Remove, unused.
7373 (symbol_list): Have a `line' member.
7374 (symbol_list_new): New.
7375 (readgram): Use it.
7376 * src/print.c (print_grammar): Output the rule line numbers.
7377 * tests/regression.at (Solved SR Conflicts)
7378 (Unresolved SR Conflicts): Adjust.
7379 Reported by Hans Aberg.
7380
a81b1d4a
MA
73812001-11-22 Marc Autret <autret_m@epita.fr>
7382
7383 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7384
c1ecb3c1
MA
73852001-11-22 Marc Autret <autret_m@epita.fr>
7386
7387 * src/muscle_tab.c (muscle_init): Remove initialization of
7388 skeleton muscle.
7389 * src/output.c (output_master_parser): Do it here.
7390
fbe01355
AD
73912001-11-20 Akim Demaille <akim@epita.fr>
7392
7393 * po/sv.po: New.
7394 * configure.in (ALL_LINGUAS): Adjust.
7395 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7396 longer contains strings to translate.
7397
81e895c0
AD
73982001-11-19 Akim Demaille <akim@epita.fr>
7399
7400 * src/conflicts.c (conflicts_print): Add a missing \n.
7401
6bb1878b
AD
74022001-11-19 Akim Demaille <akim@epita.fr>
7403
7404 * src/nullable.c (nullable_print): New.
7405 (set_nullable): Call it when tracing.
7406 Better locality of variables.
7407
d9ec2d07
AD
74082001-11-19 Akim Demaille <akim@epita.fr>
7409
7410 * src/print.c (print_actions): Better locality of variables.
7411
720e5c1b
AD
74122001-11-19 Akim Demaille <akim@epita.fr>
7413
7414 * src/derives.c (print_derives): Fix and enrich.
7415 * src/closure.c (print_fderives): Likewise.
7416
fb908786
AD
74172001-11-19 Akim Demaille <akim@epita.fr>
7418
7419 * src/closure.c (itemsetend): Remove, replaced with...
7420 (itemsetsize): new.
7421
125ecb56
AD
74222001-11-19 Akim Demaille <akim@epita.fr>
7423
7424 * src/LR0.c (kernel_end): Remove, replaced with...
7425 (kernel_size): new.
7426
d8cf039f
AD
74272001-11-19 Akim Demaille <akim@epita.fr>
7428
7429 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7430 to clarify.
7431
7bec0760
AD
74322001-11-19 Akim Demaille <akim@epita.fr>
7433
7434 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7435
c87d4863
AD
74362001-11-19 Akim Demaille <akim@epita.fr>
7437
7438 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7439 trace messages.
7440 * src/LR0.c: Likewise.
7441 (allocate_itemsets): Use arrays instead of pointers to clarify.
7442
9bfe901c
AD
74432001-11-19 Akim Demaille <akim@epita.fr>
7444
7445 * src/getargs.c (statistics_flag): Replace with...
7446 (trace_flag): New.
7447 (longopts): Accept --trace instead of --statistics.
7448 * src/getargs.h, src/options.c: Adjust.
7449 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7450 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7451
97db7bd4
AD
74522001-11-19 Akim Demaille <akim@epita.fr>
7453
cc72668c 7454 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
7455 pointers to clarify the code.
7456 (save_reductions, save_shifts): Factor common parts of alternatives.
7457
2c5f66ed
AD
74582001-11-19 Akim Demaille <akim@epita.fr>
7459
7460 * src/LR0.c (new_state, get_state): Complete TRACE code.
7461 * src/closure.c: Include `reader.h' to get `tags', needed by the
7462 trace code.
7463 Rename the conditional DEBUG as TRACE.
7464 Output consistently TRACEs to stderr, not stdout.
7465 * src/derives.c: Likewise.
7466 * src/reduce.c: (inaccessable_symbols): Using if is better style
7467 than goto.
7468 Use `#if TRACE' instead of `#if 0' for tracing code.
7469
300f275f
AD
74702001-11-19 Akim Demaille <akim@epita.fr>
7471
7472 * src/system.h (LIST_FREE, shortcpy): New.
7473 * src/LR0.c: Use them.
7474 * src/output.c (free_itemsets, free_reductions, free_shifts):
7475 Remove, replaced by LIST_FREE.
7476
f59c437a
AD
74772001-11-19 Akim Demaille <akim@epita.fr>
7478
7479 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7480 (REDUCTIONS_ALLOC): New.
7481 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7482 allocation.
7483
6986fd9e
AD
74842001-11-19 Akim Demaille <akim@epita.fr>
7485
7486 * src/LR0.c (new_state): Complete trace code.
7487 * src/nullable.c (set_nullable): Don't translate traces.
7488
4bc30f78
AD
74892001-11-19 Akim Demaille <akim@epita.fr>
7490
7491 * src/print_graph.c (print_core): Better locality of variables.
7492 * src/print.c (print_core): Likewise.
7493
08a946e0
AD
74942001-11-19 Akim Demaille <akim@epita.fr>
7495
7496 * src/vcg.c: You do the output, so you are responsible of the
7497 handling of VCG syntax, in particular: use quotearg.
7498 * src/print_graph.c: Don't.
7499 (print_actions): Don't output the actions as part of the nodes,
7500 since that's the job of the edges.
7501 (print_state): Don't output by hand: fill the node description,
9bfe901c 7502 and ask for its output.
08a946e0 7503
f0473484
AD
75042001-11-19 Akim Demaille <akim@epita.fr>
7505
cc72668c
AD
7506 * src/bison.simple (yyparse): When verbosely reporting an error,
7507 no longer put additional quotes around token names.
f0473484
AD
7508 * tests/calc.at: Adjust.
7509
e41dc700
AD
75102001-11-19 Akim Demaille <akim@epita.fr>
7511
7512 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7513 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7514 * src/output.c: Adjust.
7515
652a871c
AD
75162001-11-19 Akim Demaille <akim@epita.fr>
7517
7518 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7519 (rule_t): this.
7520 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7521
b2ed6e58
AD
75222001-11-19 Akim Demaille <akim@epita.fr>
7523
7524 * src/gram.h (rule_t): New.
7525 (rule_table): New.
7526 (rrhs, rlhs): Remove, part of state_t.
7527 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7528 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7529 * src/reader.c, src/reduce.c: Adjust.
7530
edad7067
AD
75312001-11-19 Akim Demaille <akim@epita.fr>
7532
7533 * src/reader.c (symbols_output): New, extracted from...
7534 (packsymbols): Here.
7535 (reader): Call it.
7536
3feec034
AD
75372001-11-19 Akim Demaille <akim@epita.fr>
7538
7539 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7540 (maxrhs): this new function.
7541
ddcd5fdf
AD
75422001-11-19 Akim Demaille <akim@epita.fr>
7543
cc72668c 7544 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
7545 Adjust.
7546
bb527fc2
AD
75472001-11-19 Akim Demaille <akim@epita.fr>
7548
cc72668c 7549 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
7550 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7551 * src/lalr.c: Adjust.
7552
a845a697
AD
75532001-11-19 Akim Demaille <akim@epita.fr>
7554
7555 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7556 (set_state_table): handle the `lookaheads' members.
7557
f004bf6a
AD
75582001-11-19 Akim Demaille <akim@epita.fr>
7559
cc72668c
AD
7560 * src/lalr.h (lookaheads): Removed array, whose contents is now
7561 a member of...
f004bf6a
AD
7562 (state_t): this structure.
7563 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7564 Adjust.
7565
de326cc0
AD
75662001-11-19 Akim Demaille <akim@epita.fr>
7567
cc72668c
AD
7568 * src/lalr.h (consistent): Removed array, whose contents is now
7569 a member of...
de326cc0
AD
7570 (state_t): this structure.
7571 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7572 Adjust.
7573
90b4416b
AD
75742001-11-19 Akim Demaille <akim@epita.fr>
7575
cc72668c
AD
7576 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7577 contents are now members of...
90b4416b
AD
7578 (state_t): this structure.
7579 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7580 Adjust.
7581
9703cc49
AD
75822001-11-19 Akim Demaille <akim@epita.fr>
7583
7584 * src/lalr.h (state_t): New.
7585 (state_table): Be a state_t * instead of a core **.
7586 (accessing_symbol): Remove, part of state_t.
7587 * src/lalr.c: Adjust.
7588 (set_accessing_symbol): Merge into...
7589 (set_state_table): this.
7590 * src/print_graph.c, src/conflicts.c: Adjust.
7591
d803322e
AD
75922001-11-14 Akim Demaille <akim@epita.fr>
7593
7594 * tests/calc.at, tests/output.at, tests/regression.at,
7595 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7596 now the tests are run in private dirs, therefore AC_CLEANUP and
7597 family can be simplified to 0-ary.
7598 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7599 use abs. path to find config.h.
7600 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7601 stderr, there can be way too much random noise.
7602 Instead pass -Werror to GCC and rely on the exit status.
7603 Reported by Wolfram Wagner.
7604
3d76b07d
AD
76052001-11-14 Akim Demaille <akim@epita.fr>
7606
7607 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7608 defined only if yyoverflow is defined, to avoid `warning: unused
7609 variable `yyvs1''.
7610 Reported by The Test Suite.
7611
09b503c8
AD
76122001-11-14 Akim Demaille <akim@epita.fr>
7613
7614 * src/print.c: Include reduce.h.
7615 Reported by Hans Aberg.
7616
76172001-11-14 Akim Demaille <akim@epita.fr>
7618
7619 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7620 Revert a previous patch: these are really const.
7621 * src/conflicts.c (conflict_report): Additional useless pair of
7622 braces to pacify GCC's warnings for `if () if () {} else {}'.
7623 * src/lex.c (parse_percent_token): Replace equal_offset with
7624 arg_offset.
7625 arg is const.
7626 Be sure to strdup `arg' when used, since there is no reason for
7627 token_buffer not to change.
7628
0f37a994
AD
76292001-11-14 Akim Demaille <akim@epita.fr>
7630
7631 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7632 definition.
7633 * src/main.c (main): Use them.
7634 Suggested by Hans Aberg.
7635
d39d93b8
AD
76362001-11-12 Akim Demaille <akim@epita.fr>
7637
7638 * src/system.h (ngettext): Now that we use ngettext, be sure to
7639 provide a default definition when NLS are not used.
7640
9edcd895
AD
76412001-11-12 Akim Demaille <akim@epita.fr>
7642
7643 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7644 Use @kbd to denote user input.
7645 (Language and Grammar): ANSIfy the example.
7646 Adjust its layout for info/notinfo.
7647 (Location Tracking Calc): Output error messages to stderr.
7648 Output locations in a more GNUtically correct way.
7649 Fix a couple of Englishos.
7650 Adjust @group/@end group pairs.
7651
7da99ede
AD
76522001-11-12 Akim Demaille <akim@epita.fr>
7653
e3aa65c5 7654 %expect was not functioning at all.
7da99ede
AD
7655
7656 * src/conflicts.c (expected_conflicts): Set to -1.
7657 (conflict_report): Use ngettext.
7658 (conflicts_print): Check %expect and make its violation an error.
7659 * doc/bison.texinfo (Expect Decl): Adjust.
7660 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7661 * tests/regression.at (%expect not enough, %expect right)
7662 (%expect too much): New.
7663
ba9dda1a
AD
76642001-11-12 Akim Demaille <akim@epita.fr>
7665
7666 * tests/regression.at (Conflicts): Rename as...
7667 (Unresolved SR Conflicts): this.
7668 (Solved SR Conflicts): New.
7669
337c5bd1
AD
76702001-11-12 Akim Demaille <akim@epita.fr>
7671
7672 * src/reduce.c (print_results): Rename as...
7673 (reduce_output): This.
7674 Output to OUT, passed as argument, instead of output_obstack.
7675 (dump_grammar): Likewise.
7676 (reduce_free): New.
7677 Also free V1.
7678 (reduce_grammar): No longer call reduce_output, since...
7679 * src/print.c (print_results): do it.
7680 * src/main.c (main): Call reduce_free;
7681
c73a41af
AD
76822001-11-12 Akim Demaille <akim@epita.fr>
7683
7684 * src/conflicts.c (print_reductions): Accept OUT as argument.
7685 Output to it, not to output_obstack.
7686 * src/print.c (print_actions): Adjust.
7687
0df87bb6
AD
76882001-11-12 Akim Demaille <akim@epita.fr>
7689
7690 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7691 the result instead of using...
7692 (src_total, rrc_total, src_count, rrc_count): Remove.
7693 (any_conflicts): Remove.
7694 (print_conflicts): Split into...
7695 (conflicts_print, conflicts_output): New.
7696 * src/conflicts.h: Adjust.
7697 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 7698 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
7699 * tests/regression.at (Conflicts): New.
7700 Reported by Tom Lane.
7701
e4d3d4de
AD
77022001-11-12 Akim Demaille <akim@epita.fr>
7703
7704 * tests/regression.at (Invalid input): Remove, duplicate with
7705 ``Invalid input: 1''.
7706
6d7d248e
AD
77072001-11-12 Akim Demaille <akim@epita.fr>
7708
7709 * tests/torture.at (AT_DATA_STACK_TORTURE)
7710 (Exploding the Stack Size with Alloca)
7711 (Exploding the Stack Size with Malloc): New.
7712
e9e4c321
AD
77132001-11-12 Akim Demaille <akim@epita.fr>
7714
7715 * src/bison.simple (YYSTACK_REALLOC): New.
7716 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 7717 Reported by Per Allansson.
e9e4c321 7718
5f7e0832
AD
77192001-11-12 Pascal Bart <pascal.bart@epita.fr>
7720
7721 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7722 define CPP macro, which substitute YYSTYPE by yystype.
7723 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7724 with yyltype/YYLTYPE. This allows inclusion of the generated
7725 header within the parser if the compiler, such as GGC, accepts
7726 multiple equivalent #defines.
7727 From Akim.
7728
e3f1699f
AD
77292001-11-05 Akim Demaille <akim@epita.fr>
7730
7731 * src/reader.c (symbols_output): New, extracted from...
7732 (packsymbols): here.
7733 (reader): Adjust.
7734
65be0866
AD
77352001-11-05 Akim Demaille <akim@epita.fr>
7736
7737 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7738
e4d910bf
AD
77392001-11-05 Akim Demaille <akim@epita.fr>
7740
7741 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7742 pattern.
7743
951366c1
AD
77442001-11-05 Akim Demaille <akim@epita.fr>
7745
7746 * src/options.h (struct option_table_struct): set_flags is void*.
7747 * src/options.c (longopts): Support `--output' and `%output'.
7748 (usage): Adjust.
7749 * src/lex.h (tok_setopt): Remove, replaced with...
7750 (tok_intopt, tok_stropt): these new guys.
7751 * src/lex.c (getopt.h): Not needed.
7752 (token_buffer, unlexed_token_buffer): Not const.
7753 (percent_table): Promote `-' over `_' in directive names.
7754 Active `%name-prefix', `file-prefix', and `output'.
7755 (parse_percent_token): Accept possible arguments to directives.
7756 Promote `-' over `_' in directive names.
7757
d8988b2f
AD
77582001-11-04 Akim Demaille <akim@epita.fr>
7759
7760 * doc/bison.texinfo (Decl Summary): Split the list into
7761 `directives for grammars' and `directives for bison'.
7762 Sort'em.
7763 Add description of `%name-prefix', `file-prefix', and `output'.
7764 Promote `-' over `_' in directive names.
7765 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7766 Simplify the description of `--name-prefix'.
7767 Promote `-' over `_' in directive names.
7768 Promote `--output' over `--output-file'.
7769 Fix the description of `--defines'.
7770 * tests/output.at: Exercise %file-prefix and %output.
7771
6468d18e
AD
77722001-11-02 Akim Demaille <akim@epita.fr>
7773
7774 * doc/refcard.tex: Update.
7775
6b7e85b9
AD
77762001-11-02 Akim Demaille <akim@epita.fr>
7777
7778 * src/symtab.h (SUNDEF): New.
7779 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7780 stand for `uninitialized', instead of 0.
7781 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7782 * src/lex.c (lex): Adjust.
7783
7784 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7785 Number it 0.
7786 Let yylex return it instead of a plain 0.
7787 Reported by Dick Streefland.
7788
cd5aafcf
AD
77892001-11-02 Akim Demaille <akim@epita.fr>
7790
7791 * tests/regression.at (Mixing %token styles): New test.
7792
037ca2f1
AD
77932001-11-02 Akim Demaille <akim@epita.fr>
7794
7795 * src/reader.c (parse_thong_decl): Formatting changes.
7796 (token_translations_init): New, extracted from...
7797 (packsymbols): Here.
7798 Adjust.
7799
270a173c
AD
78002001-11-01 Akim Demaille <akim@epita.fr>
7801
7802 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7803 Check that `9foo.y' produces correct cpp guards.
7804 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7805 guards.
7806 Reported by Wwp.
7807
561f9a30
AD
78082001-11-01 Akim Demaille <akim@epita.fr>
7809
7810 * tests/regression.at (Invalid input: 2): New.
7811 * src/lex.c (unlexed_token_buffer): New.
7812 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7813 too.
7814 Reported by Wwp.
7815
f987e9d2
AD
78162001-11-01 Akim Demaille <akim@epita.fr>
7817
7818 * tests/calc.at: Catch up with 1.30.
7819 * configure.in: Bump to 1.49a.
7820 Adjust to newer Autotest.
7821
0846f581
PB
78222001-10-19 Pascal Bart <pascal.bart@epita.fr>
7823
7824 * src/conflicts.c: Move global variables rrc_total and src_total ...
7825 (print_conflicts): here.
7826 * src/output.c (output): Free global variable user_toknums.
7827 * src/lex.c (token_obstack): Become static.
7828
3c1a79b3
AD
78292001-10-18 Akim Demaille <akim@epita.fr>
7830
7831 * tests/atlocal.in (GCC): Add.
7832 * tests/calc.at: s/m4_match/m4_bmatch/.
7833 s/m4_patsubst/m4_bpatsubst/.
7834 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7835 * configure.in: AC_SUBST(GCC).
7836
5d52e7d0
MA
78372001-10-14 Marc Autret <autret_m@epita.fr>
7838
7839 * src/options.c (create_long_option_table): Fix.
7840
631aa1d3
AD
78412001-10-10 Akim Demaille <akim@epita.fr>
7842
7843 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7844
f6ec6d13
AD
78452001-10-04 Akim Demaille <akim@epita.fr>
7846
7847 * src/reader.c (parse_union_decl): Push the caracters in
7848 union_obstack, not attrs_obstack.
7849
342b8b6e
AD
78502001-10-04 Akim Demaille <akim@epita.fr>
7851
7852 Merge in the branch 1.29.
7853
7854 * src/reader.c (packsymbols): Use a temporary obstack for
7855 `%%tokendef', since output_stack is already used elsewhere.
7856
7857 2001-10-02 Akim Demaille <akim@epita.fr>
7858
7859 Bump 1.29d.
7860
7861 2001-10-02 Akim Demaille <akim@epita.fr>
7862
7863 Version 1.29c.
7864
7865 2001-10-02 Akim Demaille <akim@epita.fr>
7866
7867 * tests/regression.at (Invalid CPP headers): New.
7868 From Alexander Belopolsky.
7869 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7870
7871 2001-10-02 Akim Demaille <akim@epita.fr>
7872
7873 * tests/regression.at (Invalid input): New.
7874 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7875 Reported by Shura.
7876
7877 2001-10-02 Akim Demaille <akim@epita.fr>
7878
7879 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7880
7881 2001-10-02 Akim Demaille <akim@epita.fr>
7882
7883 * src/output.c (output_parser): Assert `skeleton'.
7884 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7885 systems.
7886 From Shura.
7887
7888 2001-10-01 Marc Autret <autret_m@epita.fr>
7889
7890 * src/lex.h: Echo modifications.
7891 * src/lex.c (unlex): Parameter is now token_t.
7892 From Hans Aberg.
7893
7894 2001-10-01 Marc Autret <autret_m@epita.fr>
7895
7896 * src/main.c: Include lex.h.
7897 From Hans Aberg.
7898
7899 2001-09-29 Akim Demaille <akim@epita.fr>
7900
7901 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7902
7903 2001-09-28 Akim Demaille <akim@epita.fr>
7904
7905 * tests/testsuite.at: Update to newer Autotest.
7906 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7907
7908 2001-09-27 Akim Demaille <akim@epita.fr>
7909
7910 Position independent wrapper.
7911
7912 * tests/bison: Remove.
7913 * tests/bison.in: New.
7914 * configure.in: Adjust.
7915
7916 2001-09-27 Paul Eggert <eggert@twinsun.com>
7917
7918 Port quotearg fixes from tar 1.13.24.
7919
7920 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7921 tm to be declared.
7922 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7923 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7924
7925 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7926 * m4/mbrtowc.m4: New file.
7927 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7928 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7929
7930 2001-09-27 Akim Demaille <akim@epita.fr>
7931
7932 Bump to 1.29c.
7933
7934 2001-09-27 Akim Demaille <akim@epita.fr>
7935
7936 Version 1.29b.
7937
7938 2001-09-25 Akim Demaille <akim@epita.fr>
7939
7940 * src/system.h: Include `xalloc.h'.
7941 Remove it from the C files.
7942 * src/files.c (output_files): Free the obstacks.
7943 * src/lex.c (init_lex): Rename as...
7944 (lex_init): this.
7945 (lex_free): New.
7946 * src/main.c (main): Use it.
7947
7948 2001-09-24 Marc Autret <autret_m@epita.fr>
7949
7950 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7951 to output informations in fout (FILE*).
7952 (open_graph, close_graph): Likewise.
7953 (output_graph, output_edge, output_node): Likewise.
7954 * src/vcg.h: Update function prototypes.
7955 * src/print_graph.c (print_graph): Open output graph file.
7956 (print_actions): Adjust.
7957 * src/files.h: Remove extern declaration.
7958 * src/files.c: Remove graph_obstack declaration.
7959 (open_files): Remove graph_obstack initialization.
7960 (output_files): Remove graph_obstack saving.
7961
7962 2001-09-24 Marc Autret <autret_m@epita.fr>
7963
7964 * src/files.c (compute_output_file_names): Fix.
7965
7966 2001-09-24 Marc Autret <autret_m@epita.fr>,
7967 Akim Demaille <akim@epita.fr>
7968
7969 * src/reader.c (reader): Remove call to free_symtab ().
7970 * src/main.c (main): Call it here.
7971 Include symtab.h.
7972 * src/conflicts.c (initialize_conflicts): Rename as...
7973 (solve_conflicts): this.
7974 * src/print.c (print_core, print_actions, print_state)
7975 (print_grammar): Dump to a file instead a `output_obstack'.
7976 (print_results): Dump `output_obstack', and then proceed with the
7977 FILE *.
7978 * src/files.c (compute_output_file_names, close_files): New.
7979 (output_files): Adjust.
7980 * src/main.c (main): Adjust.
7981
7982 2001-09-23 Marc Autret <autret_m@epita.fr>
7983
7984 * src/files.c (compute_header_macro): Computes header macro name
7985 from spec_defines_file when given.
7986
7987 2001-09-23 Marc Autret <autret_m@epita.fr>
7988
7989 * src/files.c (output_files): Add default extensions.
7990
7991 2001-09-22 Akim Demaille <akim@epita.fr>
7992
7993 * src/conflicts.c (finalize_conflicts): Rename as...
7994 (free_conflicts): this.
7995
7996 2001-09-22 Akim Demaille <akim@epita.fr>
7997
7998 * src/gram.c (gram_free): Rename back as...
7999 (dummy): this.
8000 (output_token_translations): Free `token_translations'.
8001 * src/symtab.c (free_symtab): Free the tag field.
8002
8003 2001-09-22 Akim Demaille <akim@epita.fr>
8004
8005 Remove `translations' as it is always set to true.
8006
8007 * src/gram.h: Adjust.
8008 * src/reader.c (packsymbols, parse_token_decl): Adjust
8009 * src/print.c (print_grammar): Adjust.
8010 * src/output.c (output_token_translations): Adjust.
8011 * src/lex.c (lex): Adjust.
8012 * src/gram.c: Be sure the set pointers to NULL.
8013 (dummy): Rename as...
8014 (gram_free): this.
8015
8016 2001-09-22 Akim Demaille <akim@epita.fr>
8017
8018 * configure.in: Invoke AM_LIB_DMALLOC.
8019 * src/system.h: Use dmalloc.
8020 * src/LR0.c: Be sure to have pointers initialized to NULL.
8021 (allocate_itemsets): Allocate kernel_items only if needed.
8022
8023 2001-09-22 Akim Demaille <akim@epita.fr>
8024
8025 * configure.in: Bump to 1.29b.
8026 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8027 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8028 need xmalloc.c in calc.y.
8029 From Pascal Bart.
8030
8031 2001-09-21 Akim Demaille <akim@epita.fr>
8032
8033 Version 1.29a.
8034 * Makefile.maint, config/config.guess, config/config.sub,
8035 * config/missing: Update from masters.
8036 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8037 upon package.m4.
8038 * configure.in (ALL_LINGUAS): Add `tr'.
8039
8040 2001-09-21 Akim Demaille <akim@epita.fr>
8041
8042 * tests/Makefile.am (package.m4): Move to...
8043 ($(srcdir)/$(TESTSUITE)): here.
8044
8045 2001-09-20 Akim Demaille <akim@epita.fr>
8046
8047 * src/complain.c: No longer try to be standalone: use system.h.
8048 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8049 * src/complain.h: Likewise.
8050 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8051 Remove the unused variable `n'.
8052 From Albert Chin-A-Young.
8053
8054 2001-09-18 Marc Autret <autret_m@epita.fr>
8055
8056 * doc/bison.1: Update.
8057 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8058 descriptions.
8059 (Option Cross Key): Update.
8060 Add --graph.
8061
8062 2001-09-18 Marc Autret <autret_m@epita.fr>
8063
8064 * tests/regression.at: New test (comment in %union).
8065
8066 2001-09-18 Marc Autret <autret_m@epita.fr>
8067
8068 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8069 do that.
8070 Reported by Keith Browne.
8071
8072 2001-09-18 Marc Autret <autret_m@epita.fr>
8073
8074 * tests/output.at: Add tests for --defines and --graph.
8075
8076 2001-09-18 Marc Autret <autret_m@epita.fr>
8077
8078 * tests/output.at: Removes tests of %{header,src}_extension features.
8079
8080 2001-09-18 Akim Demaille <akim@epita.fr>
8081
8082 * tests/Makefile.am (package.m4): New.
8083 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8084 (_AT_CHECK_CALC_ERROR): Likewise.
8085 Factor the `, ' part of verbose error messages.
8086
8087 2001-09-18 Marc Autret <autret_m@epita.fr>
8088
8089 * src/getargs.c (longopts): Declare --defines and --graph as options
8090 with optional arguments.
8091 * src/files.h: Add extern declarations.
8092 * src/files.c (spec_graph_file, spec_defines_file): New.
8093 (output_files): Update.
8094 Remove CPP-outed code.
8095
8096 2001-09-18 Marc Autret <autret_m@epita.fr>
8097
8098 Turn off %{source,header}_extension feature.
8099
8100 * src/files.c (compute_exts_from_gf): Update.
8101 (compute_exts_from_src): Update.
8102 (output_files): CPP-out useless code.
8103 * src/files.h: Remove {header,source}_extension extern declarations.
8104 * src/reader.c (parse_dquoted_param): CPP-out.
8105 (parse_header_extension_decl): Remove.
8106 (parse_source_extension_decl): Remove.
8107 (read_declarations): Remove cases tok_{hdrext,srcext}.
8108 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8109 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8110
8111 2001-09-10 Akim Demaille <akim@epita.fr>
8112
8113 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8114 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8115 (AT_CHECK_OUTPUT): this.
8116 Merely check ls' exit status, its output is useless.
8117
8118 2001-09-10 Akim Demaille <akim@epita.fr>
8119
8120 * tests/calc.at: Use m4_match.
8121 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8122
8123 2001-09-10 Marc Autret <autret_m@epita.fr>,
8124 Akim Demaille <akim@epita.fr>
8125
8126 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8127 enum color_e.
8128 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8129 to `normal'.
8130 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8131 * src/lex.h: Adjust prototype.
8132 (token_t): Add `tok_undef'.
8133 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8134 (parse_percent_token): Now returns token_t.
8135 Add default statement in switch.
8136 (lex): Separate `c' as an input variable, from the token_t result
8137 part.
8138 (unlexed): Is a token_t.
8139
8140 2001-09-10 Akim Demaille <akim@epita.fr>
8141
8142 * configure.in: Bump to 1.29a.
8143
8144 2001-09-07 Akim Demaille <akim@epita.fr>
8145
8146 Version 1.29.
8147
8148 2001-08-30 Akim Demaille <akim@epita.fr>
8149
8150 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8151 * m4/atconfig.m4: Remove.
8152 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8153 * tests/bison: New.
8154 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8155 m4_if, m4_patsubst, and m4_regexp.
8156 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8157 `input' file instead of echo.
8158
8159 2001-08-29 Akim Demaille <akim@epita.fr>
8160
8161 Bump to 1.28e.
8162
8163 2001-08-29 Akim Demaille <akim@epita.fr>
8164
8165 Version 1.28d.
8166
8167 2001-08-29 Paul Eggert <eggert@twinsun.com>
8168
8169 * src/bison.simple (yyparse): Don't take the address of an
8170 item before the start of an array, as that doesn't conform to
8171 the C Standard.
8172
8173 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8174
8175 * doc/bison.texinfo (Location Tracking Calc): New node.
8176
8177 2001-08-29 Paul Eggert <eggert@twinsun.com>
8178
8179 * src/output.c (output): Do not define const, as this now
8180 causes more problems than it cures.
8181
8182 2001-08-29 Akim Demaille <akim@epita.fr>
8183
8184 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8185 the nodes.
8186 Be sure to tag the `detailmenu'.
8187
8188 2001-08-29 Akim Demaille <akim@epita.fr>
8189
8190 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8191 download in a tmp dir.
8192
8193 2001-08-28 Marc Autret <autret_m@epita.fr>
8194
8195 * config/depcomp: New file.
8196
8197 2001-08-28 Marc Autret <autret_m@epita.fr>
8198
8199 * doc/bison.1 (mandoc): Adjust.
8200 From Juan Manuel Guerrero.
8201
8202 2001-08-28 Marc Autret <autret_m@epita.fr>
8203
8204 * src/print_graph.c (print_state): Fix.
8205
8206 2001-08-27 Marc Autret <autret_m@epita.fr>
8207
8208 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8209 char * members.
8210 Echo modifications to the functions prototypes.
8211 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8212
8213 2001-08-27 Marc Autret <autret_m@epita.fr>
8214
8215 * src/vcg.c: Include `xalloc.h'.
8216 (add_colorentry): New.
8217 (add_classname): New.
8218 (add_infoname): New.
8219 * src/vcg.h: Add new prototypes.
8220
8221 2001-08-27 Akim Demaille <akim@epita.fr>
8222
8223 * Makefile.maint: Sync. again with CVS Autoconf.
8224
8225 2001-08-27 Akim Demaille <akim@epita.fr>
8226
8227 * Makefile.maint: Formatting changes.
8228 (po-update, cvs-update, update): New targets.
8229 (AMTAR): Remove.
8230
8231 2001-08-27 Akim Demaille <akim@epita.fr>
8232
8233 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8234 * Makefile.maint: Sync. with CVS Autoconf.
8235
8236 2001-08-27 Marc Autret <autret_m@epita.fr>
8237
8238 * src/vcg.h (struct infoname_s): New.
8239 (struct colorentry_s): New.
8240 (graph_s): New fields {vertical,horizontal}_order in structure.
8241 Add `infoname' field.
8242 Add `colorentry' field;
8243 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8244 (G_HORIZONTAL_ORDER): New.
8245 (G_INFONAME): New.
8246 (G_COLORENTRY): New.
8247 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8248 Add output of `infoname'.
8249 Add output of `colorentry'.
8250
8251 2001-08-27 Marc Autret <autret_m@epita.fr>
8252
8253 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8254 This one shadowed a global parameter.
8255
8256 2001-08-24 Marc Autret <autret_m@epita.fr>
8257
8258 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8259 instead of `unsigned'.
8260 (print_state): Do not call obstack_object_size () in obstack_grow ()
8261 to avoid macro variables shadowing.
8262
8263 2001-08-23 Marc Autret <autret_m@epita.fr>
8264
8265 * src/lex.c (percent_table): Typo: s/naem/name/.
8266 Add graph option.
8267 Normalize new options declarations.
8268
8269 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8270
8271 * tests/suite.at: Exercise %header_extension and %source_extension.
8272
8273 2001-08-16 Marc Autret <autret_m@epita.fr>
8274
8275 * src/reader.c (parse_dquoted_param): New.
8276 (parse_header_extension_decl): Use it.
8277 (parse_source_extension_decl): Likewise.
8278
8279 2001-08-16 Marc Autret <autret_m@epita.fr>
8280
8281 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8282 (get_xxxx_str): Use assert () instead of complain ().
8283 Remove return invokations in default cases.
8284 (get_decision_str): Modify default behaviour. Remove second argument.
8285 Echo modifications on calls.
8286 (output_graph): Fix.
8287
8288 2001-08-16 Marc Autret <autret_m@epita.fr>
8289
8290 * src/getargs.c (usage): Update with ``-g, --graph''.
8291
8292 2001-08-16 Marc Autret <autret_m@epita.fr>
8293
8294 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8295 (Option Cross Key): Likewise.
8296 * doc/bison.1: Update.
8297
1c8c2190
PB
82982001-09-25 Pascal Bart <pascal.bart@epita.fr>
8299
8300 * src/output.c (output_master_parser): Don't finish action_obstack.
8301 (output_parser): Don't care about the muscle action, here.
8302 (prepare): Copy the action_obstack in the action muscle.
8303 (output): Free action_obstack.
8304
180d45ba
PB
83052001-09-23 Pascal Bart <pascal.bart@epita.fr>
8306
8307 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8308 will contain `%union' declaration.
8309 (parse_union_decl): Delete #line directive output.
8310 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8311 informations about %union.
8312 (parse_union_decl): Copy the union_obstack in the muscle stype.
8313 * src/bison.simple: Add new #line directive.
8314 Add typdef %%stype YYSTYPE.
8315
c51d1a19
PB
83162001-09-23 Pascal Bart <pascal.bart@epita.fr>
8317
8318 * src/bison.simple: Add new `#line' directive.
8319
6f9344da
PB
83202001-09-22 Pascal Bart <pascal.bart@epita.fr>
8321
8322 * src/bison.simple: New `#line' directive.
8323 * src/output.c (output_parser): Support new dynamic muscle input_line.
8324
652def80
MA
83252001-09-22 Marc Autret <autret_m@epita.fr>
8326
8327 * src/output.c (output_master_parser): New.
8328 (output_parser): Be more re-entrant.
8329
25b222fa
MA
83302001-09-21 Marc Autret <autret_m@epita.fr>
8331
8332 * src/reader.c (copy_definition, parse_union_decl): Update and use
8333 `linef' muscle.
8334 (copy_action): Likewise.
8335 Use obstack_1grow ().
8336 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8337
6bc35ae5
MA
83382001-09-21 Marc Autret <autret_m@epita.fr>
8339
8340 * src/options.c (option_table): Adjust.
8341 * src/lex.c (parse_percent_token): Fix.
8342
c0629aa1
PB
83432001-09-20 Pascal Bart <pascal.bart@epita.fr>
8344
8345 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 8346
82b6d266
PB
83472001-09-20 Pascal Bart <pascal.bart@epita.fr>
8348
8349 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8350 is now an option_table_struct*.
8351 (option_strcmp): New function option_strcmp.
8352 (parse_percent_token): Call option_strcmp.
8353 * src/getargs.c (xalloc.h, options.h): Include it.
8354 (getargs): Call create_long_option_table.
8355 (getargs): Free longopts at the end of the function.
8356 (shortopts): Move in options.c.
8357 * src/options.c (create_long_option_table): New function. Convert
8358 information from option_table to option structure.
8359 * src/reader.c (options.h): Include it.
8360
8361 * src/Makefile.am: Adjust.
8362 * src/options.c (option_table): Create from longopts and percent_table.
8363 * src/getargs.c (longopts): Delete.
8364 * src/lex.c (struct percent_table_struct): Delete.
8365 (percent_table): Delete.
8366 (options.h): Include it.
8367 * src/options.c: Create.
8368 * src/options.h: Create.
8369 Declare enum opt_access_e.
8370 Define struct option_table_struct.
8371
75f5aaea
MA
83722001-09-20 Marc Autret <autret_m@epita.fr>
8373
8374 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8375 sections of Bison.
8376
f508cb0a
PB
83772001-09-19 Pascal Bart <pascal.bart@epita.fr>
8378
8379 * src/bison.simple: s/%%filename/%%skeleton.
8380 * src/muscle_tab.c (getargs.h): Include it.
8381 (muscle_init): Insert new muscle skeleton.
8382
13105fc1
PB
83832001-09-18 Pascal Bart <pascal.bart@epita.fr>
8384
8385 * src/output.c (output_parser): Delete unused variable actions_dumped.
8386
b0c4483e
PB
83872001-09-07 Pascal Bart <pascal.bart@epita.fr>
8388
8389 * src/output.c (output): Delete call to reader_output_yylsp.
8390 * src/reader.c (reader): Likewise.
8391 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 8392
11d82f03
MA
83932001-09-02 Marc Autret <autret_m@epita.fr>
8394
8395 * src/reader.c: Include muscle_tab.h.
8396 (parse_union_decl): Update.
8397 (parse_macro_decl): Rename parse_muscle_decl.
8398 Update to use renamed functions and variable.
8399 (read_declarations, copy_action, read_additionnal_code, : Updated
8400 with correct variables and functions names.
8401 (packsymbols, reader): Likewise.
342b8b6e 8402
11d82f03 8403 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 8404
11d82f03
MA
8405 * src/output.c: Include muscle_tab.h
8406 In all functions using macro_insert, change by using muscle_insert ().
8407 (macro_obstack): Rename muscle_obstack.
8408 Echo modifications in the whole file.
8409 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8410 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8411 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8412
8413 * src/muscle_tab.h: Update double inclusion macros.
8414 (macro_entry_s): Rename muscle_entry_s.
8415 Update prototypes.
342b8b6e 8416
11d82f03
MA
8417 * src/muscle_tab.c: Include muscle_tab.h.
8418 Rename macro_tabble to muscle_table.
8419 (mhash1, mhash2, mcmp): Use muscle_entry.
8420 (macro_init): Rename muscle_init. Update.
8421 (macro_insert): Rename muscle_insert. Update.
8422 (macro_find): Rename muscle_find. Update.
8423
8424 * src/main.c: Include muscle_tab.h.
8425 (main): Call muscle_init ().
8426 * src/Makefile.am (bison_SOURCES): Echo modifications.
8427
93a37297
MA
84282001-09-02 Marc Autret <autret_m@epita.fr>
8429
f753cd62 8430 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 8431
f753cd62
MA
8432 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8433
84342001-09-02 Marc Autret <autret_m@epita.fr>
8435
8436 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 8437
682d48cd
PB
84382001-09-01 Pascal Bart <pascal.bart@epita.fr>
8439
342b8b6e 8440 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
8441 filename.
8442
087c8fda
MA
84432001-09-01 Marc Autret <autret_m@epita.fr>
8444
8445 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8446 to an explicit value to activate the feature. We do it here.
8447
dda680cb
PB
84482001-08-31 Pascal Bart <pascal.bart@epita.fr>
8449
8450 * src/output.c (prepare): Delete the `filename' muscule insertion.
8451 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8452 (parse_union_decl): Likewise.
8453 * src/macrotab.c (macro_init): Initialize filename by infile.
8454
9e644e64
MA
84552001-08-31 Marc Autret <autret_m@epita.fr>
8456
8457 * src/bison.simple (YYLSP_NEEDED): New definition.
8458 * src/output.c (prepare): Add macro insertion of `locations_flag'
8459
17da6427
PB
84602001-08-31 Pascal Bart <pascal.bart@epita.fr>
8461
8462 * src/output.c (prepare): Delete insertion of previous muscles,
8463 and insert the `prefix' muscles.
8464 * src/macrotab.c (macro_init): Likewise.
8465 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 8466 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
8467 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8468 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 8469 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
8470 name_prefix.
8471
e8cb70b9
PB
84722001-08-31 Pascal Bart <pascal.bart@epita.fr>
8473
8474 * src/main.c (main): Standardize.
8475 * src/output.c (output_table_data, output_parser): Likewise.
8476 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8477
63c2d5de
MA
84782001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8479
342b8b6e 8480 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
8481 %%epilogue.
8482 * src/output.c (output): Rename %%declarations to %%prologue.
8483 * src/bison.simple: Echo modifications.
342b8b6e 8484
d8cb5183
MA
84852001-08-31 Marc Autret <autret_m@epita.fr>
8486
8487 * src/reader.c (readgram): CleanUp.
8488 (output_token_defines): Likewise.
8489 (packsymbols): Likewise.
8490 (reader): Likewise.
8491 * src/output.c (output): CPP-out useless code.
8492
6c686258
PB
84932001-08-31 Pascal Bart <pascal.bart@epita.fr>
8494
342b8b6e 8495 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
8496 output_trailers and output_headers.
8497 * src/output.h: Remove obsolete functions prototypes of output_headers
8498 and output_trailers.
8499
8f451ef7
PB
85002001-08-30 Pascal Bart <pascal.bart@epita.fr>
8501
8502 * src/main.c: Include macrotab.h.
342b8b6e 8503 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
8504 Adjust functions prototypes.
8505 * src/macrotab.c (macro_insert): Constify key and value.
8506 (macro_find): Constify key.
8507 (macro_insert): Include 'xalloc.h'
8508 (macro_insert): Use XMALLOC.
8509 (macro_find): Constify return value.
8510 * src/output.c (output_table_data): Rename table to table_data.
8511 (output_parser): Constify macro_key, macro_value.
8512
997b6fd0 85132001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
8514
8515 * src/reader.c (parse_skel_decl): New.
342b8b6e 8516 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
8517 * src/lex.h (token_t): New token `tok_skel'.
8518 * src/lex.c (percent_table): Add skeleton option entry.
8519 Standardize.
8520
ff48177d
MA
85212001-08-29 Marc Autret <autret_m@epita.fr>
8522
8523 * src/bison.simple: Add %%user_code directive at the end.
8524 * src/reader.c (read_additionnal_code): New.
8525 (reader): Use it.
8526 * src/output.c (output_program): Remove.
8527 (output): Update.
8528
b33160bf
MA
85292001-08-28 Marc Autret <autret_m@epita.fr>
8530
8531 * src/output.c (output_actions): Clean up.
4e5caae2 8532 (output_gram): CPP-out useless code.
b33160bf
MA
8533 * src/reader.c (reader): Clean up, CPP-out useless code.
8534
d1a2daf7
PB
85352001-08-28 Pascal Bart <pascal.bart@epita.fr>
8536
342b8b6e 8537 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 8538 directive.
d1a2daf7
PB
8539 * src/bison.simple: Add `%%definitions'.
8540
2b763dfe
MA
85412001-08-28 Marc Autret <autret_m@epita.fr>
8542
8543 * config/depcomp: New file.
8544
f1a87ef6
PE
85452001-08-27 Paul Eggert <eggert@twinsun.com>
8546
8547 * src/bison.simple (yyparse): Don't take the address of an
8548 item before the start of an array, as that doesn't conform to
8549 the C Standard.
8550
82e236e2
RA
85512001-08-27 Robert Anisko <robert.anisko@epita.fr>
8552
f1a87ef6 8553 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
8554 obstack. It was done too late here.
8555
8556 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8557 completely wrong.
8558 (reader): Initialize the macro obstack here, since we need it to grow
8559 '%define' directives.
8560
8561 * src/reader.h: Declare the macro obstack as extern.
8562
b0cfa28a
RA
85632001-08-27 Robert Anisko <robert.anisko@epita.fr>
8564
8565 * src/output.c (output_parser): Fix. Store single '%' characters in
8566 the output obstack instead of throwing them away.
8567
6fc74234
AD
85682001-08-27 Akim Demaille <akim@epita.fr>
8569
8570 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8571
9c76d118
RA
85722001-08-25 Robert Anisko <robert.anisko@epita.fr>
8573
8574 * lib/Makefile.am: Adjust.
8575
a8289c62
RA
85762001-08-25 Robert Anisko <robert.anisko@epita.fr>
8577
8578 * src/bison.simple: Update and add '%%' directives.
8579
b6610515
RA
85802001-08-25 Robert Anisko <robert.anisko@epita.fr>
8581
8582 * src/reader.c (reader): Remove calls to 'output_headers' and
8583 'output_trailers'. Remove some C output.
8584 (readgram): Disable a piece of code that was writing a default
8585 definition for 'YYSTYPE'.
8586 (reader_output_yylsp): Remove.
8587 (packsymbols): Output token defintions to a macro.
8588 (copy_definition): Disable C output.
6fc74234 8589
b6610515
RA
8590 * src/reader.c (parse_macro_decl): New function used to parse macro
8591 declarations.
8592 (copy_string2): Put the body of copy_string into this new function.
8593 Add a parameter to let the caller choose whether he wants to copy the
8594 string delimiters or not.
8595 (copy_string): Be a simple call to copy_string2 with the last argument
8596 bound to true.
8597 (read_declarations): Add case for macro definition.
8598 (copy_identifier): New.
6fc74234 8599 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
8600 rather than lex.
8601
26f609ff
RA
86022001-08-25 Robert Anisko <robert.anisko@epita.fr>
8603
8604 * src/output.c (prepare): Add prefixed names.
8605 (output_parser): Output semantic actions.
8606 (output_parser): Fix bug on '%%line' directives.
6fc74234 8607
26f609ff
RA
8608 * src/output.c (output_headers): Remove. The C code printed by this
8609 function should now be in the skeletons.
8610 (output_trailers): Remove.
8611 (output): Disable call to 'reader_output_yylsp'.
8612 (output_rule_data): Do not output tables to the table obstack.
8613
8614 * src/output.c: Remove some C dedicated output.
8615 Improve the use of macro and output obstacks.
8616 (output_defines): Remove.
6fc74234 8617
26f609ff
RA
8618 * src/output.c (output_token_translations): Associate 'translate'
8619 table with a macro. No output to the table obstack.
8620 (output_gram): Same for 'rhs' and 'prhs'.
8621 (output_stos): Same for 'stos'.
8622 (output_rule_data): Same for 'r1' and 'r2'.
8623 (token_actions): Same for 'defact'.
8624 (goto_actions): Same for 'defgoto'.
8625 (output_base): Same for 'pact' and 'pgoto'.
8626 (output_table): Same for 'table'.
8627 (output_check): Same for 'check'.
6fc74234 8628
26f609ff
RA
8629 * src/output.c (output_table_data): New function.
8630 (output_short_table): Remove.
8631 (output_short_or_char_table): Remove.
6fc74234 8632
26f609ff
RA
8633 * src/output.c (output_parser): Replace most of the skeleton copy code
8634 with something new. Skeletons are now processed character by character
8635 rather than line by line, and Bison looks for '%%' macros. This is the
8636 first step in making Bison's output process (a lot) more flexible.
8637 (output_parser): Use the macro table.
8638
6f43b113
RA
86392001-08-25 Robert Anisko <robert.anisko@epita.fr>
8640
8641 * src/main.c (main): Initialize the macro table.
8642
dd3127cf
RA
86432001-08-25 Robert Anisko <robert.anisko@epita.fr>
8644
8645 * src/lex.c (percent_table): Add tok_define.
8646 * src/lex.h: Add tok_define.
8647
aa321494
RA
86482001-08-25 Robert Anisko <robert.anisko@epita.fr>
8649
8650 * src/macrotab.c: New file.
8651 * src/macrotab.h: New file.
8652 * src/Makefile.am: Update.
8653
68bd3b6b
RA
86542001-08-25 Robert Anisko <robert.anisko@epita.fr>
8655
8656 * lib/hash.c: New file.
8657 * lib/hash.h: New file.
8658 * lib/Makefile.am: Update.
8659
45f8dd1e
AD
86602001-08-15 Akim Demaille <akim@epita.fr>
8661
8662 Version 1.28c.
8663
40a64a7a 86642001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
8665
8666 * src/reader.c (readgram): Indent output macro YYSTYPE.
8667 (packsymbols): Likewise.
8668 (output_token_defines): Likewise.
8669 * src/files.c: Standardize.
8670 (compute_header_macro): New.
8671 (defines_obstack_save): New. Use compute_header_macro.
8672 (output_files): Update. Use defines_obstack_save.
8673
f9a8293a
AD
86742001-08-15 Akim Demaille <akim@epita.fr>
8675
8676 * doc/bison.texinfo (Table of Symbols): Document
8677 YYSTACK_USE_ALLOCA.
8678
150ca7a7
AD
86792001-08-15 Akim Demaille <akim@epita.fr>
8680
8681 * missing: Update from CVS Automake.
8682 * config/config.guess, config/config.sub, config/texinfo.tex:
8683 Update from gnu.org.
8684
69b5cec4
AD
86852001-08-15 Akim Demaille <akim@epita.fr>
8686
8687 * Makefile.maint: Sync with CVS Autoconf.
8688
f2b5126e
PB
86892001-08-14 Pascal Bart <pascal.bart@epita.fr>
8690
69b5cec4 8691 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
8692 `fdl.texi'.
8693 * doc/fdl.texi: Add to package.
8694
4ecbf796
MA
86952001-08-14 Marc Autret <autret_m@epita.fr>
8696
8697 Turn on %{source,header}_extension features.
8698
69b5cec4 8699 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
8700 source_extension.
8701 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 8702 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
8703 between options.
8704
95fb5662
MA
87052001-08-14 Marc Autret <autret_m@epita.fr>
8706
8707 * src/files.c (compute_base_names): Add extensions computing when
8708 `--file-prefix' used.
8709 Standardize function calls.
8710
78d09da9
MA
87112001-08-13 Marc Autret <autret_m@epita.fr>
8712
69b5cec4 8713 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
8714 defining it (defined but null disables alloca).
8715
5a009f2c
MA
87162001-08-13 Marc Autret <autret_m@epita.fr>
8717
8718 * src/bison.simple (_yy_memcpy): CPP reformat.
8719
1e41465a
PB
87202001-08-13 Pascal Bart <pascal.bart@epita.fr>
8721
8722 * tests/atconfig.in (CPPFLAGS): Fix.
8723
c67a198d
PB
87242001-08-10 Pascal Bart <pascal.bart@epita.fr>
8725
79282c6c 8726 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
8727 `gpl.texi'.
8728 * doc/gpl.texi: Add to package.
8729
09a6de7e
MA
87302001-08-10 Marc Autret <autret_m@epita.fr>
8731
8732 * src/print_graph.h: Fix.
8733 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8734
b77b9ee0
AD
87352001-08-10 Akim Demaille <akim@epita.fr>
8736
8737 * src/system.h: Provide default declarations for stpcpy, strndup,
8738 and strnlen.
8739
3e259915
MA
87402001-08-10 Robert Anisko <anisko_r@epita.fr>
8741
8742 * doc/bison.texinfo (Locations): Update @$ stuff.
8743
ca96bc2d
MA
87442001-08-09 Robert Anisko <anisko_r@epita.fr>
8745
8746 * src/bison.simple (YYLLOC_DEFAULT): Update.
8747 (yyparse): Adjust.
8748
fdc6758b
MA
87492001-08-08 Marc Autret <autret_m@epita.fr>
8750
b77b9ee0 8751 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
8752 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8753 Reported by Fabrice Bauzac.
957d4dbf 8754
600cad3b
MA
87552001-08-08 Marc Autret <autret_m@epita.fr>
8756
8757 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8758 * src/vcg.c (output_node): Fix.
8759 * src/vcg.h: Cleanup.
8760 * src/print_graph.c: Add comments.
b77b9ee0 8761 (node_output_size): New global variable. Simplify the formatting of
600cad3b 8762 the VCG graph output.
b77b9ee0 8763 (print_actions): Unused code is now used. It notifies the final state
600cad3b 8764 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 8765 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
8766 blue.
8767 Get the current node name and node_obstack by argument.
8768 (node_obstack): New variable.
8769 (print_state): Manage node_obstack.
8770 (print_core): Use node_obstack given by argument.
8771 A node is not only computed here but in print_actions also.
8772 (print_graph): CPP out useless code instead of commenting it.
8773
976e528f
AD
87742001-08-07 Pascal Bart <pascal.bart@epita.fr>
8775
8776 * tests/atconfig.in (CPPFLAGS): Fix.
8777
20e8e5ca
AD
87782001-08-07 Akim Demaille <akim@epita.fr>
8779
8780 * src/print_graph.c (quote): New.
8781 (print_core): Use it.
8782
957d4dbf 87832001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 8784
3e3da797
AD
8785 * src/vcg.c (complain.h): Include it.
8786 Unepitaize `return' invocations.
c4b66126 8787 [NDEBUG] (main): Remove.
79282c6c 8788 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
8789 * src/files.c (open_files): Initialize graph_obstack.
8790 * src/print_graph.c (print_actions): CPP out useless code.
8791 (print_core): Don't output the last `\n' in labels.
8792 Use `quote'.
8793 * src/files.c (output_files): Output the VCG file.
8794 * src/main.c (main): Invoke print_graph ();
3e3da797 8795
957d4dbf 87962001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
8797
8798 Automaton VCG graph output.
8799 Using option ``-g'' or long option ``--graph'', you can generate
8800 a gram_filename.vcg file containing a VCG description of the LALR (1)
8801 automaton of your grammar.
8802
8803 * src/main.c: Call to print_graph() function.
8804 * src/getargs.h: Update.
8805 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8806 (graph_flag): New flag.
8807 (longopts): Update.
8808 (getargs): Add case `g'.
8809 * src/files.c (graph_obstack): New obstack struct.
8810 (open_files): Initialize new obstack.
8811 (output_files): Saves graph_obstack if required.
8812 * src/files.h (graph_obstack): New extern declaration.
8813 * src/Makefile.am: Add new source files.
8814
927c1557 88152001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
8816
8817 * src/print_graph.c, src/print_graph.h (graph): New.
8818 * src/vcg.h: New file.
8819 * src/vcg.c: New file, VCG graph handling.
8820
7333d403
AD
88212001-08-06 Marc Autret <autret_m@epita.fr>
8822
8823 Add of %source_extension and %header_extension which specify
8824 the source or/and the header output file extension.
8825
8826 * src/files.c (compute_base_names): Remove initialisation of
8827 src_extension and header_extension.
8828 (compute_exts_from_gf): Update.
8829 (compute_exts_from_src): Update.
8830 (output_files): Update.
8831 * src/reader.c (parse_header_extension_decl): New.
8832 (parse_source_extension_decl): New.
8833 (read_declarations): New case statements for the new tokens.
8834 * src/lex.c (percent_table): Add entries for %source_extension
8835 and %header_extension.
8836 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8837
84163231
AD
88382001-08-06 Marc Autret <autret_m@epita.fr>
8839
8840 * configure.in: Bump to 1.28c.
8841 * doc/bison.texinfo: Texinfo thingies.
8842
8303fc42
AD
88432001-08-04 Pascal Bart <pascal.bart@epita.fr>
8844
8845 * tests/atconfig.in (CPPFLAGS): Add.
8846 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8847
70a84437
AD
88482001-08-03 Akim Demaille <akim@epita.fr>
8849
8850 Version 1.28b.
8851
2ce10144
AD
88522001-08-03 Akim Demaille <akim@epita.fr>
8853
8854 * tests/Makefile.am (check-local): Ship testsuite.
8855 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8856 Include `string.h'.
8857
1e3e4bc1
AD
88582001-08-03 Akim Demaille <akim@epita.fr>
8859
8860 * configure.in: Try using -Wformat when compiling.
8861
42b45b7f
AD
88622001-08-03 Akim Demaille <akim@epita.fr>
8863
8864 * configure.in: Bump to 1.28b.
8865
8f13fe33
AD
88662001-08-03 Akim Demaille <akim@epita.fr>
8867
8868 * src/complain.c: Adjust strerror_r portability issues.
8869
b37ba92c
AD
88702001-08-03 Akim Demaille <akim@epita.fr>
8871
8872 Version 1.28a.
8873
b0ce6046
AD
88742001-08-03 Akim Demaille <akim@epita.fr>
8875
8876 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8877 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8878 * src/getargs.c: Include complain.h.
8879 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8880 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8881
d01c415b
AD
88822001-08-03 Akim Demaille <akim@epita.fr>
8883
8884 * src/reader.c (readgram): Display hidden chars in error messages.
8885
459dd1a6
AD
88862001-08-03 Akim Demaille <akim@epita.fr>
8887
8888 Update to gettext 0.10.39.
8889
53b74c0c
AD
88902001-08-03 Akim Demaille <akim@epita.fr>
8891
8892 * lib/strspn.c: New.
8893
234a3be3
AD
88942001-08-01 Marc Autret <autret_m@epita.fr>
8895
8896 * doc/bison.texinfo: Update.
8897 * doc/bison.1 (mandoc): Update.
8898 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8899 * src/files.c: Support output files extensions computing.
8900 (src_extension): New static variable.
8901 (header_extension): New static variable.
8902 (tr): New function.
8903 (get_extension_index): New function, gets the index of an extension
8904 filename in a string.
8905 (compute_exts_from_gf): New function, computes extensions from the
8906 grammar file extension.
8907 (compute_exts_from_src): New functions, computes extensions from the
8908 C source file extension, file given by ``-o'' option.
8909 (compute_base_names): Update.
8910 (output_files): Update.
8911
847bf1f5
AD
89122001-08-01 Robert Anisko <anisko_r@epita.fr>
8913
d995fee7 8914 * doc/bison.texi: Document @$.
847bf1f5
AD
8915 (Locations): New section.
8916
d074a105
AD
89172001-07-18 Akim Demaille <akim@epita.fr>
8918
8919 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8920 * config/prev-version.txt, config/move-if-change: New.
8921 * Makefile.am: Adjust.
8922
3419715d
AD
89232001-07-08 Pascal Bart <pascal.bart@epita.fr>
8924
8925 * src/bison.simple (yyparse): Suppress warning `comparaison
8926 between signed and unsigned'.
8927
62ab6972
AD
89282001-07-05 Pascal Bart <pascal.bart@epita.fr>
8929
8930 * src/getargs.h (raw_flag): Remove.
8931 * src/getargs.c: Die on `-r'/`--raw'.
8932 * src/lex.c (parse_percent_token): Die on `%raw'.
8933 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8934 * tests/calc.at: Suppress test with option `--raw'.
8935
1e24cc5b
AD
89362001-07-14 Akim Demaille <akim@epita.fr>
8937
8938 * config/: New.
8939 * configure.in: Require Autoconf 2.50.
8940 Update to gettext 0.10.38.
8941
32dfccf8
AD
89422001-03-16 Akim Demaille <akim@epita.fr>
8943
8944 * doc/bison.texinfo: ANSIfy the examples.
8945
cd5bd6ac
AD
89462001-03-16 Akim Demaille <akim@epita.fr>
8947
8948 * getargs.c (skeleton): New variable.
8949 (longopts): --skeleton is a new option.
8950 (shortopts, getargs): -S is a new option.
8951 * getargs.h: Declare skeleton.
8952 * output.c (output_parser): Use it.
8953
5141b016
AD
89542001-03-16 Akim Demaille <akim@epita.fr>
8955
8956 * m4/strerror_r.m4: New.
8957 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8958 * lib/error.h, lib/error.c: Update.
8959
447992b9
AD
89602001-03-16 Akim Demaille <akim@epita.fr>
8961
8962 * src/getargs.c (longopts): Clean up.
8963
274d42ce
AD
89642001-02-21 Akim Demaille <akim@epita.fr>
8965
8966 * src/reader.c (gensym): `gensym_count' is your own.
8967 Use a static buf to create the symbol name, as token_buffer is no
8968 longer a buffer.
8969
22c821f3
AD
89702001-02-08 Akim Demaille <akim@epita.fr>
8971
8972 * src/conflicts.c (conflict_report): Be sure not to append to res
8973 between two calls, which could happen if both first sprintf were
8974 skipped, but not the first cp += strlen.
8975
18569462
AD
89762001-02-08 Akim Demaille <akim@epita.fr>
8977
8978 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8979 New, from fileutils 4.0.37.
8980 * configure.in: Require Autoconf 2.49c. I took some time before
8981 making this decision. This is the only way out for portability
8982 issues in Bison, it would mean way too much duplicate effort to
8983 import in Bison features implemented in 2.49c since 2.13.
8984 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
8985
0d8f3c8a
AD
89862001-02-02 Akim Demaille <akim@epita.fr>
8987
8988 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 8989 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 8990
f17bcd1f
AD
89912001-01-19 Akim Demaille <akim@epita.fr>
8992
8993 Get rid of the ad hoc handling of token_buffer in the scanner: use
8994 the obstacks.
8995
8996 * src/lex.c (token_obstack): New.
8997 (init_lex): Initialize it. No longer call...
8998 (grow_token_buffer): this. Remove it.
8999 Adjust all the places which used it to use the obstack.
9000
511e79b3
AD
90012001-01-19 Akim Demaille <akim@epita.fr>
9002
9003 * src/lex.h: Rename all the tokens:
9004 s/\bENDFILE\b/tok_eof/g;
9005 s/\bIDENTIFIER\b/tok_identifier/g;
9006 etc.
9007 Let them be enums, not #define, to ease debugging.
9008 Adjust all the code.
9009
0d6508ef
AD
90102001-01-18 Akim Demaille <akim@epita.fr>
9011
9012 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9013 * src/lex.c (maxtoken, grow_token_buffer): Static.
9014
6deb4447
AD
90152001-01-18 Akim Demaille <akim@epita.fr>
9016
9017 Since we now use obstacks, more % directives can be enabled.
9018
9019 * src/lex.c (percent_table): Also accept `%yacc',
9020 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9021 `%debug'.
9022 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9023 instead of returning a token.
9024 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9025 * src/reader.c (read_declarations): Adjust.
9026 * src/files.c (open_files): Don't call `compute_base_names', don't
9027 compute `attrsfile' since they depend upon data which might be
9028 *in* the input file now.
9029 (output_files): Do it here.
9030 * src/output.c (output_headers): Document the fact that this patch
9031 introduces a guaranteed SEGV for semantic parsers.
9032 * doc/bison.texinfo: Document them.
9033 * tests/suite.at: Exercise these %options.
9034
ff4423cc
AD
90352000-12-20 Akim Demaille <akim@epita.fr>
9036
9037 Also handle the output file (--verbose) with obstacks.
9038
9039 * files.c (foutput): Remove.
9040 (output_obstack): New.
9041 Adjust all dependencies.
9042 * src/conflicts.c: Return a string.
9043 * src/system.h (obstack_grow_string): Rename as...
9044 (obstack_sgrow): this. Be ready to work with non literals.
9045 (obstack_fgrow4): New.
9046
956dba3a
AD
90472000-12-20 Akim Demaille <akim@epita.fr>
9048
9049 * src/files.c (open_files): Fix the computation of short_base_name
9050 in the case of `-o foo.tab.c'.
9051
337bab46
AD
90522000-12-20 Akim Demaille <akim@epita.fr>
9053
9054 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9055 (copy_dollar): Now that everything uses obstacks, get rid of the
9056 FILE * parameters.
9057
5d3214b8
AD
90582000-12-20 Akim Demaille <akim@epita.fr>
9059
9060 * src/files.c (open_files): Actually the `.output' file is based
9061 on the short_base_name, not base_name.
9062 * tests/suite.at (Checking output file names): Adjust.
9063
29092a57
AD
90642000-12-20 Akim Demaille <akim@epita.fr>
9065
9066 * src/bison.s1: Remove, we now use directly...
9067 * src/bison.simple: this.
9068 * src/Makefile.am: Use pkgdata instead of data.
9069
ea5607fd
AD
90702000-12-20 Akim Demaille <akim@epita.fr>
9071
9072 * src/files.c (guard_obstack): New.
9073 (open_files): Initialize it.
9074 (output_files): Dump it...
9075 * src/files.h: Export it.
9076 * src/reader.c (copy_guard): Use it.
9077
27110317
AD
90782000-12-19 Akim Demaille <akim@epita.fr>
9079
9080 * src/files.c (outfile, defsfile, actfile): Removed as global
9081 vars.
9082 (open_files): Don't compute them.
9083 (output_files): Adjust.
9084 (base_name, short_base_name): Be global.
9085 Adjust dependencies.
9086
19c50364
AD
90872000-12-19 Akim Demaille <akim@epita.fr>
9088
9089 * src/files.c (strsuffix): New.
9090 (stringappend): Be just like strcat but allocate.
9091 (base_names): Eve out from open_files.
9092 Try to simplify the rather hairy computation of base_name and
9093 short_base_name.
9094 (open_files): Use it.
9095 * tests/suite.at (Checking output file names): New test.
9096
573c1d9f
AD
90972000-12-19 Akim Demaille <akim@epita.fr>
9098
9099 * src/system.h (obstack_grow_literal_string): Rename as...
9100 (obstack_grow_string): this.
9101 * src/output.c (output_parser): Recognize `%% actions' instead of
9102 `$'.
9103 * src/bison.s1: s/$/%% actions/.
9104 * src/bison.hairy: Likewise.
9105
ef7ddedd
AD
91062000-12-19 Akim Demaille <akim@epita.fr>
9107
9108 * src/output.c (output_parser): Compute the `#line' lines when
9109 there are.
9110 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9111 Suggested by Hans Aberg.
9112
ff61dabd
AD
91132000-12-19 Akim Demaille <akim@epita.fr>
9114
9115 Let the handling of the skeleton files be local to the procedures
9116 that use it.
9117
9118 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9119 longer static.
9120 (fparser, open_extra_files): Remove.
9121 (open_files, output_files): Don't take care of fparser.
9122 * src/files.h: Adjust.
9123 * src/output.c (output_parser): Open and close the file to the
9124 skeleton.
9125 * src/reader.c (read_declarations): When %semantic_parser, open
9126 fguard.
9127
55b96341
AD
91282000-12-19 Akim Demaille <akim@epita.fr>
9129
9130 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9131 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9132
358c15b7
AD
91332000-12-19 Akim Demaille <akim@epita.fr>
9134
9135 * src/files.c (open_files): Yipee! We no longer need all the code
9136 looking for `/tmp' since we have no tmp file.
9137
7de3329e
AD
91382000-12-19 Akim Demaille <akim@epita.fr>
9139
9140 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9141 New macros.
9142 * src/files.c (open_files): Less dependency on MSDOS etc.
9143
3abcd459
AD
91442000-12-14 Akim Demaille <akim@epita.fr>
9145
9146 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9147 Provide a default definition.
9148 Use it when executing the default @ action.
9149 * src/reader.c (reader_output_yylsp): No longer include
9150 `timestamp' and `text' in the default YYLTYPE.
9151
2a91a95e
AD
91522000-12-12 Akim Demaille <akim@epita.fr>
9153
9154 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9155 (copy_guard): Quote the file names.
9156 Reported by Laurent Mascherpa.
9157
14d3eb9b
AD
91582000-12-12 Akim Demaille <akim@epita.fr>
9159
9160 * src/output.c (output_headers, output_program, output): Be sure
9161 to escape special characters when outputting filenames.
9162 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9163 (output_headers): Don't depend on them, Use ACTSTR.
9164
d7045ec6
AD
91652000-11-17 Akim Demaille <akim@epita.fr>
9166
9167 * lib/obstack.h: Formatting changes.
9168 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9169 prevents type checking.
9170 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9171 cast the value to (void *): assigning a `foo *' to a `void *'
9172 variable is valid.
9173 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9174 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9175 append characters.
9176
6fd54b73
AD
91772000-11-17 Akim Demaille <akim@epita.fr>
9178
9179 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9180 as...
9181 (suite.m4, regression.m4, calc.m4): these.
9182 * tests/atgeneral.m4: Update from CVS Autoconf.
9183
4c50eae6
AD
91842000-11-17 Akim Demaille <akim@epita.fr>
9185
9186 * tests/regression.m4 (%union and --defines): New test,
9187 demonstrating a current bug in the obstack implementation.
9188
a35f64ea
AD
91892000-11-17 Akim Demaille <akim@epita.fr>
9190
9191 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9192 macros.
9193 Use them to declare the variables which are global or local to
9194 `yyparse'.
9195
7de23534
AD
91962000-11-17 Akim Demaille <akim@epita.fr>
9197
9198 * acconfig.h: Remove, no longer used.
9199
aa7815f5
AD
92002000-11-07 Akim Demaille <akim@epita.fr>
9201
9202 * src: s/Copyright (C)/Copyright/g.
9203
5af1f549
AD
92042000-11-07 Akim Demaille <akim@epita.fr>
9205
9206 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9207 defining.
9208 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9209
553e2b22
AD
92102000-11-07 Akim Demaille <akim@epita.fr>
9211
9212 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9213 Merge in a single CPP if/else.
9214
8a4f41d6
AD
92152000-11-07 Akim Demaille <akim@epita.fr>
9216
9217 * src/output.c (output): Remove useless variables.
9218 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9219 argument `data' for consistency with the prototypes.
9220 Qualify it `const'.
9221 (obstack_copy, obstack_copy0): Rename the second argument as
9222 `address' for consistency. Qualify it `const'.
9223 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9224 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9225 `const' their input argument (`data' or `address').
9226 Adjust the corresponding macros to include `const' in casts.
9227
095a3fb5
AD
92282000-11-03 Akim Demaille <akim@epita.fr>
9229
9230 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9231 s/PFILE1/BISON_HAIRY/.
9232 Adjust dependencies.
9233
d1cdce7c
AD
92342000-11-03 Akim Demaille <akim@epita.fr>
9235
090c5ebf 9236 For some reason, this was not applied.
d1cdce7c
AD
9237
9238 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9239 `unlink': it's no longer used.
9240
9311529b
AD
92412000-11-03 Akim Demaille <akim@epita.fr>
9242
9243 * src/files.c (skeleton_find): New function, eved out of...
9244 (open_files, open_extra_files): here.
9245
d8880f69
AD
92462000-11-03 Akim Demaille <akim@epita.fr>
9247
9248 Don't use `atexit'.
9249
9250 * src/files.c (obstack_save): New function.
9251 (done): Rename as...
9252 (output_files): this.
9253 Use `obstack_save'.
9254 * src/main.c (main): Don't use `atexit' to register `done', since
9255 it no longer has to remove tmp files, just call `output_files'
9256 when there are no errors.
9257
0dbb648e
AD
92582000-11-02 Akim Demaille <akim@epita.fr>
9259
9260 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9261 `unlink': it's no longer used.
9262 * src/files.h: Formatting changes.
9263
896fe5c1
AD
92642000-11-02 Akim Demaille <akim@epita.fr>
9265
9266 Remove the last uses of mktemp and unlink/delete.
9267
9268 * src/files.c (fdefines, ftable): Removed.
9269 (defines_ostack, table_obstack): New.
9270 Adjust dependencies of the former into uses of the latter.
9271 * src/output.c (output_short_or_char_table, output_short_table):
9272 Convert to using obstacks.
9273 * src/reader.c (copy_comment2): Accept one FILE * and two
9274 obstacks.
9275 (output_token_defines, reader_output_yylsp): Use obstacks.
9276 * src/system.h (obstack_fgrow3): New.
9277
dd60faec
AD
92782000-11-01 Akim Demaille <akim@epita.fr>
9279
9280 Change each use of `fattrs' into a use of `attrs_obstack'.
9281
9282 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9283 * src/files.c (fattrs): Remove.
9284 (attrs_obstack): New.
9285 Adjust all dependencies.
9286 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9287
8c7ebe49
AD
92882000-11-01 Akim Demaille <akim@epita.fr>
9289
9290 Introduce obstacks.
9291 Change each use of `faction' into a use of `action_obstack'.
9292
9293 * lib/obstack.h, lib/obstack.c: New files.
9294 * src/files.c (faction): Remove.
9295 (action_obstack): New.
9296 Adjust all dependencies.
9297
77aee789
AD
92982000-10-20 Akim Demaille <akim@epita.fr>
9299
9300 * lib/quote.h (PARAMS): New macro. Use it.
9301
43591cec
AD
93022000-10-16 Akim Demaille <akim@epita.fr>
9303
9304 * src/output.c (output_short_or_char_table): New function.
9305 (output_short_table, output_token_translations): Use it.
9306 (goto_actions): Use output_short_table.
9307
1e9798d5
AD
93082000-10-16 Akim Demaille <akim@epita.fr>
9309
9310 * src/symtab.c (bucket_new): New function.
9311 (getsym): Use it.
9312
9313 * src/output.c (output_short_table): New argument to display the
9314 comment associated with the table.
9315 Adjust dependencies.
9316 (output_gram): Use it.
9317 (output_rule_data): Nicer output layout for YYTNAME.
9318
f282676b
AD
93192000-10-16 Akim Demaille <akim@epita.fr>
9320
9321 * src/lex.c (read_typename): New function.
9322 (lex): Use it.
9323 * src/reader.c (copy_dollar): Likewise.
9324
550a72a3
AD
93252000-10-16 Akim Demaille <akim@epita.fr>
9326
9327 * src/reader.c (copy_comment2): Expect the input stream to be on
9328 the `/' which is suspected to open a comment, instead of being
9329 called after `//' or `/*' was read.
9330 (copy_comment, copy_definition, parse_union_decl, copy_action)
9331 (copy_guard): Adjust.
9332
131e2fef
AD
93332000-10-16 Akim Demaille <akim@epita.fr>
9334
9335 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9336 `read_signed_integer'.
9337
79282c5a
AD
93382000-10-16 Akim Demaille <akim@epita.fr>
9339
9340 * src/reader.c (copy_dollar): New function.
9341 (copy_guard, copy_action): Use it.
9342
ff4a34be
AD
93432000-10-16 Akim Demaille <akim@epita.fr>
9344
9345 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9346 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9347 New files, from Fileutils 4.0.27.
9348 * src/main.c (printable_version): Remove.
9349 * src/lex.c, src/reader.c: Use `quote'.
9350
93512000-10-04 Akim Demaille <akim@epita.fr>
9352
9353 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9354
14ded682
AD
93552000-10-04 Akim Demaille <akim@epita.fr>
9356
9357 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9358
8e03724b
AD
93592000-10-04 Akim Demaille <akim@epita.fr>
9360
9361 When a literal string is used to define two different tokens,
9362 `bison -v' segfaults.
9363 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9364
9365 * tests/regression.m4: New file.
9366 Include the core of the sample provided by Piotr Gackiewicz.
9367 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9368 properly.
9369
a9e64249
AD
93702000-10-04 Akim Demaille <akim@epita.fr>
9371
9372 * src/reader.c (parse_expect_decl): Keep `count' within the size
9373 of `buffer'.
9374 From Neil Booth.
9375
da9abf43
AD
93762000-10-02 Paul Eggert <eggert@twinsun.com>
9377
9378 * bison.s1 (yyparse): Assign the default value
9379 unconditionally, to avoid a GCC warning and make the parser a
9380 tad smaller.
9381
c33638bb
AD
93822000-10-02 Akim Demaille <akim@epita.fr>
9383
9384 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9385 options.
9386
444c570a
AD
93872000-10-02 Akim Demaille <akim@epita.fr>
9388
9389 * src/derives.c, src/print.c, src/reduce.c: To ease the
9390 translation, move some `\n' out of the translated strings.
9391
89cab50d
AD
93922000-10-02 Akim Demaille <akim@epita.fr>
9393
9394 The location tracking mechanism is precious for parse error
9395 messages. Nevertheless, it is enabled only when `@n' is used in
9396 the grammar, which is a different issue (you can use it in error
9397 message, but not in the grammar per se). Therefore, there should
9398 be another means to enable it.
9399
9400 * src/getargs.c (getargs): Support `--locations'.
9401 (usage): Report it.
9402 * src/getargs.h (locationsflag): Export it.
9403 * src/lex.c (percent_table): Support `%locations'.
9404 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9405 with `locationsflag'.
9406 * doc/bison.texinfo: Document `--locations' and `%locations'.
9407 Sort the options.
9408 * tests/calc.m4: Test it.
9409
9410 For regularity of the names, replace each
9411 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9412 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9413 In addition replace each `flag' with `_flag'.
9414
d6c2cba0
AD
94152000-10-02 Akim Demaille <akim@epita.fr>
9416
9417 Also test parse error messages, including with YYERROR_VERBOSE.
9418
9419 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9420 associative).
9421 Use it to check the computations.
9422 Use it to check `nonassoc' is honored.
9423 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9424 `--yyerror-verbose'.
9425 (_AT_CHECK_CALC): Adjust to this option.
9426 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9427
5a35a6cb
AD
94282000-10-02 Akim Demaille <akim@epita.fr>
9429
9430 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9431 the latter demonstrates a flaw in the handling of non debugging
9432 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9433 was used in order to simplify:
9434
9435 #if YYDEBUG
9436 if (yydebug)
9437 {
9438 ...
9439 }
9440 #endif
9441
9442 into
9443
9444 if (yydebug)
9445 {
9446 ...
9447 }
9448
9449 unfortunately this leads to a CPP conflict when
9450 `--name-prefix=foo' is used since it produces `#define yydebug
9451 foodebug'.
9452
9453 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9454 (YYDPRINTF): New macro.
9455 Spread its use.
9456 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9457 the bison options.
9458 Also test `--verbose', `--defines' and `--name-prefix'.
9459
71da9eea
AD
94602000-10-02 Akim Demaille <akim@epita.fr>
9461
9462 Improve the readability of the produced parsers.
9463
9464 * src/bison.s1: Formatting changes.
9465 Improve the comment related to the `$' mark.
9466 (yydefault): Don't fall through to `yyresume': `goto' there.
9467 * src/output.c (output_parser): When the `$' is met, skip the end
9468 of its line.
9469 New variable, `number_of_dollar_signs', to check there's exactly
9470 one `$' in the parser skeleton.
9471
95e36146
AD
94722000-10-02 Akim Demaille <akim@epita.fr>
9473
9474 * lib/xstrdup.c: New file, from the fileutils.
9475 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9476 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9477 instead of strlen + xmalloc + strcpy.
9478 * src/symtab.c (copys): Remove, use xstrdup instead.
9479
d7020c20
AD
94802000-10-02 Akim Demaille <akim@epita.fr>
9481
9482 * src/gram.h (associativity): New enum type which replaces the
9483 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9484 `right_assoc', `left_assoc' and `non_assoc'.
9485 Adjust all dependencies.
9486 * src/reader.c: Formatting changes.
9487 (LTYPESTR): Don't define it, use it as a literal in
9488 `reader_output_yylsp'.
9489 * src/symtab.h (symbol_class): New enum type which replaces the
9490 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9491 `sunknown', `stoken and `snterm'.
9492
1916f98e
AD
94932000-10-02 Akim Demaille <akim@epita.fr>
9494
9495 * src/getargs.c (fixed_outfiles): Rename as...
9496 (yaccflag): for consistency and accuracy.
9497 Adjust dependencies.
9498
d7913476
AD
94992000-10-02 Akim Demaille <akim@epita.fr>
9500
9501 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9502 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9503 difficult and introduced a lot of core dump. It turns out that
9504 Bison used an implementation of `xmalloc' based on `calloc', and
9505 at various places it does depend upon the initialization to 0. I
9506 have not tried to isolate the pertinent places, and all the former
9507 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9508 someone should address this issue.
9509
9510 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9511 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9512 files.
9513 Adjust dependencies.
9514 * src/warshall.h: New file.
9515 Propagate.
9516
340ef489
AD
95172000-10-02 Akim Demaille <akim@epita.fr>
9518
9519 Various anti-`extern in *.c' changes.
9520
9521 * src/system.h: Include `assert.h'.
9522
b2ca4022
AD
95232000-10-02 Akim Demaille <akim@epita.fr>
9524
9525 * src/state.h (nstates, final_state, first_state, first_shift)
9526 (first_reduction): Move their exportation from here...
9527 * src/LR0.h: to here.
9528 Adjust dependencies.
9529 * src/getargs.c (statisticsflag): New variable.
9530 Add support for `--statistics'.
9531 Adjust dependencies.
9532
9533 Remove a lot of now useless `extern' statements in most files.
9534
403b315b
AD
95352000-10-02 Akim Demaille <akim@epita.fr>
9536
9537 * src/LR0.h: New file.
9538 Propagate its use.
9539
07a58c13
AD
95402000-10-02 Akim Demaille <akim@epita.fr>
9541
9542 * src/print.h: New file.
9543 Propagate its use.
9544 * src/print.c: Formatting and ordering changes.
9545 (verbose, terse): Replace with...
9546 (print_results): this new function.
9547 Adjust dependencies.
9548
0619caf0
AD
95492000-10-02 Akim Demaille <akim@epita.fr>
9550
9551 * src/conflicts.c (conflict_report): New function.
9552 (conflict_log, verbose_conflict_log): Replace with...
9553 (print_conflicts): this function.
9554 Adjust dependencies.
9555 * src/conflicts.h: New file.
9556 Propagate its inclusion.
9557
3519ec76
AD
95582000-10-02 Akim Demaille <akim@epita.fr>
9559
9560 * src/nullable.h: New file.
9561 Propagate its inclusion.
9562 * src/nullable.c: Formatting changes.
9563
015acc48
AD
95642000-10-02 Akim Demaille <akim@epita.fr>
9565
9566 * src/reduce.h: New file.
9567 Propagate its inclusion.
9568 * src/reduce.c: Topological sort and other formatting changes.
9569 (bool, TRUE, FALSE): Move their definition to...
9570 * src/system.h: here.
9571
8963a27b
AD
95722000-10-02 Akim Demaille <akim@epita.fr>
9573
9574 * src/files.c: Formatting changes.
9575 (tryopen, tryclose, openfiles): Rename as...
9576 (xfopen, xfclose, open_files): this.
9577 (stringappend): static.
9578 * src/files.h: Complete the list of exported symbols.
9579 Propagate its use.
9580
a70083a3
AD
95812000-10-02 Akim Demaille <akim@epita.fr>
9582
9583 * src/reader.h: New file.
9584 Propagate its use instead of tedious list of `extern' and
9585 prototypes.
9586 * src/reader.c: Formatting changes, topological sort,
9587 s/register//.
9588
abadc117
AD
95892000-10-02 Akim Demaille <akim@epita.fr>
9590
9591 * src/lex.h: Prototype `lex.c' exported functions.
9592 * src/reader.c: Adjust.
9593 * src/lex.c: Formatting changes.
9594 (safegetc): Rename as...
9595 (xgetc): this.
9596
720d742f
AD
95972000-10-02 Akim Demaille <akim@epita.fr>
9598
9599 * src/lalr.h: New file.
9600 Propagate its inclusion instead of prototypes and `extern'.
9601 * src/lalr.c: Formatting changes, topological sorting etc.
9602
f2acea59
AD
96032000-10-02 Akim Demaille <akim@epita.fr>
9604
9605 * src/output.c (token_actions): Introduce a temporary array,
9606 YYDEFACT, that makes it possible for this function to use
9607 output_short_table.
9608
d019d655
AD
96092000-10-02 Akim Demaille <akim@epita.fr>
9610
9611 `user_toknums' is output as a `short[]' in `output.c', while it is
9612 defined as a `int[]' in `reader.c'. For consistency with the
9613 other output tables, `user_toknums' is now defined as a table of
9614 shorts.
9615
9616 * src/reader.c (user_toknums): Be a short table instead of an int
9617 table.
9618 Adjust dependencies.
9619
9620 Factor the short table outputs.
9621
9622 * src/output.c (output_short_table): New function.
9623 * src/output.c (output_gram, output_stos, output_rule_data)
9624 (output_base, output_table, output_check): Use it.
9625
6c89f1c1
AD
96262000-10-02 Akim Demaille <akim@epita.fr>
9627
9628 * src/output.c (output): Topological sort of the functions, in
9629 order to get rid of the `static' prototypes.
9630 No longer use `register'.
9631 * src/output.h: New file.
9632 Propagate its inclusion in files explicitly prototyping functions
9633 from output.c.
9634
d9efd181
AD
96352000-09-21 Akim Demaille <akim@epita.fr>
9636
9637 * src/atgeneral.m4: Update from Autoconf.
9638
c29240e7 96392000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
9640
9641 * src/closure.h: New file.
9642 * src/closure.c: Formatting changes, topological sort over the
9643 functions, use of closure.h.
9644 (initialize_closure, finalize_closure): Rename as...
9645 (new_closure, free_closure): these. Adjust dependencies.
9646 * src/LR0.c: Formatting changes, topological sort, use of
9647 cloture.h.
9648 (initialize_states): Rename as...
9649 (new_states): this.
9650 * src/Makefile.am (noinst_HEADERS): Adjust.
9651
499daa50
AD
96522000-09-20 Akim Demaille <akim@epita.fr>
9653
9654 * src/acconfig.h: Don't protect config.h against multiple
9655 inclusion.
9656 Don't define PARAMS.
9657 * src/system.h: Define PARAMS.
9658 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9659 purpose of config.h. system.h must not try to fix wrong
9660 definitions in config.h.
9661
cc84fd5d
AD
96622000-09-20 Akim Demaille <akim@epita.fr>
9663
9664 * src/derives.h: New file.
9665 * src/main.c, src/derives.h: Use it.
9666 Formatting changes.
9667 * src/Makefile.am (noinst_HEADERS): Adjust.
9668
db5b3a89
AD
96692000-09-20 Akim Demaille <akim@epita.fr>
9670
9671 * tests/atgeneral.m4: Update from Autoconf.
9672 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9673 (AT_CHECK_CALC): New macros.
9674 Use these macros to test bison with options `', `--raw',
9675 `--debug', `--yacc', `--yacc --debug'.
9676
ceed8467
AD
96772000-09-19 Akim Demaille <akim@epita.fr>
9678
9679 * src/output.c: Formatting changes.
9680 * src/machine.h: Remove, leaving its contents in...
9681 * src/system.h: here.
9682 Include stdio.h.
9683 Adjust all dependencies on stdio.h and machine.h.
9684 * src/getargs.h: New file.
9685 Let all `extern' declarations about getargs.c be replaced with
9686 inclusion of `getargs.h'.
9687 * src/Makefile.am (noinst_HEADERS): Adjust.
9688
9689 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9690 scope.
9691 (yyerror): Returns void, not int.
9692 * doc/bison.texinfo: Formatting changes.
9693
05a1d24b
AD
96942000-09-19 Akim Demaille <akim@epita.fr>
9695
9696 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9697 portable.
9698
cbd25751
AD
96992000-09-18 Akim Demaille <akim@epita.fr>
9700
9701 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9702 * src/Makefile.am (INCLUDES): Don't.
9703 Be ready to fetch headers in lib/.
9704
13863333
AD
97052000-09-18 Akim Demaille <akim@epita.fr>
9706
9707 * doc/bison.texinfo: Update the copyright.
9708 ANSIfy and GNUify the examples.
9709 Remove the old menu.
9710
0d533154
AD
97112000-09-18 Akim Demaille <akim@epita.fr>
9712
9713 First set of tests: use the `calc' example from the documentation.
9714
9715 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9716 is defined only when YYDEBUG is.
9717 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9718 * src/files.c (tryopen, tryclose): Formatting changes.
9719 Move to the top and be static.
9720 * src/reader.c (read_signed_integer): Likewise.
9721 * tests/calc.m4: New file.
9722 * Makefile.am, suite.m4: Adjust.
9723 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9724
e79137ac
AD
97252000-09-18 Akim Demaille <akim@epita.fr>
9726
9727 Add support for an Autotest test suite for Bison.
9728
9729 * m4/m4.m4, m4/atconfig.m4: New files.
9730 * m4/Makefile.am (EXTRA_DIST): Adjust.
9731 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9732 files.
9733 * src/getargs.c: Display a more standard --version message.
9734 * src/reader.c (reader): Formatting changes.
9735 No longer depend upon VERSION_STRING.
9736 * configure.in: No longer use `dnl'.
9737 Set up the test suite and the new directory `tests/.
9738 (VERSION_STRING): Remove.
9739
27821bff
AD
97402000-04-14 Akim Demaille <akim@epita.fr>
9741
9742 * src/reader.c (copy_comment2): New function, same as former
9743 `copy_comment', but outputs into two FILE *.
9744 (copy_comment): Use it.
9745 (parse_union_decl): Use it.
9746 (get_type, parse_start_decl): Use the same `invalid' message.
9747 (parse_start_decl, parse_union_decl): Use the same `multiple'
9748 message.
9749 (parse_union_decl, copy_guard, copy_action): Use the same
9750 `unmatched' message.
9751 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9752
cfe5fbc0
AD
97532000-03-31 Akim Demaille <akim@epita.fr>
9754
9755 * src/files.c (tryopen, tryclose): Move to the top.
9756 Be static.
9757
cb7db13e
AD
97582000-03-31 Akim Demaille <akim@epita.fr>
9759
9760 * src/main.c (main): Don't call `done', exit does it.
9761
a0f6b076
AD
97622000-03-31 Akim Demaille <akim@epita.fr>
9763
36281465
AD
9764 * allocate.c: s/return (foo)/return foo/.
9765 * lalr.c: Likewise.
9766 * LR0.c: Likewise.
9767 * output.c: Likewise.
9768 * reader.c: Likewise.
9769 * symtab.c: Likewise.
9770 * vmsgetargs.c: Likewise.
9771
97722000-03-31 Akim Demaille <akim@epita.fr>
9773
9774 Clean up the error reporting functions.
a0f6b076
AD
9775
9776 * src/report.c: New file.
9777 * src/report.h: Likewise.
9778 * src/Makefile.am: Adjust.
9779 * m4/error.m4: New file.
9780 * m4/Makefile.am: Adjust.
9781 * configure.in (jm_PREREQ_ERROR): Call it.
9782 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9783 Remove.
9784 (fatal, fatals): Remove. All callers use complain.c::fatal.
9785 (warn, warni, warns, warnss, warnss): Remove. All callers use
9786 complain.c::complain.
9787 (toomany): Remove, use fatal instead.
9788 * src/files.c (done): No argument, use complain_message_count.
9789 * src/main.c (main): Register `done' to `atexit'.
9790
9791 * src/getargs.c (usage): More `fputs', less `fprintf'.
9792
18539825
AD
97932000-03-28 Akim Demaille <akim@epita.fr>
9794
9795 * lib/: New directory.
9796 * Makefile.am (SUBDIRS): Adjust.
9797 * configure.in: Adjust.
9798 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9799 useless.
9800 * src/alloca.c: Moved to lib/.
9801 * src/getopt.c: Likewise.
9802 * src/getopt1.c: Likewise.
9803 * src/getopt.h: Likewise.
9804 * src/ansi2knr.c: Likewise.
9805 * src/ansi2knr.1: Likewise.
9806 * src/Makefile.am: Adjust.
9807 * lib/Makefile.am: New file.
9808
9f306f2a
AD
98092000-03-28 Akim Demaille <akim@epita.fr>
9810
9811 * src/getargs.c (usage): Refresh the help message.
9812
0ba347b6
AD
98132000-03-17 Akim Demaille <akim@epita.fr>
9814
9815 * src/getopt1.c: Updated from textutils 2.0e
9816 * src/getopt.c: Likewise.
9817 * src/getopt.h: Likewise.
9818
dbe7f271
AD
98192000-03-17 Akim Demaille <akim@epita.fr>
9820
9821 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9822 the file name, not the whole `#line LINE FILE'.
9823
75bbe78d
AD
98242000-03-17 Akim Demaille <akim@epita.fr>
9825
9826 On syntax errors, report the token on which we choked.
9827
aa5fd0ee
AD
9828 * src/bison.s1 (yyparse): In the label yyerrlab, when
9829 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 9830
7b306f52
AD
98312000-03-17 Akim Demaille <akim@epita.fr>
9832
aa5fd0ee 9833 * src/reader.c (copy_at): New function.
7b306f52
AD
9834 (copy_guard): Use it.
9835 (copy_action): Use it.
9836
e87b5700
AD
98372000-03-17 Akim Demaille <akim@epita.fr>
9838
9839 Be kind to translators, save some useless translations.
9840
aa5fd0ee 9841 * src/main.c (banner): New function.
e87b5700
AD
9842 (fatal_banner): Use it.
9843 (warn_banner): Use it.
9844
ae3c3164
AD
98452000-03-17 Akim Demaille <akim@epita.fr>
9846
aa5fd0ee
AD
9847 * src/reader.c (copy_definition): Use copy_string and
9848 copy_comment. Removed now unused `match', `ended',
9849 `cplus_comment'.
ae3c3164
AD
9850 (copy_comment, copy_string): Moved, to be visible from
9851 copy_definition.
9852
4dc58e7c
AD
98532000-03-17 Akim Demaille <akim@epita.fr>
9854
aa5fd0ee
AD
9855 * src/reader.c (copy_string): Declare `static inline'. No
9856 problems with inline, since it is checked by configure.
4dc58e7c
AD
9857 (copy_comment): Likewise.
9858
0a6384c4
AD
98592000-03-17 Akim Demaille <akim@epita.fr>
9860
aa5fd0ee 9861 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 9862
3cef001a
AD
98632000-03-17 Akim Demaille <akim@epita.fr>
9864
aa5fd0ee 9865 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
9866 (copy_action): Use it. Removed now unused `match', `ended',
9867 `cplus_comment'.
9868 (copy_guard): Likewise.
9869
ca36d2ef
AD
98702000-03-17 Akim Demaille <akim@epita.fr>
9871
aa5fd0ee 9872 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
9873 (copy_action): Use it.
9874 (copy_guard): Likewise.
9875
6666f98f
AD
98762000-03-17 Akim Demaille <akim@epita.fr>
9877
9878 Change the handling of @s so that they behave exactly like $s.
9879 There is now a pseudo variable @$ (readble and writable), location
9880 of the lhs of the rule (by default ranging from the location of
9881 the first symbol of the rhs, to the location of the last symbol,
9882 or, if the rhs is empty, YYLLOC).
9883
9884 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9885 yyval.
9886 (yyparse): When providing a default semantic action, provide a
9887 default location action.
9888 (after the $): No longer change `*YYLSP', just stack YYLOC the
9889 same way you stack YYVAL.
9890 * src/reader.c (read_declarations): Use warns.
9891 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9892 (copy_action, case '@'): Likewise.
9893 Use a standard error message, to save useless work from
9894 translators.
9895
41aca2e0
AD
98962000-03-17 Akim Demaille <akim@epita.fr>
9897
aa5fd0ee
AD
9898 * src/bison.s1: Formatting and cosmetics changes.
9899 * src/reader.c: Likewise.
41aca2e0
AD
9900 Update the Copyright notice.
9901
dc08c1d5
AD
99022000-03-17 Akim Demaille <akim@epita.fr>
9903
aa5fd0ee
AD
9904 * src/bison.s1 (#line): All set to `#line' only, since the
9905 Makefile now handles them.
dc08c1d5 9906
9ee3c97b
AD
99072000-03-16 Akim Demaille <akim@epita.fr>
9908
9909 * src/output.c (output_rule_data): Output the documentation of
9910 some of the tables.
9911 (Copyright notice): Update.
9912 Formatting changes.
9913
0de741ca
AD
99142000-03-16 Akim Demaille <akim@epita.fr>
9915
9916 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9917 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9918 One `#if YYDEBUG' remains, since it uses variables which are
9919 defined only if `YYDEBUG != 0'.
9920
bb10be54
AD
99212000-03-16 Akim Demaille <akim@epita.fr>
9922
9923 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9924 and related variables so that the similarities are highlighted.
9925
b07b484a
AD
99262000-03-16 Akim Demaille <akim@epita.fr>
9927
9928 * src/bison.s1: Properly indent CPP directives.
9929
361f60b3
AD
99302000-03-16 Akim Demaille <akim@epita.fr>
9931
9932 * src/bison.s1: Properly indent the `alloca' CPP section.
9933
8c44d3ec
AD
99342000-03-16 Akim Demaille <akim@epita.fr>
9935
9936 Do not hard code values of directories in `configure.in'.
9937 Update the `configure' tool chain.
9938
9939 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9940 src/makefile.am.
9941 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9942 (AC_OUTPUT): Add m4/Makefile.
9943 Bump to bison 1.28a, 1.29 has never been released.
9944 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9945 handled via src/Makefile.am.
9946 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9947 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9948 autoheader.
9949 * Makefile.am (SUBDIRS): Add m4.
9950 (ACLOCAL_AM_FLAGS): New variable.
9951 (AUTOMAKE_OPTIONS): Add check-news.
9952 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9953 the proper line number and file name.
9954 (DEFS): Propagate the location of bison library files and of the
9955 locale files.
9956 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9957 builddir.
9958 * acinclude.m4: Remove, replaced by the directory m4.
9959 * m4/Makefile.am (EXTRA_DIST): New variable.
9960 * m4/gettext.m4: New file, from the fileutils.
9961 * m4/lcmessage.m4: Likewise
9962 * m4/progtest.m4: Likewise.
9963 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9964
f95997e7
AD
99652000-03-10 Akim Demaille <akim@epita.fr>
9966
9967 * src/closure.c:
9968 Formatting changes of various comments.
9969 Respect the GNU coding standards at various places.
9970 Don't use `_()' when no translation is needed.
9971
99721999-12-13 Jesse Thilo <jthilo@gnu.org>
9973
9974 * src/files.c:
9975 OS/2 honors TMPDIR environment variable.
9976
99771999-12-13 Jesse Thilo <jthilo@gnu.org>
9978
9979 * doc/bison.texinfo: Tweaked spelling and grammar.
9980 Updated ISBN.
9981 Removed reference to price of printed copy.
9982 Mention BISON_SIMPLE and BISON_HAIRY.
9983
99841999-12-13 Jesse Thilo <jthilo@gnu.org>
9985
9986 * configure.in, NEWS:
9987 Bison 1.29 released.
9988
99891999-10-27 Jesse Thilo <jthilo@gnu.org>
9990
9991 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
9992 Added reference card.
9993
99941999-07-26 Jesse Thilo <jthilo@gnu.org>
9995
9996 * po/ru.po: Added Russian translation.
9997
99981999-07-26 Jesse Thilo <jthilo@gnu.org>
9999
10000 * configure.in: Added Russian translation.
10001
100021999-07-06 Jesse Thilo <jthilo@gnu.org>
10003
10004 * configure.in, NEWS, README:
10005 Released version 1.28.
10006
100071999-06-14 Jesse Thilo <jthilo@gnu.org>
10008
10009 * src/system.h:
10010 Squashed redefinition warning on some systems.
10011
10012 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10013 Have configure build version string instead of relying on ANSI string
10014 concatentation.
10015
100161999-06-14 Jesse Thilo <jthilo@gnu.org>
10017
10018 * po/POTFILES.in: Got rid of version.c.
10019
100201999-06-14 Jesse Thilo <jthilo@gnu.org>
10021
10022 * acconfig.h, configure.in:
10023 Have configure build version string instead of relying on ANSI string
10024 concatentation.
10025
100261999-06-08 Jesse Thilo <jthilo@gnu.org>
10027
10028 * doc/bison.1:
10029 Dropped mention of `+' for long-named options.
10030
100311999-05-30 Jesse Thilo <jthilo@gnu.org>
10032
10033 * src/files.c: Added <unistd.h> for unlink().
10034
10035 * src/Makefile.am, src/system.h:
10036 I18n fixes.
10037
100381999-05-30 Jesse Thilo <jthilo@gnu.org>
10039
10040 * README: Added a FAQ list.
10041
10042 * configure.in, acconfig.h:
10043 I18n fixes.
10044
100451999-05-30 Jesse Thilo <jthilo@gnu.org>
10046
10047 * doc/FAQ, doc/Makefile.am:
10048 Added a FAQ list.
10049
100501999-05-19 Jesse Thilo <jthilo@gnu.org>
10051
10052 * src/alloc.h, src/symtab.h, src/version.c:
10053 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10054
100551999-04-18 Jesse Thilo <jthilo@gnu.org>
10056
10057 * src/.cvsignore, src/Makefile.am:
10058 Reorganized: sources in `src', documentation in `doc'.
10059
10060 * src/lex.c (literalchar):
10061 fixed the code for escaping double quotes (thanks
10062 Jonathan Czisny.)
10063
100641999-04-18 Jesse Thilo <jthilo@gnu.org>
10065
10066 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10067 Adjusted paths to reflect directory reorganization.
10068
100691999-04-18 Jesse Thilo <jthilo@gnu.org>
10070
10071 * doc/.cvsignore, doc/Makefile.am:
10072 Reorganized: sources in `src', documentation in `doc'.
10073
100741999-04-18 Jesse Thilo <jthilo@gnu.org>
10075
10076 * configure.in:
10077 Updated AC_INIT file to reflect directory reorganization.
10078
10079 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10080 Reorganized: sources in `src', documentation in `doc'.
10081
100821999-04-13 Jesse Thilo <jthilo@gnu.org>
10083
10084 * src/allocate.c:
10085 Don't declare calloc() and realloc() if not necessary.
10086
100871999-04-13 Jesse Thilo <jthilo@gnu.org>
10088
10089 * configure.in, acconfig.h, acinclude.m4:
10090 Don't declare calloc() and realloc() if not necessary.
10091
100921999-03-23 Jesse Thilo <jthilo@gnu.org>
10093
10094 * po/.cvsignore: Added i18n support.
10095
100961999-03-23 Jesse Thilo <jthilo@gnu.org>
10097
10098 * acconfig.h, configure.in, Makefile.am:
10099 Added i18n support.
10100
101011999-03-22 Jesse Thilo <jthilo@gnu.org>
10102
10103 * src/bison.s1: Fixed #line numbers.
10104
101051999-03-15 Jesse Thilo <jthilo@gnu.org>
10106
10107 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10108 Added PO files from Translation Project.
10109
101101999-03-03 Jesse Thilo <jthilo@gnu.org>
10111
10112 * Makefile.am:
10113 Added support for non-ANSI compilers (ansi2knr).
10114
101151999-02-16 Jesse Thilo <jthilo@gnu.org>
10116
10117 * configure.in: Bumped version number to 1.27.
10118
10119 * Makefile.am:
10120 Added `bison.simple' to list of files removed by `make distclean'.
10121
101221999-02-12 Jesse Thilo <jthilo@gnu.org>
10123
10124 * src/files.c, src/files.h:
10125 Defined locations of parser files in config.h instead of Makefile.
10126
101271999-02-12 Jesse Thilo <jthilo@gnu.org>
10128
10129 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10130 Defined locations of parser files in config.h instead of Makefile.
10131
101321999-02-09 Jesse Thilo <jthilo@gnu.org>
10133
10134 * Makefile.am:
10135 Removed inappropriate use of $< macro.
10136
101371999-02-05 Jesse Thilo <jthilo@gnu.org>
10138
10139 * po/Makefile.in.in, po/POTFILES.in:
10140 Add `po' directory skeleton.
10141
101421999-01-27 Jesse Thilo <jthilo@gnu.org>
10143
10144 * README: Document help-bison list.
10145
10146 * configure.in: Add check for mkstemp().
10147
101481999-01-20 Jesse Thilo <jthilo@gnu.org>
10149
10150 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10151 Hush a few compiler warnings.
10152
10153 * src/files.c:
10154 Add tryclose(), which verifies that fclose was successful.
10155 Hush a couple of compiler warnings.
10156
101571999-01-20 Jesse Thilo <jthilo@gnu.org>
10158
10159 * Makefile.am, OChangeLog:
10160 ChangeLog is now automatically generated. Include the old version as
10161 OChangeLog.
10162
101631999-01-14 Jesse Thilo <jthilo@gnu.org>
10164
10165 * 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:
10166 Update FSF address.
10167
101681999-01-14 Jesse Thilo <jthilo@gnu.org>
10169
10170 * doc/bison.texinfo: Fix formatting glitch.
10171
10172 * doc/bison.texinfo: Update FSF address.
10173
101741999-01-14 Jesse Thilo <jthilo@gnu.org>
10175
10176 * acconfig.h: Update FSF address.
10177
101781999-01-08 Jesse Thilo <jthilo@gnu.org>
10179
10180 * src/system.h:
10181 Don't define PACKAGE here, since config.h defines it.
10182
101831998-12-30 Jesse Thilo <jthilo@gnu.org>
10184
10185 * src/reader.c: Update copyright date.
10186
10187 * src/main.c:
10188 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10189 favor of output directly to stderr (avoids buffer overruns).
10190
10191 * src/reader.c: Some checks for premature EOF.
10192
10193 * 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:
10194 Use prototypes if the compiler understands them.
10195
10196 * src/files.c: Honor TMPDIR on Unix hosts.
10197 Use prototypes if the compiler understands them.
10198
10199 * src/reader.c:
10200 Fix a couple of buffer overrun bugs.
10201 Use prototypes if the compiler understands them.
10202
10203 * src/system.h: Include unistd.h and ctype.h.
10204 Use #ifdef instead of #if for NLS symbols.
10205
102061998-12-30 Jesse Thilo <jthilo@gnu.org>
10207
10208 * doc/bison.texinfo:
10209 Delete comment "consider using @set for edition number, etc..." since
10210 we now are doing so.
10211
102121998-12-30 Jesse Thilo <jthilo@gnu.org>
10213
10214 * configure.in:
10215 Use prototypes if the compiler understands them.
10216
10217 * NEWS: Document 1.26 highlights.
10218
10219 * Makefile.am: Require Automake 1.3 or later.
10220
10221 * acconfig.h:
10222 Use prototypes if the compiler understands them.
10223
102241998-12-29 Jesse Thilo <jthilo@gnu.org>
10225
10226 * src/version.c:
10227 Use VERSION symbol from automake for version number.
10228
102291998-12-29 Jesse Thilo <jthilo@gnu.org>
10230
10231 * acconfig.h, configure.in, version.cin:
10232 Use VERSION symbol from automake for version number.
10233
102341998-11-28 Jesse Thilo <jthilo@gnu.org>
10235
10236 * Makefile.am:
10237 Distribute original version of simple parser (bison.s1), not built
10238 version (bison.simple).
10239
102401998-11-28 Jesse Thilo <jthilo@gnu.org>
10241
10242 * doc/bison.texinfo: Add info dir entry.
10243
10244 * doc/bison.texinfo:
10245 Let automake put version number into documentation.
10246
102471998-11-26 Jesse Thilo <jthilo@gnu.org>
10248
10249 * src/bison.cld, src/build.com, src/vmshlp.mar:
10250 Add non-RCS files from /gd/gnu/bison.
10251
102521998-11-26 Jesse Thilo <jthilo@gnu.org>
10253
10254 * doc/bison.1:
10255 Document the BISON_HAIRY and BISON_SIMPLE variables.
10256
102571998-11-25 Jesse Thilo <jthilo@gnu.org>
10258
10259 * src/version.c: Build version.c automatically.
10260
10261 * src/reader.c:
10262 Fix token numbering (used to start at 258, not 257).
10263
10264 * src/system.h: Include config.h.
10265
10266 * src/getargs.c: Update bug report address.
10267
10268 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10269 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10270
102711998-11-25 Jesse Thilo <jthilo@gnu.org>
10272
10273 * Makefile.am:
10274 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10275
10276 * configure.in, version.cin:
10277 Build version.c automatically.
10278
10279 * AUTHORS: Add AUTHORS file.
10280
10281 * README: Update bug report address.
10282
10283 * bison.simple:
10284 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10285
10286 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10287 Add automake stuff.
10288
102891998-11-25 Jesse Thilo <jthilo@gnu.org>
10290
10291 * doc/bison.texinfo: Clean up some formatting.
10292
102931998-05-05 Richard Stallman <rms@gnu.org>
10294
10295 * doc/bison.texinfo:
10296 Explain better why to make a pure parser.
10297
102981998-01-05 Richard Stallman <rms@gnu.org>
10299
10300 * src/files.c (openfiles):
10301 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10302 find a temporary directory, if possible. Do not unlink files while
10303 they are open.
10304
103051997-08-25 Richard Stallman <rms@gnu.org>
10306
10307 * src/reader.c (stack_offset;):
10308 Change some warni to warns.
10309
10310 * src/lex.c (literalchar): Use warns, not warni.
10311
103121997-06-28 Richard Stallman <rms@gnu.org>
10313
10314 * src/bison.s1: Add a Bison version comment.
10315
10316 * src/main.c (fatal, warn, berror):
10317 Use program_name.
10318
103191997-06-28 Richard Stallman <rms@gnu.org>
10320
10321 * Makefile.in (bison_version): New variable.
10322 (dist): Use that variable.
10323 (bison.s1): Substitute the Bison version into bison.simple.
10324
10325 * bison.simple: Add a Bison version comment.
10326
103271997-06-18 Richard Stallman <rms@gnu.org>
10328
10329 * src/main.c (fatal, warn, berror):
10330 Make error messages standard.
10331 (toomany): Improve error message text.
10332
10333 * 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:
10334 new.h renamed to alloc.h.
10335
103361997-06-18 Richard Stallman <rms@gnu.org>
10337
10338 * Makefile.in: new.h renamed to alloc.h.
10339
103401997-05-24 Richard Stallman <rms@gnu.org>
10341
10342 * src/lex.c (literalchar):
10343 Fix the code for escaping \, " and '.
10344
10345 (lex): Avoid trouble when there are many chars
10346 to discard in a char literal with just several chars in it.
10347
103481997-05-17 Richard Stallman <rms@gnu.org>
10349
10350 * src/bison.s1:
10351 Use malloc, if using alloca is troublesome.
10352 (YYSTACK_USE_ALLOCA): New flag macro.
10353 Define it for some systems and compilers.
10354 (YYSTACK_ALLOC): New macro.
10355 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10356 If it was malloc'd, free it.
10357
103581997-05-17 Richard Stallman <rms@gnu.org>
10359
10360 * bison.simple:
10361 Use malloc, if using alloca is troublesome.
10362 (YYSTACK_USE_ALLOCA): New flag macro.
10363 Define it for some systems and compilers.
10364 (YYSTACK_ALLOC): New macro.
10365 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10366 If it was malloc'd, free it.
10367
103681997-04-23 Richard Stallman <rms@gnu.org>
10369
10370 * src/bison.s1:
10371 (alloca) [__hpux]: Always define as __builtin_alloca.
10372
103731997-04-23 Richard Stallman <rms@gnu.org>
10374
10375 * bison.simple:
10376 (alloca) [__hpux]: Always define as __builtin_alloca.
10377
103781997-04-22 Richard Stallman <rms@gnu.org>
10379
10380 * src/bison.s1:
10381 [__hpux]: Include alloca.h (right for HPUX 10)
10382 instead of declaring alloca (right for HPUX 9).
10383
10384 * src/bison.s1 (__yy_memcpy):
10385 Declare arg `count' as unsigned int.
10386 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10387
103881997-04-22 Richard Stallman <rms@gnu.org>
10389
10390 * bison.simple:
10391 [__hpux]: Include alloca.h (right for HPUX 10)
10392 instead of declaring alloca (right for HPUX 9).
10393
10394 * bison.simple (__yy_memcpy):
10395 Declare arg `count' as unsigned int.
10396 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10397
103981997-01-03 Richard Stallman <rms@gnu.org>
10399
10400 * src/allocate.c: [__STDC__ or _MSC_VER]:
10401 Declare calloc and realloc to return void *.
10402
104031997-01-02 Richard Stallman <rms@gnu.org>
10404
10405 * src/system.h:
10406 [_MSC_VER]: Include stdlib.h and process.h.
10407 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10408
10409 * src/main.c (main): Return FAILURE as a value.
10410 (printable_version): Declare arg as int, not char.
10411
104121997-01-02 Richard Stallman <rms@gnu.org>
10413
10414 * Makefile.in (dist):
10415 Explicitly check for symlinks, and copy them.
10416
104171996-12-19 Richard Stallman <rms@gnu.org>
10418
10419 * src/files.c:
10420 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10421
104221996-12-18 Paul Eggert <eggert@gnu.org>
10423
10424 * src/bison.s1 (yyparse):
10425 If __GNUC__ and YYPARSE_PARAM are both defined,
10426 declare yyparse to have a void * argument.
10427
104281996-12-18 Paul Eggert <eggert@gnu.org>
10429
10430 * bison.simple (yyparse):
10431 If __GNUC__ and YYPARSE_PARAM are both defined,
10432 declare yyparse to have a void * argument.
10433
104341996-12-17 Richard Stallman <rms@gnu.org>
10435
10436 * src/reduce.c (nbits): Add some casts.
10437
104381996-08-12 Richard Stallman <rms@gnu.org>
10439
10440 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10441
104421996-08-12 Richard Stallman <rms@gnu.org>
10443
10444 * bison.simple: Test _MSDOS as well as _MSDOS_.
10445
104461996-07-31 Richard Stallman <rms@gnu.org>
10447
10448 * src/bison.s1:
10449 [__sun && __i386]: Include alloca.h.
10450
104511996-07-31 Richard Stallman <rms@gnu.org>
10452
10453 * bison.simple:
10454 [__sun && __i386]: Include alloca.h.
10455
104561996-07-30 Richard Stallman <rms@gnu.org>
10457
10458 * src/bison.s1: Comment change.
10459
10460 * src/bison.s1: Test _MSDOS_, not MSDOS.
10461
104621996-07-30 Richard Stallman <rms@gnu.org>
10463
10464 * bison.simple: Comment change.
10465
10466 * bison.simple: Test _MSDOS_, not MSDOS.
10467
104681996-06-01 Richard Stallman <rms@gnu.org>
10469
10470 * 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:
10471 Insert `_' macro around many string constants.
10472
10473 * src/main.c:
10474 Insert `_' macro around many string constants.
10475
10476 (main): Call setlocale, bindtextdomain and textdomain.
10477
10478 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10479 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10480 [ENABLE_NLS]: Include libintl.h.
10481 [ENABLE_NLS] (gettext): Define.
10482 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10483 (N_, PACKAGE, LOCALEDIR): New macros.
10484
104851996-06-01 Richard Stallman <rms@gnu.org>
10486
10487 * POTFILES.in: New file.
10488
10489 * Makefile.in (allocate.o):
10490 Define target explicitly.
10491
10492 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10493 (LDFLAGS): Set to @LDFLAGS@.
10494 (configure): Run autoconf only if preceding `cd' succeeds.
10495 (bison.s1): Redirect output to temporary file then move the
10496 temporary to the target, rather than redirecting directly to bison.s1.
10497 (clean): Remove config.status and config.log.
10498 (distclean): Don't remove config.status here.
10499
105001996-05-12 Richard Stallman <rms@gnu.org>
10501
10502 * src/bison.s1:
10503 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10504
105051996-05-12 Richard Stallman <rms@gnu.org>
10506
10507 * bison.simple:
10508 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10509
105101996-05-11 Richard Stallman <rms@gnu.org>
10511
10512 * src/bison.s1 (__yy_memcpy):
10513 Really reorder the args, as was supposedly done on Feb 14 1995.
10514 (yyparse): Calls changed accordingly.
10515
105161996-05-11 Richard Stallman <rms@gnu.org>
10517
10518 * Makefile.in (dist): Don't use $(srcdir).
10519
10520 * bison.simple (__yy_memcpy):
10521 Really reorder the args, as was supposedly done on Feb 14 1995.
10522 (yyparse): Calls changed accordingly.
10523
105241996-01-27 Richard Stallman <rms@gnu.org>
10525
10526 * src/output.c (output_rule_data):
10527 Test YYERROR_VERBOSE in the conditional
10528 around the definition of ttyname.
10529
105301995-12-29 Richard Stallman <rms@gnu.org>
10531
10532 * src/bison.s1:
10533 Fix line numbers in #line commands.
10534
105351995-12-29 Richard Stallman <rms@gnu.org>
10536
10537 * bison.simple:
10538 Fix line numbers in #line commands.
10539
105401995-12-27 Richard Stallman <rms@gnu.org>
10541
10542 * src/bison.s1 (YYPARSE_PARAM_DECL):
10543 In C++, make it always null.
10544 (YYPARSE_PARAM_ARG): New macro.
10545 (yyparse): Use YYPARSE_PARAM_ARG.
10546
105471995-12-27 Richard Stallman <rms@gnu.org>
10548
10549 * bison.simple (YYPARSE_PARAM_DECL):
10550 In C++, make it always null.
10551 (YYPARSE_PARAM_ARG): New macro.
10552 (yyparse): Use YYPARSE_PARAM_ARG.
10553
105541995-11-29 Richard Stallman <rms@gnu.org>
10555
10556 * doc/bison.texinfo:
10557 Describe literal string tokens, %raw, %no_lines, %token_table.
10558
105591995-11-29 Daniel Hagerty <hag@gnu.org>
10560
10561 * doc/bison.texinfo: Fixed update date
10562
105631995-10-16 Richard Stallman <rms@gnu.org>
10564
10565 * src/version.c: Version 1.25.
10566
105671995-10-16 Richard Stallman <rms@gnu.org>
10568
10569 * NEWS: *** empty log message ***
10570
105711995-10-16 Richard Stallman <rms@gnu.org>
10572
10573 * doc/bison.1, doc/bison.rnh:
10574 Add new options.
10575
105761995-10-15 Richard Stallman <rms@gnu.org>
10577
10578 * src/vmsgetargs.c, src/getargs.c:
10579 Added -n, -k, and -raw switches.
10580 (noparserflag, toknumflag, rawtoknumflag): New variables.
10581
10582 * src/symtab.h (SALIAS):
10583 New #define for adding aliases to %token.
10584 (struct bucket): Added `alias' field.
10585
10586 * src/reduce.c (reduce_grammar):
10587 Revise error message.
10588 (print_notices): Remove final `.' from error message.
10589
10590 * src/reader.c (reader_output_yylsp):
10591 New function.
10592 (readgram): Use `#if 0' around code that accepted %command
10593 inside grammar rules: The documentation doesn't allow it,
10594 and it will fail since the %command processors scan for the next %.
10595 (parse_token_decl): Extended the %token
10596 declaration to allow a multi-character symbol as an alias.
10597 (parse_thong_decl): New function.
10598 (read_declarations): Added %thong declarations.
10599 (read_declarations): Handle NOOP to deal with allowing
10600 % declarations as another means to specify the flags.
10601 (readgram): Allow %prec prior to semantics embedded in a rule.
10602 (skip_to_char, read_declarations, copy_definition)
10603 (parse_token_decl, parse_start_decl, parse_type_decl)
10604 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10605 (get_type_name, copy_guard, copy_action, readgram)
10606 (get_type, packsymbols): Revised most error messages.
10607 Changed `fatal' to `warnxxx' to avoid aborting for error.
10608 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10609 (read_declarations): Improve the error message for
10610 an invalid character. Do not abort.
10611 (read_declarations, copy_guard, copy_action): Use
10612 printable_version to avoid unprintable characters in printed output.
10613 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10614 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10615 Allow the type of a non-terminal can be given
10616 more than once, as long as all specifications give the same type.
10617
10618 * src/output.c:
10619 (output_headers, output_trailers, output, output_gram)
10620 (output_rule_data): Implement noparserflag variable.
10621 Implement toknumflag variable.
10622 (output): Call reader_output_yylsp to output LTYPESTR.
10623
10624 * src/main.c (main):
10625 If reader sees an error, don't process the grammar.
10626 (fatals): Updated to not use VARARGS1.
10627 (printable_version, int_to_string, warn, warni, warns, warnss)
10628 (warnsss): New error reporting functions. Avoid abort for error.
10629
10630 * src/lex.h:
10631 Added THONG and NOOP for alias processing.
10632 Added SETOPT for the new code that allows setting options with %flags.
10633
10634 * src/lex.c:
10635 Include getopt.h. Add some extern decls.
10636 (safegetc): New function to deal with EOF gracefully.
10637 (literalchar); new function to deal with reading \ escapes.
10638 (lex): Use literalchar.
10639 (lex): Implemented "..." tokens.
10640 (literalchar, lex, parse_percent_token): Made tokenbuffer
10641 always contain the token. This includes growing the token
10642 buffer while reading an integer.
10643 (parse_percent_token): Replaced if-else statement with percent_table.
10644 (parse_percent_token): Added % declarations as another
10645 way to specify the flags -n, -l, and -r. Also added hooks for
10646 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10647 major changes to files.c.
10648 (lex) Retain in the incoming stream a character following
10649 an incorrect '/'.
10650 (skip_white_space, lex): Revised most error messages
10651 and changed fatal to warn to avoid aborting.
10652 (percent_table): Added %thong declarations.
10653
10654 * src/gram.h: Comment changes.
10655
10656 * src/files.c (openfiles, open_extra_files, done):
10657 Add faction flag
10658 and actfile file. Handle noparserflag. Both for -n switch.
10659
10660 * src/conflicts.c (resolve_sr_conflict):
10661 Remove use of alloca.
10662
106631995-06-01 Jim Meyering <meyering@gnu.org>
10664
10665 * doc/bison.texinfo: *** empty log message ***
10666
106671995-05-06 Richard Stallman <rms@gnu.org>
10668
10669 * src/bison.s1: Comment change.
10670
106711995-05-06 Richard Stallman <rms@gnu.org>
10672
10673 * bison.simple: Comment change.
10674
106751995-05-03 Richard Stallman <rms@gnu.org>
10676
10677 * src/version.c: Version now 1.24.
10678
10679 * src/bison.s1: Change distribution terms.
10680
10681 * src/version.c: Version now 1.23.
10682
106831995-05-03 Richard Stallman <rms@gnu.org>
10684
10685 * doc/bison.texinfo:
10686 Rewrite "Conditions for Using Bison".
10687 Update version to 1.24.
10688
106891995-05-03 Richard Stallman <rms@gnu.org>
10690
10691 * bison.simple: Change distribution terms.
10692
106931995-02-23 Richard Stallman <rms@gnu.org>
10694
10695 * src/files.c: Test __VMS_POSIX as well as VMS.
10696
106971995-02-14 Jim Meyering <meyering@gnu.org>
10698
10699 * src/bison.s1 (__yy_memcpy):
10700 Renamed from __yy_bcopy to avoid
10701 confusion. Reverse FROM and TO arguments to be consistent with
10702 those of memcpy.
10703
107041995-02-14 Jim Meyering <meyering@gnu.org>
10705
10706 * bison.simple (__yy_memcpy):
10707 Renamed from __yy_bcopy to avoid
10708 confusion. Reverse FROM and TO arguments to be consistent with
10709 those of memcpy.
10710
107111994-11-10 David J. MacKenzie <djm@gnu.org>
10712
10713 * NEWS: reformat
10714
10715 * NEWS: New file.
10716
10717 * Makefile.in (DISTFILES): Include NEWS.
10718
10719 * Makefile.in (DISTFILES):
10720 Include install-sh, not install.sh.
10721
10722 * configure.in: Update to Autoconf v2 macro names.
10723
107241994-10-05 David J. MacKenzie <djm@gnu.org>
10725
10726 * Makefile.in: fix typo
10727
10728 * Makefile.in (prefix, exec_prefix):
10729 Let configure set them.
10730
107311994-09-28 David J. MacKenzie <djm@gnu.org>
10732
10733 * Makefile.in: Set datadir to $(prefix)/share.
10734
107351994-09-15 Richard Stallman <rms@gnu.org>
10736
10737 * src/bison.s1:
10738 Update copyright notice and GPL version.
10739
107401994-09-15 Richard Stallman <rms@gnu.org>
10741
10742 * bison.simple:
10743 Update copyright notice and GPL version.
10744
107451994-07-12 Richard Stallman <rms@gnu.org>
10746
10747 * src/reduce.c, src/reader.c:
10748 entered into RCS
10749
107501994-05-05 David J. MacKenzie <djm@gnu.org>
10751
10752 * Makefile.in: entered into RCS
10753
107541994-03-26 Richard Stallman <rms@gnu.org>
10755
10756 * src/bison.s1: entered into RCS
10757
107581994-03-26 Richard Stallman <rms@gnu.org>
10759
10760 * bison.simple: entered into RCS
10761
107621994-03-25 Richard Stallman <rms@gnu.org>
10763
10764 * src/main.c: entered into RCS
10765
107661994-03-24 Richard Stallman <rms@gnu.org>
10767
10768 * src/conflicts.c: entered into RCS
10769
107701994-01-02 Richard Stallman <rms@gnu.org>
10771
10772 * Makefile.in: *** empty log message ***
10773
107741993-11-21 Richard Stallman <rms@gnu.org>
10775
10776 * src/bison.s1: *** empty log message ***
10777
107781993-11-21 Richard Stallman <rms@gnu.org>
10779
10780 * doc/bison.texinfo: entered into RCS
10781
10782 * doc/bison.texinfo: *** empty log message ***
10783
107841993-11-21 Richard Stallman <rms@gnu.org>
10785
10786 * bison.simple: *** empty log message ***
10787
107881993-10-25 David J. MacKenzie <djm@gnu.org>
10789
10790 * doc/bison.texinfo: *** empty log message ***
10791
107921993-10-19 Richard Stallman <rms@gnu.org>
10793
10794 * src/bison.s1: *** empty log message ***
10795
107961993-10-19 Richard Stallman <rms@gnu.org>
10797
10798 * bison.simple: *** empty log message ***
10799
108001993-10-14 Richard Stallman <rms@gnu.org>
10801
10802 * src/bison.s1: *** empty log message ***
10803
108041993-10-14 Richard Stallman <rms@gnu.org>
10805
10806 * bison.simple: *** empty log message ***
10807
108081993-09-14 David J. MacKenzie <djm@gnu.org>
10809
10810 * doc/bison.texinfo: *** empty log message ***
10811
108121993-09-13 Noah Friedman <friedman@gnu.org>
10813
10814 * Makefile.in: *** empty log message ***
10815
108161993-09-10 Richard Stallman <rms@gnu.org>
10817
10818 * src/conflicts.c: *** empty log message ***
10819
10820 * src/system.h: entered into RCS
10821
108221993-09-10 Richard Stallman <rms@gnu.org>
10823
10824 * doc/bison.1: entered into RCS
10825
108261993-09-06 Noah Friedman <friedman@gnu.org>
10827
10828 * src/version.c: entered into RCS
10829
108301993-09-06 Noah Friedman <friedman@gnu.org>
10831
10832 * Makefile.in: *** empty log message ***
10833
108341993-07-30 David J. MacKenzie <djm@gnu.org>
10835
10836 * Makefile.in: *** empty log message ***
10837
108381993-07-24 Richard Stallman <rms@gnu.org>
10839
10840 * src/bison.s1: *** empty log message ***
10841
108421993-07-24 Richard Stallman <rms@gnu.org>
10843
10844 * bison.simple: *** empty log message ***
10845
108461993-07-08 David J. MacKenzie <djm@gnu.org>
10847
10848 * Makefile.in: *** empty log message ***
10849
108501993-07-04 Richard Stallman <rms@gnu.org>
10851
10852 * src/bison.s1: *** empty log message ***
10853
108541993-07-04 Richard Stallman <rms@gnu.org>
10855
10856 * bison.simple: *** empty log message ***
10857
108581993-06-26 David J. MacKenzie <djm@gnu.org>
10859
10860 * src/getargs.c: entered into RCS
10861
108621993-06-26 David J. MacKenzie <djm@gnu.org>
10863
10864 * doc/bison.texinfo: *** empty log message ***
10865
10866 * doc/bison.1: New file.
10867
108681993-06-25 Richard Stallman <rms@gnu.org>
10869
10870 * src/getargs.c: New file.
10871
108721993-06-16 Richard Stallman <rms@gnu.org>
10873
10874 * src/bison.s1: *** empty log message ***
10875
108761993-06-16 Richard Stallman <rms@gnu.org>
10877
10878 * bison.simple: *** empty log message ***
10879
108801993-06-03 Richard Stallman <rms@gnu.org>
10881
10882 * src/bison.s1: New file.
10883
108841993-06-03 Richard Stallman <rms@gnu.org>
10885
10886 * doc/bison.texinfo: *** empty log message ***
10887
108881993-06-03 Richard Stallman <rms@gnu.org>
10889
10890 * bison.simple: New file.
10891
108921993-05-19 Richard Stallman <rms@gnu.org>
10893
10894 * doc/bison.texinfo: New file.
10895
108961993-05-07 Noah Friedman <friedman@gnu.org>
10897
10898 * Makefile.in: *** empty log message ***
10899
109001993-04-28 Noah Friedman <friedman@gnu.org>
10901
10902 * src/reader.c: *** empty log message ***
10903
109041993-04-23 Noah Friedman <friedman@gnu.org>
10905
10906 * src/alloc.h: entered into RCS
10907
109081993-04-20 David J. MacKenzie <djm@gnu.org>
10909
10910 * src/version.c: *** empty log message ***
10911
10912 * src/files.c, src/allocate.c:
10913 entered into RCS
10914
10915 * src/reader.c: *** empty log message ***
10916
10917 * src/lex.c: entered into RCS
10918
10919 * src/conflicts.c: New file.
10920
10921 * src/symtab.c: entered into RCS
10922
10923 * src/alloc.h: New file.
10924
10925 * src/LR0.c: entered into RCS
10926
109271993-04-18 Noah Friedman <friedman@gnu.org>
10928
10929 * src/reader.c: New file.
10930
10931 * src/version.c: *** empty log message ***
10932
109331993-04-18 Noah Friedman <friedman@gnu.org>
10934
10935 * Makefile.in: *** empty log message ***
10936
109371993-04-17 Noah Friedman <friedman@gnu.org>
10938
10939 * Makefile.in: *** empty log message ***
10940
109411993-04-15 Richard Stallman <rms@gnu.org>
10942
10943 * src/main.c, src/files.c:
10944 New file.
10945
109461993-04-15 Noah Friedman <friedman@gnu.org>
10947
10948 * configure.in: entered into RCS
10949
10950 * configure.in: *** empty log message ***
10951
10952 * configure.in: New file.
10953
109541993-04-14 Richard Stallman <rms@gnu.org>
10955
10956 * Makefile.in: New file.
10957
109581993-04-13 Richard Stallman <rms@gnu.org>
10959
10960 * src/version.c: New file.
10961
109621993-03-25 Richard Stallman <rms@gnu.org>
10963
10964 * src/output.c: entered into RCS
10965
109661992-09-25 Richard Stallman <rms@gnu.org>
10967
10968 * configure.bat: entered into RCS
10969
109701992-06-22 Richard Stallman <rms@gnu.org>
10971
10972 * src/vmsgetargs.c: entered into RCS
10973
109741992-06-22 Richard Stallman <rms@gnu.org>
10975
10976 * doc/bison.rnh: entered into RCS
10977
109781992-04-20 David J. MacKenzie <djm@gnu.org>
10979
10980 * README: entered into RCS
10981
109821992-01-22 Richard Stallman <rms@gnu.org>
10983
10984 * src/machine.h: entered into RCS
10985
109861991-12-21 Richard Stallman <rms@gnu.org>
10987
10988 * src/lalr.c, src/closure.c:
10989 entered into RCS
10990
109911991-12-20 Richard Stallman <rms@gnu.org>
10992
10993 * src/state.h: entered into RCS
10994
109951991-12-18 Richard Stallman <rms@gnu.org>
10996
10997 * src/print.c, src/nullable.c, src/derives.c:
10998 entered into RCS
10999
110001991-11-03 David J. MacKenzie <djm@gnu.org>
11001
11002 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11003 entered into RCS
11004
110051988-09-09 Richard Stallman <rms@gnu.org>
11006
11007 * src/bison.hairy: entered into RCS
11008
110091987-12-16 Richard Stallman <rms@gnu.org>
11010
11011 * REFERENCES: entered into RCS
dc546b0f 11012
f294a2c2
AD
11013-----
11014
33167b8b 11015Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
dc546b0f 110161998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
f294a2c2 11017
33167b8b 11018This file is part of Bison, the GNU Compiler Compiler.
f294a2c2 11019
33167b8b 11020Bison is free software; you can redistribute it and/or modify
f294a2c2
AD
11021it under the terms of the GNU General Public License as published by
11022the Free Software Foundation; either version 2, or (at your option)
11023any later version.
11024
33167b8b 11025Bison is distributed in the hope that it will be useful,
f294a2c2
AD
11026but WITHOUT ANY WARRANTY; without even the implied warranty of
11027MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11028GNU General Public License for more details.
11029
11030You should have received a copy of the GNU General Public License
33167b8b 11031along with Bison; see the file COPYING. If not, write to
f294a2c2
AD
11032the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11033Boston, MA 02111-1307, USA.