]> git.saurik.com Git - bison.git/blob - ChangeLog
* src/output.c (prepare_symbols): Avoid trailing spaces in the
[bison.git] / ChangeLog
1 2003-03-31 Akim Demaille <akim@epita.fr>
2
3 * src/output.c (prepare_symbols): Avoid trailing spaces in the
4 output.
5
6 2003-03-31 Akim Demaille <akim@epita.fr>
7
8 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9 From Paul Hilfinger.
10
11 2003-03-29 Akim Demaille <akim@epita.fr>
12
13 * m4/error.m4: Do not put under dynamic conditions some code which
14 expansion is under static control.
15
16 2003-03-29 Akim Demaille <akim@epita.fr>
17
18 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
19
20 2003-03-29 Akim Demaille <akim@epita.fr>
21
22 * doc/bison.texinfo (Strings are Destroyed): New.
23
24 2003-03-13 Paul Eggert <eggert@twinsun.com>
25
26 * .cvsignore: Add configure.lineno.
27 * src/.cvsignore: Add yacc.
28 * tests/.cvsignore: Add testsuite.log.
29 * doc/fdl.texi: Sync with latest FSF version.
30
31 2003-03-12 Paul Eggert <eggert@twinsun.com>
32
33 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
34 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
35 cursor, instead of leaving it undefined. This fixes a bug
36 reported by Tim Van Holder in
37 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
38 * tests/input.at (Torturing the Scanner): Test the scanner on
39 an empty input file, which was Tim Van Holder's test case.
40
41 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
42 <sys/resource.h> can be included, include sys/time.h and
43 sys/times.h first, if available. This works around the SunOS
44 4.1.4 porting bug reported by Bruce Becker in
45 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
46
47 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
48 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
49 AC_HEADER_SYS_WAIT.
50
51 Merge changes from gnulib. This was prompted because the CVS
52 snapshot didn't build on Solaris 7 due to strnlen problems.
53
54 These changes need to be merged back into gnulib:
55 * lib/hash.c: Include <stdbool.h> unconditionally.
56 * m4/onceonly.m4 (m4_quote): New macro.
57 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
58 Quote AC_FOREACH variable-expansions properly.
59 The 2003-01-03 obstack.h change also needs merging.
60 {end of changes requiring merging}
61
62 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
63 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
64 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
65 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
66 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
67 New files, imported from gnulib.
68 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
69 above.
70
71 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
72 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
73 gnulib sources.
74
75 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
76 Add.
77 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
78 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
79 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
80 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
81 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
82 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
83 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
84 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
85 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
86 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
87 (jm_PREREQ_ARGMATCH): Remove.
88 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
89 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
90
91 * src/system.h: Include <stdbool.h> unconditionally.
92
93 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
94 assuming at least C89 in the bitset code for some time now.
95
96 2003-03-03 Akim Demaille <akim@epita.fr>
97
98 * ro.po: New.
99
100 2003-03-02 Akim Demaille <akim@epita.fr>
101
102 * doc/bison.texinfo (Table of Symbols): Reactivate the
103 documentation for %lex-param, and %parse-param.
104
105 2003-03-02 Akim Demaille <akim@epita.fr>
106
107 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
108 generate verbose error messages.
109 Use the number of tokens as an upper bound in yytname, as it
110 cannot be a non terminal.
111
112 2003-03-02 Akim Demaille <akim@epita.fr>
113
114 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
115 message.
116
117 2003-03-02 Akim Demaille <akim@epita.fr>
118
119 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
120 Use them to exercise yycheck overrun.
121 Based on Andrew Suffield's grammar.
122
123 2003-03-02 Akim Demaille <akim@epita.fr>
124
125 Create tests/local.at for Bison generic testing macros.
126
127 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
128 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
129 This new file.
130 * tests/calc.at (AT_CHECK_CALC): Adjust.
131 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
132 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
133 * tests/local.at: here.
134 (AT_COMPILE_CXX): Tags the tests using it as c++.
135 Ignore the test if CXX is not functional.
136
137 2003-03-01 Paul Eggert <eggert@twinsun.com>
138
139 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
140 not loc->end, since loc->end might contain garbage and this leads
141 to undefined behavior on some platforms.
142 (id_loc, token_start): Use (IF_LINTed) initial values that do not
143 depend on *loc, so that the reader doesn't give the the false
144 impression that *loc is initialized.
145 (<INITIAL>"%%"): Do not bother setting code_start, since its value
146 does not survive the return.
147
148 2003-03-01 Akim Demaille <akim@epita.fr>
149
150 * src/scan-gram.l (code_start): Always initialize it when entering
151 into yylex, as SC_EPILOGUE is activated *before* the corresponding
152 yylex invocation. An alternative would be making it static, but
153 then it starts with the second %%'s beginning, instead of its end.
154
155 2003-02-28 Paul Eggert <eggert@twinsun.com>
156
157 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
158 around a UnixWare 7.1.1 porting bug reported by John Hughes in
159 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
160
161 2003-02-26 Paul Eggert <eggert@twinsun.com>
162
163 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
164 Remove Sequent/Pyramid discussion (nobody uses them any more).
165 Merge VMS and MS-DOS discussion; these ports may well be dead
166 but let's keep mentioning them for now. Put <> around email
167 addresses. Add copyright notice.
168
169 2003-02-24 Paul Eggert <eggert@twinsun.com>
170
171 * data/glr.c (yy_reduce_print): yylineno -> yylno,
172 to avoid collision with flex use of yylineno.
173 Problem reported by Bruce Lilly in
174 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
175 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
176 * data/yacc.c (yy_reduce_print): Likewise.
177
178 * config/depcomp: Sync with Automake 1.7.3.
179
180 2003-02-21 Akim Demaille <akim@epita.fr>
181
182 * data/lalr1.cc: Use temporary variables instead of casts to
183 change integer types.
184 Suggested by Paul Eggert.
185
186 2003-02-21 Akim Demaille <akim@epita.fr>
187
188 * doc/bison.texinfo: Use "location" consistently to refer to @n,
189 to avoid confusions with lalr1.cc's notion of Position.
190 Suggested by Paul Eggert.
191
192 2003-02-20 Akim Demaille <akim@epita.fr>
193
194 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
195 before initial_columns.
196 (location.hh): Use consistent variable names when defining the
197 operator<<.
198 Use "last" so that we subtract from Positions, not from unsigned.
199
200 2003-02-20 Akim Demaille <akim@epita.fr>
201
202 * data/lalr1.cc (position.hh): New subfile, including the extended
203 and Doxygen'ed documentation of class Position.
204 (location.hh): Use it.
205 Document a` la Doxygen.
206 With the help of Benoit Perrot.
207
208 2003-02-20 Akim Demaille <akim@epita.fr>
209
210 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
211 AT_YACC_IF.
212 Redefine AT_YYERROR_SEES_LOC_IF using it.
213 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
214 not defined.
215 Don't use the location in yy::Parser::error_ and
216 yy::Parser::print_ when not %locations.
217 Activate more lalr1.cc tests.
218
219 2003-02-19 Akim Demaille <akim@epita.fr>
220
221 * data/lalr1.cc: When displaying a line number, be sure to make it
222 an int.
223
224 2003-02-19 Akim Demaille <akim@epita.fr>
225
226 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
227 Remove, useless.
228 (YYABORT, YYACCEPT, YYERROR): New.
229 * tests/calc.at: Renable the lalr1.cc test.
230
231 2003-02-19 Akim Demaille <akim@epita.fr>
232
233 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
234 error recovery, mixing with/without pops and discarding of the
235 lookahead.
236 Exercise YYERROR.
237 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
238
239 2003-02-17 Paul Eggert <eggert@twinsun.com>
240
241 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
242 * tests/testsuite.at (AT_COMPILE): Use them.
243 This fixes the testsuite problem reported by Robert Lentz in
244 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
245
246 2003-02-12 Paul Eggert <eggert@twinsun.com>
247
248 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
249 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
250 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
251 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
252 Check for malloc failure, for consistency with yacc.c.
253 (yytname_size): Remove, for consistency with yacc.c.
254
255 The bug still remains in data/lalr1.cc, as I didn't have time
256 to fix it there.
257
258 2003-02-06 Akim Demaille <akim@epita.fr>
259
260 * configure.ac (GXX): Rename as...
261 (CXX): this, to keep the original Autoconf semantics.
262 Require 2.57.
263 * data/lalr1.cc: Fix b4_copyright invocations.
264 If YYDEBUG is not defined, don't depend upon name_ being defined.
265 (location.hh): Include string and iostream.
266 (Position::filename): New member.
267 (Position::Position ()): New.
268 (operator<< (Position)): New.
269 (operator- (Position, int)): New.
270 (Location::first, Location::last): Rename as...
271 (Location::begin, Location::end): these, to mock the conventional
272 iterator names.
273 (operator<< (Location)): New.
274 * tests/atlocal.in (CXX): New.
275 * tests/testsuite.at (AT_COMPILE_CXX): New.
276 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
277 locations in a more synthetic way.
278 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
279 lalr1.cc is used.
280 Adjust the C locations to match those from Emacs: first column is
281 column 0.
282 Change all the expected results.
283 Conform to the GCS: simplify the locations when applicable.
284 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
285 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
286 these CPP macros with the m4 macros new defined by...
287 (AT_CHECK_PUSHDEFS): this, i.e.:
288 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
289 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
290 New macros.
291 (AT_CHECK_POPDEFS): Undefine them.
292 (AT_CHECK_CALC_LALR1_CC): New.
293 Use it for the first lalr1.cc test.
294
295 2003-02-04 Akim Demaille <akim@epita.fr>
296
297 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
298 Location as is defined.
299
300 2003-02-04 Akim Demaille <akim@epita.fr>
301
302 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
303 name_ being defined.
304
305 2003-02-03 Paul Eggert <eggert@twinsun.com>
306
307 * src/gram.h (start_symbol): Remove unused decl.
308
309 Use more-consistent naming conventions for local vars.
310
311 * src/derives.c (derives_compute): Change type of local var from
312 int to rule_number.
313 * src/gram.c (grammar_rules_partial_print): Likewise.
314 * src/print.c (print_core): Likewise.
315 * src/reduce.c (reduce_grammar_tables): Likewise.
316
317 * src/gram.c (grammar_dump): Change name of item_number *
318 local var from r to rp.
319 * src/nullable.c (nullable_compute): Likewise.
320
321 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
322
323 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
324 for symbol or symbol_number var.
325 * src/reader.c (grammar_start_symbol_set): Likewise.
326 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
327 Likewise.
328 * src/state.c (transitions_to): Likewise.
329 * src/state.h: Likewise.
330 * src/tables.c (symbol_number_to_vector_number): Likewise.
331
332 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
333 char * var.
334
335 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
336 var.
337
338 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
339 var.
340
341 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
342 Use str, not s, for char * var. Use ch, not c, for character var.
343 Use size for size var.
344
345 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
346 char * var.
347 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
348 uniqstr var.
349 * src/uniqstr.h: Likewise.
350
351 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
352 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
353 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
354 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
355 param to have same name as that of enum, so that we don't use
356 "s" to stand for a non-state.
357
358 2003-02-02 Akim Demaille <akim@epita.fr>
359
360 * src/scan-skel.l: Scan more than one inert character per yylex
361 invocation.
362
363 2003-02-01 Paul Eggert <eggert@twinsun.com>
364
365 Version 1.875a.
366
367 * po/LINGUAS: Add ms.
368
369 2003-01-30 Akim Demaille <akim@epita.fr>
370
371 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
372
373 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
374
375 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
376 of $1.
377
378 Changes in response to error report by S. Eken: GLR mode does not
379 handle negative $ indices or $ indices in embedded rules correctly.
380 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
381
382 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
383 (b4_rhs_location): Ditto.
384 (yyfill): New function to copy from stack tree into array
385 incrementally.
386 (yyuserAction): Modify to allow incremental move of semantic values
387 to rhs array when in GLR mode.
388 Define YYFILL to use in user-defined actions to fill semantic array
389 as needed.
390 Remove dummy use of yystack, as there is now a guaranteed use.
391 (yydoAction): Modify to allow incremental move of semantic values
392 to rhs array when in GLR mode.
393 (yyresolveAction): Ditto.
394 (yyglrShiftDefer): Update comment.
395 (yyresolveStates): Use X == NULL for pointers, not !X.
396 (yyglrReduce): Ditto.
397 (yydoAction): Ditto
398
399 * tests/glr-regr1.at: Rename to ...
400 * tests/glr-regression.at: Add new regression test for the problems
401 described above (adapted from S. Eken).
402 Update copyright notice.
403 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
404 * tests/Makefile.am: Ditto.
405
406 2003-01-28 Paul Eggert <eggert@twinsun.com>
407
408 * data/lalr1.cc: Do not use @output_header_name@ unless
409 b4_defines_flag is set. This fixes two bugs reported by
410 Tim Van Holder in
411 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
412 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
413
414 2003-01-21 Paul Eggert <eggert@twinsun.com>
415
416 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
417 we don't need to worry about yyerrlab1 being reported as an
418 "unused label" by non-GCC C compilers. The downside is that if
419 locations are used then a couple of statements are duplicated each
420 time YYERROR is invoked, but the upside is that the warnings
421 should vanish.
422 (yyerrlab1): Move code to YERROR.
423 (yyerrlab2): Remove. Change uses back to yyerrlab1.
424 This reverts some of the 2002-12-27 change.
425
426 2003-01-17 Paul Eggert <eggert@twinsun.com>
427
428 * src/output.c (symbol_printers_output): Fix typo that led
429 to core dump. Problem reported by Antonio Rus in
430 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
431
432 2003-01-13 Akim Demaille <akim@epita.fr>,
433 Quoc Peyrot <chojin@lrde.epita.fr>,
434 Robert Anisko <anisko_r@lrde.epita.fr>
435
436 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
437 when the stacks contain one element, as the loop would otherwise
438 free the last state, and then use the top state (the one we just
439 popped). This means that the initial elements will not be freed
440 explicitly, as is the case in yacc.c; it is not a problem, as
441 these elements have fake values.
442
443 2003-01-11 Paul Eggert <eggert@twinsun.com>
444
445 * NEWS: %expect-violations are now just warnings, reverting
446 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
447 bootstrapping problem reported by Matthias Klose; see
448 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
449 * src/conflicts.c (conflicts_print): Likewise.
450 * tests/conflicts.at (%expect not enough, %expect too much,
451 %expect with reduce conflicts): Likewise.
452 * doc/bison.texinfo (Expect Decl): Document this. Also mention
453 that the warning is enabled if the number of conflicts changes
454 (not necessarily increases).
455
456 * src/getargs.c (version): Update copyright year.
457
458 2003-01-09 Akim Demaille <akim@epita.fr>
459
460 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
461
462 2003-01-08 Paul Eggert <eggert@twinsun.com>
463
464 * Makefile.maint (WGETFLAGS):
465 New macro, containing "-C off" to disable proxy caches.
466 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
467 (rel-check): Use $(WGET) instead of wget.
468
469 2003-01-06 Paul Eggert <eggert@twinsun.com>
470
471 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
472 the GLR paper of Scott, Johnstone and Hussain.
473
474 2003-01-04 Paul Eggert <eggert@twinsun.com>
475
476 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
477 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
478 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
479 (EXTRA_LIBRARIES): New var, for liby.a.
480 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
481 (EXTRA_SCRIPTS): New var, for yacc.
482
483 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
484 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
485 Problem reported by Nelson H. F. Beebe.
486
487 2003-01-03 Paul Eggert <eggert@twinsun.com>
488
489 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
490 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
491 when compiling Bison 1.875's `bitset bset = obstack_alloc
492 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
493
494 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
495 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
496 grow to a huge size with typical invocation.
497
498 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
499 Use the pattern recommended by Autoconf 2.57, except also protect
500 against double-definition.
501 * src/system.h: Likewise.
502 Portability issues reported by Nelson H. F. Beebe.
503
504 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
505 All uses changed. Provide a definition in both C and C++.
506 (yytrue, yyfalse): Define even if defined (__cplusplus).
507
508 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
509 Reported by Nelson H. F. Beebe.
510
511 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
512
513 2003-01-02 Paul Eggert <eggert@twinsun.com>
514
515 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
516 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
517 Bug reported by Nelson H. F. Beebe.
518
519 2003-01-01 Paul Eggert <eggert@twinsun.com>
520
521 * Version 1.875.
522
523 2002-12-30 Paul Eggert <eggert@twinsun.com>
524
525 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
526 Moved here from...
527 (<INITIAL>","): Here. This causes stray "," to be treated
528 more uniformly.
529
530 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
531 last brace in braced code when not in Yacc mode, for compatibility
532 with Bison 1.35. This resurrects the 2001-12-15 patch to
533 src/reader.c.
534
535 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
536 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
537
538 2002-12-28 Paul Eggert <eggert@twinsun.com>
539
540 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
541 that of SYM's type. This fixes Debian bug 168069, reported by
542 Thomas Olsson.
543
544 2002-12-28 Paul Eggert <eggert@twinsun.com>
545
546 Version 1.75f.
547
548 Switch back to the Yacc style of conflict reports, undoing some
549 of the 2002-07-30 change.
550 * doc/bison.texinfo (Understanding): Use Yacc style for
551 conflict reports. Also, use new way of locating rules.
552 * src/conflicts.c (conflict_report):
553 Renamed from conflict_report_yacc, removing the old
554 'conflict_report'. Translate the entire conflict report at once,
555 so that we don't assume that "," has the same interpretation in
556 all languages.
557 (conflicts_output): Use Yacc-style conflict report for each state,
558 instead of our more-complicated style.
559 (conflicts_print): Use Yacc-style conflict report, except print
560 the input file name when not emulating Yacc.
561 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
562 Conflicted Reduction, %expect not enough, %expect too much,
563 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
564 * tests/existing.at (GNU Cim Grammar): Likewise.
565 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
566
567 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
568 fatal): Don't invoke fflush; it's not needed and it might even be
569 harmful for stdout, as stdout might not be open.
570 * src/reduce.c (reduce_print): Likewise.
571
572 2002-12-27 Paul Eggert <eggert@twinsun.com>
573
574 Fix a bug where error locations were not being recorded correctly.
575 This problem was originally reported by Paul Hilfinger in
576 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
577
578 * data/yacc.c (yyparse): New local var yylerrsp, to record the
579 top of the location stack's error locations.
580 (yyerrlab): Set it. When discarding a token, push its location
581 onto yylerrsp so that we don't lose track of the error's end.
582 (yyerrlab1): Now is only the target of YYERROR, so that we can
583 properly record the location of the action that failed. For GCC
584 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
585 GCC warning about yyerrlab1 being unused if YYERROR is unused.
586 (yyerrlab2): New label, which yyerrlab now falls through to.
587 Compute the error's location by applying YYLLOC_DEFAULT to
588 the locations of all the symbols that went into the error.
589 * doc/bison.texinfo (Location Default Action): Mention that
590 YYLLOC_DEFAULT is also invoked for syntax errors.
591 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
592 Error locations include the locations of all the tokens that were
593 discarded, not just the last token.
594
595 2002-12-26 Paul Eggert <eggert@twinsun.com>
596
597 * src/files.c: Include quote.h.
598 (compute_output_file_names): Warn if we detect conflicting
599 outputs to the same file. This should catch the misunderstanding
600 exemplified by Debian Bug 165349, reported by Bruce Stephens..
601
602 * src/conflicts.c (conflicts_print): If the user specifies
603 "%expect N", report an error if there are any reduce/reduce
604 conflicts. This is what the manual says should happen.
605 This fixes Debian bug 130890, reported by Anthony DeRobertis.
606 * tests/conflicts.at (%expect with reduce conflicts): New test.
607
608 Don't use m4_include on relative file names, as it doesn't work as
609 desired if there happens to be a file with that name under ".".
610
611 * m4sugar/version.m4: Remove; it was included but it wasn't used.
612 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
613 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
614 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
615 * src/output.c (output_skeleton): Use full path names when
616 specifying a file to include; don't rely on include path, as
617 it's unreliable when the working file contains a file with
618 that name.
619
620 2002-12-25 Paul Eggert <eggert@twinsun.com>
621
622 Remove obsolete references to bison.simple and bison.hairy.
623 Problem mentioned by Aubin Mahe in
624 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
625 * data/glr.c: Comment fix.
626 * doc/bison.1: Remove references. Also, mention "yacc".
627
628 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
629 with -g option.
630
631 * src/parse-gram.y (declaration): Use enum "report_states" rather
632 than its numeric value 1.
633
634 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
635 opening a new one. This fixes Debian bug 165349, reported by
636 Bruce Stephens.
637
638 2002-12-24 Paul Eggert <eggert@twinsun.com>
639
640 Version 1.75e.
641
642 * Makefile.maint (cvs-update): Don't assume that the shell
643 supports $(...), as Solaris sh doesn't.
644
645 * src/parse-gram.y (lloc_default): Remove test for empty
646 nonterminals at the end, since it didn't change the result.
647
648 2002-12-24 Paul Eggert <eggert@twinsun.com>
649
650 If the user does not define YYSTYPE as a macro, Bison now declares it
651 using typedef instead of defining it as a macro. POSIX requires this.
652 For consistency, YYLTYPE is also declared instead of defined.
653
654 %union directives can now have a tag before the `{', e.g., the
655 directive `%union foo {...}' now generates the C code
656 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
657 The default union tag is `YYSTYPE', for compatibility with Solaris 9
658 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
659 instead of `yyltype'.
660
661 `yystype' and `yyltype' are now obsolescent macros instead of being
662 typedefs or tags; they are no longer documented and will be
663 withdrawn in a future release.
664
665 * data/glr.c (b4_location_type): Remove.
666 (YYSTYPE): Renamed from yystype.
667 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
668 (struct YYLTYPE): Renamed from struct yyltype.
669 (YYLTYPE): Renamed from yyltype.
670 (yyltype, yystype): New (and obsolescent) macros,
671 for backward compatibility.
672 * data/yacc.c: Likewise.
673
674 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
675 does not specify a union tag. This is for compatibility with
676 Solaris 9 yacc.
677
678 * src/parse-gram.y (add_param): 2nd arg is now char * not char
679 const *, since it is now modified by stripping surrounding { }.
680 (current_braced_code): Remove.
681 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
682 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
683 trailing " {...}". Now of type <chars>.
684 (grammar_declaration): Adjust to bundled tokens.
685 (code_content): Remove; stripping is now done by add_param.
686 (print_token_value): Print contents of bundled tokens.
687 (token_name): New function.
688
689 * src/reader.h (braced_code, current_braced_code): Remove.
690 (token_name): New decl.
691
692 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
693 token_type, not braced_code code_kind. All uses changed.
694 (SC_PRE_CODE): New state, for scanning after a keyword that
695 has (or usually has) an immediately-following braced code.
696 (token_type): New local var, to keep track of which token type
697 to return when scanning braced code.
698 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
699 <INITIAL>"%parse-param", <INITIAL>"%printer",
700 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
701 instead of returning a token type immediately.
702 (<INITIAL>"{"): Set token type.
703 (<SC_BRACED_CODE>"}"): Use it.
704 (handle_action_dollar, handle_action_at): Now returns bool
705 indicating success. Fail if ! current_rule; this prevents a core dump.
706 (handle_symbol_code_dollar, handle_symbol_code_at):
707 Remove; merge body into caller.
708 (handle_dollar, handle_at): Complain in invalid contexts.
709
710 * NEWS, doc/bison.texinfo: Document the above.
711 * NEWS: Fix years and program names in copyright notice.
712
713 2002-12-17 Paul Eggert <eggert@twinsun.com>
714
715 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
716 Reporting, Table of Symbols): Omit mentions of %lex-param and
717 %parse-param from the documentation for now.
718
719 2002-12-15 Paul Eggert <eggert@twinsun.com>
720
721 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
722 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
723 lookahead symbol, and which sets yychar in parser actions) and it
724 disagreed with the Bison documentation. Bug
725 reported by Andrew Walrond.
726
727 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
728 as the caller now does that.
729 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
730 (YYEMPTY): Parenthesize right hand side, since others use it.
731 (yyparse): Don't assume that our generated code is the only code
732 that sets yychar.
733
734 2002-12-13 Paul Eggert <eggert@twinsun.com>
735
736 Version 1.75d.
737
738 POSIX requires a "yacc" command.
739 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
740 (MOSTLYCLEANFILES): Add yacc.
741 (yacc): New rule.
742 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
743 as an alias for bison y.
744
745 * po/LINGUAS: Add da.
746
747 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
748 problem with latest <getopt.h>.
749 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
750
751 * doc/fdl.texi: Upgrade to 1.2.
752 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
753 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
754 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
755 gnulib.
756 * config/install-sh: Sync with autotools.
757
758 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
759 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
760 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
761 locations are requested.
762 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
763 locations are requested.
764
765 2002-12-12 Paul Eggert <eggert@twinsun.com>
766
767 Remove unportable casts and storage allocation tricks.
768 While we're at it, remove almost all casts, since they
769 usually aren't needed and are a sign of trouble.
770
771 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
772
773 * src/derives.c (derives_compute): Do not subtract NTOKENS from
774 the pointer DSET returned by malloc; this isn't portable.
775 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
776 Similarly for DERIVES.
777 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
778 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
779 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
780
781 * src/derives.c (derives_compute): Do not bother invoking
782 int_of_rule_number, since rule numbers are integers.
783
784 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
785 rather than XMALLOC (char, N).
786
787 * src/files.c (filename_split): Rewrite to avoid cast.
788
789 * src/gram.h (symbol_number_as_item_number,
790 item_number_as_symbol_number, rule_number_as_item_number,
791 item_number_as_rule_number):
792 Now inline functions rather than macros, to avoid casts.
793 * src/state.h (state_number_as_int): Likewise.
794 * src/tables.c (state_number_to_vector_number,
795 symbol_number_to_vector_number): Likewise.
796
797 * src/gram.h (int_of_rule_number): Remove; no longer used.
798
799 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
800 since the resulting storage is always stored into.
801
802 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
803 where it's needed.
804
805 * src/muscle_tab.c (muscle_m4_output):
806 Now inline. Return bool, not int.
807 * src/state.c (state_compare): Likewise.
808 * src/symtab.c (symbol_check_defined,
809 symbol_check_alias_consistency, symbol_pack, symbol_translation,
810 hash_compare_symbol, hash_symbol):
811 Likewise.
812 * src/uniqstr.c (uniqstr_print): Likewise.
813 * src/muscle_tab.c (muscle_m4_output_processor):
814 New function, to avoid casts.
815 * src/state.c (state_comparator, stage_hasher): Likewise.
816 * src/symtab.c (symbol_check_defined_processor,
817 symbol_check_alias_consistency_processor, symbol_pack_processor,
818 symbol_translation_processor, hash_symbol_comparator,
819 hash_symbol_hasher): Likewise.
820 * src/uniqstr.c (uniqstr_print_processor): Likewise.
821 * src/muscle_tab.c (muscles_m4_output):
822 Use new functions instead of casting old functions unportably.
823 * src/state.c (state_hash_new): Likewise.
824 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
825 symbols_token_translations_init):
826 Likewise.
827 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
828
829 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
830 var instead of casting to long, to avoid casts.
831 (prepare_states): Use MALLOC rather than alloca, so that we don't
832 have to worry about alloca.
833 * src/state.c (state_hash_lookup): Likewise.
834
835 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
836 local var instead of casting to unsigned char, to avoid casts.
837
838 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
839 STATE_ALLOC): Remove.
840 (transitions_new, errs_new, reductions_new, state_new): Use malloc
841 rather than calloc, and use offsetof to avoid allocating slightly
842 too much storage.
843 (state_new): Initialize all members.
844
845 * src/state.c (state_hash): Use unsigned accumulator, not signed.
846
847 * src/symtab.c (symbol_free): Remove; unused.
848 (symbol_get): Remove cast in lhs of assignment.
849 (symbols_do): Now static. Accept generic arguments, not
850 hashing-related ones.
851
852 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
853 (symbol_processor): Remove.
854 (symbols_do): Remove decl; now static.
855
856 * src/system.h (alloca): Remove; decl no longer needed.
857 (<stddef.h>): Include, for offsetof.
858 (<inttypes.>, <stdint.h>): Include if available.
859 (uintptr_t): New type, if system lacks it.
860 (CALLOC, MALLOC, REALLOC): New macros.
861 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
862 new macros.
863
864 * src/tables.c (table_size): Now int, to pacify GCC.
865 (table_grow, table_ninf_remap): Use signed table size.
866 (save_row): Don't bother initializing locals when not needed.
867 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
868 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
869
870 * src/vcg.h: Correct misspellings.
871
872 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
873
874
875 * src/getargs.c (getargs): Don't assume EOF == -1.
876
877 2002-12-09 Paul Eggert <eggert@twinsun.com>
878
879 Change identifier spellings to avoid collisions with names
880 that are reserved by POSIX.
881
882 Don't use names ending in _t, since POSIX reserves them.
883 For consistency, remove _e and _s endings -- they're weren't
884 needed to remove ambiguity. All uses changed.
885 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
886 turn was just renamed from struniq_t.
887 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
888 which in turn was just renamed from struniq_processor_t.
889 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
890 in turn was renamed from hash_compare_struniq_t.
891 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
892 (state_list): Renamed from state_list_t.
893 * src/assoc.h (assoc): Renamed from assoc_t.
894 * src/conflicts.c (enum conflict_resolution): Renamed from
895 enum conflict_resolution_e.
896 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
897 (rule_list): Renamed from rule_list_t.
898 * src/getargs.h (enum trace): Renamed from enum trace_e.
899 (enum report): Renamed from enum report_e.
900 * src/gram.h (item_number): Renamed from item_number_t.
901 (rule_number): Renamed from rule_number_t.
902 (struct rule_s): Remove the "rule_s" part; not used.
903 (rule): Renamed from rule_t.
904 (rule_filter): Renamed from rule_filter_t.
905 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
906 (goto_list): Renamed from goto_list_t.
907 * src/lalr.h (goto_number): Renamed from goto_number_t.
908 * src/location.h (location): Renamed from location_t.
909 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
910 and moved here from:
911 * src/muscle_tab.h (muscle_entry_t): here.
912 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
913 (rule_list): Renamed from rule_list_t.
914 * src/print_graph.c (static_graph): Renamed from graph.
915 * src/reader.h (braced_code): Renamed from braced_code_t.
916 Remove brace_code_e tag.
917 * src/relation.h (relation_node): Renamed from relation_node_t.
918 (relation_nodes): Renamed from relation_nodes_t.
919 (relation): Renamed from relation_t.
920 * src/state.h (state_number): Renamed from state_number_t.
921 (struct state): Renamed from struct state_s.
922 (state): Renamed from state_t.
923 (transitions): Renamed from transitions_t. Unused (and
924 misspelled) transtion_s tag removed.
925 (errs): Renamed from errs_t. Unused errs_s tag removed.
926 (reductions): Renamed from reductions_t. Unused tag
927 reductions_s removed.
928 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
929 (struct symbol_list): Renamed from struct symbol_list_s.
930 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
931 (struct symbol): Renamed from struct symbol_s.
932 (symbol): Renamed from symbol_t.
933 * src/tables.c (vector_number): Renamed from vector_number_t.
934 (action_number): Renamed from action_t.
935 * src/tables.h (base_number): Renamed from base_t.
936 * src/vcg.h (enum color): Renamed from enum color_e.
937 (enum textmode): Renamed from enum textmode_e.
938 (enum shape): Renamed from enum shape_e.
939 (struct colorentry): Renamed from struct colorentry_s.
940 (struct classname): Renamed from struct classname_s.
941 (struct infoname): Renamed from struct infoname_s.
942 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
943 (enum decision): Renamed from enum decision_e.
944 (enum orientation): Renamed from enum orientation_e.
945 (enum alignment): Renamed from enum alignment_e.
946 (enum arrow_mode): Renamed from enum arrow_mode_e.
947 (enum crossing_type): Renamed from enum crossing_type_e.
948 (enum view): Renamed from enum view_e.
949 (struct node): Renamed from struct node_s.
950 (node): Renamed from node_t.
951 (enum linestyle): Renamed from enum linestyle_e.
952 (enum arrowstyle): Renamed from enum arrowstyle_e.
953 (struct edge): Renamed from struct edge.
954 (edge): Renamed from edge_t.
955 (struct graph): Renamed from struct graph_s.
956 (graph): Renamed from graph_t.
957 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
958 Rename value_t -> value.
959 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
960 value_t_as_yystype -> value_as_yystype.
961
962 Don't include <errno.h> in the mainstream code, since it
963 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
964 * lib/get-errno.c, lib/get-errno.h: New files.
965 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
966 get-errno.c.
967 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
968 * src/output.c (output_skeleton): Likewise.
969 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
970 instead of errno.
971 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
972 Likewise.
973 (handle_action_dollar, handle_action_at): Likewise.
974 * src/system.h: Do not include <errno.h>.
975 (TAB_EXT): Renamed from EXT_TAB.
976 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
977
978 Avoid str[a-z]*, since <string.h> reserves that name space.
979 Change all instances of "struniq" in names to "uniqstr", and
980 likewise for "STRUNIQ" and "UNIQSTR".
981 * src/uniqstr.c: Renamed from src/struniq.c.
982 * src/uniqstr.h: Renamed from src/struniq.h.
983 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
984 * src/files.c (strsuffix): Remove; unused.
985 (concat2): Renamed from stringappend. Now static.
986 * src/files.h (strsuffix, stringappend): Remove; unused.
987 * src/parse-gram.y (<chars>): Renamed from <string>.
988 (<uniqstr>): Renamed from <struniq>.
989 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
990 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
991 (struct graph_s.expand): Renamed from struct graph_s.stretch.
992 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
993 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
994 (N_EXPAND): Renamed from N_STRETCH.
995
996 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
997 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
998 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
999 Remove; unused.
1000 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1001 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1002 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1003 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1004 (BASE_MAXIMUM): Renamed from BASE_MAX.
1005 (BASE_MINIMUM): Renamed from BASE_MIN.
1006 (ACTION_MAX): Remove; unused.
1007 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1008 Unnecessary casts removed from above defines.
1009
1010
1011 Fix misspelling in names.
1012 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1013 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1014 G_NODE_ALIGNEMENT.
1015
1016
1017 * lib/timevar.c (timevar_report): Renamed from time_report,
1018 for consistency with other names.
1019 * lib/timevar.h (timevar_report): New decl.
1020 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1021
1022
1023 Sort include-file uses.
1024
1025 Reorder all include files under src to be in the order "system.h".
1026 then the ../lib include files in angle brackets (alphabetized),
1027 then the . include files in double-quotes (alphabetized). Fix
1028 dependency breakages encountered in this process, as follows:
1029 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1030 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1031 * src/state.h: Include "symtab.h".
1032
1033 2002-12-08 Paul Eggert <eggert@twinsun.com>
1034
1035 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1036 since this causes problems when __file__ contains character
1037 sequences like "@" that are treated specially by src/scan-skel.l.
1038 Instead, just use the file's basename. This fixes the bug
1039 reported by Martin Mokrejs in
1040 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
1041
1042 2002-12-06 Paul Eggert <eggert@twinsun.com>
1043
1044 Add support for rules that do not have trailing semicolons, as
1045 POSIX requires. Improve the quality of locations in Bison
1046 diagnostics.
1047
1048 * src/location.c: Include <quotearg.h>.
1049 (empty_location): Now const.
1050 (location_print): New function. Follow the recommendation of the
1051 GNU Coding Standards for locations that span file boundaries.
1052 * src/location.h: Do not include <quotearg.h>; no longer needed.
1053 (boundary): New type.
1054 (location_t): Use it. This allows locations to span file boundaries.
1055 All member uses changed: file -> start.file or end.file (as needed),
1056 first_line -> start.line, first_column -> start.column,
1057 last_line -> end.line, last_column -> end.column.
1058 (equal_boundaries): New function.
1059 (LOCATION_RESET, LOCATION_STEP): Remove.
1060 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1061 (empty_location): Now const.
1062 (location_print): New decl.
1063 * src/parse-gram.y (lloc_default): New function, which handles
1064 empty locations more accurately.
1065 (YYLLOC_DEFAULT): Use it.
1066 (%token COLON): Remove.
1067 (%token ID_COLON): New token.
1068 (rules): Use it.
1069 (declarations, rules): Remove trailing semicolon.
1070 (declaration, rules_or_grammar_declaration):
1071 Allow empty (";") declaration.
1072 (symbol_def): Remove empty actions; no longer needed.
1073 (rules_or_grammar_declaration): Remove trailing semicolon.
1074 (semi_colon.opt): Remove.
1075 * src/reader.h: Include location.h.
1076 (scanner_cursor): New decl.
1077 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1078 rolling our own.
1079 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1080 of *loc.
1081 (STEP): Remove. No longer needed, now that adjust_location does
1082 the work. All uses removed.
1083 (scanner_cursor): New var.
1084 (adjust_location): Renamed from extend_location. It now sets
1085 *loc and adjusts the scanner cursor. All uses changed.
1086 Don't bother testing for CR.
1087 (handle_syncline): Remove location arg; now updates scanner cursor.
1088 All callers changed.
1089 (unexpected_end_of_file): Now accepts start boundary of token or
1090 comment, not location. All callers changed. Update scanner cursor,
1091 not the location.
1092 (SC_AFTER_IDENTIFIER): New state.
1093 (context_state): Renamed from c_context. All uses changed.
1094 (id_loc, code_start, token_start): New local vars.
1095 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1096 processing of Yacc white space and equivalents here.
1097 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1098 instead of returning ID immediately, since we need to search for
1099 a subsequent colon.
1100 (<INITIAL>"'", "\""): Save token_start.
1101 (<INITIAL>"%{", "{", "%%"): Save code_start.
1102 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1103 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1104 BEGIN context_state at end, not INITIAL.
1105 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1106 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1107 Return correct token start.
1108 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1109 the start of a character, string or multiline comment is found.
1110 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1111 Reduction): Adjust reported locations to match the more-precise
1112 results now expected.
1113 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1114 * tests/reduce.at (Useless Rules, Reduced Automaton,
1115 Underivable Rules): Likewise.
1116 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1117 or "|"' now that so many other tokens are allowed by the new grammar.
1118
1119 * src/complain.h (current_file): Remove duplicate decl;
1120 current_file is now owned by files.h.
1121 * src/complain.c, src/scan-gram.l: Include files.h.
1122
1123 2002-12-06 Paul Eggert <eggert@twinsun.com>
1124
1125 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1126 promotes to int; it might be unsigned int.
1127 * data/yacc.c (yy_reduce_print): Likewise.
1128
1129 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1130 be #defined in the prologue, not in the Bison declarations.
1131 This fixes Debian Bug 102878, reported by Shaul Karl.
1132
1133 2002-12-02 Paul Eggert <eggert@twinsun.com>
1134
1135 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1136 * lib/strtoul.c: New file, from gnulib.
1137 This fixes a porting bug reported by Peter Klein in
1138 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1139
1140 2002-11-30 Paul Eggert <eggert@twinsun.com>
1141
1142 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1143 and put only a forward declaration in the prologue. This is for
1144 consistency with the other scanner helper functions.
1145
1146 Type clashes now generate warnings, not errors, since it
1147 appears that POSIX may allow some grammars with type clashes.
1148 * src/reader.c (grammar_current_rule_check): Warn about
1149 type clashes instead of complaining.
1150 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1151
1152 Add Yacc library, since POSIX requires it.
1153 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1154 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1155 * lib/main.c, lib/yyerror.c: New files.
1156
1157 gram_error can be static; it need not be extern.
1158 * src/reader.h (gram_error): Remove decl.
1159 * src/parse-gram.y (gram_error): Now static. Add static decl.
1160 (print_token_value): Omit parameter names from forward decl,
1161 for consistency.
1162
1163 2002-11-29 Paul Eggert <eggert@twinsun.com>
1164
1165 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1166 be declared before being used. E.g., one should typically
1167 declare them in the prologue. Use GNU coding style in examples.
1168 Put "const" consistently after the type it modifies. Mention
1169 that C99 supports "inline". Mention that yyerror traditionally
1170 returns "int".
1171
1172 %parse-param and %lex-param now take just one argument, the
1173 declaration; the argument name is deduced from the declaration.
1174
1175 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1176 Reporting, Table of Symbols): Document this.
1177 * src/parse-gram.y (add_param): New function.
1178 (COMMA): Remove.
1179 (declaration): Implement new rule for %parse-param and %lex-param.
1180 * src/scan-gram.l: "," now elicits a warning, rather than being
1181 a token; this is more compatible with byacc.
1182 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1183
1184 2002-11-27 Paul Eggert <eggert@twinsun.com>
1185
1186 Rename identifiers to avoid real and potential collisions.
1187
1188 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1189 to avoid collision with lex macro described by Bruce Lilly in
1190 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1191 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1192 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1193 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1194 All uses changed.
1195 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1196 The name "yycontrol" violates the name space rules, and this stuff
1197 wasn't being used anyway.
1198 (input): Remove action; this stuff wasn't being used.
1199 (gram_error): Rename local variable yylloc -> loc.
1200 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1201 (YY_DECL): Don't use "yy" at start of local variables.
1202 All uses changed, e.g., yylloc -> loc.
1203 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1204 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1205 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1206 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1207
1208 * src/parse-gram.y (gram_error): loc is now const *.
1209 * src/reader.h (gram_error): Likewise.
1210
1211 2002-11-24 Paul Eggert <eggert@twinsun.com>
1212
1213 Version 1.75c.
1214
1215 * tests/actions.at (Actions after errors): Use an output format
1216 more similar to that of the Printers and Destructors test.
1217 Test the position of the ';' token too.
1218 (Printers and Destructors): Likewise.
1219 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1220 unnecessarily alarming people when the test fails.
1221
1222 * data/yacc.c (yyerrlab1): Move this label down, so that the
1223 parser does not discard the lookahead token if the user code
1224 invokes YYERROR. This change is required for POSIX conformance.
1225
1226 * lib/error.c: Sync with gnulib.
1227
1228 2002-11-22 Paul Eggert <eggert@twinsun.com>
1229
1230 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1231 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1232 * lib/xmalloc.c: Likewise.
1233
1234 2002-11-20 Paul Eggert <eggert@twinsun.com>
1235
1236 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1237
1238 2002-11-20 Paul Eggert <eggert@twinsun.com>
1239
1240 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1241 should use `if (! x) abort ();' rather than `assert (x);', and
1242 anyway it's one less thing to worry about configuring.
1243
1244 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1245 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1246 and replace all instances of assert with abort.
1247 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1248 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1249
1250 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1251 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1252 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1253 hash_find_entry, hash_rehash, hash_insert): Likewise.
1254 * src/conflicts.c (resolve_sr_conflict): Likewise.
1255 * src/lalr.c (set_goto_map, map_goto): Likewise.
1256 * src/nullable.c (nullable_compute): Likewise.
1257 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1258 * src/reader.c (packgram, reader): Likewise.
1259 * src/state.c (state_new, state_free, state_transitions_set,
1260 state_reduction_find): Likewise.
1261 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1262 symbol_pack): Likewise.
1263 * src/tables.c (conflict_row, pack_vector): Likewise.
1264 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1265 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1266 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1267 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1268
1269 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1270 (ARGMATCH_CONSTRAINT): New macro.
1271 (ARGMATCH_ASSERT): Use it.
1272
1273 * src/system.h (verify): New macro.
1274 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1275 rather than assert.
1276 * src/tables.c (tables_generate): Likewise.
1277
1278 * src/struniq.c (struniq_assert): Now returns void, and aborts
1279 if the assertion is false.
1280 (struniq_assert_p): Remove.
1281 * src/struniq.h: Likewise.
1282
1283 2002-11-18 Paul Eggert <eggert@twinsun.com>
1284
1285 * data/glr.c (yygetLRActions): Replace `yyindex' with
1286 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1287 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1288 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1289
1290 2002-11-18 Akim Demaille <akim@epita.fr>
1291
1292 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1293 space.
1294 From Tim Van Holder.
1295
1296 2002-11-17 Paul Eggert <eggert@twinsun.com>
1297
1298 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1299 to "SyntaxError" for consistency with my 2002-11-15 change.
1300
1301 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1302 not define to {}, since this breaks the common use of `YYDPRINTF
1303 ((...));' if a single statement is desired (e.g. before `else').
1304 Work around GCC warnings by surrounding corresponding calls with
1305 {} if needed.
1306 (yyhasResolvedValue): Remove unused function.
1307 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1308 loop body.
1309 (yyreportSyntaxError): Renamed from yyreportParseError.
1310 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1311 All uses changed.
1312 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1313 extern when possible. Remove unused initializations.
1314
1315 2002-11-16 Akim Demaille <akim@epita.fr>
1316
1317 Augment the similarity between GLR and LALR traces.
1318
1319 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1320 (YY_REDUCE_PRINT): New.
1321 (yyparse): Use them.
1322 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1323 YYDPRINT here.
1324 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1325 state reached after the reduction/recovery, since...
1326 (yyparse, yyprocessOneStack): Report the state we are entering in.
1327
1328 2002-11-16 Akim Demaille <akim@epita.fr>
1329
1330 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1331 Add support for --trace=skeleton.
1332 * src/scan-skel.l: %option debug.
1333 Scan strings of non-@ or \n instead of character by character.
1334 (scan_skel): Handle trace_skeleton.
1335 (QPUTS): New.
1336 (@output_parser_name@, @output_header_name@): ``Restore'' their
1337 support (used to be M4 macros).
1338 * data/yacc.c: Quote larger chunks, a la glr.c.
1339 * data/lalr1.cc: Likewise.
1340 The header guards are no longer available, so use some other
1341 string than `YYLSP_NEEDED'.
1342
1343 2002-11-16 Akim Demaille <akim@epita.fr>
1344
1345 Make the ``Printers and Destructors'' test more verbose, taking
1346 `yacc.c''s behavior as (possibly wrong) reference.
1347
1348 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1349 instead of fprint on stdout.
1350 Set and report the last_line of the symbols.
1351 Consistently display values and locations.
1352
1353 2002-11-16 Paul Eggert <eggert@twinsun.com>
1354
1355 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1356
1357 2002-11-15 Paul Eggert <eggert@twinsun.com>
1358
1359 * tests/actions.at (Actions after errors): New test case.
1360
1361 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1362 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1363 tests/action.at, tests/calc.at, tests/conflicts.at,
1364 tests/cxx-type.at, tests/regression.at:
1365 "parse error" -> "syntax error" for POSIX compatibility.
1366 "parsing stack overflow..." -> "parser stack overflow" so
1367 that code matches Bison documentation.
1368
1369 2002-11-15 Akim Demaille <akim@epita.fr>
1370
1371 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1372 take two BRACED_CODE, not two string_content.
1373 Free the scanner's obstack when we are done.
1374 (code_content): New.
1375 * tests/calc.at: Adjust.
1376 * doc/bison.texinfo: Adjust.
1377 Also, make sure to include the `,' for these declarations.
1378
1379 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1380
1381 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1382 definition; avoids potential autoreconf problems.
1383
1384 2002-11-15 Akim Demaille <akim@epita.fr>
1385
1386 Always check the value returned by yyparse.
1387
1388 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1389 returned by yyparse.
1390 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1391 Adjust calls.
1392 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1393 returned by yyparse.
1394
1395 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1396
1397 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1398 on input.at test.
1399
1400 2002-11-14 Paul Eggert <eggert@twinsun.com>
1401
1402 * src/output.c (output_skeleton): Call xfopen instead of
1403 duplicating xfopen's body.
1404
1405 Fix bugs reported by Nelson H. F. Beebe in
1406 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1407
1408 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1409 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1410 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1411 file twice in the grammar, as an extra check.
1412
1413 * tests/input.at (Torturing the Scanner): Surround the
1414 backslash-newline tests with "#if 0", to make it less likely that
1415 we'll run into compiler bugs. Bring back solitary \ inside
1416 comment, but add a closing comment to work around HP C bug. Don't
1417 test backslash-newline in C character constant.
1418
1419 2002-11-14 Akim Demaille <akim@epita.fr>
1420
1421 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1422 status of the compiler.
1423 Calling `exit 1' is no longer needed.
1424 Reported by Nelson H. F. Beebe.
1425
1426 2002-11-14 Akim Demaille <akim@epita.fr>
1427
1428 * tests/atlocal.in (CPPFLAGS): We have config.h.
1429 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1430 New.
1431 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1432 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1433 * tests/regression.at, tests/torture.at: Use them for all the
1434 grammars that are to be compiled.
1435 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1436 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1437 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1438
1439 2002-11-14 Akim Demaille <akim@epita.fr>
1440
1441 * doc/bison.texinfo: Various formatting changes (alignments in
1442 samples, additional @group/@end group, GCS in samples.
1443 Use @deffn instead of simple @table to define the directives,
1444 macros, variables etc.
1445
1446 2002-11-13 Paul Eggert <eggert@twinsun.com>
1447
1448 Fix some bugs reported by Albert Chin-A-Young in
1449 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1450
1451 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1452 -o c"; the HP C compiler chatters during compilation.
1453 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1454 * tests/headers.at (export YYLTYPE): Likewise.
1455
1456 * tests/input.at (Torturing the Scanner): Remove lines containing
1457 solitary backslashes, as they tickle a bug in the HP C compiler.
1458
1459 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1460 comments, since they're not portable. Use GNU coding style.
1461
1462 2002-11-13 Akim Demaille <akim@epita.fr>
1463
1464 * data/yacc.c: Leave bigger chunks of quoted text.
1465 (YYDSYMPRINTF): New.
1466 Use it to report symbol activities.
1467 * data/glr.c (YYDSYMPRINTF): New.
1468 Use it.
1469
1470 2002-11-12 Paul Eggert <eggert@twinsun.com>
1471
1472 Version 1.75b.
1473
1474 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1475 (yyglrReduce): Return yyok, not 0.
1476 This should avoid the enumerated-type warnings reported
1477 by Nelson H. F. Beebe in
1478 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1479
1480 * lib/bbitset.h (BITSET_INLINE): Remove.
1481 * lib/bitset.h [! BITSET_INLINE]: Remove.
1482 (bitset_set, bitset_reset, bitset_test): Rename local vars
1483 to avoid shadowing warnings by GCC.
1484
1485 * data/glr.c (inline): Remove #define. It's the user's
1486 responsibility to #define it away, just like 'const'.
1487 This fixes one of the bugs reported by Nelson H. F. Beebe in
1488 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1489
1490 * Makefile.maint (po-check): Scan .l and .y files instead of the
1491 .c and the .h files that they generate. This fixes the bug
1492 reported by Tim Van Holder in:
1493 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1494 Look for N_ as well as for _. Try to avoid matching #define for
1495 N_ and _.
1496 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1497 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1498 * src/scan-gram.l: Revamp regular expressions so that " and '
1499 do not confuse xgettext.
1500
1501 * src/struniq.h (struniq_new): Do not declare the return type
1502 to be 'const'; this violates the C standard.
1503 * src/struniq.c (struniq_new): Likewise.
1504
1505 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1506
1507 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1508 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1509 linker.
1510
1511 2002-11-12 Akim Demaille <akim@epita.fr>
1512
1513 * Makefile.maint: Sync with Autoconf:
1514 (local_updates): New.
1515
1516 2002-11-12 Akim Demaille <akim@epita.fr>
1517
1518 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1519
1520 2002-11-12 Akim Demaille <akim@epita.fr>
1521
1522 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1523 locations.
1524
1525 2002-11-12 Akim Demaille <akim@epita.fr>
1526
1527 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1528 not yyvalue.
1529
1530 2002-11-12 Akim Demaille <akim@epita.fr>
1531
1532 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1533 Use it to test the GLR parser.
1534
1535 2002-11-12 Akim Demaille <akim@epita.fr>
1536
1537 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1538 defines it.
1539 * data/glr.c (yystos): New.
1540 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1541 (YYDSYMPRINT): New.
1542 (yyval): Don't define it, it is handled via M4.
1543 (yyrecoverParseError): Free verbosely the discarded symbols.
1544 * data/yacc.c (yysymprint): Remove, rather...
1545 (b4_yysymprint_generate): invoke.
1546 * data/c.m4 (b4_yysymprint_generate): New.
1547 Accept pointers as arguments, as opposed to the version from
1548 yacc.c.
1549 (b4_yydestruct_generate): Likewise.
1550 * tests/cations.at (Printers and Destructors): Use Bison directives
1551 instead of CPP macros.
1552 Don't rely on internal details.
1553
1554 2002-11-12 Akim Demaille <akim@epita.fr>
1555
1556 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1557 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1558 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1559 it against YYEMPTY and so forth), work on yytoken (i.e., set
1560 it to YYEMPTY etc.).
1561 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1562 (b4_symbol_actions): Remove.
1563 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1564 for 0, end-of-input.
1565
1566 2002-11-12 Akim Demaille <akim@epita.fr>
1567
1568 * doc/bison.texinfo (Destructor Decl): New.
1569
1570 2002-11-12 Akim Demaille <akim@epita.fr>
1571
1572 * src/tables.c (tables_generate): Use free for pointers that
1573 cannot be NULL, not XFREE.
1574 (pack_vector): Use assert, not fatal, for bound violations.
1575 * src/state.c (state_new): Likewise.
1576 * src/reader.c (reader): Likewise.
1577 * src/lalr.c (set_goto_map): Likewise.
1578 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1579 the file name.
1580
1581 2002-11-12 Akim Demaille <akim@epita.fr>
1582
1583 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1584 Restore.
1585 * src/scan-gram.l (last_string): Is global to the file, not to
1586 yylex.
1587 * src/parse-gram.y (input): Don't append the epilogue here,
1588 (epilogue.opt): do it here, and free the scanner's obstack.
1589 * src/reader.c (epilogue_set): Rename as...
1590 (epilogue_augment): this.
1591 * data/c.m4 (b4_epilogue): Defaults to empty.
1592
1593 2002-11-12 Akim Demaille <akim@epita.fr>
1594
1595 * src/getargs.c (long_options): Remove duplicates.
1596 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1597 Remove.
1598 * doc/bison.rnh: Remove.
1599 * doc/bison.texinfo (VMS Invocation): Remove.
1600
1601 2002-11-12 Akim Demaille <akim@epita.fr>
1602
1603 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1604 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1605
1606 Use struniq for symbols.
1607
1608 * src/symtab.h (symbol_t): The tag member is a struniq.
1609 (symbol_type_set): Adjust.
1610 * src/symtab.c (symbol_new): Takes a struniq.
1611 (symbol_free): Don't free the tag member.
1612 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1613 (hash_compare_symbol, hash_symbol): these.
1614 Use the fact that tags as struniqs.
1615 (symbol_get): Use struniq_new.
1616 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1617 Returns a strniq.
1618 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1619 and type members are struniqs.
1620 * src/reader.c (get_merge_function)
1621 (grammar_current_rule_merge_set): Adjust.
1622 (TYPE, current_type): Are struniq.
1623
1624 Use struniq for file names.
1625
1626 * src/files.h, src/files.c (infile): Split into...
1627 (grammar_file, current_file): these.
1628 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1629 * src/reduce.c (reduce_print): Likewise.
1630 * src/getargs.c (getargs): Likewise.
1631 * src/complain.h, src/complain.c: Likewise.
1632 * src/main.c (main): Call struniqs_new early enough to use it for
1633 file names.
1634 Don't free the input file name.
1635
1636 2002-11-12 Akim Demaille <akim@epita.fr>
1637
1638 * src/symtab.c (symbol_free): Remove dead deactivated code:
1639 type_name are properly removed.
1640 Don't use XFREE to free items that cannot be NULL.
1641 * src/struniq.h, src/struniq.c: New.
1642 * src/main.c (main): Initialize/free struniqs.
1643 * src/parse-gram.y (%union): Add astruniq member.
1644 (yyprint): Adjust.
1645 * src/scan-gram.l (<{tag}>): Return a struniq.
1646 Free the obstack bit that used to store it.
1647 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1648
1649 2002-11-11 Paul Eggert <eggert@twinsun.com>
1650
1651 Revamp to fix many (but not all) of the C- and M4-related quoting
1652 problems. Among other things, this fixes the Bison bug reported
1653 by Jan Hubicka when processing the Bash grammar; see:
1654 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1655
1656 Use new @ escapes consistently. Represent brackets with @{ and @}
1657 rather than @<:@ and @:>@, since this works a bit better with dumb
1658 editors like vi. Represent @ with @@, since @ is now consistently
1659 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1660 __ofile__, to avoid unexpected expansions. Similarly, use @output
1661 rather than #output.
1662
1663 * data/c.m4 (b4_copyright): Omit file name from comment, since
1664 the file name could contain "*/".
1665 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1666 be quoted. All uses changed.
1667
1668 * data/glr.c: Use new @ escapes consistently.
1669 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1670 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1671 Remove, since they couldn't handle arbitrary characters in file
1672 names.
1673 * data/lalr1.cc: Likewise.
1674 * data/yacc.c: Likewise.
1675
1676 * src/files.c (output_infix): Remove; all uses removed.
1677 * src/files.h: Likewise.
1678
1679 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1680 mishandled funny characters in file names, and anyway it isn't
1681 needed any more.
1682 * data/yacc.c: Likewise.
1683 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1684
1685 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1686 * data/yacc.c: Likewise.
1687
1688 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1689 strings now.
1690 (muscle_init): Quote filename as a C string.
1691 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1692 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1693 * src/output.c (escaped_file_name_output): New function.
1694 (prepare_symbols): Quote tokens for M4.
1695 (prepare): Don't insert output_infix, output_prefix,
1696 output_parser_name, output_header_name; this is now down by scan-skel.
1697 Insert skeleton as a C string.
1698
1699 * src/output.c (user_actions_output, symbol_destructors_output,
1700 symbol_printers_output): Quote filenames for C and M4.
1701 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1702
1703 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1704 escapes other than \\ and \'; this simplifies the code.
1705 (<SC_STRING>): Likewise, for \\ and \".
1706 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1707 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1708 Use new escapes @{ and @} for [ and ].
1709
1710 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1711 them with auto vars.
1712 Switch to new escape scheme, where @ is the escape character uniformly.
1713 Abort if a stray escape character is found. Avoid unbounded input
1714 buffer when parsing non-escaped text.
1715
1716 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1717 __oline__, #output, $@, and @{ do not have unintended meanings.
1718
1719 2002-11-09 Paul Eggert <eggert@twinsun.com>
1720
1721 Fix the test failure due to GCC warnings described in
1722 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1723 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1724 evaluate to 0 if it's impossible for NINF to be in the respective
1725 table.
1726 (yygetLRActions, yyrecoverParseError): Use them.
1727
1728 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1729 counted in the token inserted at end of file. Now takes
1730 location_t *, not location_t, so that the location can be
1731 adjusted. All uses changed.
1732
1733 * tests/regression.at (Invalid inputs): Adjust wording in
1734 diagnostic to match the new behavior.
1735
1736 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1737 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1738 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1739 abort ();'. This reduces the runtime of the "Many lookaheads"
1740 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1741 GCC 3.2.
1742
1743 2002-11-07 Paul Eggert <eggert@twinsun.com>
1744
1745 * src/parse-gram.y (CHARACTER): Remove unused token.
1746 All uses removed.
1747
1748 * src/scan-gram.l: Remove stack option. We no longer use the
1749 stack, since the stack was never deeper than 1; instead, use the
1750 new auto var c_context to record the stacked value.
1751
1752 Remove nounput option. At an unexpected end of file, we now unput
1753 the minimal input necessary to end cleanly; this simplifies the
1754 code.
1755
1756 Avoid unbounded token sizes where this is easy.
1757
1758 (unexpected_end_of_file): New function.
1759 Use it to systematize the error message on unexpected EOF.
1760 (last-string): Now auto, not static.
1761 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1762 (scanner_last_string_free): Remove; not used.
1763 (percent_percent_count): Move decl to just before use.
1764 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1765 not the (never otherwised-used) CHARACTER.
1766
1767 2002-11-07 Akim Demaille <akim@epita.fr>
1768
1769 Let yyerror always receive the msg as last argument, so that
1770 yyerror can be variadic.
1771
1772 * data/yacc.c (b4_yyerror_args): New.
1773 Use it when calling yyerror.
1774 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1775 Use it when calling yyerror.
1776 * doc/bison.texinfo (Error Reporting): Adjust.
1777 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1778 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1779
1780 2002-11-06 Akim Demaille <akim@epita.fr>
1781
1782 #line should have quoted strings.
1783 Ideally, this should be done by m4_quotearg.
1784
1785 * src/scan-skel.l: Include quotearg.h.
1786 Quote __ofile__.
1787 * src/output.c (symbol_printers_output)
1788 (symbol_destructors_output): Quote the file name.
1789
1790 2002-11-06 Akim Demaille <akim@epita.fr>
1791
1792 * tests/regression.at (Invalid inputs): Adjust to the recent
1793 messages.
1794
1795 2002-11-06 Akim Demaille <akim@epita.fr>
1796
1797 Restore --no-lines.
1798 Reported by Jim Kent.
1799
1800 * data/c.m4 (b4_syncline): New.
1801 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1802 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1803 * src/output.c (user_actions_output): Likewise.
1804 (prepare): Define 'b4_synclines_flag'.
1805 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1806
1807 2002-11-06 Akim Demaille <akim@epita.fr>
1808
1809 * src/main.c (main): Free `infile'.
1810 * src/scan-gram.l (handle_syncline): New.
1811 Recognize `#line'.
1812 * src/output.c (user_actions_output, symbol_destructors_output)
1813 (symbol_printers_output): Use the location's file name, not
1814 infile.
1815 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1816
1817 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1818
1819 * src/tables.c (matching_state): Don't allow states to match if
1820 either has GLR conflict entries.
1821
1822 2002-11-05 Paul Eggert <eggert@twinsun.com>
1823
1824 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1825 "integer out of range" rather than "invalid value".
1826 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1827 accordingly.
1828
1829 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1830 Also, remove one static variable in the scanner.
1831
1832 * src/scan-gram.l (braces_level): Now auto, not static.
1833 Initialize to zero if the compiler is being picky.
1834 (INITIAL): Clear braces_level instead of incrementing it.
1835 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1836 as POSIX 1003.1-2001 requires.
1837 * src/system.h (IF_LINT): New macro, taken from coreutils.
1838 * configure.ac: Define "lint" if --enable-gcc-warnings.
1839
1840 2002-11-05 Akim Demaille <akim@epita.fr>
1841
1842 * src/scan-gram.l: When it starts with `%', complain about the
1843 whole directive, not just that `invalid character: %'.
1844
1845 2002-11-04 Akim Demaille <akim@epita.fr>
1846
1847 * Makefile.maint: Update from Autoconf.
1848 (update, cvs-update, po-update, do-po-update): New.
1849
1850 2002-11-04 Akim Demaille <akim@epita.fr>
1851
1852 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1853 and yyerror.
1854 Have yyerror `use' its arguments.
1855 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1856 returns true when location & yacc & pure & parse-param.
1857 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1858
1859 2002-11-04 Akim Demaille <akim@epita.fr>
1860
1861 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1862 clashes.
1863 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1864 font-lock-mode.
1865 Use complain_at.
1866 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1867 slot 0.
1868
1869 2002-11-03 Paul Eggert <eggert@twinsun.com>
1870
1871 * src/reader.c (get_merge_function, grammar_current_rule_check):
1872 Use consistent diagnostics for reporting type name clashes.
1873 Quote the types with <>, for consistency with Yacc.
1874 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1875
1876 2002-11-03 Akim Demaille <akim@epita.fr>
1877
1878 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1879 New.
1880 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1881 (b4_parse_param): Remove.
1882 Use b4_identification.
1883 Propagate b4_pure_args where needed to pass them to yyerror.
1884 * data/glr.m4 (b4_parse_param): Remove.
1885 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1886 (b4_lpure_formals): New.
1887 Use b4_identification.
1888 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1889 b4_user_formals and b4_user_args.
1890 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1891 (yyreportAmbiguity): When using a pure parser, also need
1892 the location, and the parse-params.
1893 Adjust callers.
1894 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1895 When using a pure parser, also need the parse-params.
1896 Adjust callers.
1897 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1898 (%pure-parser + %parse-param) LALR and GLR parsers.
1899 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1900 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1901 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1902 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1903 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1904 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1905 * doc/bison.texinfo: Untabify the whole file.
1906 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1907 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1908 (Error Reporting): Adjust to these new directives.
1909 Document %error-verbose, deprecate YYERROR_VERBOSE.
1910
1911 2002-11-03 Akim Demaille <akim@epita.fr>
1912
1913 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1914 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1915 command line options.
1916 * tests/cxx-type.at: Formatting changes.
1917
1918 2002-11-03 Paul Eggert <eggert@twinsun.com>
1919
1920 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1921 to count columns correctly, and to check for invalid inputs.
1922
1923 Use mbsnwidth to count columns correctly. Account for tabs, too.
1924 Include mbswidth.h.
1925 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1926 (extend_location): New function.
1927 (YY_LINES): Remove.
1928
1929 Handle CRLF in C code rather than in Lex code.
1930 (YY_INPUT): New macro.
1931 (no_cr_read): New function.
1932
1933 Scan UCNs, even though we don't fully handle them yet.
1934 (convert_ucn_to_byte): New function.
1935
1936 Handle backslash-newline correctly in C code.
1937 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1938 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1939 all uses changed.
1940 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1941 Use {splice} wherever C allows backslash-newline.
1942 YY_STEP after space, newline, vertical-tab.
1943 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1944
1945 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1946
1947 ({int}, handle_action_dollar, handle_action_at): Check for integer
1948 overflow.
1949
1950 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1951
1952 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1953 as well as \000. Check for UCHAR_MAX, not 255.
1954 Allow \x with an arbitrary positive number of digits, as in C.
1955 Check for overflow here.
1956 Allow \? and UCNs, for compatibility with C.
1957
1958 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1959 with quote slot used by complain_at.
1960
1961 * tests/input.at: Add tests for backslash-newline, m4 quotes
1962 in symbols, long literals, and funny escapes in strings.
1963
1964 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1965 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1966 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1967 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1968 * m4/mbswidth.m4: New file, from GNU coreutils.
1969
1970 * doc/bison.texinfo (Grammar Outline): Document // comments.
1971 (Symbols): Document that trigraphs have no special meaning in Bison,
1972 nor is backslash-newline allowed.
1973 (Actions): Document that trigraphs have no special meaning.
1974
1975 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1976 no longer used.
1977
1978 2002-11-02 Paul Eggert <eggert@twinsun.com>
1979
1980 * src/reader.c: Don't include quote.h; not needed.
1981 (get_merge_function): Reword warning to be consistent with
1982 type clash diagnostic in grammar_current_rule_check.
1983
1984 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1985 bug in trigraph handling.
1986
1987 * src/output.c (prepare_symbols): When printing token names,
1988 escape "[" as "@<:@" and likewise for "]".
1989
1990 * src/system.h (errno): Remove declaration, as we are now
1991 assuming C89 or better, and C89 guarantees errno.
1992
1993 2002-10-30 Paul Eggert <eggert@twinsun.com>
1994
1995 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1996 Check for close failures.
1997 * src/files.h (xfclose): Return void, not int, since it always
1998 returned zero.
1999 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2000 indicates one.
2001 * src/output.c (output_skeleton): Use xfclose rather than fclose
2002 and ferror. xfclose now checks ferror.
2003
2004 * data/glr.c (YYLEFTMOST_STATE): Remove.
2005 (yyreportTree): Use a stack-based leftmost state. This avoids
2006 our continuing battles with bogus warnings about initializers.
2007
2008 2002-10-30 Akim Demaille <akim@epita.fr>
2009
2010 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2011 #if.
2012
2013 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2014
2015 * tests/glr-regr1.at: New test for reported regressions.
2016 * tests/testsuite.at: Add glr-regr1.at test.
2017 * tests/Makefile.am: Add glr-regr1.at test.
2018
2019 2002-10-24 Paul Eggert <eggert@twinsun.com>
2020
2021 Version 1.75a.
2022
2023 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2024 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2025 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2026 Don't assume strdup exists; POSIX says its an XSI extension.
2027 Check for buffer overflow on input.
2028
2029 2002-10-24 Akim Demaille <akim@epita.fr>
2030
2031 * src/output.c (output_skeleton): Don't disable M4sugar comments
2032 too soon: it results in comments being expanded.
2033 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2034 first output.
2035
2036 2002-10-24 Akim Demaille <akim@epita.fr>
2037
2038 * data/yacc.c (m4_int_type): New.
2039 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2040 char' as only yacc.c wants K&R portability.
2041 * data/glr.c (yysigned_char): Remove.
2042 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2043 Reported by Quoc Peyrot.
2044
2045 2002-10-23 Paul Eggert <eggert@twinsun.com>
2046
2047 * src/main.c (main): With --trace=time, report times even if a
2048 non-fatal error occurs. Formerly, the times were reported in some
2049 such cases but not in others.
2050 * src/reader.c (reader): Just return if a complaint has been issued,
2051 instead of exiting, so that 'main' can report times.
2052
2053 2002-10-22 Akim Demaille <akim@epita.fr>
2054
2055 * src/system.h: Include sys/types.
2056 Reported by Bert Deknuydt.
2057
2058 2002-10-23 Paul Eggert <eggert@twinsun.com>
2059
2060 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2061 Suggested by Art Haas.
2062
2063 2002-10-22 Paul Eggert <eggert@twinsun.com>
2064
2065 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2066 decl; not needed any more.
2067 * src/main.c (main): Use return to exit, undoing yesterday's change.
2068 The last OS that we could find where this wouldn't work is
2069 SunOS 3.5, and that's too old to worry about now.
2070
2071 * data/glr.c (struct yyltype): Define members even when not
2072 doing locations. This is more consistent with yacc.c, and it
2073 works around the following bug reports:
2074 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2075 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
2076
2077 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2078 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2079 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2080
2081 2002-10-22 Akim Demaille <akim@epita.fr>
2082
2083 * data/README: New.
2084
2085 2002-10-21 Paul Eggert <eggert@twinsun.com>
2086
2087 Be consistent about 'bool'; the old code used an enum in one
2088 module and an int in another, and this violates the C standard.
2089 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2090 * configure.ac (AC_HEADER_STDBOOL): Add.
2091 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2092 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2093 * src/symtab.c (hash_compare_symbol_t): Likewise.
2094 * src/system.h (bool, false, true): Use a definition consistent
2095 with ../lib/hash.c. All uses changed.
2096
2097 * src/complain.c (warning_issued): Renamed from warn_message_count,
2098 so that we needn't worry about integer overflow (!).
2099 Now of type bool. All uses changed.
2100 (complaint_issued): Renamed from complain_message_count; likewise.
2101
2102 * src/main.c (main): Use exit to exit with failure.
2103
2104 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2105 rather than 1 and 0.
2106 * src/main.c (main): Likewise.
2107 * src/getargs.c (getargs): Likewise.
2108 * src/reader.c (reader): Likewise.
2109
2110 * src/getarg.c (getargs): Remove duplicate code for
2111 "Try `bison --help'".
2112
2113 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2114 What was that "2" for?
2115
2116 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2117 * src/getargs.c (usage): Likewise.
2118
2119 * src/getargs.c (getargs): When there are too few operands, report
2120 the last one. When there are too many, report the first extra
2121 one. This is how diffutils does it.
2122
2123 2002-10-20 Paul Eggert <eggert@twinsun.com>
2124
2125 Remove K&R vestiges.
2126 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2127 * src/complain.c (VA_START): Remove. Assume prototypes.
2128 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2129 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2130 fatal): Assume prototypes.
2131 * src/complain.h: Assume prototypes.
2132 * src/system.h (PARAMS): Remove.
2133 Include <limits.h> unconditionally, since it's guaranteeed even
2134 for a freestanding C89 compiler.
2135 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2136 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2137
2138 2002-10-20 Akim Demaille <akim@epita.fr>
2139
2140 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2141 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2142 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2143 (yyresolveStates, yyresolveAction, yyresolveStack)
2144 (yyprocessOneStack): Use them.
2145 (yy_reduce_print): New.
2146 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2147
2148 2002-10-20 Akim Demaille <akim@epita.fr>
2149
2150 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2151 arguments and output `void'.
2152 (b4_c_function): Rename as...
2153 (b4_c_function_def): this.
2154 (b4_c_function_decl, b4_c_ansi_function_def)
2155 (b4_c_ansi_function_decl): New.
2156 Change the interpretation of the arguments: before `int, foo', now
2157 `int foo, foo'.
2158 * data/yacc.c (yyparse): Prototype and define thanks to these.
2159 Adjust b4_c_function_def uses.
2160 * data/glr.c (yyparse): Likewise, but ANSI only.
2161
2162 2002-10-20 Akim Demaille <akim@epita.fr>
2163
2164 * src/output.c (prepare): Move the definition of `tokens_number',
2165 `nterms_number', `undef_token_number', `user_token_number_max'
2166 to...
2167 (prepare_tokens): Here.
2168 (prepare_tokens): Rename as...
2169 (prepare_symbols): this.
2170 (prepare): Move the definition of `rules_number' to...
2171 (prepare_rules): here.
2172 (prepare): Move the definition of `last', `final_state_number',
2173 `states_number' to...
2174 (prepare_states): here.
2175 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2176
2177 2002-10-20 Akim Demaille <akim@epita.fr>
2178
2179 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2180
2181 2002-10-20 Akim Demaille <akim@epita.fr>
2182
2183 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2184 * data/c.m4: here.
2185
2186 2002-10-20 Akim Demaille <akim@epita.fr>
2187
2188 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2189 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2190 `pair'.
2191 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2192 `name' to...
2193 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2194 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2195 These.
2196
2197 2002-10-19 Paul Eggert <eggert@twinsun.com>
2198
2199 Do not create a temporary file, as that involves security and
2200 cleanup headaches. Instead, use a pair of pipes.
2201 Derived from a suggestion by Florian Krohm.
2202 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2203 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2204 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2205 (BISON_PREREQ_SUBPIPE): Add.
2206 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2207 Add subpipe.h, subpipe.c.
2208 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2209 * po/POTFILES.in: Add lib/subpipe.c.
2210 * src/output.c: Include "subpipe.h".
2211 (m4_invoke): Remove decl.
2212 (scan_skel): New decl.
2213 (output_skeleton): Use pipe rather than temporary file for m4 input.
2214 Check that m4sugar.m4 is readable, to avoid deadlock.
2215 Check for pipe I/O error.
2216 * src/scan-skel.l (readpipe): Remove decl.
2217 (scan_skel): New function, to be used in place of m4_invoke.
2218 Read from stream rather than file.
2219
2220 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2221 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2222 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2223 this generates a more-accurate value anyway.
2224
2225 * lib/timevar.c (timervar_accumulate): Rename locals to
2226 avoid confusion with similarly-named more-global.
2227 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2228
2229 * src/output.c (prepare): Use xstrdup to convert char const *
2230 to char *, to avoid GCC warning.
2231
2232 2002-10-19 Akim Demaille <akim@epita.fr>
2233
2234 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2235 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2236 Use them to have `calc.y' ready for %pure-parser.
2237 * data/yacc.c (YYLEX): Pass a yylex return type to
2238 b4_c_function_call.
2239
2240 2002-10-19 Akim Demaille <akim@epita.fr>
2241
2242 Prototype support of %lex-param and %parse-param.
2243
2244 * src/parse-gram.y: Add the definition of the %lex-param and
2245 %parse-param tokens, plus their rules.
2246 Drop the `_' version of %glr-parser.
2247 Add the "," token.
2248 * src/scan-gram.l (INITIAL): Scan them.
2249 * src/muscle_tab.c: Comment changes.
2250 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2251 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2252 (muscle_entry_s): The `value' member is no longer const.
2253 Adjust all dependencies.
2254 * src/muscle_tab.c (muscle_init): Adjust: use
2255 MUSCLE_INSERT_STRING.
2256 Initialize the obstack earlier.
2257 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2258 (muscle_pair_list_grow): New.
2259 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2260 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2261 * tests/calc.at: Use %locations, not --locations.
2262 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2263
2264 2002-10-19 Akim Demaille <akim@epita.fr>
2265
2266 * src/getargs.c (usage): Take status as argument and exit
2267 accordingly.
2268 Report the traditional `Try ... --help' message when status != 0.
2269 (usage, version): Don't take a FILE * as arg, it is pointless.
2270 (getargs): When there is an incorrect number of arguments, make it
2271 an error, and report it GNUlically thanks to `usage ()'.
2272
2273 2002-10-18 Paul Eggert <eggert@twinsun.com>
2274
2275 * data/glr.c (yyreportParseError): Don't assume that sprintf
2276 yields the length of the printed string, as this is not true
2277 on SunOS 4.1.4. Reported by Peter Klein.
2278
2279 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2280 * tests/conflicts.at (%nonassoc and eof): Likewise.
2281 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2282
2283 2002-10-17 Akim Demaille <akim@epita.fr>
2284
2285 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2286 * src/getargs.c (trace_types, trace_args): Adjust.
2287 * src/reader.c (grammar_current_rule_prec_set)
2288 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2289 Standardize error messages.
2290 And s/@prec/%prec/!
2291 (reader): Use trace_flag to enable scanner/parser debugging,
2292 instead of an adhoc scheme.
2293 * src/scan-gram.l: Remove trailing debugging code.
2294
2295 2002-10-16 Paul Eggert <eggert@twinsun.com>
2296
2297 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2298 MUSCLE_TAB_H.
2299
2300 * NEWS: Officially drop support for building Bison with K&R C,
2301 since it didn't work anyway and it's not worth worrying about.
2302 * Makefile.maint (wget_files): Remove ansi2knr.c.
2303 (ansi2knr.c-url_prefix): Remove.
2304 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2305 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2306 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2307
2308 2002-10-15 Paul Eggert <eggert@twinsun.com>
2309
2310 Stop using the "enum_" trick for K&R-style function definitions;
2311 it confused me, and I was the author! Instead, assume that people
2312 who want to use K&R C compilers (when using these modules in GCC,
2313 perhaps?) will run ansi2knr.
2314
2315 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2316 All uses of "enum_" changed to "enum ".
2317 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2318 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2319
2320 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2321 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2322 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2323 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2324 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2325 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2326 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2327 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2328 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2329 Use function prototypes; this removes the need for declaring
2330 static functions simply to provide their prototypes.
2331 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2332 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2333 bitset_count_, bitset_create, bitset_dump, bitset_first,
2334 bitset_free, bitset_init, bitset_last, bitset_next,
2335 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2336 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2337 bitset_print, bitset_release_memory, bitset_toggle_,
2338 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2339 debug_bitset): Likewise.
2340 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2341 * lib/bitset_stats.c (bitset_log_histogram_print,
2342 bitset_percent_histogram_print, bitset_stats_and,
2343 bitset_stats_and_cmp, bitset_stats_and_or,
2344 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2345 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2346 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2347 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2348 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2349 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2350 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2351 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2352 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2353 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2354 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2355 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2356 bitset_stats_zero): Likewise.
2357 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2358 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2359 bitsetv_dump, debug_bitsetv): Likewise.
2360 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2361 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2362 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2363 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2364 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2365 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2366 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2367 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2368 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2369 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2370 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2371 Likewise.
2372 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2373 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2374 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2375 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2376 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2377 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2378 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2379 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2380 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2381 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2382 lbitset_xor_cmp, lbitset_zero): Likewise.
2383
2384 2002-10-14 Akim Demaille <akim@epita.fr>
2385
2386 Version 1.75.
2387
2388 2002-10-14 Akim Demaille <akim@epita.fr>
2389
2390 * tests/Makefile.am (maintainer-check-posix): New.
2391
2392 2002-10-14 Akim Demaille <akim@epita.fr>
2393
2394 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2395 member.
2396
2397 2002-10-14 Akim Demaille <akim@epita.fr>
2398
2399 * src/tables.c (table_ninf_remap): base -> tab.
2400 Reported by Matt Rosing.
2401
2402 2002-10-14 Paul Eggert <eggert@twinsun.com>
2403
2404 * tests/action.at, tests/calc.at, tests/conflicts.at,
2405 tests/cxx-type.at, tests/headers.at, tests/input.at,
2406 tests/regression.at, tests/synclines.at, tests/torture.at:
2407 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2408 so that the tests still work even if POSIXLY_CORRECT is set.
2409 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2410
2411 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2412 for portability to K&R hosts. Fix typo: signed char is guaranteed
2413 only to 127, not to 128.
2414 * data/glr.c (yysigned_char): New type.
2415 * data/yacc.c (yysigned_char): Likewise.
2416 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2417
2418 2002-10-13 Paul Eggert <eggert@twinsun.com>
2419
2420 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2421 true due to limited range of data type" warning from GCC.
2422
2423 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2424 by wrapping enum yytokentype's definition inside #ifndef
2425 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2426
2427 2002-10-13 Akim Demaille <akim@epita.fr>
2428
2429 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2430 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2431
2432 2002-10-13 Akim Demaille <akim@epita.fr>
2433
2434 * Makefile.maint: Update from Autoconf 2.54.
2435 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2436
2437 2002-10-13 Akim Demaille <akim@epita.fr>
2438
2439 * src/print.c (print_state): Separate the list of solved conflicts
2440 from the other items.
2441 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2442
2443 2002-10-13 Akim Demaille <akim@epita.fr>
2444
2445 Let nondeterministic skeletons be usable with deterministic
2446 tables.
2447
2448 With the patch, GAWK compiled by GCC without -O2 passes its test
2449 suite using a GLR parser driven by LALR tables. It fails with -O2
2450 because `struct stat' gives two different answers on my machine:
2451 88 (definition of an auto var) and later 96 (memset on this var).
2452 Hence the stack is badly corrumpted. The headers inclusion is to
2453 blame: if I move the awk.h inclusion before GLR's system header
2454 inclusion, the two struct stat have the same size.
2455
2456 * src/tables.c (pack_table): Always create conflict_table.
2457 (token_actions): Always create conflict_list.
2458 * data/glr.c (YYFLAG): Remove, unused.
2459
2460 2002-10-13 Akim Demaille <akim@epita.fr>
2461
2462 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2463 (O0FLAGS): New.
2464 (VALGRIND, GXX): New.
2465 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2466 * tests/bison.in: Run $PREBISON a pre-command.
2467 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2468 (maintainer-check-g++): New.
2469 * Makefile.am (maintainer-check): New.
2470
2471 2002-10-13 Akim Demaille <akim@epita.fr>
2472
2473 * data/glr.c: Formatting changes.
2474 Tweak some trace messages to match yacc.c's.
2475
2476 2002-10-13 Akim Demaille <akim@epita.fr>
2477
2478 GLR parsers sometimes raise parse errors instead of performing the
2479 default reduction.
2480 Reported by Charles-Henry de Boysson.
2481
2482 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2483 check the length of the traces when %glr.
2484 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2485 GLR's traces.
2486 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2487 Test GLR parsers.
2488 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2489 (yyltype): Remove the yy prefix from the member names.
2490 (yytable): Complete its comment.
2491 (yygetLRActions): Map error action number from YYTABLE from
2492 YYTABLE_NINF to 0.
2493 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2494 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2495 not satisfying as we could compare an YYACTION computed from
2496 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2497 only value for error actions.
2498 (yyreportParseError): In verbose parse error messages, don't issue
2499 `error' in the list of expected tokens.
2500 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2501 next action to perform to match glr.c's decoding.
2502 (yytable): Complete its comment.
2503
2504 2002-10-13 Paul Eggert <eggert@twinsun.com>
2505
2506 Fix problem reported by Henrik Grubbstroem in
2507 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2508 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2509 because the Bison parser reads the second action before reducing
2510 the first one.
2511 * src/scan-gram.l (rule_length): New static var.
2512 Use it to keep track of the rule length in the scanner, since
2513 we can't expect the parser to be in lock-step sync with the scanner.
2514 (handle_action_dollar, handle_action_at): Use this var.
2515 * tests/actions.at (Exotic Dollars): Test for the problem.
2516
2517 2002-10-12 Paul Eggert <eggert@twinsun.com>
2518
2519 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2520 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2521 Include <sys/time.h> when checking for clock_t and struct tms.
2522 Use same include order as source.
2523 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2524 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2525
2526 * lib/timevar.c: Update copyright date and clarify comments.
2527 (get_time) [IN_GCC]: Keep the GCC version for reference.
2528
2529 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2530 GCC version as of today, then merge Bison's changes.
2531 Change "GCC" to "Bison" in copyright notice. timevar.def's
2532 author is Akim, so change that too.
2533
2534 * src/reader.c (grammar_current_rule_check):
2535 Don't worry about the default action if $$ is untyped.
2536 Prevents bogus warnings reported by Jim Gifford in
2537 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2538
2539 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2540 * data/glr.c, data/lalr1.cc, data/yacc.c:
2541 Output token definitions before the first part of user declarations.
2542 Fixes compatibility problem reported by Jim Gifford for kbd in
2543 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2544
2545 2002-10-11 Paul Eggert <eggert@twinsun.com>
2546
2547 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2548 (yyparse): here. This undoes some of the 2002-07-25 change.
2549 Compatibility problem reported by Ralf S. Engelschall with
2550 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2551
2552 2002-10-11 Akim Demaille <akim@epita.fr>
2553
2554 * tests/regression.at Characters Escapes): New.
2555 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2556 characters.
2557 Reported by Jan Nieuwenhuizen.
2558
2559 2002-10-11 Akim Demaille <akim@epita.fr>
2560
2561 * po/id.po: New.
2562
2563 2002-10-10 Paul Eggert <eggert@twinsun.com>
2564
2565 Portability fixes for bitsets; this also avoids several GCC
2566 warnings.
2567
2568 * lib/abitset.c: Include <stddef.h>, for offsetof.
2569 * lib/lbitset.c: Likewise.
2570
2571 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2572 properly for vectors of objects. Do not assume that adding a
2573 header size to a multiple of a word size yields a value that is
2574 properly aligned for the whole union.
2575 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2576
2577 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2578 unique names for structures.
2579 * lib/ebitset.c (ebitset_bytes): Likewise.
2580 * lib/lbitset.c (lbitset_bytes): Likewise.
2581
2582 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2583 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2584 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2585 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2586 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2587 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2588 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2589 to improve the type-checking that GCC can do.
2590 * lib/bitset.c (bitset_op4_cmp): Likewise.
2591 * lib/bitset_stats.c (bitset_stats_count,
2592 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2593 bitset_stats_copy, bitset_stats_disjoint_p,
2594 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2595 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2596 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2597 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2598 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2599 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2600 bitset_stats_or_and_cmp): Likewise.
2601 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2602 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2603 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2604 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2605
2606 * lib/abitset.h: Include bitset.h, not bbitset.h.
2607 * lib/ebitset.h: Likewise.
2608 * lib/lbitset.h: Likewise.
2609
2610 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2611 All instances of parameters of type enum bitset_opts are now of
2612 type enum_bitset_opts, to conform to the C Standard, and similarly
2613 for enum_bitset_type.
2614 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2615 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2616
2617 Do not use "struct bitset_struct" to mean different things in
2618 different modules. Not only is this confusing, it violates
2619 the C Standard, which requires that structure types in different
2620 modules must be compatible if one is to be passed to the other.
2621 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2622 All instances of "struct bitset_struct *" replaced with "bitset".
2623 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2624 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2625 struct lbitset_struct, struct bitset_stats_struct): New types.
2626 All uses of struct bitset_struct changed to union bitset_union,
2627 etc.
2628 * lib/abitset.c (struct abitset_struct, abitset,
2629 struct bitset_struct): Remove.
2630 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2631 struct bitset_struct): Remove.
2632 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2633 bitset_struct): Remove.
2634 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2635 Likewise.
2636
2637 Do not call a function of type T using a call that assumes the
2638 function is of a different type U. Standard C requires that a
2639 function must be called with a type that is compatible with its
2640 definition.
2641 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2642 New decls.
2643 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2644 New functions.
2645 * lib/ebitset.c (PFV): Remove.
2646 * lib/lbitset.c (PFV): Likewise.
2647 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2648 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2649 decls.
2650 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2651 (ebitset_vtable): Use them.
2652 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2653 lbitset_xor): New functions.
2654 (lbitset_vtable): Use them.
2655
2656 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2657 Declare.
2658
2659 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2660 GCC warning.
2661 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2662 Use offsetof, for simplicity.
2663
2664 2002-10-06 Paul Eggert <eggert@twinsun.com>
2665
2666 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2667 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2668 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2669 which was inadvertently undone by the 2002-09-30 patch.
2670 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2671 the same width as int.
2672
2673 2002-10-04 Paul Eggert <eggert@twinsun.com>
2674
2675 Version 1.50.
2676
2677 * configure.ac (AC_INIT), NEWS: Increment version number.
2678
2679 * doc/bison.texinfo: Minor spelling, grammar, and white space
2680 fixes.
2681 (Symbols): Mention that any negative value returned from yylex
2682 signifies end-of-input. Warn about negative chars. Mention
2683 the portable Standard C character set.
2684
2685 The GNU coding standard says CFLAGS and YFLAGS are reserved
2686 for the installer to set.
2687 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2688 * src/Makefile.am (AM_CFLAGS): Likewise.
2689 (AM_YFLAGS): Renamed from YFLAGS.
2690
2691 Fix some MAX and MIN problems.
2692 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2693 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2694 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2695 * src/reader.c (reader): Use it.
2696
2697 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2698 POSIX 1003.1-2001 has removed fgrep.
2699
2700 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2701
2702 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2703 interpreted as signed.
2704 * lib/ebitset.c (ebitset_list): Fix bug.
2705
2706 2002-10-01 Paul Eggert <eggert@twinsun.com>
2707
2708 More fixes for 64-bit hosts and large bitsets.
2709
2710 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2711 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2712 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2713 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2714 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2715 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2716 bitset_count_): Likewise.
2717 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2718 bitset_first, bitset_last): Likewise.
2719 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2720 bitset_stats_list_reverse, bitset_stats_size,
2721 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2722 Likewise.
2723 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2724 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2725 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2726 bitsetv_reflexive_transitive_closure): Likewise.
2727 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2728 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2729 Likewise.
2730 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2731 Likewise.
2732
2733 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2734 Use size_t, not unsigned int, to count bytes.
2735 * lib/abitset.h (abitset_bytes): Likewise.
2736 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2737 Likewise.
2738 * lib/bitset.h (bitset_bytes): Likewise.
2739 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2740 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2741 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2742 * lib/ebitset.c (ebitset_bytes): Likewise.
2743 * lib/ebitset.h (ebitset_bytes): Likewise.
2744 * lib/lbitset.c (lbitset_bytes): Likewise.
2745 * lib/lbitset.h (lbitset_bytes): Likewise.
2746
2747 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2748 abitset_subset_p, abitset_disjoint_p, abitset_and,
2749 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2750 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2751 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2752 abitset_or_and, abitset_or_and_cmp):
2753 Use bitset_windex instead of unsigned int.
2754 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2755 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2756 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2757 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2758 Likewise.
2759 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2760
2761 * lib/bitset.c (bitset_print):
2762 Use proper printf formats for widths of integer types.
2763 * lib/bitset_stats.c (bitset_percent_histogram_print,
2764 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2765 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2766 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2767 * lib/lbitset.c (lbitset_bytes): Likewise.
2768
2769 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2770 BITSET_SIZE_MAX): New macros.
2771 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2772 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2773 to BITSET_WINDEX_MAX.
2774
2775 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2776 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2777 since we now return the bitset_bindex type (not int).
2778
2779 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2780 when computing sizes.
2781 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2782
2783 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2784 and avoid cast to unsigned.
2785
2786 2002-09-30 Akim Demaille <akim@epita.fr>
2787
2788 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2789 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2790 Updates from Michael Hayes.
2791
2792 2002-09-30 Art Haas <ahaas@neosoft.com>
2793
2794 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2795 invocations.
2796 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2797 defined.
2798
2799 2002-09-27 Akim Demaille <akim@epita.fr>
2800
2801 Version 1.49c.
2802
2803 2002-09-27 Akim Demaille <akim@epita.fr>
2804
2805 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2806 (Because of AC_LIBSOURCE).
2807
2808 2002-09-27 Akim Demaille <akim@epita.fr>
2809
2810 Playing with Autoscan.
2811
2812 * configure.ac: Remove the old LIBOBJ tweaks.
2813 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2814 * lib/strrchr.c: New.
2815 * lib/strtol.c: New, from the Coreutils 4.5.1.
2816
2817 2002-09-27 Akim Demaille <akim@epita.fr>
2818
2819 Playing with Autoscan.
2820
2821 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2822 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2823 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2824 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2825 Coreutils 4.5.1.
2826
2827 2002-09-24 Akim Demaille <akim@epita.fr>
2828
2829 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2830 (Frequently Asked Questions, Parser Stack Overflow): New.
2831
2832 2002-09-13 Akim Demaille <akim@epita.fr>
2833
2834 Playing with autoscan.
2835
2836 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2837 * src/files.c (skeleton_find): Remove, unused.
2838 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2839 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2840
2841 2002-09-13 Akim Demaille <akim@epita.fr>
2842
2843 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2844 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2845
2846 2002-09-13 Akim Demaille <akim@epita.fr>
2847
2848 * configure.ac: Require 2.54.
2849 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2850 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2851 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2852 Remove, provided by Autoconf macros.
2853
2854 2002-09-12 Akim Demaille <akim@epita.fr>
2855
2856 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2857
2858 2002-09-12 Akim Demaille <akim@epita.fr>
2859
2860 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2861 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2862 Reported by Martin Mokrejs.
2863
2864 2002-09-10 Akim Demaille <akim@epita.fr>
2865
2866 * src/parse-gram.y: Associate a human readable string to each
2867 token type.
2868 * tests/regression.at (Invalid inputs): Adjust.
2869
2870 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2871
2872 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2873 with an Autoconf-2.5x style configure.ac.
2874
2875 2002-09-06 Paul Eggert <eggert@twinsun.com>
2876
2877 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2878 exception applies only to yacc.c. This is a modification of a
2879 patch originally suggested by Akim Demaille.
2880
2881 2002-09-06 Akim Demaille <akim@epita.fr>
2882
2883 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2884 here to...
2885 * data/yacc.c: here.
2886
2887 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2888 LocationType.
2889 (b4_ltype): Default to yy::Location from location.hh.
2890
2891 2002-09-04 Jim Meyering <jim@meyering.net>
2892
2893 * data/yacc.c: Guard the declaration of yytoknum also with
2894 `#ifdef YYPRINT', so it is declared only when used.
2895
2896 2002-09-04 Akim Demaille <akim@epita.fr>
2897
2898 * configure.in: Rename as...
2899 * configure.ac: this.
2900 Bump to 1.49c.
2901
2902 2002-09-04 Akim Demaille <akim@epita.fr>
2903
2904 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2905 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2906 translate maintainer only messages.
2907
2908 2002-08-12 Paul Eggert <eggert@twinsun.com>
2909
2910 Version 1.49b.
2911
2912 * Makefile.am (SUBDIRS): Remove intl.
2913 (DISTCLEANFILES): Remove.
2914 * NEWS: Mention that GNU M4 is now required. Clarify what is
2915 meant by "larger grammars". Mention the pt_BR translation.
2916 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2917 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2918 Bump version from 0.11.2 to 0.11.5.
2919 (BISON_PREREQ_STAGE): Remove.
2920 (AM_GNU_GETTEXT): Use external gettext.
2921 (AC_OUTPUT): Remove intl/Makefile.
2922
2923 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2924
2925 * data/glr.c: Include string.h, for strlen.
2926 (yyreportParseError): Use size_t for yysize.
2927 (yy_yypstack): No longer nested inside yypstates, as nested
2928 functions are not portable. Do not assume size_t is the
2929 same width as int.
2930 (yypstates): Do not assume that ptrdiff_t is the same width
2931 as int, and similarly for yyposn and YYINDEX.
2932
2933 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2934
2935 * lib/Makefile.am (INCLUDES): Do not include from the intl
2936 directory, which has been removed.
2937 * src/Makefile.am (INCLUDES): Likewise.
2938
2939 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2940 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2941 New vars.
2942
2943 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2944 * tests/Makefile.am (EXTRA_DIST): Likewise.
2945
2946 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2947 Do not assume that bitset_windex is the same width as unsigned.
2948
2949 * lib/abitset.c (abitset_unused_clear): Do not assume that
2950 bitset_word is the same width as int.
2951 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2952 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2953 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2954 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2955 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2956
2957 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2958 portability to one's complement hosts!).
2959 * lib/ebitset.c (ebitset_op1): Likewise.
2960 * lib/lbitset.c (lbitset_op1): Likewise.
2961
2962 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2963 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2964 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2965 Sync with fileutils.
2966 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2967 lib/gettext.h: Sync with diffutils.
2968
2969 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2970 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2971
2972 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2973 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2974 check for void *.
2975
2976 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2977 size_t; the old version tried to do this but casted improperly.
2978 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2979 (bitset_test): Now returns int, not unsigned long.
2980
2981 * lib/bitset_stats.c: Include "gettext.h".
2982 (_): New macro.
2983 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2984 name locals "index", as it generates unnecessary warnings on some
2985 hosts that have an "index" function.
2986
2987 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2988 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2989 they need translation.
2990 * src/LR0.c (state_list_append, new_itemsets, get_state,
2991 append_states, generate_states): Likewise.
2992 * src/assoc.c (assoc_to_string): Likewise.
2993 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2994 * src/gram.c (grammar_dump): Likewise.
2995 * src/injections.c (injections_compute): Likewise.
2996 * src/lalr.c (lookaheads_print): Likewise.
2997 * src/relation.c (relation_transpose): Likewise.
2998 * src/scan-gram.l: Likewise.
2999 * src/tables.c (table_grow, pack_vector): Likewise.
3000
3001 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3002 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3003 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3004 * m4/mbstate_t.m4: Sync with fileutils.
3005 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3006
3007 * po/LINGUAS: Add pt_BR.
3008 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3009 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3010 lib/timevar.c.
3011 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3012 manual recommends.
3013 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3014
3015 * src/complain.c (strerror_r): Remove decl; not needed.
3016 (strerror): Use same pattern as ../lib/error.c.
3017
3018 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3019
3020 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3021
3022 * src/main.c (main): Cast result of bindtextdomain and textdomain
3023 to void, to avoid a GCC warning when --disable-nls is in effect.
3024
3025 * src/scan-gram.l: Use strings rather than escapes when possible,
3026 to minimize the number of warnings from xgettext.
3027 (handle_action_dollar, handle_action_at): Don't use isdigit,
3028 as it mishandles negative chars and it may not work as expected
3029 outside the C locale.
3030
3031 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3032 this is a GCC extension and is not portable to other compilers.
3033
3034 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3035 Do not include <ctype.h>; no longer needed.
3036 Do not include <malloc.h>; no longer needed (and generates
3037 warnings on OpenBSD 3.0).
3038
3039 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3040 it's not portable.
3041
3042 * tests/regression.at: Do not use 'cc -c input.c -o input';
3043 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3044
3045 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3046 exit status as failure, not just exit status 1. Sun C exits
3047 with status 2 sometimes.
3048
3049 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3050 Use it for the two large tests.
3051
3052 2002-08-02 Akim Demaille <akim@epita.fr>
3053
3054 * src/conflicts.c (conflicts_output): Don't output rules never
3055 reduced here, since anyway that computation doesn't work.
3056 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3057 (rule_useless_p, rule_never_reduced_p): New.
3058 (grammar_rules_partial_print): Use a filter instead of a range.
3059 Display the title only if needed.
3060 (grammar_rules_print): Adjust.
3061 (grammar_rules_never_reduced_report): New.
3062 * src/tables.c (action_row): Move the computation of rules never
3063 reduced to...
3064 (token_actions): here.
3065 * src/main.c (main): Make the parser before making the report, so
3066 that rules never reduced are computed.
3067 Call grammar_rules_never_reduced_report.
3068 * src/print.c (print_results): Report rules never reduced.
3069 * tests/conflicts.at, tests/reduce.at: Adjust.
3070
3071 2002-08-01 Akim Demaille <akim@epita.fr>
3072
3073 Instead of attaching lookaheads and duplicating the rules being
3074 reduced by a state, attach the lookaheads to the reductions.
3075
3076 * src/state.h (state_t): Remove the `lookaheads',
3077 `lookaheads_rule' member.
3078 (reductions_t): Add a `lookaheads' member.
3079 Use a regular array for the `rules'.
3080 * src/state.c (reductions_new): Initialize the lookaheads member
3081 to 0.
3082 (state_rule_lookaheads_print): Adjust.
3083 * src/state.h, src/state.c (state_reductions_find): New.
3084 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3085 (count_rr_conflicts): Adjust.
3086 * src/lalr.c (LArule): Remove.
3087 (add_lookback_edge): Adjust.
3088 (state_lookaheads_count): New.
3089 (states_lookaheads_initialize): Merge into...
3090 (initialize_LA): this.
3091 (lalr_free): Adjust.
3092 * src/main.c (main): Don't free nullable and derives too early: it
3093 is used by --verbose.
3094 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3095
3096 2002-08-01 Akim Demaille <akim@epita.fr>
3097
3098 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3099 `rule_number_t**'.
3100 (set_derives, free_derives): Rename as...
3101 (derives_compute, derives_free): this.
3102 Adjust all dependencies.
3103 * src/nullable.c (set_nullable, free_nullable): Rename as...
3104 (nullable_compute, nullable_free): these.
3105 (rule_list_t): Store rule_t *, not rule_number_t.
3106 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3107 pointers, instead of their numbers.
3108 * src/main.c (main): Call nullable_free, and derives_free earlier,
3109 as they were lo longer used.
3110
3111 2002-08-01 Akim Demaille <akim@epita.fr>
3112
3113 * lib/timevar.c (get_time): Include children time.
3114 * src/lalr.h (LA, LArule): Don't export them: used with the
3115 state_t.
3116 * src/lalr.c (LA, LArule): Static.
3117 * src/lalr.h, src/lalr.c (lalr_free): New.
3118 * src/main.c (main): Call it.
3119 * src/tables.c (pack_vector): Check whether loc is >= to the
3120 table_size, not >.
3121 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3122 (tables_generate): do it, since that's also it which allocates
3123 them.
3124 Don't free LA and LArule, main does.
3125
3126 2002-07-31 Akim Demaille <akim@epita.fr>
3127
3128 Separate parser tables computation and output.
3129
3130 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3131 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3132 (yydefgoto, yydefact, high): Move to...
3133 * src/tables.h, src/tables.c: here.
3134 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3135 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3136 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3137 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3138 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3139 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3140 (action_row, save_row, token_actions, save_column, default_goto)
3141 (goto_actions, sort_actions, matching_state, pack_vector)
3142 (table_ninf_remap, pack_table, prepare_actions): Move to...
3143 * src/tables.c: here.
3144 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3145 * src/output.c (token_actions, output_base, output_conflicts)
3146 (output_check): Merge into...
3147 (prepare_actions): this.
3148 (actions_output): Rename as...
3149 (user_actions_output): this.
3150 * src/main.c (main): Call tables_generate and tables_free.
3151
3152 2002-07-31 Akim Demaille <akim@epita.fr>
3153
3154 Steal GCC's --time-report support.
3155
3156 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3157 stolen/adjusted from GCC.
3158 * m4/stage.m4: Remove time related checks.
3159 * m4/timevar.m4: New.
3160 * configure.in: Adjust.
3161 * src/system.h: Adjust to using timevar.h.
3162 * src/getargs.h, src/getargs.c: Support trace_time for
3163 --trace=time.
3164 * src/main.c (stage): Remove.
3165 (main): Replace `stage' invocations with timevar calls.
3166 * src/output.c: Insert pertinent timevar calls.
3167
3168 2002-07-31 Akim Demaille <akim@epita.fr>
3169
3170 Let --trace have arguments.
3171
3172 * src/getargs.h (enum trace_e): New.
3173 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3174 (long_options, short_options): --trace/-T takes an optional
3175 argument.
3176 Change all the uses of trace_flag to reflect the new flags.
3177 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3178
3179 Strengthen `stage' portability.
3180
3181 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3182 * configure.in: Use it.
3183 Don't check for malloc.h and sys/times.h.
3184 * src/system.h: Include them when appropriate.
3185 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3186 times and struct tms are available.
3187
3188 2002-07-30 Akim Demaille <akim@epita.fr>
3189
3190 In verbose parse error message, don't report `error' as an
3191 expected token.
3192 * tests/actions.at (Printers and Destructors): Adjust.
3193 * tests/calc.at (Calculator $1): Adjust.
3194 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3195 error message, do not report the parser accepts the error token in
3196 that state.
3197
3198 2002-07-30 Akim Demaille <akim@epita.fr>
3199
3200 Normalize conflict related messages.
3201
3202 * src/complain.h, src/complain.c (warn, complain): New.
3203 * src/conflicts.c (conflicts_print): Use them.
3204 (conflict_report_yacc): New, extracted from...
3205 (conflicts_print): here.
3206 * tests/conflicts.at, tests/existing.at: Adjust.
3207
3208 2002-07-30 Akim Demaille <akim@epita.fr>
3209
3210 Report rules which are never reduced by the parser: those hidden
3211 by conflicts.
3212
3213 * src/LR0.c (save_reductions): Don't make the final state too
3214 different: save its reduction (accept) instead of having a state
3215 without any action (no shift or goto, no reduce).
3216 Note: the final state is now a ``regular'' state, i.e., the
3217 parsers now contain `reduce 0' as default reduction.
3218 Nevertheless, since they decide to `accept' when yystate =
3219 final_state, they still will not reduce rule 0.
3220 * src/print.c (print_actions, print_reduction): Adjust.
3221 * src/output.c (action_row): Track reduced rules.
3222 (token_actions): Report rules never reduced.
3223 * tests/conflicts.at, tests/regression.at: Adjust.
3224
3225 2002-07-30 Akim Demaille <akim@epita.fr>
3226
3227 `stage' was accidently included in a previous patch.
3228 Initiate its autoconfiscation.
3229
3230 * configure.in: Look for malloc.h and sys/times.h.
3231 * src/main.c (stage): Adjust.
3232 Report only when trace_flag.
3233
3234 2002-07-29 Akim Demaille <akim@epita.fr>
3235
3236 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3237 state_number_t.
3238 (errs_t): symbol_t*, not symbol_number_t.
3239 (reductions_t): rule_t*, not rule_number_t.
3240 (FOR_EACH_SHIFT): New.
3241 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3242 * src/print.c, src/print_graph.c: Adjust.
3243
3244 2002-07-29 Akim Demaille <akim@epita.fr>
3245
3246 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3247
3248 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3249 (endtoken, accept): these.
3250 * src/reader.c (reader): Set endtoken's default tag to "$end".
3251 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3252 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3253 Adjust.
3254
3255 2002-07-29 Akim Demaille <akim@epita.fr>
3256
3257 * src/reduce.c (reduce_grammar): When the language is empty,
3258 complain about the start symbol, not the axiom.
3259 Use its location.
3260 * tests/reduce.at (Empty Language): New.
3261
3262 2002-07-26 Akim Demaille <akim@epita.fr>
3263
3264 * src/reader.h, src/reader.c (gram_error): ... can't get
3265 yycontrol without making too strong assumptions on the parser
3266 itself.
3267 * src/output.c (prepare_tokens): Use the real 0th value of
3268 token_translations instead of `0'.
3269 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3270 visible here.
3271 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3272 for the time being: %locations ought to provide it to yyerror.
3273
3274 2002-07-25 Akim Demaille <akim@epita.fr>
3275
3276 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3277 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3278 * tests/regression.at (Web2c Actions): Adjust.
3279
3280 2002-07-25 Akim Demaille <akim@epita.fr>
3281
3282 Stop storing rules from 1 to nrules + 1.
3283
3284 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3285 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3286 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3287 Iterate from 0 to nrules.
3288 Use rule_number_as_item_number and item_number_as_rule_number.
3289 Adjust to `derive' now containing possibly 0.
3290 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3291 Handle the `- 1' part in rule numbers from/to item numbers.
3292 * src/conflicts.c (log_resolution): Fix the message which reversed
3293 shift and reduce.
3294 * src/output.c (action_row): Initialize default_rule to -1.
3295 (token_actions): Adjust.
3296 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3297 expected output.
3298 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3299
3300 2002-07-25 Akim Demaille <akim@epita.fr>
3301
3302 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3303 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3304 (b4_c_knr_arg_decl): New.
3305 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3306 yyreport_parse_error.
3307
3308 2002-07-25 Akim Demaille <akim@epita.fr>
3309
3310 * data/yacc.c (yyreport_parse_error): New, extracted from...
3311 (yyparse): here.
3312 (yydestruct, yysymprint): Move above yyparse.
3313 Be K&R compliant.
3314
3315 2002-07-25 Akim Demaille <akim@epita.fr>
3316
3317 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3318 replace...
3319 (b4_sint_type, b4_uint_type): these.
3320 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3321 * tests/regression.at (Web2c Actions): Adjust.
3322
3323 2002-07-25 Akim Demaille <akim@epita.fr>
3324
3325 * src/gram.h (TIEM_NUMBER_MAX): New.
3326 (item_number_of_rule_number, rule_number_of_item_number): Rename
3327 as...
3328 (rule_number_as_item_number, item_number_as_rule_number): these.
3329 Adjust dependencies.
3330 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3331 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3332 (symbol_number_to_vector_number): New.
3333 (order): Of vector_number_t* type.
3334 (base_t, BASE_MAX, BASE_MIN): New.
3335 (froms, tos, width, pos, check): Of base_t type.
3336 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3337 (actrow): Of action_number_t type.
3338 (conflrow): Of unsigned int type.
3339 (table_ninf, base_ninf): New.
3340 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3341 (muscle_insert_int_table, muscle_insert_base_table)
3342 (muscle_insert_rule_number_table): New.
3343 (prepare_tokens): Output `toknum' as int_table.
3344 (action_row): Returns a rule_number_t.
3345 Use ACTION_MIN, not SHRT_MIN.
3346 (token_actions): yydefact is rule_number_t*.
3347 (table_ninf_remap): New.
3348 (pack_table): Use it for `base' and `table'.
3349 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3350 replaced with...
3351 (YYPACT_NINF, YYTABLE_NINF): these.
3352 (yypact, yytable): Compute their types instead of hard-coded
3353 `short'.
3354 * tests/regression.at (Web2c Actions): Adjust.
3355
3356 2002-07-19 Akim Demaille <akim@epita.fr>
3357
3358 * src/scan-gram.l (id): Can start with an underscore.
3359
3360 2002-07-16 Akim Demaille <akim@epita.fr>
3361
3362 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3363 Adjust all former `associativity' dependencies.
3364 * src/symtab.c (symbol_new): Default associativity is `undef', not
3365 `right'.
3366 (symbol_check_alias_consistence): Adjust.
3367
3368 2002-07-09 Akim Demaille <akim@epita.fr>
3369
3370 * doc/bison.texinfo: Properly set the ``header'' part.
3371 Use @dircategory ``GNU programming tools'' as per Texinfo's
3372 documentation.
3373 Use @copying.
3374
3375 2002-07-09 Akim Demaille <akim@epita.fr>
3376
3377 * lib/quotearg.h: Protect against multiple inclusions.
3378 * src/location.h (location_t): Add a `file' member.
3379 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3380 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3381 `error_one_per_line' support.
3382
3383 2002-07-09 Akim Demaille <akim@epita.fr>
3384
3385 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3386 * src/reader.c (lineno): Remove.
3387 Adjust all dependencies.
3388 (get_merge_function): Take a location and use complain_at.
3389 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3390 * tests/regression.at (Invalid inputs, Mixing %token styles):
3391 Adjust.
3392
3393 2002-07-09 Akim Demaille <akim@epita.fr>
3394
3395 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3396 recovery rule, and forbid extensions when --yacc.
3397 (gram_error): Use complain_at.
3398 * src/reader.c (reader): Exit if there were parse errors.
3399
3400 2002-07-09 Akim Demaille <akim@epita.fr>
3401
3402 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3403 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3404 Reported by R Blake <blakers@mac.com>.
3405
3406 2002-07-09 Akim Demaille <akim@epita.fr>
3407
3408 * data/yacc.c: Output the copyright notive in the header.
3409
3410 2002-07-03 Akim Demaille <akim@epita.fr>
3411
3412 * src/output.c (froms, tos): Are state_number_t.
3413 (save_column): sp, sp1, and sp2 are state_number_t.
3414 (prepare): Rename `final' as `final_state_number', `nnts' as
3415 `nterms_number', `nrules' as `rules_number', `nstates' as
3416 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3417 unused.
3418 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3419 * data/lalr1.cc (nsym_): Remove, unused.
3420
3421 2002-07-03 Akim Demaille <akim@epita.fr>
3422
3423 * src/lalr.h, src/lalr.c (goto_number_t): New.
3424 * src/lalr.c (goto_list_t): New.
3425 Propagate them.
3426 * src/nullable.c (rule_list_t): New.
3427 Propagate.
3428 * src/types.h: Remove.
3429
3430 2002-07-03 Akim Demaille <akim@epita.fr>
3431
3432 * src/closure.c (print_fderives): Use rule_rhs_print.
3433 * src/derives.c (print_derives): Use rule_rhs_print.
3434 (rule_list_t): New, replaces `shorts'.
3435 (set_derives): Add comments.
3436 * tests/sets.at (Nullable, Firsts): Adjust.
3437
3438 2002-07-03 Akim Demaille <akim@epita.fr>
3439
3440 * src/output.c (prepare_actions): Free `tally' and `width'.
3441 (prepare_actions): Allocate and free `order'.
3442 * src/symtab.c (symbols_free): Free `symbols'.
3443 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3444 * src/output.c (m4_invoke): Move to...
3445 * src/scan-skel.l: here.
3446 (<<EOF>>): Close yyout, and free its name.
3447
3448 2002-07-03 Akim Demaille <akim@epita.fr>
3449
3450 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3451
3452 * src/LR0.c (new_state): Merge into...
3453 (state_list_append): this.
3454 (new_states): Merge into...
3455 (generate_states): here.
3456 (set_states): Don't ensure a proper `errs' state member here, do it...
3457 * src/conflicts.c (conflicts_solve): here.
3458 * src/state.h, src/state.c: Comment changes.
3459 (state_t): Rename member `shifts' as `transitions'.
3460 Adjust all dependencies.
3461 (errs_new): For consistency, also take the values as argument.
3462 (errs_dup): Remove.
3463 (state_errs_set): New.
3464 (state_reductions_set, state_transitions_set): Assert that no
3465 previous value was assigned.
3466 (state_free): New.
3467 (states_free): Use it.
3468 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3469 temporary storage: use `errs' and `nerrs' as elsewhere.
3470 (set_conflicts): Allocate and free this `errs'.
3471
3472 2002-07-02 Akim Demaille <akim@epita.fr>
3473
3474 * lib/libiberty.h: New.
3475 * lib: Update the bitset implementation from upstream.
3476 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3477 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3478 * src/main.c: Adjust bitset stats calls.
3479
3480 2002-07-01 Paul Eggert <eggert@twinsun.com>
3481
3482 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3483 char, so that negative chars don't collide with $.
3484
3485 2002-06-30 Akim Demaille <akim@epita.fr>
3486
3487 Have the GLR tests be `warning' checked, and fix the warnings.
3488
3489 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3490 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3491 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3492 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3493 (yyaddDeferredAction): static.
3494 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3495 (yyreportParseError): yyprefix is const.
3496 yytokenp is used only when verbose.
3497 (yy__GNUC__): Replace with __GNUC__.
3498 (yypdumpstack): yyi is size_t.
3499 (yypreference): Un-yy local variables and arguments, to avoid
3500 clashes with `yyr1'. Anyway, we are not in the user name space.
3501 (yytname_size): be an int, as is compared with ints.
3502 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3503 Use them.
3504 * tests/cxx-gram.at: Use quotation to protect $1.
3505 Use AT_COMPILE to enable warnings hunts.
3506 Prototype yylex and yyerror.
3507 `Use' argc.
3508 Include `string.h', not `strings.h'.
3509 Produce and prototype stmtMerge only when used.
3510 yylex takes a location.
3511
3512 2002-06-30 Akim Demaille <akim@epita.fr>
3513
3514 We spend a lot of time in quotearg, in particular when --verbose.
3515
3516 * src/symtab.c (symbol_get): Store a quoted version of the key.
3517 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3518 Adjust all callers.
3519
3520 2002-06-30 Akim Demaille <akim@epita.fr>
3521
3522 * src/state.h (reductions_t): Rename member `nreds' as num.
3523 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3524 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3525
3526 2002-06-30 Akim Demaille <akim@epita.fr>
3527
3528 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3529 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3530 (shifts_to): Rename as...
3531 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3532 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3533 (TRANSITION_IS_DISABLED, transitions_to): these.
3534
3535 2002-06-30 Akim Demaille <akim@epita.fr>
3536
3537 * src/print.c (print_shifts, print_gotos): Merge into...
3538 (print_transitions): this.
3539 (print_transitions, print_errs, print_reductions): Align the
3540 lookaheads columns.
3541 (print_core, print_transitions, print_errs, print_state,
3542 print_grammar): Output empty lines separator before, not after.
3543 (state_default_rule_compute): Rename as...
3544 (state_default_rule): this.
3545 * tests/conflicts.at (Defaulted Conflicted Reduction),
3546 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3547 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3548
3549 2002-06-30 Akim Demaille <akim@epita.fr>
3550
3551 Display items as we display rules.
3552
3553 * src/gram.h, src/gram.c (rule_lhs_print): New.
3554 * src/gram.c (grammar_rules_partial_print): Use it.
3555 * src/print.c (print_core): Likewise.
3556 * tests/conflicts.at (Defaulted Conflicted Reduction),
3557 (Unresolved SR Conflicts): Adjust.
3558 (Unresolved SR Conflicts): Adjust and rename as...
3559 (Resolved SR Conflicts): this, as was meant.
3560 * tests/regression.at (Web2c Report): Adjust.
3561
3562 2002-06-30 Akim Demaille <akim@epita.fr>
3563
3564 * src/print.c (state_default_rule_compute): New, extracted from...
3565 (print_reductions): here.
3566 Pessimize, but clarify the code.
3567 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3568
3569 2002-06-30 Akim Demaille <akim@epita.fr>
3570
3571 * src/output.c (action_row): Let default_rule be always a rule
3572 number.
3573
3574 2002-06-30 Akim Demaille <akim@epita.fr>
3575
3576 * src/closure.c (print_firsts, print_fderives, closure):
3577 Use BITSET_EXECUTE.
3578 * src/lalr.c (lookaheads_print): Likewise.
3579 * src/state.c (state_rule_lookaheads_print): Likewise.
3580 * src/print_graph.c (print_core): Likewise.
3581 * src/print.c (print_reductions): Likewise.
3582 * src/output.c (action_row): Likewise.
3583 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3584
3585 2002-06-30 Akim Demaille <akim@epita.fr>
3586
3587 * src/print_graph.c: Use report_flag.
3588
3589 2002-06-30 Akim Demaille <akim@epita.fr>
3590
3591 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3592 to...
3593 * src/relation.h, src/relation.c (traverse, relation_digraph)
3594 (relation_print, relation_transpose): New.
3595
3596 2002-06-30 Akim Demaille <akim@epita.fr>
3597
3598 * src/state.h, src/state.c (shifts_to): New.
3599 * src/lalr.c (build_relations): Use it.
3600
3601 2002-06-30 Akim Demaille <akim@epita.fr>
3602
3603 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3604 (item_number_of_rule_number, rule_number_of_item_number): New.
3605 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3606 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3607 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3608 Propagate their use.
3609 Much remains to be done, in particular wrt `shorts' from types.h.
3610
3611 2002-06-30 Akim Demaille <akim@epita.fr>
3612
3613 * src/symtab.c (symbol_new): Initialize the `printer' member.
3614
3615 2002-06-30 Akim Demaille <akim@epita.fr>
3616
3617 * src/LR0.c (save_reductions): Remove, replaced by...
3618 * src/state.h, src/state.c (state_reductions_set): New.
3619 (reductions, errs): Rename as...
3620 (reductions_t, errs_t): these.
3621 Adjust all dependencies.
3622
3623 2002-06-30 Akim Demaille <akim@epita.fr>
3624
3625 * src/LR0.c (state_list_t, state_list_append): New.
3626 (first_state, last_state): Now symbol_list_t.
3627 (this_state): Remove.
3628 (new_itemsets, append_states, save_reductions): Take a state_t as
3629 argument.
3630 (set_states, generate_states): Adjust.
3631 (save_shifts): Remove, replaced by...
3632 * src/state.h, src/state.c (state_shifts_set): New.
3633 (shifts): Rename as...
3634 (shifts_t): this.
3635 Adjust all dependencies.
3636 * src/state.h (state_t): Remove the `next' member.
3637
3638 2002-06-30 Akim Demaille <akim@epita.fr>
3639
3640 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3641 escaped in slot 0.
3642
3643 2002-06-30 Akim Demaille <akim@epita.fr>
3644
3645 Use hash.h for the state hash table.
3646
3647 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3648 (allocate_storage): Use state_hash_new.
3649 (free_storage): Use state_hash_free.
3650 (new_state, get_state): Adjust.
3651 * src/lalr.h, src/lalr.c (states): Move to...
3652 * src/states.h (state_t): Remove the `link' member, no longer
3653 used.
3654 * src/states.h, src/states.c: here.
3655 (state_hash_new, state_hash_free, state_hash_lookup)
3656 (state_hash_insert, states_free): New.
3657 * src/states.c (state_table, state_compare, state_hash): New.
3658 * src/output.c (output_actions): Do not free states now, since we
3659 still need to know the final_state number in `prepare', called
3660 afterwards. Do it...
3661 * src/main.c (main): here: call states_free after `output'.
3662
3663 2002-06-30 Akim Demaille <akim@epita.fr>
3664
3665 * src/state.h, src/state.c (state_new): New, extracted from...
3666 * src/LR0.c (new_state): here.
3667 * src/state.h (STATE_ALLOC): Move to...
3668 * src/state.c: here.
3669 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3670 * src/state.h, src/state.c: here.
3671
3672 2002-06-30 Akim Demaille <akim@epita.fr>
3673
3674 * src/reader.c (gensym): Rename as...
3675 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3676 (getsym): Rename as...
3677 (symbol_get): this.
3678
3679 2002-06-30 Akim Demaille <akim@epita.fr>
3680
3681 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3682 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3683 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3684 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3685
3686 2002-06-30 Akim Demaille <akim@epita.fr>
3687
3688 Make the test suite pass with warnings checked.
3689
3690 * tests/actions.at (Printers and Destructors): Improve.
3691 Avoid unsigned vs. signed issues.
3692 * tests/calc.at: Don't exercise the scanner here, do it...
3693 * tests/input.at (Torturing the Scanner): here.
3694
3695 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3696
3697 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3698 reorganize first lines parallel to yacc.c.
3699
3700 2002-06-28 Akim Demaille <akim@epita.fr>
3701
3702 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3703 (b4_token_enum, b4_token_defines): New, factored from...
3704 * data/lalr1.cc, data/yacc.c, glr.c: here.
3705
3706 2002-06-28 Akim Demaille <akim@epita.fr>
3707
3708 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3709 unused variables.
3710 * src/output.c (merger_output): static.
3711
3712 2002-06-28 Akim Demaille <akim@epita.fr>
3713
3714 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3715 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3716 pacify GCC.
3717 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3718
3719 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3720
3721 Accumulated changelog for new GLR parsing features.
3722
3723 * src/conflicts.c (count_total_conflicts): Change name to
3724 conflicts_total_count.
3725 * src/conflicts.h: Ditto.
3726 * src/output.c (token_actions): Use the new name.
3727 (output_conflicts): Change conflp => conflict_list_heads, and
3728 confl => conflict_list for better readability.
3729 * data/glr.c: Use the new names.
3730 * NEWS: Add self to GLR announcement.
3731
3732 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3733
3734 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3735 Akim Demaille.
3736
3737 * data/bison.glr: Change name to glr.c
3738 * data/glr.c: Renamed from bison.glr.
3739 * data/Makefile.am: Add glr.c
3740
3741 * src/getargs.c:
3742
3743 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3744 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3745
3746 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3747
3748 * data/bison.glr: Be sure to restore the
3749 current #line when returning to the skeleton contents after having
3750 exposed the input file's #line.
3751
3752 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3753
3754 * data/bison.glr: Bring up to date with changes to bison.simple.
3755
3756 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3757
3758 * data/bison.glr: Correct definitions that use b4_prefix.
3759 Various reformatting.
3760 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3761 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3762 yytokenp argument; now part of stack.
3763 (yychar): Define to behave as documented.
3764 (yyclearin): Ditto.
3765
3766 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3767
3768 * src/reader.h: Add declaration for free_merger_functions.
3769
3770 * src/reader.c (merge_functions): New variable.
3771 (get_merge_function): New function.
3772 (free_merger_functions): New function.
3773 (readgram): Check for %prec that is not followed by a symbol.
3774 Handle %dprec and %merge declarations.
3775 (packgram): Initialize dprec and merger fields in rules array.
3776
3777 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3778 conflict_list_cnt, conflict_list_free): New variables.
3779 (table_grow): Also grow conflict_table.
3780 (prepare_rules): Output dprec and merger tables.
3781 (conflict_row): New function.
3782 (action_row): Output conflict lists for GLR parser. Don't use
3783 default reduction in conflicted states for GLR parser so that there
3784 are spaces for the conflict lists.
3785 (save_row): Also save conflict information.
3786 (token_actions): Allocate conflict list.
3787 (merger_output): New function.
3788 (pack_vector): Pack conflict table, too.
3789 (output_conflicts): New function to output yyconflp and yyconfl.
3790 (output_check): Allocate conflict_tos.
3791 (output_actions): Output conflict tables, also.
3792 (output_skeleton): Output b4_mergers definition.
3793 (prepare): Output b4_max_rhs_length definition.
3794 Use 'bison.glr' as default skeleton for GLR parsers.
3795
3796 * src/gram.c (glr_parser): New flag.
3797 (grammar_free): Call free_merger_functions.
3798
3799 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3800 all pairs of conflicting reductions, rather than just all tokens
3801 causing conflicts. Needed to size conflict tables.
3802 (conflicts_output): Modify call to count_rr_conflicts for new
3803 interface.
3804 (conflicts_print): Ditto.
3805 (count_total_conflicts): New function.
3806
3807 * src/reader.h (merger_list): New type.
3808 (merge_functions): New variable.
3809
3810 * src/lex.h (tok_dprec, tok_merge): New token types.
3811
3812 * src/gram.h (rule_s): Add dprec and merger fields.
3813 (glr_parser): New flag.
3814
3815 * src/conflicts.h (count_total_conflicts): New function.
3816
3817 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3818
3819 * doc/bison.texinfo (Generalized LR Parsing): New section.
3820 (GLR Parsers): New section.
3821 (Language and Grammar): Mention GLR parsing.
3822 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3823 Correct typo ("tge" -> "the").
3824
3825 * data/bison.glr: New skeleton for GLR parsing.
3826
3827 * tests/cxx-gram.at: New tests for GLR parsing.
3828
3829 * tests/testsuite.at: Include cxx-gram.at.
3830
3831 * tests/Makefile.am: Add cxx-gram.at.
3832
3833 * src/parse-gram.y:
3834
3835 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3836
3837 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3838
3839 2002-06-27 Akim Demaille <akim@epita.fr>
3840
3841 * src/options.h, src/options.c: Remove.
3842 * src/getargs.c (short_options, long_options): New.
3843
3844 2002-06-27 Akim Demaille <akim@epita.fr>
3845
3846 * data/bison.simple, data/bison.c++: Rename as...
3847 * data/yacc.c, data/lalr1.cc: these.
3848 * doc/bison.texinfo (Environment Variables): Remove.
3849
3850 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3851
3852 * src/getargs.c (report_argmatch): Initialize strtok().
3853
3854 2002-06-20 Akim Demaille <akim@epita.fr>
3855
3856 * data/bison.simple (b4_symbol_actions): New, replaces...
3857 (b4_symbol_destructor, b4_symbol_printer): these.
3858 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3859 user token numbers.
3860
3861 2002-06-20 Akim Demaille <akim@epita.fr>
3862
3863 * data/bison.simple (yydestructor): Rename as...
3864 (yydestruct): this.
3865
3866 2002-06-20 Akim Demaille <akim@epita.fr>
3867
3868 * src/symtab.h, src/symtab.c (symbol_type_set)
3869 (symbol_destructor_set, symbol_precedence_set): The location is
3870 the last argument.
3871 Adjust all callers.
3872
3873 2002-06-20 Akim Demaille <akim@epita.fr>
3874
3875 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3876 internals.
3877 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3878 Takes a location.
3879 * src/symtab.h, src/symtab.c (symbol_class_set)
3880 (symbol_user_token_number_set): Likewise.
3881 Adjust all callers.
3882 Promote complain_at.
3883 * tests/input.at (Type Clashes): Adjust.
3884
3885 2002-06-20 Akim Demaille <akim@epita.fr>
3886
3887 * data/bison.simple (YYLEX): Fix the declaration when
3888 %pure-parser.
3889
3890 2002-06-20 Akim Demaille <akim@epita.fr>
3891
3892 * data/bison.simple (yysymprint): Don't print the token number,
3893 just its name.
3894 * tests/actions.at (Destructors): Rename as...
3895 (Printers and Destructors): this.
3896 Also exercise %printer.
3897
3898 2002-06-20 Akim Demaille <akim@epita.fr>
3899
3900 * data/bison.simple (YYDSYMPRINT): New.
3901 Use it to remove many of the #if YYDEBUG/if (yydebug).
3902
3903 2002-06-20 Akim Demaille <akim@epita.fr>
3904
3905 * src/symtab.h, src/symtab.c (symbol_t): printer and
3906 printer_location are new members.
3907 (symbol_printer_set): New.
3908 * src/parse-gram.y (PERCENT_PRINTER): New token.
3909 Handle its associated rule.
3910 * src/scan-gram.l: Adjust.
3911 (handle_destructor_at, handle_destructor_dollar): Rename as...
3912 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3913 * src/output.c (symbol_printers_output): New.
3914 (output_skeleton): Call it.
3915 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3916 since there are already many grammar files with a user `yyprint'.
3917 Replace the calls to YYPRINT to calls to yysymprint.
3918 * tests/calc.at: Adjust.
3919 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3920 taking advantage of parser very internal details (stack size!).
3921
3922 2002-06-20 Akim Demaille <akim@epita.fr>
3923
3924 * src/scan-gram.l: Complete the scanner with the missing patterns
3925 to pacify Flex.
3926 Use `quote' and `symbol_tag_get' where appropriate.
3927
3928 2002-06-19 Akim Demaille <akim@epita.fr>
3929
3930 * tests/actions.at (Destructors): Augment to test locations.
3931 * data/bison.simple (yydestructor): Pass it the current location
3932 if locations are enabled.
3933 Prototype only when __STDC__ or C++.
3934 Change the argument names to move into the yy name space: there is
3935 user code here.
3936
3937 2002-06-19 Akim Demaille <akim@epita.fr>
3938
3939 * data/bison.simple (b4_pure_if): New.
3940 Use it instead of #ifdef YYPURE.
3941
3942 2002-06-19 Akim Demaille <akim@epita.fr>
3943
3944 * data/bison.simple (b4_location_if): New.
3945 Use it instead of #ifdef YYLSP_NEEDED.
3946
3947 2002-06-19 Akim Demaille <akim@epita.fr>
3948
3949 Prepare @$ in %destructor, but currently don't bind it in the
3950 skeleton, as %location use is not cleaned up yet.
3951
3952 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3953 (handle_action_at): New.
3954 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3955 a braced_code_t and a location as additional arguments.
3956 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3957 unquote one when outputting `b4_dollar_dollar'.
3958 Adjust callers.
3959 * data/bison.simple (b4_eval): Remove.
3960 (b4_symbol_destructor): Adjust.
3961 * tests/input.at (Invalid @n): Adjust.
3962
3963 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3964
3965 * doc/bison.texinfo: Document ability to have multiple
3966 prologue sections.
3967
3968 2002-06-18 Akim Demaille <akim@epita.fr>
3969
3970 * src/files.c (compute_base_names): When computing the output file
3971 names from the input file name, strip the directory part.
3972
3973 2002-06-18 Akim Demaille <akim@epita.fr>
3974
3975 * data/bison.simple.new: Comment changes.
3976 Reported by Andreas Schwab.
3977
3978 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3979
3980 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3981 there are no `label `yyoverflowlab' defined but not used' warnings
3982 when yyoverflow is defined.
3983
3984 2002-06-18 Akim Demaille <akim@epita.fr>
3985
3986 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3987 new member.
3988 (symbol_destructor_set): Adjust.
3989 * src/output.c (symbol_destructors_output): Output the destructor
3990 locations.
3991 Output the symbol name.
3992 * data/bison.simple (b4_symbol_destructor): Adjust.
3993
3994 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3995 and Akim Demaille <akim@epita.fr>
3996
3997 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3998 what's left on the stack when the error recovery hits EOF.
3999 * tests/actions.at (Destructors): Complete to exercise this case.
4000
4001 2002-06-17 Akim Demaille <akim@epita.fr>
4002
4003 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4004 arguments is really empty, not only equal to `[]'.
4005 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4006 member.
4007 (symbol_destructor_set): New.
4008 * src/output.c (symbol_destructors_output): New.
4009 * src/reader.h (brace_code_t, current_braced_code): New.
4010 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4011 (handle_dollar): Rename as...
4012 (handle_action_dollar): this.
4013 (handle_destructor_dollar): New.
4014 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4015 (grammar_declaration): Use it.
4016 * data/bison.simple (yystos): Is always defined.
4017 (yydestructor): New.
4018 * tests/actions.at (Destructors): New.
4019 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4020
4021 2002-06-17 Akim Demaille <akim@epita.fr>
4022
4023 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4024 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4025 rule_length only when needed.
4026 * src/output.c (actions_output, token_definitions_output): Output
4027 the full M4 block.
4028 * src/symtab.c: Don't access directly to the symbol tag, use
4029 symbol_tag_get.
4030 * src/parse-gram.y: Use symbol_list_free.
4031
4032 2002-06-17 Akim Demaille <akim@epita.fr>
4033
4034 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4035 (symbol_list_prepend, get_type_name): Move to...
4036 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4037 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4038 Adjust all callers.
4039 (symbol_list_free): New.
4040 * src/scan-gram.l (handle_dollar): Takes a location.
4041 * tests/input.at (Invalid $n): Adjust.
4042
4043 2002-06-17 Akim Demaille <akim@epita.fr>
4044
4045 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4046 (symbol_list_prepend): New.
4047 * src/parse-gram.y (%union): `list' is a new member.
4048 (symbols.1): New, replaces...
4049 (terms_to_prec.1, nterms_to_type.1): these.
4050 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4051 Take a location as additional argument.
4052 Adjust all callers.
4053
4054 2002-06-15 Akim Demaille <akim@epita.fr>
4055
4056 * src/parse-gram.y: Move %token in the declaration section so that
4057 we don't depend upon CVS Bison.
4058
4059 2002-06-15 Akim Demaille <akim@epita.fr>
4060
4061 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4062 * src/print.c (print_core): Use it.
4063
4064 2002-06-15 Akim Demaille <akim@epita.fr>
4065
4066 * src/conflicts.c (log_resolution): Accept the rule involved in
4067 the sr conflicts instead of the lookahead number that points to
4068 that rule.
4069 (flush_reduce): Accept the current lookahead vector as argument,
4070 instead of the index in LA.
4071 (resolve_sr_conflict): Accept the current number of lookahead
4072 bitset to consider for the STATE, instead of the index in LA.
4073 (set_conflicts): Adjust.
4074 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4075
4076 2002-06-15 Akim Demaille <akim@epita.fr>
4077
4078 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4079 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4080 Adjust all dependencies.
4081 * src/lalr.c (initialize_lookaheads): Split into...
4082 (states_lookaheads_count, states_lookaheads_initialize): these.
4083 (lalr): Adjust.
4084
4085 2002-06-15 Akim Demaille <akim@epita.fr>
4086
4087 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4088 out of...
4089 (grammar_rules_print): here.
4090 * src/reduce.c (reduce_output): Use it.
4091 * tests/reduce.at (Useless Rules, Reduced Automaton)
4092 (Underivable Rules): Adjust.
4093
4094 2002-06-15 Akim Demaille <akim@epita.fr>
4095
4096 Copy BYacc's nice way to report the grammar.
4097
4098 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4099 New.
4100 Don't print the rules' location, it is confusing and useless.
4101 (rule_print): Use grammar_rhs_print.
4102 * src/print.c (print_grammar): Use grammar_rules_print.
4103
4104 2002-06-15 Akim Demaille <akim@epita.fr>
4105
4106 Complete and rationalize `useless thing' warnings.
4107
4108 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4109 (symbol_tag_print): New.
4110 Use them everywhere in place of accessing directly the tag member.
4111 * src/gram.h, src/gram.c (rule_print): New.
4112 Use it where a rule used to be printed `by hand'.
4113 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4114 (reduce_grammar_tables): Report the useless rules.
4115 (reduce_print): Useless things are a warning, not an error.
4116 Report it as such.
4117 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4118 (Reduced Automaton, Underivable Rules): Adjust.
4119 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4120 * tests/conflicts.at (Unresolved SR Conflicts)
4121 (Solved SR Conflicts): Adjust.
4122
4123 2002-06-15 Akim Demaille <akim@epita.fr>
4124
4125 Let symbols have a location.
4126
4127 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4128 (getsym): Adjust.
4129 Adjust all callers.
4130 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4131 Use location_t, not int.
4132 * src/symtab.c (symbol_check_defined): Take advantage of the
4133 location.
4134 * tests/regression.at (Invalid inputs): Adjust.
4135
4136 2002-06-15 Akim Demaille <akim@epita.fr>
4137
4138 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4139 (input): Don't try to initialize yylloc here, do it in the
4140 scanner.
4141 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4142 * src/gram.h (rule_t): Change line and action_line into location
4143 and action_location, of location_t type.
4144 Adjust all dependencies.
4145 * src/location.h, src/location.c (empty_location): New.
4146 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4147 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4148 (grammar_current_rule_symbol_append)
4149 (grammar_current_rule_action_append): Expect a location as argument.
4150 * src/reader.c (grammar_midrule_action): Adjust to attach an
4151 action's location as dummy symbol location.
4152 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4153 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4154 the line numbers.
4155
4156 2002-06-14 Akim Demaille <akim@epita.fr>
4157
4158 Grammar declarations may be found in the grammar section.
4159
4160 * src/parse-gram.y (rules_or_grammar_declaration): New.
4161 (declarations): Each declaration may end with a semicolon, not
4162 just...
4163 (grammar_declaration): `"%union"'.
4164 (grammar): Branch to rules_or_grammar_declaration.
4165
4166 2002-06-14 Akim Demaille <akim@epita.fr>
4167
4168 * src/main.c (main): Invoke scanner_free.
4169
4170 2002-06-14 Akim Demaille <akim@epita.fr>
4171
4172 * src/output.c (m4_invoke): Extracted from...
4173 (output_skeleton): here.
4174 Free tempfile.
4175
4176 2002-06-14 Akim Demaille <akim@epita.fr>
4177
4178 * src/parse-gram.y (directives, directive, gram)
4179 (grammar_directives, precedence_directives, precedence_directive):
4180 Rename as...
4181 (declarations, declaration, grammar, grammar_declaration)
4182 (precedence_declaration, precedence_declarator): these.
4183 (symbol_declaration): New.
4184
4185 2002-06-14 Akim Demaille <akim@epita.fr>
4186
4187 * src/files.c (action_obstack): Remove, unused.
4188 (output_obstack): Remove it, and all its dependencies, as it is no
4189 longer needed.
4190 * src/reader.c (epilogue_set): Build the epilogue in the
4191 muscle_obstack.
4192 * src/output.h, src/output.c (muscle_obstack): Move to...
4193 * src/muscle_tab.h, src/muscle_tab.h: here.
4194 (muscle_init): Initialize muscle_obstack.
4195 (muscle_free): New.
4196 * src/main.c (main): Call it.
4197
4198 2002-06-14 Akim Demaille <akim@epita.fr>
4199
4200 * src/location.h: New, extracted from...
4201 * src/reader.h: here.
4202 * src/Makefile.am (noinst_HEADERS): Merge into
4203 (bison_SOURCES): this.
4204 Add location.h.
4205 * src/parse-gram.y: Use location_t instead of Bison's.
4206 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4207 Use location_t instead of ints.
4208
4209 2002-06-14 Akim Demaille <akim@epita.fr>
4210
4211 * data/bison.simple, data/bison.c++: Be sure to restore the
4212 current #line when returning to the skeleton contents after having
4213 exposed the input file's #line.
4214
4215 2002-06-12 Akim Demaille <akim@epita.fr>
4216
4217 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4218 eager.
4219 * tests/actions.at (Exotic Dollars): New.
4220
4221 2002-06-12 Akim Demaille <akim@epita.fr>
4222
4223 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4224 ['"/] too eagerly.
4225 * tests/input.at (Torturing the Scanner): New.
4226
4227 2002-06-11 Akim Demaille <akim@epita.fr>
4228
4229 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4230 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4231 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4232 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4233 * src/reader.c (reader): Use it.
4234
4235 2002-06-11 Akim Demaille <akim@epita.fr>
4236
4237 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4238 Adjust all callers.
4239 (scanner_last_string_free): New.
4240
4241 2002-06-11 Akim Demaille <akim@epita.fr>
4242
4243 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4244 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4245 (last_string, YY_OBS_FREE): New.
4246 Use them when returning an ID.
4247
4248 2002-06-11 Akim Demaille <akim@epita.fr>
4249
4250 Have Bison grammars parsed by a Bison grammar.
4251
4252 * src/reader.c, src/reader.h (prologue_augment): New.
4253 * src/reader.c (copy_definition): Remove.
4254
4255 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4256 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4257 (grammar_current_rule_prec_set, grammar_current_rule_check)
4258 (grammar_current_rule_symbol_append)
4259 (grammar_current_rule_action_append): Export.
4260 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4261 (symbol_list_action_append): Remove.
4262 Hook the routines from reader.
4263 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4264 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4265
4266 * src/reader.c (read_declarations): Remove, unused.
4267
4268 * src/parse-gram.y: Handle the epilogue.
4269 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4270 (grammar_start_symbol_set): this.
4271 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4272 * src/reader.c (readgram): Remove, unused.
4273 (reader): Adjust to insert eoftoken and axiom where appropriate.
4274
4275 * src/reader.c (copy_dollar): Replace with...
4276 * src/scan-gram.h (handle_dollar): this.
4277 * src/parse-gram.y: Remove `%thong'.
4278
4279 * src/reader.c (copy_at): Replace with...
4280 * src/scan-gram.h (handle_at): this.
4281
4282 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4283 New.
4284
4285 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4286 time being.
4287
4288 * src/reader.h, src/reader.c (grammar_rule_end): New.
4289
4290 * src/parse.y (current_type, current_class): New.
4291 Implement `%nterm', `%token' support.
4292 Merge `%term' into `%token'.
4293 (string_as_id): New.
4294 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4295 type name.
4296
4297 * src/parse-gram.y: Be sure to handle properly the beginning of
4298 rules.
4299
4300 * src/parse-gram.y: Handle %type.
4301 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4302
4303 * src/parse-gram.y: More directives support.
4304 * src/options.c: No longer handle source directives.
4305
4306 * src/parse-gram.y: Fix %output.
4307
4308 * src/parse-gram.y: Handle %union.
4309 Use the prologue locations.
4310 * src/reader.c (parse_union_decl): Remove.
4311
4312 * src/reader.h, src/reader.c (epilogue_set): New.
4313 * src/parse-gram.y: Use it.
4314
4315 * data/bison.simple, data/bison.c++: b4_stype is now either not
4316 defined, then default to int, or to the contents of %union,
4317 without `union' itself.
4318 Adjust.
4319 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4320
4321 * src/output.c (actions_output): Don't output braces, as they are
4322 already handled by the scanner.
4323
4324 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4325 characters to themselves.
4326
4327 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4328 that the epilogue has a proper #line.
4329
4330 * src/parse-gram.y: Handle precedence/associativity.
4331
4332 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4333 a terminal.
4334 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4335 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4336 at all to define terminals that cannot be emitted.
4337
4338 * src/scan-gram.l: Escape M4 characters.
4339
4340 * src/scan-gram.l: Working properly with escapes in user
4341 strings/characters.
4342
4343 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4344 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4345 grammar.
4346 Use more modest sizes, as for the time being the parser does not
4347 release memory, and therefore the process swallows a huge amount
4348 of memory.
4349
4350 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4351 stricter %token grammar.
4352
4353 * src/symtab.h (associativity): Add `undef_assoc'.
4354 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4355 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4356
4357 * tests/regression.at (Invalid %directive): Remove, as it is now
4358 meaningless.
4359 (Invalid inputs): Adjust to the new error messages.
4360 (Token definitions): The new grammar doesn't allow too many
4361 eccentricities.
4362
4363 * src/lex.h, src/lex.c: Remove.
4364 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4365 (copy_character, copy_string2, copy_string, copy_identifier)
4366 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4367 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4368 (parse_action): Remove.
4369 * po/POTFILES.in: Adjust.
4370
4371 2002-06-11 Akim Demaille <akim@epita.fr>
4372
4373 * src/reader.c (parse_action): Don't store directly into the
4374 rule's action member: return the action as a string.
4375 Don't require `rule_length' as an argument: compute it.
4376 (grammar_current_rule_symbol_append)
4377 (grammar_current_rule_action_append): New, eved out from
4378 (readgram): here.
4379 Remove `action_flag', `rulelength', unused now.
4380
4381 2002-06-11 Akim Demaille <akim@epita.fr>
4382
4383 * src/reader.c (grammar_current_rule_prec_set).
4384 (grammar_current_rule_check): New, eved out from...
4385 (readgram): here.
4386 Remove `xaction', `first_rhs': useless.
4387 * tests/input.at (Type clashes): New.
4388 * tests/existing.at (GNU Cim Grammar): Adjust.
4389
4390 2002-06-11 Akim Demaille <akim@epita.fr>
4391
4392 * src/reader.c (grammar_midrule_action): New, Eved out from
4393 (readgram): here.
4394
4395 2002-06-11 Akim Demaille <akim@epita.fr>
4396
4397 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4398 New.
4399 (readgram): Use them as replacement of inlined code, crule and
4400 crule1.
4401
4402 2002-06-11 Akim Demaille <akim@epita.fr>
4403
4404 * src/reader.c (grammar_end, grammar_symbol_append): New.
4405 (readgram): Use them.
4406 Make the use of `p' as local as possible.
4407
4408 2002-06-10 Akim Demaille <akim@epita.fr>
4409
4410 GCJ's parser requires the tokens to be defined before the prologue.
4411
4412 * data/bison.simple: Output the token definition before the user's
4413 prologue.
4414 * tests/regression.at (Braces parsing, Duplicate string)
4415 (Mixing %token styles): Check the output from bison.
4416 (Early token definitions): New.
4417
4418 2002-06-10 Akim Demaille <akim@epita.fr>
4419
4420 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4421 assigning twice the same user number to a token, so that we can
4422 use it in...
4423 * src/lex.c (lex): here.
4424 Also use `symbol_class_set' instead of hand written code.
4425 * src/reader.c (parse_assoc_decl): Likewise.
4426
4427 2002-06-10 Akim Demaille <akim@epita.fr>
4428
4429 * src/symtab.c, src/symtab.c (symbol_class_set)
4430 (symbol_user_token_number_set): New.
4431 * src/reader.c (parse_token_decl): Use them.
4432 Use a switch instead of ifs.
4433 Use a single argument.
4434
4435 2002-06-10 Akim Demaille <akim@epita.fr>
4436
4437 Remove `%thong' support as it is undocumented, unused, duplicates
4438 `%token's job, and creates useless e-mail traffic with people who
4439 want to know what it is, why it is undocumented, unused, and
4440 duplicates `%token's job.
4441
4442 * src/reader.c (parse_thong_decl): Remove.
4443 * src/options.c (option_table): Remove "thong".
4444 * src/lex.h (tok_thong): Remove.
4445
4446 2002-06-10 Akim Demaille <akim@epita.fr>
4447
4448 * src/symtab.c, src/symtab.c (symbol_type_set)
4449 (symbol_precedence_set): New.
4450 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4451 (value_components_used): Remove, unused.
4452
4453 2002-06-09 Akim Demaille <akim@epita.fr>
4454
4455 Move symbols handling code out of the reader.
4456
4457 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4458 (axiom): Move to...
4459 * src/symtab.h, src/symtab.c: here.
4460
4461 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4462 * src/reader.c (startval): Rename as...
4463 * src/symtab.h, src/symtab.c (startsymbol): this.
4464 * src/reader.c: Adjust.
4465
4466 * src/reader.c (symbol_check_defined, symbol_make_alias)
4467 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4468 (token_translations_init)
4469 Move to...
4470 * src/symtab.c: here.
4471 * src/reader.c (packsymbols): Move to...
4472 * src/symtab.h, src/symtab.c (symbols_pack): here.
4473 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4474 argument.
4475
4476 2002-06-03 Akim Demaille <akim@epita.fr>
4477
4478 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4479 then statements.
4480
4481 2002-06-03 Akim Demaille <akim@epita.fr>
4482
4483 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4484 structs with non literals.
4485 * src/scan-skel.l: never-interactive.
4486 * src/conflicts.c (enum conflict_resolution_e): No trailing
4487 comma.
4488 * src/getargs.c (usage): Split long literal strings.
4489 Reported by Hans Aberg.
4490
4491 2002-05-28 Akim Demaille <akim@epita.fr>
4492
4493 * data/bison.c++: Use C++ ostreams.
4494 (cdebug_): New member.
4495
4496 2002-05-28 Akim Demaille <akim@epita.fr>
4497
4498 * src/output.c (output_skeleton): Be sure to allocate enough room
4499 for `/' _and_ for `\0' in full_skeleton.
4500
4501 2002-05-28 Akim Demaille <akim@epita.fr>
4502
4503 * data/bison.c++: Catch up with bison.simple:
4504 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4505 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4506 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4507 and popping traces.
4508
4509 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4510
4511 * src/output.c (output_skeleton): Put an explicit path in front of
4512 the skeleton file name, rather than relying on the -I directory,
4513 to partially alleviate effects of having a skeleton file lying around
4514 in the current directory.
4515
4516 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4517
4518 * src/conflicts.c (log_resolution): Correct typo:
4519 obstack_printf should be obstack_fgrow1.
4520
4521 2002-05-26 Akim Demaille <akim@epita.fr>
4522
4523 * src/state.h (state_t): `solved_conflicts' is a new member.
4524 * src/LR0.c (new_state): Set it to 0.
4525 * src/conflicts.h, src/conflicts.c (print_conflicts)
4526 (free_conflicts, solve_conflicts): Rename as...
4527 (conflicts_print, conflicts_free, conflicts_solve): these.
4528 Adjust callers.
4529 * src/conflicts.c (enum conflict_resolution_e)
4530 (solved_conflicts_obstack): New, used by...
4531 (log_resolution): this.
4532 Adjust to attach the conflict resolution to each state.
4533 Complete the description with the precedence/associativity
4534 information.
4535 (resolve_sr_conflict): Adjust.
4536 * src/print.c (print_state): Output its solved_conflicts.
4537 * tests/conflicts.at (Unresolved SR Conflicts)
4538 (Solved SR Conflicts): Exercise --report=all.
4539
4540 2002-05-26 Akim Demaille <akim@epita.fr>
4541
4542 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4543 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4544 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4545 (token_number_t, item_number_as_token_number)
4546 (token_number_as_item_number, muscle_insert_token_number_table):
4547 Rename as...
4548 (symbol_number_t, item_number_as_symbol_number)
4549 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4550 these, since it is more appropriate.
4551
4552 2002-05-26 Akim Demaille <akim@epita.fr>
4553
4554 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4555 `Error:' lines.
4556 * data/bison.simple (yystos) [YYDEBUG]: New.
4557 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4558 error recovery.
4559 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4560
4561 2002-05-25 Akim Demaille <akim@epita.fr>
4562
4563 * doc/bison.texinfo (Debugging): Split into...
4564 (Tracing): this new section, its former contents, and...
4565 (Understanding): this new section.
4566 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4567 by...
4568 (report_flag): this.
4569 Adjust all dependencies.
4570 (report_args, report_types, report_argmatch): New.
4571 (usage, getargs): Report/support -r, --report.
4572 * src/options.h
4573 (struct option_table_struct): Rename as..,
4574 (struct option_table_s): this.
4575 Rename the `set_flag' member to `flag' to match with getopt_long's
4576 struct.
4577 * src/options.c (option_table): Split verbose into an entry for
4578 %verbose, and another for --verbose.
4579 Support --report/-r, so remove -r from the obsolete --raw.
4580 * src/print.c: Attach full item sets and lookaheads reports to
4581 report_flag instead of trace_flag.
4582 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4583
4584 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4585 and Paul Eggert <eggert@twinsun.com>
4586
4587 * data/bison.simple (yyparse): Correct error handling to conform to
4588 POSIX and yacc. Specifically, after syntax error is discovered,
4589 do not reduce further before shifting the error token.
4590 Clean up the code a bit by removing the labels yyerrdefault,
4591 yyerrhandle, yyerrpop.
4592 * NEWS: Document the above.
4593
4594 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4595
4596 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4597 type; it isn't always big enough, since it doesn't necessarily
4598 include non-terminals.
4599 (yytranslate): Expand definition of yy_token_number_type, so that
4600 the latter can be removed.
4601 (yy_token_number_type): Remove, only one use.
4602 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4603 don't use TokenNumberType as element type.
4604
4605 * tests/regression.at: Modify expected output to agree with change
4606 to yyr1 and yytranslate.
4607
4608 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4609
4610 * src/reader.c (parse_action): Use copy_character instead of
4611 obstack_1grow.
4612
4613 2002-05-13 Akim Demaille <akim@epita.fr>
4614
4615 * tests/regression.at (Token definitions): Prototype yylex and
4616 yyerror.
4617
4618 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4619
4620 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4621 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4622 32-bit arithmetic.
4623 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4624
4625 2002-05-07 Akim Demaille <akim@epita.fr>
4626
4627 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4628 avoid GCC warnings.
4629
4630 2002-05-07 Akim Demaille <akim@epita.fr>
4631
4632 Kill GCC warnings.
4633
4634 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4635 over the RHS of each rule.
4636 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4637 * src/state.h (state_t): Member `nitems' is unsigned short.
4638 * src/LR0.c (get_state): Adjust.
4639 * src/reader.c (packgram): Likewise.
4640 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4641 `Type'.
4642 (muscle_insert_int_table): Remove, unused.
4643 (prepare_rules): Remove `max'.
4644
4645 2002-05-06 Akim Demaille <akim@epita.fr>
4646
4647 * src/closure.c (print_firsts): Display of the symbol tags.
4648 (bitmatrix_print): Move to...
4649 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4650 here.
4651 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4652
4653 2002-05-06 Akim Demaille <akim@epita.fr>
4654
4655 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4656 hash_do_for_each.
4657
4658 2002-05-06 Akim Demaille <akim@epita.fr>
4659
4660 * src/LR0.c (new_state, get_state): Instead of using the global
4661 `kernel_size' and `kernel_base', have two new arguments:
4662 `core_size' and `core'.
4663 Adjust callers.
4664
4665 2002-05-06 Akim Demaille <akim@epita.fr>
4666
4667 * src/reader.c (packgram): No longer end `ritem' with a 0
4668 sentinel: it is not used.
4669
4670 2002-05-05 Akim Demaille <akim@epita.fr>
4671
4672 New experimental feature: display the lookaheads in the report and
4673 graph.
4674
4675 * src/print (print_core): When --trace-flag, display the rules
4676 lookaheads.
4677 * src/print_graph.c (print_core): Likewise.
4678 Swap the arguments.
4679 Adjust caller.
4680
4681 2002-05-05 Akim Demaille <akim@epita.fr>
4682
4683 * tests/torture.at (Many lookaheads): New test.
4684
4685 2002-05-05 Akim Demaille <akim@epita.fr>
4686
4687 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4688 (GENERATE_MUSCLE_INSERT_TABLE): this.
4689 (output_int_table, output_unsigned_int_table, output_short_table)
4690 (output_token_number_table, output_item_number_table): Replace with...
4691 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4692 (muscle_insert_short_table, muscle_insert_token_number_table)
4693 (muscle_insert_item_number_table): these.
4694 Adjust all callers.
4695 (prepare_tokens): Don't free `translations', since...
4696 * src/reader.h, src/reader.c (grammar_free): do it.
4697 Move to...
4698 * src/gram.h, src/gram.c (grammar_free): here.
4699 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4700 b4_translate_max.
4701
4702 2002-05-05 Akim Demaille <akim@epita.fr>
4703
4704 * src/output.c (output_unsigned_int_table): New.
4705 (prepare_rules): `i' is unsigned.
4706 `prhs', `rline', `r2' are unsigned int.
4707 Rename muscle `rhs_number_max' as `rhs_max'.
4708 Output muscles `prhs_max', `rline_max', and `r2_max'.
4709 Free rline and r1.
4710 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4711 to compute types instead of constant types.
4712 * tests/regression.at (Web2c Actions): Adjust.
4713
4714 2002-05-04 Akim Demaille <akim@epita.fr>
4715
4716 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4717 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4718 Adjust dependencies.
4719 * src/output.c (token_definitions_output): Be sure not to output a
4720 `#define 'a'' when fed with `%token 'a' "a"'.
4721 * tests/regression.at (Token definitions): New.
4722
4723 2002-05-03 Paul Eggert <eggert@twinsun.com>
4724
4725 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4726 for K&R C.
4727
4728 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4729
4730 * Makefile.am (SUBDIRS): Remove intl.
4731 (EXTRA_DIST): Add config/config.rpath.
4732
4733 2002-05-03 Akim Demaille <akim@epita.fr>
4734
4735 * data/bison.simple (m4_if): Don't output empty enums.
4736 And actually, output valid enum definitions :(.
4737
4738 2002-05-03 Akim Demaille <akim@epita.fr>
4739
4740 * configure.bat: Remove, completely obsolete.
4741 * Makefile.am (EXTRA_DIST): Adjust.
4742 Don't distribute config.rpath...
4743 * config/Makefile.am (EXTRA_DIST): Do it.
4744
4745 2002-05-03 Akim Demaille <akim@epita.fr>
4746
4747 * configure.in (GETTEXT_VERSION): New.
4748 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4749
4750 2002-05-03 Akim Demaille <akim@epita.fr>
4751
4752 * data/bison.simple (b4_token_enum): New.
4753 (b4_token_defines): Use it to output tokens both as #define and
4754 enums.
4755 Suggested by Paul Eggert.
4756 * src/output.c (token_definitions_output): Don't output spurious
4757 white spaces.
4758
4759 2002-05-03 Akim Demaille <akim@epita.fr>
4760
4761 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4762
4763 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4764
4765 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4766 Update the stack class, give a try to deque as the default container.
4767
4768 2002-05-02 Akim Demaille <akim@epita.fr>
4769
4770 * data/bison.simple (yyparse): Do not implement @$ = @1.
4771 (YYLLOC_DEFAULT): Adjust to do it.
4772 * doc/bison.texinfo (Location Default Action): Fix.
4773
4774 2002-05-02 Akim Demaille <akim@epita.fr>
4775
4776 * src/reader.c (parse_braces): Merge into...
4777 (parse_action): this.
4778
4779 2002-05-02 Akim Demaille <akim@epita.fr>
4780
4781 * configure.in (ALL_LINGUAS): Remove.
4782 * po/LINGUAS, hr.po: New.
4783
4784 2002-05-02 Akim Demaille <akim@epita.fr>
4785
4786 Remove the so called hairy (semantic) parsers.
4787
4788 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4789 * src/gram.h, src/gram.c (semantic_parser): Remove.
4790 (rule_t): Remove the guard and guard_line members.
4791 * src/lex.h (token_t): remove tok_guard.
4792 * src/options.c (option_table): Remove %guard and %semantic_parser
4793 support.
4794 * src/output.c, src/output.h (guards_output): Remove.
4795 (prepare): Adjust.
4796 (token_definitions_output): Don't output the `T'
4797 tokens (???).
4798 (output_skeleton): Don't output the guards.
4799 * src/files.c, src/files.c (attrsfile): Remove.
4800 * src/reader.c (symbol_list): Remove the guard and guard_line
4801 members.
4802 Adjust dependencies.
4803 (parse_guard): Remove.
4804 * data/bison.hairy: Remove.
4805 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4806 BISON_HAIRY.
4807
4808 2002-05-02 Akim Demaille <akim@epita.fr>
4809
4810 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4811 (parse_guard): Rename the formal argument `stack_offset' as
4812 `rule_length', which is more readable.
4813 Adjust callers.
4814 (copy_at, copy_dollar): Instead of outputting the hard coded
4815 values of $$, $n and so forth, output invocation to b4_lhs_value,
4816 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4817 Note: this patch partially drops `semantic-parser' support: it
4818 always does `rule_length - n', where semantic parsers ought to
4819 always use `-n'.
4820 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4821 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4822
4823 2002-05-02 Akim Demaille <akim@epita.fr>
4824
4825 * configure.in (AC_INIT): Bump to 1.49b.
4826 (AM_INIT_AUTOMAKE): Short invocation.
4827
4828 2002-05-02 Akim Demaille <akim@epita.fr>
4829
4830 Version 1.49a.
4831
4832 2002-05-01 Akim Demaille <akim@epita.fr>
4833
4834 * src/skeleton.h: Remove.
4835
4836 2002-05-01 Akim Demaille <akim@epita.fr>
4837
4838 * src/skeleton.h: Fix the #endif.
4839 Reported by Magnus Fromreide.
4840
4841 2002-04-26 Paul Eggert <eggert@twinsun.com>
4842
4843 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4844 Define if we define YYSTYPE and YYLTYPE, respectively.
4845 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4846
4847 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4848
4849 * src/scan-skel.l: Postprocess quadrigraphs.
4850
4851 * src/reader.c (copy_character): New function, used to output
4852 single characters while replacing `[' and `]' with quadrigraphs, to
4853 avoid troubles with M4 quotes.
4854 (copy_comment): Output characters with copy_character.
4855 (read_additionnal_code): Likewise.
4856 (copy_string2): Likewise.
4857 (copy_definition): Likewise.
4858
4859 * tests/calc.at: Exercise M4 quoting.
4860
4861 2002-04-25 Akim Demaille <akim@epita.fr>
4862
4863 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4864 between `!' and the command.
4865 Reported by Paul Eggert.
4866
4867 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4868
4869 * tests/calc.at: Exercise prologue splitting.
4870
4871 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4872 `b4_post_prologue' instead of `b4_prologue'.
4873
4874 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4875 muscles.
4876 (output): Free pre_prologue_obstack and post_prologue_obstack.
4877 * src/files.h, src/files.c (attrs_obstack): Remove.
4878 (pre_prologue_obstack, post_prologue_obstack): New.
4879 * src/reader.c (copy_definition): Add a parameter to specify the
4880 obstack to fill, instead of using attrs_obstack unconditionally.
4881 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4882 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4883
4884 2002-04-23 Paul Eggert <eggert@twinsun.com>
4885
4886 * data/bison.simple: Remove unnecessary commentary and white
4887 space differences from 1_29-branch.
4888 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4889
4890 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4891 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4892 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4893 constructors or destructors.
4894
4895 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4896
4897 2002-04-23 Akim Demaille <akim@epita.fr>
4898
4899 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4900 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4901 location with columns.
4902 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4903 All reported by Paul Eggert.
4904
4905 2002-04-22 Akim Demaille <akim@epita.fr>
4906
4907 * src/reduce.c (dump_grammar): Move to...
4908 * src/gram.h, src/gram.c (grammar_dump): here.
4909 Be sure to separate long item numbers.
4910 Don't read the members of a rule's prec if its nil.
4911
4912 2002-04-22 Akim Demaille <akim@epita.fr>
4913
4914 * src/output.c (table_size, table_grow): New.
4915 (MAXTABLE): Remove, replace uses with table_size.
4916 (pack_vector): Instead of dying when the table is too big, grow it.
4917
4918 2002-04-22 Akim Demaille <akim@epita.fr>
4919
4920 * data/bison.simple (yyr1): Its type is that of a token number.
4921 * data/bison.c++ (r1_): Likewise.
4922 * tests/regression.at (Web2c Actions): Adjust.
4923
4924 2002-04-22 Akim Demaille <akim@epita.fr>
4925
4926 * src/reader.c (token_translations_init): 256 is now the default
4927 value for the error token, i.e., it will be assigned another
4928 number if the user assigned 256 to one of her tokens.
4929 (reader): Don't force 256 to error.
4930 * doc/bison.texinfo (Symbols): Adjust.
4931 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4932 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4933 etc. instead of 10, 20, 30 (which was used to `jump' over error
4934 (256) and undefined (2)).
4935
4936 2002-04-22 Akim Demaille <akim@epita.fr>
4937
4938 Propagate more token_number_t.
4939
4940 * src/gram.h (token_number_as_item_number)
4941 (item_number_as_token_number): New.
4942 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4943 Use it to create output_item_number_table and
4944 output_token_number_table.
4945 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4946 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4947 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4948 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4949
4950 2002-04-22 Akim Demaille <akim@epita.fr>
4951
4952 * src/output.h, src/output.c (get_lines_number): Remove.
4953
4954 2002-04-19 Akim Demaille <akim@epita.fr>
4955
4956 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4957 as Lex/Flex'.
4958 (Debugging): More details about enabling the debugging features.
4959 (Table of Symbols): Describe $$, $n, @$, and @n.
4960 Suggested by Tim Josling.
4961
4962 2002-04-19 Akim Demaille <akim@epita.fr>
4963
4964 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4965
4966 2002-04-10 Akim Demaille <akim@epita.fr>
4967
4968 * src/system.h: Rely on HAVE_LIMITS_H.
4969 Suggested by Paul Eggert.
4970
4971 2002-04-09 Akim Demaille <akim@epita.fr>
4972
4973 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4974 full stderr, and strip it according to the bison options, instead
4975 of composing the error message from different bits.
4976 This makes it easier to check for several error messages.
4977 Adjust all the invocations.
4978 Add an invocation exercising the error token.
4979 Add an invocation demonstrating a stupid error message.
4980 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4981 Adjust the tests.
4982 Error message are for stderr, not stdout.
4983
4984 2002-04-09 Akim Demaille <akim@epita.fr>
4985
4986 * src/gram.h, src/gram.c (error_token_number): Remove, use
4987 errtoken->number.
4988 * src/reader.c (reader): Don't specify the user token number (2)
4989 for $undefined, as it uselessly prevents using it.
4990 * src/gram.h (token_number_t): Move to...
4991 * src/symtab.h: here.
4992 (state_t.number): Is a token_number_t.
4993 * src/print.c, src/reader.c: Use undeftoken->number instead of
4994 hard coded 2.
4995 (Even though this 2 is not the same as above: the number of the
4996 undeftoken remains being 2, it is its user token number which
4997 might not be 2).
4998 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4999 `user_token_number_max'.
5000 Output `undef_token_number'.
5001 * data/bison.simple, data/bison.c++: Use them.
5002 Be sure to map invalid yylex return values to
5003 `undef_token_number'. This saves us from gratuitous SEGV.
5004
5005 * tests/conflicts.at (Solved SR Conflicts)
5006 (Unresolved SR Conflicts): Adjust.
5007 * tests/regression.at (Web2c Actions): Adjust.
5008
5009 2002-04-08 Akim Demaille <akim@epita.fr>
5010
5011 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5012 Adding #line.
5013 Remove the duplicate `typedefs'.
5014 (RhsNumberType): Fix the declaration and various other typos.
5015 Use __ofile__.
5016 * data/bison.simple: Use __ofile__.
5017 * src/scan-skel.l: Handle __ofile__.
5018
5019 2002-04-08 Akim Demaille <akim@epita.fr>
5020
5021 * src/gram.h (item_number_t): New, the type of item numbers in
5022 RITEM. Note that it must be able to code symbol numbers as
5023 positive number, and the negation of rule numbers as negative
5024 numbers.
5025 Adjust all dependencies (pretty many).
5026 * src/reduce.c (rule): Remove this `short *' pointer: use
5027 item_number_t.
5028 * src/system.h (MINSHORT, MAXSHORT): Remove.
5029 Include `limits.h'.
5030 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5031 (shortcpy): Remove.
5032 (MAXTABLE): Move to...
5033 * src/output.c (MAXTABLE): here.
5034 (prepare_rules): Use output_int_table to output rhs.
5035 * data/bison.simple, data/bison.c++: Adjust.
5036 * tests/torture.at (Big triangle): Move the limit from 254 to
5037 500.
5038 * tests/regression.at (Web2c Actions): Ajust.
5039
5040 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5041 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5042 passes, but produces negative #line number, once fixed, GCC is
5043 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5044 C), it passes.
5045 * src/state.h (state_h): Code input lines on ints, not shorts.
5046
5047 2002-04-08 Akim Demaille <akim@epita.fr>
5048
5049 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5050 and then the grammar.
5051
5052 2002-04-08 Akim Demaille <akim@epita.fr>
5053
5054 * src/system.h: No longer using strndup.
5055
5056 2002-04-07 Akim Demaille <akim@epita.fr>
5057
5058 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5059 * src/output.c (output_table_data): Return the longest number.
5060 (prepare_tokens): Output `token_number_max').
5061 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5062 New.
5063 Use them to define yy_token_number_type/TokenNumberType.
5064 Use this type for yytranslate.
5065 * tests/torture.at (Big triangle): Push the limit from 124 to
5066 253.
5067 * tests/regression.at (Web2c Actions): Adjust.
5068
5069 2002-04-07 Akim Demaille <akim@epita.fr>
5070
5071 * tests/torture.at (Big triangle): New.
5072 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5073 * tests/existing.at: here.
5074
5075 2002-04-07 Akim Demaille <akim@epita.fr>
5076
5077 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5078 nritems.
5079 Adjust dependencies.
5080
5081 2002-04-07 Akim Demaille <akim@epita.fr>
5082
5083 * src/reader.c: Normalize increments to prefix form.
5084
5085 2002-04-07 Akim Demaille <akim@epita.fr>
5086
5087 * src/reader.c, symtab.c: Remove debugging code.
5088
5089 2002-04-07 Akim Demaille <akim@epita.fr>
5090
5091 Rename all the `bucket's as `symbol_t'.
5092
5093 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5094 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5095 * src/symtab.c, src/symtab.h (bucket): Rename as...
5096 (symbol_t): this.
5097 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5098 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5099 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5100 (buckets_new, buckets_free, buckets_do): Rename as...
5101 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5102 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5103 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5104 (symbols_new, symbols_free, symbols_do): these.
5105
5106 2002-04-07 Akim Demaille <akim@epita.fr>
5107
5108 Use lib/hash for the symbol table.
5109
5110 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5111 EOF.
5112 * src/lex.c (lex): Set the `number' member of new terminals.
5113 * src/reader.c (bucket_check_defined, bucket_make_alias)
5114 (bucket_check_alias_consistence, bucket_translation): New.
5115 (reader, grammar_free, readgram, token_translations_init)
5116 (packsymbols): Adjust.
5117 (reader): Number the predefined tokens.
5118 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5119 for predefined tokens.
5120 * src/symtab.h (bucket): Remove all the hash table related
5121 members.
5122 * src/symtab.c (symtab): Replace by...
5123 (bucket_table): this.
5124 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5125 (buckets_new, buckets_do): New.
5126
5127 2002-04-07 Akim Demaille <akim@epita.fr>
5128
5129 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5130 (start_symbol, max_user_token_number, semantic_parser)
5131 (error_token_number): Initialize.
5132 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5133 Initialize.
5134 (reader): Don't.
5135 (errtoken, eoftoken, undeftoken, axiom): Extern.
5136
5137 2002-04-07 Akim Demaille <akim@epita.fr>
5138
5139 * src/gram.h (rule_s): prec and precsym are now pointers
5140 to the bucket giving the priority/associativity.
5141 Member `associativity' removed: useless.
5142 * src/reduce.c, src/conflicts.c: Adjust.
5143
5144 2002-04-07 Akim Demaille <akim@epita.fr>
5145
5146 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5147 Properly escape the symbols' TAG when outputting them.
5148
5149 2002-04-07 Akim Demaille <akim@epita.fr>
5150
5151 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5152
5153 2002-04-07 Akim Demaille <akim@epita.fr>
5154
5155 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5156 (LArule): this, which is an array to rule_t*.
5157 * src/print.c, src/conflicts.c: Adjust.
5158
5159 2002-04-07 Akim Demaille <akim@epita.fr>
5160
5161 * src/gram.h (rule_t): Rename `number' as `user_number'.
5162 `number' is a new member.
5163 Adjust dependencies.
5164 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5165
5166 2002-04-07 Akim Demaille <akim@epita.fr>
5167
5168 As a result of the previous patch, it is no longer needed
5169 to reorder ritem itself.
5170
5171 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5172
5173 2002-04-07 Akim Demaille <akim@epita.fr>
5174
5175 Be sure never to walk through RITEMS, but use only data related to
5176 the rules themselves. RITEMS should be banished.
5177
5178 * src/output.c (output_token_translations): Rename as...
5179 (prepare_tokens): this.
5180 In addition to `translate', prepare the muscles `tname' and
5181 `toknum', which were handled by...
5182 (output_rule_data): this.
5183 Remove, and move the remainder of its outputs into...
5184 (prepare_rules): this new routines, which also merges content from
5185 (output_gram): this.
5186 (prepare_rules): Be sure never to walk through RITEMS.
5187 (output_stos): Rename as...
5188 (prepare_stos): this.
5189 (output): Always invoke prepare_states, after all, just don't use it
5190 in the output if you don't need it.
5191
5192 2002-04-07 Akim Demaille <akim@epita.fr>
5193
5194 * src/LR0.c (new_state): Display `nstates' as the name of the
5195 newly created state.
5196 Adjust to initialize first_state and last_state if needed.
5197 Be sure to distinguish the initial from the final state.
5198 (new_states): Create the itemset of the initial state, and use
5199 new_state.
5200 * src/closure.c (closure): Now that the initial state has its
5201 items properly set, there is no need for a special case when
5202 creating `ruleset'.
5203
5204 As a result, now the rule 0, reducing to $axiom, is visible in the
5205 outputs. Adjust the test suite.
5206
5207 * tests/conflicts.at (Solved SR Conflicts)
5208 (Unresolved SR Conflicts): Adjust.
5209 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5210 * tests/conflicts.at (S/R in initial): New.
5211
5212 2002-04-07 Akim Demaille <akim@epita.fr>
5213
5214 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5215 the RHS of the rules.
5216 * src/output.c (output_gram): Likewise.
5217
5218 2002-04-07 Akim Demaille <akim@epita.fr>
5219
5220 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5221 bucket.
5222 Adjust all dependencies.
5223 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5224 `number' of the buckets too.
5225 * src/gram.h: Include `symtab.h'.
5226 (associativity): Move to...
5227 * src/symtab.h: here.
5228 No longer include `gram.h'.
5229
5230 2002-04-07 Akim Demaille <akim@epita.fr>
5231
5232 * src/gram.h, src/gram.c (rules_rhs_length): New.
5233 (ritem_longest_rhs): Use it.
5234 * src/gram.h (rule_t): `number' is a new member.
5235 * src/reader.c (packgram): Set it.
5236 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5237 the end of `rules', and count them out of `nrules'.
5238 (reduce_output, dump_grammar): Adjust.
5239 * src/print.c (print_grammar): It is no longer needed to check for
5240 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5241 * tests/reduce.at (Reduced Automaton): New test.
5242
5243 2002-04-07 Akim Demaille <akim@epita.fr>
5244
5245 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5246 lacking `+ 1' to nrules, Bison reported as useless a token if it
5247 was used solely to set the precedence of the last rule...
5248
5249 2002-04-07 Akim Demaille <akim@epita.fr>
5250
5251 * data/bison.c++, data/bison.simple: Don't output the current file
5252 name in #line, to avoid useless diffs between two identical
5253 outputs under different names.
5254
5255 2002-04-07 Akim Demaille <akim@epita.fr>
5256
5257 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5258 Normalize loops to using `< nrules + 1', not `<= nrules'.
5259
5260 2002-04-07 Akim Demaille <akim@epita.fr>
5261
5262 * TODO: Update.
5263
5264 2002-04-07 Akim Demaille <akim@epita.fr>
5265
5266 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5267 bucket.value as bucket.number.
5268
5269 2002-04-07 Akim Demaille <akim@epita.fr>
5270
5271 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5272 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5273 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5274 RHS, instead of being an index in RITEMS.
5275
5276 2002-04-04 Paul Eggert <eggert@twinsun.com>
5277
5278 * doc/bison.texinfo: Update copyright date.
5279 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5280 (Symbols): Warn about running Bison in one character set,
5281 but compiling and/or running in an incompatible one.
5282 Warn about character code 256, too.
5283
5284 2002-04-03 Paul Eggert <eggert@twinsun.com>
5285
5286 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5287 YYERROR_VERBOSE is nonzero, not whether it is defined.
5288
5289 Merge changes from bison-1_29-branch.
5290
5291 2002-03-20 Paul Eggert <eggert@twinsun.com>
5292
5293 Merge fixes from Debian bison_1.34-1.diff.
5294
5295 * configure.in (AC_PREREQ): 2.53.
5296
5297 2002-03-20 Akim Demaille <akim@epita.fr>
5298
5299 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5300
5301 2002-03-19 Paul Eggert <eggert@twinsun.com>
5302
5303 * src/bison.simple (YYCOPY): New macro.
5304 (YYSTACK_RELOCATE): Use it.
5305 Remove Type arg; no longer needed. All callers changed.
5306 (yymemcpy): Remove; no longer needed.
5307
5308 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5309 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5310
5311 2002-03-19 Akim Demaille <akim@epita.fr>
5312
5313 Test and fix the #line outputs.
5314
5315 * tests/atlocal.at (GCC): New.
5316 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5317 (Prologue synch line, ,%union synch line, Postprologue synch line)
5318 (Action synch line, Epilogue synch line): New tests.
5319 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5320 * data/bison.simple, data/bison.c++: Use it.
5321
5322 2002-03-19 Akim Demaille <akim@epita.fr>
5323
5324 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5325 (Solved SR Conflicts, %expect not enough, %expect right)
5326 (%expect too much): Move to...
5327 * tests/conflicts.at: this new file.
5328
5329 2002-03-19 Akim Demaille <akim@epita.fr>
5330
5331 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5332 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5333 that we can move to enums for instance.
5334 * src/output.c (token_definitions_output): Output a list of
5335 `token-name, token-number' instead of the #define.
5336 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5337
5338 2002-03-14 Akim Demaille <akim@epita.fr>
5339
5340 Use Gettext 0.11.1.
5341
5342 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5343
5344 * data/bison.c++: Make the user able to add members to the generated
5345 parser by subclassing.
5346
5347 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5348
5349 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5350 a character.
5351 Reported by Nicolas Tisserand and Nicolas Burrus.
5352
5353 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5354
5355 * src/reader.c: Warn about lacking semi-colons, do not complain.
5356
5357 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5358
5359 * data/bison.c++: Remove a debug line.
5360
5361 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5362
5363 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5364 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5365 provide a default implementation.
5366
5367 2002-03-04 Akim Demaille <akim@epita.fr>
5368
5369 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5370 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5371 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5372 * tests/semantic.at (Parsing Guards): Similarly.
5373 * src/reader.at (readgram): Complain if the last rule is not ended
5374 with a semi-colon.
5375
5376 2002-03-04 Akim Demaille <akim@epita.fr>
5377
5378 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5379 * src/closure.c: here.
5380 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5381 RTC.
5382 * src/warshall.h, src/warshall.c: Remove.
5383 * tests/sets.at (Broken Closure): Adjust.
5384
5385 2002-03-04 Akim Demaille <akim@epita.fr>
5386
5387 * src/output.c (output_skeleton): tempdir is const.
5388 bytes_read is unused.
5389
5390 2002-03-04 Akim Demaille <akim@epita.fr>
5391
5392 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5393 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5394 Update.
5395 From Michael Hayes.
5396
5397 2002-03-04 Akim Demaille <akim@epita.fr>
5398
5399 * src/closure.c (closure): `r' is unused.
5400
5401 2002-03-04 Akim Demaille <akim@epita.fr>
5402
5403 * tests/sets.at (Broken Closure): Add the ending `;'.
5404 * src/reader.at (readgram): Complain if a rule is not ended with a
5405 semi-colon.
5406
5407 2002-03-04 Akim Demaille <akim@epita.fr>
5408
5409 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5410 (count_sr_conflicts): Use bitset_count.
5411 * src/reduce.c (inaccessable_symbols): Ditto.
5412 (bits_size): Remove.
5413 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5414
5415 2002-03-04 Akim Demaille <akim@epita.fr>
5416
5417 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5418 * src/reduce.c: Remove the `bitset_zero's following the
5419 `bitset_create's, as now it is performed by the latter.
5420
5421 2002-03-04 Akim Demaille <akim@epita.fr>
5422
5423 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5424 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5425 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5426 latest sources from Michael.
5427
5428 2002-03-04 Akim Demaille <akim@epita.fr>
5429
5430 * src/output.c (output): Don't free the grammar.
5431 * src/reader.c (grammar_free): New.
5432 * src/main.c (main): Call it and don't free symtab here.
5433
5434 2002-03-04 Akim Demaille <akim@epita.fr>
5435
5436 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5437 before returning.
5438 Reported by Benoit Perrot.
5439
5440 2002-03-04 Akim Demaille <akim@epita.fr>
5441
5442 Use bitset operations when possible, not loops over bits.
5443
5444 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5445 bitset_or.
5446 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5447 * src/reduce.c (useless_nonterminals): Formatting changes.
5448 * src/warshall.c (TC): Use bitset_or.
5449
5450 2002-03-04 Akim Demaille <akim@epita.fr>
5451
5452 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5453 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5454 Ditto.
5455
5456 2002-03-04 Akim Demaille <akim@epita.fr>
5457
5458 * src/lalr.c (F): Now a bitset*.
5459 Adjust all dependencies.
5460
5461 2002-03-04 Akim Demaille <akim@epita.fr>
5462
5463 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5464 Adjust all dependencies.
5465
5466 2002-03-04 Akim Demaille <akim@epita.fr>
5467
5468 * src/L0.c, src/LR0.h (nstates): Be size_t.
5469 Adjust comparisons (signed vs unsigned).
5470 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5471 bitset*.
5472 Adjust all dependencies.
5473
5474 2002-03-04 Akim Demaille <akim@epita.fr>
5475
5476 * src/closure.c (firsts): Now, also a bitset.
5477 Adjust all dependencies.
5478 (varsetsize): Remove, now unused.
5479 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5480
5481 2002-03-04 Akim Demaille <akim@epita.fr>
5482
5483 * src/print.c: Convert to use bitset.h, not hand coded iterations
5484 over ints.
5485
5486 2002-03-04 Akim Demaille <akim@epita.fr>
5487
5488 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5489
5490 2002-03-04 Akim Demaille <akim@epita.fr>
5491
5492 * src/closure.c (ruleset): Be a bitset.
5493 (rulesetsize): Remove.
5494
5495 2002-03-04 Akim Demaille <akim@epita.fr>
5496
5497 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5498 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5499 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5500 * src/closure.c (fderives): Be an array of bitsets.
5501
5502 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5503
5504 * data/bison.c++: Merge the two generated headers. Insert a copyright
5505 notice in each output file.
5506
5507 2002-02-28 Akim Demaille <akim@epita.fr>
5508
5509 * data/bison.c++: Copy the prologue of bison.simple to fetch
5510 useful M4 definitions, such as b4_header_guard.
5511
5512 2002-02-25 Akim Demaille <akim@epita.fr>
5513
5514 * src/getargs.c (version): Give the name of the authors, and use a
5515 translator friendly scheme for the bgr
5516 copyright notice.
5517
5518 2002-02-25 Akim Demaille <akim@epita.fr>
5519
5520 * src/output.c (header_output): Remove, now handled completely via
5521 M4.
5522
5523 2002-02-25 Akim Demaille <akim@epita.fr>
5524
5525 * m4/m4.m4: New, from CVS Autoconf.
5526 * configure.in: Invoke it.
5527 * src/output.c (output_skeleton): Use its result instead of the
5528 hard coded name.
5529
5530 2002-02-25 Akim Demaille <akim@epita.fr>
5531
5532 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5533 Fileutils 4.1.5.
5534 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5535 * src/output.c (output_skeleton): Use mkstemp to create a real
5536 temporary file.
5537 Move the filling of `skeleton' and its muscle to...
5538 (prepare): here.
5539 (output): Move the definition of the prologue muscle to...
5540 (prepare): here.
5541 * src/system.h (DEFAULT_TMPDIR): New.
5542
5543 2002-02-14 Paul Eggert <eggert@twinsun.com>
5544
5545 Remove the support for C++ namespace cleanliness; it was
5546 causing more problems than it was curing, since it didn't work
5547 properly on some nonstandard C++ compilers. This can wait
5548 for a proper C++ parser.
5549
5550 * NEWS: Document this.
5551 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5552 of C++, as it's treated like C now.
5553 * src/bison.simple (YYSTD): Remove.
5554 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5555 Treat C++ just like Standard C instead of trying to support
5556 namespace cleanliness.
5557
5558 2002-02-14 Akim Demaille <akim@epita.fr>
5559
5560 * tests/regression.at (else): Adjust to Andreas' change.
5561
5562 2002-02-14 Akim Demaille <akim@epita.fr>
5563
5564 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5565
5566 2002-02-13 Andreas Schwab <schwab@suse.de>
5567
5568 * src/output.c (output_rule_data): Don't output NULL, it might
5569 not be defined yet.
5570
5571 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5572
5573 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5574 (Copyright notice): Update.
5575
5576 2002-02-11 Akim Demaille <akim@epita.fr>
5577
5578 * tests/regression.at (%nonassoc and eof): Don't include
5579 nonportable headers.
5580
5581 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5582
5583 * data/bison.c++: Correct error recovery. Make the user able to
5584 initialize the starting location.
5585
5586 2002-02-07 Akim Demaille <akim@epita.fr>
5587
5588 * tests/input.at: New.
5589
5590 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5591
5592 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5593 more consistent when naming methods and variables. Put preprocessor
5594 directives around tables only needed for debugging.
5595
5596 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5597
5598 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5599 C++ parsers.
5600 (yy::b4_name::parse): Use print_.
5601
5602 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5603
5604 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5605
5606 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5607
5608 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5609 C++ parsers.
5610 (yy::b4_name::parse): Build verbose error messages, and use error_.
5611
5612 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5613
5614 * data/bison.c++: Fix m4 quoting in comments.
5615
5616 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5617
5618 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5619 not expanded by m4.
5620
5621 2002-02-05 Akim Demaille <akim@epita.fr>
5622
5623 * data/bison.c++: Adjust to the M4 back end.
5624 More is certainly needed.
5625
5626 2002-02-05 Akim Demaille <akim@epita.fr>
5627
5628 Give a try to M4 as a back end.
5629
5630 * lib/readpipe.c: New, from wdiff.
5631 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5632 BISON_HAIRY.
5633 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5634 specific values. Now it is m4 that performs the lookup.
5635 * src/parse-skel.y: Remove.
5636 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5637 * src/output.c (actions_output, guards_output)
5638 (token_definitions_output): No longer keeps track of the output
5639 line number, hence remove the second argument.
5640 (guards_output): Check against the guard member of a rule, not the
5641 action member.
5642 Adjust callers.
5643 (output_skeleton): Don't look for the skeleton location, let m4 do
5644 that.
5645 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5646 file will be used.
5647 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5648 (prepare): Given that for the time being changesyntax is not
5649 usable in M4, rename the muscles using `-' to `_'.
5650 Define `defines_flag', `output_parser_name' and `output_header_name'.
5651 * src/output.h (actions_output, guards_output)
5652 (token_definitions_output): Adjust prototypes.
5653 * src/scan-skel.l: Instead of scanning the skeletons, it now
5654 processes the output of m4: `__oline__' and `#output'.
5655 * data/bison.simple: Adjust to be used by M4(sugar).
5656 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5657 to date.
5658 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5659 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5660 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5661 shamelessly stolen from CVS Autoconf.
5662
5663 2002-02-05 Akim Demaille <akim@epita.fr>
5664
5665 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5666 * configure.in: Check for the declarations of free and malloc.
5667 * src/muscle_tab.c: Adjust.
5668
5669 2002-02-05 Akim Demaille <akim@epita.fr>
5670
5671 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5672 which have no values.
5673
5674 2002-02-05 Akim Demaille <akim@epita.fr>
5675
5676 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5677 * data/: here.
5678
5679 2002-01-29 Paul Eggert <eggert@twinsun.com>
5680
5681 * src/bison.simple (YYSIZE_T): Do not define merely because
5682 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5683 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5684
5685 2002-01-27 Akim Demaille <akim@epita.fr>
5686
5687 Fix `%nonassoc and eof'.
5688
5689 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5690 which were not properly copied! Replace
5691 memcpy (res->errs, src->errs, src->nerrs);
5692 with
5693 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5694 !!!
5695 * tests/regression.at (%nonassoc and eof): Adjust to newest
5696 Autotest: `.' is not in the PATH.
5697
5698 2002-01-27 Akim Demaille <akim@epita.fr>
5699
5700 * tests/sets.at (AT_EXTRACT_SETS): New.
5701 (Nullable): Use it.
5702 (Firsts): New.
5703
5704 2002-01-26 Akim Demaille <akim@epita.fr>
5705
5706 * tests/actions.at, tests/calc.at, tests/headers.at,
5707 * tests/torture.at: Adjust to the newest Autotest which no longer
5708 forces `.' in the PATH.
5709
5710 2002-01-25 Akim Demaille <akim@epita.fr>
5711
5712 * tests/regression.at (%nonassoc and eof): New.
5713 Suggested by Robert Anisko.
5714
5715 2002-01-24 Akim Demaille <akim@epita.fr>
5716
5717 Bison dumps core when trying to complain about broken input files.
5718 Reported by Cris van Pelt.
5719
5720 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5721 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5722 into...
5723 (Invalid inputs): Strengthen: exercise parse_percent_token.
5724
5725 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5726
5727 * src/Makefile.am: Add bison.c++.
5728 * src/bison.c++: New skeleton.
5729
5730 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5731
5732 * po/it.po: New.
5733
5734 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5735
5736 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5737
5738 2002-01-20 Marc Autret <marc@gnu.org>
5739
5740 * src/files.c (compute_output_file_names): Fix
5741
5742 2002-01-20 Marc Autret <marc@gnu.org>
5743
5744 * tests/output.at: New test.
5745 * src/files.c (compute_base_names): Don't map extensions when
5746 the YACC flag is set, use defaults.
5747 Reported by Evgeny Stambulchik.
5748
5749 2002-01-20 Marc Autret <marc@gnu.org>
5750
5751 * src/system.h: Need to define __attribute__ away for non-GCC
5752 compilers as well (i.e. the vendor C compiler).
5753 Suggested by Albert Chin-A-Young.
5754
5755 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5756
5757 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5758 canonical definition.
5759 * src/system.h: Use the canonical definition for PARAMS (avoids
5760 a conflict with the macro from lib/hash.h).
5761
5762 2002-01-11 Akim Demaille <akim@epita.fr>
5763
5764 * configure.in: Use AC_FUNC_STRNLEN.
5765 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5766
5767 2002-01-09 Akim Demaille <akim@epita.fr>
5768
5769 * src/files.c, src/files.h (output_infix): New.
5770 (tab_extension): Remove.
5771 (compute_base_names): Compute the former, drop the latter.
5772 * src/output.c (prepare): Insert the muscles `output-infix', and
5773 `output-suffix'.
5774 * src/parse-skel.y (string, string.1): New.
5775 (section.header): Use it.
5776 (section.yacc): Remove.
5777 (prefix): Remove too.
5778 * src/scan-skel.l: Adjust.
5779 * src/bison.simple, src/bison.hairy: Adjust.
5780
5781 2002-01-09 Akim Demaille <akim@epita.fr>
5782
5783 * configure.in (WERROR_CFLAGS): Compute it.
5784 * src/Makefile.am (CFLAGS): Pass it.
5785 * tests/atlocal.in (CFLAGS): Idem.
5786 * src/files.c: Fix a few warnings.
5787 (get_extension_index): Remove, unused.
5788
5789 2002-01-08 Akim Demaille <akim@epita.fr>
5790
5791 * src/getargs.c (AS_FILE_NAME): New.
5792 (getargs): Use it to convert DOSish file names.
5793 * src/files.c (base_name): Rename as full_base_name to avoid
5794 clashes with `base_name ()'.
5795 (filename_split): New.
5796 (compute_base_names): N-th rewrite, using filename_split.
5797
5798 2002-01-08 Akim Demaille <akim@epita.fr>
5799
5800 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5801 New, stolen from the Fileutils 4.1.
5802 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5803 * configure.in: Check for the presence of memrchr, and of its
5804 prototype.
5805
5806 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5807
5808 * lib/hash.h (__P): Added definition for this macro.
5809 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5810 BUILT_SOURCES, to ensure they are generated first.
5811 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5812 %error-verbose to allow bootstrapping with bison 1.30x.
5813
5814 2002-01-06 Akim Demaille <akim@epita.fr>
5815
5816 * src/reader.c (parse_braces): Don't fetch the next char, the
5817 convention is to fetch on entry.
5818 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5819 'switch' without a following semicolon.
5820 * tests/regression.at (braces parsing): New.
5821
5822 2002-01-06 Akim Demaille <akim@epita.fr>
5823
5824 Bison is dead wrong in its RR conflict reports.
5825
5826 * tests/torture.at (GNU Cim Grammar): New.
5827 * src/conflicts.c (count_rr_conflicts): Fix.
5828
5829 2002-01-06 Akim Demaille <akim@epita.fr>
5830
5831 Creating package.m4 from configure.ac causes too many problems.
5832
5833 * tests/Makefile.am (package.m4): Create it by hand,
5834 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5835
5836 2002-01-06 Akim Demaille <akim@epita.fr>
5837
5838 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5839 skeleton.h.
5840
5841 2002-01-04 Paul Eggert <eggert@twinsun.com>
5842
5843 * doc/bison.texinfo (Debugging):
5844 Remove YYSTDERR; it's no longer defined or used.
5845 Also, s/cstdio.h/cstdio/.
5846
5847 2002-01-03 Akim Demaille <akim@epita.fr>
5848
5849 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5850
5851 2002-01-03 Akim Demaille <akim@epita.fr>
5852
5853 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5854 tracing code to --trace, wait for a better --trace option, with
5855 args.
5856
5857 2002-01-03 Akim Demaille <akim@epita.fr>
5858
5859 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5860 The ISO C++ standard is extremely clear about it: stderr is
5861 considered a macro, not a regular symbol (see table 94 `Header
5862 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5863 Therefore std:: does not apply to it. It still does with fprintf.
5864 Also, s/cstdio.h/cstdio/.
5865
5866 2002-01-03 Akim Demaille <akim@epita.fr>
5867
5868 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5869 for non system headers.
5870
5871 2002-01-02 Akim Demaille <akim@epita.fr>
5872
5873 Equip the skeleton chain with location tracking, runtime trace,
5874 pure parser and scanner.
5875
5876 * src/parse-skel.y: Request a pure parser, locations, and prefix
5877 renaming.
5878 (%union): Having several members with the same type does not help
5879 type mismatches, simplify.
5880 (YYPRINT, yyprint): New.
5881 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5882 (skel_error): this.
5883 Handle locations.
5884 * src/scan-skel.l: Adjust to these changes.
5885 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5886 (LOCATION_PRINT, skel_control_t): New.
5887
5888 2001-12-30 Akim Demaille <akim@epita.fr>
5889
5890 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5891 replace `gb' with BLANKS.
5892 * src/scan-skel.l: Adjust.
5893
5894 2001-12-30 Akim Demaille <akim@epita.fr>
5895
5896 * src/system.h: We don't need nor want bcopy.
5897 Throw away MS-DOS crap: we don't need getpid.
5898 * configure.in: We don't need strndup. It was even causing
5899 problems: because Flex includes the headers *before* us,
5900 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5901 not visible.
5902 * lib/xstrndup.c: New.
5903 * src/scan-skel.l: Use it.
5904 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5905 * src/parse-skel.y: Use %directives instead of #defines.
5906
5907 2001-12-30 Akim Demaille <akim@epita.fr>
5908
5909 * src/skeleton.h: New.
5910 * src/output.c (output_parser, output_master_parser): Remove, dead
5911 code.
5912 * src/output.h (get_lines_number, actions_output, guards_output)
5913 (token_definitions_output): Prototype them.
5914 * src/parse-skel.y: Add the license notice.
5915 Include output.h and skeleton.h.
5916 (process_skeleton): Returns void, and takes a single parameter.
5917 * src/scan-skel.l: Add the license notice.
5918 Include skeleton.h.
5919 Don't use %option yylineno: it seems that then Flex imagines
5920 REJECT has been used, and therefore it won't reallocate its
5921 buffers (which makes no other sense to me than a bug). It results
5922 in warnings for `unused: yy_flex_realloc'.
5923
5924 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5925
5926 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5927 (MUSCLE_INSERT_PREFIX): ...to there.
5928 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5929 (MUSCLE_INSERT_PREFIX): Move from here...
5930
5931 * src/bison.hairy: Add a section directive. Put braces around muscle
5932 names. This parser skeleton is still broken, but Bison should not
5933 choke on a bad muscle 'syntax'.
5934 * src/bison.simple: Add a section directive. Put braces around muscle
5935 names.
5936
5937 * src/files.h (strsuffix, stringappend): Add declarations.
5938 (tab_extension): Add declaration.
5939 (short_base_name): Add declaration.
5940
5941 * src/files.c (strsuffix, stringappend): No longer static. These
5942 functions are used in the skeleton parser.
5943 (tab_extension): New.
5944 (compute_base_names): Use the computations done in this function
5945 to guess if the generated parsers should have '.tab' in their
5946 names.
5947 (short_base_name): No longer static.
5948
5949 * src/output.c (output_skeleton): New.
5950 (output): Disable call to output_master_parser, and give a try to
5951 a new skeleton handling system.
5952 (guards_output, actions_output): No longer static.
5953 (token_definitions_output, get_lines_number): No longer static.
5954
5955 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5956
5957 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5958 parse-skel.y.
5959
5960 * src/parse-skel.y: New file.
5961 * src/scan-skel.l: New file.
5962
5963 2001-12-29 Akim Demaille <akim@epita.fr>
5964
5965 %name-prefix is broken.
5966
5967 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5968 Adjust all dependencies.
5969 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5970 %name-prefix.
5971
5972 Renaming yylval but not yylloc is not consistent. Now we do.
5973
5974 * src/bison.simple: Prefix yylloc if used.
5975 * doc/bison.texinfo (Decl Summary): Document that.
5976
5977 2001-12-29 Akim Demaille <akim@epita.fr>
5978
5979 * doc/bison.texinfo: Promote `%long-directive' over
5980 `%long_directive'.
5981 Remove all references to fixed-output-files, yacc is enough.
5982
5983 2001-12-29 Akim Demaille <akim@epita.fr>
5984
5985 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5986 user prologue. These are defaults.
5987 * tests/actions.at (Mid-rule actions): Make sure the user can
5988 define YYDEBUG and YYERROR_VERBOSE.
5989
5990 2001-12-29 Akim Demaille <akim@epita.fr>
5991
5992 * src/output.c (header_output): Don't forget to export YYLTYPE and
5993 yylloc.
5994 * tests/headers.at (export YYLTYPE): New, make sure it does.
5995 * tests/regression.at (%union and --defines, Invalid CPP headers):
5996 Move to...
5997 * tests/headers.at: here.
5998
5999 2001-12-29 Akim Demaille <akim@epita.fr>
6000
6001 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6002
6003 2001-12-29 Akim Demaille <akim@epita.fr>
6004
6005 * tests/actions.at (Mid-rule actions): Output on a single line
6006 instead of several.
6007
6008 2001-12-29 Akim Demaille <akim@epita.fr>
6009
6010 * doc/bison.texinfo: Formatting changes.
6011
6012 2001-12-29 Akim Demaille <akim@epita.fr>
6013
6014 Don't store the token defs in a muscle, just be ready to output it
6015 on command. Now possible via `symbols'. Fixes a memory leak.
6016
6017 * src/output.c (token_definitions_output): New.
6018 (output_parser, header_output): Use it.
6019 * src/reader.c (symbols_save): Remove.
6020
6021 2001-12-29 Akim Demaille <akim@epita.fr>
6022
6023 * src/bison.simple: Do not provide a default for YYSTYPE and
6024 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6025 default.
6026
6027 2001-12-29 Akim Demaille <akim@epita.fr>
6028
6029 Mid-rule actions are simply... ignored!
6030
6031 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6032 the empty-rule associated to the dummy symbol, not to the host
6033 rule.
6034 * tests/actions.at (Mid-rule actions): New.
6035
6036 2001-12-29 Akim Demaille <akim@epita.fr>
6037
6038 Memory leak.
6039
6040 * src/reader.c (reader): Free grammar.
6041
6042 2001-12-29 Akim Demaille <akim@epita.fr>
6043
6044 Memory leak.
6045
6046 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6047 since it allocates it for each state, although only one is needed.
6048 (allocate_storage): Do it here.
6049
6050 2001-12-29 Akim Demaille <akim@epita.fr>
6051
6052 * src/options.h, src/options.c (create_long_option_table): Rename
6053 as...
6054 (long_option_table_new): this, with a clearer prototype.
6055 (percent_table): Remove, unused,
6056 * src/getargs.c (getargs): Adjust.
6057
6058 2001-12-29 Akim Demaille <akim@epita.fr>
6059
6060 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6061 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6062 as states.
6063
6064 2001-12-29 Akim Demaille <akim@epita.fr>
6065
6066 * src/lalr.c (build_relations): Rename `states' as `states1'.
6067 Sorry, I don't understand exactly what it is, no better name...
6068
6069 2001-12-29 Akim Demaille <akim@epita.fr>
6070
6071 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6072 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6073 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6074 as rules.
6075
6076 2001-12-29 Akim Demaille <akim@epita.fr>
6077
6078 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6079 ago.
6080
6081 2001-12-29 Akim Demaille <akim@epita.fr>
6082
6083 * src/reader.c, src/reader.h (user_toknums): Remove.
6084 Adjust all users to use symbols[i]->user_token_number.
6085
6086 2001-12-29 Akim Demaille <akim@epita.fr>
6087
6088 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6089 Adjust all users to use symbols[i]->prec or ->assoc.
6090
6091 2001-12-29 Akim Demaille <akim@epita.fr>
6092
6093 * src/reader.c, src/reader.h (tags): Remove.
6094 Adjust all users to use symbols[i]->tag.
6095
6096 2001-12-29 Akim Demaille <akim@epita.fr>
6097
6098 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6099 and rule_table.
6100 * src/reader.c (packsymbols): Fill this table.
6101 Drop sprec.
6102 * src/conflicts.c (resolve_sr_conflict): Adjust.
6103 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6104 single table.
6105 Use symbols[i]->tag instead of tags[i].
6106
6107 2001-12-29 Akim Demaille <akim@epita.fr>
6108
6109 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6110 In addition, put a comment in there, to replace...
6111 * tests/regression.at (%union and C comments): Remove.
6112
6113 2001-12-29 Akim Demaille <akim@epita.fr>
6114
6115 * tests/regression.at (Web2c Actions): Blindly move the actual
6116 output as expected output. The contents *seem* right to me, but I
6117 can't pretend reading perfectly parser tables... Nonetheless, all
6118 the other tests pass correctly, the table look OK, even though the
6119 presence of `$axiom' is to be noted: AFAICS it is useless (but
6120 harmless).
6121
6122 2001-12-29 Akim Demaille <akim@epita.fr>
6123
6124 * src/reader.c (readgram): Don't add the rule 0 if there were no
6125 rules read. In other words, add it _after_ having performed
6126 grammar sanity checks.
6127 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6128
6129 2001-12-29 Akim Demaille <akim@epita.fr>
6130
6131 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6132 visible, and some states have now a different number.
6133
6134 2001-12-29 Akim Demaille <akim@epita.fr>
6135
6136 * src/reader.c (readgram): Bind the initial rule's lineno to that
6137 of the first rule.
6138 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6139 (Solved SR Conflicts): Adjust rule 0's line number.
6140
6141 2001-12-29 Akim Demaille <akim@epita.fr>
6142
6143 Fix the `GAWK Grammar' failure.
6144
6145 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6146 the reductions of the first state which was mistakenly confused
6147 with the final state because precisely final_state was initialized
6148 to 0.
6149 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6150 now noticed by Bison.
6151 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6152 have a reduction on $default.
6153
6154 2001-12-29 Akim Demaille <akim@epita.fr>
6155
6156 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6157 rule line numbers.
6158 * src/closure.c (print_closure): Likewise.
6159 * src/derives.c (print_derives): Likewise.
6160 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6161 now.
6162
6163 2001-12-29 Akim Demaille <akim@epita.fr>
6164
6165 * src/lalr.c (lookaheads_print): New.
6166 (lalr): Call it when --trace-flag.
6167 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6168 are dumped.
6169
6170 2001-12-29 Akim Demaille <akim@epita.fr>
6171
6172 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6173 when walking through ritem, even via rule->rhs.
6174 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6175 (useful_production, useless_nonterminals): Likewise.
6176 (reduce_grammar_tables): Likewise, plus update nritems.
6177 * src/nullable.c (set_nullable): Likewise.
6178 * src/lalr.c (build_relations): Likewise.
6179 * tests/sets.at (Nullable): Adjust.
6180 Fortunately, now, the $axiom is no longer nullable.
6181
6182 2001-12-29 Akim Demaille <akim@epita.fr>
6183
6184 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6185 the 0-sentinel.
6186 * src/gram.c (ritem_longest_rhs): Likewise.
6187 * src/reduce.c (nonterminals_reduce): Likewise.
6188 * src/print_graph.c (print_graph): Likewise.
6189 * src/output.c (output_rule_data): Likewise.
6190 * src/nullable.c (set_nullable): Likewise.
6191
6192 2001-12-29 Akim Demaille <akim@epita.fr>
6193
6194 * src/output.c: Comment changes.
6195
6196 2001-12-27 Paul Eggert <eggert@twinsun.com>
6197
6198 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6199 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6200 Sparc, as they were causing more porting problems than the
6201 (minor) performance improvement was worth.
6202
6203 Also, catch up with 1.31's YYSTD.
6204
6205 2001-12-27 Akim Demaille <akim@epita.fr>
6206
6207 * src/output.c (output_gram): Rely on nritems, not the
6208 0-sentinel. See below.
6209 Use -1 as separator, not 0.
6210 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6211 Rely on -1 as separator in yyrhs, instead of 0.
6212 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6213 twice `Now at end of input', therefore there are two lines less to
6214 expect.
6215
6216 2001-12-27 Akim Demaille <akim@epita.fr>
6217
6218 * tests/regression.at (Unresolved SR Conflicts):
6219 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6220 below.
6221
6222 2001-12-27 Akim Demaille <akim@epita.fr>
6223
6224 * src/LR0.c (new_state): Recognize the final state by the fact it
6225 is reached by eoftoken.
6226 (insert_start_shifting_state, insert_eof_shifting_state)
6227 (insert_accepting_state, augment_automaton): Remove, since now
6228 these states are automatically computed from the initial state.
6229 (generate_states): Adjust.
6230 * src/print.c: When reporting a rule number to the user, substract
6231 1, so that the axiom rule is rule 0, and the first user rule is 1.
6232 * src/reduce.c: Likewise.
6233 * src/print_graph.c (print_core): For the time being, just as for
6234 the report, depend upon --trace-flags to dump the full set of
6235 items.
6236 * src/reader.c (readgram): Once the grammar read, insert the rule
6237 0: `$axiom: START-SYMBOL $'.
6238 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6239 number of the states has changed (the final state is no longer
6240 necessarily the last), catch up.
6241
6242 2001-12-27 Akim Demaille <akim@epita.fr>
6243
6244 Try to make the use of the eoftoken valid. Given that its value
6245 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6246 is used instead of > 0 where appropriate, (ii), depend upon nritems
6247 instead of the 0-sentinel.
6248
6249 * src/gram.h, src/gram.c (nritems): New.
6250 Expected to be duplication of nitems, but for the time being...
6251 * src/reader.c (packgram): Assert nritems and nitems are equal.
6252 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6253 * src/closure.c (print_closure, print_fderives): Likewise.
6254 * src/gram.c (ritem_print): Likewise.
6255 * src/print.c (print_core, print_grammar): Likewise.
6256 * src/print_graph.c: Likewise.
6257
6258 2001-12-27 Akim Demaille <akim@epita.fr>
6259
6260 * src/main.c (main): If there are complains after grammar
6261 reductions, then output the report anyway if requested, then die.
6262 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6263 * src/reader.c (eoftoken): New.
6264 (parse_token_decl): If the token being defined has value `0', it
6265 is the eoftoken.
6266 (packsymbols): No longer hack `tags' to insert `$' by hand.
6267 Be sure to preserve the value of the eoftoken.
6268 (reader): Make sure eoftoken is defined.
6269 Initialize nsyms to 0: now eoftoken is created just like the others.
6270 * src/print.c (print_grammar): Don't special case the eof token.
6271 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6272 lie anyway, albeit pleasant.
6273 * tests/calc.at: Exercise error messages with eoftoken.
6274 Change the grammar so that empty input is invalid.
6275 Adjust expectations.
6276 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6277
6278 2001-12-27 Akim Demaille <akim@epita.fr>
6279
6280 * configure.in: Check the protos of strchr ans strspn.
6281 Replace strchr if needed.
6282 * src/system.h: Provide the protos of strchr, strspn and memchr if
6283 missing.
6284 * lib/strchr.c: New.
6285 * src/reader.c (symbols_save): Use strchr.
6286
6287 2001-12-27 Akim Demaille <akim@epita.fr>
6288
6289 * src/print.c, src/print_graph.c (escape): New.
6290 Use it to quote the TAGS outputs.
6291 * src/print_graph.c (print_state): Now errors are in red, and
6292 reductions in green.
6293 Prefer high to wide: output the state number on a line of its own.
6294
6295 2001-12-27 Akim Demaille <akim@epita.fr>
6296
6297 * src/state.h, src/state.c (reductions_new): New.
6298 * src/LR0.c (set_state_table): Let all the states have a
6299 `reductions', even if reduced to 0.
6300 (save_reductions): Adjust.
6301 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6302 * src/print.c (print_reductions, print_actions): Adjust.
6303 * src/output.c (action_row): Adjust.
6304
6305 2001-12-27 Akim Demaille <akim@epita.fr>
6306
6307 * src/state.h, src/state.c (errs_new, errs_dup): New.
6308 * src/LR0.c (set_state_table): Let all the states have an errs,
6309 even if reduced to 0.
6310 * src/print.c (print_errs, print_reductions): Adjust.
6311 * src/output.c (output_actions, action_row): Adjust.
6312 * src/conflicts.c (resolve_sr_conflict): Adjust.
6313
6314 2001-12-27 Akim Demaille <akim@epita.fr>
6315
6316 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6317
6318 2001-12-27 Akim Demaille <akim@epita.fr>
6319
6320 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6321 * src/print.c: here.
6322 (lookaheadset, shiftset): New, used as additional storage by
6323 print_reductions.
6324 (print_results): Adjust.
6325 (print_shifts, print_gotos, print_errs): New, extracted from...
6326 (print_actions): here.
6327 * src/print_graph.c (print_actions): Remove dead code.
6328
6329 2001-12-27 Akim Demaille <akim@epita.fr>
6330
6331 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6332 `$n' and `@n'.
6333
6334 2001-12-27 Akim Demaille <akim@epita.fr>
6335
6336 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6337 (build_relations): Adjust.
6338
6339 2001-12-27 Akim Demaille <akim@epita.fr>
6340
6341 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6342 duplication.
6343
6344 2001-12-27 Akim Demaille <akim@epita.fr>
6345
6346 * src/reader.c (packgram): Catch nitems overflows.
6347
6348 2001-12-27 Akim Demaille <akim@epita.fr>
6349
6350 * src/files.c, src/files.h (guard_obstack): Remove.
6351 * src/output.c (output): Adjust.
6352 * src/reader.c (parse_braces): New, factoring...
6353 (copy_action, copy_guard): these two which are renamed as...
6354 (parse_action, parse_guard): these.
6355 As a voluntary consequence, using braces around guards is now
6356 mandatory.
6357
6358 2001-12-27 Akim Demaille <akim@epita.fr>
6359
6360 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6361 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6362 members.
6363 (symbol_list_new): Adjust.
6364 (copy_action): action_line is the first line, not the last.
6365 (copy_guard): Just as for actions, store the `action' only, not
6366 the switch/case/break flesh.
6367 Don't parse the user action that might follow the guard, let...
6368 (readgram): do it, i.e., now, there can be an action after a
6369 guard.
6370 In other words the guard is just explicitly optional.
6371 (packgram): Adjust.
6372 * src/output.c (guards_output): New.
6373 (output_parser): Call it when needed.
6374 (output): Also free the guard and attrs obstacks.
6375 * src/files.c, src/files.h (obstack_save): Remove.
6376 (output_files): Remove.
6377 As a result, if one needs the former `.act' file, using an
6378 appropriate skeleton which requires actions and guards is now
6379 required.
6380 * src/main.c (main): Adjust.
6381 * tests/semantic.at: New.
6382 * tests/regression.at: Use `input.y' as input file name.
6383 Avoid 8+3 problems by requiring input.c when the test needs the
6384 parser.
6385
6386 2001-12-27 Akim Demaille <akim@epita.fr>
6387
6388 * src/reader.c (symbol_list_new): Be sure to initialize all the
6389 fields.
6390
6391 2001-12-27 Akim Demaille <akim@epita.fr>
6392
6393 All the hacks using a final pseudo state are now useless.
6394
6395 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6396 * src/lalr.c (nLA): New.
6397 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6398 instead of lookaheadsp from the pseudo state (nstate + 1).
6399
6400 2001-12-27 Akim Demaille <akim@epita.fr>
6401
6402 * src/output.c (action_row, token_actions): Use a state_t instead
6403 of a integer, and nlookaheads instead of the following state's
6404 lookaheadsp.
6405
6406 2001-12-27 Akim Demaille <akim@epita.fr>
6407
6408 * src/conflicts.c (log_resolution, flush_shift)
6409 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6410 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6411 (conflicts_print, print_reductions): Use a state_t instead of an
6412 integer when referring to a state.
6413 As much as possible, depend upon nlookaheads, instead of the
6414 `lookaheadsp' member of the following state (since lookaheads of
6415 successive states are successive, the difference between state n + 1
6416 and n served as the number of lookaheads for state n).
6417 * src/lalr.c (add_lookback_edge): Likewise.
6418 * src/print.c (print_core, print_actions, print_state)
6419 (print_results): Likewise.
6420 * src/print_graph.c (print_core, print_actions, print_state)
6421 (print_graph): Likewise.
6422 * src/conflicts.h: Adjust.
6423
6424 2001-12-27 Akim Demaille <akim@epita.fr>
6425
6426 * src/bison.hairy: Formatting/comment changes.
6427 ANSIfy.
6428 Remove `register' indications.
6429 Add plenty of `static'.
6430
6431 2001-12-27 Akim Demaille <akim@epita.fr>
6432
6433 * src/output.c (prepare): Drop the muscle `ntbase' which
6434 duplicates ntokens.
6435 * src/bison.simple: Formatting/comment changes.
6436 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6437 is an undocumented synonym.
6438
6439 2001-12-22 Akim Demaille <akim@epita.fr>
6440
6441 * src/output.c (output_table_data): Change the prototype to use
6442 `int' for array ranges: some invocations do pass an int, not a
6443 short.
6444 Reported by Wayne Green.
6445
6446 2001-12-22 Akim Demaille <akim@epita.fr>
6447
6448 Some actions of web2c.y are improperly triggered.
6449 Reported by Mike Castle.
6450
6451 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6452 * tests/regression.at (Web2c): Rename as...
6453 (Web2c Report): this.
6454 (Web2c Actions): New.
6455
6456 2001-12-22 Akim Demaille <akim@epita.fr>
6457
6458 Reductions in web2c.y are improperly reported.
6459 Reported by Mike Castle.
6460
6461 * src/conflicts.c (print_reductions): Fix.
6462 * tests/regression.at (Web2c): New.
6463
6464 2001-12-18 Akim Demaille <akim@epita.fr>
6465
6466 Some host fail on `assert (!"foo")', which expands to
6467 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6468 Reported by Nelson Beebee.
6469
6470 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6471 `#define it_succeeded 0' and `assert (it_succeeded)'.
6472
6473 2001-12-17 Marc Autret <autret_m@epita.fr>
6474
6475 * src/bison.simple: Don't hard code the skeleton line and filename.
6476 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6477 New line counter 'skeleton_line' (skeleton-line muscle).
6478
6479 2001-12-17 Paul Eggert <eggert@twinsun.com>
6480
6481 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6482 YYDEBUG must be defined to a nonzero value.
6483
6484 * src/bison.simple (yytname): Do not assume that the user defines
6485 YYDEBUG to a properly parenthesized expression.
6486
6487 2001-12-17 Akim Demaille <akim@epita.fr>
6488
6489 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6490 nlookaheads is a new member.
6491 Adjust all users.
6492 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6493 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6494 state.
6495
6496 2001-12-17 Akim Demaille <akim@epita.fr>
6497
6498 * src/files.h, src/files.c (open_files, close_files): Remove.
6499 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6500 let...
6501 * src/reader.c (reader): Do it.
6502
6503 2001-12-17 Akim Demaille <akim@epita.fr>
6504
6505 * src/conflicts.c (print_reductions): Formatting changes.
6506
6507 2001-12-17 Akim Demaille <akim@epita.fr>
6508
6509 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6510 (flush_reduce): New.
6511 (resolve_sr_conflict): Adjust.
6512
6513 2001-12-17 Akim Demaille <akim@epita.fr>
6514
6515 * src/output.c (output_obstack): Be static and rename as...
6516 (format_obstack): this, to avoid any confusion with files.c's
6517 output_obstack.
6518 * src/reader.h (muscle_obstack): Move to...
6519 * src/output.h: here, since it's defined in output.c.
6520
6521 2001-12-17 Akim Demaille <akim@epita.fr>
6522
6523 * src/output.c (action_row, save_column, default_goto)
6524 (sort_actions, matching_state, pack_vector): Better variable
6525 locality.
6526
6527 2001-12-17 Akim Demaille <akim@epita.fr>
6528
6529 * src/output.c: Various formatting changes.
6530
6531 2001-12-17 Akim Demaille <akim@epita.fr>
6532
6533 * src/files.c (output_files): Free the output_obstack.
6534 * src/main.c (main): Call print and print_graph conditionally.
6535 * src/print.c (print): Work unconditionally.
6536 * src/print_graph.c (print_graph): Work unconditionally.
6537 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6538
6539 2001-12-16 Marc Autret <autret_m@epita.fr>
6540
6541 * src/output.c (actions_output): Fix. When we use %no-lines,
6542 there is one less line per action.
6543
6544 2001-12-16 Marc Autret <autret_m@epita.fr>
6545
6546 * src/bison.simple: Remove a useless #line directive.
6547 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6548 * src/output.c (get_lines_number): New.
6549 (output_parser): Adjust, now takes care about the lines of a
6550 output muscles.
6551 Fix line numbering.
6552 (actions_output): Computes the number of lines taken by actions.
6553 (output_master_parser): Insert new skeleton which is the name of
6554 the output parser file name.
6555
6556 2001-12-15 Marc Autret <autret_m@epita.fr>
6557
6558 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6559
6560 2001-12-15 Marc Autret <autret_m@epita.fr>
6561
6562 * src/output.c (output_gram): Keep track of the hairy one.
6563
6564 2001-12-15 Akim Demaille <akim@epita.fr>
6565
6566 Make `make distcheck' work.
6567
6568 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6569 system.h which uses libgettext.h.
6570
6571 2001-12-15 Akim Demaille <akim@epita.fr>
6572
6573 * src/nullable.c (set_nullable): Useless rules must be skipped,
6574 otherwise, since we range over their symbols, we might look at a
6575 nonterminal which no longer ``exists'', i.e., it is not counted in
6576 `nvars', hence we overflow our arrays.
6577
6578 2001-12-15 Akim Demaille <akim@epita.fr>
6579
6580 The header can also be produced directly, without any obstack!
6581 Yahoo!
6582
6583 * src/files.c, src/files.h (defines_obstack): Remove.
6584 (compute_header_macro): Global.
6585 (defines_obstack_save): Remove.
6586 * src/reader.c (parse_union_decl): No longer output to
6587 defines_obstack: its content can be found in the `stype' muscle
6588 anyway.
6589 (output_token_translations): Merge into...
6590 (symbols_output): this.
6591 Rename as...
6592 (symbols_save): this.
6593 (reader): Adjust.
6594 * src/output.c (header_output): New.
6595 (output): Call it.
6596
6597 2001-12-15 Akim Demaille <akim@epita.fr>
6598
6599 * src/reader.c (parse_union_decl): Instead of handling two obstack
6600 simultaneously, use one to define the `stype' muscle, and use the
6601 value of the latter to fill defines_obstack.
6602 (copy_comment): Remove.
6603 (copy_comment2): Work for a single obstack.
6604 Rename as...
6605 (copy_comment): this.
6606
6607 2001-12-15 Akim Demaille <akim@epita.fr>
6608
6609 * src/lex.c, src/lex.h (xgetc): No longer static.
6610 * src/reader.c (parse_union_decl): Revamp.
6611
6612 2001-12-15 Akim Demaille <akim@epita.fr>
6613
6614 Still making progress in separating Bison into (i) input, (ii)
6615 process, (iii) output: now we can directly output the parser file
6616 without using table_obstack at all.
6617
6618 * src/files.c, src/files.h (table_obstack): Bye bye.
6619 (parser_file_name): New.
6620 * src/files.c (compute_output_file_names): Compute it.
6621 * src/output.c (actions_output, output_parser)
6622 (output_master_parser): To a file instead of an obstack.
6623
6624 2001-12-15 Akim Demaille <akim@epita.fr>
6625
6626 Attach actions to rules, instead of pre-outputting them to
6627 actions_obstack.
6628
6629 * src/gram.h (rule_t): action and action_line are new members.
6630 * src/reader.c (symbol_list): Likewise.
6631 (copy_action): Save the actions within the rule.
6632 (packgram): Save them in rule_table.
6633 * src/output.c (actions_output): New.
6634 (output_parser): Use it on `%%actions'.
6635 (output_rule_data): Don't free rule_table.
6636 (output): Do it.
6637 (prepare): Don't save the `action' muscle.
6638 * src/bison.simple: s/%%action/%%actions/.
6639
6640 2001-12-15 Akim Demaille <akim@epita.fr>
6641
6642 * src/reader.c (copy_action): When --yacc, don't append a `;'
6643 to the user action: let it fail if lacking.
6644 Suggested by Arnold Robbins and Tom Tromey.
6645
6646 2001-12-14 Akim Demaille <akim@epita.fr>
6647
6648 * src/lex.c (literalchar): Simply return the char you decoded, non
6649 longer mess around with obstacks and int pointers.
6650 Adjust all callers.
6651
6652 2001-12-14 Akim Demaille <akim@epita.fr>
6653
6654 * src/lex.c (literalchar): Don't escape the special characters,
6655 just decode them, and keep them as char (before, eol was output as
6656 the 2 char string `\n' etc.).
6657 * src/output.c (output_rule_data): Use quotearg to output the
6658 token strings.
6659
6660 2001-12-13 Paul Eggert <eggert@twinsun.com>
6661
6662 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6663 Do not infringe on the global user namespace when using C++.
6664 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6665 All uses of `fprintf' and `stderr' changed.
6666
6667 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6668
6669 2001-12-13 Akim Demaille <akim@epita.fr>
6670
6671 The computation of nullable is broken: it doesn't handle empty
6672 RHS's properly.
6673
6674 * tests/torture.at (GNU AWK Grammar): New.
6675 * tests/sets.at (Nullable): New.
6676 * src/nullable.c (set_nullable): Instead of blindly looping over
6677 `ritems', loop over the rules, and then over their rhs's.
6678
6679 Work around Autotest bugs.
6680
6681 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6682 frame, because Autotest understand lines starting with a `+' as
6683 traces from the shell. Then, they are not processed properly.
6684 Admittedly an Autotest bug, but we don't have time to wait for
6685 Autotest to catch up.
6686 * tests/regression.at (Broken Closure): Adjust to the new table
6687 frames.
6688 Move to...
6689 * tests/sets.at: here.
6690
6691 2001-12-13 Akim Demaille <akim@epita.fr>
6692
6693 * src/closure.c (closure): Use nrules instead of playing tricks
6694 with BITS_PER_WORD.
6695
6696 2001-12-13 Akim Demaille <akim@epita.fr>
6697
6698 * src/print.c (print_actions): Output the handling of `$' as the
6699 traces do: shifting the token EOF. Before EOF was treated as a
6700 nonterminal.
6701 * tests/regression.at: Adjust some tests.
6702 * src/print_graph.c (print_core): Complete the set of items via
6703 closure. The next-to-final and final states are still unsatisfying,
6704 but that's to be addressed elsewhere.
6705 No longer output the rule numbers, but do output the state number.
6706 A single loop for the shifts + gotos is enough, but picked a
6707 distinct color for each.
6708 (print_graph): Initialize and finalize closure.
6709
6710 2001-12-13 Akim Demaille <akim@epita.fr>
6711
6712 * src/reader.c (readgram): Remove dead code, an strip useless
6713 braces.
6714 (get_type): Remove, unused.
6715
6716 2001-12-12 Akim Demaille <akim@epita.fr>
6717
6718 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6719 on that of lib/error.c.
6720
6721 2001-12-12 Akim Demaille <akim@epita.fr>
6722
6723 Some hosts don't like `/' in includes.
6724
6725 * src/system.h: Include libgettext.h without qualifying the path.
6726 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6727 $(top_srcdir).
6728
6729 2001-12-11 Marc Autret <autret_m@epita.fr>
6730
6731 * src/output.c (output_parser): Remove useless muscle.
6732
6733 2001-12-11 Marc Autret <autret_m@epita.fr>
6734
6735 * src/bison.simple: Remove #line just before %%epilogue. It
6736 is now handled in ...
6737 * src/reader.c (read_additionnal_code): Add the output of a
6738 #line for the epilogue.
6739
6740 2001-12-10 Marc Autret <autret_m@epita.fr>
6741
6742 * src/reader.c (copy_definition): Re-use CPP-outed code which
6743 replace precedent remove.
6744 * src/bison.simple: Remove #line before %%prologue because
6745 %%input-line is wrong at this time.
6746
6747 2001-12-10 Marc Autret <autret_m@epita.fr>
6748
6749 * src/reader.c (symbols_output): Clean up.
6750 * src/output.c (output_gram, output): Clean up.
6751
6752 2001-12-10 Akim Demaille <akim@epita.fr>
6753
6754 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6755 * src/LR0.c (set_state_table): here.
6756 * src/lalr.c (lalr): Call it.
6757
6758 2001-12-10 Akim Demaille <akim@epita.fr>
6759
6760 * src/state.h (shifts): Remove the `number' member: shifts are
6761 attached to state, hence no longer need to be labelled with a
6762 state number.
6763
6764 2001-12-10 Akim Demaille <akim@epita.fr>
6765
6766 Now that states have a complete set of members, the linked list of
6767 shifts is useless: just fill directly the state's shifts member.
6768
6769 * src/state.h (shifts): Remove the `next' member.
6770 * src/LR0.c (first_state, last_state): Remove.
6771 Adjust the callers.
6772 (augment_automaton): Don't look for the shifts that must be added
6773 a shift on EOF: it is those of the state we looked for! But now,
6774 since shifts are attached, it is no longer needed to looking
6775 merely by its id: its number.
6776
6777 2001-12-10 Akim Demaille <akim@epita.fr>
6778
6779 * src/LR0.c (augment_automaton): Better variable locality.
6780 Remove an impossible branch: if there is a state corresponding to
6781 the start symbol being shifted, then there is shift for the start
6782 symbol from the initial state.
6783
6784 2001-12-10 Akim Demaille <akim@epita.fr>
6785
6786 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6787 only when appropriate: when insert_start_shifting_state' is not
6788 invoked.
6789 * tests/regression.at (Rule Line Numbers): Adjust.
6790
6791 2001-12-10 Akim Demaille <akim@epita.fr>
6792
6793 * src/LR0.c (augment_automaton): Now that all states have shifts,
6794 merge the two cases addition shifts to the initial state.
6795
6796 2001-12-10 Akim Demaille <akim@epita.fr>
6797
6798 * src/lalr.c (set_state_table): Move to...
6799 * src/LR0.c: here.
6800 * src/lalr.c (lalr): Don't call it...
6801 * src/LR0.c (generate_states): do it.
6802 * src/LR0.h (first_state): Remove, only the table is used.
6803
6804 2001-12-10 Akim Demaille <akim@epita.fr>
6805
6806 * src/LR0.h (first_shift, first_reduction): Remove.
6807 * src/lalr.c: Don't use first_shift: find shifts through the
6808 states.
6809
6810 2001-12-10 Akim Demaille <akim@epita.fr>
6811
6812 * src/LR0.c: Attach shifts to states as soon as they are
6813 computed.
6814 * src/lalr.c (set_state_table): Instead of assigning shifts to
6815 state, just assert that the mapping was properly done.
6816
6817 2001-12-10 Akim Demaille <akim@epita.fr>
6818
6819 * src/LR0.c (insert_start_shift): Rename as...
6820 (insert_start_shifting_state): this.
6821 (insert_eof_shifting_state, insert_accepting_state): New.
6822 (augment_automaton): Adjust.
6823 Better locality of the variables.
6824 When looking if the start_symbol is shifted from the initial
6825 state, using `while (... symbol != start_symbol ...)' sounds
6826 better than `while (... symbol < start_symbol ...)': If fail
6827 to see how the order between symbols could be relevant!
6828
6829 2001-12-10 Akim Demaille <akim@epita.fr>
6830
6831 * src/getargs.h: Don't declare `spec_name_prefix' and
6832 `spec_file_prefix', declared by src/files.h.
6833 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6834 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6835 * src/output.c (prepare): Adjust.
6836 * src/reader.c (symbols_output): Likewise.
6837 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6838
6839 2001-12-10 Akim Demaille <akim@epita.fr>
6840
6841 * src/muscle_tab.c (muscle_init): NULL is a better default than
6842 `"0"'.
6843
6844 2001-12-10 Akim Demaille <akim@epita.fr>
6845
6846 * src/reader.c (reader): Calling symbols_output once is enough.
6847
6848 2001-12-10 Akim Demaille <akim@epita.fr>
6849
6850 Now that states have a complete set of members, the linked list of
6851 reductions is useless: just fill directly the state's reductions
6852 member.
6853
6854 * src/state.h (struct reductions): Remove member `number' and
6855 `next'.
6856 * src/LR0.c (first_reduction, last_reduction): Remove.
6857 (save_reductions): Don't link the new reductions, store them in
6858 this_state.
6859 * src/lalr.c (set_state_table): No need to attach reductions to
6860 states, it's already done.
6861 * src/output.c (output_actions): No longer free the shifts, then
6862 the reductions, then the states: free all the states and their
6863 members.
6864
6865 2001-12-10 Akim Demaille <akim@epita.fr>
6866
6867 * src/options.c (OPTN, DRTV, BOTH): New.
6868 (option_table): Use them.
6869
6870 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6871 the job of system.h.
6872 * src/options.c: Don't include stdio.h and xalloc.h for the same
6873 reasons.
6874
6875 2001-12-10 Akim Demaille <akim@epita.fr>
6876
6877 * src/output.c (output, prepare): Make sure the values of the
6878 muscles `action' and `prologue' are 0-terminated.
6879
6880 2001-12-10 Akim Demaille <akim@epita.fr>
6881
6882 Clean up GCC warnings.
6883
6884 * src/reader.c (copy_action): `buf' is not used.
6885 (parse_skel_decl): Be static.
6886 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6887 * src/options.h (create_long_option_table): Have a real prototype.
6888 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6889 (hash_delete_at): Return const void *.
6890 Adjust casts to preserve the const.
6891
6892 2001-12-10 Akim Demaille <akim@epita.fr>
6893
6894 * configure.in: Require 2.52g.
6895 M4 is not needed, but AUTOM4TE is.
6896 * m4/m4.m4: Remove.
6897 * tests/Makefile.am: Adjust.
6898
6899 2001-12-10 Akim Demaille <akim@epita.fr>
6900
6901 One structure for states is enough, even though theoretically
6902 there are LR(0) states and LALR(1) states.
6903
6904 * src/lalr.h (state_t): Remove.
6905 (state_table): Be state_t **, not state_t *.
6906 * src/state.h (core, CORE_ALLOC): Rename as...
6907 (state_t, STATE_ALLOC): this.
6908 Add the LALR(1) members: shifts, reductions, errs.
6909 * src/LR0.c (state_table): Rename as...
6910 (state_hash): this, to avoid name clashes with the global
6911 `state_table'.
6912 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6913 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6914
6915 2001-12-10 Akim Demaille <akim@epita.fr>
6916
6917 Bison dumps core on bash.y.
6918 Reported by Pascal Bart.
6919
6920 * src/warshall.c (bitmatrix_print): New.
6921 (TC): Use it.
6922 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6923 j must be the outer loop.
6924 * tests/regression.at (Broken Closure): New.
6925
6926 2001-12-05 Akim Demaille <akim@epita.fr>
6927
6928 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6929 its argument.
6930 Reported by Peter Hamorsky.
6931
6932 2001-12-05 Akim Demaille <akim@epita.fr>
6933
6934 * src/conflicts.c (err_table): Remove.
6935 (resolve_sr_conflict): Adjust.
6936 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6937 Rename as...
6938 (state_t.reductions, state_t.shifts): this.
6939
6940 2001-12-05 Akim Demaille <akim@epita.fr>
6941
6942 * src/reduce.c (reduce_grammar_tables): No longer disable the
6943 removal of useless rules via CPP but via `if (0)', so that the
6944 compiler still check the code is valid.
6945 For instance, it should have noticed `rline' no longer exists: use
6946 the `line' member of rule_t.
6947 * src/gram.c (dummy, rline): Remove, unused.
6948
6949 2001-12-05 Akim Demaille <akim@epita.fr>
6950
6951 * src/output.c (pack_vector): Use assert, not berror.
6952 * src/main.c (berror): Remove, unused.
6953
6954 2001-12-05 Akim Demaille <akim@epita.fr>
6955
6956 New experimental feature: if --verbose --trace output all the
6957 items of a state, not only its kernel.
6958
6959 * src/print.c (print_core): If `trace_flag', then invoke closure
6960 before outputting the items of the state (print_core is no longer
6961 a correct name them).
6962 (print_results): Invoke new_closure/free_closure if needed.
6963
6964 2001-12-05 Akim Demaille <akim@epita.fr>
6965
6966 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6967 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6968 (nitemset): for consistency with the rest of the project.
6969
6970 2001-12-05 Akim Demaille <akim@epita.fr>
6971
6972 * src/closure.c (print_closure): Improve.
6973 (closure): Use it for printing input and output.
6974
6975 2001-12-05 Akim Demaille <akim@epita.fr>
6976
6977 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6978 indexed by nonterminals.
6979
6980 2001-12-05 Akim Demaille <akim@epita.fr>
6981
6982 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6983 what it was!).
6984 * src/warshall.h: Remove accidental duplication of the content.
6985
6986 2001-12-05 Akim Demaille <akim@epita.fr>
6987
6988 * src/closure.c (set_fderives): De-obfuscate.
6989
6990 2001-12-05 Akim Demaille <akim@epita.fr>
6991
6992 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6993
6994 2001-12-05 Akim Demaille <akim@epita.fr>
6995
6996 * src/closure.c (set_firsts): De-obfuscate.
6997
6998 2001-12-05 Akim Demaille <akim@epita.fr>
6999
7000 * src/output.c (action_row): De-obfuscate
7001 using the good o' techniques: arrays not pointers, variable
7002 locality, BITISSET, RESETBIT etc.
7003
7004 2001-12-05 Akim Demaille <akim@epita.fr>
7005
7006 Pessimize the code to simplify it: from now on, all the states
7007 have a valid SHIFTS, which NSHIFTS is possibly 0.
7008
7009 * src/LR0.c (shifts_new): Be global and move to..
7010 * src/state.c, src/state.h: here.
7011 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7012 * src/print_graph: Adjust.
7013
7014 2001-12-05 Akim Demaille <akim@epita.fr>
7015
7016 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7017 * src/conflicts.c: Use it.
7018 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7019 incorrectly ``simplified''.
7020
7021 2001-12-05 Akim Demaille <akim@epita.fr>
7022
7023 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7024 using the good o' techniques: arrays not pointers, variable
7025 locality, BITISSET, RESETBIT etc.
7026
7027 2001-12-05 Akim Demaille <akim@epita.fr>
7028
7029 * src/state.h (SHIFT_SYMBOL): New.
7030 * src/conflicts.c: Use it to deobfuscate.
7031
7032 2001-12-05 Akim Demaille <akim@epita.fr>
7033
7034 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7035 (print_reductions): De-obfuscate using the good o' techniques:
7036 arrays not pointers, variable locality, BITISSET.
7037
7038 2001-12-05 Akim Demaille <akim@epita.fr>
7039
7040 * src/conflicts.c (print_reductions): Arrays, not pointers.
7041 Use BITISSET.
7042
7043 2001-12-05 Akim Demaille <akim@epita.fr>
7044
7045 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7046
7047 2001-12-05 Akim Demaille <akim@epita.fr>
7048
7049 * src/conflicts.c (print_reductions): Improve variable locality.
7050
7051 2001-12-05 Akim Demaille <akim@epita.fr>
7052
7053 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7054
7055 2001-12-05 Akim Demaille <akim@epita.fr>
7056
7057 * src/conflicts.c (print_reductions): Improve variable locality.
7058
7059 2001-12-05 Akim Demaille <akim@epita.fr>
7060
7061 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7062 * src/lalr.c: Use them.
7063
7064 2001-12-05 Akim Demaille <akim@epita.fr>
7065
7066 * src/LR0.c (augment_automaton): Formatting changes.
7067 Better variable locality.
7068
7069 2001-12-05 Akim Demaille <akim@epita.fr>
7070
7071 * src/lalr.c (matrix_print): New.
7072 (transpose): Use it.
7073 Use arrays instead of pointers.
7074
7075 2001-12-05 Akim Demaille <akim@epita.fr>
7076
7077 * src/lalr.c (maxrhs): Move to...
7078 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7079 * src/lalr.c (build_relations): Adjust.
7080
7081 2001-12-05 Akim Demaille <akim@epita.fr>
7082
7083 * src/lalr.c (transpose): Free the memory allocated to the
7084 argument, as it is replaced by the results by the unique caller.
7085 (build_relations): Merely invoke transpose: it handles the memory
7086 deallocation.
7087 Improve variable locality.
7088 Avoid variables used as mere abbreviations.
7089 (compute_lookaheads): Use arrays instead of pointers.
7090
7091 2001-12-05 Akim Demaille <akim@epita.fr>
7092
7093 * src/lalr.c (initialize_F): Improve variable locality.
7094 Avoid variables used as mere abbreviations.
7095
7096 2001-12-05 Akim Demaille <akim@epita.fr>
7097
7098 * src/derives.c (print_derives): Display the ruleno.
7099 * src/lalr.c (initialize_F, transpose): Better variable locality
7100 to improve readability.
7101 Avoid variables used as mere abbreviations.
7102
7103 2001-12-05 Akim Demaille <akim@epita.fr>
7104
7105 * src/lalr.c (traverse): Use arrays instead of pointers.
7106
7107 2001-12-05 Akim Demaille <akim@epita.fr>
7108
7109 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7110 the handling of squeue.
7111 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7112
7113 2001-12-05 Akim Demaille <akim@epita.fr>
7114
7115 Because useless nonterminals are now kept alive (instead of being
7116 `destroyed'), we now sometimes examine them, and store information
7117 related to them. Hence we need to know their number, and adjust
7118 memory allocations.
7119
7120 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7121 static.
7122 * src/LR0.c (allocate_itemsets): The memory allocated to
7123 `symbol_count' was used for two different purpose: once to count
7124 the number of occurrences of each symbol, and later reassigned to
7125 `shift_symbol', containing the symbol that can be shifted from a
7126 given state.
7127 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7128 only, and...
7129 (new_itemsets): Allocate `shift_symbol' here.
7130 (allocate_itemsets): symbol_count includes useless nonterminals.
7131 Make room for them.
7132 (free_storage): Use `free', not `XFREE', for pointers that cannot
7133 be null.
7134
7135 2001-12-05 Akim Demaille <akim@epita.fr>
7136
7137 * src/nullable.c (set_nullable): Deobfuscate the handling of
7138 ritem.
7139 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7140
7141 2001-12-05 Akim Demaille <akim@epita.fr>
7142
7143 * src/gram.c, src/gram.h (ritem_print): New.
7144 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7145 (This useless function was defined only to work around VMS linkers
7146 that can't handle compilation units with variables only).
7147 * src/reduce.c (dump_grammar): Use it to trace the construction of
7148 ritem.
7149
7150 2001-12-04 Paul Eggert <eggert@twinsun.com>
7151
7152 * src/bison.simple (union yyalloc): Change member names
7153 to be the same as the stack names.
7154 (yyparse): yyptr is now union yyalloc *, not char *.
7155 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7156 and may generate better code on some machines.
7157 (yystpcpy): Use prototype if __STDC__ is defined, not just
7158 if __cplusplus is defined.
7159
7160 2001-11-30 Akim Demaille <akim@epita.fr>
7161
7162 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7163 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7164 Gettext doesn't compile cleanly, and dies with -Werror.
7165 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7166 Include WARNING_CFLAGS here.
7167 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7168 before being defined.
7169
7170 2001-11-27 Paul Eggert <eggert@twinsun.com>
7171
7172 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7173 First arg is int, not unsigned.
7174 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7175 (SIZE_MAX, UINT_MAX): New macros.
7176 (quotearg_n_options): Abort if N is negative.
7177 Avoid overflow check on hosts where size_t is 64 bits and int
7178 is 32 bits, as overflow is impossible there.
7179 Fix off-by-one typo that caused unnecessary reallocation.
7180
7181 2001-11-29 Paul Eggert <eggert@twinsun.com>
7182
7183 Name space cleanup in generated parser.
7184
7185 * doc/bison.texinfo (Bison Parser): Discuss system headers
7186 and their effect on the user name space.
7187
7188 * src/bison.simple:
7189 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7190 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7191 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7192
7193 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7194 on user names when possible.
7195
7196 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7197 Simplify test for whather <alloca.h> exists.
7198
7199 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7200
7201 (<stdio.h>): Include if YYDEBUG.
7202
7203 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7204 ! defined (yyoverflow) && ! defined (yymemcpy).
7205
7206 (yymemcpy, yyparse): Rename local variables as needed so that
7207 they all begin with 'yy'.
7208
7209 (yystrlen, yystpcpy): New functions.
7210
7211 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7212 All uses changed.
7213
7214 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7215 instead of relying on string.h functions. Use YYSTACK_ALLOC
7216 and YYSTACK_FREE instead of malloc and free.
7217
7218 2001-11-30 Akim Demaille <akim@epita.fr>
7219
7220 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7221 before their first uses.
7222 (YYBISON, YYPURE): Move to the top of the output.
7223
7224 2001-11-30 Akim Demaille <akim@epita.fr>
7225
7226 * tests/reduce.at (Useless Nonterminals): Fix.
7227
7228 2001-11-30 Akim Demaille <akim@epita.fr>
7229
7230 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7231 if body instead of `;' to pacify GCC's warnings.
7232
7233 2001-11-30 Akim Demaille <akim@epita.fr>
7234
7235 Instead of mapping the LHS of unused rules to -1, keep the LHS
7236 valid, but flag the rules as invalid.
7237
7238 * src/gram.h (rule_t): `useful' is a new member.
7239 * src/print.c (print_grammar): Adjust.
7240 * src/derives.c (set_derives): Likewise.
7241 * src/reader.c (packgram, reduce_output): Likewise.
7242 * src/reduce.c (reduce_grammar_tables): Likewise.
7243 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7244
7245 2001-11-30 Akim Demaille <akim@epita.fr>
7246
7247 * src/reduce.c (reduce_output): Formatting changes.
7248 * src/print.c (print_results, print_grammar): Likewise.
7249 * tests/regression.at (Rule Line Numbers)
7250 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7251
7252 2001-11-30 Akim Demaille <akim@epita.fr>
7253
7254 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7255 useless nonterminals, move them at the end of the symbol arrays.
7256 (reduce_output): Adjust.
7257 * tests/reduce.at (Useless Nonterminals): Adjust.
7258
7259 2001-11-30 Akim Demaille <akim@epita.fr>
7260
7261 * src/reduce.c: Various comment/formatting changes.
7262 (nonterminals_reduce): New, extracted from...
7263 (reduce_grammar_tables): here.
7264 (reduce_grammar): Call nonterminals_reduce.
7265
7266 2001-11-29 Paul Eggert <eggert@twinsun.com>
7267
7268 * src/bison.simple (YYSTACK_REALLOC): Remove.
7269 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7270 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7271 New macros.
7272 (union yyalloc): New type.
7273 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7274 an arbitrary restriction on hosts where size_t is wider than int.
7275
7276 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7277 a parser stack overflow. Allocate just one block of memory for all
7278 three stacks, instead of allocating three blocks; this typically is
7279 faster and reduces fragmentation.
7280
7281 Do not limit the number of items in the stack to a value that fits
7282 in 'int', as this is an arbitrary limit on hosts with 64-bit
7283 size_t and 32-bit int.
7284
7285 2001-11-29 Marc Autret <autret_m@epita.fr>
7286
7287 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7288 of defining YYERROR_VERBOSE.
7289 [AT_DATA]: $4 is now out of C declarations in the prologue.
7290
7291 2001-11-28 Marc Autret <autret_m@epita.fr>
7292
7293 * src/reader.c (parse_dquoted_param): New.
7294 (parse_skel_decl): Use it.
7295 * src/lex.h: Add its prototype.
7296 * src/lex.c (literalchar): Become not static.
7297
7298 2001-11-28 Marc Autret <autret_m@epita.fr>
7299
7300 * src/output.h: And put its extern declaration here.
7301 * src/output.c (error_verbose): Define here.
7302 (prepare): Echo name modification.
7303 * src/getargs.h: Clean its extern declaration.
7304 * src/getargs.c (error_verbose_flag): Remove.
7305 (getargs): Remove case 'e'.
7306 * src/options.c (option_table): 'error-verbose' is now seen as simple
7307 percent option.
7308 Include output.h.
7309
7310 * src/reader.c (read_declarations): Remove case tok_include.
7311 (parse_include_decl): Remove.
7312 * src/lex.h (token_t): Remove tok_include.
7313 * src/options.c (option_table): 'include' is now a simple command line
7314 option.
7315
7316 2001-11-28 Marc Autret <autret_m@epita.fr>
7317
7318 * src/bison.simple: Adjust muscle names.
7319 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7320 * src/output.c (prepare): s/_/-/ for the muscles names.
7321 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7322
7323 2001-11-28 Marc Autret <autret_m@epita.fr>
7324
7325 * src/bison.simple: Fix debug.
7326 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7327
7328 2001-11-28 Akim Demaille <akim@epita.fr>
7329
7330 * src/LR0.c (shifts_new): New.
7331 (save_shifts, insert_start_shift, augment_automaton): Use it.
7332
7333 2001-11-28 Akim Demaille <akim@epita.fr>
7334
7335 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7336 keep ruleno only.
7337
7338 2001-11-28 Akim Demaille <akim@epita.fr>
7339
7340 * src/closure.c (closure): Instead of looping over word in array
7341 then bits in words, loop over bits in array.
7342
7343 2001-11-28 Akim Demaille <akim@epita.fr>
7344
7345 * src/closure.c (closure): No longer optimize the special case
7346 where all the bits of `ruleset[r]' are set to 0, to make the code
7347 clearer.
7348
7349 2001-11-28 Akim Demaille <akim@epita.fr>
7350
7351 * src/closure.c (closure): `r' and `c' are new variables, used to
7352 de-obfuscate accesses to RULESET and CORE.
7353
7354 2001-11-28 Akim Demaille <akim@epita.fr>
7355
7356 * src/reduce.c (reduce_print): Use ngettext.
7357 (dump_grammar): Improve the trace accuracy.
7358
7359 2001-11-28 Akim Demaille <akim@epita.fr>
7360
7361 * src/reduce.c (dump_grammar): Don't translate trace messages.
7362
7363 2001-11-28 Akim Demaille <akim@epita.fr>
7364
7365 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7366 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7367 as all tags are free'ed afterwards.
7368 From Enrico Scholz.
7369
7370 2001-11-27 Paul Eggert <eggert@twinsun.com>
7371
7372 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7373 use alloca when we didn't want to, and vice versa.
7374
7375 2001-11-27 Marc Autret <autret_m@epita.fr>
7376
7377 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7378 initialization.
7379 * src/output.c (prepare): Remove its update.
7380
7381 2001-11-27 Marc Autret <autret_m@epita.fr>
7382
7383 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7384 Use %error-verbose.
7385
7386 2001-11-27 Marc Autret <autret_m@epita.fr>
7387
7388 * src/bison.simple: Remove YYERROR_VERBOSE using.
7389 Use %%error_verbose.
7390 (yyparse): Likewise.
7391 * src/output.c (prepare): Give its final value.
7392 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7393 * src/getargs.h: Add its extern declaration.
7394 * src/getargs.c (error_verbose_flag): New int.
7395 (getargs): Update to catch new case.
7396 * src/options.c (option_table): 'error-verbose' is a new option.
7397 (shortopts): Update.
7398
7399 2001-11-27 Akim Demaille <akim@epita.fr>
7400
7401 * src/system.h: Use intl/libgettext.h.
7402 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7403
7404 2001-11-27 Akim Demaille <akim@epita.fr>
7405
7406 * tests/torture.at (Exploding the Stack Size with Malloc):
7407 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7408
7409 2001-11-27 Akim Demaille <akim@epita.fr>
7410
7411 * src/files.c: Include error.h.
7412 Reported by Hans Aberg.
7413
7414 2001-11-26 Marc Autret <autret_m@epita.fr>
7415
7416 * src/reader.c (parse_include_decl): New, not yet implemented.
7417 (read_declarations): Add case tok_include.
7418 * src/getargs.h (include): Add its extern definition.
7419 * src/getargs.c (include): New const char *.
7420 (getargs): Add case '-I'.
7421 * src/options.c (option_table): Add include as command line and
7422 percent option.
7423 * src/lex.h (token_t): Add tok_include.
7424
7425 2001-11-26 Akim Demaille <akim@epita.fr>
7426
7427 * src/reader.c (readgram): Make sure rules for mid-rule actions
7428 have a lineno equal to that of their host rule.
7429 Reported by Hans Aberg.
7430 * tests/regression.at (Rule Line Numbers): New.
7431
7432 2001-11-26 Akim Demaille <akim@epita.fr>
7433
7434 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7435 size_ts.
7436
7437 2001-11-26 Akim Demaille <akim@epita.fr>
7438
7439 * src/complain.c, src/complain.h (error): Remove, provided by
7440 lib/error.[ch].
7441
7442 2001-11-26 Akim Demaille <akim@epita.fr>
7443
7444 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7445 issue an error message.
7446 * tests/regression.at (Invalid %directive): New.
7447 Reported by Hans Aberg.
7448
7449 2001-11-26 Akim Demaille <akim@epita.fr>
7450
7451 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7452 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7453
7454 2001-11-26 Akim Demaille <akim@epita.fr>
7455
7456 * src/conflicts.c (conflicts_print): Don't complain at all when
7457 there are no reduce/reduce conflicts, and as many shift/reduce
7458 conflicts as expected.
7459 * tests/regression.at (%expect right): Adjust.
7460
7461 2001-11-23 Akim Demaille <akim@epita.fr>
7462
7463 * lib/alloca.c: Update, from fileutils.
7464
7465 2001-11-23 Akim Demaille <akim@epita.fr>
7466
7467 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7468
7469 2001-11-23 Akim Demaille <akim@epita.fr>
7470
7471 * src/system.h: Include alloca.h.
7472 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7473
7474 2001-11-23 Akim Demaille <akim@epita.fr>
7475
7476 * src/print_graph.c (print_actions): Remove `rule', unused.
7477 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7478 pacify GCC's signed < unsigned warnings.
7479 * src/closure.c (itemsetsize): Likewise.
7480 * src/reader.c (symbol_list_new): Static.
7481
7482 2001-11-23 Akim Demaille <akim@epita.fr>
7483
7484 Attaching lineno to buckets is stupid, since only one copy of each
7485 symbol is kept, only the line of the first occurrence is kept too.
7486
7487 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7488 * src/reader.c (rline_allocated): Remove, unused.
7489 (symbol_list): Have a `line' member.
7490 (symbol_list_new): New.
7491 (readgram): Use it.
7492 * src/print.c (print_grammar): Output the rule line numbers.
7493 * tests/regression.at (Solved SR Conflicts)
7494 (Unresolved SR Conflicts): Adjust.
7495 Reported by Hans Aberg.
7496
7497 2001-11-22 Marc Autret <autret_m@epita.fr>
7498
7499 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7500
7501 2001-11-22 Marc Autret <autret_m@epita.fr>
7502
7503 * src/muscle_tab.c (muscle_init): Remove initialization of
7504 skeleton muscle.
7505 * src/output.c (output_master_parser): Do it here.
7506
7507 2001-11-20 Akim Demaille <akim@epita.fr>
7508
7509 * po/sv.po: New.
7510 * configure.in (ALL_LINGUAS): Adjust.
7511 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7512 longer contains strings to translate.
7513
7514 2001-11-19 Akim Demaille <akim@epita.fr>
7515
7516 * src/conflicts.c (conflicts_print): Add a missing \n.
7517
7518 2001-11-19 Akim Demaille <akim@epita.fr>
7519
7520 * src/nullable.c (nullable_print): New.
7521 (set_nullable): Call it when tracing.
7522 Better locality of variables.
7523
7524 2001-11-19 Akim Demaille <akim@epita.fr>
7525
7526 * src/print.c (print_actions): Better locality of variables.
7527
7528 2001-11-19 Akim Demaille <akim@epita.fr>
7529
7530 * src/derives.c (print_derives): Fix and enrich.
7531 * src/closure.c (print_fderives): Likewise.
7532
7533 2001-11-19 Akim Demaille <akim@epita.fr>
7534
7535 * src/closure.c (itemsetend): Remove, replaced with...
7536 (itemsetsize): new.
7537
7538 2001-11-19 Akim Demaille <akim@epita.fr>
7539
7540 * src/LR0.c (kernel_end): Remove, replaced with...
7541 (kernel_size): new.
7542
7543 2001-11-19 Akim Demaille <akim@epita.fr>
7544
7545 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7546 to clarify.
7547
7548 2001-11-19 Akim Demaille <akim@epita.fr>
7549
7550 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7551
7552 2001-11-19 Akim Demaille <akim@epita.fr>
7553
7554 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7555 trace messages.
7556 * src/LR0.c: Likewise.
7557 (allocate_itemsets): Use arrays instead of pointers to clarify.
7558
7559 2001-11-19 Akim Demaille <akim@epita.fr>
7560
7561 * src/getargs.c (statistics_flag): Replace with...
7562 (trace_flag): New.
7563 (longopts): Accept --trace instead of --statistics.
7564 * src/getargs.h, src/options.c: Adjust.
7565 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7566 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7567
7568 2001-11-19 Akim Demaille <akim@epita.fr>
7569
7570 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7571 pointers to clarify the code.
7572 (save_reductions, save_shifts): Factor common parts of alternatives.
7573
7574 2001-11-19 Akim Demaille <akim@epita.fr>
7575
7576 * src/LR0.c (new_state, get_state): Complete TRACE code.
7577 * src/closure.c: Include `reader.h' to get `tags', needed by the
7578 trace code.
7579 Rename the conditional DEBUG as TRACE.
7580 Output consistently TRACEs to stderr, not stdout.
7581 * src/derives.c: Likewise.
7582 * src/reduce.c: (inaccessable_symbols): Using if is better style
7583 than goto.
7584 Use `#if TRACE' instead of `#if 0' for tracing code.
7585
7586 2001-11-19 Akim Demaille <akim@epita.fr>
7587
7588 * src/system.h (LIST_FREE, shortcpy): New.
7589 * src/LR0.c: Use them.
7590 * src/output.c (free_itemsets, free_reductions, free_shifts):
7591 Remove, replaced by LIST_FREE.
7592
7593 2001-11-19 Akim Demaille <akim@epita.fr>
7594
7595 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7596 (REDUCTIONS_ALLOC): New.
7597 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7598 allocation.
7599
7600 2001-11-19 Akim Demaille <akim@epita.fr>
7601
7602 * src/LR0.c (new_state): Complete trace code.
7603 * src/nullable.c (set_nullable): Don't translate traces.
7604
7605 2001-11-19 Akim Demaille <akim@epita.fr>
7606
7607 * src/print_graph.c (print_core): Better locality of variables.
7608 * src/print.c (print_core): Likewise.
7609
7610 2001-11-19 Akim Demaille <akim@epita.fr>
7611
7612 * src/vcg.c: You do the output, so you are responsible of the
7613 handling of VCG syntax, in particular: use quotearg.
7614 * src/print_graph.c: Don't.
7615 (print_actions): Don't output the actions as part of the nodes,
7616 since that's the job of the edges.
7617 (print_state): Don't output by hand: fill the node description,
7618 and ask for its output.
7619
7620 2001-11-19 Akim Demaille <akim@epita.fr>
7621
7622 * src/bison.simple (yyparse): When verbosely reporting an error,
7623 no longer put additional quotes around token names.
7624 * tests/calc.at: Adjust.
7625
7626 2001-11-19 Akim Demaille <akim@epita.fr>
7627
7628 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7629 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7630 * src/output.c: Adjust.
7631
7632 2001-11-19 Akim Demaille <akim@epita.fr>
7633
7634 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7635 (rule_t): this.
7636 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7637
7638 2001-11-19 Akim Demaille <akim@epita.fr>
7639
7640 * src/gram.h (rule_t): New.
7641 (rule_table): New.
7642 (rrhs, rlhs): Remove, part of state_t.
7643 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7644 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7645 * src/reader.c, src/reduce.c: Adjust.
7646
7647 2001-11-19 Akim Demaille <akim@epita.fr>
7648
7649 * src/reader.c (symbols_output): New, extracted from...
7650 (packsymbols): Here.
7651 (reader): Call it.
7652
7653 2001-11-19 Akim Demaille <akim@epita.fr>
7654
7655 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7656 (maxrhs): this new function.
7657
7658 2001-11-19 Akim Demaille <akim@epita.fr>
7659
7660 * src/lalr.c (F): New macro to access the variable F.
7661 Adjust.
7662
7663 2001-11-19 Akim Demaille <akim@epita.fr>
7664
7665 * src/lalr.h (LA): New macro to access the variable LA.
7666 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7667 * src/lalr.c: Adjust.
7668
7669 2001-11-19 Akim Demaille <akim@epita.fr>
7670
7671 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7672 (set_state_table): handle the `lookaheads' members.
7673
7674 2001-11-19 Akim Demaille <akim@epita.fr>
7675
7676 * src/lalr.h (lookaheads): Removed array, whose contents is now
7677 a member of...
7678 (state_t): this structure.
7679 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7680 Adjust.
7681
7682 2001-11-19 Akim Demaille <akim@epita.fr>
7683
7684 * src/lalr.h (consistent): Removed array, whose contents is now
7685 a member of...
7686 (state_t): this structure.
7687 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7688 Adjust.
7689
7690 2001-11-19 Akim Demaille <akim@epita.fr>
7691
7692 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7693 contents are now members of...
7694 (state_t): this structure.
7695 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7696 Adjust.
7697
7698 2001-11-19 Akim Demaille <akim@epita.fr>
7699
7700 * src/lalr.h (state_t): New.
7701 (state_table): Be a state_t * instead of a core **.
7702 (accessing_symbol): Remove, part of state_t.
7703 * src/lalr.c: Adjust.
7704 (set_accessing_symbol): Merge into...
7705 (set_state_table): this.
7706 * src/print_graph.c, src/conflicts.c: Adjust.
7707
7708 2001-11-14 Akim Demaille <akim@epita.fr>
7709
7710 * tests/calc.at, tests/output.at, tests/regression.at,
7711 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7712 now the tests are run in private dirs, therefore AC_CLEANUP and
7713 family can be simplified to 0-ary.
7714 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7715 use abs. path to find config.h.
7716 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7717 stderr, there can be way too much random noise.
7718 Instead pass -Werror to GCC and rely on the exit status.
7719 Reported by Wolfram Wagner.
7720
7721 2001-11-14 Akim Demaille <akim@epita.fr>
7722
7723 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7724 defined only if yyoverflow is defined, to avoid `warning: unused
7725 variable `yyvs1''.
7726 Reported by The Test Suite.
7727
7728 2001-11-14 Akim Demaille <akim@epita.fr>
7729
7730 * src/print.c: Include reduce.h.
7731 Reported by Hans Aberg.
7732
7733 2001-11-14 Akim Demaille <akim@epita.fr>
7734
7735 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7736 Revert a previous patch: these are really const.
7737 * src/conflicts.c (conflict_report): Additional useless pair of
7738 braces to pacify GCC's warnings for `if () if () {} else {}'.
7739 * src/lex.c (parse_percent_token): Replace equal_offset with
7740 arg_offset.
7741 arg is const.
7742 Be sure to strdup `arg' when used, since there is no reason for
7743 token_buffer not to change.
7744
7745 2001-11-14 Akim Demaille <akim@epita.fr>
7746
7747 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7748 definition.
7749 * src/main.c (main): Use them.
7750 Suggested by Hans Aberg.
7751
7752 2001-11-12 Akim Demaille <akim@epita.fr>
7753
7754 * src/system.h (ngettext): Now that we use ngettext, be sure to
7755 provide a default definition when NLS are not used.
7756
7757 2001-11-12 Akim Demaille <akim@epita.fr>
7758
7759 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7760 Use @kbd to denote user input.
7761 (Language and Grammar): ANSIfy the example.
7762 Adjust its layout for info/notinfo.
7763 (Location Tracking Calc): Output error messages to stderr.
7764 Output locations in a more GNUtically correct way.
7765 Fix a couple of Englishos.
7766 Adjust @group/@end group pairs.
7767
7768 2001-11-12 Akim Demaille <akim@epita.fr>
7769
7770 %expect was not functioning at all.
7771
7772 * src/conflicts.c (expected_conflicts): Set to -1.
7773 (conflict_report): Use ngettext.
7774 (conflicts_print): Check %expect and make its violation an error.
7775 * doc/bison.texinfo (Expect Decl): Adjust.
7776 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7777 * tests/regression.at (%expect not enough, %expect right)
7778 (%expect too much): New.
7779
7780 2001-11-12 Akim Demaille <akim@epita.fr>
7781
7782 * tests/regression.at (Conflicts): Rename as...
7783 (Unresolved SR Conflicts): this.
7784 (Solved SR Conflicts): New.
7785
7786 2001-11-12 Akim Demaille <akim@epita.fr>
7787
7788 * src/reduce.c (print_results): Rename as...
7789 (reduce_output): This.
7790 Output to OUT, passed as argument, instead of output_obstack.
7791 (dump_grammar): Likewise.
7792 (reduce_free): New.
7793 Also free V1.
7794 (reduce_grammar): No longer call reduce_output, since...
7795 * src/print.c (print_results): do it.
7796 * src/main.c (main): Call reduce_free;
7797
7798 2001-11-12 Akim Demaille <akim@epita.fr>
7799
7800 * src/conflicts.c (print_reductions): Accept OUT as argument.
7801 Output to it, not to output_obstack.
7802 * src/print.c (print_actions): Adjust.
7803
7804 2001-11-12 Akim Demaille <akim@epita.fr>
7805
7806 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7807 the result instead of using...
7808 (src_total, rrc_total, src_count, rrc_count): Remove.
7809 (any_conflicts): Remove.
7810 (print_conflicts): Split into...
7811 (conflicts_print, conflicts_output): New.
7812 * src/conflicts.h: Adjust.
7813 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7814 * src/print.c (print_grammar): Issue `\n' between two rules.
7815 * tests/regression.at (Conflicts): New.
7816 Reported by Tom Lane.
7817
7818 2001-11-12 Akim Demaille <akim@epita.fr>
7819
7820 * tests/regression.at (Invalid input): Remove, duplicate with
7821 ``Invalid input: 1''.
7822
7823 2001-11-12 Akim Demaille <akim@epita.fr>
7824
7825 * tests/torture.at (AT_DATA_STACK_TORTURE)
7826 (Exploding the Stack Size with Alloca)
7827 (Exploding the Stack Size with Malloc): New.
7828
7829 2001-11-12 Akim Demaille <akim@epita.fr>
7830
7831 * src/bison.simple (YYSTACK_REALLOC): New.
7832 (yyparse) [!yyoverflow]: Use it and free the old stack.
7833 Reported by Per Allansson.
7834
7835 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7836
7837 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7838 define CPP macro, which substitute YYSTYPE by yystype.
7839 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7840 with yyltype/YYLTYPE. This allows inclusion of the generated
7841 header within the parser if the compiler, such as GGC, accepts
7842 multiple equivalent #defines.
7843 From Akim.
7844
7845 2001-11-05 Akim Demaille <akim@epita.fr>
7846
7847 * src/reader.c (symbols_output): New, extracted from...
7848 (packsymbols): here.
7849 (reader): Adjust.
7850
7851 2001-11-05 Akim Demaille <akim@epita.fr>
7852
7853 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7854
7855 2001-11-05 Akim Demaille <akim@epita.fr>
7856
7857 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7858 pattern.
7859
7860 2001-11-05 Akim Demaille <akim@epita.fr>
7861
7862 * src/options.h (struct option_table_struct): set_flags is void*.
7863 * src/options.c (longopts): Support `--output' and `%output'.
7864 (usage): Adjust.
7865 * src/lex.h (tok_setopt): Remove, replaced with...
7866 (tok_intopt, tok_stropt): these new guys.
7867 * src/lex.c (getopt.h): Not needed.
7868 (token_buffer, unlexed_token_buffer): Not const.
7869 (percent_table): Promote `-' over `_' in directive names.
7870 Active `%name-prefix', `file-prefix', and `output'.
7871 (parse_percent_token): Accept possible arguments to directives.
7872 Promote `-' over `_' in directive names.
7873
7874 2001-11-04 Akim Demaille <akim@epita.fr>
7875
7876 * doc/bison.texinfo (Decl Summary): Split the list into
7877 `directives for grammars' and `directives for bison'.
7878 Sort'em.
7879 Add description of `%name-prefix', `file-prefix', and `output'.
7880 Promote `-' over `_' in directive names.
7881 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7882 Simplify the description of `--name-prefix'.
7883 Promote `-' over `_' in directive names.
7884 Promote `--output' over `--output-file'.
7885 Fix the description of `--defines'.
7886 * tests/output.at: Exercise %file-prefix and %output.
7887
7888 2001-11-02 Akim Demaille <akim@epita.fr>
7889
7890 * doc/refcard.tex: Update.
7891
7892 2001-11-02 Akim Demaille <akim@epita.fr>
7893
7894 * src/symtab.h (SUNDEF): New.
7895 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7896 stand for `uninitialized', instead of 0.
7897 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7898 * src/lex.c (lex): Adjust.
7899
7900 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7901 Number it 0.
7902 Let yylex return it instead of a plain 0.
7903 Reported by Dick Streefland.
7904
7905 2001-11-02 Akim Demaille <akim@epita.fr>
7906
7907 * tests/regression.at (Mixing %token styles): New test.
7908
7909 2001-11-02 Akim Demaille <akim@epita.fr>
7910
7911 * src/reader.c (parse_thong_decl): Formatting changes.
7912 (token_translations_init): New, extracted from...
7913 (packsymbols): Here.
7914 Adjust.
7915
7916 2001-11-01 Akim Demaille <akim@epita.fr>
7917
7918 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7919 Check that `9foo.y' produces correct cpp guards.
7920 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7921 guards.
7922 Reported by Wwp.
7923
7924 2001-11-01 Akim Demaille <akim@epita.fr>
7925
7926 * tests/regression.at (Invalid input: 2): New.
7927 * src/lex.c (unlexed_token_buffer): New.
7928 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7929 too.
7930 Reported by Wwp.
7931
7932 2001-11-01 Akim Demaille <akim@epita.fr>
7933
7934 * tests/calc.at: Catch up with 1.30.
7935 * configure.in: Bump to 1.49a.
7936 Adjust to newer Autotest.
7937
7938 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7939
7940 * src/conflicts.c: Move global variables rrc_total and src_total ...
7941 (print_conflicts): here.
7942 * src/output.c (output): Free global variable user_toknums.
7943 * src/lex.c (token_obstack): Become static.
7944
7945 2001-10-18 Akim Demaille <akim@epita.fr>
7946
7947 * tests/atlocal.in (GCC): Add.
7948 * tests/calc.at: s/m4_match/m4_bmatch/.
7949 s/m4_patsubst/m4_bpatsubst/.
7950 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7951 * configure.in: AC_SUBST(GCC).
7952
7953 2001-10-14 Marc Autret <autret_m@epita.fr>
7954
7955 * src/options.c (create_long_option_table): Fix.
7956
7957 2001-10-10 Akim Demaille <akim@epita.fr>
7958
7959 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7960
7961 2001-10-04 Akim Demaille <akim@epita.fr>
7962
7963 * src/reader.c (parse_union_decl): Push the caracters in
7964 union_obstack, not attrs_obstack.
7965
7966 2001-10-04 Akim Demaille <akim@epita.fr>
7967
7968 Merge in the branch 1.29.
7969
7970 * src/reader.c (packsymbols): Use a temporary obstack for
7971 `%%tokendef', since output_stack is already used elsewhere.
7972
7973 2001-10-02 Akim Demaille <akim@epita.fr>
7974
7975 Bump 1.29d.
7976
7977 2001-10-02 Akim Demaille <akim@epita.fr>
7978
7979 Version 1.29c.
7980
7981 2001-10-02 Akim Demaille <akim@epita.fr>
7982
7983 * tests/regression.at (Invalid CPP headers): New.
7984 From Alexander Belopolsky.
7985 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7986
7987 2001-10-02 Akim Demaille <akim@epita.fr>
7988
7989 * tests/regression.at (Invalid input): New.
7990 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7991 Reported by Shura.
7992
7993 2001-10-02 Akim Demaille <akim@epita.fr>
7994
7995 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7996
7997 2001-10-02 Akim Demaille <akim@epita.fr>
7998
7999 * src/output.c (output_parser): Assert `skeleton'.
8000 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8001 systems.
8002 From Shura.
8003
8004 2001-10-01 Marc Autret <autret_m@epita.fr>
8005
8006 * src/lex.h: Echo modifications.
8007 * src/lex.c (unlex): Parameter is now token_t.
8008 From Hans Aberg.
8009
8010 2001-10-01 Marc Autret <autret_m@epita.fr>
8011
8012 * src/main.c: Include lex.h.
8013 From Hans Aberg.
8014
8015 2001-09-29 Akim Demaille <akim@epita.fr>
8016
8017 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8018
8019 2001-09-28 Akim Demaille <akim@epita.fr>
8020
8021 * tests/testsuite.at: Update to newer Autotest.
8022 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8023
8024 2001-09-27 Akim Demaille <akim@epita.fr>
8025
8026 Position independent wrapper.
8027
8028 * tests/bison: Remove.
8029 * tests/bison.in: New.
8030 * configure.in: Adjust.
8031
8032 2001-09-27 Paul Eggert <eggert@twinsun.com>
8033
8034 Port quotearg fixes from tar 1.13.24.
8035
8036 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8037 tm to be declared.
8038 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8039 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8040
8041 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8042 * m4/mbrtowc.m4: New file.
8043 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8044 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8045
8046 2001-09-27 Akim Demaille <akim@epita.fr>
8047
8048 Bump to 1.29c.
8049
8050 2001-09-27 Akim Demaille <akim@epita.fr>
8051
8052 Version 1.29b.
8053
8054 2001-09-25 Akim Demaille <akim@epita.fr>
8055
8056 * src/system.h: Include `xalloc.h'.
8057 Remove it from the C files.
8058 * src/files.c (output_files): Free the obstacks.
8059 * src/lex.c (init_lex): Rename as...
8060 (lex_init): this.
8061 (lex_free): New.
8062 * src/main.c (main): Use it.
8063
8064 2001-09-24 Marc Autret <autret_m@epita.fr>
8065
8066 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8067 to output informations in fout (FILE*).
8068 (open_graph, close_graph): Likewise.
8069 (output_graph, output_edge, output_node): Likewise.
8070 * src/vcg.h: Update function prototypes.
8071 * src/print_graph.c (print_graph): Open output graph file.
8072 (print_actions): Adjust.
8073 * src/files.h: Remove extern declaration.
8074 * src/files.c: Remove graph_obstack declaration.
8075 (open_files): Remove graph_obstack initialization.
8076 (output_files): Remove graph_obstack saving.
8077
8078 2001-09-24 Marc Autret <autret_m@epita.fr>
8079
8080 * src/files.c (compute_output_file_names): Fix.
8081
8082 2001-09-24 Marc Autret <autret_m@epita.fr>,
8083 Akim Demaille <akim@epita.fr>
8084
8085 * src/reader.c (reader): Remove call to free_symtab ().
8086 * src/main.c (main): Call it here.
8087 Include symtab.h.
8088 * src/conflicts.c (initialize_conflicts): Rename as...
8089 (solve_conflicts): this.
8090 * src/print.c (print_core, print_actions, print_state)
8091 (print_grammar): Dump to a file instead a `output_obstack'.
8092 (print_results): Dump `output_obstack', and then proceed with the
8093 FILE *.
8094 * src/files.c (compute_output_file_names, close_files): New.
8095 (output_files): Adjust.
8096 * src/main.c (main): Adjust.
8097
8098 2001-09-23 Marc Autret <autret_m@epita.fr>
8099
8100 * src/files.c (compute_header_macro): Computes header macro name
8101 from spec_defines_file when given.
8102
8103 2001-09-23 Marc Autret <autret_m@epita.fr>
8104
8105 * src/files.c (output_files): Add default extensions.
8106
8107 2001-09-22 Akim Demaille <akim@epita.fr>
8108
8109 * src/conflicts.c (finalize_conflicts): Rename as...
8110 (free_conflicts): this.
8111
8112 2001-09-22 Akim Demaille <akim@epita.fr>
8113
8114 * src/gram.c (gram_free): Rename back as...
8115 (dummy): this.
8116 (output_token_translations): Free `token_translations'.
8117 * src/symtab.c (free_symtab): Free the tag field.
8118
8119 2001-09-22 Akim Demaille <akim@epita.fr>
8120
8121 Remove `translations' as it is always set to true.
8122
8123 * src/gram.h: Adjust.
8124 * src/reader.c (packsymbols, parse_token_decl): Adjust
8125 * src/print.c (print_grammar): Adjust.
8126 * src/output.c (output_token_translations): Adjust.
8127 * src/lex.c (lex): Adjust.
8128 * src/gram.c: Be sure the set pointers to NULL.
8129 (dummy): Rename as...
8130 (gram_free): this.
8131
8132 2001-09-22 Akim Demaille <akim@epita.fr>
8133
8134 * configure.in: Invoke AM_LIB_DMALLOC.
8135 * src/system.h: Use dmalloc.
8136 * src/LR0.c: Be sure to have pointers initialized to NULL.
8137 (allocate_itemsets): Allocate kernel_items only if needed.
8138
8139 2001-09-22 Akim Demaille <akim@epita.fr>
8140
8141 * configure.in: Bump to 1.29b.
8142 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8143 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8144 need xmalloc.c in calc.y.
8145 From Pascal Bart.
8146
8147 2001-09-21 Akim Demaille <akim@epita.fr>
8148
8149 Version 1.29a.
8150 * Makefile.maint, config/config.guess, config/config.sub,
8151 * config/missing: Update from masters.
8152 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8153 upon package.m4.
8154 * configure.in (ALL_LINGUAS): Add `tr'.
8155
8156 2001-09-21 Akim Demaille <akim@epita.fr>
8157
8158 * tests/Makefile.am (package.m4): Move to...
8159 ($(srcdir)/$(TESTSUITE)): here.
8160
8161 2001-09-20 Akim Demaille <akim@epita.fr>
8162
8163 * src/complain.c: No longer try to be standalone: use system.h.
8164 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8165 * src/complain.h: Likewise.
8166 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8167 Remove the unused variable `n'.
8168 From Albert Chin-A-Young.
8169
8170 2001-09-18 Marc Autret <autret_m@epita.fr>
8171
8172 * doc/bison.1: Update.
8173 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8174 descriptions.
8175 (Option Cross Key): Update.
8176 Add --graph.
8177
8178 2001-09-18 Marc Autret <autret_m@epita.fr>
8179
8180 * tests/regression.at: New test (comment in %union).
8181
8182 2001-09-18 Marc Autret <autret_m@epita.fr>
8183
8184 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8185 do that.
8186 Reported by Keith Browne.
8187
8188 2001-09-18 Marc Autret <autret_m@epita.fr>
8189
8190 * tests/output.at: Add tests for --defines and --graph.
8191
8192 2001-09-18 Marc Autret <autret_m@epita.fr>
8193
8194 * tests/output.at: Removes tests of %{header,src}_extension features.
8195
8196 2001-09-18 Akim Demaille <akim@epita.fr>
8197
8198 * tests/Makefile.am (package.m4): New.
8199 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8200 (_AT_CHECK_CALC_ERROR): Likewise.
8201 Factor the `, ' part of verbose error messages.
8202
8203 2001-09-18 Marc Autret <autret_m@epita.fr>
8204
8205 * src/getargs.c (longopts): Declare --defines and --graph as options
8206 with optional arguments.
8207 * src/files.h: Add extern declarations.
8208 * src/files.c (spec_graph_file, spec_defines_file): New.
8209 (output_files): Update.
8210 Remove CPP-outed code.
8211
8212 2001-09-18 Marc Autret <autret_m@epita.fr>
8213
8214 Turn off %{source,header}_extension feature.
8215
8216 * src/files.c (compute_exts_from_gf): Update.
8217 (compute_exts_from_src): Update.
8218 (output_files): CPP-out useless code.
8219 * src/files.h: Remove {header,source}_extension extern declarations.
8220 * src/reader.c (parse_dquoted_param): CPP-out.
8221 (parse_header_extension_decl): Remove.
8222 (parse_source_extension_decl): Remove.
8223 (read_declarations): Remove cases tok_{hdrext,srcext}.
8224 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8225 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8226
8227 2001-09-10 Akim Demaille <akim@epita.fr>
8228
8229 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8230 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8231 (AT_CHECK_OUTPUT): this.
8232 Merely check ls' exit status, its output is useless.
8233
8234 2001-09-10 Akim Demaille <akim@epita.fr>
8235
8236 * tests/calc.at: Use m4_match.
8237 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8238
8239 2001-09-10 Marc Autret <autret_m@epita.fr>,
8240 Akim Demaille <akim@epita.fr>
8241
8242 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8243 enum color_e.
8244 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8245 to `normal'.
8246 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8247 * src/lex.h: Adjust prototype.
8248 (token_t): Add `tok_undef'.
8249 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8250 (parse_percent_token): Now returns token_t.
8251 Add default statement in switch.
8252 (lex): Separate `c' as an input variable, from the token_t result
8253 part.
8254 (unlexed): Is a token_t.
8255
8256 2001-09-10 Akim Demaille <akim@epita.fr>
8257
8258 * configure.in: Bump to 1.29a.
8259
8260 2001-09-07 Akim Demaille <akim@epita.fr>
8261
8262 Version 1.29.
8263
8264 2001-08-30 Akim Demaille <akim@epita.fr>
8265
8266 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8267 * m4/atconfig.m4: Remove.
8268 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8269 * tests/bison: New.
8270 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8271 m4_if, m4_patsubst, and m4_regexp.
8272 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8273 `input' file instead of echo.
8274
8275 2001-08-29 Akim Demaille <akim@epita.fr>
8276
8277 Bump to 1.28e.
8278
8279 2001-08-29 Akim Demaille <akim@epita.fr>
8280
8281 Version 1.28d.
8282
8283 2001-08-29 Paul Eggert <eggert@twinsun.com>
8284
8285 * src/bison.simple (yyparse): Don't take the address of an
8286 item before the start of an array, as that doesn't conform to
8287 the C Standard.
8288
8289 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8290
8291 * doc/bison.texinfo (Location Tracking Calc): New node.
8292
8293 2001-08-29 Paul Eggert <eggert@twinsun.com>
8294
8295 * src/output.c (output): Do not define const, as this now
8296 causes more problems than it cures.
8297
8298 2001-08-29 Akim Demaille <akim@epita.fr>
8299
8300 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8301 the nodes.
8302 Be sure to tag the `detailmenu'.
8303
8304 2001-08-29 Akim Demaille <akim@epita.fr>
8305
8306 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8307 download in a tmp dir.
8308
8309 2001-08-28 Marc Autret <autret_m@epita.fr>
8310
8311 * config/depcomp: New file.
8312
8313 2001-08-28 Marc Autret <autret_m@epita.fr>
8314
8315 * doc/bison.1 (mandoc): Adjust.
8316 From Juan Manuel Guerrero.
8317
8318 2001-08-28 Marc Autret <autret_m@epita.fr>
8319
8320 * src/print_graph.c (print_state): Fix.
8321
8322 2001-08-27 Marc Autret <autret_m@epita.fr>
8323
8324 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8325 char * members.
8326 Echo modifications to the functions prototypes.
8327 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8328
8329 2001-08-27 Marc Autret <autret_m@epita.fr>
8330
8331 * src/vcg.c: Include `xalloc.h'.
8332 (add_colorentry): New.
8333 (add_classname): New.
8334 (add_infoname): New.
8335 * src/vcg.h: Add new prototypes.
8336
8337 2001-08-27 Akim Demaille <akim@epita.fr>
8338
8339 * Makefile.maint: Sync. again with CVS Autoconf.
8340
8341 2001-08-27 Akim Demaille <akim@epita.fr>
8342
8343 * Makefile.maint: Formatting changes.
8344 (po-update, cvs-update, update): New targets.
8345 (AMTAR): Remove.
8346
8347 2001-08-27 Akim Demaille <akim@epita.fr>
8348
8349 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8350 * Makefile.maint: Sync. with CVS Autoconf.
8351
8352 2001-08-27 Marc Autret <autret_m@epita.fr>
8353
8354 * src/vcg.h (struct infoname_s): New.
8355 (struct colorentry_s): New.
8356 (graph_s): New fields {vertical,horizontal}_order in structure.
8357 Add `infoname' field.
8358 Add `colorentry' field;
8359 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8360 (G_HORIZONTAL_ORDER): New.
8361 (G_INFONAME): New.
8362 (G_COLORENTRY): New.
8363 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8364 Add output of `infoname'.
8365 Add output of `colorentry'.
8366
8367 2001-08-27 Marc Autret <autret_m@epita.fr>
8368
8369 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8370 This one shadowed a global parameter.
8371
8372 2001-08-24 Marc Autret <autret_m@epita.fr>
8373
8374 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8375 instead of `unsigned'.
8376 (print_state): Do not call obstack_object_size () in obstack_grow ()
8377 to avoid macro variables shadowing.
8378
8379 2001-08-23 Marc Autret <autret_m@epita.fr>
8380
8381 * src/lex.c (percent_table): Typo: s/naem/name/.
8382 Add graph option.
8383 Normalize new options declarations.
8384
8385 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8386
8387 * tests/suite.at: Exercise %header_extension and %source_extension.
8388
8389 2001-08-16 Marc Autret <autret_m@epita.fr>
8390
8391 * src/reader.c (parse_dquoted_param): New.
8392 (parse_header_extension_decl): Use it.
8393 (parse_source_extension_decl): Likewise.
8394
8395 2001-08-16 Marc Autret <autret_m@epita.fr>
8396
8397 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8398 (get_xxxx_str): Use assert () instead of complain ().
8399 Remove return invokations in default cases.
8400 (get_decision_str): Modify default behaviour. Remove second argument.
8401 Echo modifications on calls.
8402 (output_graph): Fix.
8403
8404 2001-08-16 Marc Autret <autret_m@epita.fr>
8405
8406 * src/getargs.c (usage): Update with ``-g, --graph''.
8407
8408 2001-08-16 Marc Autret <autret_m@epita.fr>
8409
8410 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8411 (Option Cross Key): Likewise.
8412 * doc/bison.1: Update.
8413
8414 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8415
8416 * src/output.c (output_master_parser): Don't finish action_obstack.
8417 (output_parser): Don't care about the muscle action, here.
8418 (prepare): Copy the action_obstack in the action muscle.
8419 (output): Free action_obstack.
8420
8421 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8422
8423 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8424 will contain `%union' declaration.
8425 (parse_union_decl): Delete #line directive output.
8426 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8427 informations about %union.
8428 (parse_union_decl): Copy the union_obstack in the muscle stype.
8429 * src/bison.simple: Add new #line directive.
8430 Add typdef %%stype YYSTYPE.
8431
8432 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8433
8434 * src/bison.simple: Add new `#line' directive.
8435
8436 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8437
8438 * src/bison.simple: New `#line' directive.
8439 * src/output.c (output_parser): Support new dynamic muscle input_line.
8440
8441 2001-09-22 Marc Autret <autret_m@epita.fr>
8442
8443 * src/output.c (output_master_parser): New.
8444 (output_parser): Be more re-entrant.
8445
8446 2001-09-21 Marc Autret <autret_m@epita.fr>
8447
8448 * src/reader.c (copy_definition, parse_union_decl): Update and use
8449 `linef' muscle.
8450 (copy_action): Likewise.
8451 Use obstack_1grow ().
8452 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8453
8454 2001-09-21 Marc Autret <autret_m@epita.fr>
8455
8456 * src/options.c (option_table): Adjust.
8457 * src/lex.c (parse_percent_token): Fix.
8458
8459 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8460
8461 * src/options.c (symtab.h): Include it, need by lex.h.
8462
8463 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8464
8465 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8466 is now an option_table_struct*.
8467 (option_strcmp): New function option_strcmp.
8468 (parse_percent_token): Call option_strcmp.
8469 * src/getargs.c (xalloc.h, options.h): Include it.
8470 (getargs): Call create_long_option_table.
8471 (getargs): Free longopts at the end of the function.
8472 (shortopts): Move in options.c.
8473 * src/options.c (create_long_option_table): New function. Convert
8474 information from option_table to option structure.
8475 * src/reader.c (options.h): Include it.
8476
8477 * src/Makefile.am: Adjust.
8478 * src/options.c (option_table): Create from longopts and percent_table.
8479 * src/getargs.c (longopts): Delete.
8480 * src/lex.c (struct percent_table_struct): Delete.
8481 (percent_table): Delete.
8482 (options.h): Include it.
8483 * src/options.c: Create.
8484 * src/options.h: Create.
8485 Declare enum opt_access_e.
8486 Define struct option_table_struct.
8487
8488 2001-09-20 Marc Autret <autret_m@epita.fr>
8489
8490 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8491 sections of Bison.
8492
8493 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8494
8495 * src/bison.simple: s/%%filename/%%skeleton.
8496 * src/muscle_tab.c (getargs.h): Include it.
8497 (muscle_init): Insert new muscle skeleton.
8498
8499 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8500
8501 * src/output.c (output_parser): Delete unused variable actions_dumped.
8502
8503 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8504
8505 * src/output.c (output): Delete call to reader_output_yylsp.
8506 * src/reader.c (reader): Likewise.
8507 * src/reader.h: Delete declaration of reader_output_yylsp.
8508
8509 2001-09-02 Marc Autret <autret_m@epita.fr>
8510
8511 * src/reader.c: Include muscle_tab.h.
8512 (parse_union_decl): Update.
8513 (parse_macro_decl): Rename parse_muscle_decl.
8514 Update to use renamed functions and variable.
8515 (read_declarations, copy_action, read_additionnal_code, : Updated
8516 with correct variables and functions names.
8517 (packsymbols, reader): Likewise.
8518
8519 * src/reader.h (muscle_obstack): Extern declaration update.
8520
8521 * src/output.c: Include muscle_tab.h
8522 In all functions using macro_insert, change by using muscle_insert ().
8523 (macro_obstack): Rename muscle_obstack.
8524 Echo modifications in the whole file.
8525 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8526 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8527 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8528
8529 * src/muscle_tab.h: Update double inclusion macros.
8530 (macro_entry_s): Rename muscle_entry_s.
8531 Update prototypes.
8532
8533 * src/muscle_tab.c: Include muscle_tab.h.
8534 Rename macro_tabble to muscle_table.
8535 (mhash1, mhash2, mcmp): Use muscle_entry.
8536 (macro_init): Rename muscle_init. Update.
8537 (macro_insert): Rename muscle_insert. Update.
8538 (macro_find): Rename muscle_find. Update.
8539
8540 * src/main.c: Include muscle_tab.h.
8541 (main): Call muscle_init ().
8542 * src/Makefile.am (bison_SOURCES): Echo modifications.
8543
8544 2001-09-02 Marc Autret <autret_m@epita.fr>
8545
8546 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8547
8548 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8549
8550 2001-09-02 Marc Autret <autret_m@epita.fr>
8551
8552 * src/macrotab.c, src/macrotab.h: Remove.
8553
8554 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8555
8556 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8557 filename.
8558
8559 2001-09-01 Marc Autret <autret_m@epita.fr>
8560
8561 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8562 to an explicit value to activate the feature. We do it here.
8563
8564 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8565
8566 * src/output.c (prepare): Delete the `filename' muscule insertion.
8567 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8568 (parse_union_decl): Likewise.
8569 * src/macrotab.c (macro_init): Initialize filename by infile.
8570
8571 2001-08-31 Marc Autret <autret_m@epita.fr>
8572
8573 * src/bison.simple (YYLSP_NEEDED): New definition.
8574 * src/output.c (prepare): Add macro insertion of `locations_flag'
8575
8576 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8577
8578 * src/output.c (prepare): Delete insertion of previous muscles,
8579 and insert the `prefix' muscles.
8580 * src/macrotab.c (macro_init): Likewise.
8581 (macro_init): Initialization prefix directive by `yy'.
8582 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8583 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8584 yylval, yydebug, yyerror, yynerrs and yyparse.
8585 New directive `#define' to substitute yydebug, ... with option
8586 name_prefix.
8587
8588 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8589
8590 * src/main.c (main): Standardize.
8591 * src/output.c (output_table_data, output_parser): Likewise.
8592 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8593
8594 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8595
8596 * src/reader.c (read_additionnal_code): Rename %%user_code to
8597 %%epilogue.
8598 * src/output.c (output): Rename %%declarations to %%prologue.
8599 * src/bison.simple: Echo modifications.
8600
8601 2001-08-31 Marc Autret <autret_m@epita.fr>
8602
8603 * src/reader.c (readgram): CleanUp.
8604 (output_token_defines): Likewise.
8605 (packsymbols): Likewise.
8606 (reader): Likewise.
8607 * src/output.c (output): CPP-out useless code.
8608
8609 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8610
8611 * src/reader.c (reader): Delete obsolete call to function
8612 output_trailers and output_headers.
8613 * src/output.h: Remove obsolete functions prototypes of output_headers
8614 and output_trailers.
8615
8616 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8617
8618 * src/main.c: Include macrotab.h.
8619 * src/macrotab.h (macro_entry_s): Constify fields.
8620 Adjust functions prototypes.
8621 * src/macrotab.c (macro_insert): Constify key and value.
8622 (macro_find): Constify key.
8623 (macro_insert): Include 'xalloc.h'
8624 (macro_insert): Use XMALLOC.
8625 (macro_find): Constify return value.
8626 * src/output.c (output_table_data): Rename table to table_data.
8627 (output_parser): Constify macro_key, macro_value.
8628
8629 2001-08-30 Marc Autret <autret_m@epita.fr>
8630
8631 * src/reader.c (parse_skel_decl): New.
8632 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8633 * src/lex.h (token_t): New token `tok_skel'.
8634 * src/lex.c (percent_table): Add skeleton option entry.
8635 Standardize.
8636
8637 2001-08-29 Marc Autret <autret_m@epita.fr>
8638
8639 * src/bison.simple: Add %%user_code directive at the end.
8640 * src/reader.c (read_additionnal_code): New.
8641 (reader): Use it.
8642 * src/output.c (output_program): Remove.
8643 (output): Update.
8644
8645 2001-08-28 Marc Autret <autret_m@epita.fr>
8646
8647 * src/output.c (output_actions): Clean up.
8648 (output_gram): CPP-out useless code.
8649 * src/reader.c (reader): Clean up, CPP-out useless code.
8650
8651 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8652
8653 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8654 directive.
8655 * src/bison.simple: Add `%%definitions'.
8656
8657 2001-08-28 Marc Autret <autret_m@epita.fr>
8658
8659 * config/depcomp: New file.
8660
8661 2001-08-27 Paul Eggert <eggert@twinsun.com>
8662
8663 * src/bison.simple (yyparse): Don't take the address of an
8664 item before the start of an array, as that doesn't conform to
8665 the C Standard.
8666
8667 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8668
8669 * src/output.c (output): Remove the initialization of the macro
8670 obstack. It was done too late here.
8671
8672 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8673 completely wrong.
8674 (reader): Initialize the macro obstack here, since we need it to grow
8675 '%define' directives.
8676
8677 * src/reader.h: Declare the macro obstack as extern.
8678
8679 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8680
8681 * src/output.c (output_parser): Fix. Store single '%' characters in
8682 the output obstack instead of throwing them away.
8683
8684 2001-08-27 Akim Demaille <akim@epita.fr>
8685
8686 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8687
8688 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8689
8690 * lib/Makefile.am: Adjust.
8691
8692 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8693
8694 * src/bison.simple: Update and add '%%' directives.
8695
8696 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8697
8698 * src/reader.c (reader): Remove calls to 'output_headers' and
8699 'output_trailers'. Remove some C output.
8700 (readgram): Disable a piece of code that was writing a default
8701 definition for 'YYSTYPE'.
8702 (reader_output_yylsp): Remove.
8703 (packsymbols): Output token defintions to a macro.
8704 (copy_definition): Disable C output.
8705
8706 * src/reader.c (parse_macro_decl): New function used to parse macro
8707 declarations.
8708 (copy_string2): Put the body of copy_string into this new function.
8709 Add a parameter to let the caller choose whether he wants to copy the
8710 string delimiters or not.
8711 (copy_string): Be a simple call to copy_string2 with the last argument
8712 bound to true.
8713 (read_declarations): Add case for macro definition.
8714 (copy_identifier): New.
8715 (parse_macro_decl): Read macro identifiers using copy_identifier
8716 rather than lex.
8717
8718 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8719
8720 * src/output.c (prepare): Add prefixed names.
8721 (output_parser): Output semantic actions.
8722 (output_parser): Fix bug on '%%line' directives.
8723
8724 * src/output.c (output_headers): Remove. The C code printed by this
8725 function should now be in the skeletons.
8726 (output_trailers): Remove.
8727 (output): Disable call to 'reader_output_yylsp'.
8728 (output_rule_data): Do not output tables to the table obstack.
8729
8730 * src/output.c: Remove some C dedicated output.
8731 Improve the use of macro and output obstacks.
8732 (output_defines): Remove.
8733
8734 * src/output.c (output_token_translations): Associate 'translate'
8735 table with a macro. No output to the table obstack.
8736 (output_gram): Same for 'rhs' and 'prhs'.
8737 (output_stos): Same for 'stos'.
8738 (output_rule_data): Same for 'r1' and 'r2'.
8739 (token_actions): Same for 'defact'.
8740 (goto_actions): Same for 'defgoto'.
8741 (output_base): Same for 'pact' and 'pgoto'.
8742 (output_table): Same for 'table'.
8743 (output_check): Same for 'check'.
8744
8745 * src/output.c (output_table_data): New function.
8746 (output_short_table): Remove.
8747 (output_short_or_char_table): Remove.
8748
8749 * src/output.c (output_parser): Replace most of the skeleton copy code
8750 with something new. Skeletons are now processed character by character
8751 rather than line by line, and Bison looks for '%%' macros. This is the
8752 first step in making Bison's output process (a lot) more flexible.
8753 (output_parser): Use the macro table.
8754
8755 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8756
8757 * src/main.c (main): Initialize the macro table.
8758
8759 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8760
8761 * src/lex.c (percent_table): Add tok_define.
8762 * src/lex.h: Add tok_define.
8763
8764 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8765
8766 * src/macrotab.c: New file.
8767 * src/macrotab.h: New file.
8768 * src/Makefile.am: Update.
8769
8770 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8771
8772 * lib/hash.c: New file.
8773 * lib/hash.h: New file.
8774 * lib/Makefile.am: Update.
8775
8776 2001-08-15 Akim Demaille <akim@epita.fr>
8777
8778 Version 1.28c.
8779
8780 2001-08-15 Marc Autret <autret_m@epita.fr>
8781
8782 * src/reader.c (readgram): Indent output macro YYSTYPE.
8783 (packsymbols): Likewise.
8784 (output_token_defines): Likewise.
8785 * src/files.c: Standardize.
8786 (compute_header_macro): New.
8787 (defines_obstack_save): New. Use compute_header_macro.
8788 (output_files): Update. Use defines_obstack_save.
8789
8790 2001-08-15 Akim Demaille <akim@epita.fr>
8791
8792 * doc/bison.texinfo (Table of Symbols): Document
8793 YYSTACK_USE_ALLOCA.
8794
8795 2001-08-15 Akim Demaille <akim@epita.fr>
8796
8797 * missing: Update from CVS Automake.
8798 * config/config.guess, config/config.sub, config/texinfo.tex:
8799 Update from gnu.org.
8800
8801 2001-08-15 Akim Demaille <akim@epita.fr>
8802
8803 * Makefile.maint: Sync with CVS Autoconf.
8804
8805 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8806
8807 * doc/bison.texinfo: Include GNU Free Documentation License from
8808 `fdl.texi'.
8809 * doc/fdl.texi: Add to package.
8810
8811 2001-08-14 Marc Autret <autret_m@epita.fr>
8812
8813 Turn on %{source,header}_extension features.
8814
8815 * src/lex.c (percent_table): Un-CPP out header_extension and
8816 source_extension.
8817 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8818 (compute_exts_from_src): Remove conditions. It restores priorities
8819 between options.
8820
8821 2001-08-14 Marc Autret <autret_m@epita.fr>
8822
8823 * src/files.c (compute_base_names): Add extensions computing when
8824 `--file-prefix' used.
8825 Standardize function calls.
8826
8827 2001-08-13 Marc Autret <autret_m@epita.fr>
8828
8829 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8830 defining it (defined but null disables alloca).
8831
8832 2001-08-13 Marc Autret <autret_m@epita.fr>
8833
8834 * src/bison.simple (_yy_memcpy): CPP reformat.
8835
8836 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8837
8838 * tests/atconfig.in (CPPFLAGS): Fix.
8839
8840 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8841
8842 * doc/bison.texinfo: Include GNU General Public License from
8843 `gpl.texi'.
8844 * doc/gpl.texi: Add to package.
8845
8846 2001-08-10 Marc Autret <autret_m@epita.fr>
8847
8848 * src/print_graph.h: Fix.
8849 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8850
8851 2001-08-10 Akim Demaille <akim@epita.fr>
8852
8853 * src/system.h: Provide default declarations for stpcpy, strndup,
8854 and strnlen.
8855
8856 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8857
8858 * doc/bison.texinfo (Locations): Update @$ stuff.
8859
8860 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8861
8862 * src/bison.simple (YYLLOC_DEFAULT): Update.
8863 (yyparse): Adjust.
8864
8865 2001-08-08 Marc Autret <autret_m@epita.fr>
8866
8867 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8868 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8869 Reported by Fabrice Bauzac.
8870
8871 2001-08-08 Marc Autret <autret_m@epita.fr>
8872
8873 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8874 * src/vcg.c (output_node): Fix.
8875 * src/vcg.h: Cleanup.
8876 * src/print_graph.c: Add comments.
8877 (node_output_size): New global variable. Simplify the formatting of
8878 the VCG graph output.
8879 (print_actions): Unused code is now used. It notifies the final state
8880 and no action states in the VCG graph. It also give the reduce actions.
8881 The `shift and goto' edges are red and the `go to state' edges are
8882 blue.
8883 Get the current node name and node_obstack by argument.
8884 (node_obstack): New variable.
8885 (print_state): Manage node_obstack.
8886 (print_core): Use node_obstack given by argument.
8887 A node is not only computed here but in print_actions also.
8888 (print_graph): CPP out useless code instead of commenting it.
8889
8890 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8891
8892 * tests/atconfig.in (CPPFLAGS): Fix.
8893
8894 2001-08-07 Akim Demaille <akim@epita.fr>
8895
8896 * src/print_graph.c (quote): New.
8897 (print_core): Use it.
8898
8899 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8900
8901 * src/vcg.c (complain.h): Include it.
8902 Unepitaize `return' invocations.
8903 [NDEBUG] (main): Remove.
8904 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8905 * src/files.c (open_files): Initialize graph_obstack.
8906 * src/print_graph.c (print_actions): CPP out useless code.
8907 (print_core): Don't output the last `\n' in labels.
8908 Use `quote'.
8909 * src/files.c (output_files): Output the VCG file.
8910 * src/main.c (main): Invoke print_graph ();
8911
8912 2001-08-06 Marc Autret <autret_m@epita.fr>
8913
8914 Automaton VCG graph output.
8915 Using option ``-g'' or long option ``--graph'', you can generate
8916 a gram_filename.vcg file containing a VCG description of the LALR (1)
8917 automaton of your grammar.
8918
8919 * src/main.c: Call to print_graph() function.
8920 * src/getargs.h: Update.
8921 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8922 (graph_flag): New flag.
8923 (longopts): Update.
8924 (getargs): Add case `g'.
8925 * src/files.c (graph_obstack): New obstack struct.
8926 (open_files): Initialize new obstack.
8927 (output_files): Saves graph_obstack if required.
8928 * src/files.h (graph_obstack): New extern declaration.
8929 * src/Makefile.am: Add new source files.
8930
8931 2001-08-06 Marc Autret <autret_m@epita.fr>
8932
8933 * src/print_graph.c, src/print_graph.h (graph): New.
8934 * src/vcg.h: New file.
8935 * src/vcg.c: New file, VCG graph handling.
8936
8937 2001-08-06 Marc Autret <autret_m@epita.fr>
8938
8939 Add of %source_extension and %header_extension which specify
8940 the source or/and the header output file extension.
8941
8942 * src/files.c (compute_base_names): Remove initialisation of
8943 src_extension and header_extension.
8944 (compute_exts_from_gf): Update.
8945 (compute_exts_from_src): Update.
8946 (output_files): Update.
8947 * src/reader.c (parse_header_extension_decl): New.
8948 (parse_source_extension_decl): New.
8949 (read_declarations): New case statements for the new tokens.
8950 * src/lex.c (percent_table): Add entries for %source_extension
8951 and %header_extension.
8952 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8953
8954 2001-08-06 Marc Autret <autret_m@epita.fr>
8955
8956 * configure.in: Bump to 1.28c.
8957 * doc/bison.texinfo: Texinfo thingies.
8958
8959 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8960
8961 * tests/atconfig.in (CPPFLAGS): Add.
8962 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8963
8964 2001-08-03 Akim Demaille <akim@epita.fr>
8965
8966 Version 1.28b.
8967
8968 2001-08-03 Akim Demaille <akim@epita.fr>
8969
8970 * tests/Makefile.am (check-local): Ship testsuite.
8971 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8972 Include `string.h'.
8973
8974 2001-08-03 Akim Demaille <akim@epita.fr>
8975
8976 * configure.in: Try using -Wformat when compiling.
8977
8978 2001-08-03 Akim Demaille <akim@epita.fr>
8979
8980 * configure.in: Bump to 1.28b.
8981
8982 2001-08-03 Akim Demaille <akim@epita.fr>
8983
8984 * src/complain.c: Adjust strerror_r portability issues.
8985
8986 2001-08-03 Akim Demaille <akim@epita.fr>
8987
8988 Version 1.28a.
8989
8990 2001-08-03 Akim Demaille <akim@epita.fr>
8991
8992 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8993 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8994 * src/getargs.c: Include complain.h.
8995 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8996 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8997
8998 2001-08-03 Akim Demaille <akim@epita.fr>
8999
9000 * src/reader.c (readgram): Display hidden chars in error messages.
9001
9002 2001-08-03 Akim Demaille <akim@epita.fr>
9003
9004 Update to gettext 0.10.39.
9005
9006 2001-08-03 Akim Demaille <akim@epita.fr>
9007
9008 * lib/strspn.c: New.
9009
9010 2001-08-01 Marc Autret <autret_m@epita.fr>
9011
9012 * doc/bison.texinfo: Update.
9013 * doc/bison.1 (mandoc): Update.
9014 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9015 * src/files.c: Support output files extensions computing.
9016 (src_extension): New static variable.
9017 (header_extension): New static variable.
9018 (tr): New function.
9019 (get_extension_index): New function, gets the index of an extension
9020 filename in a string.
9021 (compute_exts_from_gf): New function, computes extensions from the
9022 grammar file extension.
9023 (compute_exts_from_src): New functions, computes extensions from the
9024 C source file extension, file given by ``-o'' option.
9025 (compute_base_names): Update.
9026 (output_files): Update.
9027
9028 2001-08-01 Robert Anisko <anisko_r@epita.fr>
9029
9030 * doc/bison.texi: Document @$.
9031 (Locations): New section.
9032
9033 2001-07-18 Akim Demaille <akim@epita.fr>
9034
9035 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9036 * config/prev-version.txt, config/move-if-change: New.
9037 * Makefile.am: Adjust.
9038
9039 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
9040
9041 * src/bison.simple (yyparse): Suppress warning `comparaison
9042 between signed and unsigned'.
9043
9044 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
9045
9046 * src/getargs.h (raw_flag): Remove.
9047 * src/getargs.c: Die on `-r'/`--raw'.
9048 * src/lex.c (parse_percent_token): Die on `%raw'.
9049 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9050 * tests/calc.at: Suppress test with option `--raw'.
9051
9052 2001-07-14 Akim Demaille <akim@epita.fr>
9053
9054 * config/: New.
9055 * configure.in: Require Autoconf 2.50.
9056 Update to gettext 0.10.38.
9057
9058 2001-03-16 Akim Demaille <akim@epita.fr>
9059
9060 * doc/bison.texinfo: ANSIfy the examples.
9061
9062 2001-03-16 Akim Demaille <akim@epita.fr>
9063
9064 * getargs.c (skeleton): New variable.
9065 (longopts): --skeleton is a new option.
9066 (shortopts, getargs): -S is a new option.
9067 * getargs.h: Declare skeleton.
9068 * output.c (output_parser): Use it.
9069
9070 2001-03-16 Akim Demaille <akim@epita.fr>
9071
9072 * m4/strerror_r.m4: New.
9073 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9074 * lib/error.h, lib/error.c: Update.
9075
9076 2001-03-16 Akim Demaille <akim@epita.fr>
9077
9078 * src/getargs.c (longopts): Clean up.
9079
9080 2001-02-21 Akim Demaille <akim@epita.fr>
9081
9082 * src/reader.c (gensym): `gensym_count' is your own.
9083 Use a static buf to create the symbol name, as token_buffer is no
9084 longer a buffer.
9085
9086 2001-02-08 Akim Demaille <akim@epita.fr>
9087
9088 * src/conflicts.c (conflict_report): Be sure not to append to res
9089 between two calls, which could happen if both first sprintf were
9090 skipped, but not the first cp += strlen.
9091
9092 2001-02-08 Akim Demaille <akim@epita.fr>
9093
9094 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9095 New, from fileutils 4.0.37.
9096 * configure.in: Require Autoconf 2.49c. I took some time before
9097 making this decision. This is the only way out for portability
9098 issues in Bison, it would mean way too much duplicate effort to
9099 import in Bison features implemented in 2.49c since 2.13.
9100 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9101
9102 2001-02-02 Akim Demaille <akim@epita.fr>
9103
9104 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9105 * lib/xalloc.h, lib/xmalloc.c: Update.
9106
9107 2001-01-19 Akim Demaille <akim@epita.fr>
9108
9109 Get rid of the ad hoc handling of token_buffer in the scanner: use
9110 the obstacks.
9111
9112 * src/lex.c (token_obstack): New.
9113 (init_lex): Initialize it. No longer call...
9114 (grow_token_buffer): this. Remove it.
9115 Adjust all the places which used it to use the obstack.
9116
9117 2001-01-19 Akim Demaille <akim@epita.fr>
9118
9119 * src/lex.h: Rename all the tokens:
9120 s/\bENDFILE\b/tok_eof/g;
9121 s/\bIDENTIFIER\b/tok_identifier/g;
9122 etc.
9123 Let them be enums, not #define, to ease debugging.
9124 Adjust all the code.
9125
9126 2001-01-18 Akim Demaille <akim@epita.fr>
9127
9128 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9129 * src/lex.c (maxtoken, grow_token_buffer): Static.
9130
9131 2001-01-18 Akim Demaille <akim@epita.fr>
9132
9133 Since we now use obstacks, more % directives can be enabled.
9134
9135 * src/lex.c (percent_table): Also accept `%yacc',
9136 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9137 `%debug'.
9138 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9139 instead of returning a token.
9140 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9141 * src/reader.c (read_declarations): Adjust.
9142 * src/files.c (open_files): Don't call `compute_base_names', don't
9143 compute `attrsfile' since they depend upon data which might be
9144 *in* the input file now.
9145 (output_files): Do it here.
9146 * src/output.c (output_headers): Document the fact that this patch
9147 introduces a guaranteed SEGV for semantic parsers.
9148 * doc/bison.texinfo: Document them.
9149 * tests/suite.at: Exercise these %options.
9150
9151 2000-12-20 Akim Demaille <akim@epita.fr>
9152
9153 Also handle the output file (--verbose) with obstacks.
9154
9155 * files.c (foutput): Remove.
9156 (output_obstack): New.
9157 Adjust all dependencies.
9158 * src/conflicts.c: Return a string.
9159 * src/system.h (obstack_grow_string): Rename as...
9160 (obstack_sgrow): this. Be ready to work with non literals.
9161 (obstack_fgrow4): New.
9162
9163 2000-12-20 Akim Demaille <akim@epita.fr>
9164
9165 * src/files.c (open_files): Fix the computation of short_base_name
9166 in the case of `-o foo.tab.c'.
9167
9168 2000-12-20 Akim Demaille <akim@epita.fr>
9169
9170 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9171 (copy_dollar): Now that everything uses obstacks, get rid of the
9172 FILE * parameters.
9173
9174 2000-12-20 Akim Demaille <akim@epita.fr>
9175
9176 * src/files.c (open_files): Actually the `.output' file is based
9177 on the short_base_name, not base_name.
9178 * tests/suite.at (Checking output file names): Adjust.
9179
9180 2000-12-20 Akim Demaille <akim@epita.fr>
9181
9182 * src/bison.s1: Remove, we now use directly...
9183 * src/bison.simple: this.
9184 * src/Makefile.am: Use pkgdata instead of data.
9185
9186 2000-12-20 Akim Demaille <akim@epita.fr>
9187
9188 * src/files.c (guard_obstack): New.
9189 (open_files): Initialize it.
9190 (output_files): Dump it...
9191 * src/files.h: Export it.
9192 * src/reader.c (copy_guard): Use it.
9193
9194 2000-12-19 Akim Demaille <akim@epita.fr>
9195
9196 * src/files.c (outfile, defsfile, actfile): Removed as global
9197 vars.
9198 (open_files): Don't compute them.
9199 (output_files): Adjust.
9200 (base_name, short_base_name): Be global.
9201 Adjust dependencies.
9202
9203 2000-12-19 Akim Demaille <akim@epita.fr>
9204
9205 * src/files.c (strsuffix): New.
9206 (stringappend): Be just like strcat but allocate.
9207 (base_names): Eve out from open_files.
9208 Try to simplify the rather hairy computation of base_name and
9209 short_base_name.
9210 (open_files): Use it.
9211 * tests/suite.at (Checking output file names): New test.
9212
9213 2000-12-19 Akim Demaille <akim@epita.fr>
9214
9215 * src/system.h (obstack_grow_literal_string): Rename as...
9216 (obstack_grow_string): this.
9217 * src/output.c (output_parser): Recognize `%% actions' instead of
9218 `$'.
9219 * src/bison.s1: s/$/%% actions/.
9220 * src/bison.hairy: Likewise.
9221
9222 2000-12-19 Akim Demaille <akim@epita.fr>
9223
9224 * src/output.c (output_parser): Compute the `#line' lines when
9225 there are.
9226 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9227 Suggested by Hans Aberg.
9228
9229 2000-12-19 Akim Demaille <akim@epita.fr>
9230
9231 Let the handling of the skeleton files be local to the procedures
9232 that use it.
9233
9234 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9235 longer static.
9236 (fparser, open_extra_files): Remove.
9237 (open_files, output_files): Don't take care of fparser.
9238 * src/files.h: Adjust.
9239 * src/output.c (output_parser): Open and close the file to the
9240 skeleton.
9241 * src/reader.c (read_declarations): When %semantic_parser, open
9242 fguard.
9243
9244 2000-12-19 Akim Demaille <akim@epita.fr>
9245
9246 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9247 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9248
9249 2000-12-19 Akim Demaille <akim@epita.fr>
9250
9251 * src/files.c (open_files): Yipee! We no longer need all the code
9252 looking for `/tmp' since we have no tmp file.
9253
9254 2000-12-19 Akim Demaille <akim@epita.fr>
9255
9256 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9257 New macros.
9258 * src/files.c (open_files): Less dependency on MSDOS etc.
9259
9260 2000-12-14 Akim Demaille <akim@epita.fr>
9261
9262 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9263 Provide a default definition.
9264 Use it when executing the default @ action.
9265 * src/reader.c (reader_output_yylsp): No longer include
9266 `timestamp' and `text' in the default YYLTYPE.
9267
9268 2000-12-12 Akim Demaille <akim@epita.fr>
9269
9270 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9271 (copy_guard): Quote the file names.
9272 Reported by Laurent Mascherpa.
9273
9274 2000-12-12 Akim Demaille <akim@epita.fr>
9275
9276 * src/output.c (output_headers, output_program, output): Be sure
9277 to escape special characters when outputting filenames.
9278 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9279 (output_headers): Don't depend on them, Use ACTSTR.
9280
9281 2000-11-17 Akim Demaille <akim@epita.fr>
9282
9283 * lib/obstack.h: Formatting changes.
9284 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9285 prevents type checking.
9286 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9287 cast the value to (void *): assigning a `foo *' to a `void *'
9288 variable is valid.
9289 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9290 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9291 append characters.
9292
9293 2000-11-17 Akim Demaille <akim@epita.fr>
9294
9295 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9296 as...
9297 (suite.m4, regression.m4, calc.m4): these.
9298 * tests/atgeneral.m4: Update from CVS Autoconf.
9299
9300 2000-11-17 Akim Demaille <akim@epita.fr>
9301
9302 * tests/regression.m4 (%union and --defines): New test,
9303 demonstrating a current bug in the obstack implementation.
9304
9305 2000-11-17 Akim Demaille <akim@epita.fr>
9306
9307 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9308 macros.
9309 Use them to declare the variables which are global or local to
9310 `yyparse'.
9311
9312 2000-11-17 Akim Demaille <akim@epita.fr>
9313
9314 * acconfig.h: Remove, no longer used.
9315
9316 2000-11-07 Akim Demaille <akim@epita.fr>
9317
9318 * src: s/Copyright (C)/Copyright/g.
9319
9320 2000-11-07 Akim Demaille <akim@epita.fr>
9321
9322 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9323 defining.
9324 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9325
9326 2000-11-07 Akim Demaille <akim@epita.fr>
9327
9328 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9329 Merge in a single CPP if/else.
9330
9331 2000-11-07 Akim Demaille <akim@epita.fr>
9332
9333 * src/output.c (output): Remove useless variables.
9334 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9335 argument `data' for consistency with the prototypes.
9336 Qualify it `const'.
9337 (obstack_copy, obstack_copy0): Rename the second argument as
9338 `address' for consistency. Qualify it `const'.
9339 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9340 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9341 `const' their input argument (`data' or `address').
9342 Adjust the corresponding macros to include `const' in casts.
9343
9344 2000-11-03 Akim Demaille <akim@epita.fr>
9345
9346 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9347 s/PFILE1/BISON_HAIRY/.
9348 Adjust dependencies.
9349
9350 2000-11-03 Akim Demaille <akim@epita.fr>
9351
9352 For some reason, this was not applied.
9353
9354 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9355 `unlink': it's no longer used.
9356
9357 2000-11-03 Akim Demaille <akim@epita.fr>
9358
9359 * src/files.c (skeleton_find): New function, eved out of...
9360 (open_files, open_extra_files): here.
9361
9362 2000-11-03 Akim Demaille <akim@epita.fr>
9363
9364 Don't use `atexit'.
9365
9366 * src/files.c (obstack_save): New function.
9367 (done): Rename as...
9368 (output_files): this.
9369 Use `obstack_save'.
9370 * src/main.c (main): Don't use `atexit' to register `done', since
9371 it no longer has to remove tmp files, just call `output_files'
9372 when there are no errors.
9373
9374 2000-11-02 Akim Demaille <akim@epita.fr>
9375
9376 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9377 `unlink': it's no longer used.
9378 * src/files.h: Formatting changes.
9379
9380 2000-11-02 Akim Demaille <akim@epita.fr>
9381
9382 Remove the last uses of mktemp and unlink/delete.
9383
9384 * src/files.c (fdefines, ftable): Removed.
9385 (defines_ostack, table_obstack): New.
9386 Adjust dependencies of the former into uses of the latter.
9387 * src/output.c (output_short_or_char_table, output_short_table):
9388 Convert to using obstacks.
9389 * src/reader.c (copy_comment2): Accept one FILE * and two
9390 obstacks.
9391 (output_token_defines, reader_output_yylsp): Use obstacks.
9392 * src/system.h (obstack_fgrow3): New.
9393
9394 2000-11-01 Akim Demaille <akim@epita.fr>
9395
9396 Change each use of `fattrs' into a use of `attrs_obstack'.
9397
9398 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9399 * src/files.c (fattrs): Remove.
9400 (attrs_obstack): New.
9401 Adjust all dependencies.
9402 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9403
9404 2000-11-01 Akim Demaille <akim@epita.fr>
9405
9406 Introduce obstacks.
9407 Change each use of `faction' into a use of `action_obstack'.
9408
9409 * lib/obstack.h, lib/obstack.c: New files.
9410 * src/files.c (faction): Remove.
9411 (action_obstack): New.
9412 Adjust all dependencies.
9413
9414 2000-10-20 Akim Demaille <akim@epita.fr>
9415
9416 * lib/quote.h (PARAMS): New macro. Use it.
9417
9418 2000-10-16 Akim Demaille <akim@epita.fr>
9419
9420 * src/output.c (output_short_or_char_table): New function.
9421 (output_short_table, output_token_translations): Use it.
9422 (goto_actions): Use output_short_table.
9423
9424 2000-10-16 Akim Demaille <akim@epita.fr>
9425
9426 * src/symtab.c (bucket_new): New function.
9427 (getsym): Use it.
9428
9429 * src/output.c (output_short_table): New argument to display the
9430 comment associated with the table.
9431 Adjust dependencies.
9432 (output_gram): Use it.
9433 (output_rule_data): Nicer output layout for YYTNAME.
9434
9435 2000-10-16 Akim Demaille <akim@epita.fr>
9436
9437 * src/lex.c (read_typename): New function.
9438 (lex): Use it.
9439 * src/reader.c (copy_dollar): Likewise.
9440
9441 2000-10-16 Akim Demaille <akim@epita.fr>
9442
9443 * src/reader.c (copy_comment2): Expect the input stream to be on
9444 the `/' which is suspected to open a comment, instead of being
9445 called after `//' or `/*' was read.
9446 (copy_comment, copy_definition, parse_union_decl, copy_action)
9447 (copy_guard): Adjust.
9448
9449 2000-10-16 Akim Demaille <akim@epita.fr>
9450
9451 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9452 `read_signed_integer'.
9453
9454 2000-10-16 Akim Demaille <akim@epita.fr>
9455
9456 * src/reader.c (copy_dollar): New function.
9457 (copy_guard, copy_action): Use it.
9458
9459 2000-10-16 Akim Demaille <akim@epita.fr>
9460
9461 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9462 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9463 New files, from Fileutils 4.0.27.
9464 * src/main.c (printable_version): Remove.
9465 * src/lex.c, src/reader.c: Use `quote'.
9466
9467 2000-10-04 Akim Demaille <akim@epita.fr>
9468
9469 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9470
9471 2000-10-04 Akim Demaille <akim@epita.fr>
9472
9473 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9474
9475 2000-10-04 Akim Demaille <akim@epita.fr>
9476
9477 When a literal string is used to define two different tokens,
9478 `bison -v' segfaults.
9479 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9480
9481 * tests/regression.m4: New file.
9482 Include the core of the sample provided by Piotr Gackiewicz.
9483 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9484 properly.
9485
9486 2000-10-04 Akim Demaille <akim@epita.fr>
9487
9488 * src/reader.c (parse_expect_decl): Keep `count' within the size
9489 of `buffer'.
9490 From Neil Booth.
9491
9492 2000-10-02 Paul Eggert <eggert@twinsun.com>
9493
9494 * bison.s1 (yyparse): Assign the default value
9495 unconditionally, to avoid a GCC warning and make the parser a
9496 tad smaller.
9497
9498 2000-10-02 Akim Demaille <akim@epita.fr>
9499
9500 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9501 options.
9502
9503 2000-10-02 Akim Demaille <akim@epita.fr>
9504
9505 * src/derives.c, src/print.c, src/reduce.c: To ease the
9506 translation, move some `\n' out of the translated strings.
9507
9508 2000-10-02 Akim Demaille <akim@epita.fr>
9509
9510 The location tracking mechanism is precious for parse error
9511 messages. Nevertheless, it is enabled only when `@n' is used in
9512 the grammar, which is a different issue (you can use it in error
9513 message, but not in the grammar per se). Therefore, there should
9514 be another means to enable it.
9515
9516 * src/getargs.c (getargs): Support `--locations'.
9517 (usage): Report it.
9518 * src/getargs.h (locationsflag): Export it.
9519 * src/lex.c (percent_table): Support `%locations'.
9520 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9521 with `locationsflag'.
9522 * doc/bison.texinfo: Document `--locations' and `%locations'.
9523 Sort the options.
9524 * tests/calc.m4: Test it.
9525
9526 For regularity of the names, replace each
9527 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9528 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9529 In addition replace each `flag' with `_flag'.
9530
9531 2000-10-02 Akim Demaille <akim@epita.fr>
9532
9533 Also test parse error messages, including with YYERROR_VERBOSE.
9534
9535 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9536 associative).
9537 Use it to check the computations.
9538 Use it to check `nonassoc' is honored.
9539 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9540 `--yyerror-verbose'.
9541 (_AT_CHECK_CALC): Adjust to this option.
9542 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9543
9544 2000-10-02 Akim Demaille <akim@epita.fr>
9545
9546 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9547 the latter demonstrates a flaw in the handling of non debugging
9548 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9549 was used in order to simplify:
9550
9551 #if YYDEBUG
9552 if (yydebug)
9553 {
9554 ...
9555 }
9556 #endif
9557
9558 into
9559
9560 if (yydebug)
9561 {
9562 ...
9563 }
9564
9565 unfortunately this leads to a CPP conflict when
9566 `--name-prefix=foo' is used since it produces `#define yydebug
9567 foodebug'.
9568
9569 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9570 (YYDPRINTF): New macro.
9571 Spread its use.
9572 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9573 the bison options.
9574 Also test `--verbose', `--defines' and `--name-prefix'.
9575
9576 2000-10-02 Akim Demaille <akim@epita.fr>
9577
9578 Improve the readability of the produced parsers.
9579
9580 * src/bison.s1: Formatting changes.
9581 Improve the comment related to the `$' mark.
9582 (yydefault): Don't fall through to `yyresume': `goto' there.
9583 * src/output.c (output_parser): When the `$' is met, skip the end
9584 of its line.
9585 New variable, `number_of_dollar_signs', to check there's exactly
9586 one `$' in the parser skeleton.
9587
9588 2000-10-02 Akim Demaille <akim@epita.fr>
9589
9590 * lib/xstrdup.c: New file, from the fileutils.
9591 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9592 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9593 instead of strlen + xmalloc + strcpy.
9594 * src/symtab.c (copys): Remove, use xstrdup instead.
9595
9596 2000-10-02 Akim Demaille <akim@epita.fr>
9597
9598 * src/gram.h (associativity): New enum type which replaces the
9599 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9600 `right_assoc', `left_assoc' and `non_assoc'.
9601 Adjust all dependencies.
9602 * src/reader.c: Formatting changes.
9603 (LTYPESTR): Don't define it, use it as a literal in
9604 `reader_output_yylsp'.
9605 * src/symtab.h (symbol_class): New enum type which replaces the
9606 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9607 `sunknown', `stoken and `snterm'.
9608
9609 2000-10-02 Akim Demaille <akim@epita.fr>
9610
9611 * src/getargs.c (fixed_outfiles): Rename as...
9612 (yaccflag): for consistency and accuracy.
9613 Adjust dependencies.
9614
9615 2000-10-02 Akim Demaille <akim@epita.fr>
9616
9617 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9618 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9619 difficult and introduced a lot of core dump. It turns out that
9620 Bison used an implementation of `xmalloc' based on `calloc', and
9621 at various places it does depend upon the initialization to 0. I
9622 have not tried to isolate the pertinent places, and all the former
9623 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9624 someone should address this issue.
9625
9626 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9627 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9628 files.
9629 Adjust dependencies.
9630 * src/warshall.h: New file.
9631 Propagate.
9632
9633 2000-10-02 Akim Demaille <akim@epita.fr>
9634
9635 Various anti-`extern in *.c' changes.
9636
9637 * src/system.h: Include `assert.h'.
9638
9639 2000-10-02 Akim Demaille <akim@epita.fr>
9640
9641 * src/state.h (nstates, final_state, first_state, first_shift)
9642 (first_reduction): Move their exportation from here...
9643 * src/LR0.h: to here.
9644 Adjust dependencies.
9645 * src/getargs.c (statisticsflag): New variable.
9646 Add support for `--statistics'.
9647 Adjust dependencies.
9648
9649 Remove a lot of now useless `extern' statements in most files.
9650
9651 2000-10-02 Akim Demaille <akim@epita.fr>
9652
9653 * src/LR0.h: New file.
9654 Propagate its use.
9655
9656 2000-10-02 Akim Demaille <akim@epita.fr>
9657
9658 * src/print.h: New file.
9659 Propagate its use.
9660 * src/print.c: Formatting and ordering changes.
9661 (verbose, terse): Replace with...
9662 (print_results): this new function.
9663 Adjust dependencies.
9664
9665 2000-10-02 Akim Demaille <akim@epita.fr>
9666
9667 * src/conflicts.c (conflict_report): New function.
9668 (conflict_log, verbose_conflict_log): Replace with...
9669 (print_conflicts): this function.
9670 Adjust dependencies.
9671 * src/conflicts.h: New file.
9672 Propagate its inclusion.
9673
9674 2000-10-02 Akim Demaille <akim@epita.fr>
9675
9676 * src/nullable.h: New file.
9677 Propagate its inclusion.
9678 * src/nullable.c: Formatting changes.
9679
9680 2000-10-02 Akim Demaille <akim@epita.fr>
9681
9682 * src/reduce.h: New file.
9683 Propagate its inclusion.
9684 * src/reduce.c: Topological sort and other formatting changes.
9685 (bool, TRUE, FALSE): Move their definition to...
9686 * src/system.h: here.
9687
9688 2000-10-02 Akim Demaille <akim@epita.fr>
9689
9690 * src/files.c: Formatting changes.
9691 (tryopen, tryclose, openfiles): Rename as...
9692 (xfopen, xfclose, open_files): this.
9693 (stringappend): static.
9694 * src/files.h: Complete the list of exported symbols.
9695 Propagate its use.
9696
9697 2000-10-02 Akim Demaille <akim@epita.fr>
9698
9699 * src/reader.h: New file.
9700 Propagate its use instead of tedious list of `extern' and
9701 prototypes.
9702 * src/reader.c: Formatting changes, topological sort,
9703 s/register//.
9704
9705 2000-10-02 Akim Demaille <akim@epita.fr>
9706
9707 * src/lex.h: Prototype `lex.c' exported functions.
9708 * src/reader.c: Adjust.
9709 * src/lex.c: Formatting changes.
9710 (safegetc): Rename as...
9711 (xgetc): this.
9712
9713 2000-10-02 Akim Demaille <akim@epita.fr>
9714
9715 * src/lalr.h: New file.
9716 Propagate its inclusion instead of prototypes and `extern'.
9717 * src/lalr.c: Formatting changes, topological sorting etc.
9718
9719 2000-10-02 Akim Demaille <akim@epita.fr>
9720
9721 * src/output.c (token_actions): Introduce a temporary array,
9722 YYDEFACT, that makes it possible for this function to use
9723 output_short_table.
9724
9725 2000-10-02 Akim Demaille <akim@epita.fr>
9726
9727 `user_toknums' is output as a `short[]' in `output.c', while it is
9728 defined as a `int[]' in `reader.c'. For consistency with the
9729 other output tables, `user_toknums' is now defined as a table of
9730 shorts.
9731
9732 * src/reader.c (user_toknums): Be a short table instead of an int
9733 table.
9734 Adjust dependencies.
9735
9736 Factor the short table outputs.
9737
9738 * src/output.c (output_short_table): New function.
9739 * src/output.c (output_gram, output_stos, output_rule_data)
9740 (output_base, output_table, output_check): Use it.
9741
9742 2000-10-02 Akim Demaille <akim@epita.fr>
9743
9744 * src/output.c (output): Topological sort of the functions, in
9745 order to get rid of the `static' prototypes.
9746 No longer use `register'.
9747 * src/output.h: New file.
9748 Propagate its inclusion in files explicitly prototyping functions
9749 from output.c.
9750
9751 2000-09-21 Akim Demaille <akim@epita.fr>
9752
9753 * src/atgeneral.m4: Update from Autoconf.
9754
9755 2000-09-21 Akim Demaille <akim@epita.fr>
9756
9757 * src/closure.h: New file.
9758 * src/closure.c: Formatting changes, topological sort over the
9759 functions, use of closure.h.
9760 (initialize_closure, finalize_closure): Rename as...
9761 (new_closure, free_closure): these. Adjust dependencies.
9762 * src/LR0.c: Formatting changes, topological sort, use of
9763 cloture.h.
9764 (initialize_states): Rename as...
9765 (new_states): this.
9766 * src/Makefile.am (noinst_HEADERS): Adjust.
9767
9768 2000-09-20 Akim Demaille <akim@epita.fr>
9769
9770 * src/acconfig.h: Don't protect config.h against multiple
9771 inclusion.
9772 Don't define PARAMS.
9773 * src/system.h: Define PARAMS.
9774 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9775 purpose of config.h. system.h must not try to fix wrong
9776 definitions in config.h.
9777
9778 2000-09-20 Akim Demaille <akim@epita.fr>
9779
9780 * src/derives.h: New file.
9781 * src/main.c, src/derives.h: Use it.
9782 Formatting changes.
9783 * src/Makefile.am (noinst_HEADERS): Adjust.
9784
9785 2000-09-20 Akim Demaille <akim@epita.fr>
9786
9787 * tests/atgeneral.m4: Update from Autoconf.
9788 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9789 (AT_CHECK_CALC): New macros.
9790 Use these macros to test bison with options `', `--raw',
9791 `--debug', `--yacc', `--yacc --debug'.
9792
9793 2000-09-19 Akim Demaille <akim@epita.fr>
9794
9795 * src/output.c: Formatting changes.
9796 * src/machine.h: Remove, leaving its contents in...
9797 * src/system.h: here.
9798 Include stdio.h.
9799 Adjust all dependencies on stdio.h and machine.h.
9800 * src/getargs.h: New file.
9801 Let all `extern' declarations about getargs.c be replaced with
9802 inclusion of `getargs.h'.
9803 * src/Makefile.am (noinst_HEADERS): Adjust.
9804
9805 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9806 scope.
9807 (yyerror): Returns void, not int.
9808 * doc/bison.texinfo: Formatting changes.
9809
9810 2000-09-19 Akim Demaille <akim@epita.fr>
9811
9812 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9813 portable.
9814
9815 2000-09-18 Akim Demaille <akim@epita.fr>
9816
9817 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9818 * src/Makefile.am (INCLUDES): Don't.
9819 Be ready to fetch headers in lib/.
9820
9821 2000-09-18 Akim Demaille <akim@epita.fr>
9822
9823 * doc/bison.texinfo: Update the copyright.
9824 ANSIfy and GNUify the examples.
9825 Remove the old menu.
9826
9827 2000-09-18 Akim Demaille <akim@epita.fr>
9828
9829 First set of tests: use the `calc' example from the documentation.
9830
9831 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9832 is defined only when YYDEBUG is.
9833 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9834 * src/files.c (tryopen, tryclose): Formatting changes.
9835 Move to the top and be static.
9836 * src/reader.c (read_signed_integer): Likewise.
9837 * tests/calc.m4: New file.
9838 * Makefile.am, suite.m4: Adjust.
9839 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9840
9841 2000-09-18 Akim Demaille <akim@epita.fr>
9842
9843 Add support for an Autotest test suite for Bison.
9844
9845 * m4/m4.m4, m4/atconfig.m4: New files.
9846 * m4/Makefile.am (EXTRA_DIST): Adjust.
9847 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9848 files.
9849 * src/getargs.c: Display a more standard --version message.
9850 * src/reader.c (reader): Formatting changes.
9851 No longer depend upon VERSION_STRING.
9852 * configure.in: No longer use `dnl'.
9853 Set up the test suite and the new directory `tests/.
9854 (VERSION_STRING): Remove.
9855
9856 2000-04-14 Akim Demaille <akim@epita.fr>
9857
9858 * src/reader.c (copy_comment2): New function, same as former
9859 `copy_comment', but outputs into two FILE *.
9860 (copy_comment): Use it.
9861 (parse_union_decl): Use it.
9862 (get_type, parse_start_decl): Use the same `invalid' message.
9863 (parse_start_decl, parse_union_decl): Use the same `multiple'
9864 message.
9865 (parse_union_decl, copy_guard, copy_action): Use the same
9866 `unmatched' message.
9867 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9868
9869 2000-03-31 Akim Demaille <akim@epita.fr>
9870
9871 * src/files.c (tryopen, tryclose): Move to the top.
9872 Be static.
9873
9874 2000-03-31 Akim Demaille <akim@epita.fr>
9875
9876 * src/main.c (main): Don't call `done', exit does it.
9877
9878 2000-03-31 Akim Demaille <akim@epita.fr>
9879
9880 * allocate.c: s/return (foo)/return foo/.
9881 * lalr.c: Likewise.
9882 * LR0.c: Likewise.
9883 * output.c: Likewise.
9884 * reader.c: Likewise.
9885 * symtab.c: Likewise.
9886 * vmsgetargs.c: Likewise.
9887
9888 2000-03-31 Akim Demaille <akim@epita.fr>
9889
9890 Clean up the error reporting functions.
9891
9892 * src/report.c: New file.
9893 * src/report.h: Likewise.
9894 * src/Makefile.am: Adjust.
9895 * m4/error.m4: New file.
9896 * m4/Makefile.am: Adjust.
9897 * configure.in (jm_PREREQ_ERROR): Call it.
9898 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9899 Remove.
9900 (fatal, fatals): Remove. All callers use complain.c::fatal.
9901 (warn, warni, warns, warnss, warnss): Remove. All callers use
9902 complain.c::complain.
9903 (toomany): Remove, use fatal instead.
9904 * src/files.c (done): No argument, use complain_message_count.
9905 * src/main.c (main): Register `done' to `atexit'.
9906
9907 * src/getargs.c (usage): More `fputs', less `fprintf'.
9908
9909 2000-03-28 Akim Demaille <akim@epita.fr>
9910
9911 * lib/: New directory.
9912 * Makefile.am (SUBDIRS): Adjust.
9913 * configure.in: Adjust.
9914 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9915 useless.
9916 * src/alloca.c: Moved to lib/.
9917 * src/getopt.c: Likewise.
9918 * src/getopt1.c: Likewise.
9919 * src/getopt.h: Likewise.
9920 * src/ansi2knr.c: Likewise.
9921 * src/ansi2knr.1: Likewise.
9922 * src/Makefile.am: Adjust.
9923 * lib/Makefile.am: New file.
9924
9925 2000-03-28 Akim Demaille <akim@epita.fr>
9926
9927 * src/getargs.c (usage): Refresh the help message.
9928
9929 2000-03-17 Akim Demaille <akim@epita.fr>
9930
9931 * src/getopt1.c: Updated from textutils 2.0e
9932 * src/getopt.c: Likewise.
9933 * src/getopt.h: Likewise.
9934
9935 2000-03-17 Akim Demaille <akim@epita.fr>
9936
9937 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9938 the file name, not the whole `#line LINE FILE'.
9939
9940 2000-03-17 Akim Demaille <akim@epita.fr>
9941
9942 On syntax errors, report the token on which we choked.
9943
9944 * src/bison.s1 (yyparse): In the label yyerrlab, when
9945 YYERROR_VERBOSE, add yychar in msg.
9946
9947 2000-03-17 Akim Demaille <akim@epita.fr>
9948
9949 * src/reader.c (copy_at): New function.
9950 (copy_guard): Use it.
9951 (copy_action): Use it.
9952
9953 2000-03-17 Akim Demaille <akim@epita.fr>
9954
9955 Be kind to translators, save some useless translations.
9956
9957 * src/main.c (banner): New function.
9958 (fatal_banner): Use it.
9959 (warn_banner): Use it.
9960
9961 2000-03-17 Akim Demaille <akim@epita.fr>
9962
9963 * src/reader.c (copy_definition): Use copy_string and
9964 copy_comment. Removed now unused `match', `ended',
9965 `cplus_comment'.
9966 (copy_comment, copy_string): Moved, to be visible from
9967 copy_definition.
9968
9969 2000-03-17 Akim Demaille <akim@epita.fr>
9970
9971 * src/reader.c (copy_string): Declare `static inline'. No
9972 problems with inline, since it is checked by configure.
9973 (copy_comment): Likewise.
9974
9975 2000-03-17 Akim Demaille <akim@epita.fr>
9976
9977 * src/reader.c (packsymbols): Formatting changes.
9978
9979 2000-03-17 Akim Demaille <akim@epita.fr>
9980
9981 * src/reader.c (copy_comment): New function, factored out from:
9982 (copy_action): Use it. Removed now unused `match', `ended',
9983 `cplus_comment'.
9984 (copy_guard): Likewise.
9985
9986 2000-03-17 Akim Demaille <akim@epita.fr>
9987
9988 * src/reader.c (copy_string): New function, factored out from:
9989 (copy_action): Use it.
9990 (copy_guard): Likewise.
9991
9992 2000-03-17 Akim Demaille <akim@epita.fr>
9993
9994 Change the handling of @s so that they behave exactly like $s.
9995 There is now a pseudo variable @$ (readble and writable), location
9996 of the lhs of the rule (by default ranging from the location of
9997 the first symbol of the rhs, to the location of the last symbol,
9998 or, if the rhs is empty, YYLLOC).
9999
10000 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10001 yyval.
10002 (yyparse): When providing a default semantic action, provide a
10003 default location action.
10004 (after the $): No longer change `*YYLSP', just stack YYLOC the
10005 same way you stack YYVAL.
10006 * src/reader.c (read_declarations): Use warns.
10007 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10008 (copy_action, case '@'): Likewise.
10009 Use a standard error message, to save useless work from
10010 translators.
10011
10012 2000-03-17 Akim Demaille <akim@epita.fr>
10013
10014 * src/bison.s1: Formatting and cosmetics changes.
10015 * src/reader.c: Likewise.
10016 Update the Copyright notice.
10017
10018 2000-03-17 Akim Demaille <akim@epita.fr>
10019
10020 * src/bison.s1 (#line): All set to `#line' only, since the
10021 Makefile now handles them.
10022
10023 2000-03-16 Akim Demaille <akim@epita.fr>
10024
10025 * src/output.c (output_rule_data): Output the documentation of
10026 some of the tables.
10027 (Copyright notice): Update.
10028 Formatting changes.
10029
10030 2000-03-16 Akim Demaille <akim@epita.fr>
10031
10032 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10033 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10034 One `#if YYDEBUG' remains, since it uses variables which are
10035 defined only if `YYDEBUG != 0'.
10036
10037 2000-03-16 Akim Demaille <akim@epita.fr>
10038
10039 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10040 and related variables so that the similarities are highlighted.
10041
10042 2000-03-16 Akim Demaille <akim@epita.fr>
10043
10044 * src/bison.s1: Properly indent CPP directives.
10045
10046 2000-03-16 Akim Demaille <akim@epita.fr>
10047
10048 * src/bison.s1: Properly indent the `alloca' CPP section.
10049
10050 2000-03-16 Akim Demaille <akim@epita.fr>
10051
10052 Do not hard code values of directories in `configure.in'.
10053 Update the `configure' tool chain.
10054
10055 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10056 src/makefile.am.
10057 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10058 (AC_OUTPUT): Add m4/Makefile.
10059 Bump to bison 1.28a, 1.29 has never been released.
10060 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10061 handled via src/Makefile.am.
10062 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10063 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10064 autoheader.
10065 * Makefile.am (SUBDIRS): Add m4.
10066 (ACLOCAL_AM_FLAGS): New variable.
10067 (AUTOMAKE_OPTIONS): Add check-news.
10068 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10069 the proper line number and file name.
10070 (DEFS): Propagate the location of bison library files and of the
10071 locale files.
10072 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10073 builddir.
10074 * acinclude.m4: Remove, replaced by the directory m4.
10075 * m4/Makefile.am (EXTRA_DIST): New variable.
10076 * m4/gettext.m4: New file, from the fileutils.
10077 * m4/lcmessage.m4: Likewise
10078 * m4/progtest.m4: Likewise.
10079 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10080
10081 2000-03-10 Akim Demaille <akim@epita.fr>
10082
10083 * src/closure.c:
10084 Formatting changes of various comments.
10085 Respect the GNU coding standards at various places.
10086 Don't use `_()' when no translation is needed.
10087
10088 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10089
10090 * src/files.c:
10091 OS/2 honors TMPDIR environment variable.
10092
10093 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10094
10095 * doc/bison.texinfo: Tweaked spelling and grammar.
10096 Updated ISBN.
10097 Removed reference to price of printed copy.
10098 Mention BISON_SIMPLE and BISON_HAIRY.
10099
10100 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10101
10102 * configure.in, NEWS:
10103 Bison 1.29 released.
10104
10105 1999-10-27 Jesse Thilo <jthilo@gnu.org>
10106
10107 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10108 Added reference card.
10109
10110 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10111
10112 * po/ru.po: Added Russian translation.
10113
10114 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10115
10116 * configure.in: Added Russian translation.
10117
10118 1999-07-06 Jesse Thilo <jthilo@gnu.org>
10119
10120 * configure.in, NEWS, README:
10121 Released version 1.28.
10122
10123 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10124
10125 * src/system.h:
10126 Squashed redefinition warning on some systems.
10127
10128 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10129 Have configure build version string instead of relying on ANSI string
10130 concatentation.
10131
10132 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10133
10134 * po/POTFILES.in: Got rid of version.c.
10135
10136 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10137
10138 * acconfig.h, configure.in:
10139 Have configure build version string instead of relying on ANSI string
10140 concatentation.
10141
10142 1999-06-08 Jesse Thilo <jthilo@gnu.org>
10143
10144 * doc/bison.1:
10145 Dropped mention of `+' for long-named options.
10146
10147 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10148
10149 * src/files.c: Added <unistd.h> for unlink().
10150
10151 * src/Makefile.am, src/system.h:
10152 I18n fixes.
10153
10154 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10155
10156 * README: Added a FAQ list.
10157
10158 * configure.in, acconfig.h:
10159 I18n fixes.
10160
10161 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10162
10163 * doc/FAQ, doc/Makefile.am:
10164 Added a FAQ list.
10165
10166 1999-05-19 Jesse Thilo <jthilo@gnu.org>
10167
10168 * src/alloc.h, src/symtab.h, src/version.c:
10169 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10170
10171 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10172
10173 * src/.cvsignore, src/Makefile.am:
10174 Reorganized: sources in `src', documentation in `doc'.
10175
10176 * src/lex.c (literalchar):
10177 fixed the code for escaping double quotes (thanks
10178 Jonathan Czisny.)
10179
10180 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10181
10182 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10183 Adjusted paths to reflect directory reorganization.
10184
10185 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10186
10187 * doc/.cvsignore, doc/Makefile.am:
10188 Reorganized: sources in `src', documentation in `doc'.
10189
10190 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10191
10192 * configure.in:
10193 Updated AC_INIT file to reflect directory reorganization.
10194
10195 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10196 Reorganized: sources in `src', documentation in `doc'.
10197
10198 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10199
10200 * src/allocate.c:
10201 Don't declare calloc() and realloc() if not necessary.
10202
10203 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10204
10205 * configure.in, acconfig.h, acinclude.m4:
10206 Don't declare calloc() and realloc() if not necessary.
10207
10208 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10209
10210 * po/.cvsignore: Added i18n support.
10211
10212 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10213
10214 * acconfig.h, configure.in, Makefile.am:
10215 Added i18n support.
10216
10217 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10218
10219 * src/bison.s1: Fixed #line numbers.
10220
10221 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10222
10223 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10224 Added PO files from Translation Project.
10225
10226 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10227
10228 * Makefile.am:
10229 Added support for non-ANSI compilers (ansi2knr).
10230
10231 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10232
10233 * configure.in: Bumped version number to 1.27.
10234
10235 * Makefile.am:
10236 Added `bison.simple' to list of files removed by `make distclean'.
10237
10238 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10239
10240 * src/files.c, src/files.h:
10241 Defined locations of parser files in config.h instead of Makefile.
10242
10243 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10244
10245 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10246 Defined locations of parser files in config.h instead of Makefile.
10247
10248 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10249
10250 * Makefile.am:
10251 Removed inappropriate use of $< macro.
10252
10253 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10254
10255 * po/Makefile.in.in, po/POTFILES.in:
10256 Add `po' directory skeleton.
10257
10258 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10259
10260 * README: Document help-bison list.
10261
10262 * configure.in: Add check for mkstemp().
10263
10264 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10265
10266 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10267 Hush a few compiler warnings.
10268
10269 * src/files.c:
10270 Add tryclose(), which verifies that fclose was successful.
10271 Hush a couple of compiler warnings.
10272
10273 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10274
10275 * Makefile.am, OChangeLog:
10276 ChangeLog is now automatically generated. Include the old version as
10277 OChangeLog.
10278
10279 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10280
10281 * 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:
10282 Update FSF address.
10283
10284 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10285
10286 * doc/bison.texinfo: Fix formatting glitch.
10287
10288 * doc/bison.texinfo: Update FSF address.
10289
10290 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10291
10292 * acconfig.h: Update FSF address.
10293
10294 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10295
10296 * src/system.h:
10297 Don't define PACKAGE here, since config.h defines it.
10298
10299 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10300
10301 * src/reader.c: Update copyright date.
10302
10303 * src/main.c:
10304 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10305 favor of output directly to stderr (avoids buffer overruns).
10306
10307 * src/reader.c: Some checks for premature EOF.
10308
10309 * 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:
10310 Use prototypes if the compiler understands them.
10311
10312 * src/files.c: Honor TMPDIR on Unix hosts.
10313 Use prototypes if the compiler understands them.
10314
10315 * src/reader.c:
10316 Fix a couple of buffer overrun bugs.
10317 Use prototypes if the compiler understands them.
10318
10319 * src/system.h: Include unistd.h and ctype.h.
10320 Use #ifdef instead of #if for NLS symbols.
10321
10322 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10323
10324 * doc/bison.texinfo:
10325 Delete comment "consider using @set for edition number, etc..." since
10326 we now are doing so.
10327
10328 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10329
10330 * configure.in:
10331 Use prototypes if the compiler understands them.
10332
10333 * NEWS: Document 1.26 highlights.
10334
10335 * Makefile.am: Require Automake 1.3 or later.
10336
10337 * acconfig.h:
10338 Use prototypes if the compiler understands them.
10339
10340 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10341
10342 * src/version.c:
10343 Use VERSION symbol from automake for version number.
10344
10345 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10346
10347 * acconfig.h, configure.in, version.cin:
10348 Use VERSION symbol from automake for version number.
10349
10350 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10351
10352 * Makefile.am:
10353 Distribute original version of simple parser (bison.s1), not built
10354 version (bison.simple).
10355
10356 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10357
10358 * doc/bison.texinfo: Add info dir entry.
10359
10360 * doc/bison.texinfo:
10361 Let automake put version number into documentation.
10362
10363 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10364
10365 * src/bison.cld, src/build.com, src/vmshlp.mar:
10366 Add non-RCS files from /gd/gnu/bison.
10367
10368 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10369
10370 * doc/bison.1:
10371 Document the BISON_HAIRY and BISON_SIMPLE variables.
10372
10373 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10374
10375 * src/version.c: Build version.c automatically.
10376
10377 * src/reader.c:
10378 Fix token numbering (used to start at 258, not 257).
10379
10380 * src/system.h: Include config.h.
10381
10382 * src/getargs.c: Update bug report address.
10383
10384 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10385 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10386
10387 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10388
10389 * Makefile.am:
10390 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10391
10392 * configure.in, version.cin:
10393 Build version.c automatically.
10394
10395 * AUTHORS: Add AUTHORS file.
10396
10397 * README: Update bug report address.
10398
10399 * bison.simple:
10400 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10401
10402 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10403 Add automake stuff.
10404
10405 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10406
10407 * doc/bison.texinfo: Clean up some formatting.
10408
10409 1998-05-05 Richard Stallman <rms@gnu.org>
10410
10411 * doc/bison.texinfo:
10412 Explain better why to make a pure parser.
10413
10414 1998-01-05 Richard Stallman <rms@gnu.org>
10415
10416 * src/files.c (openfiles):
10417 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10418 find a temporary directory, if possible. Do not unlink files while
10419 they are open.
10420
10421 1997-08-25 Richard Stallman <rms@gnu.org>
10422
10423 * src/reader.c (stack_offset;):
10424 Change some warni to warns.
10425
10426 * src/lex.c (literalchar): Use warns, not warni.
10427
10428 1997-06-28 Richard Stallman <rms@gnu.org>
10429
10430 * src/bison.s1: Add a Bison version comment.
10431
10432 * src/main.c (fatal, warn, berror):
10433 Use program_name.
10434
10435 1997-06-28 Richard Stallman <rms@gnu.org>
10436
10437 * Makefile.in (bison_version): New variable.
10438 (dist): Use that variable.
10439 (bison.s1): Substitute the Bison version into bison.simple.
10440
10441 * bison.simple: Add a Bison version comment.
10442
10443 1997-06-18 Richard Stallman <rms@gnu.org>
10444
10445 * src/main.c (fatal, warn, berror):
10446 Make error messages standard.
10447 (toomany): Improve error message text.
10448
10449 * 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:
10450 new.h renamed to alloc.h.
10451
10452 1997-06-18 Richard Stallman <rms@gnu.org>
10453
10454 * Makefile.in: new.h renamed to alloc.h.
10455
10456 1997-05-24 Richard Stallman <rms@gnu.org>
10457
10458 * src/lex.c (literalchar):
10459 Fix the code for escaping \, " and '.
10460
10461 (lex): Avoid trouble when there are many chars
10462 to discard in a char literal with just several chars in it.
10463
10464 1997-05-17 Richard Stallman <rms@gnu.org>
10465
10466 * src/bison.s1:
10467 Use malloc, if using alloca is troublesome.
10468 (YYSTACK_USE_ALLOCA): New flag macro.
10469 Define it for some systems and compilers.
10470 (YYSTACK_ALLOC): New macro.
10471 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10472 If it was malloc'd, free it.
10473
10474 1997-05-17 Richard Stallman <rms@gnu.org>
10475
10476 * bison.simple:
10477 Use malloc, if using alloca is troublesome.
10478 (YYSTACK_USE_ALLOCA): New flag macro.
10479 Define it for some systems and compilers.
10480 (YYSTACK_ALLOC): New macro.
10481 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10482 If it was malloc'd, free it.
10483
10484 1997-04-23 Richard Stallman <rms@gnu.org>
10485
10486 * src/bison.s1:
10487 (alloca) [__hpux]: Always define as __builtin_alloca.
10488
10489 1997-04-23 Richard Stallman <rms@gnu.org>
10490
10491 * bison.simple:
10492 (alloca) [__hpux]: Always define as __builtin_alloca.
10493
10494 1997-04-22 Richard Stallman <rms@gnu.org>
10495
10496 * src/bison.s1:
10497 [__hpux]: Include alloca.h (right for HPUX 10)
10498 instead of declaring alloca (right for HPUX 9).
10499
10500 * src/bison.s1 (__yy_memcpy):
10501 Declare arg `count' as unsigned int.
10502 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10503
10504 1997-04-22 Richard Stallman <rms@gnu.org>
10505
10506 * bison.simple:
10507 [__hpux]: Include alloca.h (right for HPUX 10)
10508 instead of declaring alloca (right for HPUX 9).
10509
10510 * bison.simple (__yy_memcpy):
10511 Declare arg `count' as unsigned int.
10512 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10513
10514 1997-01-03 Richard Stallman <rms@gnu.org>
10515
10516 * src/allocate.c: [__STDC__ or _MSC_VER]:
10517 Declare calloc and realloc to return void *.
10518
10519 1997-01-02 Richard Stallman <rms@gnu.org>
10520
10521 * src/system.h:
10522 [_MSC_VER]: Include stdlib.h and process.h.
10523 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10524
10525 * src/main.c (main): Return FAILURE as a value.
10526 (printable_version): Declare arg as int, not char.
10527
10528 1997-01-02 Richard Stallman <rms@gnu.org>
10529
10530 * Makefile.in (dist):
10531 Explicitly check for symlinks, and copy them.
10532
10533 1996-12-19 Richard Stallman <rms@gnu.org>
10534
10535 * src/files.c:
10536 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10537
10538 1996-12-18 Paul Eggert <eggert@gnu.org>
10539
10540 * src/bison.s1 (yyparse):
10541 If __GNUC__ and YYPARSE_PARAM are both defined,
10542 declare yyparse to have a void * argument.
10543
10544 1996-12-18 Paul Eggert <eggert@gnu.org>
10545
10546 * bison.simple (yyparse):
10547 If __GNUC__ and YYPARSE_PARAM are both defined,
10548 declare yyparse to have a void * argument.
10549
10550 1996-12-17 Richard Stallman <rms@gnu.org>
10551
10552 * src/reduce.c (nbits): Add some casts.
10553
10554 1996-08-12 Richard Stallman <rms@gnu.org>
10555
10556 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10557
10558 1996-08-12 Richard Stallman <rms@gnu.org>
10559
10560 * bison.simple: Test _MSDOS as well as _MSDOS_.
10561
10562 1996-07-31 Richard Stallman <rms@gnu.org>
10563
10564 * src/bison.s1:
10565 [__sun && __i386]: Include alloca.h.
10566
10567 1996-07-31 Richard Stallman <rms@gnu.org>
10568
10569 * bison.simple:
10570 [__sun && __i386]: Include alloca.h.
10571
10572 1996-07-30 Richard Stallman <rms@gnu.org>
10573
10574 * src/bison.s1: Comment change.
10575
10576 * src/bison.s1: Test _MSDOS_, not MSDOS.
10577
10578 1996-07-30 Richard Stallman <rms@gnu.org>
10579
10580 * bison.simple: Comment change.
10581
10582 * bison.simple: Test _MSDOS_, not MSDOS.
10583
10584 1996-06-01 Richard Stallman <rms@gnu.org>
10585
10586 * 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:
10587 Insert `_' macro around many string constants.
10588
10589 * src/main.c:
10590 Insert `_' macro around many string constants.
10591
10592 (main): Call setlocale, bindtextdomain and textdomain.
10593
10594 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10595 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10596 [ENABLE_NLS]: Include libintl.h.
10597 [ENABLE_NLS] (gettext): Define.
10598 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10599 (N_, PACKAGE, LOCALEDIR): New macros.
10600
10601 1996-06-01 Richard Stallman <rms@gnu.org>
10602
10603 * POTFILES.in: New file.
10604
10605 * Makefile.in (allocate.o):
10606 Define target explicitly.
10607
10608 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10609 (LDFLAGS): Set to @LDFLAGS@.
10610 (configure): Run autoconf only if preceding `cd' succeeds.
10611 (bison.s1): Redirect output to temporary file then move the
10612 temporary to the target, rather than redirecting directly to bison.s1.
10613 (clean): Remove config.status and config.log.
10614 (distclean): Don't remove config.status here.
10615
10616 1996-05-12 Richard Stallman <rms@gnu.org>
10617
10618 * src/bison.s1:
10619 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10620
10621 1996-05-12 Richard Stallman <rms@gnu.org>
10622
10623 * bison.simple:
10624 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10625
10626 1996-05-11 Richard Stallman <rms@gnu.org>
10627
10628 * src/bison.s1 (__yy_memcpy):
10629 Really reorder the args, as was supposedly done on Feb 14 1995.
10630 (yyparse): Calls changed accordingly.
10631
10632 1996-05-11 Richard Stallman <rms@gnu.org>
10633
10634 * Makefile.in (dist): Don't use $(srcdir).
10635
10636 * bison.simple (__yy_memcpy):
10637 Really reorder the args, as was supposedly done on Feb 14 1995.
10638 (yyparse): Calls changed accordingly.
10639
10640 1996-01-27 Richard Stallman <rms@gnu.org>
10641
10642 * src/output.c (output_rule_data):
10643 Test YYERROR_VERBOSE in the conditional
10644 around the definition of ttyname.
10645
10646 1995-12-29 Richard Stallman <rms@gnu.org>
10647
10648 * src/bison.s1:
10649 Fix line numbers in #line commands.
10650
10651 1995-12-29 Richard Stallman <rms@gnu.org>
10652
10653 * bison.simple:
10654 Fix line numbers in #line commands.
10655
10656 1995-12-27 Richard Stallman <rms@gnu.org>
10657
10658 * src/bison.s1 (YYPARSE_PARAM_DECL):
10659 In C++, make it always null.
10660 (YYPARSE_PARAM_ARG): New macro.
10661 (yyparse): Use YYPARSE_PARAM_ARG.
10662
10663 1995-12-27 Richard Stallman <rms@gnu.org>
10664
10665 * bison.simple (YYPARSE_PARAM_DECL):
10666 In C++, make it always null.
10667 (YYPARSE_PARAM_ARG): New macro.
10668 (yyparse): Use YYPARSE_PARAM_ARG.
10669
10670 1995-11-29 Richard Stallman <rms@gnu.org>
10671
10672 * doc/bison.texinfo:
10673 Describe literal string tokens, %raw, %no_lines, %token_table.
10674
10675 1995-11-29 Daniel Hagerty <hag@gnu.org>
10676
10677 * doc/bison.texinfo: Fixed update date
10678
10679 1995-10-16 Richard Stallman <rms@gnu.org>
10680
10681 * src/version.c: Version 1.25.
10682
10683 1995-10-16 Richard Stallman <rms@gnu.org>
10684
10685 * NEWS: *** empty log message ***
10686
10687 1995-10-16 Richard Stallman <rms@gnu.org>
10688
10689 * doc/bison.1, doc/bison.rnh:
10690 Add new options.
10691
10692 1995-10-15 Richard Stallman <rms@gnu.org>
10693
10694 * src/vmsgetargs.c, src/getargs.c:
10695 Added -n, -k, and -raw switches.
10696 (noparserflag, toknumflag, rawtoknumflag): New variables.
10697
10698 * src/symtab.h (SALIAS):
10699 New #define for adding aliases to %token.
10700 (struct bucket): Added `alias' field.
10701
10702 * src/reduce.c (reduce_grammar):
10703 Revise error message.
10704 (print_notices): Remove final `.' from error message.
10705
10706 * src/reader.c (reader_output_yylsp):
10707 New function.
10708 (readgram): Use `#if 0' around code that accepted %command
10709 inside grammar rules: The documentation doesn't allow it,
10710 and it will fail since the %command processors scan for the next %.
10711 (parse_token_decl): Extended the %token
10712 declaration to allow a multi-character symbol as an alias.
10713 (parse_thong_decl): New function.
10714 (read_declarations): Added %thong declarations.
10715 (read_declarations): Handle NOOP to deal with allowing
10716 % declarations as another means to specify the flags.
10717 (readgram): Allow %prec prior to semantics embedded in a rule.
10718 (skip_to_char, read_declarations, copy_definition)
10719 (parse_token_decl, parse_start_decl, parse_type_decl)
10720 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10721 (get_type_name, copy_guard, copy_action, readgram)
10722 (get_type, packsymbols): Revised most error messages.
10723 Changed `fatal' to `warnxxx' to avoid aborting for error.
10724 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10725 (read_declarations): Improve the error message for
10726 an invalid character. Do not abort.
10727 (read_declarations, copy_guard, copy_action): Use
10728 printable_version to avoid unprintable characters in printed output.
10729 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10730 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10731 Allow the type of a non-terminal can be given
10732 more than once, as long as all specifications give the same type.
10733
10734 * src/output.c:
10735 (output_headers, output_trailers, output, output_gram)
10736 (output_rule_data): Implement noparserflag variable.
10737 Implement toknumflag variable.
10738 (output): Call reader_output_yylsp to output LTYPESTR.
10739
10740 * src/main.c (main):
10741 If reader sees an error, don't process the grammar.
10742 (fatals): Updated to not use VARARGS1.
10743 (printable_version, int_to_string, warn, warni, warns, warnss)
10744 (warnsss): New error reporting functions. Avoid abort for error.
10745
10746 * src/lex.h:
10747 Added THONG and NOOP for alias processing.
10748 Added SETOPT for the new code that allows setting options with %flags.
10749
10750 * src/lex.c:
10751 Include getopt.h. Add some extern decls.
10752 (safegetc): New function to deal with EOF gracefully.
10753 (literalchar); new function to deal with reading \ escapes.
10754 (lex): Use literalchar.
10755 (lex): Implemented "..." tokens.
10756 (literalchar, lex, parse_percent_token): Made tokenbuffer
10757 always contain the token. This includes growing the token
10758 buffer while reading an integer.
10759 (parse_percent_token): Replaced if-else statement with percent_table.
10760 (parse_percent_token): Added % declarations as another
10761 way to specify the flags -n, -l, and -r. Also added hooks for
10762 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10763 major changes to files.c.
10764 (lex) Retain in the incoming stream a character following
10765 an incorrect '/'.
10766 (skip_white_space, lex): Revised most error messages
10767 and changed fatal to warn to avoid aborting.
10768 (percent_table): Added %thong declarations.
10769
10770 * src/gram.h: Comment changes.
10771
10772 * src/files.c (openfiles, open_extra_files, done):
10773 Add faction flag
10774 and actfile file. Handle noparserflag. Both for -n switch.
10775
10776 * src/conflicts.c (resolve_sr_conflict):
10777 Remove use of alloca.
10778
10779 1995-06-01 Jim Meyering <meyering@gnu.org>
10780
10781 * doc/bison.texinfo: *** empty log message ***
10782
10783 1995-05-06 Richard Stallman <rms@gnu.org>
10784
10785 * src/bison.s1: Comment change.
10786
10787 1995-05-06 Richard Stallman <rms@gnu.org>
10788
10789 * bison.simple: Comment change.
10790
10791 1995-05-03 Richard Stallman <rms@gnu.org>
10792
10793 * src/version.c: Version now 1.24.
10794
10795 * src/bison.s1: Change distribution terms.
10796
10797 * src/version.c: Version now 1.23.
10798
10799 1995-05-03 Richard Stallman <rms@gnu.org>
10800
10801 * doc/bison.texinfo:
10802 Rewrite "Conditions for Using Bison".
10803 Update version to 1.24.
10804
10805 1995-05-03 Richard Stallman <rms@gnu.org>
10806
10807 * bison.simple: Change distribution terms.
10808
10809 1995-02-23 Richard Stallman <rms@gnu.org>
10810
10811 * src/files.c: Test __VMS_POSIX as well as VMS.
10812
10813 1995-02-14 Jim Meyering <meyering@gnu.org>
10814
10815 * src/bison.s1 (__yy_memcpy):
10816 Renamed from __yy_bcopy to avoid
10817 confusion. Reverse FROM and TO arguments to be consistent with
10818 those of memcpy.
10819
10820 1995-02-14 Jim Meyering <meyering@gnu.org>
10821
10822 * bison.simple (__yy_memcpy):
10823 Renamed from __yy_bcopy to avoid
10824 confusion. Reverse FROM and TO arguments to be consistent with
10825 those of memcpy.
10826
10827 1994-11-10 David J. MacKenzie <djm@gnu.org>
10828
10829 * NEWS: reformat
10830
10831 * NEWS: New file.
10832
10833 * Makefile.in (DISTFILES): Include NEWS.
10834
10835 * Makefile.in (DISTFILES):
10836 Include install-sh, not install.sh.
10837
10838 * configure.in: Update to Autoconf v2 macro names.
10839
10840 1994-10-05 David J. MacKenzie <djm@gnu.org>
10841
10842 * Makefile.in: fix typo
10843
10844 * Makefile.in (prefix, exec_prefix):
10845 Let configure set them.
10846
10847 1994-09-28 David J. MacKenzie <djm@gnu.org>
10848
10849 * Makefile.in: Set datadir to $(prefix)/share.
10850
10851 1994-09-15 Richard Stallman <rms@gnu.org>
10852
10853 * src/bison.s1:
10854 Update copyright notice and GPL version.
10855
10856 1994-09-15 Richard Stallman <rms@gnu.org>
10857
10858 * bison.simple:
10859 Update copyright notice and GPL version.
10860
10861 1994-07-12 Richard Stallman <rms@gnu.org>
10862
10863 * src/reduce.c, src/reader.c:
10864 entered into RCS
10865
10866 1994-05-05 David J. MacKenzie <djm@gnu.org>
10867
10868 * Makefile.in: entered into RCS
10869
10870 1994-03-26 Richard Stallman <rms@gnu.org>
10871
10872 * src/bison.s1: entered into RCS
10873
10874 1994-03-26 Richard Stallman <rms@gnu.org>
10875
10876 * bison.simple: entered into RCS
10877
10878 1994-03-25 Richard Stallman <rms@gnu.org>
10879
10880 * src/main.c: entered into RCS
10881
10882 1994-03-24 Richard Stallman <rms@gnu.org>
10883
10884 * src/conflicts.c: entered into RCS
10885
10886 1994-01-02 Richard Stallman <rms@gnu.org>
10887
10888 * Makefile.in: *** empty log message ***
10889
10890 1993-11-21 Richard Stallman <rms@gnu.org>
10891
10892 * src/bison.s1: *** empty log message ***
10893
10894 1993-11-21 Richard Stallman <rms@gnu.org>
10895
10896 * doc/bison.texinfo: entered into RCS
10897
10898 * doc/bison.texinfo: *** empty log message ***
10899
10900 1993-11-21 Richard Stallman <rms@gnu.org>
10901
10902 * bison.simple: *** empty log message ***
10903
10904 1993-10-25 David J. MacKenzie <djm@gnu.org>
10905
10906 * doc/bison.texinfo: *** empty log message ***
10907
10908 1993-10-19 Richard Stallman <rms@gnu.org>
10909
10910 * src/bison.s1: *** empty log message ***
10911
10912 1993-10-19 Richard Stallman <rms@gnu.org>
10913
10914 * bison.simple: *** empty log message ***
10915
10916 1993-10-14 Richard Stallman <rms@gnu.org>
10917
10918 * src/bison.s1: *** empty log message ***
10919
10920 1993-10-14 Richard Stallman <rms@gnu.org>
10921
10922 * bison.simple: *** empty log message ***
10923
10924 1993-09-14 David J. MacKenzie <djm@gnu.org>
10925
10926 * doc/bison.texinfo: *** empty log message ***
10927
10928 1993-09-13 Noah Friedman <friedman@gnu.org>
10929
10930 * Makefile.in: *** empty log message ***
10931
10932 1993-09-10 Richard Stallman <rms@gnu.org>
10933
10934 * src/conflicts.c: *** empty log message ***
10935
10936 * src/system.h: entered into RCS
10937
10938 1993-09-10 Richard Stallman <rms@gnu.org>
10939
10940 * doc/bison.1: entered into RCS
10941
10942 1993-09-06 Noah Friedman <friedman@gnu.org>
10943
10944 * src/version.c: entered into RCS
10945
10946 1993-09-06 Noah Friedman <friedman@gnu.org>
10947
10948 * Makefile.in: *** empty log message ***
10949
10950 1993-07-30 David J. MacKenzie <djm@gnu.org>
10951
10952 * Makefile.in: *** empty log message ***
10953
10954 1993-07-24 Richard Stallman <rms@gnu.org>
10955
10956 * src/bison.s1: *** empty log message ***
10957
10958 1993-07-24 Richard Stallman <rms@gnu.org>
10959
10960 * bison.simple: *** empty log message ***
10961
10962 1993-07-08 David J. MacKenzie <djm@gnu.org>
10963
10964 * Makefile.in: *** empty log message ***
10965
10966 1993-07-04 Richard Stallman <rms@gnu.org>
10967
10968 * src/bison.s1: *** empty log message ***
10969
10970 1993-07-04 Richard Stallman <rms@gnu.org>
10971
10972 * bison.simple: *** empty log message ***
10973
10974 1993-06-26 David J. MacKenzie <djm@gnu.org>
10975
10976 * src/getargs.c: entered into RCS
10977
10978 1993-06-26 David J. MacKenzie <djm@gnu.org>
10979
10980 * doc/bison.texinfo: *** empty log message ***
10981
10982 * doc/bison.1: New file.
10983
10984 1993-06-25 Richard Stallman <rms@gnu.org>
10985
10986 * src/getargs.c: New file.
10987
10988 1993-06-16 Richard Stallman <rms@gnu.org>
10989
10990 * src/bison.s1: *** empty log message ***
10991
10992 1993-06-16 Richard Stallman <rms@gnu.org>
10993
10994 * bison.simple: *** empty log message ***
10995
10996 1993-06-03 Richard Stallman <rms@gnu.org>
10997
10998 * src/bison.s1: New file.
10999
11000 1993-06-03 Richard Stallman <rms@gnu.org>
11001
11002 * doc/bison.texinfo: *** empty log message ***
11003
11004 1993-06-03 Richard Stallman <rms@gnu.org>
11005
11006 * bison.simple: New file.
11007
11008 1993-05-19 Richard Stallman <rms@gnu.org>
11009
11010 * doc/bison.texinfo: New file.
11011
11012 1993-05-07 Noah Friedman <friedman@gnu.org>
11013
11014 * Makefile.in: *** empty log message ***
11015
11016 1993-04-28 Noah Friedman <friedman@gnu.org>
11017
11018 * src/reader.c: *** empty log message ***
11019
11020 1993-04-23 Noah Friedman <friedman@gnu.org>
11021
11022 * src/alloc.h: entered into RCS
11023
11024 1993-04-20 David J. MacKenzie <djm@gnu.org>
11025
11026 * src/version.c: *** empty log message ***
11027
11028 * src/files.c, src/allocate.c:
11029 entered into RCS
11030
11031 * src/reader.c: *** empty log message ***
11032
11033 * src/lex.c: entered into RCS
11034
11035 * src/conflicts.c: New file.
11036
11037 * src/symtab.c: entered into RCS
11038
11039 * src/alloc.h: New file.
11040
11041 * src/LR0.c: entered into RCS
11042
11043 1993-04-18 Noah Friedman <friedman@gnu.org>
11044
11045 * src/reader.c: New file.
11046
11047 * src/version.c: *** empty log message ***
11048
11049 1993-04-18 Noah Friedman <friedman@gnu.org>
11050
11051 * Makefile.in: *** empty log message ***
11052
11053 1993-04-17 Noah Friedman <friedman@gnu.org>
11054
11055 * Makefile.in: *** empty log message ***
11056
11057 1993-04-15 Richard Stallman <rms@gnu.org>
11058
11059 * src/main.c, src/files.c:
11060 New file.
11061
11062 1993-04-15 Noah Friedman <friedman@gnu.org>
11063
11064 * configure.in: entered into RCS
11065
11066 * configure.in: *** empty log message ***
11067
11068 * configure.in: New file.
11069
11070 1993-04-14 Richard Stallman <rms@gnu.org>
11071
11072 * Makefile.in: New file.
11073
11074 1993-04-13 Richard Stallman <rms@gnu.org>
11075
11076 * src/version.c: New file.
11077
11078 1993-03-25 Richard Stallman <rms@gnu.org>
11079
11080 * src/output.c: entered into RCS
11081
11082 1992-09-25 Richard Stallman <rms@gnu.org>
11083
11084 * configure.bat: entered into RCS
11085
11086 1992-06-22 Richard Stallman <rms@gnu.org>
11087
11088 * src/vmsgetargs.c: entered into RCS
11089
11090 1992-06-22 Richard Stallman <rms@gnu.org>
11091
11092 * doc/bison.rnh: entered into RCS
11093
11094 1992-04-20 David J. MacKenzie <djm@gnu.org>
11095
11096 * README: entered into RCS
11097
11098 1992-01-22 Richard Stallman <rms@gnu.org>
11099
11100 * src/machine.h: entered into RCS
11101
11102 1991-12-21 Richard Stallman <rms@gnu.org>
11103
11104 * src/lalr.c, src/closure.c:
11105 entered into RCS
11106
11107 1991-12-20 Richard Stallman <rms@gnu.org>
11108
11109 * src/state.h: entered into RCS
11110
11111 1991-12-18 Richard Stallman <rms@gnu.org>
11112
11113 * src/print.c, src/nullable.c, src/derives.c:
11114 entered into RCS
11115
11116 1991-11-03 David J. MacKenzie <djm@gnu.org>
11117
11118 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11119 entered into RCS
11120
11121 1988-09-09 Richard Stallman <rms@gnu.org>
11122
11123 * src/bison.hairy: entered into RCS
11124
11125 1987-12-16 Richard Stallman <rms@gnu.org>
11126
11127 * REFERENCES: entered into RCS
11128
11129 -----
11130
11131 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11132 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11133
11134 This file is part of Bison, the GNU Compiler Compiler.
11135
11136 Bison is free software; you can redistribute it and/or modify
11137 it under the terms of the GNU General Public License as published by
11138 the Free Software Foundation; either version 2, or (at your option)
11139 any later version.
11140
11141 Bison is distributed in the hope that it will be useful,
11142 but WITHOUT ANY WARRANTY; without even the implied warranty of
11143 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11144 GNU General Public License for more details.
11145
11146 You should have received a copy of the GNU General Public License
11147 along with Bison; see the file COPYING. If not, write to
11148 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11149 Boston, MA 02111-1307, USA.