]> git.saurik.com Git - bison.git/blob - ChangeLog
c0fe68967ec8373f833186aa6710c7e5bde25733
[bison.git] / ChangeLog
1 2003-04-29 Akim Demaille <akim@epita.fr>
2
3 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
4 with %pure-parser and %locations to exercise the patch from Yakov
5 Markovitch below.
6
7 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
8
9 * data/yacc.c: (b4_lex_param): Corrected for the case where
10 %lex-param is provided and %pure-parser isn't.
11
12 2003-04-27 Paul Eggert <eggert@twinsun.com>
13
14 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
15 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
16 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
17 if it is not defined.
18 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
19
20 2003-04-26 Paul Eggert <eggert@twinsun.com>
21
22 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
23 Declare to be of type suitable for the ninf value itself, not of
24 type suitable for the corresponding table, since the latter might
25 be unsigned but the ninf value might be negative. This fixes a
26 bug reported by Alexandre Duret-Lutz in
27 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
28
29 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
30 invokes it. We shouldn't invoke it twice because it will attempt
31 to put error.o in the archive twice. This fixes a glitch reported
32 by Martin Mokrejs in
33 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
34
35 2003-04-21 Paul Eggert <eggert@twinsun.com>
36
37 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
38 to gnulib.
39
40 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
41
42 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
43 Fix obvious typo that results in uncompilable GLR parsers
44 when both %pure-parser and %locations are used. (trivial change)
45
46 2003-04-17 Paul Eggert <eggert@twinsun.com>
47
48 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
49 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
50 Do not insert the expected token via unput, as this runs afoul
51 of a POSIX-compatibility bug in flex 2.5.31.
52 All uses changed to BEGIN the parent state,
53 since we no longer insert the expected token via unput.
54 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
55 that is no longer emitted after the above change.
56
57 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
58 the first one. This change is from Paul Hilfinger, and it fixes
59 regression reported by Werner Lemberg in
60 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
61
62 (resolve_sr_conflict): Don't invoke state_errs_set
63 unless one or more tokens have been explicitly made errors.
64 Otherwise, the above change causes Bison to abort.
65
66 * tests/existing.at (GNU pic Grammar): New test case, taken from
67 Lemberg's email.
68
69 2003-03-31 Akim Demaille <akim@epita.fr>
70
71 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
72
73 2003-03-31 Akim Demaille <akim@epita.fr>
74
75 * src/output.c (prepare_symbols): Avoid trailing spaces in the
76 output.
77
78 2003-03-31 Akim Demaille <akim@epita.fr>
79
80 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
81 From Paul Hilfinger.
82
83 2003-03-29 Akim Demaille <akim@epita.fr>
84
85 * m4/error.m4: Do not put under dynamic conditions some code which
86 expansion is under static control.
87
88 2003-03-29 Akim Demaille <akim@epita.fr>
89
90 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
91
92 2003-03-29 Akim Demaille <akim@epita.fr>
93
94 * doc/bison.texinfo (Strings are Destroyed): New.
95
96 2003-03-13 Paul Eggert <eggert@twinsun.com>
97
98 * .cvsignore: Add configure.lineno.
99 * src/.cvsignore: Add yacc.
100 * tests/.cvsignore: Add testsuite.log.
101 * doc/fdl.texi: Sync with latest FSF version.
102
103 2003-03-12 Paul Eggert <eggert@twinsun.com>
104
105 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
106 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
107 cursor, instead of leaving it undefined. This fixes a bug
108 reported by Tim Van Holder in
109 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
110 * tests/input.at (Torturing the Scanner): Test the scanner on
111 an empty input file, which was Tim Van Holder's test case.
112
113 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
114 <sys/resource.h> can be included, include sys/time.h and
115 sys/times.h first, if available. This works around the SunOS
116 4.1.4 porting bug reported by Bruce Becker in
117 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
118
119 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
120 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
121 AC_HEADER_SYS_WAIT.
122
123 Merge changes from gnulib. This was prompted because the CVS
124 snapshot didn't build on Solaris 7 due to strnlen problems.
125
126 These changes need to be merged back into gnulib:
127 * lib/hash.c: Include <stdbool.h> unconditionally.
128 * m4/onceonly.m4 (m4_quote): New macro.
129 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
130 Quote AC_FOREACH variable-expansions properly.
131 The 2003-01-03 obstack.h change also needs merging.
132 {end of changes requiring merging}
133
134 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
135 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
136 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
137 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
138 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
139 New files, imported from gnulib.
140 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
141 above.
142
143 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
144 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
145 gnulib sources.
146
147 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
148 Add.
149 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
150 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
151 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
152 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
153 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
154 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
155 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
156 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
157 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
158 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
159 (jm_PREREQ_ARGMATCH): Remove.
160 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
161 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
162
163 * src/system.h: Include <stdbool.h> unconditionally.
164
165 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
166 assuming at least C89 in the bitset code for some time now.
167
168 2003-03-03 Akim Demaille <akim@epita.fr>
169
170 * ro.po: New.
171
172 2003-03-02 Akim Demaille <akim@epita.fr>
173
174 * doc/bison.texinfo (Table of Symbols): Reactivate the
175 documentation for %lex-param, and %parse-param.
176
177 2003-03-02 Akim Demaille <akim@epita.fr>
178
179 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
180 generate verbose error messages.
181 Use the number of tokens as an upper bound in yytname, as it
182 cannot be a non terminal.
183
184 2003-03-02 Akim Demaille <akim@epita.fr>
185
186 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
187 message.
188
189 2003-03-02 Akim Demaille <akim@epita.fr>
190
191 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
192 Use them to exercise yycheck overrun.
193 Based on Andrew Suffield's grammar.
194
195 2003-03-02 Akim Demaille <akim@epita.fr>
196
197 Create tests/local.at for Bison generic testing macros.
198
199 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
200 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
201 This new file.
202 * tests/calc.at (AT_CHECK_CALC): Adjust.
203 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
204 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
205 * tests/local.at: here.
206 (AT_COMPILE_CXX): Tags the tests using it as c++.
207 Ignore the test if CXX is not functional.
208
209 2003-03-01 Paul Eggert <eggert@twinsun.com>
210
211 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
212 not loc->end, since loc->end might contain garbage and this leads
213 to undefined behavior on some platforms.
214 (id_loc, token_start): Use (IF_LINTed) initial values that do not
215 depend on *loc, so that the reader doesn't give the the false
216 impression that *loc is initialized.
217 (<INITIAL>"%%"): Do not bother setting code_start, since its value
218 does not survive the return.
219
220 2003-03-01 Akim Demaille <akim@epita.fr>
221
222 * src/scan-gram.l (code_start): Always initialize it when entering
223 into yylex, as SC_EPILOGUE is activated *before* the corresponding
224 yylex invocation. An alternative would be making it static, but
225 then it starts with the second %%'s beginning, instead of its end.
226
227 2003-02-28 Paul Eggert <eggert@twinsun.com>
228
229 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
230 around a UnixWare 7.1.1 porting bug reported by John Hughes in
231 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
232
233 2003-02-26 Paul Eggert <eggert@twinsun.com>
234
235 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
236 Remove Sequent/Pyramid discussion (nobody uses them any more).
237 Merge VMS and MS-DOS discussion; these ports may well be dead
238 but let's keep mentioning them for now. Put <> around email
239 addresses. Add copyright notice.
240
241 2003-02-24 Paul Eggert <eggert@twinsun.com>
242
243 * data/glr.c (yy_reduce_print): yylineno -> yylno,
244 to avoid collision with flex use of yylineno.
245 Problem reported by Bruce Lilly in
246 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
247 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
248 * data/yacc.c (yy_reduce_print): Likewise.
249
250 * config/depcomp: Sync with Automake 1.7.3.
251
252 2003-02-21 Akim Demaille <akim@epita.fr>
253
254 * data/lalr1.cc: Use temporary variables instead of casts to
255 change integer types.
256 Suggested by Paul Eggert.
257
258 2003-02-21 Akim Demaille <akim@epita.fr>
259
260 * doc/bison.texinfo: Use "location" consistently to refer to @n,
261 to avoid confusions with lalr1.cc's notion of Position.
262 Suggested by Paul Eggert.
263
264 2003-02-20 Akim Demaille <akim@epita.fr>
265
266 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
267 before initial_columns.
268 (location.hh): Use consistent variable names when defining the
269 operator<<.
270 Use "last" so that we subtract from Positions, not from unsigned.
271
272 2003-02-20 Akim Demaille <akim@epita.fr>
273
274 * data/lalr1.cc (position.hh): New subfile, including the extended
275 and Doxygen'ed documentation of class Position.
276 (location.hh): Use it.
277 Document a` la Doxygen.
278 With the help of Benoit Perrot.
279
280 2003-02-20 Akim Demaille <akim@epita.fr>
281
282 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
283 AT_YACC_IF.
284 Redefine AT_YYERROR_SEES_LOC_IF using it.
285 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
286 not defined.
287 Don't use the location in yy::Parser::error_ and
288 yy::Parser::print_ when not %locations.
289 Activate more lalr1.cc tests.
290
291 2003-02-19 Akim Demaille <akim@epita.fr>
292
293 * data/lalr1.cc: When displaying a line number, be sure to make it
294 an int.
295
296 2003-02-19 Akim Demaille <akim@epita.fr>
297
298 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
299 Remove, useless.
300 (YYABORT, YYACCEPT, YYERROR): New.
301 * tests/calc.at: Renable the lalr1.cc test.
302
303 2003-02-19 Akim Demaille <akim@epita.fr>
304
305 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
306 error recovery, mixing with/without pops and discarding of the
307 lookahead.
308 Exercise YYERROR.
309 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
310
311 2003-02-17 Paul Eggert <eggert@twinsun.com>
312
313 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
314 * tests/testsuite.at (AT_COMPILE): Use them.
315 This fixes the testsuite problem reported by Robert Lentz in
316 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
317
318 2003-02-12 Paul Eggert <eggert@twinsun.com>
319
320 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
321 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
322 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
323 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
324 Check for malloc failure, for consistency with yacc.c.
325 (yytname_size): Remove, for consistency with yacc.c.
326
327 The bug still remains in data/lalr1.cc, as I didn't have time
328 to fix it there.
329
330 2003-02-06 Akim Demaille <akim@epita.fr>
331
332 * configure.ac (GXX): Rename as...
333 (CXX): this, to keep the original Autoconf semantics.
334 Require 2.57.
335 * data/lalr1.cc: Fix b4_copyright invocations.
336 If YYDEBUG is not defined, don't depend upon name_ being defined.
337 (location.hh): Include string and iostream.
338 (Position::filename): New member.
339 (Position::Position ()): New.
340 (operator<< (Position)): New.
341 (operator- (Position, int)): New.
342 (Location::first, Location::last): Rename as...
343 (Location::begin, Location::end): these, to mock the conventional
344 iterator names.
345 (operator<< (Location)): New.
346 * tests/atlocal.in (CXX): New.
347 * tests/testsuite.at (AT_COMPILE_CXX): New.
348 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
349 locations in a more synthetic way.
350 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
351 lalr1.cc is used.
352 Adjust the C locations to match those from Emacs: first column is
353 column 0.
354 Change all the expected results.
355 Conform to the GCS: simplify the locations when applicable.
356 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
357 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
358 these CPP macros with the m4 macros new defined by...
359 (AT_CHECK_PUSHDEFS): this, i.e.:
360 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
361 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
362 New macros.
363 (AT_CHECK_POPDEFS): Undefine them.
364 (AT_CHECK_CALC_LALR1_CC): New.
365 Use it for the first lalr1.cc test.
366
367 2003-02-04 Akim Demaille <akim@epita.fr>
368
369 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
370 Location as is defined.
371
372 2003-02-04 Akim Demaille <akim@epita.fr>
373
374 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
375 name_ being defined.
376
377 2003-02-03 Paul Eggert <eggert@twinsun.com>
378
379 * src/gram.h (start_symbol): Remove unused decl.
380
381 Use more-consistent naming conventions for local vars.
382
383 * src/derives.c (derives_compute): Change type of local var from
384 int to rule_number.
385 * src/gram.c (grammar_rules_partial_print): Likewise.
386 * src/print.c (print_core): Likewise.
387 * src/reduce.c (reduce_grammar_tables): Likewise.
388
389 * src/gram.c (grammar_dump): Change name of item_number *
390 local var from r to rp.
391 * src/nullable.c (nullable_compute): Likewise.
392
393 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
394
395 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
396 for symbol or symbol_number var.
397 * src/reader.c (grammar_start_symbol_set): Likewise.
398 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
399 Likewise.
400 * src/state.c (transitions_to): Likewise.
401 * src/state.h: Likewise.
402 * src/tables.c (symbol_number_to_vector_number): Likewise.
403
404 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
405 char * var.
406
407 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
408 var.
409
410 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
411 var.
412
413 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
414 Use str, not s, for char * var. Use ch, not c, for character var.
415 Use size for size var.
416
417 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
418 char * var.
419 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
420 uniqstr var.
421 * src/uniqstr.h: Likewise.
422
423 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
424 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
425 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
426 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
427 param to have same name as that of enum, so that we don't use
428 "s" to stand for a non-state.
429
430 2003-02-02 Akim Demaille <akim@epita.fr>
431
432 * src/scan-skel.l: Scan more than one inert character per yylex
433 invocation.
434
435 2003-02-01 Paul Eggert <eggert@twinsun.com>
436
437 Version 1.875a.
438
439 * po/LINGUAS: Add ms.
440
441 2003-01-30 Akim Demaille <akim@epita.fr>
442
443 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
444
445 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
446
447 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
448 of $1.
449
450 Changes in response to error report by S. Eken: GLR mode does not
451 handle negative $ indices or $ indices in embedded rules correctly.
452 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
453
454 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
455 (b4_rhs_location): Ditto.
456 (yyfill): New function to copy from stack tree into array
457 incrementally.
458 (yyuserAction): Modify to allow incremental move of semantic values
459 to rhs array when in GLR mode.
460 Define YYFILL to use in user-defined actions to fill semantic array
461 as needed.
462 Remove dummy use of yystack, as there is now a guaranteed use.
463 (yydoAction): Modify to allow incremental move of semantic values
464 to rhs array when in GLR mode.
465 (yyresolveAction): Ditto.
466 (yyglrShiftDefer): Update comment.
467 (yyresolveStates): Use X == NULL for pointers, not !X.
468 (yyglrReduce): Ditto.
469 (yydoAction): Ditto
470
471 * tests/glr-regr1.at: Rename to ...
472 * tests/glr-regression.at: Add new regression test for the problems
473 described above (adapted from S. Eken).
474 Update copyright notice.
475 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
476 * tests/Makefile.am: Ditto.
477
478 2003-01-28 Paul Eggert <eggert@twinsun.com>
479
480 * data/lalr1.cc: Do not use @output_header_name@ unless
481 b4_defines_flag is set. This fixes two bugs reported by
482 Tim Van Holder in
483 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
484 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
485
486 2003-01-21 Paul Eggert <eggert@twinsun.com>
487
488 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
489 we don't need to worry about yyerrlab1 being reported as an
490 "unused label" by non-GCC C compilers. The downside is that if
491 locations are used then a couple of statements are duplicated each
492 time YYERROR is invoked, but the upside is that the warnings
493 should vanish.
494 (yyerrlab1): Move code to YERROR.
495 (yyerrlab2): Remove. Change uses back to yyerrlab1.
496 This reverts some of the 2002-12-27 change.
497
498 2003-01-17 Paul Eggert <eggert@twinsun.com>
499
500 * src/output.c (symbol_printers_output): Fix typo that led
501 to core dump. Problem reported by Antonio Rus in
502 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
503
504 2003-01-13 Akim Demaille <akim@epita.fr>,
505 Quoc Peyrot <chojin@lrde.epita.fr>,
506 Robert Anisko <anisko_r@lrde.epita.fr>
507
508 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
509 when the stacks contain one element, as the loop would otherwise
510 free the last state, and then use the top state (the one we just
511 popped). This means that the initial elements will not be freed
512 explicitly, as is the case in yacc.c; it is not a problem, as
513 these elements have fake values.
514
515 2003-01-11 Paul Eggert <eggert@twinsun.com>
516
517 * NEWS: %expect-violations are now just warnings, reverting
518 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
519 bootstrapping problem reported by Matthias Klose; see
520 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
521 * src/conflicts.c (conflicts_print): Likewise.
522 * tests/conflicts.at (%expect not enough, %expect too much,
523 %expect with reduce conflicts): Likewise.
524 * doc/bison.texinfo (Expect Decl): Document this. Also mention
525 that the warning is enabled if the number of conflicts changes
526 (not necessarily increases).
527
528 * src/getargs.c (version): Update copyright year.
529
530 2003-01-09 Akim Demaille <akim@epita.fr>
531
532 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
533
534 2003-01-08 Paul Eggert <eggert@twinsun.com>
535
536 * Makefile.maint (WGETFLAGS):
537 New macro, containing "-C off" to disable proxy caches.
538 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
539 (rel-check): Use $(WGET) instead of wget.
540
541 2003-01-06 Paul Eggert <eggert@twinsun.com>
542
543 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
544 the GLR paper of Scott, Johnstone and Hussain.
545
546 2003-01-04 Paul Eggert <eggert@twinsun.com>
547
548 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
549 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
550 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
551 (EXTRA_LIBRARIES): New var, for liby.a.
552 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
553 (EXTRA_SCRIPTS): New var, for yacc.
554
555 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
556 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
557 Problem reported by Nelson H. F. Beebe.
558
559 2003-01-03 Paul Eggert <eggert@twinsun.com>
560
561 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
562 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
563 when compiling Bison 1.875's `bitset bset = obstack_alloc
564 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
565
566 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
567 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
568 grow to a huge size with typical invocation.
569
570 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
571 Use the pattern recommended by Autoconf 2.57, except also protect
572 against double-definition.
573 * src/system.h: Likewise.
574 Portability issues reported by Nelson H. F. Beebe.
575
576 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
577 All uses changed. Provide a definition in both C and C++.
578 (yytrue, yyfalse): Define even if defined (__cplusplus).
579
580 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
581 Reported by Nelson H. F. Beebe.
582
583 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
584
585 2003-01-02 Paul Eggert <eggert@twinsun.com>
586
587 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
588 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
589 Bug reported by Nelson H. F. Beebe.
590
591 2003-01-01 Paul Eggert <eggert@twinsun.com>
592
593 * Version 1.875.
594
595 2002-12-30 Paul Eggert <eggert@twinsun.com>
596
597 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
598 Moved here from...
599 (<INITIAL>","): Here. This causes stray "," to be treated
600 more uniformly.
601
602 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
603 last brace in braced code when not in Yacc mode, for compatibility
604 with Bison 1.35. This resurrects the 2001-12-15 patch to
605 src/reader.c.
606
607 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
608 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
609
610 2002-12-28 Paul Eggert <eggert@twinsun.com>
611
612 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
613 that of SYM's type. This fixes Debian bug 168069, reported by
614 Thomas Olsson.
615
616 2002-12-28 Paul Eggert <eggert@twinsun.com>
617
618 Version 1.75f.
619
620 Switch back to the Yacc style of conflict reports, undoing some
621 of the 2002-07-30 change.
622 * doc/bison.texinfo (Understanding): Use Yacc style for
623 conflict reports. Also, use new way of locating rules.
624 * src/conflicts.c (conflict_report):
625 Renamed from conflict_report_yacc, removing the old
626 'conflict_report'. Translate the entire conflict report at once,
627 so that we don't assume that "," has the same interpretation in
628 all languages.
629 (conflicts_output): Use Yacc-style conflict report for each state,
630 instead of our more-complicated style.
631 (conflicts_print): Use Yacc-style conflict report, except print
632 the input file name when not emulating Yacc.
633 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
634 Conflicted Reduction, %expect not enough, %expect too much,
635 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
636 * tests/existing.at (GNU Cim Grammar): Likewise.
637 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
638
639 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
640 fatal): Don't invoke fflush; it's not needed and it might even be
641 harmful for stdout, as stdout might not be open.
642 * src/reduce.c (reduce_print): Likewise.
643
644 2002-12-27 Paul Eggert <eggert@twinsun.com>
645
646 Fix a bug where error locations were not being recorded correctly.
647 This problem was originally reported by Paul Hilfinger in
648 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
649
650 * data/yacc.c (yyparse): New local var yylerrsp, to record the
651 top of the location stack's error locations.
652 (yyerrlab): Set it. When discarding a token, push its location
653 onto yylerrsp so that we don't lose track of the error's end.
654 (yyerrlab1): Now is only the target of YYERROR, so that we can
655 properly record the location of the action that failed. For GCC
656 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
657 GCC warning about yyerrlab1 being unused if YYERROR is unused.
658 (yyerrlab2): New label, which yyerrlab now falls through to.
659 Compute the error's location by applying YYLLOC_DEFAULT to
660 the locations of all the symbols that went into the error.
661 * doc/bison.texinfo (Location Default Action): Mention that
662 YYLLOC_DEFAULT is also invoked for syntax errors.
663 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
664 Error locations include the locations of all the tokens that were
665 discarded, not just the last token.
666
667 2002-12-26 Paul Eggert <eggert@twinsun.com>
668
669 * src/files.c: Include quote.h.
670 (compute_output_file_names): Warn if we detect conflicting
671 outputs to the same file. This should catch the misunderstanding
672 exemplified by Debian Bug 165349, reported by Bruce Stephens..
673
674 * src/conflicts.c (conflicts_print): If the user specifies
675 "%expect N", report an error if there are any reduce/reduce
676 conflicts. This is what the manual says should happen.
677 This fixes Debian bug 130890, reported by Anthony DeRobertis.
678 * tests/conflicts.at (%expect with reduce conflicts): New test.
679
680 Don't use m4_include on relative file names, as it doesn't work as
681 desired if there happens to be a file with that name under ".".
682
683 * m4sugar/version.m4: Remove; it was included but it wasn't used.
684 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
685 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
686 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
687 * src/output.c (output_skeleton): Use full path names when
688 specifying a file to include; don't rely on include path, as
689 it's unreliable when the working file contains a file with
690 that name.
691
692 2002-12-25 Paul Eggert <eggert@twinsun.com>
693
694 Remove obsolete references to bison.simple and bison.hairy.
695 Problem mentioned by Aubin Mahe in
696 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
697 * data/glr.c: Comment fix.
698 * doc/bison.1: Remove references. Also, mention "yacc".
699
700 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
701 with -g option.
702
703 * src/parse-gram.y (declaration): Use enum "report_states" rather
704 than its numeric value 1.
705
706 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
707 opening a new one. This fixes Debian bug 165349, reported by
708 Bruce Stephens.
709
710 2002-12-24 Paul Eggert <eggert@twinsun.com>
711
712 Version 1.75e.
713
714 * Makefile.maint (cvs-update): Don't assume that the shell
715 supports $(...), as Solaris sh doesn't.
716
717 * src/parse-gram.y (lloc_default): Remove test for empty
718 nonterminals at the end, since it didn't change the result.
719
720 2002-12-24 Paul Eggert <eggert@twinsun.com>
721
722 If the user does not define YYSTYPE as a macro, Bison now declares it
723 using typedef instead of defining it as a macro. POSIX requires this.
724 For consistency, YYLTYPE is also declared instead of defined.
725
726 %union directives can now have a tag before the `{', e.g., the
727 directive `%union foo {...}' now generates the C code
728 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
729 The default union tag is `YYSTYPE', for compatibility with Solaris 9
730 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
731 instead of `yyltype'.
732
733 `yystype' and `yyltype' are now obsolescent macros instead of being
734 typedefs or tags; they are no longer documented and will be
735 withdrawn in a future release.
736
737 * data/glr.c (b4_location_type): Remove.
738 (YYSTYPE): Renamed from yystype.
739 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
740 (struct YYLTYPE): Renamed from struct yyltype.
741 (YYLTYPE): Renamed from yyltype.
742 (yyltype, yystype): New (and obsolescent) macros,
743 for backward compatibility.
744 * data/yacc.c: Likewise.
745
746 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
747 does not specify a union tag. This is for compatibility with
748 Solaris 9 yacc.
749
750 * src/parse-gram.y (add_param): 2nd arg is now char * not char
751 const *, since it is now modified by stripping surrounding { }.
752 (current_braced_code): Remove.
753 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
754 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
755 trailing " {...}". Now of type <chars>.
756 (grammar_declaration): Adjust to bundled tokens.
757 (code_content): Remove; stripping is now done by add_param.
758 (print_token_value): Print contents of bundled tokens.
759 (token_name): New function.
760
761 * src/reader.h (braced_code, current_braced_code): Remove.
762 (token_name): New decl.
763
764 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
765 token_type, not braced_code code_kind. All uses changed.
766 (SC_PRE_CODE): New state, for scanning after a keyword that
767 has (or usually has) an immediately-following braced code.
768 (token_type): New local var, to keep track of which token type
769 to return when scanning braced code.
770 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
771 <INITIAL>"%parse-param", <INITIAL>"%printer",
772 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
773 instead of returning a token type immediately.
774 (<INITIAL>"{"): Set token type.
775 (<SC_BRACED_CODE>"}"): Use it.
776 (handle_action_dollar, handle_action_at): Now returns bool
777 indicating success. Fail if ! current_rule; this prevents a core dump.
778 (handle_symbol_code_dollar, handle_symbol_code_at):
779 Remove; merge body into caller.
780 (handle_dollar, handle_at): Complain in invalid contexts.
781
782 * NEWS, doc/bison.texinfo: Document the above.
783 * NEWS: Fix years and program names in copyright notice.
784
785 2002-12-17 Paul Eggert <eggert@twinsun.com>
786
787 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
788 Reporting, Table of Symbols): Omit mentions of %lex-param and
789 %parse-param from the documentation for now.
790
791 2002-12-15 Paul Eggert <eggert@twinsun.com>
792
793 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
794 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
795 lookahead symbol, and which sets yychar in parser actions) and it
796 disagreed with the Bison documentation. Bug
797 reported by Andrew Walrond.
798
799 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
800 as the caller now does that.
801 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
802 (YYEMPTY): Parenthesize right hand side, since others use it.
803 (yyparse): Don't assume that our generated code is the only code
804 that sets yychar.
805
806 2002-12-13 Paul Eggert <eggert@twinsun.com>
807
808 Version 1.75d.
809
810 POSIX requires a "yacc" command.
811 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
812 (MOSTLYCLEANFILES): Add yacc.
813 (yacc): New rule.
814 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
815 as an alias for bison y.
816
817 * po/LINGUAS: Add da.
818
819 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
820 problem with latest <getopt.h>.
821 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
822
823 * doc/fdl.texi: Upgrade to 1.2.
824 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
825 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
826 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
827 gnulib.
828 * config/install-sh: Sync with autotools.
829
830 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
831 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
832 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
833 locations are requested.
834 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
835 locations are requested.
836
837 2002-12-12 Paul Eggert <eggert@twinsun.com>
838
839 Remove unportable casts and storage allocation tricks.
840 While we're at it, remove almost all casts, since they
841 usually aren't needed and are a sign of trouble.
842
843 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
844
845 * src/derives.c (derives_compute): Do not subtract NTOKENS from
846 the pointer DSET returned by malloc; this isn't portable.
847 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
848 Similarly for DERIVES.
849 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
850 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
851 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
852
853 * src/derives.c (derives_compute): Do not bother invoking
854 int_of_rule_number, since rule numbers are integers.
855
856 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
857 rather than XMALLOC (char, N).
858
859 * src/files.c (filename_split): Rewrite to avoid cast.
860
861 * src/gram.h (symbol_number_as_item_number,
862 item_number_as_symbol_number, rule_number_as_item_number,
863 item_number_as_rule_number):
864 Now inline functions rather than macros, to avoid casts.
865 * src/state.h (state_number_as_int): Likewise.
866 * src/tables.c (state_number_to_vector_number,
867 symbol_number_to_vector_number): Likewise.
868
869 * src/gram.h (int_of_rule_number): Remove; no longer used.
870
871 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
872 since the resulting storage is always stored into.
873
874 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
875 where it's needed.
876
877 * src/muscle_tab.c (muscle_m4_output):
878 Now inline. Return bool, not int.
879 * src/state.c (state_compare): Likewise.
880 * src/symtab.c (symbol_check_defined,
881 symbol_check_alias_consistency, symbol_pack, symbol_translation,
882 hash_compare_symbol, hash_symbol):
883 Likewise.
884 * src/uniqstr.c (uniqstr_print): Likewise.
885 * src/muscle_tab.c (muscle_m4_output_processor):
886 New function, to avoid casts.
887 * src/state.c (state_comparator, stage_hasher): Likewise.
888 * src/symtab.c (symbol_check_defined_processor,
889 symbol_check_alias_consistency_processor, symbol_pack_processor,
890 symbol_translation_processor, hash_symbol_comparator,
891 hash_symbol_hasher): Likewise.
892 * src/uniqstr.c (uniqstr_print_processor): Likewise.
893 * src/muscle_tab.c (muscles_m4_output):
894 Use new functions instead of casting old functions unportably.
895 * src/state.c (state_hash_new): Likewise.
896 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
897 symbols_token_translations_init):
898 Likewise.
899 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
900
901 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
902 var instead of casting to long, to avoid casts.
903 (prepare_states): Use MALLOC rather than alloca, so that we don't
904 have to worry about alloca.
905 * src/state.c (state_hash_lookup): Likewise.
906
907 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
908 local var instead of casting to unsigned char, to avoid casts.
909
910 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
911 STATE_ALLOC): Remove.
912 (transitions_new, errs_new, reductions_new, state_new): Use malloc
913 rather than calloc, and use offsetof to avoid allocating slightly
914 too much storage.
915 (state_new): Initialize all members.
916
917 * src/state.c (state_hash): Use unsigned accumulator, not signed.
918
919 * src/symtab.c (symbol_free): Remove; unused.
920 (symbol_get): Remove cast in lhs of assignment.
921 (symbols_do): Now static. Accept generic arguments, not
922 hashing-related ones.
923
924 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
925 (symbol_processor): Remove.
926 (symbols_do): Remove decl; now static.
927
928 * src/system.h (alloca): Remove; decl no longer needed.
929 (<stddef.h>): Include, for offsetof.
930 (<inttypes.>, <stdint.h>): Include if available.
931 (uintptr_t): New type, if system lacks it.
932 (CALLOC, MALLOC, REALLOC): New macros.
933 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
934 new macros.
935
936 * src/tables.c (table_size): Now int, to pacify GCC.
937 (table_grow, table_ninf_remap): Use signed table size.
938 (save_row): Don't bother initializing locals when not needed.
939 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
940 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
941
942 * src/vcg.h: Correct misspellings.
943
944 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
945
946
947 * src/getargs.c (getargs): Don't assume EOF == -1.
948
949 2002-12-09 Paul Eggert <eggert@twinsun.com>
950
951 Change identifier spellings to avoid collisions with names
952 that are reserved by POSIX.
953
954 Don't use names ending in _t, since POSIX reserves them.
955 For consistency, remove _e and _s endings -- they're weren't
956 needed to remove ambiguity. All uses changed.
957 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
958 turn was just renamed from struniq_t.
959 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
960 which in turn was just renamed from struniq_processor_t.
961 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
962 in turn was renamed from hash_compare_struniq_t.
963 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
964 (state_list): Renamed from state_list_t.
965 * src/assoc.h (assoc): Renamed from assoc_t.
966 * src/conflicts.c (enum conflict_resolution): Renamed from
967 enum conflict_resolution_e.
968 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
969 (rule_list): Renamed from rule_list_t.
970 * src/getargs.h (enum trace): Renamed from enum trace_e.
971 (enum report): Renamed from enum report_e.
972 * src/gram.h (item_number): Renamed from item_number_t.
973 (rule_number): Renamed from rule_number_t.
974 (struct rule_s): Remove the "rule_s" part; not used.
975 (rule): Renamed from rule_t.
976 (rule_filter): Renamed from rule_filter_t.
977 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
978 (goto_list): Renamed from goto_list_t.
979 * src/lalr.h (goto_number): Renamed from goto_number_t.
980 * src/location.h (location): Renamed from location_t.
981 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
982 and moved here from:
983 * src/muscle_tab.h (muscle_entry_t): here.
984 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
985 (rule_list): Renamed from rule_list_t.
986 * src/print_graph.c (static_graph): Renamed from graph.
987 * src/reader.h (braced_code): Renamed from braced_code_t.
988 Remove brace_code_e tag.
989 * src/relation.h (relation_node): Renamed from relation_node_t.
990 (relation_nodes): Renamed from relation_nodes_t.
991 (relation): Renamed from relation_t.
992 * src/state.h (state_number): Renamed from state_number_t.
993 (struct state): Renamed from struct state_s.
994 (state): Renamed from state_t.
995 (transitions): Renamed from transitions_t. Unused (and
996 misspelled) transtion_s tag removed.
997 (errs): Renamed from errs_t. Unused errs_s tag removed.
998 (reductions): Renamed from reductions_t. Unused tag
999 reductions_s removed.
1000 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1001 (struct symbol_list): Renamed from struct symbol_list_s.
1002 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1003 (struct symbol): Renamed from struct symbol_s.
1004 (symbol): Renamed from symbol_t.
1005 * src/tables.c (vector_number): Renamed from vector_number_t.
1006 (action_number): Renamed from action_t.
1007 * src/tables.h (base_number): Renamed from base_t.
1008 * src/vcg.h (enum color): Renamed from enum color_e.
1009 (enum textmode): Renamed from enum textmode_e.
1010 (enum shape): Renamed from enum shape_e.
1011 (struct colorentry): Renamed from struct colorentry_s.
1012 (struct classname): Renamed from struct classname_s.
1013 (struct infoname): Renamed from struct infoname_s.
1014 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1015 (enum decision): Renamed from enum decision_e.
1016 (enum orientation): Renamed from enum orientation_e.
1017 (enum alignment): Renamed from enum alignment_e.
1018 (enum arrow_mode): Renamed from enum arrow_mode_e.
1019 (enum crossing_type): Renamed from enum crossing_type_e.
1020 (enum view): Renamed from enum view_e.
1021 (struct node): Renamed from struct node_s.
1022 (node): Renamed from node_t.
1023 (enum linestyle): Renamed from enum linestyle_e.
1024 (enum arrowstyle): Renamed from enum arrowstyle_e.
1025 (struct edge): Renamed from struct edge.
1026 (edge): Renamed from edge_t.
1027 (struct graph): Renamed from struct graph_s.
1028 (graph): Renamed from graph_t.
1029 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1030 Rename value_t -> value.
1031 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1032 value_t_as_yystype -> value_as_yystype.
1033
1034 Don't include <errno.h> in the mainstream code, since it
1035 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1036 * lib/get-errno.c, lib/get-errno.h: New files.
1037 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1038 get-errno.c.
1039 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1040 * src/output.c (output_skeleton): Likewise.
1041 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1042 instead of errno.
1043 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1044 Likewise.
1045 (handle_action_dollar, handle_action_at): Likewise.
1046 * src/system.h: Do not include <errno.h>.
1047 (TAB_EXT): Renamed from EXT_TAB.
1048 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1049
1050 Avoid str[a-z]*, since <string.h> reserves that name space.
1051 Change all instances of "struniq" in names to "uniqstr", and
1052 likewise for "STRUNIQ" and "UNIQSTR".
1053 * src/uniqstr.c: Renamed from src/struniq.c.
1054 * src/uniqstr.h: Renamed from src/struniq.h.
1055 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1056 * src/files.c (strsuffix): Remove; unused.
1057 (concat2): Renamed from stringappend. Now static.
1058 * src/files.h (strsuffix, stringappend): Remove; unused.
1059 * src/parse-gram.y (<chars>): Renamed from <string>.
1060 (<uniqstr>): Renamed from <struniq>.
1061 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1062 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1063 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1064 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1065 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1066 (N_EXPAND): Renamed from N_STRETCH.
1067
1068 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1069 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1070 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1071 Remove; unused.
1072 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1073 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1074 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1075 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1076 (BASE_MAXIMUM): Renamed from BASE_MAX.
1077 (BASE_MINIMUM): Renamed from BASE_MIN.
1078 (ACTION_MAX): Remove; unused.
1079 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1080 Unnecessary casts removed from above defines.
1081
1082
1083 Fix misspelling in names.
1084 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1085 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1086 G_NODE_ALIGNEMENT.
1087
1088
1089 * lib/timevar.c (timevar_report): Renamed from time_report,
1090 for consistency with other names.
1091 * lib/timevar.h (timevar_report): New decl.
1092 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1093
1094
1095 Sort include-file uses.
1096
1097 Reorder all include files under src to be in the order "system.h".
1098 then the ../lib include files in angle brackets (alphabetized),
1099 then the . include files in double-quotes (alphabetized). Fix
1100 dependency breakages encountered in this process, as follows:
1101 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1102 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1103 * src/state.h: Include "symtab.h".
1104
1105 2002-12-08 Paul Eggert <eggert@twinsun.com>
1106
1107 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1108 since this causes problems when __file__ contains character
1109 sequences like "@" that are treated specially by src/scan-skel.l.
1110 Instead, just use the file's basename. This fixes the bug
1111 reported by Martin Mokrejs in
1112 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
1113
1114 2002-12-06 Paul Eggert <eggert@twinsun.com>
1115
1116 Add support for rules that do not have trailing semicolons, as
1117 POSIX requires. Improve the quality of locations in Bison
1118 diagnostics.
1119
1120 * src/location.c: Include <quotearg.h>.
1121 (empty_location): Now const.
1122 (location_print): New function. Follow the recommendation of the
1123 GNU Coding Standards for locations that span file boundaries.
1124 * src/location.h: Do not include <quotearg.h>; no longer needed.
1125 (boundary): New type.
1126 (location_t): Use it. This allows locations to span file boundaries.
1127 All member uses changed: file -> start.file or end.file (as needed),
1128 first_line -> start.line, first_column -> start.column,
1129 last_line -> end.line, last_column -> end.column.
1130 (equal_boundaries): New function.
1131 (LOCATION_RESET, LOCATION_STEP): Remove.
1132 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1133 (empty_location): Now const.
1134 (location_print): New decl.
1135 * src/parse-gram.y (lloc_default): New function, which handles
1136 empty locations more accurately.
1137 (YYLLOC_DEFAULT): Use it.
1138 (%token COLON): Remove.
1139 (%token ID_COLON): New token.
1140 (rules): Use it.
1141 (declarations, rules): Remove trailing semicolon.
1142 (declaration, rules_or_grammar_declaration):
1143 Allow empty (";") declaration.
1144 (symbol_def): Remove empty actions; no longer needed.
1145 (rules_or_grammar_declaration): Remove trailing semicolon.
1146 (semi_colon.opt): Remove.
1147 * src/reader.h: Include location.h.
1148 (scanner_cursor): New decl.
1149 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1150 rolling our own.
1151 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1152 of *loc.
1153 (STEP): Remove. No longer needed, now that adjust_location does
1154 the work. All uses removed.
1155 (scanner_cursor): New var.
1156 (adjust_location): Renamed from extend_location. It now sets
1157 *loc and adjusts the scanner cursor. All uses changed.
1158 Don't bother testing for CR.
1159 (handle_syncline): Remove location arg; now updates scanner cursor.
1160 All callers changed.
1161 (unexpected_end_of_file): Now accepts start boundary of token or
1162 comment, not location. All callers changed. Update scanner cursor,
1163 not the location.
1164 (SC_AFTER_IDENTIFIER): New state.
1165 (context_state): Renamed from c_context. All uses changed.
1166 (id_loc, code_start, token_start): New local vars.
1167 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1168 processing of Yacc white space and equivalents here.
1169 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1170 instead of returning ID immediately, since we need to search for
1171 a subsequent colon.
1172 (<INITIAL>"'", "\""): Save token_start.
1173 (<INITIAL>"%{", "{", "%%"): Save code_start.
1174 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1175 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1176 BEGIN context_state at end, not INITIAL.
1177 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1178 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1179 Return correct token start.
1180 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1181 the start of a character, string or multiline comment is found.
1182 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1183 Reduction): Adjust reported locations to match the more-precise
1184 results now expected.
1185 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1186 * tests/reduce.at (Useless Rules, Reduced Automaton,
1187 Underivable Rules): Likewise.
1188 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1189 or "|"' now that so many other tokens are allowed by the new grammar.
1190
1191 * src/complain.h (current_file): Remove duplicate decl;
1192 current_file is now owned by files.h.
1193 * src/complain.c, src/scan-gram.l: Include files.h.
1194
1195 2002-12-06 Paul Eggert <eggert@twinsun.com>
1196
1197 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1198 promotes to int; it might be unsigned int.
1199 * data/yacc.c (yy_reduce_print): Likewise.
1200
1201 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1202 be #defined in the prologue, not in the Bison declarations.
1203 This fixes Debian Bug 102878, reported by Shaul Karl.
1204
1205 2002-12-02 Paul Eggert <eggert@twinsun.com>
1206
1207 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1208 * lib/strtoul.c: New file, from gnulib.
1209 This fixes a porting bug reported by Peter Klein in
1210 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1211
1212 2002-11-30 Paul Eggert <eggert@twinsun.com>
1213
1214 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1215 and put only a forward declaration in the prologue. This is for
1216 consistency with the other scanner helper functions.
1217
1218 Type clashes now generate warnings, not errors, since it
1219 appears that POSIX may allow some grammars with type clashes.
1220 * src/reader.c (grammar_current_rule_check): Warn about
1221 type clashes instead of complaining.
1222 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1223
1224 Add Yacc library, since POSIX requires it.
1225 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1226 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1227 * lib/main.c, lib/yyerror.c: New files.
1228
1229 gram_error can be static; it need not be extern.
1230 * src/reader.h (gram_error): Remove decl.
1231 * src/parse-gram.y (gram_error): Now static. Add static decl.
1232 (print_token_value): Omit parameter names from forward decl,
1233 for consistency.
1234
1235 2002-11-29 Paul Eggert <eggert@twinsun.com>
1236
1237 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1238 be declared before being used. E.g., one should typically
1239 declare them in the prologue. Use GNU coding style in examples.
1240 Put "const" consistently after the type it modifies. Mention
1241 that C99 supports "inline". Mention that yyerror traditionally
1242 returns "int".
1243
1244 %parse-param and %lex-param now take just one argument, the
1245 declaration; the argument name is deduced from the declaration.
1246
1247 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1248 Reporting, Table of Symbols): Document this.
1249 * src/parse-gram.y (add_param): New function.
1250 (COMMA): Remove.
1251 (declaration): Implement new rule for %parse-param and %lex-param.
1252 * src/scan-gram.l: "," now elicits a warning, rather than being
1253 a token; this is more compatible with byacc.
1254 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1255
1256 2002-11-27 Paul Eggert <eggert@twinsun.com>
1257
1258 Rename identifiers to avoid real and potential collisions.
1259
1260 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1261 to avoid collision with lex macro described by Bruce Lilly in
1262 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1263 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1264 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1265 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1266 All uses changed.
1267 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1268 The name "yycontrol" violates the name space rules, and this stuff
1269 wasn't being used anyway.
1270 (input): Remove action; this stuff wasn't being used.
1271 (gram_error): Rename local variable yylloc -> loc.
1272 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1273 (YY_DECL): Don't use "yy" at start of local variables.
1274 All uses changed, e.g., yylloc -> loc.
1275 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1276 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1277 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1278 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1279
1280 * src/parse-gram.y (gram_error): loc is now const *.
1281 * src/reader.h (gram_error): Likewise.
1282
1283 2002-11-24 Paul Eggert <eggert@twinsun.com>
1284
1285 Version 1.75c.
1286
1287 * tests/actions.at (Actions after errors): Use an output format
1288 more similar to that of the Printers and Destructors test.
1289 Test the position of the ';' token too.
1290 (Printers and Destructors): Likewise.
1291 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1292 unnecessarily alarming people when the test fails.
1293
1294 * data/yacc.c (yyerrlab1): Move this label down, so that the
1295 parser does not discard the lookahead token if the user code
1296 invokes YYERROR. This change is required for POSIX conformance.
1297
1298 * lib/error.c: Sync with gnulib.
1299
1300 2002-11-22 Paul Eggert <eggert@twinsun.com>
1301
1302 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1303 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1304 * lib/xmalloc.c: Likewise.
1305
1306 2002-11-20 Paul Eggert <eggert@twinsun.com>
1307
1308 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1309
1310 2002-11-20 Paul Eggert <eggert@twinsun.com>
1311
1312 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1313 should use `if (! x) abort ();' rather than `assert (x);', and
1314 anyway it's one less thing to worry about configuring.
1315
1316 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1317 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1318 and replace all instances of assert with abort.
1319 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1320 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1321
1322 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1323 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1324 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1325 hash_find_entry, hash_rehash, hash_insert): Likewise.
1326 * src/conflicts.c (resolve_sr_conflict): Likewise.
1327 * src/lalr.c (set_goto_map, map_goto): Likewise.
1328 * src/nullable.c (nullable_compute): Likewise.
1329 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1330 * src/reader.c (packgram, reader): Likewise.
1331 * src/state.c (state_new, state_free, state_transitions_set,
1332 state_reduction_find): Likewise.
1333 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1334 symbol_pack): Likewise.
1335 * src/tables.c (conflict_row, pack_vector): Likewise.
1336 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1337 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1338 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1339 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1340
1341 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1342 (ARGMATCH_CONSTRAINT): New macro.
1343 (ARGMATCH_ASSERT): Use it.
1344
1345 * src/system.h (verify): New macro.
1346 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1347 rather than assert.
1348 * src/tables.c (tables_generate): Likewise.
1349
1350 * src/struniq.c (struniq_assert): Now returns void, and aborts
1351 if the assertion is false.
1352 (struniq_assert_p): Remove.
1353 * src/struniq.h: Likewise.
1354
1355 2002-11-18 Paul Eggert <eggert@twinsun.com>
1356
1357 * data/glr.c (yygetLRActions): Replace `yyindex' with
1358 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1359 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1360 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1361
1362 2002-11-18 Akim Demaille <akim@epita.fr>
1363
1364 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1365 space.
1366 From Tim Van Holder.
1367
1368 2002-11-17 Paul Eggert <eggert@twinsun.com>
1369
1370 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1371 to "SyntaxError" for consistency with my 2002-11-15 change.
1372
1373 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1374 not define to {}, since this breaks the common use of `YYDPRINTF
1375 ((...));' if a single statement is desired (e.g. before `else').
1376 Work around GCC warnings by surrounding corresponding calls with
1377 {} if needed.
1378 (yyhasResolvedValue): Remove unused function.
1379 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1380 loop body.
1381 (yyreportSyntaxError): Renamed from yyreportParseError.
1382 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1383 All uses changed.
1384 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1385 extern when possible. Remove unused initializations.
1386
1387 2002-11-16 Akim Demaille <akim@epita.fr>
1388
1389 Augment the similarity between GLR and LALR traces.
1390
1391 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1392 (YY_REDUCE_PRINT): New.
1393 (yyparse): Use them.
1394 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1395 YYDPRINT here.
1396 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1397 state reached after the reduction/recovery, since...
1398 (yyparse, yyprocessOneStack): Report the state we are entering in.
1399
1400 2002-11-16 Akim Demaille <akim@epita.fr>
1401
1402 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1403 Add support for --trace=skeleton.
1404 * src/scan-skel.l: %option debug.
1405 Scan strings of non-@ or \n instead of character by character.
1406 (scan_skel): Handle trace_skeleton.
1407 (QPUTS): New.
1408 (@output_parser_name@, @output_header_name@): ``Restore'' their
1409 support (used to be M4 macros).
1410 * data/yacc.c: Quote larger chunks, a la glr.c.
1411 * data/lalr1.cc: Likewise.
1412 The header guards are no longer available, so use some other
1413 string than `YYLSP_NEEDED'.
1414
1415 2002-11-16 Akim Demaille <akim@epita.fr>
1416
1417 Make the ``Printers and Destructors'' test more verbose, taking
1418 `yacc.c''s behavior as (possibly wrong) reference.
1419
1420 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1421 instead of fprint on stdout.
1422 Set and report the last_line of the symbols.
1423 Consistently display values and locations.
1424
1425 2002-11-16 Paul Eggert <eggert@twinsun.com>
1426
1427 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1428
1429 2002-11-15 Paul Eggert <eggert@twinsun.com>
1430
1431 * tests/actions.at (Actions after errors): New test case.
1432
1433 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1434 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1435 tests/action.at, tests/calc.at, tests/conflicts.at,
1436 tests/cxx-type.at, tests/regression.at:
1437 "parse error" -> "syntax error" for POSIX compatibility.
1438 "parsing stack overflow..." -> "parser stack overflow" so
1439 that code matches Bison documentation.
1440
1441 2002-11-15 Akim Demaille <akim@epita.fr>
1442
1443 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1444 take two BRACED_CODE, not two string_content.
1445 Free the scanner's obstack when we are done.
1446 (code_content): New.
1447 * tests/calc.at: Adjust.
1448 * doc/bison.texinfo: Adjust.
1449 Also, make sure to include the `,' for these declarations.
1450
1451 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1452
1453 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1454 definition; avoids potential autoreconf problems.
1455
1456 2002-11-15 Akim Demaille <akim@epita.fr>
1457
1458 Always check the value returned by yyparse.
1459
1460 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1461 returned by yyparse.
1462 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1463 Adjust calls.
1464 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1465 returned by yyparse.
1466
1467 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1468
1469 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1470 on input.at test.
1471
1472 2002-11-14 Paul Eggert <eggert@twinsun.com>
1473
1474 * src/output.c (output_skeleton): Call xfopen instead of
1475 duplicating xfopen's body.
1476
1477 Fix bugs reported by Nelson H. F. Beebe in
1478 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1479
1480 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1481 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1482 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1483 file twice in the grammar, as an extra check.
1484
1485 * tests/input.at (Torturing the Scanner): Surround the
1486 backslash-newline tests with "#if 0", to make it less likely that
1487 we'll run into compiler bugs. Bring back solitary \ inside
1488 comment, but add a closing comment to work around HP C bug. Don't
1489 test backslash-newline in C character constant.
1490
1491 2002-11-14 Akim Demaille <akim@epita.fr>
1492
1493 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1494 status of the compiler.
1495 Calling `exit 1' is no longer needed.
1496 Reported by Nelson H. F. Beebe.
1497
1498 2002-11-14 Akim Demaille <akim@epita.fr>
1499
1500 * tests/atlocal.in (CPPFLAGS): We have config.h.
1501 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1502 New.
1503 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1504 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1505 * tests/regression.at, tests/torture.at: Use them for all the
1506 grammars that are to be compiled.
1507 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1508 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1509 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1510
1511 2002-11-14 Akim Demaille <akim@epita.fr>
1512
1513 * doc/bison.texinfo: Various formatting changes (alignments in
1514 samples, additional @group/@end group, GCS in samples.
1515 Use @deffn instead of simple @table to define the directives,
1516 macros, variables etc.
1517
1518 2002-11-13 Paul Eggert <eggert@twinsun.com>
1519
1520 Fix some bugs reported by Albert Chin-A-Young in
1521 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1522
1523 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1524 -o c"; the HP C compiler chatters during compilation.
1525 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1526 * tests/headers.at (export YYLTYPE): Likewise.
1527
1528 * tests/input.at (Torturing the Scanner): Remove lines containing
1529 solitary backslashes, as they tickle a bug in the HP C compiler.
1530
1531 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1532 comments, since they're not portable. Use GNU coding style.
1533
1534 2002-11-13 Akim Demaille <akim@epita.fr>
1535
1536 * data/yacc.c: Leave bigger chunks of quoted text.
1537 (YYDSYMPRINTF): New.
1538 Use it to report symbol activities.
1539 * data/glr.c (YYDSYMPRINTF): New.
1540 Use it.
1541
1542 2002-11-12 Paul Eggert <eggert@twinsun.com>
1543
1544 Version 1.75b.
1545
1546 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1547 (yyglrReduce): Return yyok, not 0.
1548 This should avoid the enumerated-type warnings reported
1549 by Nelson H. F. Beebe in
1550 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1551
1552 * lib/bbitset.h (BITSET_INLINE): Remove.
1553 * lib/bitset.h [! BITSET_INLINE]: Remove.
1554 (bitset_set, bitset_reset, bitset_test): Rename local vars
1555 to avoid shadowing warnings by GCC.
1556
1557 * data/glr.c (inline): Remove #define. It's the user's
1558 responsibility to #define it away, just like 'const'.
1559 This fixes one of the bugs reported by Nelson H. F. Beebe in
1560 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1561
1562 * Makefile.maint (po-check): Scan .l and .y files instead of the
1563 .c and the .h files that they generate. This fixes the bug
1564 reported by Tim Van Holder in:
1565 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1566 Look for N_ as well as for _. Try to avoid matching #define for
1567 N_ and _.
1568 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1569 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1570 * src/scan-gram.l: Revamp regular expressions so that " and '
1571 do not confuse xgettext.
1572
1573 * src/struniq.h (struniq_new): Do not declare the return type
1574 to be 'const'; this violates the C standard.
1575 * src/struniq.c (struniq_new): Likewise.
1576
1577 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1578
1579 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1580 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1581 linker.
1582
1583 2002-11-12 Akim Demaille <akim@epita.fr>
1584
1585 * Makefile.maint: Sync with Autoconf:
1586 (local_updates): New.
1587
1588 2002-11-12 Akim Demaille <akim@epita.fr>
1589
1590 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1591
1592 2002-11-12 Akim Demaille <akim@epita.fr>
1593
1594 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1595 locations.
1596
1597 2002-11-12 Akim Demaille <akim@epita.fr>
1598
1599 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1600 not yyvalue.
1601
1602 2002-11-12 Akim Demaille <akim@epita.fr>
1603
1604 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1605 Use it to test the GLR parser.
1606
1607 2002-11-12 Akim Demaille <akim@epita.fr>
1608
1609 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1610 defines it.
1611 * data/glr.c (yystos): New.
1612 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1613 (YYDSYMPRINT): New.
1614 (yyval): Don't define it, it is handled via M4.
1615 (yyrecoverParseError): Free verbosely the discarded symbols.
1616 * data/yacc.c (yysymprint): Remove, rather...
1617 (b4_yysymprint_generate): invoke.
1618 * data/c.m4 (b4_yysymprint_generate): New.
1619 Accept pointers as arguments, as opposed to the version from
1620 yacc.c.
1621 (b4_yydestruct_generate): Likewise.
1622 * tests/cations.at (Printers and Destructors): Use Bison directives
1623 instead of CPP macros.
1624 Don't rely on internal details.
1625
1626 2002-11-12 Akim Demaille <akim@epita.fr>
1627
1628 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1629 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1630 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1631 it against YYEMPTY and so forth), work on yytoken (i.e., set
1632 it to YYEMPTY etc.).
1633 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1634 (b4_symbol_actions): Remove.
1635 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1636 for 0, end-of-input.
1637
1638 2002-11-12 Akim Demaille <akim@epita.fr>
1639
1640 * doc/bison.texinfo (Destructor Decl): New.
1641
1642 2002-11-12 Akim Demaille <akim@epita.fr>
1643
1644 * src/tables.c (tables_generate): Use free for pointers that
1645 cannot be NULL, not XFREE.
1646 (pack_vector): Use assert, not fatal, for bound violations.
1647 * src/state.c (state_new): Likewise.
1648 * src/reader.c (reader): Likewise.
1649 * src/lalr.c (set_goto_map): Likewise.
1650 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1651 the file name.
1652
1653 2002-11-12 Akim Demaille <akim@epita.fr>
1654
1655 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1656 Restore.
1657 * src/scan-gram.l (last_string): Is global to the file, not to
1658 yylex.
1659 * src/parse-gram.y (input): Don't append the epilogue here,
1660 (epilogue.opt): do it here, and free the scanner's obstack.
1661 * src/reader.c (epilogue_set): Rename as...
1662 (epilogue_augment): this.
1663 * data/c.m4 (b4_epilogue): Defaults to empty.
1664
1665 2002-11-12 Akim Demaille <akim@epita.fr>
1666
1667 * src/getargs.c (long_options): Remove duplicates.
1668 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1669 Remove.
1670 * doc/bison.rnh: Remove.
1671 * doc/bison.texinfo (VMS Invocation): Remove.
1672
1673 2002-11-12 Akim Demaille <akim@epita.fr>
1674
1675 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1676 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1677
1678 Use struniq for symbols.
1679
1680 * src/symtab.h (symbol_t): The tag member is a struniq.
1681 (symbol_type_set): Adjust.
1682 * src/symtab.c (symbol_new): Takes a struniq.
1683 (symbol_free): Don't free the tag member.
1684 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1685 (hash_compare_symbol, hash_symbol): these.
1686 Use the fact that tags as struniqs.
1687 (symbol_get): Use struniq_new.
1688 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1689 Returns a strniq.
1690 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1691 and type members are struniqs.
1692 * src/reader.c (get_merge_function)
1693 (grammar_current_rule_merge_set): Adjust.
1694 (TYPE, current_type): Are struniq.
1695
1696 Use struniq for file names.
1697
1698 * src/files.h, src/files.c (infile): Split into...
1699 (grammar_file, current_file): these.
1700 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1701 * src/reduce.c (reduce_print): Likewise.
1702 * src/getargs.c (getargs): Likewise.
1703 * src/complain.h, src/complain.c: Likewise.
1704 * src/main.c (main): Call struniqs_new early enough to use it for
1705 file names.
1706 Don't free the input file name.
1707
1708 2002-11-12 Akim Demaille <akim@epita.fr>
1709
1710 * src/symtab.c (symbol_free): Remove dead deactivated code:
1711 type_name are properly removed.
1712 Don't use XFREE to free items that cannot be NULL.
1713 * src/struniq.h, src/struniq.c: New.
1714 * src/main.c (main): Initialize/free struniqs.
1715 * src/parse-gram.y (%union): Add astruniq member.
1716 (yyprint): Adjust.
1717 * src/scan-gram.l (<{tag}>): Return a struniq.
1718 Free the obstack bit that used to store it.
1719 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1720
1721 2002-11-11 Paul Eggert <eggert@twinsun.com>
1722
1723 Revamp to fix many (but not all) of the C- and M4-related quoting
1724 problems. Among other things, this fixes the Bison bug reported
1725 by Jan Hubicka when processing the Bash grammar; see:
1726 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1727
1728 Use new @ escapes consistently. Represent brackets with @{ and @}
1729 rather than @<:@ and @:>@, since this works a bit better with dumb
1730 editors like vi. Represent @ with @@, since @ is now consistently
1731 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1732 __ofile__, to avoid unexpected expansions. Similarly, use @output
1733 rather than #output.
1734
1735 * data/c.m4 (b4_copyright): Omit file name from comment, since
1736 the file name could contain "*/".
1737 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1738 be quoted. All uses changed.
1739
1740 * data/glr.c: Use new @ escapes consistently.
1741 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1742 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1743 Remove, since they couldn't handle arbitrary characters in file
1744 names.
1745 * data/lalr1.cc: Likewise.
1746 * data/yacc.c: Likewise.
1747
1748 * src/files.c (output_infix): Remove; all uses removed.
1749 * src/files.h: Likewise.
1750
1751 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1752 mishandled funny characters in file names, and anyway it isn't
1753 needed any more.
1754 * data/yacc.c: Likewise.
1755 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1756
1757 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1758 * data/yacc.c: Likewise.
1759
1760 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1761 strings now.
1762 (muscle_init): Quote filename as a C string.
1763 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1764 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1765 * src/output.c (escaped_file_name_output): New function.
1766 (prepare_symbols): Quote tokens for M4.
1767 (prepare): Don't insert output_infix, output_prefix,
1768 output_parser_name, output_header_name; this is now down by scan-skel.
1769 Insert skeleton as a C string.
1770
1771 * src/output.c (user_actions_output, symbol_destructors_output,
1772 symbol_printers_output): Quote filenames for C and M4.
1773 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1774
1775 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1776 escapes other than \\ and \'; this simplifies the code.
1777 (<SC_STRING>): Likewise, for \\ and \".
1778 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1779 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1780 Use new escapes @{ and @} for [ and ].
1781
1782 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1783 them with auto vars.
1784 Switch to new escape scheme, where @ is the escape character uniformly.
1785 Abort if a stray escape character is found. Avoid unbounded input
1786 buffer when parsing non-escaped text.
1787
1788 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1789 __oline__, #output, $@, and @{ do not have unintended meanings.
1790
1791 2002-11-09 Paul Eggert <eggert@twinsun.com>
1792
1793 Fix the test failure due to GCC warnings described in
1794 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1795 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1796 evaluate to 0 if it's impossible for NINF to be in the respective
1797 table.
1798 (yygetLRActions, yyrecoverParseError): Use them.
1799
1800 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1801 counted in the token inserted at end of file. Now takes
1802 location_t *, not location_t, so that the location can be
1803 adjusted. All uses changed.
1804
1805 * tests/regression.at (Invalid inputs): Adjust wording in
1806 diagnostic to match the new behavior.
1807
1808 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1809 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1810 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1811 abort ();'. This reduces the runtime of the "Many lookaheads"
1812 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1813 GCC 3.2.
1814
1815 2002-11-07 Paul Eggert <eggert@twinsun.com>
1816
1817 * src/parse-gram.y (CHARACTER): Remove unused token.
1818 All uses removed.
1819
1820 * src/scan-gram.l: Remove stack option. We no longer use the
1821 stack, since the stack was never deeper than 1; instead, use the
1822 new auto var c_context to record the stacked value.
1823
1824 Remove nounput option. At an unexpected end of file, we now unput
1825 the minimal input necessary to end cleanly; this simplifies the
1826 code.
1827
1828 Avoid unbounded token sizes where this is easy.
1829
1830 (unexpected_end_of_file): New function.
1831 Use it to systematize the error message on unexpected EOF.
1832 (last-string): Now auto, not static.
1833 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1834 (scanner_last_string_free): Remove; not used.
1835 (percent_percent_count): Move decl to just before use.
1836 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1837 not the (never otherwised-used) CHARACTER.
1838
1839 2002-11-07 Akim Demaille <akim@epita.fr>
1840
1841 Let yyerror always receive the msg as last argument, so that
1842 yyerror can be variadic.
1843
1844 * data/yacc.c (b4_yyerror_args): New.
1845 Use it when calling yyerror.
1846 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1847 Use it when calling yyerror.
1848 * doc/bison.texinfo (Error Reporting): Adjust.
1849 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1850 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1851
1852 2002-11-06 Akim Demaille <akim@epita.fr>
1853
1854 #line should have quoted strings.
1855 Ideally, this should be done by m4_quotearg.
1856
1857 * src/scan-skel.l: Include quotearg.h.
1858 Quote __ofile__.
1859 * src/output.c (symbol_printers_output)
1860 (symbol_destructors_output): Quote the file name.
1861
1862 2002-11-06 Akim Demaille <akim@epita.fr>
1863
1864 * tests/regression.at (Invalid inputs): Adjust to the recent
1865 messages.
1866
1867 2002-11-06 Akim Demaille <akim@epita.fr>
1868
1869 Restore --no-lines.
1870 Reported by Jim Kent.
1871
1872 * data/c.m4 (b4_syncline): New.
1873 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1874 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1875 * src/output.c (user_actions_output): Likewise.
1876 (prepare): Define 'b4_synclines_flag'.
1877 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1878
1879 2002-11-06 Akim Demaille <akim@epita.fr>
1880
1881 * src/main.c (main): Free `infile'.
1882 * src/scan-gram.l (handle_syncline): New.
1883 Recognize `#line'.
1884 * src/output.c (user_actions_output, symbol_destructors_output)
1885 (symbol_printers_output): Use the location's file name, not
1886 infile.
1887 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1888
1889 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1890
1891 * src/tables.c (matching_state): Don't allow states to match if
1892 either has GLR conflict entries.
1893
1894 2002-11-05 Paul Eggert <eggert@twinsun.com>
1895
1896 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1897 "integer out of range" rather than "invalid value".
1898 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1899 accordingly.
1900
1901 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1902 Also, remove one static variable in the scanner.
1903
1904 * src/scan-gram.l (braces_level): Now auto, not static.
1905 Initialize to zero if the compiler is being picky.
1906 (INITIAL): Clear braces_level instead of incrementing it.
1907 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1908 as POSIX 1003.1-2001 requires.
1909 * src/system.h (IF_LINT): New macro, taken from coreutils.
1910 * configure.ac: Define "lint" if --enable-gcc-warnings.
1911
1912 2002-11-05 Akim Demaille <akim@epita.fr>
1913
1914 * src/scan-gram.l: When it starts with `%', complain about the
1915 whole directive, not just that `invalid character: %'.
1916
1917 2002-11-04 Akim Demaille <akim@epita.fr>
1918
1919 * Makefile.maint: Update from Autoconf.
1920 (update, cvs-update, po-update, do-po-update): New.
1921
1922 2002-11-04 Akim Demaille <akim@epita.fr>
1923
1924 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1925 and yyerror.
1926 Have yyerror `use' its arguments.
1927 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1928 returns true when location & yacc & pure & parse-param.
1929 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1930
1931 2002-11-04 Akim Demaille <akim@epita.fr>
1932
1933 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1934 clashes.
1935 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1936 font-lock-mode.
1937 Use complain_at.
1938 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1939 slot 0.
1940
1941 2002-11-03 Paul Eggert <eggert@twinsun.com>
1942
1943 * src/reader.c (get_merge_function, grammar_current_rule_check):
1944 Use consistent diagnostics for reporting type name clashes.
1945 Quote the types with <>, for consistency with Yacc.
1946 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1947
1948 2002-11-03 Akim Demaille <akim@epita.fr>
1949
1950 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1951 New.
1952 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1953 (b4_parse_param): Remove.
1954 Use b4_identification.
1955 Propagate b4_pure_args where needed to pass them to yyerror.
1956 * data/glr.m4 (b4_parse_param): Remove.
1957 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1958 (b4_lpure_formals): New.
1959 Use b4_identification.
1960 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1961 b4_user_formals and b4_user_args.
1962 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1963 (yyreportAmbiguity): When using a pure parser, also need
1964 the location, and the parse-params.
1965 Adjust callers.
1966 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1967 When using a pure parser, also need the parse-params.
1968 Adjust callers.
1969 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1970 (%pure-parser + %parse-param) LALR and GLR parsers.
1971 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1972 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1973 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1974 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1975 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1976 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1977 * doc/bison.texinfo: Untabify the whole file.
1978 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1979 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1980 (Error Reporting): Adjust to these new directives.
1981 Document %error-verbose, deprecate YYERROR_VERBOSE.
1982
1983 2002-11-03 Akim Demaille <akim@epita.fr>
1984
1985 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1986 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1987 command line options.
1988 * tests/cxx-type.at: Formatting changes.
1989
1990 2002-11-03 Paul Eggert <eggert@twinsun.com>
1991
1992 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1993 to count columns correctly, and to check for invalid inputs.
1994
1995 Use mbsnwidth to count columns correctly. Account for tabs, too.
1996 Include mbswidth.h.
1997 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1998 (extend_location): New function.
1999 (YY_LINES): Remove.
2000
2001 Handle CRLF in C code rather than in Lex code.
2002 (YY_INPUT): New macro.
2003 (no_cr_read): New function.
2004
2005 Scan UCNs, even though we don't fully handle them yet.
2006 (convert_ucn_to_byte): New function.
2007
2008 Handle backslash-newline correctly in C code.
2009 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2010 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2011 all uses changed.
2012 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2013 Use {splice} wherever C allows backslash-newline.
2014 YY_STEP after space, newline, vertical-tab.
2015 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2016
2017 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2018
2019 ({int}, handle_action_dollar, handle_action_at): Check for integer
2020 overflow.
2021
2022 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2023
2024 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2025 as well as \000. Check for UCHAR_MAX, not 255.
2026 Allow \x with an arbitrary positive number of digits, as in C.
2027 Check for overflow here.
2028 Allow \? and UCNs, for compatibility with C.
2029
2030 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2031 with quote slot used by complain_at.
2032
2033 * tests/input.at: Add tests for backslash-newline, m4 quotes
2034 in symbols, long literals, and funny escapes in strings.
2035
2036 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2037 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2038 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2039 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2040 * m4/mbswidth.m4: New file, from GNU coreutils.
2041
2042 * doc/bison.texinfo (Grammar Outline): Document // comments.
2043 (Symbols): Document that trigraphs have no special meaning in Bison,
2044 nor is backslash-newline allowed.
2045 (Actions): Document that trigraphs have no special meaning.
2046
2047 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2048 no longer used.
2049
2050 2002-11-02 Paul Eggert <eggert@twinsun.com>
2051
2052 * src/reader.c: Don't include quote.h; not needed.
2053 (get_merge_function): Reword warning to be consistent with
2054 type clash diagnostic in grammar_current_rule_check.
2055
2056 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2057 bug in trigraph handling.
2058
2059 * src/output.c (prepare_symbols): When printing token names,
2060 escape "[" as "@<:@" and likewise for "]".
2061
2062 * src/system.h (errno): Remove declaration, as we are now
2063 assuming C89 or better, and C89 guarantees errno.
2064
2065 2002-10-30 Paul Eggert <eggert@twinsun.com>
2066
2067 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2068 Check for close failures.
2069 * src/files.h (xfclose): Return void, not int, since it always
2070 returned zero.
2071 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2072 indicates one.
2073 * src/output.c (output_skeleton): Use xfclose rather than fclose
2074 and ferror. xfclose now checks ferror.
2075
2076 * data/glr.c (YYLEFTMOST_STATE): Remove.
2077 (yyreportTree): Use a stack-based leftmost state. This avoids
2078 our continuing battles with bogus warnings about initializers.
2079
2080 2002-10-30 Akim Demaille <akim@epita.fr>
2081
2082 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2083 #if.
2084
2085 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2086
2087 * tests/glr-regr1.at: New test for reported regressions.
2088 * tests/testsuite.at: Add glr-regr1.at test.
2089 * tests/Makefile.am: Add glr-regr1.at test.
2090
2091 2002-10-24 Paul Eggert <eggert@twinsun.com>
2092
2093 Version 1.75a.
2094
2095 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2096 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2097 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2098 Don't assume strdup exists; POSIX says its an XSI extension.
2099 Check for buffer overflow on input.
2100
2101 2002-10-24 Akim Demaille <akim@epita.fr>
2102
2103 * src/output.c (output_skeleton): Don't disable M4sugar comments
2104 too soon: it results in comments being expanded.
2105 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2106 first output.
2107
2108 2002-10-24 Akim Demaille <akim@epita.fr>
2109
2110 * data/yacc.c (m4_int_type): New.
2111 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2112 char' as only yacc.c wants K&R portability.
2113 * data/glr.c (yysigned_char): Remove.
2114 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2115 Reported by Quoc Peyrot.
2116
2117 2002-10-23 Paul Eggert <eggert@twinsun.com>
2118
2119 * src/main.c (main): With --trace=time, report times even if a
2120 non-fatal error occurs. Formerly, the times were reported in some
2121 such cases but not in others.
2122 * src/reader.c (reader): Just return if a complaint has been issued,
2123 instead of exiting, so that 'main' can report times.
2124
2125 2002-10-22 Akim Demaille <akim@epita.fr>
2126
2127 * src/system.h: Include sys/types.
2128 Reported by Bert Deknuydt.
2129
2130 2002-10-23 Paul Eggert <eggert@twinsun.com>
2131
2132 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2133 Suggested by Art Haas.
2134
2135 2002-10-22 Paul Eggert <eggert@twinsun.com>
2136
2137 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2138 decl; not needed any more.
2139 * src/main.c (main): Use return to exit, undoing yesterday's change.
2140 The last OS that we could find where this wouldn't work is
2141 SunOS 3.5, and that's too old to worry about now.
2142
2143 * data/glr.c (struct yyltype): Define members even when not
2144 doing locations. This is more consistent with yacc.c, and it
2145 works around the following bug reports:
2146 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2147 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
2148
2149 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2150 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2151 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2152
2153 2002-10-22 Akim Demaille <akim@epita.fr>
2154
2155 * data/README: New.
2156
2157 2002-10-21 Paul Eggert <eggert@twinsun.com>
2158
2159 Be consistent about 'bool'; the old code used an enum in one
2160 module and an int in another, and this violates the C standard.
2161 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2162 * configure.ac (AC_HEADER_STDBOOL): Add.
2163 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2164 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2165 * src/symtab.c (hash_compare_symbol_t): Likewise.
2166 * src/system.h (bool, false, true): Use a definition consistent
2167 with ../lib/hash.c. All uses changed.
2168
2169 * src/complain.c (warning_issued): Renamed from warn_message_count,
2170 so that we needn't worry about integer overflow (!).
2171 Now of type bool. All uses changed.
2172 (complaint_issued): Renamed from complain_message_count; likewise.
2173
2174 * src/main.c (main): Use exit to exit with failure.
2175
2176 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2177 rather than 1 and 0.
2178 * src/main.c (main): Likewise.
2179 * src/getargs.c (getargs): Likewise.
2180 * src/reader.c (reader): Likewise.
2181
2182 * src/getarg.c (getargs): Remove duplicate code for
2183 "Try `bison --help'".
2184
2185 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2186 What was that "2" for?
2187
2188 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2189 * src/getargs.c (usage): Likewise.
2190
2191 * src/getargs.c (getargs): When there are too few operands, report
2192 the last one. When there are too many, report the first extra
2193 one. This is how diffutils does it.
2194
2195 2002-10-20 Paul Eggert <eggert@twinsun.com>
2196
2197 Remove K&R vestiges.
2198 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2199 * src/complain.c (VA_START): Remove. Assume prototypes.
2200 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2201 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2202 fatal): Assume prototypes.
2203 * src/complain.h: Assume prototypes.
2204 * src/system.h (PARAMS): Remove.
2205 Include <limits.h> unconditionally, since it's guaranteeed even
2206 for a freestanding C89 compiler.
2207 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2208 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2209
2210 2002-10-20 Akim Demaille <akim@epita.fr>
2211
2212 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2213 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2214 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2215 (yyresolveStates, yyresolveAction, yyresolveStack)
2216 (yyprocessOneStack): Use them.
2217 (yy_reduce_print): New.
2218 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2219
2220 2002-10-20 Akim Demaille <akim@epita.fr>
2221
2222 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2223 arguments and output `void'.
2224 (b4_c_function): Rename as...
2225 (b4_c_function_def): this.
2226 (b4_c_function_decl, b4_c_ansi_function_def)
2227 (b4_c_ansi_function_decl): New.
2228 Change the interpretation of the arguments: before `int, foo', now
2229 `int foo, foo'.
2230 * data/yacc.c (yyparse): Prototype and define thanks to these.
2231 Adjust b4_c_function_def uses.
2232 * data/glr.c (yyparse): Likewise, but ANSI only.
2233
2234 2002-10-20 Akim Demaille <akim@epita.fr>
2235
2236 * src/output.c (prepare): Move the definition of `tokens_number',
2237 `nterms_number', `undef_token_number', `user_token_number_max'
2238 to...
2239 (prepare_tokens): Here.
2240 (prepare_tokens): Rename as...
2241 (prepare_symbols): this.
2242 (prepare): Move the definition of `rules_number' to...
2243 (prepare_rules): here.
2244 (prepare): Move the definition of `last', `final_state_number',
2245 `states_number' to...
2246 (prepare_states): here.
2247 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2248
2249 2002-10-20 Akim Demaille <akim@epita.fr>
2250
2251 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2252
2253 2002-10-20 Akim Demaille <akim@epita.fr>
2254
2255 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2256 * data/c.m4: here.
2257
2258 2002-10-20 Akim Demaille <akim@epita.fr>
2259
2260 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2261 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2262 `pair'.
2263 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2264 `name' to...
2265 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2266 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2267 These.
2268
2269 2002-10-19 Paul Eggert <eggert@twinsun.com>
2270
2271 Do not create a temporary file, as that involves security and
2272 cleanup headaches. Instead, use a pair of pipes.
2273 Derived from a suggestion by Florian Krohm.
2274 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2275 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2276 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2277 (BISON_PREREQ_SUBPIPE): Add.
2278 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2279 Add subpipe.h, subpipe.c.
2280 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2281 * po/POTFILES.in: Add lib/subpipe.c.
2282 * src/output.c: Include "subpipe.h".
2283 (m4_invoke): Remove decl.
2284 (scan_skel): New decl.
2285 (output_skeleton): Use pipe rather than temporary file for m4 input.
2286 Check that m4sugar.m4 is readable, to avoid deadlock.
2287 Check for pipe I/O error.
2288 * src/scan-skel.l (readpipe): Remove decl.
2289 (scan_skel): New function, to be used in place of m4_invoke.
2290 Read from stream rather than file.
2291
2292 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2293 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2294 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2295 this generates a more-accurate value anyway.
2296
2297 * lib/timevar.c (timervar_accumulate): Rename locals to
2298 avoid confusion with similarly-named more-global.
2299 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2300
2301 * src/output.c (prepare): Use xstrdup to convert char const *
2302 to char *, to avoid GCC warning.
2303
2304 2002-10-19 Akim Demaille <akim@epita.fr>
2305
2306 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2307 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2308 Use them to have `calc.y' ready for %pure-parser.
2309 * data/yacc.c (YYLEX): Pass a yylex return type to
2310 b4_c_function_call.
2311
2312 2002-10-19 Akim Demaille <akim@epita.fr>
2313
2314 Prototype support of %lex-param and %parse-param.
2315
2316 * src/parse-gram.y: Add the definition of the %lex-param and
2317 %parse-param tokens, plus their rules.
2318 Drop the `_' version of %glr-parser.
2319 Add the "," token.
2320 * src/scan-gram.l (INITIAL): Scan them.
2321 * src/muscle_tab.c: Comment changes.
2322 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2323 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2324 (muscle_entry_s): The `value' member is no longer const.
2325 Adjust all dependencies.
2326 * src/muscle_tab.c (muscle_init): Adjust: use
2327 MUSCLE_INSERT_STRING.
2328 Initialize the obstack earlier.
2329 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2330 (muscle_pair_list_grow): New.
2331 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2332 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2333 * tests/calc.at: Use %locations, not --locations.
2334 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2335
2336 2002-10-19 Akim Demaille <akim@epita.fr>
2337
2338 * src/getargs.c (usage): Take status as argument and exit
2339 accordingly.
2340 Report the traditional `Try ... --help' message when status != 0.
2341 (usage, version): Don't take a FILE * as arg, it is pointless.
2342 (getargs): When there is an incorrect number of arguments, make it
2343 an error, and report it GNUlically thanks to `usage ()'.
2344
2345 2002-10-18 Paul Eggert <eggert@twinsun.com>
2346
2347 * data/glr.c (yyreportParseError): Don't assume that sprintf
2348 yields the length of the printed string, as this is not true
2349 on SunOS 4.1.4. Reported by Peter Klein.
2350
2351 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2352 * tests/conflicts.at (%nonassoc and eof): Likewise.
2353 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2354
2355 2002-10-17 Akim Demaille <akim@epita.fr>
2356
2357 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2358 * src/getargs.c (trace_types, trace_args): Adjust.
2359 * src/reader.c (grammar_current_rule_prec_set)
2360 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2361 Standardize error messages.
2362 And s/@prec/%prec/!
2363 (reader): Use trace_flag to enable scanner/parser debugging,
2364 instead of an adhoc scheme.
2365 * src/scan-gram.l: Remove trailing debugging code.
2366
2367 2002-10-16 Paul Eggert <eggert@twinsun.com>
2368
2369 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2370 MUSCLE_TAB_H.
2371
2372 * NEWS: Officially drop support for building Bison with K&R C,
2373 since it didn't work anyway and it's not worth worrying about.
2374 * Makefile.maint (wget_files): Remove ansi2knr.c.
2375 (ansi2knr.c-url_prefix): Remove.
2376 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2377 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2378 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2379
2380 2002-10-15 Paul Eggert <eggert@twinsun.com>
2381
2382 Stop using the "enum_" trick for K&R-style function definitions;
2383 it confused me, and I was the author! Instead, assume that people
2384 who want to use K&R C compilers (when using these modules in GCC,
2385 perhaps?) will run ansi2knr.
2386
2387 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2388 All uses of "enum_" changed to "enum ".
2389 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2390 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2391
2392 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2393 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2394 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2395 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2396 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2397 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2398 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2399 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2400 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2401 Use function prototypes; this removes the need for declaring
2402 static functions simply to provide their prototypes.
2403 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2404 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2405 bitset_count_, bitset_create, bitset_dump, bitset_first,
2406 bitset_free, bitset_init, bitset_last, bitset_next,
2407 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2408 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2409 bitset_print, bitset_release_memory, bitset_toggle_,
2410 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2411 debug_bitset): Likewise.
2412 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2413 * lib/bitset_stats.c (bitset_log_histogram_print,
2414 bitset_percent_histogram_print, bitset_stats_and,
2415 bitset_stats_and_cmp, bitset_stats_and_or,
2416 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2417 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2418 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2419 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2420 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2421 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2422 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2423 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2424 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2425 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2426 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2427 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2428 bitset_stats_zero): Likewise.
2429 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2430 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2431 bitsetv_dump, debug_bitsetv): Likewise.
2432 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2433 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2434 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2435 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2436 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2437 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2438 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2439 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2440 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2441 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2442 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2443 Likewise.
2444 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2445 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2446 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2447 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2448 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2449 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2450 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2451 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2452 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2453 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2454 lbitset_xor_cmp, lbitset_zero): Likewise.
2455
2456 2002-10-14 Akim Demaille <akim@epita.fr>
2457
2458 Version 1.75.
2459
2460 2002-10-14 Akim Demaille <akim@epita.fr>
2461
2462 * tests/Makefile.am (maintainer-check-posix): New.
2463
2464 2002-10-14 Akim Demaille <akim@epita.fr>
2465
2466 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2467 member.
2468
2469 2002-10-14 Akim Demaille <akim@epita.fr>
2470
2471 * src/tables.c (table_ninf_remap): base -> tab.
2472 Reported by Matt Rosing.
2473
2474 2002-10-14 Paul Eggert <eggert@twinsun.com>
2475
2476 * tests/action.at, tests/calc.at, tests/conflicts.at,
2477 tests/cxx-type.at, tests/headers.at, tests/input.at,
2478 tests/regression.at, tests/synclines.at, tests/torture.at:
2479 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2480 so that the tests still work even if POSIXLY_CORRECT is set.
2481 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2482
2483 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2484 for portability to K&R hosts. Fix typo: signed char is guaranteed
2485 only to 127, not to 128.
2486 * data/glr.c (yysigned_char): New type.
2487 * data/yacc.c (yysigned_char): Likewise.
2488 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2489
2490 2002-10-13 Paul Eggert <eggert@twinsun.com>
2491
2492 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2493 true due to limited range of data type" warning from GCC.
2494
2495 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2496 by wrapping enum yytokentype's definition inside #ifndef
2497 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2498
2499 2002-10-13 Akim Demaille <akim@epita.fr>
2500
2501 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2502 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2503
2504 2002-10-13 Akim Demaille <akim@epita.fr>
2505
2506 * Makefile.maint: Update from Autoconf 2.54.
2507 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2508
2509 2002-10-13 Akim Demaille <akim@epita.fr>
2510
2511 * src/print.c (print_state): Separate the list of solved conflicts
2512 from the other items.
2513 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2514
2515 2002-10-13 Akim Demaille <akim@epita.fr>
2516
2517 Let nondeterministic skeletons be usable with deterministic
2518 tables.
2519
2520 With the patch, GAWK compiled by GCC without -O2 passes its test
2521 suite using a GLR parser driven by LALR tables. It fails with -O2
2522 because `struct stat' gives two different answers on my machine:
2523 88 (definition of an auto var) and later 96 (memset on this var).
2524 Hence the stack is badly corrumpted. The headers inclusion is to
2525 blame: if I move the awk.h inclusion before GLR's system header
2526 inclusion, the two struct stat have the same size.
2527
2528 * src/tables.c (pack_table): Always create conflict_table.
2529 (token_actions): Always create conflict_list.
2530 * data/glr.c (YYFLAG): Remove, unused.
2531
2532 2002-10-13 Akim Demaille <akim@epita.fr>
2533
2534 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2535 (O0FLAGS): New.
2536 (VALGRIND, GXX): New.
2537 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2538 * tests/bison.in: Run $PREBISON a pre-command.
2539 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2540 (maintainer-check-g++): New.
2541 * Makefile.am (maintainer-check): New.
2542
2543 2002-10-13 Akim Demaille <akim@epita.fr>
2544
2545 * data/glr.c: Formatting changes.
2546 Tweak some trace messages to match yacc.c's.
2547
2548 2002-10-13 Akim Demaille <akim@epita.fr>
2549
2550 GLR parsers sometimes raise parse errors instead of performing the
2551 default reduction.
2552 Reported by Charles-Henry de Boysson.
2553
2554 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2555 check the length of the traces when %glr.
2556 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2557 GLR's traces.
2558 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2559 Test GLR parsers.
2560 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2561 (yyltype): Remove the yy prefix from the member names.
2562 (yytable): Complete its comment.
2563 (yygetLRActions): Map error action number from YYTABLE from
2564 YYTABLE_NINF to 0.
2565 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2566 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2567 not satisfying as we could compare an YYACTION computed from
2568 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2569 only value for error actions.
2570 (yyreportParseError): In verbose parse error messages, don't issue
2571 `error' in the list of expected tokens.
2572 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2573 next action to perform to match glr.c's decoding.
2574 (yytable): Complete its comment.
2575
2576 2002-10-13 Paul Eggert <eggert@twinsun.com>
2577
2578 Fix problem reported by Henrik Grubbstroem in
2579 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2580 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2581 because the Bison parser reads the second action before reducing
2582 the first one.
2583 * src/scan-gram.l (rule_length): New static var.
2584 Use it to keep track of the rule length in the scanner, since
2585 we can't expect the parser to be in lock-step sync with the scanner.
2586 (handle_action_dollar, handle_action_at): Use this var.
2587 * tests/actions.at (Exotic Dollars): Test for the problem.
2588
2589 2002-10-12 Paul Eggert <eggert@twinsun.com>
2590
2591 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2592 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2593 Include <sys/time.h> when checking for clock_t and struct tms.
2594 Use same include order as source.
2595 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2596 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2597
2598 * lib/timevar.c: Update copyright date and clarify comments.
2599 (get_time) [IN_GCC]: Keep the GCC version for reference.
2600
2601 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2602 GCC version as of today, then merge Bison's changes.
2603 Change "GCC" to "Bison" in copyright notice. timevar.def's
2604 author is Akim, so change that too.
2605
2606 * src/reader.c (grammar_current_rule_check):
2607 Don't worry about the default action if $$ is untyped.
2608 Prevents bogus warnings reported by Jim Gifford in
2609 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2610
2611 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2612 * data/glr.c, data/lalr1.cc, data/yacc.c:
2613 Output token definitions before the first part of user declarations.
2614 Fixes compatibility problem reported by Jim Gifford for kbd in
2615 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2616
2617 2002-10-11 Paul Eggert <eggert@twinsun.com>
2618
2619 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2620 (yyparse): here. This undoes some of the 2002-07-25 change.
2621 Compatibility problem reported by Ralf S. Engelschall with
2622 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2623
2624 2002-10-11 Akim Demaille <akim@epita.fr>
2625
2626 * tests/regression.at Characters Escapes): New.
2627 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2628 characters.
2629 Reported by Jan Nieuwenhuizen.
2630
2631 2002-10-11 Akim Demaille <akim@epita.fr>
2632
2633 * po/id.po: New.
2634
2635 2002-10-10 Paul Eggert <eggert@twinsun.com>
2636
2637 Portability fixes for bitsets; this also avoids several GCC
2638 warnings.
2639
2640 * lib/abitset.c: Include <stddef.h>, for offsetof.
2641 * lib/lbitset.c: Likewise.
2642
2643 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2644 properly for vectors of objects. Do not assume that adding a
2645 header size to a multiple of a word size yields a value that is
2646 properly aligned for the whole union.
2647 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2648
2649 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2650 unique names for structures.
2651 * lib/ebitset.c (ebitset_bytes): Likewise.
2652 * lib/lbitset.c (lbitset_bytes): Likewise.
2653
2654 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2655 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2656 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2657 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2658 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2659 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2660 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2661 to improve the type-checking that GCC can do.
2662 * lib/bitset.c (bitset_op4_cmp): Likewise.
2663 * lib/bitset_stats.c (bitset_stats_count,
2664 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2665 bitset_stats_copy, bitset_stats_disjoint_p,
2666 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2667 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2668 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2669 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2670 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2671 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2672 bitset_stats_or_and_cmp): Likewise.
2673 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2674 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2675 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2676 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2677
2678 * lib/abitset.h: Include bitset.h, not bbitset.h.
2679 * lib/ebitset.h: Likewise.
2680 * lib/lbitset.h: Likewise.
2681
2682 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2683 All instances of parameters of type enum bitset_opts are now of
2684 type enum_bitset_opts, to conform to the C Standard, and similarly
2685 for enum_bitset_type.
2686 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2687 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2688
2689 Do not use "struct bitset_struct" to mean different things in
2690 different modules. Not only is this confusing, it violates
2691 the C Standard, which requires that structure types in different
2692 modules must be compatible if one is to be passed to the other.
2693 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2694 All instances of "struct bitset_struct *" replaced with "bitset".
2695 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2696 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2697 struct lbitset_struct, struct bitset_stats_struct): New types.
2698 All uses of struct bitset_struct changed to union bitset_union,
2699 etc.
2700 * lib/abitset.c (struct abitset_struct, abitset,
2701 struct bitset_struct): Remove.
2702 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2703 struct bitset_struct): Remove.
2704 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2705 bitset_struct): Remove.
2706 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2707 Likewise.
2708
2709 Do not call a function of type T using a call that assumes the
2710 function is of a different type U. Standard C requires that a
2711 function must be called with a type that is compatible with its
2712 definition.
2713 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2714 New decls.
2715 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2716 New functions.
2717 * lib/ebitset.c (PFV): Remove.
2718 * lib/lbitset.c (PFV): Likewise.
2719 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2720 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2721 decls.
2722 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2723 (ebitset_vtable): Use them.
2724 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2725 lbitset_xor): New functions.
2726 (lbitset_vtable): Use them.
2727
2728 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2729 Declare.
2730
2731 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2732 GCC warning.
2733 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2734 Use offsetof, for simplicity.
2735
2736 2002-10-06 Paul Eggert <eggert@twinsun.com>
2737
2738 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2739 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2740 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2741 which was inadvertently undone by the 2002-09-30 patch.
2742 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2743 the same width as int.
2744
2745 2002-10-04 Paul Eggert <eggert@twinsun.com>
2746
2747 Version 1.50.
2748
2749 * configure.ac (AC_INIT), NEWS: Increment version number.
2750
2751 * doc/bison.texinfo: Minor spelling, grammar, and white space
2752 fixes.
2753 (Symbols): Mention that any negative value returned from yylex
2754 signifies end-of-input. Warn about negative chars. Mention
2755 the portable Standard C character set.
2756
2757 The GNU coding standard says CFLAGS and YFLAGS are reserved
2758 for the installer to set.
2759 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2760 * src/Makefile.am (AM_CFLAGS): Likewise.
2761 (AM_YFLAGS): Renamed from YFLAGS.
2762
2763 Fix some MAX and MIN problems.
2764 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2765 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2766 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2767 * src/reader.c (reader): Use it.
2768
2769 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2770 POSIX 1003.1-2001 has removed fgrep.
2771
2772 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2773
2774 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2775 interpreted as signed.
2776 * lib/ebitset.c (ebitset_list): Fix bug.
2777
2778 2002-10-01 Paul Eggert <eggert@twinsun.com>
2779
2780 More fixes for 64-bit hosts and large bitsets.
2781
2782 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2783 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2784 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2785 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2786 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2787 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2788 bitset_count_): Likewise.
2789 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2790 bitset_first, bitset_last): Likewise.
2791 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2792 bitset_stats_list_reverse, bitset_stats_size,
2793 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2794 Likewise.
2795 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2796 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2797 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2798 bitsetv_reflexive_transitive_closure): Likewise.
2799 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2800 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2801 Likewise.
2802 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2803 Likewise.
2804
2805 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2806 Use size_t, not unsigned int, to count bytes.
2807 * lib/abitset.h (abitset_bytes): Likewise.
2808 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2809 Likewise.
2810 * lib/bitset.h (bitset_bytes): Likewise.
2811 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2812 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2813 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2814 * lib/ebitset.c (ebitset_bytes): Likewise.
2815 * lib/ebitset.h (ebitset_bytes): Likewise.
2816 * lib/lbitset.c (lbitset_bytes): Likewise.
2817 * lib/lbitset.h (lbitset_bytes): Likewise.
2818
2819 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2820 abitset_subset_p, abitset_disjoint_p, abitset_and,
2821 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2822 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2823 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2824 abitset_or_and, abitset_or_and_cmp):
2825 Use bitset_windex instead of unsigned int.
2826 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2827 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2828 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2829 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2830 Likewise.
2831 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2832
2833 * lib/bitset.c (bitset_print):
2834 Use proper printf formats for widths of integer types.
2835 * lib/bitset_stats.c (bitset_percent_histogram_print,
2836 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2837 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2838 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2839 * lib/lbitset.c (lbitset_bytes): Likewise.
2840
2841 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2842 BITSET_SIZE_MAX): New macros.
2843 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2844 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2845 to BITSET_WINDEX_MAX.
2846
2847 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2848 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2849 since we now return the bitset_bindex type (not int).
2850
2851 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2852 when computing sizes.
2853 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2854
2855 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2856 and avoid cast to unsigned.
2857
2858 2002-09-30 Akim Demaille <akim@epita.fr>
2859
2860 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2861 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2862 Updates from Michael Hayes.
2863
2864 2002-09-30 Art Haas <ahaas@neosoft.com>
2865
2866 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2867 invocations.
2868 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2869 defined.
2870
2871 2002-09-27 Akim Demaille <akim@epita.fr>
2872
2873 Version 1.49c.
2874
2875 2002-09-27 Akim Demaille <akim@epita.fr>
2876
2877 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2878 (Because of AC_LIBSOURCE).
2879
2880 2002-09-27 Akim Demaille <akim@epita.fr>
2881
2882 Playing with Autoscan.
2883
2884 * configure.ac: Remove the old LIBOBJ tweaks.
2885 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2886 * lib/strrchr.c: New.
2887 * lib/strtol.c: New, from the Coreutils 4.5.1.
2888
2889 2002-09-27 Akim Demaille <akim@epita.fr>
2890
2891 Playing with Autoscan.
2892
2893 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2894 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2895 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2896 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2897 Coreutils 4.5.1.
2898
2899 2002-09-24 Akim Demaille <akim@epita.fr>
2900
2901 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2902 (Frequently Asked Questions, Parser Stack Overflow): New.
2903
2904 2002-09-13 Akim Demaille <akim@epita.fr>
2905
2906 Playing with autoscan.
2907
2908 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2909 * src/files.c (skeleton_find): Remove, unused.
2910 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2911 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2912
2913 2002-09-13 Akim Demaille <akim@epita.fr>
2914
2915 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2916 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2917
2918 2002-09-13 Akim Demaille <akim@epita.fr>
2919
2920 * configure.ac: Require 2.54.
2921 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2922 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2923 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2924 Remove, provided by Autoconf macros.
2925
2926 2002-09-12 Akim Demaille <akim@epita.fr>
2927
2928 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2929
2930 2002-09-12 Akim Demaille <akim@epita.fr>
2931
2932 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2933 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2934 Reported by Martin Mokrejs.
2935
2936 2002-09-10 Akim Demaille <akim@epita.fr>
2937
2938 * src/parse-gram.y: Associate a human readable string to each
2939 token type.
2940 * tests/regression.at (Invalid inputs): Adjust.
2941
2942 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2943
2944 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2945 with an Autoconf-2.5x style configure.ac.
2946
2947 2002-09-06 Paul Eggert <eggert@twinsun.com>
2948
2949 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2950 exception applies only to yacc.c. This is a modification of a
2951 patch originally suggested by Akim Demaille.
2952
2953 2002-09-06 Akim Demaille <akim@epita.fr>
2954
2955 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2956 here to...
2957 * data/yacc.c: here.
2958
2959 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2960 LocationType.
2961 (b4_ltype): Default to yy::Location from location.hh.
2962
2963 2002-09-04 Jim Meyering <jim@meyering.net>
2964
2965 * data/yacc.c: Guard the declaration of yytoknum also with
2966 `#ifdef YYPRINT', so it is declared only when used.
2967
2968 2002-09-04 Akim Demaille <akim@epita.fr>
2969
2970 * configure.in: Rename as...
2971 * configure.ac: this.
2972 Bump to 1.49c.
2973
2974 2002-09-04 Akim Demaille <akim@epita.fr>
2975
2976 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2977 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2978 translate maintainer only messages.
2979
2980 2002-08-12 Paul Eggert <eggert@twinsun.com>
2981
2982 Version 1.49b.
2983
2984 * Makefile.am (SUBDIRS): Remove intl.
2985 (DISTCLEANFILES): Remove.
2986 * NEWS: Mention that GNU M4 is now required. Clarify what is
2987 meant by "larger grammars". Mention the pt_BR translation.
2988 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2989 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2990 Bump version from 0.11.2 to 0.11.5.
2991 (BISON_PREREQ_STAGE): Remove.
2992 (AM_GNU_GETTEXT): Use external gettext.
2993 (AC_OUTPUT): Remove intl/Makefile.
2994
2995 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2996
2997 * data/glr.c: Include string.h, for strlen.
2998 (yyreportParseError): Use size_t for yysize.
2999 (yy_yypstack): No longer nested inside yypstates, as nested
3000 functions are not portable. Do not assume size_t is the
3001 same width as int.
3002 (yypstates): Do not assume that ptrdiff_t is the same width
3003 as int, and similarly for yyposn and YYINDEX.
3004
3005 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3006
3007 * lib/Makefile.am (INCLUDES): Do not include from the intl
3008 directory, which has been removed.
3009 * src/Makefile.am (INCLUDES): Likewise.
3010
3011 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3012 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3013 New vars.
3014
3015 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3016 * tests/Makefile.am (EXTRA_DIST): Likewise.
3017
3018 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3019 Do not assume that bitset_windex is the same width as unsigned.
3020
3021 * lib/abitset.c (abitset_unused_clear): Do not assume that
3022 bitset_word is the same width as int.
3023 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3024 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3025 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3026 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3027 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3028
3029 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3030 portability to one's complement hosts!).
3031 * lib/ebitset.c (ebitset_op1): Likewise.
3032 * lib/lbitset.c (lbitset_op1): Likewise.
3033
3034 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3035 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3036 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3037 Sync with fileutils.
3038 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3039 lib/gettext.h: Sync with diffutils.
3040
3041 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3042 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3043
3044 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3045 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3046 check for void *.
3047
3048 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3049 size_t; the old version tried to do this but casted improperly.
3050 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3051 (bitset_test): Now returns int, not unsigned long.
3052
3053 * lib/bitset_stats.c: Include "gettext.h".
3054 (_): New macro.
3055 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3056 name locals "index", as it generates unnecessary warnings on some
3057 hosts that have an "index" function.
3058
3059 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3060 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3061 they need translation.
3062 * src/LR0.c (state_list_append, new_itemsets, get_state,
3063 append_states, generate_states): Likewise.
3064 * src/assoc.c (assoc_to_string): Likewise.
3065 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3066 * src/gram.c (grammar_dump): Likewise.
3067 * src/injections.c (injections_compute): Likewise.
3068 * src/lalr.c (lookaheads_print): Likewise.
3069 * src/relation.c (relation_transpose): Likewise.
3070 * src/scan-gram.l: Likewise.
3071 * src/tables.c (table_grow, pack_vector): Likewise.
3072
3073 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3074 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3075 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3076 * m4/mbstate_t.m4: Sync with fileutils.
3077 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3078
3079 * po/LINGUAS: Add pt_BR.
3080 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3081 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3082 lib/timevar.c.
3083 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3084 manual recommends.
3085 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3086
3087 * src/complain.c (strerror_r): Remove decl; not needed.
3088 (strerror): Use same pattern as ../lib/error.c.
3089
3090 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3091
3092 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3093
3094 * src/main.c (main): Cast result of bindtextdomain and textdomain
3095 to void, to avoid a GCC warning when --disable-nls is in effect.
3096
3097 * src/scan-gram.l: Use strings rather than escapes when possible,
3098 to minimize the number of warnings from xgettext.
3099 (handle_action_dollar, handle_action_at): Don't use isdigit,
3100 as it mishandles negative chars and it may not work as expected
3101 outside the C locale.
3102
3103 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3104 this is a GCC extension and is not portable to other compilers.
3105
3106 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3107 Do not include <ctype.h>; no longer needed.
3108 Do not include <malloc.h>; no longer needed (and generates
3109 warnings on OpenBSD 3.0).
3110
3111 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3112 it's not portable.
3113
3114 * tests/regression.at: Do not use 'cc -c input.c -o input';
3115 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3116
3117 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3118 exit status as failure, not just exit status 1. Sun C exits
3119 with status 2 sometimes.
3120
3121 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3122 Use it for the two large tests.
3123
3124 2002-08-02 Akim Demaille <akim@epita.fr>
3125
3126 * src/conflicts.c (conflicts_output): Don't output rules never
3127 reduced here, since anyway that computation doesn't work.
3128 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3129 (rule_useless_p, rule_never_reduced_p): New.
3130 (grammar_rules_partial_print): Use a filter instead of a range.
3131 Display the title only if needed.
3132 (grammar_rules_print): Adjust.
3133 (grammar_rules_never_reduced_report): New.
3134 * src/tables.c (action_row): Move the computation of rules never
3135 reduced to...
3136 (token_actions): here.
3137 * src/main.c (main): Make the parser before making the report, so
3138 that rules never reduced are computed.
3139 Call grammar_rules_never_reduced_report.
3140 * src/print.c (print_results): Report rules never reduced.
3141 * tests/conflicts.at, tests/reduce.at: Adjust.
3142
3143 2002-08-01 Akim Demaille <akim@epita.fr>
3144
3145 Instead of attaching lookaheads and duplicating the rules being
3146 reduced by a state, attach the lookaheads to the reductions.
3147
3148 * src/state.h (state_t): Remove the `lookaheads',
3149 `lookaheads_rule' member.
3150 (reductions_t): Add a `lookaheads' member.
3151 Use a regular array for the `rules'.
3152 * src/state.c (reductions_new): Initialize the lookaheads member
3153 to 0.
3154 (state_rule_lookaheads_print): Adjust.
3155 * src/state.h, src/state.c (state_reductions_find): New.
3156 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3157 (count_rr_conflicts): Adjust.
3158 * src/lalr.c (LArule): Remove.
3159 (add_lookback_edge): Adjust.
3160 (state_lookaheads_count): New.
3161 (states_lookaheads_initialize): Merge into...
3162 (initialize_LA): this.
3163 (lalr_free): Adjust.
3164 * src/main.c (main): Don't free nullable and derives too early: it
3165 is used by --verbose.
3166 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3167
3168 2002-08-01 Akim Demaille <akim@epita.fr>
3169
3170 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3171 `rule_number_t**'.
3172 (set_derives, free_derives): Rename as...
3173 (derives_compute, derives_free): this.
3174 Adjust all dependencies.
3175 * src/nullable.c (set_nullable, free_nullable): Rename as...
3176 (nullable_compute, nullable_free): these.
3177 (rule_list_t): Store rule_t *, not rule_number_t.
3178 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3179 pointers, instead of their numbers.
3180 * src/main.c (main): Call nullable_free, and derives_free earlier,
3181 as they were lo longer used.
3182
3183 2002-08-01 Akim Demaille <akim@epita.fr>
3184
3185 * lib/timevar.c (get_time): Include children time.
3186 * src/lalr.h (LA, LArule): Don't export them: used with the
3187 state_t.
3188 * src/lalr.c (LA, LArule): Static.
3189 * src/lalr.h, src/lalr.c (lalr_free): New.
3190 * src/main.c (main): Call it.
3191 * src/tables.c (pack_vector): Check whether loc is >= to the
3192 table_size, not >.
3193 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3194 (tables_generate): do it, since that's also it which allocates
3195 them.
3196 Don't free LA and LArule, main does.
3197
3198 2002-07-31 Akim Demaille <akim@epita.fr>
3199
3200 Separate parser tables computation and output.
3201
3202 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3203 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3204 (yydefgoto, yydefact, high): Move to...
3205 * src/tables.h, src/tables.c: here.
3206 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3207 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3208 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3209 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3210 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3211 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3212 (action_row, save_row, token_actions, save_column, default_goto)
3213 (goto_actions, sort_actions, matching_state, pack_vector)
3214 (table_ninf_remap, pack_table, prepare_actions): Move to...
3215 * src/tables.c: here.
3216 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3217 * src/output.c (token_actions, output_base, output_conflicts)
3218 (output_check): Merge into...
3219 (prepare_actions): this.
3220 (actions_output): Rename as...
3221 (user_actions_output): this.
3222 * src/main.c (main): Call tables_generate and tables_free.
3223
3224 2002-07-31 Akim Demaille <akim@epita.fr>
3225
3226 Steal GCC's --time-report support.
3227
3228 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3229 stolen/adjusted from GCC.
3230 * m4/stage.m4: Remove time related checks.
3231 * m4/timevar.m4: New.
3232 * configure.in: Adjust.
3233 * src/system.h: Adjust to using timevar.h.
3234 * src/getargs.h, src/getargs.c: Support trace_time for
3235 --trace=time.
3236 * src/main.c (stage): Remove.
3237 (main): Replace `stage' invocations with timevar calls.
3238 * src/output.c: Insert pertinent timevar calls.
3239
3240 2002-07-31 Akim Demaille <akim@epita.fr>
3241
3242 Let --trace have arguments.
3243
3244 * src/getargs.h (enum trace_e): New.
3245 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3246 (long_options, short_options): --trace/-T takes an optional
3247 argument.
3248 Change all the uses of trace_flag to reflect the new flags.
3249 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3250
3251 Strengthen `stage' portability.
3252
3253 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3254 * configure.in: Use it.
3255 Don't check for malloc.h and sys/times.h.
3256 * src/system.h: Include them when appropriate.
3257 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3258 times and struct tms are available.
3259
3260 2002-07-30 Akim Demaille <akim@epita.fr>
3261
3262 In verbose parse error message, don't report `error' as an
3263 expected token.
3264 * tests/actions.at (Printers and Destructors): Adjust.
3265 * tests/calc.at (Calculator $1): Adjust.
3266 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3267 error message, do not report the parser accepts the error token in
3268 that state.
3269
3270 2002-07-30 Akim Demaille <akim@epita.fr>
3271
3272 Normalize conflict related messages.
3273
3274 * src/complain.h, src/complain.c (warn, complain): New.
3275 * src/conflicts.c (conflicts_print): Use them.
3276 (conflict_report_yacc): New, extracted from...
3277 (conflicts_print): here.
3278 * tests/conflicts.at, tests/existing.at: Adjust.
3279
3280 2002-07-30 Akim Demaille <akim@epita.fr>
3281
3282 Report rules which are never reduced by the parser: those hidden
3283 by conflicts.
3284
3285 * src/LR0.c (save_reductions): Don't make the final state too
3286 different: save its reduction (accept) instead of having a state
3287 without any action (no shift or goto, no reduce).
3288 Note: the final state is now a ``regular'' state, i.e., the
3289 parsers now contain `reduce 0' as default reduction.
3290 Nevertheless, since they decide to `accept' when yystate =
3291 final_state, they still will not reduce rule 0.
3292 * src/print.c (print_actions, print_reduction): Adjust.
3293 * src/output.c (action_row): Track reduced rules.
3294 (token_actions): Report rules never reduced.
3295 * tests/conflicts.at, tests/regression.at: Adjust.
3296
3297 2002-07-30 Akim Demaille <akim@epita.fr>
3298
3299 `stage' was accidently included in a previous patch.
3300 Initiate its autoconfiscation.
3301
3302 * configure.in: Look for malloc.h and sys/times.h.
3303 * src/main.c (stage): Adjust.
3304 Report only when trace_flag.
3305
3306 2002-07-29 Akim Demaille <akim@epita.fr>
3307
3308 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3309 state_number_t.
3310 (errs_t): symbol_t*, not symbol_number_t.
3311 (reductions_t): rule_t*, not rule_number_t.
3312 (FOR_EACH_SHIFT): New.
3313 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3314 * src/print.c, src/print_graph.c: Adjust.
3315
3316 2002-07-29 Akim Demaille <akim@epita.fr>
3317
3318 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3319
3320 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3321 (endtoken, accept): these.
3322 * src/reader.c (reader): Set endtoken's default tag to "$end".
3323 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3324 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3325 Adjust.
3326
3327 2002-07-29 Akim Demaille <akim@epita.fr>
3328
3329 * src/reduce.c (reduce_grammar): When the language is empty,
3330 complain about the start symbol, not the axiom.
3331 Use its location.
3332 * tests/reduce.at (Empty Language): New.
3333
3334 2002-07-26 Akim Demaille <akim@epita.fr>
3335
3336 * src/reader.h, src/reader.c (gram_error): ... can't get
3337 yycontrol without making too strong assumptions on the parser
3338 itself.
3339 * src/output.c (prepare_tokens): Use the real 0th value of
3340 token_translations instead of `0'.
3341 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3342 visible here.
3343 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3344 for the time being: %locations ought to provide it to yyerror.
3345
3346 2002-07-25 Akim Demaille <akim@epita.fr>
3347
3348 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3349 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3350 * tests/regression.at (Web2c Actions): Adjust.
3351
3352 2002-07-25 Akim Demaille <akim@epita.fr>
3353
3354 Stop storing rules from 1 to nrules + 1.
3355
3356 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3357 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3358 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3359 Iterate from 0 to nrules.
3360 Use rule_number_as_item_number and item_number_as_rule_number.
3361 Adjust to `derive' now containing possibly 0.
3362 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3363 Handle the `- 1' part in rule numbers from/to item numbers.
3364 * src/conflicts.c (log_resolution): Fix the message which reversed
3365 shift and reduce.
3366 * src/output.c (action_row): Initialize default_rule to -1.
3367 (token_actions): Adjust.
3368 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3369 expected output.
3370 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3371
3372 2002-07-25 Akim Demaille <akim@epita.fr>
3373
3374 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3375 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3376 (b4_c_knr_arg_decl): New.
3377 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3378 yyreport_parse_error.
3379
3380 2002-07-25 Akim Demaille <akim@epita.fr>
3381
3382 * data/yacc.c (yyreport_parse_error): New, extracted from...
3383 (yyparse): here.
3384 (yydestruct, yysymprint): Move above yyparse.
3385 Be K&R compliant.
3386
3387 2002-07-25 Akim Demaille <akim@epita.fr>
3388
3389 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3390 replace...
3391 (b4_sint_type, b4_uint_type): these.
3392 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3393 * tests/regression.at (Web2c Actions): Adjust.
3394
3395 2002-07-25 Akim Demaille <akim@epita.fr>
3396
3397 * src/gram.h (TIEM_NUMBER_MAX): New.
3398 (item_number_of_rule_number, rule_number_of_item_number): Rename
3399 as...
3400 (rule_number_as_item_number, item_number_as_rule_number): these.
3401 Adjust dependencies.
3402 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3403 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3404 (symbol_number_to_vector_number): New.
3405 (order): Of vector_number_t* type.
3406 (base_t, BASE_MAX, BASE_MIN): New.
3407 (froms, tos, width, pos, check): Of base_t type.
3408 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3409 (actrow): Of action_number_t type.
3410 (conflrow): Of unsigned int type.
3411 (table_ninf, base_ninf): New.
3412 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3413 (muscle_insert_int_table, muscle_insert_base_table)
3414 (muscle_insert_rule_number_table): New.
3415 (prepare_tokens): Output `toknum' as int_table.
3416 (action_row): Returns a rule_number_t.
3417 Use ACTION_MIN, not SHRT_MIN.
3418 (token_actions): yydefact is rule_number_t*.
3419 (table_ninf_remap): New.
3420 (pack_table): Use it for `base' and `table'.
3421 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3422 replaced with...
3423 (YYPACT_NINF, YYTABLE_NINF): these.
3424 (yypact, yytable): Compute their types instead of hard-coded
3425 `short'.
3426 * tests/regression.at (Web2c Actions): Adjust.
3427
3428 2002-07-19 Akim Demaille <akim@epita.fr>
3429
3430 * src/scan-gram.l (id): Can start with an underscore.
3431
3432 2002-07-16 Akim Demaille <akim@epita.fr>
3433
3434 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3435 Adjust all former `associativity' dependencies.
3436 * src/symtab.c (symbol_new): Default associativity is `undef', not
3437 `right'.
3438 (symbol_check_alias_consistence): Adjust.
3439
3440 2002-07-09 Akim Demaille <akim@epita.fr>
3441
3442 * doc/bison.texinfo: Properly set the ``header'' part.
3443 Use @dircategory ``GNU programming tools'' as per Texinfo's
3444 documentation.
3445 Use @copying.
3446
3447 2002-07-09 Akim Demaille <akim@epita.fr>
3448
3449 * lib/quotearg.h: Protect against multiple inclusions.
3450 * src/location.h (location_t): Add a `file' member.
3451 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3452 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3453 `error_one_per_line' support.
3454
3455 2002-07-09 Akim Demaille <akim@epita.fr>
3456
3457 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3458 * src/reader.c (lineno): Remove.
3459 Adjust all dependencies.
3460 (get_merge_function): Take a location and use complain_at.
3461 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3462 * tests/regression.at (Invalid inputs, Mixing %token styles):
3463 Adjust.
3464
3465 2002-07-09 Akim Demaille <akim@epita.fr>
3466
3467 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3468 recovery rule, and forbid extensions when --yacc.
3469 (gram_error): Use complain_at.
3470 * src/reader.c (reader): Exit if there were parse errors.
3471
3472 2002-07-09 Akim Demaille <akim@epita.fr>
3473
3474 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3475 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3476 Reported by R Blake <blakers@mac.com>.
3477
3478 2002-07-09 Akim Demaille <akim@epita.fr>
3479
3480 * data/yacc.c: Output the copyright notive in the header.
3481
3482 2002-07-03 Akim Demaille <akim@epita.fr>
3483
3484 * src/output.c (froms, tos): Are state_number_t.
3485 (save_column): sp, sp1, and sp2 are state_number_t.
3486 (prepare): Rename `final' as `final_state_number', `nnts' as
3487 `nterms_number', `nrules' as `rules_number', `nstates' as
3488 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3489 unused.
3490 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3491 * data/lalr1.cc (nsym_): Remove, unused.
3492
3493 2002-07-03 Akim Demaille <akim@epita.fr>
3494
3495 * src/lalr.h, src/lalr.c (goto_number_t): New.
3496 * src/lalr.c (goto_list_t): New.
3497 Propagate them.
3498 * src/nullable.c (rule_list_t): New.
3499 Propagate.
3500 * src/types.h: Remove.
3501
3502 2002-07-03 Akim Demaille <akim@epita.fr>
3503
3504 * src/closure.c (print_fderives): Use rule_rhs_print.
3505 * src/derives.c (print_derives): Use rule_rhs_print.
3506 (rule_list_t): New, replaces `shorts'.
3507 (set_derives): Add comments.
3508 * tests/sets.at (Nullable, Firsts): Adjust.
3509
3510 2002-07-03 Akim Demaille <akim@epita.fr>
3511
3512 * src/output.c (prepare_actions): Free `tally' and `width'.
3513 (prepare_actions): Allocate and free `order'.
3514 * src/symtab.c (symbols_free): Free `symbols'.
3515 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3516 * src/output.c (m4_invoke): Move to...
3517 * src/scan-skel.l: here.
3518 (<<EOF>>): Close yyout, and free its name.
3519
3520 2002-07-03 Akim Demaille <akim@epita.fr>
3521
3522 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3523
3524 * src/LR0.c (new_state): Merge into...
3525 (state_list_append): this.
3526 (new_states): Merge into...
3527 (generate_states): here.
3528 (set_states): Don't ensure a proper `errs' state member here, do it...
3529 * src/conflicts.c (conflicts_solve): here.
3530 * src/state.h, src/state.c: Comment changes.
3531 (state_t): Rename member `shifts' as `transitions'.
3532 Adjust all dependencies.
3533 (errs_new): For consistency, also take the values as argument.
3534 (errs_dup): Remove.
3535 (state_errs_set): New.
3536 (state_reductions_set, state_transitions_set): Assert that no
3537 previous value was assigned.
3538 (state_free): New.
3539 (states_free): Use it.
3540 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3541 temporary storage: use `errs' and `nerrs' as elsewhere.
3542 (set_conflicts): Allocate and free this `errs'.
3543
3544 2002-07-02 Akim Demaille <akim@epita.fr>
3545
3546 * lib/libiberty.h: New.
3547 * lib: Update the bitset implementation from upstream.
3548 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3549 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3550 * src/main.c: Adjust bitset stats calls.
3551
3552 2002-07-01 Paul Eggert <eggert@twinsun.com>
3553
3554 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3555 char, so that negative chars don't collide with $.
3556
3557 2002-06-30 Akim Demaille <akim@epita.fr>
3558
3559 Have the GLR tests be `warning' checked, and fix the warnings.
3560
3561 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3562 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3563 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3564 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3565 (yyaddDeferredAction): static.
3566 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3567 (yyreportParseError): yyprefix is const.
3568 yytokenp is used only when verbose.
3569 (yy__GNUC__): Replace with __GNUC__.
3570 (yypdumpstack): yyi is size_t.
3571 (yypreference): Un-yy local variables and arguments, to avoid
3572 clashes with `yyr1'. Anyway, we are not in the user name space.
3573 (yytname_size): be an int, as is compared with ints.
3574 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3575 Use them.
3576 * tests/cxx-gram.at: Use quotation to protect $1.
3577 Use AT_COMPILE to enable warnings hunts.
3578 Prototype yylex and yyerror.
3579 `Use' argc.
3580 Include `string.h', not `strings.h'.
3581 Produce and prototype stmtMerge only when used.
3582 yylex takes a location.
3583
3584 2002-06-30 Akim Demaille <akim@epita.fr>
3585
3586 We spend a lot of time in quotearg, in particular when --verbose.
3587
3588 * src/symtab.c (symbol_get): Store a quoted version of the key.
3589 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3590 Adjust all callers.
3591
3592 2002-06-30 Akim Demaille <akim@epita.fr>
3593
3594 * src/state.h (reductions_t): Rename member `nreds' as num.
3595 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3596 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3597
3598 2002-06-30 Akim Demaille <akim@epita.fr>
3599
3600 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3601 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3602 (shifts_to): Rename as...
3603 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3604 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3605 (TRANSITION_IS_DISABLED, transitions_to): these.
3606
3607 2002-06-30 Akim Demaille <akim@epita.fr>
3608
3609 * src/print.c (print_shifts, print_gotos): Merge into...
3610 (print_transitions): this.
3611 (print_transitions, print_errs, print_reductions): Align the
3612 lookaheads columns.
3613 (print_core, print_transitions, print_errs, print_state,
3614 print_grammar): Output empty lines separator before, not after.
3615 (state_default_rule_compute): Rename as...
3616 (state_default_rule): this.
3617 * tests/conflicts.at (Defaulted Conflicted Reduction),
3618 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3619 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3620
3621 2002-06-30 Akim Demaille <akim@epita.fr>
3622
3623 Display items as we display rules.
3624
3625 * src/gram.h, src/gram.c (rule_lhs_print): New.
3626 * src/gram.c (grammar_rules_partial_print): Use it.
3627 * src/print.c (print_core): Likewise.
3628 * tests/conflicts.at (Defaulted Conflicted Reduction),
3629 (Unresolved SR Conflicts): Adjust.
3630 (Unresolved SR Conflicts): Adjust and rename as...
3631 (Resolved SR Conflicts): this, as was meant.
3632 * tests/regression.at (Web2c Report): Adjust.
3633
3634 2002-06-30 Akim Demaille <akim@epita.fr>
3635
3636 * src/print.c (state_default_rule_compute): New, extracted from...
3637 (print_reductions): here.
3638 Pessimize, but clarify the code.
3639 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3640
3641 2002-06-30 Akim Demaille <akim@epita.fr>
3642
3643 * src/output.c (action_row): Let default_rule be always a rule
3644 number.
3645
3646 2002-06-30 Akim Demaille <akim@epita.fr>
3647
3648 * src/closure.c (print_firsts, print_fderives, closure):
3649 Use BITSET_EXECUTE.
3650 * src/lalr.c (lookaheads_print): Likewise.
3651 * src/state.c (state_rule_lookaheads_print): Likewise.
3652 * src/print_graph.c (print_core): Likewise.
3653 * src/print.c (print_reductions): Likewise.
3654 * src/output.c (action_row): Likewise.
3655 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3656
3657 2002-06-30 Akim Demaille <akim@epita.fr>
3658
3659 * src/print_graph.c: Use report_flag.
3660
3661 2002-06-30 Akim Demaille <akim@epita.fr>
3662
3663 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3664 to...
3665 * src/relation.h, src/relation.c (traverse, relation_digraph)
3666 (relation_print, relation_transpose): New.
3667
3668 2002-06-30 Akim Demaille <akim@epita.fr>
3669
3670 * src/state.h, src/state.c (shifts_to): New.
3671 * src/lalr.c (build_relations): Use it.
3672
3673 2002-06-30 Akim Demaille <akim@epita.fr>
3674
3675 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3676 (item_number_of_rule_number, rule_number_of_item_number): New.
3677 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3678 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3679 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3680 Propagate their use.
3681 Much remains to be done, in particular wrt `shorts' from types.h.
3682
3683 2002-06-30 Akim Demaille <akim@epita.fr>
3684
3685 * src/symtab.c (symbol_new): Initialize the `printer' member.
3686
3687 2002-06-30 Akim Demaille <akim@epita.fr>
3688
3689 * src/LR0.c (save_reductions): Remove, replaced by...
3690 * src/state.h, src/state.c (state_reductions_set): New.
3691 (reductions, errs): Rename as...
3692 (reductions_t, errs_t): these.
3693 Adjust all dependencies.
3694
3695 2002-06-30 Akim Demaille <akim@epita.fr>
3696
3697 * src/LR0.c (state_list_t, state_list_append): New.
3698 (first_state, last_state): Now symbol_list_t.
3699 (this_state): Remove.
3700 (new_itemsets, append_states, save_reductions): Take a state_t as
3701 argument.
3702 (set_states, generate_states): Adjust.
3703 (save_shifts): Remove, replaced by...
3704 * src/state.h, src/state.c (state_shifts_set): New.
3705 (shifts): Rename as...
3706 (shifts_t): this.
3707 Adjust all dependencies.
3708 * src/state.h (state_t): Remove the `next' member.
3709
3710 2002-06-30 Akim Demaille <akim@epita.fr>
3711
3712 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3713 escaped in slot 0.
3714
3715 2002-06-30 Akim Demaille <akim@epita.fr>
3716
3717 Use hash.h for the state hash table.
3718
3719 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3720 (allocate_storage): Use state_hash_new.
3721 (free_storage): Use state_hash_free.
3722 (new_state, get_state): Adjust.
3723 * src/lalr.h, src/lalr.c (states): Move to...
3724 * src/states.h (state_t): Remove the `link' member, no longer
3725 used.
3726 * src/states.h, src/states.c: here.
3727 (state_hash_new, state_hash_free, state_hash_lookup)
3728 (state_hash_insert, states_free): New.
3729 * src/states.c (state_table, state_compare, state_hash): New.
3730 * src/output.c (output_actions): Do not free states now, since we
3731 still need to know the final_state number in `prepare', called
3732 afterwards. Do it...
3733 * src/main.c (main): here: call states_free after `output'.
3734
3735 2002-06-30 Akim Demaille <akim@epita.fr>
3736
3737 * src/state.h, src/state.c (state_new): New, extracted from...
3738 * src/LR0.c (new_state): here.
3739 * src/state.h (STATE_ALLOC): Move to...
3740 * src/state.c: here.
3741 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3742 * src/state.h, src/state.c: here.
3743
3744 2002-06-30 Akim Demaille <akim@epita.fr>
3745
3746 * src/reader.c (gensym): Rename as...
3747 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3748 (getsym): Rename as...
3749 (symbol_get): this.
3750
3751 2002-06-30 Akim Demaille <akim@epita.fr>
3752
3753 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3754 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3755 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3756 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3757
3758 2002-06-30 Akim Demaille <akim@epita.fr>
3759
3760 Make the test suite pass with warnings checked.
3761
3762 * tests/actions.at (Printers and Destructors): Improve.
3763 Avoid unsigned vs. signed issues.
3764 * tests/calc.at: Don't exercise the scanner here, do it...
3765 * tests/input.at (Torturing the Scanner): here.
3766
3767 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3768
3769 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3770 reorganize first lines parallel to yacc.c.
3771
3772 2002-06-28 Akim Demaille <akim@epita.fr>
3773
3774 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3775 (b4_token_enum, b4_token_defines): New, factored from...
3776 * data/lalr1.cc, data/yacc.c, glr.c: here.
3777
3778 2002-06-28 Akim Demaille <akim@epita.fr>
3779
3780 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3781 unused variables.
3782 * src/output.c (merger_output): static.
3783
3784 2002-06-28 Akim Demaille <akim@epita.fr>
3785
3786 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3787 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3788 pacify GCC.
3789 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3790
3791 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3792
3793 Accumulated changelog for new GLR parsing features.
3794
3795 * src/conflicts.c (count_total_conflicts): Change name to
3796 conflicts_total_count.
3797 * src/conflicts.h: Ditto.
3798 * src/output.c (token_actions): Use the new name.
3799 (output_conflicts): Change conflp => conflict_list_heads, and
3800 confl => conflict_list for better readability.
3801 * data/glr.c: Use the new names.
3802 * NEWS: Add self to GLR announcement.
3803
3804 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3805
3806 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3807 Akim Demaille.
3808
3809 * data/bison.glr: Change name to glr.c
3810 * data/glr.c: Renamed from bison.glr.
3811 * data/Makefile.am: Add glr.c
3812
3813 * src/getargs.c:
3814
3815 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3816 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3817
3818 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3819
3820 * data/bison.glr: Be sure to restore the
3821 current #line when returning to the skeleton contents after having
3822 exposed the input file's #line.
3823
3824 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3825
3826 * data/bison.glr: Bring up to date with changes to bison.simple.
3827
3828 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3829
3830 * data/bison.glr: Correct definitions that use b4_prefix.
3831 Various reformatting.
3832 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3833 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3834 yytokenp argument; now part of stack.
3835 (yychar): Define to behave as documented.
3836 (yyclearin): Ditto.
3837
3838 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3839
3840 * src/reader.h: Add declaration for free_merger_functions.
3841
3842 * src/reader.c (merge_functions): New variable.
3843 (get_merge_function): New function.
3844 (free_merger_functions): New function.
3845 (readgram): Check for %prec that is not followed by a symbol.
3846 Handle %dprec and %merge declarations.
3847 (packgram): Initialize dprec and merger fields in rules array.
3848
3849 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3850 conflict_list_cnt, conflict_list_free): New variables.
3851 (table_grow): Also grow conflict_table.
3852 (prepare_rules): Output dprec and merger tables.
3853 (conflict_row): New function.
3854 (action_row): Output conflict lists for GLR parser. Don't use
3855 default reduction in conflicted states for GLR parser so that there
3856 are spaces for the conflict lists.
3857 (save_row): Also save conflict information.
3858 (token_actions): Allocate conflict list.
3859 (merger_output): New function.
3860 (pack_vector): Pack conflict table, too.
3861 (output_conflicts): New function to output yyconflp and yyconfl.
3862 (output_check): Allocate conflict_tos.
3863 (output_actions): Output conflict tables, also.
3864 (output_skeleton): Output b4_mergers definition.
3865 (prepare): Output b4_max_rhs_length definition.
3866 Use 'bison.glr' as default skeleton for GLR parsers.
3867
3868 * src/gram.c (glr_parser): New flag.
3869 (grammar_free): Call free_merger_functions.
3870
3871 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3872 all pairs of conflicting reductions, rather than just all tokens
3873 causing conflicts. Needed to size conflict tables.
3874 (conflicts_output): Modify call to count_rr_conflicts for new
3875 interface.
3876 (conflicts_print): Ditto.
3877 (count_total_conflicts): New function.
3878
3879 * src/reader.h (merger_list): New type.
3880 (merge_functions): New variable.
3881
3882 * src/lex.h (tok_dprec, tok_merge): New token types.
3883
3884 * src/gram.h (rule_s): Add dprec and merger fields.
3885 (glr_parser): New flag.
3886
3887 * src/conflicts.h (count_total_conflicts): New function.
3888
3889 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3890
3891 * doc/bison.texinfo (Generalized LR Parsing): New section.
3892 (GLR Parsers): New section.
3893 (Language and Grammar): Mention GLR parsing.
3894 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3895 Correct typo ("tge" -> "the").
3896
3897 * data/bison.glr: New skeleton for GLR parsing.
3898
3899 * tests/cxx-gram.at: New tests for GLR parsing.
3900
3901 * tests/testsuite.at: Include cxx-gram.at.
3902
3903 * tests/Makefile.am: Add cxx-gram.at.
3904
3905 * src/parse-gram.y:
3906
3907 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3908
3909 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3910
3911 2002-06-27 Akim Demaille <akim@epita.fr>
3912
3913 * src/options.h, src/options.c: Remove.
3914 * src/getargs.c (short_options, long_options): New.
3915
3916 2002-06-27 Akim Demaille <akim@epita.fr>
3917
3918 * data/bison.simple, data/bison.c++: Rename as...
3919 * data/yacc.c, data/lalr1.cc: these.
3920 * doc/bison.texinfo (Environment Variables): Remove.
3921
3922 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3923
3924 * src/getargs.c (report_argmatch): Initialize strtok().
3925
3926 2002-06-20 Akim Demaille <akim@epita.fr>
3927
3928 * data/bison.simple (b4_symbol_actions): New, replaces...
3929 (b4_symbol_destructor, b4_symbol_printer): these.
3930 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3931 user token numbers.
3932
3933 2002-06-20 Akim Demaille <akim@epita.fr>
3934
3935 * data/bison.simple (yydestructor): Rename as...
3936 (yydestruct): this.
3937
3938 2002-06-20 Akim Demaille <akim@epita.fr>
3939
3940 * src/symtab.h, src/symtab.c (symbol_type_set)
3941 (symbol_destructor_set, symbol_precedence_set): The location is
3942 the last argument.
3943 Adjust all callers.
3944
3945 2002-06-20 Akim Demaille <akim@epita.fr>
3946
3947 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3948 internals.
3949 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3950 Takes a location.
3951 * src/symtab.h, src/symtab.c (symbol_class_set)
3952 (symbol_user_token_number_set): Likewise.
3953 Adjust all callers.
3954 Promote complain_at.
3955 * tests/input.at (Type Clashes): Adjust.
3956
3957 2002-06-20 Akim Demaille <akim@epita.fr>
3958
3959 * data/bison.simple (YYLEX): Fix the declaration when
3960 %pure-parser.
3961
3962 2002-06-20 Akim Demaille <akim@epita.fr>
3963
3964 * data/bison.simple (yysymprint): Don't print the token number,
3965 just its name.
3966 * tests/actions.at (Destructors): Rename as...
3967 (Printers and Destructors): this.
3968 Also exercise %printer.
3969
3970 2002-06-20 Akim Demaille <akim@epita.fr>
3971
3972 * data/bison.simple (YYDSYMPRINT): New.
3973 Use it to remove many of the #if YYDEBUG/if (yydebug).
3974
3975 2002-06-20 Akim Demaille <akim@epita.fr>
3976
3977 * src/symtab.h, src/symtab.c (symbol_t): printer and
3978 printer_location are new members.
3979 (symbol_printer_set): New.
3980 * src/parse-gram.y (PERCENT_PRINTER): New token.
3981 Handle its associated rule.
3982 * src/scan-gram.l: Adjust.
3983 (handle_destructor_at, handle_destructor_dollar): Rename as...
3984 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3985 * src/output.c (symbol_printers_output): New.
3986 (output_skeleton): Call it.
3987 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3988 since there are already many grammar files with a user `yyprint'.
3989 Replace the calls to YYPRINT to calls to yysymprint.
3990 * tests/calc.at: Adjust.
3991 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3992 taking advantage of parser very internal details (stack size!).
3993
3994 2002-06-20 Akim Demaille <akim@epita.fr>
3995
3996 * src/scan-gram.l: Complete the scanner with the missing patterns
3997 to pacify Flex.
3998 Use `quote' and `symbol_tag_get' where appropriate.
3999
4000 2002-06-19 Akim Demaille <akim@epita.fr>
4001
4002 * tests/actions.at (Destructors): Augment to test locations.
4003 * data/bison.simple (yydestructor): Pass it the current location
4004 if locations are enabled.
4005 Prototype only when __STDC__ or C++.
4006 Change the argument names to move into the yy name space: there is
4007 user code here.
4008
4009 2002-06-19 Akim Demaille <akim@epita.fr>
4010
4011 * data/bison.simple (b4_pure_if): New.
4012 Use it instead of #ifdef YYPURE.
4013
4014 2002-06-19 Akim Demaille <akim@epita.fr>
4015
4016 * data/bison.simple (b4_location_if): New.
4017 Use it instead of #ifdef YYLSP_NEEDED.
4018
4019 2002-06-19 Akim Demaille <akim@epita.fr>
4020
4021 Prepare @$ in %destructor, but currently don't bind it in the
4022 skeleton, as %location use is not cleaned up yet.
4023
4024 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4025 (handle_action_at): New.
4026 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4027 a braced_code_t and a location as additional arguments.
4028 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4029 unquote one when outputting `b4_dollar_dollar'.
4030 Adjust callers.
4031 * data/bison.simple (b4_eval): Remove.
4032 (b4_symbol_destructor): Adjust.
4033 * tests/input.at (Invalid @n): Adjust.
4034
4035 2002-06-19 Zack Weinberg <zack@codesourcery.com>
4036
4037 * doc/bison.texinfo: Document ability to have multiple
4038 prologue sections.
4039
4040 2002-06-18 Akim Demaille <akim@epita.fr>
4041
4042 * src/files.c (compute_base_names): When computing the output file
4043 names from the input file name, strip the directory part.
4044
4045 2002-06-18 Akim Demaille <akim@epita.fr>
4046
4047 * data/bison.simple.new: Comment changes.
4048 Reported by Andreas Schwab.
4049
4050 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4051
4052 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4053 there are no `label `yyoverflowlab' defined but not used' warnings
4054 when yyoverflow is defined.
4055
4056 2002-06-18 Akim Demaille <akim@epita.fr>
4057
4058 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4059 new member.
4060 (symbol_destructor_set): Adjust.
4061 * src/output.c (symbol_destructors_output): Output the destructor
4062 locations.
4063 Output the symbol name.
4064 * data/bison.simple (b4_symbol_destructor): Adjust.
4065
4066 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4067 and Akim Demaille <akim@epita.fr>
4068
4069 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4070 what's left on the stack when the error recovery hits EOF.
4071 * tests/actions.at (Destructors): Complete to exercise this case.
4072
4073 2002-06-17 Akim Demaille <akim@epita.fr>
4074
4075 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4076 arguments is really empty, not only equal to `[]'.
4077 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4078 member.
4079 (symbol_destructor_set): New.
4080 * src/output.c (symbol_destructors_output): New.
4081 * src/reader.h (brace_code_t, current_braced_code): New.
4082 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4083 (handle_dollar): Rename as...
4084 (handle_action_dollar): this.
4085 (handle_destructor_dollar): New.
4086 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4087 (grammar_declaration): Use it.
4088 * data/bison.simple (yystos): Is always defined.
4089 (yydestructor): New.
4090 * tests/actions.at (Destructors): New.
4091 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4092
4093 2002-06-17 Akim Demaille <akim@epita.fr>
4094
4095 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4096 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4097 rule_length only when needed.
4098 * src/output.c (actions_output, token_definitions_output): Output
4099 the full M4 block.
4100 * src/symtab.c: Don't access directly to the symbol tag, use
4101 symbol_tag_get.
4102 * src/parse-gram.y: Use symbol_list_free.
4103
4104 2002-06-17 Akim Demaille <akim@epita.fr>
4105
4106 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4107 (symbol_list_prepend, get_type_name): Move to...
4108 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4109 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4110 Adjust all callers.
4111 (symbol_list_free): New.
4112 * src/scan-gram.l (handle_dollar): Takes a location.
4113 * tests/input.at (Invalid $n): Adjust.
4114
4115 2002-06-17 Akim Demaille <akim@epita.fr>
4116
4117 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4118 (symbol_list_prepend): New.
4119 * src/parse-gram.y (%union): `list' is a new member.
4120 (symbols.1): New, replaces...
4121 (terms_to_prec.1, nterms_to_type.1): these.
4122 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4123 Take a location as additional argument.
4124 Adjust all callers.
4125
4126 2002-06-15 Akim Demaille <akim@epita.fr>
4127
4128 * src/parse-gram.y: Move %token in the declaration section so that
4129 we don't depend upon CVS Bison.
4130
4131 2002-06-15 Akim Demaille <akim@epita.fr>
4132
4133 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4134 * src/print.c (print_core): Use it.
4135
4136 2002-06-15 Akim Demaille <akim@epita.fr>
4137
4138 * src/conflicts.c (log_resolution): Accept the rule involved in
4139 the sr conflicts instead of the lookahead number that points to
4140 that rule.
4141 (flush_reduce): Accept the current lookahead vector as argument,
4142 instead of the index in LA.
4143 (resolve_sr_conflict): Accept the current number of lookahead
4144 bitset to consider for the STATE, instead of the index in LA.
4145 (set_conflicts): Adjust.
4146 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4147
4148 2002-06-15 Akim Demaille <akim@epita.fr>
4149
4150 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4151 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4152 Adjust all dependencies.
4153 * src/lalr.c (initialize_lookaheads): Split into...
4154 (states_lookaheads_count, states_lookaheads_initialize): these.
4155 (lalr): Adjust.
4156
4157 2002-06-15 Akim Demaille <akim@epita.fr>
4158
4159 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4160 out of...
4161 (grammar_rules_print): here.
4162 * src/reduce.c (reduce_output): Use it.
4163 * tests/reduce.at (Useless Rules, Reduced Automaton)
4164 (Underivable Rules): Adjust.
4165
4166 2002-06-15 Akim Demaille <akim@epita.fr>
4167
4168 Copy BYacc's nice way to report the grammar.
4169
4170 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4171 New.
4172 Don't print the rules' location, it is confusing and useless.
4173 (rule_print): Use grammar_rhs_print.
4174 * src/print.c (print_grammar): Use grammar_rules_print.
4175
4176 2002-06-15 Akim Demaille <akim@epita.fr>
4177
4178 Complete and rationalize `useless thing' warnings.
4179
4180 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4181 (symbol_tag_print): New.
4182 Use them everywhere in place of accessing directly the tag member.
4183 * src/gram.h, src/gram.c (rule_print): New.
4184 Use it where a rule used to be printed `by hand'.
4185 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4186 (reduce_grammar_tables): Report the useless rules.
4187 (reduce_print): Useless things are a warning, not an error.
4188 Report it as such.
4189 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4190 (Reduced Automaton, Underivable Rules): Adjust.
4191 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4192 * tests/conflicts.at (Unresolved SR Conflicts)
4193 (Solved SR Conflicts): Adjust.
4194
4195 2002-06-15 Akim Demaille <akim@epita.fr>
4196
4197 Let symbols have a location.
4198
4199 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4200 (getsym): Adjust.
4201 Adjust all callers.
4202 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4203 Use location_t, not int.
4204 * src/symtab.c (symbol_check_defined): Take advantage of the
4205 location.
4206 * tests/regression.at (Invalid inputs): Adjust.
4207
4208 2002-06-15 Akim Demaille <akim@epita.fr>
4209
4210 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4211 (input): Don't try to initialize yylloc here, do it in the
4212 scanner.
4213 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4214 * src/gram.h (rule_t): Change line and action_line into location
4215 and action_location, of location_t type.
4216 Adjust all dependencies.
4217 * src/location.h, src/location.c (empty_location): New.
4218 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4219 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4220 (grammar_current_rule_symbol_append)
4221 (grammar_current_rule_action_append): Expect a location as argument.
4222 * src/reader.c (grammar_midrule_action): Adjust to attach an
4223 action's location as dummy symbol location.
4224 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4225 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4226 the line numbers.
4227
4228 2002-06-14 Akim Demaille <akim@epita.fr>
4229
4230 Grammar declarations may be found in the grammar section.
4231
4232 * src/parse-gram.y (rules_or_grammar_declaration): New.
4233 (declarations): Each declaration may end with a semicolon, not
4234 just...
4235 (grammar_declaration): `"%union"'.
4236 (grammar): Branch to rules_or_grammar_declaration.
4237
4238 2002-06-14 Akim Demaille <akim@epita.fr>
4239
4240 * src/main.c (main): Invoke scanner_free.
4241
4242 2002-06-14 Akim Demaille <akim@epita.fr>
4243
4244 * src/output.c (m4_invoke): Extracted from...
4245 (output_skeleton): here.
4246 Free tempfile.
4247
4248 2002-06-14 Akim Demaille <akim@epita.fr>
4249
4250 * src/parse-gram.y (directives, directive, gram)
4251 (grammar_directives, precedence_directives, precedence_directive):
4252 Rename as...
4253 (declarations, declaration, grammar, grammar_declaration)
4254 (precedence_declaration, precedence_declarator): these.
4255 (symbol_declaration): New.
4256
4257 2002-06-14 Akim Demaille <akim@epita.fr>
4258
4259 * src/files.c (action_obstack): Remove, unused.
4260 (output_obstack): Remove it, and all its dependencies, as it is no
4261 longer needed.
4262 * src/reader.c (epilogue_set): Build the epilogue in the
4263 muscle_obstack.
4264 * src/output.h, src/output.c (muscle_obstack): Move to...
4265 * src/muscle_tab.h, src/muscle_tab.h: here.
4266 (muscle_init): Initialize muscle_obstack.
4267 (muscle_free): New.
4268 * src/main.c (main): Call it.
4269
4270 2002-06-14 Akim Demaille <akim@epita.fr>
4271
4272 * src/location.h: New, extracted from...
4273 * src/reader.h: here.
4274 * src/Makefile.am (noinst_HEADERS): Merge into
4275 (bison_SOURCES): this.
4276 Add location.h.
4277 * src/parse-gram.y: Use location_t instead of Bison's.
4278 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4279 Use location_t instead of ints.
4280
4281 2002-06-14 Akim Demaille <akim@epita.fr>
4282
4283 * data/bison.simple, data/bison.c++: Be sure to restore the
4284 current #line when returning to the skeleton contents after having
4285 exposed the input file's #line.
4286
4287 2002-06-12 Akim Demaille <akim@epita.fr>
4288
4289 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4290 eager.
4291 * tests/actions.at (Exotic Dollars): New.
4292
4293 2002-06-12 Akim Demaille <akim@epita.fr>
4294
4295 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4296 ['"/] too eagerly.
4297 * tests/input.at (Torturing the Scanner): New.
4298
4299 2002-06-11 Akim Demaille <akim@epita.fr>
4300
4301 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4302 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4303 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4304 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4305 * src/reader.c (reader): Use it.
4306
4307 2002-06-11 Akim Demaille <akim@epita.fr>
4308
4309 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4310 Adjust all callers.
4311 (scanner_last_string_free): New.
4312
4313 2002-06-11 Akim Demaille <akim@epita.fr>
4314
4315 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4316 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4317 (last_string, YY_OBS_FREE): New.
4318 Use them when returning an ID.
4319
4320 2002-06-11 Akim Demaille <akim@epita.fr>
4321
4322 Have Bison grammars parsed by a Bison grammar.
4323
4324 * src/reader.c, src/reader.h (prologue_augment): New.
4325 * src/reader.c (copy_definition): Remove.
4326
4327 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4328 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4329 (grammar_current_rule_prec_set, grammar_current_rule_check)
4330 (grammar_current_rule_symbol_append)
4331 (grammar_current_rule_action_append): Export.
4332 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4333 (symbol_list_action_append): Remove.
4334 Hook the routines from reader.
4335 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4336 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4337
4338 * src/reader.c (read_declarations): Remove, unused.
4339
4340 * src/parse-gram.y: Handle the epilogue.
4341 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4342 (grammar_start_symbol_set): this.
4343 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4344 * src/reader.c (readgram): Remove, unused.
4345 (reader): Adjust to insert eoftoken and axiom where appropriate.
4346
4347 * src/reader.c (copy_dollar): Replace with...
4348 * src/scan-gram.h (handle_dollar): this.
4349 * src/parse-gram.y: Remove `%thong'.
4350
4351 * src/reader.c (copy_at): Replace with...
4352 * src/scan-gram.h (handle_at): this.
4353
4354 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4355 New.
4356
4357 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4358 time being.
4359
4360 * src/reader.h, src/reader.c (grammar_rule_end): New.
4361
4362 * src/parse.y (current_type, current_class): New.
4363 Implement `%nterm', `%token' support.
4364 Merge `%term' into `%token'.
4365 (string_as_id): New.
4366 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4367 type name.
4368
4369 * src/parse-gram.y: Be sure to handle properly the beginning of
4370 rules.
4371
4372 * src/parse-gram.y: Handle %type.
4373 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4374
4375 * src/parse-gram.y: More directives support.
4376 * src/options.c: No longer handle source directives.
4377
4378 * src/parse-gram.y: Fix %output.
4379
4380 * src/parse-gram.y: Handle %union.
4381 Use the prologue locations.
4382 * src/reader.c (parse_union_decl): Remove.
4383
4384 * src/reader.h, src/reader.c (epilogue_set): New.
4385 * src/parse-gram.y: Use it.
4386
4387 * data/bison.simple, data/bison.c++: b4_stype is now either not
4388 defined, then default to int, or to the contents of %union,
4389 without `union' itself.
4390 Adjust.
4391 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4392
4393 * src/output.c (actions_output): Don't output braces, as they are
4394 already handled by the scanner.
4395
4396 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4397 characters to themselves.
4398
4399 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4400 that the epilogue has a proper #line.
4401
4402 * src/parse-gram.y: Handle precedence/associativity.
4403
4404 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4405 a terminal.
4406 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4407 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4408 at all to define terminals that cannot be emitted.
4409
4410 * src/scan-gram.l: Escape M4 characters.
4411
4412 * src/scan-gram.l: Working properly with escapes in user
4413 strings/characters.
4414
4415 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4416 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4417 grammar.
4418 Use more modest sizes, as for the time being the parser does not
4419 release memory, and therefore the process swallows a huge amount
4420 of memory.
4421
4422 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4423 stricter %token grammar.
4424
4425 * src/symtab.h (associativity): Add `undef_assoc'.
4426 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4427 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4428
4429 * tests/regression.at (Invalid %directive): Remove, as it is now
4430 meaningless.
4431 (Invalid inputs): Adjust to the new error messages.
4432 (Token definitions): The new grammar doesn't allow too many
4433 eccentricities.
4434
4435 * src/lex.h, src/lex.c: Remove.
4436 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4437 (copy_character, copy_string2, copy_string, copy_identifier)
4438 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4439 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4440 (parse_action): Remove.
4441 * po/POTFILES.in: Adjust.
4442
4443 2002-06-11 Akim Demaille <akim@epita.fr>
4444
4445 * src/reader.c (parse_action): Don't store directly into the
4446 rule's action member: return the action as a string.
4447 Don't require `rule_length' as an argument: compute it.
4448 (grammar_current_rule_symbol_append)
4449 (grammar_current_rule_action_append): New, eved out from
4450 (readgram): here.
4451 Remove `action_flag', `rulelength', unused now.
4452
4453 2002-06-11 Akim Demaille <akim@epita.fr>
4454
4455 * src/reader.c (grammar_current_rule_prec_set).
4456 (grammar_current_rule_check): New, eved out from...
4457 (readgram): here.
4458 Remove `xaction', `first_rhs': useless.
4459 * tests/input.at (Type clashes): New.
4460 * tests/existing.at (GNU Cim Grammar): Adjust.
4461
4462 2002-06-11 Akim Demaille <akim@epita.fr>
4463
4464 * src/reader.c (grammar_midrule_action): New, Eved out from
4465 (readgram): here.
4466
4467 2002-06-11 Akim Demaille <akim@epita.fr>
4468
4469 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4470 New.
4471 (readgram): Use them as replacement of inlined code, crule and
4472 crule1.
4473
4474 2002-06-11 Akim Demaille <akim@epita.fr>
4475
4476 * src/reader.c (grammar_end, grammar_symbol_append): New.
4477 (readgram): Use them.
4478 Make the use of `p' as local as possible.
4479
4480 2002-06-10 Akim Demaille <akim@epita.fr>
4481
4482 GCJ's parser requires the tokens to be defined before the prologue.
4483
4484 * data/bison.simple: Output the token definition before the user's
4485 prologue.
4486 * tests/regression.at (Braces parsing, Duplicate string)
4487 (Mixing %token styles): Check the output from bison.
4488 (Early token definitions): New.
4489
4490 2002-06-10 Akim Demaille <akim@epita.fr>
4491
4492 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4493 assigning twice the same user number to a token, so that we can
4494 use it in...
4495 * src/lex.c (lex): here.
4496 Also use `symbol_class_set' instead of hand written code.
4497 * src/reader.c (parse_assoc_decl): Likewise.
4498
4499 2002-06-10 Akim Demaille <akim@epita.fr>
4500
4501 * src/symtab.c, src/symtab.c (symbol_class_set)
4502 (symbol_user_token_number_set): New.
4503 * src/reader.c (parse_token_decl): Use them.
4504 Use a switch instead of ifs.
4505 Use a single argument.
4506
4507 2002-06-10 Akim Demaille <akim@epita.fr>
4508
4509 Remove `%thong' support as it is undocumented, unused, duplicates
4510 `%token's job, and creates useless e-mail traffic with people who
4511 want to know what it is, why it is undocumented, unused, and
4512 duplicates `%token's job.
4513
4514 * src/reader.c (parse_thong_decl): Remove.
4515 * src/options.c (option_table): Remove "thong".
4516 * src/lex.h (tok_thong): Remove.
4517
4518 2002-06-10 Akim Demaille <akim@epita.fr>
4519
4520 * src/symtab.c, src/symtab.c (symbol_type_set)
4521 (symbol_precedence_set): New.
4522 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4523 (value_components_used): Remove, unused.
4524
4525 2002-06-09 Akim Demaille <akim@epita.fr>
4526
4527 Move symbols handling code out of the reader.
4528
4529 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4530 (axiom): Move to...
4531 * src/symtab.h, src/symtab.c: here.
4532
4533 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4534 * src/reader.c (startval): Rename as...
4535 * src/symtab.h, src/symtab.c (startsymbol): this.
4536 * src/reader.c: Adjust.
4537
4538 * src/reader.c (symbol_check_defined, symbol_make_alias)
4539 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4540 (token_translations_init)
4541 Move to...
4542 * src/symtab.c: here.
4543 * src/reader.c (packsymbols): Move to...
4544 * src/symtab.h, src/symtab.c (symbols_pack): here.
4545 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4546 argument.
4547
4548 2002-06-03 Akim Demaille <akim@epita.fr>
4549
4550 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4551 then statements.
4552
4553 2002-06-03 Akim Demaille <akim@epita.fr>
4554
4555 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4556 structs with non literals.
4557 * src/scan-skel.l: never-interactive.
4558 * src/conflicts.c (enum conflict_resolution_e): No trailing
4559 comma.
4560 * src/getargs.c (usage): Split long literal strings.
4561 Reported by Hans Aberg.
4562
4563 2002-05-28 Akim Demaille <akim@epita.fr>
4564
4565 * data/bison.c++: Use C++ ostreams.
4566 (cdebug_): New member.
4567
4568 2002-05-28 Akim Demaille <akim@epita.fr>
4569
4570 * src/output.c (output_skeleton): Be sure to allocate enough room
4571 for `/' _and_ for `\0' in full_skeleton.
4572
4573 2002-05-28 Akim Demaille <akim@epita.fr>
4574
4575 * data/bison.c++: Catch up with bison.simple:
4576 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4577 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4578 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4579 and popping traces.
4580
4581 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4582
4583 * src/output.c (output_skeleton): Put an explicit path in front of
4584 the skeleton file name, rather than relying on the -I directory,
4585 to partially alleviate effects of having a skeleton file lying around
4586 in the current directory.
4587
4588 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4589
4590 * src/conflicts.c (log_resolution): Correct typo:
4591 obstack_printf should be obstack_fgrow1.
4592
4593 2002-05-26 Akim Demaille <akim@epita.fr>
4594
4595 * src/state.h (state_t): `solved_conflicts' is a new member.
4596 * src/LR0.c (new_state): Set it to 0.
4597 * src/conflicts.h, src/conflicts.c (print_conflicts)
4598 (free_conflicts, solve_conflicts): Rename as...
4599 (conflicts_print, conflicts_free, conflicts_solve): these.
4600 Adjust callers.
4601 * src/conflicts.c (enum conflict_resolution_e)
4602 (solved_conflicts_obstack): New, used by...
4603 (log_resolution): this.
4604 Adjust to attach the conflict resolution to each state.
4605 Complete the description with the precedence/associativity
4606 information.
4607 (resolve_sr_conflict): Adjust.
4608 * src/print.c (print_state): Output its solved_conflicts.
4609 * tests/conflicts.at (Unresolved SR Conflicts)
4610 (Solved SR Conflicts): Exercise --report=all.
4611
4612 2002-05-26 Akim Demaille <akim@epita.fr>
4613
4614 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4615 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4616 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4617 (token_number_t, item_number_as_token_number)
4618 (token_number_as_item_number, muscle_insert_token_number_table):
4619 Rename as...
4620 (symbol_number_t, item_number_as_symbol_number)
4621 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4622 these, since it is more appropriate.
4623
4624 2002-05-26 Akim Demaille <akim@epita.fr>
4625
4626 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4627 `Error:' lines.
4628 * data/bison.simple (yystos) [YYDEBUG]: New.
4629 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4630 error recovery.
4631 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4632
4633 2002-05-25 Akim Demaille <akim@epita.fr>
4634
4635 * doc/bison.texinfo (Debugging): Split into...
4636 (Tracing): this new section, its former contents, and...
4637 (Understanding): this new section.
4638 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4639 by...
4640 (report_flag): this.
4641 Adjust all dependencies.
4642 (report_args, report_types, report_argmatch): New.
4643 (usage, getargs): Report/support -r, --report.
4644 * src/options.h
4645 (struct option_table_struct): Rename as..,
4646 (struct option_table_s): this.
4647 Rename the `set_flag' member to `flag' to match with getopt_long's
4648 struct.
4649 * src/options.c (option_table): Split verbose into an entry for
4650 %verbose, and another for --verbose.
4651 Support --report/-r, so remove -r from the obsolete --raw.
4652 * src/print.c: Attach full item sets and lookaheads reports to
4653 report_flag instead of trace_flag.
4654 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4655
4656 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4657 and Paul Eggert <eggert@twinsun.com>
4658
4659 * data/bison.simple (yyparse): Correct error handling to conform to
4660 POSIX and yacc. Specifically, after syntax error is discovered,
4661 do not reduce further before shifting the error token.
4662 Clean up the code a bit by removing the labels yyerrdefault,
4663 yyerrhandle, yyerrpop.
4664 * NEWS: Document the above.
4665
4666 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4667
4668 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4669 type; it isn't always big enough, since it doesn't necessarily
4670 include non-terminals.
4671 (yytranslate): Expand definition of yy_token_number_type, so that
4672 the latter can be removed.
4673 (yy_token_number_type): Remove, only one use.
4674 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4675 don't use TokenNumberType as element type.
4676
4677 * tests/regression.at: Modify expected output to agree with change
4678 to yyr1 and yytranslate.
4679
4680 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4681
4682 * src/reader.c (parse_action): Use copy_character instead of
4683 obstack_1grow.
4684
4685 2002-05-13 Akim Demaille <akim@epita.fr>
4686
4687 * tests/regression.at (Token definitions): Prototype yylex and
4688 yyerror.
4689
4690 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4691
4692 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4693 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4694 32-bit arithmetic.
4695 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4696
4697 2002-05-07 Akim Demaille <akim@epita.fr>
4698
4699 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4700 avoid GCC warnings.
4701
4702 2002-05-07 Akim Demaille <akim@epita.fr>
4703
4704 Kill GCC warnings.
4705
4706 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4707 over the RHS of each rule.
4708 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4709 * src/state.h (state_t): Member `nitems' is unsigned short.
4710 * src/LR0.c (get_state): Adjust.
4711 * src/reader.c (packgram): Likewise.
4712 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4713 `Type'.
4714 (muscle_insert_int_table): Remove, unused.
4715 (prepare_rules): Remove `max'.
4716
4717 2002-05-06 Akim Demaille <akim@epita.fr>
4718
4719 * src/closure.c (print_firsts): Display of the symbol tags.
4720 (bitmatrix_print): Move to...
4721 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4722 here.
4723 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4724
4725 2002-05-06 Akim Demaille <akim@epita.fr>
4726
4727 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4728 hash_do_for_each.
4729
4730 2002-05-06 Akim Demaille <akim@epita.fr>
4731
4732 * src/LR0.c (new_state, get_state): Instead of using the global
4733 `kernel_size' and `kernel_base', have two new arguments:
4734 `core_size' and `core'.
4735 Adjust callers.
4736
4737 2002-05-06 Akim Demaille <akim@epita.fr>
4738
4739 * src/reader.c (packgram): No longer end `ritem' with a 0
4740 sentinel: it is not used.
4741
4742 2002-05-05 Akim Demaille <akim@epita.fr>
4743
4744 New experimental feature: display the lookaheads in the report and
4745 graph.
4746
4747 * src/print (print_core): When --trace-flag, display the rules
4748 lookaheads.
4749 * src/print_graph.c (print_core): Likewise.
4750 Swap the arguments.
4751 Adjust caller.
4752
4753 2002-05-05 Akim Demaille <akim@epita.fr>
4754
4755 * tests/torture.at (Many lookaheads): New test.
4756
4757 2002-05-05 Akim Demaille <akim@epita.fr>
4758
4759 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4760 (GENERATE_MUSCLE_INSERT_TABLE): this.
4761 (output_int_table, output_unsigned_int_table, output_short_table)
4762 (output_token_number_table, output_item_number_table): Replace with...
4763 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4764 (muscle_insert_short_table, muscle_insert_token_number_table)
4765 (muscle_insert_item_number_table): these.
4766 Adjust all callers.
4767 (prepare_tokens): Don't free `translations', since...
4768 * src/reader.h, src/reader.c (grammar_free): do it.
4769 Move to...
4770 * src/gram.h, src/gram.c (grammar_free): here.
4771 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4772 b4_translate_max.
4773
4774 2002-05-05 Akim Demaille <akim@epita.fr>
4775
4776 * src/output.c (output_unsigned_int_table): New.
4777 (prepare_rules): `i' is unsigned.
4778 `prhs', `rline', `r2' are unsigned int.
4779 Rename muscle `rhs_number_max' as `rhs_max'.
4780 Output muscles `prhs_max', `rline_max', and `r2_max'.
4781 Free rline and r1.
4782 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4783 to compute types instead of constant types.
4784 * tests/regression.at (Web2c Actions): Adjust.
4785
4786 2002-05-04 Akim Demaille <akim@epita.fr>
4787
4788 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4789 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4790 Adjust dependencies.
4791 * src/output.c (token_definitions_output): Be sure not to output a
4792 `#define 'a'' when fed with `%token 'a' "a"'.
4793 * tests/regression.at (Token definitions): New.
4794
4795 2002-05-03 Paul Eggert <eggert@twinsun.com>
4796
4797 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4798 for K&R C.
4799
4800 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4801
4802 * Makefile.am (SUBDIRS): Remove intl.
4803 (EXTRA_DIST): Add config/config.rpath.
4804
4805 2002-05-03 Akim Demaille <akim@epita.fr>
4806
4807 * data/bison.simple (m4_if): Don't output empty enums.
4808 And actually, output valid enum definitions :(.
4809
4810 2002-05-03 Akim Demaille <akim@epita.fr>
4811
4812 * configure.bat: Remove, completely obsolete.
4813 * Makefile.am (EXTRA_DIST): Adjust.
4814 Don't distribute config.rpath...
4815 * config/Makefile.am (EXTRA_DIST): Do it.
4816
4817 2002-05-03 Akim Demaille <akim@epita.fr>
4818
4819 * configure.in (GETTEXT_VERSION): New.
4820 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4821
4822 2002-05-03 Akim Demaille <akim@epita.fr>
4823
4824 * data/bison.simple (b4_token_enum): New.
4825 (b4_token_defines): Use it to output tokens both as #define and
4826 enums.
4827 Suggested by Paul Eggert.
4828 * src/output.c (token_definitions_output): Don't output spurious
4829 white spaces.
4830
4831 2002-05-03 Akim Demaille <akim@epita.fr>
4832
4833 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4834
4835 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4836
4837 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4838 Update the stack class, give a try to deque as the default container.
4839
4840 2002-05-02 Akim Demaille <akim@epita.fr>
4841
4842 * data/bison.simple (yyparse): Do not implement @$ = @1.
4843 (YYLLOC_DEFAULT): Adjust to do it.
4844 * doc/bison.texinfo (Location Default Action): Fix.
4845
4846 2002-05-02 Akim Demaille <akim@epita.fr>
4847
4848 * src/reader.c (parse_braces): Merge into...
4849 (parse_action): this.
4850
4851 2002-05-02 Akim Demaille <akim@epita.fr>
4852
4853 * configure.in (ALL_LINGUAS): Remove.
4854 * po/LINGUAS, hr.po: New.
4855
4856 2002-05-02 Akim Demaille <akim@epita.fr>
4857
4858 Remove the so called hairy (semantic) parsers.
4859
4860 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4861 * src/gram.h, src/gram.c (semantic_parser): Remove.
4862 (rule_t): Remove the guard and guard_line members.
4863 * src/lex.h (token_t): remove tok_guard.
4864 * src/options.c (option_table): Remove %guard and %semantic_parser
4865 support.
4866 * src/output.c, src/output.h (guards_output): Remove.
4867 (prepare): Adjust.
4868 (token_definitions_output): Don't output the `T'
4869 tokens (???).
4870 (output_skeleton): Don't output the guards.
4871 * src/files.c, src/files.c (attrsfile): Remove.
4872 * src/reader.c (symbol_list): Remove the guard and guard_line
4873 members.
4874 Adjust dependencies.
4875 (parse_guard): Remove.
4876 * data/bison.hairy: Remove.
4877 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4878 BISON_HAIRY.
4879
4880 2002-05-02 Akim Demaille <akim@epita.fr>
4881
4882 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4883 (parse_guard): Rename the formal argument `stack_offset' as
4884 `rule_length', which is more readable.
4885 Adjust callers.
4886 (copy_at, copy_dollar): Instead of outputting the hard coded
4887 values of $$, $n and so forth, output invocation to b4_lhs_value,
4888 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4889 Note: this patch partially drops `semantic-parser' support: it
4890 always does `rule_length - n', where semantic parsers ought to
4891 always use `-n'.
4892 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4893 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4894
4895 2002-05-02 Akim Demaille <akim@epita.fr>
4896
4897 * configure.in (AC_INIT): Bump to 1.49b.
4898 (AM_INIT_AUTOMAKE): Short invocation.
4899
4900 2002-05-02 Akim Demaille <akim@epita.fr>
4901
4902 Version 1.49a.
4903
4904 2002-05-01 Akim Demaille <akim@epita.fr>
4905
4906 * src/skeleton.h: Remove.
4907
4908 2002-05-01 Akim Demaille <akim@epita.fr>
4909
4910 * src/skeleton.h: Fix the #endif.
4911 Reported by Magnus Fromreide.
4912
4913 2002-04-26 Paul Eggert <eggert@twinsun.com>
4914
4915 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4916 Define if we define YYSTYPE and YYLTYPE, respectively.
4917 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4918
4919 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4920
4921 * src/scan-skel.l: Postprocess quadrigraphs.
4922
4923 * src/reader.c (copy_character): New function, used to output
4924 single characters while replacing `[' and `]' with quadrigraphs, to
4925 avoid troubles with M4 quotes.
4926 (copy_comment): Output characters with copy_character.
4927 (read_additionnal_code): Likewise.
4928 (copy_string2): Likewise.
4929 (copy_definition): Likewise.
4930
4931 * tests/calc.at: Exercise M4 quoting.
4932
4933 2002-04-25 Akim Demaille <akim@epita.fr>
4934
4935 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4936 between `!' and the command.
4937 Reported by Paul Eggert.
4938
4939 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4940
4941 * tests/calc.at: Exercise prologue splitting.
4942
4943 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4944 `b4_post_prologue' instead of `b4_prologue'.
4945
4946 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4947 muscles.
4948 (output): Free pre_prologue_obstack and post_prologue_obstack.
4949 * src/files.h, src/files.c (attrs_obstack): Remove.
4950 (pre_prologue_obstack, post_prologue_obstack): New.
4951 * src/reader.c (copy_definition): Add a parameter to specify the
4952 obstack to fill, instead of using attrs_obstack unconditionally.
4953 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4954 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4955
4956 2002-04-23 Paul Eggert <eggert@twinsun.com>
4957
4958 * data/bison.simple: Remove unnecessary commentary and white
4959 space differences from 1_29-branch.
4960 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4961
4962 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4963 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4964 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4965 constructors or destructors.
4966
4967 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4968
4969 2002-04-23 Akim Demaille <akim@epita.fr>
4970
4971 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4972 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4973 location with columns.
4974 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4975 All reported by Paul Eggert.
4976
4977 2002-04-22 Akim Demaille <akim@epita.fr>
4978
4979 * src/reduce.c (dump_grammar): Move to...
4980 * src/gram.h, src/gram.c (grammar_dump): here.
4981 Be sure to separate long item numbers.
4982 Don't read the members of a rule's prec if its nil.
4983
4984 2002-04-22 Akim Demaille <akim@epita.fr>
4985
4986 * src/output.c (table_size, table_grow): New.
4987 (MAXTABLE): Remove, replace uses with table_size.
4988 (pack_vector): Instead of dying when the table is too big, grow it.
4989
4990 2002-04-22 Akim Demaille <akim@epita.fr>
4991
4992 * data/bison.simple (yyr1): Its type is that of a token number.
4993 * data/bison.c++ (r1_): Likewise.
4994 * tests/regression.at (Web2c Actions): Adjust.
4995
4996 2002-04-22 Akim Demaille <akim@epita.fr>
4997
4998 * src/reader.c (token_translations_init): 256 is now the default
4999 value for the error token, i.e., it will be assigned another
5000 number if the user assigned 256 to one of her tokens.
5001 (reader): Don't force 256 to error.
5002 * doc/bison.texinfo (Symbols): Adjust.
5003 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5004 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5005 etc. instead of 10, 20, 30 (which was used to `jump' over error
5006 (256) and undefined (2)).
5007
5008 2002-04-22 Akim Demaille <akim@epita.fr>
5009
5010 Propagate more token_number_t.
5011
5012 * src/gram.h (token_number_as_item_number)
5013 (item_number_as_token_number): New.
5014 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5015 Use it to create output_item_number_table and
5016 output_token_number_table.
5017 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5018 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5019 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5020 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5021
5022 2002-04-22 Akim Demaille <akim@epita.fr>
5023
5024 * src/output.h, src/output.c (get_lines_number): Remove.
5025
5026 2002-04-19 Akim Demaille <akim@epita.fr>
5027
5028 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5029 as Lex/Flex'.
5030 (Debugging): More details about enabling the debugging features.
5031 (Table of Symbols): Describe $$, $n, @$, and @n.
5032 Suggested by Tim Josling.
5033
5034 2002-04-19 Akim Demaille <akim@epita.fr>
5035
5036 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5037
5038 2002-04-10 Akim Demaille <akim@epita.fr>
5039
5040 * src/system.h: Rely on HAVE_LIMITS_H.
5041 Suggested by Paul Eggert.
5042
5043 2002-04-09 Akim Demaille <akim@epita.fr>
5044
5045 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5046 full stderr, and strip it according to the bison options, instead
5047 of composing the error message from different bits.
5048 This makes it easier to check for several error messages.
5049 Adjust all the invocations.
5050 Add an invocation exercising the error token.
5051 Add an invocation demonstrating a stupid error message.
5052 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5053 Adjust the tests.
5054 Error message are for stderr, not stdout.
5055
5056 2002-04-09 Akim Demaille <akim@epita.fr>
5057
5058 * src/gram.h, src/gram.c (error_token_number): Remove, use
5059 errtoken->number.
5060 * src/reader.c (reader): Don't specify the user token number (2)
5061 for $undefined, as it uselessly prevents using it.
5062 * src/gram.h (token_number_t): Move to...
5063 * src/symtab.h: here.
5064 (state_t.number): Is a token_number_t.
5065 * src/print.c, src/reader.c: Use undeftoken->number instead of
5066 hard coded 2.
5067 (Even though this 2 is not the same as above: the number of the
5068 undeftoken remains being 2, it is its user token number which
5069 might not be 2).
5070 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5071 `user_token_number_max'.
5072 Output `undef_token_number'.
5073 * data/bison.simple, data/bison.c++: Use them.
5074 Be sure to map invalid yylex return values to
5075 `undef_token_number'. This saves us from gratuitous SEGV.
5076
5077 * tests/conflicts.at (Solved SR Conflicts)
5078 (Unresolved SR Conflicts): Adjust.
5079 * tests/regression.at (Web2c Actions): Adjust.
5080
5081 2002-04-08 Akim Demaille <akim@epita.fr>
5082
5083 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5084 Adding #line.
5085 Remove the duplicate `typedefs'.
5086 (RhsNumberType): Fix the declaration and various other typos.
5087 Use __ofile__.
5088 * data/bison.simple: Use __ofile__.
5089 * src/scan-skel.l: Handle __ofile__.
5090
5091 2002-04-08 Akim Demaille <akim@epita.fr>
5092
5093 * src/gram.h (item_number_t): New, the type of item numbers in
5094 RITEM. Note that it must be able to code symbol numbers as
5095 positive number, and the negation of rule numbers as negative
5096 numbers.
5097 Adjust all dependencies (pretty many).
5098 * src/reduce.c (rule): Remove this `short *' pointer: use
5099 item_number_t.
5100 * src/system.h (MINSHORT, MAXSHORT): Remove.
5101 Include `limits.h'.
5102 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5103 (shortcpy): Remove.
5104 (MAXTABLE): Move to...
5105 * src/output.c (MAXTABLE): here.
5106 (prepare_rules): Use output_int_table to output rhs.
5107 * data/bison.simple, data/bison.c++: Adjust.
5108 * tests/torture.at (Big triangle): Move the limit from 254 to
5109 500.
5110 * tests/regression.at (Web2c Actions): Ajust.
5111
5112 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5113 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5114 passes, but produces negative #line number, once fixed, GCC is
5115 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5116 C), it passes.
5117 * src/state.h (state_h): Code input lines on ints, not shorts.
5118
5119 2002-04-08 Akim Demaille <akim@epita.fr>
5120
5121 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5122 and then the grammar.
5123
5124 2002-04-08 Akim Demaille <akim@epita.fr>
5125
5126 * src/system.h: No longer using strndup.
5127
5128 2002-04-07 Akim Demaille <akim@epita.fr>
5129
5130 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5131 * src/output.c (output_table_data): Return the longest number.
5132 (prepare_tokens): Output `token_number_max').
5133 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5134 New.
5135 Use them to define yy_token_number_type/TokenNumberType.
5136 Use this type for yytranslate.
5137 * tests/torture.at (Big triangle): Push the limit from 124 to
5138 253.
5139 * tests/regression.at (Web2c Actions): Adjust.
5140
5141 2002-04-07 Akim Demaille <akim@epita.fr>
5142
5143 * tests/torture.at (Big triangle): New.
5144 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5145 * tests/existing.at: here.
5146
5147 2002-04-07 Akim Demaille <akim@epita.fr>
5148
5149 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5150 nritems.
5151 Adjust dependencies.
5152
5153 2002-04-07 Akim Demaille <akim@epita.fr>
5154
5155 * src/reader.c: Normalize increments to prefix form.
5156
5157 2002-04-07 Akim Demaille <akim@epita.fr>
5158
5159 * src/reader.c, symtab.c: Remove debugging code.
5160
5161 2002-04-07 Akim Demaille <akim@epita.fr>
5162
5163 Rename all the `bucket's as `symbol_t'.
5164
5165 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5166 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5167 * src/symtab.c, src/symtab.h (bucket): Rename as...
5168 (symbol_t): this.
5169 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5170 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5171 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5172 (buckets_new, buckets_free, buckets_do): Rename as...
5173 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5174 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5175 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5176 (symbols_new, symbols_free, symbols_do): these.
5177
5178 2002-04-07 Akim Demaille <akim@epita.fr>
5179
5180 Use lib/hash for the symbol table.
5181
5182 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5183 EOF.
5184 * src/lex.c (lex): Set the `number' member of new terminals.
5185 * src/reader.c (bucket_check_defined, bucket_make_alias)
5186 (bucket_check_alias_consistence, bucket_translation): New.
5187 (reader, grammar_free, readgram, token_translations_init)
5188 (packsymbols): Adjust.
5189 (reader): Number the predefined tokens.
5190 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5191 for predefined tokens.
5192 * src/symtab.h (bucket): Remove all the hash table related
5193 members.
5194 * src/symtab.c (symtab): Replace by...
5195 (bucket_table): this.
5196 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5197 (buckets_new, buckets_do): New.
5198
5199 2002-04-07 Akim Demaille <akim@epita.fr>
5200
5201 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5202 (start_symbol, max_user_token_number, semantic_parser)
5203 (error_token_number): Initialize.
5204 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5205 Initialize.
5206 (reader): Don't.
5207 (errtoken, eoftoken, undeftoken, axiom): Extern.
5208
5209 2002-04-07 Akim Demaille <akim@epita.fr>
5210
5211 * src/gram.h (rule_s): prec and precsym are now pointers
5212 to the bucket giving the priority/associativity.
5213 Member `associativity' removed: useless.
5214 * src/reduce.c, src/conflicts.c: Adjust.
5215
5216 2002-04-07 Akim Demaille <akim@epita.fr>
5217
5218 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5219 Properly escape the symbols' TAG when outputting them.
5220
5221 2002-04-07 Akim Demaille <akim@epita.fr>
5222
5223 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5224
5225 2002-04-07 Akim Demaille <akim@epita.fr>
5226
5227 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5228 (LArule): this, which is an array to rule_t*.
5229 * src/print.c, src/conflicts.c: Adjust.
5230
5231 2002-04-07 Akim Demaille <akim@epita.fr>
5232
5233 * src/gram.h (rule_t): Rename `number' as `user_number'.
5234 `number' is a new member.
5235 Adjust dependencies.
5236 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5237
5238 2002-04-07 Akim Demaille <akim@epita.fr>
5239
5240 As a result of the previous patch, it is no longer needed
5241 to reorder ritem itself.
5242
5243 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5244
5245 2002-04-07 Akim Demaille <akim@epita.fr>
5246
5247 Be sure never to walk through RITEMS, but use only data related to
5248 the rules themselves. RITEMS should be banished.
5249
5250 * src/output.c (output_token_translations): Rename as...
5251 (prepare_tokens): this.
5252 In addition to `translate', prepare the muscles `tname' and
5253 `toknum', which were handled by...
5254 (output_rule_data): this.
5255 Remove, and move the remainder of its outputs into...
5256 (prepare_rules): this new routines, which also merges content from
5257 (output_gram): this.
5258 (prepare_rules): Be sure never to walk through RITEMS.
5259 (output_stos): Rename as...
5260 (prepare_stos): this.
5261 (output): Always invoke prepare_states, after all, just don't use it
5262 in the output if you don't need it.
5263
5264 2002-04-07 Akim Demaille <akim@epita.fr>
5265
5266 * src/LR0.c (new_state): Display `nstates' as the name of the
5267 newly created state.
5268 Adjust to initialize first_state and last_state if needed.
5269 Be sure to distinguish the initial from the final state.
5270 (new_states): Create the itemset of the initial state, and use
5271 new_state.
5272 * src/closure.c (closure): Now that the initial state has its
5273 items properly set, there is no need for a special case when
5274 creating `ruleset'.
5275
5276 As a result, now the rule 0, reducing to $axiom, is visible in the
5277 outputs. Adjust the test suite.
5278
5279 * tests/conflicts.at (Solved SR Conflicts)
5280 (Unresolved SR Conflicts): Adjust.
5281 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5282 * tests/conflicts.at (S/R in initial): New.
5283
5284 2002-04-07 Akim Demaille <akim@epita.fr>
5285
5286 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5287 the RHS of the rules.
5288 * src/output.c (output_gram): Likewise.
5289
5290 2002-04-07 Akim Demaille <akim@epita.fr>
5291
5292 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5293 bucket.
5294 Adjust all dependencies.
5295 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5296 `number' of the buckets too.
5297 * src/gram.h: Include `symtab.h'.
5298 (associativity): Move to...
5299 * src/symtab.h: here.
5300 No longer include `gram.h'.
5301
5302 2002-04-07 Akim Demaille <akim@epita.fr>
5303
5304 * src/gram.h, src/gram.c (rules_rhs_length): New.
5305 (ritem_longest_rhs): Use it.
5306 * src/gram.h (rule_t): `number' is a new member.
5307 * src/reader.c (packgram): Set it.
5308 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5309 the end of `rules', and count them out of `nrules'.
5310 (reduce_output, dump_grammar): Adjust.
5311 * src/print.c (print_grammar): It is no longer needed to check for
5312 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5313 * tests/reduce.at (Reduced Automaton): New test.
5314
5315 2002-04-07 Akim Demaille <akim@epita.fr>
5316
5317 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5318 lacking `+ 1' to nrules, Bison reported as useless a token if it
5319 was used solely to set the precedence of the last rule...
5320
5321 2002-04-07 Akim Demaille <akim@epita.fr>
5322
5323 * data/bison.c++, data/bison.simple: Don't output the current file
5324 name in #line, to avoid useless diffs between two identical
5325 outputs under different names.
5326
5327 2002-04-07 Akim Demaille <akim@epita.fr>
5328
5329 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5330 Normalize loops to using `< nrules + 1', not `<= nrules'.
5331
5332 2002-04-07 Akim Demaille <akim@epita.fr>
5333
5334 * TODO: Update.
5335
5336 2002-04-07 Akim Demaille <akim@epita.fr>
5337
5338 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5339 bucket.value as bucket.number.
5340
5341 2002-04-07 Akim Demaille <akim@epita.fr>
5342
5343 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5344 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5345 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5346 RHS, instead of being an index in RITEMS.
5347
5348 2002-04-04 Paul Eggert <eggert@twinsun.com>
5349
5350 * doc/bison.texinfo: Update copyright date.
5351 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5352 (Symbols): Warn about running Bison in one character set,
5353 but compiling and/or running in an incompatible one.
5354 Warn about character code 256, too.
5355
5356 2002-04-03 Paul Eggert <eggert@twinsun.com>
5357
5358 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5359 YYERROR_VERBOSE is nonzero, not whether it is defined.
5360
5361 Merge changes from bison-1_29-branch.
5362
5363 2002-03-20 Paul Eggert <eggert@twinsun.com>
5364
5365 Merge fixes from Debian bison_1.34-1.diff.
5366
5367 * configure.in (AC_PREREQ): 2.53.
5368
5369 2002-03-20 Akim Demaille <akim@epita.fr>
5370
5371 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5372
5373 2002-03-19 Paul Eggert <eggert@twinsun.com>
5374
5375 * src/bison.simple (YYCOPY): New macro.
5376 (YYSTACK_RELOCATE): Use it.
5377 Remove Type arg; no longer needed. All callers changed.
5378 (yymemcpy): Remove; no longer needed.
5379
5380 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5381 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5382
5383 2002-03-19 Akim Demaille <akim@epita.fr>
5384
5385 Test and fix the #line outputs.
5386
5387 * tests/atlocal.at (GCC): New.
5388 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5389 (Prologue synch line, ,%union synch line, Postprologue synch line)
5390 (Action synch line, Epilogue synch line): New tests.
5391 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5392 * data/bison.simple, data/bison.c++: Use it.
5393
5394 2002-03-19 Akim Demaille <akim@epita.fr>
5395
5396 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5397 (Solved SR Conflicts, %expect not enough, %expect right)
5398 (%expect too much): Move to...
5399 * tests/conflicts.at: this new file.
5400
5401 2002-03-19 Akim Demaille <akim@epita.fr>
5402
5403 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5404 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5405 that we can move to enums for instance.
5406 * src/output.c (token_definitions_output): Output a list of
5407 `token-name, token-number' instead of the #define.
5408 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5409
5410 2002-03-14 Akim Demaille <akim@epita.fr>
5411
5412 Use Gettext 0.11.1.
5413
5414 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5415
5416 * data/bison.c++: Make the user able to add members to the generated
5417 parser by subclassing.
5418
5419 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5420
5421 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5422 a character.
5423 Reported by Nicolas Tisserand and Nicolas Burrus.
5424
5425 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5426
5427 * src/reader.c: Warn about lacking semi-colons, do not complain.
5428
5429 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5430
5431 * data/bison.c++: Remove a debug line.
5432
5433 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5434
5435 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5436 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5437 provide a default implementation.
5438
5439 2002-03-04 Akim Demaille <akim@epita.fr>
5440
5441 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5442 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5443 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5444 * tests/semantic.at (Parsing Guards): Similarly.
5445 * src/reader.at (readgram): Complain if the last rule is not ended
5446 with a semi-colon.
5447
5448 2002-03-04 Akim Demaille <akim@epita.fr>
5449
5450 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5451 * src/closure.c: here.
5452 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5453 RTC.
5454 * src/warshall.h, src/warshall.c: Remove.
5455 * tests/sets.at (Broken Closure): Adjust.
5456
5457 2002-03-04 Akim Demaille <akim@epita.fr>
5458
5459 * src/output.c (output_skeleton): tempdir is const.
5460 bytes_read is unused.
5461
5462 2002-03-04 Akim Demaille <akim@epita.fr>
5463
5464 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5465 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5466 Update.
5467 From Michael Hayes.
5468
5469 2002-03-04 Akim Demaille <akim@epita.fr>
5470
5471 * src/closure.c (closure): `r' is unused.
5472
5473 2002-03-04 Akim Demaille <akim@epita.fr>
5474
5475 * tests/sets.at (Broken Closure): Add the ending `;'.
5476 * src/reader.at (readgram): Complain if a rule is not ended with a
5477 semi-colon.
5478
5479 2002-03-04 Akim Demaille <akim@epita.fr>
5480
5481 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5482 (count_sr_conflicts): Use bitset_count.
5483 * src/reduce.c (inaccessable_symbols): Ditto.
5484 (bits_size): Remove.
5485 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5486
5487 2002-03-04 Akim Demaille <akim@epita.fr>
5488
5489 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5490 * src/reduce.c: Remove the `bitset_zero's following the
5491 `bitset_create's, as now it is performed by the latter.
5492
5493 2002-03-04 Akim Demaille <akim@epita.fr>
5494
5495 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5496 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5497 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5498 latest sources from Michael.
5499
5500 2002-03-04 Akim Demaille <akim@epita.fr>
5501
5502 * src/output.c (output): Don't free the grammar.
5503 * src/reader.c (grammar_free): New.
5504 * src/main.c (main): Call it and don't free symtab here.
5505
5506 2002-03-04 Akim Demaille <akim@epita.fr>
5507
5508 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5509 before returning.
5510 Reported by Benoit Perrot.
5511
5512 2002-03-04 Akim Demaille <akim@epita.fr>
5513
5514 Use bitset operations when possible, not loops over bits.
5515
5516 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5517 bitset_or.
5518 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5519 * src/reduce.c (useless_nonterminals): Formatting changes.
5520 * src/warshall.c (TC): Use bitset_or.
5521
5522 2002-03-04 Akim Demaille <akim@epita.fr>
5523
5524 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5525 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5526 Ditto.
5527
5528 2002-03-04 Akim Demaille <akim@epita.fr>
5529
5530 * src/lalr.c (F): Now a bitset*.
5531 Adjust all dependencies.
5532
5533 2002-03-04 Akim Demaille <akim@epita.fr>
5534
5535 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5536 Adjust all dependencies.
5537
5538 2002-03-04 Akim Demaille <akim@epita.fr>
5539
5540 * src/L0.c, src/LR0.h (nstates): Be size_t.
5541 Adjust comparisons (signed vs unsigned).
5542 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5543 bitset*.
5544 Adjust all dependencies.
5545
5546 2002-03-04 Akim Demaille <akim@epita.fr>
5547
5548 * src/closure.c (firsts): Now, also a bitset.
5549 Adjust all dependencies.
5550 (varsetsize): Remove, now unused.
5551 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5552
5553 2002-03-04 Akim Demaille <akim@epita.fr>
5554
5555 * src/print.c: Convert to use bitset.h, not hand coded iterations
5556 over ints.
5557
5558 2002-03-04 Akim Demaille <akim@epita.fr>
5559
5560 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5561
5562 2002-03-04 Akim Demaille <akim@epita.fr>
5563
5564 * src/closure.c (ruleset): Be a bitset.
5565 (rulesetsize): Remove.
5566
5567 2002-03-04 Akim Demaille <akim@epita.fr>
5568
5569 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5570 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5571 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5572 * src/closure.c (fderives): Be an array of bitsets.
5573
5574 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5575
5576 * data/bison.c++: Merge the two generated headers. Insert a copyright
5577 notice in each output file.
5578
5579 2002-02-28 Akim Demaille <akim@epita.fr>
5580
5581 * data/bison.c++: Copy the prologue of bison.simple to fetch
5582 useful M4 definitions, such as b4_header_guard.
5583
5584 2002-02-25 Akim Demaille <akim@epita.fr>
5585
5586 * src/getargs.c (version): Give the name of the authors, and use a
5587 translator friendly scheme for the bgr
5588 copyright notice.
5589
5590 2002-02-25 Akim Demaille <akim@epita.fr>
5591
5592 * src/output.c (header_output): Remove, now handled completely via
5593 M4.
5594
5595 2002-02-25 Akim Demaille <akim@epita.fr>
5596
5597 * m4/m4.m4: New, from CVS Autoconf.
5598 * configure.in: Invoke it.
5599 * src/output.c (output_skeleton): Use its result instead of the
5600 hard coded name.
5601
5602 2002-02-25 Akim Demaille <akim@epita.fr>
5603
5604 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5605 Fileutils 4.1.5.
5606 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5607 * src/output.c (output_skeleton): Use mkstemp to create a real
5608 temporary file.
5609 Move the filling of `skeleton' and its muscle to...
5610 (prepare): here.
5611 (output): Move the definition of the prologue muscle to...
5612 (prepare): here.
5613 * src/system.h (DEFAULT_TMPDIR): New.
5614
5615 2002-02-14 Paul Eggert <eggert@twinsun.com>
5616
5617 Remove the support for C++ namespace cleanliness; it was
5618 causing more problems than it was curing, since it didn't work
5619 properly on some nonstandard C++ compilers. This can wait
5620 for a proper C++ parser.
5621
5622 * NEWS: Document this.
5623 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5624 of C++, as it's treated like C now.
5625 * src/bison.simple (YYSTD): Remove.
5626 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5627 Treat C++ just like Standard C instead of trying to support
5628 namespace cleanliness.
5629
5630 2002-02-14 Akim Demaille <akim@epita.fr>
5631
5632 * tests/regression.at (else): Adjust to Andreas' change.
5633
5634 2002-02-14 Akim Demaille <akim@epita.fr>
5635
5636 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5637
5638 2002-02-13 Andreas Schwab <schwab@suse.de>
5639
5640 * src/output.c (output_rule_data): Don't output NULL, it might
5641 not be defined yet.
5642
5643 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5644
5645 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5646 (Copyright notice): Update.
5647
5648 2002-02-11 Akim Demaille <akim@epita.fr>
5649
5650 * tests/regression.at (%nonassoc and eof): Don't include
5651 nonportable headers.
5652
5653 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5654
5655 * data/bison.c++: Correct error recovery. Make the user able to
5656 initialize the starting location.
5657
5658 2002-02-07 Akim Demaille <akim@epita.fr>
5659
5660 * tests/input.at: New.
5661
5662 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5663
5664 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5665 more consistent when naming methods and variables. Put preprocessor
5666 directives around tables only needed for debugging.
5667
5668 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5669
5670 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5671 C++ parsers.
5672 (yy::b4_name::parse): Use print_.
5673
5674 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5675
5676 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5677
5678 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5679
5680 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5681 C++ parsers.
5682 (yy::b4_name::parse): Build verbose error messages, and use error_.
5683
5684 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5685
5686 * data/bison.c++: Fix m4 quoting in comments.
5687
5688 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5689
5690 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5691 not expanded by m4.
5692
5693 2002-02-05 Akim Demaille <akim@epita.fr>
5694
5695 * data/bison.c++: Adjust to the M4 back end.
5696 More is certainly needed.
5697
5698 2002-02-05 Akim Demaille <akim@epita.fr>
5699
5700 Give a try to M4 as a back end.
5701
5702 * lib/readpipe.c: New, from wdiff.
5703 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5704 BISON_HAIRY.
5705 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5706 specific values. Now it is m4 that performs the lookup.
5707 * src/parse-skel.y: Remove.
5708 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5709 * src/output.c (actions_output, guards_output)
5710 (token_definitions_output): No longer keeps track of the output
5711 line number, hence remove the second argument.
5712 (guards_output): Check against the guard member of a rule, not the
5713 action member.
5714 Adjust callers.
5715 (output_skeleton): Don't look for the skeleton location, let m4 do
5716 that.
5717 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5718 file will be used.
5719 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5720 (prepare): Given that for the time being changesyntax is not
5721 usable in M4, rename the muscles using `-' to `_'.
5722 Define `defines_flag', `output_parser_name' and `output_header_name'.
5723 * src/output.h (actions_output, guards_output)
5724 (token_definitions_output): Adjust prototypes.
5725 * src/scan-skel.l: Instead of scanning the skeletons, it now
5726 processes the output of m4: `__oline__' and `#output'.
5727 * data/bison.simple: Adjust to be used by M4(sugar).
5728 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5729 to date.
5730 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5731 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5732 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5733 shamelessly stolen from CVS Autoconf.
5734
5735 2002-02-05 Akim Demaille <akim@epita.fr>
5736
5737 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5738 * configure.in: Check for the declarations of free and malloc.
5739 * src/muscle_tab.c: Adjust.
5740
5741 2002-02-05 Akim Demaille <akim@epita.fr>
5742
5743 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5744 which have no values.
5745
5746 2002-02-05 Akim Demaille <akim@epita.fr>
5747
5748 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5749 * data/: here.
5750
5751 2002-01-29 Paul Eggert <eggert@twinsun.com>
5752
5753 * src/bison.simple (YYSIZE_T): Do not define merely because
5754 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5755 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5756
5757 2002-01-27 Akim Demaille <akim@epita.fr>
5758
5759 Fix `%nonassoc and eof'.
5760
5761 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5762 which were not properly copied! Replace
5763 memcpy (res->errs, src->errs, src->nerrs);
5764 with
5765 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5766 !!!
5767 * tests/regression.at (%nonassoc and eof): Adjust to newest
5768 Autotest: `.' is not in the PATH.
5769
5770 2002-01-27 Akim Demaille <akim@epita.fr>
5771
5772 * tests/sets.at (AT_EXTRACT_SETS): New.
5773 (Nullable): Use it.
5774 (Firsts): New.
5775
5776 2002-01-26 Akim Demaille <akim@epita.fr>
5777
5778 * tests/actions.at, tests/calc.at, tests/headers.at,
5779 * tests/torture.at: Adjust to the newest Autotest which no longer
5780 forces `.' in the PATH.
5781
5782 2002-01-25 Akim Demaille <akim@epita.fr>
5783
5784 * tests/regression.at (%nonassoc and eof): New.
5785 Suggested by Robert Anisko.
5786
5787 2002-01-24 Akim Demaille <akim@epita.fr>
5788
5789 Bison dumps core when trying to complain about broken input files.
5790 Reported by Cris van Pelt.
5791
5792 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5793 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5794 into...
5795 (Invalid inputs): Strengthen: exercise parse_percent_token.
5796
5797 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5798
5799 * src/Makefile.am: Add bison.c++.
5800 * src/bison.c++: New skeleton.
5801
5802 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5803
5804 * po/it.po: New.
5805
5806 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5807
5808 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5809
5810 2002-01-20 Marc Autret <marc@gnu.org>
5811
5812 * src/files.c (compute_output_file_names): Fix
5813
5814 2002-01-20 Marc Autret <marc@gnu.org>
5815
5816 * tests/output.at: New test.
5817 * src/files.c (compute_base_names): Don't map extensions when
5818 the YACC flag is set, use defaults.
5819 Reported by Evgeny Stambulchik.
5820
5821 2002-01-20 Marc Autret <marc@gnu.org>
5822
5823 * src/system.h: Need to define __attribute__ away for non-GCC
5824 compilers as well (i.e. the vendor C compiler).
5825 Suggested by Albert Chin-A-Young.
5826
5827 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5828
5829 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5830 canonical definition.
5831 * src/system.h: Use the canonical definition for PARAMS (avoids
5832 a conflict with the macro from lib/hash.h).
5833
5834 2002-01-11 Akim Demaille <akim@epita.fr>
5835
5836 * configure.in: Use AC_FUNC_STRNLEN.
5837 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5838
5839 2002-01-09 Akim Demaille <akim@epita.fr>
5840
5841 * src/files.c, src/files.h (output_infix): New.
5842 (tab_extension): Remove.
5843 (compute_base_names): Compute the former, drop the latter.
5844 * src/output.c (prepare): Insert the muscles `output-infix', and
5845 `output-suffix'.
5846 * src/parse-skel.y (string, string.1): New.
5847 (section.header): Use it.
5848 (section.yacc): Remove.
5849 (prefix): Remove too.
5850 * src/scan-skel.l: Adjust.
5851 * src/bison.simple, src/bison.hairy: Adjust.
5852
5853 2002-01-09 Akim Demaille <akim@epita.fr>
5854
5855 * configure.in (WERROR_CFLAGS): Compute it.
5856 * src/Makefile.am (CFLAGS): Pass it.
5857 * tests/atlocal.in (CFLAGS): Idem.
5858 * src/files.c: Fix a few warnings.
5859 (get_extension_index): Remove, unused.
5860
5861 2002-01-08 Akim Demaille <akim@epita.fr>
5862
5863 * src/getargs.c (AS_FILE_NAME): New.
5864 (getargs): Use it to convert DOSish file names.
5865 * src/files.c (base_name): Rename as full_base_name to avoid
5866 clashes with `base_name ()'.
5867 (filename_split): New.
5868 (compute_base_names): N-th rewrite, using filename_split.
5869
5870 2002-01-08 Akim Demaille <akim@epita.fr>
5871
5872 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5873 New, stolen from the Fileutils 4.1.
5874 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5875 * configure.in: Check for the presence of memrchr, and of its
5876 prototype.
5877
5878 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5879
5880 * lib/hash.h (__P): Added definition for this macro.
5881 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5882 BUILT_SOURCES, to ensure they are generated first.
5883 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5884 %error-verbose to allow bootstrapping with bison 1.30x.
5885
5886 2002-01-06 Akim Demaille <akim@epita.fr>
5887
5888 * src/reader.c (parse_braces): Don't fetch the next char, the
5889 convention is to fetch on entry.
5890 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5891 'switch' without a following semicolon.
5892 * tests/regression.at (braces parsing): New.
5893
5894 2002-01-06 Akim Demaille <akim@epita.fr>
5895
5896 Bison is dead wrong in its RR conflict reports.
5897
5898 * tests/torture.at (GNU Cim Grammar): New.
5899 * src/conflicts.c (count_rr_conflicts): Fix.
5900
5901 2002-01-06 Akim Demaille <akim@epita.fr>
5902
5903 Creating package.m4 from configure.ac causes too many problems.
5904
5905 * tests/Makefile.am (package.m4): Create it by hand,
5906 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5907
5908 2002-01-06 Akim Demaille <akim@epita.fr>
5909
5910 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5911 skeleton.h.
5912
5913 2002-01-04 Paul Eggert <eggert@twinsun.com>
5914
5915 * doc/bison.texinfo (Debugging):
5916 Remove YYSTDERR; it's no longer defined or used.
5917 Also, s/cstdio.h/cstdio/.
5918
5919 2002-01-03 Akim Demaille <akim@epita.fr>
5920
5921 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5922
5923 2002-01-03 Akim Demaille <akim@epita.fr>
5924
5925 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5926 tracing code to --trace, wait for a better --trace option, with
5927 args.
5928
5929 2002-01-03 Akim Demaille <akim@epita.fr>
5930
5931 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5932 The ISO C++ standard is extremely clear about it: stderr is
5933 considered a macro, not a regular symbol (see table 94 `Header
5934 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5935 Therefore std:: does not apply to it. It still does with fprintf.
5936 Also, s/cstdio.h/cstdio/.
5937
5938 2002-01-03 Akim Demaille <akim@epita.fr>
5939
5940 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5941 for non system headers.
5942
5943 2002-01-02 Akim Demaille <akim@epita.fr>
5944
5945 Equip the skeleton chain with location tracking, runtime trace,
5946 pure parser and scanner.
5947
5948 * src/parse-skel.y: Request a pure parser, locations, and prefix
5949 renaming.
5950 (%union): Having several members with the same type does not help
5951 type mismatches, simplify.
5952 (YYPRINT, yyprint): New.
5953 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5954 (skel_error): this.
5955 Handle locations.
5956 * src/scan-skel.l: Adjust to these changes.
5957 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5958 (LOCATION_PRINT, skel_control_t): New.
5959
5960 2001-12-30 Akim Demaille <akim@epita.fr>
5961
5962 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5963 replace `gb' with BLANKS.
5964 * src/scan-skel.l: Adjust.
5965
5966 2001-12-30 Akim Demaille <akim@epita.fr>
5967
5968 * src/system.h: We don't need nor want bcopy.
5969 Throw away MS-DOS crap: we don't need getpid.
5970 * configure.in: We don't need strndup. It was even causing
5971 problems: because Flex includes the headers *before* us,
5972 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5973 not visible.
5974 * lib/xstrndup.c: New.
5975 * src/scan-skel.l: Use it.
5976 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5977 * src/parse-skel.y: Use %directives instead of #defines.
5978
5979 2001-12-30 Akim Demaille <akim@epita.fr>
5980
5981 * src/skeleton.h: New.
5982 * src/output.c (output_parser, output_master_parser): Remove, dead
5983 code.
5984 * src/output.h (get_lines_number, actions_output, guards_output)
5985 (token_definitions_output): Prototype them.
5986 * src/parse-skel.y: Add the license notice.
5987 Include output.h and skeleton.h.
5988 (process_skeleton): Returns void, and takes a single parameter.
5989 * src/scan-skel.l: Add the license notice.
5990 Include skeleton.h.
5991 Don't use %option yylineno: it seems that then Flex imagines
5992 REJECT has been used, and therefore it won't reallocate its
5993 buffers (which makes no other sense to me than a bug). It results
5994 in warnings for `unused: yy_flex_realloc'.
5995
5996 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5997
5998 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5999 (MUSCLE_INSERT_PREFIX): ...to there.
6000 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6001 (MUSCLE_INSERT_PREFIX): Move from here...
6002
6003 * src/bison.hairy: Add a section directive. Put braces around muscle
6004 names. This parser skeleton is still broken, but Bison should not
6005 choke on a bad muscle 'syntax'.
6006 * src/bison.simple: Add a section directive. Put braces around muscle
6007 names.
6008
6009 * src/files.h (strsuffix, stringappend): Add declarations.
6010 (tab_extension): Add declaration.
6011 (short_base_name): Add declaration.
6012
6013 * src/files.c (strsuffix, stringappend): No longer static. These
6014 functions are used in the skeleton parser.
6015 (tab_extension): New.
6016 (compute_base_names): Use the computations done in this function
6017 to guess if the generated parsers should have '.tab' in their
6018 names.
6019 (short_base_name): No longer static.
6020
6021 * src/output.c (output_skeleton): New.
6022 (output): Disable call to output_master_parser, and give a try to
6023 a new skeleton handling system.
6024 (guards_output, actions_output): No longer static.
6025 (token_definitions_output, get_lines_number): No longer static.
6026
6027 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6028
6029 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6030 parse-skel.y.
6031
6032 * src/parse-skel.y: New file.
6033 * src/scan-skel.l: New file.
6034
6035 2001-12-29 Akim Demaille <akim@epita.fr>
6036
6037 %name-prefix is broken.
6038
6039 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6040 Adjust all dependencies.
6041 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6042 %name-prefix.
6043
6044 Renaming yylval but not yylloc is not consistent. Now we do.
6045
6046 * src/bison.simple: Prefix yylloc if used.
6047 * doc/bison.texinfo (Decl Summary): Document that.
6048
6049 2001-12-29 Akim Demaille <akim@epita.fr>
6050
6051 * doc/bison.texinfo: Promote `%long-directive' over
6052 `%long_directive'.
6053 Remove all references to fixed-output-files, yacc is enough.
6054
6055 2001-12-29 Akim Demaille <akim@epita.fr>
6056
6057 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6058 user prologue. These are defaults.
6059 * tests/actions.at (Mid-rule actions): Make sure the user can
6060 define YYDEBUG and YYERROR_VERBOSE.
6061
6062 2001-12-29 Akim Demaille <akim@epita.fr>
6063
6064 * src/output.c (header_output): Don't forget to export YYLTYPE and
6065 yylloc.
6066 * tests/headers.at (export YYLTYPE): New, make sure it does.
6067 * tests/regression.at (%union and --defines, Invalid CPP headers):
6068 Move to...
6069 * tests/headers.at: here.
6070
6071 2001-12-29 Akim Demaille <akim@epita.fr>
6072
6073 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6074
6075 2001-12-29 Akim Demaille <akim@epita.fr>
6076
6077 * tests/actions.at (Mid-rule actions): Output on a single line
6078 instead of several.
6079
6080 2001-12-29 Akim Demaille <akim@epita.fr>
6081
6082 * doc/bison.texinfo: Formatting changes.
6083
6084 2001-12-29 Akim Demaille <akim@epita.fr>
6085
6086 Don't store the token defs in a muscle, just be ready to output it
6087 on command. Now possible via `symbols'. Fixes a memory leak.
6088
6089 * src/output.c (token_definitions_output): New.
6090 (output_parser, header_output): Use it.
6091 * src/reader.c (symbols_save): Remove.
6092
6093 2001-12-29 Akim Demaille <akim@epita.fr>
6094
6095 * src/bison.simple: Do not provide a default for YYSTYPE and
6096 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6097 default.
6098
6099 2001-12-29 Akim Demaille <akim@epita.fr>
6100
6101 Mid-rule actions are simply... ignored!
6102
6103 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6104 the empty-rule associated to the dummy symbol, not to the host
6105 rule.
6106 * tests/actions.at (Mid-rule actions): New.
6107
6108 2001-12-29 Akim Demaille <akim@epita.fr>
6109
6110 Memory leak.
6111
6112 * src/reader.c (reader): Free grammar.
6113
6114 2001-12-29 Akim Demaille <akim@epita.fr>
6115
6116 Memory leak.
6117
6118 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6119 since it allocates it for each state, although only one is needed.
6120 (allocate_storage): Do it here.
6121
6122 2001-12-29 Akim Demaille <akim@epita.fr>
6123
6124 * src/options.h, src/options.c (create_long_option_table): Rename
6125 as...
6126 (long_option_table_new): this, with a clearer prototype.
6127 (percent_table): Remove, unused,
6128 * src/getargs.c (getargs): Adjust.
6129
6130 2001-12-29 Akim Demaille <akim@epita.fr>
6131
6132 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6133 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6134 as states.
6135
6136 2001-12-29 Akim Demaille <akim@epita.fr>
6137
6138 * src/lalr.c (build_relations): Rename `states' as `states1'.
6139 Sorry, I don't understand exactly what it is, no better name...
6140
6141 2001-12-29 Akim Demaille <akim@epita.fr>
6142
6143 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6144 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6145 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6146 as rules.
6147
6148 2001-12-29 Akim Demaille <akim@epita.fr>
6149
6150 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6151 ago.
6152
6153 2001-12-29 Akim Demaille <akim@epita.fr>
6154
6155 * src/reader.c, src/reader.h (user_toknums): Remove.
6156 Adjust all users to use symbols[i]->user_token_number.
6157
6158 2001-12-29 Akim Demaille <akim@epita.fr>
6159
6160 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6161 Adjust all users to use symbols[i]->prec or ->assoc.
6162
6163 2001-12-29 Akim Demaille <akim@epita.fr>
6164
6165 * src/reader.c, src/reader.h (tags): Remove.
6166 Adjust all users to use symbols[i]->tag.
6167
6168 2001-12-29 Akim Demaille <akim@epita.fr>
6169
6170 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6171 and rule_table.
6172 * src/reader.c (packsymbols): Fill this table.
6173 Drop sprec.
6174 * src/conflicts.c (resolve_sr_conflict): Adjust.
6175 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6176 single table.
6177 Use symbols[i]->tag instead of tags[i].
6178
6179 2001-12-29 Akim Demaille <akim@epita.fr>
6180
6181 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6182 In addition, put a comment in there, to replace...
6183 * tests/regression.at (%union and C comments): Remove.
6184
6185 2001-12-29 Akim Demaille <akim@epita.fr>
6186
6187 * tests/regression.at (Web2c Actions): Blindly move the actual
6188 output as expected output. The contents *seem* right to me, but I
6189 can't pretend reading perfectly parser tables... Nonetheless, all
6190 the other tests pass correctly, the table look OK, even though the
6191 presence of `$axiom' is to be noted: AFAICS it is useless (but
6192 harmless).
6193
6194 2001-12-29 Akim Demaille <akim@epita.fr>
6195
6196 * src/reader.c (readgram): Don't add the rule 0 if there were no
6197 rules read. In other words, add it _after_ having performed
6198 grammar sanity checks.
6199 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6200
6201 2001-12-29 Akim Demaille <akim@epita.fr>
6202
6203 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6204 visible, and some states have now a different number.
6205
6206 2001-12-29 Akim Demaille <akim@epita.fr>
6207
6208 * src/reader.c (readgram): Bind the initial rule's lineno to that
6209 of the first rule.
6210 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6211 (Solved SR Conflicts): Adjust rule 0's line number.
6212
6213 2001-12-29 Akim Demaille <akim@epita.fr>
6214
6215 Fix the `GAWK Grammar' failure.
6216
6217 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6218 the reductions of the first state which was mistakenly confused
6219 with the final state because precisely final_state was initialized
6220 to 0.
6221 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6222 now noticed by Bison.
6223 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6224 have a reduction on $default.
6225
6226 2001-12-29 Akim Demaille <akim@epita.fr>
6227
6228 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6229 rule line numbers.
6230 * src/closure.c (print_closure): Likewise.
6231 * src/derives.c (print_derives): Likewise.
6232 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6233 now.
6234
6235 2001-12-29 Akim Demaille <akim@epita.fr>
6236
6237 * src/lalr.c (lookaheads_print): New.
6238 (lalr): Call it when --trace-flag.
6239 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6240 are dumped.
6241
6242 2001-12-29 Akim Demaille <akim@epita.fr>
6243
6244 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6245 when walking through ritem, even via rule->rhs.
6246 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6247 (useful_production, useless_nonterminals): Likewise.
6248 (reduce_grammar_tables): Likewise, plus update nritems.
6249 * src/nullable.c (set_nullable): Likewise.
6250 * src/lalr.c (build_relations): Likewise.
6251 * tests/sets.at (Nullable): Adjust.
6252 Fortunately, now, the $axiom is no longer nullable.
6253
6254 2001-12-29 Akim Demaille <akim@epita.fr>
6255
6256 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6257 the 0-sentinel.
6258 * src/gram.c (ritem_longest_rhs): Likewise.
6259 * src/reduce.c (nonterminals_reduce): Likewise.
6260 * src/print_graph.c (print_graph): Likewise.
6261 * src/output.c (output_rule_data): Likewise.
6262 * src/nullable.c (set_nullable): Likewise.
6263
6264 2001-12-29 Akim Demaille <akim@epita.fr>
6265
6266 * src/output.c: Comment changes.
6267
6268 2001-12-27 Paul Eggert <eggert@twinsun.com>
6269
6270 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6271 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6272 Sparc, as they were causing more porting problems than the
6273 (minor) performance improvement was worth.
6274
6275 Also, catch up with 1.31's YYSTD.
6276
6277 2001-12-27 Akim Demaille <akim@epita.fr>
6278
6279 * src/output.c (output_gram): Rely on nritems, not the
6280 0-sentinel. See below.
6281 Use -1 as separator, not 0.
6282 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6283 Rely on -1 as separator in yyrhs, instead of 0.
6284 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6285 twice `Now at end of input', therefore there are two lines less to
6286 expect.
6287
6288 2001-12-27 Akim Demaille <akim@epita.fr>
6289
6290 * tests/regression.at (Unresolved SR Conflicts):
6291 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6292 below.
6293
6294 2001-12-27 Akim Demaille <akim@epita.fr>
6295
6296 * src/LR0.c (new_state): Recognize the final state by the fact it
6297 is reached by eoftoken.
6298 (insert_start_shifting_state, insert_eof_shifting_state)
6299 (insert_accepting_state, augment_automaton): Remove, since now
6300 these states are automatically computed from the initial state.
6301 (generate_states): Adjust.
6302 * src/print.c: When reporting a rule number to the user, substract
6303 1, so that the axiom rule is rule 0, and the first user rule is 1.
6304 * src/reduce.c: Likewise.
6305 * src/print_graph.c (print_core): For the time being, just as for
6306 the report, depend upon --trace-flags to dump the full set of
6307 items.
6308 * src/reader.c (readgram): Once the grammar read, insert the rule
6309 0: `$axiom: START-SYMBOL $'.
6310 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6311 number of the states has changed (the final state is no longer
6312 necessarily the last), catch up.
6313
6314 2001-12-27 Akim Demaille <akim@epita.fr>
6315
6316 Try to make the use of the eoftoken valid. Given that its value
6317 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6318 is used instead of > 0 where appropriate, (ii), depend upon nritems
6319 instead of the 0-sentinel.
6320
6321 * src/gram.h, src/gram.c (nritems): New.
6322 Expected to be duplication of nitems, but for the time being...
6323 * src/reader.c (packgram): Assert nritems and nitems are equal.
6324 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6325 * src/closure.c (print_closure, print_fderives): Likewise.
6326 * src/gram.c (ritem_print): Likewise.
6327 * src/print.c (print_core, print_grammar): Likewise.
6328 * src/print_graph.c: Likewise.
6329
6330 2001-12-27 Akim Demaille <akim@epita.fr>
6331
6332 * src/main.c (main): If there are complains after grammar
6333 reductions, then output the report anyway if requested, then die.
6334 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6335 * src/reader.c (eoftoken): New.
6336 (parse_token_decl): If the token being defined has value `0', it
6337 is the eoftoken.
6338 (packsymbols): No longer hack `tags' to insert `$' by hand.
6339 Be sure to preserve the value of the eoftoken.
6340 (reader): Make sure eoftoken is defined.
6341 Initialize nsyms to 0: now eoftoken is created just like the others.
6342 * src/print.c (print_grammar): Don't special case the eof token.
6343 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6344 lie anyway, albeit pleasant.
6345 * tests/calc.at: Exercise error messages with eoftoken.
6346 Change the grammar so that empty input is invalid.
6347 Adjust expectations.
6348 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6349
6350 2001-12-27 Akim Demaille <akim@epita.fr>
6351
6352 * configure.in: Check the protos of strchr ans strspn.
6353 Replace strchr if needed.
6354 * src/system.h: Provide the protos of strchr, strspn and memchr if
6355 missing.
6356 * lib/strchr.c: New.
6357 * src/reader.c (symbols_save): Use strchr.
6358
6359 2001-12-27 Akim Demaille <akim@epita.fr>
6360
6361 * src/print.c, src/print_graph.c (escape): New.
6362 Use it to quote the TAGS outputs.
6363 * src/print_graph.c (print_state): Now errors are in red, and
6364 reductions in green.
6365 Prefer high to wide: output the state number on a line of its own.
6366
6367 2001-12-27 Akim Demaille <akim@epita.fr>
6368
6369 * src/state.h, src/state.c (reductions_new): New.
6370 * src/LR0.c (set_state_table): Let all the states have a
6371 `reductions', even if reduced to 0.
6372 (save_reductions): Adjust.
6373 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6374 * src/print.c (print_reductions, print_actions): Adjust.
6375 * src/output.c (action_row): Adjust.
6376
6377 2001-12-27 Akim Demaille <akim@epita.fr>
6378
6379 * src/state.h, src/state.c (errs_new, errs_dup): New.
6380 * src/LR0.c (set_state_table): Let all the states have an errs,
6381 even if reduced to 0.
6382 * src/print.c (print_errs, print_reductions): Adjust.
6383 * src/output.c (output_actions, action_row): Adjust.
6384 * src/conflicts.c (resolve_sr_conflict): Adjust.
6385
6386 2001-12-27 Akim Demaille <akim@epita.fr>
6387
6388 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6389
6390 2001-12-27 Akim Demaille <akim@epita.fr>
6391
6392 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6393 * src/print.c: here.
6394 (lookaheadset, shiftset): New, used as additional storage by
6395 print_reductions.
6396 (print_results): Adjust.
6397 (print_shifts, print_gotos, print_errs): New, extracted from...
6398 (print_actions): here.
6399 * src/print_graph.c (print_actions): Remove dead code.
6400
6401 2001-12-27 Akim Demaille <akim@epita.fr>
6402
6403 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6404 `$n' and `@n'.
6405
6406 2001-12-27 Akim Demaille <akim@epita.fr>
6407
6408 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6409 (build_relations): Adjust.
6410
6411 2001-12-27 Akim Demaille <akim@epita.fr>
6412
6413 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6414 duplication.
6415
6416 2001-12-27 Akim Demaille <akim@epita.fr>
6417
6418 * src/reader.c (packgram): Catch nitems overflows.
6419
6420 2001-12-27 Akim Demaille <akim@epita.fr>
6421
6422 * src/files.c, src/files.h (guard_obstack): Remove.
6423 * src/output.c (output): Adjust.
6424 * src/reader.c (parse_braces): New, factoring...
6425 (copy_action, copy_guard): these two which are renamed as...
6426 (parse_action, parse_guard): these.
6427 As a voluntary consequence, using braces around guards is now
6428 mandatory.
6429
6430 2001-12-27 Akim Demaille <akim@epita.fr>
6431
6432 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6433 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6434 members.
6435 (symbol_list_new): Adjust.
6436 (copy_action): action_line is the first line, not the last.
6437 (copy_guard): Just as for actions, store the `action' only, not
6438 the switch/case/break flesh.
6439 Don't parse the user action that might follow the guard, let...
6440 (readgram): do it, i.e., now, there can be an action after a
6441 guard.
6442 In other words the guard is just explicitly optional.
6443 (packgram): Adjust.
6444 * src/output.c (guards_output): New.
6445 (output_parser): Call it when needed.
6446 (output): Also free the guard and attrs obstacks.
6447 * src/files.c, src/files.h (obstack_save): Remove.
6448 (output_files): Remove.
6449 As a result, if one needs the former `.act' file, using an
6450 appropriate skeleton which requires actions and guards is now
6451 required.
6452 * src/main.c (main): Adjust.
6453 * tests/semantic.at: New.
6454 * tests/regression.at: Use `input.y' as input file name.
6455 Avoid 8+3 problems by requiring input.c when the test needs the
6456 parser.
6457
6458 2001-12-27 Akim Demaille <akim@epita.fr>
6459
6460 * src/reader.c (symbol_list_new): Be sure to initialize all the
6461 fields.
6462
6463 2001-12-27 Akim Demaille <akim@epita.fr>
6464
6465 All the hacks using a final pseudo state are now useless.
6466
6467 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6468 * src/lalr.c (nLA): New.
6469 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6470 instead of lookaheadsp from the pseudo state (nstate + 1).
6471
6472 2001-12-27 Akim Demaille <akim@epita.fr>
6473
6474 * src/output.c (action_row, token_actions): Use a state_t instead
6475 of a integer, and nlookaheads instead of the following state's
6476 lookaheadsp.
6477
6478 2001-12-27 Akim Demaille <akim@epita.fr>
6479
6480 * src/conflicts.c (log_resolution, flush_shift)
6481 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6482 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6483 (conflicts_print, print_reductions): Use a state_t instead of an
6484 integer when referring to a state.
6485 As much as possible, depend upon nlookaheads, instead of the
6486 `lookaheadsp' member of the following state (since lookaheads of
6487 successive states are successive, the difference between state n + 1
6488 and n served as the number of lookaheads for state n).
6489 * src/lalr.c (add_lookback_edge): Likewise.
6490 * src/print.c (print_core, print_actions, print_state)
6491 (print_results): Likewise.
6492 * src/print_graph.c (print_core, print_actions, print_state)
6493 (print_graph): Likewise.
6494 * src/conflicts.h: Adjust.
6495
6496 2001-12-27 Akim Demaille <akim@epita.fr>
6497
6498 * src/bison.hairy: Formatting/comment changes.
6499 ANSIfy.
6500 Remove `register' indications.
6501 Add plenty of `static'.
6502
6503 2001-12-27 Akim Demaille <akim@epita.fr>
6504
6505 * src/output.c (prepare): Drop the muscle `ntbase' which
6506 duplicates ntokens.
6507 * src/bison.simple: Formatting/comment changes.
6508 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6509 is an undocumented synonym.
6510
6511 2001-12-22 Akim Demaille <akim@epita.fr>
6512
6513 * src/output.c (output_table_data): Change the prototype to use
6514 `int' for array ranges: some invocations do pass an int, not a
6515 short.
6516 Reported by Wayne Green.
6517
6518 2001-12-22 Akim Demaille <akim@epita.fr>
6519
6520 Some actions of web2c.y are improperly triggered.
6521 Reported by Mike Castle.
6522
6523 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6524 * tests/regression.at (Web2c): Rename as...
6525 (Web2c Report): this.
6526 (Web2c Actions): New.
6527
6528 2001-12-22 Akim Demaille <akim@epita.fr>
6529
6530 Reductions in web2c.y are improperly reported.
6531 Reported by Mike Castle.
6532
6533 * src/conflicts.c (print_reductions): Fix.
6534 * tests/regression.at (Web2c): New.
6535
6536 2001-12-18 Akim Demaille <akim@epita.fr>
6537
6538 Some host fail on `assert (!"foo")', which expands to
6539 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6540 Reported by Nelson Beebee.
6541
6542 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6543 `#define it_succeeded 0' and `assert (it_succeeded)'.
6544
6545 2001-12-17 Marc Autret <autret_m@epita.fr>
6546
6547 * src/bison.simple: Don't hard code the skeleton line and filename.
6548 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6549 New line counter 'skeleton_line' (skeleton-line muscle).
6550
6551 2001-12-17 Paul Eggert <eggert@twinsun.com>
6552
6553 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6554 YYDEBUG must be defined to a nonzero value.
6555
6556 * src/bison.simple (yytname): Do not assume that the user defines
6557 YYDEBUG to a properly parenthesized expression.
6558
6559 2001-12-17 Akim Demaille <akim@epita.fr>
6560
6561 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6562 nlookaheads is a new member.
6563 Adjust all users.
6564 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6565 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6566 state.
6567
6568 2001-12-17 Akim Demaille <akim@epita.fr>
6569
6570 * src/files.h, src/files.c (open_files, close_files): Remove.
6571 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6572 let...
6573 * src/reader.c (reader): Do it.
6574
6575 2001-12-17 Akim Demaille <akim@epita.fr>
6576
6577 * src/conflicts.c (print_reductions): Formatting changes.
6578
6579 2001-12-17 Akim Demaille <akim@epita.fr>
6580
6581 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6582 (flush_reduce): New.
6583 (resolve_sr_conflict): Adjust.
6584
6585 2001-12-17 Akim Demaille <akim@epita.fr>
6586
6587 * src/output.c (output_obstack): Be static and rename as...
6588 (format_obstack): this, to avoid any confusion with files.c's
6589 output_obstack.
6590 * src/reader.h (muscle_obstack): Move to...
6591 * src/output.h: here, since it's defined in output.c.
6592
6593 2001-12-17 Akim Demaille <akim@epita.fr>
6594
6595 * src/output.c (action_row, save_column, default_goto)
6596 (sort_actions, matching_state, pack_vector): Better variable
6597 locality.
6598
6599 2001-12-17 Akim Demaille <akim@epita.fr>
6600
6601 * src/output.c: Various formatting changes.
6602
6603 2001-12-17 Akim Demaille <akim@epita.fr>
6604
6605 * src/files.c (output_files): Free the output_obstack.
6606 * src/main.c (main): Call print and print_graph conditionally.
6607 * src/print.c (print): Work unconditionally.
6608 * src/print_graph.c (print_graph): Work unconditionally.
6609 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6610
6611 2001-12-16 Marc Autret <autret_m@epita.fr>
6612
6613 * src/output.c (actions_output): Fix. When we use %no-lines,
6614 there is one less line per action.
6615
6616 2001-12-16 Marc Autret <autret_m@epita.fr>
6617
6618 * src/bison.simple: Remove a useless #line directive.
6619 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6620 * src/output.c (get_lines_number): New.
6621 (output_parser): Adjust, now takes care about the lines of a
6622 output muscles.
6623 Fix line numbering.
6624 (actions_output): Computes the number of lines taken by actions.
6625 (output_master_parser): Insert new skeleton which is the name of
6626 the output parser file name.
6627
6628 2001-12-15 Marc Autret <autret_m@epita.fr>
6629
6630 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6631
6632 2001-12-15 Marc Autret <autret_m@epita.fr>
6633
6634 * src/output.c (output_gram): Keep track of the hairy one.
6635
6636 2001-12-15 Akim Demaille <akim@epita.fr>
6637
6638 Make `make distcheck' work.
6639
6640 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6641 system.h which uses libgettext.h.
6642
6643 2001-12-15 Akim Demaille <akim@epita.fr>
6644
6645 * src/nullable.c (set_nullable): Useless rules must be skipped,
6646 otherwise, since we range over their symbols, we might look at a
6647 nonterminal which no longer ``exists'', i.e., it is not counted in
6648 `nvars', hence we overflow our arrays.
6649
6650 2001-12-15 Akim Demaille <akim@epita.fr>
6651
6652 The header can also be produced directly, without any obstack!
6653 Yahoo!
6654
6655 * src/files.c, src/files.h (defines_obstack): Remove.
6656 (compute_header_macro): Global.
6657 (defines_obstack_save): Remove.
6658 * src/reader.c (parse_union_decl): No longer output to
6659 defines_obstack: its content can be found in the `stype' muscle
6660 anyway.
6661 (output_token_translations): Merge into...
6662 (symbols_output): this.
6663 Rename as...
6664 (symbols_save): this.
6665 (reader): Adjust.
6666 * src/output.c (header_output): New.
6667 (output): Call it.
6668
6669 2001-12-15 Akim Demaille <akim@epita.fr>
6670
6671 * src/reader.c (parse_union_decl): Instead of handling two obstack
6672 simultaneously, use one to define the `stype' muscle, and use the
6673 value of the latter to fill defines_obstack.
6674 (copy_comment): Remove.
6675 (copy_comment2): Work for a single obstack.
6676 Rename as...
6677 (copy_comment): this.
6678
6679 2001-12-15 Akim Demaille <akim@epita.fr>
6680
6681 * src/lex.c, src/lex.h (xgetc): No longer static.
6682 * src/reader.c (parse_union_decl): Revamp.
6683
6684 2001-12-15 Akim Demaille <akim@epita.fr>
6685
6686 Still making progress in separating Bison into (i) input, (ii)
6687 process, (iii) output: now we can directly output the parser file
6688 without using table_obstack at all.
6689
6690 * src/files.c, src/files.h (table_obstack): Bye bye.
6691 (parser_file_name): New.
6692 * src/files.c (compute_output_file_names): Compute it.
6693 * src/output.c (actions_output, output_parser)
6694 (output_master_parser): To a file instead of an obstack.
6695
6696 2001-12-15 Akim Demaille <akim@epita.fr>
6697
6698 Attach actions to rules, instead of pre-outputting them to
6699 actions_obstack.
6700
6701 * src/gram.h (rule_t): action and action_line are new members.
6702 * src/reader.c (symbol_list): Likewise.
6703 (copy_action): Save the actions within the rule.
6704 (packgram): Save them in rule_table.
6705 * src/output.c (actions_output): New.
6706 (output_parser): Use it on `%%actions'.
6707 (output_rule_data): Don't free rule_table.
6708 (output): Do it.
6709 (prepare): Don't save the `action' muscle.
6710 * src/bison.simple: s/%%action/%%actions/.
6711
6712 2001-12-15 Akim Demaille <akim@epita.fr>
6713
6714 * src/reader.c (copy_action): When --yacc, don't append a `;'
6715 to the user action: let it fail if lacking.
6716 Suggested by Arnold Robbins and Tom Tromey.
6717
6718 2001-12-14 Akim Demaille <akim@epita.fr>
6719
6720 * src/lex.c (literalchar): Simply return the char you decoded, non
6721 longer mess around with obstacks and int pointers.
6722 Adjust all callers.
6723
6724 2001-12-14 Akim Demaille <akim@epita.fr>
6725
6726 * src/lex.c (literalchar): Don't escape the special characters,
6727 just decode them, and keep them as char (before, eol was output as
6728 the 2 char string `\n' etc.).
6729 * src/output.c (output_rule_data): Use quotearg to output the
6730 token strings.
6731
6732 2001-12-13 Paul Eggert <eggert@twinsun.com>
6733
6734 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6735 Do not infringe on the global user namespace when using C++.
6736 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6737 All uses of `fprintf' and `stderr' changed.
6738
6739 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6740
6741 2001-12-13 Akim Demaille <akim@epita.fr>
6742
6743 The computation of nullable is broken: it doesn't handle empty
6744 RHS's properly.
6745
6746 * tests/torture.at (GNU AWK Grammar): New.
6747 * tests/sets.at (Nullable): New.
6748 * src/nullable.c (set_nullable): Instead of blindly looping over
6749 `ritems', loop over the rules, and then over their rhs's.
6750
6751 Work around Autotest bugs.
6752
6753 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6754 frame, because Autotest understand lines starting with a `+' as
6755 traces from the shell. Then, they are not processed properly.
6756 Admittedly an Autotest bug, but we don't have time to wait for
6757 Autotest to catch up.
6758 * tests/regression.at (Broken Closure): Adjust to the new table
6759 frames.
6760 Move to...
6761 * tests/sets.at: here.
6762
6763 2001-12-13 Akim Demaille <akim@epita.fr>
6764
6765 * src/closure.c (closure): Use nrules instead of playing tricks
6766 with BITS_PER_WORD.
6767
6768 2001-12-13 Akim Demaille <akim@epita.fr>
6769
6770 * src/print.c (print_actions): Output the handling of `$' as the
6771 traces do: shifting the token EOF. Before EOF was treated as a
6772 nonterminal.
6773 * tests/regression.at: Adjust some tests.
6774 * src/print_graph.c (print_core): Complete the set of items via
6775 closure. The next-to-final and final states are still unsatisfying,
6776 but that's to be addressed elsewhere.
6777 No longer output the rule numbers, but do output the state number.
6778 A single loop for the shifts + gotos is enough, but picked a
6779 distinct color for each.
6780 (print_graph): Initialize and finalize closure.
6781
6782 2001-12-13 Akim Demaille <akim@epita.fr>
6783
6784 * src/reader.c (readgram): Remove dead code, an strip useless
6785 braces.
6786 (get_type): Remove, unused.
6787
6788 2001-12-12 Akim Demaille <akim@epita.fr>
6789
6790 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6791 on that of lib/error.c.
6792
6793 2001-12-12 Akim Demaille <akim@epita.fr>
6794
6795 Some hosts don't like `/' in includes.
6796
6797 * src/system.h: Include libgettext.h without qualifying the path.
6798 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6799 $(top_srcdir).
6800
6801 2001-12-11 Marc Autret <autret_m@epita.fr>
6802
6803 * src/output.c (output_parser): Remove useless muscle.
6804
6805 2001-12-11 Marc Autret <autret_m@epita.fr>
6806
6807 * src/bison.simple: Remove #line just before %%epilogue. It
6808 is now handled in ...
6809 * src/reader.c (read_additionnal_code): Add the output of a
6810 #line for the epilogue.
6811
6812 2001-12-10 Marc Autret <autret_m@epita.fr>
6813
6814 * src/reader.c (copy_definition): Re-use CPP-outed code which
6815 replace precedent remove.
6816 * src/bison.simple: Remove #line before %%prologue because
6817 %%input-line is wrong at this time.
6818
6819 2001-12-10 Marc Autret <autret_m@epita.fr>
6820
6821 * src/reader.c (symbols_output): Clean up.
6822 * src/output.c (output_gram, output): Clean up.
6823
6824 2001-12-10 Akim Demaille <akim@epita.fr>
6825
6826 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6827 * src/LR0.c (set_state_table): here.
6828 * src/lalr.c (lalr): Call it.
6829
6830 2001-12-10 Akim Demaille <akim@epita.fr>
6831
6832 * src/state.h (shifts): Remove the `number' member: shifts are
6833 attached to state, hence no longer need to be labelled with a
6834 state number.
6835
6836 2001-12-10 Akim Demaille <akim@epita.fr>
6837
6838 Now that states have a complete set of members, the linked list of
6839 shifts is useless: just fill directly the state's shifts member.
6840
6841 * src/state.h (shifts): Remove the `next' member.
6842 * src/LR0.c (first_state, last_state): Remove.
6843 Adjust the callers.
6844 (augment_automaton): Don't look for the shifts that must be added
6845 a shift on EOF: it is those of the state we looked for! But now,
6846 since shifts are attached, it is no longer needed to looking
6847 merely by its id: its number.
6848
6849 2001-12-10 Akim Demaille <akim@epita.fr>
6850
6851 * src/LR0.c (augment_automaton): Better variable locality.
6852 Remove an impossible branch: if there is a state corresponding to
6853 the start symbol being shifted, then there is shift for the start
6854 symbol from the initial state.
6855
6856 2001-12-10 Akim Demaille <akim@epita.fr>
6857
6858 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6859 only when appropriate: when insert_start_shifting_state' is not
6860 invoked.
6861 * tests/regression.at (Rule Line Numbers): Adjust.
6862
6863 2001-12-10 Akim Demaille <akim@epita.fr>
6864
6865 * src/LR0.c (augment_automaton): Now that all states have shifts,
6866 merge the two cases addition shifts to the initial state.
6867
6868 2001-12-10 Akim Demaille <akim@epita.fr>
6869
6870 * src/lalr.c (set_state_table): Move to...
6871 * src/LR0.c: here.
6872 * src/lalr.c (lalr): Don't call it...
6873 * src/LR0.c (generate_states): do it.
6874 * src/LR0.h (first_state): Remove, only the table is used.
6875
6876 2001-12-10 Akim Demaille <akim@epita.fr>
6877
6878 * src/LR0.h (first_shift, first_reduction): Remove.
6879 * src/lalr.c: Don't use first_shift: find shifts through the
6880 states.
6881
6882 2001-12-10 Akim Demaille <akim@epita.fr>
6883
6884 * src/LR0.c: Attach shifts to states as soon as they are
6885 computed.
6886 * src/lalr.c (set_state_table): Instead of assigning shifts to
6887 state, just assert that the mapping was properly done.
6888
6889 2001-12-10 Akim Demaille <akim@epita.fr>
6890
6891 * src/LR0.c (insert_start_shift): Rename as...
6892 (insert_start_shifting_state): this.
6893 (insert_eof_shifting_state, insert_accepting_state): New.
6894 (augment_automaton): Adjust.
6895 Better locality of the variables.
6896 When looking if the start_symbol is shifted from the initial
6897 state, using `while (... symbol != start_symbol ...)' sounds
6898 better than `while (... symbol < start_symbol ...)': If fail
6899 to see how the order between symbols could be relevant!
6900
6901 2001-12-10 Akim Demaille <akim@epita.fr>
6902
6903 * src/getargs.h: Don't declare `spec_name_prefix' and
6904 `spec_file_prefix', declared by src/files.h.
6905 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6906 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6907 * src/output.c (prepare): Adjust.
6908 * src/reader.c (symbols_output): Likewise.
6909 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6910
6911 2001-12-10 Akim Demaille <akim@epita.fr>
6912
6913 * src/muscle_tab.c (muscle_init): NULL is a better default than
6914 `"0"'.
6915
6916 2001-12-10 Akim Demaille <akim@epita.fr>
6917
6918 * src/reader.c (reader): Calling symbols_output once is enough.
6919
6920 2001-12-10 Akim Demaille <akim@epita.fr>
6921
6922 Now that states have a complete set of members, the linked list of
6923 reductions is useless: just fill directly the state's reductions
6924 member.
6925
6926 * src/state.h (struct reductions): Remove member `number' and
6927 `next'.
6928 * src/LR0.c (first_reduction, last_reduction): Remove.
6929 (save_reductions): Don't link the new reductions, store them in
6930 this_state.
6931 * src/lalr.c (set_state_table): No need to attach reductions to
6932 states, it's already done.
6933 * src/output.c (output_actions): No longer free the shifts, then
6934 the reductions, then the states: free all the states and their
6935 members.
6936
6937 2001-12-10 Akim Demaille <akim@epita.fr>
6938
6939 * src/options.c (OPTN, DRTV, BOTH): New.
6940 (option_table): Use them.
6941
6942 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6943 the job of system.h.
6944 * src/options.c: Don't include stdio.h and xalloc.h for the same
6945 reasons.
6946
6947 2001-12-10 Akim Demaille <akim@epita.fr>
6948
6949 * src/output.c (output, prepare): Make sure the values of the
6950 muscles `action' and `prologue' are 0-terminated.
6951
6952 2001-12-10 Akim Demaille <akim@epita.fr>
6953
6954 Clean up GCC warnings.
6955
6956 * src/reader.c (copy_action): `buf' is not used.
6957 (parse_skel_decl): Be static.
6958 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6959 * src/options.h (create_long_option_table): Have a real prototype.
6960 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6961 (hash_delete_at): Return const void *.
6962 Adjust casts to preserve the const.
6963
6964 2001-12-10 Akim Demaille <akim@epita.fr>
6965
6966 * configure.in: Require 2.52g.
6967 M4 is not needed, but AUTOM4TE is.
6968 * m4/m4.m4: Remove.
6969 * tests/Makefile.am: Adjust.
6970
6971 2001-12-10 Akim Demaille <akim@epita.fr>
6972
6973 One structure for states is enough, even though theoretically
6974 there are LR(0) states and LALR(1) states.
6975
6976 * src/lalr.h (state_t): Remove.
6977 (state_table): Be state_t **, not state_t *.
6978 * src/state.h (core, CORE_ALLOC): Rename as...
6979 (state_t, STATE_ALLOC): this.
6980 Add the LALR(1) members: shifts, reductions, errs.
6981 * src/LR0.c (state_table): Rename as...
6982 (state_hash): this, to avoid name clashes with the global
6983 `state_table'.
6984 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6985 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6986
6987 2001-12-10 Akim Demaille <akim@epita.fr>
6988
6989 Bison dumps core on bash.y.
6990 Reported by Pascal Bart.
6991
6992 * src/warshall.c (bitmatrix_print): New.
6993 (TC): Use it.
6994 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6995 j must be the outer loop.
6996 * tests/regression.at (Broken Closure): New.
6997
6998 2001-12-05 Akim Demaille <akim@epita.fr>
6999
7000 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7001 its argument.
7002 Reported by Peter Hamorsky.
7003
7004 2001-12-05 Akim Demaille <akim@epita.fr>
7005
7006 * src/conflicts.c (err_table): Remove.
7007 (resolve_sr_conflict): Adjust.
7008 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7009 Rename as...
7010 (state_t.reductions, state_t.shifts): this.
7011
7012 2001-12-05 Akim Demaille <akim@epita.fr>
7013
7014 * src/reduce.c (reduce_grammar_tables): No longer disable the
7015 removal of useless rules via CPP but via `if (0)', so that the
7016 compiler still check the code is valid.
7017 For instance, it should have noticed `rline' no longer exists: use
7018 the `line' member of rule_t.
7019 * src/gram.c (dummy, rline): Remove, unused.
7020
7021 2001-12-05 Akim Demaille <akim@epita.fr>
7022
7023 * src/output.c (pack_vector): Use assert, not berror.
7024 * src/main.c (berror): Remove, unused.
7025
7026 2001-12-05 Akim Demaille <akim@epita.fr>
7027
7028 New experimental feature: if --verbose --trace output all the
7029 items of a state, not only its kernel.
7030
7031 * src/print.c (print_core): If `trace_flag', then invoke closure
7032 before outputting the items of the state (print_core is no longer
7033 a correct name them).
7034 (print_results): Invoke new_closure/free_closure if needed.
7035
7036 2001-12-05 Akim Demaille <akim@epita.fr>
7037
7038 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7039 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7040 (nitemset): for consistency with the rest of the project.
7041
7042 2001-12-05 Akim Demaille <akim@epita.fr>
7043
7044 * src/closure.c (print_closure): Improve.
7045 (closure): Use it for printing input and output.
7046
7047 2001-12-05 Akim Demaille <akim@epita.fr>
7048
7049 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7050 indexed by nonterminals.
7051
7052 2001-12-05 Akim Demaille <akim@epita.fr>
7053
7054 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7055 what it was!).
7056 * src/warshall.h: Remove accidental duplication of the content.
7057
7058 2001-12-05 Akim Demaille <akim@epita.fr>
7059
7060 * src/closure.c (set_fderives): De-obfuscate.
7061
7062 2001-12-05 Akim Demaille <akim@epita.fr>
7063
7064 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7065
7066 2001-12-05 Akim Demaille <akim@epita.fr>
7067
7068 * src/closure.c (set_firsts): De-obfuscate.
7069
7070 2001-12-05 Akim Demaille <akim@epita.fr>
7071
7072 * src/output.c (action_row): De-obfuscate
7073 using the good o' techniques: arrays not pointers, variable
7074 locality, BITISSET, RESETBIT etc.
7075
7076 2001-12-05 Akim Demaille <akim@epita.fr>
7077
7078 Pessimize the code to simplify it: from now on, all the states
7079 have a valid SHIFTS, which NSHIFTS is possibly 0.
7080
7081 * src/LR0.c (shifts_new): Be global and move to..
7082 * src/state.c, src/state.h: here.
7083 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7084 * src/print_graph: Adjust.
7085
7086 2001-12-05 Akim Demaille <akim@epita.fr>
7087
7088 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7089 * src/conflicts.c: Use it.
7090 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7091 incorrectly ``simplified''.
7092
7093 2001-12-05 Akim Demaille <akim@epita.fr>
7094
7095 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7096 using the good o' techniques: arrays not pointers, variable
7097 locality, BITISSET, RESETBIT etc.
7098
7099 2001-12-05 Akim Demaille <akim@epita.fr>
7100
7101 * src/state.h (SHIFT_SYMBOL): New.
7102 * src/conflicts.c: Use it to deobfuscate.
7103
7104 2001-12-05 Akim Demaille <akim@epita.fr>
7105
7106 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7107 (print_reductions): De-obfuscate using the good o' techniques:
7108 arrays not pointers, variable locality, BITISSET.
7109
7110 2001-12-05 Akim Demaille <akim@epita.fr>
7111
7112 * src/conflicts.c (print_reductions): Arrays, not pointers.
7113 Use BITISSET.
7114
7115 2001-12-05 Akim Demaille <akim@epita.fr>
7116
7117 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7118
7119 2001-12-05 Akim Demaille <akim@epita.fr>
7120
7121 * src/conflicts.c (print_reductions): Improve variable locality.
7122
7123 2001-12-05 Akim Demaille <akim@epita.fr>
7124
7125 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7126
7127 2001-12-05 Akim Demaille <akim@epita.fr>
7128
7129 * src/conflicts.c (print_reductions): Improve variable locality.
7130
7131 2001-12-05 Akim Demaille <akim@epita.fr>
7132
7133 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7134 * src/lalr.c: Use them.
7135
7136 2001-12-05 Akim Demaille <akim@epita.fr>
7137
7138 * src/LR0.c (augment_automaton): Formatting changes.
7139 Better variable locality.
7140
7141 2001-12-05 Akim Demaille <akim@epita.fr>
7142
7143 * src/lalr.c (matrix_print): New.
7144 (transpose): Use it.
7145 Use arrays instead of pointers.
7146
7147 2001-12-05 Akim Demaille <akim@epita.fr>
7148
7149 * src/lalr.c (maxrhs): Move to...
7150 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7151 * src/lalr.c (build_relations): Adjust.
7152
7153 2001-12-05 Akim Demaille <akim@epita.fr>
7154
7155 * src/lalr.c (transpose): Free the memory allocated to the
7156 argument, as it is replaced by the results by the unique caller.
7157 (build_relations): Merely invoke transpose: it handles the memory
7158 deallocation.
7159 Improve variable locality.
7160 Avoid variables used as mere abbreviations.
7161 (compute_lookaheads): Use arrays instead of pointers.
7162
7163 2001-12-05 Akim Demaille <akim@epita.fr>
7164
7165 * src/lalr.c (initialize_F): Improve variable locality.
7166 Avoid variables used as mere abbreviations.
7167
7168 2001-12-05 Akim Demaille <akim@epita.fr>
7169
7170 * src/derives.c (print_derives): Display the ruleno.
7171 * src/lalr.c (initialize_F, transpose): Better variable locality
7172 to improve readability.
7173 Avoid variables used as mere abbreviations.
7174
7175 2001-12-05 Akim Demaille <akim@epita.fr>
7176
7177 * src/lalr.c (traverse): Use arrays instead of pointers.
7178
7179 2001-12-05 Akim Demaille <akim@epita.fr>
7180
7181 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7182 the handling of squeue.
7183 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7184
7185 2001-12-05 Akim Demaille <akim@epita.fr>
7186
7187 Because useless nonterminals are now kept alive (instead of being
7188 `destroyed'), we now sometimes examine them, and store information
7189 related to them. Hence we need to know their number, and adjust
7190 memory allocations.
7191
7192 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7193 static.
7194 * src/LR0.c (allocate_itemsets): The memory allocated to
7195 `symbol_count' was used for two different purpose: once to count
7196 the number of occurrences of each symbol, and later reassigned to
7197 `shift_symbol', containing the symbol that can be shifted from a
7198 given state.
7199 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7200 only, and...
7201 (new_itemsets): Allocate `shift_symbol' here.
7202 (allocate_itemsets): symbol_count includes useless nonterminals.
7203 Make room for them.
7204 (free_storage): Use `free', not `XFREE', for pointers that cannot
7205 be null.
7206
7207 2001-12-05 Akim Demaille <akim@epita.fr>
7208
7209 * src/nullable.c (set_nullable): Deobfuscate the handling of
7210 ritem.
7211 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7212
7213 2001-12-05 Akim Demaille <akim@epita.fr>
7214
7215 * src/gram.c, src/gram.h (ritem_print): New.
7216 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7217 (This useless function was defined only to work around VMS linkers
7218 that can't handle compilation units with variables only).
7219 * src/reduce.c (dump_grammar): Use it to trace the construction of
7220 ritem.
7221
7222 2001-12-04 Paul Eggert <eggert@twinsun.com>
7223
7224 * src/bison.simple (union yyalloc): Change member names
7225 to be the same as the stack names.
7226 (yyparse): yyptr is now union yyalloc *, not char *.
7227 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7228 and may generate better code on some machines.
7229 (yystpcpy): Use prototype if __STDC__ is defined, not just
7230 if __cplusplus is defined.
7231
7232 2001-11-30 Akim Demaille <akim@epita.fr>
7233
7234 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7235 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7236 Gettext doesn't compile cleanly, and dies with -Werror.
7237 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7238 Include WARNING_CFLAGS here.
7239 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7240 before being defined.
7241
7242 2001-11-27 Paul Eggert <eggert@twinsun.com>
7243
7244 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7245 First arg is int, not unsigned.
7246 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7247 (SIZE_MAX, UINT_MAX): New macros.
7248 (quotearg_n_options): Abort if N is negative.
7249 Avoid overflow check on hosts where size_t is 64 bits and int
7250 is 32 bits, as overflow is impossible there.
7251 Fix off-by-one typo that caused unnecessary reallocation.
7252
7253 2001-11-29 Paul Eggert <eggert@twinsun.com>
7254
7255 Name space cleanup in generated parser.
7256
7257 * doc/bison.texinfo (Bison Parser): Discuss system headers
7258 and their effect on the user name space.
7259
7260 * src/bison.simple:
7261 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7262 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7263 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7264
7265 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7266 on user names when possible.
7267
7268 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7269 Simplify test for whather <alloca.h> exists.
7270
7271 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7272
7273 (<stdio.h>): Include if YYDEBUG.
7274
7275 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7276 ! defined (yyoverflow) && ! defined (yymemcpy).
7277
7278 (yymemcpy, yyparse): Rename local variables as needed so that
7279 they all begin with 'yy'.
7280
7281 (yystrlen, yystpcpy): New functions.
7282
7283 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7284 All uses changed.
7285
7286 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7287 instead of relying on string.h functions. Use YYSTACK_ALLOC
7288 and YYSTACK_FREE instead of malloc and free.
7289
7290 2001-11-30 Akim Demaille <akim@epita.fr>
7291
7292 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7293 before their first uses.
7294 (YYBISON, YYPURE): Move to the top of the output.
7295
7296 2001-11-30 Akim Demaille <akim@epita.fr>
7297
7298 * tests/reduce.at (Useless Nonterminals): Fix.
7299
7300 2001-11-30 Akim Demaille <akim@epita.fr>
7301
7302 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7303 if body instead of `;' to pacify GCC's warnings.
7304
7305 2001-11-30 Akim Demaille <akim@epita.fr>
7306
7307 Instead of mapping the LHS of unused rules to -1, keep the LHS
7308 valid, but flag the rules as invalid.
7309
7310 * src/gram.h (rule_t): `useful' is a new member.
7311 * src/print.c (print_grammar): Adjust.
7312 * src/derives.c (set_derives): Likewise.
7313 * src/reader.c (packgram, reduce_output): Likewise.
7314 * src/reduce.c (reduce_grammar_tables): Likewise.
7315 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7316
7317 2001-11-30 Akim Demaille <akim@epita.fr>
7318
7319 * src/reduce.c (reduce_output): Formatting changes.
7320 * src/print.c (print_results, print_grammar): Likewise.
7321 * tests/regression.at (Rule Line Numbers)
7322 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7323
7324 2001-11-30 Akim Demaille <akim@epita.fr>
7325
7326 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7327 useless nonterminals, move them at the end of the symbol arrays.
7328 (reduce_output): Adjust.
7329 * tests/reduce.at (Useless Nonterminals): Adjust.
7330
7331 2001-11-30 Akim Demaille <akim@epita.fr>
7332
7333 * src/reduce.c: Various comment/formatting changes.
7334 (nonterminals_reduce): New, extracted from...
7335 (reduce_grammar_tables): here.
7336 (reduce_grammar): Call nonterminals_reduce.
7337
7338 2001-11-29 Paul Eggert <eggert@twinsun.com>
7339
7340 * src/bison.simple (YYSTACK_REALLOC): Remove.
7341 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7342 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7343 New macros.
7344 (union yyalloc): New type.
7345 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7346 an arbitrary restriction on hosts where size_t is wider than int.
7347
7348 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7349 a parser stack overflow. Allocate just one block of memory for all
7350 three stacks, instead of allocating three blocks; this typically is
7351 faster and reduces fragmentation.
7352
7353 Do not limit the number of items in the stack to a value that fits
7354 in 'int', as this is an arbitrary limit on hosts with 64-bit
7355 size_t and 32-bit int.
7356
7357 2001-11-29 Marc Autret <autret_m@epita.fr>
7358
7359 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7360 of defining YYERROR_VERBOSE.
7361 [AT_DATA]: $4 is now out of C declarations in the prologue.
7362
7363 2001-11-28 Marc Autret <autret_m@epita.fr>
7364
7365 * src/reader.c (parse_dquoted_param): New.
7366 (parse_skel_decl): Use it.
7367 * src/lex.h: Add its prototype.
7368 * src/lex.c (literalchar): Become not static.
7369
7370 2001-11-28 Marc Autret <autret_m@epita.fr>
7371
7372 * src/output.h: And put its extern declaration here.
7373 * src/output.c (error_verbose): Define here.
7374 (prepare): Echo name modification.
7375 * src/getargs.h: Clean its extern declaration.
7376 * src/getargs.c (error_verbose_flag): Remove.
7377 (getargs): Remove case 'e'.
7378 * src/options.c (option_table): 'error-verbose' is now seen as simple
7379 percent option.
7380 Include output.h.
7381
7382 * src/reader.c (read_declarations): Remove case tok_include.
7383 (parse_include_decl): Remove.
7384 * src/lex.h (token_t): Remove tok_include.
7385 * src/options.c (option_table): 'include' is now a simple command line
7386 option.
7387
7388 2001-11-28 Marc Autret <autret_m@epita.fr>
7389
7390 * src/bison.simple: Adjust muscle names.
7391 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7392 * src/output.c (prepare): s/_/-/ for the muscles names.
7393 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7394
7395 2001-11-28 Marc Autret <autret_m@epita.fr>
7396
7397 * src/bison.simple: Fix debug.
7398 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7399
7400 2001-11-28 Akim Demaille <akim@epita.fr>
7401
7402 * src/LR0.c (shifts_new): New.
7403 (save_shifts, insert_start_shift, augment_automaton): Use it.
7404
7405 2001-11-28 Akim Demaille <akim@epita.fr>
7406
7407 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7408 keep ruleno only.
7409
7410 2001-11-28 Akim Demaille <akim@epita.fr>
7411
7412 * src/closure.c (closure): Instead of looping over word in array
7413 then bits in words, loop over bits in array.
7414
7415 2001-11-28 Akim Demaille <akim@epita.fr>
7416
7417 * src/closure.c (closure): No longer optimize the special case
7418 where all the bits of `ruleset[r]' are set to 0, to make the code
7419 clearer.
7420
7421 2001-11-28 Akim Demaille <akim@epita.fr>
7422
7423 * src/closure.c (closure): `r' and `c' are new variables, used to
7424 de-obfuscate accesses to RULESET and CORE.
7425
7426 2001-11-28 Akim Demaille <akim@epita.fr>
7427
7428 * src/reduce.c (reduce_print): Use ngettext.
7429 (dump_grammar): Improve the trace accuracy.
7430
7431 2001-11-28 Akim Demaille <akim@epita.fr>
7432
7433 * src/reduce.c (dump_grammar): Don't translate trace messages.
7434
7435 2001-11-28 Akim Demaille <akim@epita.fr>
7436
7437 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7438 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7439 as all tags are free'ed afterwards.
7440 From Enrico Scholz.
7441
7442 2001-11-27 Paul Eggert <eggert@twinsun.com>
7443
7444 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7445 use alloca when we didn't want to, and vice versa.
7446
7447 2001-11-27 Marc Autret <autret_m@epita.fr>
7448
7449 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7450 initialization.
7451 * src/output.c (prepare): Remove its update.
7452
7453 2001-11-27 Marc Autret <autret_m@epita.fr>
7454
7455 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7456 Use %error-verbose.
7457
7458 2001-11-27 Marc Autret <autret_m@epita.fr>
7459
7460 * src/bison.simple: Remove YYERROR_VERBOSE using.
7461 Use %%error_verbose.
7462 (yyparse): Likewise.
7463 * src/output.c (prepare): Give its final value.
7464 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7465 * src/getargs.h: Add its extern declaration.
7466 * src/getargs.c (error_verbose_flag): New int.
7467 (getargs): Update to catch new case.
7468 * src/options.c (option_table): 'error-verbose' is a new option.
7469 (shortopts): Update.
7470
7471 2001-11-27 Akim Demaille <akim@epita.fr>
7472
7473 * src/system.h: Use intl/libgettext.h.
7474 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7475
7476 2001-11-27 Akim Demaille <akim@epita.fr>
7477
7478 * tests/torture.at (Exploding the Stack Size with Malloc):
7479 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7480
7481 2001-11-27 Akim Demaille <akim@epita.fr>
7482
7483 * src/files.c: Include error.h.
7484 Reported by Hans Aberg.
7485
7486 2001-11-26 Marc Autret <autret_m@epita.fr>
7487
7488 * src/reader.c (parse_include_decl): New, not yet implemented.
7489 (read_declarations): Add case tok_include.
7490 * src/getargs.h (include): Add its extern definition.
7491 * src/getargs.c (include): New const char *.
7492 (getargs): Add case '-I'.
7493 * src/options.c (option_table): Add include as command line and
7494 percent option.
7495 * src/lex.h (token_t): Add tok_include.
7496
7497 2001-11-26 Akim Demaille <akim@epita.fr>
7498
7499 * src/reader.c (readgram): Make sure rules for mid-rule actions
7500 have a lineno equal to that of their host rule.
7501 Reported by Hans Aberg.
7502 * tests/regression.at (Rule Line Numbers): New.
7503
7504 2001-11-26 Akim Demaille <akim@epita.fr>
7505
7506 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7507 size_ts.
7508
7509 2001-11-26 Akim Demaille <akim@epita.fr>
7510
7511 * src/complain.c, src/complain.h (error): Remove, provided by
7512 lib/error.[ch].
7513
7514 2001-11-26 Akim Demaille <akim@epita.fr>
7515
7516 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7517 issue an error message.
7518 * tests/regression.at (Invalid %directive): New.
7519 Reported by Hans Aberg.
7520
7521 2001-11-26 Akim Demaille <akim@epita.fr>
7522
7523 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7524 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7525
7526 2001-11-26 Akim Demaille <akim@epita.fr>
7527
7528 * src/conflicts.c (conflicts_print): Don't complain at all when
7529 there are no reduce/reduce conflicts, and as many shift/reduce
7530 conflicts as expected.
7531 * tests/regression.at (%expect right): Adjust.
7532
7533 2001-11-23 Akim Demaille <akim@epita.fr>
7534
7535 * lib/alloca.c: Update, from fileutils.
7536
7537 2001-11-23 Akim Demaille <akim@epita.fr>
7538
7539 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7540
7541 2001-11-23 Akim Demaille <akim@epita.fr>
7542
7543 * src/system.h: Include alloca.h.
7544 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7545
7546 2001-11-23 Akim Demaille <akim@epita.fr>
7547
7548 * src/print_graph.c (print_actions): Remove `rule', unused.
7549 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7550 pacify GCC's signed < unsigned warnings.
7551 * src/closure.c (itemsetsize): Likewise.
7552 * src/reader.c (symbol_list_new): Static.
7553
7554 2001-11-23 Akim Demaille <akim@epita.fr>
7555
7556 Attaching lineno to buckets is stupid, since only one copy of each
7557 symbol is kept, only the line of the first occurrence is kept too.
7558
7559 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7560 * src/reader.c (rline_allocated): Remove, unused.
7561 (symbol_list): Have a `line' member.
7562 (symbol_list_new): New.
7563 (readgram): Use it.
7564 * src/print.c (print_grammar): Output the rule line numbers.
7565 * tests/regression.at (Solved SR Conflicts)
7566 (Unresolved SR Conflicts): Adjust.
7567 Reported by Hans Aberg.
7568
7569 2001-11-22 Marc Autret <autret_m@epita.fr>
7570
7571 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7572
7573 2001-11-22 Marc Autret <autret_m@epita.fr>
7574
7575 * src/muscle_tab.c (muscle_init): Remove initialization of
7576 skeleton muscle.
7577 * src/output.c (output_master_parser): Do it here.
7578
7579 2001-11-20 Akim Demaille <akim@epita.fr>
7580
7581 * po/sv.po: New.
7582 * configure.in (ALL_LINGUAS): Adjust.
7583 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7584 longer contains strings to translate.
7585
7586 2001-11-19 Akim Demaille <akim@epita.fr>
7587
7588 * src/conflicts.c (conflicts_print): Add a missing \n.
7589
7590 2001-11-19 Akim Demaille <akim@epita.fr>
7591
7592 * src/nullable.c (nullable_print): New.
7593 (set_nullable): Call it when tracing.
7594 Better locality of variables.
7595
7596 2001-11-19 Akim Demaille <akim@epita.fr>
7597
7598 * src/print.c (print_actions): Better locality of variables.
7599
7600 2001-11-19 Akim Demaille <akim@epita.fr>
7601
7602 * src/derives.c (print_derives): Fix and enrich.
7603 * src/closure.c (print_fderives): Likewise.
7604
7605 2001-11-19 Akim Demaille <akim@epita.fr>
7606
7607 * src/closure.c (itemsetend): Remove, replaced with...
7608 (itemsetsize): new.
7609
7610 2001-11-19 Akim Demaille <akim@epita.fr>
7611
7612 * src/LR0.c (kernel_end): Remove, replaced with...
7613 (kernel_size): new.
7614
7615 2001-11-19 Akim Demaille <akim@epita.fr>
7616
7617 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7618 to clarify.
7619
7620 2001-11-19 Akim Demaille <akim@epita.fr>
7621
7622 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7623
7624 2001-11-19 Akim Demaille <akim@epita.fr>
7625
7626 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7627 trace messages.
7628 * src/LR0.c: Likewise.
7629 (allocate_itemsets): Use arrays instead of pointers to clarify.
7630
7631 2001-11-19 Akim Demaille <akim@epita.fr>
7632
7633 * src/getargs.c (statistics_flag): Replace with...
7634 (trace_flag): New.
7635 (longopts): Accept --trace instead of --statistics.
7636 * src/getargs.h, src/options.c: Adjust.
7637 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7638 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7639
7640 2001-11-19 Akim Demaille <akim@epita.fr>
7641
7642 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7643 pointers to clarify the code.
7644 (save_reductions, save_shifts): Factor common parts of alternatives.
7645
7646 2001-11-19 Akim Demaille <akim@epita.fr>
7647
7648 * src/LR0.c (new_state, get_state): Complete TRACE code.
7649 * src/closure.c: Include `reader.h' to get `tags', needed by the
7650 trace code.
7651 Rename the conditional DEBUG as TRACE.
7652 Output consistently TRACEs to stderr, not stdout.
7653 * src/derives.c: Likewise.
7654 * src/reduce.c: (inaccessable_symbols): Using if is better style
7655 than goto.
7656 Use `#if TRACE' instead of `#if 0' for tracing code.
7657
7658 2001-11-19 Akim Demaille <akim@epita.fr>
7659
7660 * src/system.h (LIST_FREE, shortcpy): New.
7661 * src/LR0.c: Use them.
7662 * src/output.c (free_itemsets, free_reductions, free_shifts):
7663 Remove, replaced by LIST_FREE.
7664
7665 2001-11-19 Akim Demaille <akim@epita.fr>
7666
7667 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7668 (REDUCTIONS_ALLOC): New.
7669 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7670 allocation.
7671
7672 2001-11-19 Akim Demaille <akim@epita.fr>
7673
7674 * src/LR0.c (new_state): Complete trace code.
7675 * src/nullable.c (set_nullable): Don't translate traces.
7676
7677 2001-11-19 Akim Demaille <akim@epita.fr>
7678
7679 * src/print_graph.c (print_core): Better locality of variables.
7680 * src/print.c (print_core): Likewise.
7681
7682 2001-11-19 Akim Demaille <akim@epita.fr>
7683
7684 * src/vcg.c: You do the output, so you are responsible of the
7685 handling of VCG syntax, in particular: use quotearg.
7686 * src/print_graph.c: Don't.
7687 (print_actions): Don't output the actions as part of the nodes,
7688 since that's the job of the edges.
7689 (print_state): Don't output by hand: fill the node description,
7690 and ask for its output.
7691
7692 2001-11-19 Akim Demaille <akim@epita.fr>
7693
7694 * src/bison.simple (yyparse): When verbosely reporting an error,
7695 no longer put additional quotes around token names.
7696 * tests/calc.at: Adjust.
7697
7698 2001-11-19 Akim Demaille <akim@epita.fr>
7699
7700 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7701 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7702 * src/output.c: Adjust.
7703
7704 2001-11-19 Akim Demaille <akim@epita.fr>
7705
7706 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7707 (rule_t): this.
7708 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7709
7710 2001-11-19 Akim Demaille <akim@epita.fr>
7711
7712 * src/gram.h (rule_t): New.
7713 (rule_table): New.
7714 (rrhs, rlhs): Remove, part of state_t.
7715 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7716 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7717 * src/reader.c, src/reduce.c: Adjust.
7718
7719 2001-11-19 Akim Demaille <akim@epita.fr>
7720
7721 * src/reader.c (symbols_output): New, extracted from...
7722 (packsymbols): Here.
7723 (reader): Call it.
7724
7725 2001-11-19 Akim Demaille <akim@epita.fr>
7726
7727 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7728 (maxrhs): this new function.
7729
7730 2001-11-19 Akim Demaille <akim@epita.fr>
7731
7732 * src/lalr.c (F): New macro to access the variable F.
7733 Adjust.
7734
7735 2001-11-19 Akim Demaille <akim@epita.fr>
7736
7737 * src/lalr.h (LA): New macro to access the variable LA.
7738 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7739 * src/lalr.c: Adjust.
7740
7741 2001-11-19 Akim Demaille <akim@epita.fr>
7742
7743 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7744 (set_state_table): handle the `lookaheads' members.
7745
7746 2001-11-19 Akim Demaille <akim@epita.fr>
7747
7748 * src/lalr.h (lookaheads): Removed array, whose contents is now
7749 a member of...
7750 (state_t): this structure.
7751 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7752 Adjust.
7753
7754 2001-11-19 Akim Demaille <akim@epita.fr>
7755
7756 * src/lalr.h (consistent): Removed array, whose contents is now
7757 a member of...
7758 (state_t): this structure.
7759 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7760 Adjust.
7761
7762 2001-11-19 Akim Demaille <akim@epita.fr>
7763
7764 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7765 contents are now members of...
7766 (state_t): this structure.
7767 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7768 Adjust.
7769
7770 2001-11-19 Akim Demaille <akim@epita.fr>
7771
7772 * src/lalr.h (state_t): New.
7773 (state_table): Be a state_t * instead of a core **.
7774 (accessing_symbol): Remove, part of state_t.
7775 * src/lalr.c: Adjust.
7776 (set_accessing_symbol): Merge into...
7777 (set_state_table): this.
7778 * src/print_graph.c, src/conflicts.c: Adjust.
7779
7780 2001-11-14 Akim Demaille <akim@epita.fr>
7781
7782 * tests/calc.at, tests/output.at, tests/regression.at,
7783 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7784 now the tests are run in private dirs, therefore AC_CLEANUP and
7785 family can be simplified to 0-ary.
7786 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7787 use abs. path to find config.h.
7788 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7789 stderr, there can be way too much random noise.
7790 Instead pass -Werror to GCC and rely on the exit status.
7791 Reported by Wolfram Wagner.
7792
7793 2001-11-14 Akim Demaille <akim@epita.fr>
7794
7795 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7796 defined only if yyoverflow is defined, to avoid `warning: unused
7797 variable `yyvs1''.
7798 Reported by The Test Suite.
7799
7800 2001-11-14 Akim Demaille <akim@epita.fr>
7801
7802 * src/print.c: Include reduce.h.
7803 Reported by Hans Aberg.
7804
7805 2001-11-14 Akim Demaille <akim@epita.fr>
7806
7807 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7808 Revert a previous patch: these are really const.
7809 * src/conflicts.c (conflict_report): Additional useless pair of
7810 braces to pacify GCC's warnings for `if () if () {} else {}'.
7811 * src/lex.c (parse_percent_token): Replace equal_offset with
7812 arg_offset.
7813 arg is const.
7814 Be sure to strdup `arg' when used, since there is no reason for
7815 token_buffer not to change.
7816
7817 2001-11-14 Akim Demaille <akim@epita.fr>
7818
7819 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7820 definition.
7821 * src/main.c (main): Use them.
7822 Suggested by Hans Aberg.
7823
7824 2001-11-12 Akim Demaille <akim@epita.fr>
7825
7826 * src/system.h (ngettext): Now that we use ngettext, be sure to
7827 provide a default definition when NLS are not used.
7828
7829 2001-11-12 Akim Demaille <akim@epita.fr>
7830
7831 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7832 Use @kbd to denote user input.
7833 (Language and Grammar): ANSIfy the example.
7834 Adjust its layout for info/notinfo.
7835 (Location Tracking Calc): Output error messages to stderr.
7836 Output locations in a more GNUtically correct way.
7837 Fix a couple of Englishos.
7838 Adjust @group/@end group pairs.
7839
7840 2001-11-12 Akim Demaille <akim@epita.fr>
7841
7842 %expect was not functioning at all.
7843
7844 * src/conflicts.c (expected_conflicts): Set to -1.
7845 (conflict_report): Use ngettext.
7846 (conflicts_print): Check %expect and make its violation an error.
7847 * doc/bison.texinfo (Expect Decl): Adjust.
7848 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7849 * tests/regression.at (%expect not enough, %expect right)
7850 (%expect too much): New.
7851
7852 2001-11-12 Akim Demaille <akim@epita.fr>
7853
7854 * tests/regression.at (Conflicts): Rename as...
7855 (Unresolved SR Conflicts): this.
7856 (Solved SR Conflicts): New.
7857
7858 2001-11-12 Akim Demaille <akim@epita.fr>
7859
7860 * src/reduce.c (print_results): Rename as...
7861 (reduce_output): This.
7862 Output to OUT, passed as argument, instead of output_obstack.
7863 (dump_grammar): Likewise.
7864 (reduce_free): New.
7865 Also free V1.
7866 (reduce_grammar): No longer call reduce_output, since...
7867 * src/print.c (print_results): do it.
7868 * src/main.c (main): Call reduce_free;
7869
7870 2001-11-12 Akim Demaille <akim@epita.fr>
7871
7872 * src/conflicts.c (print_reductions): Accept OUT as argument.
7873 Output to it, not to output_obstack.
7874 * src/print.c (print_actions): Adjust.
7875
7876 2001-11-12 Akim Demaille <akim@epita.fr>
7877
7878 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7879 the result instead of using...
7880 (src_total, rrc_total, src_count, rrc_count): Remove.
7881 (any_conflicts): Remove.
7882 (print_conflicts): Split into...
7883 (conflicts_print, conflicts_output): New.
7884 * src/conflicts.h: Adjust.
7885 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7886 * src/print.c (print_grammar): Issue `\n' between two rules.
7887 * tests/regression.at (Conflicts): New.
7888 Reported by Tom Lane.
7889
7890 2001-11-12 Akim Demaille <akim@epita.fr>
7891
7892 * tests/regression.at (Invalid input): Remove, duplicate with
7893 ``Invalid input: 1''.
7894
7895 2001-11-12 Akim Demaille <akim@epita.fr>
7896
7897 * tests/torture.at (AT_DATA_STACK_TORTURE)
7898 (Exploding the Stack Size with Alloca)
7899 (Exploding the Stack Size with Malloc): New.
7900
7901 2001-11-12 Akim Demaille <akim@epita.fr>
7902
7903 * src/bison.simple (YYSTACK_REALLOC): New.
7904 (yyparse) [!yyoverflow]: Use it and free the old stack.
7905 Reported by Per Allansson.
7906
7907 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7908
7909 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7910 define CPP macro, which substitute YYSTYPE by yystype.
7911 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7912 with yyltype/YYLTYPE. This allows inclusion of the generated
7913 header within the parser if the compiler, such as GGC, accepts
7914 multiple equivalent #defines.
7915 From Akim.
7916
7917 2001-11-05 Akim Demaille <akim@epita.fr>
7918
7919 * src/reader.c (symbols_output): New, extracted from...
7920 (packsymbols): here.
7921 (reader): Adjust.
7922
7923 2001-11-05 Akim Demaille <akim@epita.fr>
7924
7925 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7926
7927 2001-11-05 Akim Demaille <akim@epita.fr>
7928
7929 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7930 pattern.
7931
7932 2001-11-05 Akim Demaille <akim@epita.fr>
7933
7934 * src/options.h (struct option_table_struct): set_flags is void*.
7935 * src/options.c (longopts): Support `--output' and `%output'.
7936 (usage): Adjust.
7937 * src/lex.h (tok_setopt): Remove, replaced with...
7938 (tok_intopt, tok_stropt): these new guys.
7939 * src/lex.c (getopt.h): Not needed.
7940 (token_buffer, unlexed_token_buffer): Not const.
7941 (percent_table): Promote `-' over `_' in directive names.
7942 Active `%name-prefix', `file-prefix', and `output'.
7943 (parse_percent_token): Accept possible arguments to directives.
7944 Promote `-' over `_' in directive names.
7945
7946 2001-11-04 Akim Demaille <akim@epita.fr>
7947
7948 * doc/bison.texinfo (Decl Summary): Split the list into
7949 `directives for grammars' and `directives for bison'.
7950 Sort'em.
7951 Add description of `%name-prefix', `file-prefix', and `output'.
7952 Promote `-' over `_' in directive names.
7953 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7954 Simplify the description of `--name-prefix'.
7955 Promote `-' over `_' in directive names.
7956 Promote `--output' over `--output-file'.
7957 Fix the description of `--defines'.
7958 * tests/output.at: Exercise %file-prefix and %output.
7959
7960 2001-11-02 Akim Demaille <akim@epita.fr>
7961
7962 * doc/refcard.tex: Update.
7963
7964 2001-11-02 Akim Demaille <akim@epita.fr>
7965
7966 * src/symtab.h (SUNDEF): New.
7967 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7968 stand for `uninitialized', instead of 0.
7969 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7970 * src/lex.c (lex): Adjust.
7971
7972 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7973 Number it 0.
7974 Let yylex return it instead of a plain 0.
7975 Reported by Dick Streefland.
7976
7977 2001-11-02 Akim Demaille <akim@epita.fr>
7978
7979 * tests/regression.at (Mixing %token styles): New test.
7980
7981 2001-11-02 Akim Demaille <akim@epita.fr>
7982
7983 * src/reader.c (parse_thong_decl): Formatting changes.
7984 (token_translations_init): New, extracted from...
7985 (packsymbols): Here.
7986 Adjust.
7987
7988 2001-11-01 Akim Demaille <akim@epita.fr>
7989
7990 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7991 Check that `9foo.y' produces correct cpp guards.
7992 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7993 guards.
7994 Reported by Wwp.
7995
7996 2001-11-01 Akim Demaille <akim@epita.fr>
7997
7998 * tests/regression.at (Invalid input: 2): New.
7999 * src/lex.c (unlexed_token_buffer): New.
8000 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8001 too.
8002 Reported by Wwp.
8003
8004 2001-11-01 Akim Demaille <akim@epita.fr>
8005
8006 * tests/calc.at: Catch up with 1.30.
8007 * configure.in: Bump to 1.49a.
8008 Adjust to newer Autotest.
8009
8010 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8011
8012 * src/conflicts.c: Move global variables rrc_total and src_total ...
8013 (print_conflicts): here.
8014 * src/output.c (output): Free global variable user_toknums.
8015 * src/lex.c (token_obstack): Become static.
8016
8017 2001-10-18 Akim Demaille <akim@epita.fr>
8018
8019 * tests/atlocal.in (GCC): Add.
8020 * tests/calc.at: s/m4_match/m4_bmatch/.
8021 s/m4_patsubst/m4_bpatsubst/.
8022 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8023 * configure.in: AC_SUBST(GCC).
8024
8025 2001-10-14 Marc Autret <autret_m@epita.fr>
8026
8027 * src/options.c (create_long_option_table): Fix.
8028
8029 2001-10-10 Akim Demaille <akim@epita.fr>
8030
8031 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8032
8033 2001-10-04 Akim Demaille <akim@epita.fr>
8034
8035 * src/reader.c (parse_union_decl): Push the caracters in
8036 union_obstack, not attrs_obstack.
8037
8038 2001-10-04 Akim Demaille <akim@epita.fr>
8039
8040 Merge in the branch 1.29.
8041
8042 * src/reader.c (packsymbols): Use a temporary obstack for
8043 `%%tokendef', since output_stack is already used elsewhere.
8044
8045 2001-10-02 Akim Demaille <akim@epita.fr>
8046
8047 Bump 1.29d.
8048
8049 2001-10-02 Akim Demaille <akim@epita.fr>
8050
8051 Version 1.29c.
8052
8053 2001-10-02 Akim Demaille <akim@epita.fr>
8054
8055 * tests/regression.at (Invalid CPP headers): New.
8056 From Alexander Belopolsky.
8057 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8058
8059 2001-10-02 Akim Demaille <akim@epita.fr>
8060
8061 * tests/regression.at (Invalid input): New.
8062 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8063 Reported by Shura.
8064
8065 2001-10-02 Akim Demaille <akim@epita.fr>
8066
8067 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8068
8069 2001-10-02 Akim Demaille <akim@epita.fr>
8070
8071 * src/output.c (output_parser): Assert `skeleton'.
8072 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8073 systems.
8074 From Shura.
8075
8076 2001-10-01 Marc Autret <autret_m@epita.fr>
8077
8078 * src/lex.h: Echo modifications.
8079 * src/lex.c (unlex): Parameter is now token_t.
8080 From Hans Aberg.
8081
8082 2001-10-01 Marc Autret <autret_m@epita.fr>
8083
8084 * src/main.c: Include lex.h.
8085 From Hans Aberg.
8086
8087 2001-09-29 Akim Demaille <akim@epita.fr>
8088
8089 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8090
8091 2001-09-28 Akim Demaille <akim@epita.fr>
8092
8093 * tests/testsuite.at: Update to newer Autotest.
8094 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8095
8096 2001-09-27 Akim Demaille <akim@epita.fr>
8097
8098 Position independent wrapper.
8099
8100 * tests/bison: Remove.
8101 * tests/bison.in: New.
8102 * configure.in: Adjust.
8103
8104 2001-09-27 Paul Eggert <eggert@twinsun.com>
8105
8106 Port quotearg fixes from tar 1.13.24.
8107
8108 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8109 tm to be declared.
8110 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8111 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8112
8113 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8114 * m4/mbrtowc.m4: New file.
8115 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8116 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8117
8118 2001-09-27 Akim Demaille <akim@epita.fr>
8119
8120 Bump to 1.29c.
8121
8122 2001-09-27 Akim Demaille <akim@epita.fr>
8123
8124 Version 1.29b.
8125
8126 2001-09-25 Akim Demaille <akim@epita.fr>
8127
8128 * src/system.h: Include `xalloc.h'.
8129 Remove it from the C files.
8130 * src/files.c (output_files): Free the obstacks.
8131 * src/lex.c (init_lex): Rename as...
8132 (lex_init): this.
8133 (lex_free): New.
8134 * src/main.c (main): Use it.
8135
8136 2001-09-24 Marc Autret <autret_m@epita.fr>
8137
8138 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8139 to output informations in fout (FILE*).
8140 (open_graph, close_graph): Likewise.
8141 (output_graph, output_edge, output_node): Likewise.
8142 * src/vcg.h: Update function prototypes.
8143 * src/print_graph.c (print_graph): Open output graph file.
8144 (print_actions): Adjust.
8145 * src/files.h: Remove extern declaration.
8146 * src/files.c: Remove graph_obstack declaration.
8147 (open_files): Remove graph_obstack initialization.
8148 (output_files): Remove graph_obstack saving.
8149
8150 2001-09-24 Marc Autret <autret_m@epita.fr>
8151
8152 * src/files.c (compute_output_file_names): Fix.
8153
8154 2001-09-24 Marc Autret <autret_m@epita.fr>,
8155 Akim Demaille <akim@epita.fr>
8156
8157 * src/reader.c (reader): Remove call to free_symtab ().
8158 * src/main.c (main): Call it here.
8159 Include symtab.h.
8160 * src/conflicts.c (initialize_conflicts): Rename as...
8161 (solve_conflicts): this.
8162 * src/print.c (print_core, print_actions, print_state)
8163 (print_grammar): Dump to a file instead a `output_obstack'.
8164 (print_results): Dump `output_obstack', and then proceed with the
8165 FILE *.
8166 * src/files.c (compute_output_file_names, close_files): New.
8167 (output_files): Adjust.
8168 * src/main.c (main): Adjust.
8169
8170 2001-09-23 Marc Autret <autret_m@epita.fr>
8171
8172 * src/files.c (compute_header_macro): Computes header macro name
8173 from spec_defines_file when given.
8174
8175 2001-09-23 Marc Autret <autret_m@epita.fr>
8176
8177 * src/files.c (output_files): Add default extensions.
8178
8179 2001-09-22 Akim Demaille <akim@epita.fr>
8180
8181 * src/conflicts.c (finalize_conflicts): Rename as...
8182 (free_conflicts): this.
8183
8184 2001-09-22 Akim Demaille <akim@epita.fr>
8185
8186 * src/gram.c (gram_free): Rename back as...
8187 (dummy): this.
8188 (output_token_translations): Free `token_translations'.
8189 * src/symtab.c (free_symtab): Free the tag field.
8190
8191 2001-09-22 Akim Demaille <akim@epita.fr>
8192
8193 Remove `translations' as it is always set to true.
8194
8195 * src/gram.h: Adjust.
8196 * src/reader.c (packsymbols, parse_token_decl): Adjust
8197 * src/print.c (print_grammar): Adjust.
8198 * src/output.c (output_token_translations): Adjust.
8199 * src/lex.c (lex): Adjust.
8200 * src/gram.c: Be sure the set pointers to NULL.
8201 (dummy): Rename as...
8202 (gram_free): this.
8203
8204 2001-09-22 Akim Demaille <akim@epita.fr>
8205
8206 * configure.in: Invoke AM_LIB_DMALLOC.
8207 * src/system.h: Use dmalloc.
8208 * src/LR0.c: Be sure to have pointers initialized to NULL.
8209 (allocate_itemsets): Allocate kernel_items only if needed.
8210
8211 2001-09-22 Akim Demaille <akim@epita.fr>
8212
8213 * configure.in: Bump to 1.29b.
8214 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8215 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8216 need xmalloc.c in calc.y.
8217 From Pascal Bart.
8218
8219 2001-09-21 Akim Demaille <akim@epita.fr>
8220
8221 Version 1.29a.
8222 * Makefile.maint, config/config.guess, config/config.sub,
8223 * config/missing: Update from masters.
8224 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8225 upon package.m4.
8226 * configure.in (ALL_LINGUAS): Add `tr'.
8227
8228 2001-09-21 Akim Demaille <akim@epita.fr>
8229
8230 * tests/Makefile.am (package.m4): Move to...
8231 ($(srcdir)/$(TESTSUITE)): here.
8232
8233 2001-09-20 Akim Demaille <akim@epita.fr>
8234
8235 * src/complain.c: No longer try to be standalone: use system.h.
8236 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8237 * src/complain.h: Likewise.
8238 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8239 Remove the unused variable `n'.
8240 From Albert Chin-A-Young.
8241
8242 2001-09-18 Marc Autret <autret_m@epita.fr>
8243
8244 * doc/bison.1: Update.
8245 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8246 descriptions.
8247 (Option Cross Key): Update.
8248 Add --graph.
8249
8250 2001-09-18 Marc Autret <autret_m@epita.fr>
8251
8252 * tests/regression.at: New test (comment in %union).
8253
8254 2001-09-18 Marc Autret <autret_m@epita.fr>
8255
8256 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8257 do that.
8258 Reported by Keith Browne.
8259
8260 2001-09-18 Marc Autret <autret_m@epita.fr>
8261
8262 * tests/output.at: Add tests for --defines and --graph.
8263
8264 2001-09-18 Marc Autret <autret_m@epita.fr>
8265
8266 * tests/output.at: Removes tests of %{header,src}_extension features.
8267
8268 2001-09-18 Akim Demaille <akim@epita.fr>
8269
8270 * tests/Makefile.am (package.m4): New.
8271 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8272 (_AT_CHECK_CALC_ERROR): Likewise.
8273 Factor the `, ' part of verbose error messages.
8274
8275 2001-09-18 Marc Autret <autret_m@epita.fr>
8276
8277 * src/getargs.c (longopts): Declare --defines and --graph as options
8278 with optional arguments.
8279 * src/files.h: Add extern declarations.
8280 * src/files.c (spec_graph_file, spec_defines_file): New.
8281 (output_files): Update.
8282 Remove CPP-outed code.
8283
8284 2001-09-18 Marc Autret <autret_m@epita.fr>
8285
8286 Turn off %{source,header}_extension feature.
8287
8288 * src/files.c (compute_exts_from_gf): Update.
8289 (compute_exts_from_src): Update.
8290 (output_files): CPP-out useless code.
8291 * src/files.h: Remove {header,source}_extension extern declarations.
8292 * src/reader.c (parse_dquoted_param): CPP-out.
8293 (parse_header_extension_decl): Remove.
8294 (parse_source_extension_decl): Remove.
8295 (read_declarations): Remove cases tok_{hdrext,srcext}.
8296 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8297 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8298
8299 2001-09-10 Akim Demaille <akim@epita.fr>
8300
8301 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8302 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8303 (AT_CHECK_OUTPUT): this.
8304 Merely check ls' exit status, its output is useless.
8305
8306 2001-09-10 Akim Demaille <akim@epita.fr>
8307
8308 * tests/calc.at: Use m4_match.
8309 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8310
8311 2001-09-10 Marc Autret <autret_m@epita.fr>,
8312 Akim Demaille <akim@epita.fr>
8313
8314 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8315 enum color_e.
8316 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8317 to `normal'.
8318 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8319 * src/lex.h: Adjust prototype.
8320 (token_t): Add `tok_undef'.
8321 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8322 (parse_percent_token): Now returns token_t.
8323 Add default statement in switch.
8324 (lex): Separate `c' as an input variable, from the token_t result
8325 part.
8326 (unlexed): Is a token_t.
8327
8328 2001-09-10 Akim Demaille <akim@epita.fr>
8329
8330 * configure.in: Bump to 1.29a.
8331
8332 2001-09-07 Akim Demaille <akim@epita.fr>
8333
8334 Version 1.29.
8335
8336 2001-08-30 Akim Demaille <akim@epita.fr>
8337
8338 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8339 * m4/atconfig.m4: Remove.
8340 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8341 * tests/bison: New.
8342 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8343 m4_if, m4_patsubst, and m4_regexp.
8344 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8345 `input' file instead of echo.
8346
8347 2001-08-29 Akim Demaille <akim@epita.fr>
8348
8349 Bump to 1.28e.
8350
8351 2001-08-29 Akim Demaille <akim@epita.fr>
8352
8353 Version 1.28d.
8354
8355 2001-08-29 Paul Eggert <eggert@twinsun.com>
8356
8357 * src/bison.simple (yyparse): Don't take the address of an
8358 item before the start of an array, as that doesn't conform to
8359 the C Standard.
8360
8361 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8362
8363 * doc/bison.texinfo (Location Tracking Calc): New node.
8364
8365 2001-08-29 Paul Eggert <eggert@twinsun.com>
8366
8367 * src/output.c (output): Do not define const, as this now
8368 causes more problems than it cures.
8369
8370 2001-08-29 Akim Demaille <akim@epita.fr>
8371
8372 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8373 the nodes.
8374 Be sure to tag the `detailmenu'.
8375
8376 2001-08-29 Akim Demaille <akim@epita.fr>
8377
8378 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8379 download in a tmp dir.
8380
8381 2001-08-28 Marc Autret <autret_m@epita.fr>
8382
8383 * config/depcomp: New file.
8384
8385 2001-08-28 Marc Autret <autret_m@epita.fr>
8386
8387 * doc/bison.1 (mandoc): Adjust.
8388 From Juan Manuel Guerrero.
8389
8390 2001-08-28 Marc Autret <autret_m@epita.fr>
8391
8392 * src/print_graph.c (print_state): Fix.
8393
8394 2001-08-27 Marc Autret <autret_m@epita.fr>
8395
8396 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8397 char * members.
8398 Echo modifications to the functions prototypes.
8399 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8400
8401 2001-08-27 Marc Autret <autret_m@epita.fr>
8402
8403 * src/vcg.c: Include `xalloc.h'.
8404 (add_colorentry): New.
8405 (add_classname): New.
8406 (add_infoname): New.
8407 * src/vcg.h: Add new prototypes.
8408
8409 2001-08-27 Akim Demaille <akim@epita.fr>
8410
8411 * Makefile.maint: Sync. again with CVS Autoconf.
8412
8413 2001-08-27 Akim Demaille <akim@epita.fr>
8414
8415 * Makefile.maint: Formatting changes.
8416 (po-update, cvs-update, update): New targets.
8417 (AMTAR): Remove.
8418
8419 2001-08-27 Akim Demaille <akim@epita.fr>
8420
8421 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8422 * Makefile.maint: Sync. with CVS Autoconf.
8423
8424 2001-08-27 Marc Autret <autret_m@epita.fr>
8425
8426 * src/vcg.h (struct infoname_s): New.
8427 (struct colorentry_s): New.
8428 (graph_s): New fields {vertical,horizontal}_order in structure.
8429 Add `infoname' field.
8430 Add `colorentry' field;
8431 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8432 (G_HORIZONTAL_ORDER): New.
8433 (G_INFONAME): New.
8434 (G_COLORENTRY): New.
8435 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8436 Add output of `infoname'.
8437 Add output of `colorentry'.
8438
8439 2001-08-27 Marc Autret <autret_m@epita.fr>
8440
8441 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8442 This one shadowed a global parameter.
8443
8444 2001-08-24 Marc Autret <autret_m@epita.fr>
8445
8446 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8447 instead of `unsigned'.
8448 (print_state): Do not call obstack_object_size () in obstack_grow ()
8449 to avoid macro variables shadowing.
8450
8451 2001-08-23 Marc Autret <autret_m@epita.fr>
8452
8453 * src/lex.c (percent_table): Typo: s/naem/name/.
8454 Add graph option.
8455 Normalize new options declarations.
8456
8457 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8458
8459 * tests/suite.at: Exercise %header_extension and %source_extension.
8460
8461 2001-08-16 Marc Autret <autret_m@epita.fr>
8462
8463 * src/reader.c (parse_dquoted_param): New.
8464 (parse_header_extension_decl): Use it.
8465 (parse_source_extension_decl): Likewise.
8466
8467 2001-08-16 Marc Autret <autret_m@epita.fr>
8468
8469 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8470 (get_xxxx_str): Use assert () instead of complain ().
8471 Remove return invokations in default cases.
8472 (get_decision_str): Modify default behaviour. Remove second argument.
8473 Echo modifications on calls.
8474 (output_graph): Fix.
8475
8476 2001-08-16 Marc Autret <autret_m@epita.fr>
8477
8478 * src/getargs.c (usage): Update with ``-g, --graph''.
8479
8480 2001-08-16 Marc Autret <autret_m@epita.fr>
8481
8482 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8483 (Option Cross Key): Likewise.
8484 * doc/bison.1: Update.
8485
8486 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8487
8488 * src/output.c (output_master_parser): Don't finish action_obstack.
8489 (output_parser): Don't care about the muscle action, here.
8490 (prepare): Copy the action_obstack in the action muscle.
8491 (output): Free action_obstack.
8492
8493 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8494
8495 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8496 will contain `%union' declaration.
8497 (parse_union_decl): Delete #line directive output.
8498 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8499 informations about %union.
8500 (parse_union_decl): Copy the union_obstack in the muscle stype.
8501 * src/bison.simple: Add new #line directive.
8502 Add typdef %%stype YYSTYPE.
8503
8504 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8505
8506 * src/bison.simple: Add new `#line' directive.
8507
8508 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8509
8510 * src/bison.simple: New `#line' directive.
8511 * src/output.c (output_parser): Support new dynamic muscle input_line.
8512
8513 2001-09-22 Marc Autret <autret_m@epita.fr>
8514
8515 * src/output.c (output_master_parser): New.
8516 (output_parser): Be more re-entrant.
8517
8518 2001-09-21 Marc Autret <autret_m@epita.fr>
8519
8520 * src/reader.c (copy_definition, parse_union_decl): Update and use
8521 `linef' muscle.
8522 (copy_action): Likewise.
8523 Use obstack_1grow ().
8524 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8525
8526 2001-09-21 Marc Autret <autret_m@epita.fr>
8527
8528 * src/options.c (option_table): Adjust.
8529 * src/lex.c (parse_percent_token): Fix.
8530
8531 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8532
8533 * src/options.c (symtab.h): Include it, need by lex.h.
8534
8535 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8536
8537 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8538 is now an option_table_struct*.
8539 (option_strcmp): New function option_strcmp.
8540 (parse_percent_token): Call option_strcmp.
8541 * src/getargs.c (xalloc.h, options.h): Include it.
8542 (getargs): Call create_long_option_table.
8543 (getargs): Free longopts at the end of the function.
8544 (shortopts): Move in options.c.
8545 * src/options.c (create_long_option_table): New function. Convert
8546 information from option_table to option structure.
8547 * src/reader.c (options.h): Include it.
8548
8549 * src/Makefile.am: Adjust.
8550 * src/options.c (option_table): Create from longopts and percent_table.
8551 * src/getargs.c (longopts): Delete.
8552 * src/lex.c (struct percent_table_struct): Delete.
8553 (percent_table): Delete.
8554 (options.h): Include it.
8555 * src/options.c: Create.
8556 * src/options.h: Create.
8557 Declare enum opt_access_e.
8558 Define struct option_table_struct.
8559
8560 2001-09-20 Marc Autret <autret_m@epita.fr>
8561
8562 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8563 sections of Bison.
8564
8565 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8566
8567 * src/bison.simple: s/%%filename/%%skeleton.
8568 * src/muscle_tab.c (getargs.h): Include it.
8569 (muscle_init): Insert new muscle skeleton.
8570
8571 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8572
8573 * src/output.c (output_parser): Delete unused variable actions_dumped.
8574
8575 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8576
8577 * src/output.c (output): Delete call to reader_output_yylsp.
8578 * src/reader.c (reader): Likewise.
8579 * src/reader.h: Delete declaration of reader_output_yylsp.
8580
8581 2001-09-02 Marc Autret <autret_m@epita.fr>
8582
8583 * src/reader.c: Include muscle_tab.h.
8584 (parse_union_decl): Update.
8585 (parse_macro_decl): Rename parse_muscle_decl.
8586 Update to use renamed functions and variable.
8587 (read_declarations, copy_action, read_additionnal_code, : Updated
8588 with correct variables and functions names.
8589 (packsymbols, reader): Likewise.
8590
8591 * src/reader.h (muscle_obstack): Extern declaration update.
8592
8593 * src/output.c: Include muscle_tab.h
8594 In all functions using macro_insert, change by using muscle_insert ().
8595 (macro_obstack): Rename muscle_obstack.
8596 Echo modifications in the whole file.
8597 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8598 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8599 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8600
8601 * src/muscle_tab.h: Update double inclusion macros.
8602 (macro_entry_s): Rename muscle_entry_s.
8603 Update prototypes.
8604
8605 * src/muscle_tab.c: Include muscle_tab.h.
8606 Rename macro_tabble to muscle_table.
8607 (mhash1, mhash2, mcmp): Use muscle_entry.
8608 (macro_init): Rename muscle_init. Update.
8609 (macro_insert): Rename muscle_insert. Update.
8610 (macro_find): Rename muscle_find. Update.
8611
8612 * src/main.c: Include muscle_tab.h.
8613 (main): Call muscle_init ().
8614 * src/Makefile.am (bison_SOURCES): Echo modifications.
8615
8616 2001-09-02 Marc Autret <autret_m@epita.fr>
8617
8618 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8619
8620 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8621
8622 2001-09-02 Marc Autret <autret_m@epita.fr>
8623
8624 * src/macrotab.c, src/macrotab.h: Remove.
8625
8626 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8627
8628 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8629 filename.
8630
8631 2001-09-01 Marc Autret <autret_m@epita.fr>
8632
8633 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8634 to an explicit value to activate the feature. We do it here.
8635
8636 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8637
8638 * src/output.c (prepare): Delete the `filename' muscule insertion.
8639 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8640 (parse_union_decl): Likewise.
8641 * src/macrotab.c (macro_init): Initialize filename by infile.
8642
8643 2001-08-31 Marc Autret <autret_m@epita.fr>
8644
8645 * src/bison.simple (YYLSP_NEEDED): New definition.
8646 * src/output.c (prepare): Add macro insertion of `locations_flag'
8647
8648 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8649
8650 * src/output.c (prepare): Delete insertion of previous muscles,
8651 and insert the `prefix' muscles.
8652 * src/macrotab.c (macro_init): Likewise.
8653 (macro_init): Initialization prefix directive by `yy'.
8654 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8655 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8656 yylval, yydebug, yyerror, yynerrs and yyparse.
8657 New directive `#define' to substitute yydebug, ... with option
8658 name_prefix.
8659
8660 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8661
8662 * src/main.c (main): Standardize.
8663 * src/output.c (output_table_data, output_parser): Likewise.
8664 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8665
8666 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8667
8668 * src/reader.c (read_additionnal_code): Rename %%user_code to
8669 %%epilogue.
8670 * src/output.c (output): Rename %%declarations to %%prologue.
8671 * src/bison.simple: Echo modifications.
8672
8673 2001-08-31 Marc Autret <autret_m@epita.fr>
8674
8675 * src/reader.c (readgram): CleanUp.
8676 (output_token_defines): Likewise.
8677 (packsymbols): Likewise.
8678 (reader): Likewise.
8679 * src/output.c (output): CPP-out useless code.
8680
8681 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8682
8683 * src/reader.c (reader): Delete obsolete call to function
8684 output_trailers and output_headers.
8685 * src/output.h: Remove obsolete functions prototypes of output_headers
8686 and output_trailers.
8687
8688 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8689
8690 * src/main.c: Include macrotab.h.
8691 * src/macrotab.h (macro_entry_s): Constify fields.
8692 Adjust functions prototypes.
8693 * src/macrotab.c (macro_insert): Constify key and value.
8694 (macro_find): Constify key.
8695 (macro_insert): Include 'xalloc.h'
8696 (macro_insert): Use XMALLOC.
8697 (macro_find): Constify return value.
8698 * src/output.c (output_table_data): Rename table to table_data.
8699 (output_parser): Constify macro_key, macro_value.
8700
8701 2001-08-30 Marc Autret <autret_m@epita.fr>
8702
8703 * src/reader.c (parse_skel_decl): New.
8704 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8705 * src/lex.h (token_t): New token `tok_skel'.
8706 * src/lex.c (percent_table): Add skeleton option entry.
8707 Standardize.
8708
8709 2001-08-29 Marc Autret <autret_m@epita.fr>
8710
8711 * src/bison.simple: Add %%user_code directive at the end.
8712 * src/reader.c (read_additionnal_code): New.
8713 (reader): Use it.
8714 * src/output.c (output_program): Remove.
8715 (output): Update.
8716
8717 2001-08-28 Marc Autret <autret_m@epita.fr>
8718
8719 * src/output.c (output_actions): Clean up.
8720 (output_gram): CPP-out useless code.
8721 * src/reader.c (reader): Clean up, CPP-out useless code.
8722
8723 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8724
8725 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8726 directive.
8727 * src/bison.simple: Add `%%definitions'.
8728
8729 2001-08-28 Marc Autret <autret_m@epita.fr>
8730
8731 * config/depcomp: New file.
8732
8733 2001-08-27 Paul Eggert <eggert@twinsun.com>
8734
8735 * src/bison.simple (yyparse): Don't take the address of an
8736 item before the start of an array, as that doesn't conform to
8737 the C Standard.
8738
8739 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8740
8741 * src/output.c (output): Remove the initialization of the macro
8742 obstack. It was done too late here.
8743
8744 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8745 completely wrong.
8746 (reader): Initialize the macro obstack here, since we need it to grow
8747 '%define' directives.
8748
8749 * src/reader.h: Declare the macro obstack as extern.
8750
8751 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8752
8753 * src/output.c (output_parser): Fix. Store single '%' characters in
8754 the output obstack instead of throwing them away.
8755
8756 2001-08-27 Akim Demaille <akim@epita.fr>
8757
8758 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8759
8760 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8761
8762 * lib/Makefile.am: Adjust.
8763
8764 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8765
8766 * src/bison.simple: Update and add '%%' directives.
8767
8768 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8769
8770 * src/reader.c (reader): Remove calls to 'output_headers' and
8771 'output_trailers'. Remove some C output.
8772 (readgram): Disable a piece of code that was writing a default
8773 definition for 'YYSTYPE'.
8774 (reader_output_yylsp): Remove.
8775 (packsymbols): Output token defintions to a macro.
8776 (copy_definition): Disable C output.
8777
8778 * src/reader.c (parse_macro_decl): New function used to parse macro
8779 declarations.
8780 (copy_string2): Put the body of copy_string into this new function.
8781 Add a parameter to let the caller choose whether he wants to copy the
8782 string delimiters or not.
8783 (copy_string): Be a simple call to copy_string2 with the last argument
8784 bound to true.
8785 (read_declarations): Add case for macro definition.
8786 (copy_identifier): New.
8787 (parse_macro_decl): Read macro identifiers using copy_identifier
8788 rather than lex.
8789
8790 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8791
8792 * src/output.c (prepare): Add prefixed names.
8793 (output_parser): Output semantic actions.
8794 (output_parser): Fix bug on '%%line' directives.
8795
8796 * src/output.c (output_headers): Remove. The C code printed by this
8797 function should now be in the skeletons.
8798 (output_trailers): Remove.
8799 (output): Disable call to 'reader_output_yylsp'.
8800 (output_rule_data): Do not output tables to the table obstack.
8801
8802 * src/output.c: Remove some C dedicated output.
8803 Improve the use of macro and output obstacks.
8804 (output_defines): Remove.
8805
8806 * src/output.c (output_token_translations): Associate 'translate'
8807 table with a macro. No output to the table obstack.
8808 (output_gram): Same for 'rhs' and 'prhs'.
8809 (output_stos): Same for 'stos'.
8810 (output_rule_data): Same for 'r1' and 'r2'.
8811 (token_actions): Same for 'defact'.
8812 (goto_actions): Same for 'defgoto'.
8813 (output_base): Same for 'pact' and 'pgoto'.
8814 (output_table): Same for 'table'.
8815 (output_check): Same for 'check'.
8816
8817 * src/output.c (output_table_data): New function.
8818 (output_short_table): Remove.
8819 (output_short_or_char_table): Remove.
8820
8821 * src/output.c (output_parser): Replace most of the skeleton copy code
8822 with something new. Skeletons are now processed character by character
8823 rather than line by line, and Bison looks for '%%' macros. This is the
8824 first step in making Bison's output process (a lot) more flexible.
8825 (output_parser): Use the macro table.
8826
8827 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8828
8829 * src/main.c (main): Initialize the macro table.
8830
8831 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8832
8833 * src/lex.c (percent_table): Add tok_define.
8834 * src/lex.h: Add tok_define.
8835
8836 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8837
8838 * src/macrotab.c: New file.
8839 * src/macrotab.h: New file.
8840 * src/Makefile.am: Update.
8841
8842 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8843
8844 * lib/hash.c: New file.
8845 * lib/hash.h: New file.
8846 * lib/Makefile.am: Update.
8847
8848 2001-08-15 Akim Demaille <akim@epita.fr>
8849
8850 Version 1.28c.
8851
8852 2001-08-15 Marc Autret <autret_m@epita.fr>
8853
8854 * src/reader.c (readgram): Indent output macro YYSTYPE.
8855 (packsymbols): Likewise.
8856 (output_token_defines): Likewise.
8857 * src/files.c: Standardize.
8858 (compute_header_macro): New.
8859 (defines_obstack_save): New. Use compute_header_macro.
8860 (output_files): Update. Use defines_obstack_save.
8861
8862 2001-08-15 Akim Demaille <akim@epita.fr>
8863
8864 * doc/bison.texinfo (Table of Symbols): Document
8865 YYSTACK_USE_ALLOCA.
8866
8867 2001-08-15 Akim Demaille <akim@epita.fr>
8868
8869 * missing: Update from CVS Automake.
8870 * config/config.guess, config/config.sub, config/texinfo.tex:
8871 Update from gnu.org.
8872
8873 2001-08-15 Akim Demaille <akim@epita.fr>
8874
8875 * Makefile.maint: Sync with CVS Autoconf.
8876
8877 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8878
8879 * doc/bison.texinfo: Include GNU Free Documentation License from
8880 `fdl.texi'.
8881 * doc/fdl.texi: Add to package.
8882
8883 2001-08-14 Marc Autret <autret_m@epita.fr>
8884
8885 Turn on %{source,header}_extension features.
8886
8887 * src/lex.c (percent_table): Un-CPP out header_extension and
8888 source_extension.
8889 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8890 (compute_exts_from_src): Remove conditions. It restores priorities
8891 between options.
8892
8893 2001-08-14 Marc Autret <autret_m@epita.fr>
8894
8895 * src/files.c (compute_base_names): Add extensions computing when
8896 `--file-prefix' used.
8897 Standardize function calls.
8898
8899 2001-08-13 Marc Autret <autret_m@epita.fr>
8900
8901 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8902 defining it (defined but null disables alloca).
8903
8904 2001-08-13 Marc Autret <autret_m@epita.fr>
8905
8906 * src/bison.simple (_yy_memcpy): CPP reformat.
8907
8908 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8909
8910 * tests/atconfig.in (CPPFLAGS): Fix.
8911
8912 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8913
8914 * doc/bison.texinfo: Include GNU General Public License from
8915 `gpl.texi'.
8916 * doc/gpl.texi: Add to package.
8917
8918 2001-08-10 Marc Autret <autret_m@epita.fr>
8919
8920 * src/print_graph.h: Fix.
8921 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8922
8923 2001-08-10 Akim Demaille <akim@epita.fr>
8924
8925 * src/system.h: Provide default declarations for stpcpy, strndup,
8926 and strnlen.
8927
8928 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8929
8930 * doc/bison.texinfo (Locations): Update @$ stuff.
8931
8932 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8933
8934 * src/bison.simple (YYLLOC_DEFAULT): Update.
8935 (yyparse): Adjust.
8936
8937 2001-08-08 Marc Autret <autret_m@epita.fr>
8938
8939 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8940 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8941 Reported by Fabrice Bauzac.
8942
8943 2001-08-08 Marc Autret <autret_m@epita.fr>
8944
8945 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8946 * src/vcg.c (output_node): Fix.
8947 * src/vcg.h: Cleanup.
8948 * src/print_graph.c: Add comments.
8949 (node_output_size): New global variable. Simplify the formatting of
8950 the VCG graph output.
8951 (print_actions): Unused code is now used. It notifies the final state
8952 and no action states in the VCG graph. It also give the reduce actions.
8953 The `shift and goto' edges are red and the `go to state' edges are
8954 blue.
8955 Get the current node name and node_obstack by argument.
8956 (node_obstack): New variable.
8957 (print_state): Manage node_obstack.
8958 (print_core): Use node_obstack given by argument.
8959 A node is not only computed here but in print_actions also.
8960 (print_graph): CPP out useless code instead of commenting it.
8961
8962 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8963
8964 * tests/atconfig.in (CPPFLAGS): Fix.
8965
8966 2001-08-07 Akim Demaille <akim@epita.fr>
8967
8968 * src/print_graph.c (quote): New.
8969 (print_core): Use it.
8970
8971 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8972
8973 * src/vcg.c (complain.h): Include it.
8974 Unepitaize `return' invocations.
8975 [NDEBUG] (main): Remove.
8976 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8977 * src/files.c (open_files): Initialize graph_obstack.
8978 * src/print_graph.c (print_actions): CPP out useless code.
8979 (print_core): Don't output the last `\n' in labels.
8980 Use `quote'.
8981 * src/files.c (output_files): Output the VCG file.
8982 * src/main.c (main): Invoke print_graph ();
8983
8984 2001-08-06 Marc Autret <autret_m@epita.fr>
8985
8986 Automaton VCG graph output.
8987 Using option ``-g'' or long option ``--graph'', you can generate
8988 a gram_filename.vcg file containing a VCG description of the LALR (1)
8989 automaton of your grammar.
8990
8991 * src/main.c: Call to print_graph() function.
8992 * src/getargs.h: Update.
8993 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8994 (graph_flag): New flag.
8995 (longopts): Update.
8996 (getargs): Add case `g'.
8997 * src/files.c (graph_obstack): New obstack struct.
8998 (open_files): Initialize new obstack.
8999 (output_files): Saves graph_obstack if required.
9000 * src/files.h (graph_obstack): New extern declaration.
9001 * src/Makefile.am: Add new source files.
9002
9003 2001-08-06 Marc Autret <autret_m@epita.fr>
9004
9005 * src/print_graph.c, src/print_graph.h (graph): New.
9006 * src/vcg.h: New file.
9007 * src/vcg.c: New file, VCG graph handling.
9008
9009 2001-08-06 Marc Autret <autret_m@epita.fr>
9010
9011 Add of %source_extension and %header_extension which specify
9012 the source or/and the header output file extension.
9013
9014 * src/files.c (compute_base_names): Remove initialisation of
9015 src_extension and header_extension.
9016 (compute_exts_from_gf): Update.
9017 (compute_exts_from_src): Update.
9018 (output_files): Update.
9019 * src/reader.c (parse_header_extension_decl): New.
9020 (parse_source_extension_decl): New.
9021 (read_declarations): New case statements for the new tokens.
9022 * src/lex.c (percent_table): Add entries for %source_extension
9023 and %header_extension.
9024 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9025
9026 2001-08-06 Marc Autret <autret_m@epita.fr>
9027
9028 * configure.in: Bump to 1.28c.
9029 * doc/bison.texinfo: Texinfo thingies.
9030
9031 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
9032
9033 * tests/atconfig.in (CPPFLAGS): Add.
9034 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9035
9036 2001-08-03 Akim Demaille <akim@epita.fr>
9037
9038 Version 1.28b.
9039
9040 2001-08-03 Akim Demaille <akim@epita.fr>
9041
9042 * tests/Makefile.am (check-local): Ship testsuite.
9043 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9044 Include `string.h'.
9045
9046 2001-08-03 Akim Demaille <akim@epita.fr>
9047
9048 * configure.in: Try using -Wformat when compiling.
9049
9050 2001-08-03 Akim Demaille <akim@epita.fr>
9051
9052 * configure.in: Bump to 1.28b.
9053
9054 2001-08-03 Akim Demaille <akim@epita.fr>
9055
9056 * src/complain.c: Adjust strerror_r portability issues.
9057
9058 2001-08-03 Akim Demaille <akim@epita.fr>
9059
9060 Version 1.28a.
9061
9062 2001-08-03 Akim Demaille <akim@epita.fr>
9063
9064 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9065 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9066 * src/getargs.c: Include complain.h.
9067 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9068 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9069
9070 2001-08-03 Akim Demaille <akim@epita.fr>
9071
9072 * src/reader.c (readgram): Display hidden chars in error messages.
9073
9074 2001-08-03 Akim Demaille <akim@epita.fr>
9075
9076 Update to gettext 0.10.39.
9077
9078 2001-08-03 Akim Demaille <akim@epita.fr>
9079
9080 * lib/strspn.c: New.
9081
9082 2001-08-01 Marc Autret <autret_m@epita.fr>
9083
9084 * doc/bison.texinfo: Update.
9085 * doc/bison.1 (mandoc): Update.
9086 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9087 * src/files.c: Support output files extensions computing.
9088 (src_extension): New static variable.
9089 (header_extension): New static variable.
9090 (tr): New function.
9091 (get_extension_index): New function, gets the index of an extension
9092 filename in a string.
9093 (compute_exts_from_gf): New function, computes extensions from the
9094 grammar file extension.
9095 (compute_exts_from_src): New functions, computes extensions from the
9096 C source file extension, file given by ``-o'' option.
9097 (compute_base_names): Update.
9098 (output_files): Update.
9099
9100 2001-08-01 Robert Anisko <anisko_r@epita.fr>
9101
9102 * doc/bison.texi: Document @$.
9103 (Locations): New section.
9104
9105 2001-07-18 Akim Demaille <akim@epita.fr>
9106
9107 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9108 * config/prev-version.txt, config/move-if-change: New.
9109 * Makefile.am: Adjust.
9110
9111 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
9112
9113 * src/bison.simple (yyparse): Suppress warning `comparaison
9114 between signed and unsigned'.
9115
9116 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
9117
9118 * src/getargs.h (raw_flag): Remove.
9119 * src/getargs.c: Die on `-r'/`--raw'.
9120 * src/lex.c (parse_percent_token): Die on `%raw'.
9121 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9122 * tests/calc.at: Suppress test with option `--raw'.
9123
9124 2001-07-14 Akim Demaille <akim@epita.fr>
9125
9126 * config/: New.
9127 * configure.in: Require Autoconf 2.50.
9128 Update to gettext 0.10.38.
9129
9130 2001-03-16 Akim Demaille <akim@epita.fr>
9131
9132 * doc/bison.texinfo: ANSIfy the examples.
9133
9134 2001-03-16 Akim Demaille <akim@epita.fr>
9135
9136 * getargs.c (skeleton): New variable.
9137 (longopts): --skeleton is a new option.
9138 (shortopts, getargs): -S is a new option.
9139 * getargs.h: Declare skeleton.
9140 * output.c (output_parser): Use it.
9141
9142 2001-03-16 Akim Demaille <akim@epita.fr>
9143
9144 * m4/strerror_r.m4: New.
9145 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9146 * lib/error.h, lib/error.c: Update.
9147
9148 2001-03-16 Akim Demaille <akim@epita.fr>
9149
9150 * src/getargs.c (longopts): Clean up.
9151
9152 2001-02-21 Akim Demaille <akim@epita.fr>
9153
9154 * src/reader.c (gensym): `gensym_count' is your own.
9155 Use a static buf to create the symbol name, as token_buffer is no
9156 longer a buffer.
9157
9158 2001-02-08 Akim Demaille <akim@epita.fr>
9159
9160 * src/conflicts.c (conflict_report): Be sure not to append to res
9161 between two calls, which could happen if both first sprintf were
9162 skipped, but not the first cp += strlen.
9163
9164 2001-02-08 Akim Demaille <akim@epita.fr>
9165
9166 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9167 New, from fileutils 4.0.37.
9168 * configure.in: Require Autoconf 2.49c. I took some time before
9169 making this decision. This is the only way out for portability
9170 issues in Bison, it would mean way too much duplicate effort to
9171 import in Bison features implemented in 2.49c since 2.13.
9172 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9173
9174 2001-02-02 Akim Demaille <akim@epita.fr>
9175
9176 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9177 * lib/xalloc.h, lib/xmalloc.c: Update.
9178
9179 2001-01-19 Akim Demaille <akim@epita.fr>
9180
9181 Get rid of the ad hoc handling of token_buffer in the scanner: use
9182 the obstacks.
9183
9184 * src/lex.c (token_obstack): New.
9185 (init_lex): Initialize it. No longer call...
9186 (grow_token_buffer): this. Remove it.
9187 Adjust all the places which used it to use the obstack.
9188
9189 2001-01-19 Akim Demaille <akim@epita.fr>
9190
9191 * src/lex.h: Rename all the tokens:
9192 s/\bENDFILE\b/tok_eof/g;
9193 s/\bIDENTIFIER\b/tok_identifier/g;
9194 etc.
9195 Let them be enums, not #define, to ease debugging.
9196 Adjust all the code.
9197
9198 2001-01-18 Akim Demaille <akim@epita.fr>
9199
9200 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9201 * src/lex.c (maxtoken, grow_token_buffer): Static.
9202
9203 2001-01-18 Akim Demaille <akim@epita.fr>
9204
9205 Since we now use obstacks, more % directives can be enabled.
9206
9207 * src/lex.c (percent_table): Also accept `%yacc',
9208 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9209 `%debug'.
9210 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9211 instead of returning a token.
9212 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9213 * src/reader.c (read_declarations): Adjust.
9214 * src/files.c (open_files): Don't call `compute_base_names', don't
9215 compute `attrsfile' since they depend upon data which might be
9216 *in* the input file now.
9217 (output_files): Do it here.
9218 * src/output.c (output_headers): Document the fact that this patch
9219 introduces a guaranteed SEGV for semantic parsers.
9220 * doc/bison.texinfo: Document them.
9221 * tests/suite.at: Exercise these %options.
9222
9223 2000-12-20 Akim Demaille <akim@epita.fr>
9224
9225 Also handle the output file (--verbose) with obstacks.
9226
9227 * files.c (foutput): Remove.
9228 (output_obstack): New.
9229 Adjust all dependencies.
9230 * src/conflicts.c: Return a string.
9231 * src/system.h (obstack_grow_string): Rename as...
9232 (obstack_sgrow): this. Be ready to work with non literals.
9233 (obstack_fgrow4): New.
9234
9235 2000-12-20 Akim Demaille <akim@epita.fr>
9236
9237 * src/files.c (open_files): Fix the computation of short_base_name
9238 in the case of `-o foo.tab.c'.
9239
9240 2000-12-20 Akim Demaille <akim@epita.fr>
9241
9242 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9243 (copy_dollar): Now that everything uses obstacks, get rid of the
9244 FILE * parameters.
9245
9246 2000-12-20 Akim Demaille <akim@epita.fr>
9247
9248 * src/files.c (open_files): Actually the `.output' file is based
9249 on the short_base_name, not base_name.
9250 * tests/suite.at (Checking output file names): Adjust.
9251
9252 2000-12-20 Akim Demaille <akim@epita.fr>
9253
9254 * src/bison.s1: Remove, we now use directly...
9255 * src/bison.simple: this.
9256 * src/Makefile.am: Use pkgdata instead of data.
9257
9258 2000-12-20 Akim Demaille <akim@epita.fr>
9259
9260 * src/files.c (guard_obstack): New.
9261 (open_files): Initialize it.
9262 (output_files): Dump it...
9263 * src/files.h: Export it.
9264 * src/reader.c (copy_guard): Use it.
9265
9266 2000-12-19 Akim Demaille <akim@epita.fr>
9267
9268 * src/files.c (outfile, defsfile, actfile): Removed as global
9269 vars.
9270 (open_files): Don't compute them.
9271 (output_files): Adjust.
9272 (base_name, short_base_name): Be global.
9273 Adjust dependencies.
9274
9275 2000-12-19 Akim Demaille <akim@epita.fr>
9276
9277 * src/files.c (strsuffix): New.
9278 (stringappend): Be just like strcat but allocate.
9279 (base_names): Eve out from open_files.
9280 Try to simplify the rather hairy computation of base_name and
9281 short_base_name.
9282 (open_files): Use it.
9283 * tests/suite.at (Checking output file names): New test.
9284
9285 2000-12-19 Akim Demaille <akim@epita.fr>
9286
9287 * src/system.h (obstack_grow_literal_string): Rename as...
9288 (obstack_grow_string): this.
9289 * src/output.c (output_parser): Recognize `%% actions' instead of
9290 `$'.
9291 * src/bison.s1: s/$/%% actions/.
9292 * src/bison.hairy: Likewise.
9293
9294 2000-12-19 Akim Demaille <akim@epita.fr>
9295
9296 * src/output.c (output_parser): Compute the `#line' lines when
9297 there are.
9298 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9299 Suggested by Hans Aberg.
9300
9301 2000-12-19 Akim Demaille <akim@epita.fr>
9302
9303 Let the handling of the skeleton files be local to the procedures
9304 that use it.
9305
9306 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9307 longer static.
9308 (fparser, open_extra_files): Remove.
9309 (open_files, output_files): Don't take care of fparser.
9310 * src/files.h: Adjust.
9311 * src/output.c (output_parser): Open and close the file to the
9312 skeleton.
9313 * src/reader.c (read_declarations): When %semantic_parser, open
9314 fguard.
9315
9316 2000-12-19 Akim Demaille <akim@epita.fr>
9317
9318 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9319 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9320
9321 2000-12-19 Akim Demaille <akim@epita.fr>
9322
9323 * src/files.c (open_files): Yipee! We no longer need all the code
9324 looking for `/tmp' since we have no tmp file.
9325
9326 2000-12-19 Akim Demaille <akim@epita.fr>
9327
9328 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9329 New macros.
9330 * src/files.c (open_files): Less dependency on MSDOS etc.
9331
9332 2000-12-14 Akim Demaille <akim@epita.fr>
9333
9334 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9335 Provide a default definition.
9336 Use it when executing the default @ action.
9337 * src/reader.c (reader_output_yylsp): No longer include
9338 `timestamp' and `text' in the default YYLTYPE.
9339
9340 2000-12-12 Akim Demaille <akim@epita.fr>
9341
9342 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9343 (copy_guard): Quote the file names.
9344 Reported by Laurent Mascherpa.
9345
9346 2000-12-12 Akim Demaille <akim@epita.fr>
9347
9348 * src/output.c (output_headers, output_program, output): Be sure
9349 to escape special characters when outputting filenames.
9350 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9351 (output_headers): Don't depend on them, Use ACTSTR.
9352
9353 2000-11-17 Akim Demaille <akim@epita.fr>
9354
9355 * lib/obstack.h: Formatting changes.
9356 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9357 prevents type checking.
9358 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9359 cast the value to (void *): assigning a `foo *' to a `void *'
9360 variable is valid.
9361 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9362 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9363 append characters.
9364
9365 2000-11-17 Akim Demaille <akim@epita.fr>
9366
9367 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9368 as...
9369 (suite.m4, regression.m4, calc.m4): these.
9370 * tests/atgeneral.m4: Update from CVS Autoconf.
9371
9372 2000-11-17 Akim Demaille <akim@epita.fr>
9373
9374 * tests/regression.m4 (%union and --defines): New test,
9375 demonstrating a current bug in the obstack implementation.
9376
9377 2000-11-17 Akim Demaille <akim@epita.fr>
9378
9379 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9380 macros.
9381 Use them to declare the variables which are global or local to
9382 `yyparse'.
9383
9384 2000-11-17 Akim Demaille <akim@epita.fr>
9385
9386 * acconfig.h: Remove, no longer used.
9387
9388 2000-11-07 Akim Demaille <akim@epita.fr>
9389
9390 * src: s/Copyright (C)/Copyright/g.
9391
9392 2000-11-07 Akim Demaille <akim@epita.fr>
9393
9394 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9395 defining.
9396 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9397
9398 2000-11-07 Akim Demaille <akim@epita.fr>
9399
9400 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9401 Merge in a single CPP if/else.
9402
9403 2000-11-07 Akim Demaille <akim@epita.fr>
9404
9405 * src/output.c (output): Remove useless variables.
9406 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9407 argument `data' for consistency with the prototypes.
9408 Qualify it `const'.
9409 (obstack_copy, obstack_copy0): Rename the second argument as
9410 `address' for consistency. Qualify it `const'.
9411 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9412 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9413 `const' their input argument (`data' or `address').
9414 Adjust the corresponding macros to include `const' in casts.
9415
9416 2000-11-03 Akim Demaille <akim@epita.fr>
9417
9418 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9419 s/PFILE1/BISON_HAIRY/.
9420 Adjust dependencies.
9421
9422 2000-11-03 Akim Demaille <akim@epita.fr>
9423
9424 For some reason, this was not applied.
9425
9426 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9427 `unlink': it's no longer used.
9428
9429 2000-11-03 Akim Demaille <akim@epita.fr>
9430
9431 * src/files.c (skeleton_find): New function, eved out of...
9432 (open_files, open_extra_files): here.
9433
9434 2000-11-03 Akim Demaille <akim@epita.fr>
9435
9436 Don't use `atexit'.
9437
9438 * src/files.c (obstack_save): New function.
9439 (done): Rename as...
9440 (output_files): this.
9441 Use `obstack_save'.
9442 * src/main.c (main): Don't use `atexit' to register `done', since
9443 it no longer has to remove tmp files, just call `output_files'
9444 when there are no errors.
9445
9446 2000-11-02 Akim Demaille <akim@epita.fr>
9447
9448 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9449 `unlink': it's no longer used.
9450 * src/files.h: Formatting changes.
9451
9452 2000-11-02 Akim Demaille <akim@epita.fr>
9453
9454 Remove the last uses of mktemp and unlink/delete.
9455
9456 * src/files.c (fdefines, ftable): Removed.
9457 (defines_ostack, table_obstack): New.
9458 Adjust dependencies of the former into uses of the latter.
9459 * src/output.c (output_short_or_char_table, output_short_table):
9460 Convert to using obstacks.
9461 * src/reader.c (copy_comment2): Accept one FILE * and two
9462 obstacks.
9463 (output_token_defines, reader_output_yylsp): Use obstacks.
9464 * src/system.h (obstack_fgrow3): New.
9465
9466 2000-11-01 Akim Demaille <akim@epita.fr>
9467
9468 Change each use of `fattrs' into a use of `attrs_obstack'.
9469
9470 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9471 * src/files.c (fattrs): Remove.
9472 (attrs_obstack): New.
9473 Adjust all dependencies.
9474 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9475
9476 2000-11-01 Akim Demaille <akim@epita.fr>
9477
9478 Introduce obstacks.
9479 Change each use of `faction' into a use of `action_obstack'.
9480
9481 * lib/obstack.h, lib/obstack.c: New files.
9482 * src/files.c (faction): Remove.
9483 (action_obstack): New.
9484 Adjust all dependencies.
9485
9486 2000-10-20 Akim Demaille <akim@epita.fr>
9487
9488 * lib/quote.h (PARAMS): New macro. Use it.
9489
9490 2000-10-16 Akim Demaille <akim@epita.fr>
9491
9492 * src/output.c (output_short_or_char_table): New function.
9493 (output_short_table, output_token_translations): Use it.
9494 (goto_actions): Use output_short_table.
9495
9496 2000-10-16 Akim Demaille <akim@epita.fr>
9497
9498 * src/symtab.c (bucket_new): New function.
9499 (getsym): Use it.
9500
9501 * src/output.c (output_short_table): New argument to display the
9502 comment associated with the table.
9503 Adjust dependencies.
9504 (output_gram): Use it.
9505 (output_rule_data): Nicer output layout for YYTNAME.
9506
9507 2000-10-16 Akim Demaille <akim@epita.fr>
9508
9509 * src/lex.c (read_typename): New function.
9510 (lex): Use it.
9511 * src/reader.c (copy_dollar): Likewise.
9512
9513 2000-10-16 Akim Demaille <akim@epita.fr>
9514
9515 * src/reader.c (copy_comment2): Expect the input stream to be on
9516 the `/' which is suspected to open a comment, instead of being
9517 called after `//' or `/*' was read.
9518 (copy_comment, copy_definition, parse_union_decl, copy_action)
9519 (copy_guard): Adjust.
9520
9521 2000-10-16 Akim Demaille <akim@epita.fr>
9522
9523 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9524 `read_signed_integer'.
9525
9526 2000-10-16 Akim Demaille <akim@epita.fr>
9527
9528 * src/reader.c (copy_dollar): New function.
9529 (copy_guard, copy_action): Use it.
9530
9531 2000-10-16 Akim Demaille <akim@epita.fr>
9532
9533 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9534 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9535 New files, from Fileutils 4.0.27.
9536 * src/main.c (printable_version): Remove.
9537 * src/lex.c, src/reader.c: Use `quote'.
9538
9539 2000-10-04 Akim Demaille <akim@epita.fr>
9540
9541 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9542
9543 2000-10-04 Akim Demaille <akim@epita.fr>
9544
9545 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9546
9547 2000-10-04 Akim Demaille <akim@epita.fr>
9548
9549 When a literal string is used to define two different tokens,
9550 `bison -v' segfaults.
9551 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9552
9553 * tests/regression.m4: New file.
9554 Include the core of the sample provided by Piotr Gackiewicz.
9555 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9556 properly.
9557
9558 2000-10-04 Akim Demaille <akim@epita.fr>
9559
9560 * src/reader.c (parse_expect_decl): Keep `count' within the size
9561 of `buffer'.
9562 From Neil Booth.
9563
9564 2000-10-02 Paul Eggert <eggert@twinsun.com>
9565
9566 * bison.s1 (yyparse): Assign the default value
9567 unconditionally, to avoid a GCC warning and make the parser a
9568 tad smaller.
9569
9570 2000-10-02 Akim Demaille <akim@epita.fr>
9571
9572 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9573 options.
9574
9575 2000-10-02 Akim Demaille <akim@epita.fr>
9576
9577 * src/derives.c, src/print.c, src/reduce.c: To ease the
9578 translation, move some `\n' out of the translated strings.
9579
9580 2000-10-02 Akim Demaille <akim@epita.fr>
9581
9582 The location tracking mechanism is precious for parse error
9583 messages. Nevertheless, it is enabled only when `@n' is used in
9584 the grammar, which is a different issue (you can use it in error
9585 message, but not in the grammar per se). Therefore, there should
9586 be another means to enable it.
9587
9588 * src/getargs.c (getargs): Support `--locations'.
9589 (usage): Report it.
9590 * src/getargs.h (locationsflag): Export it.
9591 * src/lex.c (percent_table): Support `%locations'.
9592 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9593 with `locationsflag'.
9594 * doc/bison.texinfo: Document `--locations' and `%locations'.
9595 Sort the options.
9596 * tests/calc.m4: Test it.
9597
9598 For regularity of the names, replace each
9599 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9600 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9601 In addition replace each `flag' with `_flag'.
9602
9603 2000-10-02 Akim Demaille <akim@epita.fr>
9604
9605 Also test parse error messages, including with YYERROR_VERBOSE.
9606
9607 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9608 associative).
9609 Use it to check the computations.
9610 Use it to check `nonassoc' is honored.
9611 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9612 `--yyerror-verbose'.
9613 (_AT_CHECK_CALC): Adjust to this option.
9614 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9615
9616 2000-10-02 Akim Demaille <akim@epita.fr>
9617
9618 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9619 the latter demonstrates a flaw in the handling of non debugging
9620 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9621 was used in order to simplify:
9622
9623 #if YYDEBUG
9624 if (yydebug)
9625 {
9626 ...
9627 }
9628 #endif
9629
9630 into
9631
9632 if (yydebug)
9633 {
9634 ...
9635 }
9636
9637 unfortunately this leads to a CPP conflict when
9638 `--name-prefix=foo' is used since it produces `#define yydebug
9639 foodebug'.
9640
9641 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9642 (YYDPRINTF): New macro.
9643 Spread its use.
9644 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9645 the bison options.
9646 Also test `--verbose', `--defines' and `--name-prefix'.
9647
9648 2000-10-02 Akim Demaille <akim@epita.fr>
9649
9650 Improve the readability of the produced parsers.
9651
9652 * src/bison.s1: Formatting changes.
9653 Improve the comment related to the `$' mark.
9654 (yydefault): Don't fall through to `yyresume': `goto' there.
9655 * src/output.c (output_parser): When the `$' is met, skip the end
9656 of its line.
9657 New variable, `number_of_dollar_signs', to check there's exactly
9658 one `$' in the parser skeleton.
9659
9660 2000-10-02 Akim Demaille <akim@epita.fr>
9661
9662 * lib/xstrdup.c: New file, from the fileutils.
9663 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9664 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9665 instead of strlen + xmalloc + strcpy.
9666 * src/symtab.c (copys): Remove, use xstrdup instead.
9667
9668 2000-10-02 Akim Demaille <akim@epita.fr>
9669
9670 * src/gram.h (associativity): New enum type which replaces the
9671 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9672 `right_assoc', `left_assoc' and `non_assoc'.
9673 Adjust all dependencies.
9674 * src/reader.c: Formatting changes.
9675 (LTYPESTR): Don't define it, use it as a literal in
9676 `reader_output_yylsp'.
9677 * src/symtab.h (symbol_class): New enum type which replaces the
9678 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9679 `sunknown', `stoken and `snterm'.
9680
9681 2000-10-02 Akim Demaille <akim@epita.fr>
9682
9683 * src/getargs.c (fixed_outfiles): Rename as...
9684 (yaccflag): for consistency and accuracy.
9685 Adjust dependencies.
9686
9687 2000-10-02 Akim Demaille <akim@epita.fr>
9688
9689 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9690 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9691 difficult and introduced a lot of core dump. It turns out that
9692 Bison used an implementation of `xmalloc' based on `calloc', and
9693 at various places it does depend upon the initialization to 0. I
9694 have not tried to isolate the pertinent places, and all the former
9695 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9696 someone should address this issue.
9697
9698 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9699 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9700 files.
9701 Adjust dependencies.
9702 * src/warshall.h: New file.
9703 Propagate.
9704
9705 2000-10-02 Akim Demaille <akim@epita.fr>
9706
9707 Various anti-`extern in *.c' changes.
9708
9709 * src/system.h: Include `assert.h'.
9710
9711 2000-10-02 Akim Demaille <akim@epita.fr>
9712
9713 * src/state.h (nstates, final_state, first_state, first_shift)
9714 (first_reduction): Move their exportation from here...
9715 * src/LR0.h: to here.
9716 Adjust dependencies.
9717 * src/getargs.c (statisticsflag): New variable.
9718 Add support for `--statistics'.
9719 Adjust dependencies.
9720
9721 Remove a lot of now useless `extern' statements in most files.
9722
9723 2000-10-02 Akim Demaille <akim@epita.fr>
9724
9725 * src/LR0.h: New file.
9726 Propagate its use.
9727
9728 2000-10-02 Akim Demaille <akim@epita.fr>
9729
9730 * src/print.h: New file.
9731 Propagate its use.
9732 * src/print.c: Formatting and ordering changes.
9733 (verbose, terse): Replace with...
9734 (print_results): this new function.
9735 Adjust dependencies.
9736
9737 2000-10-02 Akim Demaille <akim@epita.fr>
9738
9739 * src/conflicts.c (conflict_report): New function.
9740 (conflict_log, verbose_conflict_log): Replace with...
9741 (print_conflicts): this function.
9742 Adjust dependencies.
9743 * src/conflicts.h: New file.
9744 Propagate its inclusion.
9745
9746 2000-10-02 Akim Demaille <akim@epita.fr>
9747
9748 * src/nullable.h: New file.
9749 Propagate its inclusion.
9750 * src/nullable.c: Formatting changes.
9751
9752 2000-10-02 Akim Demaille <akim@epita.fr>
9753
9754 * src/reduce.h: New file.
9755 Propagate its inclusion.
9756 * src/reduce.c: Topological sort and other formatting changes.
9757 (bool, TRUE, FALSE): Move their definition to...
9758 * src/system.h: here.
9759
9760 2000-10-02 Akim Demaille <akim@epita.fr>
9761
9762 * src/files.c: Formatting changes.
9763 (tryopen, tryclose, openfiles): Rename as...
9764 (xfopen, xfclose, open_files): this.
9765 (stringappend): static.
9766 * src/files.h: Complete the list of exported symbols.
9767 Propagate its use.
9768
9769 2000-10-02 Akim Demaille <akim@epita.fr>
9770
9771 * src/reader.h: New file.
9772 Propagate its use instead of tedious list of `extern' and
9773 prototypes.
9774 * src/reader.c: Formatting changes, topological sort,
9775 s/register//.
9776
9777 2000-10-02 Akim Demaille <akim@epita.fr>
9778
9779 * src/lex.h: Prototype `lex.c' exported functions.
9780 * src/reader.c: Adjust.
9781 * src/lex.c: Formatting changes.
9782 (safegetc): Rename as...
9783 (xgetc): this.
9784
9785 2000-10-02 Akim Demaille <akim@epita.fr>
9786
9787 * src/lalr.h: New file.
9788 Propagate its inclusion instead of prototypes and `extern'.
9789 * src/lalr.c: Formatting changes, topological sorting etc.
9790
9791 2000-10-02 Akim Demaille <akim@epita.fr>
9792
9793 * src/output.c (token_actions): Introduce a temporary array,
9794 YYDEFACT, that makes it possible for this function to use
9795 output_short_table.
9796
9797 2000-10-02 Akim Demaille <akim@epita.fr>
9798
9799 `user_toknums' is output as a `short[]' in `output.c', while it is
9800 defined as a `int[]' in `reader.c'. For consistency with the
9801 other output tables, `user_toknums' is now defined as a table of
9802 shorts.
9803
9804 * src/reader.c (user_toknums): Be a short table instead of an int
9805 table.
9806 Adjust dependencies.
9807
9808 Factor the short table outputs.
9809
9810 * src/output.c (output_short_table): New function.
9811 * src/output.c (output_gram, output_stos, output_rule_data)
9812 (output_base, output_table, output_check): Use it.
9813
9814 2000-10-02 Akim Demaille <akim@epita.fr>
9815
9816 * src/output.c (output): Topological sort of the functions, in
9817 order to get rid of the `static' prototypes.
9818 No longer use `register'.
9819 * src/output.h: New file.
9820 Propagate its inclusion in files explicitly prototyping functions
9821 from output.c.
9822
9823 2000-09-21 Akim Demaille <akim@epita.fr>
9824
9825 * src/atgeneral.m4: Update from Autoconf.
9826
9827 2000-09-21 Akim Demaille <akim@epita.fr>
9828
9829 * src/closure.h: New file.
9830 * src/closure.c: Formatting changes, topological sort over the
9831 functions, use of closure.h.
9832 (initialize_closure, finalize_closure): Rename as...
9833 (new_closure, free_closure): these. Adjust dependencies.
9834 * src/LR0.c: Formatting changes, topological sort, use of
9835 cloture.h.
9836 (initialize_states): Rename as...
9837 (new_states): this.
9838 * src/Makefile.am (noinst_HEADERS): Adjust.
9839
9840 2000-09-20 Akim Demaille <akim@epita.fr>
9841
9842 * src/acconfig.h: Don't protect config.h against multiple
9843 inclusion.
9844 Don't define PARAMS.
9845 * src/system.h: Define PARAMS.
9846 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9847 purpose of config.h. system.h must not try to fix wrong
9848 definitions in config.h.
9849
9850 2000-09-20 Akim Demaille <akim@epita.fr>
9851
9852 * src/derives.h: New file.
9853 * src/main.c, src/derives.h: Use it.
9854 Formatting changes.
9855 * src/Makefile.am (noinst_HEADERS): Adjust.
9856
9857 2000-09-20 Akim Demaille <akim@epita.fr>
9858
9859 * tests/atgeneral.m4: Update from Autoconf.
9860 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9861 (AT_CHECK_CALC): New macros.
9862 Use these macros to test bison with options `', `--raw',
9863 `--debug', `--yacc', `--yacc --debug'.
9864
9865 2000-09-19 Akim Demaille <akim@epita.fr>
9866
9867 * src/output.c: Formatting changes.
9868 * src/machine.h: Remove, leaving its contents in...
9869 * src/system.h: here.
9870 Include stdio.h.
9871 Adjust all dependencies on stdio.h and machine.h.
9872 * src/getargs.h: New file.
9873 Let all `extern' declarations about getargs.c be replaced with
9874 inclusion of `getargs.h'.
9875 * src/Makefile.am (noinst_HEADERS): Adjust.
9876
9877 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9878 scope.
9879 (yyerror): Returns void, not int.
9880 * doc/bison.texinfo: Formatting changes.
9881
9882 2000-09-19 Akim Demaille <akim@epita.fr>
9883
9884 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9885 portable.
9886
9887 2000-09-18 Akim Demaille <akim@epita.fr>
9888
9889 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9890 * src/Makefile.am (INCLUDES): Don't.
9891 Be ready to fetch headers in lib/.
9892
9893 2000-09-18 Akim Demaille <akim@epita.fr>
9894
9895 * doc/bison.texinfo: Update the copyright.
9896 ANSIfy and GNUify the examples.
9897 Remove the old menu.
9898
9899 2000-09-18 Akim Demaille <akim@epita.fr>
9900
9901 First set of tests: use the `calc' example from the documentation.
9902
9903 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9904 is defined only when YYDEBUG is.
9905 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9906 * src/files.c (tryopen, tryclose): Formatting changes.
9907 Move to the top and be static.
9908 * src/reader.c (read_signed_integer): Likewise.
9909 * tests/calc.m4: New file.
9910 * Makefile.am, suite.m4: Adjust.
9911 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9912
9913 2000-09-18 Akim Demaille <akim@epita.fr>
9914
9915 Add support for an Autotest test suite for Bison.
9916
9917 * m4/m4.m4, m4/atconfig.m4: New files.
9918 * m4/Makefile.am (EXTRA_DIST): Adjust.
9919 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9920 files.
9921 * src/getargs.c: Display a more standard --version message.
9922 * src/reader.c (reader): Formatting changes.
9923 No longer depend upon VERSION_STRING.
9924 * configure.in: No longer use `dnl'.
9925 Set up the test suite and the new directory `tests/.
9926 (VERSION_STRING): Remove.
9927
9928 2000-04-14 Akim Demaille <akim@epita.fr>
9929
9930 * src/reader.c (copy_comment2): New function, same as former
9931 `copy_comment', but outputs into two FILE *.
9932 (copy_comment): Use it.
9933 (parse_union_decl): Use it.
9934 (get_type, parse_start_decl): Use the same `invalid' message.
9935 (parse_start_decl, parse_union_decl): Use the same `multiple'
9936 message.
9937 (parse_union_decl, copy_guard, copy_action): Use the same
9938 `unmatched' message.
9939 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9940
9941 2000-03-31 Akim Demaille <akim@epita.fr>
9942
9943 * src/files.c (tryopen, tryclose): Move to the top.
9944 Be static.
9945
9946 2000-03-31 Akim Demaille <akim@epita.fr>
9947
9948 * src/main.c (main): Don't call `done', exit does it.
9949
9950 2000-03-31 Akim Demaille <akim@epita.fr>
9951
9952 * allocate.c: s/return (foo)/return foo/.
9953 * lalr.c: Likewise.
9954 * LR0.c: Likewise.
9955 * output.c: Likewise.
9956 * reader.c: Likewise.
9957 * symtab.c: Likewise.
9958 * vmsgetargs.c: Likewise.
9959
9960 2000-03-31 Akim Demaille <akim@epita.fr>
9961
9962 Clean up the error reporting functions.
9963
9964 * src/report.c: New file.
9965 * src/report.h: Likewise.
9966 * src/Makefile.am: Adjust.
9967 * m4/error.m4: New file.
9968 * m4/Makefile.am: Adjust.
9969 * configure.in (jm_PREREQ_ERROR): Call it.
9970 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9971 Remove.
9972 (fatal, fatals): Remove. All callers use complain.c::fatal.
9973 (warn, warni, warns, warnss, warnss): Remove. All callers use
9974 complain.c::complain.
9975 (toomany): Remove, use fatal instead.
9976 * src/files.c (done): No argument, use complain_message_count.
9977 * src/main.c (main): Register `done' to `atexit'.
9978
9979 * src/getargs.c (usage): More `fputs', less `fprintf'.
9980
9981 2000-03-28 Akim Demaille <akim@epita.fr>
9982
9983 * lib/: New directory.
9984 * Makefile.am (SUBDIRS): Adjust.
9985 * configure.in: Adjust.
9986 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9987 useless.
9988 * src/alloca.c: Moved to lib/.
9989 * src/getopt.c: Likewise.
9990 * src/getopt1.c: Likewise.
9991 * src/getopt.h: Likewise.
9992 * src/ansi2knr.c: Likewise.
9993 * src/ansi2knr.1: Likewise.
9994 * src/Makefile.am: Adjust.
9995 * lib/Makefile.am: New file.
9996
9997 2000-03-28 Akim Demaille <akim@epita.fr>
9998
9999 * src/getargs.c (usage): Refresh the help message.
10000
10001 2000-03-17 Akim Demaille <akim@epita.fr>
10002
10003 * src/getopt1.c: Updated from textutils 2.0e
10004 * src/getopt.c: Likewise.
10005 * src/getopt.h: Likewise.
10006
10007 2000-03-17 Akim Demaille <akim@epita.fr>
10008
10009 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10010 the file name, not the whole `#line LINE FILE'.
10011
10012 2000-03-17 Akim Demaille <akim@epita.fr>
10013
10014 On syntax errors, report the token on which we choked.
10015
10016 * src/bison.s1 (yyparse): In the label yyerrlab, when
10017 YYERROR_VERBOSE, add yychar in msg.
10018
10019 2000-03-17 Akim Demaille <akim@epita.fr>
10020
10021 * src/reader.c (copy_at): New function.
10022 (copy_guard): Use it.
10023 (copy_action): Use it.
10024
10025 2000-03-17 Akim Demaille <akim@epita.fr>
10026
10027 Be kind to translators, save some useless translations.
10028
10029 * src/main.c (banner): New function.
10030 (fatal_banner): Use it.
10031 (warn_banner): Use it.
10032
10033 2000-03-17 Akim Demaille <akim@epita.fr>
10034
10035 * src/reader.c (copy_definition): Use copy_string and
10036 copy_comment. Removed now unused `match', `ended',
10037 `cplus_comment'.
10038 (copy_comment, copy_string): Moved, to be visible from
10039 copy_definition.
10040
10041 2000-03-17 Akim Demaille <akim@epita.fr>
10042
10043 * src/reader.c (copy_string): Declare `static inline'. No
10044 problems with inline, since it is checked by configure.
10045 (copy_comment): Likewise.
10046
10047 2000-03-17 Akim Demaille <akim@epita.fr>
10048
10049 * src/reader.c (packsymbols): Formatting changes.
10050
10051 2000-03-17 Akim Demaille <akim@epita.fr>
10052
10053 * src/reader.c (copy_comment): New function, factored out from:
10054 (copy_action): Use it. Removed now unused `match', `ended',
10055 `cplus_comment'.
10056 (copy_guard): Likewise.
10057
10058 2000-03-17 Akim Demaille <akim@epita.fr>
10059
10060 * src/reader.c (copy_string): New function, factored out from:
10061 (copy_action): Use it.
10062 (copy_guard): Likewise.
10063
10064 2000-03-17 Akim Demaille <akim@epita.fr>
10065
10066 Change the handling of @s so that they behave exactly like $s.
10067 There is now a pseudo variable @$ (readble and writable), location
10068 of the lhs of the rule (by default ranging from the location of
10069 the first symbol of the rhs, to the location of the last symbol,
10070 or, if the rhs is empty, YYLLOC).
10071
10072 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10073 yyval.
10074 (yyparse): When providing a default semantic action, provide a
10075 default location action.
10076 (after the $): No longer change `*YYLSP', just stack YYLOC the
10077 same way you stack YYVAL.
10078 * src/reader.c (read_declarations): Use warns.
10079 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10080 (copy_action, case '@'): Likewise.
10081 Use a standard error message, to save useless work from
10082 translators.
10083
10084 2000-03-17 Akim Demaille <akim@epita.fr>
10085
10086 * src/bison.s1: Formatting and cosmetics changes.
10087 * src/reader.c: Likewise.
10088 Update the Copyright notice.
10089
10090 2000-03-17 Akim Demaille <akim@epita.fr>
10091
10092 * src/bison.s1 (#line): All set to `#line' only, since the
10093 Makefile now handles them.
10094
10095 2000-03-16 Akim Demaille <akim@epita.fr>
10096
10097 * src/output.c (output_rule_data): Output the documentation of
10098 some of the tables.
10099 (Copyright notice): Update.
10100 Formatting changes.
10101
10102 2000-03-16 Akim Demaille <akim@epita.fr>
10103
10104 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10105 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10106 One `#if YYDEBUG' remains, since it uses variables which are
10107 defined only if `YYDEBUG != 0'.
10108
10109 2000-03-16 Akim Demaille <akim@epita.fr>
10110
10111 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10112 and related variables so that the similarities are highlighted.
10113
10114 2000-03-16 Akim Demaille <akim@epita.fr>
10115
10116 * src/bison.s1: Properly indent CPP directives.
10117
10118 2000-03-16 Akim Demaille <akim@epita.fr>
10119
10120 * src/bison.s1: Properly indent the `alloca' CPP section.
10121
10122 2000-03-16 Akim Demaille <akim@epita.fr>
10123
10124 Do not hard code values of directories in `configure.in'.
10125 Update the `configure' tool chain.
10126
10127 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10128 src/makefile.am.
10129 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10130 (AC_OUTPUT): Add m4/Makefile.
10131 Bump to bison 1.28a, 1.29 has never been released.
10132 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10133 handled via src/Makefile.am.
10134 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10135 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10136 autoheader.
10137 * Makefile.am (SUBDIRS): Add m4.
10138 (ACLOCAL_AM_FLAGS): New variable.
10139 (AUTOMAKE_OPTIONS): Add check-news.
10140 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10141 the proper line number and file name.
10142 (DEFS): Propagate the location of bison library files and of the
10143 locale files.
10144 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10145 builddir.
10146 * acinclude.m4: Remove, replaced by the directory m4.
10147 * m4/Makefile.am (EXTRA_DIST): New variable.
10148 * m4/gettext.m4: New file, from the fileutils.
10149 * m4/lcmessage.m4: Likewise
10150 * m4/progtest.m4: Likewise.
10151 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10152
10153 2000-03-10 Akim Demaille <akim@epita.fr>
10154
10155 * src/closure.c:
10156 Formatting changes of various comments.
10157 Respect the GNU coding standards at various places.
10158 Don't use `_()' when no translation is needed.
10159
10160 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10161
10162 * src/files.c:
10163 OS/2 honors TMPDIR environment variable.
10164
10165 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10166
10167 * doc/bison.texinfo: Tweaked spelling and grammar.
10168 Updated ISBN.
10169 Removed reference to price of printed copy.
10170 Mention BISON_SIMPLE and BISON_HAIRY.
10171
10172 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10173
10174 * configure.in, NEWS:
10175 Bison 1.29 released.
10176
10177 1999-10-27 Jesse Thilo <jthilo@gnu.org>
10178
10179 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10180 Added reference card.
10181
10182 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10183
10184 * po/ru.po: Added Russian translation.
10185
10186 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10187
10188 * configure.in: Added Russian translation.
10189
10190 1999-07-06 Jesse Thilo <jthilo@gnu.org>
10191
10192 * configure.in, NEWS, README:
10193 Released version 1.28.
10194
10195 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10196
10197 * src/system.h:
10198 Squashed redefinition warning on some systems.
10199
10200 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10201 Have configure build version string instead of relying on ANSI string
10202 concatentation.
10203
10204 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10205
10206 * po/POTFILES.in: Got rid of version.c.
10207
10208 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10209
10210 * acconfig.h, configure.in:
10211 Have configure build version string instead of relying on ANSI string
10212 concatentation.
10213
10214 1999-06-08 Jesse Thilo <jthilo@gnu.org>
10215
10216 * doc/bison.1:
10217 Dropped mention of `+' for long-named options.
10218
10219 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10220
10221 * src/files.c: Added <unistd.h> for unlink().
10222
10223 * src/Makefile.am, src/system.h:
10224 I18n fixes.
10225
10226 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10227
10228 * README: Added a FAQ list.
10229
10230 * configure.in, acconfig.h:
10231 I18n fixes.
10232
10233 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10234
10235 * doc/FAQ, doc/Makefile.am:
10236 Added a FAQ list.
10237
10238 1999-05-19 Jesse Thilo <jthilo@gnu.org>
10239
10240 * src/alloc.h, src/symtab.h, src/version.c:
10241 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10242
10243 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10244
10245 * src/.cvsignore, src/Makefile.am:
10246 Reorganized: sources in `src', documentation in `doc'.
10247
10248 * src/lex.c (literalchar):
10249 fixed the code for escaping double quotes (thanks
10250 Jonathan Czisny.)
10251
10252 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10253
10254 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10255 Adjusted paths to reflect directory reorganization.
10256
10257 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10258
10259 * doc/.cvsignore, doc/Makefile.am:
10260 Reorganized: sources in `src', documentation in `doc'.
10261
10262 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10263
10264 * configure.in:
10265 Updated AC_INIT file to reflect directory reorganization.
10266
10267 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10268 Reorganized: sources in `src', documentation in `doc'.
10269
10270 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10271
10272 * src/allocate.c:
10273 Don't declare calloc() and realloc() if not necessary.
10274
10275 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10276
10277 * configure.in, acconfig.h, acinclude.m4:
10278 Don't declare calloc() and realloc() if not necessary.
10279
10280 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10281
10282 * po/.cvsignore: Added i18n support.
10283
10284 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10285
10286 * acconfig.h, configure.in, Makefile.am:
10287 Added i18n support.
10288
10289 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10290
10291 * src/bison.s1: Fixed #line numbers.
10292
10293 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10294
10295 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10296 Added PO files from Translation Project.
10297
10298 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10299
10300 * Makefile.am:
10301 Added support for non-ANSI compilers (ansi2knr).
10302
10303 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10304
10305 * configure.in: Bumped version number to 1.27.
10306
10307 * Makefile.am:
10308 Added `bison.simple' to list of files removed by `make distclean'.
10309
10310 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10311
10312 * src/files.c, src/files.h:
10313 Defined locations of parser files in config.h instead of Makefile.
10314
10315 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10316
10317 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10318 Defined locations of parser files in config.h instead of Makefile.
10319
10320 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10321
10322 * Makefile.am:
10323 Removed inappropriate use of $< macro.
10324
10325 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10326
10327 * po/Makefile.in.in, po/POTFILES.in:
10328 Add `po' directory skeleton.
10329
10330 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10331
10332 * README: Document help-bison list.
10333
10334 * configure.in: Add check for mkstemp().
10335
10336 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10337
10338 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10339 Hush a few compiler warnings.
10340
10341 * src/files.c:
10342 Add tryclose(), which verifies that fclose was successful.
10343 Hush a couple of compiler warnings.
10344
10345 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10346
10347 * Makefile.am, OChangeLog:
10348 ChangeLog is now automatically generated. Include the old version as
10349 OChangeLog.
10350
10351 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10352
10353 * 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:
10354 Update FSF address.
10355
10356 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10357
10358 * doc/bison.texinfo: Fix formatting glitch.
10359
10360 * doc/bison.texinfo: Update FSF address.
10361
10362 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10363
10364 * acconfig.h: Update FSF address.
10365
10366 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10367
10368 * src/system.h:
10369 Don't define PACKAGE here, since config.h defines it.
10370
10371 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10372
10373 * src/reader.c: Update copyright date.
10374
10375 * src/main.c:
10376 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10377 favor of output directly to stderr (avoids buffer overruns).
10378
10379 * src/reader.c: Some checks for premature EOF.
10380
10381 * 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:
10382 Use prototypes if the compiler understands them.
10383
10384 * src/files.c: Honor TMPDIR on Unix hosts.
10385 Use prototypes if the compiler understands them.
10386
10387 * src/reader.c:
10388 Fix a couple of buffer overrun bugs.
10389 Use prototypes if the compiler understands them.
10390
10391 * src/system.h: Include unistd.h and ctype.h.
10392 Use #ifdef instead of #if for NLS symbols.
10393
10394 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10395
10396 * doc/bison.texinfo:
10397 Delete comment "consider using @set for edition number, etc..." since
10398 we now are doing so.
10399
10400 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10401
10402 * configure.in:
10403 Use prototypes if the compiler understands them.
10404
10405 * NEWS: Document 1.26 highlights.
10406
10407 * Makefile.am: Require Automake 1.3 or later.
10408
10409 * acconfig.h:
10410 Use prototypes if the compiler understands them.
10411
10412 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10413
10414 * src/version.c:
10415 Use VERSION symbol from automake for version number.
10416
10417 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10418
10419 * acconfig.h, configure.in, version.cin:
10420 Use VERSION symbol from automake for version number.
10421
10422 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10423
10424 * Makefile.am:
10425 Distribute original version of simple parser (bison.s1), not built
10426 version (bison.simple).
10427
10428 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10429
10430 * doc/bison.texinfo: Add info dir entry.
10431
10432 * doc/bison.texinfo:
10433 Let automake put version number into documentation.
10434
10435 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10436
10437 * src/bison.cld, src/build.com, src/vmshlp.mar:
10438 Add non-RCS files from /gd/gnu/bison.
10439
10440 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10441
10442 * doc/bison.1:
10443 Document the BISON_HAIRY and BISON_SIMPLE variables.
10444
10445 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10446
10447 * src/version.c: Build version.c automatically.
10448
10449 * src/reader.c:
10450 Fix token numbering (used to start at 258, not 257).
10451
10452 * src/system.h: Include config.h.
10453
10454 * src/getargs.c: Update bug report address.
10455
10456 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10457 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10458
10459 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10460
10461 * Makefile.am:
10462 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10463
10464 * configure.in, version.cin:
10465 Build version.c automatically.
10466
10467 * AUTHORS: Add AUTHORS file.
10468
10469 * README: Update bug report address.
10470
10471 * bison.simple:
10472 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10473
10474 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10475 Add automake stuff.
10476
10477 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10478
10479 * doc/bison.texinfo: Clean up some formatting.
10480
10481 1998-05-05 Richard Stallman <rms@gnu.org>
10482
10483 * doc/bison.texinfo:
10484 Explain better why to make a pure parser.
10485
10486 1998-01-05 Richard Stallman <rms@gnu.org>
10487
10488 * src/files.c (openfiles):
10489 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10490 find a temporary directory, if possible. Do not unlink files while
10491 they are open.
10492
10493 1997-08-25 Richard Stallman <rms@gnu.org>
10494
10495 * src/reader.c (stack_offset;):
10496 Change some warni to warns.
10497
10498 * src/lex.c (literalchar): Use warns, not warni.
10499
10500 1997-06-28 Richard Stallman <rms@gnu.org>
10501
10502 * src/bison.s1: Add a Bison version comment.
10503
10504 * src/main.c (fatal, warn, berror):
10505 Use program_name.
10506
10507 1997-06-28 Richard Stallman <rms@gnu.org>
10508
10509 * Makefile.in (bison_version): New variable.
10510 (dist): Use that variable.
10511 (bison.s1): Substitute the Bison version into bison.simple.
10512
10513 * bison.simple: Add a Bison version comment.
10514
10515 1997-06-18 Richard Stallman <rms@gnu.org>
10516
10517 * src/main.c (fatal, warn, berror):
10518 Make error messages standard.
10519 (toomany): Improve error message text.
10520
10521 * 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:
10522 new.h renamed to alloc.h.
10523
10524 1997-06-18 Richard Stallman <rms@gnu.org>
10525
10526 * Makefile.in: new.h renamed to alloc.h.
10527
10528 1997-05-24 Richard Stallman <rms@gnu.org>
10529
10530 * src/lex.c (literalchar):
10531 Fix the code for escaping \, " and '.
10532
10533 (lex): Avoid trouble when there are many chars
10534 to discard in a char literal with just several chars in it.
10535
10536 1997-05-17 Richard Stallman <rms@gnu.org>
10537
10538 * src/bison.s1:
10539 Use malloc, if using alloca is troublesome.
10540 (YYSTACK_USE_ALLOCA): New flag macro.
10541 Define it for some systems and compilers.
10542 (YYSTACK_ALLOC): New macro.
10543 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10544 If it was malloc'd, free it.
10545
10546 1997-05-17 Richard Stallman <rms@gnu.org>
10547
10548 * bison.simple:
10549 Use malloc, if using alloca is troublesome.
10550 (YYSTACK_USE_ALLOCA): New flag macro.
10551 Define it for some systems and compilers.
10552 (YYSTACK_ALLOC): New macro.
10553 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10554 If it was malloc'd, free it.
10555
10556 1997-04-23 Richard Stallman <rms@gnu.org>
10557
10558 * src/bison.s1:
10559 (alloca) [__hpux]: Always define as __builtin_alloca.
10560
10561 1997-04-23 Richard Stallman <rms@gnu.org>
10562
10563 * bison.simple:
10564 (alloca) [__hpux]: Always define as __builtin_alloca.
10565
10566 1997-04-22 Richard Stallman <rms@gnu.org>
10567
10568 * src/bison.s1:
10569 [__hpux]: Include alloca.h (right for HPUX 10)
10570 instead of declaring alloca (right for HPUX 9).
10571
10572 * src/bison.s1 (__yy_memcpy):
10573 Declare arg `count' as unsigned int.
10574 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10575
10576 1997-04-22 Richard Stallman <rms@gnu.org>
10577
10578 * bison.simple:
10579 [__hpux]: Include alloca.h (right for HPUX 10)
10580 instead of declaring alloca (right for HPUX 9).
10581
10582 * bison.simple (__yy_memcpy):
10583 Declare arg `count' as unsigned int.
10584 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10585
10586 1997-01-03 Richard Stallman <rms@gnu.org>
10587
10588 * src/allocate.c: [__STDC__ or _MSC_VER]:
10589 Declare calloc and realloc to return void *.
10590
10591 1997-01-02 Richard Stallman <rms@gnu.org>
10592
10593 * src/system.h:
10594 [_MSC_VER]: Include stdlib.h and process.h.
10595 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10596
10597 * src/main.c (main): Return FAILURE as a value.
10598 (printable_version): Declare arg as int, not char.
10599
10600 1997-01-02 Richard Stallman <rms@gnu.org>
10601
10602 * Makefile.in (dist):
10603 Explicitly check for symlinks, and copy them.
10604
10605 1996-12-19 Richard Stallman <rms@gnu.org>
10606
10607 * src/files.c:
10608 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10609
10610 1996-12-18 Paul Eggert <eggert@gnu.org>
10611
10612 * src/bison.s1 (yyparse):
10613 If __GNUC__ and YYPARSE_PARAM are both defined,
10614 declare yyparse to have a void * argument.
10615
10616 1996-12-18 Paul Eggert <eggert@gnu.org>
10617
10618 * bison.simple (yyparse):
10619 If __GNUC__ and YYPARSE_PARAM are both defined,
10620 declare yyparse to have a void * argument.
10621
10622 1996-12-17 Richard Stallman <rms@gnu.org>
10623
10624 * src/reduce.c (nbits): Add some casts.
10625
10626 1996-08-12 Richard Stallman <rms@gnu.org>
10627
10628 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10629
10630 1996-08-12 Richard Stallman <rms@gnu.org>
10631
10632 * bison.simple: Test _MSDOS as well as _MSDOS_.
10633
10634 1996-07-31 Richard Stallman <rms@gnu.org>
10635
10636 * src/bison.s1:
10637 [__sun && __i386]: Include alloca.h.
10638
10639 1996-07-31 Richard Stallman <rms@gnu.org>
10640
10641 * bison.simple:
10642 [__sun && __i386]: Include alloca.h.
10643
10644 1996-07-30 Richard Stallman <rms@gnu.org>
10645
10646 * src/bison.s1: Comment change.
10647
10648 * src/bison.s1: Test _MSDOS_, not MSDOS.
10649
10650 1996-07-30 Richard Stallman <rms@gnu.org>
10651
10652 * bison.simple: Comment change.
10653
10654 * bison.simple: Test _MSDOS_, not MSDOS.
10655
10656 1996-06-01 Richard Stallman <rms@gnu.org>
10657
10658 * 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:
10659 Insert `_' macro around many string constants.
10660
10661 * src/main.c:
10662 Insert `_' macro around many string constants.
10663
10664 (main): Call setlocale, bindtextdomain and textdomain.
10665
10666 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10667 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10668 [ENABLE_NLS]: Include libintl.h.
10669 [ENABLE_NLS] (gettext): Define.
10670 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10671 (N_, PACKAGE, LOCALEDIR): New macros.
10672
10673 1996-06-01 Richard Stallman <rms@gnu.org>
10674
10675 * POTFILES.in: New file.
10676
10677 * Makefile.in (allocate.o):
10678 Define target explicitly.
10679
10680 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10681 (LDFLAGS): Set to @LDFLAGS@.
10682 (configure): Run autoconf only if preceding `cd' succeeds.
10683 (bison.s1): Redirect output to temporary file then move the
10684 temporary to the target, rather than redirecting directly to bison.s1.
10685 (clean): Remove config.status and config.log.
10686 (distclean): Don't remove config.status here.
10687
10688 1996-05-12 Richard Stallman <rms@gnu.org>
10689
10690 * src/bison.s1:
10691 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10692
10693 1996-05-12 Richard Stallman <rms@gnu.org>
10694
10695 * bison.simple:
10696 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10697
10698 1996-05-11 Richard Stallman <rms@gnu.org>
10699
10700 * src/bison.s1 (__yy_memcpy):
10701 Really reorder the args, as was supposedly done on Feb 14 1995.
10702 (yyparse): Calls changed accordingly.
10703
10704 1996-05-11 Richard Stallman <rms@gnu.org>
10705
10706 * Makefile.in (dist): Don't use $(srcdir).
10707
10708 * bison.simple (__yy_memcpy):
10709 Really reorder the args, as was supposedly done on Feb 14 1995.
10710 (yyparse): Calls changed accordingly.
10711
10712 1996-01-27 Richard Stallman <rms@gnu.org>
10713
10714 * src/output.c (output_rule_data):
10715 Test YYERROR_VERBOSE in the conditional
10716 around the definition of ttyname.
10717
10718 1995-12-29 Richard Stallman <rms@gnu.org>
10719
10720 * src/bison.s1:
10721 Fix line numbers in #line commands.
10722
10723 1995-12-29 Richard Stallman <rms@gnu.org>
10724
10725 * bison.simple:
10726 Fix line numbers in #line commands.
10727
10728 1995-12-27 Richard Stallman <rms@gnu.org>
10729
10730 * src/bison.s1 (YYPARSE_PARAM_DECL):
10731 In C++, make it always null.
10732 (YYPARSE_PARAM_ARG): New macro.
10733 (yyparse): Use YYPARSE_PARAM_ARG.
10734
10735 1995-12-27 Richard Stallman <rms@gnu.org>
10736
10737 * bison.simple (YYPARSE_PARAM_DECL):
10738 In C++, make it always null.
10739 (YYPARSE_PARAM_ARG): New macro.
10740 (yyparse): Use YYPARSE_PARAM_ARG.
10741
10742 1995-11-29 Richard Stallman <rms@gnu.org>
10743
10744 * doc/bison.texinfo:
10745 Describe literal string tokens, %raw, %no_lines, %token_table.
10746
10747 1995-11-29 Daniel Hagerty <hag@gnu.org>
10748
10749 * doc/bison.texinfo: Fixed update date
10750
10751 1995-10-16 Richard Stallman <rms@gnu.org>
10752
10753 * src/version.c: Version 1.25.
10754
10755 1995-10-16 Richard Stallman <rms@gnu.org>
10756
10757 * NEWS: *** empty log message ***
10758
10759 1995-10-16 Richard Stallman <rms@gnu.org>
10760
10761 * doc/bison.1, doc/bison.rnh:
10762 Add new options.
10763
10764 1995-10-15 Richard Stallman <rms@gnu.org>
10765
10766 * src/vmsgetargs.c, src/getargs.c:
10767 Added -n, -k, and -raw switches.
10768 (noparserflag, toknumflag, rawtoknumflag): New variables.
10769
10770 * src/symtab.h (SALIAS):
10771 New #define for adding aliases to %token.
10772 (struct bucket): Added `alias' field.
10773
10774 * src/reduce.c (reduce_grammar):
10775 Revise error message.
10776 (print_notices): Remove final `.' from error message.
10777
10778 * src/reader.c (reader_output_yylsp):
10779 New function.
10780 (readgram): Use `#if 0' around code that accepted %command
10781 inside grammar rules: The documentation doesn't allow it,
10782 and it will fail since the %command processors scan for the next %.
10783 (parse_token_decl): Extended the %token
10784 declaration to allow a multi-character symbol as an alias.
10785 (parse_thong_decl): New function.
10786 (read_declarations): Added %thong declarations.
10787 (read_declarations): Handle NOOP to deal with allowing
10788 % declarations as another means to specify the flags.
10789 (readgram): Allow %prec prior to semantics embedded in a rule.
10790 (skip_to_char, read_declarations, copy_definition)
10791 (parse_token_decl, parse_start_decl, parse_type_decl)
10792 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10793 (get_type_name, copy_guard, copy_action, readgram)
10794 (get_type, packsymbols): Revised most error messages.
10795 Changed `fatal' to `warnxxx' to avoid aborting for error.
10796 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10797 (read_declarations): Improve the error message for
10798 an invalid character. Do not abort.
10799 (read_declarations, copy_guard, copy_action): Use
10800 printable_version to avoid unprintable characters in printed output.
10801 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10802 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10803 Allow the type of a non-terminal can be given
10804 more than once, as long as all specifications give the same type.
10805
10806 * src/output.c:
10807 (output_headers, output_trailers, output, output_gram)
10808 (output_rule_data): Implement noparserflag variable.
10809 Implement toknumflag variable.
10810 (output): Call reader_output_yylsp to output LTYPESTR.
10811
10812 * src/main.c (main):
10813 If reader sees an error, don't process the grammar.
10814 (fatals): Updated to not use VARARGS1.
10815 (printable_version, int_to_string, warn, warni, warns, warnss)
10816 (warnsss): New error reporting functions. Avoid abort for error.
10817
10818 * src/lex.h:
10819 Added THONG and NOOP for alias processing.
10820 Added SETOPT for the new code that allows setting options with %flags.
10821
10822 * src/lex.c:
10823 Include getopt.h. Add some extern decls.
10824 (safegetc): New function to deal with EOF gracefully.
10825 (literalchar); new function to deal with reading \ escapes.
10826 (lex): Use literalchar.
10827 (lex): Implemented "..." tokens.
10828 (literalchar, lex, parse_percent_token): Made tokenbuffer
10829 always contain the token. This includes growing the token
10830 buffer while reading an integer.
10831 (parse_percent_token): Replaced if-else statement with percent_table.
10832 (parse_percent_token): Added % declarations as another
10833 way to specify the flags -n, -l, and -r. Also added hooks for
10834 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10835 major changes to files.c.
10836 (lex) Retain in the incoming stream a character following
10837 an incorrect '/'.
10838 (skip_white_space, lex): Revised most error messages
10839 and changed fatal to warn to avoid aborting.
10840 (percent_table): Added %thong declarations.
10841
10842 * src/gram.h: Comment changes.
10843
10844 * src/files.c (openfiles, open_extra_files, done):
10845 Add faction flag
10846 and actfile file. Handle noparserflag. Both for -n switch.
10847
10848 * src/conflicts.c (resolve_sr_conflict):
10849 Remove use of alloca.
10850
10851 1995-06-01 Jim Meyering <meyering@gnu.org>
10852
10853 * doc/bison.texinfo: *** empty log message ***
10854
10855 1995-05-06 Richard Stallman <rms@gnu.org>
10856
10857 * src/bison.s1: Comment change.
10858
10859 1995-05-06 Richard Stallman <rms@gnu.org>
10860
10861 * bison.simple: Comment change.
10862
10863 1995-05-03 Richard Stallman <rms@gnu.org>
10864
10865 * src/version.c: Version now 1.24.
10866
10867 * src/bison.s1: Change distribution terms.
10868
10869 * src/version.c: Version now 1.23.
10870
10871 1995-05-03 Richard Stallman <rms@gnu.org>
10872
10873 * doc/bison.texinfo:
10874 Rewrite "Conditions for Using Bison".
10875 Update version to 1.24.
10876
10877 1995-05-03 Richard Stallman <rms@gnu.org>
10878
10879 * bison.simple: Change distribution terms.
10880
10881 1995-02-23 Richard Stallman <rms@gnu.org>
10882
10883 * src/files.c: Test __VMS_POSIX as well as VMS.
10884
10885 1995-02-14 Jim Meyering <meyering@gnu.org>
10886
10887 * src/bison.s1 (__yy_memcpy):
10888 Renamed from __yy_bcopy to avoid
10889 confusion. Reverse FROM and TO arguments to be consistent with
10890 those of memcpy.
10891
10892 1995-02-14 Jim Meyering <meyering@gnu.org>
10893
10894 * bison.simple (__yy_memcpy):
10895 Renamed from __yy_bcopy to avoid
10896 confusion. Reverse FROM and TO arguments to be consistent with
10897 those of memcpy.
10898
10899 1994-11-10 David J. MacKenzie <djm@gnu.org>
10900
10901 * NEWS: reformat
10902
10903 * NEWS: New file.
10904
10905 * Makefile.in (DISTFILES): Include NEWS.
10906
10907 * Makefile.in (DISTFILES):
10908 Include install-sh, not install.sh.
10909
10910 * configure.in: Update to Autoconf v2 macro names.
10911
10912 1994-10-05 David J. MacKenzie <djm@gnu.org>
10913
10914 * Makefile.in: fix typo
10915
10916 * Makefile.in (prefix, exec_prefix):
10917 Let configure set them.
10918
10919 1994-09-28 David J. MacKenzie <djm@gnu.org>
10920
10921 * Makefile.in: Set datadir to $(prefix)/share.
10922
10923 1994-09-15 Richard Stallman <rms@gnu.org>
10924
10925 * src/bison.s1:
10926 Update copyright notice and GPL version.
10927
10928 1994-09-15 Richard Stallman <rms@gnu.org>
10929
10930 * bison.simple:
10931 Update copyright notice and GPL version.
10932
10933 1994-07-12 Richard Stallman <rms@gnu.org>
10934
10935 * src/reduce.c, src/reader.c:
10936 entered into RCS
10937
10938 1994-05-05 David J. MacKenzie <djm@gnu.org>
10939
10940 * Makefile.in: entered into RCS
10941
10942 1994-03-26 Richard Stallman <rms@gnu.org>
10943
10944 * src/bison.s1: entered into RCS
10945
10946 1994-03-26 Richard Stallman <rms@gnu.org>
10947
10948 * bison.simple: entered into RCS
10949
10950 1994-03-25 Richard Stallman <rms@gnu.org>
10951
10952 * src/main.c: entered into RCS
10953
10954 1994-03-24 Richard Stallman <rms@gnu.org>
10955
10956 * src/conflicts.c: entered into RCS
10957
10958 1994-01-02 Richard Stallman <rms@gnu.org>
10959
10960 * Makefile.in: *** empty log message ***
10961
10962 1993-11-21 Richard Stallman <rms@gnu.org>
10963
10964 * src/bison.s1: *** empty log message ***
10965
10966 1993-11-21 Richard Stallman <rms@gnu.org>
10967
10968 * doc/bison.texinfo: entered into RCS
10969
10970 * doc/bison.texinfo: *** empty log message ***
10971
10972 1993-11-21 Richard Stallman <rms@gnu.org>
10973
10974 * bison.simple: *** empty log message ***
10975
10976 1993-10-25 David J. MacKenzie <djm@gnu.org>
10977
10978 * doc/bison.texinfo: *** empty log message ***
10979
10980 1993-10-19 Richard Stallman <rms@gnu.org>
10981
10982 * src/bison.s1: *** empty log message ***
10983
10984 1993-10-19 Richard Stallman <rms@gnu.org>
10985
10986 * bison.simple: *** empty log message ***
10987
10988 1993-10-14 Richard Stallman <rms@gnu.org>
10989
10990 * src/bison.s1: *** empty log message ***
10991
10992 1993-10-14 Richard Stallman <rms@gnu.org>
10993
10994 * bison.simple: *** empty log message ***
10995
10996 1993-09-14 David J. MacKenzie <djm@gnu.org>
10997
10998 * doc/bison.texinfo: *** empty log message ***
10999
11000 1993-09-13 Noah Friedman <friedman@gnu.org>
11001
11002 * Makefile.in: *** empty log message ***
11003
11004 1993-09-10 Richard Stallman <rms@gnu.org>
11005
11006 * src/conflicts.c: *** empty log message ***
11007
11008 * src/system.h: entered into RCS
11009
11010 1993-09-10 Richard Stallman <rms@gnu.org>
11011
11012 * doc/bison.1: entered into RCS
11013
11014 1993-09-06 Noah Friedman <friedman@gnu.org>
11015
11016 * src/version.c: entered into RCS
11017
11018 1993-09-06 Noah Friedman <friedman@gnu.org>
11019
11020 * Makefile.in: *** empty log message ***
11021
11022 1993-07-30 David J. MacKenzie <djm@gnu.org>
11023
11024 * Makefile.in: *** empty log message ***
11025
11026 1993-07-24 Richard Stallman <rms@gnu.org>
11027
11028 * src/bison.s1: *** empty log message ***
11029
11030 1993-07-24 Richard Stallman <rms@gnu.org>
11031
11032 * bison.simple: *** empty log message ***
11033
11034 1993-07-08 David J. MacKenzie <djm@gnu.org>
11035
11036 * Makefile.in: *** empty log message ***
11037
11038 1993-07-04 Richard Stallman <rms@gnu.org>
11039
11040 * src/bison.s1: *** empty log message ***
11041
11042 1993-07-04 Richard Stallman <rms@gnu.org>
11043
11044 * bison.simple: *** empty log message ***
11045
11046 1993-06-26 David J. MacKenzie <djm@gnu.org>
11047
11048 * src/getargs.c: entered into RCS
11049
11050 1993-06-26 David J. MacKenzie <djm@gnu.org>
11051
11052 * doc/bison.texinfo: *** empty log message ***
11053
11054 * doc/bison.1: New file.
11055
11056 1993-06-25 Richard Stallman <rms@gnu.org>
11057
11058 * src/getargs.c: New file.
11059
11060 1993-06-16 Richard Stallman <rms@gnu.org>
11061
11062 * src/bison.s1: *** empty log message ***
11063
11064 1993-06-16 Richard Stallman <rms@gnu.org>
11065
11066 * bison.simple: *** empty log message ***
11067
11068 1993-06-03 Richard Stallman <rms@gnu.org>
11069
11070 * src/bison.s1: New file.
11071
11072 1993-06-03 Richard Stallman <rms@gnu.org>
11073
11074 * doc/bison.texinfo: *** empty log message ***
11075
11076 1993-06-03 Richard Stallman <rms@gnu.org>
11077
11078 * bison.simple: New file.
11079
11080 1993-05-19 Richard Stallman <rms@gnu.org>
11081
11082 * doc/bison.texinfo: New file.
11083
11084 1993-05-07 Noah Friedman <friedman@gnu.org>
11085
11086 * Makefile.in: *** empty log message ***
11087
11088 1993-04-28 Noah Friedman <friedman@gnu.org>
11089
11090 * src/reader.c: *** empty log message ***
11091
11092 1993-04-23 Noah Friedman <friedman@gnu.org>
11093
11094 * src/alloc.h: entered into RCS
11095
11096 1993-04-20 David J. MacKenzie <djm@gnu.org>
11097
11098 * src/version.c: *** empty log message ***
11099
11100 * src/files.c, src/allocate.c:
11101 entered into RCS
11102
11103 * src/reader.c: *** empty log message ***
11104
11105 * src/lex.c: entered into RCS
11106
11107 * src/conflicts.c: New file.
11108
11109 * src/symtab.c: entered into RCS
11110
11111 * src/alloc.h: New file.
11112
11113 * src/LR0.c: entered into RCS
11114
11115 1993-04-18 Noah Friedman <friedman@gnu.org>
11116
11117 * src/reader.c: New file.
11118
11119 * src/version.c: *** empty log message ***
11120
11121 1993-04-18 Noah Friedman <friedman@gnu.org>
11122
11123 * Makefile.in: *** empty log message ***
11124
11125 1993-04-17 Noah Friedman <friedman@gnu.org>
11126
11127 * Makefile.in: *** empty log message ***
11128
11129 1993-04-15 Richard Stallman <rms@gnu.org>
11130
11131 * src/main.c, src/files.c:
11132 New file.
11133
11134 1993-04-15 Noah Friedman <friedman@gnu.org>
11135
11136 * configure.in: entered into RCS
11137
11138 * configure.in: *** empty log message ***
11139
11140 * configure.in: New file.
11141
11142 1993-04-14 Richard Stallman <rms@gnu.org>
11143
11144 * Makefile.in: New file.
11145
11146 1993-04-13 Richard Stallman <rms@gnu.org>
11147
11148 * src/version.c: New file.
11149
11150 1993-03-25 Richard Stallman <rms@gnu.org>
11151
11152 * src/output.c: entered into RCS
11153
11154 1992-09-25 Richard Stallman <rms@gnu.org>
11155
11156 * configure.bat: entered into RCS
11157
11158 1992-06-22 Richard Stallman <rms@gnu.org>
11159
11160 * src/vmsgetargs.c: entered into RCS
11161
11162 1992-06-22 Richard Stallman <rms@gnu.org>
11163
11164 * doc/bison.rnh: entered into RCS
11165
11166 1992-04-20 David J. MacKenzie <djm@gnu.org>
11167
11168 * README: entered into RCS
11169
11170 1992-01-22 Richard Stallman <rms@gnu.org>
11171
11172 * src/machine.h: entered into RCS
11173
11174 1991-12-21 Richard Stallman <rms@gnu.org>
11175
11176 * src/lalr.c, src/closure.c:
11177 entered into RCS
11178
11179 1991-12-20 Richard Stallman <rms@gnu.org>
11180
11181 * src/state.h: entered into RCS
11182
11183 1991-12-18 Richard Stallman <rms@gnu.org>
11184
11185 * src/print.c, src/nullable.c, src/derives.c:
11186 entered into RCS
11187
11188 1991-11-03 David J. MacKenzie <djm@gnu.org>
11189
11190 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11191 entered into RCS
11192
11193 1988-09-09 Richard Stallman <rms@gnu.org>
11194
11195 * src/bison.hairy: entered into RCS
11196
11197 1987-12-16 Richard Stallman <rms@gnu.org>
11198
11199 * REFERENCES: entered into RCS
11200
11201 -----
11202
11203 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11204 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11205
11206 This file is part of Bison, the GNU Compiler Compiler.
11207
11208 Bison is free software; you can redistribute it and/or modify
11209 it under the terms of the GNU General Public License as published by
11210 the Free Software Foundation; either version 2, or (at your option)
11211 any later version.
11212
11213 Bison is distributed in the hope that it will be useful,
11214 but WITHOUT ANY WARRANTY; without even the implied warranty of
11215 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11216 GNU General Public License for more details.
11217
11218 You should have received a copy of the GNU General Public License
11219 along with Bison; see the file COPYING. If not, write to
11220 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11221 Boston, MA 02111-1307, USA.