]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
[bison.git] / ChangeLog
... / ...
CommitLineData
12003-03-31 Akim Demaille <akim@epita.fr>
2
3 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
4 From Paul Hilfinger.
5
62003-03-29 Akim Demaille <akim@epita.fr>
7
8 * m4/error.m4: Do not put under dynamic conditions some code which
9 expansion is under static control.
10
112003-03-29 Akim Demaille <akim@epita.fr>
12
13 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14
152003-03-29 Akim Demaille <akim@epita.fr>
16
17 * doc/bison.texinfo (Strings are Destroyed): New.
18
192003-03-13 Paul Eggert <eggert@twinsun.com>
20
21 * .cvsignore: Add configure.lineno.
22 * src/.cvsignore: Add yacc.
23 * tests/.cvsignore: Add testsuite.log.
24 * doc/fdl.texi: Sync with latest FSF version.
25
262003-03-12 Paul Eggert <eggert@twinsun.com>
27
28 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
29 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
30 cursor, instead of leaving it undefined. This fixes a bug
31 reported by Tim Van Holder in
32 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
33 * tests/input.at (Torturing the Scanner): Test the scanner on
34 an empty input file, which was Tim Van Holder's test case.
35
36 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
37 <sys/resource.h> can be included, include sys/time.h and
38 sys/times.h first, if available. This works around the SunOS
39 4.1.4 porting bug reported by Bruce Becker in
40 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
41
42 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
43 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
44 AC_HEADER_SYS_WAIT.
45
46 Merge changes from gnulib. This was prompted because the CVS
47 snapshot didn't build on Solaris 7 due to strnlen problems.
48
49 These changes need to be merged back into gnulib:
50 * lib/hash.c: Include <stdbool.h> unconditionally.
51 * m4/onceonly.m4 (m4_quote): New macro.
52 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
53 Quote AC_FOREACH variable-expansions properly.
54 The 2003-01-03 obstack.h change also needs merging.
55 {end of changes requiring merging}
56
57 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
58 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
59 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
60 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
61 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
62 New files, imported from gnulib.
63 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
64 above.
65
66 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
67 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
68 gnulib sources.
69
70 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
71 Add.
72 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
73 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
74 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
75 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
76 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
77 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
78 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
79 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
80 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
81 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
82 (jm_PREREQ_ARGMATCH): Remove.
83 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
84 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
85
86 * src/system.h: Include <stdbool.h> unconditionally.
87
88 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
89 assuming at least C89 in the bitset code for some time now.
90
912003-03-03 Akim Demaille <akim@epita.fr>
92
93 * ro.po: New.
94
952003-03-02 Akim Demaille <akim@epita.fr>
96
97 * doc/bison.texinfo (Table of Symbols): Reactivate the
98 documentation for %lex-param, and %parse-param.
99
1002003-03-02 Akim Demaille <akim@epita.fr>
101
102 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
103 generate verbose error messages.
104 Use the number of tokens as an upper bound in yytname, as it
105 cannot be a non terminal.
106
1072003-03-02 Akim Demaille <akim@epita.fr>
108
109 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
110 message.
111
1122003-03-02 Akim Demaille <akim@epita.fr>
113
114 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
115 Use them to exercise yycheck overrun.
116 Based on Andrew Suffield's grammar.
117
1182003-03-02 Akim Demaille <akim@epita.fr>
119
120 Create tests/local.at for Bison generic testing macros.
121
122 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
123 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
124 This new file.
125 * tests/calc.at (AT_CHECK_CALC): Adjust.
126 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
127 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
128 * tests/local.at: here.
129 (AT_COMPILE_CXX): Tags the tests using it as c++.
130 Ignore the test if CXX is not functional.
131
1322003-03-01 Paul Eggert <eggert@twinsun.com>
133
134 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
135 not loc->end, since loc->end might contain garbage and this leads
136 to undefined behavior on some platforms.
137 (id_loc, token_start): Use (IF_LINTed) initial values that do not
138 depend on *loc, so that the reader doesn't give the the false
139 impression that *loc is initialized.
140 (<INITIAL>"%%"): Do not bother setting code_start, since its value
141 does not survive the return.
142
1432003-03-01 Akim Demaille <akim@epita.fr>
144
145 * src/scan-gram.l (code_start): Always initialize it when entering
146 into yylex, as SC_EPILOGUE is activated *before* the corresponding
147 yylex invocation. An alternative would be making it static, but
148 then it starts with the second %%'s beginning, instead of its end.
149
1502003-02-28 Paul Eggert <eggert@twinsun.com>
151
152 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
153 around a UnixWare 7.1.1 porting bug reported by John Hughes in
154 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
155
1562003-02-26 Paul Eggert <eggert@twinsun.com>
157
158 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
159 Remove Sequent/Pyramid discussion (nobody uses them any more).
160 Merge VMS and MS-DOS discussion; these ports may well be dead
161 but let's keep mentioning them for now. Put <> around email
162 addresses. Add copyright notice.
163
1642003-02-24 Paul Eggert <eggert@twinsun.com>
165
166 * data/glr.c (yy_reduce_print): yylineno -> yylno,
167 to avoid collision with flex use of yylineno.
168 Problem reported by Bruce Lilly in
169 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
170 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
171 * data/yacc.c (yy_reduce_print): Likewise.
172
173 * config/depcomp: Sync with Automake 1.7.3.
174
1752003-02-21 Akim Demaille <akim@epita.fr>
176
177 * data/lalr1.cc: Use temporary variables instead of casts to
178 change integer types.
179 Suggested by Paul Eggert.
180
1812003-02-21 Akim Demaille <akim@epita.fr>
182
183 * doc/bison.texinfo: Use "location" consistently to refer to @n,
184 to avoid confusions with lalr1.cc's notion of Position.
185 Suggested by Paul Eggert.
186
1872003-02-20 Akim Demaille <akim@epita.fr>
188
189 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
190 before initial_columns.
191 (location.hh): Use consistent variable names when defining the
192 operator<<.
193 Use "last" so that we subtract from Positions, not from unsigned.
194
1952003-02-20 Akim Demaille <akim@epita.fr>
196
197 * data/lalr1.cc (position.hh): New subfile, including the extended
198 and Doxygen'ed documentation of class Position.
199 (location.hh): Use it.
200 Document a` la Doxygen.
201 With the help of Benoit Perrot.
202
2032003-02-20 Akim Demaille <akim@epita.fr>
204
205 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
206 AT_YACC_IF.
207 Redefine AT_YYERROR_SEES_LOC_IF using it.
208 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
209 not defined.
210 Don't use the location in yy::Parser::error_ and
211 yy::Parser::print_ when not %locations.
212 Activate more lalr1.cc tests.
213
2142003-02-19 Akim Demaille <akim@epita.fr>
215
216 * data/lalr1.cc: When displaying a line number, be sure to make it
217 an int.
218
2192003-02-19 Akim Demaille <akim@epita.fr>
220
221 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
222 Remove, useless.
223 (YYABORT, YYACCEPT, YYERROR): New.
224 * tests/calc.at: Renable the lalr1.cc test.
225
2262003-02-19 Akim Demaille <akim@epita.fr>
227
228 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
229 error recovery, mixing with/without pops and discarding of the
230 lookahead.
231 Exercise YYERROR.
232 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
233
2342003-02-17 Paul Eggert <eggert@twinsun.com>
235
236 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
237 * tests/testsuite.at (AT_COMPILE): Use them.
238 This fixes the testsuite problem reported by Robert Lentz in
239 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
240
2412003-02-12 Paul Eggert <eggert@twinsun.com>
242
243 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
244 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
245 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
246 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
247 Check for malloc failure, for consistency with yacc.c.
248 (yytname_size): Remove, for consistency with yacc.c.
249
250 The bug still remains in data/lalr1.cc, as I didn't have time
251 to fix it there.
252
2532003-02-06 Akim Demaille <akim@epita.fr>
254
255 * configure.ac (GXX): Rename as...
256 (CXX): this, to keep the original Autoconf semantics.
257 Require 2.57.
258 * data/lalr1.cc: Fix b4_copyright invocations.
259 If YYDEBUG is not defined, don't depend upon name_ being defined.
260 (location.hh): Include string and iostream.
261 (Position::filename): New member.
262 (Position::Position ()): New.
263 (operator<< (Position)): New.
264 (operator- (Position, int)): New.
265 (Location::first, Location::last): Rename as...
266 (Location::begin, Location::end): these, to mock the conventional
267 iterator names.
268 (operator<< (Location)): New.
269 * tests/atlocal.in (CXX): New.
270 * tests/testsuite.at (AT_COMPILE_CXX): New.
271 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
272 locations in a more synthetic way.
273 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
274 lalr1.cc is used.
275 Adjust the C locations to match those from Emacs: first column is
276 column 0.
277 Change all the expected results.
278 Conform to the GCS: simplify the locations when applicable.
279 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
280 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
281 these CPP macros with the m4 macros new defined by...
282 (AT_CHECK_PUSHDEFS): this, i.e.:
283 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
284 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
285 New macros.
286 (AT_CHECK_POPDEFS): Undefine them.
287 (AT_CHECK_CALC_LALR1_CC): New.
288 Use it for the first lalr1.cc test.
289
2902003-02-04 Akim Demaille <akim@epita.fr>
291
292 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
293 Location as is defined.
294
2952003-02-04 Akim Demaille <akim@epita.fr>
296
297 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
298 name_ being defined.
299
3002003-02-03 Paul Eggert <eggert@twinsun.com>
301
302 * src/gram.h (start_symbol): Remove unused decl.
303
304 Use more-consistent naming conventions for local vars.
305
306 * src/derives.c (derives_compute): Change type of local var from
307 int to rule_number.
308 * src/gram.c (grammar_rules_partial_print): Likewise.
309 * src/print.c (print_core): Likewise.
310 * src/reduce.c (reduce_grammar_tables): Likewise.
311
312 * src/gram.c (grammar_dump): Change name of item_number *
313 local var from r to rp.
314 * src/nullable.c (nullable_compute): Likewise.
315
316 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
317
318 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
319 for symbol or symbol_number var.
320 * src/reader.c (grammar_start_symbol_set): Likewise.
321 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
322 Likewise.
323 * src/state.c (transitions_to): Likewise.
324 * src/state.h: Likewise.
325 * src/tables.c (symbol_number_to_vector_number): Likewise.
326
327 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
328 char * var.
329
330 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
331 var.
332
333 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
334 var.
335
336 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
337 Use str, not s, for char * var. Use ch, not c, for character var.
338 Use size for size var.
339
340 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
341 char * var.
342 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
343 uniqstr var.
344 * src/uniqstr.h: Likewise.
345
346 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
347 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
348 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
349 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
350 param to have same name as that of enum, so that we don't use
351 "s" to stand for a non-state.
352
3532003-02-02 Akim Demaille <akim@epita.fr>
354
355 * src/scan-skel.l: Scan more than one inert character per yylex
356 invocation.
357
3582003-02-01 Paul Eggert <eggert@twinsun.com>
359
360 Version 1.875a.
361
362 * po/LINGUAS: Add ms.
363
3642003-01-30 Akim Demaille <akim@epita.fr>
365
366 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
367
3682003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
369
370 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
371 of $1.
372
373 Changes in response to error report by S. Eken: GLR mode does not
374 handle negative $ indices or $ indices in embedded rules correctly.
375 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
376
377 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
378 (b4_rhs_location): Ditto.
379 (yyfill): New function to copy from stack tree into array
380 incrementally.
381 (yyuserAction): Modify to allow incremental move of semantic values
382 to rhs array when in GLR mode.
383 Define YYFILL to use in user-defined actions to fill semantic array
384 as needed.
385 Remove dummy use of yystack, as there is now a guaranteed use.
386 (yydoAction): Modify to allow incremental move of semantic values
387 to rhs array when in GLR mode.
388 (yyresolveAction): Ditto.
389 (yyglrShiftDefer): Update comment.
390 (yyresolveStates): Use X == NULL for pointers, not !X.
391 (yyglrReduce): Ditto.
392 (yydoAction): Ditto
393
394 * tests/glr-regr1.at: Rename to ...
395 * tests/glr-regression.at: Add new regression test for the problems
396 described above (adapted from S. Eken).
397 Update copyright notice.
398 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
399 * tests/Makefile.am: Ditto.
400
4012003-01-28 Paul Eggert <eggert@twinsun.com>
402
403 * data/lalr1.cc: Do not use @output_header_name@ unless
404 b4_defines_flag is set. This fixes two bugs reported by
405 Tim Van Holder in
406 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
407 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
408
4092003-01-21 Paul Eggert <eggert@twinsun.com>
410
411 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
412 we don't need to worry about yyerrlab1 being reported as an
413 "unused label" by non-GCC C compilers. The downside is that if
414 locations are used then a couple of statements are duplicated each
415 time YYERROR is invoked, but the upside is that the warnings
416 should vanish.
417 (yyerrlab1): Move code to YERROR.
418 (yyerrlab2): Remove. Change uses back to yyerrlab1.
419 This reverts some of the 2002-12-27 change.
420
4212003-01-17 Paul Eggert <eggert@twinsun.com>
422
423 * src/output.c (symbol_printers_output): Fix typo that led
424 to core dump. Problem reported by Antonio Rus in
425 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
426
4272003-01-13 Akim Demaille <akim@epita.fr>,
428 Quoc Peyrot <chojin@lrde.epita.fr>,
429 Robert Anisko <anisko_r@lrde.epita.fr>
430
431 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
432 when the stacks contain one element, as the loop would otherwise
433 free the last state, and then use the top state (the one we just
434 popped). This means that the initial elements will not be freed
435 explicitly, as is the case in yacc.c; it is not a problem, as
436 these elements have fake values.
437
4382003-01-11 Paul Eggert <eggert@twinsun.com>
439
440 * NEWS: %expect-violations are now just warnings, reverting
441 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
442 bootstrapping problem reported by Matthias Klose; see
443 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
444 * src/conflicts.c (conflicts_print): Likewise.
445 * tests/conflicts.at (%expect not enough, %expect too much,
446 %expect with reduce conflicts): Likewise.
447 * doc/bison.texinfo (Expect Decl): Document this. Also mention
448 that the warning is enabled if the number of conflicts changes
449 (not necessarily increases).
450
451 * src/getargs.c (version): Update copyright year.
452
4532003-01-09 Akim Demaille <akim@epita.fr>
454
455 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
456
4572003-01-08 Paul Eggert <eggert@twinsun.com>
458
459 * Makefile.maint (WGETFLAGS):
460 New macro, containing "-C off" to disable proxy caches.
461 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
462 (rel-check): Use $(WGET) instead of wget.
463
4642003-01-06 Paul Eggert <eggert@twinsun.com>
465
466 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
467 the GLR paper of Scott, Johnstone and Hussain.
468
4692003-01-04 Paul Eggert <eggert@twinsun.com>
470
471 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
472 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
473 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
474 (EXTRA_LIBRARIES): New var, for liby.a.
475 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
476 (EXTRA_SCRIPTS): New var, for yacc.
477
478 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
479 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
480 Problem reported by Nelson H. F. Beebe.
481
4822003-01-03 Paul Eggert <eggert@twinsun.com>
483
484 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
485 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
486 when compiling Bison 1.875's `bitset bset = obstack_alloc
487 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
488
489 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
490 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
491 grow to a huge size with typical invocation.
492
493 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
494 Use the pattern recommended by Autoconf 2.57, except also protect
495 against double-definition.
496 * src/system.h: Likewise.
497 Portability issues reported by Nelson H. F. Beebe.
498
499 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
500 All uses changed. Provide a definition in both C and C++.
501 (yytrue, yyfalse): Define even if defined (__cplusplus).
502
503 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
504 Reported by Nelson H. F. Beebe.
505
506 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
507
5082003-01-02 Paul Eggert <eggert@twinsun.com>
509
510 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
511 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
512 Bug reported by Nelson H. F. Beebe.
513
5142003-01-01 Paul Eggert <eggert@twinsun.com>
515
516 * Version 1.875.
517
5182002-12-30 Paul Eggert <eggert@twinsun.com>
519
520 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
521 Moved here from...
522 (<INITIAL>","): Here. This causes stray "," to be treated
523 more uniformly.
524
525 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
526 last brace in braced code when not in Yacc mode, for compatibility
527 with Bison 1.35. This resurrects the 2001-12-15 patch to
528 src/reader.c.
529
530 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
531 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
532
5332002-12-28 Paul Eggert <eggert@twinsun.com>
534
535 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
536 that of SYM's type. This fixes Debian bug 168069, reported by
537 Thomas Olsson.
538
5392002-12-28 Paul Eggert <eggert@twinsun.com>
540
541 Version 1.75f.
542
543 Switch back to the Yacc style of conflict reports, undoing some
544 of the 2002-07-30 change.
545 * doc/bison.texinfo (Understanding): Use Yacc style for
546 conflict reports. Also, use new way of locating rules.
547 * src/conflicts.c (conflict_report):
548 Renamed from conflict_report_yacc, removing the old
549 'conflict_report'. Translate the entire conflict report at once,
550 so that we don't assume that "," has the same interpretation in
551 all languages.
552 (conflicts_output): Use Yacc-style conflict report for each state,
553 instead of our more-complicated style.
554 (conflicts_print): Use Yacc-style conflict report, except print
555 the input file name when not emulating Yacc.
556 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
557 Conflicted Reduction, %expect not enough, %expect too much,
558 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
559 * tests/existing.at (GNU Cim Grammar): Likewise.
560 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
561
562 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
563 fatal): Don't invoke fflush; it's not needed and it might even be
564 harmful for stdout, as stdout might not be open.
565 * src/reduce.c (reduce_print): Likewise.
566
5672002-12-27 Paul Eggert <eggert@twinsun.com>
568
569 Fix a bug where error locations were not being recorded correctly.
570 This problem was originally reported by Paul Hilfinger in
571 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
572
573 * data/yacc.c (yyparse): New local var yylerrsp, to record the
574 top of the location stack's error locations.
575 (yyerrlab): Set it. When discarding a token, push its location
576 onto yylerrsp so that we don't lose track of the error's end.
577 (yyerrlab1): Now is only the target of YYERROR, so that we can
578 properly record the location of the action that failed. For GCC
579 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
580 GCC warning about yyerrlab1 being unused if YYERROR is unused.
581 (yyerrlab2): New label, which yyerrlab now falls through to.
582 Compute the error's location by applying YYLLOC_DEFAULT to
583 the locations of all the symbols that went into the error.
584 * doc/bison.texinfo (Location Default Action): Mention that
585 YYLLOC_DEFAULT is also invoked for syntax errors.
586 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
587 Error locations include the locations of all the tokens that were
588 discarded, not just the last token.
589
5902002-12-26 Paul Eggert <eggert@twinsun.com>
591
592 * src/files.c: Include quote.h.
593 (compute_output_file_names): Warn if we detect conflicting
594 outputs to the same file. This should catch the misunderstanding
595 exemplified by Debian Bug 165349, reported by Bruce Stephens..
596
597 * src/conflicts.c (conflicts_print): If the user specifies
598 "%expect N", report an error if there are any reduce/reduce
599 conflicts. This is what the manual says should happen.
600 This fixes Debian bug 130890, reported by Anthony DeRobertis.
601 * tests/conflicts.at (%expect with reduce conflicts): New test.
602
603 Don't use m4_include on relative file names, as it doesn't work as
604 desired if there happens to be a file with that name under ".".
605
606 * m4sugar/version.m4: Remove; it was included but it wasn't used.
607 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
608 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
609 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
610 * src/output.c (output_skeleton): Use full path names when
611 specifying a file to include; don't rely on include path, as
612 it's unreliable when the working file contains a file with
613 that name.
614
6152002-12-25 Paul Eggert <eggert@twinsun.com>
616
617 Remove obsolete references to bison.simple and bison.hairy.
618 Problem mentioned by Aubin Mahe in
619 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
620 * data/glr.c: Comment fix.
621 * doc/bison.1: Remove references. Also, mention "yacc".
622
623 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
624 with -g option.
625
626 * src/parse-gram.y (declaration): Use enum "report_states" rather
627 than its numeric value 1.
628
629 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
630 opening a new one. This fixes Debian bug 165349, reported by
631 Bruce Stephens.
632
6332002-12-24 Paul Eggert <eggert@twinsun.com>
634
635 Version 1.75e.
636
637 * Makefile.maint (cvs-update): Don't assume that the shell
638 supports $(...), as Solaris sh doesn't.
639
640 * src/parse-gram.y (lloc_default): Remove test for empty
641 nonterminals at the end, since it didn't change the result.
642
6432002-12-24 Paul Eggert <eggert@twinsun.com>
644
645 If the user does not define YYSTYPE as a macro, Bison now declares it
646 using typedef instead of defining it as a macro. POSIX requires this.
647 For consistency, YYLTYPE is also declared instead of defined.
648
649 %union directives can now have a tag before the `{', e.g., the
650 directive `%union foo {...}' now generates the C code
651 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
652 The default union tag is `YYSTYPE', for compatibility with Solaris 9
653 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
654 instead of `yyltype'.
655
656 `yystype' and `yyltype' are now obsolescent macros instead of being
657 typedefs or tags; they are no longer documented and will be
658 withdrawn in a future release.
659
660 * data/glr.c (b4_location_type): Remove.
661 (YYSTYPE): Renamed from yystype.
662 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
663 (struct YYLTYPE): Renamed from struct yyltype.
664 (YYLTYPE): Renamed from yyltype.
665 (yyltype, yystype): New (and obsolescent) macros,
666 for backward compatibility.
667 * data/yacc.c: Likewise.
668
669 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
670 does not specify a union tag. This is for compatibility with
671 Solaris 9 yacc.
672
673 * src/parse-gram.y (add_param): 2nd arg is now char * not char
674 const *, since it is now modified by stripping surrounding { }.
675 (current_braced_code): Remove.
676 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
677 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
678 trailing " {...}". Now of type <chars>.
679 (grammar_declaration): Adjust to bundled tokens.
680 (code_content): Remove; stripping is now done by add_param.
681 (print_token_value): Print contents of bundled tokens.
682 (token_name): New function.
683
684 * src/reader.h (braced_code, current_braced_code): Remove.
685 (token_name): New decl.
686
687 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
688 token_type, not braced_code code_kind. All uses changed.
689 (SC_PRE_CODE): New state, for scanning after a keyword that
690 has (or usually has) an immediately-following braced code.
691 (token_type): New local var, to keep track of which token type
692 to return when scanning braced code.
693 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
694 <INITIAL>"%parse-param", <INITIAL>"%printer",
695 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
696 instead of returning a token type immediately.
697 (<INITIAL>"{"): Set token type.
698 (<SC_BRACED_CODE>"}"): Use it.
699 (handle_action_dollar, handle_action_at): Now returns bool
700 indicating success. Fail if ! current_rule; this prevents a core dump.
701 (handle_symbol_code_dollar, handle_symbol_code_at):
702 Remove; merge body into caller.
703 (handle_dollar, handle_at): Complain in invalid contexts.
704
705 * NEWS, doc/bison.texinfo: Document the above.
706 * NEWS: Fix years and program names in copyright notice.
707
7082002-12-17 Paul Eggert <eggert@twinsun.com>
709
710 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
711 Reporting, Table of Symbols): Omit mentions of %lex-param and
712 %parse-param from the documentation for now.
713
7142002-12-15 Paul Eggert <eggert@twinsun.com>
715
716 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
717 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
718 lookahead symbol, and which sets yychar in parser actions) and it
719 disagreed with the Bison documentation. Bug
720 reported by Andrew Walrond.
721
722 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
723 as the caller now does that.
724 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
725 (YYEMPTY): Parenthesize right hand side, since others use it.
726 (yyparse): Don't assume that our generated code is the only code
727 that sets yychar.
728
7292002-12-13 Paul Eggert <eggert@twinsun.com>
730
731 Version 1.75d.
732
733 POSIX requires a "yacc" command.
734 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
735 (MOSTLYCLEANFILES): Add yacc.
736 (yacc): New rule.
737 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
738 as an alias for bison y.
739
740 * po/LINGUAS: Add da.
741
742 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
743 problem with latest <getopt.h>.
744 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
745
746 * doc/fdl.texi: Upgrade to 1.2.
747 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
748 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
749 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
750 gnulib.
751 * config/install-sh: Sync with autotools.
752
753 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
754 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
755 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
756 locations are requested.
757 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
758 locations are requested.
759
7602002-12-12 Paul Eggert <eggert@twinsun.com>
761
762 Remove unportable casts and storage allocation tricks.
763 While we're at it, remove almost all casts, since they
764 usually aren't needed and are a sign of trouble.
765
766 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
767
768 * src/derives.c (derives_compute): Do not subtract NTOKENS from
769 the pointer DSET returned by malloc; this isn't portable.
770 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
771 Similarly for DERIVES.
772 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
773 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
774 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
775
776 * src/derives.c (derives_compute): Do not bother invoking
777 int_of_rule_number, since rule numbers are integers.
778
779 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
780 rather than XMALLOC (char, N).
781
782 * src/files.c (filename_split): Rewrite to avoid cast.
783
784 * src/gram.h (symbol_number_as_item_number,
785 item_number_as_symbol_number, rule_number_as_item_number,
786 item_number_as_rule_number):
787 Now inline functions rather than macros, to avoid casts.
788 * src/state.h (state_number_as_int): Likewise.
789 * src/tables.c (state_number_to_vector_number,
790 symbol_number_to_vector_number): Likewise.
791
792 * src/gram.h (int_of_rule_number): Remove; no longer used.
793
794 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
795 since the resulting storage is always stored into.
796
797 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
798 where it's needed.
799
800 * src/muscle_tab.c (muscle_m4_output):
801 Now inline. Return bool, not int.
802 * src/state.c (state_compare): Likewise.
803 * src/symtab.c (symbol_check_defined,
804 symbol_check_alias_consistency, symbol_pack, symbol_translation,
805 hash_compare_symbol, hash_symbol):
806 Likewise.
807 * src/uniqstr.c (uniqstr_print): Likewise.
808 * src/muscle_tab.c (muscle_m4_output_processor):
809 New function, to avoid casts.
810 * src/state.c (state_comparator, stage_hasher): Likewise.
811 * src/symtab.c (symbol_check_defined_processor,
812 symbol_check_alias_consistency_processor, symbol_pack_processor,
813 symbol_translation_processor, hash_symbol_comparator,
814 hash_symbol_hasher): Likewise.
815 * src/uniqstr.c (uniqstr_print_processor): Likewise.
816 * src/muscle_tab.c (muscles_m4_output):
817 Use new functions instead of casting old functions unportably.
818 * src/state.c (state_hash_new): Likewise.
819 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
820 symbols_token_translations_init):
821 Likewise.
822 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
823
824 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
825 var instead of casting to long, to avoid casts.
826 (prepare_states): Use MALLOC rather than alloca, so that we don't
827 have to worry about alloca.
828 * src/state.c (state_hash_lookup): Likewise.
829
830 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
831 local var instead of casting to unsigned char, to avoid casts.
832
833 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
834 STATE_ALLOC): Remove.
835 (transitions_new, errs_new, reductions_new, state_new): Use malloc
836 rather than calloc, and use offsetof to avoid allocating slightly
837 too much storage.
838 (state_new): Initialize all members.
839
840 * src/state.c (state_hash): Use unsigned accumulator, not signed.
841
842 * src/symtab.c (symbol_free): Remove; unused.
843 (symbol_get): Remove cast in lhs of assignment.
844 (symbols_do): Now static. Accept generic arguments, not
845 hashing-related ones.
846
847 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
848 (symbol_processor): Remove.
849 (symbols_do): Remove decl; now static.
850
851 * src/system.h (alloca): Remove; decl no longer needed.
852 (<stddef.h>): Include, for offsetof.
853 (<inttypes.>, <stdint.h>): Include if available.
854 (uintptr_t): New type, if system lacks it.
855 (CALLOC, MALLOC, REALLOC): New macros.
856 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
857 new macros.
858
859 * src/tables.c (table_size): Now int, to pacify GCC.
860 (table_grow, table_ninf_remap): Use signed table size.
861 (save_row): Don't bother initializing locals when not needed.
862 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
863 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
864
865 * src/vcg.h: Correct misspellings.
866
867 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
868
869
870 * src/getargs.c (getargs): Don't assume EOF == -1.
871
8722002-12-09 Paul Eggert <eggert@twinsun.com>
873
874 Change identifier spellings to avoid collisions with names
875 that are reserved by POSIX.
876
877 Don't use names ending in _t, since POSIX reserves them.
878 For consistency, remove _e and _s endings -- they're weren't
879 needed to remove ambiguity. All uses changed.
880 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
881 turn was just renamed from struniq_t.
882 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
883 which in turn was just renamed from struniq_processor_t.
884 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
885 in turn was renamed from hash_compare_struniq_t.
886 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
887 (state_list): Renamed from state_list_t.
888 * src/assoc.h (assoc): Renamed from assoc_t.
889 * src/conflicts.c (enum conflict_resolution): Renamed from
890 enum conflict_resolution_e.
891 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
892 (rule_list): Renamed from rule_list_t.
893 * src/getargs.h (enum trace): Renamed from enum trace_e.
894 (enum report): Renamed from enum report_e.
895 * src/gram.h (item_number): Renamed from item_number_t.
896 (rule_number): Renamed from rule_number_t.
897 (struct rule_s): Remove the "rule_s" part; not used.
898 (rule): Renamed from rule_t.
899 (rule_filter): Renamed from rule_filter_t.
900 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
901 (goto_list): Renamed from goto_list_t.
902 * src/lalr.h (goto_number): Renamed from goto_number_t.
903 * src/location.h (location): Renamed from location_t.
904 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
905 and moved here from:
906 * src/muscle_tab.h (muscle_entry_t): here.
907 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
908 (rule_list): Renamed from rule_list_t.
909 * src/print_graph.c (static_graph): Renamed from graph.
910 * src/reader.h (braced_code): Renamed from braced_code_t.
911 Remove brace_code_e tag.
912 * src/relation.h (relation_node): Renamed from relation_node_t.
913 (relation_nodes): Renamed from relation_nodes_t.
914 (relation): Renamed from relation_t.
915 * src/state.h (state_number): Renamed from state_number_t.
916 (struct state): Renamed from struct state_s.
917 (state): Renamed from state_t.
918 (transitions): Renamed from transitions_t. Unused (and
919 misspelled) transtion_s tag removed.
920 (errs): Renamed from errs_t. Unused errs_s tag removed.
921 (reductions): Renamed from reductions_t. Unused tag
922 reductions_s removed.
923 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
924 (struct symbol_list): Renamed from struct symbol_list_s.
925 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
926 (struct symbol): Renamed from struct symbol_s.
927 (symbol): Renamed from symbol_t.
928 * src/tables.c (vector_number): Renamed from vector_number_t.
929 (action_number): Renamed from action_t.
930 * src/tables.h (base_number): Renamed from base_t.
931 * src/vcg.h (enum color): Renamed from enum color_e.
932 (enum textmode): Renamed from enum textmode_e.
933 (enum shape): Renamed from enum shape_e.
934 (struct colorentry): Renamed from struct colorentry_s.
935 (struct classname): Renamed from struct classname_s.
936 (struct infoname): Renamed from struct infoname_s.
937 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
938 (enum decision): Renamed from enum decision_e.
939 (enum orientation): Renamed from enum orientation_e.
940 (enum alignment): Renamed from enum alignment_e.
941 (enum arrow_mode): Renamed from enum arrow_mode_e.
942 (enum crossing_type): Renamed from enum crossing_type_e.
943 (enum view): Renamed from enum view_e.
944 (struct node): Renamed from struct node_s.
945 (node): Renamed from node_t.
946 (enum linestyle): Renamed from enum linestyle_e.
947 (enum arrowstyle): Renamed from enum arrowstyle_e.
948 (struct edge): Renamed from struct edge.
949 (edge): Renamed from edge_t.
950 (struct graph): Renamed from struct graph_s.
951 (graph): Renamed from graph_t.
952 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
953 Rename value_t -> value.
954 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
955 value_t_as_yystype -> value_as_yystype.
956
957 Don't include <errno.h> in the mainstream code, since it
958 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
959 * lib/get-errno.c, lib/get-errno.h: New files.
960 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
961 get-errno.c.
962 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
963 * src/output.c (output_skeleton): Likewise.
964 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
965 instead of errno.
966 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
967 Likewise.
968 (handle_action_dollar, handle_action_at): Likewise.
969 * src/system.h: Do not include <errno.h>.
970 (TAB_EXT): Renamed from EXT_TAB.
971 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
972
973 Avoid str[a-z]*, since <string.h> reserves that name space.
974 Change all instances of "struniq" in names to "uniqstr", and
975 likewise for "STRUNIQ" and "UNIQSTR".
976 * src/uniqstr.c: Renamed from src/struniq.c.
977 * src/uniqstr.h: Renamed from src/struniq.h.
978 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
979 * src/files.c (strsuffix): Remove; unused.
980 (concat2): Renamed from stringappend. Now static.
981 * src/files.h (strsuffix, stringappend): Remove; unused.
982 * src/parse-gram.y (<chars>): Renamed from <string>.
983 (<uniqstr>): Renamed from <struniq>.
984 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
985 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
986 (struct graph_s.expand): Renamed from struct graph_s.stretch.
987 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
988 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
989 (N_EXPAND): Renamed from N_STRETCH.
990
991 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
992 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
993 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
994 Remove; unused.
995 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
996 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
997 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
998 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
999 (BASE_MAXIMUM): Renamed from BASE_MAX.
1000 (BASE_MINIMUM): Renamed from BASE_MIN.
1001 (ACTION_MAX): Remove; unused.
1002 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1003 Unnecessary casts removed from above defines.
1004
1005
1006 Fix misspelling in names.
1007 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1008 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1009 G_NODE_ALIGNEMENT.
1010
1011
1012 * lib/timevar.c (timevar_report): Renamed from time_report,
1013 for consistency with other names.
1014 * lib/timevar.h (timevar_report): New decl.
1015 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1016
1017
1018 Sort include-file uses.
1019
1020 Reorder all include files under src to be in the order "system.h".
1021 then the ../lib include files in angle brackets (alphabetized),
1022 then the . include files in double-quotes (alphabetized). Fix
1023 dependency breakages encountered in this process, as follows:
1024 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1025 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1026 * src/state.h: Include "symtab.h".
1027
10282002-12-08 Paul Eggert <eggert@twinsun.com>
1029
1030 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1031 since this causes problems when __file__ contains character
1032 sequences like "@" that are treated specially by src/scan-skel.l.
1033 Instead, just use the file's basename. This fixes the bug
1034 reported by Martin Mokrejs in
1035 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
1036
10372002-12-06 Paul Eggert <eggert@twinsun.com>
1038
1039 Add support for rules that do not have trailing semicolons, as
1040 POSIX requires. Improve the quality of locations in Bison
1041 diagnostics.
1042
1043 * src/location.c: Include <quotearg.h>.
1044 (empty_location): Now const.
1045 (location_print): New function. Follow the recommendation of the
1046 GNU Coding Standards for locations that span file boundaries.
1047 * src/location.h: Do not include <quotearg.h>; no longer needed.
1048 (boundary): New type.
1049 (location_t): Use it. This allows locations to span file boundaries.
1050 All member uses changed: file -> start.file or end.file (as needed),
1051 first_line -> start.line, first_column -> start.column,
1052 last_line -> end.line, last_column -> end.column.
1053 (equal_boundaries): New function.
1054 (LOCATION_RESET, LOCATION_STEP): Remove.
1055 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1056 (empty_location): Now const.
1057 (location_print): New decl.
1058 * src/parse-gram.y (lloc_default): New function, which handles
1059 empty locations more accurately.
1060 (YYLLOC_DEFAULT): Use it.
1061 (%token COLON): Remove.
1062 (%token ID_COLON): New token.
1063 (rules): Use it.
1064 (declarations, rules): Remove trailing semicolon.
1065 (declaration, rules_or_grammar_declaration):
1066 Allow empty (";") declaration.
1067 (symbol_def): Remove empty actions; no longer needed.
1068 (rules_or_grammar_declaration): Remove trailing semicolon.
1069 (semi_colon.opt): Remove.
1070 * src/reader.h: Include location.h.
1071 (scanner_cursor): New decl.
1072 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1073 rolling our own.
1074 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1075 of *loc.
1076 (STEP): Remove. No longer needed, now that adjust_location does
1077 the work. All uses removed.
1078 (scanner_cursor): New var.
1079 (adjust_location): Renamed from extend_location. It now sets
1080 *loc and adjusts the scanner cursor. All uses changed.
1081 Don't bother testing for CR.
1082 (handle_syncline): Remove location arg; now updates scanner cursor.
1083 All callers changed.
1084 (unexpected_end_of_file): Now accepts start boundary of token or
1085 comment, not location. All callers changed. Update scanner cursor,
1086 not the location.
1087 (SC_AFTER_IDENTIFIER): New state.
1088 (context_state): Renamed from c_context. All uses changed.
1089 (id_loc, code_start, token_start): New local vars.
1090 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1091 processing of Yacc white space and equivalents here.
1092 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1093 instead of returning ID immediately, since we need to search for
1094 a subsequent colon.
1095 (<INITIAL>"'", "\""): Save token_start.
1096 (<INITIAL>"%{", "{", "%%"): Save code_start.
1097 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1098 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1099 BEGIN context_state at end, not INITIAL.
1100 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1101 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1102 Return correct token start.
1103 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1104 the start of a character, string or multiline comment is found.
1105 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1106 Reduction): Adjust reported locations to match the more-precise
1107 results now expected.
1108 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1109 * tests/reduce.at (Useless Rules, Reduced Automaton,
1110 Underivable Rules): Likewise.
1111 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1112 or "|"' now that so many other tokens are allowed by the new grammar.
1113
1114 * src/complain.h (current_file): Remove duplicate decl;
1115 current_file is now owned by files.h.
1116 * src/complain.c, src/scan-gram.l: Include files.h.
1117
11182002-12-06 Paul Eggert <eggert@twinsun.com>
1119
1120 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1121 promotes to int; it might be unsigned int.
1122 * data/yacc.c (yy_reduce_print): Likewise.
1123
1124 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1125 be #defined in the prologue, not in the Bison declarations.
1126 This fixes Debian Bug 102878, reported by Shaul Karl.
1127
11282002-12-02 Paul Eggert <eggert@twinsun.com>
1129
1130 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1131 * lib/strtoul.c: New file, from gnulib.
1132 This fixes a porting bug reported by Peter Klein in
1133 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1134
11352002-11-30 Paul Eggert <eggert@twinsun.com>
1136
1137 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1138 and put only a forward declaration in the prologue. This is for
1139 consistency with the other scanner helper functions.
1140
1141 Type clashes now generate warnings, not errors, since it
1142 appears that POSIX may allow some grammars with type clashes.
1143 * src/reader.c (grammar_current_rule_check): Warn about
1144 type clashes instead of complaining.
1145 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1146
1147 Add Yacc library, since POSIX requires it.
1148 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1149 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1150 * lib/main.c, lib/yyerror.c: New files.
1151
1152 gram_error can be static; it need not be extern.
1153 * src/reader.h (gram_error): Remove decl.
1154 * src/parse-gram.y (gram_error): Now static. Add static decl.
1155 (print_token_value): Omit parameter names from forward decl,
1156 for consistency.
1157
11582002-11-29 Paul Eggert <eggert@twinsun.com>
1159
1160 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1161 be declared before being used. E.g., one should typically
1162 declare them in the prologue. Use GNU coding style in examples.
1163 Put "const" consistently after the type it modifies. Mention
1164 that C99 supports "inline". Mention that yyerror traditionally
1165 returns "int".
1166
1167 %parse-param and %lex-param now take just one argument, the
1168 declaration; the argument name is deduced from the declaration.
1169
1170 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1171 Reporting, Table of Symbols): Document this.
1172 * src/parse-gram.y (add_param): New function.
1173 (COMMA): Remove.
1174 (declaration): Implement new rule for %parse-param and %lex-param.
1175 * src/scan-gram.l: "," now elicits a warning, rather than being
1176 a token; this is more compatible with byacc.
1177 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1178
11792002-11-27 Paul Eggert <eggert@twinsun.com>
1180
1181 Rename identifiers to avoid real and potential collisions.
1182
1183 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1184 to avoid collision with lex macro described by Bruce Lilly in
1185 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1186 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1187 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1188 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1189 All uses changed.
1190 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1191 The name "yycontrol" violates the name space rules, and this stuff
1192 wasn't being used anyway.
1193 (input): Remove action; this stuff wasn't being used.
1194 (gram_error): Rename local variable yylloc -> loc.
1195 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1196 (YY_DECL): Don't use "yy" at start of local variables.
1197 All uses changed, e.g., yylloc -> loc.
1198 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1199 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1200 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1201 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1202
1203 * src/parse-gram.y (gram_error): loc is now const *.
1204 * src/reader.h (gram_error): Likewise.
1205
12062002-11-24 Paul Eggert <eggert@twinsun.com>
1207
1208 Version 1.75c.
1209
1210 * tests/actions.at (Actions after errors): Use an output format
1211 more similar to that of the Printers and Destructors test.
1212 Test the position of the ';' token too.
1213 (Printers and Destructors): Likewise.
1214 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1215 unnecessarily alarming people when the test fails.
1216
1217 * data/yacc.c (yyerrlab1): Move this label down, so that the
1218 parser does not discard the lookahead token if the user code
1219 invokes YYERROR. This change is required for POSIX conformance.
1220
1221 * lib/error.c: Sync with gnulib.
1222
12232002-11-22 Paul Eggert <eggert@twinsun.com>
1224
1225 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1226 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1227 * lib/xmalloc.c: Likewise.
1228
12292002-11-20 Paul Eggert <eggert@twinsun.com>
1230
1231 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1232
12332002-11-20 Paul Eggert <eggert@twinsun.com>
1234
1235 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1236 should use `if (! x) abort ();' rather than `assert (x);', and
1237 anyway it's one less thing to worry about configuring.
1238
1239 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1240 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1241 and replace all instances of assert with abort.
1242 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1243 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1244
1245 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1246 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1247 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1248 hash_find_entry, hash_rehash, hash_insert): Likewise.
1249 * src/conflicts.c (resolve_sr_conflict): Likewise.
1250 * src/lalr.c (set_goto_map, map_goto): Likewise.
1251 * src/nullable.c (nullable_compute): Likewise.
1252 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1253 * src/reader.c (packgram, reader): Likewise.
1254 * src/state.c (state_new, state_free, state_transitions_set,
1255 state_reduction_find): Likewise.
1256 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1257 symbol_pack): Likewise.
1258 * src/tables.c (conflict_row, pack_vector): Likewise.
1259 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1260 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1261 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1262 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1263
1264 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1265 (ARGMATCH_CONSTRAINT): New macro.
1266 (ARGMATCH_ASSERT): Use it.
1267
1268 * src/system.h (verify): New macro.
1269 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1270 rather than assert.
1271 * src/tables.c (tables_generate): Likewise.
1272
1273 * src/struniq.c (struniq_assert): Now returns void, and aborts
1274 if the assertion is false.
1275 (struniq_assert_p): Remove.
1276 * src/struniq.h: Likewise.
1277
12782002-11-18 Paul Eggert <eggert@twinsun.com>
1279
1280 * data/glr.c (yygetLRActions): Replace `yyindex' with
1281 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1282 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1283 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1284
12852002-11-18 Akim Demaille <akim@epita.fr>
1286
1287 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1288 space.
1289 From Tim Van Holder.
1290
12912002-11-17 Paul Eggert <eggert@twinsun.com>
1292
1293 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1294 to "SyntaxError" for consistency with my 2002-11-15 change.
1295
1296 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1297 not define to {}, since this breaks the common use of `YYDPRINTF
1298 ((...));' if a single statement is desired (e.g. before `else').
1299 Work around GCC warnings by surrounding corresponding calls with
1300 {} if needed.
1301 (yyhasResolvedValue): Remove unused function.
1302 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1303 loop body.
1304 (yyreportSyntaxError): Renamed from yyreportParseError.
1305 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1306 All uses changed.
1307 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1308 extern when possible. Remove unused initializations.
1309
13102002-11-16 Akim Demaille <akim@epita.fr>
1311
1312 Augment the similarity between GLR and LALR traces.
1313
1314 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1315 (YY_REDUCE_PRINT): New.
1316 (yyparse): Use them.
1317 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1318 YYDPRINT here.
1319 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1320 state reached after the reduction/recovery, since...
1321 (yyparse, yyprocessOneStack): Report the state we are entering in.
1322
13232002-11-16 Akim Demaille <akim@epita.fr>
1324
1325 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1326 Add support for --trace=skeleton.
1327 * src/scan-skel.l: %option debug.
1328 Scan strings of non-@ or \n instead of character by character.
1329 (scan_skel): Handle trace_skeleton.
1330 (QPUTS): New.
1331 (@output_parser_name@, @output_header_name@): ``Restore'' their
1332 support (used to be M4 macros).
1333 * data/yacc.c: Quote larger chunks, a la glr.c.
1334 * data/lalr1.cc: Likewise.
1335 The header guards are no longer available, so use some other
1336 string than `YYLSP_NEEDED'.
1337
13382002-11-16 Akim Demaille <akim@epita.fr>
1339
1340 Make the ``Printers and Destructors'' test more verbose, taking
1341 `yacc.c''s behavior as (possibly wrong) reference.
1342
1343 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1344 instead of fprint on stdout.
1345 Set and report the last_line of the symbols.
1346 Consistently display values and locations.
1347
13482002-11-16 Paul Eggert <eggert@twinsun.com>
1349
1350 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1351
13522002-11-15 Paul Eggert <eggert@twinsun.com>
1353
1354 * tests/actions.at (Actions after errors): New test case.
1355
1356 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1357 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1358 tests/action.at, tests/calc.at, tests/conflicts.at,
1359 tests/cxx-type.at, tests/regression.at:
1360 "parse error" -> "syntax error" for POSIX compatibility.
1361 "parsing stack overflow..." -> "parser stack overflow" so
1362 that code matches Bison documentation.
1363
13642002-11-15 Akim Demaille <akim@epita.fr>
1365
1366 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1367 take two BRACED_CODE, not two string_content.
1368 Free the scanner's obstack when we are done.
1369 (code_content): New.
1370 * tests/calc.at: Adjust.
1371 * doc/bison.texinfo: Adjust.
1372 Also, make sure to include the `,' for these declarations.
1373
13742002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1375
1376 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1377 definition; avoids potential autoreconf problems.
1378
13792002-11-15 Akim Demaille <akim@epita.fr>
1380
1381 Always check the value returned by yyparse.
1382
1383 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1384 returned by yyparse.
1385 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1386 Adjust calls.
1387 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1388 returned by yyparse.
1389
13902002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1391
1392 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1393 on input.at test.
1394
13952002-11-14 Paul Eggert <eggert@twinsun.com>
1396
1397 * src/output.c (output_skeleton): Call xfopen instead of
1398 duplicating xfopen's body.
1399
1400 Fix bugs reported by Nelson H. F. Beebe in
1401 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1402
1403 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1404 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1405 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1406 file twice in the grammar, as an extra check.
1407
1408 * tests/input.at (Torturing the Scanner): Surround the
1409 backslash-newline tests with "#if 0", to make it less likely that
1410 we'll run into compiler bugs. Bring back solitary \ inside
1411 comment, but add a closing comment to work around HP C bug. Don't
1412 test backslash-newline in C character constant.
1413
14142002-11-14 Akim Demaille <akim@epita.fr>
1415
1416 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1417 status of the compiler.
1418 Calling `exit 1' is no longer needed.
1419 Reported by Nelson H. F. Beebe.
1420
14212002-11-14 Akim Demaille <akim@epita.fr>
1422
1423 * tests/atlocal.in (CPPFLAGS): We have config.h.
1424 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1425 New.
1426 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1427 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1428 * tests/regression.at, tests/torture.at: Use them for all the
1429 grammars that are to be compiled.
1430 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1431 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1432 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1433
14342002-11-14 Akim Demaille <akim@epita.fr>
1435
1436 * doc/bison.texinfo: Various formatting changes (alignments in
1437 samples, additional @group/@end group, GCS in samples.
1438 Use @deffn instead of simple @table to define the directives,
1439 macros, variables etc.
1440
14412002-11-13 Paul Eggert <eggert@twinsun.com>
1442
1443 Fix some bugs reported by Albert Chin-A-Young in
1444 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1445
1446 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1447 -o c"; the HP C compiler chatters during compilation.
1448 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1449 * tests/headers.at (export YYLTYPE): Likewise.
1450
1451 * tests/input.at (Torturing the Scanner): Remove lines containing
1452 solitary backslashes, as they tickle a bug in the HP C compiler.
1453
1454 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1455 comments, since they're not portable. Use GNU coding style.
1456
14572002-11-13 Akim Demaille <akim@epita.fr>
1458
1459 * data/yacc.c: Leave bigger chunks of quoted text.
1460 (YYDSYMPRINTF): New.
1461 Use it to report symbol activities.
1462 * data/glr.c (YYDSYMPRINTF): New.
1463 Use it.
1464
14652002-11-12 Paul Eggert <eggert@twinsun.com>
1466
1467 Version 1.75b.
1468
1469 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1470 (yyglrReduce): Return yyok, not 0.
1471 This should avoid the enumerated-type warnings reported
1472 by Nelson H. F. Beebe in
1473 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1474
1475 * lib/bbitset.h (BITSET_INLINE): Remove.
1476 * lib/bitset.h [! BITSET_INLINE]: Remove.
1477 (bitset_set, bitset_reset, bitset_test): Rename local vars
1478 to avoid shadowing warnings by GCC.
1479
1480 * data/glr.c (inline): Remove #define. It's the user's
1481 responsibility to #define it away, just like 'const'.
1482 This fixes one of the bugs reported by Nelson H. F. Beebe in
1483 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1484
1485 * Makefile.maint (po-check): Scan .l and .y files instead of the
1486 .c and the .h files that they generate. This fixes the bug
1487 reported by Tim Van Holder in:
1488 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1489 Look for N_ as well as for _. Try to avoid matching #define for
1490 N_ and _.
1491 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1492 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1493 * src/scan-gram.l: Revamp regular expressions so that " and '
1494 do not confuse xgettext.
1495
1496 * src/struniq.h (struniq_new): Do not declare the return type
1497 to be 'const'; this violates the C standard.
1498 * src/struniq.c (struniq_new): Likewise.
1499
15002002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1501
1502 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1503 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1504 linker.
1505
15062002-11-12 Akim Demaille <akim@epita.fr>
1507
1508 * Makefile.maint: Sync with Autoconf:
1509 (local_updates): New.
1510
15112002-11-12 Akim Demaille <akim@epita.fr>
1512
1513 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1514
15152002-11-12 Akim Demaille <akim@epita.fr>
1516
1517 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1518 locations.
1519
15202002-11-12 Akim Demaille <akim@epita.fr>
1521
1522 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1523 not yyvalue.
1524
15252002-11-12 Akim Demaille <akim@epita.fr>
1526
1527 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1528 Use it to test the GLR parser.
1529
15302002-11-12 Akim Demaille <akim@epita.fr>
1531
1532 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1533 defines it.
1534 * data/glr.c (yystos): New.
1535 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1536 (YYDSYMPRINT): New.
1537 (yyval): Don't define it, it is handled via M4.
1538 (yyrecoverParseError): Free verbosely the discarded symbols.
1539 * data/yacc.c (yysymprint): Remove, rather...
1540 (b4_yysymprint_generate): invoke.
1541 * data/c.m4 (b4_yysymprint_generate): New.
1542 Accept pointers as arguments, as opposed to the version from
1543 yacc.c.
1544 (b4_yydestruct_generate): Likewise.
1545 * tests/cations.at (Printers and Destructors): Use Bison directives
1546 instead of CPP macros.
1547 Don't rely on internal details.
1548
15492002-11-12 Akim Demaille <akim@epita.fr>
1550
1551 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1552 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1553 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1554 it against YYEMPTY and so forth), work on yytoken (i.e., set
1555 it to YYEMPTY etc.).
1556 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1557 (b4_symbol_actions): Remove.
1558 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1559 for 0, end-of-input.
1560
15612002-11-12 Akim Demaille <akim@epita.fr>
1562
1563 * doc/bison.texinfo (Destructor Decl): New.
1564
15652002-11-12 Akim Demaille <akim@epita.fr>
1566
1567 * src/tables.c (tables_generate): Use free for pointers that
1568 cannot be NULL, not XFREE.
1569 (pack_vector): Use assert, not fatal, for bound violations.
1570 * src/state.c (state_new): Likewise.
1571 * src/reader.c (reader): Likewise.
1572 * src/lalr.c (set_goto_map): Likewise.
1573 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1574 the file name.
1575
15762002-11-12 Akim Demaille <akim@epita.fr>
1577
1578 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1579 Restore.
1580 * src/scan-gram.l (last_string): Is global to the file, not to
1581 yylex.
1582 * src/parse-gram.y (input): Don't append the epilogue here,
1583 (epilogue.opt): do it here, and free the scanner's obstack.
1584 * src/reader.c (epilogue_set): Rename as...
1585 (epilogue_augment): this.
1586 * data/c.m4 (b4_epilogue): Defaults to empty.
1587
15882002-11-12 Akim Demaille <akim@epita.fr>
1589
1590 * src/getargs.c (long_options): Remove duplicates.
1591 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1592 Remove.
1593 * doc/bison.rnh: Remove.
1594 * doc/bison.texinfo (VMS Invocation): Remove.
1595
15962002-11-12 Akim Demaille <akim@epita.fr>
1597
1598 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1599 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1600
1601 Use struniq for symbols.
1602
1603 * src/symtab.h (symbol_t): The tag member is a struniq.
1604 (symbol_type_set): Adjust.
1605 * src/symtab.c (symbol_new): Takes a struniq.
1606 (symbol_free): Don't free the tag member.
1607 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1608 (hash_compare_symbol, hash_symbol): these.
1609 Use the fact that tags as struniqs.
1610 (symbol_get): Use struniq_new.
1611 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1612 Returns a strniq.
1613 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1614 and type members are struniqs.
1615 * src/reader.c (get_merge_function)
1616 (grammar_current_rule_merge_set): Adjust.
1617 (TYPE, current_type): Are struniq.
1618
1619 Use struniq for file names.
1620
1621 * src/files.h, src/files.c (infile): Split into...
1622 (grammar_file, current_file): these.
1623 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1624 * src/reduce.c (reduce_print): Likewise.
1625 * src/getargs.c (getargs): Likewise.
1626 * src/complain.h, src/complain.c: Likewise.
1627 * src/main.c (main): Call struniqs_new early enough to use it for
1628 file names.
1629 Don't free the input file name.
1630
16312002-11-12 Akim Demaille <akim@epita.fr>
1632
1633 * src/symtab.c (symbol_free): Remove dead deactivated code:
1634 type_name are properly removed.
1635 Don't use XFREE to free items that cannot be NULL.
1636 * src/struniq.h, src/struniq.c: New.
1637 * src/main.c (main): Initialize/free struniqs.
1638 * src/parse-gram.y (%union): Add astruniq member.
1639 (yyprint): Adjust.
1640 * src/scan-gram.l (<{tag}>): Return a struniq.
1641 Free the obstack bit that used to store it.
1642 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1643
16442002-11-11 Paul Eggert <eggert@twinsun.com>
1645
1646 Revamp to fix many (but not all) of the C- and M4-related quoting
1647 problems. Among other things, this fixes the Bison bug reported
1648 by Jan Hubicka when processing the Bash grammar; see:
1649 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1650
1651 Use new @ escapes consistently. Represent brackets with @{ and @}
1652 rather than @<:@ and @:>@, since this works a bit better with dumb
1653 editors like vi. Represent @ with @@, since @ is now consistently
1654 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1655 __ofile__, to avoid unexpected expansions. Similarly, use @output
1656 rather than #output.
1657
1658 * data/c.m4 (b4_copyright): Omit file name from comment, since
1659 the file name could contain "*/".
1660 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1661 be quoted. All uses changed.
1662
1663 * data/glr.c: Use new @ escapes consistently.
1664 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1665 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1666 Remove, since they couldn't handle arbitrary characters in file
1667 names.
1668 * data/lalr1.cc: Likewise.
1669 * data/yacc.c: Likewise.
1670
1671 * src/files.c (output_infix): Remove; all uses removed.
1672 * src/files.h: Likewise.
1673
1674 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1675 mishandled funny characters in file names, and anyway it isn't
1676 needed any more.
1677 * data/yacc.c: Likewise.
1678 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1679
1680 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1681 * data/yacc.c: Likewise.
1682
1683 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1684 strings now.
1685 (muscle_init): Quote filename as a C string.
1686 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1687 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1688 * src/output.c (escaped_file_name_output): New function.
1689 (prepare_symbols): Quote tokens for M4.
1690 (prepare): Don't insert output_infix, output_prefix,
1691 output_parser_name, output_header_name; this is now down by scan-skel.
1692 Insert skeleton as a C string.
1693
1694 * src/output.c (user_actions_output, symbol_destructors_output,
1695 symbol_printers_output): Quote filenames for C and M4.
1696 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1697
1698 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1699 escapes other than \\ and \'; this simplifies the code.
1700 (<SC_STRING>): Likewise, for \\ and \".
1701 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1702 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1703 Use new escapes @{ and @} for [ and ].
1704
1705 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1706 them with auto vars.
1707 Switch to new escape scheme, where @ is the escape character uniformly.
1708 Abort if a stray escape character is found. Avoid unbounded input
1709 buffer when parsing non-escaped text.
1710
1711 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1712 __oline__, #output, $@, and @{ do not have unintended meanings.
1713
17142002-11-09 Paul Eggert <eggert@twinsun.com>
1715
1716 Fix the test failure due to GCC warnings described in
1717 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1718 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1719 evaluate to 0 if it's impossible for NINF to be in the respective
1720 table.
1721 (yygetLRActions, yyrecoverParseError): Use them.
1722
1723 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1724 counted in the token inserted at end of file. Now takes
1725 location_t *, not location_t, so that the location can be
1726 adjusted. All uses changed.
1727
1728 * tests/regression.at (Invalid inputs): Adjust wording in
1729 diagnostic to match the new behavior.
1730
1731 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1732 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1733 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1734 abort ();'. This reduces the runtime of the "Many lookaheads"
1735 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1736 GCC 3.2.
1737
17382002-11-07 Paul Eggert <eggert@twinsun.com>
1739
1740 * src/parse-gram.y (CHARACTER): Remove unused token.
1741 All uses removed.
1742
1743 * src/scan-gram.l: Remove stack option. We no longer use the
1744 stack, since the stack was never deeper than 1; instead, use the
1745 new auto var c_context to record the stacked value.
1746
1747 Remove nounput option. At an unexpected end of file, we now unput
1748 the minimal input necessary to end cleanly; this simplifies the
1749 code.
1750
1751 Avoid unbounded token sizes where this is easy.
1752
1753 (unexpected_end_of_file): New function.
1754 Use it to systematize the error message on unexpected EOF.
1755 (last-string): Now auto, not static.
1756 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1757 (scanner_last_string_free): Remove; not used.
1758 (percent_percent_count): Move decl to just before use.
1759 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1760 not the (never otherwised-used) CHARACTER.
1761
17622002-11-07 Akim Demaille <akim@epita.fr>
1763
1764 Let yyerror always receive the msg as last argument, so that
1765 yyerror can be variadic.
1766
1767 * data/yacc.c (b4_yyerror_args): New.
1768 Use it when calling yyerror.
1769 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1770 Use it when calling yyerror.
1771 * doc/bison.texinfo (Error Reporting): Adjust.
1772 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1773 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1774
17752002-11-06 Akim Demaille <akim@epita.fr>
1776
1777 #line should have quoted strings.
1778 Ideally, this should be done by m4_quotearg.
1779
1780 * src/scan-skel.l: Include quotearg.h.
1781 Quote __ofile__.
1782 * src/output.c (symbol_printers_output)
1783 (symbol_destructors_output): Quote the file name.
1784
17852002-11-06 Akim Demaille <akim@epita.fr>
1786
1787 * tests/regression.at (Invalid inputs): Adjust to the recent
1788 messages.
1789
17902002-11-06 Akim Demaille <akim@epita.fr>
1791
1792 Restore --no-lines.
1793 Reported by Jim Kent.
1794
1795 * data/c.m4 (b4_syncline): New.
1796 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1797 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1798 * src/output.c (user_actions_output): Likewise.
1799 (prepare): Define 'b4_synclines_flag'.
1800 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1801
18022002-11-06 Akim Demaille <akim@epita.fr>
1803
1804 * src/main.c (main): Free `infile'.
1805 * src/scan-gram.l (handle_syncline): New.
1806 Recognize `#line'.
1807 * src/output.c (user_actions_output, symbol_destructors_output)
1808 (symbol_printers_output): Use the location's file name, not
1809 infile.
1810 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1811
18122002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1813
1814 * src/tables.c (matching_state): Don't allow states to match if
1815 either has GLR conflict entries.
1816
18172002-11-05 Paul Eggert <eggert@twinsun.com>
1818
1819 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1820 "integer out of range" rather than "invalid value".
1821 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1822 accordingly.
1823
1824 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1825 Also, remove one static variable in the scanner.
1826
1827 * src/scan-gram.l (braces_level): Now auto, not static.
1828 Initialize to zero if the compiler is being picky.
1829 (INITIAL): Clear braces_level instead of incrementing it.
1830 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1831 as POSIX 1003.1-2001 requires.
1832 * src/system.h (IF_LINT): New macro, taken from coreutils.
1833 * configure.ac: Define "lint" if --enable-gcc-warnings.
1834
18352002-11-05 Akim Demaille <akim@epita.fr>
1836
1837 * src/scan-gram.l: When it starts with `%', complain about the
1838 whole directive, not just that `invalid character: %'.
1839
18402002-11-04 Akim Demaille <akim@epita.fr>
1841
1842 * Makefile.maint: Update from Autoconf.
1843 (update, cvs-update, po-update, do-po-update): New.
1844
18452002-11-04 Akim Demaille <akim@epita.fr>
1846
1847 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1848 and yyerror.
1849 Have yyerror `use' its arguments.
1850 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1851 returns true when location & yacc & pure & parse-param.
1852 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1853
18542002-11-04 Akim Demaille <akim@epita.fr>
1855
1856 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1857 clashes.
1858 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1859 font-lock-mode.
1860 Use complain_at.
1861 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1862 slot 0.
1863
18642002-11-03 Paul Eggert <eggert@twinsun.com>
1865
1866 * src/reader.c (get_merge_function, grammar_current_rule_check):
1867 Use consistent diagnostics for reporting type name clashes.
1868 Quote the types with <>, for consistency with Yacc.
1869 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1870
18712002-11-03 Akim Demaille <akim@epita.fr>
1872
1873 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1874 New.
1875 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1876 (b4_parse_param): Remove.
1877 Use b4_identification.
1878 Propagate b4_pure_args where needed to pass them to yyerror.
1879 * data/glr.m4 (b4_parse_param): Remove.
1880 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1881 (b4_lpure_formals): New.
1882 Use b4_identification.
1883 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1884 b4_user_formals and b4_user_args.
1885 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1886 (yyreportAmbiguity): When using a pure parser, also need
1887 the location, and the parse-params.
1888 Adjust callers.
1889 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1890 When using a pure parser, also need the parse-params.
1891 Adjust callers.
1892 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1893 (%pure-parser + %parse-param) LALR and GLR parsers.
1894 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1895 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1896 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1897 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1898 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1899 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1900 * doc/bison.texinfo: Untabify the whole file.
1901 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1902 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1903 (Error Reporting): Adjust to these new directives.
1904 Document %error-verbose, deprecate YYERROR_VERBOSE.
1905
19062002-11-03 Akim Demaille <akim@epita.fr>
1907
1908 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1909 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1910 command line options.
1911 * tests/cxx-type.at: Formatting changes.
1912
19132002-11-03 Paul Eggert <eggert@twinsun.com>
1914
1915 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1916 to count columns correctly, and to check for invalid inputs.
1917
1918 Use mbsnwidth to count columns correctly. Account for tabs, too.
1919 Include mbswidth.h.
1920 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1921 (extend_location): New function.
1922 (YY_LINES): Remove.
1923
1924 Handle CRLF in C code rather than in Lex code.
1925 (YY_INPUT): New macro.
1926 (no_cr_read): New function.
1927
1928 Scan UCNs, even though we don't fully handle them yet.
1929 (convert_ucn_to_byte): New function.
1930
1931 Handle backslash-newline correctly in C code.
1932 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1933 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1934 all uses changed.
1935 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1936 Use {splice} wherever C allows backslash-newline.
1937 YY_STEP after space, newline, vertical-tab.
1938 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1939
1940 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1941
1942 ({int}, handle_action_dollar, handle_action_at): Check for integer
1943 overflow.
1944
1945 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1946
1947 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1948 as well as \000. Check for UCHAR_MAX, not 255.
1949 Allow \x with an arbitrary positive number of digits, as in C.
1950 Check for overflow here.
1951 Allow \? and UCNs, for compatibility with C.
1952
1953 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1954 with quote slot used by complain_at.
1955
1956 * tests/input.at: Add tests for backslash-newline, m4 quotes
1957 in symbols, long literals, and funny escapes in strings.
1958
1959 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1960 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1961 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1962 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1963 * m4/mbswidth.m4: New file, from GNU coreutils.
1964
1965 * doc/bison.texinfo (Grammar Outline): Document // comments.
1966 (Symbols): Document that trigraphs have no special meaning in Bison,
1967 nor is backslash-newline allowed.
1968 (Actions): Document that trigraphs have no special meaning.
1969
1970 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1971 no longer used.
1972
19732002-11-02 Paul Eggert <eggert@twinsun.com>
1974
1975 * src/reader.c: Don't include quote.h; not needed.
1976 (get_merge_function): Reword warning to be consistent with
1977 type clash diagnostic in grammar_current_rule_check.
1978
1979 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1980 bug in trigraph handling.
1981
1982 * src/output.c (prepare_symbols): When printing token names,
1983 escape "[" as "@<:@" and likewise for "]".
1984
1985 * src/system.h (errno): Remove declaration, as we are now
1986 assuming C89 or better, and C89 guarantees errno.
1987
19882002-10-30 Paul Eggert <eggert@twinsun.com>
1989
1990 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1991 Check for close failures.
1992 * src/files.h (xfclose): Return void, not int, since it always
1993 returned zero.
1994 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1995 indicates one.
1996 * src/output.c (output_skeleton): Use xfclose rather than fclose
1997 and ferror. xfclose now checks ferror.
1998
1999 * data/glr.c (YYLEFTMOST_STATE): Remove.
2000 (yyreportTree): Use a stack-based leftmost state. This avoids
2001 our continuing battles with bogus warnings about initializers.
2002
20032002-10-30 Akim Demaille <akim@epita.fr>
2004
2005 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2006 #if.
2007
20082002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2009
2010 * tests/glr-regr1.at: New test for reported regressions.
2011 * tests/testsuite.at: Add glr-regr1.at test.
2012 * tests/Makefile.am: Add glr-regr1.at test.
2013
20142002-10-24 Paul Eggert <eggert@twinsun.com>
2015
2016 Version 1.75a.
2017
2018 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2019 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2020 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2021 Don't assume strdup exists; POSIX says its an XSI extension.
2022 Check for buffer overflow on input.
2023
20242002-10-24 Akim Demaille <akim@epita.fr>
2025
2026 * src/output.c (output_skeleton): Don't disable M4sugar comments
2027 too soon: it results in comments being expanded.
2028 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2029 first output.
2030
20312002-10-24 Akim Demaille <akim@epita.fr>
2032
2033 * data/yacc.c (m4_int_type): New.
2034 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2035 char' as only yacc.c wants K&R portability.
2036 * data/glr.c (yysigned_char): Remove.
2037 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2038 Reported by Quoc Peyrot.
2039
20402002-10-23 Paul Eggert <eggert@twinsun.com>
2041
2042 * src/main.c (main): With --trace=time, report times even if a
2043 non-fatal error occurs. Formerly, the times were reported in some
2044 such cases but not in others.
2045 * src/reader.c (reader): Just return if a complaint has been issued,
2046 instead of exiting, so that 'main' can report times.
2047
20482002-10-22 Akim Demaille <akim@epita.fr>
2049
2050 * src/system.h: Include sys/types.
2051 Reported by Bert Deknuydt.
2052
20532002-10-23 Paul Eggert <eggert@twinsun.com>
2054
2055 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2056 Suggested by Art Haas.
2057
20582002-10-22 Paul Eggert <eggert@twinsun.com>
2059
2060 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2061 decl; not needed any more.
2062 * src/main.c (main): Use return to exit, undoing yesterday's change.
2063 The last OS that we could find where this wouldn't work is
2064 SunOS 3.5, and that's too old to worry about now.
2065
2066 * data/glr.c (struct yyltype): Define members even when not
2067 doing locations. This is more consistent with yacc.c, and it
2068 works around the following bug reports:
2069 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2070 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
2071
2072 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2073 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2074 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2075
20762002-10-22 Akim Demaille <akim@epita.fr>
2077
2078 * data/README: New.
2079
20802002-10-21 Paul Eggert <eggert@twinsun.com>
2081
2082 Be consistent about 'bool'; the old code used an enum in one
2083 module and an int in another, and this violates the C standard.
2084 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2085 * configure.ac (AC_HEADER_STDBOOL): Add.
2086 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2087 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2088 * src/symtab.c (hash_compare_symbol_t): Likewise.
2089 * src/system.h (bool, false, true): Use a definition consistent
2090 with ../lib/hash.c. All uses changed.
2091
2092 * src/complain.c (warning_issued): Renamed from warn_message_count,
2093 so that we needn't worry about integer overflow (!).
2094 Now of type bool. All uses changed.
2095 (complaint_issued): Renamed from complain_message_count; likewise.
2096
2097 * src/main.c (main): Use exit to exit with failure.
2098
2099 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2100 rather than 1 and 0.
2101 * src/main.c (main): Likewise.
2102 * src/getargs.c (getargs): Likewise.
2103 * src/reader.c (reader): Likewise.
2104
2105 * src/getarg.c (getargs): Remove duplicate code for
2106 "Try `bison --help'".
2107
2108 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2109 What was that "2" for?
2110
2111 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2112 * src/getargs.c (usage): Likewise.
2113
2114 * src/getargs.c (getargs): When there are too few operands, report
2115 the last one. When there are too many, report the first extra
2116 one. This is how diffutils does it.
2117
21182002-10-20 Paul Eggert <eggert@twinsun.com>
2119
2120 Remove K&R vestiges.
2121 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2122 * src/complain.c (VA_START): Remove. Assume prototypes.
2123 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2124 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2125 fatal): Assume prototypes.
2126 * src/complain.h: Assume prototypes.
2127 * src/system.h (PARAMS): Remove.
2128 Include <limits.h> unconditionally, since it's guaranteeed even
2129 for a freestanding C89 compiler.
2130 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2131 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2132
21332002-10-20 Akim Demaille <akim@epita.fr>
2134
2135 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2136 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2137 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2138 (yyresolveStates, yyresolveAction, yyresolveStack)
2139 (yyprocessOneStack): Use them.
2140 (yy_reduce_print): New.
2141 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2142
21432002-10-20 Akim Demaille <akim@epita.fr>
2144
2145 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2146 arguments and output `void'.
2147 (b4_c_function): Rename as...
2148 (b4_c_function_def): this.
2149 (b4_c_function_decl, b4_c_ansi_function_def)
2150 (b4_c_ansi_function_decl): New.
2151 Change the interpretation of the arguments: before `int, foo', now
2152 `int foo, foo'.
2153 * data/yacc.c (yyparse): Prototype and define thanks to these.
2154 Adjust b4_c_function_def uses.
2155 * data/glr.c (yyparse): Likewise, but ANSI only.
2156
21572002-10-20 Akim Demaille <akim@epita.fr>
2158
2159 * src/output.c (prepare): Move the definition of `tokens_number',
2160 `nterms_number', `undef_token_number', `user_token_number_max'
2161 to...
2162 (prepare_tokens): Here.
2163 (prepare_tokens): Rename as...
2164 (prepare_symbols): this.
2165 (prepare): Move the definition of `rules_number' to...
2166 (prepare_rules): here.
2167 (prepare): Move the definition of `last', `final_state_number',
2168 `states_number' to...
2169 (prepare_states): here.
2170 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2171
21722002-10-20 Akim Demaille <akim@epita.fr>
2173
2174 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2175
21762002-10-20 Akim Demaille <akim@epita.fr>
2177
2178 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2179 * data/c.m4: here.
2180
21812002-10-20 Akim Demaille <akim@epita.fr>
2182
2183 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2184 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2185 `pair'.
2186 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2187 `name' to...
2188 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2189 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2190 These.
2191
21922002-10-19 Paul Eggert <eggert@twinsun.com>
2193
2194 Do not create a temporary file, as that involves security and
2195 cleanup headaches. Instead, use a pair of pipes.
2196 Derived from a suggestion by Florian Krohm.
2197 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2198 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2199 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2200 (BISON_PREREQ_SUBPIPE): Add.
2201 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2202 Add subpipe.h, subpipe.c.
2203 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2204 * po/POTFILES.in: Add lib/subpipe.c.
2205 * src/output.c: Include "subpipe.h".
2206 (m4_invoke): Remove decl.
2207 (scan_skel): New decl.
2208 (output_skeleton): Use pipe rather than temporary file for m4 input.
2209 Check that m4sugar.m4 is readable, to avoid deadlock.
2210 Check for pipe I/O error.
2211 * src/scan-skel.l (readpipe): Remove decl.
2212 (scan_skel): New function, to be used in place of m4_invoke.
2213 Read from stream rather than file.
2214
2215 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2216 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2217 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2218 this generates a more-accurate value anyway.
2219
2220 * lib/timevar.c (timervar_accumulate): Rename locals to
2221 avoid confusion with similarly-named more-global.
2222 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2223
2224 * src/output.c (prepare): Use xstrdup to convert char const *
2225 to char *, to avoid GCC warning.
2226
22272002-10-19 Akim Demaille <akim@epita.fr>
2228
2229 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2230 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2231 Use them to have `calc.y' ready for %pure-parser.
2232 * data/yacc.c (YYLEX): Pass a yylex return type to
2233 b4_c_function_call.
2234
22352002-10-19 Akim Demaille <akim@epita.fr>
2236
2237 Prototype support of %lex-param and %parse-param.
2238
2239 * src/parse-gram.y: Add the definition of the %lex-param and
2240 %parse-param tokens, plus their rules.
2241 Drop the `_' version of %glr-parser.
2242 Add the "," token.
2243 * src/scan-gram.l (INITIAL): Scan them.
2244 * src/muscle_tab.c: Comment changes.
2245 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2246 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2247 (muscle_entry_s): The `value' member is no longer const.
2248 Adjust all dependencies.
2249 * src/muscle_tab.c (muscle_init): Adjust: use
2250 MUSCLE_INSERT_STRING.
2251 Initialize the obstack earlier.
2252 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2253 (muscle_pair_list_grow): New.
2254 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2255 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2256 * tests/calc.at: Use %locations, not --locations.
2257 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2258
22592002-10-19 Akim Demaille <akim@epita.fr>
2260
2261 * src/getargs.c (usage): Take status as argument and exit
2262 accordingly.
2263 Report the traditional `Try ... --help' message when status != 0.
2264 (usage, version): Don't take a FILE * as arg, it is pointless.
2265 (getargs): When there is an incorrect number of arguments, make it
2266 an error, and report it GNUlically thanks to `usage ()'.
2267
22682002-10-18 Paul Eggert <eggert@twinsun.com>
2269
2270 * data/glr.c (yyreportParseError): Don't assume that sprintf
2271 yields the length of the printed string, as this is not true
2272 on SunOS 4.1.4. Reported by Peter Klein.
2273
2274 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2275 * tests/conflicts.at (%nonassoc and eof): Likewise.
2276 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2277
22782002-10-17 Akim Demaille <akim@epita.fr>
2279
2280 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2281 * src/getargs.c (trace_types, trace_args): Adjust.
2282 * src/reader.c (grammar_current_rule_prec_set)
2283 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2284 Standardize error messages.
2285 And s/@prec/%prec/!
2286 (reader): Use trace_flag to enable scanner/parser debugging,
2287 instead of an adhoc scheme.
2288 * src/scan-gram.l: Remove trailing debugging code.
2289
22902002-10-16 Paul Eggert <eggert@twinsun.com>
2291
2292 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2293 MUSCLE_TAB_H.
2294
2295 * NEWS: Officially drop support for building Bison with K&R C,
2296 since it didn't work anyway and it's not worth worrying about.
2297 * Makefile.maint (wget_files): Remove ansi2knr.c.
2298 (ansi2knr.c-url_prefix): Remove.
2299 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2300 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2301 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2302
23032002-10-15 Paul Eggert <eggert@twinsun.com>
2304
2305 Stop using the "enum_" trick for K&R-style function definitions;
2306 it confused me, and I was the author! Instead, assume that people
2307 who want to use K&R C compilers (when using these modules in GCC,
2308 perhaps?) will run ansi2knr.
2309
2310 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2311 All uses of "enum_" changed to "enum ".
2312 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2313 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2314
2315 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2316 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2317 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2318 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2319 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2320 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2321 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2322 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2323 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2324 Use function prototypes; this removes the need for declaring
2325 static functions simply to provide their prototypes.
2326 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2327 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2328 bitset_count_, bitset_create, bitset_dump, bitset_first,
2329 bitset_free, bitset_init, bitset_last, bitset_next,
2330 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2331 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2332 bitset_print, bitset_release_memory, bitset_toggle_,
2333 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2334 debug_bitset): Likewise.
2335 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2336 * lib/bitset_stats.c (bitset_log_histogram_print,
2337 bitset_percent_histogram_print, bitset_stats_and,
2338 bitset_stats_and_cmp, bitset_stats_and_or,
2339 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2340 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2341 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2342 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2343 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2344 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2345 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2346 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2347 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2348 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2349 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2350 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2351 bitset_stats_zero): Likewise.
2352 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2353 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2354 bitsetv_dump, debug_bitsetv): Likewise.
2355 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2356 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2357 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2358 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2359 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2360 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2361 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2362 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2363 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2364 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2365 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2366 Likewise.
2367 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2368 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2369 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2370 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2371 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2372 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2373 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2374 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2375 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2376 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2377 lbitset_xor_cmp, lbitset_zero): Likewise.
2378
23792002-10-14 Akim Demaille <akim@epita.fr>
2380
2381 Version 1.75.
2382
23832002-10-14 Akim Demaille <akim@epita.fr>
2384
2385 * tests/Makefile.am (maintainer-check-posix): New.
2386
23872002-10-14 Akim Demaille <akim@epita.fr>
2388
2389 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2390 member.
2391
23922002-10-14 Akim Demaille <akim@epita.fr>
2393
2394 * src/tables.c (table_ninf_remap): base -> tab.
2395 Reported by Matt Rosing.
2396
23972002-10-14 Paul Eggert <eggert@twinsun.com>
2398
2399 * tests/action.at, tests/calc.at, tests/conflicts.at,
2400 tests/cxx-type.at, tests/headers.at, tests/input.at,
2401 tests/regression.at, tests/synclines.at, tests/torture.at:
2402 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2403 so that the tests still work even if POSIXLY_CORRECT is set.
2404 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2405
2406 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2407 for portability to K&R hosts. Fix typo: signed char is guaranteed
2408 only to 127, not to 128.
2409 * data/glr.c (yysigned_char): New type.
2410 * data/yacc.c (yysigned_char): Likewise.
2411 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2412
24132002-10-13 Paul Eggert <eggert@twinsun.com>
2414
2415 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2416 true due to limited range of data type" warning from GCC.
2417
2418 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2419 by wrapping enum yytokentype's definition inside #ifndef
2420 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2421
24222002-10-13 Akim Demaille <akim@epita.fr>
2423
2424 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2425 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2426
24272002-10-13 Akim Demaille <akim@epita.fr>
2428
2429 * Makefile.maint: Update from Autoconf 2.54.
2430 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2431
24322002-10-13 Akim Demaille <akim@epita.fr>
2433
2434 * src/print.c (print_state): Separate the list of solved conflicts
2435 from the other items.
2436 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2437
24382002-10-13 Akim Demaille <akim@epita.fr>
2439
2440 Let nondeterministic skeletons be usable with deterministic
2441 tables.
2442
2443 With the patch, GAWK compiled by GCC without -O2 passes its test
2444 suite using a GLR parser driven by LALR tables. It fails with -O2
2445 because `struct stat' gives two different answers on my machine:
2446 88 (definition of an auto var) and later 96 (memset on this var).
2447 Hence the stack is badly corrumpted. The headers inclusion is to
2448 blame: if I move the awk.h inclusion before GLR's system header
2449 inclusion, the two struct stat have the same size.
2450
2451 * src/tables.c (pack_table): Always create conflict_table.
2452 (token_actions): Always create conflict_list.
2453 * data/glr.c (YYFLAG): Remove, unused.
2454
24552002-10-13 Akim Demaille <akim@epita.fr>
2456
2457 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2458 (O0FLAGS): New.
2459 (VALGRIND, GXX): New.
2460 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2461 * tests/bison.in: Run $PREBISON a pre-command.
2462 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2463 (maintainer-check-g++): New.
2464 * Makefile.am (maintainer-check): New.
2465
24662002-10-13 Akim Demaille <akim@epita.fr>
2467
2468 * data/glr.c: Formatting changes.
2469 Tweak some trace messages to match yacc.c's.
2470
24712002-10-13 Akim Demaille <akim@epita.fr>
2472
2473 GLR parsers sometimes raise parse errors instead of performing the
2474 default reduction.
2475 Reported by Charles-Henry de Boysson.
2476
2477 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2478 check the length of the traces when %glr.
2479 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2480 GLR's traces.
2481 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2482 Test GLR parsers.
2483 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2484 (yyltype): Remove the yy prefix from the member names.
2485 (yytable): Complete its comment.
2486 (yygetLRActions): Map error action number from YYTABLE from
2487 YYTABLE_NINF to 0.
2488 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2489 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2490 not satisfying as we could compare an YYACTION computed from
2491 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2492 only value for error actions.
2493 (yyreportParseError): In verbose parse error messages, don't issue
2494 `error' in the list of expected tokens.
2495 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2496 next action to perform to match glr.c's decoding.
2497 (yytable): Complete its comment.
2498
24992002-10-13 Paul Eggert <eggert@twinsun.com>
2500
2501 Fix problem reported by Henrik Grubbstroem in
2502 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2503 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2504 because the Bison parser reads the second action before reducing
2505 the first one.
2506 * src/scan-gram.l (rule_length): New static var.
2507 Use it to keep track of the rule length in the scanner, since
2508 we can't expect the parser to be in lock-step sync with the scanner.
2509 (handle_action_dollar, handle_action_at): Use this var.
2510 * tests/actions.at (Exotic Dollars): Test for the problem.
2511
25122002-10-12 Paul Eggert <eggert@twinsun.com>
2513
2514 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2515 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2516 Include <sys/time.h> when checking for clock_t and struct tms.
2517 Use same include order as source.
2518 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2519 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2520
2521 * lib/timevar.c: Update copyright date and clarify comments.
2522 (get_time) [IN_GCC]: Keep the GCC version for reference.
2523
2524 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2525 GCC version as of today, then merge Bison's changes.
2526 Change "GCC" to "Bison" in copyright notice. timevar.def's
2527 author is Akim, so change that too.
2528
2529 * src/reader.c (grammar_current_rule_check):
2530 Don't worry about the default action if $$ is untyped.
2531 Prevents bogus warnings reported by Jim Gifford in
2532 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2533
2534 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2535 * data/glr.c, data/lalr1.cc, data/yacc.c:
2536 Output token definitions before the first part of user declarations.
2537 Fixes compatibility problem reported by Jim Gifford for kbd in
2538 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2539
25402002-10-11 Paul Eggert <eggert@twinsun.com>
2541
2542 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2543 (yyparse): here. This undoes some of the 2002-07-25 change.
2544 Compatibility problem reported by Ralf S. Engelschall with
2545 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2546
25472002-10-11 Akim Demaille <akim@epita.fr>
2548
2549 * tests/regression.at Characters Escapes): New.
2550 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2551 characters.
2552 Reported by Jan Nieuwenhuizen.
2553
25542002-10-11 Akim Demaille <akim@epita.fr>
2555
2556 * po/id.po: New.
2557
25582002-10-10 Paul Eggert <eggert@twinsun.com>
2559
2560 Portability fixes for bitsets; this also avoids several GCC
2561 warnings.
2562
2563 * lib/abitset.c: Include <stddef.h>, for offsetof.
2564 * lib/lbitset.c: Likewise.
2565
2566 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2567 properly for vectors of objects. Do not assume that adding a
2568 header size to a multiple of a word size yields a value that is
2569 properly aligned for the whole union.
2570 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2571
2572 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2573 unique names for structures.
2574 * lib/ebitset.c (ebitset_bytes): Likewise.
2575 * lib/lbitset.c (lbitset_bytes): Likewise.
2576
2577 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2578 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2579 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2580 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2581 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2582 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2583 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2584 to improve the type-checking that GCC can do.
2585 * lib/bitset.c (bitset_op4_cmp): Likewise.
2586 * lib/bitset_stats.c (bitset_stats_count,
2587 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2588 bitset_stats_copy, bitset_stats_disjoint_p,
2589 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2590 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2591 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2592 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2593 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2594 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2595 bitset_stats_or_and_cmp): Likewise.
2596 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2597 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2598 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2599 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2600
2601 * lib/abitset.h: Include bitset.h, not bbitset.h.
2602 * lib/ebitset.h: Likewise.
2603 * lib/lbitset.h: Likewise.
2604
2605 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2606 All instances of parameters of type enum bitset_opts are now of
2607 type enum_bitset_opts, to conform to the C Standard, and similarly
2608 for enum_bitset_type.
2609 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2610 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2611
2612 Do not use "struct bitset_struct" to mean different things in
2613 different modules. Not only is this confusing, it violates
2614 the C Standard, which requires that structure types in different
2615 modules must be compatible if one is to be passed to the other.
2616 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2617 All instances of "struct bitset_struct *" replaced with "bitset".
2618 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2619 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2620 struct lbitset_struct, struct bitset_stats_struct): New types.
2621 All uses of struct bitset_struct changed to union bitset_union,
2622 etc.
2623 * lib/abitset.c (struct abitset_struct, abitset,
2624 struct bitset_struct): Remove.
2625 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2626 struct bitset_struct): Remove.
2627 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2628 bitset_struct): Remove.
2629 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2630 Likewise.
2631
2632 Do not call a function of type T using a call that assumes the
2633 function is of a different type U. Standard C requires that a
2634 function must be called with a type that is compatible with its
2635 definition.
2636 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2637 New decls.
2638 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2639 New functions.
2640 * lib/ebitset.c (PFV): Remove.
2641 * lib/lbitset.c (PFV): Likewise.
2642 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2643 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2644 decls.
2645 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2646 (ebitset_vtable): Use them.
2647 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2648 lbitset_xor): New functions.
2649 (lbitset_vtable): Use them.
2650
2651 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2652 Declare.
2653
2654 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2655 GCC warning.
2656 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2657 Use offsetof, for simplicity.
2658
26592002-10-06 Paul Eggert <eggert@twinsun.com>
2660
2661 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2662 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2663 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2664 which was inadvertently undone by the 2002-09-30 patch.
2665 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2666 the same width as int.
2667
26682002-10-04 Paul Eggert <eggert@twinsun.com>
2669
2670 Version 1.50.
2671
2672 * configure.ac (AC_INIT), NEWS: Increment version number.
2673
2674 * doc/bison.texinfo: Minor spelling, grammar, and white space
2675 fixes.
2676 (Symbols): Mention that any negative value returned from yylex
2677 signifies end-of-input. Warn about negative chars. Mention
2678 the portable Standard C character set.
2679
2680 The GNU coding standard says CFLAGS and YFLAGS are reserved
2681 for the installer to set.
2682 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2683 * src/Makefile.am (AM_CFLAGS): Likewise.
2684 (AM_YFLAGS): Renamed from YFLAGS.
2685
2686 Fix some MAX and MIN problems.
2687 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2688 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2689 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2690 * src/reader.c (reader): Use it.
2691
2692 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2693 POSIX 1003.1-2001 has removed fgrep.
2694
26952002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2696
2697 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2698 interpreted as signed.
2699 * lib/ebitset.c (ebitset_list): Fix bug.
2700
27012002-10-01 Paul Eggert <eggert@twinsun.com>
2702
2703 More fixes for 64-bit hosts and large bitsets.
2704
2705 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2706 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2707 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2708 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2709 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2710 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2711 bitset_count_): Likewise.
2712 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2713 bitset_first, bitset_last): Likewise.
2714 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2715 bitset_stats_list_reverse, bitset_stats_size,
2716 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2717 Likewise.
2718 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2719 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2720 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2721 bitsetv_reflexive_transitive_closure): Likewise.
2722 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2723 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2724 Likewise.
2725 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2726 Likewise.
2727
2728 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2729 Use size_t, not unsigned int, to count bytes.
2730 * lib/abitset.h (abitset_bytes): Likewise.
2731 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2732 Likewise.
2733 * lib/bitset.h (bitset_bytes): Likewise.
2734 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2735 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2736 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2737 * lib/ebitset.c (ebitset_bytes): Likewise.
2738 * lib/ebitset.h (ebitset_bytes): Likewise.
2739 * lib/lbitset.c (lbitset_bytes): Likewise.
2740 * lib/lbitset.h (lbitset_bytes): Likewise.
2741
2742 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2743 abitset_subset_p, abitset_disjoint_p, abitset_and,
2744 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2745 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2746 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2747 abitset_or_and, abitset_or_and_cmp):
2748 Use bitset_windex instead of unsigned int.
2749 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2750 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2751 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2752 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2753 Likewise.
2754 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2755
2756 * lib/bitset.c (bitset_print):
2757 Use proper printf formats for widths of integer types.
2758 * lib/bitset_stats.c (bitset_percent_histogram_print,
2759 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2760 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2761 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2762 * lib/lbitset.c (lbitset_bytes): Likewise.
2763
2764 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2765 BITSET_SIZE_MAX): New macros.
2766 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2767 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2768 to BITSET_WINDEX_MAX.
2769
2770 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2771 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2772 since we now return the bitset_bindex type (not int).
2773
2774 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2775 when computing sizes.
2776 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2777
2778 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2779 and avoid cast to unsigned.
2780
27812002-09-30 Akim Demaille <akim@epita.fr>
2782
2783 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2784 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2785 Updates from Michael Hayes.
2786
27872002-09-30 Art Haas <ahaas@neosoft.com>
2788
2789 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2790 invocations.
2791 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2792 defined.
2793
27942002-09-27 Akim Demaille <akim@epita.fr>
2795
2796 Version 1.49c.
2797
27982002-09-27 Akim Demaille <akim@epita.fr>
2799
2800 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2801 (Because of AC_LIBSOURCE).
2802
28032002-09-27 Akim Demaille <akim@epita.fr>
2804
2805 Playing with Autoscan.
2806
2807 * configure.ac: Remove the old LIBOBJ tweaks.
2808 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2809 * lib/strrchr.c: New.
2810 * lib/strtol.c: New, from the Coreutils 4.5.1.
2811
28122002-09-27 Akim Demaille <akim@epita.fr>
2813
2814 Playing with Autoscan.
2815
2816 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2817 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2818 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2819 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2820 Coreutils 4.5.1.
2821
28222002-09-24 Akim Demaille <akim@epita.fr>
2823
2824 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2825 (Frequently Asked Questions, Parser Stack Overflow): New.
2826
28272002-09-13 Akim Demaille <akim@epita.fr>
2828
2829 Playing with autoscan.
2830
2831 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2832 * src/files.c (skeleton_find): Remove, unused.
2833 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2834 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2835
28362002-09-13 Akim Demaille <akim@epita.fr>
2837
2838 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2839 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2840
28412002-09-13 Akim Demaille <akim@epita.fr>
2842
2843 * configure.ac: Require 2.54.
2844 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2845 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2846 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2847 Remove, provided by Autoconf macros.
2848
28492002-09-12 Akim Demaille <akim@epita.fr>
2850
2851 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2852
28532002-09-12 Akim Demaille <akim@epita.fr>
2854
2855 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2856 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2857 Reported by Martin Mokrejs.
2858
28592002-09-10 Akim Demaille <akim@epita.fr>
2860
2861 * src/parse-gram.y: Associate a human readable string to each
2862 token type.
2863 * tests/regression.at (Invalid inputs): Adjust.
2864
28652002-09-10 Gary V. Vaughan <gary@gnu.org>
2866
2867 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2868 with an Autoconf-2.5x style configure.ac.
2869
28702002-09-06 Paul Eggert <eggert@twinsun.com>
2871
2872 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2873 exception applies only to yacc.c. This is a modification of a
2874 patch originally suggested by Akim Demaille.
2875
28762002-09-06 Akim Demaille <akim@epita.fr>
2877
2878 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2879 here to...
2880 * data/yacc.c: here.
2881
2882 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2883 LocationType.
2884 (b4_ltype): Default to yy::Location from location.hh.
2885
28862002-09-04 Jim Meyering <jim@meyering.net>
2887
2888 * data/yacc.c: Guard the declaration of yytoknum also with
2889 `#ifdef YYPRINT', so it is declared only when used.
2890
28912002-09-04 Akim Demaille <akim@epita.fr>
2892
2893 * configure.in: Rename as...
2894 * configure.ac: this.
2895 Bump to 1.49c.
2896
28972002-09-04 Akim Demaille <akim@epita.fr>
2898
2899 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2900 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2901 translate maintainer only messages.
2902
29032002-08-12 Paul Eggert <eggert@twinsun.com>
2904
2905 Version 1.49b.
2906
2907 * Makefile.am (SUBDIRS): Remove intl.
2908 (DISTCLEANFILES): Remove.
2909 * NEWS: Mention that GNU M4 is now required. Clarify what is
2910 meant by "larger grammars". Mention the pt_BR translation.
2911 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2912 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2913 Bump version from 0.11.2 to 0.11.5.
2914 (BISON_PREREQ_STAGE): Remove.
2915 (AM_GNU_GETTEXT): Use external gettext.
2916 (AC_OUTPUT): Remove intl/Makefile.
2917
2918 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2919
2920 * data/glr.c: Include string.h, for strlen.
2921 (yyreportParseError): Use size_t for yysize.
2922 (yy_yypstack): No longer nested inside yypstates, as nested
2923 functions are not portable. Do not assume size_t is the
2924 same width as int.
2925 (yypstates): Do not assume that ptrdiff_t is the same width
2926 as int, and similarly for yyposn and YYINDEX.
2927
2928 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2929
2930 * lib/Makefile.am (INCLUDES): Do not include from the intl
2931 directory, which has been removed.
2932 * src/Makefile.am (INCLUDES): Likewise.
2933
2934 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2935 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2936 New vars.
2937
2938 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2939 * tests/Makefile.am (EXTRA_DIST): Likewise.
2940
2941 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2942 Do not assume that bitset_windex is the same width as unsigned.
2943
2944 * lib/abitset.c (abitset_unused_clear): Do not assume that
2945 bitset_word is the same width as int.
2946 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2947 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2948 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2949 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2950 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2951
2952 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2953 portability to one's complement hosts!).
2954 * lib/ebitset.c (ebitset_op1): Likewise.
2955 * lib/lbitset.c (lbitset_op1): Likewise.
2956
2957 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2958 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2959 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2960 Sync with fileutils.
2961 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2962 lib/gettext.h: Sync with diffutils.
2963
2964 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2965 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2966
2967 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2968 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2969 check for void *.
2970
2971 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2972 size_t; the old version tried to do this but casted improperly.
2973 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2974 (bitset_test): Now returns int, not unsigned long.
2975
2976 * lib/bitset_stats.c: Include "gettext.h".
2977 (_): New macro.
2978 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2979 name locals "index", as it generates unnecessary warnings on some
2980 hosts that have an "index" function.
2981
2982 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2983 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2984 they need translation.
2985 * src/LR0.c (state_list_append, new_itemsets, get_state,
2986 append_states, generate_states): Likewise.
2987 * src/assoc.c (assoc_to_string): Likewise.
2988 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2989 * src/gram.c (grammar_dump): Likewise.
2990 * src/injections.c (injections_compute): Likewise.
2991 * src/lalr.c (lookaheads_print): Likewise.
2992 * src/relation.c (relation_transpose): Likewise.
2993 * src/scan-gram.l: Likewise.
2994 * src/tables.c (table_grow, pack_vector): Likewise.
2995
2996 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2997 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2998 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2999 * m4/mbstate_t.m4: Sync with fileutils.
3000 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3001
3002 * po/LINGUAS: Add pt_BR.
3003 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3004 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3005 lib/timevar.c.
3006 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3007 manual recommends.
3008 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3009
3010 * src/complain.c (strerror_r): Remove decl; not needed.
3011 (strerror): Use same pattern as ../lib/error.c.
3012
3013 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3014
3015 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3016
3017 * src/main.c (main): Cast result of bindtextdomain and textdomain
3018 to void, to avoid a GCC warning when --disable-nls is in effect.
3019
3020 * src/scan-gram.l: Use strings rather than escapes when possible,
3021 to minimize the number of warnings from xgettext.
3022 (handle_action_dollar, handle_action_at): Don't use isdigit,
3023 as it mishandles negative chars and it may not work as expected
3024 outside the C locale.
3025
3026 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3027 this is a GCC extension and is not portable to other compilers.
3028
3029 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3030 Do not include <ctype.h>; no longer needed.
3031 Do not include <malloc.h>; no longer needed (and generates
3032 warnings on OpenBSD 3.0).
3033
3034 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3035 it's not portable.
3036
3037 * tests/regression.at: Do not use 'cc -c input.c -o input';
3038 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3039
3040 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3041 exit status as failure, not just exit status 1. Sun C exits
3042 with status 2 sometimes.
3043
3044 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3045 Use it for the two large tests.
3046
30472002-08-02 Akim Demaille <akim@epita.fr>
3048
3049 * src/conflicts.c (conflicts_output): Don't output rules never
3050 reduced here, since anyway that computation doesn't work.
3051 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3052 (rule_useless_p, rule_never_reduced_p): New.
3053 (grammar_rules_partial_print): Use a filter instead of a range.
3054 Display the title only if needed.
3055 (grammar_rules_print): Adjust.
3056 (grammar_rules_never_reduced_report): New.
3057 * src/tables.c (action_row): Move the computation of rules never
3058 reduced to...
3059 (token_actions): here.
3060 * src/main.c (main): Make the parser before making the report, so
3061 that rules never reduced are computed.
3062 Call grammar_rules_never_reduced_report.
3063 * src/print.c (print_results): Report rules never reduced.
3064 * tests/conflicts.at, tests/reduce.at: Adjust.
3065
30662002-08-01 Akim Demaille <akim@epita.fr>
3067
3068 Instead of attaching lookaheads and duplicating the rules being
3069 reduced by a state, attach the lookaheads to the reductions.
3070
3071 * src/state.h (state_t): Remove the `lookaheads',
3072 `lookaheads_rule' member.
3073 (reductions_t): Add a `lookaheads' member.
3074 Use a regular array for the `rules'.
3075 * src/state.c (reductions_new): Initialize the lookaheads member
3076 to 0.
3077 (state_rule_lookaheads_print): Adjust.
3078 * src/state.h, src/state.c (state_reductions_find): New.
3079 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3080 (count_rr_conflicts): Adjust.
3081 * src/lalr.c (LArule): Remove.
3082 (add_lookback_edge): Adjust.
3083 (state_lookaheads_count): New.
3084 (states_lookaheads_initialize): Merge into...
3085 (initialize_LA): this.
3086 (lalr_free): Adjust.
3087 * src/main.c (main): Don't free nullable and derives too early: it
3088 is used by --verbose.
3089 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3090
30912002-08-01 Akim Demaille <akim@epita.fr>
3092
3093 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3094 `rule_number_t**'.
3095 (set_derives, free_derives): Rename as...
3096 (derives_compute, derives_free): this.
3097 Adjust all dependencies.
3098 * src/nullable.c (set_nullable, free_nullable): Rename as...
3099 (nullable_compute, nullable_free): these.
3100 (rule_list_t): Store rule_t *, not rule_number_t.
3101 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3102 pointers, instead of their numbers.
3103 * src/main.c (main): Call nullable_free, and derives_free earlier,
3104 as they were lo longer used.
3105
31062002-08-01 Akim Demaille <akim@epita.fr>
3107
3108 * lib/timevar.c (get_time): Include children time.
3109 * src/lalr.h (LA, LArule): Don't export them: used with the
3110 state_t.
3111 * src/lalr.c (LA, LArule): Static.
3112 * src/lalr.h, src/lalr.c (lalr_free): New.
3113 * src/main.c (main): Call it.
3114 * src/tables.c (pack_vector): Check whether loc is >= to the
3115 table_size, not >.
3116 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3117 (tables_generate): do it, since that's also it which allocates
3118 them.
3119 Don't free LA and LArule, main does.
3120
31212002-07-31 Akim Demaille <akim@epita.fr>
3122
3123 Separate parser tables computation and output.
3124
3125 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3126 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3127 (yydefgoto, yydefact, high): Move to...
3128 * src/tables.h, src/tables.c: here.
3129 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3130 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3131 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3132 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3133 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3134 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3135 (action_row, save_row, token_actions, save_column, default_goto)
3136 (goto_actions, sort_actions, matching_state, pack_vector)
3137 (table_ninf_remap, pack_table, prepare_actions): Move to...
3138 * src/tables.c: here.
3139 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3140 * src/output.c (token_actions, output_base, output_conflicts)
3141 (output_check): Merge into...
3142 (prepare_actions): this.
3143 (actions_output): Rename as...
3144 (user_actions_output): this.
3145 * src/main.c (main): Call tables_generate and tables_free.
3146
31472002-07-31 Akim Demaille <akim@epita.fr>
3148
3149 Steal GCC's --time-report support.
3150
3151 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3152 stolen/adjusted from GCC.
3153 * m4/stage.m4: Remove time related checks.
3154 * m4/timevar.m4: New.
3155 * configure.in: Adjust.
3156 * src/system.h: Adjust to using timevar.h.
3157 * src/getargs.h, src/getargs.c: Support trace_time for
3158 --trace=time.
3159 * src/main.c (stage): Remove.
3160 (main): Replace `stage' invocations with timevar calls.
3161 * src/output.c: Insert pertinent timevar calls.
3162
31632002-07-31 Akim Demaille <akim@epita.fr>
3164
3165 Let --trace have arguments.
3166
3167 * src/getargs.h (enum trace_e): New.
3168 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3169 (long_options, short_options): --trace/-T takes an optional
3170 argument.
3171 Change all the uses of trace_flag to reflect the new flags.
3172 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3173
3174 Strengthen `stage' portability.
3175
3176 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3177 * configure.in: Use it.
3178 Don't check for malloc.h and sys/times.h.
3179 * src/system.h: Include them when appropriate.
3180 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3181 times and struct tms are available.
3182
31832002-07-30 Akim Demaille <akim@epita.fr>
3184
3185 In verbose parse error message, don't report `error' as an
3186 expected token.
3187 * tests/actions.at (Printers and Destructors): Adjust.
3188 * tests/calc.at (Calculator $1): Adjust.
3189 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3190 error message, do not report the parser accepts the error token in
3191 that state.
3192
31932002-07-30 Akim Demaille <akim@epita.fr>
3194
3195 Normalize conflict related messages.
3196
3197 * src/complain.h, src/complain.c (warn, complain): New.
3198 * src/conflicts.c (conflicts_print): Use them.
3199 (conflict_report_yacc): New, extracted from...
3200 (conflicts_print): here.
3201 * tests/conflicts.at, tests/existing.at: Adjust.
3202
32032002-07-30 Akim Demaille <akim@epita.fr>
3204
3205 Report rules which are never reduced by the parser: those hidden
3206 by conflicts.
3207
3208 * src/LR0.c (save_reductions): Don't make the final state too
3209 different: save its reduction (accept) instead of having a state
3210 without any action (no shift or goto, no reduce).
3211 Note: the final state is now a ``regular'' state, i.e., the
3212 parsers now contain `reduce 0' as default reduction.
3213 Nevertheless, since they decide to `accept' when yystate =
3214 final_state, they still will not reduce rule 0.
3215 * src/print.c (print_actions, print_reduction): Adjust.
3216 * src/output.c (action_row): Track reduced rules.
3217 (token_actions): Report rules never reduced.
3218 * tests/conflicts.at, tests/regression.at: Adjust.
3219
32202002-07-30 Akim Demaille <akim@epita.fr>
3221
3222 `stage' was accidently included in a previous patch.
3223 Initiate its autoconfiscation.
3224
3225 * configure.in: Look for malloc.h and sys/times.h.
3226 * src/main.c (stage): Adjust.
3227 Report only when trace_flag.
3228
32292002-07-29 Akim Demaille <akim@epita.fr>
3230
3231 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3232 state_number_t.
3233 (errs_t): symbol_t*, not symbol_number_t.
3234 (reductions_t): rule_t*, not rule_number_t.
3235 (FOR_EACH_SHIFT): New.
3236 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3237 * src/print.c, src/print_graph.c: Adjust.
3238
32392002-07-29 Akim Demaille <akim@epita.fr>
3240
3241 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3242
3243 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3244 (endtoken, accept): these.
3245 * src/reader.c (reader): Set endtoken's default tag to "$end".
3246 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3247 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3248 Adjust.
3249
32502002-07-29 Akim Demaille <akim@epita.fr>
3251
3252 * src/reduce.c (reduce_grammar): When the language is empty,
3253 complain about the start symbol, not the axiom.
3254 Use its location.
3255 * tests/reduce.at (Empty Language): New.
3256
32572002-07-26 Akim Demaille <akim@epita.fr>
3258
3259 * src/reader.h, src/reader.c (gram_error): ... can't get
3260 yycontrol without making too strong assumptions on the parser
3261 itself.
3262 * src/output.c (prepare_tokens): Use the real 0th value of
3263 token_translations instead of `0'.
3264 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3265 visible here.
3266 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3267 for the time being: %locations ought to provide it to yyerror.
3268
32692002-07-25 Akim Demaille <akim@epita.fr>
3270
3271 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3272 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3273 * tests/regression.at (Web2c Actions): Adjust.
3274
32752002-07-25 Akim Demaille <akim@epita.fr>
3276
3277 Stop storing rules from 1 to nrules + 1.
3278
3279 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3280 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3281 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3282 Iterate from 0 to nrules.
3283 Use rule_number_as_item_number and item_number_as_rule_number.
3284 Adjust to `derive' now containing possibly 0.
3285 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3286 Handle the `- 1' part in rule numbers from/to item numbers.
3287 * src/conflicts.c (log_resolution): Fix the message which reversed
3288 shift and reduce.
3289 * src/output.c (action_row): Initialize default_rule to -1.
3290 (token_actions): Adjust.
3291 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3292 expected output.
3293 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3294
32952002-07-25 Akim Demaille <akim@epita.fr>
3296
3297 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3298 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3299 (b4_c_knr_arg_decl): New.
3300 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3301 yyreport_parse_error.
3302
33032002-07-25 Akim Demaille <akim@epita.fr>
3304
3305 * data/yacc.c (yyreport_parse_error): New, extracted from...
3306 (yyparse): here.
3307 (yydestruct, yysymprint): Move above yyparse.
3308 Be K&R compliant.
3309
33102002-07-25 Akim Demaille <akim@epita.fr>
3311
3312 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3313 replace...
3314 (b4_sint_type, b4_uint_type): these.
3315 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3316 * tests/regression.at (Web2c Actions): Adjust.
3317
33182002-07-25 Akim Demaille <akim@epita.fr>
3319
3320 * src/gram.h (TIEM_NUMBER_MAX): New.
3321 (item_number_of_rule_number, rule_number_of_item_number): Rename
3322 as...
3323 (rule_number_as_item_number, item_number_as_rule_number): these.
3324 Adjust dependencies.
3325 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3326 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3327 (symbol_number_to_vector_number): New.
3328 (order): Of vector_number_t* type.
3329 (base_t, BASE_MAX, BASE_MIN): New.
3330 (froms, tos, width, pos, check): Of base_t type.
3331 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3332 (actrow): Of action_number_t type.
3333 (conflrow): Of unsigned int type.
3334 (table_ninf, base_ninf): New.
3335 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3336 (muscle_insert_int_table, muscle_insert_base_table)
3337 (muscle_insert_rule_number_table): New.
3338 (prepare_tokens): Output `toknum' as int_table.
3339 (action_row): Returns a rule_number_t.
3340 Use ACTION_MIN, not SHRT_MIN.
3341 (token_actions): yydefact is rule_number_t*.
3342 (table_ninf_remap): New.
3343 (pack_table): Use it for `base' and `table'.
3344 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3345 replaced with...
3346 (YYPACT_NINF, YYTABLE_NINF): these.
3347 (yypact, yytable): Compute their types instead of hard-coded
3348 `short'.
3349 * tests/regression.at (Web2c Actions): Adjust.
3350
33512002-07-19 Akim Demaille <akim@epita.fr>
3352
3353 * src/scan-gram.l (id): Can start with an underscore.
3354
33552002-07-16 Akim Demaille <akim@epita.fr>
3356
3357 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3358 Adjust all former `associativity' dependencies.
3359 * src/symtab.c (symbol_new): Default associativity is `undef', not
3360 `right'.
3361 (symbol_check_alias_consistence): Adjust.
3362
33632002-07-09 Akim Demaille <akim@epita.fr>
3364
3365 * doc/bison.texinfo: Properly set the ``header'' part.
3366 Use @dircategory ``GNU programming tools'' as per Texinfo's
3367 documentation.
3368 Use @copying.
3369
33702002-07-09 Akim Demaille <akim@epita.fr>
3371
3372 * lib/quotearg.h: Protect against multiple inclusions.
3373 * src/location.h (location_t): Add a `file' member.
3374 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3375 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3376 `error_one_per_line' support.
3377
33782002-07-09 Akim Demaille <akim@epita.fr>
3379
3380 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3381 * src/reader.c (lineno): Remove.
3382 Adjust all dependencies.
3383 (get_merge_function): Take a location and use complain_at.
3384 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3385 * tests/regression.at (Invalid inputs, Mixing %token styles):
3386 Adjust.
3387
33882002-07-09 Akim Demaille <akim@epita.fr>
3389
3390 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3391 recovery rule, and forbid extensions when --yacc.
3392 (gram_error): Use complain_at.
3393 * src/reader.c (reader): Exit if there were parse errors.
3394
33952002-07-09 Akim Demaille <akim@epita.fr>
3396
3397 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3398 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3399 Reported by R Blake <blakers@mac.com>.
3400
34012002-07-09 Akim Demaille <akim@epita.fr>
3402
3403 * data/yacc.c: Output the copyright notive in the header.
3404
34052002-07-03 Akim Demaille <akim@epita.fr>
3406
3407 * src/output.c (froms, tos): Are state_number_t.
3408 (save_column): sp, sp1, and sp2 are state_number_t.
3409 (prepare): Rename `final' as `final_state_number', `nnts' as
3410 `nterms_number', `nrules' as `rules_number', `nstates' as
3411 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3412 unused.
3413 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3414 * data/lalr1.cc (nsym_): Remove, unused.
3415
34162002-07-03 Akim Demaille <akim@epita.fr>
3417
3418 * src/lalr.h, src/lalr.c (goto_number_t): New.
3419 * src/lalr.c (goto_list_t): New.
3420 Propagate them.
3421 * src/nullable.c (rule_list_t): New.
3422 Propagate.
3423 * src/types.h: Remove.
3424
34252002-07-03 Akim Demaille <akim@epita.fr>
3426
3427 * src/closure.c (print_fderives): Use rule_rhs_print.
3428 * src/derives.c (print_derives): Use rule_rhs_print.
3429 (rule_list_t): New, replaces `shorts'.
3430 (set_derives): Add comments.
3431 * tests/sets.at (Nullable, Firsts): Adjust.
3432
34332002-07-03 Akim Demaille <akim@epita.fr>
3434
3435 * src/output.c (prepare_actions): Free `tally' and `width'.
3436 (prepare_actions): Allocate and free `order'.
3437 * src/symtab.c (symbols_free): Free `symbols'.
3438 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3439 * src/output.c (m4_invoke): Move to...
3440 * src/scan-skel.l: here.
3441 (<<EOF>>): Close yyout, and free its name.
3442
34432002-07-03 Akim Demaille <akim@epita.fr>
3444
3445 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3446
3447 * src/LR0.c (new_state): Merge into...
3448 (state_list_append): this.
3449 (new_states): Merge into...
3450 (generate_states): here.
3451 (set_states): Don't ensure a proper `errs' state member here, do it...
3452 * src/conflicts.c (conflicts_solve): here.
3453 * src/state.h, src/state.c: Comment changes.
3454 (state_t): Rename member `shifts' as `transitions'.
3455 Adjust all dependencies.
3456 (errs_new): For consistency, also take the values as argument.
3457 (errs_dup): Remove.
3458 (state_errs_set): New.
3459 (state_reductions_set, state_transitions_set): Assert that no
3460 previous value was assigned.
3461 (state_free): New.
3462 (states_free): Use it.
3463 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3464 temporary storage: use `errs' and `nerrs' as elsewhere.
3465 (set_conflicts): Allocate and free this `errs'.
3466
34672002-07-02 Akim Demaille <akim@epita.fr>
3468
3469 * lib/libiberty.h: New.
3470 * lib: Update the bitset implementation from upstream.
3471 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3472 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3473 * src/main.c: Adjust bitset stats calls.
3474
34752002-07-01 Paul Eggert <eggert@twinsun.com>
3476
3477 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3478 char, so that negative chars don't collide with $.
3479
34802002-06-30 Akim Demaille <akim@epita.fr>
3481
3482 Have the GLR tests be `warning' checked, and fix the warnings.
3483
3484 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3485 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3486 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3487 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3488 (yyaddDeferredAction): static.
3489 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3490 (yyreportParseError): yyprefix is const.
3491 yytokenp is used only when verbose.
3492 (yy__GNUC__): Replace with __GNUC__.
3493 (yypdumpstack): yyi is size_t.
3494 (yypreference): Un-yy local variables and arguments, to avoid
3495 clashes with `yyr1'. Anyway, we are not in the user name space.
3496 (yytname_size): be an int, as is compared with ints.
3497 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3498 Use them.
3499 * tests/cxx-gram.at: Use quotation to protect $1.
3500 Use AT_COMPILE to enable warnings hunts.
3501 Prototype yylex and yyerror.
3502 `Use' argc.
3503 Include `string.h', not `strings.h'.
3504 Produce and prototype stmtMerge only when used.
3505 yylex takes a location.
3506
35072002-06-30 Akim Demaille <akim@epita.fr>
3508
3509 We spend a lot of time in quotearg, in particular when --verbose.
3510
3511 * src/symtab.c (symbol_get): Store a quoted version of the key.
3512 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3513 Adjust all callers.
3514
35152002-06-30 Akim Demaille <akim@epita.fr>
3516
3517 * src/state.h (reductions_t): Rename member `nreds' as num.
3518 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3519 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3520
35212002-06-30 Akim Demaille <akim@epita.fr>
3522
3523 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3524 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3525 (shifts_to): Rename as...
3526 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3527 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3528 (TRANSITION_IS_DISABLED, transitions_to): these.
3529
35302002-06-30 Akim Demaille <akim@epita.fr>
3531
3532 * src/print.c (print_shifts, print_gotos): Merge into...
3533 (print_transitions): this.
3534 (print_transitions, print_errs, print_reductions): Align the
3535 lookaheads columns.
3536 (print_core, print_transitions, print_errs, print_state,
3537 print_grammar): Output empty lines separator before, not after.
3538 (state_default_rule_compute): Rename as...
3539 (state_default_rule): this.
3540 * tests/conflicts.at (Defaulted Conflicted Reduction),
3541 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3542 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3543
35442002-06-30 Akim Demaille <akim@epita.fr>
3545
3546 Display items as we display rules.
3547
3548 * src/gram.h, src/gram.c (rule_lhs_print): New.
3549 * src/gram.c (grammar_rules_partial_print): Use it.
3550 * src/print.c (print_core): Likewise.
3551 * tests/conflicts.at (Defaulted Conflicted Reduction),
3552 (Unresolved SR Conflicts): Adjust.
3553 (Unresolved SR Conflicts): Adjust and rename as...
3554 (Resolved SR Conflicts): this, as was meant.
3555 * tests/regression.at (Web2c Report): Adjust.
3556
35572002-06-30 Akim Demaille <akim@epita.fr>
3558
3559 * src/print.c (state_default_rule_compute): New, extracted from...
3560 (print_reductions): here.
3561 Pessimize, but clarify the code.
3562 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3563
35642002-06-30 Akim Demaille <akim@epita.fr>
3565
3566 * src/output.c (action_row): Let default_rule be always a rule
3567 number.
3568
35692002-06-30 Akim Demaille <akim@epita.fr>
3570
3571 * src/closure.c (print_firsts, print_fderives, closure):
3572 Use BITSET_EXECUTE.
3573 * src/lalr.c (lookaheads_print): Likewise.
3574 * src/state.c (state_rule_lookaheads_print): Likewise.
3575 * src/print_graph.c (print_core): Likewise.
3576 * src/print.c (print_reductions): Likewise.
3577 * src/output.c (action_row): Likewise.
3578 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3579
35802002-06-30 Akim Demaille <akim@epita.fr>
3581
3582 * src/print_graph.c: Use report_flag.
3583
35842002-06-30 Akim Demaille <akim@epita.fr>
3585
3586 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3587 to...
3588 * src/relation.h, src/relation.c (traverse, relation_digraph)
3589 (relation_print, relation_transpose): New.
3590
35912002-06-30 Akim Demaille <akim@epita.fr>
3592
3593 * src/state.h, src/state.c (shifts_to): New.
3594 * src/lalr.c (build_relations): Use it.
3595
35962002-06-30 Akim Demaille <akim@epita.fr>
3597
3598 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3599 (item_number_of_rule_number, rule_number_of_item_number): New.
3600 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3601 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3602 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3603 Propagate their use.
3604 Much remains to be done, in particular wrt `shorts' from types.h.
3605
36062002-06-30 Akim Demaille <akim@epita.fr>
3607
3608 * src/symtab.c (symbol_new): Initialize the `printer' member.
3609
36102002-06-30 Akim Demaille <akim@epita.fr>
3611
3612 * src/LR0.c (save_reductions): Remove, replaced by...
3613 * src/state.h, src/state.c (state_reductions_set): New.
3614 (reductions, errs): Rename as...
3615 (reductions_t, errs_t): these.
3616 Adjust all dependencies.
3617
36182002-06-30 Akim Demaille <akim@epita.fr>
3619
3620 * src/LR0.c (state_list_t, state_list_append): New.
3621 (first_state, last_state): Now symbol_list_t.
3622 (this_state): Remove.
3623 (new_itemsets, append_states, save_reductions): Take a state_t as
3624 argument.
3625 (set_states, generate_states): Adjust.
3626 (save_shifts): Remove, replaced by...
3627 * src/state.h, src/state.c (state_shifts_set): New.
3628 (shifts): Rename as...
3629 (shifts_t): this.
3630 Adjust all dependencies.
3631 * src/state.h (state_t): Remove the `next' member.
3632
36332002-06-30 Akim Demaille <akim@epita.fr>
3634
3635 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3636 escaped in slot 0.
3637
36382002-06-30 Akim Demaille <akim@epita.fr>
3639
3640 Use hash.h for the state hash table.
3641
3642 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3643 (allocate_storage): Use state_hash_new.
3644 (free_storage): Use state_hash_free.
3645 (new_state, get_state): Adjust.
3646 * src/lalr.h, src/lalr.c (states): Move to...
3647 * src/states.h (state_t): Remove the `link' member, no longer
3648 used.
3649 * src/states.h, src/states.c: here.
3650 (state_hash_new, state_hash_free, state_hash_lookup)
3651 (state_hash_insert, states_free): New.
3652 * src/states.c (state_table, state_compare, state_hash): New.
3653 * src/output.c (output_actions): Do not free states now, since we
3654 still need to know the final_state number in `prepare', called
3655 afterwards. Do it...
3656 * src/main.c (main): here: call states_free after `output'.
3657
36582002-06-30 Akim Demaille <akim@epita.fr>
3659
3660 * src/state.h, src/state.c (state_new): New, extracted from...
3661 * src/LR0.c (new_state): here.
3662 * src/state.h (STATE_ALLOC): Move to...
3663 * src/state.c: here.
3664 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3665 * src/state.h, src/state.c: here.
3666
36672002-06-30 Akim Demaille <akim@epita.fr>
3668
3669 * src/reader.c (gensym): Rename as...
3670 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3671 (getsym): Rename as...
3672 (symbol_get): this.
3673
36742002-06-30 Akim Demaille <akim@epita.fr>
3675
3676 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3677 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3678 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3679 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3680
36812002-06-30 Akim Demaille <akim@epita.fr>
3682
3683 Make the test suite pass with warnings checked.
3684
3685 * tests/actions.at (Printers and Destructors): Improve.
3686 Avoid unsigned vs. signed issues.
3687 * tests/calc.at: Don't exercise the scanner here, do it...
3688 * tests/input.at (Torturing the Scanner): here.
3689
36902002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3691
3692 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3693 reorganize first lines parallel to yacc.c.
3694
36952002-06-28 Akim Demaille <akim@epita.fr>
3696
3697 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3698 (b4_token_enum, b4_token_defines): New, factored from...
3699 * data/lalr1.cc, data/yacc.c, glr.c: here.
3700
37012002-06-28 Akim Demaille <akim@epita.fr>
3702
3703 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3704 unused variables.
3705 * src/output.c (merger_output): static.
3706
37072002-06-28 Akim Demaille <akim@epita.fr>
3708
3709 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3710 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3711 pacify GCC.
3712 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3713
37142002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3715
3716 Accumulated changelog for new GLR parsing features.
3717
3718 * src/conflicts.c (count_total_conflicts): Change name to
3719 conflicts_total_count.
3720 * src/conflicts.h: Ditto.
3721 * src/output.c (token_actions): Use the new name.
3722 (output_conflicts): Change conflp => conflict_list_heads, and
3723 confl => conflict_list for better readability.
3724 * data/glr.c: Use the new names.
3725 * NEWS: Add self to GLR announcement.
3726
3727 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3728
3729 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3730 Akim Demaille.
3731
3732 * data/bison.glr: Change name to glr.c
3733 * data/glr.c: Renamed from bison.glr.
3734 * data/Makefile.am: Add glr.c
3735
3736 * src/getargs.c:
3737
3738 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3739 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3740
3741 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3742
3743 * data/bison.glr: Be sure to restore the
3744 current #line when returning to the skeleton contents after having
3745 exposed the input file's #line.
3746
3747 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3748
3749 * data/bison.glr: Bring up to date with changes to bison.simple.
3750
3751 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3752
3753 * data/bison.glr: Correct definitions that use b4_prefix.
3754 Various reformatting.
3755 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3756 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3757 yytokenp argument; now part of stack.
3758 (yychar): Define to behave as documented.
3759 (yyclearin): Ditto.
3760
3761 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3762
3763 * src/reader.h: Add declaration for free_merger_functions.
3764
3765 * src/reader.c (merge_functions): New variable.
3766 (get_merge_function): New function.
3767 (free_merger_functions): New function.
3768 (readgram): Check for %prec that is not followed by a symbol.
3769 Handle %dprec and %merge declarations.
3770 (packgram): Initialize dprec and merger fields in rules array.
3771
3772 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3773 conflict_list_cnt, conflict_list_free): New variables.
3774 (table_grow): Also grow conflict_table.
3775 (prepare_rules): Output dprec and merger tables.
3776 (conflict_row): New function.
3777 (action_row): Output conflict lists for GLR parser. Don't use
3778 default reduction in conflicted states for GLR parser so that there
3779 are spaces for the conflict lists.
3780 (save_row): Also save conflict information.
3781 (token_actions): Allocate conflict list.
3782 (merger_output): New function.
3783 (pack_vector): Pack conflict table, too.
3784 (output_conflicts): New function to output yyconflp and yyconfl.
3785 (output_check): Allocate conflict_tos.
3786 (output_actions): Output conflict tables, also.
3787 (output_skeleton): Output b4_mergers definition.
3788 (prepare): Output b4_max_rhs_length definition.
3789 Use 'bison.glr' as default skeleton for GLR parsers.
3790
3791 * src/gram.c (glr_parser): New flag.
3792 (grammar_free): Call free_merger_functions.
3793
3794 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3795 all pairs of conflicting reductions, rather than just all tokens
3796 causing conflicts. Needed to size conflict tables.
3797 (conflicts_output): Modify call to count_rr_conflicts for new
3798 interface.
3799 (conflicts_print): Ditto.
3800 (count_total_conflicts): New function.
3801
3802 * src/reader.h (merger_list): New type.
3803 (merge_functions): New variable.
3804
3805 * src/lex.h (tok_dprec, tok_merge): New token types.
3806
3807 * src/gram.h (rule_s): Add dprec and merger fields.
3808 (glr_parser): New flag.
3809
3810 * src/conflicts.h (count_total_conflicts): New function.
3811
3812 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3813
3814 * doc/bison.texinfo (Generalized LR Parsing): New section.
3815 (GLR Parsers): New section.
3816 (Language and Grammar): Mention GLR parsing.
3817 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3818 Correct typo ("tge" -> "the").
3819
3820 * data/bison.glr: New skeleton for GLR parsing.
3821
3822 * tests/cxx-gram.at: New tests for GLR parsing.
3823
3824 * tests/testsuite.at: Include cxx-gram.at.
3825
3826 * tests/Makefile.am: Add cxx-gram.at.
3827
3828 * src/parse-gram.y:
3829
3830 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3831
3832 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3833
38342002-06-27 Akim Demaille <akim@epita.fr>
3835
3836 * src/options.h, src/options.c: Remove.
3837 * src/getargs.c (short_options, long_options): New.
3838
38392002-06-27 Akim Demaille <akim@epita.fr>
3840
3841 * data/bison.simple, data/bison.c++: Rename as...
3842 * data/yacc.c, data/lalr1.cc: these.
3843 * doc/bison.texinfo (Environment Variables): Remove.
3844
38452002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3846
3847 * src/getargs.c (report_argmatch): Initialize strtok().
3848
38492002-06-20 Akim Demaille <akim@epita.fr>
3850
3851 * data/bison.simple (b4_symbol_actions): New, replaces...
3852 (b4_symbol_destructor, b4_symbol_printer): these.
3853 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3854 user token numbers.
3855
38562002-06-20 Akim Demaille <akim@epita.fr>
3857
3858 * data/bison.simple (yydestructor): Rename as...
3859 (yydestruct): this.
3860
38612002-06-20 Akim Demaille <akim@epita.fr>
3862
3863 * src/symtab.h, src/symtab.c (symbol_type_set)
3864 (symbol_destructor_set, symbol_precedence_set): The location is
3865 the last argument.
3866 Adjust all callers.
3867
38682002-06-20 Akim Demaille <akim@epita.fr>
3869
3870 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3871 internals.
3872 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3873 Takes a location.
3874 * src/symtab.h, src/symtab.c (symbol_class_set)
3875 (symbol_user_token_number_set): Likewise.
3876 Adjust all callers.
3877 Promote complain_at.
3878 * tests/input.at (Type Clashes): Adjust.
3879
38802002-06-20 Akim Demaille <akim@epita.fr>
3881
3882 * data/bison.simple (YYLEX): Fix the declaration when
3883 %pure-parser.
3884
38852002-06-20 Akim Demaille <akim@epita.fr>
3886
3887 * data/bison.simple (yysymprint): Don't print the token number,
3888 just its name.
3889 * tests/actions.at (Destructors): Rename as...
3890 (Printers and Destructors): this.
3891 Also exercise %printer.
3892
38932002-06-20 Akim Demaille <akim@epita.fr>
3894
3895 * data/bison.simple (YYDSYMPRINT): New.
3896 Use it to remove many of the #if YYDEBUG/if (yydebug).
3897
38982002-06-20 Akim Demaille <akim@epita.fr>
3899
3900 * src/symtab.h, src/symtab.c (symbol_t): printer and
3901 printer_location are new members.
3902 (symbol_printer_set): New.
3903 * src/parse-gram.y (PERCENT_PRINTER): New token.
3904 Handle its associated rule.
3905 * src/scan-gram.l: Adjust.
3906 (handle_destructor_at, handle_destructor_dollar): Rename as...
3907 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3908 * src/output.c (symbol_printers_output): New.
3909 (output_skeleton): Call it.
3910 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3911 since there are already many grammar files with a user `yyprint'.
3912 Replace the calls to YYPRINT to calls to yysymprint.
3913 * tests/calc.at: Adjust.
3914 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3915 taking advantage of parser very internal details (stack size!).
3916
39172002-06-20 Akim Demaille <akim@epita.fr>
3918
3919 * src/scan-gram.l: Complete the scanner with the missing patterns
3920 to pacify Flex.
3921 Use `quote' and `symbol_tag_get' where appropriate.
3922
39232002-06-19 Akim Demaille <akim@epita.fr>
3924
3925 * tests/actions.at (Destructors): Augment to test locations.
3926 * data/bison.simple (yydestructor): Pass it the current location
3927 if locations are enabled.
3928 Prototype only when __STDC__ or C++.
3929 Change the argument names to move into the yy name space: there is
3930 user code here.
3931
39322002-06-19 Akim Demaille <akim@epita.fr>
3933
3934 * data/bison.simple (b4_pure_if): New.
3935 Use it instead of #ifdef YYPURE.
3936
39372002-06-19 Akim Demaille <akim@epita.fr>
3938
3939 * data/bison.simple (b4_location_if): New.
3940 Use it instead of #ifdef YYLSP_NEEDED.
3941
39422002-06-19 Akim Demaille <akim@epita.fr>
3943
3944 Prepare @$ in %destructor, but currently don't bind it in the
3945 skeleton, as %location use is not cleaned up yet.
3946
3947 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3948 (handle_action_at): New.
3949 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3950 a braced_code_t and a location as additional arguments.
3951 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3952 unquote one when outputting `b4_dollar_dollar'.
3953 Adjust callers.
3954 * data/bison.simple (b4_eval): Remove.
3955 (b4_symbol_destructor): Adjust.
3956 * tests/input.at (Invalid @n): Adjust.
3957
39582002-06-19 Zack Weinberg <zack@codesourcery.com>
3959
3960 * doc/bison.texinfo: Document ability to have multiple
3961 prologue sections.
3962
39632002-06-18 Akim Demaille <akim@epita.fr>
3964
3965 * src/files.c (compute_base_names): When computing the output file
3966 names from the input file name, strip the directory part.
3967
39682002-06-18 Akim Demaille <akim@epita.fr>
3969
3970 * data/bison.simple.new: Comment changes.
3971 Reported by Andreas Schwab.
3972
39732002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3974
3975 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3976 there are no `label `yyoverflowlab' defined but not used' warnings
3977 when yyoverflow is defined.
3978
39792002-06-18 Akim Demaille <akim@epita.fr>
3980
3981 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3982 new member.
3983 (symbol_destructor_set): Adjust.
3984 * src/output.c (symbol_destructors_output): Output the destructor
3985 locations.
3986 Output the symbol name.
3987 * data/bison.simple (b4_symbol_destructor): Adjust.
3988
39892002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3990 and Akim Demaille <akim@epita.fr>
3991
3992 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3993 what's left on the stack when the error recovery hits EOF.
3994 * tests/actions.at (Destructors): Complete to exercise this case.
3995
39962002-06-17 Akim Demaille <akim@epita.fr>
3997
3998 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3999 arguments is really empty, not only equal to `[]'.
4000 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4001 member.
4002 (symbol_destructor_set): New.
4003 * src/output.c (symbol_destructors_output): New.
4004 * src/reader.h (brace_code_t, current_braced_code): New.
4005 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4006 (handle_dollar): Rename as...
4007 (handle_action_dollar): this.
4008 (handle_destructor_dollar): New.
4009 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4010 (grammar_declaration): Use it.
4011 * data/bison.simple (yystos): Is always defined.
4012 (yydestructor): New.
4013 * tests/actions.at (Destructors): New.
4014 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4015
40162002-06-17 Akim Demaille <akim@epita.fr>
4017
4018 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4019 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4020 rule_length only when needed.
4021 * src/output.c (actions_output, token_definitions_output): Output
4022 the full M4 block.
4023 * src/symtab.c: Don't access directly to the symbol tag, use
4024 symbol_tag_get.
4025 * src/parse-gram.y: Use symbol_list_free.
4026
40272002-06-17 Akim Demaille <akim@epita.fr>
4028
4029 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4030 (symbol_list_prepend, get_type_name): Move to...
4031 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4032 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4033 Adjust all callers.
4034 (symbol_list_free): New.
4035 * src/scan-gram.l (handle_dollar): Takes a location.
4036 * tests/input.at (Invalid $n): Adjust.
4037
40382002-06-17 Akim Demaille <akim@epita.fr>
4039
4040 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4041 (symbol_list_prepend): New.
4042 * src/parse-gram.y (%union): `list' is a new member.
4043 (symbols.1): New, replaces...
4044 (terms_to_prec.1, nterms_to_type.1): these.
4045 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4046 Take a location as additional argument.
4047 Adjust all callers.
4048
40492002-06-15 Akim Demaille <akim@epita.fr>
4050
4051 * src/parse-gram.y: Move %token in the declaration section so that
4052 we don't depend upon CVS Bison.
4053
40542002-06-15 Akim Demaille <akim@epita.fr>
4055
4056 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4057 * src/print.c (print_core): Use it.
4058
40592002-06-15 Akim Demaille <akim@epita.fr>
4060
4061 * src/conflicts.c (log_resolution): Accept the rule involved in
4062 the sr conflicts instead of the lookahead number that points to
4063 that rule.
4064 (flush_reduce): Accept the current lookahead vector as argument,
4065 instead of the index in LA.
4066 (resolve_sr_conflict): Accept the current number of lookahead
4067 bitset to consider for the STATE, instead of the index in LA.
4068 (set_conflicts): Adjust.
4069 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4070
40712002-06-15 Akim Demaille <akim@epita.fr>
4072
4073 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4074 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4075 Adjust all dependencies.
4076 * src/lalr.c (initialize_lookaheads): Split into...
4077 (states_lookaheads_count, states_lookaheads_initialize): these.
4078 (lalr): Adjust.
4079
40802002-06-15 Akim Demaille <akim@epita.fr>
4081
4082 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4083 out of...
4084 (grammar_rules_print): here.
4085 * src/reduce.c (reduce_output): Use it.
4086 * tests/reduce.at (Useless Rules, Reduced Automaton)
4087 (Underivable Rules): Adjust.
4088
40892002-06-15 Akim Demaille <akim@epita.fr>
4090
4091 Copy BYacc's nice way to report the grammar.
4092
4093 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4094 New.
4095 Don't print the rules' location, it is confusing and useless.
4096 (rule_print): Use grammar_rhs_print.
4097 * src/print.c (print_grammar): Use grammar_rules_print.
4098
40992002-06-15 Akim Demaille <akim@epita.fr>
4100
4101 Complete and rationalize `useless thing' warnings.
4102
4103 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4104 (symbol_tag_print): New.
4105 Use them everywhere in place of accessing directly the tag member.
4106 * src/gram.h, src/gram.c (rule_print): New.
4107 Use it where a rule used to be printed `by hand'.
4108 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4109 (reduce_grammar_tables): Report the useless rules.
4110 (reduce_print): Useless things are a warning, not an error.
4111 Report it as such.
4112 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4113 (Reduced Automaton, Underivable Rules): Adjust.
4114 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4115 * tests/conflicts.at (Unresolved SR Conflicts)
4116 (Solved SR Conflicts): Adjust.
4117
41182002-06-15 Akim Demaille <akim@epita.fr>
4119
4120 Let symbols have a location.
4121
4122 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4123 (getsym): Adjust.
4124 Adjust all callers.
4125 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4126 Use location_t, not int.
4127 * src/symtab.c (symbol_check_defined): Take advantage of the
4128 location.
4129 * tests/regression.at (Invalid inputs): Adjust.
4130
41312002-06-15 Akim Demaille <akim@epita.fr>
4132
4133 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4134 (input): Don't try to initialize yylloc here, do it in the
4135 scanner.
4136 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4137 * src/gram.h (rule_t): Change line and action_line into location
4138 and action_location, of location_t type.
4139 Adjust all dependencies.
4140 * src/location.h, src/location.c (empty_location): New.
4141 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4142 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4143 (grammar_current_rule_symbol_append)
4144 (grammar_current_rule_action_append): Expect a location as argument.
4145 * src/reader.c (grammar_midrule_action): Adjust to attach an
4146 action's location as dummy symbol location.
4147 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4148 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4149 the line numbers.
4150
41512002-06-14 Akim Demaille <akim@epita.fr>
4152
4153 Grammar declarations may be found in the grammar section.
4154
4155 * src/parse-gram.y (rules_or_grammar_declaration): New.
4156 (declarations): Each declaration may end with a semicolon, not
4157 just...
4158 (grammar_declaration): `"%union"'.
4159 (grammar): Branch to rules_or_grammar_declaration.
4160
41612002-06-14 Akim Demaille <akim@epita.fr>
4162
4163 * src/main.c (main): Invoke scanner_free.
4164
41652002-06-14 Akim Demaille <akim@epita.fr>
4166
4167 * src/output.c (m4_invoke): Extracted from...
4168 (output_skeleton): here.
4169 Free tempfile.
4170
41712002-06-14 Akim Demaille <akim@epita.fr>
4172
4173 * src/parse-gram.y (directives, directive, gram)
4174 (grammar_directives, precedence_directives, precedence_directive):
4175 Rename as...
4176 (declarations, declaration, grammar, grammar_declaration)
4177 (precedence_declaration, precedence_declarator): these.
4178 (symbol_declaration): New.
4179
41802002-06-14 Akim Demaille <akim@epita.fr>
4181
4182 * src/files.c (action_obstack): Remove, unused.
4183 (output_obstack): Remove it, and all its dependencies, as it is no
4184 longer needed.
4185 * src/reader.c (epilogue_set): Build the epilogue in the
4186 muscle_obstack.
4187 * src/output.h, src/output.c (muscle_obstack): Move to...
4188 * src/muscle_tab.h, src/muscle_tab.h: here.
4189 (muscle_init): Initialize muscle_obstack.
4190 (muscle_free): New.
4191 * src/main.c (main): Call it.
4192
41932002-06-14 Akim Demaille <akim@epita.fr>
4194
4195 * src/location.h: New, extracted from...
4196 * src/reader.h: here.
4197 * src/Makefile.am (noinst_HEADERS): Merge into
4198 (bison_SOURCES): this.
4199 Add location.h.
4200 * src/parse-gram.y: Use location_t instead of Bison's.
4201 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4202 Use location_t instead of ints.
4203
42042002-06-14 Akim Demaille <akim@epita.fr>
4205
4206 * data/bison.simple, data/bison.c++: Be sure to restore the
4207 current #line when returning to the skeleton contents after having
4208 exposed the input file's #line.
4209
42102002-06-12 Akim Demaille <akim@epita.fr>
4211
4212 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4213 eager.
4214 * tests/actions.at (Exotic Dollars): New.
4215
42162002-06-12 Akim Demaille <akim@epita.fr>
4217
4218 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4219 ['"/] too eagerly.
4220 * tests/input.at (Torturing the Scanner): New.
4221
42222002-06-11 Akim Demaille <akim@epita.fr>
4223
4224 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4225 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4226 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4227 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4228 * src/reader.c (reader): Use it.
4229
42302002-06-11 Akim Demaille <akim@epita.fr>
4231
4232 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4233 Adjust all callers.
4234 (scanner_last_string_free): New.
4235
42362002-06-11 Akim Demaille <akim@epita.fr>
4237
4238 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4239 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4240 (last_string, YY_OBS_FREE): New.
4241 Use them when returning an ID.
4242
42432002-06-11 Akim Demaille <akim@epita.fr>
4244
4245 Have Bison grammars parsed by a Bison grammar.
4246
4247 * src/reader.c, src/reader.h (prologue_augment): New.
4248 * src/reader.c (copy_definition): Remove.
4249
4250 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4251 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4252 (grammar_current_rule_prec_set, grammar_current_rule_check)
4253 (grammar_current_rule_symbol_append)
4254 (grammar_current_rule_action_append): Export.
4255 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4256 (symbol_list_action_append): Remove.
4257 Hook the routines from reader.
4258 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4259 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4260
4261 * src/reader.c (read_declarations): Remove, unused.
4262
4263 * src/parse-gram.y: Handle the epilogue.
4264 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4265 (grammar_start_symbol_set): this.
4266 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4267 * src/reader.c (readgram): Remove, unused.
4268 (reader): Adjust to insert eoftoken and axiom where appropriate.
4269
4270 * src/reader.c (copy_dollar): Replace with...
4271 * src/scan-gram.h (handle_dollar): this.
4272 * src/parse-gram.y: Remove `%thong'.
4273
4274 * src/reader.c (copy_at): Replace with...
4275 * src/scan-gram.h (handle_at): this.
4276
4277 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4278 New.
4279
4280 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4281 time being.
4282
4283 * src/reader.h, src/reader.c (grammar_rule_end): New.
4284
4285 * src/parse.y (current_type, current_class): New.
4286 Implement `%nterm', `%token' support.
4287 Merge `%term' into `%token'.
4288 (string_as_id): New.
4289 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4290 type name.
4291
4292 * src/parse-gram.y: Be sure to handle properly the beginning of
4293 rules.
4294
4295 * src/parse-gram.y: Handle %type.
4296 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4297
4298 * src/parse-gram.y: More directives support.
4299 * src/options.c: No longer handle source directives.
4300
4301 * src/parse-gram.y: Fix %output.
4302
4303 * src/parse-gram.y: Handle %union.
4304 Use the prologue locations.
4305 * src/reader.c (parse_union_decl): Remove.
4306
4307 * src/reader.h, src/reader.c (epilogue_set): New.
4308 * src/parse-gram.y: Use it.
4309
4310 * data/bison.simple, data/bison.c++: b4_stype is now either not
4311 defined, then default to int, or to the contents of %union,
4312 without `union' itself.
4313 Adjust.
4314 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4315
4316 * src/output.c (actions_output): Don't output braces, as they are
4317 already handled by the scanner.
4318
4319 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4320 characters to themselves.
4321
4322 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4323 that the epilogue has a proper #line.
4324
4325 * src/parse-gram.y: Handle precedence/associativity.
4326
4327 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4328 a terminal.
4329 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4330 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4331 at all to define terminals that cannot be emitted.
4332
4333 * src/scan-gram.l: Escape M4 characters.
4334
4335 * src/scan-gram.l: Working properly with escapes in user
4336 strings/characters.
4337
4338 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4339 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4340 grammar.
4341 Use more modest sizes, as for the time being the parser does not
4342 release memory, and therefore the process swallows a huge amount
4343 of memory.
4344
4345 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4346 stricter %token grammar.
4347
4348 * src/symtab.h (associativity): Add `undef_assoc'.
4349 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4350 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4351
4352 * tests/regression.at (Invalid %directive): Remove, as it is now
4353 meaningless.
4354 (Invalid inputs): Adjust to the new error messages.
4355 (Token definitions): The new grammar doesn't allow too many
4356 eccentricities.
4357
4358 * src/lex.h, src/lex.c: Remove.
4359 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4360 (copy_character, copy_string2, copy_string, copy_identifier)
4361 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4362 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4363 (parse_action): Remove.
4364 * po/POTFILES.in: Adjust.
4365
43662002-06-11 Akim Demaille <akim@epita.fr>
4367
4368 * src/reader.c (parse_action): Don't store directly into the
4369 rule's action member: return the action as a string.
4370 Don't require `rule_length' as an argument: compute it.
4371 (grammar_current_rule_symbol_append)
4372 (grammar_current_rule_action_append): New, eved out from
4373 (readgram): here.
4374 Remove `action_flag', `rulelength', unused now.
4375
43762002-06-11 Akim Demaille <akim@epita.fr>
4377
4378 * src/reader.c (grammar_current_rule_prec_set).
4379 (grammar_current_rule_check): New, eved out from...
4380 (readgram): here.
4381 Remove `xaction', `first_rhs': useless.
4382 * tests/input.at (Type clashes): New.
4383 * tests/existing.at (GNU Cim Grammar): Adjust.
4384
43852002-06-11 Akim Demaille <akim@epita.fr>
4386
4387 * src/reader.c (grammar_midrule_action): New, Eved out from
4388 (readgram): here.
4389
43902002-06-11 Akim Demaille <akim@epita.fr>
4391
4392 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4393 New.
4394 (readgram): Use them as replacement of inlined code, crule and
4395 crule1.
4396
43972002-06-11 Akim Demaille <akim@epita.fr>
4398
4399 * src/reader.c (grammar_end, grammar_symbol_append): New.
4400 (readgram): Use them.
4401 Make the use of `p' as local as possible.
4402
44032002-06-10 Akim Demaille <akim@epita.fr>
4404
4405 GCJ's parser requires the tokens to be defined before the prologue.
4406
4407 * data/bison.simple: Output the token definition before the user's
4408 prologue.
4409 * tests/regression.at (Braces parsing, Duplicate string)
4410 (Mixing %token styles): Check the output from bison.
4411 (Early token definitions): New.
4412
44132002-06-10 Akim Demaille <akim@epita.fr>
4414
4415 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4416 assigning twice the same user number to a token, so that we can
4417 use it in...
4418 * src/lex.c (lex): here.
4419 Also use `symbol_class_set' instead of hand written code.
4420 * src/reader.c (parse_assoc_decl): Likewise.
4421
44222002-06-10 Akim Demaille <akim@epita.fr>
4423
4424 * src/symtab.c, src/symtab.c (symbol_class_set)
4425 (symbol_user_token_number_set): New.
4426 * src/reader.c (parse_token_decl): Use them.
4427 Use a switch instead of ifs.
4428 Use a single argument.
4429
44302002-06-10 Akim Demaille <akim@epita.fr>
4431
4432 Remove `%thong' support as it is undocumented, unused, duplicates
4433 `%token's job, and creates useless e-mail traffic with people who
4434 want to know what it is, why it is undocumented, unused, and
4435 duplicates `%token's job.
4436
4437 * src/reader.c (parse_thong_decl): Remove.
4438 * src/options.c (option_table): Remove "thong".
4439 * src/lex.h (tok_thong): Remove.
4440
44412002-06-10 Akim Demaille <akim@epita.fr>
4442
4443 * src/symtab.c, src/symtab.c (symbol_type_set)
4444 (symbol_precedence_set): New.
4445 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4446 (value_components_used): Remove, unused.
4447
44482002-06-09 Akim Demaille <akim@epita.fr>
4449
4450 Move symbols handling code out of the reader.
4451
4452 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4453 (axiom): Move to...
4454 * src/symtab.h, src/symtab.c: here.
4455
4456 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4457 * src/reader.c (startval): Rename as...
4458 * src/symtab.h, src/symtab.c (startsymbol): this.
4459 * src/reader.c: Adjust.
4460
4461 * src/reader.c (symbol_check_defined, symbol_make_alias)
4462 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4463 (token_translations_init)
4464 Move to...
4465 * src/symtab.c: here.
4466 * src/reader.c (packsymbols): Move to...
4467 * src/symtab.h, src/symtab.c (symbols_pack): here.
4468 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4469 argument.
4470
44712002-06-03 Akim Demaille <akim@epita.fr>
4472
4473 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4474 then statements.
4475
44762002-06-03 Akim Demaille <akim@epita.fr>
4477
4478 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4479 structs with non literals.
4480 * src/scan-skel.l: never-interactive.
4481 * src/conflicts.c (enum conflict_resolution_e): No trailing
4482 comma.
4483 * src/getargs.c (usage): Split long literal strings.
4484 Reported by Hans Aberg.
4485
44862002-05-28 Akim Demaille <akim@epita.fr>
4487
4488 * data/bison.c++: Use C++ ostreams.
4489 (cdebug_): New member.
4490
44912002-05-28 Akim Demaille <akim@epita.fr>
4492
4493 * src/output.c (output_skeleton): Be sure to allocate enough room
4494 for `/' _and_ for `\0' in full_skeleton.
4495
44962002-05-28 Akim Demaille <akim@epita.fr>
4497
4498 * data/bison.c++: Catch up with bison.simple:
4499 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4500 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4501 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4502 and popping traces.
4503
45042002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4505
4506 * src/output.c (output_skeleton): Put an explicit path in front of
4507 the skeleton file name, rather than relying on the -I directory,
4508 to partially alleviate effects of having a skeleton file lying around
4509 in the current directory.
4510
45112002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4512
4513 * src/conflicts.c (log_resolution): Correct typo:
4514 obstack_printf should be obstack_fgrow1.
4515
45162002-05-26 Akim Demaille <akim@epita.fr>
4517
4518 * src/state.h (state_t): `solved_conflicts' is a new member.
4519 * src/LR0.c (new_state): Set it to 0.
4520 * src/conflicts.h, src/conflicts.c (print_conflicts)
4521 (free_conflicts, solve_conflicts): Rename as...
4522 (conflicts_print, conflicts_free, conflicts_solve): these.
4523 Adjust callers.
4524 * src/conflicts.c (enum conflict_resolution_e)
4525 (solved_conflicts_obstack): New, used by...
4526 (log_resolution): this.
4527 Adjust to attach the conflict resolution to each state.
4528 Complete the description with the precedence/associativity
4529 information.
4530 (resolve_sr_conflict): Adjust.
4531 * src/print.c (print_state): Output its solved_conflicts.
4532 * tests/conflicts.at (Unresolved SR Conflicts)
4533 (Solved SR Conflicts): Exercise --report=all.
4534
45352002-05-26 Akim Demaille <akim@epita.fr>
4536
4537 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4538 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4539 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4540 (token_number_t, item_number_as_token_number)
4541 (token_number_as_item_number, muscle_insert_token_number_table):
4542 Rename as...
4543 (symbol_number_t, item_number_as_symbol_number)
4544 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4545 these, since it is more appropriate.
4546
45472002-05-26 Akim Demaille <akim@epita.fr>
4548
4549 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4550 `Error:' lines.
4551 * data/bison.simple (yystos) [YYDEBUG]: New.
4552 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4553 error recovery.
4554 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4555
45562002-05-25 Akim Demaille <akim@epita.fr>
4557
4558 * doc/bison.texinfo (Debugging): Split into...
4559 (Tracing): this new section, its former contents, and...
4560 (Understanding): this new section.
4561 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4562 by...
4563 (report_flag): this.
4564 Adjust all dependencies.
4565 (report_args, report_types, report_argmatch): New.
4566 (usage, getargs): Report/support -r, --report.
4567 * src/options.h
4568 (struct option_table_struct): Rename as..,
4569 (struct option_table_s): this.
4570 Rename the `set_flag' member to `flag' to match with getopt_long's
4571 struct.
4572 * src/options.c (option_table): Split verbose into an entry for
4573 %verbose, and another for --verbose.
4574 Support --report/-r, so remove -r from the obsolete --raw.
4575 * src/print.c: Attach full item sets and lookaheads reports to
4576 report_flag instead of trace_flag.
4577 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4578
45792002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4580 and Paul Eggert <eggert@twinsun.com>
4581
4582 * data/bison.simple (yyparse): Correct error handling to conform to
4583 POSIX and yacc. Specifically, after syntax error is discovered,
4584 do not reduce further before shifting the error token.
4585 Clean up the code a bit by removing the labels yyerrdefault,
4586 yyerrhandle, yyerrpop.
4587 * NEWS: Document the above.
4588
45892002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4590
4591 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4592 type; it isn't always big enough, since it doesn't necessarily
4593 include non-terminals.
4594 (yytranslate): Expand definition of yy_token_number_type, so that
4595 the latter can be removed.
4596 (yy_token_number_type): Remove, only one use.
4597 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4598 don't use TokenNumberType as element type.
4599
4600 * tests/regression.at: Modify expected output to agree with change
4601 to yyr1 and yytranslate.
4602
46032002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4604
4605 * src/reader.c (parse_action): Use copy_character instead of
4606 obstack_1grow.
4607
46082002-05-13 Akim Demaille <akim@epita.fr>
4609
4610 * tests/regression.at (Token definitions): Prototype yylex and
4611 yyerror.
4612
46132002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4614
4615 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4616 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4617 32-bit arithmetic.
4618 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4619
46202002-05-07 Akim Demaille <akim@epita.fr>
4621
4622 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4623 avoid GCC warnings.
4624
46252002-05-07 Akim Demaille <akim@epita.fr>
4626
4627 Kill GCC warnings.
4628
4629 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4630 over the RHS of each rule.
4631 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4632 * src/state.h (state_t): Member `nitems' is unsigned short.
4633 * src/LR0.c (get_state): Adjust.
4634 * src/reader.c (packgram): Likewise.
4635 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4636 `Type'.
4637 (muscle_insert_int_table): Remove, unused.
4638 (prepare_rules): Remove `max'.
4639
46402002-05-06 Akim Demaille <akim@epita.fr>
4641
4642 * src/closure.c (print_firsts): Display of the symbol tags.
4643 (bitmatrix_print): Move to...
4644 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4645 here.
4646 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4647
46482002-05-06 Akim Demaille <akim@epita.fr>
4649
4650 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4651 hash_do_for_each.
4652
46532002-05-06 Akim Demaille <akim@epita.fr>
4654
4655 * src/LR0.c (new_state, get_state): Instead of using the global
4656 `kernel_size' and `kernel_base', have two new arguments:
4657 `core_size' and `core'.
4658 Adjust callers.
4659
46602002-05-06 Akim Demaille <akim@epita.fr>
4661
4662 * src/reader.c (packgram): No longer end `ritem' with a 0
4663 sentinel: it is not used.
4664
46652002-05-05 Akim Demaille <akim@epita.fr>
4666
4667 New experimental feature: display the lookaheads in the report and
4668 graph.
4669
4670 * src/print (print_core): When --trace-flag, display the rules
4671 lookaheads.
4672 * src/print_graph.c (print_core): Likewise.
4673 Swap the arguments.
4674 Adjust caller.
4675
46762002-05-05 Akim Demaille <akim@epita.fr>
4677
4678 * tests/torture.at (Many lookaheads): New test.
4679
46802002-05-05 Akim Demaille <akim@epita.fr>
4681
4682 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4683 (GENERATE_MUSCLE_INSERT_TABLE): this.
4684 (output_int_table, output_unsigned_int_table, output_short_table)
4685 (output_token_number_table, output_item_number_table): Replace with...
4686 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4687 (muscle_insert_short_table, muscle_insert_token_number_table)
4688 (muscle_insert_item_number_table): these.
4689 Adjust all callers.
4690 (prepare_tokens): Don't free `translations', since...
4691 * src/reader.h, src/reader.c (grammar_free): do it.
4692 Move to...
4693 * src/gram.h, src/gram.c (grammar_free): here.
4694 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4695 b4_translate_max.
4696
46972002-05-05 Akim Demaille <akim@epita.fr>
4698
4699 * src/output.c (output_unsigned_int_table): New.
4700 (prepare_rules): `i' is unsigned.
4701 `prhs', `rline', `r2' are unsigned int.
4702 Rename muscle `rhs_number_max' as `rhs_max'.
4703 Output muscles `prhs_max', `rline_max', and `r2_max'.
4704 Free rline and r1.
4705 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4706 to compute types instead of constant types.
4707 * tests/regression.at (Web2c Actions): Adjust.
4708
47092002-05-04 Akim Demaille <akim@epita.fr>
4710
4711 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4712 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4713 Adjust dependencies.
4714 * src/output.c (token_definitions_output): Be sure not to output a
4715 `#define 'a'' when fed with `%token 'a' "a"'.
4716 * tests/regression.at (Token definitions): New.
4717
47182002-05-03 Paul Eggert <eggert@twinsun.com>
4719
4720 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4721 for K&R C.
4722
47232002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4724
4725 * Makefile.am (SUBDIRS): Remove intl.
4726 (EXTRA_DIST): Add config/config.rpath.
4727
47282002-05-03 Akim Demaille <akim@epita.fr>
4729
4730 * data/bison.simple (m4_if): Don't output empty enums.
4731 And actually, output valid enum definitions :(.
4732
47332002-05-03 Akim Demaille <akim@epita.fr>
4734
4735 * configure.bat: Remove, completely obsolete.
4736 * Makefile.am (EXTRA_DIST): Adjust.
4737 Don't distribute config.rpath...
4738 * config/Makefile.am (EXTRA_DIST): Do it.
4739
47402002-05-03 Akim Demaille <akim@epita.fr>
4741
4742 * configure.in (GETTEXT_VERSION): New.
4743 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4744
47452002-05-03 Akim Demaille <akim@epita.fr>
4746
4747 * data/bison.simple (b4_token_enum): New.
4748 (b4_token_defines): Use it to output tokens both as #define and
4749 enums.
4750 Suggested by Paul Eggert.
4751 * src/output.c (token_definitions_output): Don't output spurious
4752 white spaces.
4753
47542002-05-03 Akim Demaille <akim@epita.fr>
4755
4756 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4757
47582002-05-02 Robert Anisko <robert@lrde.epita.fr>
4759
4760 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4761 Update the stack class, give a try to deque as the default container.
4762
47632002-05-02 Akim Demaille <akim@epita.fr>
4764
4765 * data/bison.simple (yyparse): Do not implement @$ = @1.
4766 (YYLLOC_DEFAULT): Adjust to do it.
4767 * doc/bison.texinfo (Location Default Action): Fix.
4768
47692002-05-02 Akim Demaille <akim@epita.fr>
4770
4771 * src/reader.c (parse_braces): Merge into...
4772 (parse_action): this.
4773
47742002-05-02 Akim Demaille <akim@epita.fr>
4775
4776 * configure.in (ALL_LINGUAS): Remove.
4777 * po/LINGUAS, hr.po: New.
4778
47792002-05-02 Akim Demaille <akim@epita.fr>
4780
4781 Remove the so called hairy (semantic) parsers.
4782
4783 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4784 * src/gram.h, src/gram.c (semantic_parser): Remove.
4785 (rule_t): Remove the guard and guard_line members.
4786 * src/lex.h (token_t): remove tok_guard.
4787 * src/options.c (option_table): Remove %guard and %semantic_parser
4788 support.
4789 * src/output.c, src/output.h (guards_output): Remove.
4790 (prepare): Adjust.
4791 (token_definitions_output): Don't output the `T'
4792 tokens (???).
4793 (output_skeleton): Don't output the guards.
4794 * src/files.c, src/files.c (attrsfile): Remove.
4795 * src/reader.c (symbol_list): Remove the guard and guard_line
4796 members.
4797 Adjust dependencies.
4798 (parse_guard): Remove.
4799 * data/bison.hairy: Remove.
4800 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4801 BISON_HAIRY.
4802
48032002-05-02 Akim Demaille <akim@epita.fr>
4804
4805 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4806 (parse_guard): Rename the formal argument `stack_offset' as
4807 `rule_length', which is more readable.
4808 Adjust callers.
4809 (copy_at, copy_dollar): Instead of outputting the hard coded
4810 values of $$, $n and so forth, output invocation to b4_lhs_value,
4811 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4812 Note: this patch partially drops `semantic-parser' support: it
4813 always does `rule_length - n', where semantic parsers ought to
4814 always use `-n'.
4815 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4816 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4817
48182002-05-02 Akim Demaille <akim@epita.fr>
4819
4820 * configure.in (AC_INIT): Bump to 1.49b.
4821 (AM_INIT_AUTOMAKE): Short invocation.
4822
48232002-05-02 Akim Demaille <akim@epita.fr>
4824
4825 Version 1.49a.
4826
48272002-05-01 Akim Demaille <akim@epita.fr>
4828
4829 * src/skeleton.h: Remove.
4830
48312002-05-01 Akim Demaille <akim@epita.fr>
4832
4833 * src/skeleton.h: Fix the #endif.
4834 Reported by Magnus Fromreide.
4835
48362002-04-26 Paul Eggert <eggert@twinsun.com>
4837
4838 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4839 Define if we define YYSTYPE and YYLTYPE, respectively.
4840 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4841
48422002-04-25 Robert Anisko <robert@lrde.epita.fr>
4843
4844 * src/scan-skel.l: Postprocess quadrigraphs.
4845
4846 * src/reader.c (copy_character): New function, used to output
4847 single characters while replacing `[' and `]' with quadrigraphs, to
4848 avoid troubles with M4 quotes.
4849 (copy_comment): Output characters with copy_character.
4850 (read_additionnal_code): Likewise.
4851 (copy_string2): Likewise.
4852 (copy_definition): Likewise.
4853
4854 * tests/calc.at: Exercise M4 quoting.
4855
48562002-04-25 Akim Demaille <akim@epita.fr>
4857
4858 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4859 between `!' and the command.
4860 Reported by Paul Eggert.
4861
48622002-04-24 Robert Anisko <robert@lrde.epita.fr>
4863
4864 * tests/calc.at: Exercise prologue splitting.
4865
4866 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4867 `b4_post_prologue' instead of `b4_prologue'.
4868
4869 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4870 muscles.
4871 (output): Free pre_prologue_obstack and post_prologue_obstack.
4872 * src/files.h, src/files.c (attrs_obstack): Remove.
4873 (pre_prologue_obstack, post_prologue_obstack): New.
4874 * src/reader.c (copy_definition): Add a parameter to specify the
4875 obstack to fill, instead of using attrs_obstack unconditionally.
4876 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4877 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4878
48792002-04-23 Paul Eggert <eggert@twinsun.com>
4880
4881 * data/bison.simple: Remove unnecessary commentary and white
4882 space differences from 1_29-branch.
4883 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4884
4885 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4886 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4887 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4888 constructors or destructors.
4889
4890 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4891
48922002-04-23 Akim Demaille <akim@epita.fr>
4893
4894 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4895 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4896 location with columns.
4897 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4898 All reported by Paul Eggert.
4899
49002002-04-22 Akim Demaille <akim@epita.fr>
4901
4902 * src/reduce.c (dump_grammar): Move to...
4903 * src/gram.h, src/gram.c (grammar_dump): here.
4904 Be sure to separate long item numbers.
4905 Don't read the members of a rule's prec if its nil.
4906
49072002-04-22 Akim Demaille <akim@epita.fr>
4908
4909 * src/output.c (table_size, table_grow): New.
4910 (MAXTABLE): Remove, replace uses with table_size.
4911 (pack_vector): Instead of dying when the table is too big, grow it.
4912
49132002-04-22 Akim Demaille <akim@epita.fr>
4914
4915 * data/bison.simple (yyr1): Its type is that of a token number.
4916 * data/bison.c++ (r1_): Likewise.
4917 * tests/regression.at (Web2c Actions): Adjust.
4918
49192002-04-22 Akim Demaille <akim@epita.fr>
4920
4921 * src/reader.c (token_translations_init): 256 is now the default
4922 value for the error token, i.e., it will be assigned another
4923 number if the user assigned 256 to one of her tokens.
4924 (reader): Don't force 256 to error.
4925 * doc/bison.texinfo (Symbols): Adjust.
4926 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4927 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4928 etc. instead of 10, 20, 30 (which was used to `jump' over error
4929 (256) and undefined (2)).
4930
49312002-04-22 Akim Demaille <akim@epita.fr>
4932
4933 Propagate more token_number_t.
4934
4935 * src/gram.h (token_number_as_item_number)
4936 (item_number_as_token_number): New.
4937 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4938 Use it to create output_item_number_table and
4939 output_token_number_table.
4940 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4941 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4942 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4943 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4944
49452002-04-22 Akim Demaille <akim@epita.fr>
4946
4947 * src/output.h, src/output.c (get_lines_number): Remove.
4948
49492002-04-19 Akim Demaille <akim@epita.fr>
4950
4951 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4952 as Lex/Flex'.
4953 (Debugging): More details about enabling the debugging features.
4954 (Table of Symbols): Describe $$, $n, @$, and @n.
4955 Suggested by Tim Josling.
4956
49572002-04-19 Akim Demaille <akim@epita.fr>
4958
4959 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4960
49612002-04-10 Akim Demaille <akim@epita.fr>
4962
4963 * src/system.h: Rely on HAVE_LIMITS_H.
4964 Suggested by Paul Eggert.
4965
49662002-04-09 Akim Demaille <akim@epita.fr>
4967
4968 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4969 full stderr, and strip it according to the bison options, instead
4970 of composing the error message from different bits.
4971 This makes it easier to check for several error messages.
4972 Adjust all the invocations.
4973 Add an invocation exercising the error token.
4974 Add an invocation demonstrating a stupid error message.
4975 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4976 Adjust the tests.
4977 Error message are for stderr, not stdout.
4978
49792002-04-09 Akim Demaille <akim@epita.fr>
4980
4981 * src/gram.h, src/gram.c (error_token_number): Remove, use
4982 errtoken->number.
4983 * src/reader.c (reader): Don't specify the user token number (2)
4984 for $undefined, as it uselessly prevents using it.
4985 * src/gram.h (token_number_t): Move to...
4986 * src/symtab.h: here.
4987 (state_t.number): Is a token_number_t.
4988 * src/print.c, src/reader.c: Use undeftoken->number instead of
4989 hard coded 2.
4990 (Even though this 2 is not the same as above: the number of the
4991 undeftoken remains being 2, it is its user token number which
4992 might not be 2).
4993 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4994 `user_token_number_max'.
4995 Output `undef_token_number'.
4996 * data/bison.simple, data/bison.c++: Use them.
4997 Be sure to map invalid yylex return values to
4998 `undef_token_number'. This saves us from gratuitous SEGV.
4999
5000 * tests/conflicts.at (Solved SR Conflicts)
5001 (Unresolved SR Conflicts): Adjust.
5002 * tests/regression.at (Web2c Actions): Adjust.
5003
50042002-04-08 Akim Demaille <akim@epita.fr>
5005
5006 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5007 Adding #line.
5008 Remove the duplicate `typedefs'.
5009 (RhsNumberType): Fix the declaration and various other typos.
5010 Use __ofile__.
5011 * data/bison.simple: Use __ofile__.
5012 * src/scan-skel.l: Handle __ofile__.
5013
50142002-04-08 Akim Demaille <akim@epita.fr>
5015
5016 * src/gram.h (item_number_t): New, the type of item numbers in
5017 RITEM. Note that it must be able to code symbol numbers as
5018 positive number, and the negation of rule numbers as negative
5019 numbers.
5020 Adjust all dependencies (pretty many).
5021 * src/reduce.c (rule): Remove this `short *' pointer: use
5022 item_number_t.
5023 * src/system.h (MINSHORT, MAXSHORT): Remove.
5024 Include `limits.h'.
5025 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5026 (shortcpy): Remove.
5027 (MAXTABLE): Move to...
5028 * src/output.c (MAXTABLE): here.
5029 (prepare_rules): Use output_int_table to output rhs.
5030 * data/bison.simple, data/bison.c++: Adjust.
5031 * tests/torture.at (Big triangle): Move the limit from 254 to
5032 500.
5033 * tests/regression.at (Web2c Actions): Ajust.
5034
5035 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5036 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5037 passes, but produces negative #line number, once fixed, GCC is
5038 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5039 C), it passes.
5040 * src/state.h (state_h): Code input lines on ints, not shorts.
5041
50422002-04-08 Akim Demaille <akim@epita.fr>
5043
5044 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5045 and then the grammar.
5046
50472002-04-08 Akim Demaille <akim@epita.fr>
5048
5049 * src/system.h: No longer using strndup.
5050
50512002-04-07 Akim Demaille <akim@epita.fr>
5052
5053 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5054 * src/output.c (output_table_data): Return the longest number.
5055 (prepare_tokens): Output `token_number_max').
5056 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5057 New.
5058 Use them to define yy_token_number_type/TokenNumberType.
5059 Use this type for yytranslate.
5060 * tests/torture.at (Big triangle): Push the limit from 124 to
5061 253.
5062 * tests/regression.at (Web2c Actions): Adjust.
5063
50642002-04-07 Akim Demaille <akim@epita.fr>
5065
5066 * tests/torture.at (Big triangle): New.
5067 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5068 * tests/existing.at: here.
5069
50702002-04-07 Akim Demaille <akim@epita.fr>
5071
5072 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5073 nritems.
5074 Adjust dependencies.
5075
50762002-04-07 Akim Demaille <akim@epita.fr>
5077
5078 * src/reader.c: Normalize increments to prefix form.
5079
50802002-04-07 Akim Demaille <akim@epita.fr>
5081
5082 * src/reader.c, symtab.c: Remove debugging code.
5083
50842002-04-07 Akim Demaille <akim@epita.fr>
5085
5086 Rename all the `bucket's as `symbol_t'.
5087
5088 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5089 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5090 * src/symtab.c, src/symtab.h (bucket): Rename as...
5091 (symbol_t): this.
5092 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5093 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5094 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5095 (buckets_new, buckets_free, buckets_do): Rename as...
5096 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5097 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5098 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5099 (symbols_new, symbols_free, symbols_do): these.
5100
51012002-04-07 Akim Demaille <akim@epita.fr>
5102
5103 Use lib/hash for the symbol table.
5104
5105 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5106 EOF.
5107 * src/lex.c (lex): Set the `number' member of new terminals.
5108 * src/reader.c (bucket_check_defined, bucket_make_alias)
5109 (bucket_check_alias_consistence, bucket_translation): New.
5110 (reader, grammar_free, readgram, token_translations_init)
5111 (packsymbols): Adjust.
5112 (reader): Number the predefined tokens.
5113 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5114 for predefined tokens.
5115 * src/symtab.h (bucket): Remove all the hash table related
5116 members.
5117 * src/symtab.c (symtab): Replace by...
5118 (bucket_table): this.
5119 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5120 (buckets_new, buckets_do): New.
5121
51222002-04-07 Akim Demaille <akim@epita.fr>
5123
5124 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5125 (start_symbol, max_user_token_number, semantic_parser)
5126 (error_token_number): Initialize.
5127 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5128 Initialize.
5129 (reader): Don't.
5130 (errtoken, eoftoken, undeftoken, axiom): Extern.
5131
51322002-04-07 Akim Demaille <akim@epita.fr>
5133
5134 * src/gram.h (rule_s): prec and precsym are now pointers
5135 to the bucket giving the priority/associativity.
5136 Member `associativity' removed: useless.
5137 * src/reduce.c, src/conflicts.c: Adjust.
5138
51392002-04-07 Akim Demaille <akim@epita.fr>
5140
5141 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5142 Properly escape the symbols' TAG when outputting them.
5143
51442002-04-07 Akim Demaille <akim@epita.fr>
5145
5146 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5147
51482002-04-07 Akim Demaille <akim@epita.fr>
5149
5150 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5151 (LArule): this, which is an array to rule_t*.
5152 * src/print.c, src/conflicts.c: Adjust.
5153
51542002-04-07 Akim Demaille <akim@epita.fr>
5155
5156 * src/gram.h (rule_t): Rename `number' as `user_number'.
5157 `number' is a new member.
5158 Adjust dependencies.
5159 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5160
51612002-04-07 Akim Demaille <akim@epita.fr>
5162
5163 As a result of the previous patch, it is no longer needed
5164 to reorder ritem itself.
5165
5166 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5167
51682002-04-07 Akim Demaille <akim@epita.fr>
5169
5170 Be sure never to walk through RITEMS, but use only data related to
5171 the rules themselves. RITEMS should be banished.
5172
5173 * src/output.c (output_token_translations): Rename as...
5174 (prepare_tokens): this.
5175 In addition to `translate', prepare the muscles `tname' and
5176 `toknum', which were handled by...
5177 (output_rule_data): this.
5178 Remove, and move the remainder of its outputs into...
5179 (prepare_rules): this new routines, which also merges content from
5180 (output_gram): this.
5181 (prepare_rules): Be sure never to walk through RITEMS.
5182 (output_stos): Rename as...
5183 (prepare_stos): this.
5184 (output): Always invoke prepare_states, after all, just don't use it
5185 in the output if you don't need it.
5186
51872002-04-07 Akim Demaille <akim@epita.fr>
5188
5189 * src/LR0.c (new_state): Display `nstates' as the name of the
5190 newly created state.
5191 Adjust to initialize first_state and last_state if needed.
5192 Be sure to distinguish the initial from the final state.
5193 (new_states): Create the itemset of the initial state, and use
5194 new_state.
5195 * src/closure.c (closure): Now that the initial state has its
5196 items properly set, there is no need for a special case when
5197 creating `ruleset'.
5198
5199 As a result, now the rule 0, reducing to $axiom, is visible in the
5200 outputs. Adjust the test suite.
5201
5202 * tests/conflicts.at (Solved SR Conflicts)
5203 (Unresolved SR Conflicts): Adjust.
5204 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5205 * tests/conflicts.at (S/R in initial): New.
5206
52072002-04-07 Akim Demaille <akim@epita.fr>
5208
5209 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5210 the RHS of the rules.
5211 * src/output.c (output_gram): Likewise.
5212
52132002-04-07 Akim Demaille <akim@epita.fr>
5214
5215 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5216 bucket.
5217 Adjust all dependencies.
5218 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5219 `number' of the buckets too.
5220 * src/gram.h: Include `symtab.h'.
5221 (associativity): Move to...
5222 * src/symtab.h: here.
5223 No longer include `gram.h'.
5224
52252002-04-07 Akim Demaille <akim@epita.fr>
5226
5227 * src/gram.h, src/gram.c (rules_rhs_length): New.
5228 (ritem_longest_rhs): Use it.
5229 * src/gram.h (rule_t): `number' is a new member.
5230 * src/reader.c (packgram): Set it.
5231 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5232 the end of `rules', and count them out of `nrules'.
5233 (reduce_output, dump_grammar): Adjust.
5234 * src/print.c (print_grammar): It is no longer needed to check for
5235 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5236 * tests/reduce.at (Reduced Automaton): New test.
5237
52382002-04-07 Akim Demaille <akim@epita.fr>
5239
5240 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5241 lacking `+ 1' to nrules, Bison reported as useless a token if it
5242 was used solely to set the precedence of the last rule...
5243
52442002-04-07 Akim Demaille <akim@epita.fr>
5245
5246 * data/bison.c++, data/bison.simple: Don't output the current file
5247 name in #line, to avoid useless diffs between two identical
5248 outputs under different names.
5249
52502002-04-07 Akim Demaille <akim@epita.fr>
5251
5252 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5253 Normalize loops to using `< nrules + 1', not `<= nrules'.
5254
52552002-04-07 Akim Demaille <akim@epita.fr>
5256
5257 * TODO: Update.
5258
52592002-04-07 Akim Demaille <akim@epita.fr>
5260
5261 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5262 bucket.value as bucket.number.
5263
52642002-04-07 Akim Demaille <akim@epita.fr>
5265
5266 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5267 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5268 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5269 RHS, instead of being an index in RITEMS.
5270
52712002-04-04 Paul Eggert <eggert@twinsun.com>
5272
5273 * doc/bison.texinfo: Update copyright date.
5274 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5275 (Symbols): Warn about running Bison in one character set,
5276 but compiling and/or running in an incompatible one.
5277 Warn about character code 256, too.
5278
52792002-04-03 Paul Eggert <eggert@twinsun.com>
5280
5281 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5282 YYERROR_VERBOSE is nonzero, not whether it is defined.
5283
5284 Merge changes from bison-1_29-branch.
5285
52862002-03-20 Paul Eggert <eggert@twinsun.com>
5287
5288 Merge fixes from Debian bison_1.34-1.diff.
5289
5290 * configure.in (AC_PREREQ): 2.53.
5291
52922002-03-20 Akim Demaille <akim@epita.fr>
5293
5294 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5295
52962002-03-19 Paul Eggert <eggert@twinsun.com>
5297
5298 * src/bison.simple (YYCOPY): New macro.
5299 (YYSTACK_RELOCATE): Use it.
5300 Remove Type arg; no longer needed. All callers changed.
5301 (yymemcpy): Remove; no longer needed.
5302
5303 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5304 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5305
53062002-03-19 Akim Demaille <akim@epita.fr>
5307
5308 Test and fix the #line outputs.
5309
5310 * tests/atlocal.at (GCC): New.
5311 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5312 (Prologue synch line, ,%union synch line, Postprologue synch line)
5313 (Action synch line, Epilogue synch line): New tests.
5314 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5315 * data/bison.simple, data/bison.c++: Use it.
5316
53172002-03-19 Akim Demaille <akim@epita.fr>
5318
5319 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5320 (Solved SR Conflicts, %expect not enough, %expect right)
5321 (%expect too much): Move to...
5322 * tests/conflicts.at: this new file.
5323
53242002-03-19 Akim Demaille <akim@epita.fr>
5325
5326 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5327 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5328 that we can move to enums for instance.
5329 * src/output.c (token_definitions_output): Output a list of
5330 `token-name, token-number' instead of the #define.
5331 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5332
53332002-03-14 Akim Demaille <akim@epita.fr>
5334
5335 Use Gettext 0.11.1.
5336
53372002-03-09 Robert Anisko <robert@lrde.epita.fr>
5338
5339 * data/bison.c++: Make the user able to add members to the generated
5340 parser by subclassing.
5341
53422002-03-05 Robert Anisko <robert@lrde.epita.fr>
5343
5344 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5345 a character.
5346 Reported by Nicolas Tisserand and Nicolas Burrus.
5347
53482002-03-04 Robert Anisko <robert@lrde.epita.fr>
5349
5350 * src/reader.c: Warn about lacking semi-colons, do not complain.
5351
53522002-03-04 Robert Anisko <robert@lrde.epita.fr>
5353
5354 * data/bison.c++: Remove a debug line.
5355
53562002-03-04 Robert Anisko <robert@lrde.epita.fr>
5357
5358 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5359 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5360 provide a default implementation.
5361
53622002-03-04 Akim Demaille <akim@epita.fr>
5363
5364 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5365 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5366 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5367 * tests/semantic.at (Parsing Guards): Similarly.
5368 * src/reader.at (readgram): Complain if the last rule is not ended
5369 with a semi-colon.
5370
53712002-03-04 Akim Demaille <akim@epita.fr>
5372
5373 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5374 * src/closure.c: here.
5375 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5376 RTC.
5377 * src/warshall.h, src/warshall.c: Remove.
5378 * tests/sets.at (Broken Closure): Adjust.
5379
53802002-03-04 Akim Demaille <akim@epita.fr>
5381
5382 * src/output.c (output_skeleton): tempdir is const.
5383 bytes_read is unused.
5384
53852002-03-04 Akim Demaille <akim@epita.fr>
5386
5387 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5388 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5389 Update.
5390 From Michael Hayes.
5391
53922002-03-04 Akim Demaille <akim@epita.fr>
5393
5394 * src/closure.c (closure): `r' is unused.
5395
53962002-03-04 Akim Demaille <akim@epita.fr>
5397
5398 * tests/sets.at (Broken Closure): Add the ending `;'.
5399 * src/reader.at (readgram): Complain if a rule is not ended with a
5400 semi-colon.
5401
54022002-03-04 Akim Demaille <akim@epita.fr>
5403
5404 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5405 (count_sr_conflicts): Use bitset_count.
5406 * src/reduce.c (inaccessable_symbols): Ditto.
5407 (bits_size): Remove.
5408 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5409
54102002-03-04 Akim Demaille <akim@epita.fr>
5411
5412 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5413 * src/reduce.c: Remove the `bitset_zero's following the
5414 `bitset_create's, as now it is performed by the latter.
5415
54162002-03-04 Akim Demaille <akim@epita.fr>
5417
5418 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5419 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5420 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5421 latest sources from Michael.
5422
54232002-03-04 Akim Demaille <akim@epita.fr>
5424
5425 * src/output.c (output): Don't free the grammar.
5426 * src/reader.c (grammar_free): New.
5427 * src/main.c (main): Call it and don't free symtab here.
5428
54292002-03-04 Akim Demaille <akim@epita.fr>
5430
5431 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5432 before returning.
5433 Reported by Benoit Perrot.
5434
54352002-03-04 Akim Demaille <akim@epita.fr>
5436
5437 Use bitset operations when possible, not loops over bits.
5438
5439 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5440 bitset_or.
5441 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5442 * src/reduce.c (useless_nonterminals): Formatting changes.
5443 * src/warshall.c (TC): Use bitset_or.
5444
54452002-03-04 Akim Demaille <akim@epita.fr>
5446
5447 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5448 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5449 Ditto.
5450
54512002-03-04 Akim Demaille <akim@epita.fr>
5452
5453 * src/lalr.c (F): Now a bitset*.
5454 Adjust all dependencies.
5455
54562002-03-04 Akim Demaille <akim@epita.fr>
5457
5458 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5459 Adjust all dependencies.
5460
54612002-03-04 Akim Demaille <akim@epita.fr>
5462
5463 * src/L0.c, src/LR0.h (nstates): Be size_t.
5464 Adjust comparisons (signed vs unsigned).
5465 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5466 bitset*.
5467 Adjust all dependencies.
5468
54692002-03-04 Akim Demaille <akim@epita.fr>
5470
5471 * src/closure.c (firsts): Now, also a bitset.
5472 Adjust all dependencies.
5473 (varsetsize): Remove, now unused.
5474 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5475
54762002-03-04 Akim Demaille <akim@epita.fr>
5477
5478 * src/print.c: Convert to use bitset.h, not hand coded iterations
5479 over ints.
5480
54812002-03-04 Akim Demaille <akim@epita.fr>
5482
5483 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5484
54852002-03-04 Akim Demaille <akim@epita.fr>
5486
5487 * src/closure.c (ruleset): Be a bitset.
5488 (rulesetsize): Remove.
5489
54902002-03-04 Akim Demaille <akim@epita.fr>
5491
5492 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5493 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5494 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5495 * src/closure.c (fderives): Be an array of bitsets.
5496
54972002-02-28 Robert Anisko <robert@lrde.epita.fr>
5498
5499 * data/bison.c++: Merge the two generated headers. Insert a copyright
5500 notice in each output file.
5501
55022002-02-28 Akim Demaille <akim@epita.fr>
5503
5504 * data/bison.c++: Copy the prologue of bison.simple to fetch
5505 useful M4 definitions, such as b4_header_guard.
5506
55072002-02-25 Akim Demaille <akim@epita.fr>
5508
5509 * src/getargs.c (version): Give the name of the authors, and use a
5510 translator friendly scheme for the bgr
5511 copyright notice.
5512
55132002-02-25 Akim Demaille <akim@epita.fr>
5514
5515 * src/output.c (header_output): Remove, now handled completely via
5516 M4.
5517
55182002-02-25 Akim Demaille <akim@epita.fr>
5519
5520 * m4/m4.m4: New, from CVS Autoconf.
5521 * configure.in: Invoke it.
5522 * src/output.c (output_skeleton): Use its result instead of the
5523 hard coded name.
5524
55252002-02-25 Akim Demaille <akim@epita.fr>
5526
5527 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5528 Fileutils 4.1.5.
5529 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5530 * src/output.c (output_skeleton): Use mkstemp to create a real
5531 temporary file.
5532 Move the filling of `skeleton' and its muscle to...
5533 (prepare): here.
5534 (output): Move the definition of the prologue muscle to...
5535 (prepare): here.
5536 * src/system.h (DEFAULT_TMPDIR): New.
5537
55382002-02-14 Paul Eggert <eggert@twinsun.com>
5539
5540 Remove the support for C++ namespace cleanliness; it was
5541 causing more problems than it was curing, since it didn't work
5542 properly on some nonstandard C++ compilers. This can wait
5543 for a proper C++ parser.
5544
5545 * NEWS: Document this.
5546 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5547 of C++, as it's treated like C now.
5548 * src/bison.simple (YYSTD): Remove.
5549 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5550 Treat C++ just like Standard C instead of trying to support
5551 namespace cleanliness.
5552
55532002-02-14 Akim Demaille <akim@epita.fr>
5554
5555 * tests/regression.at (else): Adjust to Andreas' change.
5556
55572002-02-14 Akim Demaille <akim@epita.fr>
5558
5559 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5560
55612002-02-13 Andreas Schwab <schwab@suse.de>
5562
5563 * src/output.c (output_rule_data): Don't output NULL, it might
5564 not be defined yet.
5565
55662002-02-11 Robert Anisko <robert@lrde.epita.fr>
5567
5568 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5569 (Copyright notice): Update.
5570
55712002-02-11 Akim Demaille <akim@epita.fr>
5572
5573 * tests/regression.at (%nonassoc and eof): Don't include
5574 nonportable headers.
5575
55762002-02-08 Robert Anisko <robert@lrde.epita.fr>
5577
5578 * data/bison.c++: Correct error recovery. Make the user able to
5579 initialize the starting location.
5580
55812002-02-07 Akim Demaille <akim@epita.fr>
5582
5583 * tests/input.at: New.
5584
55852002-02-07 Robert Anisko <robert@lrde.epita.fr>
5586
5587 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5588 more consistent when naming methods and variables. Put preprocessor
5589 directives around tables only needed for debugging.
5590
55912002-02-07 Robert Anisko <robert@lrde.epita.fr>
5592
5593 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5594 C++ parsers.
5595 (yy::b4_name::parse): Use print_.
5596
55972002-02-07 Robert Anisko <robert@lrde.epita.fr>
5598
5599 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5600
56012002-02-07 Robert Anisko <robert@lrde.epita.fr>
5602
5603 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5604 C++ parsers.
5605 (yy::b4_name::parse): Build verbose error messages, and use error_.
5606
56072002-02-06 Robert Anisko <robert@lrde.epita.fr>
5608
5609 * data/bison.c++: Fix m4 quoting in comments.
5610
56112002-02-06 Robert Anisko <robert@lrde.epita.fr>
5612
5613 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5614 not expanded by m4.
5615
56162002-02-05 Akim Demaille <akim@epita.fr>
5617
5618 * data/bison.c++: Adjust to the M4 back end.
5619 More is certainly needed.
5620
56212002-02-05 Akim Demaille <akim@epita.fr>
5622
5623 Give a try to M4 as a back end.
5624
5625 * lib/readpipe.c: New, from wdiff.
5626 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5627 BISON_HAIRY.
5628 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5629 specific values. Now it is m4 that performs the lookup.
5630 * src/parse-skel.y: Remove.
5631 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5632 * src/output.c (actions_output, guards_output)
5633 (token_definitions_output): No longer keeps track of the output
5634 line number, hence remove the second argument.
5635 (guards_output): Check against the guard member of a rule, not the
5636 action member.
5637 Adjust callers.
5638 (output_skeleton): Don't look for the skeleton location, let m4 do
5639 that.
5640 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5641 file will be used.
5642 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5643 (prepare): Given that for the time being changesyntax is not
5644 usable in M4, rename the muscles using `-' to `_'.
5645 Define `defines_flag', `output_parser_name' and `output_header_name'.
5646 * src/output.h (actions_output, guards_output)
5647 (token_definitions_output): Adjust prototypes.
5648 * src/scan-skel.l: Instead of scanning the skeletons, it now
5649 processes the output of m4: `__oline__' and `#output'.
5650 * data/bison.simple: Adjust to be used by M4(sugar).
5651 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5652 to date.
5653 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5654 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5655 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5656 shamelessly stolen from CVS Autoconf.
5657
56582002-02-05 Akim Demaille <akim@epita.fr>
5659
5660 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5661 * configure.in: Check for the declarations of free and malloc.
5662 * src/muscle_tab.c: Adjust.
5663
56642002-02-05 Akim Demaille <akim@epita.fr>
5665
5666 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5667 which have no values.
5668
56692002-02-05 Akim Demaille <akim@epita.fr>
5670
5671 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5672 * data/: here.
5673
56742002-01-29 Paul Eggert <eggert@twinsun.com>
5675
5676 * src/bison.simple (YYSIZE_T): Do not define merely because
5677 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5678 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5679
56802002-01-27 Akim Demaille <akim@epita.fr>
5681
5682 Fix `%nonassoc and eof'.
5683
5684 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5685 which were not properly copied! Replace
5686 memcpy (res->errs, src->errs, src->nerrs);
5687 with
5688 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5689 !!!
5690 * tests/regression.at (%nonassoc and eof): Adjust to newest
5691 Autotest: `.' is not in the PATH.
5692
56932002-01-27 Akim Demaille <akim@epita.fr>
5694
5695 * tests/sets.at (AT_EXTRACT_SETS): New.
5696 (Nullable): Use it.
5697 (Firsts): New.
5698
56992002-01-26 Akim Demaille <akim@epita.fr>
5700
5701 * tests/actions.at, tests/calc.at, tests/headers.at,
5702 * tests/torture.at: Adjust to the newest Autotest which no longer
5703 forces `.' in the PATH.
5704
57052002-01-25 Akim Demaille <akim@epita.fr>
5706
5707 * tests/regression.at (%nonassoc and eof): New.
5708 Suggested by Robert Anisko.
5709
57102002-01-24 Akim Demaille <akim@epita.fr>
5711
5712 Bison dumps core when trying to complain about broken input files.
5713 Reported by Cris van Pelt.
5714
5715 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5716 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5717 into...
5718 (Invalid inputs): Strengthen: exercise parse_percent_token.
5719
57202002-01-24 Robert Anisko <robert.anisko@epita.fr>
5721
5722 * src/Makefile.am: Add bison.c++.
5723 * src/bison.c++: New skeleton.
5724
57252002-01-21 Paolo Bonzini <bonzini@gnu.org>
5726
5727 * po/it.po: New.
5728
57292002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5730
5731 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5732
57332002-01-20 Marc Autret <marc@gnu.org>
5734
5735 * src/files.c (compute_output_file_names): Fix
5736
57372002-01-20 Marc Autret <marc@gnu.org>
5738
5739 * tests/output.at: New test.
5740 * src/files.c (compute_base_names): Don't map extensions when
5741 the YACC flag is set, use defaults.
5742 Reported by Evgeny Stambulchik.
5743
57442002-01-20 Marc Autret <marc@gnu.org>
5745
5746 * src/system.h: Need to define __attribute__ away for non-GCC
5747 compilers as well (i.e. the vendor C compiler).
5748 Suggested by Albert Chin-A-Young.
5749
57502002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5751
5752 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5753 canonical definition.
5754 * src/system.h: Use the canonical definition for PARAMS (avoids
5755 a conflict with the macro from lib/hash.h).
5756
57572002-01-11 Akim Demaille <akim@epita.fr>
5758
5759 * configure.in: Use AC_FUNC_STRNLEN.
5760 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5761
57622002-01-09 Akim Demaille <akim@epita.fr>
5763
5764 * src/files.c, src/files.h (output_infix): New.
5765 (tab_extension): Remove.
5766 (compute_base_names): Compute the former, drop the latter.
5767 * src/output.c (prepare): Insert the muscles `output-infix', and
5768 `output-suffix'.
5769 * src/parse-skel.y (string, string.1): New.
5770 (section.header): Use it.
5771 (section.yacc): Remove.
5772 (prefix): Remove too.
5773 * src/scan-skel.l: Adjust.
5774 * src/bison.simple, src/bison.hairy: Adjust.
5775
57762002-01-09 Akim Demaille <akim@epita.fr>
5777
5778 * configure.in (WERROR_CFLAGS): Compute it.
5779 * src/Makefile.am (CFLAGS): Pass it.
5780 * tests/atlocal.in (CFLAGS): Idem.
5781 * src/files.c: Fix a few warnings.
5782 (get_extension_index): Remove, unused.
5783
57842002-01-08 Akim Demaille <akim@epita.fr>
5785
5786 * src/getargs.c (AS_FILE_NAME): New.
5787 (getargs): Use it to convert DOSish file names.
5788 * src/files.c (base_name): Rename as full_base_name to avoid
5789 clashes with `base_name ()'.
5790 (filename_split): New.
5791 (compute_base_names): N-th rewrite, using filename_split.
5792
57932002-01-08 Akim Demaille <akim@epita.fr>
5794
5795 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5796 New, stolen from the Fileutils 4.1.
5797 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5798 * configure.in: Check for the presence of memrchr, and of its
5799 prototype.
5800
58012002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5802
5803 * lib/hash.h (__P): Added definition for this macro.
5804 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5805 BUILT_SOURCES, to ensure they are generated first.
5806 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5807 %error-verbose to allow bootstrapping with bison 1.30x.
5808
58092002-01-06 Akim Demaille <akim@epita.fr>
5810
5811 * src/reader.c (parse_braces): Don't fetch the next char, the
5812 convention is to fetch on entry.
5813 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5814 'switch' without a following semicolon.
5815 * tests/regression.at (braces parsing): New.
5816
58172002-01-06 Akim Demaille <akim@epita.fr>
5818
5819 Bison is dead wrong in its RR conflict reports.
5820
5821 * tests/torture.at (GNU Cim Grammar): New.
5822 * src/conflicts.c (count_rr_conflicts): Fix.
5823
58242002-01-06 Akim Demaille <akim@epita.fr>
5825
5826 Creating package.m4 from configure.ac causes too many problems.
5827
5828 * tests/Makefile.am (package.m4): Create it by hand,
5829 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5830
58312002-01-06 Akim Demaille <akim@epita.fr>
5832
5833 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5834 skeleton.h.
5835
58362002-01-04 Paul Eggert <eggert@twinsun.com>
5837
5838 * doc/bison.texinfo (Debugging):
5839 Remove YYSTDERR; it's no longer defined or used.
5840 Also, s/cstdio.h/cstdio/.
5841
58422002-01-03 Akim Demaille <akim@epita.fr>
5843
5844 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5845
58462002-01-03 Akim Demaille <akim@epita.fr>
5847
5848 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5849 tracing code to --trace, wait for a better --trace option, with
5850 args.
5851
58522002-01-03 Akim Demaille <akim@epita.fr>
5853
5854 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5855 The ISO C++ standard is extremely clear about it: stderr is
5856 considered a macro, not a regular symbol (see table 94 `Header
5857 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5858 Therefore std:: does not apply to it. It still does with fprintf.
5859 Also, s/cstdio.h/cstdio/.
5860
58612002-01-03 Akim Demaille <akim@epita.fr>
5862
5863 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5864 for non system headers.
5865
58662002-01-02 Akim Demaille <akim@epita.fr>
5867
5868 Equip the skeleton chain with location tracking, runtime trace,
5869 pure parser and scanner.
5870
5871 * src/parse-skel.y: Request a pure parser, locations, and prefix
5872 renaming.
5873 (%union): Having several members with the same type does not help
5874 type mismatches, simplify.
5875 (YYPRINT, yyprint): New.
5876 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5877 (skel_error): this.
5878 Handle locations.
5879 * src/scan-skel.l: Adjust to these changes.
5880 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5881 (LOCATION_PRINT, skel_control_t): New.
5882
58832001-12-30 Akim Demaille <akim@epita.fr>
5884
5885 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5886 replace `gb' with BLANKS.
5887 * src/scan-skel.l: Adjust.
5888
58892001-12-30 Akim Demaille <akim@epita.fr>
5890
5891 * src/system.h: We don't need nor want bcopy.
5892 Throw away MS-DOS crap: we don't need getpid.
5893 * configure.in: We don't need strndup. It was even causing
5894 problems: because Flex includes the headers *before* us,
5895 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5896 not visible.
5897 * lib/xstrndup.c: New.
5898 * src/scan-skel.l: Use it.
5899 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5900 * src/parse-skel.y: Use %directives instead of #defines.
5901
59022001-12-30 Akim Demaille <akim@epita.fr>
5903
5904 * src/skeleton.h: New.
5905 * src/output.c (output_parser, output_master_parser): Remove, dead
5906 code.
5907 * src/output.h (get_lines_number, actions_output, guards_output)
5908 (token_definitions_output): Prototype them.
5909 * src/parse-skel.y: Add the license notice.
5910 Include output.h and skeleton.h.
5911 (process_skeleton): Returns void, and takes a single parameter.
5912 * src/scan-skel.l: Add the license notice.
5913 Include skeleton.h.
5914 Don't use %option yylineno: it seems that then Flex imagines
5915 REJECT has been used, and therefore it won't reallocate its
5916 buffers (which makes no other sense to me than a bug). It results
5917 in warnings for `unused: yy_flex_realloc'.
5918
59192001-12-30 Robert Anisko <robert.anisko@epita.fr>
5920
5921 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5922 (MUSCLE_INSERT_PREFIX): ...to there.
5923 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5924 (MUSCLE_INSERT_PREFIX): Move from here...
5925
5926 * src/bison.hairy: Add a section directive. Put braces around muscle
5927 names. This parser skeleton is still broken, but Bison should not
5928 choke on a bad muscle 'syntax'.
5929 * src/bison.simple: Add a section directive. Put braces around muscle
5930 names.
5931
5932 * src/files.h (strsuffix, stringappend): Add declarations.
5933 (tab_extension): Add declaration.
5934 (short_base_name): Add declaration.
5935
5936 * src/files.c (strsuffix, stringappend): No longer static. These
5937 functions are used in the skeleton parser.
5938 (tab_extension): New.
5939 (compute_base_names): Use the computations done in this function
5940 to guess if the generated parsers should have '.tab' in their
5941 names.
5942 (short_base_name): No longer static.
5943
5944 * src/output.c (output_skeleton): New.
5945 (output): Disable call to output_master_parser, and give a try to
5946 a new skeleton handling system.
5947 (guards_output, actions_output): No longer static.
5948 (token_definitions_output, get_lines_number): No longer static.
5949
5950 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5951
5952 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5953 parse-skel.y.
5954
5955 * src/parse-skel.y: New file.
5956 * src/scan-skel.l: New file.
5957
59582001-12-29 Akim Demaille <akim@epita.fr>
5959
5960 %name-prefix is broken.
5961
5962 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5963 Adjust all dependencies.
5964 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5965 %name-prefix.
5966
5967 Renaming yylval but not yylloc is not consistent. Now we do.
5968
5969 * src/bison.simple: Prefix yylloc if used.
5970 * doc/bison.texinfo (Decl Summary): Document that.
5971
59722001-12-29 Akim Demaille <akim@epita.fr>
5973
5974 * doc/bison.texinfo: Promote `%long-directive' over
5975 `%long_directive'.
5976 Remove all references to fixed-output-files, yacc is enough.
5977
59782001-12-29 Akim Demaille <akim@epita.fr>
5979
5980 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5981 user prologue. These are defaults.
5982 * tests/actions.at (Mid-rule actions): Make sure the user can
5983 define YYDEBUG and YYERROR_VERBOSE.
5984
59852001-12-29 Akim Demaille <akim@epita.fr>
5986
5987 * src/output.c (header_output): Don't forget to export YYLTYPE and
5988 yylloc.
5989 * tests/headers.at (export YYLTYPE): New, make sure it does.
5990 * tests/regression.at (%union and --defines, Invalid CPP headers):
5991 Move to...
5992 * tests/headers.at: here.
5993
59942001-12-29 Akim Demaille <akim@epita.fr>
5995
5996 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5997
59982001-12-29 Akim Demaille <akim@epita.fr>
5999
6000 * tests/actions.at (Mid-rule actions): Output on a single line
6001 instead of several.
6002
60032001-12-29 Akim Demaille <akim@epita.fr>
6004
6005 * doc/bison.texinfo: Formatting changes.
6006
60072001-12-29 Akim Demaille <akim@epita.fr>
6008
6009 Don't store the token defs in a muscle, just be ready to output it
6010 on command. Now possible via `symbols'. Fixes a memory leak.
6011
6012 * src/output.c (token_definitions_output): New.
6013 (output_parser, header_output): Use it.
6014 * src/reader.c (symbols_save): Remove.
6015
60162001-12-29 Akim Demaille <akim@epita.fr>
6017
6018 * src/bison.simple: Do not provide a default for YYSTYPE and
6019 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6020 default.
6021
60222001-12-29 Akim Demaille <akim@epita.fr>
6023
6024 Mid-rule actions are simply... ignored!
6025
6026 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6027 the empty-rule associated to the dummy symbol, not to the host
6028 rule.
6029 * tests/actions.at (Mid-rule actions): New.
6030
60312001-12-29 Akim Demaille <akim@epita.fr>
6032
6033 Memory leak.
6034
6035 * src/reader.c (reader): Free grammar.
6036
60372001-12-29 Akim Demaille <akim@epita.fr>
6038
6039 Memory leak.
6040
6041 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6042 since it allocates it for each state, although only one is needed.
6043 (allocate_storage): Do it here.
6044
60452001-12-29 Akim Demaille <akim@epita.fr>
6046
6047 * src/options.h, src/options.c (create_long_option_table): Rename
6048 as...
6049 (long_option_table_new): this, with a clearer prototype.
6050 (percent_table): Remove, unused,
6051 * src/getargs.c (getargs): Adjust.
6052
60532001-12-29 Akim Demaille <akim@epita.fr>
6054
6055 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6056 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6057 as states.
6058
60592001-12-29 Akim Demaille <akim@epita.fr>
6060
6061 * src/lalr.c (build_relations): Rename `states' as `states1'.
6062 Sorry, I don't understand exactly what it is, no better name...
6063
60642001-12-29 Akim Demaille <akim@epita.fr>
6065
6066 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6067 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6068 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6069 as rules.
6070
60712001-12-29 Akim Demaille <akim@epita.fr>
6072
6073 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6074 ago.
6075
60762001-12-29 Akim Demaille <akim@epita.fr>
6077
6078 * src/reader.c, src/reader.h (user_toknums): Remove.
6079 Adjust all users to use symbols[i]->user_token_number.
6080
60812001-12-29 Akim Demaille <akim@epita.fr>
6082
6083 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6084 Adjust all users to use symbols[i]->prec or ->assoc.
6085
60862001-12-29 Akim Demaille <akim@epita.fr>
6087
6088 * src/reader.c, src/reader.h (tags): Remove.
6089 Adjust all users to use symbols[i]->tag.
6090
60912001-12-29 Akim Demaille <akim@epita.fr>
6092
6093 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6094 and rule_table.
6095 * src/reader.c (packsymbols): Fill this table.
6096 Drop sprec.
6097 * src/conflicts.c (resolve_sr_conflict): Adjust.
6098 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6099 single table.
6100 Use symbols[i]->tag instead of tags[i].
6101
61022001-12-29 Akim Demaille <akim@epita.fr>
6103
6104 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6105 In addition, put a comment in there, to replace...
6106 * tests/regression.at (%union and C comments): Remove.
6107
61082001-12-29 Akim Demaille <akim@epita.fr>
6109
6110 * tests/regression.at (Web2c Actions): Blindly move the actual
6111 output as expected output. The contents *seem* right to me, but I
6112 can't pretend reading perfectly parser tables... Nonetheless, all
6113 the other tests pass correctly, the table look OK, even though the
6114 presence of `$axiom' is to be noted: AFAICS it is useless (but
6115 harmless).
6116
61172001-12-29 Akim Demaille <akim@epita.fr>
6118
6119 * src/reader.c (readgram): Don't add the rule 0 if there were no
6120 rules read. In other words, add it _after_ having performed
6121 grammar sanity checks.
6122 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6123
61242001-12-29 Akim Demaille <akim@epita.fr>
6125
6126 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6127 visible, and some states have now a different number.
6128
61292001-12-29 Akim Demaille <akim@epita.fr>
6130
6131 * src/reader.c (readgram): Bind the initial rule's lineno to that
6132 of the first rule.
6133 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6134 (Solved SR Conflicts): Adjust rule 0's line number.
6135
61362001-12-29 Akim Demaille <akim@epita.fr>
6137
6138 Fix the `GAWK Grammar' failure.
6139
6140 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6141 the reductions of the first state which was mistakenly confused
6142 with the final state because precisely final_state was initialized
6143 to 0.
6144 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6145 now noticed by Bison.
6146 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6147 have a reduction on $default.
6148
61492001-12-29 Akim Demaille <akim@epita.fr>
6150
6151 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6152 rule line numbers.
6153 * src/closure.c (print_closure): Likewise.
6154 * src/derives.c (print_derives): Likewise.
6155 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6156 now.
6157
61582001-12-29 Akim Demaille <akim@epita.fr>
6159
6160 * src/lalr.c (lookaheads_print): New.
6161 (lalr): Call it when --trace-flag.
6162 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6163 are dumped.
6164
61652001-12-29 Akim Demaille <akim@epita.fr>
6166
6167 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6168 when walking through ritem, even via rule->rhs.
6169 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6170 (useful_production, useless_nonterminals): Likewise.
6171 (reduce_grammar_tables): Likewise, plus update nritems.
6172 * src/nullable.c (set_nullable): Likewise.
6173 * src/lalr.c (build_relations): Likewise.
6174 * tests/sets.at (Nullable): Adjust.
6175 Fortunately, now, the $axiom is no longer nullable.
6176
61772001-12-29 Akim Demaille <akim@epita.fr>
6178
6179 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6180 the 0-sentinel.
6181 * src/gram.c (ritem_longest_rhs): Likewise.
6182 * src/reduce.c (nonterminals_reduce): Likewise.
6183 * src/print_graph.c (print_graph): Likewise.
6184 * src/output.c (output_rule_data): Likewise.
6185 * src/nullable.c (set_nullable): Likewise.
6186
61872001-12-29 Akim Demaille <akim@epita.fr>
6188
6189 * src/output.c: Comment changes.
6190
61912001-12-27 Paul Eggert <eggert@twinsun.com>
6192
6193 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6194 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6195 Sparc, as they were causing more porting problems than the
6196 (minor) performance improvement was worth.
6197
6198 Also, catch up with 1.31's YYSTD.
6199
62002001-12-27 Akim Demaille <akim@epita.fr>
6201
6202 * src/output.c (output_gram): Rely on nritems, not the
6203 0-sentinel. See below.
6204 Use -1 as separator, not 0.
6205 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6206 Rely on -1 as separator in yyrhs, instead of 0.
6207 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6208 twice `Now at end of input', therefore there are two lines less to
6209 expect.
6210
62112001-12-27 Akim Demaille <akim@epita.fr>
6212
6213 * tests/regression.at (Unresolved SR Conflicts):
6214 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6215 below.
6216
62172001-12-27 Akim Demaille <akim@epita.fr>
6218
6219 * src/LR0.c (new_state): Recognize the final state by the fact it
6220 is reached by eoftoken.
6221 (insert_start_shifting_state, insert_eof_shifting_state)
6222 (insert_accepting_state, augment_automaton): Remove, since now
6223 these states are automatically computed from the initial state.
6224 (generate_states): Adjust.
6225 * src/print.c: When reporting a rule number to the user, substract
6226 1, so that the axiom rule is rule 0, and the first user rule is 1.
6227 * src/reduce.c: Likewise.
6228 * src/print_graph.c (print_core): For the time being, just as for
6229 the report, depend upon --trace-flags to dump the full set of
6230 items.
6231 * src/reader.c (readgram): Once the grammar read, insert the rule
6232 0: `$axiom: START-SYMBOL $'.
6233 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6234 number of the states has changed (the final state is no longer
6235 necessarily the last), catch up.
6236
62372001-12-27 Akim Demaille <akim@epita.fr>
6238
6239 Try to make the use of the eoftoken valid. Given that its value
6240 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6241 is used instead of > 0 where appropriate, (ii), depend upon nritems
6242 instead of the 0-sentinel.
6243
6244 * src/gram.h, src/gram.c (nritems): New.
6245 Expected to be duplication of nitems, but for the time being...
6246 * src/reader.c (packgram): Assert nritems and nitems are equal.
6247 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6248 * src/closure.c (print_closure, print_fderives): Likewise.
6249 * src/gram.c (ritem_print): Likewise.
6250 * src/print.c (print_core, print_grammar): Likewise.
6251 * src/print_graph.c: Likewise.
6252
62532001-12-27 Akim Demaille <akim@epita.fr>
6254
6255 * src/main.c (main): If there are complains after grammar
6256 reductions, then output the report anyway if requested, then die.
6257 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6258 * src/reader.c (eoftoken): New.
6259 (parse_token_decl): If the token being defined has value `0', it
6260 is the eoftoken.
6261 (packsymbols): No longer hack `tags' to insert `$' by hand.
6262 Be sure to preserve the value of the eoftoken.
6263 (reader): Make sure eoftoken is defined.
6264 Initialize nsyms to 0: now eoftoken is created just like the others.
6265 * src/print.c (print_grammar): Don't special case the eof token.
6266 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6267 lie anyway, albeit pleasant.
6268 * tests/calc.at: Exercise error messages with eoftoken.
6269 Change the grammar so that empty input is invalid.
6270 Adjust expectations.
6271 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6272
62732001-12-27 Akim Demaille <akim@epita.fr>
6274
6275 * configure.in: Check the protos of strchr ans strspn.
6276 Replace strchr if needed.
6277 * src/system.h: Provide the protos of strchr, strspn and memchr if
6278 missing.
6279 * lib/strchr.c: New.
6280 * src/reader.c (symbols_save): Use strchr.
6281
62822001-12-27 Akim Demaille <akim@epita.fr>
6283
6284 * src/print.c, src/print_graph.c (escape): New.
6285 Use it to quote the TAGS outputs.
6286 * src/print_graph.c (print_state): Now errors are in red, and
6287 reductions in green.
6288 Prefer high to wide: output the state number on a line of its own.
6289
62902001-12-27 Akim Demaille <akim@epita.fr>
6291
6292 * src/state.h, src/state.c (reductions_new): New.
6293 * src/LR0.c (set_state_table): Let all the states have a
6294 `reductions', even if reduced to 0.
6295 (save_reductions): Adjust.
6296 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6297 * src/print.c (print_reductions, print_actions): Adjust.
6298 * src/output.c (action_row): Adjust.
6299
63002001-12-27 Akim Demaille <akim@epita.fr>
6301
6302 * src/state.h, src/state.c (errs_new, errs_dup): New.
6303 * src/LR0.c (set_state_table): Let all the states have an errs,
6304 even if reduced to 0.
6305 * src/print.c (print_errs, print_reductions): Adjust.
6306 * src/output.c (output_actions, action_row): Adjust.
6307 * src/conflicts.c (resolve_sr_conflict): Adjust.
6308
63092001-12-27 Akim Demaille <akim@epita.fr>
6310
6311 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6312
63132001-12-27 Akim Demaille <akim@epita.fr>
6314
6315 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6316 * src/print.c: here.
6317 (lookaheadset, shiftset): New, used as additional storage by
6318 print_reductions.
6319 (print_results): Adjust.
6320 (print_shifts, print_gotos, print_errs): New, extracted from...
6321 (print_actions): here.
6322 * src/print_graph.c (print_actions): Remove dead code.
6323
63242001-12-27 Akim Demaille <akim@epita.fr>
6325
6326 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6327 `$n' and `@n'.
6328
63292001-12-27 Akim Demaille <akim@epita.fr>
6330
6331 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6332 (build_relations): Adjust.
6333
63342001-12-27 Akim Demaille <akim@epita.fr>
6335
6336 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6337 duplication.
6338
63392001-12-27 Akim Demaille <akim@epita.fr>
6340
6341 * src/reader.c (packgram): Catch nitems overflows.
6342
63432001-12-27 Akim Demaille <akim@epita.fr>
6344
6345 * src/files.c, src/files.h (guard_obstack): Remove.
6346 * src/output.c (output): Adjust.
6347 * src/reader.c (parse_braces): New, factoring...
6348 (copy_action, copy_guard): these two which are renamed as...
6349 (parse_action, parse_guard): these.
6350 As a voluntary consequence, using braces around guards is now
6351 mandatory.
6352
63532001-12-27 Akim Demaille <akim@epita.fr>
6354
6355 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6356 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6357 members.
6358 (symbol_list_new): Adjust.
6359 (copy_action): action_line is the first line, not the last.
6360 (copy_guard): Just as for actions, store the `action' only, not
6361 the switch/case/break flesh.
6362 Don't parse the user action that might follow the guard, let...
6363 (readgram): do it, i.e., now, there can be an action after a
6364 guard.
6365 In other words the guard is just explicitly optional.
6366 (packgram): Adjust.
6367 * src/output.c (guards_output): New.
6368 (output_parser): Call it when needed.
6369 (output): Also free the guard and attrs obstacks.
6370 * src/files.c, src/files.h (obstack_save): Remove.
6371 (output_files): Remove.
6372 As a result, if one needs the former `.act' file, using an
6373 appropriate skeleton which requires actions and guards is now
6374 required.
6375 * src/main.c (main): Adjust.
6376 * tests/semantic.at: New.
6377 * tests/regression.at: Use `input.y' as input file name.
6378 Avoid 8+3 problems by requiring input.c when the test needs the
6379 parser.
6380
63812001-12-27 Akim Demaille <akim@epita.fr>
6382
6383 * src/reader.c (symbol_list_new): Be sure to initialize all the
6384 fields.
6385
63862001-12-27 Akim Demaille <akim@epita.fr>
6387
6388 All the hacks using a final pseudo state are now useless.
6389
6390 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6391 * src/lalr.c (nLA): New.
6392 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6393 instead of lookaheadsp from the pseudo state (nstate + 1).
6394
63952001-12-27 Akim Demaille <akim@epita.fr>
6396
6397 * src/output.c (action_row, token_actions): Use a state_t instead
6398 of a integer, and nlookaheads instead of the following state's
6399 lookaheadsp.
6400
64012001-12-27 Akim Demaille <akim@epita.fr>
6402
6403 * src/conflicts.c (log_resolution, flush_shift)
6404 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6405 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6406 (conflicts_print, print_reductions): Use a state_t instead of an
6407 integer when referring to a state.
6408 As much as possible, depend upon nlookaheads, instead of the
6409 `lookaheadsp' member of the following state (since lookaheads of
6410 successive states are successive, the difference between state n + 1
6411 and n served as the number of lookaheads for state n).
6412 * src/lalr.c (add_lookback_edge): Likewise.
6413 * src/print.c (print_core, print_actions, print_state)
6414 (print_results): Likewise.
6415 * src/print_graph.c (print_core, print_actions, print_state)
6416 (print_graph): Likewise.
6417 * src/conflicts.h: Adjust.
6418
64192001-12-27 Akim Demaille <akim@epita.fr>
6420
6421 * src/bison.hairy: Formatting/comment changes.
6422 ANSIfy.
6423 Remove `register' indications.
6424 Add plenty of `static'.
6425
64262001-12-27 Akim Demaille <akim@epita.fr>
6427
6428 * src/output.c (prepare): Drop the muscle `ntbase' which
6429 duplicates ntokens.
6430 * src/bison.simple: Formatting/comment changes.
6431 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6432 is an undocumented synonym.
6433
64342001-12-22 Akim Demaille <akim@epita.fr>
6435
6436 * src/output.c (output_table_data): Change the prototype to use
6437 `int' for array ranges: some invocations do pass an int, not a
6438 short.
6439 Reported by Wayne Green.
6440
64412001-12-22 Akim Demaille <akim@epita.fr>
6442
6443 Some actions of web2c.y are improperly triggered.
6444 Reported by Mike Castle.
6445
6446 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6447 * tests/regression.at (Web2c): Rename as...
6448 (Web2c Report): this.
6449 (Web2c Actions): New.
6450
64512001-12-22 Akim Demaille <akim@epita.fr>
6452
6453 Reductions in web2c.y are improperly reported.
6454 Reported by Mike Castle.
6455
6456 * src/conflicts.c (print_reductions): Fix.
6457 * tests/regression.at (Web2c): New.
6458
64592001-12-18 Akim Demaille <akim@epita.fr>
6460
6461 Some host fail on `assert (!"foo")', which expands to
6462 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6463 Reported by Nelson Beebee.
6464
6465 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6466 `#define it_succeeded 0' and `assert (it_succeeded)'.
6467
64682001-12-17 Marc Autret <autret_m@epita.fr>
6469
6470 * src/bison.simple: Don't hard code the skeleton line and filename.
6471 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6472 New line counter 'skeleton_line' (skeleton-line muscle).
6473
64742001-12-17 Paul Eggert <eggert@twinsun.com>
6475
6476 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6477 YYDEBUG must be defined to a nonzero value.
6478
6479 * src/bison.simple (yytname): Do not assume that the user defines
6480 YYDEBUG to a properly parenthesized expression.
6481
64822001-12-17 Akim Demaille <akim@epita.fr>
6483
6484 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6485 nlookaheads is a new member.
6486 Adjust all users.
6487 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6488 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6489 state.
6490
64912001-12-17 Akim Demaille <akim@epita.fr>
6492
6493 * src/files.h, src/files.c (open_files, close_files): Remove.
6494 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6495 let...
6496 * src/reader.c (reader): Do it.
6497
64982001-12-17 Akim Demaille <akim@epita.fr>
6499
6500 * src/conflicts.c (print_reductions): Formatting changes.
6501
65022001-12-17 Akim Demaille <akim@epita.fr>
6503
6504 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6505 (flush_reduce): New.
6506 (resolve_sr_conflict): Adjust.
6507
65082001-12-17 Akim Demaille <akim@epita.fr>
6509
6510 * src/output.c (output_obstack): Be static and rename as...
6511 (format_obstack): this, to avoid any confusion with files.c's
6512 output_obstack.
6513 * src/reader.h (muscle_obstack): Move to...
6514 * src/output.h: here, since it's defined in output.c.
6515
65162001-12-17 Akim Demaille <akim@epita.fr>
6517
6518 * src/output.c (action_row, save_column, default_goto)
6519 (sort_actions, matching_state, pack_vector): Better variable
6520 locality.
6521
65222001-12-17 Akim Demaille <akim@epita.fr>
6523
6524 * src/output.c: Various formatting changes.
6525
65262001-12-17 Akim Demaille <akim@epita.fr>
6527
6528 * src/files.c (output_files): Free the output_obstack.
6529 * src/main.c (main): Call print and print_graph conditionally.
6530 * src/print.c (print): Work unconditionally.
6531 * src/print_graph.c (print_graph): Work unconditionally.
6532 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6533
65342001-12-16 Marc Autret <autret_m@epita.fr>
6535
6536 * src/output.c (actions_output): Fix. When we use %no-lines,
6537 there is one less line per action.
6538
65392001-12-16 Marc Autret <autret_m@epita.fr>
6540
6541 * src/bison.simple: Remove a useless #line directive.
6542 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6543 * src/output.c (get_lines_number): New.
6544 (output_parser): Adjust, now takes care about the lines of a
6545 output muscles.
6546 Fix line numbering.
6547 (actions_output): Computes the number of lines taken by actions.
6548 (output_master_parser): Insert new skeleton which is the name of
6549 the output parser file name.
6550
65512001-12-15 Marc Autret <autret_m@epita.fr>
6552
6553 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6554
65552001-12-15 Marc Autret <autret_m@epita.fr>
6556
6557 * src/output.c (output_gram): Keep track of the hairy one.
6558
65592001-12-15 Akim Demaille <akim@epita.fr>
6560
6561 Make `make distcheck' work.
6562
6563 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6564 system.h which uses libgettext.h.
6565
65662001-12-15 Akim Demaille <akim@epita.fr>
6567
6568 * src/nullable.c (set_nullable): Useless rules must be skipped,
6569 otherwise, since we range over their symbols, we might look at a
6570 nonterminal which no longer ``exists'', i.e., it is not counted in
6571 `nvars', hence we overflow our arrays.
6572
65732001-12-15 Akim Demaille <akim@epita.fr>
6574
6575 The header can also be produced directly, without any obstack!
6576 Yahoo!
6577
6578 * src/files.c, src/files.h (defines_obstack): Remove.
6579 (compute_header_macro): Global.
6580 (defines_obstack_save): Remove.
6581 * src/reader.c (parse_union_decl): No longer output to
6582 defines_obstack: its content can be found in the `stype' muscle
6583 anyway.
6584 (output_token_translations): Merge into...
6585 (symbols_output): this.
6586 Rename as...
6587 (symbols_save): this.
6588 (reader): Adjust.
6589 * src/output.c (header_output): New.
6590 (output): Call it.
6591
65922001-12-15 Akim Demaille <akim@epita.fr>
6593
6594 * src/reader.c (parse_union_decl): Instead of handling two obstack
6595 simultaneously, use one to define the `stype' muscle, and use the
6596 value of the latter to fill defines_obstack.
6597 (copy_comment): Remove.
6598 (copy_comment2): Work for a single obstack.
6599 Rename as...
6600 (copy_comment): this.
6601
66022001-12-15 Akim Demaille <akim@epita.fr>
6603
6604 * src/lex.c, src/lex.h (xgetc): No longer static.
6605 * src/reader.c (parse_union_decl): Revamp.
6606
66072001-12-15 Akim Demaille <akim@epita.fr>
6608
6609 Still making progress in separating Bison into (i) input, (ii)
6610 process, (iii) output: now we can directly output the parser file
6611 without using table_obstack at all.
6612
6613 * src/files.c, src/files.h (table_obstack): Bye bye.
6614 (parser_file_name): New.
6615 * src/files.c (compute_output_file_names): Compute it.
6616 * src/output.c (actions_output, output_parser)
6617 (output_master_parser): To a file instead of an obstack.
6618
66192001-12-15 Akim Demaille <akim@epita.fr>
6620
6621 Attach actions to rules, instead of pre-outputting them to
6622 actions_obstack.
6623
6624 * src/gram.h (rule_t): action and action_line are new members.
6625 * src/reader.c (symbol_list): Likewise.
6626 (copy_action): Save the actions within the rule.
6627 (packgram): Save them in rule_table.
6628 * src/output.c (actions_output): New.
6629 (output_parser): Use it on `%%actions'.
6630 (output_rule_data): Don't free rule_table.
6631 (output): Do it.
6632 (prepare): Don't save the `action' muscle.
6633 * src/bison.simple: s/%%action/%%actions/.
6634
66352001-12-15 Akim Demaille <akim@epita.fr>
6636
6637 * src/reader.c (copy_action): When --yacc, don't append a `;'
6638 to the user action: let it fail if lacking.
6639 Suggested by Arnold Robbins and Tom Tromey.
6640
66412001-12-14 Akim Demaille <akim@epita.fr>
6642
6643 * src/lex.c (literalchar): Simply return the char you decoded, non
6644 longer mess around with obstacks and int pointers.
6645 Adjust all callers.
6646
66472001-12-14 Akim Demaille <akim@epita.fr>
6648
6649 * src/lex.c (literalchar): Don't escape the special characters,
6650 just decode them, and keep them as char (before, eol was output as
6651 the 2 char string `\n' etc.).
6652 * src/output.c (output_rule_data): Use quotearg to output the
6653 token strings.
6654
66552001-12-13 Paul Eggert <eggert@twinsun.com>
6656
6657 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6658 Do not infringe on the global user namespace when using C++.
6659 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6660 All uses of `fprintf' and `stderr' changed.
6661
6662 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6663
66642001-12-13 Akim Demaille <akim@epita.fr>
6665
6666 The computation of nullable is broken: it doesn't handle empty
6667 RHS's properly.
6668
6669 * tests/torture.at (GNU AWK Grammar): New.
6670 * tests/sets.at (Nullable): New.
6671 * src/nullable.c (set_nullable): Instead of blindly looping over
6672 `ritems', loop over the rules, and then over their rhs's.
6673
6674 Work around Autotest bugs.
6675
6676 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6677 frame, because Autotest understand lines starting with a `+' as
6678 traces from the shell. Then, they are not processed properly.
6679 Admittedly an Autotest bug, but we don't have time to wait for
6680 Autotest to catch up.
6681 * tests/regression.at (Broken Closure): Adjust to the new table
6682 frames.
6683 Move to...
6684 * tests/sets.at: here.
6685
66862001-12-13 Akim Demaille <akim@epita.fr>
6687
6688 * src/closure.c (closure): Use nrules instead of playing tricks
6689 with BITS_PER_WORD.
6690
66912001-12-13 Akim Demaille <akim@epita.fr>
6692
6693 * src/print.c (print_actions): Output the handling of `$' as the
6694 traces do: shifting the token EOF. Before EOF was treated as a
6695 nonterminal.
6696 * tests/regression.at: Adjust some tests.
6697 * src/print_graph.c (print_core): Complete the set of items via
6698 closure. The next-to-final and final states are still unsatisfying,
6699 but that's to be addressed elsewhere.
6700 No longer output the rule numbers, but do output the state number.
6701 A single loop for the shifts + gotos is enough, but picked a
6702 distinct color for each.
6703 (print_graph): Initialize and finalize closure.
6704
67052001-12-13 Akim Demaille <akim@epita.fr>
6706
6707 * src/reader.c (readgram): Remove dead code, an strip useless
6708 braces.
6709 (get_type): Remove, unused.
6710
67112001-12-12 Akim Demaille <akim@epita.fr>
6712
6713 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6714 on that of lib/error.c.
6715
67162001-12-12 Akim Demaille <akim@epita.fr>
6717
6718 Some hosts don't like `/' in includes.
6719
6720 * src/system.h: Include libgettext.h without qualifying the path.
6721 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6722 $(top_srcdir).
6723
67242001-12-11 Marc Autret <autret_m@epita.fr>
6725
6726 * src/output.c (output_parser): Remove useless muscle.
6727
67282001-12-11 Marc Autret <autret_m@epita.fr>
6729
6730 * src/bison.simple: Remove #line just before %%epilogue. It
6731 is now handled in ...
6732 * src/reader.c (read_additionnal_code): Add the output of a
6733 #line for the epilogue.
6734
67352001-12-10 Marc Autret <autret_m@epita.fr>
6736
6737 * src/reader.c (copy_definition): Re-use CPP-outed code which
6738 replace precedent remove.
6739 * src/bison.simple: Remove #line before %%prologue because
6740 %%input-line is wrong at this time.
6741
67422001-12-10 Marc Autret <autret_m@epita.fr>
6743
6744 * src/reader.c (symbols_output): Clean up.
6745 * src/output.c (output_gram, output): Clean up.
6746
67472001-12-10 Akim Demaille <akim@epita.fr>
6748
6749 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6750 * src/LR0.c (set_state_table): here.
6751 * src/lalr.c (lalr): Call it.
6752
67532001-12-10 Akim Demaille <akim@epita.fr>
6754
6755 * src/state.h (shifts): Remove the `number' member: shifts are
6756 attached to state, hence no longer need to be labelled with a
6757 state number.
6758
67592001-12-10 Akim Demaille <akim@epita.fr>
6760
6761 Now that states have a complete set of members, the linked list of
6762 shifts is useless: just fill directly the state's shifts member.
6763
6764 * src/state.h (shifts): Remove the `next' member.
6765 * src/LR0.c (first_state, last_state): Remove.
6766 Adjust the callers.
6767 (augment_automaton): Don't look for the shifts that must be added
6768 a shift on EOF: it is those of the state we looked for! But now,
6769 since shifts are attached, it is no longer needed to looking
6770 merely by its id: its number.
6771
67722001-12-10 Akim Demaille <akim@epita.fr>
6773
6774 * src/LR0.c (augment_automaton): Better variable locality.
6775 Remove an impossible branch: if there is a state corresponding to
6776 the start symbol being shifted, then there is shift for the start
6777 symbol from the initial state.
6778
67792001-12-10 Akim Demaille <akim@epita.fr>
6780
6781 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6782 only when appropriate: when insert_start_shifting_state' is not
6783 invoked.
6784 * tests/regression.at (Rule Line Numbers): Adjust.
6785
67862001-12-10 Akim Demaille <akim@epita.fr>
6787
6788 * src/LR0.c (augment_automaton): Now that all states have shifts,
6789 merge the two cases addition shifts to the initial state.
6790
67912001-12-10 Akim Demaille <akim@epita.fr>
6792
6793 * src/lalr.c (set_state_table): Move to...
6794 * src/LR0.c: here.
6795 * src/lalr.c (lalr): Don't call it...
6796 * src/LR0.c (generate_states): do it.
6797 * src/LR0.h (first_state): Remove, only the table is used.
6798
67992001-12-10 Akim Demaille <akim@epita.fr>
6800
6801 * src/LR0.h (first_shift, first_reduction): Remove.
6802 * src/lalr.c: Don't use first_shift: find shifts through the
6803 states.
6804
68052001-12-10 Akim Demaille <akim@epita.fr>
6806
6807 * src/LR0.c: Attach shifts to states as soon as they are
6808 computed.
6809 * src/lalr.c (set_state_table): Instead of assigning shifts to
6810 state, just assert that the mapping was properly done.
6811
68122001-12-10 Akim Demaille <akim@epita.fr>
6813
6814 * src/LR0.c (insert_start_shift): Rename as...
6815 (insert_start_shifting_state): this.
6816 (insert_eof_shifting_state, insert_accepting_state): New.
6817 (augment_automaton): Adjust.
6818 Better locality of the variables.
6819 When looking if the start_symbol is shifted from the initial
6820 state, using `while (... symbol != start_symbol ...)' sounds
6821 better than `while (... symbol < start_symbol ...)': If fail
6822 to see how the order between symbols could be relevant!
6823
68242001-12-10 Akim Demaille <akim@epita.fr>
6825
6826 * src/getargs.h: Don't declare `spec_name_prefix' and
6827 `spec_file_prefix', declared by src/files.h.
6828 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6829 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6830 * src/output.c (prepare): Adjust.
6831 * src/reader.c (symbols_output): Likewise.
6832 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6833
68342001-12-10 Akim Demaille <akim@epita.fr>
6835
6836 * src/muscle_tab.c (muscle_init): NULL is a better default than
6837 `"0"'.
6838
68392001-12-10 Akim Demaille <akim@epita.fr>
6840
6841 * src/reader.c (reader): Calling symbols_output once is enough.
6842
68432001-12-10 Akim Demaille <akim@epita.fr>
6844
6845 Now that states have a complete set of members, the linked list of
6846 reductions is useless: just fill directly the state's reductions
6847 member.
6848
6849 * src/state.h (struct reductions): Remove member `number' and
6850 `next'.
6851 * src/LR0.c (first_reduction, last_reduction): Remove.
6852 (save_reductions): Don't link the new reductions, store them in
6853 this_state.
6854 * src/lalr.c (set_state_table): No need to attach reductions to
6855 states, it's already done.
6856 * src/output.c (output_actions): No longer free the shifts, then
6857 the reductions, then the states: free all the states and their
6858 members.
6859
68602001-12-10 Akim Demaille <akim@epita.fr>
6861
6862 * src/options.c (OPTN, DRTV, BOTH): New.
6863 (option_table): Use them.
6864
6865 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6866 the job of system.h.
6867 * src/options.c: Don't include stdio.h and xalloc.h for the same
6868 reasons.
6869
68702001-12-10 Akim Demaille <akim@epita.fr>
6871
6872 * src/output.c (output, prepare): Make sure the values of the
6873 muscles `action' and `prologue' are 0-terminated.
6874
68752001-12-10 Akim Demaille <akim@epita.fr>
6876
6877 Clean up GCC warnings.
6878
6879 * src/reader.c (copy_action): `buf' is not used.
6880 (parse_skel_decl): Be static.
6881 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6882 * src/options.h (create_long_option_table): Have a real prototype.
6883 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6884 (hash_delete_at): Return const void *.
6885 Adjust casts to preserve the const.
6886
68872001-12-10 Akim Demaille <akim@epita.fr>
6888
6889 * configure.in: Require 2.52g.
6890 M4 is not needed, but AUTOM4TE is.
6891 * m4/m4.m4: Remove.
6892 * tests/Makefile.am: Adjust.
6893
68942001-12-10 Akim Demaille <akim@epita.fr>
6895
6896 One structure for states is enough, even though theoretically
6897 there are LR(0) states and LALR(1) states.
6898
6899 * src/lalr.h (state_t): Remove.
6900 (state_table): Be state_t **, not state_t *.
6901 * src/state.h (core, CORE_ALLOC): Rename as...
6902 (state_t, STATE_ALLOC): this.
6903 Add the LALR(1) members: shifts, reductions, errs.
6904 * src/LR0.c (state_table): Rename as...
6905 (state_hash): this, to avoid name clashes with the global
6906 `state_table'.
6907 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6908 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6909
69102001-12-10 Akim Demaille <akim@epita.fr>
6911
6912 Bison dumps core on bash.y.
6913 Reported by Pascal Bart.
6914
6915 * src/warshall.c (bitmatrix_print): New.
6916 (TC): Use it.
6917 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6918 j must be the outer loop.
6919 * tests/regression.at (Broken Closure): New.
6920
69212001-12-05 Akim Demaille <akim@epita.fr>
6922
6923 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6924 its argument.
6925 Reported by Peter Hamorsky.
6926
69272001-12-05 Akim Demaille <akim@epita.fr>
6928
6929 * src/conflicts.c (err_table): Remove.
6930 (resolve_sr_conflict): Adjust.
6931 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6932 Rename as...
6933 (state_t.reductions, state_t.shifts): this.
6934
69352001-12-05 Akim Demaille <akim@epita.fr>
6936
6937 * src/reduce.c (reduce_grammar_tables): No longer disable the
6938 removal of useless rules via CPP but via `if (0)', so that the
6939 compiler still check the code is valid.
6940 For instance, it should have noticed `rline' no longer exists: use
6941 the `line' member of rule_t.
6942 * src/gram.c (dummy, rline): Remove, unused.
6943
69442001-12-05 Akim Demaille <akim@epita.fr>
6945
6946 * src/output.c (pack_vector): Use assert, not berror.
6947 * src/main.c (berror): Remove, unused.
6948
69492001-12-05 Akim Demaille <akim@epita.fr>
6950
6951 New experimental feature: if --verbose --trace output all the
6952 items of a state, not only its kernel.
6953
6954 * src/print.c (print_core): If `trace_flag', then invoke closure
6955 before outputting the items of the state (print_core is no longer
6956 a correct name them).
6957 (print_results): Invoke new_closure/free_closure if needed.
6958
69592001-12-05 Akim Demaille <akim@epita.fr>
6960
6961 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6962 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6963 (nitemset): for consistency with the rest of the project.
6964
69652001-12-05 Akim Demaille <akim@epita.fr>
6966
6967 * src/closure.c (print_closure): Improve.
6968 (closure): Use it for printing input and output.
6969
69702001-12-05 Akim Demaille <akim@epita.fr>
6971
6972 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6973 indexed by nonterminals.
6974
69752001-12-05 Akim Demaille <akim@epita.fr>
6976
6977 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6978 what it was!).
6979 * src/warshall.h: Remove accidental duplication of the content.
6980
69812001-12-05 Akim Demaille <akim@epita.fr>
6982
6983 * src/closure.c (set_fderives): De-obfuscate.
6984
69852001-12-05 Akim Demaille <akim@epita.fr>
6986
6987 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6988
69892001-12-05 Akim Demaille <akim@epita.fr>
6990
6991 * src/closure.c (set_firsts): De-obfuscate.
6992
69932001-12-05 Akim Demaille <akim@epita.fr>
6994
6995 * src/output.c (action_row): De-obfuscate
6996 using the good o' techniques: arrays not pointers, variable
6997 locality, BITISSET, RESETBIT etc.
6998
69992001-12-05 Akim Demaille <akim@epita.fr>
7000
7001 Pessimize the code to simplify it: from now on, all the states
7002 have a valid SHIFTS, which NSHIFTS is possibly 0.
7003
7004 * src/LR0.c (shifts_new): Be global and move to..
7005 * src/state.c, src/state.h: here.
7006 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7007 * src/print_graph: Adjust.
7008
70092001-12-05 Akim Demaille <akim@epita.fr>
7010
7011 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7012 * src/conflicts.c: Use it.
7013 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7014 incorrectly ``simplified''.
7015
70162001-12-05 Akim Demaille <akim@epita.fr>
7017
7018 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7019 using the good o' techniques: arrays not pointers, variable
7020 locality, BITISSET, RESETBIT etc.
7021
70222001-12-05 Akim Demaille <akim@epita.fr>
7023
7024 * src/state.h (SHIFT_SYMBOL): New.
7025 * src/conflicts.c: Use it to deobfuscate.
7026
70272001-12-05 Akim Demaille <akim@epita.fr>
7028
7029 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7030 (print_reductions): De-obfuscate using the good o' techniques:
7031 arrays not pointers, variable locality, BITISSET.
7032
70332001-12-05 Akim Demaille <akim@epita.fr>
7034
7035 * src/conflicts.c (print_reductions): Arrays, not pointers.
7036 Use BITISSET.
7037
70382001-12-05 Akim Demaille <akim@epita.fr>
7039
7040 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7041
70422001-12-05 Akim Demaille <akim@epita.fr>
7043
7044 * src/conflicts.c (print_reductions): Improve variable locality.
7045
70462001-12-05 Akim Demaille <akim@epita.fr>
7047
7048 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7049
70502001-12-05 Akim Demaille <akim@epita.fr>
7051
7052 * src/conflicts.c (print_reductions): Improve variable locality.
7053
70542001-12-05 Akim Demaille <akim@epita.fr>
7055
7056 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7057 * src/lalr.c: Use them.
7058
70592001-12-05 Akim Demaille <akim@epita.fr>
7060
7061 * src/LR0.c (augment_automaton): Formatting changes.
7062 Better variable locality.
7063
70642001-12-05 Akim Demaille <akim@epita.fr>
7065
7066 * src/lalr.c (matrix_print): New.
7067 (transpose): Use it.
7068 Use arrays instead of pointers.
7069
70702001-12-05 Akim Demaille <akim@epita.fr>
7071
7072 * src/lalr.c (maxrhs): Move to...
7073 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7074 * src/lalr.c (build_relations): Adjust.
7075
70762001-12-05 Akim Demaille <akim@epita.fr>
7077
7078 * src/lalr.c (transpose): Free the memory allocated to the
7079 argument, as it is replaced by the results by the unique caller.
7080 (build_relations): Merely invoke transpose: it handles the memory
7081 deallocation.
7082 Improve variable locality.
7083 Avoid variables used as mere abbreviations.
7084 (compute_lookaheads): Use arrays instead of pointers.
7085
70862001-12-05 Akim Demaille <akim@epita.fr>
7087
7088 * src/lalr.c (initialize_F): Improve variable locality.
7089 Avoid variables used as mere abbreviations.
7090
70912001-12-05 Akim Demaille <akim@epita.fr>
7092
7093 * src/derives.c (print_derives): Display the ruleno.
7094 * src/lalr.c (initialize_F, transpose): Better variable locality
7095 to improve readability.
7096 Avoid variables used as mere abbreviations.
7097
70982001-12-05 Akim Demaille <akim@epita.fr>
7099
7100 * src/lalr.c (traverse): Use arrays instead of pointers.
7101
71022001-12-05 Akim Demaille <akim@epita.fr>
7103
7104 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7105 the handling of squeue.
7106 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7107
71082001-12-05 Akim Demaille <akim@epita.fr>
7109
7110 Because useless nonterminals are now kept alive (instead of being
7111 `destroyed'), we now sometimes examine them, and store information
7112 related to them. Hence we need to know their number, and adjust
7113 memory allocations.
7114
7115 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7116 static.
7117 * src/LR0.c (allocate_itemsets): The memory allocated to
7118 `symbol_count' was used for two different purpose: once to count
7119 the number of occurrences of each symbol, and later reassigned to
7120 `shift_symbol', containing the symbol that can be shifted from a
7121 given state.
7122 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7123 only, and...
7124 (new_itemsets): Allocate `shift_symbol' here.
7125 (allocate_itemsets): symbol_count includes useless nonterminals.
7126 Make room for them.
7127 (free_storage): Use `free', not `XFREE', for pointers that cannot
7128 be null.
7129
71302001-12-05 Akim Demaille <akim@epita.fr>
7131
7132 * src/nullable.c (set_nullable): Deobfuscate the handling of
7133 ritem.
7134 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7135
71362001-12-05 Akim Demaille <akim@epita.fr>
7137
7138 * src/gram.c, src/gram.h (ritem_print): New.
7139 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7140 (This useless function was defined only to work around VMS linkers
7141 that can't handle compilation units with variables only).
7142 * src/reduce.c (dump_grammar): Use it to trace the construction of
7143 ritem.
7144
71452001-12-04 Paul Eggert <eggert@twinsun.com>
7146
7147 * src/bison.simple (union yyalloc): Change member names
7148 to be the same as the stack names.
7149 (yyparse): yyptr is now union yyalloc *, not char *.
7150 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7151 and may generate better code on some machines.
7152 (yystpcpy): Use prototype if __STDC__ is defined, not just
7153 if __cplusplus is defined.
7154
71552001-11-30 Akim Demaille <akim@epita.fr>
7156
7157 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7158 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7159 Gettext doesn't compile cleanly, and dies with -Werror.
7160 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7161 Include WARNING_CFLAGS here.
7162 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7163 before being defined.
7164
71652001-11-27 Paul Eggert <eggert@twinsun.com>
7166
7167 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7168 First arg is int, not unsigned.
7169 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7170 (SIZE_MAX, UINT_MAX): New macros.
7171 (quotearg_n_options): Abort if N is negative.
7172 Avoid overflow check on hosts where size_t is 64 bits and int
7173 is 32 bits, as overflow is impossible there.
7174 Fix off-by-one typo that caused unnecessary reallocation.
7175
71762001-11-29 Paul Eggert <eggert@twinsun.com>
7177
7178 Name space cleanup in generated parser.
7179
7180 * doc/bison.texinfo (Bison Parser): Discuss system headers
7181 and their effect on the user name space.
7182
7183 * src/bison.simple:
7184 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7185 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7186 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7187
7188 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7189 on user names when possible.
7190
7191 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7192 Simplify test for whather <alloca.h> exists.
7193
7194 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7195
7196 (<stdio.h>): Include if YYDEBUG.
7197
7198 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7199 ! defined (yyoverflow) && ! defined (yymemcpy).
7200
7201 (yymemcpy, yyparse): Rename local variables as needed so that
7202 they all begin with 'yy'.
7203
7204 (yystrlen, yystpcpy): New functions.
7205
7206 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7207 All uses changed.
7208
7209 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7210 instead of relying on string.h functions. Use YYSTACK_ALLOC
7211 and YYSTACK_FREE instead of malloc and free.
7212
72132001-11-30 Akim Demaille <akim@epita.fr>
7214
7215 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7216 before their first uses.
7217 (YYBISON, YYPURE): Move to the top of the output.
7218
72192001-11-30 Akim Demaille <akim@epita.fr>
7220
7221 * tests/reduce.at (Useless Nonterminals): Fix.
7222
72232001-11-30 Akim Demaille <akim@epita.fr>
7224
7225 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7226 if body instead of `;' to pacify GCC's warnings.
7227
72282001-11-30 Akim Demaille <akim@epita.fr>
7229
7230 Instead of mapping the LHS of unused rules to -1, keep the LHS
7231 valid, but flag the rules as invalid.
7232
7233 * src/gram.h (rule_t): `useful' is a new member.
7234 * src/print.c (print_grammar): Adjust.
7235 * src/derives.c (set_derives): Likewise.
7236 * src/reader.c (packgram, reduce_output): Likewise.
7237 * src/reduce.c (reduce_grammar_tables): Likewise.
7238 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7239
72402001-11-30 Akim Demaille <akim@epita.fr>
7241
7242 * src/reduce.c (reduce_output): Formatting changes.
7243 * src/print.c (print_results, print_grammar): Likewise.
7244 * tests/regression.at (Rule Line Numbers)
7245 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7246
72472001-11-30 Akim Demaille <akim@epita.fr>
7248
7249 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7250 useless nonterminals, move them at the end of the symbol arrays.
7251 (reduce_output): Adjust.
7252 * tests/reduce.at (Useless Nonterminals): Adjust.
7253
72542001-11-30 Akim Demaille <akim@epita.fr>
7255
7256 * src/reduce.c: Various comment/formatting changes.
7257 (nonterminals_reduce): New, extracted from...
7258 (reduce_grammar_tables): here.
7259 (reduce_grammar): Call nonterminals_reduce.
7260
72612001-11-29 Paul Eggert <eggert@twinsun.com>
7262
7263 * src/bison.simple (YYSTACK_REALLOC): Remove.
7264 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7265 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7266 New macros.
7267 (union yyalloc): New type.
7268 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7269 an arbitrary restriction on hosts where size_t is wider than int.
7270
7271 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7272 a parser stack overflow. Allocate just one block of memory for all
7273 three stacks, instead of allocating three blocks; this typically is
7274 faster and reduces fragmentation.
7275
7276 Do not limit the number of items in the stack to a value that fits
7277 in 'int', as this is an arbitrary limit on hosts with 64-bit
7278 size_t and 32-bit int.
7279
72802001-11-29 Marc Autret <autret_m@epita.fr>
7281
7282 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7283 of defining YYERROR_VERBOSE.
7284 [AT_DATA]: $4 is now out of C declarations in the prologue.
7285
72862001-11-28 Marc Autret <autret_m@epita.fr>
7287
7288 * src/reader.c (parse_dquoted_param): New.
7289 (parse_skel_decl): Use it.
7290 * src/lex.h: Add its prototype.
7291 * src/lex.c (literalchar): Become not static.
7292
72932001-11-28 Marc Autret <autret_m@epita.fr>
7294
7295 * src/output.h: And put its extern declaration here.
7296 * src/output.c (error_verbose): Define here.
7297 (prepare): Echo name modification.
7298 * src/getargs.h: Clean its extern declaration.
7299 * src/getargs.c (error_verbose_flag): Remove.
7300 (getargs): Remove case 'e'.
7301 * src/options.c (option_table): 'error-verbose' is now seen as simple
7302 percent option.
7303 Include output.h.
7304
7305 * src/reader.c (read_declarations): Remove case tok_include.
7306 (parse_include_decl): Remove.
7307 * src/lex.h (token_t): Remove tok_include.
7308 * src/options.c (option_table): 'include' is now a simple command line
7309 option.
7310
73112001-11-28 Marc Autret <autret_m@epita.fr>
7312
7313 * src/bison.simple: Adjust muscle names.
7314 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7315 * src/output.c (prepare): s/_/-/ for the muscles names.
7316 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7317
73182001-11-28 Marc Autret <autret_m@epita.fr>
7319
7320 * src/bison.simple: Fix debug.
7321 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7322
73232001-11-28 Akim Demaille <akim@epita.fr>
7324
7325 * src/LR0.c (shifts_new): New.
7326 (save_shifts, insert_start_shift, augment_automaton): Use it.
7327
73282001-11-28 Akim Demaille <akim@epita.fr>
7329
7330 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7331 keep ruleno only.
7332
73332001-11-28 Akim Demaille <akim@epita.fr>
7334
7335 * src/closure.c (closure): Instead of looping over word in array
7336 then bits in words, loop over bits in array.
7337
73382001-11-28 Akim Demaille <akim@epita.fr>
7339
7340 * src/closure.c (closure): No longer optimize the special case
7341 where all the bits of `ruleset[r]' are set to 0, to make the code
7342 clearer.
7343
73442001-11-28 Akim Demaille <akim@epita.fr>
7345
7346 * src/closure.c (closure): `r' and `c' are new variables, used to
7347 de-obfuscate accesses to RULESET and CORE.
7348
73492001-11-28 Akim Demaille <akim@epita.fr>
7350
7351 * src/reduce.c (reduce_print): Use ngettext.
7352 (dump_grammar): Improve the trace accuracy.
7353
73542001-11-28 Akim Demaille <akim@epita.fr>
7355
7356 * src/reduce.c (dump_grammar): Don't translate trace messages.
7357
73582001-11-28 Akim Demaille <akim@epita.fr>
7359
7360 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7361 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7362 as all tags are free'ed afterwards.
7363 From Enrico Scholz.
7364
73652001-11-27 Paul Eggert <eggert@twinsun.com>
7366
7367 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7368 use alloca when we didn't want to, and vice versa.
7369
73702001-11-27 Marc Autret <autret_m@epita.fr>
7371
7372 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7373 initialization.
7374 * src/output.c (prepare): Remove its update.
7375
73762001-11-27 Marc Autret <autret_m@epita.fr>
7377
7378 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7379 Use %error-verbose.
7380
73812001-11-27 Marc Autret <autret_m@epita.fr>
7382
7383 * src/bison.simple: Remove YYERROR_VERBOSE using.
7384 Use %%error_verbose.
7385 (yyparse): Likewise.
7386 * src/output.c (prepare): Give its final value.
7387 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7388 * src/getargs.h: Add its extern declaration.
7389 * src/getargs.c (error_verbose_flag): New int.
7390 (getargs): Update to catch new case.
7391 * src/options.c (option_table): 'error-verbose' is a new option.
7392 (shortopts): Update.
7393
73942001-11-27 Akim Demaille <akim@epita.fr>
7395
7396 * src/system.h: Use intl/libgettext.h.
7397 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7398
73992001-11-27 Akim Demaille <akim@epita.fr>
7400
7401 * tests/torture.at (Exploding the Stack Size with Malloc):
7402 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7403
74042001-11-27 Akim Demaille <akim@epita.fr>
7405
7406 * src/files.c: Include error.h.
7407 Reported by Hans Aberg.
7408
74092001-11-26 Marc Autret <autret_m@epita.fr>
7410
7411 * src/reader.c (parse_include_decl): New, not yet implemented.
7412 (read_declarations): Add case tok_include.
7413 * src/getargs.h (include): Add its extern definition.
7414 * src/getargs.c (include): New const char *.
7415 (getargs): Add case '-I'.
7416 * src/options.c (option_table): Add include as command line and
7417 percent option.
7418 * src/lex.h (token_t): Add tok_include.
7419
74202001-11-26 Akim Demaille <akim@epita.fr>
7421
7422 * src/reader.c (readgram): Make sure rules for mid-rule actions
7423 have a lineno equal to that of their host rule.
7424 Reported by Hans Aberg.
7425 * tests/regression.at (Rule Line Numbers): New.
7426
74272001-11-26 Akim Demaille <akim@epita.fr>
7428
7429 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7430 size_ts.
7431
74322001-11-26 Akim Demaille <akim@epita.fr>
7433
7434 * src/complain.c, src/complain.h (error): Remove, provided by
7435 lib/error.[ch].
7436
74372001-11-26 Akim Demaille <akim@epita.fr>
7438
7439 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7440 issue an error message.
7441 * tests/regression.at (Invalid %directive): New.
7442 Reported by Hans Aberg.
7443
74442001-11-26 Akim Demaille <akim@epita.fr>
7445
7446 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7447 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7448
74492001-11-26 Akim Demaille <akim@epita.fr>
7450
7451 * src/conflicts.c (conflicts_print): Don't complain at all when
7452 there are no reduce/reduce conflicts, and as many shift/reduce
7453 conflicts as expected.
7454 * tests/regression.at (%expect right): Adjust.
7455
74562001-11-23 Akim Demaille <akim@epita.fr>
7457
7458 * lib/alloca.c: Update, from fileutils.
7459
74602001-11-23 Akim Demaille <akim@epita.fr>
7461
7462 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7463
74642001-11-23 Akim Demaille <akim@epita.fr>
7465
7466 * src/system.h: Include alloca.h.
7467 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7468
74692001-11-23 Akim Demaille <akim@epita.fr>
7470
7471 * src/print_graph.c (print_actions): Remove `rule', unused.
7472 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7473 pacify GCC's signed < unsigned warnings.
7474 * src/closure.c (itemsetsize): Likewise.
7475 * src/reader.c (symbol_list_new): Static.
7476
74772001-11-23 Akim Demaille <akim@epita.fr>
7478
7479 Attaching lineno to buckets is stupid, since only one copy of each
7480 symbol is kept, only the line of the first occurrence is kept too.
7481
7482 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7483 * src/reader.c (rline_allocated): Remove, unused.
7484 (symbol_list): Have a `line' member.
7485 (symbol_list_new): New.
7486 (readgram): Use it.
7487 * src/print.c (print_grammar): Output the rule line numbers.
7488 * tests/regression.at (Solved SR Conflicts)
7489 (Unresolved SR Conflicts): Adjust.
7490 Reported by Hans Aberg.
7491
74922001-11-22 Marc Autret <autret_m@epita.fr>
7493
7494 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7495
74962001-11-22 Marc Autret <autret_m@epita.fr>
7497
7498 * src/muscle_tab.c (muscle_init): Remove initialization of
7499 skeleton muscle.
7500 * src/output.c (output_master_parser): Do it here.
7501
75022001-11-20 Akim Demaille <akim@epita.fr>
7503
7504 * po/sv.po: New.
7505 * configure.in (ALL_LINGUAS): Adjust.
7506 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7507 longer contains strings to translate.
7508
75092001-11-19 Akim Demaille <akim@epita.fr>
7510
7511 * src/conflicts.c (conflicts_print): Add a missing \n.
7512
75132001-11-19 Akim Demaille <akim@epita.fr>
7514
7515 * src/nullable.c (nullable_print): New.
7516 (set_nullable): Call it when tracing.
7517 Better locality of variables.
7518
75192001-11-19 Akim Demaille <akim@epita.fr>
7520
7521 * src/print.c (print_actions): Better locality of variables.
7522
75232001-11-19 Akim Demaille <akim@epita.fr>
7524
7525 * src/derives.c (print_derives): Fix and enrich.
7526 * src/closure.c (print_fderives): Likewise.
7527
75282001-11-19 Akim Demaille <akim@epita.fr>
7529
7530 * src/closure.c (itemsetend): Remove, replaced with...
7531 (itemsetsize): new.
7532
75332001-11-19 Akim Demaille <akim@epita.fr>
7534
7535 * src/LR0.c (kernel_end): Remove, replaced with...
7536 (kernel_size): new.
7537
75382001-11-19 Akim Demaille <akim@epita.fr>
7539
7540 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7541 to clarify.
7542
75432001-11-19 Akim Demaille <akim@epita.fr>
7544
7545 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7546
75472001-11-19 Akim Demaille <akim@epita.fr>
7548
7549 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7550 trace messages.
7551 * src/LR0.c: Likewise.
7552 (allocate_itemsets): Use arrays instead of pointers to clarify.
7553
75542001-11-19 Akim Demaille <akim@epita.fr>
7555
7556 * src/getargs.c (statistics_flag): Replace with...
7557 (trace_flag): New.
7558 (longopts): Accept --trace instead of --statistics.
7559 * src/getargs.h, src/options.c: Adjust.
7560 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7561 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7562
75632001-11-19 Akim Demaille <akim@epita.fr>
7564
7565 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7566 pointers to clarify the code.
7567 (save_reductions, save_shifts): Factor common parts of alternatives.
7568
75692001-11-19 Akim Demaille <akim@epita.fr>
7570
7571 * src/LR0.c (new_state, get_state): Complete TRACE code.
7572 * src/closure.c: Include `reader.h' to get `tags', needed by the
7573 trace code.
7574 Rename the conditional DEBUG as TRACE.
7575 Output consistently TRACEs to stderr, not stdout.
7576 * src/derives.c: Likewise.
7577 * src/reduce.c: (inaccessable_symbols): Using if is better style
7578 than goto.
7579 Use `#if TRACE' instead of `#if 0' for tracing code.
7580
75812001-11-19 Akim Demaille <akim@epita.fr>
7582
7583 * src/system.h (LIST_FREE, shortcpy): New.
7584 * src/LR0.c: Use them.
7585 * src/output.c (free_itemsets, free_reductions, free_shifts):
7586 Remove, replaced by LIST_FREE.
7587
75882001-11-19 Akim Demaille <akim@epita.fr>
7589
7590 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7591 (REDUCTIONS_ALLOC): New.
7592 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7593 allocation.
7594
75952001-11-19 Akim Demaille <akim@epita.fr>
7596
7597 * src/LR0.c (new_state): Complete trace code.
7598 * src/nullable.c (set_nullable): Don't translate traces.
7599
76002001-11-19 Akim Demaille <akim@epita.fr>
7601
7602 * src/print_graph.c (print_core): Better locality of variables.
7603 * src/print.c (print_core): Likewise.
7604
76052001-11-19 Akim Demaille <akim@epita.fr>
7606
7607 * src/vcg.c: You do the output, so you are responsible of the
7608 handling of VCG syntax, in particular: use quotearg.
7609 * src/print_graph.c: Don't.
7610 (print_actions): Don't output the actions as part of the nodes,
7611 since that's the job of the edges.
7612 (print_state): Don't output by hand: fill the node description,
7613 and ask for its output.
7614
76152001-11-19 Akim Demaille <akim@epita.fr>
7616
7617 * src/bison.simple (yyparse): When verbosely reporting an error,
7618 no longer put additional quotes around token names.
7619 * tests/calc.at: Adjust.
7620
76212001-11-19 Akim Demaille <akim@epita.fr>
7622
7623 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7624 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7625 * src/output.c: Adjust.
7626
76272001-11-19 Akim Demaille <akim@epita.fr>
7628
7629 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7630 (rule_t): this.
7631 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7632
76332001-11-19 Akim Demaille <akim@epita.fr>
7634
7635 * src/gram.h (rule_t): New.
7636 (rule_table): New.
7637 (rrhs, rlhs): Remove, part of state_t.
7638 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7639 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7640 * src/reader.c, src/reduce.c: Adjust.
7641
76422001-11-19 Akim Demaille <akim@epita.fr>
7643
7644 * src/reader.c (symbols_output): New, extracted from...
7645 (packsymbols): Here.
7646 (reader): Call it.
7647
76482001-11-19 Akim Demaille <akim@epita.fr>
7649
7650 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7651 (maxrhs): this new function.
7652
76532001-11-19 Akim Demaille <akim@epita.fr>
7654
7655 * src/lalr.c (F): New macro to access the variable F.
7656 Adjust.
7657
76582001-11-19 Akim Demaille <akim@epita.fr>
7659
7660 * src/lalr.h (LA): New macro to access the variable LA.
7661 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7662 * src/lalr.c: Adjust.
7663
76642001-11-19 Akim Demaille <akim@epita.fr>
7665
7666 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7667 (set_state_table): handle the `lookaheads' members.
7668
76692001-11-19 Akim Demaille <akim@epita.fr>
7670
7671 * src/lalr.h (lookaheads): Removed array, whose contents is now
7672 a member of...
7673 (state_t): this structure.
7674 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7675 Adjust.
7676
76772001-11-19 Akim Demaille <akim@epita.fr>
7678
7679 * src/lalr.h (consistent): Removed array, whose contents is now
7680 a member of...
7681 (state_t): this structure.
7682 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7683 Adjust.
7684
76852001-11-19 Akim Demaille <akim@epita.fr>
7686
7687 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7688 contents are now members of...
7689 (state_t): this structure.
7690 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7691 Adjust.
7692
76932001-11-19 Akim Demaille <akim@epita.fr>
7694
7695 * src/lalr.h (state_t): New.
7696 (state_table): Be a state_t * instead of a core **.
7697 (accessing_symbol): Remove, part of state_t.
7698 * src/lalr.c: Adjust.
7699 (set_accessing_symbol): Merge into...
7700 (set_state_table): this.
7701 * src/print_graph.c, src/conflicts.c: Adjust.
7702
77032001-11-14 Akim Demaille <akim@epita.fr>
7704
7705 * tests/calc.at, tests/output.at, tests/regression.at,
7706 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7707 now the tests are run in private dirs, therefore AC_CLEANUP and
7708 family can be simplified to 0-ary.
7709 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7710 use abs. path to find config.h.
7711 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7712 stderr, there can be way too much random noise.
7713 Instead pass -Werror to GCC and rely on the exit status.
7714 Reported by Wolfram Wagner.
7715
77162001-11-14 Akim Demaille <akim@epita.fr>
7717
7718 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7719 defined only if yyoverflow is defined, to avoid `warning: unused
7720 variable `yyvs1''.
7721 Reported by The Test Suite.
7722
77232001-11-14 Akim Demaille <akim@epita.fr>
7724
7725 * src/print.c: Include reduce.h.
7726 Reported by Hans Aberg.
7727
77282001-11-14 Akim Demaille <akim@epita.fr>
7729
7730 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7731 Revert a previous patch: these are really const.
7732 * src/conflicts.c (conflict_report): Additional useless pair of
7733 braces to pacify GCC's warnings for `if () if () {} else {}'.
7734 * src/lex.c (parse_percent_token): Replace equal_offset with
7735 arg_offset.
7736 arg is const.
7737 Be sure to strdup `arg' when used, since there is no reason for
7738 token_buffer not to change.
7739
77402001-11-14 Akim Demaille <akim@epita.fr>
7741
7742 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7743 definition.
7744 * src/main.c (main): Use them.
7745 Suggested by Hans Aberg.
7746
77472001-11-12 Akim Demaille <akim@epita.fr>
7748
7749 * src/system.h (ngettext): Now that we use ngettext, be sure to
7750 provide a default definition when NLS are not used.
7751
77522001-11-12 Akim Demaille <akim@epita.fr>
7753
7754 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7755 Use @kbd to denote user input.
7756 (Language and Grammar): ANSIfy the example.
7757 Adjust its layout for info/notinfo.
7758 (Location Tracking Calc): Output error messages to stderr.
7759 Output locations in a more GNUtically correct way.
7760 Fix a couple of Englishos.
7761 Adjust @group/@end group pairs.
7762
77632001-11-12 Akim Demaille <akim@epita.fr>
7764
7765 %expect was not functioning at all.
7766
7767 * src/conflicts.c (expected_conflicts): Set to -1.
7768 (conflict_report): Use ngettext.
7769 (conflicts_print): Check %expect and make its violation an error.
7770 * doc/bison.texinfo (Expect Decl): Adjust.
7771 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7772 * tests/regression.at (%expect not enough, %expect right)
7773 (%expect too much): New.
7774
77752001-11-12 Akim Demaille <akim@epita.fr>
7776
7777 * tests/regression.at (Conflicts): Rename as...
7778 (Unresolved SR Conflicts): this.
7779 (Solved SR Conflicts): New.
7780
77812001-11-12 Akim Demaille <akim@epita.fr>
7782
7783 * src/reduce.c (print_results): Rename as...
7784 (reduce_output): This.
7785 Output to OUT, passed as argument, instead of output_obstack.
7786 (dump_grammar): Likewise.
7787 (reduce_free): New.
7788 Also free V1.
7789 (reduce_grammar): No longer call reduce_output, since...
7790 * src/print.c (print_results): do it.
7791 * src/main.c (main): Call reduce_free;
7792
77932001-11-12 Akim Demaille <akim@epita.fr>
7794
7795 * src/conflicts.c (print_reductions): Accept OUT as argument.
7796 Output to it, not to output_obstack.
7797 * src/print.c (print_actions): Adjust.
7798
77992001-11-12 Akim Demaille <akim@epita.fr>
7800
7801 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7802 the result instead of using...
7803 (src_total, rrc_total, src_count, rrc_count): Remove.
7804 (any_conflicts): Remove.
7805 (print_conflicts): Split into...
7806 (conflicts_print, conflicts_output): New.
7807 * src/conflicts.h: Adjust.
7808 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7809 * src/print.c (print_grammar): Issue `\n' between two rules.
7810 * tests/regression.at (Conflicts): New.
7811 Reported by Tom Lane.
7812
78132001-11-12 Akim Demaille <akim@epita.fr>
7814
7815 * tests/regression.at (Invalid input): Remove, duplicate with
7816 ``Invalid input: 1''.
7817
78182001-11-12 Akim Demaille <akim@epita.fr>
7819
7820 * tests/torture.at (AT_DATA_STACK_TORTURE)
7821 (Exploding the Stack Size with Alloca)
7822 (Exploding the Stack Size with Malloc): New.
7823
78242001-11-12 Akim Demaille <akim@epita.fr>
7825
7826 * src/bison.simple (YYSTACK_REALLOC): New.
7827 (yyparse) [!yyoverflow]: Use it and free the old stack.
7828 Reported by Per Allansson.
7829
78302001-11-12 Pascal Bart <pascal.bart@epita.fr>
7831
7832 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7833 define CPP macro, which substitute YYSTYPE by yystype.
7834 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7835 with yyltype/YYLTYPE. This allows inclusion of the generated
7836 header within the parser if the compiler, such as GGC, accepts
7837 multiple equivalent #defines.
7838 From Akim.
7839
78402001-11-05 Akim Demaille <akim@epita.fr>
7841
7842 * src/reader.c (symbols_output): New, extracted from...
7843 (packsymbols): here.
7844 (reader): Adjust.
7845
78462001-11-05 Akim Demaille <akim@epita.fr>
7847
7848 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7849
78502001-11-05 Akim Demaille <akim@epita.fr>
7851
7852 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7853 pattern.
7854
78552001-11-05 Akim Demaille <akim@epita.fr>
7856
7857 * src/options.h (struct option_table_struct): set_flags is void*.
7858 * src/options.c (longopts): Support `--output' and `%output'.
7859 (usage): Adjust.
7860 * src/lex.h (tok_setopt): Remove, replaced with...
7861 (tok_intopt, tok_stropt): these new guys.
7862 * src/lex.c (getopt.h): Not needed.
7863 (token_buffer, unlexed_token_buffer): Not const.
7864 (percent_table): Promote `-' over `_' in directive names.
7865 Active `%name-prefix', `file-prefix', and `output'.
7866 (parse_percent_token): Accept possible arguments to directives.
7867 Promote `-' over `_' in directive names.
7868
78692001-11-04 Akim Demaille <akim@epita.fr>
7870
7871 * doc/bison.texinfo (Decl Summary): Split the list into
7872 `directives for grammars' and `directives for bison'.
7873 Sort'em.
7874 Add description of `%name-prefix', `file-prefix', and `output'.
7875 Promote `-' over `_' in directive names.
7876 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7877 Simplify the description of `--name-prefix'.
7878 Promote `-' over `_' in directive names.
7879 Promote `--output' over `--output-file'.
7880 Fix the description of `--defines'.
7881 * tests/output.at: Exercise %file-prefix and %output.
7882
78832001-11-02 Akim Demaille <akim@epita.fr>
7884
7885 * doc/refcard.tex: Update.
7886
78872001-11-02 Akim Demaille <akim@epita.fr>
7888
7889 * src/symtab.h (SUNDEF): New.
7890 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7891 stand for `uninitialized', instead of 0.
7892 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7893 * src/lex.c (lex): Adjust.
7894
7895 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7896 Number it 0.
7897 Let yylex return it instead of a plain 0.
7898 Reported by Dick Streefland.
7899
79002001-11-02 Akim Demaille <akim@epita.fr>
7901
7902 * tests/regression.at (Mixing %token styles): New test.
7903
79042001-11-02 Akim Demaille <akim@epita.fr>
7905
7906 * src/reader.c (parse_thong_decl): Formatting changes.
7907 (token_translations_init): New, extracted from...
7908 (packsymbols): Here.
7909 Adjust.
7910
79112001-11-01 Akim Demaille <akim@epita.fr>
7912
7913 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7914 Check that `9foo.y' produces correct cpp guards.
7915 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7916 guards.
7917 Reported by Wwp.
7918
79192001-11-01 Akim Demaille <akim@epita.fr>
7920
7921 * tests/regression.at (Invalid input: 2): New.
7922 * src/lex.c (unlexed_token_buffer): New.
7923 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7924 too.
7925 Reported by Wwp.
7926
79272001-11-01 Akim Demaille <akim@epita.fr>
7928
7929 * tests/calc.at: Catch up with 1.30.
7930 * configure.in: Bump to 1.49a.
7931 Adjust to newer Autotest.
7932
79332001-10-19 Pascal Bart <pascal.bart@epita.fr>
7934
7935 * src/conflicts.c: Move global variables rrc_total and src_total ...
7936 (print_conflicts): here.
7937 * src/output.c (output): Free global variable user_toknums.
7938 * src/lex.c (token_obstack): Become static.
7939
79402001-10-18 Akim Demaille <akim@epita.fr>
7941
7942 * tests/atlocal.in (GCC): Add.
7943 * tests/calc.at: s/m4_match/m4_bmatch/.
7944 s/m4_patsubst/m4_bpatsubst/.
7945 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7946 * configure.in: AC_SUBST(GCC).
7947
79482001-10-14 Marc Autret <autret_m@epita.fr>
7949
7950 * src/options.c (create_long_option_table): Fix.
7951
79522001-10-10 Akim Demaille <akim@epita.fr>
7953
7954 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7955
79562001-10-04 Akim Demaille <akim@epita.fr>
7957
7958 * src/reader.c (parse_union_decl): Push the caracters in
7959 union_obstack, not attrs_obstack.
7960
79612001-10-04 Akim Demaille <akim@epita.fr>
7962
7963 Merge in the branch 1.29.
7964
7965 * src/reader.c (packsymbols): Use a temporary obstack for
7966 `%%tokendef', since output_stack is already used elsewhere.
7967
7968 2001-10-02 Akim Demaille <akim@epita.fr>
7969
7970 Bump 1.29d.
7971
7972 2001-10-02 Akim Demaille <akim@epita.fr>
7973
7974 Version 1.29c.
7975
7976 2001-10-02 Akim Demaille <akim@epita.fr>
7977
7978 * tests/regression.at (Invalid CPP headers): New.
7979 From Alexander Belopolsky.
7980 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7981
7982 2001-10-02 Akim Demaille <akim@epita.fr>
7983
7984 * tests/regression.at (Invalid input): New.
7985 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7986 Reported by Shura.
7987
7988 2001-10-02 Akim Demaille <akim@epita.fr>
7989
7990 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7991
7992 2001-10-02 Akim Demaille <akim@epita.fr>
7993
7994 * src/output.c (output_parser): Assert `skeleton'.
7995 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7996 systems.
7997 From Shura.
7998
7999 2001-10-01 Marc Autret <autret_m@epita.fr>
8000
8001 * src/lex.h: Echo modifications.
8002 * src/lex.c (unlex): Parameter is now token_t.
8003 From Hans Aberg.
8004
8005 2001-10-01 Marc Autret <autret_m@epita.fr>
8006
8007 * src/main.c: Include lex.h.
8008 From Hans Aberg.
8009
8010 2001-09-29 Akim Demaille <akim@epita.fr>
8011
8012 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8013
8014 2001-09-28 Akim Demaille <akim@epita.fr>
8015
8016 * tests/testsuite.at: Update to newer Autotest.
8017 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8018
8019 2001-09-27 Akim Demaille <akim@epita.fr>
8020
8021 Position independent wrapper.
8022
8023 * tests/bison: Remove.
8024 * tests/bison.in: New.
8025 * configure.in: Adjust.
8026
8027 2001-09-27 Paul Eggert <eggert@twinsun.com>
8028
8029 Port quotearg fixes from tar 1.13.24.
8030
8031 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8032 tm to be declared.
8033 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8034 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8035
8036 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8037 * m4/mbrtowc.m4: New file.
8038 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8039 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8040
8041 2001-09-27 Akim Demaille <akim@epita.fr>
8042
8043 Bump to 1.29c.
8044
8045 2001-09-27 Akim Demaille <akim@epita.fr>
8046
8047 Version 1.29b.
8048
8049 2001-09-25 Akim Demaille <akim@epita.fr>
8050
8051 * src/system.h: Include `xalloc.h'.
8052 Remove it from the C files.
8053 * src/files.c (output_files): Free the obstacks.
8054 * src/lex.c (init_lex): Rename as...
8055 (lex_init): this.
8056 (lex_free): New.
8057 * src/main.c (main): Use it.
8058
8059 2001-09-24 Marc Autret <autret_m@epita.fr>
8060
8061 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8062 to output informations in fout (FILE*).
8063 (open_graph, close_graph): Likewise.
8064 (output_graph, output_edge, output_node): Likewise.
8065 * src/vcg.h: Update function prototypes.
8066 * src/print_graph.c (print_graph): Open output graph file.
8067 (print_actions): Adjust.
8068 * src/files.h: Remove extern declaration.
8069 * src/files.c: Remove graph_obstack declaration.
8070 (open_files): Remove graph_obstack initialization.
8071 (output_files): Remove graph_obstack saving.
8072
8073 2001-09-24 Marc Autret <autret_m@epita.fr>
8074
8075 * src/files.c (compute_output_file_names): Fix.
8076
8077 2001-09-24 Marc Autret <autret_m@epita.fr>,
8078 Akim Demaille <akim@epita.fr>
8079
8080 * src/reader.c (reader): Remove call to free_symtab ().
8081 * src/main.c (main): Call it here.
8082 Include symtab.h.
8083 * src/conflicts.c (initialize_conflicts): Rename as...
8084 (solve_conflicts): this.
8085 * src/print.c (print_core, print_actions, print_state)
8086 (print_grammar): Dump to a file instead a `output_obstack'.
8087 (print_results): Dump `output_obstack', and then proceed with the
8088 FILE *.
8089 * src/files.c (compute_output_file_names, close_files): New.
8090 (output_files): Adjust.
8091 * src/main.c (main): Adjust.
8092
8093 2001-09-23 Marc Autret <autret_m@epita.fr>
8094
8095 * src/files.c (compute_header_macro): Computes header macro name
8096 from spec_defines_file when given.
8097
8098 2001-09-23 Marc Autret <autret_m@epita.fr>
8099
8100 * src/files.c (output_files): Add default extensions.
8101
8102 2001-09-22 Akim Demaille <akim@epita.fr>
8103
8104 * src/conflicts.c (finalize_conflicts): Rename as...
8105 (free_conflicts): this.
8106
8107 2001-09-22 Akim Demaille <akim@epita.fr>
8108
8109 * src/gram.c (gram_free): Rename back as...
8110 (dummy): this.
8111 (output_token_translations): Free `token_translations'.
8112 * src/symtab.c (free_symtab): Free the tag field.
8113
8114 2001-09-22 Akim Demaille <akim@epita.fr>
8115
8116 Remove `translations' as it is always set to true.
8117
8118 * src/gram.h: Adjust.
8119 * src/reader.c (packsymbols, parse_token_decl): Adjust
8120 * src/print.c (print_grammar): Adjust.
8121 * src/output.c (output_token_translations): Adjust.
8122 * src/lex.c (lex): Adjust.
8123 * src/gram.c: Be sure the set pointers to NULL.
8124 (dummy): Rename as...
8125 (gram_free): this.
8126
8127 2001-09-22 Akim Demaille <akim@epita.fr>
8128
8129 * configure.in: Invoke AM_LIB_DMALLOC.
8130 * src/system.h: Use dmalloc.
8131 * src/LR0.c: Be sure to have pointers initialized to NULL.
8132 (allocate_itemsets): Allocate kernel_items only if needed.
8133
8134 2001-09-22 Akim Demaille <akim@epita.fr>
8135
8136 * configure.in: Bump to 1.29b.
8137 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8138 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8139 need xmalloc.c in calc.y.
8140 From Pascal Bart.
8141
8142 2001-09-21 Akim Demaille <akim@epita.fr>
8143
8144 Version 1.29a.
8145 * Makefile.maint, config/config.guess, config/config.sub,
8146 * config/missing: Update from masters.
8147 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8148 upon package.m4.
8149 * configure.in (ALL_LINGUAS): Add `tr'.
8150
8151 2001-09-21 Akim Demaille <akim@epita.fr>
8152
8153 * tests/Makefile.am (package.m4): Move to...
8154 ($(srcdir)/$(TESTSUITE)): here.
8155
8156 2001-09-20 Akim Demaille <akim@epita.fr>
8157
8158 * src/complain.c: No longer try to be standalone: use system.h.
8159 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8160 * src/complain.h: Likewise.
8161 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8162 Remove the unused variable `n'.
8163 From Albert Chin-A-Young.
8164
8165 2001-09-18 Marc Autret <autret_m@epita.fr>
8166
8167 * doc/bison.1: Update.
8168 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8169 descriptions.
8170 (Option Cross Key): Update.
8171 Add --graph.
8172
8173 2001-09-18 Marc Autret <autret_m@epita.fr>
8174
8175 * tests/regression.at: New test (comment in %union).
8176
8177 2001-09-18 Marc Autret <autret_m@epita.fr>
8178
8179 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8180 do that.
8181 Reported by Keith Browne.
8182
8183 2001-09-18 Marc Autret <autret_m@epita.fr>
8184
8185 * tests/output.at: Add tests for --defines and --graph.
8186
8187 2001-09-18 Marc Autret <autret_m@epita.fr>
8188
8189 * tests/output.at: Removes tests of %{header,src}_extension features.
8190
8191 2001-09-18 Akim Demaille <akim@epita.fr>
8192
8193 * tests/Makefile.am (package.m4): New.
8194 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8195 (_AT_CHECK_CALC_ERROR): Likewise.
8196 Factor the `, ' part of verbose error messages.
8197
8198 2001-09-18 Marc Autret <autret_m@epita.fr>
8199
8200 * src/getargs.c (longopts): Declare --defines and --graph as options
8201 with optional arguments.
8202 * src/files.h: Add extern declarations.
8203 * src/files.c (spec_graph_file, spec_defines_file): New.
8204 (output_files): Update.
8205 Remove CPP-outed code.
8206
8207 2001-09-18 Marc Autret <autret_m@epita.fr>
8208
8209 Turn off %{source,header}_extension feature.
8210
8211 * src/files.c (compute_exts_from_gf): Update.
8212 (compute_exts_from_src): Update.
8213 (output_files): CPP-out useless code.
8214 * src/files.h: Remove {header,source}_extension extern declarations.
8215 * src/reader.c (parse_dquoted_param): CPP-out.
8216 (parse_header_extension_decl): Remove.
8217 (parse_source_extension_decl): Remove.
8218 (read_declarations): Remove cases tok_{hdrext,srcext}.
8219 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8220 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8221
8222 2001-09-10 Akim Demaille <akim@epita.fr>
8223
8224 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8225 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8226 (AT_CHECK_OUTPUT): this.
8227 Merely check ls' exit status, its output is useless.
8228
8229 2001-09-10 Akim Demaille <akim@epita.fr>
8230
8231 * tests/calc.at: Use m4_match.
8232 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8233
8234 2001-09-10 Marc Autret <autret_m@epita.fr>,
8235 Akim Demaille <akim@epita.fr>
8236
8237 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8238 enum color_e.
8239 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8240 to `normal'.
8241 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8242 * src/lex.h: Adjust prototype.
8243 (token_t): Add `tok_undef'.
8244 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8245 (parse_percent_token): Now returns token_t.
8246 Add default statement in switch.
8247 (lex): Separate `c' as an input variable, from the token_t result
8248 part.
8249 (unlexed): Is a token_t.
8250
8251 2001-09-10 Akim Demaille <akim@epita.fr>
8252
8253 * configure.in: Bump to 1.29a.
8254
8255 2001-09-07 Akim Demaille <akim@epita.fr>
8256
8257 Version 1.29.
8258
8259 2001-08-30 Akim Demaille <akim@epita.fr>
8260
8261 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8262 * m4/atconfig.m4: Remove.
8263 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8264 * tests/bison: New.
8265 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8266 m4_if, m4_patsubst, and m4_regexp.
8267 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8268 `input' file instead of echo.
8269
8270 2001-08-29 Akim Demaille <akim@epita.fr>
8271
8272 Bump to 1.28e.
8273
8274 2001-08-29 Akim Demaille <akim@epita.fr>
8275
8276 Version 1.28d.
8277
8278 2001-08-29 Paul Eggert <eggert@twinsun.com>
8279
8280 * src/bison.simple (yyparse): Don't take the address of an
8281 item before the start of an array, as that doesn't conform to
8282 the C Standard.
8283
8284 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8285
8286 * doc/bison.texinfo (Location Tracking Calc): New node.
8287
8288 2001-08-29 Paul Eggert <eggert@twinsun.com>
8289
8290 * src/output.c (output): Do not define const, as this now
8291 causes more problems than it cures.
8292
8293 2001-08-29 Akim Demaille <akim@epita.fr>
8294
8295 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8296 the nodes.
8297 Be sure to tag the `detailmenu'.
8298
8299 2001-08-29 Akim Demaille <akim@epita.fr>
8300
8301 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8302 download in a tmp dir.
8303
8304 2001-08-28 Marc Autret <autret_m@epita.fr>
8305
8306 * config/depcomp: New file.
8307
8308 2001-08-28 Marc Autret <autret_m@epita.fr>
8309
8310 * doc/bison.1 (mandoc): Adjust.
8311 From Juan Manuel Guerrero.
8312
8313 2001-08-28 Marc Autret <autret_m@epita.fr>
8314
8315 * src/print_graph.c (print_state): Fix.
8316
8317 2001-08-27 Marc Autret <autret_m@epita.fr>
8318
8319 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8320 char * members.
8321 Echo modifications to the functions prototypes.
8322 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8323
8324 2001-08-27 Marc Autret <autret_m@epita.fr>
8325
8326 * src/vcg.c: Include `xalloc.h'.
8327 (add_colorentry): New.
8328 (add_classname): New.
8329 (add_infoname): New.
8330 * src/vcg.h: Add new prototypes.
8331
8332 2001-08-27 Akim Demaille <akim@epita.fr>
8333
8334 * Makefile.maint: Sync. again with CVS Autoconf.
8335
8336 2001-08-27 Akim Demaille <akim@epita.fr>
8337
8338 * Makefile.maint: Formatting changes.
8339 (po-update, cvs-update, update): New targets.
8340 (AMTAR): Remove.
8341
8342 2001-08-27 Akim Demaille <akim@epita.fr>
8343
8344 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8345 * Makefile.maint: Sync. with CVS Autoconf.
8346
8347 2001-08-27 Marc Autret <autret_m@epita.fr>
8348
8349 * src/vcg.h (struct infoname_s): New.
8350 (struct colorentry_s): New.
8351 (graph_s): New fields {vertical,horizontal}_order in structure.
8352 Add `infoname' field.
8353 Add `colorentry' field;
8354 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8355 (G_HORIZONTAL_ORDER): New.
8356 (G_INFONAME): New.
8357 (G_COLORENTRY): New.
8358 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8359 Add output of `infoname'.
8360 Add output of `colorentry'.
8361
8362 2001-08-27 Marc Autret <autret_m@epita.fr>
8363
8364 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8365 This one shadowed a global parameter.
8366
8367 2001-08-24 Marc Autret <autret_m@epita.fr>
8368
8369 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8370 instead of `unsigned'.
8371 (print_state): Do not call obstack_object_size () in obstack_grow ()
8372 to avoid macro variables shadowing.
8373
8374 2001-08-23 Marc Autret <autret_m@epita.fr>
8375
8376 * src/lex.c (percent_table): Typo: s/naem/name/.
8377 Add graph option.
8378 Normalize new options declarations.
8379
8380 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8381
8382 * tests/suite.at: Exercise %header_extension and %source_extension.
8383
8384 2001-08-16 Marc Autret <autret_m@epita.fr>
8385
8386 * src/reader.c (parse_dquoted_param): New.
8387 (parse_header_extension_decl): Use it.
8388 (parse_source_extension_decl): Likewise.
8389
8390 2001-08-16 Marc Autret <autret_m@epita.fr>
8391
8392 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8393 (get_xxxx_str): Use assert () instead of complain ().
8394 Remove return invokations in default cases.
8395 (get_decision_str): Modify default behaviour. Remove second argument.
8396 Echo modifications on calls.
8397 (output_graph): Fix.
8398
8399 2001-08-16 Marc Autret <autret_m@epita.fr>
8400
8401 * src/getargs.c (usage): Update with ``-g, --graph''.
8402
8403 2001-08-16 Marc Autret <autret_m@epita.fr>
8404
8405 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8406 (Option Cross Key): Likewise.
8407 * doc/bison.1: Update.
8408
84092001-09-25 Pascal Bart <pascal.bart@epita.fr>
8410
8411 * src/output.c (output_master_parser): Don't finish action_obstack.
8412 (output_parser): Don't care about the muscle action, here.
8413 (prepare): Copy the action_obstack in the action muscle.
8414 (output): Free action_obstack.
8415
84162001-09-23 Pascal Bart <pascal.bart@epita.fr>
8417
8418 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8419 will contain `%union' declaration.
8420 (parse_union_decl): Delete #line directive output.
8421 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8422 informations about %union.
8423 (parse_union_decl): Copy the union_obstack in the muscle stype.
8424 * src/bison.simple: Add new #line directive.
8425 Add typdef %%stype YYSTYPE.
8426
84272001-09-23 Pascal Bart <pascal.bart@epita.fr>
8428
8429 * src/bison.simple: Add new `#line' directive.
8430
84312001-09-22 Pascal Bart <pascal.bart@epita.fr>
8432
8433 * src/bison.simple: New `#line' directive.
8434 * src/output.c (output_parser): Support new dynamic muscle input_line.
8435
84362001-09-22 Marc Autret <autret_m@epita.fr>
8437
8438 * src/output.c (output_master_parser): New.
8439 (output_parser): Be more re-entrant.
8440
84412001-09-21 Marc Autret <autret_m@epita.fr>
8442
8443 * src/reader.c (copy_definition, parse_union_decl): Update and use
8444 `linef' muscle.
8445 (copy_action): Likewise.
8446 Use obstack_1grow ().
8447 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8448
84492001-09-21 Marc Autret <autret_m@epita.fr>
8450
8451 * src/options.c (option_table): Adjust.
8452 * src/lex.c (parse_percent_token): Fix.
8453
84542001-09-20 Pascal Bart <pascal.bart@epita.fr>
8455
8456 * src/options.c (symtab.h): Include it, need by lex.h.
8457
84582001-09-20 Pascal Bart <pascal.bart@epita.fr>
8459
8460 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8461 is now an option_table_struct*.
8462 (option_strcmp): New function option_strcmp.
8463 (parse_percent_token): Call option_strcmp.
8464 * src/getargs.c (xalloc.h, options.h): Include it.
8465 (getargs): Call create_long_option_table.
8466 (getargs): Free longopts at the end of the function.
8467 (shortopts): Move in options.c.
8468 * src/options.c (create_long_option_table): New function. Convert
8469 information from option_table to option structure.
8470 * src/reader.c (options.h): Include it.
8471
8472 * src/Makefile.am: Adjust.
8473 * src/options.c (option_table): Create from longopts and percent_table.
8474 * src/getargs.c (longopts): Delete.
8475 * src/lex.c (struct percent_table_struct): Delete.
8476 (percent_table): Delete.
8477 (options.h): Include it.
8478 * src/options.c: Create.
8479 * src/options.h: Create.
8480 Declare enum opt_access_e.
8481 Define struct option_table_struct.
8482
84832001-09-20 Marc Autret <autret_m@epita.fr>
8484
8485 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8486 sections of Bison.
8487
84882001-09-19 Pascal Bart <pascal.bart@epita.fr>
8489
8490 * src/bison.simple: s/%%filename/%%skeleton.
8491 * src/muscle_tab.c (getargs.h): Include it.
8492 (muscle_init): Insert new muscle skeleton.
8493
84942001-09-18 Pascal Bart <pascal.bart@epita.fr>
8495
8496 * src/output.c (output_parser): Delete unused variable actions_dumped.
8497
84982001-09-07 Pascal Bart <pascal.bart@epita.fr>
8499
8500 * src/output.c (output): Delete call to reader_output_yylsp.
8501 * src/reader.c (reader): Likewise.
8502 * src/reader.h: Delete declaration of reader_output_yylsp.
8503
85042001-09-02 Marc Autret <autret_m@epita.fr>
8505
8506 * src/reader.c: Include muscle_tab.h.
8507 (parse_union_decl): Update.
8508 (parse_macro_decl): Rename parse_muscle_decl.
8509 Update to use renamed functions and variable.
8510 (read_declarations, copy_action, read_additionnal_code, : Updated
8511 with correct variables and functions names.
8512 (packsymbols, reader): Likewise.
8513
8514 * src/reader.h (muscle_obstack): Extern declaration update.
8515
8516 * src/output.c: Include muscle_tab.h
8517 In all functions using macro_insert, change by using muscle_insert ().
8518 (macro_obstack): Rename muscle_obstack.
8519 Echo modifications in the whole file.
8520 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8521 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8522 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8523
8524 * src/muscle_tab.h: Update double inclusion macros.
8525 (macro_entry_s): Rename muscle_entry_s.
8526 Update prototypes.
8527
8528 * src/muscle_tab.c: Include muscle_tab.h.
8529 Rename macro_tabble to muscle_table.
8530 (mhash1, mhash2, mcmp): Use muscle_entry.
8531 (macro_init): Rename muscle_init. Update.
8532 (macro_insert): Rename muscle_insert. Update.
8533 (macro_find): Rename muscle_find. Update.
8534
8535 * src/main.c: Include muscle_tab.h.
8536 (main): Call muscle_init ().
8537 * src/Makefile.am (bison_SOURCES): Echo modifications.
8538
85392001-09-02 Marc Autret <autret_m@epita.fr>
8540
8541 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8542
8543 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8544
85452001-09-02 Marc Autret <autret_m@epita.fr>
8546
8547 * src/macrotab.c, src/macrotab.h: Remove.
8548
85492001-09-01 Pascal Bart <pascal.bart@epita.fr>
8550
8551 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8552 filename.
8553
85542001-09-01 Marc Autret <autret_m@epita.fr>
8555
8556 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8557 to an explicit value to activate the feature. We do it here.
8558
85592001-08-31 Pascal Bart <pascal.bart@epita.fr>
8560
8561 * src/output.c (prepare): Delete the `filename' muscule insertion.
8562 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8563 (parse_union_decl): Likewise.
8564 * src/macrotab.c (macro_init): Initialize filename by infile.
8565
85662001-08-31 Marc Autret <autret_m@epita.fr>
8567
8568 * src/bison.simple (YYLSP_NEEDED): New definition.
8569 * src/output.c (prepare): Add macro insertion of `locations_flag'
8570
85712001-08-31 Pascal Bart <pascal.bart@epita.fr>
8572
8573 * src/output.c (prepare): Delete insertion of previous muscles,
8574 and insert the `prefix' muscles.
8575 * src/macrotab.c (macro_init): Likewise.
8576 (macro_init): Initialization prefix directive by `yy'.
8577 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8578 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8579 yylval, yydebug, yyerror, yynerrs and yyparse.
8580 New directive `#define' to substitute yydebug, ... with option
8581 name_prefix.
8582
85832001-08-31 Pascal Bart <pascal.bart@epita.fr>
8584
8585 * src/main.c (main): Standardize.
8586 * src/output.c (output_table_data, output_parser): Likewise.
8587 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8588
85892001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8590
8591 * src/reader.c (read_additionnal_code): Rename %%user_code to
8592 %%epilogue.
8593 * src/output.c (output): Rename %%declarations to %%prologue.
8594 * src/bison.simple: Echo modifications.
8595
85962001-08-31 Marc Autret <autret_m@epita.fr>
8597
8598 * src/reader.c (readgram): CleanUp.
8599 (output_token_defines): Likewise.
8600 (packsymbols): Likewise.
8601 (reader): Likewise.
8602 * src/output.c (output): CPP-out useless code.
8603
86042001-08-31 Pascal Bart <pascal.bart@epita.fr>
8605
8606 * src/reader.c (reader): Delete obsolete call to function
8607 output_trailers and output_headers.
8608 * src/output.h: Remove obsolete functions prototypes of output_headers
8609 and output_trailers.
8610
86112001-08-30 Pascal Bart <pascal.bart@epita.fr>
8612
8613 * src/main.c: Include macrotab.h.
8614 * src/macrotab.h (macro_entry_s): Constify fields.
8615 Adjust functions prototypes.
8616 * src/macrotab.c (macro_insert): Constify key and value.
8617 (macro_find): Constify key.
8618 (macro_insert): Include 'xalloc.h'
8619 (macro_insert): Use XMALLOC.
8620 (macro_find): Constify return value.
8621 * src/output.c (output_table_data): Rename table to table_data.
8622 (output_parser): Constify macro_key, macro_value.
8623
86242001-08-30 Marc Autret <autret_m@epita.fr>
8625
8626 * src/reader.c (parse_skel_decl): New.
8627 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8628 * src/lex.h (token_t): New token `tok_skel'.
8629 * src/lex.c (percent_table): Add skeleton option entry.
8630 Standardize.
8631
86322001-08-29 Marc Autret <autret_m@epita.fr>
8633
8634 * src/bison.simple: Add %%user_code directive at the end.
8635 * src/reader.c (read_additionnal_code): New.
8636 (reader): Use it.
8637 * src/output.c (output_program): Remove.
8638 (output): Update.
8639
86402001-08-28 Marc Autret <autret_m@epita.fr>
8641
8642 * src/output.c (output_actions): Clean up.
8643 (output_gram): CPP-out useless code.
8644 * src/reader.c (reader): Clean up, CPP-out useless code.
8645
86462001-08-28 Pascal Bart <pascal.bart@epita.fr>
8647
8648 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8649 directive.
8650 * src/bison.simple: Add `%%definitions'.
8651
86522001-08-28 Marc Autret <autret_m@epita.fr>
8653
8654 * config/depcomp: New file.
8655
86562001-08-27 Paul Eggert <eggert@twinsun.com>
8657
8658 * src/bison.simple (yyparse): Don't take the address of an
8659 item before the start of an array, as that doesn't conform to
8660 the C Standard.
8661
86622001-08-27 Robert Anisko <robert.anisko@epita.fr>
8663
8664 * src/output.c (output): Remove the initialization of the macro
8665 obstack. It was done too late here.
8666
8667 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8668 completely wrong.
8669 (reader): Initialize the macro obstack here, since we need it to grow
8670 '%define' directives.
8671
8672 * src/reader.h: Declare the macro obstack as extern.
8673
86742001-08-27 Robert Anisko <robert.anisko@epita.fr>
8675
8676 * src/output.c (output_parser): Fix. Store single '%' characters in
8677 the output obstack instead of throwing them away.
8678
86792001-08-27 Akim Demaille <akim@epita.fr>
8680
8681 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8682
86832001-08-25 Robert Anisko <robert.anisko@epita.fr>
8684
8685 * lib/Makefile.am: Adjust.
8686
86872001-08-25 Robert Anisko <robert.anisko@epita.fr>
8688
8689 * src/bison.simple: Update and add '%%' directives.
8690
86912001-08-25 Robert Anisko <robert.anisko@epita.fr>
8692
8693 * src/reader.c (reader): Remove calls to 'output_headers' and
8694 'output_trailers'. Remove some C output.
8695 (readgram): Disable a piece of code that was writing a default
8696 definition for 'YYSTYPE'.
8697 (reader_output_yylsp): Remove.
8698 (packsymbols): Output token defintions to a macro.
8699 (copy_definition): Disable C output.
8700
8701 * src/reader.c (parse_macro_decl): New function used to parse macro
8702 declarations.
8703 (copy_string2): Put the body of copy_string into this new function.
8704 Add a parameter to let the caller choose whether he wants to copy the
8705 string delimiters or not.
8706 (copy_string): Be a simple call to copy_string2 with the last argument
8707 bound to true.
8708 (read_declarations): Add case for macro definition.
8709 (copy_identifier): New.
8710 (parse_macro_decl): Read macro identifiers using copy_identifier
8711 rather than lex.
8712
87132001-08-25 Robert Anisko <robert.anisko@epita.fr>
8714
8715 * src/output.c (prepare): Add prefixed names.
8716 (output_parser): Output semantic actions.
8717 (output_parser): Fix bug on '%%line' directives.
8718
8719 * src/output.c (output_headers): Remove. The C code printed by this
8720 function should now be in the skeletons.
8721 (output_trailers): Remove.
8722 (output): Disable call to 'reader_output_yylsp'.
8723 (output_rule_data): Do not output tables to the table obstack.
8724
8725 * src/output.c: Remove some C dedicated output.
8726 Improve the use of macro and output obstacks.
8727 (output_defines): Remove.
8728
8729 * src/output.c (output_token_translations): Associate 'translate'
8730 table with a macro. No output to the table obstack.
8731 (output_gram): Same for 'rhs' and 'prhs'.
8732 (output_stos): Same for 'stos'.
8733 (output_rule_data): Same for 'r1' and 'r2'.
8734 (token_actions): Same for 'defact'.
8735 (goto_actions): Same for 'defgoto'.
8736 (output_base): Same for 'pact' and 'pgoto'.
8737 (output_table): Same for 'table'.
8738 (output_check): Same for 'check'.
8739
8740 * src/output.c (output_table_data): New function.
8741 (output_short_table): Remove.
8742 (output_short_or_char_table): Remove.
8743
8744 * src/output.c (output_parser): Replace most of the skeleton copy code
8745 with something new. Skeletons are now processed character by character
8746 rather than line by line, and Bison looks for '%%' macros. This is the
8747 first step in making Bison's output process (a lot) more flexible.
8748 (output_parser): Use the macro table.
8749
87502001-08-25 Robert Anisko <robert.anisko@epita.fr>
8751
8752 * src/main.c (main): Initialize the macro table.
8753
87542001-08-25 Robert Anisko <robert.anisko@epita.fr>
8755
8756 * src/lex.c (percent_table): Add tok_define.
8757 * src/lex.h: Add tok_define.
8758
87592001-08-25 Robert Anisko <robert.anisko@epita.fr>
8760
8761 * src/macrotab.c: New file.
8762 * src/macrotab.h: New file.
8763 * src/Makefile.am: Update.
8764
87652001-08-25 Robert Anisko <robert.anisko@epita.fr>
8766
8767 * lib/hash.c: New file.
8768 * lib/hash.h: New file.
8769 * lib/Makefile.am: Update.
8770
87712001-08-15 Akim Demaille <akim@epita.fr>
8772
8773 Version 1.28c.
8774
87752001-08-15 Marc Autret <autret_m@epita.fr>
8776
8777 * src/reader.c (readgram): Indent output macro YYSTYPE.
8778 (packsymbols): Likewise.
8779 (output_token_defines): Likewise.
8780 * src/files.c: Standardize.
8781 (compute_header_macro): New.
8782 (defines_obstack_save): New. Use compute_header_macro.
8783 (output_files): Update. Use defines_obstack_save.
8784
87852001-08-15 Akim Demaille <akim@epita.fr>
8786
8787 * doc/bison.texinfo (Table of Symbols): Document
8788 YYSTACK_USE_ALLOCA.
8789
87902001-08-15 Akim Demaille <akim@epita.fr>
8791
8792 * missing: Update from CVS Automake.
8793 * config/config.guess, config/config.sub, config/texinfo.tex:
8794 Update from gnu.org.
8795
87962001-08-15 Akim Demaille <akim@epita.fr>
8797
8798 * Makefile.maint: Sync with CVS Autoconf.
8799
88002001-08-14 Pascal Bart <pascal.bart@epita.fr>
8801
8802 * doc/bison.texinfo: Include GNU Free Documentation License from
8803 `fdl.texi'.
8804 * doc/fdl.texi: Add to package.
8805
88062001-08-14 Marc Autret <autret_m@epita.fr>
8807
8808 Turn on %{source,header}_extension features.
8809
8810 * src/lex.c (percent_table): Un-CPP out header_extension and
8811 source_extension.
8812 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8813 (compute_exts_from_src): Remove conditions. It restores priorities
8814 between options.
8815
88162001-08-14 Marc Autret <autret_m@epita.fr>
8817
8818 * src/files.c (compute_base_names): Add extensions computing when
8819 `--file-prefix' used.
8820 Standardize function calls.
8821
88222001-08-13 Marc Autret <autret_m@epita.fr>
8823
8824 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8825 defining it (defined but null disables alloca).
8826
88272001-08-13 Marc Autret <autret_m@epita.fr>
8828
8829 * src/bison.simple (_yy_memcpy): CPP reformat.
8830
88312001-08-13 Pascal Bart <pascal.bart@epita.fr>
8832
8833 * tests/atconfig.in (CPPFLAGS): Fix.
8834
88352001-08-10 Pascal Bart <pascal.bart@epita.fr>
8836
8837 * doc/bison.texinfo: Include GNU General Public License from
8838 `gpl.texi'.
8839 * doc/gpl.texi: Add to package.
8840
88412001-08-10 Marc Autret <autret_m@epita.fr>
8842
8843 * src/print_graph.h: Fix.
8844 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8845
88462001-08-10 Akim Demaille <akim@epita.fr>
8847
8848 * src/system.h: Provide default declarations for stpcpy, strndup,
8849 and strnlen.
8850
88512001-08-10 Robert Anisko <anisko_r@epita.fr>
8852
8853 * doc/bison.texinfo (Locations): Update @$ stuff.
8854
88552001-08-09 Robert Anisko <anisko_r@epita.fr>
8856
8857 * src/bison.simple (YYLLOC_DEFAULT): Update.
8858 (yyparse): Adjust.
8859
88602001-08-08 Marc Autret <autret_m@epita.fr>
8861
8862 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8863 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8864 Reported by Fabrice Bauzac.
8865
88662001-08-08 Marc Autret <autret_m@epita.fr>
8867
8868 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8869 * src/vcg.c (output_node): Fix.
8870 * src/vcg.h: Cleanup.
8871 * src/print_graph.c: Add comments.
8872 (node_output_size): New global variable. Simplify the formatting of
8873 the VCG graph output.
8874 (print_actions): Unused code is now used. It notifies the final state
8875 and no action states in the VCG graph. It also give the reduce actions.
8876 The `shift and goto' edges are red and the `go to state' edges are
8877 blue.
8878 Get the current node name and node_obstack by argument.
8879 (node_obstack): New variable.
8880 (print_state): Manage node_obstack.
8881 (print_core): Use node_obstack given by argument.
8882 A node is not only computed here but in print_actions also.
8883 (print_graph): CPP out useless code instead of commenting it.
8884
88852001-08-07 Pascal Bart <pascal.bart@epita.fr>
8886
8887 * tests/atconfig.in (CPPFLAGS): Fix.
8888
88892001-08-07 Akim Demaille <akim@epita.fr>
8890
8891 * src/print_graph.c (quote): New.
8892 (print_core): Use it.
8893
88942001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8895
8896 * src/vcg.c (complain.h): Include it.
8897 Unepitaize `return' invocations.
8898 [NDEBUG] (main): Remove.
8899 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8900 * src/files.c (open_files): Initialize graph_obstack.
8901 * src/print_graph.c (print_actions): CPP out useless code.
8902 (print_core): Don't output the last `\n' in labels.
8903 Use `quote'.
8904 * src/files.c (output_files): Output the VCG file.
8905 * src/main.c (main): Invoke print_graph ();
8906
89072001-08-06 Marc Autret <autret_m@epita.fr>
8908
8909 Automaton VCG graph output.
8910 Using option ``-g'' or long option ``--graph'', you can generate
8911 a gram_filename.vcg file containing a VCG description of the LALR (1)
8912 automaton of your grammar.
8913
8914 * src/main.c: Call to print_graph() function.
8915 * src/getargs.h: Update.
8916 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8917 (graph_flag): New flag.
8918 (longopts): Update.
8919 (getargs): Add case `g'.
8920 * src/files.c (graph_obstack): New obstack struct.
8921 (open_files): Initialize new obstack.
8922 (output_files): Saves graph_obstack if required.
8923 * src/files.h (graph_obstack): New extern declaration.
8924 * src/Makefile.am: Add new source files.
8925
89262001-08-06 Marc Autret <autret_m@epita.fr>
8927
8928 * src/print_graph.c, src/print_graph.h (graph): New.
8929 * src/vcg.h: New file.
8930 * src/vcg.c: New file, VCG graph handling.
8931
89322001-08-06 Marc Autret <autret_m@epita.fr>
8933
8934 Add of %source_extension and %header_extension which specify
8935 the source or/and the header output file extension.
8936
8937 * src/files.c (compute_base_names): Remove initialisation of
8938 src_extension and header_extension.
8939 (compute_exts_from_gf): Update.
8940 (compute_exts_from_src): Update.
8941 (output_files): Update.
8942 * src/reader.c (parse_header_extension_decl): New.
8943 (parse_source_extension_decl): New.
8944 (read_declarations): New case statements for the new tokens.
8945 * src/lex.c (percent_table): Add entries for %source_extension
8946 and %header_extension.
8947 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8948
89492001-08-06 Marc Autret <autret_m@epita.fr>
8950
8951 * configure.in: Bump to 1.28c.
8952 * doc/bison.texinfo: Texinfo thingies.
8953
89542001-08-04 Pascal Bart <pascal.bart@epita.fr>
8955
8956 * tests/atconfig.in (CPPFLAGS): Add.
8957 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8958
89592001-08-03 Akim Demaille <akim@epita.fr>
8960
8961 Version 1.28b.
8962
89632001-08-03 Akim Demaille <akim@epita.fr>
8964
8965 * tests/Makefile.am (check-local): Ship testsuite.
8966 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8967 Include `string.h'.
8968
89692001-08-03 Akim Demaille <akim@epita.fr>
8970
8971 * configure.in: Try using -Wformat when compiling.
8972
89732001-08-03 Akim Demaille <akim@epita.fr>
8974
8975 * configure.in: Bump to 1.28b.
8976
89772001-08-03 Akim Demaille <akim@epita.fr>
8978
8979 * src/complain.c: Adjust strerror_r portability issues.
8980
89812001-08-03 Akim Demaille <akim@epita.fr>
8982
8983 Version 1.28a.
8984
89852001-08-03 Akim Demaille <akim@epita.fr>
8986
8987 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8988 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8989 * src/getargs.c: Include complain.h.
8990 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8991 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8992
89932001-08-03 Akim Demaille <akim@epita.fr>
8994
8995 * src/reader.c (readgram): Display hidden chars in error messages.
8996
89972001-08-03 Akim Demaille <akim@epita.fr>
8998
8999 Update to gettext 0.10.39.
9000
90012001-08-03 Akim Demaille <akim@epita.fr>
9002
9003 * lib/strspn.c: New.
9004
90052001-08-01 Marc Autret <autret_m@epita.fr>
9006
9007 * doc/bison.texinfo: Update.
9008 * doc/bison.1 (mandoc): Update.
9009 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9010 * src/files.c: Support output files extensions computing.
9011 (src_extension): New static variable.
9012 (header_extension): New static variable.
9013 (tr): New function.
9014 (get_extension_index): New function, gets the index of an extension
9015 filename in a string.
9016 (compute_exts_from_gf): New function, computes extensions from the
9017 grammar file extension.
9018 (compute_exts_from_src): New functions, computes extensions from the
9019 C source file extension, file given by ``-o'' option.
9020 (compute_base_names): Update.
9021 (output_files): Update.
9022
90232001-08-01 Robert Anisko <anisko_r@epita.fr>
9024
9025 * doc/bison.texi: Document @$.
9026 (Locations): New section.
9027
90282001-07-18 Akim Demaille <akim@epita.fr>
9029
9030 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9031 * config/prev-version.txt, config/move-if-change: New.
9032 * Makefile.am: Adjust.
9033
90342001-07-08 Pascal Bart <pascal.bart@epita.fr>
9035
9036 * src/bison.simple (yyparse): Suppress warning `comparaison
9037 between signed and unsigned'.
9038
90392001-07-05 Pascal Bart <pascal.bart@epita.fr>
9040
9041 * src/getargs.h (raw_flag): Remove.
9042 * src/getargs.c: Die on `-r'/`--raw'.
9043 * src/lex.c (parse_percent_token): Die on `%raw'.
9044 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9045 * tests/calc.at: Suppress test with option `--raw'.
9046
90472001-07-14 Akim Demaille <akim@epita.fr>
9048
9049 * config/: New.
9050 * configure.in: Require Autoconf 2.50.
9051 Update to gettext 0.10.38.
9052
90532001-03-16 Akim Demaille <akim@epita.fr>
9054
9055 * doc/bison.texinfo: ANSIfy the examples.
9056
90572001-03-16 Akim Demaille <akim@epita.fr>
9058
9059 * getargs.c (skeleton): New variable.
9060 (longopts): --skeleton is a new option.
9061 (shortopts, getargs): -S is a new option.
9062 * getargs.h: Declare skeleton.
9063 * output.c (output_parser): Use it.
9064
90652001-03-16 Akim Demaille <akim@epita.fr>
9066
9067 * m4/strerror_r.m4: New.
9068 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9069 * lib/error.h, lib/error.c: Update.
9070
90712001-03-16 Akim Demaille <akim@epita.fr>
9072
9073 * src/getargs.c (longopts): Clean up.
9074
90752001-02-21 Akim Demaille <akim@epita.fr>
9076
9077 * src/reader.c (gensym): `gensym_count' is your own.
9078 Use a static buf to create the symbol name, as token_buffer is no
9079 longer a buffer.
9080
90812001-02-08 Akim Demaille <akim@epita.fr>
9082
9083 * src/conflicts.c (conflict_report): Be sure not to append to res
9084 between two calls, which could happen if both first sprintf were
9085 skipped, but not the first cp += strlen.
9086
90872001-02-08 Akim Demaille <akim@epita.fr>
9088
9089 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9090 New, from fileutils 4.0.37.
9091 * configure.in: Require Autoconf 2.49c. I took some time before
9092 making this decision. This is the only way out for portability
9093 issues in Bison, it would mean way too much duplicate effort to
9094 import in Bison features implemented in 2.49c since 2.13.
9095 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9096
90972001-02-02 Akim Demaille <akim@epita.fr>
9098
9099 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9100 * lib/xalloc.h, lib/xmalloc.c: Update.
9101
91022001-01-19 Akim Demaille <akim@epita.fr>
9103
9104 Get rid of the ad hoc handling of token_buffer in the scanner: use
9105 the obstacks.
9106
9107 * src/lex.c (token_obstack): New.
9108 (init_lex): Initialize it. No longer call...
9109 (grow_token_buffer): this. Remove it.
9110 Adjust all the places which used it to use the obstack.
9111
91122001-01-19 Akim Demaille <akim@epita.fr>
9113
9114 * src/lex.h: Rename all the tokens:
9115 s/\bENDFILE\b/tok_eof/g;
9116 s/\bIDENTIFIER\b/tok_identifier/g;
9117 etc.
9118 Let them be enums, not #define, to ease debugging.
9119 Adjust all the code.
9120
91212001-01-18 Akim Demaille <akim@epita.fr>
9122
9123 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9124 * src/lex.c (maxtoken, grow_token_buffer): Static.
9125
91262001-01-18 Akim Demaille <akim@epita.fr>
9127
9128 Since we now use obstacks, more % directives can be enabled.
9129
9130 * src/lex.c (percent_table): Also accept `%yacc',
9131 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9132 `%debug'.
9133 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9134 instead of returning a token.
9135 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9136 * src/reader.c (read_declarations): Adjust.
9137 * src/files.c (open_files): Don't call `compute_base_names', don't
9138 compute `attrsfile' since they depend upon data which might be
9139 *in* the input file now.
9140 (output_files): Do it here.
9141 * src/output.c (output_headers): Document the fact that this patch
9142 introduces a guaranteed SEGV for semantic parsers.
9143 * doc/bison.texinfo: Document them.
9144 * tests/suite.at: Exercise these %options.
9145
91462000-12-20 Akim Demaille <akim@epita.fr>
9147
9148 Also handle the output file (--verbose) with obstacks.
9149
9150 * files.c (foutput): Remove.
9151 (output_obstack): New.
9152 Adjust all dependencies.
9153 * src/conflicts.c: Return a string.
9154 * src/system.h (obstack_grow_string): Rename as...
9155 (obstack_sgrow): this. Be ready to work with non literals.
9156 (obstack_fgrow4): New.
9157
91582000-12-20 Akim Demaille <akim@epita.fr>
9159
9160 * src/files.c (open_files): Fix the computation of short_base_name
9161 in the case of `-o foo.tab.c'.
9162
91632000-12-20 Akim Demaille <akim@epita.fr>
9164
9165 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9166 (copy_dollar): Now that everything uses obstacks, get rid of the
9167 FILE * parameters.
9168
91692000-12-20 Akim Demaille <akim@epita.fr>
9170
9171 * src/files.c (open_files): Actually the `.output' file is based
9172 on the short_base_name, not base_name.
9173 * tests/suite.at (Checking output file names): Adjust.
9174
91752000-12-20 Akim Demaille <akim@epita.fr>
9176
9177 * src/bison.s1: Remove, we now use directly...
9178 * src/bison.simple: this.
9179 * src/Makefile.am: Use pkgdata instead of data.
9180
91812000-12-20 Akim Demaille <akim@epita.fr>
9182
9183 * src/files.c (guard_obstack): New.
9184 (open_files): Initialize it.
9185 (output_files): Dump it...
9186 * src/files.h: Export it.
9187 * src/reader.c (copy_guard): Use it.
9188
91892000-12-19 Akim Demaille <akim@epita.fr>
9190
9191 * src/files.c (outfile, defsfile, actfile): Removed as global
9192 vars.
9193 (open_files): Don't compute them.
9194 (output_files): Adjust.
9195 (base_name, short_base_name): Be global.
9196 Adjust dependencies.
9197
91982000-12-19 Akim Demaille <akim@epita.fr>
9199
9200 * src/files.c (strsuffix): New.
9201 (stringappend): Be just like strcat but allocate.
9202 (base_names): Eve out from open_files.
9203 Try to simplify the rather hairy computation of base_name and
9204 short_base_name.
9205 (open_files): Use it.
9206 * tests/suite.at (Checking output file names): New test.
9207
92082000-12-19 Akim Demaille <akim@epita.fr>
9209
9210 * src/system.h (obstack_grow_literal_string): Rename as...
9211 (obstack_grow_string): this.
9212 * src/output.c (output_parser): Recognize `%% actions' instead of
9213 `$'.
9214 * src/bison.s1: s/$/%% actions/.
9215 * src/bison.hairy: Likewise.
9216
92172000-12-19 Akim Demaille <akim@epita.fr>
9218
9219 * src/output.c (output_parser): Compute the `#line' lines when
9220 there are.
9221 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9222 Suggested by Hans Aberg.
9223
92242000-12-19 Akim Demaille <akim@epita.fr>
9225
9226 Let the handling of the skeleton files be local to the procedures
9227 that use it.
9228
9229 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9230 longer static.
9231 (fparser, open_extra_files): Remove.
9232 (open_files, output_files): Don't take care of fparser.
9233 * src/files.h: Adjust.
9234 * src/output.c (output_parser): Open and close the file to the
9235 skeleton.
9236 * src/reader.c (read_declarations): When %semantic_parser, open
9237 fguard.
9238
92392000-12-19 Akim Demaille <akim@epita.fr>
9240
9241 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9242 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9243
92442000-12-19 Akim Demaille <akim@epita.fr>
9245
9246 * src/files.c (open_files): Yipee! We no longer need all the code
9247 looking for `/tmp' since we have no tmp file.
9248
92492000-12-19 Akim Demaille <akim@epita.fr>
9250
9251 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9252 New macros.
9253 * src/files.c (open_files): Less dependency on MSDOS etc.
9254
92552000-12-14 Akim Demaille <akim@epita.fr>
9256
9257 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9258 Provide a default definition.
9259 Use it when executing the default @ action.
9260 * src/reader.c (reader_output_yylsp): No longer include
9261 `timestamp' and `text' in the default YYLTYPE.
9262
92632000-12-12 Akim Demaille <akim@epita.fr>
9264
9265 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9266 (copy_guard): Quote the file names.
9267 Reported by Laurent Mascherpa.
9268
92692000-12-12 Akim Demaille <akim@epita.fr>
9270
9271 * src/output.c (output_headers, output_program, output): Be sure
9272 to escape special characters when outputting filenames.
9273 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9274 (output_headers): Don't depend on them, Use ACTSTR.
9275
92762000-11-17 Akim Demaille <akim@epita.fr>
9277
9278 * lib/obstack.h: Formatting changes.
9279 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9280 prevents type checking.
9281 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9282 cast the value to (void *): assigning a `foo *' to a `void *'
9283 variable is valid.
9284 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9285 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9286 append characters.
9287
92882000-11-17 Akim Demaille <akim@epita.fr>
9289
9290 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9291 as...
9292 (suite.m4, regression.m4, calc.m4): these.
9293 * tests/atgeneral.m4: Update from CVS Autoconf.
9294
92952000-11-17 Akim Demaille <akim@epita.fr>
9296
9297 * tests/regression.m4 (%union and --defines): New test,
9298 demonstrating a current bug in the obstack implementation.
9299
93002000-11-17 Akim Demaille <akim@epita.fr>
9301
9302 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9303 macros.
9304 Use them to declare the variables which are global or local to
9305 `yyparse'.
9306
93072000-11-17 Akim Demaille <akim@epita.fr>
9308
9309 * acconfig.h: Remove, no longer used.
9310
93112000-11-07 Akim Demaille <akim@epita.fr>
9312
9313 * src: s/Copyright (C)/Copyright/g.
9314
93152000-11-07 Akim Demaille <akim@epita.fr>
9316
9317 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9318 defining.
9319 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9320
93212000-11-07 Akim Demaille <akim@epita.fr>
9322
9323 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9324 Merge in a single CPP if/else.
9325
93262000-11-07 Akim Demaille <akim@epita.fr>
9327
9328 * src/output.c (output): Remove useless variables.
9329 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9330 argument `data' for consistency with the prototypes.
9331 Qualify it `const'.
9332 (obstack_copy, obstack_copy0): Rename the second argument as
9333 `address' for consistency. Qualify it `const'.
9334 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9335 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9336 `const' their input argument (`data' or `address').
9337 Adjust the corresponding macros to include `const' in casts.
9338
93392000-11-03 Akim Demaille <akim@epita.fr>
9340
9341 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9342 s/PFILE1/BISON_HAIRY/.
9343 Adjust dependencies.
9344
93452000-11-03 Akim Demaille <akim@epita.fr>
9346
9347 For some reason, this was not applied.
9348
9349 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9350 `unlink': it's no longer used.
9351
93522000-11-03 Akim Demaille <akim@epita.fr>
9353
9354 * src/files.c (skeleton_find): New function, eved out of...
9355 (open_files, open_extra_files): here.
9356
93572000-11-03 Akim Demaille <akim@epita.fr>
9358
9359 Don't use `atexit'.
9360
9361 * src/files.c (obstack_save): New function.
9362 (done): Rename as...
9363 (output_files): this.
9364 Use `obstack_save'.
9365 * src/main.c (main): Don't use `atexit' to register `done', since
9366 it no longer has to remove tmp files, just call `output_files'
9367 when there are no errors.
9368
93692000-11-02 Akim Demaille <akim@epita.fr>
9370
9371 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9372 `unlink': it's no longer used.
9373 * src/files.h: Formatting changes.
9374
93752000-11-02 Akim Demaille <akim@epita.fr>
9376
9377 Remove the last uses of mktemp and unlink/delete.
9378
9379 * src/files.c (fdefines, ftable): Removed.
9380 (defines_ostack, table_obstack): New.
9381 Adjust dependencies of the former into uses of the latter.
9382 * src/output.c (output_short_or_char_table, output_short_table):
9383 Convert to using obstacks.
9384 * src/reader.c (copy_comment2): Accept one FILE * and two
9385 obstacks.
9386 (output_token_defines, reader_output_yylsp): Use obstacks.
9387 * src/system.h (obstack_fgrow3): New.
9388
93892000-11-01 Akim Demaille <akim@epita.fr>
9390
9391 Change each use of `fattrs' into a use of `attrs_obstack'.
9392
9393 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9394 * src/files.c (fattrs): Remove.
9395 (attrs_obstack): New.
9396 Adjust all dependencies.
9397 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9398
93992000-11-01 Akim Demaille <akim@epita.fr>
9400
9401 Introduce obstacks.
9402 Change each use of `faction' into a use of `action_obstack'.
9403
9404 * lib/obstack.h, lib/obstack.c: New files.
9405 * src/files.c (faction): Remove.
9406 (action_obstack): New.
9407 Adjust all dependencies.
9408
94092000-10-20 Akim Demaille <akim@epita.fr>
9410
9411 * lib/quote.h (PARAMS): New macro. Use it.
9412
94132000-10-16 Akim Demaille <akim@epita.fr>
9414
9415 * src/output.c (output_short_or_char_table): New function.
9416 (output_short_table, output_token_translations): Use it.
9417 (goto_actions): Use output_short_table.
9418
94192000-10-16 Akim Demaille <akim@epita.fr>
9420
9421 * src/symtab.c (bucket_new): New function.
9422 (getsym): Use it.
9423
9424 * src/output.c (output_short_table): New argument to display the
9425 comment associated with the table.
9426 Adjust dependencies.
9427 (output_gram): Use it.
9428 (output_rule_data): Nicer output layout for YYTNAME.
9429
94302000-10-16 Akim Demaille <akim@epita.fr>
9431
9432 * src/lex.c (read_typename): New function.
9433 (lex): Use it.
9434 * src/reader.c (copy_dollar): Likewise.
9435
94362000-10-16 Akim Demaille <akim@epita.fr>
9437
9438 * src/reader.c (copy_comment2): Expect the input stream to be on
9439 the `/' which is suspected to open a comment, instead of being
9440 called after `//' or `/*' was read.
9441 (copy_comment, copy_definition, parse_union_decl, copy_action)
9442 (copy_guard): Adjust.
9443
94442000-10-16 Akim Demaille <akim@epita.fr>
9445
9446 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9447 `read_signed_integer'.
9448
94492000-10-16 Akim Demaille <akim@epita.fr>
9450
9451 * src/reader.c (copy_dollar): New function.
9452 (copy_guard, copy_action): Use it.
9453
94542000-10-16 Akim Demaille <akim@epita.fr>
9455
9456 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9457 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9458 New files, from Fileutils 4.0.27.
9459 * src/main.c (printable_version): Remove.
9460 * src/lex.c, src/reader.c: Use `quote'.
9461
94622000-10-04 Akim Demaille <akim@epita.fr>
9463
9464 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9465
94662000-10-04 Akim Demaille <akim@epita.fr>
9467
9468 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9469
94702000-10-04 Akim Demaille <akim@epita.fr>
9471
9472 When a literal string is used to define two different tokens,
9473 `bison -v' segfaults.
9474 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9475
9476 * tests/regression.m4: New file.
9477 Include the core of the sample provided by Piotr Gackiewicz.
9478 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9479 properly.
9480
94812000-10-04 Akim Demaille <akim@epita.fr>
9482
9483 * src/reader.c (parse_expect_decl): Keep `count' within the size
9484 of `buffer'.
9485 From Neil Booth.
9486
94872000-10-02 Paul Eggert <eggert@twinsun.com>
9488
9489 * bison.s1 (yyparse): Assign the default value
9490 unconditionally, to avoid a GCC warning and make the parser a
9491 tad smaller.
9492
94932000-10-02 Akim Demaille <akim@epita.fr>
9494
9495 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9496 options.
9497
94982000-10-02 Akim Demaille <akim@epita.fr>
9499
9500 * src/derives.c, src/print.c, src/reduce.c: To ease the
9501 translation, move some `\n' out of the translated strings.
9502
95032000-10-02 Akim Demaille <akim@epita.fr>
9504
9505 The location tracking mechanism is precious for parse error
9506 messages. Nevertheless, it is enabled only when `@n' is used in
9507 the grammar, which is a different issue (you can use it in error
9508 message, but not in the grammar per se). Therefore, there should
9509 be another means to enable it.
9510
9511 * src/getargs.c (getargs): Support `--locations'.
9512 (usage): Report it.
9513 * src/getargs.h (locationsflag): Export it.
9514 * src/lex.c (percent_table): Support `%locations'.
9515 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9516 with `locationsflag'.
9517 * doc/bison.texinfo: Document `--locations' and `%locations'.
9518 Sort the options.
9519 * tests/calc.m4: Test it.
9520
9521 For regularity of the names, replace each
9522 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9523 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9524 In addition replace each `flag' with `_flag'.
9525
95262000-10-02 Akim Demaille <akim@epita.fr>
9527
9528 Also test parse error messages, including with YYERROR_VERBOSE.
9529
9530 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9531 associative).
9532 Use it to check the computations.
9533 Use it to check `nonassoc' is honored.
9534 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9535 `--yyerror-verbose'.
9536 (_AT_CHECK_CALC): Adjust to this option.
9537 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9538
95392000-10-02 Akim Demaille <akim@epita.fr>
9540
9541 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9542 the latter demonstrates a flaw in the handling of non debugging
9543 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9544 was used in order to simplify:
9545
9546 #if YYDEBUG
9547 if (yydebug)
9548 {
9549 ...
9550 }
9551 #endif
9552
9553 into
9554
9555 if (yydebug)
9556 {
9557 ...
9558 }
9559
9560 unfortunately this leads to a CPP conflict when
9561 `--name-prefix=foo' is used since it produces `#define yydebug
9562 foodebug'.
9563
9564 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9565 (YYDPRINTF): New macro.
9566 Spread its use.
9567 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9568 the bison options.
9569 Also test `--verbose', `--defines' and `--name-prefix'.
9570
95712000-10-02 Akim Demaille <akim@epita.fr>
9572
9573 Improve the readability of the produced parsers.
9574
9575 * src/bison.s1: Formatting changes.
9576 Improve the comment related to the `$' mark.
9577 (yydefault): Don't fall through to `yyresume': `goto' there.
9578 * src/output.c (output_parser): When the `$' is met, skip the end
9579 of its line.
9580 New variable, `number_of_dollar_signs', to check there's exactly
9581 one `$' in the parser skeleton.
9582
95832000-10-02 Akim Demaille <akim@epita.fr>
9584
9585 * lib/xstrdup.c: New file, from the fileutils.
9586 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9587 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9588 instead of strlen + xmalloc + strcpy.
9589 * src/symtab.c (copys): Remove, use xstrdup instead.
9590
95912000-10-02 Akim Demaille <akim@epita.fr>
9592
9593 * src/gram.h (associativity): New enum type which replaces the
9594 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9595 `right_assoc', `left_assoc' and `non_assoc'.
9596 Adjust all dependencies.
9597 * src/reader.c: Formatting changes.
9598 (LTYPESTR): Don't define it, use it as a literal in
9599 `reader_output_yylsp'.
9600 * src/symtab.h (symbol_class): New enum type which replaces the
9601 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9602 `sunknown', `stoken and `snterm'.
9603
96042000-10-02 Akim Demaille <akim@epita.fr>
9605
9606 * src/getargs.c (fixed_outfiles): Rename as...
9607 (yaccflag): for consistency and accuracy.
9608 Adjust dependencies.
9609
96102000-10-02 Akim Demaille <akim@epita.fr>
9611
9612 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9613 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9614 difficult and introduced a lot of core dump. It turns out that
9615 Bison used an implementation of `xmalloc' based on `calloc', and
9616 at various places it does depend upon the initialization to 0. I
9617 have not tried to isolate the pertinent places, and all the former
9618 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9619 someone should address this issue.
9620
9621 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9622 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9623 files.
9624 Adjust dependencies.
9625 * src/warshall.h: New file.
9626 Propagate.
9627
96282000-10-02 Akim Demaille <akim@epita.fr>
9629
9630 Various anti-`extern in *.c' changes.
9631
9632 * src/system.h: Include `assert.h'.
9633
96342000-10-02 Akim Demaille <akim@epita.fr>
9635
9636 * src/state.h (nstates, final_state, first_state, first_shift)
9637 (first_reduction): Move their exportation from here...
9638 * src/LR0.h: to here.
9639 Adjust dependencies.
9640 * src/getargs.c (statisticsflag): New variable.
9641 Add support for `--statistics'.
9642 Adjust dependencies.
9643
9644 Remove a lot of now useless `extern' statements in most files.
9645
96462000-10-02 Akim Demaille <akim@epita.fr>
9647
9648 * src/LR0.h: New file.
9649 Propagate its use.
9650
96512000-10-02 Akim Demaille <akim@epita.fr>
9652
9653 * src/print.h: New file.
9654 Propagate its use.
9655 * src/print.c: Formatting and ordering changes.
9656 (verbose, terse): Replace with...
9657 (print_results): this new function.
9658 Adjust dependencies.
9659
96602000-10-02 Akim Demaille <akim@epita.fr>
9661
9662 * src/conflicts.c (conflict_report): New function.
9663 (conflict_log, verbose_conflict_log): Replace with...
9664 (print_conflicts): this function.
9665 Adjust dependencies.
9666 * src/conflicts.h: New file.
9667 Propagate its inclusion.
9668
96692000-10-02 Akim Demaille <akim@epita.fr>
9670
9671 * src/nullable.h: New file.
9672 Propagate its inclusion.
9673 * src/nullable.c: Formatting changes.
9674
96752000-10-02 Akim Demaille <akim@epita.fr>
9676
9677 * src/reduce.h: New file.
9678 Propagate its inclusion.
9679 * src/reduce.c: Topological sort and other formatting changes.
9680 (bool, TRUE, FALSE): Move their definition to...
9681 * src/system.h: here.
9682
96832000-10-02 Akim Demaille <akim@epita.fr>
9684
9685 * src/files.c: Formatting changes.
9686 (tryopen, tryclose, openfiles): Rename as...
9687 (xfopen, xfclose, open_files): this.
9688 (stringappend): static.
9689 * src/files.h: Complete the list of exported symbols.
9690 Propagate its use.
9691
96922000-10-02 Akim Demaille <akim@epita.fr>
9693
9694 * src/reader.h: New file.
9695 Propagate its use instead of tedious list of `extern' and
9696 prototypes.
9697 * src/reader.c: Formatting changes, topological sort,
9698 s/register//.
9699
97002000-10-02 Akim Demaille <akim@epita.fr>
9701
9702 * src/lex.h: Prototype `lex.c' exported functions.
9703 * src/reader.c: Adjust.
9704 * src/lex.c: Formatting changes.
9705 (safegetc): Rename as...
9706 (xgetc): this.
9707
97082000-10-02 Akim Demaille <akim@epita.fr>
9709
9710 * src/lalr.h: New file.
9711 Propagate its inclusion instead of prototypes and `extern'.
9712 * src/lalr.c: Formatting changes, topological sorting etc.
9713
97142000-10-02 Akim Demaille <akim@epita.fr>
9715
9716 * src/output.c (token_actions): Introduce a temporary array,
9717 YYDEFACT, that makes it possible for this function to use
9718 output_short_table.
9719
97202000-10-02 Akim Demaille <akim@epita.fr>
9721
9722 `user_toknums' is output as a `short[]' in `output.c', while it is
9723 defined as a `int[]' in `reader.c'. For consistency with the
9724 other output tables, `user_toknums' is now defined as a table of
9725 shorts.
9726
9727 * src/reader.c (user_toknums): Be a short table instead of an int
9728 table.
9729 Adjust dependencies.
9730
9731 Factor the short table outputs.
9732
9733 * src/output.c (output_short_table): New function.
9734 * src/output.c (output_gram, output_stos, output_rule_data)
9735 (output_base, output_table, output_check): Use it.
9736
97372000-10-02 Akim Demaille <akim@epita.fr>
9738
9739 * src/output.c (output): Topological sort of the functions, in
9740 order to get rid of the `static' prototypes.
9741 No longer use `register'.
9742 * src/output.h: New file.
9743 Propagate its inclusion in files explicitly prototyping functions
9744 from output.c.
9745
97462000-09-21 Akim Demaille <akim@epita.fr>
9747
9748 * src/atgeneral.m4: Update from Autoconf.
9749
97502000-09-21 Akim Demaille <akim@epita.fr>
9751
9752 * src/closure.h: New file.
9753 * src/closure.c: Formatting changes, topological sort over the
9754 functions, use of closure.h.
9755 (initialize_closure, finalize_closure): Rename as...
9756 (new_closure, free_closure): these. Adjust dependencies.
9757 * src/LR0.c: Formatting changes, topological sort, use of
9758 cloture.h.
9759 (initialize_states): Rename as...
9760 (new_states): this.
9761 * src/Makefile.am (noinst_HEADERS): Adjust.
9762
97632000-09-20 Akim Demaille <akim@epita.fr>
9764
9765 * src/acconfig.h: Don't protect config.h against multiple
9766 inclusion.
9767 Don't define PARAMS.
9768 * src/system.h: Define PARAMS.
9769 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9770 purpose of config.h. system.h must not try to fix wrong
9771 definitions in config.h.
9772
97732000-09-20 Akim Demaille <akim@epita.fr>
9774
9775 * src/derives.h: New file.
9776 * src/main.c, src/derives.h: Use it.
9777 Formatting changes.
9778 * src/Makefile.am (noinst_HEADERS): Adjust.
9779
97802000-09-20 Akim Demaille <akim@epita.fr>
9781
9782 * tests/atgeneral.m4: Update from Autoconf.
9783 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9784 (AT_CHECK_CALC): New macros.
9785 Use these macros to test bison with options `', `--raw',
9786 `--debug', `--yacc', `--yacc --debug'.
9787
97882000-09-19 Akim Demaille <akim@epita.fr>
9789
9790 * src/output.c: Formatting changes.
9791 * src/machine.h: Remove, leaving its contents in...
9792 * src/system.h: here.
9793 Include stdio.h.
9794 Adjust all dependencies on stdio.h and machine.h.
9795 * src/getargs.h: New file.
9796 Let all `extern' declarations about getargs.c be replaced with
9797 inclusion of `getargs.h'.
9798 * src/Makefile.am (noinst_HEADERS): Adjust.
9799
9800 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9801 scope.
9802 (yyerror): Returns void, not int.
9803 * doc/bison.texinfo: Formatting changes.
9804
98052000-09-19 Akim Demaille <akim@epita.fr>
9806
9807 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9808 portable.
9809
98102000-09-18 Akim Demaille <akim@epita.fr>
9811
9812 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9813 * src/Makefile.am (INCLUDES): Don't.
9814 Be ready to fetch headers in lib/.
9815
98162000-09-18 Akim Demaille <akim@epita.fr>
9817
9818 * doc/bison.texinfo: Update the copyright.
9819 ANSIfy and GNUify the examples.
9820 Remove the old menu.
9821
98222000-09-18 Akim Demaille <akim@epita.fr>
9823
9824 First set of tests: use the `calc' example from the documentation.
9825
9826 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9827 is defined only when YYDEBUG is.
9828 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9829 * src/files.c (tryopen, tryclose): Formatting changes.
9830 Move to the top and be static.
9831 * src/reader.c (read_signed_integer): Likewise.
9832 * tests/calc.m4: New file.
9833 * Makefile.am, suite.m4: Adjust.
9834 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9835
98362000-09-18 Akim Demaille <akim@epita.fr>
9837
9838 Add support for an Autotest test suite for Bison.
9839
9840 * m4/m4.m4, m4/atconfig.m4: New files.
9841 * m4/Makefile.am (EXTRA_DIST): Adjust.
9842 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9843 files.
9844 * src/getargs.c: Display a more standard --version message.
9845 * src/reader.c (reader): Formatting changes.
9846 No longer depend upon VERSION_STRING.
9847 * configure.in: No longer use `dnl'.
9848 Set up the test suite and the new directory `tests/.
9849 (VERSION_STRING): Remove.
9850
98512000-04-14 Akim Demaille <akim@epita.fr>
9852
9853 * src/reader.c (copy_comment2): New function, same as former
9854 `copy_comment', but outputs into two FILE *.
9855 (copy_comment): Use it.
9856 (parse_union_decl): Use it.
9857 (get_type, parse_start_decl): Use the same `invalid' message.
9858 (parse_start_decl, parse_union_decl): Use the same `multiple'
9859 message.
9860 (parse_union_decl, copy_guard, copy_action): Use the same
9861 `unmatched' message.
9862 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9863
98642000-03-31 Akim Demaille <akim@epita.fr>
9865
9866 * src/files.c (tryopen, tryclose): Move to the top.
9867 Be static.
9868
98692000-03-31 Akim Demaille <akim@epita.fr>
9870
9871 * src/main.c (main): Don't call `done', exit does it.
9872
98732000-03-31 Akim Demaille <akim@epita.fr>
9874
9875 * allocate.c: s/return (foo)/return foo/.
9876 * lalr.c: Likewise.
9877 * LR0.c: Likewise.
9878 * output.c: Likewise.
9879 * reader.c: Likewise.
9880 * symtab.c: Likewise.
9881 * vmsgetargs.c: Likewise.
9882
98832000-03-31 Akim Demaille <akim@epita.fr>
9884
9885 Clean up the error reporting functions.
9886
9887 * src/report.c: New file.
9888 * src/report.h: Likewise.
9889 * src/Makefile.am: Adjust.
9890 * m4/error.m4: New file.
9891 * m4/Makefile.am: Adjust.
9892 * configure.in (jm_PREREQ_ERROR): Call it.
9893 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9894 Remove.
9895 (fatal, fatals): Remove. All callers use complain.c::fatal.
9896 (warn, warni, warns, warnss, warnss): Remove. All callers use
9897 complain.c::complain.
9898 (toomany): Remove, use fatal instead.
9899 * src/files.c (done): No argument, use complain_message_count.
9900 * src/main.c (main): Register `done' to `atexit'.
9901
9902 * src/getargs.c (usage): More `fputs', less `fprintf'.
9903
99042000-03-28 Akim Demaille <akim@epita.fr>
9905
9906 * lib/: New directory.
9907 * Makefile.am (SUBDIRS): Adjust.
9908 * configure.in: Adjust.
9909 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9910 useless.
9911 * src/alloca.c: Moved to lib/.
9912 * src/getopt.c: Likewise.
9913 * src/getopt1.c: Likewise.
9914 * src/getopt.h: Likewise.
9915 * src/ansi2knr.c: Likewise.
9916 * src/ansi2knr.1: Likewise.
9917 * src/Makefile.am: Adjust.
9918 * lib/Makefile.am: New file.
9919
99202000-03-28 Akim Demaille <akim@epita.fr>
9921
9922 * src/getargs.c (usage): Refresh the help message.
9923
99242000-03-17 Akim Demaille <akim@epita.fr>
9925
9926 * src/getopt1.c: Updated from textutils 2.0e
9927 * src/getopt.c: Likewise.
9928 * src/getopt.h: Likewise.
9929
99302000-03-17 Akim Demaille <akim@epita.fr>
9931
9932 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9933 the file name, not the whole `#line LINE FILE'.
9934
99352000-03-17 Akim Demaille <akim@epita.fr>
9936
9937 On syntax errors, report the token on which we choked.
9938
9939 * src/bison.s1 (yyparse): In the label yyerrlab, when
9940 YYERROR_VERBOSE, add yychar in msg.
9941
99422000-03-17 Akim Demaille <akim@epita.fr>
9943
9944 * src/reader.c (copy_at): New function.
9945 (copy_guard): Use it.
9946 (copy_action): Use it.
9947
99482000-03-17 Akim Demaille <akim@epita.fr>
9949
9950 Be kind to translators, save some useless translations.
9951
9952 * src/main.c (banner): New function.
9953 (fatal_banner): Use it.
9954 (warn_banner): Use it.
9955
99562000-03-17 Akim Demaille <akim@epita.fr>
9957
9958 * src/reader.c (copy_definition): Use copy_string and
9959 copy_comment. Removed now unused `match', `ended',
9960 `cplus_comment'.
9961 (copy_comment, copy_string): Moved, to be visible from
9962 copy_definition.
9963
99642000-03-17 Akim Demaille <akim@epita.fr>
9965
9966 * src/reader.c (copy_string): Declare `static inline'. No
9967 problems with inline, since it is checked by configure.
9968 (copy_comment): Likewise.
9969
99702000-03-17 Akim Demaille <akim@epita.fr>
9971
9972 * src/reader.c (packsymbols): Formatting changes.
9973
99742000-03-17 Akim Demaille <akim@epita.fr>
9975
9976 * src/reader.c (copy_comment): New function, factored out from:
9977 (copy_action): Use it. Removed now unused `match', `ended',
9978 `cplus_comment'.
9979 (copy_guard): Likewise.
9980
99812000-03-17 Akim Demaille <akim@epita.fr>
9982
9983 * src/reader.c (copy_string): New function, factored out from:
9984 (copy_action): Use it.
9985 (copy_guard): Likewise.
9986
99872000-03-17 Akim Demaille <akim@epita.fr>
9988
9989 Change the handling of @s so that they behave exactly like $s.
9990 There is now a pseudo variable @$ (readble and writable), location
9991 of the lhs of the rule (by default ranging from the location of
9992 the first symbol of the rhs, to the location of the last symbol,
9993 or, if the rhs is empty, YYLLOC).
9994
9995 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9996 yyval.
9997 (yyparse): When providing a default semantic action, provide a
9998 default location action.
9999 (after the $): No longer change `*YYLSP', just stack YYLOC the
10000 same way you stack YYVAL.
10001 * src/reader.c (read_declarations): Use warns.
10002 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10003 (copy_action, case '@'): Likewise.
10004 Use a standard error message, to save useless work from
10005 translators.
10006
100072000-03-17 Akim Demaille <akim@epita.fr>
10008
10009 * src/bison.s1: Formatting and cosmetics changes.
10010 * src/reader.c: Likewise.
10011 Update the Copyright notice.
10012
100132000-03-17 Akim Demaille <akim@epita.fr>
10014
10015 * src/bison.s1 (#line): All set to `#line' only, since the
10016 Makefile now handles them.
10017
100182000-03-16 Akim Demaille <akim@epita.fr>
10019
10020 * src/output.c (output_rule_data): Output the documentation of
10021 some of the tables.
10022 (Copyright notice): Update.
10023 Formatting changes.
10024
100252000-03-16 Akim Demaille <akim@epita.fr>
10026
10027 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10028 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10029 One `#if YYDEBUG' remains, since it uses variables which are
10030 defined only if `YYDEBUG != 0'.
10031
100322000-03-16 Akim Demaille <akim@epita.fr>
10033
10034 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10035 and related variables so that the similarities are highlighted.
10036
100372000-03-16 Akim Demaille <akim@epita.fr>
10038
10039 * src/bison.s1: Properly indent CPP directives.
10040
100412000-03-16 Akim Demaille <akim@epita.fr>
10042
10043 * src/bison.s1: Properly indent the `alloca' CPP section.
10044
100452000-03-16 Akim Demaille <akim@epita.fr>
10046
10047 Do not hard code values of directories in `configure.in'.
10048 Update the `configure' tool chain.
10049
10050 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10051 src/makefile.am.
10052 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10053 (AC_OUTPUT): Add m4/Makefile.
10054 Bump to bison 1.28a, 1.29 has never been released.
10055 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10056 handled via src/Makefile.am.
10057 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10058 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10059 autoheader.
10060 * Makefile.am (SUBDIRS): Add m4.
10061 (ACLOCAL_AM_FLAGS): New variable.
10062 (AUTOMAKE_OPTIONS): Add check-news.
10063 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10064 the proper line number and file name.
10065 (DEFS): Propagate the location of bison library files and of the
10066 locale files.
10067 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10068 builddir.
10069 * acinclude.m4: Remove, replaced by the directory m4.
10070 * m4/Makefile.am (EXTRA_DIST): New variable.
10071 * m4/gettext.m4: New file, from the fileutils.
10072 * m4/lcmessage.m4: Likewise
10073 * m4/progtest.m4: Likewise.
10074 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10075
100762000-03-10 Akim Demaille <akim@epita.fr>
10077
10078 * src/closure.c:
10079 Formatting changes of various comments.
10080 Respect the GNU coding standards at various places.
10081 Don't use `_()' when no translation is needed.
10082
100831999-12-13 Jesse Thilo <jthilo@gnu.org>
10084
10085 * src/files.c:
10086 OS/2 honors TMPDIR environment variable.
10087
100881999-12-13 Jesse Thilo <jthilo@gnu.org>
10089
10090 * doc/bison.texinfo: Tweaked spelling and grammar.
10091 Updated ISBN.
10092 Removed reference to price of printed copy.
10093 Mention BISON_SIMPLE and BISON_HAIRY.
10094
100951999-12-13 Jesse Thilo <jthilo@gnu.org>
10096
10097 * configure.in, NEWS:
10098 Bison 1.29 released.
10099
101001999-10-27 Jesse Thilo <jthilo@gnu.org>
10101
10102 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10103 Added reference card.
10104
101051999-07-26 Jesse Thilo <jthilo@gnu.org>
10106
10107 * po/ru.po: Added Russian translation.
10108
101091999-07-26 Jesse Thilo <jthilo@gnu.org>
10110
10111 * configure.in: Added Russian translation.
10112
101131999-07-06 Jesse Thilo <jthilo@gnu.org>
10114
10115 * configure.in, NEWS, README:
10116 Released version 1.28.
10117
101181999-06-14 Jesse Thilo <jthilo@gnu.org>
10119
10120 * src/system.h:
10121 Squashed redefinition warning on some systems.
10122
10123 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10124 Have configure build version string instead of relying on ANSI string
10125 concatentation.
10126
101271999-06-14 Jesse Thilo <jthilo@gnu.org>
10128
10129 * po/POTFILES.in: Got rid of version.c.
10130
101311999-06-14 Jesse Thilo <jthilo@gnu.org>
10132
10133 * acconfig.h, configure.in:
10134 Have configure build version string instead of relying on ANSI string
10135 concatentation.
10136
101371999-06-08 Jesse Thilo <jthilo@gnu.org>
10138
10139 * doc/bison.1:
10140 Dropped mention of `+' for long-named options.
10141
101421999-05-30 Jesse Thilo <jthilo@gnu.org>
10143
10144 * src/files.c: Added <unistd.h> for unlink().
10145
10146 * src/Makefile.am, src/system.h:
10147 I18n fixes.
10148
101491999-05-30 Jesse Thilo <jthilo@gnu.org>
10150
10151 * README: Added a FAQ list.
10152
10153 * configure.in, acconfig.h:
10154 I18n fixes.
10155
101561999-05-30 Jesse Thilo <jthilo@gnu.org>
10157
10158 * doc/FAQ, doc/Makefile.am:
10159 Added a FAQ list.
10160
101611999-05-19 Jesse Thilo <jthilo@gnu.org>
10162
10163 * src/alloc.h, src/symtab.h, src/version.c:
10164 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10165
101661999-04-18 Jesse Thilo <jthilo@gnu.org>
10167
10168 * src/.cvsignore, src/Makefile.am:
10169 Reorganized: sources in `src', documentation in `doc'.
10170
10171 * src/lex.c (literalchar):
10172 fixed the code for escaping double quotes (thanks
10173 Jonathan Czisny.)
10174
101751999-04-18 Jesse Thilo <jthilo@gnu.org>
10176
10177 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10178 Adjusted paths to reflect directory reorganization.
10179
101801999-04-18 Jesse Thilo <jthilo@gnu.org>
10181
10182 * doc/.cvsignore, doc/Makefile.am:
10183 Reorganized: sources in `src', documentation in `doc'.
10184
101851999-04-18 Jesse Thilo <jthilo@gnu.org>
10186
10187 * configure.in:
10188 Updated AC_INIT file to reflect directory reorganization.
10189
10190 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10191 Reorganized: sources in `src', documentation in `doc'.
10192
101931999-04-13 Jesse Thilo <jthilo@gnu.org>
10194
10195 * src/allocate.c:
10196 Don't declare calloc() and realloc() if not necessary.
10197
101981999-04-13 Jesse Thilo <jthilo@gnu.org>
10199
10200 * configure.in, acconfig.h, acinclude.m4:
10201 Don't declare calloc() and realloc() if not necessary.
10202
102031999-03-23 Jesse Thilo <jthilo@gnu.org>
10204
10205 * po/.cvsignore: Added i18n support.
10206
102071999-03-23 Jesse Thilo <jthilo@gnu.org>
10208
10209 * acconfig.h, configure.in, Makefile.am:
10210 Added i18n support.
10211
102121999-03-22 Jesse Thilo <jthilo@gnu.org>
10213
10214 * src/bison.s1: Fixed #line numbers.
10215
102161999-03-15 Jesse Thilo <jthilo@gnu.org>
10217
10218 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10219 Added PO files from Translation Project.
10220
102211999-03-03 Jesse Thilo <jthilo@gnu.org>
10222
10223 * Makefile.am:
10224 Added support for non-ANSI compilers (ansi2knr).
10225
102261999-02-16 Jesse Thilo <jthilo@gnu.org>
10227
10228 * configure.in: Bumped version number to 1.27.
10229
10230 * Makefile.am:
10231 Added `bison.simple' to list of files removed by `make distclean'.
10232
102331999-02-12 Jesse Thilo <jthilo@gnu.org>
10234
10235 * src/files.c, src/files.h:
10236 Defined locations of parser files in config.h instead of Makefile.
10237
102381999-02-12 Jesse Thilo <jthilo@gnu.org>
10239
10240 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10241 Defined locations of parser files in config.h instead of Makefile.
10242
102431999-02-09 Jesse Thilo <jthilo@gnu.org>
10244
10245 * Makefile.am:
10246 Removed inappropriate use of $< macro.
10247
102481999-02-05 Jesse Thilo <jthilo@gnu.org>
10249
10250 * po/Makefile.in.in, po/POTFILES.in:
10251 Add `po' directory skeleton.
10252
102531999-01-27 Jesse Thilo <jthilo@gnu.org>
10254
10255 * README: Document help-bison list.
10256
10257 * configure.in: Add check for mkstemp().
10258
102591999-01-20 Jesse Thilo <jthilo@gnu.org>
10260
10261 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10262 Hush a few compiler warnings.
10263
10264 * src/files.c:
10265 Add tryclose(), which verifies that fclose was successful.
10266 Hush a couple of compiler warnings.
10267
102681999-01-20 Jesse Thilo <jthilo@gnu.org>
10269
10270 * Makefile.am, OChangeLog:
10271 ChangeLog is now automatically generated. Include the old version as
10272 OChangeLog.
10273
102741999-01-14 Jesse Thilo <jthilo@gnu.org>
10275
10276 * 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:
10277 Update FSF address.
10278
102791999-01-14 Jesse Thilo <jthilo@gnu.org>
10280
10281 * doc/bison.texinfo: Fix formatting glitch.
10282
10283 * doc/bison.texinfo: Update FSF address.
10284
102851999-01-14 Jesse Thilo <jthilo@gnu.org>
10286
10287 * acconfig.h: Update FSF address.
10288
102891999-01-08 Jesse Thilo <jthilo@gnu.org>
10290
10291 * src/system.h:
10292 Don't define PACKAGE here, since config.h defines it.
10293
102941998-12-30 Jesse Thilo <jthilo@gnu.org>
10295
10296 * src/reader.c: Update copyright date.
10297
10298 * src/main.c:
10299 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10300 favor of output directly to stderr (avoids buffer overruns).
10301
10302 * src/reader.c: Some checks for premature EOF.
10303
10304 * 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:
10305 Use prototypes if the compiler understands them.
10306
10307 * src/files.c: Honor TMPDIR on Unix hosts.
10308 Use prototypes if the compiler understands them.
10309
10310 * src/reader.c:
10311 Fix a couple of buffer overrun bugs.
10312 Use prototypes if the compiler understands them.
10313
10314 * src/system.h: Include unistd.h and ctype.h.
10315 Use #ifdef instead of #if for NLS symbols.
10316
103171998-12-30 Jesse Thilo <jthilo@gnu.org>
10318
10319 * doc/bison.texinfo:
10320 Delete comment "consider using @set for edition number, etc..." since
10321 we now are doing so.
10322
103231998-12-30 Jesse Thilo <jthilo@gnu.org>
10324
10325 * configure.in:
10326 Use prototypes if the compiler understands them.
10327
10328 * NEWS: Document 1.26 highlights.
10329
10330 * Makefile.am: Require Automake 1.3 or later.
10331
10332 * acconfig.h:
10333 Use prototypes if the compiler understands them.
10334
103351998-12-29 Jesse Thilo <jthilo@gnu.org>
10336
10337 * src/version.c:
10338 Use VERSION symbol from automake for version number.
10339
103401998-12-29 Jesse Thilo <jthilo@gnu.org>
10341
10342 * acconfig.h, configure.in, version.cin:
10343 Use VERSION symbol from automake for version number.
10344
103451998-11-28 Jesse Thilo <jthilo@gnu.org>
10346
10347 * Makefile.am:
10348 Distribute original version of simple parser (bison.s1), not built
10349 version (bison.simple).
10350
103511998-11-28 Jesse Thilo <jthilo@gnu.org>
10352
10353 * doc/bison.texinfo: Add info dir entry.
10354
10355 * doc/bison.texinfo:
10356 Let automake put version number into documentation.
10357
103581998-11-26 Jesse Thilo <jthilo@gnu.org>
10359
10360 * src/bison.cld, src/build.com, src/vmshlp.mar:
10361 Add non-RCS files from /gd/gnu/bison.
10362
103631998-11-26 Jesse Thilo <jthilo@gnu.org>
10364
10365 * doc/bison.1:
10366 Document the BISON_HAIRY and BISON_SIMPLE variables.
10367
103681998-11-25 Jesse Thilo <jthilo@gnu.org>
10369
10370 * src/version.c: Build version.c automatically.
10371
10372 * src/reader.c:
10373 Fix token numbering (used to start at 258, not 257).
10374
10375 * src/system.h: Include config.h.
10376
10377 * src/getargs.c: Update bug report address.
10378
10379 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10380 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10381
103821998-11-25 Jesse Thilo <jthilo@gnu.org>
10383
10384 * Makefile.am:
10385 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10386
10387 * configure.in, version.cin:
10388 Build version.c automatically.
10389
10390 * AUTHORS: Add AUTHORS file.
10391
10392 * README: Update bug report address.
10393
10394 * bison.simple:
10395 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10396
10397 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10398 Add automake stuff.
10399
104001998-11-25 Jesse Thilo <jthilo@gnu.org>
10401
10402 * doc/bison.texinfo: Clean up some formatting.
10403
104041998-05-05 Richard Stallman <rms@gnu.org>
10405
10406 * doc/bison.texinfo:
10407 Explain better why to make a pure parser.
10408
104091998-01-05 Richard Stallman <rms@gnu.org>
10410
10411 * src/files.c (openfiles):
10412 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10413 find a temporary directory, if possible. Do not unlink files while
10414 they are open.
10415
104161997-08-25 Richard Stallman <rms@gnu.org>
10417
10418 * src/reader.c (stack_offset;):
10419 Change some warni to warns.
10420
10421 * src/lex.c (literalchar): Use warns, not warni.
10422
104231997-06-28 Richard Stallman <rms@gnu.org>
10424
10425 * src/bison.s1: Add a Bison version comment.
10426
10427 * src/main.c (fatal, warn, berror):
10428 Use program_name.
10429
104301997-06-28 Richard Stallman <rms@gnu.org>
10431
10432 * Makefile.in (bison_version): New variable.
10433 (dist): Use that variable.
10434 (bison.s1): Substitute the Bison version into bison.simple.
10435
10436 * bison.simple: Add a Bison version comment.
10437
104381997-06-18 Richard Stallman <rms@gnu.org>
10439
10440 * src/main.c (fatal, warn, berror):
10441 Make error messages standard.
10442 (toomany): Improve error message text.
10443
10444 * 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:
10445 new.h renamed to alloc.h.
10446
104471997-06-18 Richard Stallman <rms@gnu.org>
10448
10449 * Makefile.in: new.h renamed to alloc.h.
10450
104511997-05-24 Richard Stallman <rms@gnu.org>
10452
10453 * src/lex.c (literalchar):
10454 Fix the code for escaping \, " and '.
10455
10456 (lex): Avoid trouble when there are many chars
10457 to discard in a char literal with just several chars in it.
10458
104591997-05-17 Richard Stallman <rms@gnu.org>
10460
10461 * src/bison.s1:
10462 Use malloc, if using alloca is troublesome.
10463 (YYSTACK_USE_ALLOCA): New flag macro.
10464 Define it for some systems and compilers.
10465 (YYSTACK_ALLOC): New macro.
10466 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10467 If it was malloc'd, free it.
10468
104691997-05-17 Richard Stallman <rms@gnu.org>
10470
10471 * bison.simple:
10472 Use malloc, if using alloca is troublesome.
10473 (YYSTACK_USE_ALLOCA): New flag macro.
10474 Define it for some systems and compilers.
10475 (YYSTACK_ALLOC): New macro.
10476 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10477 If it was malloc'd, free it.
10478
104791997-04-23 Richard Stallman <rms@gnu.org>
10480
10481 * src/bison.s1:
10482 (alloca) [__hpux]: Always define as __builtin_alloca.
10483
104841997-04-23 Richard Stallman <rms@gnu.org>
10485
10486 * bison.simple:
10487 (alloca) [__hpux]: Always define as __builtin_alloca.
10488
104891997-04-22 Richard Stallman <rms@gnu.org>
10490
10491 * src/bison.s1:
10492 [__hpux]: Include alloca.h (right for HPUX 10)
10493 instead of declaring alloca (right for HPUX 9).
10494
10495 * src/bison.s1 (__yy_memcpy):
10496 Declare arg `count' as unsigned int.
10497 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10498
104991997-04-22 Richard Stallman <rms@gnu.org>
10500
10501 * bison.simple:
10502 [__hpux]: Include alloca.h (right for HPUX 10)
10503 instead of declaring alloca (right for HPUX 9).
10504
10505 * bison.simple (__yy_memcpy):
10506 Declare arg `count' as unsigned int.
10507 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10508
105091997-01-03 Richard Stallman <rms@gnu.org>
10510
10511 * src/allocate.c: [__STDC__ or _MSC_VER]:
10512 Declare calloc and realloc to return void *.
10513
105141997-01-02 Richard Stallman <rms@gnu.org>
10515
10516 * src/system.h:
10517 [_MSC_VER]: Include stdlib.h and process.h.
10518 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10519
10520 * src/main.c (main): Return FAILURE as a value.
10521 (printable_version): Declare arg as int, not char.
10522
105231997-01-02 Richard Stallman <rms@gnu.org>
10524
10525 * Makefile.in (dist):
10526 Explicitly check for symlinks, and copy them.
10527
105281996-12-19 Richard Stallman <rms@gnu.org>
10529
10530 * src/files.c:
10531 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10532
105331996-12-18 Paul Eggert <eggert@gnu.org>
10534
10535 * src/bison.s1 (yyparse):
10536 If __GNUC__ and YYPARSE_PARAM are both defined,
10537 declare yyparse to have a void * argument.
10538
105391996-12-18 Paul Eggert <eggert@gnu.org>
10540
10541 * bison.simple (yyparse):
10542 If __GNUC__ and YYPARSE_PARAM are both defined,
10543 declare yyparse to have a void * argument.
10544
105451996-12-17 Richard Stallman <rms@gnu.org>
10546
10547 * src/reduce.c (nbits): Add some casts.
10548
105491996-08-12 Richard Stallman <rms@gnu.org>
10550
10551 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10552
105531996-08-12 Richard Stallman <rms@gnu.org>
10554
10555 * bison.simple: Test _MSDOS as well as _MSDOS_.
10556
105571996-07-31 Richard Stallman <rms@gnu.org>
10558
10559 * src/bison.s1:
10560 [__sun && __i386]: Include alloca.h.
10561
105621996-07-31 Richard Stallman <rms@gnu.org>
10563
10564 * bison.simple:
10565 [__sun && __i386]: Include alloca.h.
10566
105671996-07-30 Richard Stallman <rms@gnu.org>
10568
10569 * src/bison.s1: Comment change.
10570
10571 * src/bison.s1: Test _MSDOS_, not MSDOS.
10572
105731996-07-30 Richard Stallman <rms@gnu.org>
10574
10575 * bison.simple: Comment change.
10576
10577 * bison.simple: Test _MSDOS_, not MSDOS.
10578
105791996-06-01 Richard Stallman <rms@gnu.org>
10580
10581 * 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:
10582 Insert `_' macro around many string constants.
10583
10584 * src/main.c:
10585 Insert `_' macro around many string constants.
10586
10587 (main): Call setlocale, bindtextdomain and textdomain.
10588
10589 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10590 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10591 [ENABLE_NLS]: Include libintl.h.
10592 [ENABLE_NLS] (gettext): Define.
10593 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10594 (N_, PACKAGE, LOCALEDIR): New macros.
10595
105961996-06-01 Richard Stallman <rms@gnu.org>
10597
10598 * POTFILES.in: New file.
10599
10600 * Makefile.in (allocate.o):
10601 Define target explicitly.
10602
10603 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10604 (LDFLAGS): Set to @LDFLAGS@.
10605 (configure): Run autoconf only if preceding `cd' succeeds.
10606 (bison.s1): Redirect output to temporary file then move the
10607 temporary to the target, rather than redirecting directly to bison.s1.
10608 (clean): Remove config.status and config.log.
10609 (distclean): Don't remove config.status here.
10610
106111996-05-12 Richard Stallman <rms@gnu.org>
10612
10613 * src/bison.s1:
10614 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10615
106161996-05-12 Richard Stallman <rms@gnu.org>
10617
10618 * bison.simple:
10619 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10620
106211996-05-11 Richard Stallman <rms@gnu.org>
10622
10623 * src/bison.s1 (__yy_memcpy):
10624 Really reorder the args, as was supposedly done on Feb 14 1995.
10625 (yyparse): Calls changed accordingly.
10626
106271996-05-11 Richard Stallman <rms@gnu.org>
10628
10629 * Makefile.in (dist): Don't use $(srcdir).
10630
10631 * bison.simple (__yy_memcpy):
10632 Really reorder the args, as was supposedly done on Feb 14 1995.
10633 (yyparse): Calls changed accordingly.
10634
106351996-01-27 Richard Stallman <rms@gnu.org>
10636
10637 * src/output.c (output_rule_data):
10638 Test YYERROR_VERBOSE in the conditional
10639 around the definition of ttyname.
10640
106411995-12-29 Richard Stallman <rms@gnu.org>
10642
10643 * src/bison.s1:
10644 Fix line numbers in #line commands.
10645
106461995-12-29 Richard Stallman <rms@gnu.org>
10647
10648 * bison.simple:
10649 Fix line numbers in #line commands.
10650
106511995-12-27 Richard Stallman <rms@gnu.org>
10652
10653 * src/bison.s1 (YYPARSE_PARAM_DECL):
10654 In C++, make it always null.
10655 (YYPARSE_PARAM_ARG): New macro.
10656 (yyparse): Use YYPARSE_PARAM_ARG.
10657
106581995-12-27 Richard Stallman <rms@gnu.org>
10659
10660 * bison.simple (YYPARSE_PARAM_DECL):
10661 In C++, make it always null.
10662 (YYPARSE_PARAM_ARG): New macro.
10663 (yyparse): Use YYPARSE_PARAM_ARG.
10664
106651995-11-29 Richard Stallman <rms@gnu.org>
10666
10667 * doc/bison.texinfo:
10668 Describe literal string tokens, %raw, %no_lines, %token_table.
10669
106701995-11-29 Daniel Hagerty <hag@gnu.org>
10671
10672 * doc/bison.texinfo: Fixed update date
10673
106741995-10-16 Richard Stallman <rms@gnu.org>
10675
10676 * src/version.c: Version 1.25.
10677
106781995-10-16 Richard Stallman <rms@gnu.org>
10679
10680 * NEWS: *** empty log message ***
10681
106821995-10-16 Richard Stallman <rms@gnu.org>
10683
10684 * doc/bison.1, doc/bison.rnh:
10685 Add new options.
10686
106871995-10-15 Richard Stallman <rms@gnu.org>
10688
10689 * src/vmsgetargs.c, src/getargs.c:
10690 Added -n, -k, and -raw switches.
10691 (noparserflag, toknumflag, rawtoknumflag): New variables.
10692
10693 * src/symtab.h (SALIAS):
10694 New #define for adding aliases to %token.
10695 (struct bucket): Added `alias' field.
10696
10697 * src/reduce.c (reduce_grammar):
10698 Revise error message.
10699 (print_notices): Remove final `.' from error message.
10700
10701 * src/reader.c (reader_output_yylsp):
10702 New function.
10703 (readgram): Use `#if 0' around code that accepted %command
10704 inside grammar rules: The documentation doesn't allow it,
10705 and it will fail since the %command processors scan for the next %.
10706 (parse_token_decl): Extended the %token
10707 declaration to allow a multi-character symbol as an alias.
10708 (parse_thong_decl): New function.
10709 (read_declarations): Added %thong declarations.
10710 (read_declarations): Handle NOOP to deal with allowing
10711 % declarations as another means to specify the flags.
10712 (readgram): Allow %prec prior to semantics embedded in a rule.
10713 (skip_to_char, read_declarations, copy_definition)
10714 (parse_token_decl, parse_start_decl, parse_type_decl)
10715 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10716 (get_type_name, copy_guard, copy_action, readgram)
10717 (get_type, packsymbols): Revised most error messages.
10718 Changed `fatal' to `warnxxx' to avoid aborting for error.
10719 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10720 (read_declarations): Improve the error message for
10721 an invalid character. Do not abort.
10722 (read_declarations, copy_guard, copy_action): Use
10723 printable_version to avoid unprintable characters in printed output.
10724 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10725 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10726 Allow the type of a non-terminal can be given
10727 more than once, as long as all specifications give the same type.
10728
10729 * src/output.c:
10730 (output_headers, output_trailers, output, output_gram)
10731 (output_rule_data): Implement noparserflag variable.
10732 Implement toknumflag variable.
10733 (output): Call reader_output_yylsp to output LTYPESTR.
10734
10735 * src/main.c (main):
10736 If reader sees an error, don't process the grammar.
10737 (fatals): Updated to not use VARARGS1.
10738 (printable_version, int_to_string, warn, warni, warns, warnss)
10739 (warnsss): New error reporting functions. Avoid abort for error.
10740
10741 * src/lex.h:
10742 Added THONG and NOOP for alias processing.
10743 Added SETOPT for the new code that allows setting options with %flags.
10744
10745 * src/lex.c:
10746 Include getopt.h. Add some extern decls.
10747 (safegetc): New function to deal with EOF gracefully.
10748 (literalchar); new function to deal with reading \ escapes.
10749 (lex): Use literalchar.
10750 (lex): Implemented "..." tokens.
10751 (literalchar, lex, parse_percent_token): Made tokenbuffer
10752 always contain the token. This includes growing the token
10753 buffer while reading an integer.
10754 (parse_percent_token): Replaced if-else statement with percent_table.
10755 (parse_percent_token): Added % declarations as another
10756 way to specify the flags -n, -l, and -r. Also added hooks for
10757 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10758 major changes to files.c.
10759 (lex) Retain in the incoming stream a character following
10760 an incorrect '/'.
10761 (skip_white_space, lex): Revised most error messages
10762 and changed fatal to warn to avoid aborting.
10763 (percent_table): Added %thong declarations.
10764
10765 * src/gram.h: Comment changes.
10766
10767 * src/files.c (openfiles, open_extra_files, done):
10768 Add faction flag
10769 and actfile file. Handle noparserflag. Both for -n switch.
10770
10771 * src/conflicts.c (resolve_sr_conflict):
10772 Remove use of alloca.
10773
107741995-06-01 Jim Meyering <meyering@gnu.org>
10775
10776 * doc/bison.texinfo: *** empty log message ***
10777
107781995-05-06 Richard Stallman <rms@gnu.org>
10779
10780 * src/bison.s1: Comment change.
10781
107821995-05-06 Richard Stallman <rms@gnu.org>
10783
10784 * bison.simple: Comment change.
10785
107861995-05-03 Richard Stallman <rms@gnu.org>
10787
10788 * src/version.c: Version now 1.24.
10789
10790 * src/bison.s1: Change distribution terms.
10791
10792 * src/version.c: Version now 1.23.
10793
107941995-05-03 Richard Stallman <rms@gnu.org>
10795
10796 * doc/bison.texinfo:
10797 Rewrite "Conditions for Using Bison".
10798 Update version to 1.24.
10799
108001995-05-03 Richard Stallman <rms@gnu.org>
10801
10802 * bison.simple: Change distribution terms.
10803
108041995-02-23 Richard Stallman <rms@gnu.org>
10805
10806 * src/files.c: Test __VMS_POSIX as well as VMS.
10807
108081995-02-14 Jim Meyering <meyering@gnu.org>
10809
10810 * src/bison.s1 (__yy_memcpy):
10811 Renamed from __yy_bcopy to avoid
10812 confusion. Reverse FROM and TO arguments to be consistent with
10813 those of memcpy.
10814
108151995-02-14 Jim Meyering <meyering@gnu.org>
10816
10817 * bison.simple (__yy_memcpy):
10818 Renamed from __yy_bcopy to avoid
10819 confusion. Reverse FROM and TO arguments to be consistent with
10820 those of memcpy.
10821
108221994-11-10 David J. MacKenzie <djm@gnu.org>
10823
10824 * NEWS: reformat
10825
10826 * NEWS: New file.
10827
10828 * Makefile.in (DISTFILES): Include NEWS.
10829
10830 * Makefile.in (DISTFILES):
10831 Include install-sh, not install.sh.
10832
10833 * configure.in: Update to Autoconf v2 macro names.
10834
108351994-10-05 David J. MacKenzie <djm@gnu.org>
10836
10837 * Makefile.in: fix typo
10838
10839 * Makefile.in (prefix, exec_prefix):
10840 Let configure set them.
10841
108421994-09-28 David J. MacKenzie <djm@gnu.org>
10843
10844 * Makefile.in: Set datadir to $(prefix)/share.
10845
108461994-09-15 Richard Stallman <rms@gnu.org>
10847
10848 * src/bison.s1:
10849 Update copyright notice and GPL version.
10850
108511994-09-15 Richard Stallman <rms@gnu.org>
10852
10853 * bison.simple:
10854 Update copyright notice and GPL version.
10855
108561994-07-12 Richard Stallman <rms@gnu.org>
10857
10858 * src/reduce.c, src/reader.c:
10859 entered into RCS
10860
108611994-05-05 David J. MacKenzie <djm@gnu.org>
10862
10863 * Makefile.in: entered into RCS
10864
108651994-03-26 Richard Stallman <rms@gnu.org>
10866
10867 * src/bison.s1: entered into RCS
10868
108691994-03-26 Richard Stallman <rms@gnu.org>
10870
10871 * bison.simple: entered into RCS
10872
108731994-03-25 Richard Stallman <rms@gnu.org>
10874
10875 * src/main.c: entered into RCS
10876
108771994-03-24 Richard Stallman <rms@gnu.org>
10878
10879 * src/conflicts.c: entered into RCS
10880
108811994-01-02 Richard Stallman <rms@gnu.org>
10882
10883 * Makefile.in: *** empty log message ***
10884
108851993-11-21 Richard Stallman <rms@gnu.org>
10886
10887 * src/bison.s1: *** empty log message ***
10888
108891993-11-21 Richard Stallman <rms@gnu.org>
10890
10891 * doc/bison.texinfo: entered into RCS
10892
10893 * doc/bison.texinfo: *** empty log message ***
10894
108951993-11-21 Richard Stallman <rms@gnu.org>
10896
10897 * bison.simple: *** empty log message ***
10898
108991993-10-25 David J. MacKenzie <djm@gnu.org>
10900
10901 * doc/bison.texinfo: *** empty log message ***
10902
109031993-10-19 Richard Stallman <rms@gnu.org>
10904
10905 * src/bison.s1: *** empty log message ***
10906
109071993-10-19 Richard Stallman <rms@gnu.org>
10908
10909 * bison.simple: *** empty log message ***
10910
109111993-10-14 Richard Stallman <rms@gnu.org>
10912
10913 * src/bison.s1: *** empty log message ***
10914
109151993-10-14 Richard Stallman <rms@gnu.org>
10916
10917 * bison.simple: *** empty log message ***
10918
109191993-09-14 David J. MacKenzie <djm@gnu.org>
10920
10921 * doc/bison.texinfo: *** empty log message ***
10922
109231993-09-13 Noah Friedman <friedman@gnu.org>
10924
10925 * Makefile.in: *** empty log message ***
10926
109271993-09-10 Richard Stallman <rms@gnu.org>
10928
10929 * src/conflicts.c: *** empty log message ***
10930
10931 * src/system.h: entered into RCS
10932
109331993-09-10 Richard Stallman <rms@gnu.org>
10934
10935 * doc/bison.1: entered into RCS
10936
109371993-09-06 Noah Friedman <friedman@gnu.org>
10938
10939 * src/version.c: entered into RCS
10940
109411993-09-06 Noah Friedman <friedman@gnu.org>
10942
10943 * Makefile.in: *** empty log message ***
10944
109451993-07-30 David J. MacKenzie <djm@gnu.org>
10946
10947 * Makefile.in: *** empty log message ***
10948
109491993-07-24 Richard Stallman <rms@gnu.org>
10950
10951 * src/bison.s1: *** empty log message ***
10952
109531993-07-24 Richard Stallman <rms@gnu.org>
10954
10955 * bison.simple: *** empty log message ***
10956
109571993-07-08 David J. MacKenzie <djm@gnu.org>
10958
10959 * Makefile.in: *** empty log message ***
10960
109611993-07-04 Richard Stallman <rms@gnu.org>
10962
10963 * src/bison.s1: *** empty log message ***
10964
109651993-07-04 Richard Stallman <rms@gnu.org>
10966
10967 * bison.simple: *** empty log message ***
10968
109691993-06-26 David J. MacKenzie <djm@gnu.org>
10970
10971 * src/getargs.c: entered into RCS
10972
109731993-06-26 David J. MacKenzie <djm@gnu.org>
10974
10975 * doc/bison.texinfo: *** empty log message ***
10976
10977 * doc/bison.1: New file.
10978
109791993-06-25 Richard Stallman <rms@gnu.org>
10980
10981 * src/getargs.c: New file.
10982
109831993-06-16 Richard Stallman <rms@gnu.org>
10984
10985 * src/bison.s1: *** empty log message ***
10986
109871993-06-16 Richard Stallman <rms@gnu.org>
10988
10989 * bison.simple: *** empty log message ***
10990
109911993-06-03 Richard Stallman <rms@gnu.org>
10992
10993 * src/bison.s1: New file.
10994
109951993-06-03 Richard Stallman <rms@gnu.org>
10996
10997 * doc/bison.texinfo: *** empty log message ***
10998
109991993-06-03 Richard Stallman <rms@gnu.org>
11000
11001 * bison.simple: New file.
11002
110031993-05-19 Richard Stallman <rms@gnu.org>
11004
11005 * doc/bison.texinfo: New file.
11006
110071993-05-07 Noah Friedman <friedman@gnu.org>
11008
11009 * Makefile.in: *** empty log message ***
11010
110111993-04-28 Noah Friedman <friedman@gnu.org>
11012
11013 * src/reader.c: *** empty log message ***
11014
110151993-04-23 Noah Friedman <friedman@gnu.org>
11016
11017 * src/alloc.h: entered into RCS
11018
110191993-04-20 David J. MacKenzie <djm@gnu.org>
11020
11021 * src/version.c: *** empty log message ***
11022
11023 * src/files.c, src/allocate.c:
11024 entered into RCS
11025
11026 * src/reader.c: *** empty log message ***
11027
11028 * src/lex.c: entered into RCS
11029
11030 * src/conflicts.c: New file.
11031
11032 * src/symtab.c: entered into RCS
11033
11034 * src/alloc.h: New file.
11035
11036 * src/LR0.c: entered into RCS
11037
110381993-04-18 Noah Friedman <friedman@gnu.org>
11039
11040 * src/reader.c: New file.
11041
11042 * src/version.c: *** empty log message ***
11043
110441993-04-18 Noah Friedman <friedman@gnu.org>
11045
11046 * Makefile.in: *** empty log message ***
11047
110481993-04-17 Noah Friedman <friedman@gnu.org>
11049
11050 * Makefile.in: *** empty log message ***
11051
110521993-04-15 Richard Stallman <rms@gnu.org>
11053
11054 * src/main.c, src/files.c:
11055 New file.
11056
110571993-04-15 Noah Friedman <friedman@gnu.org>
11058
11059 * configure.in: entered into RCS
11060
11061 * configure.in: *** empty log message ***
11062
11063 * configure.in: New file.
11064
110651993-04-14 Richard Stallman <rms@gnu.org>
11066
11067 * Makefile.in: New file.
11068
110691993-04-13 Richard Stallman <rms@gnu.org>
11070
11071 * src/version.c: New file.
11072
110731993-03-25 Richard Stallman <rms@gnu.org>
11074
11075 * src/output.c: entered into RCS
11076
110771992-09-25 Richard Stallman <rms@gnu.org>
11078
11079 * configure.bat: entered into RCS
11080
110811992-06-22 Richard Stallman <rms@gnu.org>
11082
11083 * src/vmsgetargs.c: entered into RCS
11084
110851992-06-22 Richard Stallman <rms@gnu.org>
11086
11087 * doc/bison.rnh: entered into RCS
11088
110891992-04-20 David J. MacKenzie <djm@gnu.org>
11090
11091 * README: entered into RCS
11092
110931992-01-22 Richard Stallman <rms@gnu.org>
11094
11095 * src/machine.h: entered into RCS
11096
110971991-12-21 Richard Stallman <rms@gnu.org>
11098
11099 * src/lalr.c, src/closure.c:
11100 entered into RCS
11101
111021991-12-20 Richard Stallman <rms@gnu.org>
11103
11104 * src/state.h: entered into RCS
11105
111061991-12-18 Richard Stallman <rms@gnu.org>
11107
11108 * src/print.c, src/nullable.c, src/derives.c:
11109 entered into RCS
11110
111111991-11-03 David J. MacKenzie <djm@gnu.org>
11112
11113 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11114 entered into RCS
11115
111161988-09-09 Richard Stallman <rms@gnu.org>
11117
11118 * src/bison.hairy: entered into RCS
11119
111201987-12-16 Richard Stallman <rms@gnu.org>
11121
11122 * REFERENCES: entered into RCS
11123
11124-----
11125
11126Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
111271998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11128
11129This file is part of Bison, the GNU Compiler Compiler.
11130
11131Bison is free software; you can redistribute it and/or modify
11132it under the terms of the GNU General Public License as published by
11133the Free Software Foundation; either version 2, or (at your option)
11134any later version.
11135
11136Bison is distributed in the hope that it will be useful,
11137but WITHOUT ANY WARRANTY; without even the implied warranty of
11138MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11139GNU General Public License for more details.
11140
11141You should have received a copy of the GNU General Public License
11142along with Bison; see the file COPYING. If not, write to
11143the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11144Boston, MA 02111-1307, USA.