]> git.saurik.com Git - bison.git/blame - ChangeLog
Update from Bruno Haible's 2003-04-14 patch to gnulib.
[bison.git] / ChangeLog
CommitLineData
089ac0f1
PE
12003-04-21 Yakov Markovitch <Markovitch@iso.ru>
2
3 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
4 Fix obvious typo that results in uncompilable GLR parsers
5 when both %pure-parser and %locations are used. (trivial change)
6
5ededac6
PE
72003-04-17 Paul Eggert <eggert@twinsun.com>
8
1b8f2fff
PE
9 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
10 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11 Do not insert the expected token via unput, as this runs afoul
12 of a POSIX-compatibility bug in flex 2.5.31.
13 All uses changed to BEGIN the parent state,
14 since we no longer insert the expected token via unput.
15 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
16 that is no longer emitted after the above change.
17
5ededac6
PE
18 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
19 the first one. This change is from Paul Hilfinger, and it fixes
20 regression reported by Werner Lemberg in
21 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
22
23 (resolve_sr_conflict): Don't invoke state_errs_set
24 unless one or more tokens have been explicitly made errors.
25 Otherwise, the above change causes Bison to abort.
26
27 * tests/existing.at (GNU pic Grammar): New test case, taken from
28 Lemberg's email.
29
b8be9132
AD
302003-03-31 Akim Demaille <akim@epita.fr>
31
32 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
33
d423d460
AD
342003-03-31 Akim Demaille <akim@epita.fr>
35
36 * src/output.c (prepare_symbols): Avoid trailing spaces in the
37 output.
38
c7e441b4
AD
392003-03-31 Akim Demaille <akim@epita.fr>
40
41 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
42 From Paul Hilfinger.
43
231897ad
AD
442003-03-29 Akim Demaille <akim@epita.fr>
45
46 * m4/error.m4: Do not put under dynamic conditions some code which
47 expansion is under static control.
48
5b066063
AD
492003-03-29 Akim Demaille <akim@epita.fr>
50
51 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
52
22a74fec
AD
532003-03-29 Akim Demaille <akim@epita.fr>
54
55 * doc/bison.texinfo (Strings are Destroyed): New.
56
0eee27e7
PE
572003-03-13 Paul Eggert <eggert@twinsun.com>
58
59 * .cvsignore: Add configure.lineno.
60 * src/.cvsignore: Add yacc.
61 * tests/.cvsignore: Add testsuite.log.
62 * doc/fdl.texi: Sync with latest FSF version.
63
f61aad93
PE
642003-03-12 Paul Eggert <eggert@twinsun.com>
65
537636c7
PE
66 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
67 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
68 cursor, instead of leaving it undefined. This fixes a bug
69 reported by Tim Van Holder in
70 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
71 * tests/input.at (Torturing the Scanner): Test the scanner on
72 an empty input file, which was Tim Van Holder's test case.
73
74 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
75 <sys/resource.h> can be included, include sys/time.h and
76 sys/times.h first, if available. This works around the SunOS
77 4.1.4 porting bug reported by Bruce Becker in
78 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
79
80 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
81 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
82 AC_HEADER_SYS_WAIT.
83
f61aad93
PE
84 Merge changes from gnulib. This was prompted because the CVS
85 snapshot didn't build on Solaris 7 due to strnlen problems.
86
87 These changes need to be merged back into gnulib:
88 * lib/hash.c: Include <stdbool.h> unconditionally.
89 * m4/onceonly.m4 (m4_quote): New macro.
90 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
91 Quote AC_FOREACH variable-expansions properly.
92 The 2003-01-03 obstack.h change also needs merging.
93 {end of changes requiring merging}
5b066063 94
f61aad93
PE
95 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
96 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
97 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
98 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
99 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
100 New files, imported from gnulib.
101 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
102 above.
103
104 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
105 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
106 gnulib sources.
107
108 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
109 Add.
110 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
111 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
112 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
113 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
114 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
115 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
116 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
117 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
118 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
119 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
120 (jm_PREREQ_ARGMATCH): Remove.
121 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
122 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
123
124 * src/system.h: Include <stdbool.h> unconditionally.
125
126 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
127 assuming at least C89 in the bitset code for some time now.
128
d2ffe116
AD
1292003-03-03 Akim Demaille <akim@epita.fr>
130
131 * ro.po: New.
132
052826fd
AD
1332003-03-02 Akim Demaille <akim@epita.fr>
134
135 * doc/bison.texinfo (Table of Symbols): Reactivate the
136 documentation for %lex-param, and %parse-param.
137
c4749565
AD
1382003-03-02 Akim Demaille <akim@epita.fr>
139
140 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
141 generate verbose error messages.
142 Use the number of tokens as an upper bound in yytname, as it
143 cannot be a non terminal.
144
d5286af1
AD
1452003-03-02 Akim Demaille <akim@epita.fr>
146
147 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
148 message.
149
22e304a6
AD
1502003-03-02 Akim Demaille <akim@epita.fr>
151
22e304a6
AD
152 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
153 Use them to exercise yycheck overrun.
154 Based on Andrew Suffield's grammar.
155
67a25fed
AD
1562003-03-02 Akim Demaille <akim@epita.fr>
157
158 Create tests/local.at for Bison generic testing macros.
159
160 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
161 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
162 This new file.
163 * tests/calc.at (AT_CHECK_CALC): Adjust.
164 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
165 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
166 * tests/local.at: here.
167 (AT_COMPILE_CXX): Tags the tests using it as c++.
168 Ignore the test if CXX is not functional.
169
9c2b381f
PE
1702003-03-01 Paul Eggert <eggert@twinsun.com>
171
172 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
173 not loc->end, since loc->end might contain garbage and this leads
174 to undefined behavior on some platforms.
175 (id_loc, token_start): Use (IF_LINTed) initial values that do not
176 depend on *loc, so that the reader doesn't give the the false
177 impression that *loc is initialized.
178 (<INITIAL>"%%"): Do not bother setting code_start, since its value
179 does not survive the return.
180
0433ba88
AD
1812003-03-01 Akim Demaille <akim@epita.fr>
182
183 * src/scan-gram.l (code_start): Always initialize it when entering
184 into yylex, as SC_EPILOGUE is activated *before* the corresponding
185 yylex invocation. An alternative would be making it static, but
186 then it starts with the second %%'s beginning, instead of its end.
187
b305ea69
PE
1882003-02-28 Paul Eggert <eggert@twinsun.com>
189
190 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
191 around a UnixWare 7.1.1 porting bug reported by John Hughes in
192 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
193
c3d25e01
PE
1942003-02-26 Paul Eggert <eggert@twinsun.com>
195
196 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
197 Remove Sequent/Pyramid discussion (nobody uses them any more).
198 Merge VMS and MS-DOS discussion; these ports may well be dead
199 but let's keep mentioning them for now. Put <> around email
200 addresses. Add copyright notice.
201
c267ffbc
PE
2022003-02-24 Paul Eggert <eggert@twinsun.com>
203
204 * data/glr.c (yy_reduce_print): yylineno -> yylno,
205 to avoid collision with flex use of yylineno.
206 Problem reported by Bruce Lilly in
207 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
208 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
209 * data/yacc.c (yy_reduce_print): Likewise.
210
211 * config/depcomp: Sync with Automake 1.7.3.
212
f939fc12
AD
2132003-02-21 Akim Demaille <akim@epita.fr>
214
215 * data/lalr1.cc: Use temporary variables instead of casts to
216 change integer types.
217 Suggested by Paul Eggert.
218
95923bd6
AD
2192003-02-21 Akim Demaille <akim@epita.fr>
220
221 * doc/bison.texinfo: Use "location" consistently to refer to @n,
222 to avoid confusions with lalr1.cc's notion of Position.
223 Suggested by Paul Eggert.
224
2cdc240e
AD
2252003-02-20 Akim Demaille <akim@epita.fr>
226
227 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
228 before initial_columns.
229 (location.hh): Use consistent variable names when defining the
230 operator<<.
231 Use "last" so that we subtract from Positions, not from unsigned.
232
5d003116
AD
2332003-02-20 Akim Demaille <akim@epita.fr>
234
235 * data/lalr1.cc (position.hh): New subfile, including the extended
236 and Doxygen'ed documentation of class Position.
237 (location.hh): Use it.
238 Document a` la Doxygen.
ba1ecc07 239 With the help of Benoit Perrot.
5d003116 240
d02b25f9
AD
2412003-02-20 Akim Demaille <akim@epita.fr>
242
243 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
244 AT_YACC_IF.
245 Redefine AT_YYERROR_SEES_LOC_IF using it.
246 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
247 not defined.
248 Don't use the location in yy::Parser::error_ and
249 yy::Parser::print_ when not %locations.
250 Activate more lalr1.cc tests.
251
0d1c3a04
AD
2522003-02-19 Akim Demaille <akim@epita.fr>
253
254 * data/lalr1.cc: When displaying a line number, be sure to make it
255 an int.
256
60a777aa
AD
2572003-02-19 Akim Demaille <akim@epita.fr>
258
259 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
260 Remove, useless.
261 (YYABORT, YYACCEPT, YYERROR): New.
262 * tests/calc.at: Renable the lalr1.cc test.
263
0b86fc41
AD
2642003-02-19 Akim Demaille <akim@epita.fr>
265
266 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
267 error recovery, mixing with/without pops and discarding of the
268 lookahead.
269 Exercise YYERROR.
270 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
271
da99a5dc
PE
2722003-02-17 Paul Eggert <eggert@twinsun.com>
273
274 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
275 * tests/testsuite.at (AT_COMPILE): Use them.
276 This fixes the testsuite problem reported by Robert Lentz in
277 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
278
93b8c255
PE
2792003-02-12 Paul Eggert <eggert@twinsun.com>
280
281 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
282 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
283 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
284 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
285 Check for malloc failure, for consistency with yacc.c.
286 (yytname_size): Remove, for consistency with yacc.c.
287
288 The bug still remains in data/lalr1.cc, as I didn't have time
289 to fix it there.
290
7548fed2
AD
2912003-02-06 Akim Demaille <akim@epita.fr>
292
293 * configure.ac (GXX): Rename as...
294 (CXX): this, to keep the original Autoconf semantics.
295 Require 2.57.
296 * data/lalr1.cc: Fix b4_copyright invocations.
297 If YYDEBUG is not defined, don't depend upon name_ being defined.
298 (location.hh): Include string and iostream.
299 (Position::filename): New member.
300 (Position::Position ()): New.
301 (operator<< (Position)): New.
302 (operator- (Position, int)): New.
303 (Location::first, Location::last): Rename as...
304 (Location::begin, Location::end): these, to mock the conventional
305 iterator names.
306 (operator<< (Location)): New.
307 * tests/atlocal.in (CXX): New.
308 * tests/testsuite.at (AT_COMPILE_CXX): New.
309 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
310 locations in a more synthetic way.
311 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
312 lalr1.cc is used.
313 Adjust the C locations to match those from Emacs: first column is
314 column 0.
315 Change all the expected results.
316 Conform to the GCS: simplify the locations when applicable.
317 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
318 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
319 these CPP macros with the m4 macros new defined by...
320 (AT_CHECK_PUSHDEFS): this, i.e.:
321 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 322 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
323 New macros.
324 (AT_CHECK_POPDEFS): Undefine them.
325 (AT_CHECK_CALC_LALR1_CC): New.
326 Use it for the first lalr1.cc test.
327
43a176ef
AD
3282003-02-04 Akim Demaille <akim@epita.fr>
329
330 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
331 Location as is defined.
332
fc049e9c
AD
3332003-02-04 Akim Demaille <akim@epita.fr>
334
335 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
336 name_ being defined.
337
a737b216
PE
3382003-02-03 Paul Eggert <eggert@twinsun.com>
339
340 * src/gram.h (start_symbol): Remove unused decl.
341
342 Use more-consistent naming conventions for local vars.
343
344 * src/derives.c (derives_compute): Change type of local var from
345 int to rule_number.
346 * src/gram.c (grammar_rules_partial_print): Likewise.
347 * src/print.c (print_core): Likewise.
348 * src/reduce.c (reduce_grammar_tables): Likewise.
349
350 * src/gram.c (grammar_dump): Change name of item_number *
351 local var from r to rp.
352 * src/nullable.c (nullable_compute): Likewise.
353
354 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
355
356 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
357 for symbol or symbol_number var.
358 * src/reader.c (grammar_start_symbol_set): Likewise.
359 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
360 Likewise.
361 * src/state.c (transitions_to): Likewise.
362 * src/state.h: Likewise.
363 * src/tables.c (symbol_number_to_vector_number): Likewise.
364
365 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
366 char * var.
367
368 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
369 var.
370
371 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
372 var.
373
374 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
375 Use str, not s, for char * var. Use ch, not c, for character var.
376 Use size for size var.
377
378 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
379 char * var.
380 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
381 uniqstr var.
382 * src/uniqstr.h: Likewise.
383
384 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
385 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
386 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
387 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
388 param to have same name as that of enum, so that we don't use
389 "s" to stand for a non-state.
390
68e93ad5
AD
3912003-02-02 Akim Demaille <akim@epita.fr>
392
393 * src/scan-skel.l: Scan more than one inert character per yylex
394 invocation.
395
92898986
PE
3962003-02-01 Paul Eggert <eggert@twinsun.com>
397
398 Version 1.875a.
399
1d9d5d71
PE
400 * po/LINGUAS: Add ms.
401
0435d061
AD
4022003-01-30 Akim Demaille <akim@epita.fr>
403
404 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
405
6029a57f
PH
4062003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
407
408 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
409 of $1.
0435d061
AD
410
411 Changes in response to error report by S. Eken: GLR mode does not
6029a57f
PH
412 handle negative $ indices or $ indices in embedded rules correctly.
413 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 414
6029a57f
PH
415 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
416 (b4_rhs_location): Ditto.
0435d061 417 (yyfill): New function to copy from stack tree into array
6029a57f 418 incrementally.
0435d061
AD
419 (yyuserAction): Modify to allow incremental move of semantic values
420 to rhs array when in GLR mode.
421 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
422 as needed.
423 Remove dummy use of yystack, as there is now a guaranteed use.
424 (yydoAction): Modify to allow incremental move of semantic values
425 to rhs array when in GLR mode.
426 (yyresolveAction): Ditto.
427 (yyglrShiftDefer): Update comment.
0435d061 428 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
429 (yyglrReduce): Ditto.
430 (yydoAction): Ditto
0435d061 431
6029a57f
PH
432 * tests/glr-regr1.at: Rename to ...
433 * tests/glr-regression.at: Add new regression test for the problems
434 described above (adapted from S. Eken).
435 Update copyright notice.
436 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
437 * tests/Makefile.am: Ditto.
438
6cee6297
PE
4392003-01-28 Paul Eggert <eggert@twinsun.com>
440
441 * data/lalr1.cc: Do not use @output_header_name@ unless
442 b4_defines_flag is set. This fixes two bugs reported by
443 Tim Van Holder in
444 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
445 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
446
b2a836b5
PE
4472003-01-21 Paul Eggert <eggert@twinsun.com>
448
449 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
450 we don't need to worry about yyerrlab1 being reported as an
451 "unused label" by non-GCC C compilers. The downside is that if
452 locations are used then a couple of statements are duplicated each
453 time YYERROR is invoked, but the upside is that the warnings
454 should vanish.
455 (yyerrlab1): Move code to YERROR.
456 (yyerrlab2): Remove. Change uses back to yyerrlab1.
457 This reverts some of the 2002-12-27 change.
458
4196b931
PE
4592003-01-17 Paul Eggert <eggert@twinsun.com>
460
461 * src/output.c (symbol_printers_output): Fix typo that led
462 to core dump. Problem reported by Antonio Rus in
463 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
464
3ae831b4
AD
4652003-01-13 Akim Demaille <akim@epita.fr>,
466 Quoc Peyrot <chojin@lrde.epita.fr>,
467 Robert Anisko <anisko_r@lrde.epita.fr>
468
469 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
470 when the stacks contain one element, as the loop would otherwise
471 free the last state, and then use the top state (the one we just
472 popped). This means that the initial elements will not be freed
473 explicitly, as is the case in yacc.c; it is not a problem, as
474 these elements have fake values.
475
e3aa65c5
PE
4762003-01-11 Paul Eggert <eggert@twinsun.com>
477
478 * NEWS: %expect-violations are now just warnings, reverting
479 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
480 bootstrapping problem reported by Matthias Klose; see
481 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
482 * src/conflicts.c (conflicts_print): Likewise.
483 * tests/conflicts.at (%expect not enough, %expect too much,
484 %expect with reduce conflicts): Likewise.
485 * doc/bison.texinfo (Expect Decl): Document this. Also mention
486 that the warning is enabled if the number of conflicts changes
487 (not necessarily increases).
488
489 * src/getargs.c (version): Update copyright year.
490
f0057011
AD
4912003-01-09 Akim Demaille <akim@epita.fr>
492
493 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
494
1ee6d2a0
PE
4952003-01-08 Paul Eggert <eggert@twinsun.com>
496
497 * Makefile.maint (WGETFLAGS):
498 New macro, containing "-C off" to disable proxy caches.
499 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
500 (rel-check): Use $(WGET) instead of wget.
501
d4fd77c4
PE
5022003-01-06 Paul Eggert <eggert@twinsun.com>
503
504 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
505 the GLR paper of Scott, Johnstone and Hussain.
506
464c6927
PE
5072003-01-04 Paul Eggert <eggert@twinsun.com>
508
d600ee67
PE
509 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
510 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
511 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
512 (EXTRA_LIBRARIES): New var, for liby.a.
513 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
514 (EXTRA_SCRIPTS): New var, for yacc.
515
464c6927
PE
516 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
517 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
518 Problem reported by Nelson H. F. Beebe.
519
5202003-01-03 Paul Eggert <eggert@twinsun.com>
521
522 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
523 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
524 when compiling Bison 1.875's `bitset bset = obstack_alloc
525 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
526
527 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
528 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
529 grow to a huge size with typical invocation.
d600ee67 530
464c6927
PE
531 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
532 Use the pattern recommended by Autoconf 2.57, except also protect
533 against double-definition.
534 * src/system.h: Likewise.
535 Portability issues reported by Nelson H. F. Beebe.
d600ee67 536
464c6927
PE
537 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
538 All uses changed. Provide a definition in both C and C++.
539 (yytrue, yyfalse): Define even if defined (__cplusplus).
540
541 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
542 Reported by Nelson H. F. Beebe.
d600ee67 543
464c6927
PE
544 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
545
0f42c7d5
PE
5462003-01-02 Paul Eggert <eggert@twinsun.com>
547
548 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
549 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
550 Bug reported by Nelson H. F. Beebe.
551
dc546b0f
PE
5522003-01-01 Paul Eggert <eggert@twinsun.com>
553
554 * Version 1.875.
555
2c09b6a7
PE
5562002-12-30 Paul Eggert <eggert@twinsun.com>
557
558 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
559 Moved here from...
560 (<INITIAL>","): Here. This causes stray "," to be treated
561 more uniformly.
562
dc546b0f 563 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
564 last brace in braced code when not in Yacc mode, for compatibility
565 with Bison 1.35. This resurrects the 2001-12-15 patch to
566 src/reader.c.
567
568 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
569 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
570
535c0f63
PE
5712002-12-28 Paul Eggert <eggert@twinsun.com>
572
573 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
574 that of SYM's type. This fixes Debian bug 168069, reported by
575 Thomas Olsson.
d600ee67 576
963fcc17
PE
5772002-12-28 Paul Eggert <eggert@twinsun.com>
578
579 Version 1.75f.
580
581 Switch back to the Yacc style of conflict reports, undoing some
582 of the 2002-07-30 change.
583 * doc/bison.texinfo (Understanding): Use Yacc style for
584 conflict reports. Also, use new way of locating rules.
585 * src/conflicts.c (conflict_report):
586 Renamed from conflict_report_yacc, removing the old
587 'conflict_report'. Translate the entire conflict report at once,
588 so that we don't assume that "," has the same interpretation in
589 all languages.
590 (conflicts_output): Use Yacc-style conflict report for each state,
591 instead of our more-complicated style.
592 (conflicts_print): Use Yacc-style conflict report, except print
593 the input file name when not emulating Yacc.
594 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
595 Conflicted Reduction, %expect not enough, %expect too much,
596 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
597 * tests/existing.at (GNU Cim Grammar): Likewise.
598 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
599
600 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
601 fatal): Don't invoke fflush; it's not needed and it might even be
602 harmful for stdout, as stdout might not be open.
603 * src/reduce.c (reduce_print): Likewise.
604
b1efe548
PE
6052002-12-27 Paul Eggert <eggert@twinsun.com>
606
607 Fix a bug where error locations were not being recorded correctly.
608 This problem was originally reported by Paul Hilfinger in
e3aa65c5 609 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
610
611 * data/yacc.c (yyparse): New local var yylerrsp, to record the
612 top of the location stack's error locations.
613 (yyerrlab): Set it. When discarding a token, push its location
614 onto yylerrsp so that we don't lose track of the error's end.
615 (yyerrlab1): Now is only the target of YYERROR, so that we can
616 properly record the location of the action that failed. For GCC
617 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
618 GCC warning about yyerrlab1 being unused if YYERROR is unused.
619 (yyerrlab2): New label, which yyerrlab now falls through to.
620 Compute the error's location by applying YYLLOC_DEFAULT to
621 the locations of all the symbols that went into the error.
622 * doc/bison.texinfo (Location Default Action): Mention that
623 YYLLOC_DEFAULT is also invoked for syntax errors.
624 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
625 Error locations include the locations of all the tokens that were
626 discarded, not just the last token.
d600ee67 627
983c5c2c
PE
6282002-12-26 Paul Eggert <eggert@twinsun.com>
629
b1efe548
PE
630 * src/files.c: Include quote.h.
631 (compute_output_file_names): Warn if we detect conflicting
632 outputs to the same file. This should catch the misunderstanding
633 exemplified by Debian Bug 165349, reported by Bruce Stephens..
634
635 * src/conflicts.c (conflicts_print): If the user specifies
636 "%expect N", report an error if there are any reduce/reduce
637 conflicts. This is what the manual says should happen.
638 This fixes Debian bug 130890, reported by Anthony DeRobertis.
639 * tests/conflicts.at (%expect with reduce conflicts): New test.
640
983c5c2c
PE
641 Don't use m4_include on relative file names, as it doesn't work as
642 desired if there happens to be a file with that name under ".".
d600ee67 643
983c5c2c
PE
644 * m4sugar/version.m4: Remove; it was included but it wasn't used.
645 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
646 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
647 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
648 * src/output.c (output_skeleton): Use full path names when
649 specifying a file to include; don't rely on include path, as
650 it's unreliable when the working file contains a file with
651 that name.
d600ee67 652
983c5c2c
PE
6532002-12-25 Paul Eggert <eggert@twinsun.com>
654
655 Remove obsolete references to bison.simple and bison.hairy.
656 Problem mentioned by Aubin Mahe in
e3aa65c5 657 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
658 * data/glr.c: Comment fix.
659 * doc/bison.1: Remove references. Also, mention "yacc".
660
661 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
662 with -g option.
663
664 * src/parse-gram.y (declaration): Use enum "report_states" rather
665 than its numeric value 1.
666
667 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
668 opening a new one. This fixes Debian bug 165349, reported by
669 Bruce Stephens.
670
23f2d9dc
PE
6712002-12-24 Paul Eggert <eggert@twinsun.com>
672
673 Version 1.75e.
674
675 * Makefile.maint (cvs-update): Don't assume that the shell
676 supports $(...), as Solaris sh doesn't.
677
678 * src/parse-gram.y (lloc_default): Remove test for empty
679 nonterminals at the end, since it didn't change the result.
680
6812002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
682
683 If the user does not define YYSTYPE as a macro, Bison now declares it
684 using typedef instead of defining it as a macro. POSIX requires this.
685 For consistency, YYLTYPE is also declared instead of defined.
686
687 %union directives can now have a tag before the `{', e.g., the
688 directive `%union foo {...}' now generates the C code
689 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
690 The default union tag is `YYSTYPE', for compatibility with Solaris 9
691 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
692 instead of `yyltype'.
693
694 `yystype' and `yyltype' are now obsolescent macros instead of being
695 typedefs or tags; they are no longer documented and will be
696 withdrawn in a future release.
697
698 * data/glr.c (b4_location_type): Remove.
699 (YYSTYPE): Renamed from yystype.
700 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
701 (struct YYLTYPE): Renamed from struct yyltype.
702 (YYLTYPE): Renamed from yyltype.
703 (yyltype, yystype): New (and obsolescent) macros,
704 for backward compatibility.
705 * data/yacc.c: Likewise.
706
707 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
708 does not specify a union tag. This is for compatibility with
709 Solaris 9 yacc.
710
711 * src/parse-gram.y (add_param): 2nd arg is now char * not char
712 const *, since it is now modified by stripping surrounding { }.
713 (current_braced_code): Remove.
714 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
715 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
716 trailing " {...}". Now of type <chars>.
717 (grammar_declaration): Adjust to bundled tokens.
718 (code_content): Remove; stripping is now done by add_param.
719 (print_token_value): Print contents of bundled tokens.
720 (token_name): New function.
721
722 * src/reader.h (braced_code, current_braced_code): Remove.
723 (token_name): New decl.
724
725 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
726 token_type, not braced_code code_kind. All uses changed.
727 (SC_PRE_CODE): New state, for scanning after a keyword that
728 has (or usually has) an immediately-following braced code.
729 (token_type): New local var, to keep track of which token type
730 to return when scanning braced code.
731 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 732 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
733 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
734 instead of returning a token type immediately.
735 (<INITIAL>"{"): Set token type.
736 (<SC_BRACED_CODE>"}"): Use it.
737 (handle_action_dollar, handle_action_at): Now returns bool
738 indicating success. Fail if ! current_rule; this prevents a core dump.
739 (handle_symbol_code_dollar, handle_symbol_code_at):
740 Remove; merge body into caller.
741 (handle_dollar, handle_at): Complain in invalid contexts.
742
743 * NEWS, doc/bison.texinfo: Document the above.
744 * NEWS: Fix years and program names in copyright notice.
745
879ca4f8
PE
7462002-12-17 Paul Eggert <eggert@twinsun.com>
747
748 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
749 Reporting, Table of Symbols): Omit mentions of %lex-param and
750 %parse-param from the documentation for now.
751
1c5fe69d
PE
7522002-12-15 Paul Eggert <eggert@twinsun.com>
753
754 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
755 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
756 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
757 disagreed with the Bison documentation. Bug
758 reported by Andrew Walrond.
d600ee67 759
1c5fe69d
PE
760 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
761 as the caller now does that.
762 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
763 (YYEMPTY): Parenthesize right hand side, since others use it.
764 (yyparse): Don't assume that our generated code is the only code
765 that sets yychar.
766
d1de5372
PE
7672002-12-13 Paul Eggert <eggert@twinsun.com>
768
769 Version 1.75d.
770
771 POSIX requires a "yacc" command.
772 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
773 (MOSTLYCLEANFILES): Add yacc.
774 (yacc): New rule.
1c5fe69d 775 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
776 as an alias for bison y.
777
778 * po/LINGUAS: Add da.
d600ee67 779
d1de5372
PE
780 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
781 problem with latest <getopt.h>.
782 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
783
784 * doc/fdl.texi: Upgrade to 1.2.
785 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
786 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
787 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
788 gnulib.
789 * config/install-sh: Sync with autotools.
790
791 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
e3aa65c5 792 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
793 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
794 locations are requested.
795 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
796 locations are requested.
797
d0f3fe23
PE
7982002-12-12 Paul Eggert <eggert@twinsun.com>
799
800 Remove unportable casts and storage allocation tricks.
801 While we're at it, remove almost all casts, since they
802 usually aren't needed and are a sign of trouble.
803
804 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
805
806 * src/derives.c (derives_compute): Do not subtract NTOKENS from
807 the pointer DSET returned by malloc; this isn't portable.
808 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
809 Similarly for DERIVES.
810 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
811 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
812 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
813
814 * src/derives.c (derives_compute): Do not bother invoking
815 int_of_rule_number, since rule numbers are integers.
816
817 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
818 rather than XMALLOC (char, N).
819
820 * src/files.c (filename_split): Rewrite to avoid cast.
821
822 * src/gram.h (symbol_number_as_item_number,
823 item_number_as_symbol_number, rule_number_as_item_number,
824 item_number_as_rule_number):
825 Now inline functions rather than macros, to avoid casts.
826 * src/state.h (state_number_as_int): Likewise.
827 * src/tables.c (state_number_to_vector_number,
828 symbol_number_to_vector_number): Likewise.
829
830 * src/gram.h (int_of_rule_number): Remove; no longer used.
831
832 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
833 since the resulting storage is always stored into.
834
835 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
836 where it's needed.
837
838 * src/muscle_tab.c (muscle_m4_output):
839 Now inline. Return bool, not int.
840 * src/state.c (state_compare): Likewise.
841 * src/symtab.c (symbol_check_defined,
842 symbol_check_alias_consistency, symbol_pack, symbol_translation,
843 hash_compare_symbol, hash_symbol):
844 Likewise.
845 * src/uniqstr.c (uniqstr_print): Likewise.
846 * src/muscle_tab.c (muscle_m4_output_processor):
847 New function, to avoid casts.
848 * src/state.c (state_comparator, stage_hasher): Likewise.
849 * src/symtab.c (symbol_check_defined_processor,
850 symbol_check_alias_consistency_processor, symbol_pack_processor,
851 symbol_translation_processor, hash_symbol_comparator,
852 hash_symbol_hasher): Likewise.
853 * src/uniqstr.c (uniqstr_print_processor): Likewise.
854 * src/muscle_tab.c (muscles_m4_output):
855 Use new functions instead of casting old functions unportably.
856 * src/state.c (state_hash_new): Likewise.
857 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
858 symbols_token_translations_init):
859 Likewise.
860 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
861
862 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
863 var instead of casting to long, to avoid casts.
864 (prepare_states): Use MALLOC rather than alloca, so that we don't
865 have to worry about alloca.
866 * src/state.c (state_hash_lookup): Likewise.
867
868 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
869 local var instead of casting to unsigned char, to avoid casts.
870
871 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
872 STATE_ALLOC): Remove.
873 (transitions_new, errs_new, reductions_new, state_new): Use malloc
874 rather than calloc, and use offsetof to avoid allocating slightly
875 too much storage.
876 (state_new): Initialize all members.
877
878 * src/state.c (state_hash): Use unsigned accumulator, not signed.
879
880 * src/symtab.c (symbol_free): Remove; unused.
881 (symbol_get): Remove cast in lhs of assignment.
882 (symbols_do): Now static. Accept generic arguments, not
883 hashing-related ones.
884
885 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
886 (symbol_processor): Remove.
887 (symbols_do): Remove decl; now static.
888
889 * src/system.h (alloca): Remove; decl no longer needed.
890 (<stddef.h>): Include, for offsetof.
891 (<inttypes.>, <stdint.h>): Include if available.
892 (uintptr_t): New type, if system lacks it.
893 (CALLOC, MALLOC, REALLOC): New macros.
894 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
895 new macros.
896
897 * src/tables.c (table_size): Now int, to pacify GCC.
898 (table_grow, table_ninf_remap): Use signed table size.
899 (save_row): Don't bother initializing locals when not needed.
900 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
901 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
902
903 * src/vcg.h: Correct misspellings.
904
905 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
906
907
908 * src/getargs.c (getargs): Don't assume EOF == -1.
909
26b4a969
PE
9102002-12-09 Paul Eggert <eggert@twinsun.com>
911
912 Change identifier spellings to avoid collisions with names
913 that are reserved by POSIX.
914
915 Don't use names ending in _t, since POSIX reserves them.
916 For consistency, remove _e and _s endings -- they're weren't
917 needed to remove ambiguity. All uses changed.
918 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
919 turn was just renamed from struniq_t.
920 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
921 which in turn was just renamed from struniq_processor_t.
922 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
923 in turn was renamed from hash_compare_struniq_t.
924 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
925 (state_list): Renamed from state_list_t.
926 * src/assoc.h (assoc): Renamed from assoc_t.
927 * src/conflicts.c (enum conflict_resolution): Renamed from
928 enum conflict_resolution_e.
929 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
930 (rule_list): Renamed from rule_list_t.
931 * src/getargs.h (enum trace): Renamed from enum trace_e.
932 (enum report): Renamed from enum report_e.
933 * src/gram.h (item_number): Renamed from item_number_t.
934 (rule_number): Renamed from rule_number_t.
935 (struct rule_s): Remove the "rule_s" part; not used.
936 (rule): Renamed from rule_t.
937 (rule_filter): Renamed from rule_filter_t.
938 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
939 (goto_list): Renamed from goto_list_t.
940 * src/lalr.h (goto_number): Renamed from goto_number_t.
941 * src/location.h (location): Renamed from location_t.
942 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
943 and moved here from:
944 * src/muscle_tab.h (muscle_entry_t): here.
945 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
946 (rule_list): Renamed from rule_list_t.
947 * src/print_graph.c (static_graph): Renamed from graph.
948 * src/reader.h (braced_code): Renamed from braced_code_t.
949 Remove brace_code_e tag.
950 * src/relation.h (relation_node): Renamed from relation_node_t.
951 (relation_nodes): Renamed from relation_nodes_t.
952 (relation): Renamed from relation_t.
953 * src/state.h (state_number): Renamed from state_number_t.
954 (struct state): Renamed from struct state_s.
955 (state): Renamed from state_t.
956 (transitions): Renamed from transitions_t. Unused (and
957 misspelled) transtion_s tag removed.
958 (errs): Renamed from errs_t. Unused errs_s tag removed.
959 (reductions): Renamed from reductions_t. Unused tag
960 reductions_s removed.
961 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
962 (struct symbol_list): Renamed from struct symbol_list_s.
963 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
964 (struct symbol): Renamed from struct symbol_s.
965 (symbol): Renamed from symbol_t.
966 * src/tables.c (vector_number): Renamed from vector_number_t.
967 (action_number): Renamed from action_t.
968 * src/tables.h (base_number): Renamed from base_t.
969 * src/vcg.h (enum color): Renamed from enum color_e.
970 (enum textmode): Renamed from enum textmode_e.
971 (enum shape): Renamed from enum shape_e.
972 (struct colorentry): Renamed from struct colorentry_s.
973 (struct classname): Renamed from struct classname_s.
974 (struct infoname): Renamed from struct infoname_s.
975 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
976 (enum decision): Renamed from enum decision_e.
977 (enum orientation): Renamed from enum orientation_e.
978 (enum alignment): Renamed from enum alignment_e.
979 (enum arrow_mode): Renamed from enum arrow_mode_e.
980 (enum crossing_type): Renamed from enum crossing_type_e.
981 (enum view): Renamed from enum view_e.
982 (struct node): Renamed from struct node_s.
983 (node): Renamed from node_t.
984 (enum linestyle): Renamed from enum linestyle_e.
985 (enum arrowstyle): Renamed from enum arrowstyle_e.
986 (struct edge): Renamed from struct edge.
987 (edge): Renamed from edge_t.
988 (struct graph): Renamed from struct graph_s.
989 (graph): Renamed from graph_t.
990 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
991 Rename value_t -> value.
992 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
993 value_t_as_yystype -> value_as_yystype.
994
995 Don't include <errno.h> in the mainstream code, since it
996 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
997 * lib/get-errno.c, lib/get-errno.h: New files.
998 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
999 get-errno.c.
1000 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1001 * src/output.c (output_skeleton): Likewise.
1002 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1003 instead of errno.
1004 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1005 Likewise.
1006 (handle_action_dollar, handle_action_at): Likewise.
1007 * src/system.h: Do not include <errno.h>.
1008 (TAB_EXT): Renamed from EXT_TAB.
1009 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1010
1011 Avoid str[a-z]*, since <string.h> reserves that name space.
1012 Change all instances of "struniq" in names to "uniqstr", and
1013 likewise for "STRUNIQ" and "UNIQSTR".
1014 * src/uniqstr.c: Renamed from src/struniq.c.
1015 * src/uniqstr.h: Renamed from src/struniq.h.
1016 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1017 * src/files.c (strsuffix): Remove; unused.
1018 (concat2): Renamed from stringappend. Now static.
1019 * src/files.h (strsuffix, stringappend): Remove; unused.
1020 * src/parse-gram.y (<chars>): Renamed from <string>.
1021 (<uniqstr>): Renamed from <struniq>.
1022 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1023 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1024 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1025 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1026 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1027 (N_EXPAND): Renamed from N_STRETCH.
1028
1029 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1030 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1031 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1032 Remove; unused.
1033 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1034 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1035 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1036 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1037 (BASE_MAXIMUM): Renamed from BASE_MAX.
1038 (BASE_MINIMUM): Renamed from BASE_MIN.
1039 (ACTION_MAX): Remove; unused.
1040 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1041 Unnecessary casts removed from above defines.
1042
1043
1044 Fix misspelling in names.
1045 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1046 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1047 G_NODE_ALIGNEMENT.
1048
1049
1050 * lib/timevar.c (timevar_report): Renamed from time_report,
1051 for consistency with other names.
1052 * lib/timevar.h (timevar_report): New decl.
1053 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1054
1055
1056 Sort include-file uses.
1057
1058 Reorder all include files under src to be in the order "system.h".
1059 then the ../lib include files in angle brackets (alphabetized),
1060 then the . include files in double-quotes (alphabetized). Fix
1061 dependency breakages encountered in this process, as follows:
1062 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1063 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1064 * src/state.h: Include "symtab.h".
1065
996b1c7e
PE
10662002-12-08 Paul Eggert <eggert@twinsun.com>
1067
1068 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1069 since this causes problems when __file__ contains character
1070 sequences like "@" that are treated specially by src/scan-skel.l.
1071 Instead, just use the file's basename. This fixes the bug
1072 reported by Martin Mokrejs in
e3aa65c5 1073 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 1074
e19c4e5d
PE
10752002-12-06 Paul Eggert <eggert@twinsun.com>
1076
1077 Add support for rules that do not have trailing semicolons, as
1078 POSIX requires. Improve the quality of locations in Bison
1079 diagnostics.
26b4a969 1080
e19c4e5d
PE
1081 * src/location.c: Include <quotearg.h>.
1082 (empty_location): Now const.
1083 (location_print): New function. Follow the recommendation of the
1084 GNU Coding Standards for locations that span file boundaries.
1085 * src/location.h: Do not include <quotearg.h>; no longer needed.
1086 (boundary): New type.
1087 (location_t): Use it. This allows locations to span file boundaries.
1088 All member uses changed: file -> start.file or end.file (as needed),
1089 first_line -> start.line, first_column -> start.column,
1090 last_line -> end.line, last_column -> end.column.
1091 (equal_boundaries): New function.
1092 (LOCATION_RESET, LOCATION_STEP): Remove.
1093 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1094 (empty_location): Now const.
1095 (location_print): New decl.
1096 * src/parse-gram.y (lloc_default): New function, which handles
1097 empty locations more accurately.
1098 (YYLLOC_DEFAULT): Use it.
1099 (%token COLON): Remove.
1100 (%token ID_COLON): New token.
26b4a969 1101 (rules): Use it.
e19c4e5d
PE
1102 (declarations, rules): Remove trailing semicolon.
1103 (declaration, rules_or_grammar_declaration):
1104 Allow empty (";") declaration.
1105 (symbol_def): Remove empty actions; no longer needed.
1106 (rules_or_grammar_declaration): Remove trailing semicolon.
1107 (semi_colon.opt): Remove.
1108 * src/reader.h: Include location.h.
1109 (scanner_cursor): New decl.
1110 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1111 rolling our own.
1112 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1113 of *loc.
1114 (STEP): Remove. No longer needed, now that adjust_location does
1115 the work. All uses removed.
1116 (scanner_cursor): New var.
1117 (adjust_location): Renamed from extend_location. It now sets
1118 *loc and adjusts the scanner cursor. All uses changed.
1119 Don't bother testing for CR.
1120 (handle_syncline): Remove location arg; now updates scanner cursor.
1121 All callers changed.
1122 (unexpected_end_of_file): Now accepts start boundary of token or
1123 comment, not location. All callers changed. Update scanner cursor,
1124 not the location.
1125 (SC_AFTER_IDENTIFIER): New state.
1126 (context_state): Renamed from c_context. All uses changed.
1127 (id_loc, code_start, token_start): New local vars.
1128 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1129 processing of Yacc white space and equivalents here.
1130 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1131 instead of returning ID immediately, since we need to search for
1132 a subsequent colon.
1133 (<INITIAL>"'", "\""): Save token_start.
1134 (<INITIAL>"%{", "{", "%%"): Save code_start.
1135 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1136 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1137 BEGIN context_state at end, not INITIAL.
1138 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1139 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1140 Return correct token start.
1141 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1142 the start of a character, string or multiline comment is found.
1143 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1144 Reduction): Adjust reported locations to match the more-precise
1145 results now expected.
1146 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1147 * tests/reduce.at (Useless Rules, Reduced Automaton,
1148 Underivable Rules): Likewise.
1149 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1150 or "|"' now that so many other tokens are allowed by the new grammar.
1151
1152 * src/complain.h (current_file): Remove duplicate decl;
1153 current_file is now owned by files.h.
1154 * src/complain.c, src/scan-gram.l: Include files.h.
1155
11562002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 1157
e19c4e5d
PE
1158 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1159 promotes to int; it might be unsigned int.
1160 * data/yacc.c (yy_reduce_print): Likewise.
1161
1162 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1163 be #defined in the prologue, not in the Bison declarations.
1164 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 1165
b64755e3
PE
11662002-12-02 Paul Eggert <eggert@twinsun.com>
1167
1168 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1169 * lib/strtoul.c: New file, from gnulib.
1170 This fixes a porting bug reported by Peter Klein in
e3aa65c5 1171 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 1172
6e746484
PE
11732002-11-30 Paul Eggert <eggert@twinsun.com>
1174
b64755e3
PE
1175 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1176 and put only a forward declaration in the prologue. This is for
1177 consistency with the other scanner helper functions.
1178
6ba55592
PE
1179 Type clashes now generate warnings, not errors, since it
1180 appears that POSIX may allow some grammars with type clashes.
1181 * src/reader.c (grammar_current_rule_check): Warn about
1182 type clashes instead of complaining.
1183 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1184
6e746484
PE
1185 Add Yacc library, since POSIX requires it.
1186 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1187 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1188 * lib/main.c, lib/yyerror.c: New files.
1189
1190 gram_error can be static; it need not be extern.
1191 * src/reader.h (gram_error): Remove decl.
1192 * src/parse-gram.y (gram_error): Now static. Add static decl.
1193 (print_token_value): Omit parameter names from forward decl,
1194 for consistency.
1195
88510f9c
PE
11962002-11-29 Paul Eggert <eggert@twinsun.com>
1197
6e746484
PE
1198 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1199 be declared before being used. E.g., one should typically
1200 declare them in the prologue. Use GNU coding style in examples.
1201 Put "const" consistently after the type it modifies. Mention
1202 that C99 supports "inline". Mention that yyerror traditionally
1203 returns "int".
1204
88510f9c
PE
1205 %parse-param and %lex-param now take just one argument, the
1206 declaration; the argument name is deduced from the declaration.
1207
1208 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1209 Reporting, Table of Symbols): Document this.
1210 * src/parse-gram.y (add_param): New function.
1211 (COMMA): Remove.
1212 (declaration): Implement new rule for %parse-param and %lex-param.
1213 * src/scan-gram.l: "," now elicits a warning, rather than being
1214 a token; this is more compatible with byacc.
1215 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1216
bb92250c
PE
12172002-11-27 Paul Eggert <eggert@twinsun.com>
1218
1219 Rename identifiers to avoid real and potential collisions.
1220
1221 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1222 to avoid collision with lex macro described by Bruce Lilly in
e3aa65c5 1223 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
1224 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1225 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1226 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1227 All uses changed.
1228 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1229 The name "yycontrol" violates the name space rules, and this stuff
1230 wasn't being used anyway.
1231 (input): Remove action; this stuff wasn't being used.
1232 (gram_error): Rename local variable yylloc -> loc.
1233 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1234 (YY_DECL): Don't use "yy" at start of local variables.
1235 All uses changed, e.g., yylloc -> loc.
1236 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1237 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1238 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1239 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1240
1241 * src/parse-gram.y (gram_error): loc is now const *.
1242 * src/reader.h (gram_error): Likewise.
1243
3af4feb2
PE
12442002-11-24 Paul Eggert <eggert@twinsun.com>
1245
1246 Version 1.75c.
1247
1248 * tests/actions.at (Actions after errors): Use an output format
1249 more similar to that of the Printers and Destructors test.
1250 Test the position of the ';' token too.
1251 (Printers and Destructors): Likewise.
1252 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1253 unnecessarily alarming people when the test fails.
1254
1255 * data/yacc.c (yyerrlab1): Move this label down, so that the
1256 parser does not discard the lookahead token if the user code
1257 invokes YYERROR. This change is required for POSIX conformance.
1258
1259 * lib/error.c: Sync with gnulib.
1260
12612002-11-22 Paul Eggert <eggert@twinsun.com>
1262
1263 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1264 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1265 * lib/xmalloc.c: Likewise.
26b4a969 1266
58004308
PE
12672002-11-20 Paul Eggert <eggert@twinsun.com>
1268
1269 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1270
12712002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 1272
58004308
PE
1273 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1274 should use `if (! x) abort ();' rather than `assert (x);', and
1275 anyway it's one less thing to worry about configuring.
1276
1277 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1278 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1279 and replace all instances of assert with abort.
1280 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1281 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1282
1283 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1284 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1285 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1286 hash_find_entry, hash_rehash, hash_insert): Likewise.
1287 * src/conflicts.c (resolve_sr_conflict): Likewise.
1288 * src/lalr.c (set_goto_map, map_goto): Likewise.
1289 * src/nullable.c (nullable_compute): Likewise.
1290 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1291 * src/reader.c (packgram, reader): Likewise.
1292 * src/state.c (state_new, state_free, state_transitions_set,
1293 state_reduction_find): Likewise.
1294 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1295 symbol_pack): Likewise.
1296 * src/tables.c (conflict_row, pack_vector): Likewise.
1297 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1298 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1299 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1300 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1301
1302 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1303 (ARGMATCH_CONSTRAINT): New macro.
1304 (ARGMATCH_ASSERT): Use it.
1305
1306 * src/system.h (verify): New macro.
1307 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1308 rather than assert.
1309 * src/tables.c (tables_generate): Likewise.
1310
1311 * src/struniq.c (struniq_assert): Now returns void, and aborts
1312 if the assertion is false.
1313 (struniq_assert_p): Remove.
1314 * src/struniq.h: Likewise.
1315
76ae8198
PE
13162002-11-18 Paul Eggert <eggert@twinsun.com>
1317
1318 * data/glr.c (yygetLRActions): Replace `yyindex' with
1319 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1320 This fixes the regression with Sun ONE Studio 7 cc that I reported in
e3aa65c5 1321 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 1322
d3c4e709
AD
13232002-11-18 Akim Demaille <akim@epita.fr>
1324
1325 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1326 space.
1327 From Tim Van Holder.
1328
8d8a7238
PE
13292002-11-17 Paul Eggert <eggert@twinsun.com>
1330
1331 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1332 to "SyntaxError" for consistency with my 2002-11-15 change.
1333
1334 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1335 not define to {}, since this breaks the common use of `YYDPRINTF
1336 ((...));' if a single statement is desired (e.g. before `else').
1337 Work around GCC warnings by surrounding corresponding calls with
1338 {} if needed.
1339 (yyhasResolvedValue): Remove unused function.
1340 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1341 loop body.
1342 (yyreportSyntaxError): Renamed from yyreportParseError.
1343 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1344 All uses changed.
1345 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1346 extern when possible. Remove unused initializations.
1347
b0937b22
AD
13482002-11-16 Akim Demaille <akim@epita.fr>
1349
1350 Augment the similarity between GLR and LALR traces.
1351
1352 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1353 (YY_REDUCE_PRINT): New.
1354 (yyparse): Use them.
1355 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1356 YYDPRINT here.
1357 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1358 state reached after the reduction/recovery, since...
1359 (yyparse, yyprocessOneStack): Report the state we are entering in.
1360
c5e3e510
AD
13612002-11-16 Akim Demaille <akim@epita.fr>
1362
1363 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1364 Add support for --trace=skeleton.
1365 * src/scan-skel.l: %option debug.
1366 Scan strings of non-@ or \n instead of character by character.
1367 (scan_skel): Handle trace_skeleton.
1368 (QPUTS): New.
1369 (@output_parser_name@, @output_header_name@): ``Restore'' their
1370 support (used to be M4 macros).
1371 * data/yacc.c: Quote larger chunks, a la glr.c.
1372 * data/lalr1.cc: Likewise.
1373 The header guards are no longer available, so use some other
1374 string than `YYLSP_NEEDED'.
1375
4c6cc1db
AD
13762002-11-16 Akim Demaille <akim@epita.fr>
1377
1378 Make the ``Printers and Destructors'' test more verbose, taking
1379 `yacc.c''s behavior as (possibly wrong) reference.
1380
1381 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1382 instead of fprint on stdout.
1383 Set and report the last_line of the symbols.
1384 Consistently display values and locations.
1385
6d9e8019
PE
13862002-11-16 Paul Eggert <eggert@twinsun.com>
1387
1388 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1389
6e649e65
PE
13902002-11-15 Paul Eggert <eggert@twinsun.com>
1391
b25d88f6
PE
1392 * tests/actions.at (Actions after errors): New test case.
1393
6e649e65
PE
1394 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1395 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1396 tests/action.at, tests/calc.at, tests/conflicts.at,
1397 tests/cxx-type.at, tests/regression.at:
1398 "parse error" -> "syntax error" for POSIX compatibility.
1399 "parsing stack overflow..." -> "parser stack overflow" so
1400 that code matches Bison documentation.
1401
0f39aab9
AD
14022002-11-15 Akim Demaille <akim@epita.fr>
1403
1404 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1405 take two BRACED_CODE, not two string_content.
1406 Free the scanner's obstack when we are done.
1407 (code_content): New.
1408 * tests/calc.at: Adjust.
1409 * doc/bison.texinfo: Adjust.
1410 Also, make sure to include the `,' for these declarations.
1411
761c1926
AD
14122002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1413
1414 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1415 definition; avoids potential autoreconf problems.
1416
b0f98b10
AD
14172002-11-15 Akim Demaille <akim@epita.fr>
1418
1419 Always check the value returned by yyparse.
1420
1421 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1422 returned by yyparse.
1423 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1424 Adjust calls.
1425 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1426 returned by yyparse.
1427
970785f1
PH
14282002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1429
1430 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1431 on input.at test.
1432
8fcc7db1
PE
14332002-11-14 Paul Eggert <eggert@twinsun.com>
1434
7ec1b48e
PE
1435 * src/output.c (output_skeleton): Call xfopen instead of
1436 duplicating xfopen's body.
1437
cfff7583 1438 Fix bugs reported by Nelson H. F. Beebe in
e3aa65c5 1439 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 1440
8fcc7db1
PE
1441 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1442 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1443 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1444 file twice in the grammar, as an extra check.
1445
1446 * tests/input.at (Torturing the Scanner): Surround the
1447 backslash-newline tests with "#if 0", to make it less likely that
1448 we'll run into compiler bugs. Bring back solitary \ inside
1449 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 1450 test backslash-newline in C character constant.
8fcc7db1 1451
4e8d992c
AD
14522002-11-14 Akim Demaille <akim@epita.fr>
1453
1454 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1455 status of the compiler.
f32b346d 1456 Calling `exit 1' is no longer needed.
4e8d992c
AD
1457 Reported by Nelson H. F. Beebe.
1458
9501dc6e
AD
14592002-11-14 Akim Demaille <akim@epita.fr>
1460
1461 * tests/atlocal.in (CPPFLAGS): We have config.h.
1462 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1463 New.
1464 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1465 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1466 * tests/regression.at, tests/torture.at: Use them for all the
1467 grammars that are to be compiled.
1468 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1469 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1470 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1471
18b519c0
AD
14722002-11-14 Akim Demaille <akim@epita.fr>
1473
1474 * doc/bison.texinfo: Various formatting changes (alignments in
1475 samples, additional @group/@end group, GCS in samples.
1476 Use @deffn instead of simple @table to define the directives,
1477 macros, variables etc.
1478
9a86cdb9
PE
14792002-11-13 Paul Eggert <eggert@twinsun.com>
1480
daa33def 1481 Fix some bugs reported by Albert Chin-A-Young in
e3aa65c5 1482 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 1483
daa33def 1484 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 1485 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
1486 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1487 * tests/headers.at (export YYLTYPE): Likewise.
1488
1489 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 1490 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 1491
9a86cdb9
PE
1492 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1493 comments, since they're not portable. Use GNU coding style.
1494
9c1e26bd
AD
14952002-11-13 Akim Demaille <akim@epita.fr>
1496
1497 * data/yacc.c: Leave bigger chunks of quoted text.
1498 (YYDSYMPRINTF): New.
1499 Use it to report symbol activities.
1500 * data/glr.c (YYDSYMPRINTF): New.
1501 Use it.
1502
87f721cc
PE
15032002-11-12 Paul Eggert <eggert@twinsun.com>
1504
1505 Version 1.75b.
1506
1507 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1508 (yyglrReduce): Return yyok, not 0.
1509 This should avoid the enumerated-type warnings reported
464c6927 1510 by Nelson H. F. Beebe in
e3aa65c5 1511 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
1512
1513 * lib/bbitset.h (BITSET_INLINE): Remove.
1514 * lib/bitset.h [! BITSET_INLINE]: Remove.
1515 (bitset_set, bitset_reset, bitset_test): Rename local vars
1516 to avoid shadowing warnings by GCC.
1517
1518 * data/glr.c (inline): Remove #define. It's the user's
1519 responsibility to #define it away, just like 'const'.
464c6927 1520 This fixes one of the bugs reported by Nelson H. F. Beebe in
e3aa65c5 1521 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 1522
87f721cc
PE
1523 * Makefile.maint (po-check): Scan .l and .y files instead of the
1524 .c and the .h files that they generate. This fixes the bug
1525 reported by Tim Van Holder in:
e3aa65c5 1526 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
1527 Look for N_ as well as for _. Try to avoid matching #define for
1528 N_ and _.
1529 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1530 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1531 * src/scan-gram.l: Revamp regular expressions so that " and '
1532 do not confuse xgettext.
1533
1534 * src/struniq.h (struniq_new): Do not declare the return type
1535 to be 'const'; this violates the C standard.
1536 * src/struniq.c (struniq_new): Likewise.
1537
be14ade5
AD
15382002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1539
1540 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1541 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1542 linker.
1543
05291fbc
AD
15442002-11-12 Akim Demaille <akim@epita.fr>
1545
1546 * Makefile.maint: Sync with Autoconf:
1547 (local_updates): New.
1548
1f5fd52e
AD
15492002-11-12 Akim Demaille <akim@epita.fr>
1550
1551 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1552
283f1e64
AD
15532002-11-12 Akim Demaille <akim@epita.fr>
1554
1555 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1556 locations.
1557
886b69d1
AD
15582002-11-12 Akim Demaille <akim@epita.fr>
1559
1560 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1561 not yyvalue.
1562
3df37415
AD
15632002-11-12 Akim Demaille <akim@epita.fr>
1564
1565 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1566 Use it to test the GLR parser.
1567
7bd6c77e
AD
15682002-11-12 Akim Demaille <akim@epita.fr>
1569
1570 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1571 defines it.
1572 * data/glr.c (yystos): New.
1573 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1574 (YYDSYMPRINT): New.
1575 (yyval): Don't define it, it is handled via M4.
1576 (yyrecoverParseError): Free verbosely the discarded symbols.
1577 * data/yacc.c (yysymprint): Remove, rather...
1578 (b4_yysymprint_generate): invoke.
1579 * data/c.m4 (b4_yysymprint_generate): New.
1580 Accept pointers as arguments, as opposed to the version from
1581 yacc.c.
1582 (b4_yydestruct_generate): Likewise.
1583 * tests/cations.at (Printers and Destructors): Use Bison directives
1584 instead of CPP macros.
1585 Don't rely on internal details.
1586
b0400cc6
AD
15872002-11-12 Akim Demaille <akim@epita.fr>
1588
1589 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1590 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1591 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1592 it against YYEMPTY and so forth), work on yytoken (i.e., set
1593 it to YYEMPTY etc.).
1594 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1595 (b4_symbol_actions): Remove.
1596 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1597 for 0, end-of-input.
1598
72f889cc
AD
15992002-11-12 Akim Demaille <akim@epita.fr>
1600
1601 * doc/bison.texinfo (Destructor Decl): New.
1602
b1ae9233
AD
16032002-11-12 Akim Demaille <akim@epita.fr>
1604
1605 * src/tables.c (tables_generate): Use free for pointers that
1606 cannot be NULL, not XFREE.
1607 (pack_vector): Use assert, not fatal, for bound violations.
1608 * src/state.c (state_new): Likewise.
1609 * src/reader.c (reader): Likewise.
1610 * src/lalr.c (set_goto_map): Likewise.
72f889cc 1611 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
1612 the file name.
1613
7ec2d4cd
AD
16142002-11-12 Akim Demaille <akim@epita.fr>
1615
1616 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1617 Restore.
1618 * src/scan-gram.l (last_string): Is global to the file, not to
1619 yylex.
1620 * src/parse-gram.y (input): Don't append the epilogue here,
1621 (epilogue.opt): do it here, and free the scanner's obstack.
1622 * src/reader.c (epilogue_set): Rename as...
1623 (epilogue_augment): this.
1624 * data/c.m4 (b4_epilogue): Defaults to empty.
1625
573a6cd3
AD
16262002-11-12 Akim Demaille <akim@epita.fr>
1627
1628 * src/getargs.c (long_options): Remove duplicates.
1629 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1630 Remove.
1631 * doc/bison.rnh: Remove.
1632 * doc/bison.texinfo (VMS Invocation): Remove.
1633
95612cfa
AD
16342002-11-12 Akim Demaille <akim@epita.fr>
1635
1636 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1637 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1638
1639 Use struniq for symbols.
1640
1641 * src/symtab.h (symbol_t): The tag member is a struniq.
1642 (symbol_type_set): Adjust.
1643 * src/symtab.c (symbol_new): Takes a struniq.
1644 (symbol_free): Don't free the tag member.
1645 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1646 (hash_compare_symbol, hash_symbol): these.
1647 Use the fact that tags as struniqs.
1648 (symbol_get): Use struniq_new.
1649 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1650 Returns a strniq.
1651 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1652 and type members are struniqs.
1653 * src/reader.c (get_merge_function)
1654 (grammar_current_rule_merge_set): Adjust.
1655 (TYPE, current_type): Are struniq.
1656
1657 Use struniq for file names.
1658
1659 * src/files.h, src/files.c (infile): Split into...
1660 (grammar_file, current_file): these.
1661 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1662 * src/reduce.c (reduce_print): Likewise.
1663 * src/getargs.c (getargs): Likewise.
1664 * src/complain.h, src/complain.c: Likewise.
1665 * src/main.c (main): Call struniqs_new early enough to use it for
1666 file names.
1667 Don't free the input file name.
1668
3e6656f9
AD
16692002-11-12 Akim Demaille <akim@epita.fr>
1670
1671 * src/symtab.c (symbol_free): Remove dead deactivated code:
1672 type_name are properly removed.
1673 Don't use XFREE to free items that cannot be NULL.
1674 * src/struniq.h, src/struniq.c: New.
1675 * src/main.c (main): Initialize/free struniqs.
1676 * src/parse-gram.y (%union): Add astruniq member.
1677 (yyprint): Adjust.
1678 * src/scan-gram.l (<{tag}>): Return a struniq.
1679 Free the obstack bit that used to store it.
1680 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1681
7672019c
PE
16822002-11-11 Paul Eggert <eggert@twinsun.com>
1683
1684 Revamp to fix many (but not all) of the C- and M4-related quoting
1685 problems. Among other things, this fixes the Bison bug reported
1686 by Jan Hubicka when processing the Bash grammar; see:
e3aa65c5 1687 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
1688
1689 Use new @ escapes consistently. Represent brackets with @{ and @}
1690 rather than @<:@ and @:>@, since this works a bit better with dumb
1691 editors like vi. Represent @ with @@, since @ is now consistently
1692 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1693 __ofile__, to avoid unexpected expansions. Similarly, use @output
1694 rather than #output.
1695
1696 * data/c.m4 (b4_copyright): Omit file name from comment, since
1697 the file name could contain "*/".
1698 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1699 be quoted. All uses changed.
1700
1701 * data/glr.c: Use new @ escapes consistently.
1702 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1703 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1704 Remove, since they couldn't handle arbitrary characters in file
1705 names.
1706 * data/lalr1.cc: Likewise.
1707 * data/yacc.c: Likewise.
1708
1709 * src/files.c (output_infix): Remove; all uses removed.
1710 * src/files.h: Likewise.
1711
1712 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1713 mishandled funny characters in file names, and anyway it isn't
1714 needed any more.
1715 * data/yacc.c: Likewise.
1716 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1717
1718 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1719 * data/yacc.c: Likewise.
1720
1721 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1722 strings now.
1723 (muscle_init): Quote filename as a C string.
1724 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1725 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1726 * src/output.c (escaped_file_name_output): New function.
1727 (prepare_symbols): Quote tokens for M4.
1728 (prepare): Don't insert output_infix, output_prefix,
1729 output_parser_name, output_header_name; this is now down by scan-skel.
1730 Insert skeleton as a C string.
1731
1732 * src/output.c (user_actions_output, symbol_destructors_output,
1733 symbol_printers_output): Quote filenames for C and M4.
1734 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1735
1736 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1737 escapes other than \\ and \'; this simplifies the code.
1738 (<SC_STRING>): Likewise, for \\ and \".
1739 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1740 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1741 Use new escapes @{ and @} for [ and ].
1742
1743 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1744 them with auto vars.
1745 Switch to new escape scheme, where @ is the escape character uniformly.
1746 Abort if a stray escape character is found. Avoid unbounded input
1747 buffer when parsing non-escaped text.
1748
1749 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1750 __oline__, #output, $@, and @{ do not have unintended meanings.
1751
acea4f3b
PE
17522002-11-09 Paul Eggert <eggert@twinsun.com>
1753
1754 Fix the test failure due to GCC warnings described in
e3aa65c5 1755 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
1756 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1757 evaluate to 0 if it's impossible for NINF to be in the respective
1758 table.
1759 (yygetLRActions, yyrecoverParseError): Use them.
1760
1761 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1762 counted in the token inserted at end of file. Now takes
1763 location_t *, not location_t, so that the location can be
1764 adjusted. All uses changed.
1765
1766 * tests/regression.at (Invalid inputs): Adjust wording in
1767 diagnostic to match the new behavior.
1768
1769 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1770 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1771 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1772 abort ();'. This reduces the runtime of the "Many lookaheads"
1773 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1774 GCC 3.2.
1775
20ef1ad5
PE
17762002-11-07 Paul Eggert <eggert@twinsun.com>
1777
1778 * src/parse-gram.y (CHARACTER): Remove unused token.
1779 All uses removed.
1780
1781 * src/scan-gram.l: Remove stack option. We no longer use the
1782 stack, since the stack was never deeper than 1; instead, use the
1783 new auto var c_context to record the stacked value.
1784
1785 Remove nounput option. At an unexpected end of file, we now unput
1786 the minimal input necessary to end cleanly; this simplifies the
1787 code.
1788
1789 Avoid unbounded token sizes where this is easy.
1790
1791 (unexpected_end_of_file): New function.
1792 Use it to systematize the error message on unexpected EOF.
1793 (last-string): Now auto, not static.
1794 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1795 (scanner_last_string_free): Remove; not used.
1796 (percent_percent_count): Move decl to just before use.
1797 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1798 not the (never otherwised-used) CHARACTER.
1799
93724f13
AD
18002002-11-07 Akim Demaille <akim@epita.fr>
1801
1802 Let yyerror always receive the msg as last argument, so that
1803 yyerror can be variadic.
1804
1805 * data/yacc.c (b4_yyerror_args): New.
1806 Use it when calling yyerror.
1807 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1808 Use it when calling yyerror.
1809 * doc/bison.texinfo (Error Reporting): Adjust.
1810 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1811 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1812
6e40b4eb
AD
18132002-11-06 Akim Demaille <akim@epita.fr>
1814
1815 #line should have quoted strings.
1816 Ideally, this should be done by m4_quotearg.
1817
1818 * src/scan-skel.l: Include quotearg.h.
1819 Quote __ofile__.
1820 * src/output.c (symbol_printers_output)
1821 (symbol_destructors_output): Quote the file name.
1822
2dfbfc12
AD
18232002-11-06 Akim Demaille <akim@epita.fr>
1824
1825 * tests/regression.at (Invalid inputs): Adjust to the recent
1826 messages.
1827
437c2d80
AD
18282002-11-06 Akim Demaille <akim@epita.fr>
1829
1830 Restore --no-lines.
1831 Reported by Jim Kent.
1832
1833 * data/c.m4 (b4_syncline): New.
1834 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1835 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1836 * src/output.c (user_actions_output): Likewise.
1837 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 1838 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 1839
900c5db5
AD
18402002-11-06 Akim Demaille <akim@epita.fr>
1841
1842 * src/main.c (main): Free `infile'.
1843 * src/scan-gram.l (handle_syncline): New.
1844 Recognize `#line'.
1845 * src/output.c (user_actions_output, symbol_destructors_output)
1846 (symbol_printers_output): Use the location's file name, not
1847 infile.
1848 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1849
e183b123 18502002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 1851
e183b123 1852 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 1853 either has GLR conflict entries.
e183b123 1854
193eb6b7
PE
18552002-11-05 Paul Eggert <eggert@twinsun.com>
1856
e183b123
PE
1857 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1858 "integer out of range" rather than "invalid value".
1859 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1860 accordingly.
1861
193eb6b7
PE
1862 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1863 Also, remove one static variable in the scanner.
1864
1865 * src/scan-gram.l (braces_level): Now auto, not static.
1866 Initialize to zero if the compiler is being picky.
1867 (INITIAL): Clear braces_level instead of incrementing it.
1868 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1869 as POSIX 1003.1-2001 requires.
1870 * src/system.h (IF_LINT): New macro, taken from coreutils.
1871 * configure.ac: Define "lint" if --enable-gcc-warnings.
1872
29c01725
AD
18732002-11-05 Akim Demaille <akim@epita.fr>
1874
1875 * src/scan-gram.l: When it starts with `%', complain about the
1876 whole directive, not just that `invalid character: %'.
1877
8aeac3ca
AD
18782002-11-04 Akim Demaille <akim@epita.fr>
1879
1880 * Makefile.maint: Update from Autoconf.
1881 (update, cvs-update, po-update, do-po-update): New.
1882
793a58bb
AD
18832002-11-04 Akim Demaille <akim@epita.fr>
1884
1885 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1886 and yyerror.
1887 Have yyerror `use' its arguments.
1888 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1889 returns true when location & yacc & pure & parse-param.
1890 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1891
c4d720cd
AD
18922002-11-04 Akim Demaille <akim@epita.fr>
1893
1894 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1895 clashes.
1896 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1897 font-lock-mode.
1898 Use complain_at.
1899 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1900 slot 0.
1901
613a0dc5
PE
19022002-11-03 Paul Eggert <eggert@twinsun.com>
1903
1904 * src/reader.c (get_merge_function, grammar_current_rule_check):
1905 Use consistent diagnostics for reporting type name clashes.
1906 Quote the types with <>, for consistency with Yacc.
1907 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1908
2a8d363a
AD
19092002-11-03 Akim Demaille <akim@epita.fr>
1910
1911 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1912 New.
1913 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1914 (b4_parse_param): Remove.
1915 Use b4_identification.
1916 Propagate b4_pure_args where needed to pass them to yyerror.
1917 * data/glr.m4 (b4_parse_param): Remove.
1918 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1919 (b4_lpure_formals): New.
1920 Use b4_identification.
1921 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1922 b4_user_formals and b4_user_args.
1923 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1924 (yyreportAmbiguity): When using a pure parser, also need
1925 the location, and the parse-params.
1926 Adjust callers.
1927 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1928 When using a pure parser, also need the parse-params.
1929 Adjust callers.
1930 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1931 (%pure-parser + %parse-param) LALR and GLR parsers.
1932 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1933 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1934 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1935 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1936 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1937 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1938 * doc/bison.texinfo: Untabify the whole file.
1939 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1940 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1941 (Error Reporting): Adjust to these new directives.
1942 Document %error-verbose, deprecate YYERROR_VERBOSE.
1943
9e32add8
AD
19442002-11-03 Akim Demaille <akim@epita.fr>
1945
1946 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1947 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1948 command line options.
1949 * tests/cxx-type.at: Formatting changes.
1950
b02d90a5
PE
19512002-11-03 Paul Eggert <eggert@twinsun.com>
1952
1953 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1954 to count columns correctly, and to check for invalid inputs.
9e32add8 1955
b02d90a5
PE
1956 Use mbsnwidth to count columns correctly. Account for tabs, too.
1957 Include mbswidth.h.
1958 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1959 (extend_location): New function.
1960 (YY_LINES): Remove.
1961
1962 Handle CRLF in C code rather than in Lex code.
1963 (YY_INPUT): New macro.
1964 (no_cr_read): New function.
1965
1966 Scan UCNs, even though we don't fully handle them yet.
1967 (convert_ucn_to_byte): New function.
1968
1969 Handle backslash-newline correctly in C code.
1970 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1971 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1972 all uses changed.
1973 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1974 Use {splice} wherever C allows backslash-newline.
1975 YY_STEP after space, newline, vertical-tab.
1976 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 1977
b02d90a5
PE
1978 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1979
1980 ({int}, handle_action_dollar, handle_action_at): Check for integer
1981 overflow.
9e32add8 1982
b02d90a5
PE
1983 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1984
1985 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1986 as well as \000. Check for UCHAR_MAX, not 255.
1987 Allow \x with an arbitrary positive number of digits, as in C.
1988 Check for overflow here.
1989 Allow \? and UCNs, for compatibility with C.
1990
1991 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1992 with quote slot used by complain_at.
1993
1994 * tests/input.at: Add tests for backslash-newline, m4 quotes
1995 in symbols, long literals, and funny escapes in strings.
1996
1997 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1998 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1999 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2000 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2001 * m4/mbswidth.m4: New file, from GNU coreutils.
2002
2003 * doc/bison.texinfo (Grammar Outline): Document // comments.
2004 (Symbols): Document that trigraphs have no special meaning in Bison,
2005 nor is backslash-newline allowed.
2006 (Actions): Document that trigraphs have no special meaning.
2007
2008 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2009 no longer used.
2010
20112002-11-02 Paul Eggert <eggert@twinsun.com>
2012
2013 * src/reader.c: Don't include quote.h; not needed.
2014 (get_merge_function): Reword warning to be consistent with
2015 type clash diagnostic in grammar_current_rule_check.
2016
2017 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2018 bug in trigraph handling.
2019
2020 * src/output.c (prepare_symbols): When printing token names,
2021 escape "[" as "@<:@" and likewise for "]".
2022
2023 * src/system.h (errno): Remove declaration, as we are now
2024 assuming C89 or better, and C89 guarantees errno.
2025
762b212b
PE
20262002-10-30 Paul Eggert <eggert@twinsun.com>
2027
2028 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2029 Check for close failures.
2030 * src/files.h (xfclose): Return void, not int, since it always
2031 returned zero.
2032 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2033 indicates one.
2034 * src/output.c (output_skeleton): Use xfclose rather than fclose
2035 and ferror. xfclose now checks ferror.
2036
2037 * data/glr.c (YYLEFTMOST_STATE): Remove.
2038 (yyreportTree): Use a stack-based leftmost state. This avoids
2039 our continuing battles with bogus warnings about initializers.
2040
56100c60
AD
20412002-10-30 Akim Demaille <akim@epita.fr>
2042
2043 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2044 #if.
2045
51b4a04c
PH
20462002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2047
2048 * tests/glr-regr1.at: New test for reported regressions.
2049 * tests/testsuite.at: Add glr-regr1.at test.
2050 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 2051
bf1ebda2
PE
20522002-10-24 Paul Eggert <eggert@twinsun.com>
2053
5c16c6b1
PE
2054 Version 1.75a.
2055
bf1ebda2
PE
2056 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2057 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2058 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2059 Don't assume strdup exists; POSIX says its an XSI extension.
2060 Check for buffer overflow on input.
2061
b526ee61
AD
20622002-10-24 Akim Demaille <akim@epita.fr>
2063
2064 * src/output.c (output_skeleton): Don't disable M4sugar comments
2065 too soon: it results in comments being expanded.
2066 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2067 first output.
2068
f1886bb2
AD
20692002-10-24 Akim Demaille <akim@epita.fr>
2070
2071 * data/yacc.c (m4_int_type): New.
2072 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2073 char' as only yacc.c wants K&R portability.
2074 * data/glr.c (yysigned_char): Remove.
2075 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2076 Reported by Quoc Peyrot.
2077
c5576256
PE
20782002-10-23 Paul Eggert <eggert@twinsun.com>
2079
2080 * src/main.c (main): With --trace=time, report times even if a
2081 non-fatal error occurs. Formerly, the times were reported in some
2082 such cases but not in others.
2083 * src/reader.c (reader): Just return if a complaint has been issued,
2084 instead of exiting, so that 'main' can report times.
2085
27b0ffea
AD
20862002-10-22 Akim Demaille <akim@epita.fr>
2087
2088 * src/system.h: Include sys/types.
2089 Reported by Bert Deknuydt.
2090
223a7883
PE
20912002-10-23 Paul Eggert <eggert@twinsun.com>
2092
2093 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2094 Suggested by Art Haas.
2095
20962002-10-22 Paul Eggert <eggert@twinsun.com>
2097
2098 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2099 decl; not needed any more.
2100 * src/main.c (main): Use return to exit, undoing yesterday's change.
2101 The last OS that we could find where this wouldn't work is
2102 SunOS 3.5, and that's too old to worry about now.
2103
2104 * data/glr.c (struct yyltype): Define members even when not
2105 doing locations. This is more consistent with yacc.c, and it
2106 works around the following bug reports:
e3aa65c5
PE
2107 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2108 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 2109
223a7883
PE
2110 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2111 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2112 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2113
8b76775a
AD
21142002-10-22 Akim Demaille <akim@epita.fr>
2115
2116 * data/README: New.
2117
6db10d14
PE
21182002-10-21 Paul Eggert <eggert@twinsun.com>
2119
2120 Be consistent about 'bool'; the old code used an enum in one
2121 module and an int in another, and this violates the C standard.
2122 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2123 * configure.ac (AC_HEADER_STDBOOL): Add.
2124 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2125 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2126 * src/symtab.c (hash_compare_symbol_t): Likewise.
2127 * src/system.h (bool, false, true): Use a definition consistent
2128 with ../lib/hash.c. All uses changed.
2129
2130 * src/complain.c (warning_issued): Renamed from warn_message_count,
2131 so that we needn't worry about integer overflow (!).
2132 Now of type bool. All uses changed.
2133 (complaint_issued): Renamed from complain_message_count; likewise.
2134
2135 * src/main.c (main): Use exit to exit with failure.
27b0ffea 2136
6db10d14
PE
2137 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2138 rather than 1 and 0.
2139 * src/main.c (main): Likewise.
2140 * src/getargs.c (getargs): Likewise.
2141 * src/reader.c (reader): Likewise.
2142
2143 * src/getarg.c (getargs): Remove duplicate code for
2144 "Try `bison --help'".
2145
2146 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2147 What was that "2" for?
2148
2149 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2150 * src/getargs.c (usage): Likewise.
2151
2152 * src/getargs.c (getargs): When there are too few operands, report
2153 the last one. When there are too many, report the first extra
2154 one. This is how diffutils does it.
2155
92a060fd
PE
21562002-10-20 Paul Eggert <eggert@twinsun.com>
2157
2158 Remove K&R vestiges.
2159 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2160 * src/complain.c (VA_START): Remove. Assume prototypes.
2161 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2162 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2163 fatal): Assume prototypes.
2164 * src/complain.h: Assume prototypes.
2165 * src/system.h (PARAMS): Remove.
2166 Include <limits.h> unconditionally, since it's guaranteeed even
2167 for a freestanding C89 compiler.
2168 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2169 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 2170
e7cb57c0
AD
21712002-10-20 Akim Demaille <akim@epita.fr>
2172
2173 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2174 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2175 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2176 (yyresolveStates, yyresolveAction, yyresolveStack)
2177 (yyprocessOneStack): Use them.
2178 (yy_reduce_print): New.
2179 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2180
0245f82d
AD
21812002-10-20 Akim Demaille <akim@epita.fr>
2182
2183 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2184 arguments and output `void'.
2185 (b4_c_function): Rename as...
2186 (b4_c_function_def): this.
2187 (b4_c_function_decl, b4_c_ansi_function_def)
2188 (b4_c_ansi_function_decl): New.
2189 Change the interpretation of the arguments: before `int, foo', now
2190 `int foo, foo'.
2191 * data/yacc.c (yyparse): Prototype and define thanks to these.
2192 Adjust b4_c_function_def uses.
2193 * data/glr.c (yyparse): Likewise, but ANSI only.
2194
39912f52
AD
21952002-10-20 Akim Demaille <akim@epita.fr>
2196
2197 * src/output.c (prepare): Move the definition of `tokens_number',
2198 `nterms_number', `undef_token_number', `user_token_number_max'
2199 to...
2200 (prepare_tokens): Here.
2201 (prepare_tokens): Rename as...
2202 (prepare_symbols): this.
2203 (prepare): Move the definition of `rules_number' to...
2204 (prepare_rules): here.
2205 (prepare): Move the definition of `last', `final_state_number',
2206 `states_number' to...
2207 (prepare_states): here.
2208 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2209
20c1e2ad
AD
22102002-10-20 Akim Demaille <akim@epita.fr>
2211
2212 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2213
21964f43
AD
22142002-10-20 Akim Demaille <akim@epita.fr>
2215
2216 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2217 * data/c.m4: here.
2218
66d30cd4
AD
22192002-10-20 Akim Demaille <akim@epita.fr>
2220
2221 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2222 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2223 `pair'.
2224 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2225 `name' to...
2226 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2227 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2228 These.
2229
95f2c9fe
PE
22302002-10-19 Paul Eggert <eggert@twinsun.com>
2231
2232 Do not create a temporary file, as that involves security and
2233 cleanup headaches. Instead, use a pair of pipes.
2234 Derived from a suggestion by Florian Krohm.
2235 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2236 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2237 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2238 (BISON_PREREQ_SUBPIPE): Add.
2239 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2240 Add subpipe.h, subpipe.c.
2241 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2242 * po/POTFILES.in: Add lib/subpipe.c.
2243 * src/output.c: Include "subpipe.h".
2244 (m4_invoke): Remove decl.
2245 (scan_skel): New decl.
2246 (output_skeleton): Use pipe rather than temporary file for m4 input.
2247 Check that m4sugar.m4 is readable, to avoid deadlock.
2248 Check for pipe I/O error.
2249 * src/scan-skel.l (readpipe): Remove decl.
2250 (scan_skel): New function, to be used in place of m4_invoke.
2251 Read from stream rather than file.
66d30cd4 2252
95f2c9fe
PE
2253 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2254 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2255 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2256 this generates a more-accurate value anyway.
2257
2258 * lib/timevar.c (timervar_accumulate): Rename locals to
2259 avoid confusion with similarly-named more-global.
2260 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2261
2262 * src/output.c (prepare): Use xstrdup to convert char const *
2263 to char *, to avoid GCC warning.
2264
c19988b7
AD
22652002-10-19 Akim Demaille <akim@epita.fr>
2266
2267 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2268 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2269 Use them to have `calc.y' ready for %pure-parser.
2270 * data/yacc.c (YYLEX): Pass a yylex return type to
2271 b4_c_function_call.
2272
ae7453f2
AD
22732002-10-19 Akim Demaille <akim@epita.fr>
2274
2275 Prototype support of %lex-param and %parse-param.
2276
2277 * src/parse-gram.y: Add the definition of the %lex-param and
2278 %parse-param tokens, plus their rules.
2279 Drop the `_' version of %glr-parser.
2280 Add the "," token.
2281 * src/scan-gram.l (INITIAL): Scan them.
2282 * src/muscle_tab.c: Comment changes.
2283 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2284 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2285 (muscle_entry_s): The `value' member is no longer const.
2286 Adjust all dependencies.
2287 * src/muscle_tab.c (muscle_init): Adjust: use
2288 MUSCLE_INSERT_STRING.
2289 Initialize the obstack earlier.
2290 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2291 (muscle_pair_list_grow): New.
2292 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2293 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2294 * tests/calc.at: Use %locations, not --locations.
2295 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2296
0e575721
AD
22972002-10-19 Akim Demaille <akim@epita.fr>
2298
2299 * src/getargs.c (usage): Take status as argument and exit
2300 accordingly.
2301 Report the traditional `Try ... --help' message when status != 0.
2302 (usage, version): Don't take a FILE * as arg, it is pointless.
2303 (getargs): When there is an incorrect number of arguments, make it
2304 an error, and report it GNUlically thanks to `usage ()'.
2305
724ce7f5
PE
23062002-10-18 Paul Eggert <eggert@twinsun.com>
2307
3a781eb2
PE
2308 * data/glr.c (yyreportParseError): Don't assume that sprintf
2309 yields the length of the printed string, as this is not true
2310 on SunOS 4.1.4. Reported by Peter Klein.
2311
724ce7f5
PE
2312 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2313 * tests/conflicts.at (%nonassoc and eof): Likewise.
2314 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2315
473d0a75
AD
23162002-10-17 Akim Demaille <akim@epita.fr>
2317
2318 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2319 * src/getargs.c (trace_types, trace_args): Adjust.
2320 * src/reader.c (grammar_current_rule_prec_set)
2321 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2322 Standardize error messages.
2323 And s/@prec/%prec/!
2324 (reader): Use trace_flag to enable scanner/parser debugging,
2325 instead of an adhoc scheme.
2326 * src/scan-gram.l: Remove trailing debugging code.
2327
e76d2469
PE
23282002-10-16 Paul Eggert <eggert@twinsun.com>
2329
93e2236a
PE
2330 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2331 MUSCLE_TAB_H.
2332
e76d2469
PE
2333 * NEWS: Officially drop support for building Bison with K&R C,
2334 since it didn't work anyway and it's not worth worrying about.
2335 * Makefile.maint (wget_files): Remove ansi2knr.c.
2336 (ansi2knr.c-url_prefix): Remove.
2337 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2338 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2339 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2340
5bd1c419
PE
23412002-10-15 Paul Eggert <eggert@twinsun.com>
2342
2343 Stop using the "enum_" trick for K&R-style function definitions;
2344 it confused me, and I was the author! Instead, assume that people
2345 who want to use K&R C compilers (when using these modules in GCC,
2346 perhaps?) will run ansi2knr.
2347
2348 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2349 All uses of "enum_" changed to "enum ".
2350 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2351 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 2352
5bd1c419
PE
2353 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2354 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2355 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2356 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2357 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2358 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2359 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2360 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2361 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2362 Use function prototypes; this removes the need for declaring
2363 static functions simply to provide their prototypes.
2364 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2365 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2366 bitset_count_, bitset_create, bitset_dump, bitset_first,
2367 bitset_free, bitset_init, bitset_last, bitset_next,
2368 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2369 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2370 bitset_print, bitset_release_memory, bitset_toggle_,
2371 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2372 debug_bitset): Likewise.
2373 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2374 * lib/bitset_stats.c (bitset_log_histogram_print,
2375 bitset_percent_histogram_print, bitset_stats_and,
2376 bitset_stats_and_cmp, bitset_stats_and_or,
2377 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2378 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2379 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2380 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2381 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2382 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2383 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2384 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2385 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2386 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2387 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2388 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2389 bitset_stats_zero): Likewise.
2390 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2391 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2392 bitsetv_dump, debug_bitsetv): Likewise.
2393 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2394 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2395 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2396 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2397 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2398 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2399 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2400 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2401 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2402 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2403 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2404 Likewise.
2405 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2406 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2407 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2408 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2409 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2410 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2411 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2412 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2413 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2414 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2415 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 2416
ae26e1f0
AD
24172002-10-14 Akim Demaille <akim@epita.fr>
2418
2419 Version 1.75.
2420
d43baf71
AD
24212002-10-14 Akim Demaille <akim@epita.fr>
2422
2423 * tests/Makefile.am (maintainer-check-posix): New.
2424
7ebc83e3
AD
24252002-10-14 Akim Demaille <akim@epita.fr>
2426
2427 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2428 member.
2429
05846dae
AD
24302002-10-14 Akim Demaille <akim@epita.fr>
2431
2432 * src/tables.c (table_ninf_remap): base -> tab.
2433 Reported by Matt Rosing.
2434
1318e37d
PE
24352002-10-14 Paul Eggert <eggert@twinsun.com>
2436
447fbb17
PE
2437 * tests/action.at, tests/calc.at, tests/conflicts.at,
2438 tests/cxx-type.at, tests/headers.at, tests/input.at,
2439 tests/regression.at, tests/synclines.at, tests/torture.at:
2440 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2441 so that the tests still work even if POSIXLY_CORRECT is set.
2442 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 2443
1318e37d
PE
2444 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2445 for portability to K&R hosts. Fix typo: signed char is guaranteed
2446 only to 127, not to 128.
2447 * data/glr.c (yysigned_char): New type.
2448 * data/yacc.c (yysigned_char): Likewise.
2449 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2450
cc0f0794
PE
24512002-10-13 Paul Eggert <eggert@twinsun.com>
2452
5038f418
PE
2453 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2454 true due to limited range of data type" warning from GCC.
2455
cc0f0794
PE
2456 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2457 by wrapping enum yytokentype's definition inside #ifndef
2458 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2459
6fed0802
AD
24602002-10-13 Akim Demaille <akim@epita.fr>
2461
2462 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2463 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2464
32f0598d
AD
24652002-10-13 Akim Demaille <akim@epita.fr>
2466
2467 * Makefile.maint: Update from Autoconf 2.54.
2468 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2469
7ea9a33f
AD
24702002-10-13 Akim Demaille <akim@epita.fr>
2471
2472 * src/print.c (print_state): Separate the list of solved conflicts
2473 from the other items.
2474 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2475
ea99527d
AD
24762002-10-13 Akim Demaille <akim@epita.fr>
2477
2478 Let nondeterministic skeletons be usable with deterministic
2479 tables.
2480
2481 With the patch, GAWK compiled by GCC without -O2 passes its test
2482 suite using a GLR parser driven by LALR tables. It fails with -O2
2483 because `struct stat' gives two different answers on my machine:
2484 88 (definition of an auto var) and later 96 (memset on this var).
2485 Hence the stack is badly corrumpted. The headers inclusion is to
2486 blame: if I move the awk.h inclusion before GLR's system header
2487 inclusion, the two struct stat have the same size.
2488
2489 * src/tables.c (pack_table): Always create conflict_table.
2490 (token_actions): Always create conflict_list.
2491 * data/glr.c (YYFLAG): Remove, unused.
2492
f377f69f
AD
24932002-10-13 Akim Demaille <akim@epita.fr>
2494
2495 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2496 (O0FLAGS): New.
2497 (VALGRIND, GXX): New.
2498 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2499 * tests/bison.in: Run $PREBISON a pre-command.
2500 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2501 (maintainer-check-g++): New.
2502 * Makefile.am (maintainer-check): New.
2503
2a1fe6ed
AD
25042002-10-13 Akim Demaille <akim@epita.fr>
2505
2506 * data/glr.c: Formatting changes.
2507 Tweak some trace messages to match yacc.c's.
2508
f50adbbd
AD
25092002-10-13 Akim Demaille <akim@epita.fr>
2510
2511 GLR parsers sometimes raise parse errors instead of performing the
2512 default reduction.
2513 Reported by Charles-Henry de Boysson.
2514
2515 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2516 check the length of the traces when %glr.
2517 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2518 GLR's traces.
2519 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2520 Test GLR parsers.
2521 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2522 (yyltype): Remove the yy prefix from the member names.
2523 (yytable): Complete its comment.
2524 (yygetLRActions): Map error action number from YYTABLE from
2525 YYTABLE_NINF to 0.
2526 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2527 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2528 not satisfying as we could compare an YYACTION computed from
2529 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2530 only value for error actions.
2531 (yyreportParseError): In verbose parse error messages, don't issue
2532 `error' in the list of expected tokens.
2533 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2534 next action to perform to match glr.c's decoding.
2535 (yytable): Complete its comment.
2536
bcbad5b9
PE
25372002-10-13 Paul Eggert <eggert@twinsun.com>
2538
2539 Fix problem reported by Henrik Grubbstroem in
e3aa65c5 2540 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
2541 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2542 because the Bison parser reads the second action before reducing
2543 the first one.
2544 * src/scan-gram.l (rule_length): New static var.
2545 Use it to keep track of the rule length in the scanner, since
2546 we can't expect the parser to be in lock-step sync with the scanner.
2547 (handle_action_dollar, handle_action_at): Use this var.
2548 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 2549
14904b89
PE
25502002-10-12 Paul Eggert <eggert@twinsun.com>
2551
1fe611e5
PE
2552 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2553 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2554 Include <sys/time.h> when checking for clock_t and struct tms.
2555 Use same include order as source.
2556 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
e3aa65c5 2557 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 2558
1fe611e5
PE
2559 * lib/timevar.c: Update copyright date and clarify comments.
2560 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 2561
1fe611e5
PE
2562 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2563 GCC version as of today, then merge Bison's changes.
2564 Change "GCC" to "Bison" in copyright notice. timevar.def's
2565 author is Akim, so change that too.
2566
98194095
PE
2567 * src/reader.c (grammar_current_rule_check):
2568 Don't worry about the default action if $$ is untyped.
2569 Prevents bogus warnings reported by Jim Gifford in
e3aa65c5 2570 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 2571
14904b89
PE
2572 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2573 * data/glr.c, data/lalr1.cc, data/yacc.c:
2574 Output token definitions before the first part of user declarations.
2575 Fixes compatibility problem reported by Jim Gifford for kbd in
e3aa65c5 2576 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 2577
ff6dca18
PE
25782002-10-11 Paul Eggert <eggert@twinsun.com>
2579
2580 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2581 (yyparse): here. This undoes some of the 2002-07-25 change.
2582 Compatibility problem reported by Ralf S. Engelschall with
2583 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2584
eb714592
AD
25852002-10-11 Akim Demaille <akim@epita.fr>
2586
2587 * tests/regression.at Characters Escapes): New.
2588 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2589 characters.
2590 Reported by Jan Nieuwenhuizen.
2591
b7195100
AD
25922002-10-11 Akim Demaille <akim@epita.fr>
2593
2594 * po/id.po: New.
2595
f28a0f2d
PE
25962002-10-10 Paul Eggert <eggert@twinsun.com>
2597
2598 Portability fixes for bitsets; this also avoids several GCC
2599 warnings.
2600
2601 * lib/abitset.c: Include <stddef.h>, for offsetof.
2602 * lib/lbitset.c: Likewise.
2603
2604 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2605 properly for vectors of objects. Do not assume that adding a
2606 header size to a multiple of a word size yields a value that is
2607 properly aligned for the whole union.
2608 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2609
2610 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2611 unique names for structures.
2612 * lib/ebitset.c (ebitset_bytes): Likewise.
2613 * lib/lbitset.c (lbitset_bytes): Likewise.
2614
2615 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2616 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2617 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2618 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2619 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2620 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2621 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2622 to improve the type-checking that GCC can do.
2623 * lib/bitset.c (bitset_op4_cmp): Likewise.
2624 * lib/bitset_stats.c (bitset_stats_count,
2625 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2626 bitset_stats_copy, bitset_stats_disjoint_p,
2627 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2628 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2629 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2630 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2631 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2632 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2633 bitset_stats_or_and_cmp): Likewise.
2634 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2635 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2636 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2637 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2638
2639 * lib/abitset.h: Include bitset.h, not bbitset.h.
2640 * lib/ebitset.h: Likewise.
2641 * lib/lbitset.h: Likewise.
2642
2643 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2644 All instances of parameters of type enum bitset_opts are now of
2645 type enum_bitset_opts, to conform to the C Standard, and similarly
2646 for enum_bitset_type.
2647 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2648 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2649
2650 Do not use "struct bitset_struct" to mean different things in
2651 different modules. Not only is this confusing, it violates
2652 the C Standard, which requires that structure types in different
2653 modules must be compatible if one is to be passed to the other.
2654 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2655 All instances of "struct bitset_struct *" replaced with "bitset".
2656 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2657 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2658 struct lbitset_struct, struct bitset_stats_struct): New types.
2659 All uses of struct bitset_struct changed to union bitset_union,
2660 etc.
2661 * lib/abitset.c (struct abitset_struct, abitset,
2662 struct bitset_struct): Remove.
2663 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2664 struct bitset_struct): Remove.
2665 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2666 bitset_struct): Remove.
2667 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2668 Likewise.
2669
2670 Do not call a function of type T using a call that assumes the
2671 function is of a different type U. Standard C requires that a
2672 function must be called with a type that is compatible with its
2673 definition.
2674 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2675 New decls.
2676 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2677 New functions.
2678 * lib/ebitset.c (PFV): Remove.
2679 * lib/lbitset.c (PFV): Likewise.
2680 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2681 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2682 decls.
2683 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2684 (ebitset_vtable): Use them.
2685 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2686 lbitset_xor): New functions.
2687 (lbitset_vtable): Use them.
2688
2689 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2690 Declare.
2691
2692 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2693 GCC warning.
2694 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2695 Use offsetof, for simplicity.
2696
6fbe4984
PE
26972002-10-06 Paul Eggert <eggert@twinsun.com>
2698
2699 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2700 the same width as int. This reapplies a hunk of the 2002-08-12 patch
e3aa65c5 2701 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
2702 which was inadvertently undone by the 2002-09-30 patch.
2703 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2704 the same width as int.
2705
420f93c8
PE
27062002-10-04 Paul Eggert <eggert@twinsun.com>
2707
2708 Version 1.50.
2709
2710 * configure.ac (AC_INIT), NEWS: Increment version number.
2711
2712 * doc/bison.texinfo: Minor spelling, grammar, and white space
2713 fixes.
2714 (Symbols): Mention that any negative value returned from yylex
2715 signifies end-of-input. Warn about negative chars. Mention
2716 the portable Standard C character set.
2717
2718 The GNU coding standard says CFLAGS and YFLAGS are reserved
2719 for the installer to set.
2720 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2721 * src/Makefile.am (AM_CFLAGS): Likewise.
2722 (AM_YFLAGS): Renamed from YFLAGS.
2723
2724 Fix some MAX and MIN problems.
2725 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2726 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2727 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2728 * src/reader.c (reader): Use it.
2729
2730 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2731 POSIX 1003.1-2001 has removed fgrep.
2732
27332002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2734
2735 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2736 interpreted as signed.
2737 * lib/ebitset.c (ebitset_list): Fix bug.
2738
ff68026d
PE
27392002-10-01 Paul Eggert <eggert@twinsun.com>
2740
2741 More fixes for 64-bit hosts and large bitsets.
2742
2743 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2744 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2745 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2746 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2747 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2748 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2749 bitset_count_): Likewise.
2750 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2751 bitset_first, bitset_last): Likewise.
2752 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2753 bitset_stats_list_reverse, bitset_stats_size,
2754 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2755 Likewise.
2756 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2757 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2758 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2759 bitsetv_reflexive_transitive_closure): Likewise.
2760 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2761 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2762 Likewise.
2763 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2764 Likewise.
420f93c8 2765
ff68026d
PE
2766 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2767 Use size_t, not unsigned int, to count bytes.
2768 * lib/abitset.h (abitset_bytes): Likewise.
2769 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2770 Likewise.
2771 * lib/bitset.h (bitset_bytes): Likewise.
2772 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2773 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2774 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2775 * lib/ebitset.c (ebitset_bytes): Likewise.
2776 * lib/ebitset.h (ebitset_bytes): Likewise.
2777 * lib/lbitset.c (lbitset_bytes): Likewise.
2778 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 2779
ff68026d
PE
2780 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2781 abitset_subset_p, abitset_disjoint_p, abitset_and,
2782 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2783 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2784 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2785 abitset_or_and, abitset_or_and_cmp):
2786 Use bitset_windex instead of unsigned int.
2787 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2788 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2789 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2790 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2791 Likewise.
2792 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 2793
ff68026d
PE
2794 * lib/bitset.c (bitset_print):
2795 Use proper printf formats for widths of integer types.
2796 * lib/bitset_stats.c (bitset_percent_histogram_print,
2797 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2798 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2799 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2800 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 2801
ff68026d
PE
2802 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2803 BITSET_SIZE_MAX): New macros.
2804 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2805 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2806 to BITSET_WINDEX_MAX.
2807
2808 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2809 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2810 since we now return the bitset_bindex type (not int).
2811
2812 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2813 when computing sizes.
2814 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2815
2816 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2817 and avoid cast to unsigned.
2818
6aa452a6
AD
28192002-09-30 Akim Demaille <akim@epita.fr>
2820
2821 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2822 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2823 Updates from Michael Hayes.
2824
927f7817
AD
28252002-09-30 Art Haas <ahaas@neosoft.com>
2826
2827 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2828 invocations.
2829 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2830 defined.
2831
9738f41e
AD
28322002-09-27 Akim Demaille <akim@epita.fr>
2833
2834 Version 1.49c.
2835
a5c75d7f
AD
28362002-09-27 Akim Demaille <akim@epita.fr>
2837
2838 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2839 (Because of AC_LIBSOURCE).
2840
8280e179
AD
28412002-09-27 Akim Demaille <akim@epita.fr>
2842
2843 Playing with Autoscan.
2844
2845 * configure.ac: Remove the old LIBOBJ tweaks.
2846 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2847 * lib/strrchr.c: New.
2848 * lib/strtol.c: New, from the Coreutils 4.5.1.
2849
ae64af35
AD
28502002-09-27 Akim Demaille <akim@epita.fr>
2851
2852 Playing with Autoscan.
2853
2854 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2855 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2856 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2857 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2858 Coreutils 4.5.1.
2859
d1a1114f
AD
28602002-09-24 Akim Demaille <akim@epita.fr>
2861
2862 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2863 (Frequently Asked Questions, Parser Stack Overflow): New.
2864
b906441c
AD
28652002-09-13 Akim Demaille <akim@epita.fr>
2866
2867 Playing with autoscan.
2868
2869 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2870 * src/files.c (skeleton_find): Remove, unused.
2871 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2872 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2873
bd701811
AD
28742002-09-13 Akim Demaille <akim@epita.fr>
2875
2876 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2877 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2878
e0a13e7b
AD
28792002-09-13 Akim Demaille <akim@epita.fr>
2880
2881 * configure.ac: Require 2.54.
2882 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2883 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2884 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2885 Remove, provided by Autoconf macros.
2886
c97011bf
AD
28872002-09-12 Akim Demaille <akim@epita.fr>
2888
2889 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2890
d862b1be
AD
28912002-09-12 Akim Demaille <akim@epita.fr>
2892
2893 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2894 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2895 Reported by Martin Mokrejs.
2896
3d38c03a
AD
28972002-09-10 Akim Demaille <akim@epita.fr>
2898
2899 * src/parse-gram.y: Associate a human readable string to each
2900 token type.
2901 * tests/regression.at (Invalid inputs): Adjust.
2902
b6347355
AD
29032002-09-10 Gary V. Vaughan <gary@gnu.org>
2904
2905 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2906 with an Autoconf-2.5x style configure.ac.
2907
09ba4ab2
PE
29082002-09-06 Paul Eggert <eggert@twinsun.com>
2909
2910 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2911 exception applies only to yacc.c. This is a modification of a
2912 patch originally suggested by Akim Demaille.
2913
21846f69
AD
29142002-09-06 Akim Demaille <akim@epita.fr>
2915
09ba4ab2
PE
2916 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2917 here to...
2918 * data/yacc.c: here.
2919
21846f69
AD
2920 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2921 LocationType.
2922 (b4_ltype): Default to yy::Location from location.hh.
2923
c0ad8bf3
AD
29242002-09-04 Jim Meyering <jim@meyering.net>
2925
2926 * data/yacc.c: Guard the declaration of yytoknum also with
2927 `#ifdef YYPRINT', so it is declared only when used.
2928
3a93251e
AD
29292002-09-04 Akim Demaille <akim@epita.fr>
2930
2931 * configure.in: Rename as...
2932 * configure.ac: this.
2933 Bump to 1.49c.
2934
427c0dda
AD
29352002-09-04 Akim Demaille <akim@epita.fr>
2936
2937 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2938 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2939 translate maintainer only messages.
2940
6a254321
PE
29412002-08-12 Paul Eggert <eggert@twinsun.com>
2942
645e30d1
PE
2943 Version 1.49b.
2944
6a254321
PE
2945 * Makefile.am (SUBDIRS): Remove intl.
2946 (DISTCLEANFILES): Remove.
2947 * NEWS: Mention that GNU M4 is now required. Clarify what is
2948 meant by "larger grammars". Mention the pt_BR translation.
2949 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2950 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2951 Bump version from 0.11.2 to 0.11.5.
2952 (BISON_PREREQ_STAGE): Remove.
2953 (AM_GNU_GETTEXT): Use external gettext.
2954 (AC_OUTPUT): Remove intl/Makefile.
2955
2956 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2957
2958 * data/glr.c: Include string.h, for strlen.
2959 (yyreportParseError): Use size_t for yysize.
2960 (yy_yypstack): No longer nested inside yypstates, as nested
2961 functions are not portable. Do not assume size_t is the
2962 same width as int.
2963 (yypstates): Do not assume that ptrdiff_t is the same width
2964 as int, and similarly for yyposn and YYINDEX.
2965
2966 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2967
2968 * lib/Makefile.am (INCLUDES): Do not include from the intl
2969 directory, which has been removed.
2970 * src/Makefile.am (INCLUDES): Likewise.
2971
2972 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2973 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2974 New vars.
2975
2976 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2977 * tests/Makefile.am (EXTRA_DIST): Likewise.
2978
2979 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2980 Do not assume that bitset_windex is the same width as unsigned.
2981
2982 * lib/abitset.c (abitset_unused_clear): Do not assume that
2983 bitset_word is the same width as int.
2984 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2985 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2986 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2987 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2988 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2989
2990 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2991 portability to one's complement hosts!).
2992 * lib/ebitset.c (ebitset_op1): Likewise.
2993 * lib/lbitset.c (lbitset_op1): Likewise.
2994
2995 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2996 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2997 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2998 Sync with fileutils.
2999 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3000 lib/gettext.h: Sync with diffutils.
3001
3002 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3003 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3004
3005 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3006 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3007 check for void *.
3008
3009 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3010 size_t; the old version tried to do this but casted improperly.
3011 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3012 (bitset_test): Now returns int, not unsigned long.
3013
3014 * lib/bitset_stats.c: Include "gettext.h".
3015 (_): New macro.
3016 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3017 name locals "index", as it generates unnecessary warnings on some
3018 hosts that have an "index" function.
3019
3020 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3021 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3022 they need translation.
3023 * src/LR0.c (state_list_append, new_itemsets, get_state,
3024 append_states, generate_states): Likewise.
3025 * src/assoc.c (assoc_to_string): Likewise.
3026 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3027 * src/gram.c (grammar_dump): Likewise.
3028 * src/injections.c (injections_compute): Likewise.
3029 * src/lalr.c (lookaheads_print): Likewise.
3030 * src/relation.c (relation_transpose): Likewise.
3031 * src/scan-gram.l: Likewise.
3032 * src/tables.c (table_grow, pack_vector): Likewise.
3033
3034 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3035 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3036 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3037 * m4/mbstate_t.m4: Sync with fileutils.
3038 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3039
3040 * po/LINGUAS: Add pt_BR.
3041 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3042 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3043 lib/timevar.c.
3044 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3045 manual recommends.
3046 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3047
3048 * src/complain.c (strerror_r): Remove decl; not needed.
3049 (strerror): Use same pattern as ../lib/error.c.
3050
3051 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3052
3053 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3054
3055 * src/main.c (main): Cast result of bindtextdomain and textdomain
3056 to void, to avoid a GCC warning when --disable-nls is in effect.
3057
3058 * src/scan-gram.l: Use strings rather than escapes when possible,
3059 to minimize the number of warnings from xgettext.
3060 (handle_action_dollar, handle_action_at): Don't use isdigit,
3061 as it mishandles negative chars and it may not work as expected
3062 outside the C locale.
3063
3064 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3065 this is a GCC extension and is not portable to other compilers.
3066
3067 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3068 Do not include <ctype.h>; no longer needed.
3069 Do not include <malloc.h>; no longer needed (and generates
3070 warnings on OpenBSD 3.0).
3071
3072 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3073 it's not portable.
3074
3075 * tests/regression.at: Do not use 'cc -c input.c -o input';
3076 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3077
3078 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3079 exit status as failure, not just exit status 1. Sun C exits
3080 with status 2 sometimes.
3081
3082 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3083 Use it for the two large tests.
3084
c8f002c7
AD
30852002-08-02 Akim Demaille <akim@epita.fr>
3086
3087 * src/conflicts.c (conflicts_output): Don't output rules never
3088 reduced here, since anyway that computation doesn't work.
3089 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3090 (rule_useless_p, rule_never_reduced_p): New.
3091 (grammar_rules_partial_print): Use a filter instead of a range.
3092 Display the title only if needed.
3093 (grammar_rules_print): Adjust.
3094 (grammar_rules_never_reduced_report): New.
3095 * src/tables.c (action_row): Move the computation of rules never
3096 reduced to...
3097 (token_actions): here.
3098 * src/main.c (main): Make the parser before making the report, so
3099 that rules never reduced are computed.
3100 Call grammar_rules_never_reduced_report.
3101 * src/print.c (print_results): Report rules never reduced.
3102 * tests/conflicts.at, tests/reduce.at: Adjust.
3103
cd08e51e
AD
31042002-08-01 Akim Demaille <akim@epita.fr>
3105
3106 Instead of attaching lookaheads and duplicating the rules being
3107 reduced by a state, attach the lookaheads to the reductions.
3108
3109 * src/state.h (state_t): Remove the `lookaheads',
3110 `lookaheads_rule' member.
3111 (reductions_t): Add a `lookaheads' member.
3112 Use a regular array for the `rules'.
3113 * src/state.c (reductions_new): Initialize the lookaheads member
3114 to 0.
3115 (state_rule_lookaheads_print): Adjust.
3116 * src/state.h, src/state.c (state_reductions_find): New.
3117 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3118 (count_rr_conflicts): Adjust.
3119 * src/lalr.c (LArule): Remove.
3120 (add_lookback_edge): Adjust.
3121 (state_lookaheads_count): New.
3122 (states_lookaheads_initialize): Merge into...
3123 (initialize_LA): this.
3124 (lalr_free): Adjust.
3125 * src/main.c (main): Don't free nullable and derives too early: it
3126 is used by --verbose.
3127 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3128
bb0027a9
AD
31292002-08-01 Akim Demaille <akim@epita.fr>
3130
3131 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3132 `rule_number_t**'.
3133 (set_derives, free_derives): Rename as...
3134 (derives_compute, derives_free): this.
3135 Adjust all dependencies.
3136 * src/nullable.c (set_nullable, free_nullable): Rename as...
3137 (nullable_compute, nullable_free): these.
3138 (rule_list_t): Store rule_t *, not rule_number_t.
3139 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3140 pointers, instead of their numbers.
3141 * src/main.c (main): Call nullable_free, and derives_free earlier,
3142 as they were lo longer used.
3143
3325ddc4
AD
31442002-08-01 Akim Demaille <akim@epita.fr>
3145
3146 * lib/timevar.c (get_time): Include children time.
3147 * src/lalr.h (LA, LArule): Don't export them: used with the
3148 state_t.
3149 * src/lalr.c (LA, LArule): Static.
3150 * src/lalr.h, src/lalr.c (lalr_free): New.
3151 * src/main.c (main): Call it.
3152 * src/tables.c (pack_vector): Check whether loc is >= to the
3153 table_size, not >.
3154 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3155 (tables_generate): do it, since that's also it which allocates
3156 them.
3157 Don't free LA and LArule, main does.
3158
c6f1a33c
AD
31592002-07-31 Akim Demaille <akim@epita.fr>
3160
3161 Separate parser tables computation and output.
3162
3163 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3164 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3165 (yydefgoto, yydefact, high): Move to...
3166 * src/tables.h, src/tables.c: here.
3167 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3168 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3169 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3170 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3171 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3172 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3173 (action_row, save_row, token_actions, save_column, default_goto)
3174 (goto_actions, sort_actions, matching_state, pack_vector)
3175 (table_ninf_remap, pack_table, prepare_actions): Move to...
3176 * src/tables.c: here.
3177 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3178 * src/output.c (token_actions, output_base, output_conflicts)
3179 (output_check): Merge into...
3180 (prepare_actions): this.
3181 (actions_output): Rename as...
3182 (user_actions_output): this.
3183 * src/main.c (main): Call tables_generate and tables_free.
3184
1509d42f
AD
31852002-07-31 Akim Demaille <akim@epita.fr>
3186
3187 Steal GCC's --time-report support.
3188
3189 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3190 stolen/adjusted from GCC.
3191 * m4/stage.m4: Remove time related checks.
3192 * m4/timevar.m4: New.
3193 * configure.in: Adjust.
3194 * src/system.h: Adjust to using timevar.h.
3195 * src/getargs.h, src/getargs.c: Support trace_time for
3196 --trace=time.
3197 * src/main.c (stage): Remove.
3198 (main): Replace `stage' invocations with timevar calls.
3199 * src/output.c: Insert pertinent timevar calls.
3200
273a74fa
AD
32012002-07-31 Akim Demaille <akim@epita.fr>
3202
3203 Let --trace have arguments.
3204
3205 * src/getargs.h (enum trace_e): New.
3206 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3207 (long_options, short_options): --trace/-T takes an optional
3208 argument.
3209 Change all the uses of trace_flag to reflect the new flags.
3210 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3211
3212 Strengthen `stage' portability.
3213
3214 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3215 * configure.in: Use it.
3216 Don't check for malloc.h and sys/times.h.
3217 * src/system.h: Include them when appropriate.
3218 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3219 times and struct tms are available.
3220
217598da
AD
32212002-07-30 Akim Demaille <akim@epita.fr>
3222
3223 In verbose parse error message, don't report `error' as an
3224 expected token.
3225 * tests/actions.at (Printers and Destructors): Adjust.
3226 * tests/calc.at (Calculator $1): Adjust.
3227 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3228 error message, do not report the parser accepts the error token in
3229 that state.
3230
52489d44
AD
32312002-07-30 Akim Demaille <akim@epita.fr>
3232
3233 Normalize conflict related messages.
3234
3235 * src/complain.h, src/complain.c (warn, complain): New.
3236 * src/conflicts.c (conflicts_print): Use them.
3237 (conflict_report_yacc): New, extracted from...
3238 (conflicts_print): here.
3239 * tests/conflicts.at, tests/existing.at: Adjust.
3240
e8832397
AD
32412002-07-30 Akim Demaille <akim@epita.fr>
3242
3243 Report rules which are never reduced by the parser: those hidden
3244 by conflicts.
3245
3246 * src/LR0.c (save_reductions): Don't make the final state too
3247 different: save its reduction (accept) instead of having a state
3248 without any action (no shift or goto, no reduce).
3249 Note: the final state is now a ``regular'' state, i.e., the
3250 parsers now contain `reduce 0' as default reduction.
3251 Nevertheless, since they decide to `accept' when yystate =
3252 final_state, they still will not reduce rule 0.
3253 * src/print.c (print_actions, print_reduction): Adjust.
3254 * src/output.c (action_row): Track reduced rules.
3255 (token_actions): Report rules never reduced.
3256 * tests/conflicts.at, tests/regression.at: Adjust.
3257
caf23d24
AD
32582002-07-30 Akim Demaille <akim@epita.fr>
3259
3260 `stage' was accidently included in a previous patch.
3261 Initiate its autoconfiscation.
3262
3263 * configure.in: Look for malloc.h and sys/times.h.
3264 * src/main.c (stage): Adjust.
3265 Report only when trace_flag.
3266
640748ee
AD
32672002-07-29 Akim Demaille <akim@epita.fr>
3268
3269 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3270 state_number_t.
3271 (errs_t): symbol_t*, not symbol_number_t.
3272 (reductions_t): rule_t*, not rule_number_t.
3273 (FOR_EACH_SHIFT): New.
3274 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3275 * src/print.c, src/print_graph.c: Adjust.
3276
88bce5a2
AD
32772002-07-29 Akim Demaille <akim@epita.fr>
3278
3279 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3280
3281 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3282 (endtoken, accept): these.
3283 * src/reader.c (reader): Set endtoken's default tag to "$end".
3284 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3285 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3286 Adjust.
3287
1bfb97db
AD
32882002-07-29 Akim Demaille <akim@epita.fr>
3289
3290 * src/reduce.c (reduce_grammar): When the language is empty,
3291 complain about the start symbol, not the axiom.
3292 Use its location.
3293 * tests/reduce.at (Empty Language): New.
3294
fc5734fe
AD
32952002-07-26 Akim Demaille <akim@epita.fr>
3296
3297 * src/reader.h, src/reader.c (gram_error): ... can't get
3298 yycontrol without making too strong assumptions on the parser
3299 itself.
3300 * src/output.c (prepare_tokens): Use the real 0th value of
3301 token_translations instead of `0'.
3302 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3303 visible here.
3304 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3305 for the time being: %locations ought to provide it to yyerror.
3306
3650b4b8
AD
33072002-07-25 Akim Demaille <akim@epita.fr>
3308
3309 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3310 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3311 * tests/regression.at (Web2c Actions): Adjust.
3312
4b3d3a8e
AD
33132002-07-25 Akim Demaille <akim@epita.fr>
3314
3315 Stop storing rules from 1 to nrules + 1.
3316
3317 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3318 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3319 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3320 Iterate from 0 to nrules.
3321 Use rule_number_as_item_number and item_number_as_rule_number.
3322 Adjust to `derive' now containing possibly 0.
3323 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3324 Handle the `- 1' part in rule numbers from/to item numbers.
3325 * src/conflicts.c (log_resolution): Fix the message which reversed
3326 shift and reduce.
3327 * src/output.c (action_row): Initialize default_rule to -1.
3328 (token_actions): Adjust.
3329 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3330 expected output.
3331 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3332
4a2a22f4
AD
33332002-07-25 Akim Demaille <akim@epita.fr>
3334
3335 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3336 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3337 (b4_c_knr_arg_decl): New.
3338 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3339 yyreport_parse_error.
3340
b8df3223
AD
33412002-07-25 Akim Demaille <akim@epita.fr>
3342
3343 * data/yacc.c (yyreport_parse_error): New, extracted from...
3344 (yyparse): here.
3345 (yydestruct, yysymprint): Move above yyparse.
3346 Be K&R compliant.
3347
a762e609
AD
33482002-07-25 Akim Demaille <akim@epita.fr>
3349
3350 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3351 replace...
3352 (b4_sint_type, b4_uint_type): these.
3353 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3354 * tests/regression.at (Web2c Actions): Adjust.
3355
12b0043a
AD
33562002-07-25 Akim Demaille <akim@epita.fr>
3357
3358 * src/gram.h (TIEM_NUMBER_MAX): New.
3359 (item_number_of_rule_number, rule_number_of_item_number): Rename
3360 as...
3361 (rule_number_as_item_number, item_number_as_rule_number): these.
3362 Adjust dependencies.
3363 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3364 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3365 (symbol_number_to_vector_number): New.
3366 (order): Of vector_number_t* type.
3367 (base_t, BASE_MAX, BASE_MIN): New.
3368 (froms, tos, width, pos, check): Of base_t type.
3369 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3370 (actrow): Of action_number_t type.
3371 (conflrow): Of unsigned int type.
3372 (table_ninf, base_ninf): New.
3373 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3374 (muscle_insert_int_table, muscle_insert_base_table)
3375 (muscle_insert_rule_number_table): New.
3376 (prepare_tokens): Output `toknum' as int_table.
3377 (action_row): Returns a rule_number_t.
3378 Use ACTION_MIN, not SHRT_MIN.
3379 (token_actions): yydefact is rule_number_t*.
3380 (table_ninf_remap): New.
3381 (pack_table): Use it for `base' and `table'.
3382 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3383 replaced with...
3384 (YYPACT_NINF, YYTABLE_NINF): these.
3385 (yypact, yytable): Compute their types instead of hard-coded
3386 `short'.
3387 * tests/regression.at (Web2c Actions): Adjust.
3388
5dde258a
AD
33892002-07-19 Akim Demaille <akim@epita.fr>
3390
3391 * src/scan-gram.l (id): Can start with an underscore.
3392
a945ec39
AD
33932002-07-16 Akim Demaille <akim@epita.fr>
3394
3395 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3396 Adjust all former `associativity' dependencies.
3397 * src/symtab.c (symbol_new): Default associativity is `undef', not
3398 `right'.
3399 (symbol_check_alias_consistence): Adjust.
3400
fae437e8
AD
34012002-07-09 Akim Demaille <akim@epita.fr>
3402
3403 * doc/bison.texinfo: Properly set the ``header'' part.
3404 Use @dircategory ``GNU programming tools'' as per Texinfo's
3405 documentation.
3406 Use @copying.
3407
1a715ef2
AD
34082002-07-09 Akim Demaille <akim@epita.fr>
3409
3410 * lib/quotearg.h: Protect against multiple inclusions.
3411 * src/location.h (location_t): Add a `file' member.
3412 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3413 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3414 `error_one_per_line' support.
3415
a5d50994
AD
34162002-07-09 Akim Demaille <akim@epita.fr>
3417
3418 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3419 * src/reader.c (lineno): Remove.
3420 Adjust all dependencies.
3421 (get_merge_function): Take a location and use complain_at.
3422 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3423 * tests/regression.at (Invalid inputs, Mixing %token styles):
3424 Adjust.
3425
b275314e
AD
34262002-07-09 Akim Demaille <akim@epita.fr>
3427
3428 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3429 recovery rule, and forbid extensions when --yacc.
3430 (gram_error): Use complain_at.
3431 * src/reader.c (reader): Exit if there were parse errors.
3432
865b9df1
AD
34332002-07-09 Akim Demaille <akim@epita.fr>
3434
3435 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3436 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3437 Reported by R Blake <blakers@mac.com>.
3438
c76e14da
AD
34392002-07-09 Akim Demaille <akim@epita.fr>
3440
3441 * data/yacc.c: Output the copyright notive in the header.
3442
7db2ed2d
AD
34432002-07-03 Akim Demaille <akim@epita.fr>
3444
3445 * src/output.c (froms, tos): Are state_number_t.
3446 (save_column): sp, sp1, and sp2 are state_number_t.
3447 (prepare): Rename `final' as `final_state_number', `nnts' as
3448 `nterms_number', `nrules' as `rules_number', `nstates' as
3449 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3450 unused.
3451 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3452 * data/lalr1.cc (nsym_): Remove, unused.
3453
e68e0410
AD
34542002-07-03 Akim Demaille <akim@epita.fr>
3455
3456 * src/lalr.h, src/lalr.c (goto_number_t): New.
3457 * src/lalr.c (goto_list_t): New.
3458 Propagate them.
3459 * src/nullable.c (rule_list_t): New.
3460 Propagate.
3461 * src/types.h: Remove.
3462
e1a4f3a4
AD
34632002-07-03 Akim Demaille <akim@epita.fr>
3464
3465 * src/closure.c (print_fderives): Use rule_rhs_print.
3466 * src/derives.c (print_derives): Use rule_rhs_print.
3467 (rule_list_t): New, replaces `shorts'.
3468 (set_derives): Add comments.
3469 * tests/sets.at (Nullable, Firsts): Adjust.
3470
536545f3
AD
34712002-07-03 Akim Demaille <akim@epita.fr>
3472
3473 * src/output.c (prepare_actions): Free `tally' and `width'.
3474 (prepare_actions): Allocate and free `order'.
3475 * src/symtab.c (symbols_free): Free `symbols'.
3476 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3477 * src/output.c (m4_invoke): Move to...
3478 * src/scan-skel.l: here.
3479 (<<EOF>>): Close yyout, and free its name.
3480
8b752b00
AD
34812002-07-03 Akim Demaille <akim@epita.fr>
3482
3483 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3484
3485 * src/LR0.c (new_state): Merge into...
3486 (state_list_append): this.
3487 (new_states): Merge into...
3488 (generate_states): here.
3489 (set_states): Don't ensure a proper `errs' state member here, do it...
3490 * src/conflicts.c (conflicts_solve): here.
3491 * src/state.h, src/state.c: Comment changes.
3492 (state_t): Rename member `shifts' as `transitions'.
3493 Adjust all dependencies.
3494 (errs_new): For consistency, also take the values as argument.
3495 (errs_dup): Remove.
3496 (state_errs_set): New.
3497 (state_reductions_set, state_transitions_set): Assert that no
3498 previous value was assigned.
3499 (state_free): New.
3500 (states_free): Use it.
3501 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3502 temporary storage: use `errs' and `nerrs' as elsewhere.
3503 (set_conflicts): Allocate and free this `errs'.
3504
613f5e1a
AD
35052002-07-02 Akim Demaille <akim@epita.fr>
3506
3507 * lib/libiberty.h: New.
3508 * lib: Update the bitset implementation from upstream.
3509 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3510 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3511 * src/main.c: Adjust bitset stats calls.
3512
26e0cadc
PE
35132002-07-01 Paul Eggert <eggert@twinsun.com>
3514
3515 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3516 char, so that negative chars don't collide with $.
3517
1154cced
AD
35182002-06-30 Akim Demaille <akim@epita.fr>
3519
3520 Have the GLR tests be `warning' checked, and fix the warnings.
3521
3522 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3523 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3524 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3525 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3526 (yyaddDeferredAction): static.
3527 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3528 (yyreportParseError): yyprefix is const.
3529 yytokenp is used only when verbose.
3530 (yy__GNUC__): Replace with __GNUC__.
3531 (yypdumpstack): yyi is size_t.
3532 (yypreference): Un-yy local variables and arguments, to avoid
3533 clashes with `yyr1'. Anyway, we are not in the user name space.
3534 (yytname_size): be an int, as is compared with ints.
3535 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3536 Use them.
3537 * tests/cxx-gram.at: Use quotation to protect $1.
3538 Use AT_COMPILE to enable warnings hunts.
3539 Prototype yylex and yyerror.
3540 `Use' argc.
3541 Include `string.h', not `strings.h'.
3542 Produce and prototype stmtMerge only when used.
3543 yylex takes a location.
3544
97650f4e
AD
35452002-06-30 Akim Demaille <akim@epita.fr>
3546
3547 We spend a lot of time in quotearg, in particular when --verbose.
3548
3549 * src/symtab.c (symbol_get): Store a quoted version of the key.
3550 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3551 Adjust all callers.
3552
d2576365
AD
35532002-06-30 Akim Demaille <akim@epita.fr>
3554
3555 * src/state.h (reductions_t): Rename member `nreds' as num.
3556 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3557 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3558
ccaf65bc
AD
35592002-06-30 Akim Demaille <akim@epita.fr>
3560
3561 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3562 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3563 (shifts_to): Rename as...
3564 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3565 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3566 (TRANSITION_IS_DISABLED, transitions_to): these.
3567
87675353
AD
35682002-06-30 Akim Demaille <akim@epita.fr>
3569
3570 * src/print.c (print_shifts, print_gotos): Merge into...
3571 (print_transitions): this.
3572 (print_transitions, print_errs, print_reductions): Align the
3573 lookaheads columns.
3574 (print_core, print_transitions, print_errs, print_state,
3575 print_grammar): Output empty lines separator before, not after.
3576 (state_default_rule_compute): Rename as...
3577 (state_default_rule): this.
3578 * tests/conflicts.at (Defaulted Conflicted Reduction),
3579 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3580 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3581
ce4ccb4b
AD
35822002-06-30 Akim Demaille <akim@epita.fr>
3583
3584 Display items as we display rules.
3585
3586 * src/gram.h, src/gram.c (rule_lhs_print): New.
3587 * src/gram.c (grammar_rules_partial_print): Use it.
3588 * src/print.c (print_core): Likewise.
3589 * tests/conflicts.at (Defaulted Conflicted Reduction),
3590 (Unresolved SR Conflicts): Adjust.
3591 (Unresolved SR Conflicts): Adjust and rename as...
3592 (Resolved SR Conflicts): this, as was meant.
3593 * tests/regression.at (Web2c Report): Adjust.
3594
bc933ef1
AD
35952002-06-30 Akim Demaille <akim@epita.fr>
3596
3597 * src/print.c (state_default_rule_compute): New, extracted from...
3598 (print_reductions): here.
3599 Pessimize, but clarify the code.
3600 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3601
53d4308d
AD
36022002-06-30 Akim Demaille <akim@epita.fr>
3603
3604 * src/output.c (action_row): Let default_rule be always a rule
3605 number.
3606
574fb2d5
AD
36072002-06-30 Akim Demaille <akim@epita.fr>
3608
3609 * src/closure.c (print_firsts, print_fderives, closure):
3610 Use BITSET_EXECUTE.
3611 * src/lalr.c (lookaheads_print): Likewise.
3612 * src/state.c (state_rule_lookaheads_print): Likewise.
3613 * src/print_graph.c (print_core): Likewise.
3614 * src/print.c (print_reductions): Likewise.
3615 * src/output.c (action_row): Likewise.
3616 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3617
05811fd7
AD
36182002-06-30 Akim Demaille <akim@epita.fr>
3619
3620 * src/print_graph.c: Use report_flag.
3621
0e4d5753
AD
36222002-06-30 Akim Demaille <akim@epita.fr>
3623
3624 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3625 to...
3626 * src/relation.h, src/relation.c (traverse, relation_digraph)
3627 (relation_print, relation_transpose): New.
3628
24c7d800
AD
36292002-06-30 Akim Demaille <akim@epita.fr>
3630
3631 * src/state.h, src/state.c (shifts_to): New.
3632 * src/lalr.c (build_relations): Use it.
3633
9222837b
AD
36342002-06-30 Akim Demaille <akim@epita.fr>
3635
3636 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3637 (item_number_of_rule_number, rule_number_of_item_number): New.
3638 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3639 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3640 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3641 Propagate their use.
3642 Much remains to be done, in particular wrt `shorts' from types.h.
3643
260008e5
AD
36442002-06-30 Akim Demaille <akim@epita.fr>
3645
3646 * src/symtab.c (symbol_new): Initialize the `printer' member.
3647
8a731ca8
AD
36482002-06-30 Akim Demaille <akim@epita.fr>
3649
3650 * src/LR0.c (save_reductions): Remove, replaced by...
3651 * src/state.h, src/state.c (state_reductions_set): New.
3652 (reductions, errs): Rename as...
3653 (reductions_t, errs_t): these.
3654 Adjust all dependencies.
3655
32e1e0a4
AD
36562002-06-30 Akim Demaille <akim@epita.fr>
3657
3658 * src/LR0.c (state_list_t, state_list_append): New.
3659 (first_state, last_state): Now symbol_list_t.
3660 (this_state): Remove.
3661 (new_itemsets, append_states, save_reductions): Take a state_t as
3662 argument.
3663 (set_states, generate_states): Adjust.
3664 (save_shifts): Remove, replaced by...
3665 * src/state.h, src/state.c (state_shifts_set): New.
3666 (shifts): Rename as...
3667 (shifts_t): this.
3668 Adjust all dependencies.
3669 * src/state.h (state_t): Remove the `next' member.
3670
e5fb6710
AD
36712002-06-30 Akim Demaille <akim@epita.fr>
3672
3673 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3674 escaped in slot 0.
3675
c7ca99d4
AD
36762002-06-30 Akim Demaille <akim@epita.fr>
3677
3678 Use hash.h for the state hash table.
3679
3680 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3681 (allocate_storage): Use state_hash_new.
3682 (free_storage): Use state_hash_free.
3683 (new_state, get_state): Adjust.
3684 * src/lalr.h, src/lalr.c (states): Move to...
3685 * src/states.h (state_t): Remove the `link' member, no longer
3686 used.
3687 * src/states.h, src/states.c: here.
3688 (state_hash_new, state_hash_free, state_hash_lookup)
3689 (state_hash_insert, states_free): New.
3690 * src/states.c (state_table, state_compare, state_hash): New.
3691 * src/output.c (output_actions): Do not free states now, since we
3692 still need to know the final_state number in `prepare', called
3693 afterwards. Do it...
3694 * src/main.c (main): here: call states_free after `output'.
3695
df0e7316
AD
36962002-06-30 Akim Demaille <akim@epita.fr>
3697
3698 * src/state.h, src/state.c (state_new): New, extracted from...
3699 * src/LR0.c (new_state): here.
3700 * src/state.h (STATE_ALLOC): Move to...
3701 * src/state.c: here.
3702 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3703 * src/state.h, src/state.c: here.
3704
39f41916
AD
37052002-06-30 Akim Demaille <akim@epita.fr>
3706
3707 * src/reader.c (gensym): Rename as...
3708 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3709 (getsym): Rename as...
3710 (symbol_get): this.
3711
d57650a5
AD
37122002-06-30 Akim Demaille <akim@epita.fr>
3713
3714 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3715 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3716 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3717 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3718
5a08f1ce
AD
37192002-06-30 Akim Demaille <akim@epita.fr>
3720
3721 Make the test suite pass with warnings checked.
3722
3723 * tests/actions.at (Printers and Destructors): Improve.
3724 Avoid unsigned vs. signed issues.
3725 * tests/calc.at: Don't exercise the scanner here, do it...
3726 * tests/input.at (Torturing the Scanner): here.
3727
720623af
PH
37282002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3729
88e7e941 3730 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
3731 reorganize first lines parallel to yacc.c.
3732
fb8135fa
AD
37332002-06-28 Akim Demaille <akim@epita.fr>
3734
3735 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3736 (b4_token_enum, b4_token_defines): New, factored from...
3737 * data/lalr1.cc, data/yacc.c, glr.c: here.
3738
41442480
AD
37392002-06-28 Akim Demaille <akim@epita.fr>
3740
3741 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3742 unused variables.
3743 * src/output.c (merger_output): static.
3744
e0e5bf84
AD
37452002-06-28 Akim Demaille <akim@epita.fr>
3746
3747 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3748 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3749 pacify GCC.
3750 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 3751
676385e2
PH
37522002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3753
3754 Accumulated changelog for new GLR parsing features.
3755
6a254321 3756 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
3757 conflicts_total_count.
3758 * src/conflicts.h: Ditto.
3759 * src/output.c (token_actions): Use the new name.
3760 (output_conflicts): Change conflp => conflict_list_heads, and
3761 confl => conflict_list for better readability.
3762 * data/glr.c: Use the new names.
3763 * NEWS: Add self to GLR announcement.
e0e5bf84 3764
676385e2
PH
3765 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3766
3767 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3768 Akim Demaille.
3769
3770 * data/bison.glr: Change name to glr.c
3771 * data/glr.c: Renamed from bison.glr.
3772 * data/Makefile.am: Add glr.c
e0e5bf84
AD
3773
3774 * src/getargs.c:
3775
676385e2
PH
3776 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3777 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 3778
676385e2
PH
3779 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3780
3781 * data/bison.glr: Be sure to restore the
3782 current #line when returning to the skeleton contents after having
3783 exposed the input file's #line.
3784
3785 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3786
3787 * data/bison.glr: Bring up to date with changes to bison.simple.
3788
3789 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3790
3791 * data/bison.glr: Correct definitions that use b4_prefix.
3792 Various reformatting.
3793 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3794 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3795 yytokenp argument; now part of stack.
3796 (yychar): Define to behave as documented.
3797 (yyclearin): Ditto.
e0e5bf84 3798
676385e2
PH
3799 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3800
3801 * src/reader.h: Add declaration for free_merger_functions.
3802
3803 * src/reader.c (merge_functions): New variable.
3804 (get_merge_function): New function.
3805 (free_merger_functions): New function.
3806 (readgram): Check for %prec that is not followed by a symbol.
3807 Handle %dprec and %merge declarations.
3808 (packgram): Initialize dprec and merger fields in rules array.
3809
3810 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3811 conflict_list_cnt, conflict_list_free): New variables.
3812 (table_grow): Also grow conflict_table.
e0e5bf84 3813 (prepare_rules): Output dprec and merger tables.
676385e2 3814 (conflict_row): New function.
e0e5bf84 3815 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
3816 default reduction in conflicted states for GLR parser so that there
3817 are spaces for the conflict lists.
3818 (save_row): Also save conflict information.
3819 (token_actions): Allocate conflict list.
3820 (merger_output): New function.
3821 (pack_vector): Pack conflict table, too.
3822 (output_conflicts): New function to output yyconflp and yyconfl.
3823 (output_check): Allocate conflict_tos.
3824 (output_actions): Output conflict tables, also.
3825 (output_skeleton): Output b4_mergers definition.
3826 (prepare): Output b4_max_rhs_length definition.
3827 Use 'bison.glr' as default skeleton for GLR parsers.
3828
3829 * src/gram.c (glr_parser): New flag.
3830 (grammar_free): Call free_merger_functions.
3831
3832 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3833 all pairs of conflicting reductions, rather than just all tokens
3834 causing conflicts. Needed to size conflict tables.
e0e5bf84 3835 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
3836 interface.
3837 (conflicts_print): Ditto.
3838 (count_total_conflicts): New function.
3839
3840 * src/reader.h (merger_list): New type.
3841 (merge_functions): New variable.
3842
3843 * src/lex.h (tok_dprec, tok_merge): New token types.
3844
3845 * src/gram.h (rule_s): Add dprec and merger fields.
3846 (glr_parser): New flag.
3847
3848 * src/conflicts.h (count_total_conflicts): New function.
3849
3850 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3851
3852 * doc/bison.texinfo (Generalized LR Parsing): New section.
3853 (GLR Parsers): New section.
3854 (Language and Grammar): Mention GLR parsing.
3855 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3856 Correct typo ("tge" -> "the").
3857
3858 * data/bison.glr: New skeleton for GLR parsing.
3859
3860 * tests/cxx-gram.at: New tests for GLR parsing.
3861
3862 * tests/testsuite.at: Include cxx-gram.at.
3863
3864 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 3865
676385e2
PH
3866 * src/parse-gram.y:
3867
3868 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3869
3870 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 3871
b5480d74 38722002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
3873
3874 * src/options.h, src/options.c: Remove.
3875 * src/getargs.c (short_options, long_options): New.
3876
60491a94
AD
38772002-06-27 Akim Demaille <akim@epita.fr>
3878
3879 * data/bison.simple, data/bison.c++: Rename as...
3880 * data/yacc.c, data/lalr1.cc: these.
3881 * doc/bison.texinfo (Environment Variables): Remove.
3882
9be0c25b
AD
38832002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3884
3885 * src/getargs.c (report_argmatch): Initialize strtok().
3886
1ae72863
AD
38872002-06-20 Akim Demaille <akim@epita.fr>
3888
3889 * data/bison.simple (b4_symbol_actions): New, replaces...
3890 (b4_symbol_destructor, b4_symbol_printer): these.
3891 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3892 user token numbers.
3893
87542d29
AD
38942002-06-20 Akim Demaille <akim@epita.fr>
3895
3896 * data/bison.simple (yydestructor): Rename as...
3897 (yydestruct): this.
3898
1a31ed21
AD
38992002-06-20 Akim Demaille <akim@epita.fr>
3900
3901 * src/symtab.h, src/symtab.c (symbol_type_set)
3902 (symbol_destructor_set, symbol_precedence_set): The location is
3903 the last argument.
3904 Adjust all callers.
3905
e776192e
AD
39062002-06-20 Akim Demaille <akim@epita.fr>
3907
3908 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3909 internals.
3910 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3911 Takes a location.
3912 * src/symtab.h, src/symtab.c (symbol_class_set)
3913 (symbol_user_token_number_set): Likewise.
3914 Adjust all callers.
3915 Promote complain_at.
3916 * tests/input.at (Type Clashes): Adjust.
3917
5c1180b3
AD
39182002-06-20 Akim Demaille <akim@epita.fr>
3919
3920 * data/bison.simple (YYLEX): Fix the declaration when
3921 %pure-parser.
3922
e3170060
AD
39232002-06-20 Akim Demaille <akim@epita.fr>
3924
3925 * data/bison.simple (yysymprint): Don't print the token number,
3926 just its name.
3927 * tests/actions.at (Destructors): Rename as...
3928 (Printers and Destructors): this.
3929 Also exercise %printer.
3930
253862fd
AD
39312002-06-20 Akim Demaille <akim@epita.fr>
3932
3933 * data/bison.simple (YYDSYMPRINT): New.
3934 Use it to remove many of the #if YYDEBUG/if (yydebug).
3935
366eea36
AD
39362002-06-20 Akim Demaille <akim@epita.fr>
3937
3938 * src/symtab.h, src/symtab.c (symbol_t): printer and
3939 printer_location are new members.
3940 (symbol_printer_set): New.
3941 * src/parse-gram.y (PERCENT_PRINTER): New token.
3942 Handle its associated rule.
3943 * src/scan-gram.l: Adjust.
3944 (handle_destructor_at, handle_destructor_dollar): Rename as...
3945 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3946 * src/output.c (symbol_printers_output): New.
3947 (output_skeleton): Call it.
3948 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3949 since there are already many grammar files with a user `yyprint'.
3950 Replace the calls to YYPRINT to calls to yysymprint.
3951 * tests/calc.at: Adjust.
3952 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3953 taking advantage of parser very internal details (stack size!).
3954
4f25ebb0
AD
39552002-06-20 Akim Demaille <akim@epita.fr>
3956
3957 * src/scan-gram.l: Complete the scanner with the missing patterns
3958 to pacify Flex.
3959 Use `quote' and `symbol_tag_get' where appropriate.
3960
93b68a0e
AD
39612002-06-19 Akim Demaille <akim@epita.fr>
3962
3963 * tests/actions.at (Destructors): Augment to test locations.
3964 * data/bison.simple (yydestructor): Pass it the current location
3965 if locations are enabled.
3966 Prototype only when __STDC__ or C++.
3967 Change the argument names to move into the yy name space: there is
3968 user code here.
3969
58612f1d
AD
39702002-06-19 Akim Demaille <akim@epita.fr>
3971
74310291
AD
3972 * data/bison.simple (b4_pure_if): New.
3973 Use it instead of #ifdef YYPURE.
3974
39752002-06-19 Akim Demaille <akim@epita.fr>
3976
3977 * data/bison.simple (b4_location_if): New.
58612f1d
AD
3978 Use it instead of #ifdef YYLSP_NEEDED.
3979
f25bfb75
AD
39802002-06-19 Akim Demaille <akim@epita.fr>
3981
3982 Prepare @$ in %destructor, but currently don't bind it in the
3983 skeleton, as %location use is not cleaned up yet.
3984
3985 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3986 (handle_action_at): New.
3987 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3988 a braced_code_t and a location as additional arguments.
3989 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3990 unquote one when outputting `b4_dollar_dollar'.
3991 Adjust callers.
3992 * data/bison.simple (b4_eval): Remove.
3993 (b4_symbol_destructor): Adjust.
3994 * tests/input.at (Invalid @n): Adjust.
3995
c732d2c6
AD
39962002-06-19 Zack Weinberg <zack@codesourcery.com>
3997
3998 * doc/bison.texinfo: Document ability to have multiple
3999 prologue sections.
4000
8c165d89
AD
40012002-06-18 Akim Demaille <akim@epita.fr>
4002
4003 * src/files.c (compute_base_names): When computing the output file
4004 names from the input file name, strip the directory part.
4005
ca98bf57
AD
40062002-06-18 Akim Demaille <akim@epita.fr>
4007
4008 * data/bison.simple.new: Comment changes.
4009 Reported by Andreas Schwab.
4010
0bfb02ff
AD
40112002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4012
4013 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4014 there are no `label `yyoverflowlab' defined but not used' warnings
4015 when yyoverflow is defined.
4016
24c0aad7
AD
40172002-06-18 Akim Demaille <akim@epita.fr>
4018
4019 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4020 new member.
4021 (symbol_destructor_set): Adjust.
4022 * src/output.c (symbol_destructors_output): Output the destructor
4023 locations.
4024 Output the symbol name.
4025 * data/bison.simple (b4_symbol_destructor): Adjust.
4026
5719c109
AD
40272002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4028 and Akim Demaille <akim@epita.fr>
4029
4030 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4031 what's left on the stack when the error recovery hits EOF.
4032 * tests/actions.at (Destructors): Complete to exercise this case.
4033
9280d3ef
AD
40342002-06-17 Akim Demaille <akim@epita.fr>
4035
4036 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4037 arguments is really empty, not only equal to `[]'.
4038 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4039 member.
4040 (symbol_destructor_set): New.
4041 * src/output.c (symbol_destructors_output): New.
4042 * src/reader.h (brace_code_t, current_braced_code): New.
4043 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4044 (handle_dollar): Rename as...
4045 (handle_action_dollar): this.
4046 (handle_destructor_dollar): New.
4047 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4048 (grammar_declaration): Use it.
4049 * data/bison.simple (yystos): Is always defined.
4050 (yydestructor): New.
4051 * tests/actions.at (Destructors): New.
4052 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4053
dafdc66f
AD
40542002-06-17 Akim Demaille <akim@epita.fr>
4055
4056 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4057 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4058 rule_length only when needed.
4059 * src/output.c (actions_output, token_definitions_output): Output
4060 the full M4 block.
4061 * src/symtab.c: Don't access directly to the symbol tag, use
4062 symbol_tag_get.
4063 * src/parse-gram.y: Use symbol_list_free.
4064
56c47203
AD
40652002-06-17 Akim Demaille <akim@epita.fr>
4066
4067 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4068 (symbol_list_prepend, get_type_name): Move to...
4069 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4070 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4071 Adjust all callers.
4072 (symbol_list_free): New.
4073 * src/scan-gram.l (handle_dollar): Takes a location.
4074 * tests/input.at (Invalid $n): Adjust.
4075
1e0bab92
AD
40762002-06-17 Akim Demaille <akim@epita.fr>
4077
4078 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4079 (symbol_list_prepend): New.
4080 * src/parse-gram.y (%union): `list' is a new member.
4081 (symbols.1): New, replaces...
4082 (terms_to_prec.1, nterms_to_type.1): these.
4083 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4084 Take a location as additional argument.
4085 Adjust all callers.
4086
04e60654
AD
40872002-06-15 Akim Demaille <akim@epita.fr>
4088
4089 * src/parse-gram.y: Move %token in the declaration section so that
4090 we don't depend upon CVS Bison.
4091
10e5b8bd
AD
40922002-06-15 Akim Demaille <akim@epita.fr>
4093
4094 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4095 * src/print.c (print_core): Use it.
4096
9801d40c
AD
40972002-06-15 Akim Demaille <akim@epita.fr>
4098
4099 * src/conflicts.c (log_resolution): Accept the rule involved in
4100 the sr conflicts instead of the lookahead number that points to
4101 that rule.
4102 (flush_reduce): Accept the current lookahead vector as argument,
4103 instead of the index in LA.
4104 (resolve_sr_conflict): Accept the current number of lookahead
4105 bitset to consider for the STATE, instead of the index in LA.
4106 (set_conflicts): Adjust.
4107 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4108
c0263492
AD
41092002-06-15 Akim Demaille <akim@epita.fr>
4110
4111 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4112 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4113 Adjust all dependencies.
4114 * src/lalr.c (initialize_lookaheads): Split into...
4115 (states_lookaheads_count, states_lookaheads_initialize): these.
4116 (lalr): Adjust.
4117
9757c359
AD
41182002-06-15 Akim Demaille <akim@epita.fr>
4119
4120 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4121 out of...
4122 (grammar_rules_print): here.
4123 * src/reduce.c (reduce_output): Use it.
4124 * tests/reduce.at (Useless Rules, Reduced Automaton)
4125 (Underivable Rules): Adjust.
4126
6b98e4b5
AD
41272002-06-15 Akim Demaille <akim@epita.fr>
4128
4129 Copy BYacc's nice way to report the grammar.
4130
4131 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4132 New.
4133 Don't print the rules' location, it is confusing and useless.
4134 (rule_print): Use grammar_rhs_print.
4135 * src/print.c (print_grammar): Use grammar_rules_print.
4136
6b98e4b5
AD
41372002-06-15 Akim Demaille <akim@epita.fr>
4138
4139 Complete and rationalize `useless thing' warnings.
4140
4141 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4142 (symbol_tag_print): New.
4143 Use them everywhere in place of accessing directly the tag member.
4144 * src/gram.h, src/gram.c (rule_print): New.
4145 Use it where a rule used to be printed `by hand'.
4146 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4147 (reduce_grammar_tables): Report the useless rules.
4148 (reduce_print): Useless things are a warning, not an error.
4149 Report it as such.
4150 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4151 (Reduced Automaton, Underivable Rules): Adjust.
4152 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4153 * tests/conflicts.at (Unresolved SR Conflicts)
4154 (Solved SR Conflicts): Adjust.
4155
ee000ba4
AD
41562002-06-15 Akim Demaille <akim@epita.fr>
4157
4158 Let symbols have a location.
4159
4160 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4161 (getsym): Adjust.
4162 Adjust all callers.
4163 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4164 Use location_t, not int.
4165 * src/symtab.c (symbol_check_defined): Take advantage of the
4166 location.
4167 * tests/regression.at (Invalid inputs): Adjust.
4168
8efe435c
AD
41692002-06-15 Akim Demaille <akim@epita.fr>
4170
4171 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4172 (input): Don't try to initialize yylloc here, do it in the
4173 scanner.
4174 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4175 * src/gram.h (rule_t): Change line and action_line into location
4176 and action_location, of location_t type.
4177 Adjust all dependencies.
4178 * src/location.h, src/location.c (empty_location): New.
4179 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4180 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4181 (grammar_current_rule_symbol_append)
4182 (grammar_current_rule_action_append): Expect a location as argument.
4183 * src/reader.c (grammar_midrule_action): Adjust to attach an
4184 action's location as dummy symbol location.
4185 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4186 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4187 the line numbers.
4188
1921f1d7
AD
41892002-06-14 Akim Demaille <akim@epita.fr>
4190
4191 Grammar declarations may be found in the grammar section.
4192
4193 * src/parse-gram.y (rules_or_grammar_declaration): New.
4194 (declarations): Each declaration may end with a semicolon, not
4195 just...
4196 (grammar_declaration): `"%union"'.
4197 (grammar): Branch to rules_or_grammar_declaration.
4198
4515534c
AD
41992002-06-14 Akim Demaille <akim@epita.fr>
4200
4201 * src/main.c (main): Invoke scanner_free.
4202
f958596b
AD
42032002-06-14 Akim Demaille <akim@epita.fr>
4204
4205 * src/output.c (m4_invoke): Extracted from...
4206 (output_skeleton): here.
4207 Free tempfile.
4208
2c569025
AD
42092002-06-14 Akim Demaille <akim@epita.fr>
4210
4211 * src/parse-gram.y (directives, directive, gram)
4212 (grammar_directives, precedence_directives, precedence_directive):
4213 Rename as...
4214 (declarations, declaration, grammar, grammar_declaration)
4215 (precedence_declaration, precedence_declarator): these.
4216 (symbol_declaration): New.
4217
592e8d4d
AD
42182002-06-14 Akim Demaille <akim@epita.fr>
4219
4220 * src/files.c (action_obstack): Remove, unused.
4221 (output_obstack): Remove it, and all its dependencies, as it is no
4222 longer needed.
4223 * src/reader.c (epilogue_set): Build the epilogue in the
4224 muscle_obstack.
4225 * src/output.h, src/output.c (muscle_obstack): Move to...
4226 * src/muscle_tab.h, src/muscle_tab.h: here.
4227 (muscle_init): Initialize muscle_obstack.
4228 (muscle_free): New.
4229 * src/main.c (main): Call it.
4230
0c15323d
AD
42312002-06-14 Akim Demaille <akim@epita.fr>
4232
4233 * src/location.h: New, extracted from...
4234 * src/reader.h: here.
4235 * src/Makefile.am (noinst_HEADERS): Merge into
4236 (bison_SOURCES): this.
4237 Add location.h.
4238 * src/parse-gram.y: Use location_t instead of Bison's.
4239 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4240 Use location_t instead of ints.
4241
e96c9728
AD
42422002-06-14 Akim Demaille <akim@epita.fr>
4243
4244 * data/bison.simple, data/bison.c++: Be sure to restore the
4245 current #line when returning to the skeleton contents after having
4246 exposed the input file's #line.
4247
75d1fe16
AD
42482002-06-12 Akim Demaille <akim@epita.fr>
4249
4250 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4251 eager.
4252 * tests/actions.at (Exotic Dollars): New.
4253
6c35d22c
AD
42542002-06-12 Akim Demaille <akim@epita.fr>
4255
4256 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4257 ['"/] too eagerly.
4258 * tests/input.at (Torturing the Scanner): New.
4259
1d6412ad
AD
42602002-06-11 Akim Demaille <akim@epita.fr>
4261
4262 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4263 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4264 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4265 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4266 * src/reader.c (reader): Use it.
4267
4cdb01db
AD
42682002-06-11 Akim Demaille <akim@epita.fr>
4269
4270 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4271 Adjust all callers.
4272 (scanner_last_string_free): New.
4273
44995b2e
AD
42742002-06-11 Akim Demaille <akim@epita.fr>
4275
4276 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4277 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4278 (last_string, YY_OBS_FREE): New.
4279 Use them when returning an ID.
4280
e9955c83
AD
42812002-06-11 Akim Demaille <akim@epita.fr>
4282
4283 Have Bison grammars parsed by a Bison grammar.
4284
4285 * src/reader.c, src/reader.h (prologue_augment): New.
4286 * src/reader.c (copy_definition): Remove.
4287
4288 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4289 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4290 (grammar_current_rule_prec_set, grammar_current_rule_check)
4291 (grammar_current_rule_symbol_append)
4292 (grammar_current_rule_action_append): Export.
4293 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4294 (symbol_list_action_append): Remove.
4295 Hook the routines from reader.
4296 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4297 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4298
4299 * src/reader.c (read_declarations): Remove, unused.
4300
4301 * src/parse-gram.y: Handle the epilogue.
4302 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4303 (grammar_start_symbol_set): this.
4304 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4305 * src/reader.c (readgram): Remove, unused.
4306 (reader): Adjust to insert eoftoken and axiom where appropriate.
4307
4308 * src/reader.c (copy_dollar): Replace with...
4309 * src/scan-gram.h (handle_dollar): this.
4310 * src/parse-gram.y: Remove `%thong'.
4311
4312 * src/reader.c (copy_at): Replace with...
4313 * src/scan-gram.h (handle_at): this.
4314
4315 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4316 New.
4317
4318 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4319 time being.
4320
4321 * src/reader.h, src/reader.c (grammar_rule_end): New.
4322
4323 * src/parse.y (current_type, current_class): New.
4324 Implement `%nterm', `%token' support.
4325 Merge `%term' into `%token'.
4326 (string_as_id): New.
4327 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4328 type name.
4329
4330 * src/parse-gram.y: Be sure to handle properly the beginning of
4331 rules.
4332
4333 * src/parse-gram.y: Handle %type.
4334 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4335
4336 * src/parse-gram.y: More directives support.
4337 * src/options.c: No longer handle source directives.
4338
4339 * src/parse-gram.y: Fix %output.
4340
4341 * src/parse-gram.y: Handle %union.
4342 Use the prologue locations.
4343 * src/reader.c (parse_union_decl): Remove.
4344
4345 * src/reader.h, src/reader.c (epilogue_set): New.
4346 * src/parse-gram.y: Use it.
4347
4348 * data/bison.simple, data/bison.c++: b4_stype is now either not
4349 defined, then default to int, or to the contents of %union,
4350 without `union' itself.
4351 Adjust.
4352 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4353
4354 * src/output.c (actions_output): Don't output braces, as they are
4355 already handled by the scanner.
4356
4357 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4358 characters to themselves.
4359
4360 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4361 that the epilogue has a proper #line.
4362
4363 * src/parse-gram.y: Handle precedence/associativity.
4364
4365 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4366 a terminal.
4367 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4368 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4369 at all to define terminals that cannot be emitted.
4370
4371 * src/scan-gram.l: Escape M4 characters.
4372
4373 * src/scan-gram.l: Working properly with escapes in user
4374 strings/characters.
4375
4376 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4377 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4378 grammar.
4379 Use more modest sizes, as for the time being the parser does not
4380 release memory, and therefore the process swallows a huge amount
4381 of memory.
4382
4383 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4384 stricter %token grammar.
4385
4386 * src/symtab.h (associativity): Add `undef_assoc'.
4387 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4388 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4389
4390 * tests/regression.at (Invalid %directive): Remove, as it is now
4391 meaningless.
4392 (Invalid inputs): Adjust to the new error messages.
4393 (Token definitions): The new grammar doesn't allow too many
4394 eccentricities.
4395
4396 * src/lex.h, src/lex.c: Remove.
4397 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4398 (copy_character, copy_string2, copy_string, copy_identifier)
4399 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4400 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4401 (parse_action): Remove.
4402 * po/POTFILES.in: Adjust.
4403
2e047461
AD
44042002-06-11 Akim Demaille <akim@epita.fr>
4405
4406 * src/reader.c (parse_action): Don't store directly into the
4407 rule's action member: return the action as a string.
4408 Don't require `rule_length' as an argument: compute it.
4409 (grammar_current_rule_symbol_append)
4410 (grammar_current_rule_action_append): New, eved out from
4411 (readgram): here.
4412 Remove `action_flag', `rulelength', unused now.
4413
9af3fbce
AD
44142002-06-11 Akim Demaille <akim@epita.fr>
4415
4416 * src/reader.c (grammar_current_rule_prec_set).
4417 (grammar_current_rule_check): New, eved out from...
4418 (readgram): here.
4419 Remove `xaction', `first_rhs': useless.
4420 * tests/input.at (Type clashes): New.
4421 * tests/existing.at (GNU Cim Grammar): Adjust.
4422
1485e106
AD
44232002-06-11 Akim Demaille <akim@epita.fr>
4424
4425 * src/reader.c (grammar_midrule_action): New, Eved out from
4426 (readgram): here.
4427
da4160c3
AD
44282002-06-11 Akim Demaille <akim@epita.fr>
4429
4430 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4431 New.
4432 (readgram): Use them as replacement of inlined code, crule and
4433 crule1.
4434
f6d0f937
AD
44352002-06-11 Akim Demaille <akim@epita.fr>
4436
4437 * src/reader.c (grammar_end, grammar_symbol_append): New.
4438 (readgram): Use them.
4439 Make the use of `p' as local as possible.
4440
69078d4b
AD
44412002-06-10 Akim Demaille <akim@epita.fr>
4442
4443 GCJ's parser requires the tokens to be defined before the prologue.
4444
4445 * data/bison.simple: Output the token definition before the user's
4446 prologue.
4447 * tests/regression.at (Braces parsing, Duplicate string)
4448 (Mixing %token styles): Check the output from bison.
4449 (Early token definitions): New.
4450
5e424082
AD
44512002-06-10 Akim Demaille <akim@epita.fr>
4452
4453 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4454 assigning twice the same user number to a token, so that we can
4455 use it in...
4456 * src/lex.c (lex): here.
4457 Also use `symbol_class_set' instead of hand written code.
4458 * src/reader.c (parse_assoc_decl): Likewise.
4459
44536b35
AD
44602002-06-10 Akim Demaille <akim@epita.fr>
4461
4462 * src/symtab.c, src/symtab.c (symbol_class_set)
4463 (symbol_user_token_number_set): New.
4464 * src/reader.c (parse_token_decl): Use them.
4465 Use a switch instead of ifs.
4466 Use a single argument.
4467
8b9f2372
AD
44682002-06-10 Akim Demaille <akim@epita.fr>
4469
4470 Remove `%thong' support as it is undocumented, unused, duplicates
4471 `%token's job, and creates useless e-mail traffic with people who
4472 want to know what it is, why it is undocumented, unused, and
4473 duplicates `%token's job.
4474
4475 * src/reader.c (parse_thong_decl): Remove.
4476 * src/options.c (option_table): Remove "thong".
4477 * src/lex.h (tok_thong): Remove.
4478
3ae2b51f
AD
44792002-06-10 Akim Demaille <akim@epita.fr>
4480
4481 * src/symtab.c, src/symtab.c (symbol_type_set)
4482 (symbol_precedence_set): New.
4483 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4484 (value_components_used): Remove, unused.
4485
2f1afb73
AD
44862002-06-09 Akim Demaille <akim@epita.fr>
4487
4488 Move symbols handling code out of the reader.
4489
4490 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4491 (axiom): Move to...
4492 * src/symtab.h, src/symtab.c: here.
4493
4494 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4495 * src/reader.c (startval): Rename as...
4496 * src/symtab.h, src/symtab.c (startsymbol): this.
4497 * src/reader.c: Adjust.
4498
4499 * src/reader.c (symbol_check_defined, symbol_make_alias)
4500 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4501 (token_translations_init)
4502 Move to...
4503 * src/symtab.c: here.
4504 * src/reader.c (packsymbols): Move to...
4505 * src/symtab.h, src/symtab.c (symbols_pack): here.
4506 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4507 argument.
4508
e9bca3ad
AD
45092002-06-03 Akim Demaille <akim@epita.fr>
4510
4511 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4512 then statements.
4513
86eff183
AD
45142002-06-03 Akim Demaille <akim@epita.fr>
4515
4516 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4517 structs with non literals.
4518 * src/scan-skel.l: never-interactive.
4519 * src/conflicts.c (enum conflict_resolution_e): No trailing
4520 comma.
4521 * src/getargs.c (usage): Split long literal strings.
4522 Reported by Hans Aberg.
4523
717be197
AD
45242002-05-28 Akim Demaille <akim@epita.fr>
4525
4526 * data/bison.c++: Use C++ ostreams.
4527 (cdebug_): New member.
4528
670ddffd
AD
45292002-05-28 Akim Demaille <akim@epita.fr>
4530
4531 * src/output.c (output_skeleton): Be sure to allocate enough room
4532 for `/' _and_ for `\0' in full_skeleton.
4533
769b430f
AD
45342002-05-28 Akim Demaille <akim@epita.fr>
4535
4536 * data/bison.c++: Catch up with bison.simple:
4537 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4538 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4539 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4540 and popping traces.
4541
7067cb36
PH
45422002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4543
4544 * src/output.c (output_skeleton): Put an explicit path in front of
4545 the skeleton file name, rather than relying on the -I directory,
4546 to partially alleviate effects of having a skeleton file lying around
4547 in the current directory.
769b430f 4548
4a713ec2
PH
45492002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4550
769b430f 4551 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
4552 obstack_printf should be obstack_fgrow1.
4553
b408954b
AD
45542002-05-26 Akim Demaille <akim@epita.fr>
4555
4556 * src/state.h (state_t): `solved_conflicts' is a new member.
4557 * src/LR0.c (new_state): Set it to 0.
4558 * src/conflicts.h, src/conflicts.c (print_conflicts)
4559 (free_conflicts, solve_conflicts): Rename as...
4560 (conflicts_print, conflicts_free, conflicts_solve): these.
4561 Adjust callers.
4562 * src/conflicts.c (enum conflict_resolution_e)
4563 (solved_conflicts_obstack): New, used by...
4564 (log_resolution): this.
4565 Adjust to attach the conflict resolution to each state.
4566 Complete the description with the precedence/associativity
4567 information.
4568 (resolve_sr_conflict): Adjust.
4569 * src/print.c (print_state): Output its solved_conflicts.
4570 * tests/conflicts.at (Unresolved SR Conflicts)
4571 (Solved SR Conflicts): Exercise --report=all.
4572
a49aecd5
AD
45732002-05-26 Akim Demaille <akim@epita.fr>
4574
4575 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4576 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4577 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4578 (token_number_t, item_number_as_token_number)
4579 (token_number_as_item_number, muscle_insert_token_number_table):
4580 Rename as...
4581 (symbol_number_t, item_number_as_symbol_number)
4582 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4583 these, since it is more appropriate.
4584
5504898e
AD
45852002-05-26 Akim Demaille <akim@epita.fr>
4586
4587 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4588 `Error:' lines.
4589 * data/bison.simple (yystos) [YYDEBUG]: New.
4590 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4591 error recovery.
4592 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4593
ec3bc396
AD
45942002-05-25 Akim Demaille <akim@epita.fr>
4595
4596 * doc/bison.texinfo (Debugging): Split into...
4597 (Tracing): this new section, its former contents, and...
4598 (Understanding): this new section.
4599 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4600 by...
4601 (report_flag): this.
4602 Adjust all dependencies.
4603 (report_args, report_types, report_argmatch): New.
4604 (usage, getargs): Report/support -r, --report.
4605 * src/options.h
4606 (struct option_table_struct): Rename as..,
4607 (struct option_table_s): this.
4608 Rename the `set_flag' member to `flag' to match with getopt_long's
4609 struct.
4610 * src/options.c (option_table): Split verbose into an entry for
4611 %verbose, and another for --verbose.
4612 Support --report/-r, so remove -r from the obsolete --raw.
4613 * src/print.c: Attach full item sets and lookaheads reports to
4614 report_flag instead of trace_flag.
4615 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4616
78df8250
PE
46172002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4618 and Paul Eggert <eggert@twinsun.com>
769b430f 4619
78df8250
PE
4620 * data/bison.simple (yyparse): Correct error handling to conform to
4621 POSIX and yacc. Specifically, after syntax error is discovered,
4622 do not reduce further before shifting the error token.
4623 Clean up the code a bit by removing the labels yyerrdefault,
4624 yyerrhandle, yyerrpop.
4625 * NEWS: Document the above.
4626
c0c9ea05
PH
46272002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4628
4629 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4630 type; it isn't always big enough, since it doesn't necessarily
4631 include non-terminals.
769b430f 4632 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
4633 the latter can be removed.
4634 (yy_token_number_type): Remove, only one use.
4635 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4636 don't use TokenNumberType as element type.
769b430f 4637
c0c9ea05
PH
4638 * tests/regression.at: Modify expected output to agree with change
4639 to yyr1 and yytranslate.
769b430f 4640
6390a83f
FK
46412002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4642
4643 * src/reader.c (parse_action): Use copy_character instead of
4644 obstack_1grow.
4645
db7c8e9a
AD
46462002-05-13 Akim Demaille <akim@epita.fr>
4647
4648 * tests/regression.at (Token definitions): Prototype yylex and
4649 yyerror.
4650
fcc61800
PH
46512002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4652
158c687b 4653 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
4654 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4655 32-bit arithmetic.
4656 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4657
5683e9b2
AD
46582002-05-07 Akim Demaille <akim@epita.fr>
4659
4660 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4661 avoid GCC warnings.
4662
0c2d3f4c
AD
46632002-05-07 Akim Demaille <akim@epita.fr>
4664
4665 Kill GCC warnings.
4666
4667 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4668 over the RHS of each rule.
4669 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4670 * src/state.h (state_t): Member `nitems' is unsigned short.
4671 * src/LR0.c (get_state): Adjust.
4672 * src/reader.c (packgram): Likewise.
4673 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4674 `Type'.
4675 (muscle_insert_int_table): Remove, unused.
4676 (prepare_rules): Remove `max'.
4677
1565b720
AD
46782002-05-06 Akim Demaille <akim@epita.fr>
4679
4680 * src/closure.c (print_firsts): Display of the symbol tags.
4681 (bitmatrix_print): Move to...
4682 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4683 here.
4684 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4685
cfaee611
AD
46862002-05-06 Akim Demaille <akim@epita.fr>
4687
4688 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4689 hash_do_for_each.
4690
458be8e0
AD
46912002-05-06 Akim Demaille <akim@epita.fr>
4692
4693 * src/LR0.c (new_state, get_state): Instead of using the global
4694 `kernel_size' and `kernel_base', have two new arguments:
4695 `core_size' and `core'.
4696 Adjust callers.
4697
a900a624
AD
46982002-05-06 Akim Demaille <akim@epita.fr>
4699
4700 * src/reader.c (packgram): No longer end `ritem' with a 0
4701 sentinel: it is not used.
4702
d4e7d3a1
AD
47032002-05-05 Akim Demaille <akim@epita.fr>
4704
4705 New experimental feature: display the lookaheads in the report and
4706 graph.
4707
4708 * src/print (print_core): When --trace-flag, display the rules
4709 lookaheads.
4710 * src/print_graph.c (print_core): Likewise.
4711 Swap the arguments.
4712 Adjust caller.
4713
39ceb25b
AD
47142002-05-05 Akim Demaille <akim@epita.fr>
4715
4716 * tests/torture.at (Many lookaheads): New test.
4717
5372019f
AD
47182002-05-05 Akim Demaille <akim@epita.fr>
4719
4720 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4721 (GENERATE_MUSCLE_INSERT_TABLE): this.
4722 (output_int_table, output_unsigned_int_table, output_short_table)
4723 (output_token_number_table, output_item_number_table): Replace with...
4724 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4725 (muscle_insert_short_table, muscle_insert_token_number_table)
4726 (muscle_insert_item_number_table): these.
4727 Adjust all callers.
4728 (prepare_tokens): Don't free `translations', since...
4729 * src/reader.h, src/reader.c (grammar_free): do it.
4730 Move to...
4731 * src/gram.h, src/gram.c (grammar_free): here.
4732 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4733 b4_translate_max.
4734
5df5f6d5
AD
47352002-05-05 Akim Demaille <akim@epita.fr>
4736
4737 * src/output.c (output_unsigned_int_table): New.
4738 (prepare_rules): `i' is unsigned.
4739 `prhs', `rline', `r2' are unsigned int.
4740 Rename muscle `rhs_number_max' as `rhs_max'.
4741 Output muscles `prhs_max', `rline_max', and `r2_max'.
4742 Free rline and r1.
4743 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4744 to compute types instead of constant types.
4745 * tests/regression.at (Web2c Actions): Adjust.
4746
b87f8b21
AD
47472002-05-04 Akim Demaille <akim@epita.fr>
4748
4749 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4750 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4751 Adjust dependencies.
4752 * src/output.c (token_definitions_output): Be sure not to output a
4753 `#define 'a'' when fed with `%token 'a' "a"'.
4754 * tests/regression.at (Token definitions): New.
4755
8bb936e4
PE
47562002-05-03 Paul Eggert <eggert@twinsun.com>
4757
4758 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4759 for K&R C.
4760
47612002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4762
4763 * Makefile.am (SUBDIRS): Remove intl.
4764 (EXTRA_DIST): Add config/config.rpath.
4765
53c71a12
AD
47662002-05-03 Akim Demaille <akim@epita.fr>
4767
4768 * data/bison.simple (m4_if): Don't output empty enums.
4769 And actually, output valid enum definitions :(.
4770
289dd0cf
AD
47712002-05-03 Akim Demaille <akim@epita.fr>
4772
4773 * configure.bat: Remove, completely obsolete.
4774 * Makefile.am (EXTRA_DIST): Adjust.
4775 Don't distribute config.rpath...
4776 * config/Makefile.am (EXTRA_DIST): Do it.
4777
db85e524
AD
47782002-05-03 Akim Demaille <akim@epita.fr>
4779
4780 * configure.in (GETTEXT_VERSION): New.
4781 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4782
83ccf991
AD
47832002-05-03 Akim Demaille <akim@epita.fr>
4784
4785 * data/bison.simple (b4_token_enum): New.
4786 (b4_token_defines): Use it to output tokens both as #define and
4787 enums.
4788 Suggested by Paul Eggert.
4789 * src/output.c (token_definitions_output): Don't output spurious
4790 white spaces.
4791
1f418995
AD
47922002-05-03 Akim Demaille <akim@epita.fr>
4793
4794 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4795
45119f04
RA
47962002-05-02 Robert Anisko <robert@lrde.epita.fr>
4797
4798 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4799 Update the stack class, give a try to deque as the default container.
4800
b2d52318
AD
48012002-05-02 Akim Demaille <akim@epita.fr>
4802
4803 * data/bison.simple (yyparse): Do not implement @$ = @1.
4804 (YYLLOC_DEFAULT): Adjust to do it.
4805 * doc/bison.texinfo (Location Default Action): Fix.
4806
3a8b4109
AD
48072002-05-02 Akim Demaille <akim@epita.fr>
4808
4809 * src/reader.c (parse_braces): Merge into...
4810 (parse_action): this.
4811
84614e13
AD
48122002-05-02 Akim Demaille <akim@epita.fr>
4813
4814 * configure.in (ALL_LINGUAS): Remove.
4815 * po/LINGUAS, hr.po: New.
4816
fdbcd8e2
AD
48172002-05-02 Akim Demaille <akim@epita.fr>
4818
4819 Remove the so called hairy (semantic) parsers.
4820
4821 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4822 * src/gram.h, src/gram.c (semantic_parser): Remove.
4823 (rule_t): Remove the guard and guard_line members.
4824 * src/lex.h (token_t): remove tok_guard.
4825 * src/options.c (option_table): Remove %guard and %semantic_parser
4826 support.
4827 * src/output.c, src/output.h (guards_output): Remove.
4828 (prepare): Adjust.
4829 (token_definitions_output): Don't output the `T'
4830 tokens (???).
4831 (output_skeleton): Don't output the guards.
4832 * src/files.c, src/files.c (attrsfile): Remove.
4833 * src/reader.c (symbol_list): Remove the guard and guard_line
4834 members.
4835 Adjust dependencies.
4836 (parse_guard): Remove.
4837 * data/bison.hairy: Remove.
4838 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4839 BISON_HAIRY.
4840
82b6cb3f
AD
48412002-05-02 Akim Demaille <akim@epita.fr>
4842
4843 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4844 (parse_guard): Rename the formal argument `stack_offset' as
4845 `rule_length', which is more readable.
4846 Adjust callers.
4847 (copy_at, copy_dollar): Instead of outputting the hard coded
4848 values of $$, $n and so forth, output invocation to b4_lhs_value,
4849 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
4850 Note: this patch partially drops `semantic-parser' support: it
4851 always does `rule_length - n', where semantic parsers ought to
4852 always use `-n'.
82b6cb3f
AD
4853 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4854 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4855
6cbfbcc5
AD
48562002-05-02 Akim Demaille <akim@epita.fr>
4857
4858 * configure.in (AC_INIT): Bump to 1.49b.
4859 (AM_INIT_AUTOMAKE): Short invocation.
4860
b8548114
AD
48612002-05-02 Akim Demaille <akim@epita.fr>
4862
4863 Version 1.49a.
4864
c20cd1fa
AD
48652002-05-01 Akim Demaille <akim@epita.fr>
4866
4867 * src/skeleton.h: Remove.
4868
8a9566d4
AD
48692002-05-01 Akim Demaille <akim@epita.fr>
4870
4871 * src/skeleton.h: Fix the #endif.
4872 Reported by Magnus Fromreide.
4873
8c6d399a
PE
48742002-04-26 Paul Eggert <eggert@twinsun.com>
4875
4876 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4877 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 4878 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 4879
2b7ed18a
RA
48802002-04-25 Robert Anisko <robert@lrde.epita.fr>
4881
4882 * src/scan-skel.l: Postprocess quadrigraphs.
4883
4884 * src/reader.c (copy_character): New function, used to output
4885 single characters while replacing `[' and `]' with quadrigraphs, to
4886 avoid troubles with M4 quotes.
4887 (copy_comment): Output characters with copy_character.
4888 (read_additionnal_code): Likewise.
4889 (copy_string2): Likewise.
4890 (copy_definition): Likewise.
4891
4892 * tests/calc.at: Exercise M4 quoting.
4893
34a89c50
AD
48942002-04-25 Akim Demaille <akim@epita.fr>
4895
4896 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4897 between `!' and the command.
4898 Reported by Paul Eggert.
4899
0dd1580a
RA
49002002-04-24 Robert Anisko <robert@lrde.epita.fr>
4901
4902 * tests/calc.at: Exercise prologue splitting.
4903
4904 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4905 `b4_post_prologue' instead of `b4_prologue'.
4906
4907 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4908 muscles.
4909 (output): Free pre_prologue_obstack and post_prologue_obstack.
4910 * src/files.h, src/files.c (attrs_obstack): Remove.
4911 (pre_prologue_obstack, post_prologue_obstack): New.
4912 * src/reader.c (copy_definition): Add a parameter to specify the
4913 obstack to fill, instead of using attrs_obstack unconditionally.
4914 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4915 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4916
83c1796f
PE
49172002-04-23 Paul Eggert <eggert@twinsun.com>
4918
4919 * data/bison.simple: Remove unnecessary commentary and white
4920 space differences from 1_29-branch.
4921 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4922
4923 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4924 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4925 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4926 constructors or destructors.
4927
4928 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4929
1207eeac
AD
49302002-04-23 Akim Demaille <akim@epita.fr>
4931
4932 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4933 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4934 location with columns.
4935 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4936 All reported by Paul Eggert.
4937
78ab8f67
AD
49382002-04-22 Akim Demaille <akim@epita.fr>
4939
4940 * src/reduce.c (dump_grammar): Move to...
4941 * src/gram.h, src/gram.c (grammar_dump): here.
4942 Be sure to separate long item numbers.
4943 Don't read the members of a rule's prec if its nil.
4944
133c20e2
AD
49452002-04-22 Akim Demaille <akim@epita.fr>
4946
4947 * src/output.c (table_size, table_grow): New.
4948 (MAXTABLE): Remove, replace uses with table_size.
4949 (pack_vector): Instead of dying when the table is too big, grow it.
4950
9515e8a7
AD
49512002-04-22 Akim Demaille <akim@epita.fr>
4952
4953 * data/bison.simple (yyr1): Its type is that of a token number.
4954 * data/bison.c++ (r1_): Likewise.
4955 * tests/regression.at (Web2c Actions): Adjust.
4956
23c5a174
AD
49572002-04-22 Akim Demaille <akim@epita.fr>
4958
4959 * src/reader.c (token_translations_init): 256 is now the default
4960 value for the error token, i.e., it will be assigned another
4961 number if the user assigned 256 to one of her tokens.
4962 (reader): Don't force 256 to error.
4963 * doc/bison.texinfo (Symbols): Adjust.
4964 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4965 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4966 etc. instead of 10, 20, 30 (which was used to `jump' over error
4967 (256) and undefined (2)).
4968
5fbb0954
AD
49692002-04-22 Akim Demaille <akim@epita.fr>
4970
4971 Propagate more token_number_t.
4972
4973 * src/gram.h (token_number_as_item_number)
4974 (item_number_as_token_number): New.
4975 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4976 Use it to create output_item_number_table and
4977 output_token_number_table.
4978 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4979 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4980 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4981 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4982
4f940944
AD
49832002-04-22 Akim Demaille <akim@epita.fr>
4984
4985 * src/output.h, src/output.c (get_lines_number): Remove.
4986
3ded9a63
AD
49872002-04-19 Akim Demaille <akim@epita.fr>
4988
4989 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4990 as Lex/Flex'.
4991 (Debugging): More details about enabling the debugging features.
4992 (Table of Symbols): Describe $$, $n, @$, and @n.
4993 Suggested by Tim Josling.
4994
e0c471a9
AD
49952002-04-19 Akim Demaille <akim@epita.fr>
4996
4997 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4998
fecc10cd
AD
49992002-04-10 Akim Demaille <akim@epita.fr>
5000
5001 * src/system.h: Rely on HAVE_LIMITS_H.
5002 Suggested by Paul Eggert.
5003
51dec47b
AD
50042002-04-09 Akim Demaille <akim@epita.fr>
5005
5006 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5007 full stderr, and strip it according to the bison options, instead
5008 of composing the error message from different bits.
5009 This makes it easier to check for several error messages.
5010 Adjust all the invocations.
5011 Add an invocation exercising the error token.
5012 Add an invocation demonstrating a stupid error message.
5013 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5014 Adjust the tests.
5015 Error message are for stderr, not stdout.
5016
007a50a4
AD
50172002-04-09 Akim Demaille <akim@epita.fr>
5018
5019 * src/gram.h, src/gram.c (error_token_number): Remove, use
5020 errtoken->number.
5021 * src/reader.c (reader): Don't specify the user token number (2)
5022 for $undefined, as it uselessly prevents using it.
5023 * src/gram.h (token_number_t): Move to...
5024 * src/symtab.h: here.
5025 (state_t.number): Is a token_number_t.
5026 * src/print.c, src/reader.c: Use undeftoken->number instead of
5027 hard coded 2.
5028 (Even though this 2 is not the same as above: the number of the
5029 undeftoken remains being 2, it is its user token number which
5030 might not be 2).
5031 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5032 `user_token_number_max'.
5033 Output `undef_token_number'.
5034 * data/bison.simple, data/bison.c++: Use them.
5035 Be sure to map invalid yylex return values to
5036 `undef_token_number'. This saves us from gratuitous SEGV.
5037
5038 * tests/conflicts.at (Solved SR Conflicts)
5039 (Unresolved SR Conflicts): Adjust.
5040 * tests/regression.at (Web2c Actions): Adjust.
5041
06446ccf
AD
50422002-04-08 Akim Demaille <akim@epita.fr>
5043
5044 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5045 Adding #line.
5046 Remove the duplicate `typedefs'.
5047 (RhsNumberType): Fix the declaration and various other typos.
5048 Use __ofile__.
5049 * data/bison.simple: Use __ofile__.
5050 * src/scan-skel.l: Handle __ofile__.
5051
62a3e4f0
AD
50522002-04-08 Akim Demaille <akim@epita.fr>
5053
5054 * src/gram.h (item_number_t): New, the type of item numbers in
5055 RITEM. Note that it must be able to code symbol numbers as
5056 positive number, and the negation of rule numbers as negative
5057 numbers.
5058 Adjust all dependencies (pretty many).
5059 * src/reduce.c (rule): Remove this `short *' pointer: use
5060 item_number_t.
5061 * src/system.h (MINSHORT, MAXSHORT): Remove.
5062 Include `limits.h'.
5063 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5064 (shortcpy): Remove.
5065 (MAXTABLE): Move to...
5066 * src/output.c (MAXTABLE): here.
5067 (prepare_rules): Use output_int_table to output rhs.
5068 * data/bison.simple, data/bison.c++: Adjust.
5069 * tests/torture.at (Big triangle): Move the limit from 254 to
5070 500.
5071 * tests/regression.at (Web2c Actions): Ajust.
5072
5073 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5074 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5075 passes, but produces negative #line number, once fixed, GCC is
5076 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5077 C), it passes.
5078 * src/state.h (state_h): Code input lines on ints, not shorts.
5079
bb88b0fc
AD
50802002-04-08 Akim Demaille <akim@epita.fr>
5081
5082 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5083 and then the grammar.
5084
9a636f47
AD
50852002-04-08 Akim Demaille <akim@epita.fr>
5086
5087 * src/system.h: No longer using strndup.
5088
680e8701
AD
50892002-04-07 Akim Demaille <akim@epita.fr>
5090
5091 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5092 * src/output.c (output_table_data): Return the longest number.
5093 (prepare_tokens): Output `token_number_max').
5094 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5095 New.
5096 Use them to define yy_token_number_type/TokenNumberType.
5097 Use this type for yytranslate.
5098 * tests/torture.at (Big triangle): Push the limit from 124 to
5099 253.
5100 * tests/regression.at (Web2c Actions): Adjust.
5101
817e9f41
AD
51022002-04-07 Akim Demaille <akim@epita.fr>
5103
5104 * tests/torture.at (Big triangle): New.
5105 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5106 * tests/existing.at: here.
5107
5123689b
AD
51082002-04-07 Akim Demaille <akim@epita.fr>
5109
5110 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5111 nritems.
5112 Adjust dependencies.
5113
f3849179
AD
51142002-04-07 Akim Demaille <akim@epita.fr>
5115
5116 * src/reader.c: Normalize increments to prefix form.
5117
bd02036a
AD
51182002-04-07 Akim Demaille <akim@epita.fr>
5119
5120 * src/reader.c, symtab.c: Remove debugging code.
5121
db8837cb
AD
51222002-04-07 Akim Demaille <akim@epita.fr>
5123
5124 Rename all the `bucket's as `symbol_t'.
5125
5126 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5127 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5128 * src/symtab.c, src/symtab.h (bucket): Rename as...
5129 (symbol_t): this.
5130 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5131 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5132 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5133 (buckets_new, buckets_free, buckets_do): Rename as...
5134 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5135 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5136 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5137 (symbols_new, symbols_free, symbols_do): these.
5138
72a23c97
AD
51392002-04-07 Akim Demaille <akim@epita.fr>
5140
5141 Use lib/hash for the symbol table.
5142
5143 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5144 EOF.
5145 * src/lex.c (lex): Set the `number' member of new terminals.
5146 * src/reader.c (bucket_check_defined, bucket_make_alias)
5147 (bucket_check_alias_consistence, bucket_translation): New.
5148 (reader, grammar_free, readgram, token_translations_init)
5149 (packsymbols): Adjust.
5150 (reader): Number the predefined tokens.
5151 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5152 for predefined tokens.
5153 * src/symtab.h (bucket): Remove all the hash table related
5154 members.
5155 * src/symtab.c (symtab): Replace by...
5156 (bucket_table): this.
5157 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5158 (buckets_new, buckets_do): New.
5159
280a38c3
AD
51602002-04-07 Akim Demaille <akim@epita.fr>
5161
5162 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5163 (start_symbol, max_user_token_number, semantic_parser)
5164 (error_token_number): Initialize.
5165 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5166 Initialize.
5167 (reader): Don't.
5168 (errtoken, eoftoken, undeftoken, axiom): Extern.
5169
03b31c0c
AD
51702002-04-07 Akim Demaille <akim@epita.fr>
5171
5172 * src/gram.h (rule_s): prec and precsym are now pointers
5173 to the bucket giving the priority/associativity.
5174 Member `associativity' removed: useless.
5175 * src/reduce.c, src/conflicts.c: Adjust.
5176
8b3df748
AD
51772002-04-07 Akim Demaille <akim@epita.fr>
5178
5179 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5180 Properly escape the symbols' TAG when outputting them.
5181
e601aa1d
AD
51822002-04-07 Akim Demaille <akim@epita.fr>
5183
5184 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5185
b0299a2e
AD
51862002-04-07 Akim Demaille <akim@epita.fr>
5187
5188 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5189 (LArule): this, which is an array to rule_t*.
5190 * src/print.c, src/conflicts.c: Adjust.
5191
d7e1f00c
AD
51922002-04-07 Akim Demaille <akim@epita.fr>
5193
5194 * src/gram.h (rule_t): Rename `number' as `user_number'.
5195 `number' is a new member.
5196 Adjust dependencies.
5197 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5198
cc9305dd
AD
51992002-04-07 Akim Demaille <akim@epita.fr>
5200
5201 As a result of the previous patch, it is no longer needed
5202 to reorder ritem itself.
5203
5204 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5205
b0940840
AD
52062002-04-07 Akim Demaille <akim@epita.fr>
5207
5208 Be sure never to walk through RITEMS, but use only data related to
5209 the rules themselves. RITEMS should be banished.
5210
5211 * src/output.c (output_token_translations): Rename as...
5212 (prepare_tokens): this.
5213 In addition to `translate', prepare the muscles `tname' and
5214 `toknum', which were handled by...
5215 (output_rule_data): this.
5216 Remove, and move the remainder of its outputs into...
5217 (prepare_rules): this new routines, which also merges content from
5218 (output_gram): this.
5219 (prepare_rules): Be sure never to walk through RITEMS.
5220 (output_stos): Rename as...
5221 (prepare_stos): this.
5222 (output): Always invoke prepare_states, after all, just don't use it
5223 in the output if you don't need it.
5224
643a5994
AD
52252002-04-07 Akim Demaille <akim@epita.fr>
5226
5227 * src/LR0.c (new_state): Display `nstates' as the name of the
5228 newly created state.
5229 Adjust to initialize first_state and last_state if needed.
5230 Be sure to distinguish the initial from the final state.
5231 (new_states): Create the itemset of the initial state, and use
5232 new_state.
5233 * src/closure.c (closure): Now that the initial state has its
5234 items properly set, there is no need for a special case when
5235 creating `ruleset'.
5236
5237 As a result, now the rule 0, reducing to $axiom, is visible in the
5238 outputs. Adjust the test suite.
5239
5240 * tests/conflicts.at (Solved SR Conflicts)
5241 (Unresolved SR Conflicts): Adjust.
5242 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5243 * tests/conflicts.at (S/R in initial): New.
5244
b4c4ccc2
AD
52452002-04-07 Akim Demaille <akim@epita.fr>
5246
5247 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5248 the RHS of the rules.
5249 * src/output.c (output_gram): Likewise.
5250
bba97eb2
AD
52512002-04-07 Akim Demaille <akim@epita.fr>
5252
5253 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5254 bucket.
5255 Adjust all dependencies.
5256 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5257 `number' of the buckets too.
5258 * src/gram.h: Include `symtab.h'.
5259 (associativity): Move to...
5260 * src/symtab.h: here.
5261 No longer include `gram.h'.
5262
c3b407f4
AD
52632002-04-07 Akim Demaille <akim@epita.fr>
5264
5265 * src/gram.h, src/gram.c (rules_rhs_length): New.
5266 (ritem_longest_rhs): Use it.
5267 * src/gram.h (rule_t): `number' is a new member.
5268 * src/reader.c (packgram): Set it.
5269 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5270 the end of `rules', and count them out of `nrules'.
5271 (reduce_output, dump_grammar): Adjust.
5272 * src/print.c (print_grammar): It is no longer needed to check for
5273 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5274 * tests/reduce.at (Reduced Automaton): New test.
5275
11652ab3
AD
52762002-04-07 Akim Demaille <akim@epita.fr>
5277
5278 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5279 lacking `+ 1' to nrules, Bison reported as useless a token if it
5280 was used solely to set the precedence of the last rule...
5281
26b23c1a
AD
52822002-04-07 Akim Demaille <akim@epita.fr>
5283
5284 * data/bison.c++, data/bison.simple: Don't output the current file
5285 name in #line, to avoid useless diffs between two identical
5286 outputs under different names.
5287
18bcecb0
AD
52882002-04-07 Akim Demaille <akim@epita.fr>
5289
5290 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5291 Normalize loops to using `< nrules + 1', not `<= nrules'.
5292
fa770c86
AD
52932002-04-07 Akim Demaille <akim@epita.fr>
5294
5295 * TODO: Update.
5296
d9b739c3
AD
52972002-04-07 Akim Demaille <akim@epita.fr>
5298
5299 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5300 bucket.value as bucket.number.
5301
99013900
AD
53022002-04-07 Akim Demaille <akim@epita.fr>
5303
5304 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5305 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5306 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5307 RHS, instead of being an index in RITEMS.
5308
e966383b
PE
53092002-04-04 Paul Eggert <eggert@twinsun.com>
5310
5311 * doc/bison.texinfo: Update copyright date.
5312 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5313 (Symbols): Warn about running Bison in one character set,
5314 but compiling and/or running in an incompatible one.
5315 Warn about character code 256, too.
5316
53172002-04-03 Paul Eggert <eggert@twinsun.com>
5318
5319 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5320 YYERROR_VERBOSE is nonzero, not whether it is defined.
5321
5322 Merge changes from bison-1_29-branch.
c307773e 5323
8d6c48b9
PE
53242002-03-20 Paul Eggert <eggert@twinsun.com>
5325
5326 Merge fixes from Debian bison_1.34-1.diff.
5327
5328 * configure.in (AC_PREREQ): 2.53.
5329
e53c6322
AD
53302002-03-20 Akim Demaille <akim@epita.fr>
5331
5332 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5333
9ffbeca7
PE
53342002-03-19 Paul Eggert <eggert@twinsun.com>
5335
21db0b2a
PE
5336 * src/bison.simple (YYCOPY): New macro.
5337 (YYSTACK_RELOCATE): Use it.
5338 Remove Type arg; no longer needed. All callers changed.
5339 (yymemcpy): Remove; no longer needed.
5340
9ffbeca7
PE
5341 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5342 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5343
642cb8f8
AD
53442002-03-19 Akim Demaille <akim@epita.fr>
5345
5346 Test and fix the #line outputs.
5347
5348 * tests/atlocal.at (GCC): New.
5349 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5350 (Prologue synch line, ,%union synch line, Postprologue synch line)
5351 (Action synch line, Epilogue synch line): New tests.
5352 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5353 * data/bison.simple, data/bison.c++: Use it.
5354
3c31a486
AD
53552002-03-19 Akim Demaille <akim@epita.fr>
5356
5357 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5358 (Solved SR Conflicts, %expect not enough, %expect right)
5359 (%expect too much): Move to...
5360 * tests/conflicts.at: this new file.
5361
0d8bed56
AD
53622002-03-19 Akim Demaille <akim@epita.fr>
5363
5364 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5365 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5366 that we can move to enums for instance.
5367 * src/output.c (token_definitions_output): Output a list of
5368 `token-name, token-number' instead of the #define.
5369 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5370
9208d17f
AD
53712002-03-14 Akim Demaille <akim@epita.fr>
5372
5373 Use Gettext 0.11.1.
5374
af27eacb
RA
53752002-03-09 Robert Anisko <robert@lrde.epita.fr>
5376
5377 * data/bison.c++: Make the user able to add members to the generated
5378 parser by subclassing.
5379
9101a310
RA
53802002-03-05 Robert Anisko <robert@lrde.epita.fr>
5381
5382 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5383 a character.
5384 Reported by Nicolas Tisserand and Nicolas Burrus.
5385
fff9bf0b
RA
53862002-03-04 Robert Anisko <robert@lrde.epita.fr>
5387
5388 * src/reader.c: Warn about lacking semi-colons, do not complain.
5389
64dba31e
RA
53902002-03-04 Robert Anisko <robert@lrde.epita.fr>
5391
5392 * data/bison.c++: Remove a debug line.
5393
374f5a14
RA
53942002-03-04 Robert Anisko <robert@lrde.epita.fr>
5395
5396 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5397 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5398 provide a default implementation.
5399
bfcf1f3a
AD
54002002-03-04 Akim Demaille <akim@epita.fr>
5401
5402 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5403 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5404 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5405 * tests/semantic.at (Parsing Guards): Similarly.
5406 * src/reader.at (readgram): Complain if the last rule is not ended
5407 with a semi-colon.
5408
65ccf9fc
AD
54092002-03-04 Akim Demaille <akim@epita.fr>
5410
5411 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5412 * src/closure.c: here.
5413 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5414 RTC.
5415 * src/warshall.h, src/warshall.c: Remove.
5416 * tests/sets.at (Broken Closure): Adjust.
5417
d0039cbc
AD
54182002-03-04 Akim Demaille <akim@epita.fr>
5419
5420 * src/output.c (output_skeleton): tempdir is const.
5421 bytes_read is unused.
5422
345cea78
AD
54232002-03-04 Akim Demaille <akim@epita.fr>
5424
5425 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5426 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5427 Update.
5428 From Michael Hayes.
5429
564801f7
AD
54302002-03-04 Akim Demaille <akim@epita.fr>
5431
5432 * src/closure.c (closure): `r' is unused.
5433
e5352bc7
AD
54342002-03-04 Akim Demaille <akim@epita.fr>
5435
5436 * tests/sets.at (Broken Closure): Add the ending `;'.
5437 * src/reader.at (readgram): Complain if a rule is not ended with a
5438 semi-colon.
5439
914feea9
AD
54402002-03-04 Akim Demaille <akim@epita.fr>
5441
5442 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5443 (count_sr_conflicts): Use bitset_count.
5444 * src/reduce.c (inaccessable_symbols): Ditto.
5445 (bits_size): Remove.
5446 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5447
f0250de6
AD
54482002-03-04 Akim Demaille <akim@epita.fr>
5449
5450 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5451 * src/reduce.c: Remove the `bitset_zero's following the
5452 `bitset_create's, as now it is performed by the latter.
5453
ef017502
AD
54542002-03-04 Akim Demaille <akim@epita.fr>
5455
5456 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5457 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5458 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5459 latest sources from Michael.
5460
76514394
AD
54612002-03-04 Akim Demaille <akim@epita.fr>
5462
5463 * src/output.c (output): Don't free the grammar.
5464 * src/reader.c (grammar_free): New.
5465 * src/main.c (main): Call it and don't free symtab here.
5466
55024580
AD
54672002-03-04 Akim Demaille <akim@epita.fr>
5468
5469 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5470 before returning.
5471 Reported by Benoit Perrot.
5472
f9abaa2c
AD
54732002-03-04 Akim Demaille <akim@epita.fr>
5474
5475 Use bitset operations when possible, not loops over bits.
5476
5477 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5478 bitset_or.
5479 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5480 * src/reduce.c (useless_nonterminals): Formatting changes.
5481 * src/warshall.c (TC): Use bitset_or.
5482
0e721e75
AD
54832002-03-04 Akim Demaille <akim@epita.fr>
5484
5485 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5486 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5487 Ditto.
5488
0fb1ffb1
AD
54892002-03-04 Akim Demaille <akim@epita.fr>
5490
5491 * src/lalr.c (F): Now a bitset*.
5492 Adjust all dependencies.
5493
b86796bf
AD
54942002-03-04 Akim Demaille <akim@epita.fr>
5495
5496 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5497 Adjust all dependencies.
5498
602bbf31
AD
54992002-03-04 Akim Demaille <akim@epita.fr>
5500
5501 * src/L0.c, src/LR0.h (nstates): Be size_t.
5502 Adjust comparisons (signed vs unsigned).
5503 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5504 bitset*.
5505 Adjust all dependencies.
5506
d8a0245c
AD
55072002-03-04 Akim Demaille <akim@epita.fr>
5508
5509 * src/closure.c (firsts): Now, also a bitset.
5510 Adjust all dependencies.
5511 (varsetsize): Remove, now unused.
5512 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5513
34ba9743
AD
55142002-03-04 Akim Demaille <akim@epita.fr>
5515
5516 * src/print.c: Convert to use bitset.h, not hand coded iterations
5517 over ints.
5518
ed86e78c
AD
55192002-03-04 Akim Demaille <akim@epita.fr>
5520
5521 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5522
dfdb1797
AD
55232002-03-04 Akim Demaille <akim@epita.fr>
5524
5525 * src/closure.c (ruleset): Be a bitset.
5526 (rulesetsize): Remove.
5527
7086e707
AD
55282002-03-04 Akim Demaille <akim@epita.fr>
5529
5530 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5531 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5532 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5533 * src/closure.c (fderives): Be an array of bitsets.
5534
98254360
RA
55352002-02-28 Robert Anisko <robert@lrde.epita.fr>
5536
5537 * data/bison.c++: Merge the two generated headers. Insert a copyright
5538 notice in each output file.
5539
a75c057f
AD
55402002-02-28 Akim Demaille <akim@epita.fr>
5541
5542 * data/bison.c++: Copy the prologue of bison.simple to fetch
5543 useful M4 definitions, such as b4_header_guard.
5544
06b00abc
AD
55452002-02-25 Akim Demaille <akim@epita.fr>
5546
5547 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
5548 translator friendly scheme for the bgr
5549 copyright notice.
06b00abc 5550
70e7d534
AD
55512002-02-25 Akim Demaille <akim@epita.fr>
5552
5553 * src/output.c (header_output): Remove, now handled completely via
5554 M4.
5555
abe017f6
AD
55562002-02-25 Akim Demaille <akim@epita.fr>
5557
5558 * m4/m4.m4: New, from CVS Autoconf.
5559 * configure.in: Invoke it.
5560 * src/output.c (output_skeleton): Use its result instead of the
5561 hard coded name.
5562
381fb12e
AD
55632002-02-25 Akim Demaille <akim@epita.fr>
5564
5565 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5566 Fileutils 4.1.5.
5567 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5568 * src/output.c (output_skeleton): Use mkstemp to create a real
5569 temporary file.
5570 Move the filling of `skeleton' and its muscle to...
5571 (prepare): here.
5572 (output): Move the definition of the prologue muscle to...
5573 (prepare): here.
5574 * src/system.h (DEFAULT_TMPDIR): New.
5575
6f38107f
PE
55762002-02-14 Paul Eggert <eggert@twinsun.com>
5577
5578 Remove the support for C++ namespace cleanliness; it was
5579 causing more problems than it was curing, since it didn't work
5580 properly on some nonstandard C++ compilers. This can wait
5581 for a proper C++ parser.
5582
5583 * NEWS: Document this.
5584 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5585 of C++, as it's treated like C now.
5586 * src/bison.simple (YYSTD): Remove.
5587 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5588 Treat C++ just like Standard C instead of trying to support
5589 namespace cleanliness.
5590
80cce3da
AD
55912002-02-14 Akim Demaille <akim@epita.fr>
5592
5593 * tests/regression.at (else): Adjust to Andreas' change.
5594
842e8679
AD
55952002-02-14 Akim Demaille <akim@epita.fr>
5596
5597 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5598
4bda3f10
AD
55992002-02-13 Andreas Schwab <schwab@suse.de>
5600
5601 * src/output.c (output_rule_data): Don't output NULL, it might
5602 not be defined yet.
5603
4162fa07 56042002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 5605
4162fa07
RA
5606 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5607 (Copyright notice): Update.
b418ecd8 5608
bd16a5dc
AD
56092002-02-11 Akim Demaille <akim@epita.fr>
5610
5611 * tests/regression.at (%nonassoc and eof): Don't include
5612 nonportable headers.
5613
8d69a1a3
RA
56142002-02-08 Robert Anisko <robert@lrde.epita.fr>
5615
5616 * data/bison.c++: Correct error recovery. Make the user able to
5617 initialize the starting location.
5618
9b2d0677
AD
56192002-02-07 Akim Demaille <akim@epita.fr>
5620
5621 * tests/input.at: New.
5622
69e2658b
RA
56232002-02-07 Robert Anisko <robert@lrde.epita.fr>
5624
5625 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 5626 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
5627 directives around tables only needed for debugging.
5628
4aacc3a7
RA
56292002-02-07 Robert Anisko <robert@lrde.epita.fr>
5630
5631 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5632 C++ parsers.
5633 (yy::b4_name::parse): Use print_.
5634
762a801e
RA
56352002-02-07 Robert Anisko <robert@lrde.epita.fr>
5636
5637 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5638
4bb2bc3f
RA
56392002-02-07 Robert Anisko <robert@lrde.epita.fr>
5640
5641 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5642 C++ parsers.
5643 (yy::b4_name::parse): Build verbose error messages, and use error_.
5644
6b45a3ca
RA
56452002-02-06 Robert Anisko <robert@lrde.epita.fr>
5646
5647 * data/bison.c++: Fix m4 quoting in comments.
5648
50997c6e
RA
56492002-02-06 Robert Anisko <robert@lrde.epita.fr>
5650
5651 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5652 not expanded by m4.
5653
3f3eed27
AD
56542002-02-05 Akim Demaille <akim@epita.fr>
5655
5656 * data/bison.c++: Adjust to the M4 back end.
5657 More is certainly needed.
5658
be2a1a68
AD
56592002-02-05 Akim Demaille <akim@epita.fr>
5660
5661 Give a try to M4 as a back end.
5662
5663 * lib/readpipe.c: New, from wdiff.
5664 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5665 BISON_HAIRY.
5666 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5667 specific values. Now it is m4 that performs the lookup.
5668 * src/parse-skel.y: Remove.
5669 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5670 * src/output.c (actions_output, guards_output)
5671 (token_definitions_output): No longer keeps track of the output
5672 line number, hence remove the second argument.
5673 (guards_output): Check against the guard member of a rule, not the
5674 action member.
5675 Adjust callers.
5676 (output_skeleton): Don't look for the skeleton location, let m4 do
5677 that.
5678 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5679 file will be used.
5680 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5681 (prepare): Given that for the time being changesyntax is not
5682 usable in M4, rename the muscles using `-' to `_'.
5683 Define `defines_flag', `output_parser_name' and `output_header_name'.
5684 * src/output.h (actions_output, guards_output)
5685 (token_definitions_output): Adjust prototypes.
5686 * src/scan-skel.l: Instead of scanning the skeletons, it now
5687 processes the output of m4: `__oline__' and `#output'.
5688 * data/bison.simple: Adjust to be used by M4(sugar).
5689 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5690 to date.
5691 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5692 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5693 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5694 shamelessly stolen from CVS Autoconf.
5695
beda758b
AD
56962002-02-05 Akim Demaille <akim@epita.fr>
5697
5698 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5699 * configure.in: Check for the declarations of free and malloc.
5700 * src/muscle_tab.c: Adjust.
5701
5ece6d43
AD
57022002-02-05 Akim Demaille <akim@epita.fr>
5703
5704 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5705 which have no values.
5706
5bb18f9a
AD
57072002-02-05 Akim Demaille <akim@epita.fr>
5708
5709 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5710 * data/: here.
5711
894dd62e
PE
57122002-01-29 Paul Eggert <eggert@twinsun.com>
5713
5714 * src/bison.simple (YYSIZE_T): Do not define merely because
5715 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5716 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5717
82841af7
AD
57182002-01-27 Akim Demaille <akim@epita.fr>
5719
5720 Fix `%nonassoc and eof'.
5721
5722 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5723 which were not properly copied! Replace
5724 memcpy (res->errs, src->errs, src->nerrs);
5725 with
5726 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5727 !!!
5728 * tests/regression.at (%nonassoc and eof): Adjust to newest
5729 Autotest: `.' is not in the PATH.
5730
318b76e9
AD
57312002-01-27 Akim Demaille <akim@epita.fr>
5732
5733 * tests/sets.at (AT_EXTRACT_SETS): New.
5734 (Nullable): Use it.
5735 (Firsts): New.
5736
30d2f3d5
AD
57372002-01-26 Akim Demaille <akim@epita.fr>
5738
5739 * tests/actions.at, tests/calc.at, tests/headers.at,
5740 * tests/torture.at: Adjust to the newest Autotest which no longer
5741 forces `.' in the PATH.
5742
30f8c395
AD
57432002-01-25 Akim Demaille <akim@epita.fr>
5744
5745 * tests/regression.at (%nonassoc and eof): New.
5746 Suggested by Robert Anisko.
5747
29ae55f1
AD
57482002-01-24 Akim Demaille <akim@epita.fr>
5749
5750 Bison dumps core when trying to complain about broken input files.
5751 Reported by Cris van Pelt.
5752
5753 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5754 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5755 into...
5756 (Invalid inputs): Strengthen: exercise parse_percent_token.
5757
2b548aa6
RA
57582002-01-24 Robert Anisko <robert.anisko@epita.fr>
5759
5760 * src/Makefile.am: Add bison.c++.
5761 * src/bison.c++: New skeleton.
5762
bb0146c2
AD
57632002-01-21 Paolo Bonzini <bonzini@gnu.org>
5764
5765 * po/it.po: New.
5766
bec30531
AD
57672002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5768
5769 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5770
fc6edc45
MA
57712002-01-20 Marc Autret <marc@gnu.org>
5772
5773 * src/files.c (compute_output_file_names): Fix
5774
5e5d5415
MA
57752002-01-20 Marc Autret <marc@gnu.org>
5776
5777 * tests/output.at: New test.
5778 * src/files.c (compute_base_names): Don't map extensions when
5779 the YACC flag is set, use defaults.
5780 Reported by Evgeny Stambulchik.
5781
44ea3fbd
MA
57822002-01-20 Marc Autret <marc@gnu.org>
5783
bb0146c2 5784 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
5785 compilers as well (i.e. the vendor C compiler).
5786 Suggested by Albert Chin-A-Young.
5787
338963d1
TVH
57882002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5789
5790 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5791 canonical definition.
5792 * src/system.h: Use the canonical definition for PARAMS (avoids
5793 a conflict with the macro from lib/hash.h).
5794
c57b2479
AD
57952002-01-11 Akim Demaille <akim@epita.fr>
5796
5797 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 5798 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 5799
b85810ae
AD
58002002-01-09 Akim Demaille <akim@epita.fr>
5801
5802 * src/files.c, src/files.h (output_infix): New.
5803 (tab_extension): Remove.
5804 (compute_base_names): Compute the former, drop the latter.
5805 * src/output.c (prepare): Insert the muscles `output-infix', and
5806 `output-suffix'.
5807 * src/parse-skel.y (string, string.1): New.
5808 (section.header): Use it.
5809 (section.yacc): Remove.
5810 (prefix): Remove too.
5811 * src/scan-skel.l: Adjust.
5812 * src/bison.simple, src/bison.hairy: Adjust.
5813
cae60122
AD
58142002-01-09 Akim Demaille <akim@epita.fr>
5815
5816 * configure.in (WERROR_CFLAGS): Compute it.
5817 * src/Makefile.am (CFLAGS): Pass it.
5818 * tests/atlocal.in (CFLAGS): Idem.
5819 * src/files.c: Fix a few warnings.
5820 (get_extension_index): Remove, unused.
5821
ae404801
AD
58222002-01-08 Akim Demaille <akim@epita.fr>
5823
5824 * src/getargs.c (AS_FILE_NAME): New.
5825 (getargs): Use it to convert DOSish file names.
5826 * src/files.c (base_name): Rename as full_base_name to avoid
5827 clashes with `base_name ()'.
5828 (filename_split): New.
5829 (compute_base_names): N-th rewrite, using filename_split.
5830
22312b71
AD
58312002-01-08 Akim Demaille <akim@epita.fr>
5832
5833 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5834 New, stolen from the Fileutils 4.1.
5835 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5836 * configure.in: Check for the presence of memrchr, and of its
5837 prototype.
5838
a67cef01
TVH
58392002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5840
5841 * lib/hash.h (__P): Added definition for this macro.
5842 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5843 BUILT_SOURCES, to ensure they are generated first.
5844 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5845 %error-verbose to allow bootstrapping with bison 1.30x.
5846
2b25d624
AD
58472002-01-06 Akim Demaille <akim@epita.fr>
5848
5849 * src/reader.c (parse_braces): Don't fetch the next char, the
5850 convention is to fetch on entry.
5851 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5852 'switch' without a following semicolon.
5853 * tests/regression.at (braces parsing): New.
5854
3460813b
AD
58552002-01-06 Akim Demaille <akim@epita.fr>
5856
5857 Bison is dead wrong in its RR conflict reports.
5858
5859 * tests/torture.at (GNU Cim Grammar): New.
5860 * src/conflicts.c (count_rr_conflicts): Fix.
5861
73784c64
AD
58622002-01-06 Akim Demaille <akim@epita.fr>
5863
5864 Creating package.m4 from configure.ac causes too many problems.
5865
5866 * tests/Makefile.am (package.m4): Create it by hand,
5867 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5868
25d81090
AD
58692002-01-06 Akim Demaille <akim@epita.fr>
5870
5871 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5872 skeleton.h.
5873
a9b8959e
PE
58742002-01-04 Paul Eggert <eggert@twinsun.com>
5875
5876 * doc/bison.texinfo (Debugging):
5877 Remove YYSTDERR; it's no longer defined or used.
5878 Also, s/cstdio.h/cstdio/.
5879
25d81090
AD
58802002-01-03 Akim Demaille <akim@epita.fr>
5881
5882 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5883
1109455c
AD
58842002-01-03 Akim Demaille <akim@epita.fr>
5885
5886 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5887 tracing code to --trace, wait for a better --trace option, with
5888 args.
5889
7ea5e977
AD
58902002-01-03 Akim Demaille <akim@epita.fr>
5891
5892 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5893 The ISO C++ standard is extremely clear about it: stderr is
5894 considered a macro, not a regular symbol (see table 94 `Header
5895 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5896 Therefore std:: does not apply to it. It still does with fprintf.
5897 Also, s/cstdio.h/cstdio/.
5898
fab5b110
AD
58992002-01-03 Akim Demaille <akim@epita.fr>
5900
5901 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5902 for non system headers.
5903
aed7fd9b
AD
59042002-01-02 Akim Demaille <akim@epita.fr>
5905
5906 Equip the skeleton chain with location tracking, runtime trace,
5907 pure parser and scanner.
5908
5909 * src/parse-skel.y: Request a pure parser, locations, and prefix
5910 renaming.
5911 (%union): Having several members with the same type does not help
5912 type mismatches, simplify.
5913 (YYPRINT, yyprint): New.
5914 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5915 (skel_error): this.
5916 Handle locations.
5917 * src/scan-skel.l: Adjust to these changes.
5918 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5919 (LOCATION_PRINT, skel_control_t): New.
5920
24fad99e
AD
59212001-12-30 Akim Demaille <akim@epita.fr>
5922
5923 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5924 replace `gb' with BLANKS.
5925 * src/scan-skel.l: Adjust.
5926
a4b36db4
AD
59272001-12-30 Akim Demaille <akim@epita.fr>
5928
5929 * src/system.h: We don't need nor want bcopy.
5930 Throw away MS-DOS crap: we don't need getpid.
5931 * configure.in: We don't need strndup. It was even causing
5932 problems: because Flex includes the headers *before* us,
5933 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5934 not visible.
5935 * lib/xstrndup.c: New.
5936 * src/scan-skel.l: Use it.
5937 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5938 * src/parse-skel.y: Use %directives instead of #defines.
5939
1239777d
AD
59402001-12-30 Akim Demaille <akim@epita.fr>
5941
5942 * src/skeleton.h: New.
5943 * src/output.c (output_parser, output_master_parser): Remove, dead
5944 code.
5945 * src/output.h (get_lines_number, actions_output, guards_output)
5946 (token_definitions_output): Prototype them.
5947 * src/parse-skel.y: Add the license notice.
5948 Include output.h and skeleton.h.
5949 (process_skeleton): Returns void, and takes a single parameter.
5950 * src/scan-skel.l: Add the license notice.
5951 Include skeleton.h.
5952 Don't use %option yylineno: it seems that then Flex imagines
5953 REJECT has been used, and therefore it won't reallocate its
5954 buffers (which makes no other sense to me than a bug). It results
5955 in warnings for `unused: yy_flex_realloc'.
5956
9b3add5b
RA
59572001-12-30 Robert Anisko <robert.anisko@epita.fr>
5958
5959 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5960 (MUSCLE_INSERT_PREFIX): ...to there.
5961 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5962 (MUSCLE_INSERT_PREFIX): Move from here...
5963
5964 * src/bison.hairy: Add a section directive. Put braces around muscle
5965 names. This parser skeleton is still broken, but Bison should not
5966 choke on a bad muscle 'syntax'.
5967 * src/bison.simple: Add a section directive. Put braces around muscle
5968 names.
5969
5970 * src/files.h (strsuffix, stringappend): Add declarations.
5971 (tab_extension): Add declaration.
5972 (short_base_name): Add declaration.
5973
5974 * src/files.c (strsuffix, stringappend): No longer static. These
5975 functions are used in the skeleton parser.
5976 (tab_extension): New.
5977 (compute_base_names): Use the computations done in this function
fab5b110 5978 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
5979 names.
5980 (short_base_name): No longer static.
5981
5982 * src/output.c (output_skeleton): New.
5983 (output): Disable call to output_master_parser, and give a try to
5984 a new skeleton handling system.
5985 (guards_output, actions_output): No longer static.
5986 (token_definitions_output, get_lines_number): No longer static.
5987
5988 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5989
fab5b110 5990 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
5991 parse-skel.y.
5992
5993 * src/parse-skel.y: New file.
5994 * src/scan-skel.l: New file.
5995
b5b61c61
AD
59962001-12-29 Akim Demaille <akim@epita.fr>
5997
5998 %name-prefix is broken.
5999
6000 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6001 Adjust all dependencies.
6002 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6003 %name-prefix.
6004
6005 Renaming yylval but not yylloc is not consistent. Now we do.
6006
6007 * src/bison.simple: Prefix yylloc if used.
6008 * doc/bison.texinfo (Decl Summary): Document that.
6009
8c9a50be
AD
60102001-12-29 Akim Demaille <akim@epita.fr>
6011
6012 * doc/bison.texinfo: Promote `%long-directive' over
6013 `%long_directive'.
6014 Remove all references to fixed-output-files, yacc is enough.
6015
d99361e6
AD
60162001-12-29 Akim Demaille <akim@epita.fr>
6017
6018 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6019 user prologue. These are defaults.
6020 * tests/actions.at (Mid-rule actions): Make sure the user can
6021 define YYDEBUG and YYERROR_VERBOSE.
6022
b9cecb91
AD
60232001-12-29 Akim Demaille <akim@epita.fr>
6024
6025 * src/output.c (header_output): Don't forget to export YYLTYPE and
6026 yylloc.
6027 * tests/headers.at (export YYLTYPE): New, make sure it does.
6028 * tests/regression.at (%union and --defines, Invalid CPP headers):
6029 Move to...
6030 * tests/headers.at: here.
6031
aea13e97
AD
60322001-12-29 Akim Demaille <akim@epita.fr>
6033
6034 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6035
931394cb
AD
60362001-12-29 Akim Demaille <akim@epita.fr>
6037
6038 * tests/actions.at (Mid-rule actions): Output on a single line
6039 instead of several.
6040
704a47c4
AD
60412001-12-29 Akim Demaille <akim@epita.fr>
6042
6043 * doc/bison.texinfo: Formatting changes.
6044
091e20bb
AD
60452001-12-29 Akim Demaille <akim@epita.fr>
6046
6047 Don't store the token defs in a muscle, just be ready to output it
6048 on command. Now possible via `symbols'. Fixes a memory leak.
6049
6050 * src/output.c (token_definitions_output): New.
6051 (output_parser, header_output): Use it.
6052 * src/reader.c (symbols_save): Remove.
6053
cce71710
AD
60542001-12-29 Akim Demaille <akim@epita.fr>
6055
6056 * src/bison.simple: Do not provide a default for YYSTYPE and
6057 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6058 default.
6059
82c035a8
AD
60602001-12-29 Akim Demaille <akim@epita.fr>
6061
6062 Mid-rule actions are simply... ignored!
6063
6064 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6065 the empty-rule associated to the dummy symbol, not to the host
6066 rule.
6067 * tests/actions.at (Mid-rule actions): New.
6068
8419d367
AD
60692001-12-29 Akim Demaille <akim@epita.fr>
6070
6071 Memory leak.
6072
6073 * src/reader.c (reader): Free grammar.
6074
375d5806
AD
60752001-12-29 Akim Demaille <akim@epita.fr>
6076
6077 Memory leak.
6078
6079 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6080 since it allocates it for each state, although only one is needed.
6081 (allocate_storage): Do it here.
6082
f51cb8ff
AD
60832001-12-29 Akim Demaille <akim@epita.fr>
6084
6085 * src/options.h, src/options.c (create_long_option_table): Rename
6086 as...
6087 (long_option_table_new): this, with a clearer prototype.
6088 (percent_table): Remove, unused,
6089 * src/getargs.c (getargs): Adjust.
6090
29e88316
AD
60912001-12-29 Akim Demaille <akim@epita.fr>
6092
6093 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6094 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6095 as states.
6096
b9f71f19
AD
60972001-12-29 Akim Demaille <akim@epita.fr>
6098
6099 * src/lalr.c (build_relations): Rename `states' as `states1'.
6100 Sorry, I don't understand exactly what it is, no better name...
6101
1a2b5d37
AD
61022001-12-29 Akim Demaille <akim@epita.fr>
6103
6104 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6105 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6106 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6107 as rules.
6108
1cca533e
AD
61092001-12-29 Akim Demaille <akim@epita.fr>
6110
6111 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6112 ago.
6113
c03ae966
AD
61142001-12-29 Akim Demaille <akim@epita.fr>
6115
6116 * src/reader.c, src/reader.h (user_toknums): Remove.
6117 Adjust all users to use symbols[i]->user_token_number.
6118
5a670b1e
AD
61192001-12-29 Akim Demaille <akim@epita.fr>
6120
6121 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6122 Adjust all users to use symbols[i]->prec or ->assoc.
6123
ad949da9
AD
61242001-12-29 Akim Demaille <akim@epita.fr>
6125
6126 * src/reader.c, src/reader.h (tags): Remove.
6127 Adjust all users to use symbols[i]->tag.
6128
0e78e603
AD
61292001-12-29 Akim Demaille <akim@epita.fr>
6130
6131 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6132 and rule_table.
6133 * src/reader.c (packsymbols): Fill this table.
6134 Drop sprec.
6135 * src/conflicts.c (resolve_sr_conflict): Adjust.
6136 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6137 single table.
6138 Use symbols[i]->tag instead of tags[i].
6139
213e640e
AD
61402001-12-29 Akim Demaille <akim@epita.fr>
6141
6142 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6143 In addition, put a comment in there, to replace...
6144 * tests/regression.at (%union and C comments): Remove.
6145
e7b8bef1
AD
61462001-12-29 Akim Demaille <akim@epita.fr>
6147
6148 * tests/regression.at (Web2c Actions): Blindly move the actual
6149 output as expected output. The contents *seem* right to me, but I
6150 can't pretend reading perfectly parser tables... Nonetheless, all
6151 the other tests pass correctly, the table look OK, even though the
6152 presence of `$axiom' is to be noted: AFAICS it is useless (but
6153 harmless).
6154
b68e7744
AD
61552001-12-29 Akim Demaille <akim@epita.fr>
6156
6157 * src/reader.c (readgram): Don't add the rule 0 if there were no
6158 rules read. In other words, add it _after_ having performed
6159 grammar sanity checks.
6160 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6161
78d5bae9
AD
61622001-12-29 Akim Demaille <akim@epita.fr>
6163
6164 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6165 visible, and some states have now a different number.
6166
ff442794
AD
61672001-12-29 Akim Demaille <akim@epita.fr>
6168
6169 * src/reader.c (readgram): Bind the initial rule's lineno to that
6170 of the first rule.
6171 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6172 (Solved SR Conflicts): Adjust rule 0's line number.
6173
610ab194
AD
61742001-12-29 Akim Demaille <akim@epita.fr>
6175
6176 Fix the `GAWK Grammar' failure.
6177
6178 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6179 the reductions of the first state which was mistakenly confused
6180 with the final state because precisely final_state was initialized
6181 to 0.
6182 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6183 now noticed by Bison.
6184 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6185 have a reduction on $default.
6186
29d29c8f
AD
61872001-12-29 Akim Demaille <akim@epita.fr>
6188
6189 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6190 rule line numbers.
6191 * src/closure.c (print_closure): Likewise.
6192 * src/derives.c (print_derives): Likewise.
6193 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6194 now.
6195
7c6b64d0
AD
61962001-12-29 Akim Demaille <akim@epita.fr>
6197
6198 * src/lalr.c (lookaheads_print): New.
6199 (lalr): Call it when --trace-flag.
6200 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6201 are dumped.
6202
3d4daee3
AD
62032001-12-29 Akim Demaille <akim@epita.fr>
6204
6205 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6206 when walking through ritem, even via rule->rhs.
6207 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6208 (useful_production, useless_nonterminals): Likewise.
6209 (reduce_grammar_tables): Likewise, plus update nritems.
6210 * src/nullable.c (set_nullable): Likewise.
6211 * src/lalr.c (build_relations): Likewise.
6212 * tests/sets.at (Nullable): Adjust.
6213 Fortunately, now, the $axiom is no longer nullable.
6214
9e7f6bbd
AD
62152001-12-29 Akim Demaille <akim@epita.fr>
6216
6217 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6218 the 0-sentinel.
6219 * src/gram.c (ritem_longest_rhs): Likewise.
6220 * src/reduce.c (nonterminals_reduce): Likewise.
6221 * src/print_graph.c (print_graph): Likewise.
6222 * src/output.c (output_rule_data): Likewise.
6223 * src/nullable.c (set_nullable): Likewise.
6224
255ef638
AD
62252001-12-29 Akim Demaille <akim@epita.fr>
6226
6227 * src/output.c: Comment changes.
6228
0d8a7363
AD
62292001-12-27 Paul Eggert <eggert@twinsun.com>
6230
6231 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6232 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6233 Sparc, as they were causing more porting problems than the
6234 (minor) performance improvement was worth.
6235
6236 Also, catch up with 1.31's YYSTD.
6237
3db472b9
AD
62382001-12-27 Akim Demaille <akim@epita.fr>
6239
6240 * src/output.c (output_gram): Rely on nritems, not the
6241 0-sentinel. See below.
6242 Use -1 as separator, not 0.
6243 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6244 Rely on -1 as separator in yyrhs, instead of 0.
6245 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6246 twice `Now at end of input', therefore there are two lines less to
6247 expect.
6248
b365aa05
AD
62492001-12-27 Akim Demaille <akim@epita.fr>
6250
6251 * tests/regression.at (Unresolved SR Conflicts):
6252 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6253 below.
6254
30171f79
AD
62552001-12-27 Akim Demaille <akim@epita.fr>
6256
6257 * src/LR0.c (new_state): Recognize the final state by the fact it
6258 is reached by eoftoken.
6259 (insert_start_shifting_state, insert_eof_shifting_state)
6260 (insert_accepting_state, augment_automaton): Remove, since now
6261 these states are automatically computed from the initial state.
6262 (generate_states): Adjust.
6263 * src/print.c: When reporting a rule number to the user, substract
6264 1, so that the axiom rule is rule 0, and the first user rule is 1.
6265 * src/reduce.c: Likewise.
6266 * src/print_graph.c (print_core): For the time being, just as for
6267 the report, depend upon --trace-flags to dump the full set of
6268 items.
6269 * src/reader.c (readgram): Once the grammar read, insert the rule
6270 0: `$axiom: START-SYMBOL $'.
6271 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6272 number of the states has changed (the final state is no longer
6273 necessarily the last), catch up.
6274
75142d45
AD
62752001-12-27 Akim Demaille <akim@epita.fr>
6276
6277 Try to make the use of the eoftoken valid. Given that its value
6278 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6279 is used instead of > 0 where appropriate, (ii), depend upon nritems
6280 instead of the 0-sentinel.
6281
6282 * src/gram.h, src/gram.c (nritems): New.
6283 Expected to be duplication of nitems, but for the time being...
6284 * src/reader.c (packgram): Assert nritems and nitems are equal.
6285 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6286 * src/closure.c (print_closure, print_fderives): Likewise.
6287 * src/gram.c (ritem_print): Likewise.
6288 * src/print.c (print_core, print_grammar): Likewise.
6289 * src/print_graph.c: Likewise.
6290
b7c49edf
AD
62912001-12-27 Akim Demaille <akim@epita.fr>
6292
6293 * src/main.c (main): If there are complains after grammar
6294 reductions, then output the report anyway if requested, then die.
6295 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6296 * src/reader.c (eoftoken): New.
6297 (parse_token_decl): If the token being defined has value `0', it
6298 is the eoftoken.
6299 (packsymbols): No longer hack `tags' to insert `$' by hand.
6300 Be sure to preserve the value of the eoftoken.
6301 (reader): Make sure eoftoken is defined.
6302 Initialize nsyms to 0: now eoftoken is created just like the others.
6303 * src/print.c (print_grammar): Don't special case the eof token.
6304 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6305 lie anyway, albeit pleasant.
6306 * tests/calc.at: Exercise error messages with eoftoken.
6307 Change the grammar so that empty input is invalid.
6308 Adjust expectations.
6309 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6310
ec2da99f
AD
63112001-12-27 Akim Demaille <akim@epita.fr>
6312
6313 * configure.in: Check the protos of strchr ans strspn.
6314 Replace strchr if needed.
6315 * src/system.h: Provide the protos of strchr, strspn and memchr if
6316 missing.
6317 * lib/strchr.c: New.
6318 * src/reader.c (symbols_save): Use strchr.
6319
8adfa272
AD
63202001-12-27 Akim Demaille <akim@epita.fr>
6321
6322 * src/print.c, src/print_graph.c (escape): New.
6323 Use it to quote the TAGS outputs.
6324 * src/print_graph.c (print_state): Now errors are in red, and
6325 reductions in green.
6326 Prefer high to wide: output the state number on a line of its own.
6327
80dac38c
AD
63282001-12-27 Akim Demaille <akim@epita.fr>
6329
6330 * src/state.h, src/state.c (reductions_new): New.
6331 * src/LR0.c (set_state_table): Let all the states have a
6332 `reductions', even if reduced to 0.
6333 (save_reductions): Adjust.
6334 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6335 * src/print.c (print_reductions, print_actions): Adjust.
6336 * src/output.c (action_row): Adjust.
6337
2cec70b9
AD
63382001-12-27 Akim Demaille <akim@epita.fr>
6339
6340 * src/state.h, src/state.c (errs_new, errs_dup): New.
6341 * src/LR0.c (set_state_table): Let all the states have an errs,
6342 even if reduced to 0.
6343 * src/print.c (print_errs, print_reductions): Adjust.
6344 * src/output.c (output_actions, action_row): Adjust.
6345 * src/conflicts.c (resolve_sr_conflict): Adjust.
6346
13ca549a
AD
63472001-12-27 Akim Demaille <akim@epita.fr>
6348
6349 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6350
5092aba5
AD
63512001-12-27 Akim Demaille <akim@epita.fr>
6352
6353 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6354 * src/print.c: here.
6355 (lookaheadset, shiftset): New, used as additional storage by
6356 print_reductions.
6357 (print_results): Adjust.
6358 (print_shifts, print_gotos, print_errs): New, extracted from...
6359 (print_actions): here.
6360 * src/print_graph.c (print_actions): Remove dead code.
6361
11e2beca
AD
63622001-12-27 Akim Demaille <akim@epita.fr>
6363
6364 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6365 `$n' and `@n'.
6366
dac3c910
AD
63672001-12-27 Akim Demaille <akim@epita.fr>
6368
6369 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6370 (build_relations): Adjust.
6371
d0b0fefa
AD
63722001-12-27 Akim Demaille <akim@epita.fr>
6373
6374 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6375 duplication.
6376
adc8c848
AD
63772001-12-27 Akim Demaille <akim@epita.fr>
6378
6379 * src/reader.c (packgram): Catch nitems overflows.
6380
14d293ac
AD
63812001-12-27 Akim Demaille <akim@epita.fr>
6382
6383 * src/files.c, src/files.h (guard_obstack): Remove.
6384 * src/output.c (output): Adjust.
6385 * src/reader.c (parse_braces): New, factoring...
6386 (copy_action, copy_guard): these two which are renamed as...
6387 (parse_action, parse_guard): these.
6388 As a voluntary consequence, using braces around guards is now
6389 mandatory.
6390
f499b062
AD
63912001-12-27 Akim Demaille <akim@epita.fr>
6392
6393 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6394 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6395 members.
6396 (symbol_list_new): Adjust.
6397 (copy_action): action_line is the first line, not the last.
6398 (copy_guard): Just as for actions, store the `action' only, not
6399 the switch/case/break flesh.
6400 Don't parse the user action that might follow the guard, let...
6401 (readgram): do it, i.e., now, there can be an action after a
6402 guard.
6403 In other words the guard is just explicitly optional.
6404 (packgram): Adjust.
6405 * src/output.c (guards_output): New.
6406 (output_parser): Call it when needed.
6407 (output): Also free the guard and attrs obstacks.
6408 * src/files.c, src/files.h (obstack_save): Remove.
6409 (output_files): Remove.
6410 As a result, if one needs the former `.act' file, using an
6411 appropriate skeleton which requires actions and guards is now
6412 required.
6413 * src/main.c (main): Adjust.
6414 * tests/semantic.at: New.
6415 * tests/regression.at: Use `input.y' as input file name.
6416 Avoid 8+3 problems by requiring input.c when the test needs the
6417 parser.
6418
d945f5cd
AD
64192001-12-27 Akim Demaille <akim@epita.fr>
6420
6421 * src/reader.c (symbol_list_new): Be sure to initialize all the
6422 fields.
6423
d200e455
AD
64242001-12-27 Akim Demaille <akim@epita.fr>
6425
6426 All the hacks using a final pseudo state are now useless.
6427
6428 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6429 * src/lalr.c (nLA): New.
6430 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6431 instead of lookaheadsp from the pseudo state (nstate + 1).
6432
f9507c28
AD
64332001-12-27 Akim Demaille <akim@epita.fr>
6434
6435 * src/output.c (action_row, token_actions): Use a state_t instead
6436 of a integer, and nlookaheads instead of the following state's
6437 lookaheadsp.
6438
065fbd27
AD
64392001-12-27 Akim Demaille <akim@epita.fr>
6440
6441 * src/conflicts.c (log_resolution, flush_shift)
6442 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6443 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6444 (conflicts_print, print_reductions): Use a state_t instead of an
6445 integer when referring to a state.
6446 As much as possible, depend upon nlookaheads, instead of the
6447 `lookaheadsp' member of the following state (since lookaheads of
6448 successive states are successive, the difference between state n + 1
6449 and n served as the number of lookaheads for state n).
6450 * src/lalr.c (add_lookback_edge): Likewise.
6451 * src/print.c (print_core, print_actions, print_state)
6452 (print_results): Likewise.
6453 * src/print_graph.c (print_core, print_actions, print_state)
6454 (print_graph): Likewise.
6455 * src/conflicts.h: Adjust.
6456
1b177bd7
AD
64572001-12-27 Akim Demaille <akim@epita.fr>
6458
6459 * src/bison.hairy: Formatting/comment changes.
6460 ANSIfy.
6461 Remove `register' indications.
6462 Add plenty of `static'.
6463
7742ddeb
AD
64642001-12-27 Akim Demaille <akim@epita.fr>
6465
6466 * src/output.c (prepare): Drop the muscle `ntbase' which
6467 duplicates ntokens.
6468 * src/bison.simple: Formatting/comment changes.
6469 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6470 is an undocumented synonym.
6471
1fa14068
AD
64722001-12-22 Akim Demaille <akim@epita.fr>
6473
6474 * src/output.c (output_table_data): Change the prototype to use
6475 `int' for array ranges: some invocations do pass an int, not a
6476 short.
6477 Reported by Wayne Green.
6478
b9752825
AD
64792001-12-22 Akim Demaille <akim@epita.fr>
6480
6481 Some actions of web2c.y are improperly triggered.
6482 Reported by Mike Castle.
6483
6484 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6485 * tests/regression.at (Web2c): Rename as...
6486 (Web2c Report): this.
6487 (Web2c Actions): New.
6488
776209d6
AD
64892001-12-22 Akim Demaille <akim@epita.fr>
6490
6491 Reductions in web2c.y are improperly reported.
6492 Reported by Mike Castle.
6493
6494 * src/conflicts.c (print_reductions): Fix.
6495 * tests/regression.at (Web2c): New.
6496
275fc3ad
AD
64972001-12-18 Akim Demaille <akim@epita.fr>
6498
6499 Some host fail on `assert (!"foo")', which expands to
6500 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6501 Reported by Nelson Beebee.
6502
6503 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6504 `#define it_succeeded 0' and `assert (it_succeeded)'.
6505
897668ee
MA
65062001-12-17 Marc Autret <autret_m@epita.fr>
6507
6508 * src/bison.simple: Don't hard code the skeleton line and filename.
6509 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6510 New line counter 'skeleton_line' (skeleton-line muscle).
6511
ab3399e0
PE
65122001-12-17 Paul Eggert <eggert@twinsun.com>
6513
6514 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6515 YYDEBUG must be defined to a nonzero value.
6516
6517 * src/bison.simple (yytname): Do not assume that the user defines
6518 YYDEBUG to a properly parenthesized expression.
6519
3877f72b
AD
65202001-12-17 Akim Demaille <akim@epita.fr>
6521
6522 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6523 nlookaheads is a new member.
6524 Adjust all users.
6525 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6526 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6527 state.
776209d6 6528
331dbc1b
AD
65292001-12-17 Akim Demaille <akim@epita.fr>
6530
6531 * src/files.h, src/files.c (open_files, close_files): Remove.
6532 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6533 let...
6534 * src/reader.c (reader): Do it.
776209d6 6535
be750e4c
AD
65362001-12-17 Akim Demaille <akim@epita.fr>
6537
6538 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 6539
709ae8c6
AD
65402001-12-17 Akim Demaille <akim@epita.fr>
6541
6542 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6543 (flush_reduce): New.
6544 (resolve_sr_conflict): Adjust.
776209d6 6545
f87685c3
AD
65462001-12-17 Akim Demaille <akim@epita.fr>
6547
6548 * src/output.c (output_obstack): Be static and rename as...
6549 (format_obstack): this, to avoid any confusion with files.c's
6550 output_obstack.
6551 * src/reader.h (muscle_obstack): Move to...
6552 * src/output.h: here, since it's defined in output.c.
6553
837491d8
AD
65542001-12-17 Akim Demaille <akim@epita.fr>
6555
6556 * src/output.c (action_row, save_column, default_goto)
6557 (sort_actions, matching_state, pack_vector): Better variable
6558 locality.
6559
796d61fb
AD
65602001-12-17 Akim Demaille <akim@epita.fr>
6561
6562 * src/output.c: Various formatting changes.
776209d6 6563
64d15509
AD
65642001-12-17 Akim Demaille <akim@epita.fr>
6565
6566 * src/files.c (output_files): Free the output_obstack.
6567 * src/main.c (main): Call print and print_graph conditionally.
6568 * src/print.c (print): Work unconditionally.
6569 * src/print_graph.c (print_graph): Work unconditionally.
6570 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6571
fbc8ecb7
MA
65722001-12-16 Marc Autret <autret_m@epita.fr>
6573
6574 * src/output.c (actions_output): Fix. When we use %no-lines,
6575 there is one less line per action.
6576
f0440388
MA
65772001-12-16 Marc Autret <autret_m@epita.fr>
6578
6579 * src/bison.simple: Remove a useless #line directive.
6580 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6581 * src/output.c (get_lines_number): New.
776209d6 6582 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
6583 output muscles.
6584 Fix line numbering.
6585 (actions_output): Computes the number of lines taken by actions.
6586 (output_master_parser): Insert new skeleton which is the name of
6587 the output parser file name.
6588
a79986b8
MA
65892001-12-15 Marc Autret <autret_m@epita.fr>
6590
6591 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6592
4ec8e00f
MA
65932001-12-15 Marc Autret <autret_m@epita.fr>
6594
6595 * src/output.c (output_gram): Keep track of the hairy one.
6596
1a4648ff
AD
65972001-12-15 Akim Demaille <akim@epita.fr>
6598
6599 Make `make distcheck' work.
6600
6601 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6602 system.h which uses libgettext.h.
6603
9c2c67e6
AD
66042001-12-15 Akim Demaille <akim@epita.fr>
6605
6606 * src/nullable.c (set_nullable): Useless rules must be skipped,
6607 otherwise, since we range over their symbols, we might look at a
6608 nonterminal which no longer ``exists'', i.e., it is not counted in
6609 `nvars', hence we overflow our arrays.
6610
93ede233
AD
66112001-12-15 Akim Demaille <akim@epita.fr>
6612
6613 The header can also be produced directly, without any obstack!
6614 Yahoo!
6615
6616 * src/files.c, src/files.h (defines_obstack): Remove.
6617 (compute_header_macro): Global.
6618 (defines_obstack_save): Remove.
6619 * src/reader.c (parse_union_decl): No longer output to
6620 defines_obstack: its content can be found in the `stype' muscle
6621 anyway.
6622 (output_token_translations): Merge into...
6623 (symbols_output): this.
6624 Rename as...
6625 (symbols_save): this.
6626 (reader): Adjust.
6627 * src/output.c (header_output): New.
6628 (output): Call it.
6629
2666f928
AD
66302001-12-15 Akim Demaille <akim@epita.fr>
6631
6632 * src/reader.c (parse_union_decl): Instead of handling two obstack
6633 simultaneously, use one to define the `stype' muscle, and use the
6634 value of the latter to fill defines_obstack.
6635 (copy_comment): Remove.
6636 (copy_comment2): Work for a single obstack.
6637 Rename as...
6638 (copy_comment): this.
6639
428046f8
AD
66402001-12-15 Akim Demaille <akim@epita.fr>
6641
6642 * src/lex.c, src/lex.h (xgetc): No longer static.
6643 * src/reader.c (parse_union_decl): Revamp.
6644
ea52d706
AD
66452001-12-15 Akim Demaille <akim@epita.fr>
6646
6647 Still making progress in separating Bison into (i) input, (ii)
6648 process, (iii) output: now we can directly output the parser file
6649 without using table_obstack at all.
6650
6651 * src/files.c, src/files.h (table_obstack): Bye bye.
6652 (parser_file_name): New.
6653 * src/files.c (compute_output_file_names): Compute it.
6654 * src/output.c (actions_output, output_parser)
6655 (output_master_parser): To a file instead of an obstack.
6656
3f96f4dc
AD
66572001-12-15 Akim Demaille <akim@epita.fr>
6658
6659 Attach actions to rules, instead of pre-outputting them to
6660 actions_obstack.
6661
6662 * src/gram.h (rule_t): action and action_line are new members.
6663 * src/reader.c (symbol_list): Likewise.
6664 (copy_action): Save the actions within the rule.
6665 (packgram): Save them in rule_table.
6666 * src/output.c (actions_output): New.
6667 (output_parser): Use it on `%%actions'.
6668 (output_rule_data): Don't free rule_table.
6669 (output): Do it.
6670 (prepare): Don't save the `action' muscle.
6671 * src/bison.simple: s/%%action/%%actions/.
6672
51576fb3
AD
66732001-12-15 Akim Demaille <akim@epita.fr>
6674
6675 * src/reader.c (copy_action): When --yacc, don't append a `;'
6676 to the user action: let it fail if lacking.
dee049eb 6677 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 6678
2648a72d
AD
66792001-12-14 Akim Demaille <akim@epita.fr>
6680
6681 * src/lex.c (literalchar): Simply return the char you decoded, non
6682 longer mess around with obstacks and int pointers.
6683 Adjust all callers.
6684
92790e5b
AD
66852001-12-14 Akim Demaille <akim@epita.fr>
6686
6687 * src/lex.c (literalchar): Don't escape the special characters,
6688 just decode them, and keep them as char (before, eol was output as
6689 the 2 char string `\n' etc.).
6690 * src/output.c (output_rule_data): Use quotearg to output the
6691 token strings.
6692
927c1557
PE
66932001-12-13 Paul Eggert <eggert@twinsun.com>
6694
6695 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6696 Do not infringe on the global user namespace when using C++.
6697 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6698 All uses of `fprintf' and `stderr' changed.
6699
6700 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6701
ed8e1f68
AD
67022001-12-13 Akim Demaille <akim@epita.fr>
6703
6704 The computation of nullable is broken: it doesn't handle empty
6705 RHS's properly.
6706
6707 * tests/torture.at (GNU AWK Grammar): New.
6708 * tests/sets.at (Nullable): New.
6709 * src/nullable.c (set_nullable): Instead of blindly looping over
6710 `ritems', loop over the rules, and then over their rhs's.
6711
6712 Work around Autotest bugs.
6713
6714 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6715 frame, because Autotest understand lines starting with a `+' as
6716 traces from the shell. Then, they are not processed properly.
6717 Admittedly an Autotest bug, but we don't have time to wait for
6718 Autotest to catch up.
6719 * tests/regression.at (Broken Closure): Adjust to the new table
6720 frames.
6721 Move to...
6722 * tests/sets.at: here.
6723
cb581495
AD
67242001-12-13 Akim Demaille <akim@epita.fr>
6725
6726 * src/closure.c (closure): Use nrules instead of playing tricks
6727 with BITS_PER_WORD.
6728
2e729273
AD
67292001-12-13 Akim Demaille <akim@epita.fr>
6730
6731 * src/print.c (print_actions): Output the handling of `$' as the
6732 traces do: shifting the token EOF. Before EOF was treated as a
6733 nonterminal.
6734 * tests/regression.at: Adjust some tests.
6735 * src/print_graph.c (print_core): Complete the set of items via
6736 closure. The next-to-final and final states are still unsatisfying,
6737 but that's to be addressed elsewhere.
6738 No longer output the rule numbers, but do output the state number.
6739 A single loop for the shifts + gotos is enough, but picked a
6740 distinct color for each.
6741 (print_graph): Initialize and finalize closure.
6742
107f7dfb
AD
67432001-12-13 Akim Demaille <akim@epita.fr>
6744
6745 * src/reader.c (readgram): Remove dead code, an strip useless
6746 braces.
6747 (get_type): Remove, unused.
6748
9b53a24f
AD
67492001-12-12 Akim Demaille <akim@epita.fr>
6750
6751 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6752 on that of lib/error.c.
6753
dbfb6dcd
AD
67542001-12-12 Akim Demaille <akim@epita.fr>
6755
6756 Some hosts don't like `/' in includes.
6757
6758 * src/system.h: Include libgettext.h without qualifying the path.
6759 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6760 $(top_srcdir).
6761
c25fb648
MA
67622001-12-11 Marc Autret <autret_m@epita.fr>
6763
6764 * src/output.c (output_parser): Remove useless muscle.
6765
710ddc4f
MA
67662001-12-11 Marc Autret <autret_m@epita.fr>
6767
6768 * src/bison.simple: Remove #line just before %%epilogue. It
6769 is now handled in ...
6770 * src/reader.c (read_additionnal_code): Add the output of a
6771 #line for the epilogue.
6772
e83d80b8
MA
67732001-12-10 Marc Autret <autret_m@epita.fr>
6774
927c1557 6775 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
6776 replace precedent remove.
6777 * src/bison.simple: Remove #line before %%prologue because
6778 %%input-line is wrong at this time.
6779
971d5158
MA
67802001-12-10 Marc Autret <autret_m@epita.fr>
6781
6782 * src/reader.c (symbols_output): Clean up.
927c1557 6783 * src/output.c (output_gram, output): Clean up.
971d5158 6784
5edafffd
AD
67852001-12-10 Akim Demaille <akim@epita.fr>
6786
6787 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6788 * src/LR0.c (set_state_table): here.
6789 * src/lalr.c (lalr): Call it.
6790
0279f8e9
AD
67912001-12-10 Akim Demaille <akim@epita.fr>
6792
6793 * src/state.h (shifts): Remove the `number' member: shifts are
6794 attached to state, hence no longer need to be labelled with a
6795 state number.
6796
190c4f5f
AD
67972001-12-10 Akim Demaille <akim@epita.fr>
6798
6799 Now that states have a complete set of members, the linked list of
6800 shifts is useless: just fill directly the state's shifts member.
6801
6802 * src/state.h (shifts): Remove the `next' member.
6803 * src/LR0.c (first_state, last_state): Remove.
6804 Adjust the callers.
6805 (augment_automaton): Don't look for the shifts that must be added
6806 a shift on EOF: it is those of the state we looked for! But now,
6807 since shifts are attached, it is no longer needed to looking
6808 merely by its id: its number.
6809
2a73b93d
AD
68102001-12-10 Akim Demaille <akim@epita.fr>
6811
6812 * src/LR0.c (augment_automaton): Better variable locality.
6813 Remove an impossible branch: if there is a state corresponding to
6814 the start symbol being shifted, then there is shift for the start
6815 symbol from the initial state.
6816
74392f6a
AD
68172001-12-10 Akim Demaille <akim@epita.fr>
6818
6819 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6820 only when appropriate: when insert_start_shifting_state' is not
6821 invoked.
6822 * tests/regression.at (Rule Line Numbers): Adjust.
6823
37c82725
AD
68242001-12-10 Akim Demaille <akim@epita.fr>
6825
6826 * src/LR0.c (augment_automaton): Now that all states have shifts,
6827 merge the two cases addition shifts to the initial state.
6828
6a164e0c
AD
68292001-12-10 Akim Demaille <akim@epita.fr>
6830
6831 * src/lalr.c (set_state_table): Move to...
6832 * src/LR0.c: here.
6833 * src/lalr.c (lalr): Don't call it...
6834 * src/LR0.c (generate_states): do it.
6835 * src/LR0.h (first_state): Remove, only the table is used.
6836
7215de24
AD
68372001-12-10 Akim Demaille <akim@epita.fr>
6838
6839 * src/LR0.h (first_shift, first_reduction): Remove.
6840 * src/lalr.c: Don't use first_shift: find shifts through the
6841 states.
6842
80e25d4d
AD
68432001-12-10 Akim Demaille <akim@epita.fr>
6844
6845 * src/LR0.c: Attach shifts to states as soon as they are
6846 computed.
6847 * src/lalr.c (set_state_table): Instead of assigning shifts to
6848 state, just assert that the mapping was properly done.
6849
0ab3728b
AD
68502001-12-10 Akim Demaille <akim@epita.fr>
6851
6852 * src/LR0.c (insert_start_shift): Rename as...
6853 (insert_start_shifting_state): this.
6854 (insert_eof_shifting_state, insert_accepting_state): New.
6855 (augment_automaton): Adjust.
6856 Better locality of the variables.
6857 When looking if the start_symbol is shifted from the initial
6858 state, using `while (... symbol != start_symbol ...)' sounds
6859 better than `while (... symbol < start_symbol ...)': If fail
6860 to see how the order between symbols could be relevant!
6861
78af9bbc
AD
68622001-12-10 Akim Demaille <akim@epita.fr>
6863
6864 * src/getargs.h: Don't declare `spec_name_prefix' and
6865 `spec_file_prefix', declared by src/files.h.
6866 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6867 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6868 * src/output.c (prepare): Adjust.
6869 * src/reader.c (symbols_output): Likewise.
6870 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6871
bdef2a41
AD
68722001-12-10 Akim Demaille <akim@epita.fr>
6873
6874 * src/muscle_tab.c (muscle_init): NULL is a better default than
6875 `"0"'.
6876
3735969c
AD
68772001-12-10 Akim Demaille <akim@epita.fr>
6878
6879 * src/reader.c (reader): Calling symbols_output once is enough.
6880
49701457
AD
68812001-12-10 Akim Demaille <akim@epita.fr>
6882
6883 Now that states have a complete set of members, the linked list of
6884 reductions is useless: just fill directly the state's reductions
6885 member.
6886
6887 * src/state.h (struct reductions): Remove member `number' and
6888 `next'.
6889 * src/LR0.c (first_reduction, last_reduction): Remove.
6890 (save_reductions): Don't link the new reductions, store them in
6891 this_state.
6892 * src/lalr.c (set_state_table): No need to attach reductions to
6893 states, it's already done.
6894 * src/output.c (output_actions): No longer free the shifts, then
6895 the reductions, then the states: free all the states and their
6896 members.
6897
0edad749
AD
68982001-12-10 Akim Demaille <akim@epita.fr>
6899
6900 * src/options.c (OPTN, DRTV, BOTH): New.
6901 (option_table): Use them.
6902
0edad749
AD
6903 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6904 the job of system.h.
6905 * src/options.c: Don't include stdio.h and xalloc.h for the same
6906 reasons.
6907
5449dd0f
AD
69082001-12-10 Akim Demaille <akim@epita.fr>
6909
6910 * src/output.c (output, prepare): Make sure the values of the
6911 muscles `action' and `prologue' are 0-terminated.
6912
a870c567
AD
69132001-12-10 Akim Demaille <akim@epita.fr>
6914
6915 Clean up GCC warnings.
6916
6917 * src/reader.c (copy_action): `buf' is not used.
6918 (parse_skel_decl): Be static.
6919 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6920 * src/options.h (create_long_option_table): Have a real prototype.
6921 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6922 (hash_delete_at): Return const void *.
6923 Adjust casts to preserve the const.
6924
80df8768
AD
69252001-12-10 Akim Demaille <akim@epita.fr>
6926
6927 * configure.in: Require 2.52g.
6928 M4 is not needed, but AUTOM4TE is.
6929 * m4/m4.m4: Remove.
6930 * tests/Makefile.am: Adjust.
6931
f693ad14
AD
69322001-12-10 Akim Demaille <akim@epita.fr>
6933
6934 One structure for states is enough, even though theoretically
6935 there are LR(0) states and LALR(1) states.
6936
6937 * src/lalr.h (state_t): Remove.
6938 (state_table): Be state_t **, not state_t *.
6939 * src/state.h (core, CORE_ALLOC): Rename as...
6940 (state_t, STATE_ALLOC): this.
6941 Add the LALR(1) members: shifts, reductions, errs.
6942 * src/LR0.c (state_table): Rename as...
6943 (state_hash): this, to avoid name clashes with the global
6944 `state_table'.
6945 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6946 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6947
74ffbcb6
AD
69482001-12-10 Akim Demaille <akim@epita.fr>
6949
6950 Bison dumps core on bash.y.
6951 Reported by Pascal Bart.
6952
6953 * src/warshall.c (bitmatrix_print): New.
6954 (TC): Use it.
6955 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6956 j must be the outer loop.
6957 * tests/regression.at (Broken Closure): New.
6958
07708e19
AD
69592001-12-05 Akim Demaille <akim@epita.fr>
6960
6961 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6962 its argument.
ba1ecc07 6963 Reported by Peter Hamorsky.
07708e19 6964
92b16366
AD
69652001-12-05 Akim Demaille <akim@epita.fr>
6966
6967 * src/conflicts.c (err_table): Remove.
6968 (resolve_sr_conflict): Adjust.
6969 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6970 Rename as...
6971 (state_t.reductions, state_t.shifts): this.
6972
076ab033
AD
69732001-12-05 Akim Demaille <akim@epita.fr>
6974
6975 * src/reduce.c (reduce_grammar_tables): No longer disable the
6976 removal of useless rules via CPP but via `if (0)', so that the
6977 compiler still check the code is valid.
6978 For instance, it should have noticed `rline' no longer exists: use
6979 the `line' member of rule_t.
6980 * src/gram.c (dummy, rline): Remove, unused.
6981
3843c413
AD
69822001-12-05 Akim Demaille <akim@epita.fr>
6983
6984 * src/output.c (pack_vector): Use assert, not berror.
6985 * src/main.c (berror): Remove, unused.
6986
43168960
AD
69872001-12-05 Akim Demaille <akim@epita.fr>
6988
6989 New experimental feature: if --verbose --trace output all the
6990 items of a state, not only its kernel.
6991
6992 * src/print.c (print_core): If `trace_flag', then invoke closure
6993 before outputting the items of the state (print_core is no longer
6994 a correct name them).
6995 (print_results): Invoke new_closure/free_closure if needed.
6996
b2872512
AD
69972001-12-05 Akim Demaille <akim@epita.fr>
6998
6999 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7000 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7001 (nitemset): for consistency with the rest of the project.
7002
23cbcc6c
AD
70032001-12-05 Akim Demaille <akim@epita.fr>
7004
7005 * src/closure.c (print_closure): Improve.
7006 (closure): Use it for printing input and output.
7007
03ec521c
AD
70082001-12-05 Akim Demaille <akim@epita.fr>
7009
7010 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7011 indexed by nonterminals.
7012
3a7456dd
AD
70132001-12-05 Akim Demaille <akim@epita.fr>
7014
7015 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7016 what it was!).
7017 * src/warshall.h: Remove accidental duplication of the content.
7018
1cbcf2e7
AD
70192001-12-05 Akim Demaille <akim@epita.fr>
7020
7021 * src/closure.c (set_fderives): De-obfuscate.
7022
84182270
AD
70232001-12-05 Akim Demaille <akim@epita.fr>
7024
7025 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7026
3f6f053c
AD
70272001-12-05 Akim Demaille <akim@epita.fr>
7028
7029 * src/closure.c (set_firsts): De-obfuscate.
7030
7a5350ba
AD
70312001-12-05 Akim Demaille <akim@epita.fr>
7032
7033 * src/output.c (action_row): De-obfuscate
7034 using the good o' techniques: arrays not pointers, variable
7035 locality, BITISSET, RESETBIT etc.
7036
d954473d
AD
70372001-12-05 Akim Demaille <akim@epita.fr>
7038
7039 Pessimize the code to simplify it: from now on, all the states
7040 have a valid SHIFTS, which NSHIFTS is possibly 0.
7041
7042 * src/LR0.c (shifts_new): Be global and move to..
7043 * src/state.c, src/state.h: here.
7044 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7045 * src/print_graph: Adjust.
7046
9839bbe5
AD
70472001-12-05 Akim Demaille <akim@epita.fr>
7048
7049 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7050 * src/conflicts.c: Use it.
7051 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7052 incorrectly ``simplified''.
7053
9f136c07
AD
70542001-12-05 Akim Demaille <akim@epita.fr>
7055
7056 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7057 using the good o' techniques: arrays not pointers, variable
7058 locality, BITISSET, RESETBIT etc.
7059
b608206e
AD
70602001-12-05 Akim Demaille <akim@epita.fr>
7061
7062 * src/state.h (SHIFT_SYMBOL): New.
7063 * src/conflicts.c: Use it to deobfuscate.
7064
52afa962
AD
70652001-12-05 Akim Demaille <akim@epita.fr>
7066
7067 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7068 (print_reductions): De-obfuscate using the good o' techniques:
7069 arrays not pointers, variable locality, BITISSET.
7070
e74dc321
AD
70712001-12-05 Akim Demaille <akim@epita.fr>
7072
7073 * src/conflicts.c (print_reductions): Arrays, not pointers.
7074 Use BITISSET.
7075
768fca83
AD
70762001-12-05 Akim Demaille <akim@epita.fr>
7077
7078 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7079
a17e599f
AD
70802001-12-05 Akim Demaille <akim@epita.fr>
7081
7082 * src/conflicts.c (print_reductions): Improve variable locality.
7083
a04bc341
AD
70842001-12-05 Akim Demaille <akim@epita.fr>
7085
7086 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7087
c8ea038e
AD
70882001-12-05 Akim Demaille <akim@epita.fr>
7089
7090 * src/conflicts.c (print_reductions): Improve variable locality.
7091
aa2aab3c
AD
70922001-12-05 Akim Demaille <akim@epita.fr>
7093
7094 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7095 * src/lalr.c: Use them.
7096
b178c8cc
AD
70972001-12-05 Akim Demaille <akim@epita.fr>
7098
7099 * src/LR0.c (augment_automaton): Formatting changes.
7100 Better variable locality.
7101
f67d13aa
AD
71022001-12-05 Akim Demaille <akim@epita.fr>
7103
7104 * src/lalr.c (matrix_print): New.
7105 (transpose): Use it.
7106 Use arrays instead of pointers.
7107
c2713865
AD
71082001-12-05 Akim Demaille <akim@epita.fr>
7109
7110 * src/lalr.c (maxrhs): Move to...
7111 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7112 * src/lalr.c (build_relations): Adjust.
7113
9887c18a
AD
71142001-12-05 Akim Demaille <akim@epita.fr>
7115
7116 * src/lalr.c (transpose): Free the memory allocated to the
7117 argument, as it is replaced by the results by the unique caller.
7118 (build_relations): Merely invoke transpose: it handles the memory
7119 deallocation.
7120 Improve variable locality.
7121 Avoid variables used as mere abbreviations.
7122 (compute_lookaheads): Use arrays instead of pointers.
7123
4d4f699c
AD
71242001-12-05 Akim Demaille <akim@epita.fr>
7125
7126 * src/lalr.c (initialize_F): Improve variable locality.
7127 Avoid variables used as mere abbreviations.
7128
80a69750
AD
71292001-12-05 Akim Demaille <akim@epita.fr>
7130
7131 * src/derives.c (print_derives): Display the ruleno.
7132 * src/lalr.c (initialize_F, transpose): Better variable locality
7133 to improve readability.
7134 Avoid variables used as mere abbreviations.
7135
fe961097
AD
71362001-12-05 Akim Demaille <akim@epita.fr>
7137
7138 * src/lalr.c (traverse): Use arrays instead of pointers.
7139
e3e4e814
AD
71402001-12-05 Akim Demaille <akim@epita.fr>
7141
7142 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7143 the handling of squeue.
7144 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7145
630e182b
AD
71462001-12-05 Akim Demaille <akim@epita.fr>
7147
7148 Because useless nonterminals are now kept alive (instead of being
7149 `destroyed'), we now sometimes examine them, and store information
7150 related to them. Hence we need to know their number, and adjust
7151 memory allocations.
7152
7153 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7154 static.
7155 * src/LR0.c (allocate_itemsets): The memory allocated to
7156 `symbol_count' was used for two different purpose: once to count
7157 the number of occurrences of each symbol, and later reassigned to
7158 `shift_symbol', containing the symbol that can be shifted from a
7159 given state.
7160 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7161 only, and...
7162 (new_itemsets): Allocate `shift_symbol' here.
7163 (allocate_itemsets): symbol_count includes useless nonterminals.
7164 Make room for them.
7165 (free_storage): Use `free', not `XFREE', for pointers that cannot
7166 be null.
7167
81b51460
AD
71682001-12-05 Akim Demaille <akim@epita.fr>
7169
7170 * src/nullable.c (set_nullable): Deobfuscate the handling of
7171 ritem.
7172 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7173
3067fbef
AD
71742001-12-05 Akim Demaille <akim@epita.fr>
7175
7176 * src/gram.c, src/gram.h (ritem_print): New.
7177 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7178 (This useless function was defined only to work around VMS linkers
7179 that can't handle compilation units with variables only).
7180 * src/reduce.c (dump_grammar): Use it to trace the construction of
7181 ritem.
7182
c2bea5f9
PE
71832001-12-04 Paul Eggert <eggert@twinsun.com>
7184
7d27c823
PE
7185 * src/bison.simple (union yyalloc): Change member names
7186 to be the same as the stack names.
7187 (yyparse): yyptr is now union yyalloc *, not char *.
7188 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7189 and may generate better code on some machines.
c2bea5f9
PE
7190 (yystpcpy): Use prototype if __STDC__ is defined, not just
7191 if __cplusplus is defined.
35687a9d 7192
2c8a9dfa
AD
71932001-11-30 Akim Demaille <akim@epita.fr>
7194
7195 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7196 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7197 Gettext doesn't compile cleanly, and dies with -Werror.
7198 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7199 Include WARNING_CFLAGS here.
7200 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7201 before being defined.
7202
f4e421e6
AD
72032001-11-27 Paul Eggert <eggert@twinsun.com>
7204
7205 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7206 First arg is int, not unsigned.
7207 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7208 (SIZE_MAX, UINT_MAX): New macros.
7209 (quotearg_n_options): Abort if N is negative.
7210 Avoid overflow check on hosts where size_t is 64 bits and int
7211 is 32 bits, as overflow is impossible there.
7212 Fix off-by-one typo that caused unnecessary reallocation.
7213
7093d0f5
AD
72142001-11-29 Paul Eggert <eggert@twinsun.com>
7215
7216 Name space cleanup in generated parser.
7217
7218 * doc/bison.texinfo (Bison Parser): Discuss system headers
7219 and their effect on the user name space.
7220
7221 * src/bison.simple:
7222 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7223 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7224 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7225
7226 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7227 on user names when possible.
7228
7229 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7230 Simplify test for whather <alloca.h> exists.
7231
7232 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7233
7234 (<stdio.h>): Include if YYDEBUG.
7235
7236 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7237 ! defined (yyoverflow) && ! defined (yymemcpy).
7238
7239 (yymemcpy, yyparse): Rename local variables as needed so that
7240 they all begin with 'yy'.
7241
7242 (yystrlen, yystpcpy): New functions.
7243
7244 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7245 All uses changed.
7246
7247 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7248 instead of relying on string.h functions. Use YYSTACK_ALLOC
7249 and YYSTACK_FREE instead of malloc and free.
7250
fd51e5ff
AD
72512001-11-30 Akim Demaille <akim@epita.fr>
7252
7253 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7254 before their first uses.
7255 (YYBISON, YYPURE): Move to the top of the output.
7256
7d13ff5f
AD
72572001-11-30 Akim Demaille <akim@epita.fr>
7258
7259 * tests/reduce.at (Useless Nonterminals): Fix.
7260
892a3995
AD
72612001-11-30 Akim Demaille <akim@epita.fr>
7262
7263 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7264 if body instead of `;' to pacify GCC's warnings.
7265
68f1e3ed
AD
72662001-11-30 Akim Demaille <akim@epita.fr>
7267
7268 Instead of mapping the LHS of unused rules to -1, keep the LHS
7269 valid, but flag the rules as invalid.
7270
7271 * src/gram.h (rule_t): `useful' is a new member.
7272 * src/print.c (print_grammar): Adjust.
7273 * src/derives.c (set_derives): Likewise.
7274 * src/reader.c (packgram, reduce_output): Likewise.
7275 * src/reduce.c (reduce_grammar_tables): Likewise.
7276 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7277
d2d1b42b
AD
72782001-11-30 Akim Demaille <akim@epita.fr>
7279
7280 * src/reduce.c (reduce_output): Formatting changes.
7281 * src/print.c (print_results, print_grammar): Likewise.
7282 * tests/regression.at (Rule Line Numbers)
7283 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7284
760b53a8
AD
72852001-11-30 Akim Demaille <akim@epita.fr>
7286
7287 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7288 useless nonterminals, move them at the end of the symbol arrays.
7289 (reduce_output): Adjust.
7290 * tests/reduce.at (Useless Nonterminals): Adjust.
7291
00238958
AD
72922001-11-30 Akim Demaille <akim@epita.fr>
7293
7294 * src/reduce.c: Various comment/formatting changes.
7295 (nonterminals_reduce): New, extracted from...
7296 (reduce_grammar_tables): here.
7297 (reduce_grammar): Call nonterminals_reduce.
7298
396452de
PE
72992001-11-29 Paul Eggert <eggert@twinsun.com>
7300
7301 * src/bison.simple (YYSTACK_REALLOC): Remove.
7302 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7303 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7304 New macros.
7305 (union yyalloc): New type.
7306 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7307 an arbitrary restriction on hosts where size_t is wider than int.
7308
7309 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7310 a parser stack overflow. Allocate just one block of memory for all
7311 three stacks, instead of allocating three blocks; this typically is
7312 faster and reduces fragmentation.
7313
7314 Do not limit the number of items in the stack to a value that fits
7315 in 'int', as this is an arbitrary limit on hosts with 64-bit
7316 size_t and 32-bit int.
7317
147e184c
MA
73182001-11-29 Marc Autret <autret_m@epita.fr>
7319
7320 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7321 of defining YYERROR_VERBOSE.
7322 [AT_DATA]: $4 is now out of C declarations in the prologue.
7323
426cf563
MA
73242001-11-28 Marc Autret <autret_m@epita.fr>
7325
7326 * src/reader.c (parse_dquoted_param): New.
7327 (parse_skel_decl): Use it.
7328 * src/lex.h: Add its prototype.
7329 * src/lex.c (literalchar): Become not static.
7330
c7925b99
MA
73312001-11-28 Marc Autret <autret_m@epita.fr>
7332
7333 * src/output.h: And put its extern declaration here.
7334 * src/output.c (error_verbose): Define here.
7335 (prepare): Echo name modification.
7336 * src/getargs.h: Clean its extern declaration.
7337 * src/getargs.c (error_verbose_flag): Remove.
7338 (getargs): Remove case 'e'.
7339 * src/options.c (option_table): 'error-verbose' is now seen as simple
7340 percent option.
7341 Include output.h.
7342
7343 * src/reader.c (read_declarations): Remove case tok_include.
7344 (parse_include_decl): Remove.
7345 * src/lex.h (token_t): Remove tok_include.
7346 * src/options.c (option_table): 'include' is now a simple command line
7347 option.
7348
5b5d1929
MA
73492001-11-28 Marc Autret <autret_m@epita.fr>
7350
7351 * src/bison.simple: Adjust muscle names.
7352 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7353 * src/output.c (prepare): s/_/-/ for the muscles names.
7354 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7355
8850be4b
MA
73562001-11-28 Marc Autret <autret_m@epita.fr>
7357
7358 * src/bison.simple: Fix debug.
7359 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7360
4a38e613
AD
73612001-11-28 Akim Demaille <akim@epita.fr>
7362
7363 * src/LR0.c (shifts_new): New.
7364 (save_shifts, insert_start_shift, augment_automaton): Use it.
7365
4b35e1c1
AD
73662001-11-28 Akim Demaille <akim@epita.fr>
7367
7368 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7369 keep ruleno only.
7370
d2b04478
AD
73712001-11-28 Akim Demaille <akim@epita.fr>
7372
7373 * src/closure.c (closure): Instead of looping over word in array
7374 then bits in words, loop over bits in array.
7375
2c4c30aa
AD
73762001-11-28 Akim Demaille <akim@epita.fr>
7377
7378 * src/closure.c (closure): No longer optimize the special case
7379 where all the bits of `ruleset[r]' are set to 0, to make the code
7380 clearer.
7381
576890b7
AD
73822001-11-28 Akim Demaille <akim@epita.fr>
7383
7384 * src/closure.c (closure): `r' and `c' are new variables, used to
7385 de-obfuscate accesses to RULESET and CORE.
7386
cb487d7d
AD
73872001-11-28 Akim Demaille <akim@epita.fr>
7388
7389 * src/reduce.c (reduce_print): Use ngettext.
7390 (dump_grammar): Improve the trace accuracy.
7391
6013d43f
AD
73922001-11-28 Akim Demaille <akim@epita.fr>
7393
7394 * src/reduce.c (dump_grammar): Don't translate trace messages.
7395
cb4956ee
AD
73962001-11-28 Akim Demaille <akim@epita.fr>
7397
7398 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7399 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7400 as all tags are free'ed afterwards.
7401 From Enrico Scholz.
7402
648185ab
PE
74032001-11-27 Paul Eggert <eggert@twinsun.com>
7404
7405 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7406 use alloca when we didn't want to, and vice versa.
7407
68254a03
MA
74082001-11-27 Marc Autret <autret_m@epita.fr>
7409
9113b58f
AD
7410 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7411 initialization.
68254a03
MA
7412 * src/output.c (prepare): Remove its update.
7413
04d843a2
MA
74142001-11-27 Marc Autret <autret_m@epita.fr>
7415
7416 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7417 Use %error-verbose.
7418
d2079671 74192001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
7420
7421 * src/bison.simple: Remove YYERROR_VERBOSE using.
7422 Use %%error_verbose.
7423 (yyparse): Likewise.
7424 * src/output.c (prepare): Give its final value.
7425 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7426 * src/getargs.h: Add its extern declaration.
7427 * src/getargs.c (error_verbose_flag): New int.
7428 (getargs): Update to catch new case.
7429 * src/options.c (option_table): 'error-verbose' is a new option.
7430 (shortopts): Update.
7431
e0327bc8
AD
74322001-11-27 Akim Demaille <akim@epita.fr>
7433
7434 * src/system.h: Use intl/libgettext.h.
7435 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7436
000f1a3c
AD
74372001-11-27 Akim Demaille <akim@epita.fr>
7438
7439 * tests/torture.at (Exploding the Stack Size with Malloc):
7440 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7441
26cfe0be
AD
74422001-11-27 Akim Demaille <akim@epita.fr>
7443
7444 * src/files.c: Include error.h.
7445 Reported by Hans Aberg.
7446
f6bd5427
MA
74472001-11-26 Marc Autret <autret_m@epita.fr>
7448
d2079671 7449 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
7450 (read_declarations): Add case tok_include.
7451 * src/getargs.h (include): Add its extern definition.
7452 * src/getargs.c (include): New const char *.
7453 (getargs): Add case '-I'.
7454 * src/options.c (option_table): Add include as command line and
7455 percent option.
7456 * src/lex.h (token_t): Add tok_include.
7457
2ca209c1
AD
74582001-11-26 Akim Demaille <akim@epita.fr>
7459
7460 * src/reader.c (readgram): Make sure rules for mid-rule actions
7461 have a lineno equal to that of their host rule.
7462 Reported by Hans Aberg.
7463 * tests/regression.at (Rule Line Numbers): New.
7464
0e41b407
AD
74652001-11-26 Akim Demaille <akim@epita.fr>
7466
7467 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7468 size_ts.
7469
74702001-11-26 Akim Demaille <akim@epita.fr>
7471
7472 * src/complain.c, src/complain.h (error): Remove, provided by
7473 lib/error.[ch].
7474
e0c40012
AD
74752001-11-26 Akim Demaille <akim@epita.fr>
7476
7477 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7478 issue an error message.
7479 * tests/regression.at (Invalid %directive): New.
7480 Reported by Hans Aberg.
7481
5e147124
AD
74822001-11-26 Akim Demaille <akim@epita.fr>
7483
7484 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7485 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7486
a034c8b8
AD
74872001-11-26 Akim Demaille <akim@epita.fr>
7488
7489 * src/conflicts.c (conflicts_print): Don't complain at all when
7490 there are no reduce/reduce conflicts, and as many shift/reduce
7491 conflicts as expected.
7492 * tests/regression.at (%expect right): Adjust.
7493
c64a20f3
AD
74942001-11-23 Akim Demaille <akim@epita.fr>
7495
7496 * lib/alloca.c: Update, from fileutils.
7497
5b0d29bb
AD
74982001-11-23 Akim Demaille <akim@epita.fr>
7499
7500 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7501
722c4bfe
AD
75022001-11-23 Akim Demaille <akim@epita.fr>
7503
7504 * src/system.h: Include alloca.h.
7505 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7506
6255b435
AD
75072001-11-23 Akim Demaille <akim@epita.fr>
7508
7509 * src/print_graph.c (print_actions): Remove `rule', unused.
7510 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7511 pacify GCC's signed < unsigned warnings.
7512 * src/closure.c (itemsetsize): Likewise.
7513 * src/reader.c (symbol_list_new): Static.
7514
b29b2ed5
AD
75152001-11-23 Akim Demaille <akim@epita.fr>
7516
7517 Attaching lineno to buckets is stupid, since only one copy of each
7518 symbol is kept, only the line of the first occurrence is kept too.
7519
7520 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7521 * src/reader.c (rline_allocated): Remove, unused.
7522 (symbol_list): Have a `line' member.
7523 (symbol_list_new): New.
7524 (readgram): Use it.
7525 * src/print.c (print_grammar): Output the rule line numbers.
7526 * tests/regression.at (Solved SR Conflicts)
7527 (Unresolved SR Conflicts): Adjust.
7528 Reported by Hans Aberg.
7529
a81b1d4a
MA
75302001-11-22 Marc Autret <autret_m@epita.fr>
7531
7532 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7533
c1ecb3c1
MA
75342001-11-22 Marc Autret <autret_m@epita.fr>
7535
7536 * src/muscle_tab.c (muscle_init): Remove initialization of
7537 skeleton muscle.
7538 * src/output.c (output_master_parser): Do it here.
7539
fbe01355
AD
75402001-11-20 Akim Demaille <akim@epita.fr>
7541
7542 * po/sv.po: New.
7543 * configure.in (ALL_LINGUAS): Adjust.
7544 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7545 longer contains strings to translate.
7546
81e895c0
AD
75472001-11-19 Akim Demaille <akim@epita.fr>
7548
7549 * src/conflicts.c (conflicts_print): Add a missing \n.
7550
6bb1878b
AD
75512001-11-19 Akim Demaille <akim@epita.fr>
7552
7553 * src/nullable.c (nullable_print): New.
7554 (set_nullable): Call it when tracing.
7555 Better locality of variables.
7556
d9ec2d07
AD
75572001-11-19 Akim Demaille <akim@epita.fr>
7558
7559 * src/print.c (print_actions): Better locality of variables.
7560
720e5c1b
AD
75612001-11-19 Akim Demaille <akim@epita.fr>
7562
7563 * src/derives.c (print_derives): Fix and enrich.
7564 * src/closure.c (print_fderives): Likewise.
7565
fb908786
AD
75662001-11-19 Akim Demaille <akim@epita.fr>
7567
7568 * src/closure.c (itemsetend): Remove, replaced with...
7569 (itemsetsize): new.
7570
125ecb56
AD
75712001-11-19 Akim Demaille <akim@epita.fr>
7572
7573 * src/LR0.c (kernel_end): Remove, replaced with...
7574 (kernel_size): new.
7575
d8cf039f
AD
75762001-11-19 Akim Demaille <akim@epita.fr>
7577
7578 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7579 to clarify.
7580
7bec0760
AD
75812001-11-19 Akim Demaille <akim@epita.fr>
7582
7583 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7584
c87d4863
AD
75852001-11-19 Akim Demaille <akim@epita.fr>
7586
7587 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7588 trace messages.
7589 * src/LR0.c: Likewise.
7590 (allocate_itemsets): Use arrays instead of pointers to clarify.
7591
9bfe901c
AD
75922001-11-19 Akim Demaille <akim@epita.fr>
7593
7594 * src/getargs.c (statistics_flag): Replace with...
7595 (trace_flag): New.
7596 (longopts): Accept --trace instead of --statistics.
7597 * src/getargs.h, src/options.c: Adjust.
7598 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7599 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7600
97db7bd4
AD
76012001-11-19 Akim Demaille <akim@epita.fr>
7602
cc72668c 7603 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
7604 pointers to clarify the code.
7605 (save_reductions, save_shifts): Factor common parts of alternatives.
7606
2c5f66ed
AD
76072001-11-19 Akim Demaille <akim@epita.fr>
7608
7609 * src/LR0.c (new_state, get_state): Complete TRACE code.
7610 * src/closure.c: Include `reader.h' to get `tags', needed by the
7611 trace code.
7612 Rename the conditional DEBUG as TRACE.
7613 Output consistently TRACEs to stderr, not stdout.
7614 * src/derives.c: Likewise.
7615 * src/reduce.c: (inaccessable_symbols): Using if is better style
7616 than goto.
7617 Use `#if TRACE' instead of `#if 0' for tracing code.
7618
300f275f
AD
76192001-11-19 Akim Demaille <akim@epita.fr>
7620
7621 * src/system.h (LIST_FREE, shortcpy): New.
7622 * src/LR0.c: Use them.
7623 * src/output.c (free_itemsets, free_reductions, free_shifts):
7624 Remove, replaced by LIST_FREE.
7625
f59c437a
AD
76262001-11-19 Akim Demaille <akim@epita.fr>
7627
7628 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7629 (REDUCTIONS_ALLOC): New.
7630 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7631 allocation.
7632
6986fd9e
AD
76332001-11-19 Akim Demaille <akim@epita.fr>
7634
7635 * src/LR0.c (new_state): Complete trace code.
7636 * src/nullable.c (set_nullable): Don't translate traces.
7637
4bc30f78
AD
76382001-11-19 Akim Demaille <akim@epita.fr>
7639
7640 * src/print_graph.c (print_core): Better locality of variables.
7641 * src/print.c (print_core): Likewise.
7642
08a946e0
AD
76432001-11-19 Akim Demaille <akim@epita.fr>
7644
7645 * src/vcg.c: You do the output, so you are responsible of the
7646 handling of VCG syntax, in particular: use quotearg.
7647 * src/print_graph.c: Don't.
7648 (print_actions): Don't output the actions as part of the nodes,
7649 since that's the job of the edges.
7650 (print_state): Don't output by hand: fill the node description,
9bfe901c 7651 and ask for its output.
08a946e0 7652
f0473484
AD
76532001-11-19 Akim Demaille <akim@epita.fr>
7654
cc72668c
AD
7655 * src/bison.simple (yyparse): When verbosely reporting an error,
7656 no longer put additional quotes around token names.
f0473484
AD
7657 * tests/calc.at: Adjust.
7658
e41dc700
AD
76592001-11-19 Akim Demaille <akim@epita.fr>
7660
7661 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7662 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7663 * src/output.c: Adjust.
7664
652a871c
AD
76652001-11-19 Akim Demaille <akim@epita.fr>
7666
7667 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7668 (rule_t): this.
7669 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7670
b2ed6e58
AD
76712001-11-19 Akim Demaille <akim@epita.fr>
7672
7673 * src/gram.h (rule_t): New.
7674 (rule_table): New.
7675 (rrhs, rlhs): Remove, part of state_t.
7676 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7677 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7678 * src/reader.c, src/reduce.c: Adjust.
7679
edad7067
AD
76802001-11-19 Akim Demaille <akim@epita.fr>
7681
7682 * src/reader.c (symbols_output): New, extracted from...
7683 (packsymbols): Here.
7684 (reader): Call it.
7685
3feec034
AD
76862001-11-19 Akim Demaille <akim@epita.fr>
7687
7688 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7689 (maxrhs): this new function.
7690
ddcd5fdf
AD
76912001-11-19 Akim Demaille <akim@epita.fr>
7692
cc72668c 7693 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
7694 Adjust.
7695
bb527fc2
AD
76962001-11-19 Akim Demaille <akim@epita.fr>
7697
cc72668c 7698 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
7699 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7700 * src/lalr.c: Adjust.
7701
a845a697
AD
77022001-11-19 Akim Demaille <akim@epita.fr>
7703
7704 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7705 (set_state_table): handle the `lookaheads' members.
7706
f004bf6a
AD
77072001-11-19 Akim Demaille <akim@epita.fr>
7708
cc72668c
AD
7709 * src/lalr.h (lookaheads): Removed array, whose contents is now
7710 a member of...
f004bf6a
AD
7711 (state_t): this structure.
7712 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7713 Adjust.
7714
de326cc0
AD
77152001-11-19 Akim Demaille <akim@epita.fr>
7716
cc72668c
AD
7717 * src/lalr.h (consistent): Removed array, whose contents is now
7718 a member of...
de326cc0
AD
7719 (state_t): this structure.
7720 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7721 Adjust.
7722
90b4416b
AD
77232001-11-19 Akim Demaille <akim@epita.fr>
7724
cc72668c
AD
7725 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7726 contents are now members of...
90b4416b
AD
7727 (state_t): this structure.
7728 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7729 Adjust.
7730
9703cc49
AD
77312001-11-19 Akim Demaille <akim@epita.fr>
7732
7733 * src/lalr.h (state_t): New.
7734 (state_table): Be a state_t * instead of a core **.
7735 (accessing_symbol): Remove, part of state_t.
7736 * src/lalr.c: Adjust.
7737 (set_accessing_symbol): Merge into...
7738 (set_state_table): this.
7739 * src/print_graph.c, src/conflicts.c: Adjust.
7740
d803322e
AD
77412001-11-14 Akim Demaille <akim@epita.fr>
7742
7743 * tests/calc.at, tests/output.at, tests/regression.at,
7744 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7745 now the tests are run in private dirs, therefore AC_CLEANUP and
7746 family can be simplified to 0-ary.
7747 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7748 use abs. path to find config.h.
7749 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7750 stderr, there can be way too much random noise.
7751 Instead pass -Werror to GCC and rely on the exit status.
7752 Reported by Wolfram Wagner.
7753
3d76b07d
AD
77542001-11-14 Akim Demaille <akim@epita.fr>
7755
7756 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7757 defined only if yyoverflow is defined, to avoid `warning: unused
7758 variable `yyvs1''.
7759 Reported by The Test Suite.
7760
09b503c8
AD
77612001-11-14 Akim Demaille <akim@epita.fr>
7762
7763 * src/print.c: Include reduce.h.
7764 Reported by Hans Aberg.
7765
77662001-11-14 Akim Demaille <akim@epita.fr>
7767
7768 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7769 Revert a previous patch: these are really const.
7770 * src/conflicts.c (conflict_report): Additional useless pair of
7771 braces to pacify GCC's warnings for `if () if () {} else {}'.
7772 * src/lex.c (parse_percent_token): Replace equal_offset with
7773 arg_offset.
7774 arg is const.
7775 Be sure to strdup `arg' when used, since there is no reason for
7776 token_buffer not to change.
7777
0f37a994
AD
77782001-11-14 Akim Demaille <akim@epita.fr>
7779
7780 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7781 definition.
7782 * src/main.c (main): Use them.
7783 Suggested by Hans Aberg.
7784
d39d93b8
AD
77852001-11-12 Akim Demaille <akim@epita.fr>
7786
7787 * src/system.h (ngettext): Now that we use ngettext, be sure to
7788 provide a default definition when NLS are not used.
7789
9edcd895
AD
77902001-11-12 Akim Demaille <akim@epita.fr>
7791
7792 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7793 Use @kbd to denote user input.
7794 (Language and Grammar): ANSIfy the example.
7795 Adjust its layout for info/notinfo.
7796 (Location Tracking Calc): Output error messages to stderr.
7797 Output locations in a more GNUtically correct way.
7798 Fix a couple of Englishos.
7799 Adjust @group/@end group pairs.
7800
7da99ede
AD
78012001-11-12 Akim Demaille <akim@epita.fr>
7802
e3aa65c5 7803 %expect was not functioning at all.
7da99ede
AD
7804
7805 * src/conflicts.c (expected_conflicts): Set to -1.
7806 (conflict_report): Use ngettext.
7807 (conflicts_print): Check %expect and make its violation an error.
7808 * doc/bison.texinfo (Expect Decl): Adjust.
7809 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7810 * tests/regression.at (%expect not enough, %expect right)
7811 (%expect too much): New.
7812
ba9dda1a
AD
78132001-11-12 Akim Demaille <akim@epita.fr>
7814
7815 * tests/regression.at (Conflicts): Rename as...
7816 (Unresolved SR Conflicts): this.
7817 (Solved SR Conflicts): New.
7818
337c5bd1
AD
78192001-11-12 Akim Demaille <akim@epita.fr>
7820
7821 * src/reduce.c (print_results): Rename as...
7822 (reduce_output): This.
7823 Output to OUT, passed as argument, instead of output_obstack.
7824 (dump_grammar): Likewise.
7825 (reduce_free): New.
7826 Also free V1.
7827 (reduce_grammar): No longer call reduce_output, since...
7828 * src/print.c (print_results): do it.
7829 * src/main.c (main): Call reduce_free;
7830
c73a41af
AD
78312001-11-12 Akim Demaille <akim@epita.fr>
7832
7833 * src/conflicts.c (print_reductions): Accept OUT as argument.
7834 Output to it, not to output_obstack.
7835 * src/print.c (print_actions): Adjust.
7836
0df87bb6
AD
78372001-11-12 Akim Demaille <akim@epita.fr>
7838
7839 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7840 the result instead of using...
7841 (src_total, rrc_total, src_count, rrc_count): Remove.
7842 (any_conflicts): Remove.
7843 (print_conflicts): Split into...
7844 (conflicts_print, conflicts_output): New.
7845 * src/conflicts.h: Adjust.
7846 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 7847 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
7848 * tests/regression.at (Conflicts): New.
7849 Reported by Tom Lane.
7850
e4d3d4de
AD
78512001-11-12 Akim Demaille <akim@epita.fr>
7852
7853 * tests/regression.at (Invalid input): Remove, duplicate with
7854 ``Invalid input: 1''.
7855
6d7d248e
AD
78562001-11-12 Akim Demaille <akim@epita.fr>
7857
7858 * tests/torture.at (AT_DATA_STACK_TORTURE)
7859 (Exploding the Stack Size with Alloca)
7860 (Exploding the Stack Size with Malloc): New.
7861
e9e4c321
AD
78622001-11-12 Akim Demaille <akim@epita.fr>
7863
7864 * src/bison.simple (YYSTACK_REALLOC): New.
7865 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 7866 Reported by Per Allansson.
e9e4c321 7867
5f7e0832
AD
78682001-11-12 Pascal Bart <pascal.bart@epita.fr>
7869
7870 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7871 define CPP macro, which substitute YYSTYPE by yystype.
7872 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7873 with yyltype/YYLTYPE. This allows inclusion of the generated
7874 header within the parser if the compiler, such as GGC, accepts
7875 multiple equivalent #defines.
7876 From Akim.
7877
e3f1699f
AD
78782001-11-05 Akim Demaille <akim@epita.fr>
7879
7880 * src/reader.c (symbols_output): New, extracted from...
7881 (packsymbols): here.
7882 (reader): Adjust.
7883
65be0866
AD
78842001-11-05 Akim Demaille <akim@epita.fr>
7885
7886 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7887
e4d910bf
AD
78882001-11-05 Akim Demaille <akim@epita.fr>
7889
7890 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7891 pattern.
7892
951366c1
AD
78932001-11-05 Akim Demaille <akim@epita.fr>
7894
7895 * src/options.h (struct option_table_struct): set_flags is void*.
7896 * src/options.c (longopts): Support `--output' and `%output'.
7897 (usage): Adjust.
7898 * src/lex.h (tok_setopt): Remove, replaced with...
7899 (tok_intopt, tok_stropt): these new guys.
7900 * src/lex.c (getopt.h): Not needed.
7901 (token_buffer, unlexed_token_buffer): Not const.
7902 (percent_table): Promote `-' over `_' in directive names.
7903 Active `%name-prefix', `file-prefix', and `output'.
7904 (parse_percent_token): Accept possible arguments to directives.
7905 Promote `-' over `_' in directive names.
7906
d8988b2f
AD
79072001-11-04 Akim Demaille <akim@epita.fr>
7908
7909 * doc/bison.texinfo (Decl Summary): Split the list into
7910 `directives for grammars' and `directives for bison'.
7911 Sort'em.
7912 Add description of `%name-prefix', `file-prefix', and `output'.
7913 Promote `-' over `_' in directive names.
7914 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7915 Simplify the description of `--name-prefix'.
7916 Promote `-' over `_' in directive names.
7917 Promote `--output' over `--output-file'.
7918 Fix the description of `--defines'.
7919 * tests/output.at: Exercise %file-prefix and %output.
7920
6468d18e
AD
79212001-11-02 Akim Demaille <akim@epita.fr>
7922
7923 * doc/refcard.tex: Update.
7924
6b7e85b9
AD
79252001-11-02 Akim Demaille <akim@epita.fr>
7926
7927 * src/symtab.h (SUNDEF): New.
7928 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7929 stand for `uninitialized', instead of 0.
7930 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7931 * src/lex.c (lex): Adjust.
7932
7933 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7934 Number it 0.
7935 Let yylex return it instead of a plain 0.
7936 Reported by Dick Streefland.
7937
cd5aafcf
AD
79382001-11-02 Akim Demaille <akim@epita.fr>
7939
7940 * tests/regression.at (Mixing %token styles): New test.
7941
037ca2f1
AD
79422001-11-02 Akim Demaille <akim@epita.fr>
7943
7944 * src/reader.c (parse_thong_decl): Formatting changes.
7945 (token_translations_init): New, extracted from...
7946 (packsymbols): Here.
7947 Adjust.
7948
270a173c
AD
79492001-11-01 Akim Demaille <akim@epita.fr>
7950
7951 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7952 Check that `9foo.y' produces correct cpp guards.
7953 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7954 guards.
7955 Reported by Wwp.
7956
561f9a30
AD
79572001-11-01 Akim Demaille <akim@epita.fr>
7958
7959 * tests/regression.at (Invalid input: 2): New.
7960 * src/lex.c (unlexed_token_buffer): New.
7961 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7962 too.
7963 Reported by Wwp.
7964
f987e9d2
AD
79652001-11-01 Akim Demaille <akim@epita.fr>
7966
7967 * tests/calc.at: Catch up with 1.30.
7968 * configure.in: Bump to 1.49a.
7969 Adjust to newer Autotest.
7970
0846f581
PB
79712001-10-19 Pascal Bart <pascal.bart@epita.fr>
7972
7973 * src/conflicts.c: Move global variables rrc_total and src_total ...
7974 (print_conflicts): here.
7975 * src/output.c (output): Free global variable user_toknums.
7976 * src/lex.c (token_obstack): Become static.
7977
3c1a79b3
AD
79782001-10-18 Akim Demaille <akim@epita.fr>
7979
7980 * tests/atlocal.in (GCC): Add.
7981 * tests/calc.at: s/m4_match/m4_bmatch/.
7982 s/m4_patsubst/m4_bpatsubst/.
7983 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7984 * configure.in: AC_SUBST(GCC).
7985
5d52e7d0
MA
79862001-10-14 Marc Autret <autret_m@epita.fr>
7987
7988 * src/options.c (create_long_option_table): Fix.
7989
631aa1d3
AD
79902001-10-10 Akim Demaille <akim@epita.fr>
7991
7992 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7993
f6ec6d13
AD
79942001-10-04 Akim Demaille <akim@epita.fr>
7995
7996 * src/reader.c (parse_union_decl): Push the caracters in
7997 union_obstack, not attrs_obstack.
7998
342b8b6e
AD
79992001-10-04 Akim Demaille <akim@epita.fr>
8000
8001 Merge in the branch 1.29.
8002
8003 * src/reader.c (packsymbols): Use a temporary obstack for
8004 `%%tokendef', since output_stack is already used elsewhere.
8005
8006 2001-10-02 Akim Demaille <akim@epita.fr>
8007
8008 Bump 1.29d.
8009
8010 2001-10-02 Akim Demaille <akim@epita.fr>
8011
8012 Version 1.29c.
8013
8014 2001-10-02 Akim Demaille <akim@epita.fr>
8015
8016 * tests/regression.at (Invalid CPP headers): New.
8017 From Alexander Belopolsky.
8018 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8019
8020 2001-10-02 Akim Demaille <akim@epita.fr>
8021
8022 * tests/regression.at (Invalid input): New.
8023 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8024 Reported by Shura.
8025
8026 2001-10-02 Akim Demaille <akim@epita.fr>
8027
8028 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8029
8030 2001-10-02 Akim Demaille <akim@epita.fr>
8031
8032 * src/output.c (output_parser): Assert `skeleton'.
8033 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8034 systems.
8035 From Shura.
8036
8037 2001-10-01 Marc Autret <autret_m@epita.fr>
8038
8039 * src/lex.h: Echo modifications.
8040 * src/lex.c (unlex): Parameter is now token_t.
8041 From Hans Aberg.
8042
8043 2001-10-01 Marc Autret <autret_m@epita.fr>
8044
8045 * src/main.c: Include lex.h.
8046 From Hans Aberg.
8047
8048 2001-09-29 Akim Demaille <akim@epita.fr>
8049
8050 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8051
8052 2001-09-28 Akim Demaille <akim@epita.fr>
8053
8054 * tests/testsuite.at: Update to newer Autotest.
8055 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8056
8057 2001-09-27 Akim Demaille <akim@epita.fr>
8058
8059 Position independent wrapper.
8060
8061 * tests/bison: Remove.
8062 * tests/bison.in: New.
8063 * configure.in: Adjust.
8064
8065 2001-09-27 Paul Eggert <eggert@twinsun.com>
8066
8067 Port quotearg fixes from tar 1.13.24.
8068
8069 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8070 tm to be declared.
8071 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8072 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8073
8074 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8075 * m4/mbrtowc.m4: New file.
8076 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8077 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8078
8079 2001-09-27 Akim Demaille <akim@epita.fr>
8080
8081 Bump to 1.29c.
8082
8083 2001-09-27 Akim Demaille <akim@epita.fr>
8084
8085 Version 1.29b.
8086
8087 2001-09-25 Akim Demaille <akim@epita.fr>
8088
8089 * src/system.h: Include `xalloc.h'.
8090 Remove it from the C files.
8091 * src/files.c (output_files): Free the obstacks.
8092 * src/lex.c (init_lex): Rename as...
8093 (lex_init): this.
8094 (lex_free): New.
8095 * src/main.c (main): Use it.
8096
8097 2001-09-24 Marc Autret <autret_m@epita.fr>
8098
8099 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8100 to output informations in fout (FILE*).
8101 (open_graph, close_graph): Likewise.
8102 (output_graph, output_edge, output_node): Likewise.
8103 * src/vcg.h: Update function prototypes.
8104 * src/print_graph.c (print_graph): Open output graph file.
8105 (print_actions): Adjust.
8106 * src/files.h: Remove extern declaration.
8107 * src/files.c: Remove graph_obstack declaration.
8108 (open_files): Remove graph_obstack initialization.
8109 (output_files): Remove graph_obstack saving.
8110
8111 2001-09-24 Marc Autret <autret_m@epita.fr>
8112
8113 * src/files.c (compute_output_file_names): Fix.
8114
8115 2001-09-24 Marc Autret <autret_m@epita.fr>,
8116 Akim Demaille <akim@epita.fr>
8117
8118 * src/reader.c (reader): Remove call to free_symtab ().
8119 * src/main.c (main): Call it here.
8120 Include symtab.h.
8121 * src/conflicts.c (initialize_conflicts): Rename as...
8122 (solve_conflicts): this.
8123 * src/print.c (print_core, print_actions, print_state)
8124 (print_grammar): Dump to a file instead a `output_obstack'.
8125 (print_results): Dump `output_obstack', and then proceed with the
8126 FILE *.
8127 * src/files.c (compute_output_file_names, close_files): New.
8128 (output_files): Adjust.
8129 * src/main.c (main): Adjust.
8130
8131 2001-09-23 Marc Autret <autret_m@epita.fr>
8132
8133 * src/files.c (compute_header_macro): Computes header macro name
8134 from spec_defines_file when given.
8135
8136 2001-09-23 Marc Autret <autret_m@epita.fr>
8137
8138 * src/files.c (output_files): Add default extensions.
8139
8140 2001-09-22 Akim Demaille <akim@epita.fr>
8141
8142 * src/conflicts.c (finalize_conflicts): Rename as...
8143 (free_conflicts): this.
8144
8145 2001-09-22 Akim Demaille <akim@epita.fr>
8146
8147 * src/gram.c (gram_free): Rename back as...
8148 (dummy): this.
8149 (output_token_translations): Free `token_translations'.
8150 * src/symtab.c (free_symtab): Free the tag field.
8151
8152 2001-09-22 Akim Demaille <akim@epita.fr>
8153
8154 Remove `translations' as it is always set to true.
8155
8156 * src/gram.h: Adjust.
8157 * src/reader.c (packsymbols, parse_token_decl): Adjust
8158 * src/print.c (print_grammar): Adjust.
8159 * src/output.c (output_token_translations): Adjust.
8160 * src/lex.c (lex): Adjust.
8161 * src/gram.c: Be sure the set pointers to NULL.
8162 (dummy): Rename as...
8163 (gram_free): this.
8164
8165 2001-09-22 Akim Demaille <akim@epita.fr>
8166
8167 * configure.in: Invoke AM_LIB_DMALLOC.
8168 * src/system.h: Use dmalloc.
8169 * src/LR0.c: Be sure to have pointers initialized to NULL.
8170 (allocate_itemsets): Allocate kernel_items only if needed.
8171
8172 2001-09-22 Akim Demaille <akim@epita.fr>
8173
8174 * configure.in: Bump to 1.29b.
8175 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8176 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8177 need xmalloc.c in calc.y.
8178 From Pascal Bart.
8179
8180 2001-09-21 Akim Demaille <akim@epita.fr>
8181
8182 Version 1.29a.
8183 * Makefile.maint, config/config.guess, config/config.sub,
8184 * config/missing: Update from masters.
8185 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8186 upon package.m4.
8187 * configure.in (ALL_LINGUAS): Add `tr'.
8188
8189 2001-09-21 Akim Demaille <akim@epita.fr>
8190
8191 * tests/Makefile.am (package.m4): Move to...
8192 ($(srcdir)/$(TESTSUITE)): here.
8193
8194 2001-09-20 Akim Demaille <akim@epita.fr>
8195
8196 * src/complain.c: No longer try to be standalone: use system.h.
8197 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8198 * src/complain.h: Likewise.
8199 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8200 Remove the unused variable `n'.
8201 From Albert Chin-A-Young.
8202
8203 2001-09-18 Marc Autret <autret_m@epita.fr>
8204
8205 * doc/bison.1: Update.
8206 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8207 descriptions.
8208 (Option Cross Key): Update.
8209 Add --graph.
8210
8211 2001-09-18 Marc Autret <autret_m@epita.fr>
8212
8213 * tests/regression.at: New test (comment in %union).
8214
8215 2001-09-18 Marc Autret <autret_m@epita.fr>
8216
8217 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8218 do that.
8219 Reported by Keith Browne.
8220
8221 2001-09-18 Marc Autret <autret_m@epita.fr>
8222
8223 * tests/output.at: Add tests for --defines and --graph.
8224
8225 2001-09-18 Marc Autret <autret_m@epita.fr>
8226
8227 * tests/output.at: Removes tests of %{header,src}_extension features.
8228
8229 2001-09-18 Akim Demaille <akim@epita.fr>
8230
8231 * tests/Makefile.am (package.m4): New.
8232 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8233 (_AT_CHECK_CALC_ERROR): Likewise.
8234 Factor the `, ' part of verbose error messages.
8235
8236 2001-09-18 Marc Autret <autret_m@epita.fr>
8237
8238 * src/getargs.c (longopts): Declare --defines and --graph as options
8239 with optional arguments.
8240 * src/files.h: Add extern declarations.
8241 * src/files.c (spec_graph_file, spec_defines_file): New.
8242 (output_files): Update.
8243 Remove CPP-outed code.
8244
8245 2001-09-18 Marc Autret <autret_m@epita.fr>
8246
8247 Turn off %{source,header}_extension feature.
8248
8249 * src/files.c (compute_exts_from_gf): Update.
8250 (compute_exts_from_src): Update.
8251 (output_files): CPP-out useless code.
8252 * src/files.h: Remove {header,source}_extension extern declarations.
8253 * src/reader.c (parse_dquoted_param): CPP-out.
8254 (parse_header_extension_decl): Remove.
8255 (parse_source_extension_decl): Remove.
8256 (read_declarations): Remove cases tok_{hdrext,srcext}.
8257 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8258 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8259
8260 2001-09-10 Akim Demaille <akim@epita.fr>
8261
8262 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8263 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8264 (AT_CHECK_OUTPUT): this.
8265 Merely check ls' exit status, its output is useless.
8266
8267 2001-09-10 Akim Demaille <akim@epita.fr>
8268
8269 * tests/calc.at: Use m4_match.
8270 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8271
8272 2001-09-10 Marc Autret <autret_m@epita.fr>,
8273 Akim Demaille <akim@epita.fr>
8274
8275 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8276 enum color_e.
8277 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8278 to `normal'.
8279 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8280 * src/lex.h: Adjust prototype.
8281 (token_t): Add `tok_undef'.
8282 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8283 (parse_percent_token): Now returns token_t.
8284 Add default statement in switch.
8285 (lex): Separate `c' as an input variable, from the token_t result
8286 part.
8287 (unlexed): Is a token_t.
8288
8289 2001-09-10 Akim Demaille <akim@epita.fr>
8290
8291 * configure.in: Bump to 1.29a.
8292
8293 2001-09-07 Akim Demaille <akim@epita.fr>
8294
8295 Version 1.29.
8296
8297 2001-08-30 Akim Demaille <akim@epita.fr>
8298
8299 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8300 * m4/atconfig.m4: Remove.
8301 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8302 * tests/bison: New.
8303 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8304 m4_if, m4_patsubst, and m4_regexp.
8305 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8306 `input' file instead of echo.
8307
8308 2001-08-29 Akim Demaille <akim@epita.fr>
8309
8310 Bump to 1.28e.
8311
8312 2001-08-29 Akim Demaille <akim@epita.fr>
8313
8314 Version 1.28d.
8315
8316 2001-08-29 Paul Eggert <eggert@twinsun.com>
8317
8318 * src/bison.simple (yyparse): Don't take the address of an
8319 item before the start of an array, as that doesn't conform to
8320 the C Standard.
8321
8322 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8323
8324 * doc/bison.texinfo (Location Tracking Calc): New node.
8325
8326 2001-08-29 Paul Eggert <eggert@twinsun.com>
8327
8328 * src/output.c (output): Do not define const, as this now
8329 causes more problems than it cures.
8330
8331 2001-08-29 Akim Demaille <akim@epita.fr>
8332
8333 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8334 the nodes.
8335 Be sure to tag the `detailmenu'.
8336
8337 2001-08-29 Akim Demaille <akim@epita.fr>
8338
8339 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8340 download in a tmp dir.
8341
8342 2001-08-28 Marc Autret <autret_m@epita.fr>
8343
8344 * config/depcomp: New file.
8345
8346 2001-08-28 Marc Autret <autret_m@epita.fr>
8347
8348 * doc/bison.1 (mandoc): Adjust.
8349 From Juan Manuel Guerrero.
8350
8351 2001-08-28 Marc Autret <autret_m@epita.fr>
8352
8353 * src/print_graph.c (print_state): Fix.
8354
8355 2001-08-27 Marc Autret <autret_m@epita.fr>
8356
8357 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8358 char * members.
8359 Echo modifications to the functions prototypes.
8360 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8361
8362 2001-08-27 Marc Autret <autret_m@epita.fr>
8363
8364 * src/vcg.c: Include `xalloc.h'.
8365 (add_colorentry): New.
8366 (add_classname): New.
8367 (add_infoname): New.
8368 * src/vcg.h: Add new prototypes.
8369
8370 2001-08-27 Akim Demaille <akim@epita.fr>
8371
8372 * Makefile.maint: Sync. again with CVS Autoconf.
8373
8374 2001-08-27 Akim Demaille <akim@epita.fr>
8375
8376 * Makefile.maint: Formatting changes.
8377 (po-update, cvs-update, update): New targets.
8378 (AMTAR): Remove.
8379
8380 2001-08-27 Akim Demaille <akim@epita.fr>
8381
8382 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8383 * Makefile.maint: Sync. with CVS Autoconf.
8384
8385 2001-08-27 Marc Autret <autret_m@epita.fr>
8386
8387 * src/vcg.h (struct infoname_s): New.
8388 (struct colorentry_s): New.
8389 (graph_s): New fields {vertical,horizontal}_order in structure.
8390 Add `infoname' field.
8391 Add `colorentry' field;
8392 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8393 (G_HORIZONTAL_ORDER): New.
8394 (G_INFONAME): New.
8395 (G_COLORENTRY): New.
8396 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8397 Add output of `infoname'.
8398 Add output of `colorentry'.
8399
8400 2001-08-27 Marc Autret <autret_m@epita.fr>
8401
8402 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8403 This one shadowed a global parameter.
8404
8405 2001-08-24 Marc Autret <autret_m@epita.fr>
8406
8407 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8408 instead of `unsigned'.
8409 (print_state): Do not call obstack_object_size () in obstack_grow ()
8410 to avoid macro variables shadowing.
8411
8412 2001-08-23 Marc Autret <autret_m@epita.fr>
8413
8414 * src/lex.c (percent_table): Typo: s/naem/name/.
8415 Add graph option.
8416 Normalize new options declarations.
8417
8418 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8419
8420 * tests/suite.at: Exercise %header_extension and %source_extension.
8421
8422 2001-08-16 Marc Autret <autret_m@epita.fr>
8423
8424 * src/reader.c (parse_dquoted_param): New.
8425 (parse_header_extension_decl): Use it.
8426 (parse_source_extension_decl): Likewise.
8427
8428 2001-08-16 Marc Autret <autret_m@epita.fr>
8429
8430 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8431 (get_xxxx_str): Use assert () instead of complain ().
8432 Remove return invokations in default cases.
8433 (get_decision_str): Modify default behaviour. Remove second argument.
8434 Echo modifications on calls.
8435 (output_graph): Fix.
8436
8437 2001-08-16 Marc Autret <autret_m@epita.fr>
8438
8439 * src/getargs.c (usage): Update with ``-g, --graph''.
8440
8441 2001-08-16 Marc Autret <autret_m@epita.fr>
8442
8443 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8444 (Option Cross Key): Likewise.
8445 * doc/bison.1: Update.
8446
1c8c2190
PB
84472001-09-25 Pascal Bart <pascal.bart@epita.fr>
8448
8449 * src/output.c (output_master_parser): Don't finish action_obstack.
8450 (output_parser): Don't care about the muscle action, here.
8451 (prepare): Copy the action_obstack in the action muscle.
8452 (output): Free action_obstack.
8453
180d45ba
PB
84542001-09-23 Pascal Bart <pascal.bart@epita.fr>
8455
8456 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8457 will contain `%union' declaration.
8458 (parse_union_decl): Delete #line directive output.
8459 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8460 informations about %union.
8461 (parse_union_decl): Copy the union_obstack in the muscle stype.
8462 * src/bison.simple: Add new #line directive.
8463 Add typdef %%stype YYSTYPE.
8464
c51d1a19
PB
84652001-09-23 Pascal Bart <pascal.bart@epita.fr>
8466
8467 * src/bison.simple: Add new `#line' directive.
8468
6f9344da
PB
84692001-09-22 Pascal Bart <pascal.bart@epita.fr>
8470
8471 * src/bison.simple: New `#line' directive.
8472 * src/output.c (output_parser): Support new dynamic muscle input_line.
8473
652def80
MA
84742001-09-22 Marc Autret <autret_m@epita.fr>
8475
8476 * src/output.c (output_master_parser): New.
8477 (output_parser): Be more re-entrant.
8478
25b222fa
MA
84792001-09-21 Marc Autret <autret_m@epita.fr>
8480
8481 * src/reader.c (copy_definition, parse_union_decl): Update and use
8482 `linef' muscle.
8483 (copy_action): Likewise.
8484 Use obstack_1grow ().
8485 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8486
6bc35ae5
MA
84872001-09-21 Marc Autret <autret_m@epita.fr>
8488
8489 * src/options.c (option_table): Adjust.
8490 * src/lex.c (parse_percent_token): Fix.
8491
c0629aa1
PB
84922001-09-20 Pascal Bart <pascal.bart@epita.fr>
8493
8494 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 8495
82b6d266
PB
84962001-09-20 Pascal Bart <pascal.bart@epita.fr>
8497
8498 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8499 is now an option_table_struct*.
8500 (option_strcmp): New function option_strcmp.
8501 (parse_percent_token): Call option_strcmp.
8502 * src/getargs.c (xalloc.h, options.h): Include it.
8503 (getargs): Call create_long_option_table.
8504 (getargs): Free longopts at the end of the function.
8505 (shortopts): Move in options.c.
8506 * src/options.c (create_long_option_table): New function. Convert
8507 information from option_table to option structure.
8508 * src/reader.c (options.h): Include it.
8509
8510 * src/Makefile.am: Adjust.
8511 * src/options.c (option_table): Create from longopts and percent_table.
8512 * src/getargs.c (longopts): Delete.
8513 * src/lex.c (struct percent_table_struct): Delete.
8514 (percent_table): Delete.
8515 (options.h): Include it.
8516 * src/options.c: Create.
8517 * src/options.h: Create.
8518 Declare enum opt_access_e.
8519 Define struct option_table_struct.
8520
75f5aaea
MA
85212001-09-20 Marc Autret <autret_m@epita.fr>
8522
8523 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8524 sections of Bison.
8525
f508cb0a
PB
85262001-09-19 Pascal Bart <pascal.bart@epita.fr>
8527
8528 * src/bison.simple: s/%%filename/%%skeleton.
8529 * src/muscle_tab.c (getargs.h): Include it.
8530 (muscle_init): Insert new muscle skeleton.
8531
13105fc1
PB
85322001-09-18 Pascal Bart <pascal.bart@epita.fr>
8533
8534 * src/output.c (output_parser): Delete unused variable actions_dumped.
8535
b0c4483e
PB
85362001-09-07 Pascal Bart <pascal.bart@epita.fr>
8537
8538 * src/output.c (output): Delete call to reader_output_yylsp.
8539 * src/reader.c (reader): Likewise.
8540 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 8541
11d82f03
MA
85422001-09-02 Marc Autret <autret_m@epita.fr>
8543
8544 * src/reader.c: Include muscle_tab.h.
8545 (parse_union_decl): Update.
8546 (parse_macro_decl): Rename parse_muscle_decl.
8547 Update to use renamed functions and variable.
8548 (read_declarations, copy_action, read_additionnal_code, : Updated
8549 with correct variables and functions names.
8550 (packsymbols, reader): Likewise.
342b8b6e 8551
11d82f03 8552 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 8553
11d82f03
MA
8554 * src/output.c: Include muscle_tab.h
8555 In all functions using macro_insert, change by using muscle_insert ().
8556 (macro_obstack): Rename muscle_obstack.
8557 Echo modifications in the whole file.
8558 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8559 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8560 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8561
8562 * src/muscle_tab.h: Update double inclusion macros.
8563 (macro_entry_s): Rename muscle_entry_s.
8564 Update prototypes.
342b8b6e 8565
11d82f03
MA
8566 * src/muscle_tab.c: Include muscle_tab.h.
8567 Rename macro_tabble to muscle_table.
8568 (mhash1, mhash2, mcmp): Use muscle_entry.
8569 (macro_init): Rename muscle_init. Update.
8570 (macro_insert): Rename muscle_insert. Update.
8571 (macro_find): Rename muscle_find. Update.
8572
8573 * src/main.c: Include muscle_tab.h.
8574 (main): Call muscle_init ().
8575 * src/Makefile.am (bison_SOURCES): Echo modifications.
8576
93a37297
MA
85772001-09-02 Marc Autret <autret_m@epita.fr>
8578
f753cd62 8579 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 8580
f753cd62
MA
8581 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8582
85832001-09-02 Marc Autret <autret_m@epita.fr>
8584
8585 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 8586
682d48cd
PB
85872001-09-01 Pascal Bart <pascal.bart@epita.fr>
8588
342b8b6e 8589 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
8590 filename.
8591
087c8fda
MA
85922001-09-01 Marc Autret <autret_m@epita.fr>
8593
8594 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8595 to an explicit value to activate the feature. We do it here.
8596
dda680cb
PB
85972001-08-31 Pascal Bart <pascal.bart@epita.fr>
8598
8599 * src/output.c (prepare): Delete the `filename' muscule insertion.
8600 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8601 (parse_union_decl): Likewise.
8602 * src/macrotab.c (macro_init): Initialize filename by infile.
8603
9e644e64
MA
86042001-08-31 Marc Autret <autret_m@epita.fr>
8605
8606 * src/bison.simple (YYLSP_NEEDED): New definition.
8607 * src/output.c (prepare): Add macro insertion of `locations_flag'
8608
17da6427
PB
86092001-08-31 Pascal Bart <pascal.bart@epita.fr>
8610
8611 * src/output.c (prepare): Delete insertion of previous muscles,
8612 and insert the `prefix' muscles.
8613 * src/macrotab.c (macro_init): Likewise.
8614 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 8615 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
8616 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8617 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 8618 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
8619 name_prefix.
8620
e8cb70b9
PB
86212001-08-31 Pascal Bart <pascal.bart@epita.fr>
8622
8623 * src/main.c (main): Standardize.
8624 * src/output.c (output_table_data, output_parser): Likewise.
8625 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8626
63c2d5de
MA
86272001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8628
342b8b6e 8629 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
8630 %%epilogue.
8631 * src/output.c (output): Rename %%declarations to %%prologue.
8632 * src/bison.simple: Echo modifications.
342b8b6e 8633
d8cb5183
MA
86342001-08-31 Marc Autret <autret_m@epita.fr>
8635
8636 * src/reader.c (readgram): CleanUp.
8637 (output_token_defines): Likewise.
8638 (packsymbols): Likewise.
8639 (reader): Likewise.
8640 * src/output.c (output): CPP-out useless code.
8641
6c686258
PB
86422001-08-31 Pascal Bart <pascal.bart@epita.fr>
8643
342b8b6e 8644 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
8645 output_trailers and output_headers.
8646 * src/output.h: Remove obsolete functions prototypes of output_headers
8647 and output_trailers.
8648
8f451ef7
PB
86492001-08-30 Pascal Bart <pascal.bart@epita.fr>
8650
8651 * src/main.c: Include macrotab.h.
342b8b6e 8652 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
8653 Adjust functions prototypes.
8654 * src/macrotab.c (macro_insert): Constify key and value.
8655 (macro_find): Constify key.
8656 (macro_insert): Include 'xalloc.h'
8657 (macro_insert): Use XMALLOC.
8658 (macro_find): Constify return value.
8659 * src/output.c (output_table_data): Rename table to table_data.
8660 (output_parser): Constify macro_key, macro_value.
8661
997b6fd0 86622001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
8663
8664 * src/reader.c (parse_skel_decl): New.
342b8b6e 8665 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
8666 * src/lex.h (token_t): New token `tok_skel'.
8667 * src/lex.c (percent_table): Add skeleton option entry.
8668 Standardize.
8669
ff48177d
MA
86702001-08-29 Marc Autret <autret_m@epita.fr>
8671
8672 * src/bison.simple: Add %%user_code directive at the end.
8673 * src/reader.c (read_additionnal_code): New.
8674 (reader): Use it.
8675 * src/output.c (output_program): Remove.
8676 (output): Update.
8677
b33160bf
MA
86782001-08-28 Marc Autret <autret_m@epita.fr>
8679
8680 * src/output.c (output_actions): Clean up.
4e5caae2 8681 (output_gram): CPP-out useless code.
b33160bf
MA
8682 * src/reader.c (reader): Clean up, CPP-out useless code.
8683
d1a2daf7
PB
86842001-08-28 Pascal Bart <pascal.bart@epita.fr>
8685
342b8b6e 8686 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 8687 directive.
d1a2daf7
PB
8688 * src/bison.simple: Add `%%definitions'.
8689
2b763dfe
MA
86902001-08-28 Marc Autret <autret_m@epita.fr>
8691
8692 * config/depcomp: New file.
8693
f1a87ef6
PE
86942001-08-27 Paul Eggert <eggert@twinsun.com>
8695
8696 * src/bison.simple (yyparse): Don't take the address of an
8697 item before the start of an array, as that doesn't conform to
8698 the C Standard.
8699
82e236e2
RA
87002001-08-27 Robert Anisko <robert.anisko@epita.fr>
8701
f1a87ef6 8702 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
8703 obstack. It was done too late here.
8704
8705 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8706 completely wrong.
8707 (reader): Initialize the macro obstack here, since we need it to grow
8708 '%define' directives.
8709
8710 * src/reader.h: Declare the macro obstack as extern.
8711
b0cfa28a
RA
87122001-08-27 Robert Anisko <robert.anisko@epita.fr>
8713
8714 * src/output.c (output_parser): Fix. Store single '%' characters in
8715 the output obstack instead of throwing them away.
8716
6fc74234
AD
87172001-08-27 Akim Demaille <akim@epita.fr>
8718
8719 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8720
9c76d118
RA
87212001-08-25 Robert Anisko <robert.anisko@epita.fr>
8722
8723 * lib/Makefile.am: Adjust.
8724
a8289c62
RA
87252001-08-25 Robert Anisko <robert.anisko@epita.fr>
8726
8727 * src/bison.simple: Update and add '%%' directives.
8728
b6610515
RA
87292001-08-25 Robert Anisko <robert.anisko@epita.fr>
8730
8731 * src/reader.c (reader): Remove calls to 'output_headers' and
8732 'output_trailers'. Remove some C output.
8733 (readgram): Disable a piece of code that was writing a default
8734 definition for 'YYSTYPE'.
8735 (reader_output_yylsp): Remove.
8736 (packsymbols): Output token defintions to a macro.
8737 (copy_definition): Disable C output.
6fc74234 8738
b6610515
RA
8739 * src/reader.c (parse_macro_decl): New function used to parse macro
8740 declarations.
8741 (copy_string2): Put the body of copy_string into this new function.
8742 Add a parameter to let the caller choose whether he wants to copy the
8743 string delimiters or not.
8744 (copy_string): Be a simple call to copy_string2 with the last argument
8745 bound to true.
8746 (read_declarations): Add case for macro definition.
8747 (copy_identifier): New.
6fc74234 8748 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
8749 rather than lex.
8750
26f609ff
RA
87512001-08-25 Robert Anisko <robert.anisko@epita.fr>
8752
8753 * src/output.c (prepare): Add prefixed names.
8754 (output_parser): Output semantic actions.
8755 (output_parser): Fix bug on '%%line' directives.
6fc74234 8756
26f609ff
RA
8757 * src/output.c (output_headers): Remove. The C code printed by this
8758 function should now be in the skeletons.
8759 (output_trailers): Remove.
8760 (output): Disable call to 'reader_output_yylsp'.
8761 (output_rule_data): Do not output tables to the table obstack.
8762
8763 * src/output.c: Remove some C dedicated output.
8764 Improve the use of macro and output obstacks.
8765 (output_defines): Remove.
6fc74234 8766
26f609ff
RA
8767 * src/output.c (output_token_translations): Associate 'translate'
8768 table with a macro. No output to the table obstack.
8769 (output_gram): Same for 'rhs' and 'prhs'.
8770 (output_stos): Same for 'stos'.
8771 (output_rule_data): Same for 'r1' and 'r2'.
8772 (token_actions): Same for 'defact'.
8773 (goto_actions): Same for 'defgoto'.
8774 (output_base): Same for 'pact' and 'pgoto'.
8775 (output_table): Same for 'table'.
8776 (output_check): Same for 'check'.
6fc74234 8777
26f609ff
RA
8778 * src/output.c (output_table_data): New function.
8779 (output_short_table): Remove.
8780 (output_short_or_char_table): Remove.
6fc74234 8781
26f609ff
RA
8782 * src/output.c (output_parser): Replace most of the skeleton copy code
8783 with something new. Skeletons are now processed character by character
8784 rather than line by line, and Bison looks for '%%' macros. This is the
8785 first step in making Bison's output process (a lot) more flexible.
8786 (output_parser): Use the macro table.
8787
6f43b113
RA
87882001-08-25 Robert Anisko <robert.anisko@epita.fr>
8789
8790 * src/main.c (main): Initialize the macro table.
8791
dd3127cf
RA
87922001-08-25 Robert Anisko <robert.anisko@epita.fr>
8793
8794 * src/lex.c (percent_table): Add tok_define.
8795 * src/lex.h: Add tok_define.
8796
aa321494
RA
87972001-08-25 Robert Anisko <robert.anisko@epita.fr>
8798
8799 * src/macrotab.c: New file.
8800 * src/macrotab.h: New file.
8801 * src/Makefile.am: Update.
8802
68bd3b6b
RA
88032001-08-25 Robert Anisko <robert.anisko@epita.fr>
8804
8805 * lib/hash.c: New file.
8806 * lib/hash.h: New file.
8807 * lib/Makefile.am: Update.
8808
45f8dd1e
AD
88092001-08-15 Akim Demaille <akim@epita.fr>
8810
8811 Version 1.28c.
8812
40a64a7a 88132001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
8814
8815 * src/reader.c (readgram): Indent output macro YYSTYPE.
8816 (packsymbols): Likewise.
8817 (output_token_defines): Likewise.
8818 * src/files.c: Standardize.
8819 (compute_header_macro): New.
8820 (defines_obstack_save): New. Use compute_header_macro.
8821 (output_files): Update. Use defines_obstack_save.
8822
f9a8293a
AD
88232001-08-15 Akim Demaille <akim@epita.fr>
8824
8825 * doc/bison.texinfo (Table of Symbols): Document
8826 YYSTACK_USE_ALLOCA.
8827
150ca7a7
AD
88282001-08-15 Akim Demaille <akim@epita.fr>
8829
8830 * missing: Update from CVS Automake.
8831 * config/config.guess, config/config.sub, config/texinfo.tex:
8832 Update from gnu.org.
8833
69b5cec4
AD
88342001-08-15 Akim Demaille <akim@epita.fr>
8835
8836 * Makefile.maint: Sync with CVS Autoconf.
8837
f2b5126e
PB
88382001-08-14 Pascal Bart <pascal.bart@epita.fr>
8839
69b5cec4 8840 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
8841 `fdl.texi'.
8842 * doc/fdl.texi: Add to package.
8843
4ecbf796
MA
88442001-08-14 Marc Autret <autret_m@epita.fr>
8845
8846 Turn on %{source,header}_extension features.
8847
69b5cec4 8848 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
8849 source_extension.
8850 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 8851 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
8852 between options.
8853
95fb5662
MA
88542001-08-14 Marc Autret <autret_m@epita.fr>
8855
8856 * src/files.c (compute_base_names): Add extensions computing when
8857 `--file-prefix' used.
8858 Standardize function calls.
8859
78d09da9
MA
88602001-08-13 Marc Autret <autret_m@epita.fr>
8861
69b5cec4 8862 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
8863 defining it (defined but null disables alloca).
8864
5a009f2c
MA
88652001-08-13 Marc Autret <autret_m@epita.fr>
8866
8867 * src/bison.simple (_yy_memcpy): CPP reformat.
8868
1e41465a
PB
88692001-08-13 Pascal Bart <pascal.bart@epita.fr>
8870
8871 * tests/atconfig.in (CPPFLAGS): Fix.
8872
c67a198d
PB
88732001-08-10 Pascal Bart <pascal.bart@epita.fr>
8874
79282c6c 8875 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
8876 `gpl.texi'.
8877 * doc/gpl.texi: Add to package.
8878
09a6de7e
MA
88792001-08-10 Marc Autret <autret_m@epita.fr>
8880
8881 * src/print_graph.h: Fix.
8882 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8883
b77b9ee0
AD
88842001-08-10 Akim Demaille <akim@epita.fr>
8885
8886 * src/system.h: Provide default declarations for stpcpy, strndup,
8887 and strnlen.
8888
3e259915
MA
88892001-08-10 Robert Anisko <anisko_r@epita.fr>
8890
8891 * doc/bison.texinfo (Locations): Update @$ stuff.
8892
ca96bc2d
MA
88932001-08-09 Robert Anisko <anisko_r@epita.fr>
8894
8895 * src/bison.simple (YYLLOC_DEFAULT): Update.
8896 (yyparse): Adjust.
8897
fdc6758b
MA
88982001-08-08 Marc Autret <autret_m@epita.fr>
8899
b77b9ee0 8900 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
8901 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8902 Reported by Fabrice Bauzac.
957d4dbf 8903
600cad3b
MA
89042001-08-08 Marc Autret <autret_m@epita.fr>
8905
8906 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8907 * src/vcg.c (output_node): Fix.
8908 * src/vcg.h: Cleanup.
8909 * src/print_graph.c: Add comments.
b77b9ee0 8910 (node_output_size): New global variable. Simplify the formatting of
600cad3b 8911 the VCG graph output.
b77b9ee0 8912 (print_actions): Unused code is now used. It notifies the final state
600cad3b 8913 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 8914 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
8915 blue.
8916 Get the current node name and node_obstack by argument.
8917 (node_obstack): New variable.
8918 (print_state): Manage node_obstack.
8919 (print_core): Use node_obstack given by argument.
8920 A node is not only computed here but in print_actions also.
8921 (print_graph): CPP out useless code instead of commenting it.
8922
976e528f
AD
89232001-08-07 Pascal Bart <pascal.bart@epita.fr>
8924
8925 * tests/atconfig.in (CPPFLAGS): Fix.
8926
20e8e5ca
AD
89272001-08-07 Akim Demaille <akim@epita.fr>
8928
8929 * src/print_graph.c (quote): New.
8930 (print_core): Use it.
8931
957d4dbf 89322001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 8933
3e3da797
AD
8934 * src/vcg.c (complain.h): Include it.
8935 Unepitaize `return' invocations.
c4b66126 8936 [NDEBUG] (main): Remove.
79282c6c 8937 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
8938 * src/files.c (open_files): Initialize graph_obstack.
8939 * src/print_graph.c (print_actions): CPP out useless code.
8940 (print_core): Don't output the last `\n' in labels.
8941 Use `quote'.
8942 * src/files.c (output_files): Output the VCG file.
8943 * src/main.c (main): Invoke print_graph ();
3e3da797 8944
957d4dbf 89452001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
8946
8947 Automaton VCG graph output.
8948 Using option ``-g'' or long option ``--graph'', you can generate
8949 a gram_filename.vcg file containing a VCG description of the LALR (1)
8950 automaton of your grammar.
8951
8952 * src/main.c: Call to print_graph() function.
8953 * src/getargs.h: Update.
8954 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8955 (graph_flag): New flag.
8956 (longopts): Update.
8957 (getargs): Add case `g'.
8958 * src/files.c (graph_obstack): New obstack struct.
8959 (open_files): Initialize new obstack.
8960 (output_files): Saves graph_obstack if required.
8961 * src/files.h (graph_obstack): New extern declaration.
8962 * src/Makefile.am: Add new source files.
8963
927c1557 89642001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
8965
8966 * src/print_graph.c, src/print_graph.h (graph): New.
8967 * src/vcg.h: New file.
8968 * src/vcg.c: New file, VCG graph handling.
8969
7333d403
AD
89702001-08-06 Marc Autret <autret_m@epita.fr>
8971
8972 Add of %source_extension and %header_extension which specify
8973 the source or/and the header output file extension.
8974
8975 * src/files.c (compute_base_names): Remove initialisation of
8976 src_extension and header_extension.
8977 (compute_exts_from_gf): Update.
8978 (compute_exts_from_src): Update.
8979 (output_files): Update.
8980 * src/reader.c (parse_header_extension_decl): New.
8981 (parse_source_extension_decl): New.
8982 (read_declarations): New case statements for the new tokens.
8983 * src/lex.c (percent_table): Add entries for %source_extension
8984 and %header_extension.
8985 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8986
84163231
AD
89872001-08-06 Marc Autret <autret_m@epita.fr>
8988
8989 * configure.in: Bump to 1.28c.
8990 * doc/bison.texinfo: Texinfo thingies.
8991
8303fc42
AD
89922001-08-04 Pascal Bart <pascal.bart@epita.fr>
8993
8994 * tests/atconfig.in (CPPFLAGS): Add.
8995 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8996
70a84437
AD
89972001-08-03 Akim Demaille <akim@epita.fr>
8998
8999 Version 1.28b.
9000
2ce10144
AD
90012001-08-03 Akim Demaille <akim@epita.fr>
9002
9003 * tests/Makefile.am (check-local): Ship testsuite.
9004 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9005 Include `string.h'.
9006
1e3e4bc1
AD
90072001-08-03 Akim Demaille <akim@epita.fr>
9008
9009 * configure.in: Try using -Wformat when compiling.
9010
42b45b7f
AD
90112001-08-03 Akim Demaille <akim@epita.fr>
9012
9013 * configure.in: Bump to 1.28b.
9014
8f13fe33
AD
90152001-08-03 Akim Demaille <akim@epita.fr>
9016
9017 * src/complain.c: Adjust strerror_r portability issues.
9018
b37ba92c
AD
90192001-08-03 Akim Demaille <akim@epita.fr>
9020
9021 Version 1.28a.
9022
b0ce6046
AD
90232001-08-03 Akim Demaille <akim@epita.fr>
9024
9025 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9026 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9027 * src/getargs.c: Include complain.h.
9028 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9029 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9030
d01c415b
AD
90312001-08-03 Akim Demaille <akim@epita.fr>
9032
9033 * src/reader.c (readgram): Display hidden chars in error messages.
9034
459dd1a6
AD
90352001-08-03 Akim Demaille <akim@epita.fr>
9036
9037 Update to gettext 0.10.39.
9038
53b74c0c
AD
90392001-08-03 Akim Demaille <akim@epita.fr>
9040
9041 * lib/strspn.c: New.
9042
234a3be3
AD
90432001-08-01 Marc Autret <autret_m@epita.fr>
9044
9045 * doc/bison.texinfo: Update.
9046 * doc/bison.1 (mandoc): Update.
9047 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9048 * src/files.c: Support output files extensions computing.
9049 (src_extension): New static variable.
9050 (header_extension): New static variable.
9051 (tr): New function.
9052 (get_extension_index): New function, gets the index of an extension
9053 filename in a string.
9054 (compute_exts_from_gf): New function, computes extensions from the
9055 grammar file extension.
9056 (compute_exts_from_src): New functions, computes extensions from the
9057 C source file extension, file given by ``-o'' option.
9058 (compute_base_names): Update.
9059 (output_files): Update.
9060
847bf1f5
AD
90612001-08-01 Robert Anisko <anisko_r@epita.fr>
9062
d995fee7 9063 * doc/bison.texi: Document @$.
847bf1f5
AD
9064 (Locations): New section.
9065
d074a105
AD
90662001-07-18 Akim Demaille <akim@epita.fr>
9067
9068 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9069 * config/prev-version.txt, config/move-if-change: New.
9070 * Makefile.am: Adjust.
9071
3419715d
AD
90722001-07-08 Pascal Bart <pascal.bart@epita.fr>
9073
9074 * src/bison.simple (yyparse): Suppress warning `comparaison
9075 between signed and unsigned'.
9076
62ab6972
AD
90772001-07-05 Pascal Bart <pascal.bart@epita.fr>
9078
9079 * src/getargs.h (raw_flag): Remove.
9080 * src/getargs.c: Die on `-r'/`--raw'.
9081 * src/lex.c (parse_percent_token): Die on `%raw'.
9082 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9083 * tests/calc.at: Suppress test with option `--raw'.
9084
1e24cc5b
AD
90852001-07-14 Akim Demaille <akim@epita.fr>
9086
9087 * config/: New.
9088 * configure.in: Require Autoconf 2.50.
9089 Update to gettext 0.10.38.
9090
32dfccf8
AD
90912001-03-16 Akim Demaille <akim@epita.fr>
9092
9093 * doc/bison.texinfo: ANSIfy the examples.
9094
cd5bd6ac
AD
90952001-03-16 Akim Demaille <akim@epita.fr>
9096
9097 * getargs.c (skeleton): New variable.
9098 (longopts): --skeleton is a new option.
9099 (shortopts, getargs): -S is a new option.
9100 * getargs.h: Declare skeleton.
9101 * output.c (output_parser): Use it.
9102
5141b016
AD
91032001-03-16 Akim Demaille <akim@epita.fr>
9104
9105 * m4/strerror_r.m4: New.
9106 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9107 * lib/error.h, lib/error.c: Update.
9108
447992b9
AD
91092001-03-16 Akim Demaille <akim@epita.fr>
9110
9111 * src/getargs.c (longopts): Clean up.
9112
274d42ce
AD
91132001-02-21 Akim Demaille <akim@epita.fr>
9114
9115 * src/reader.c (gensym): `gensym_count' is your own.
9116 Use a static buf to create the symbol name, as token_buffer is no
9117 longer a buffer.
9118
22c821f3
AD
91192001-02-08 Akim Demaille <akim@epita.fr>
9120
9121 * src/conflicts.c (conflict_report): Be sure not to append to res
9122 between two calls, which could happen if both first sprintf were
9123 skipped, but not the first cp += strlen.
9124
18569462
AD
91252001-02-08 Akim Demaille <akim@epita.fr>
9126
9127 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9128 New, from fileutils 4.0.37.
9129 * configure.in: Require Autoconf 2.49c. I took some time before
9130 making this decision. This is the only way out for portability
9131 issues in Bison, it would mean way too much duplicate effort to
9132 import in Bison features implemented in 2.49c since 2.13.
9133 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9134
0d8f3c8a
AD
91352001-02-02 Akim Demaille <akim@epita.fr>
9136
9137 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 9138 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 9139
f17bcd1f
AD
91402001-01-19 Akim Demaille <akim@epita.fr>
9141
9142 Get rid of the ad hoc handling of token_buffer in the scanner: use
9143 the obstacks.
9144
9145 * src/lex.c (token_obstack): New.
9146 (init_lex): Initialize it. No longer call...
9147 (grow_token_buffer): this. Remove it.
9148 Adjust all the places which used it to use the obstack.
9149
511e79b3
AD
91502001-01-19 Akim Demaille <akim@epita.fr>
9151
9152 * src/lex.h: Rename all the tokens:
9153 s/\bENDFILE\b/tok_eof/g;
9154 s/\bIDENTIFIER\b/tok_identifier/g;
9155 etc.
9156 Let them be enums, not #define, to ease debugging.
9157 Adjust all the code.
9158
0d6508ef
AD
91592001-01-18 Akim Demaille <akim@epita.fr>
9160
9161 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9162 * src/lex.c (maxtoken, grow_token_buffer): Static.
9163
6deb4447
AD
91642001-01-18 Akim Demaille <akim@epita.fr>
9165
9166 Since we now use obstacks, more % directives can be enabled.
9167
9168 * src/lex.c (percent_table): Also accept `%yacc',
9169 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9170 `%debug'.
9171 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9172 instead of returning a token.
9173 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9174 * src/reader.c (read_declarations): Adjust.
9175 * src/files.c (open_files): Don't call `compute_base_names', don't
9176 compute `attrsfile' since they depend upon data which might be
9177 *in* the input file now.
9178 (output_files): Do it here.
9179 * src/output.c (output_headers): Document the fact that this patch
9180 introduces a guaranteed SEGV for semantic parsers.
9181 * doc/bison.texinfo: Document them.
9182 * tests/suite.at: Exercise these %options.
9183
ff4423cc
AD
91842000-12-20 Akim Demaille <akim@epita.fr>
9185
9186 Also handle the output file (--verbose) with obstacks.
9187
9188 * files.c (foutput): Remove.
9189 (output_obstack): New.
9190 Adjust all dependencies.
9191 * src/conflicts.c: Return a string.
9192 * src/system.h (obstack_grow_string): Rename as...
9193 (obstack_sgrow): this. Be ready to work with non literals.
9194 (obstack_fgrow4): New.
9195
956dba3a
AD
91962000-12-20 Akim Demaille <akim@epita.fr>
9197
9198 * src/files.c (open_files): Fix the computation of short_base_name
9199 in the case of `-o foo.tab.c'.
9200
337bab46
AD
92012000-12-20 Akim Demaille <akim@epita.fr>
9202
9203 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9204 (copy_dollar): Now that everything uses obstacks, get rid of the
9205 FILE * parameters.
9206
5d3214b8
AD
92072000-12-20 Akim Demaille <akim@epita.fr>
9208
9209 * src/files.c (open_files): Actually the `.output' file is based
9210 on the short_base_name, not base_name.
9211 * tests/suite.at (Checking output file names): Adjust.
9212
29092a57
AD
92132000-12-20 Akim Demaille <akim@epita.fr>
9214
9215 * src/bison.s1: Remove, we now use directly...
9216 * src/bison.simple: this.
9217 * src/Makefile.am: Use pkgdata instead of data.
9218
ea5607fd
AD
92192000-12-20 Akim Demaille <akim@epita.fr>
9220
9221 * src/files.c (guard_obstack): New.
9222 (open_files): Initialize it.
9223 (output_files): Dump it...
9224 * src/files.h: Export it.
9225 * src/reader.c (copy_guard): Use it.
9226
27110317
AD
92272000-12-19 Akim Demaille <akim@epita.fr>
9228
9229 * src/files.c (outfile, defsfile, actfile): Removed as global
9230 vars.
9231 (open_files): Don't compute them.
9232 (output_files): Adjust.
9233 (base_name, short_base_name): Be global.
9234 Adjust dependencies.
9235
19c50364
AD
92362000-12-19 Akim Demaille <akim@epita.fr>
9237
9238 * src/files.c (strsuffix): New.
9239 (stringappend): Be just like strcat but allocate.
9240 (base_names): Eve out from open_files.
9241 Try to simplify the rather hairy computation of base_name and
9242 short_base_name.
9243 (open_files): Use it.
9244 * tests/suite.at (Checking output file names): New test.
9245
573c1d9f
AD
92462000-12-19 Akim Demaille <akim@epita.fr>
9247
9248 * src/system.h (obstack_grow_literal_string): Rename as...
9249 (obstack_grow_string): this.
9250 * src/output.c (output_parser): Recognize `%% actions' instead of
9251 `$'.
9252 * src/bison.s1: s/$/%% actions/.
9253 * src/bison.hairy: Likewise.
9254
ef7ddedd
AD
92552000-12-19 Akim Demaille <akim@epita.fr>
9256
9257 * src/output.c (output_parser): Compute the `#line' lines when
9258 there are.
9259 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9260 Suggested by Hans Aberg.
9261
ff61dabd
AD
92622000-12-19 Akim Demaille <akim@epita.fr>
9263
9264 Let the handling of the skeleton files be local to the procedures
9265 that use it.
9266
9267 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9268 longer static.
9269 (fparser, open_extra_files): Remove.
9270 (open_files, output_files): Don't take care of fparser.
9271 * src/files.h: Adjust.
9272 * src/output.c (output_parser): Open and close the file to the
9273 skeleton.
9274 * src/reader.c (read_declarations): When %semantic_parser, open
9275 fguard.
9276
55b96341
AD
92772000-12-19 Akim Demaille <akim@epita.fr>
9278
9279 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9280 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9281
358c15b7
AD
92822000-12-19 Akim Demaille <akim@epita.fr>
9283
9284 * src/files.c (open_files): Yipee! We no longer need all the code
9285 looking for `/tmp' since we have no tmp file.
9286
7de3329e
AD
92872000-12-19 Akim Demaille <akim@epita.fr>
9288
9289 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9290 New macros.
9291 * src/files.c (open_files): Less dependency on MSDOS etc.
9292
3abcd459
AD
92932000-12-14 Akim Demaille <akim@epita.fr>
9294
9295 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9296 Provide a default definition.
9297 Use it when executing the default @ action.
9298 * src/reader.c (reader_output_yylsp): No longer include
9299 `timestamp' and `text' in the default YYLTYPE.
9300
2a91a95e
AD
93012000-12-12 Akim Demaille <akim@epita.fr>
9302
9303 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9304 (copy_guard): Quote the file names.
9305 Reported by Laurent Mascherpa.
9306
14d3eb9b
AD
93072000-12-12 Akim Demaille <akim@epita.fr>
9308
9309 * src/output.c (output_headers, output_program, output): Be sure
9310 to escape special characters when outputting filenames.
9311 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9312 (output_headers): Don't depend on them, Use ACTSTR.
9313
d7045ec6
AD
93142000-11-17 Akim Demaille <akim@epita.fr>
9315
9316 * lib/obstack.h: Formatting changes.
9317 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9318 prevents type checking.
9319 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9320 cast the value to (void *): assigning a `foo *' to a `void *'
9321 variable is valid.
9322 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9323 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9324 append characters.
9325
6fd54b73
AD
93262000-11-17 Akim Demaille <akim@epita.fr>
9327
9328 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9329 as...
9330 (suite.m4, regression.m4, calc.m4): these.
9331 * tests/atgeneral.m4: Update from CVS Autoconf.
9332
4c50eae6
AD
93332000-11-17 Akim Demaille <akim@epita.fr>
9334
9335 * tests/regression.m4 (%union and --defines): New test,
9336 demonstrating a current bug in the obstack implementation.
9337
a35f64ea
AD
93382000-11-17 Akim Demaille <akim@epita.fr>
9339
9340 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9341 macros.
9342 Use them to declare the variables which are global or local to
9343 `yyparse'.
9344
7de23534
AD
93452000-11-17 Akim Demaille <akim@epita.fr>
9346
9347 * acconfig.h: Remove, no longer used.
9348
aa7815f5
AD
93492000-11-07 Akim Demaille <akim@epita.fr>
9350
9351 * src: s/Copyright (C)/Copyright/g.
9352
5af1f549
AD
93532000-11-07 Akim Demaille <akim@epita.fr>
9354
9355 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9356 defining.
9357 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9358
553e2b22
AD
93592000-11-07 Akim Demaille <akim@epita.fr>
9360
9361 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9362 Merge in a single CPP if/else.
9363
8a4f41d6
AD
93642000-11-07 Akim Demaille <akim@epita.fr>
9365
9366 * src/output.c (output): Remove useless variables.
9367 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9368 argument `data' for consistency with the prototypes.
9369 Qualify it `const'.
9370 (obstack_copy, obstack_copy0): Rename the second argument as
9371 `address' for consistency. Qualify it `const'.
9372 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9373 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9374 `const' their input argument (`data' or `address').
9375 Adjust the corresponding macros to include `const' in casts.
9376
095a3fb5
AD
93772000-11-03 Akim Demaille <akim@epita.fr>
9378
9379 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9380 s/PFILE1/BISON_HAIRY/.
9381 Adjust dependencies.
9382
d1cdce7c
AD
93832000-11-03 Akim Demaille <akim@epita.fr>
9384
090c5ebf 9385 For some reason, this was not applied.
d1cdce7c
AD
9386
9387 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9388 `unlink': it's no longer used.
9389
9311529b
AD
93902000-11-03 Akim Demaille <akim@epita.fr>
9391
9392 * src/files.c (skeleton_find): New function, eved out of...
9393 (open_files, open_extra_files): here.
9394
d8880f69
AD
93952000-11-03 Akim Demaille <akim@epita.fr>
9396
9397 Don't use `atexit'.
9398
9399 * src/files.c (obstack_save): New function.
9400 (done): Rename as...
9401 (output_files): this.
9402 Use `obstack_save'.
9403 * src/main.c (main): Don't use `atexit' to register `done', since
9404 it no longer has to remove tmp files, just call `output_files'
9405 when there are no errors.
9406
0dbb648e
AD
94072000-11-02 Akim Demaille <akim@epita.fr>
9408
9409 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9410 `unlink': it's no longer used.
9411 * src/files.h: Formatting changes.
9412
896fe5c1
AD
94132000-11-02 Akim Demaille <akim@epita.fr>
9414
9415 Remove the last uses of mktemp and unlink/delete.
9416
9417 * src/files.c (fdefines, ftable): Removed.
9418 (defines_ostack, table_obstack): New.
9419 Adjust dependencies of the former into uses of the latter.
9420 * src/output.c (output_short_or_char_table, output_short_table):
9421 Convert to using obstacks.
9422 * src/reader.c (copy_comment2): Accept one FILE * and two
9423 obstacks.
9424 (output_token_defines, reader_output_yylsp): Use obstacks.
9425 * src/system.h (obstack_fgrow3): New.
9426
dd60faec
AD
94272000-11-01 Akim Demaille <akim@epita.fr>
9428
9429 Change each use of `fattrs' into a use of `attrs_obstack'.
9430
9431 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9432 * src/files.c (fattrs): Remove.
9433 (attrs_obstack): New.
9434 Adjust all dependencies.
9435 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9436
8c7ebe49
AD
94372000-11-01 Akim Demaille <akim@epita.fr>
9438
9439 Introduce obstacks.
9440 Change each use of `faction' into a use of `action_obstack'.
9441
9442 * lib/obstack.h, lib/obstack.c: New files.
9443 * src/files.c (faction): Remove.
9444 (action_obstack): New.
9445 Adjust all dependencies.
9446
77aee789
AD
94472000-10-20 Akim Demaille <akim@epita.fr>
9448
9449 * lib/quote.h (PARAMS): New macro. Use it.
9450
43591cec
AD
94512000-10-16 Akim Demaille <akim@epita.fr>
9452
9453 * src/output.c (output_short_or_char_table): New function.
9454 (output_short_table, output_token_translations): Use it.
9455 (goto_actions): Use output_short_table.
9456
1e9798d5
AD
94572000-10-16 Akim Demaille <akim@epita.fr>
9458
9459 * src/symtab.c (bucket_new): New function.
9460 (getsym): Use it.
9461
9462 * src/output.c (output_short_table): New argument to display the
9463 comment associated with the table.
9464 Adjust dependencies.
9465 (output_gram): Use it.
9466 (output_rule_data): Nicer output layout for YYTNAME.
9467
f282676b
AD
94682000-10-16 Akim Demaille <akim@epita.fr>
9469
9470 * src/lex.c (read_typename): New function.
9471 (lex): Use it.
9472 * src/reader.c (copy_dollar): Likewise.
9473
550a72a3
AD
94742000-10-16 Akim Demaille <akim@epita.fr>
9475
9476 * src/reader.c (copy_comment2): Expect the input stream to be on
9477 the `/' which is suspected to open a comment, instead of being
9478 called after `//' or `/*' was read.
9479 (copy_comment, copy_definition, parse_union_decl, copy_action)
9480 (copy_guard): Adjust.
9481
131e2fef
AD
94822000-10-16 Akim Demaille <akim@epita.fr>
9483
9484 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9485 `read_signed_integer'.
9486
79282c5a
AD
94872000-10-16 Akim Demaille <akim@epita.fr>
9488
9489 * src/reader.c (copy_dollar): New function.
9490 (copy_guard, copy_action): Use it.
9491
ff4a34be
AD
94922000-10-16 Akim Demaille <akim@epita.fr>
9493
9494 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9495 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9496 New files, from Fileutils 4.0.27.
9497 * src/main.c (printable_version): Remove.
9498 * src/lex.c, src/reader.c: Use `quote'.
9499
95002000-10-04 Akim Demaille <akim@epita.fr>
9501
9502 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9503
14ded682
AD
95042000-10-04 Akim Demaille <akim@epita.fr>
9505
9506 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9507
8e03724b
AD
95082000-10-04 Akim Demaille <akim@epita.fr>
9509
9510 When a literal string is used to define two different tokens,
9511 `bison -v' segfaults.
9512 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9513
9514 * tests/regression.m4: New file.
9515 Include the core of the sample provided by Piotr Gackiewicz.
9516 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9517 properly.
9518
a9e64249
AD
95192000-10-04 Akim Demaille <akim@epita.fr>
9520
9521 * src/reader.c (parse_expect_decl): Keep `count' within the size
9522 of `buffer'.
9523 From Neil Booth.
9524
da9abf43
AD
95252000-10-02 Paul Eggert <eggert@twinsun.com>
9526
9527 * bison.s1 (yyparse): Assign the default value
9528 unconditionally, to avoid a GCC warning and make the parser a
9529 tad smaller.
9530
c33638bb
AD
95312000-10-02 Akim Demaille <akim@epita.fr>
9532
9533 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9534 options.
9535
444c570a
AD
95362000-10-02 Akim Demaille <akim@epita.fr>
9537
9538 * src/derives.c, src/print.c, src/reduce.c: To ease the
9539 translation, move some `\n' out of the translated strings.
9540
89cab50d
AD
95412000-10-02 Akim Demaille <akim@epita.fr>
9542
9543 The location tracking mechanism is precious for parse error
9544 messages. Nevertheless, it is enabled only when `@n' is used in
9545 the grammar, which is a different issue (you can use it in error
9546 message, but not in the grammar per se). Therefore, there should
9547 be another means to enable it.
9548
9549 * src/getargs.c (getargs): Support `--locations'.
9550 (usage): Report it.
9551 * src/getargs.h (locationsflag): Export it.
9552 * src/lex.c (percent_table): Support `%locations'.
9553 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9554 with `locationsflag'.
9555 * doc/bison.texinfo: Document `--locations' and `%locations'.
9556 Sort the options.
9557 * tests/calc.m4: Test it.
9558
9559 For regularity of the names, replace each
9560 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9561 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9562 In addition replace each `flag' with `_flag'.
9563
d6c2cba0
AD
95642000-10-02 Akim Demaille <akim@epita.fr>
9565
9566 Also test parse error messages, including with YYERROR_VERBOSE.
9567
9568 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9569 associative).
9570 Use it to check the computations.
9571 Use it to check `nonassoc' is honored.
9572 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9573 `--yyerror-verbose'.
9574 (_AT_CHECK_CALC): Adjust to this option.
9575 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9576
5a35a6cb
AD
95772000-10-02 Akim Demaille <akim@epita.fr>
9578
9579 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9580 the latter demonstrates a flaw in the handling of non debugging
9581 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9582 was used in order to simplify:
9583
9584 #if YYDEBUG
9585 if (yydebug)
9586 {
9587 ...
9588 }
9589 #endif
9590
9591 into
9592
9593 if (yydebug)
9594 {
9595 ...
9596 }
9597
9598 unfortunately this leads to a CPP conflict when
9599 `--name-prefix=foo' is used since it produces `#define yydebug
9600 foodebug'.
9601
9602 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9603 (YYDPRINTF): New macro.
9604 Spread its use.
9605 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9606 the bison options.
9607 Also test `--verbose', `--defines' and `--name-prefix'.
9608
71da9eea
AD
96092000-10-02 Akim Demaille <akim@epita.fr>
9610
9611 Improve the readability of the produced parsers.
9612
9613 * src/bison.s1: Formatting changes.
9614 Improve the comment related to the `$' mark.
9615 (yydefault): Don't fall through to `yyresume': `goto' there.
9616 * src/output.c (output_parser): When the `$' is met, skip the end
9617 of its line.
9618 New variable, `number_of_dollar_signs', to check there's exactly
9619 one `$' in the parser skeleton.
9620
95e36146
AD
96212000-10-02 Akim Demaille <akim@epita.fr>
9622
9623 * lib/xstrdup.c: New file, from the fileutils.
9624 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9625 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9626 instead of strlen + xmalloc + strcpy.
9627 * src/symtab.c (copys): Remove, use xstrdup instead.
9628
d7020c20
AD
96292000-10-02 Akim Demaille <akim@epita.fr>
9630
9631 * src/gram.h (associativity): New enum type which replaces the
9632 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9633 `right_assoc', `left_assoc' and `non_assoc'.
9634 Adjust all dependencies.
9635 * src/reader.c: Formatting changes.
9636 (LTYPESTR): Don't define it, use it as a literal in
9637 `reader_output_yylsp'.
9638 * src/symtab.h (symbol_class): New enum type which replaces the
9639 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9640 `sunknown', `stoken and `snterm'.
9641
1916f98e
AD
96422000-10-02 Akim Demaille <akim@epita.fr>
9643
9644 * src/getargs.c (fixed_outfiles): Rename as...
9645 (yaccflag): for consistency and accuracy.
9646 Adjust dependencies.
9647
d7913476
AD
96482000-10-02 Akim Demaille <akim@epita.fr>
9649
9650 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9651 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9652 difficult and introduced a lot of core dump. It turns out that
9653 Bison used an implementation of `xmalloc' based on `calloc', and
9654 at various places it does depend upon the initialization to 0. I
9655 have not tried to isolate the pertinent places, and all the former
9656 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9657 someone should address this issue.
9658
9659 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9660 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9661 files.
9662 Adjust dependencies.
9663 * src/warshall.h: New file.
9664 Propagate.
9665
340ef489
AD
96662000-10-02 Akim Demaille <akim@epita.fr>
9667
9668 Various anti-`extern in *.c' changes.
9669
9670 * src/system.h: Include `assert.h'.
9671
b2ca4022
AD
96722000-10-02 Akim Demaille <akim@epita.fr>
9673
9674 * src/state.h (nstates, final_state, first_state, first_shift)
9675 (first_reduction): Move their exportation from here...
9676 * src/LR0.h: to here.
9677 Adjust dependencies.
9678 * src/getargs.c (statisticsflag): New variable.
9679 Add support for `--statistics'.
9680 Adjust dependencies.
9681
9682 Remove a lot of now useless `extern' statements in most files.
9683
403b315b
AD
96842000-10-02 Akim Demaille <akim@epita.fr>
9685
9686 * src/LR0.h: New file.
9687 Propagate its use.
9688
07a58c13
AD
96892000-10-02 Akim Demaille <akim@epita.fr>
9690
9691 * src/print.h: New file.
9692 Propagate its use.
9693 * src/print.c: Formatting and ordering changes.
9694 (verbose, terse): Replace with...
9695 (print_results): this new function.
9696 Adjust dependencies.
9697
0619caf0
AD
96982000-10-02 Akim Demaille <akim@epita.fr>
9699
9700 * src/conflicts.c (conflict_report): New function.
9701 (conflict_log, verbose_conflict_log): Replace with...
9702 (print_conflicts): this function.
9703 Adjust dependencies.
9704 * src/conflicts.h: New file.
9705 Propagate its inclusion.
9706
3519ec76
AD
97072000-10-02 Akim Demaille <akim@epita.fr>
9708
9709 * src/nullable.h: New file.
9710 Propagate its inclusion.
9711 * src/nullable.c: Formatting changes.
9712
015acc48
AD
97132000-10-02 Akim Demaille <akim@epita.fr>
9714
9715 * src/reduce.h: New file.
9716 Propagate its inclusion.
9717 * src/reduce.c: Topological sort and other formatting changes.
9718 (bool, TRUE, FALSE): Move their definition to...
9719 * src/system.h: here.
9720
8963a27b
AD
97212000-10-02 Akim Demaille <akim@epita.fr>
9722
9723 * src/files.c: Formatting changes.
9724 (tryopen, tryclose, openfiles): Rename as...
9725 (xfopen, xfclose, open_files): this.
9726 (stringappend): static.
9727 * src/files.h: Complete the list of exported symbols.
9728 Propagate its use.
9729
a70083a3
AD
97302000-10-02 Akim Demaille <akim@epita.fr>
9731
9732 * src/reader.h: New file.
9733 Propagate its use instead of tedious list of `extern' and
9734 prototypes.
9735 * src/reader.c: Formatting changes, topological sort,
9736 s/register//.
9737
abadc117
AD
97382000-10-02 Akim Demaille <akim@epita.fr>
9739
9740 * src/lex.h: Prototype `lex.c' exported functions.
9741 * src/reader.c: Adjust.
9742 * src/lex.c: Formatting changes.
9743 (safegetc): Rename as...
9744 (xgetc): this.
9745
720d742f
AD
97462000-10-02 Akim Demaille <akim@epita.fr>
9747
9748 * src/lalr.h: New file.
9749 Propagate its inclusion instead of prototypes and `extern'.
9750 * src/lalr.c: Formatting changes, topological sorting etc.
9751
f2acea59
AD
97522000-10-02 Akim Demaille <akim@epita.fr>
9753
9754 * src/output.c (token_actions): Introduce a temporary array,
9755 YYDEFACT, that makes it possible for this function to use
9756 output_short_table.
9757
d019d655
AD
97582000-10-02 Akim Demaille <akim@epita.fr>
9759
9760 `user_toknums' is output as a `short[]' in `output.c', while it is
9761 defined as a `int[]' in `reader.c'. For consistency with the
9762 other output tables, `user_toknums' is now defined as a table of
9763 shorts.
9764
9765 * src/reader.c (user_toknums): Be a short table instead of an int
9766 table.
9767 Adjust dependencies.
9768
9769 Factor the short table outputs.
9770
9771 * src/output.c (output_short_table): New function.
9772 * src/output.c (output_gram, output_stos, output_rule_data)
9773 (output_base, output_table, output_check): Use it.
9774
6c89f1c1
AD
97752000-10-02 Akim Demaille <akim@epita.fr>
9776
9777 * src/output.c (output): Topological sort of the functions, in
9778 order to get rid of the `static' prototypes.
9779 No longer use `register'.
9780 * src/output.h: New file.
9781 Propagate its inclusion in files explicitly prototyping functions
9782 from output.c.
9783
d9efd181
AD
97842000-09-21 Akim Demaille <akim@epita.fr>
9785
9786 * src/atgeneral.m4: Update from Autoconf.
9787
c29240e7 97882000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
9789
9790 * src/closure.h: New file.
9791 * src/closure.c: Formatting changes, topological sort over the
9792 functions, use of closure.h.
9793 (initialize_closure, finalize_closure): Rename as...
9794 (new_closure, free_closure): these. Adjust dependencies.
9795 * src/LR0.c: Formatting changes, topological sort, use of
9796 cloture.h.
9797 (initialize_states): Rename as...
9798 (new_states): this.
9799 * src/Makefile.am (noinst_HEADERS): Adjust.
9800
499daa50
AD
98012000-09-20 Akim Demaille <akim@epita.fr>
9802
9803 * src/acconfig.h: Don't protect config.h against multiple
9804 inclusion.
9805 Don't define PARAMS.
9806 * src/system.h: Define PARAMS.
9807 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9808 purpose of config.h. system.h must not try to fix wrong
9809 definitions in config.h.
9810
cc84fd5d
AD
98112000-09-20 Akim Demaille <akim@epita.fr>
9812
9813 * src/derives.h: New file.
9814 * src/main.c, src/derives.h: Use it.
9815 Formatting changes.
9816 * src/Makefile.am (noinst_HEADERS): Adjust.
9817
db5b3a89
AD
98182000-09-20 Akim Demaille <akim@epita.fr>
9819
9820 * tests/atgeneral.m4: Update from Autoconf.
9821 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9822 (AT_CHECK_CALC): New macros.
9823 Use these macros to test bison with options `', `--raw',
9824 `--debug', `--yacc', `--yacc --debug'.
9825
ceed8467
AD
98262000-09-19 Akim Demaille <akim@epita.fr>
9827
9828 * src/output.c: Formatting changes.
9829 * src/machine.h: Remove, leaving its contents in...
9830 * src/system.h: here.
9831 Include stdio.h.
9832 Adjust all dependencies on stdio.h and machine.h.
9833 * src/getargs.h: New file.
9834 Let all `extern' declarations about getargs.c be replaced with
9835 inclusion of `getargs.h'.
9836 * src/Makefile.am (noinst_HEADERS): Adjust.
9837
9838 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9839 scope.
9840 (yyerror): Returns void, not int.
9841 * doc/bison.texinfo: Formatting changes.
9842
05a1d24b
AD
98432000-09-19 Akim Demaille <akim@epita.fr>
9844
9845 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9846 portable.
9847
cbd25751
AD
98482000-09-18 Akim Demaille <akim@epita.fr>
9849
9850 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9851 * src/Makefile.am (INCLUDES): Don't.
9852 Be ready to fetch headers in lib/.
9853
13863333
AD
98542000-09-18 Akim Demaille <akim@epita.fr>
9855
9856 * doc/bison.texinfo: Update the copyright.
9857 ANSIfy and GNUify the examples.
9858 Remove the old menu.
9859
0d533154
AD
98602000-09-18 Akim Demaille <akim@epita.fr>
9861
9862 First set of tests: use the `calc' example from the documentation.
9863
9864 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9865 is defined only when YYDEBUG is.
9866 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9867 * src/files.c (tryopen, tryclose): Formatting changes.
9868 Move to the top and be static.
9869 * src/reader.c (read_signed_integer): Likewise.
9870 * tests/calc.m4: New file.
9871 * Makefile.am, suite.m4: Adjust.
9872 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9873
e79137ac
AD
98742000-09-18 Akim Demaille <akim@epita.fr>
9875
9876 Add support for an Autotest test suite for Bison.
9877
9878 * m4/m4.m4, m4/atconfig.m4: New files.
9879 * m4/Makefile.am (EXTRA_DIST): Adjust.
9880 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9881 files.
9882 * src/getargs.c: Display a more standard --version message.
9883 * src/reader.c (reader): Formatting changes.
9884 No longer depend upon VERSION_STRING.
9885 * configure.in: No longer use `dnl'.
9886 Set up the test suite and the new directory `tests/.
9887 (VERSION_STRING): Remove.
9888
27821bff
AD
98892000-04-14 Akim Demaille <akim@epita.fr>
9890
9891 * src/reader.c (copy_comment2): New function, same as former
9892 `copy_comment', but outputs into two FILE *.
9893 (copy_comment): Use it.
9894 (parse_union_decl): Use it.
9895 (get_type, parse_start_decl): Use the same `invalid' message.
9896 (parse_start_decl, parse_union_decl): Use the same `multiple'
9897 message.
9898 (parse_union_decl, copy_guard, copy_action): Use the same
9899 `unmatched' message.
9900 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9901
cfe5fbc0
AD
99022000-03-31 Akim Demaille <akim@epita.fr>
9903
9904 * src/files.c (tryopen, tryclose): Move to the top.
9905 Be static.
9906
cb7db13e
AD
99072000-03-31 Akim Demaille <akim@epita.fr>
9908
9909 * src/main.c (main): Don't call `done', exit does it.
9910
a0f6b076
AD
99112000-03-31 Akim Demaille <akim@epita.fr>
9912
36281465
AD
9913 * allocate.c: s/return (foo)/return foo/.
9914 * lalr.c: Likewise.
9915 * LR0.c: Likewise.
9916 * output.c: Likewise.
9917 * reader.c: Likewise.
9918 * symtab.c: Likewise.
9919 * vmsgetargs.c: Likewise.
9920
99212000-03-31 Akim Demaille <akim@epita.fr>
9922
9923 Clean up the error reporting functions.
a0f6b076
AD
9924
9925 * src/report.c: New file.
9926 * src/report.h: Likewise.
9927 * src/Makefile.am: Adjust.
9928 * m4/error.m4: New file.
9929 * m4/Makefile.am: Adjust.
9930 * configure.in (jm_PREREQ_ERROR): Call it.
9931 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9932 Remove.
9933 (fatal, fatals): Remove. All callers use complain.c::fatal.
9934 (warn, warni, warns, warnss, warnss): Remove. All callers use
9935 complain.c::complain.
9936 (toomany): Remove, use fatal instead.
9937 * src/files.c (done): No argument, use complain_message_count.
9938 * src/main.c (main): Register `done' to `atexit'.
9939
9940 * src/getargs.c (usage): More `fputs', less `fprintf'.
9941
18539825
AD
99422000-03-28 Akim Demaille <akim@epita.fr>
9943
9944 * lib/: New directory.
9945 * Makefile.am (SUBDIRS): Adjust.
9946 * configure.in: Adjust.
9947 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9948 useless.
9949 * src/alloca.c: Moved to lib/.
9950 * src/getopt.c: Likewise.
9951 * src/getopt1.c: Likewise.
9952 * src/getopt.h: Likewise.
9953 * src/ansi2knr.c: Likewise.
9954 * src/ansi2knr.1: Likewise.
9955 * src/Makefile.am: Adjust.
9956 * lib/Makefile.am: New file.
9957
9f306f2a
AD
99582000-03-28 Akim Demaille <akim@epita.fr>
9959
9960 * src/getargs.c (usage): Refresh the help message.
9961
0ba347b6
AD
99622000-03-17 Akim Demaille <akim@epita.fr>
9963
9964 * src/getopt1.c: Updated from textutils 2.0e
9965 * src/getopt.c: Likewise.
9966 * src/getopt.h: Likewise.
9967
dbe7f271
AD
99682000-03-17 Akim Demaille <akim@epita.fr>
9969
9970 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9971 the file name, not the whole `#line LINE FILE'.
9972
75bbe78d
AD
99732000-03-17 Akim Demaille <akim@epita.fr>
9974
9975 On syntax errors, report the token on which we choked.
9976
aa5fd0ee
AD
9977 * src/bison.s1 (yyparse): In the label yyerrlab, when
9978 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 9979
7b306f52
AD
99802000-03-17 Akim Demaille <akim@epita.fr>
9981
aa5fd0ee 9982 * src/reader.c (copy_at): New function.
7b306f52
AD
9983 (copy_guard): Use it.
9984 (copy_action): Use it.
9985
e87b5700
AD
99862000-03-17 Akim Demaille <akim@epita.fr>
9987
9988 Be kind to translators, save some useless translations.
9989
aa5fd0ee 9990 * src/main.c (banner): New function.
e87b5700
AD
9991 (fatal_banner): Use it.
9992 (warn_banner): Use it.
9993
ae3c3164
AD
99942000-03-17 Akim Demaille <akim@epita.fr>
9995
aa5fd0ee
AD
9996 * src/reader.c (copy_definition): Use copy_string and
9997 copy_comment. Removed now unused `match', `ended',
9998 `cplus_comment'.
ae3c3164
AD
9999 (copy_comment, copy_string): Moved, to be visible from
10000 copy_definition.
10001
4dc58e7c
AD
100022000-03-17 Akim Demaille <akim@epita.fr>
10003
aa5fd0ee
AD
10004 * src/reader.c (copy_string): Declare `static inline'. No
10005 problems with inline, since it is checked by configure.
4dc58e7c
AD
10006 (copy_comment): Likewise.
10007
0a6384c4
AD
100082000-03-17 Akim Demaille <akim@epita.fr>
10009
aa5fd0ee 10010 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 10011
3cef001a
AD
100122000-03-17 Akim Demaille <akim@epita.fr>
10013
aa5fd0ee 10014 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
10015 (copy_action): Use it. Removed now unused `match', `ended',
10016 `cplus_comment'.
10017 (copy_guard): Likewise.
10018
ca36d2ef
AD
100192000-03-17 Akim Demaille <akim@epita.fr>
10020
aa5fd0ee 10021 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
10022 (copy_action): Use it.
10023 (copy_guard): Likewise.
10024
6666f98f
AD
100252000-03-17 Akim Demaille <akim@epita.fr>
10026
10027 Change the handling of @s so that they behave exactly like $s.
10028 There is now a pseudo variable @$ (readble and writable), location
10029 of the lhs of the rule (by default ranging from the location of
10030 the first symbol of the rhs, to the location of the last symbol,
10031 or, if the rhs is empty, YYLLOC).
10032
10033 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10034 yyval.
10035 (yyparse): When providing a default semantic action, provide a
10036 default location action.
10037 (after the $): No longer change `*YYLSP', just stack YYLOC the
10038 same way you stack YYVAL.
10039 * src/reader.c (read_declarations): Use warns.
10040 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10041 (copy_action, case '@'): Likewise.
10042 Use a standard error message, to save useless work from
10043 translators.
10044
41aca2e0
AD
100452000-03-17 Akim Demaille <akim@epita.fr>
10046
aa5fd0ee
AD
10047 * src/bison.s1: Formatting and cosmetics changes.
10048 * src/reader.c: Likewise.
41aca2e0
AD
10049 Update the Copyright notice.
10050
dc08c1d5
AD
100512000-03-17 Akim Demaille <akim@epita.fr>
10052
aa5fd0ee
AD
10053 * src/bison.s1 (#line): All set to `#line' only, since the
10054 Makefile now handles them.
dc08c1d5 10055
9ee3c97b
AD
100562000-03-16 Akim Demaille <akim@epita.fr>
10057
10058 * src/output.c (output_rule_data): Output the documentation of
10059 some of the tables.
10060 (Copyright notice): Update.
10061 Formatting changes.
10062
0de741ca
AD
100632000-03-16 Akim Demaille <akim@epita.fr>
10064
10065 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10066 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10067 One `#if YYDEBUG' remains, since it uses variables which are
10068 defined only if `YYDEBUG != 0'.
10069
bb10be54
AD
100702000-03-16 Akim Demaille <akim@epita.fr>
10071
10072 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10073 and related variables so that the similarities are highlighted.
10074
b07b484a
AD
100752000-03-16 Akim Demaille <akim@epita.fr>
10076
10077 * src/bison.s1: Properly indent CPP directives.
10078
361f60b3
AD
100792000-03-16 Akim Demaille <akim@epita.fr>
10080
10081 * src/bison.s1: Properly indent the `alloca' CPP section.
10082
8c44d3ec
AD
100832000-03-16 Akim Demaille <akim@epita.fr>
10084
10085 Do not hard code values of directories in `configure.in'.
10086 Update the `configure' tool chain.
10087
10088 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10089 src/makefile.am.
10090 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10091 (AC_OUTPUT): Add m4/Makefile.
10092 Bump to bison 1.28a, 1.29 has never been released.
10093 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10094 handled via src/Makefile.am.
10095 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10096 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10097 autoheader.
10098 * Makefile.am (SUBDIRS): Add m4.
10099 (ACLOCAL_AM_FLAGS): New variable.
10100 (AUTOMAKE_OPTIONS): Add check-news.
10101 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10102 the proper line number and file name.
10103 (DEFS): Propagate the location of bison library files and of the
10104 locale files.
10105 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10106 builddir.
10107 * acinclude.m4: Remove, replaced by the directory m4.
10108 * m4/Makefile.am (EXTRA_DIST): New variable.
10109 * m4/gettext.m4: New file, from the fileutils.
10110 * m4/lcmessage.m4: Likewise
10111 * m4/progtest.m4: Likewise.
10112 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10113
f95997e7
AD
101142000-03-10 Akim Demaille <akim@epita.fr>
10115
10116 * src/closure.c:
10117 Formatting changes of various comments.
10118 Respect the GNU coding standards at various places.
10119 Don't use `_()' when no translation is needed.
10120
101211999-12-13 Jesse Thilo <jthilo@gnu.org>
10122
10123 * src/files.c:
10124 OS/2 honors TMPDIR environment variable.
10125
101261999-12-13 Jesse Thilo <jthilo@gnu.org>
10127
10128 * doc/bison.texinfo: Tweaked spelling and grammar.
10129 Updated ISBN.
10130 Removed reference to price of printed copy.
10131 Mention BISON_SIMPLE and BISON_HAIRY.
10132
101331999-12-13 Jesse Thilo <jthilo@gnu.org>
10134
10135 * configure.in, NEWS:
10136 Bison 1.29 released.
10137
101381999-10-27 Jesse Thilo <jthilo@gnu.org>
10139
10140 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10141 Added reference card.
10142
101431999-07-26 Jesse Thilo <jthilo@gnu.org>
10144
10145 * po/ru.po: Added Russian translation.
10146
101471999-07-26 Jesse Thilo <jthilo@gnu.org>
10148
10149 * configure.in: Added Russian translation.
10150
101511999-07-06 Jesse Thilo <jthilo@gnu.org>
10152
10153 * configure.in, NEWS, README:
10154 Released version 1.28.
10155
101561999-06-14 Jesse Thilo <jthilo@gnu.org>
10157
10158 * src/system.h:
10159 Squashed redefinition warning on some systems.
10160
10161 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10162 Have configure build version string instead of relying on ANSI string
10163 concatentation.
10164
101651999-06-14 Jesse Thilo <jthilo@gnu.org>
10166
10167 * po/POTFILES.in: Got rid of version.c.
10168
101691999-06-14 Jesse Thilo <jthilo@gnu.org>
10170
10171 * acconfig.h, configure.in:
10172 Have configure build version string instead of relying on ANSI string
10173 concatentation.
10174
101751999-06-08 Jesse Thilo <jthilo@gnu.org>
10176
10177 * doc/bison.1:
10178 Dropped mention of `+' for long-named options.
10179
101801999-05-30 Jesse Thilo <jthilo@gnu.org>
10181
10182 * src/files.c: Added <unistd.h> for unlink().
10183
10184 * src/Makefile.am, src/system.h:
10185 I18n fixes.
10186
101871999-05-30 Jesse Thilo <jthilo@gnu.org>
10188
10189 * README: Added a FAQ list.
10190
10191 * configure.in, acconfig.h:
10192 I18n fixes.
10193
101941999-05-30 Jesse Thilo <jthilo@gnu.org>
10195
10196 * doc/FAQ, doc/Makefile.am:
10197 Added a FAQ list.
10198
101991999-05-19 Jesse Thilo <jthilo@gnu.org>
10200
10201 * src/alloc.h, src/symtab.h, src/version.c:
10202 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10203
102041999-04-18 Jesse Thilo <jthilo@gnu.org>
10205
10206 * src/.cvsignore, src/Makefile.am:
10207 Reorganized: sources in `src', documentation in `doc'.
10208
10209 * src/lex.c (literalchar):
10210 fixed the code for escaping double quotes (thanks
10211 Jonathan Czisny.)
10212
102131999-04-18 Jesse Thilo <jthilo@gnu.org>
10214
10215 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10216 Adjusted paths to reflect directory reorganization.
10217
102181999-04-18 Jesse Thilo <jthilo@gnu.org>
10219
10220 * doc/.cvsignore, doc/Makefile.am:
10221 Reorganized: sources in `src', documentation in `doc'.
10222
102231999-04-18 Jesse Thilo <jthilo@gnu.org>
10224
10225 * configure.in:
10226 Updated AC_INIT file to reflect directory reorganization.
10227
10228 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10229 Reorganized: sources in `src', documentation in `doc'.
10230
102311999-04-13 Jesse Thilo <jthilo@gnu.org>
10232
10233 * src/allocate.c:
10234 Don't declare calloc() and realloc() if not necessary.
10235
102361999-04-13 Jesse Thilo <jthilo@gnu.org>
10237
10238 * configure.in, acconfig.h, acinclude.m4:
10239 Don't declare calloc() and realloc() if not necessary.
10240
102411999-03-23 Jesse Thilo <jthilo@gnu.org>
10242
10243 * po/.cvsignore: Added i18n support.
10244
102451999-03-23 Jesse Thilo <jthilo@gnu.org>
10246
10247 * acconfig.h, configure.in, Makefile.am:
10248 Added i18n support.
10249
102501999-03-22 Jesse Thilo <jthilo@gnu.org>
10251
10252 * src/bison.s1: Fixed #line numbers.
10253
102541999-03-15 Jesse Thilo <jthilo@gnu.org>
10255
10256 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10257 Added PO files from Translation Project.
10258
102591999-03-03 Jesse Thilo <jthilo@gnu.org>
10260
10261 * Makefile.am:
10262 Added support for non-ANSI compilers (ansi2knr).
10263
102641999-02-16 Jesse Thilo <jthilo@gnu.org>
10265
10266 * configure.in: Bumped version number to 1.27.
10267
10268 * Makefile.am:
10269 Added `bison.simple' to list of files removed by `make distclean'.
10270
102711999-02-12 Jesse Thilo <jthilo@gnu.org>
10272
10273 * src/files.c, src/files.h:
10274 Defined locations of parser files in config.h instead of Makefile.
10275
102761999-02-12 Jesse Thilo <jthilo@gnu.org>
10277
10278 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10279 Defined locations of parser files in config.h instead of Makefile.
10280
102811999-02-09 Jesse Thilo <jthilo@gnu.org>
10282
10283 * Makefile.am:
10284 Removed inappropriate use of $< macro.
10285
102861999-02-05 Jesse Thilo <jthilo@gnu.org>
10287
10288 * po/Makefile.in.in, po/POTFILES.in:
10289 Add `po' directory skeleton.
10290
102911999-01-27 Jesse Thilo <jthilo@gnu.org>
10292
10293 * README: Document help-bison list.
10294
10295 * configure.in: Add check for mkstemp().
10296
102971999-01-20 Jesse Thilo <jthilo@gnu.org>
10298
10299 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10300 Hush a few compiler warnings.
10301
10302 * src/files.c:
10303 Add tryclose(), which verifies that fclose was successful.
10304 Hush a couple of compiler warnings.
10305
103061999-01-20 Jesse Thilo <jthilo@gnu.org>
10307
10308 * Makefile.am, OChangeLog:
10309 ChangeLog is now automatically generated. Include the old version as
10310 OChangeLog.
10311
103121999-01-14 Jesse Thilo <jthilo@gnu.org>
10313
10314 * 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:
10315 Update FSF address.
10316
103171999-01-14 Jesse Thilo <jthilo@gnu.org>
10318
10319 * doc/bison.texinfo: Fix formatting glitch.
10320
10321 * doc/bison.texinfo: Update FSF address.
10322
103231999-01-14 Jesse Thilo <jthilo@gnu.org>
10324
10325 * acconfig.h: Update FSF address.
10326
103271999-01-08 Jesse Thilo <jthilo@gnu.org>
10328
10329 * src/system.h:
10330 Don't define PACKAGE here, since config.h defines it.
10331
103321998-12-30 Jesse Thilo <jthilo@gnu.org>
10333
10334 * src/reader.c: Update copyright date.
10335
10336 * src/main.c:
10337 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10338 favor of output directly to stderr (avoids buffer overruns).
10339
10340 * src/reader.c: Some checks for premature EOF.
10341
10342 * 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:
10343 Use prototypes if the compiler understands them.
10344
10345 * src/files.c: Honor TMPDIR on Unix hosts.
10346 Use prototypes if the compiler understands them.
10347
10348 * src/reader.c:
10349 Fix a couple of buffer overrun bugs.
10350 Use prototypes if the compiler understands them.
10351
10352 * src/system.h: Include unistd.h and ctype.h.
10353 Use #ifdef instead of #if for NLS symbols.
10354
103551998-12-30 Jesse Thilo <jthilo@gnu.org>
10356
10357 * doc/bison.texinfo:
10358 Delete comment "consider using @set for edition number, etc..." since
10359 we now are doing so.
10360
103611998-12-30 Jesse Thilo <jthilo@gnu.org>
10362
10363 * configure.in:
10364 Use prototypes if the compiler understands them.
10365
10366 * NEWS: Document 1.26 highlights.
10367
10368 * Makefile.am: Require Automake 1.3 or later.
10369
10370 * acconfig.h:
10371 Use prototypes if the compiler understands them.
10372
103731998-12-29 Jesse Thilo <jthilo@gnu.org>
10374
10375 * src/version.c:
10376 Use VERSION symbol from automake for version number.
10377
103781998-12-29 Jesse Thilo <jthilo@gnu.org>
10379
10380 * acconfig.h, configure.in, version.cin:
10381 Use VERSION symbol from automake for version number.
10382
103831998-11-28 Jesse Thilo <jthilo@gnu.org>
10384
10385 * Makefile.am:
10386 Distribute original version of simple parser (bison.s1), not built
10387 version (bison.simple).
10388
103891998-11-28 Jesse Thilo <jthilo@gnu.org>
10390
10391 * doc/bison.texinfo: Add info dir entry.
10392
10393 * doc/bison.texinfo:
10394 Let automake put version number into documentation.
10395
103961998-11-26 Jesse Thilo <jthilo@gnu.org>
10397
10398 * src/bison.cld, src/build.com, src/vmshlp.mar:
10399 Add non-RCS files from /gd/gnu/bison.
10400
104011998-11-26 Jesse Thilo <jthilo@gnu.org>
10402
10403 * doc/bison.1:
10404 Document the BISON_HAIRY and BISON_SIMPLE variables.
10405
104061998-11-25 Jesse Thilo <jthilo@gnu.org>
10407
10408 * src/version.c: Build version.c automatically.
10409
10410 * src/reader.c:
10411 Fix token numbering (used to start at 258, not 257).
10412
10413 * src/system.h: Include config.h.
10414
10415 * src/getargs.c: Update bug report address.
10416
10417 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10418 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10419
104201998-11-25 Jesse Thilo <jthilo@gnu.org>
10421
10422 * Makefile.am:
10423 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10424
10425 * configure.in, version.cin:
10426 Build version.c automatically.
10427
10428 * AUTHORS: Add AUTHORS file.
10429
10430 * README: Update bug report address.
10431
10432 * bison.simple:
10433 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10434
10435 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10436 Add automake stuff.
10437
104381998-11-25 Jesse Thilo <jthilo@gnu.org>
10439
10440 * doc/bison.texinfo: Clean up some formatting.
10441
104421998-05-05 Richard Stallman <rms@gnu.org>
10443
10444 * doc/bison.texinfo:
10445 Explain better why to make a pure parser.
10446
104471998-01-05 Richard Stallman <rms@gnu.org>
10448
10449 * src/files.c (openfiles):
10450 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10451 find a temporary directory, if possible. Do not unlink files while
10452 they are open.
10453
104541997-08-25 Richard Stallman <rms@gnu.org>
10455
10456 * src/reader.c (stack_offset;):
10457 Change some warni to warns.
10458
10459 * src/lex.c (literalchar): Use warns, not warni.
10460
104611997-06-28 Richard Stallman <rms@gnu.org>
10462
10463 * src/bison.s1: Add a Bison version comment.
10464
10465 * src/main.c (fatal, warn, berror):
10466 Use program_name.
10467
104681997-06-28 Richard Stallman <rms@gnu.org>
10469
10470 * Makefile.in (bison_version): New variable.
10471 (dist): Use that variable.
10472 (bison.s1): Substitute the Bison version into bison.simple.
10473
10474 * bison.simple: Add a Bison version comment.
10475
104761997-06-18 Richard Stallman <rms@gnu.org>
10477
10478 * src/main.c (fatal, warn, berror):
10479 Make error messages standard.
10480 (toomany): Improve error message text.
10481
10482 * 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:
10483 new.h renamed to alloc.h.
10484
104851997-06-18 Richard Stallman <rms@gnu.org>
10486
10487 * Makefile.in: new.h renamed to alloc.h.
10488
104891997-05-24 Richard Stallman <rms@gnu.org>
10490
10491 * src/lex.c (literalchar):
10492 Fix the code for escaping \, " and '.
10493
10494 (lex): Avoid trouble when there are many chars
10495 to discard in a char literal with just several chars in it.
10496
104971997-05-17 Richard Stallman <rms@gnu.org>
10498
10499 * src/bison.s1:
10500 Use malloc, if using alloca is troublesome.
10501 (YYSTACK_USE_ALLOCA): New flag macro.
10502 Define it for some systems and compilers.
10503 (YYSTACK_ALLOC): New macro.
10504 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10505 If it was malloc'd, free it.
10506
105071997-05-17 Richard Stallman <rms@gnu.org>
10508
10509 * bison.simple:
10510 Use malloc, if using alloca is troublesome.
10511 (YYSTACK_USE_ALLOCA): New flag macro.
10512 Define it for some systems and compilers.
10513 (YYSTACK_ALLOC): New macro.
10514 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10515 If it was malloc'd, free it.
10516
105171997-04-23 Richard Stallman <rms@gnu.org>
10518
10519 * src/bison.s1:
10520 (alloca) [__hpux]: Always define as __builtin_alloca.
10521
105221997-04-23 Richard Stallman <rms@gnu.org>
10523
10524 * bison.simple:
10525 (alloca) [__hpux]: Always define as __builtin_alloca.
10526
105271997-04-22 Richard Stallman <rms@gnu.org>
10528
10529 * src/bison.s1:
10530 [__hpux]: Include alloca.h (right for HPUX 10)
10531 instead of declaring alloca (right for HPUX 9).
10532
10533 * src/bison.s1 (__yy_memcpy):
10534 Declare arg `count' as unsigned int.
10535 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10536
105371997-04-22 Richard Stallman <rms@gnu.org>
10538
10539 * bison.simple:
10540 [__hpux]: Include alloca.h (right for HPUX 10)
10541 instead of declaring alloca (right for HPUX 9).
10542
10543 * bison.simple (__yy_memcpy):
10544 Declare arg `count' as unsigned int.
10545 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10546
105471997-01-03 Richard Stallman <rms@gnu.org>
10548
10549 * src/allocate.c: [__STDC__ or _MSC_VER]:
10550 Declare calloc and realloc to return void *.
10551
105521997-01-02 Richard Stallman <rms@gnu.org>
10553
10554 * src/system.h:
10555 [_MSC_VER]: Include stdlib.h and process.h.
10556 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10557
10558 * src/main.c (main): Return FAILURE as a value.
10559 (printable_version): Declare arg as int, not char.
10560
105611997-01-02 Richard Stallman <rms@gnu.org>
10562
10563 * Makefile.in (dist):
10564 Explicitly check for symlinks, and copy them.
10565
105661996-12-19 Richard Stallman <rms@gnu.org>
10567
10568 * src/files.c:
10569 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10570
105711996-12-18 Paul Eggert <eggert@gnu.org>
10572
10573 * src/bison.s1 (yyparse):
10574 If __GNUC__ and YYPARSE_PARAM are both defined,
10575 declare yyparse to have a void * argument.
10576
105771996-12-18 Paul Eggert <eggert@gnu.org>
10578
10579 * bison.simple (yyparse):
10580 If __GNUC__ and YYPARSE_PARAM are both defined,
10581 declare yyparse to have a void * argument.
10582
105831996-12-17 Richard Stallman <rms@gnu.org>
10584
10585 * src/reduce.c (nbits): Add some casts.
10586
105871996-08-12 Richard Stallman <rms@gnu.org>
10588
10589 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10590
105911996-08-12 Richard Stallman <rms@gnu.org>
10592
10593 * bison.simple: Test _MSDOS as well as _MSDOS_.
10594
105951996-07-31 Richard Stallman <rms@gnu.org>
10596
10597 * src/bison.s1:
10598 [__sun && __i386]: Include alloca.h.
10599
106001996-07-31 Richard Stallman <rms@gnu.org>
10601
10602 * bison.simple:
10603 [__sun && __i386]: Include alloca.h.
10604
106051996-07-30 Richard Stallman <rms@gnu.org>
10606
10607 * src/bison.s1: Comment change.
10608
10609 * src/bison.s1: Test _MSDOS_, not MSDOS.
10610
106111996-07-30 Richard Stallman <rms@gnu.org>
10612
10613 * bison.simple: Comment change.
10614
10615 * bison.simple: Test _MSDOS_, not MSDOS.
10616
106171996-06-01 Richard Stallman <rms@gnu.org>
10618
10619 * 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:
10620 Insert `_' macro around many string constants.
10621
10622 * src/main.c:
10623 Insert `_' macro around many string constants.
10624
10625 (main): Call setlocale, bindtextdomain and textdomain.
10626
10627 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10628 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10629 [ENABLE_NLS]: Include libintl.h.
10630 [ENABLE_NLS] (gettext): Define.
10631 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10632 (N_, PACKAGE, LOCALEDIR): New macros.
10633
106341996-06-01 Richard Stallman <rms@gnu.org>
10635
10636 * POTFILES.in: New file.
10637
10638 * Makefile.in (allocate.o):
10639 Define target explicitly.
10640
10641 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10642 (LDFLAGS): Set to @LDFLAGS@.
10643 (configure): Run autoconf only if preceding `cd' succeeds.
10644 (bison.s1): Redirect output to temporary file then move the
10645 temporary to the target, rather than redirecting directly to bison.s1.
10646 (clean): Remove config.status and config.log.
10647 (distclean): Don't remove config.status here.
10648
106491996-05-12 Richard Stallman <rms@gnu.org>
10650
10651 * src/bison.s1:
10652 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10653
106541996-05-12 Richard Stallman <rms@gnu.org>
10655
10656 * bison.simple:
10657 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10658
106591996-05-11 Richard Stallman <rms@gnu.org>
10660
10661 * src/bison.s1 (__yy_memcpy):
10662 Really reorder the args, as was supposedly done on Feb 14 1995.
10663 (yyparse): Calls changed accordingly.
10664
106651996-05-11 Richard Stallman <rms@gnu.org>
10666
10667 * Makefile.in (dist): Don't use $(srcdir).
10668
10669 * bison.simple (__yy_memcpy):
10670 Really reorder the args, as was supposedly done on Feb 14 1995.
10671 (yyparse): Calls changed accordingly.
10672
106731996-01-27 Richard Stallman <rms@gnu.org>
10674
10675 * src/output.c (output_rule_data):
10676 Test YYERROR_VERBOSE in the conditional
10677 around the definition of ttyname.
10678
106791995-12-29 Richard Stallman <rms@gnu.org>
10680
10681 * src/bison.s1:
10682 Fix line numbers in #line commands.
10683
106841995-12-29 Richard Stallman <rms@gnu.org>
10685
10686 * bison.simple:
10687 Fix line numbers in #line commands.
10688
106891995-12-27 Richard Stallman <rms@gnu.org>
10690
10691 * src/bison.s1 (YYPARSE_PARAM_DECL):
10692 In C++, make it always null.
10693 (YYPARSE_PARAM_ARG): New macro.
10694 (yyparse): Use YYPARSE_PARAM_ARG.
10695
106961995-12-27 Richard Stallman <rms@gnu.org>
10697
10698 * bison.simple (YYPARSE_PARAM_DECL):
10699 In C++, make it always null.
10700 (YYPARSE_PARAM_ARG): New macro.
10701 (yyparse): Use YYPARSE_PARAM_ARG.
10702
107031995-11-29 Richard Stallman <rms@gnu.org>
10704
10705 * doc/bison.texinfo:
10706 Describe literal string tokens, %raw, %no_lines, %token_table.
10707
107081995-11-29 Daniel Hagerty <hag@gnu.org>
10709
10710 * doc/bison.texinfo: Fixed update date
10711
107121995-10-16 Richard Stallman <rms@gnu.org>
10713
10714 * src/version.c: Version 1.25.
10715
107161995-10-16 Richard Stallman <rms@gnu.org>
10717
10718 * NEWS: *** empty log message ***
10719
107201995-10-16 Richard Stallman <rms@gnu.org>
10721
10722 * doc/bison.1, doc/bison.rnh:
10723 Add new options.
10724
107251995-10-15 Richard Stallman <rms@gnu.org>
10726
10727 * src/vmsgetargs.c, src/getargs.c:
10728 Added -n, -k, and -raw switches.
10729 (noparserflag, toknumflag, rawtoknumflag): New variables.
10730
10731 * src/symtab.h (SALIAS):
10732 New #define for adding aliases to %token.
10733 (struct bucket): Added `alias' field.
10734
10735 * src/reduce.c (reduce_grammar):
10736 Revise error message.
10737 (print_notices): Remove final `.' from error message.
10738
10739 * src/reader.c (reader_output_yylsp):
10740 New function.
10741 (readgram): Use `#if 0' around code that accepted %command
10742 inside grammar rules: The documentation doesn't allow it,
10743 and it will fail since the %command processors scan for the next %.
10744 (parse_token_decl): Extended the %token
10745 declaration to allow a multi-character symbol as an alias.
10746 (parse_thong_decl): New function.
10747 (read_declarations): Added %thong declarations.
10748 (read_declarations): Handle NOOP to deal with allowing
10749 % declarations as another means to specify the flags.
10750 (readgram): Allow %prec prior to semantics embedded in a rule.
10751 (skip_to_char, read_declarations, copy_definition)
10752 (parse_token_decl, parse_start_decl, parse_type_decl)
10753 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10754 (get_type_name, copy_guard, copy_action, readgram)
10755 (get_type, packsymbols): Revised most error messages.
10756 Changed `fatal' to `warnxxx' to avoid aborting for error.
10757 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10758 (read_declarations): Improve the error message for
10759 an invalid character. Do not abort.
10760 (read_declarations, copy_guard, copy_action): Use
10761 printable_version to avoid unprintable characters in printed output.
10762 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10763 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10764 Allow the type of a non-terminal can be given
10765 more than once, as long as all specifications give the same type.
10766
10767 * src/output.c:
10768 (output_headers, output_trailers, output, output_gram)
10769 (output_rule_data): Implement noparserflag variable.
10770 Implement toknumflag variable.
10771 (output): Call reader_output_yylsp to output LTYPESTR.
10772
10773 * src/main.c (main):
10774 If reader sees an error, don't process the grammar.
10775 (fatals): Updated to not use VARARGS1.
10776 (printable_version, int_to_string, warn, warni, warns, warnss)
10777 (warnsss): New error reporting functions. Avoid abort for error.
10778
10779 * src/lex.h:
10780 Added THONG and NOOP for alias processing.
10781 Added SETOPT for the new code that allows setting options with %flags.
10782
10783 * src/lex.c:
10784 Include getopt.h. Add some extern decls.
10785 (safegetc): New function to deal with EOF gracefully.
10786 (literalchar); new function to deal with reading \ escapes.
10787 (lex): Use literalchar.
10788 (lex): Implemented "..." tokens.
10789 (literalchar, lex, parse_percent_token): Made tokenbuffer
10790 always contain the token. This includes growing the token
10791 buffer while reading an integer.
10792 (parse_percent_token): Replaced if-else statement with percent_table.
10793 (parse_percent_token): Added % declarations as another
10794 way to specify the flags -n, -l, and -r. Also added hooks for
10795 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10796 major changes to files.c.
10797 (lex) Retain in the incoming stream a character following
10798 an incorrect '/'.
10799 (skip_white_space, lex): Revised most error messages
10800 and changed fatal to warn to avoid aborting.
10801 (percent_table): Added %thong declarations.
10802
10803 * src/gram.h: Comment changes.
10804
10805 * src/files.c (openfiles, open_extra_files, done):
10806 Add faction flag
10807 and actfile file. Handle noparserflag. Both for -n switch.
10808
10809 * src/conflicts.c (resolve_sr_conflict):
10810 Remove use of alloca.
10811
108121995-06-01 Jim Meyering <meyering@gnu.org>
10813
10814 * doc/bison.texinfo: *** empty log message ***
10815
108161995-05-06 Richard Stallman <rms@gnu.org>
10817
10818 * src/bison.s1: Comment change.
10819
108201995-05-06 Richard Stallman <rms@gnu.org>
10821
10822 * bison.simple: Comment change.
10823
108241995-05-03 Richard Stallman <rms@gnu.org>
10825
10826 * src/version.c: Version now 1.24.
10827
10828 * src/bison.s1: Change distribution terms.
10829
10830 * src/version.c: Version now 1.23.
10831
108321995-05-03 Richard Stallman <rms@gnu.org>
10833
10834 * doc/bison.texinfo:
10835 Rewrite "Conditions for Using Bison".
10836 Update version to 1.24.
10837
108381995-05-03 Richard Stallman <rms@gnu.org>
10839
10840 * bison.simple: Change distribution terms.
10841
108421995-02-23 Richard Stallman <rms@gnu.org>
10843
10844 * src/files.c: Test __VMS_POSIX as well as VMS.
10845
108461995-02-14 Jim Meyering <meyering@gnu.org>
10847
10848 * src/bison.s1 (__yy_memcpy):
10849 Renamed from __yy_bcopy to avoid
10850 confusion. Reverse FROM and TO arguments to be consistent with
10851 those of memcpy.
10852
108531995-02-14 Jim Meyering <meyering@gnu.org>
10854
10855 * bison.simple (__yy_memcpy):
10856 Renamed from __yy_bcopy to avoid
10857 confusion. Reverse FROM and TO arguments to be consistent with
10858 those of memcpy.
10859
108601994-11-10 David J. MacKenzie <djm@gnu.org>
10861
10862 * NEWS: reformat
10863
10864 * NEWS: New file.
10865
10866 * Makefile.in (DISTFILES): Include NEWS.
10867
10868 * Makefile.in (DISTFILES):
10869 Include install-sh, not install.sh.
10870
10871 * configure.in: Update to Autoconf v2 macro names.
10872
108731994-10-05 David J. MacKenzie <djm@gnu.org>
10874
10875 * Makefile.in: fix typo
10876
10877 * Makefile.in (prefix, exec_prefix):
10878 Let configure set them.
10879
108801994-09-28 David J. MacKenzie <djm@gnu.org>
10881
10882 * Makefile.in: Set datadir to $(prefix)/share.
10883
108841994-09-15 Richard Stallman <rms@gnu.org>
10885
10886 * src/bison.s1:
10887 Update copyright notice and GPL version.
10888
108891994-09-15 Richard Stallman <rms@gnu.org>
10890
10891 * bison.simple:
10892 Update copyright notice and GPL version.
10893
108941994-07-12 Richard Stallman <rms@gnu.org>
10895
10896 * src/reduce.c, src/reader.c:
10897 entered into RCS
10898
108991994-05-05 David J. MacKenzie <djm@gnu.org>
10900
10901 * Makefile.in: entered into RCS
10902
109031994-03-26 Richard Stallman <rms@gnu.org>
10904
10905 * src/bison.s1: entered into RCS
10906
109071994-03-26 Richard Stallman <rms@gnu.org>
10908
10909 * bison.simple: entered into RCS
10910
109111994-03-25 Richard Stallman <rms@gnu.org>
10912
10913 * src/main.c: entered into RCS
10914
109151994-03-24 Richard Stallman <rms@gnu.org>
10916
10917 * src/conflicts.c: entered into RCS
10918
109191994-01-02 Richard Stallman <rms@gnu.org>
10920
10921 * Makefile.in: *** empty log message ***
10922
109231993-11-21 Richard Stallman <rms@gnu.org>
10924
10925 * src/bison.s1: *** empty log message ***
10926
109271993-11-21 Richard Stallman <rms@gnu.org>
10928
10929 * doc/bison.texinfo: entered into RCS
10930
10931 * doc/bison.texinfo: *** empty log message ***
10932
109331993-11-21 Richard Stallman <rms@gnu.org>
10934
10935 * bison.simple: *** empty log message ***
10936
109371993-10-25 David J. MacKenzie <djm@gnu.org>
10938
10939 * doc/bison.texinfo: *** empty log message ***
10940
109411993-10-19 Richard Stallman <rms@gnu.org>
10942
10943 * src/bison.s1: *** empty log message ***
10944
109451993-10-19 Richard Stallman <rms@gnu.org>
10946
10947 * bison.simple: *** empty log message ***
10948
109491993-10-14 Richard Stallman <rms@gnu.org>
10950
10951 * src/bison.s1: *** empty log message ***
10952
109531993-10-14 Richard Stallman <rms@gnu.org>
10954
10955 * bison.simple: *** empty log message ***
10956
109571993-09-14 David J. MacKenzie <djm@gnu.org>
10958
10959 * doc/bison.texinfo: *** empty log message ***
10960
109611993-09-13 Noah Friedman <friedman@gnu.org>
10962
10963 * Makefile.in: *** empty log message ***
10964
109651993-09-10 Richard Stallman <rms@gnu.org>
10966
10967 * src/conflicts.c: *** empty log message ***
10968
10969 * src/system.h: entered into RCS
10970
109711993-09-10 Richard Stallman <rms@gnu.org>
10972
10973 * doc/bison.1: entered into RCS
10974
109751993-09-06 Noah Friedman <friedman@gnu.org>
10976
10977 * src/version.c: entered into RCS
10978
109791993-09-06 Noah Friedman <friedman@gnu.org>
10980
10981 * Makefile.in: *** empty log message ***
10982
109831993-07-30 David J. MacKenzie <djm@gnu.org>
10984
10985 * Makefile.in: *** empty log message ***
10986
109871993-07-24 Richard Stallman <rms@gnu.org>
10988
10989 * src/bison.s1: *** empty log message ***
10990
109911993-07-24 Richard Stallman <rms@gnu.org>
10992
10993 * bison.simple: *** empty log message ***
10994
109951993-07-08 David J. MacKenzie <djm@gnu.org>
10996
10997 * Makefile.in: *** empty log message ***
10998
109991993-07-04 Richard Stallman <rms@gnu.org>
11000
11001 * src/bison.s1: *** empty log message ***
11002
110031993-07-04 Richard Stallman <rms@gnu.org>
11004
11005 * bison.simple: *** empty log message ***
11006
110071993-06-26 David J. MacKenzie <djm@gnu.org>
11008
11009 * src/getargs.c: entered into RCS
11010
110111993-06-26 David J. MacKenzie <djm@gnu.org>
11012
11013 * doc/bison.texinfo: *** empty log message ***
11014
11015 * doc/bison.1: New file.
11016
110171993-06-25 Richard Stallman <rms@gnu.org>
11018
11019 * src/getargs.c: New file.
11020
110211993-06-16 Richard Stallman <rms@gnu.org>
11022
11023 * src/bison.s1: *** empty log message ***
11024
110251993-06-16 Richard Stallman <rms@gnu.org>
11026
11027 * bison.simple: *** empty log message ***
11028
110291993-06-03 Richard Stallman <rms@gnu.org>
11030
11031 * src/bison.s1: New file.
11032
110331993-06-03 Richard Stallman <rms@gnu.org>
11034
11035 * doc/bison.texinfo: *** empty log message ***
11036
110371993-06-03 Richard Stallman <rms@gnu.org>
11038
11039 * bison.simple: New file.
11040
110411993-05-19 Richard Stallman <rms@gnu.org>
11042
11043 * doc/bison.texinfo: New file.
11044
110451993-05-07 Noah Friedman <friedman@gnu.org>
11046
11047 * Makefile.in: *** empty log message ***
11048
110491993-04-28 Noah Friedman <friedman@gnu.org>
11050
11051 * src/reader.c: *** empty log message ***
11052
110531993-04-23 Noah Friedman <friedman@gnu.org>
11054
11055 * src/alloc.h: entered into RCS
11056
110571993-04-20 David J. MacKenzie <djm@gnu.org>
11058
11059 * src/version.c: *** empty log message ***
11060
11061 * src/files.c, src/allocate.c:
11062 entered into RCS
11063
11064 * src/reader.c: *** empty log message ***
11065
11066 * src/lex.c: entered into RCS
11067
11068 * src/conflicts.c: New file.
11069
11070 * src/symtab.c: entered into RCS
11071
11072 * src/alloc.h: New file.
11073
11074 * src/LR0.c: entered into RCS
11075
110761993-04-18 Noah Friedman <friedman@gnu.org>
11077
11078 * src/reader.c: New file.
11079
11080 * src/version.c: *** empty log message ***
11081
110821993-04-18 Noah Friedman <friedman@gnu.org>
11083
11084 * Makefile.in: *** empty log message ***
11085
110861993-04-17 Noah Friedman <friedman@gnu.org>
11087
11088 * Makefile.in: *** empty log message ***
11089
110901993-04-15 Richard Stallman <rms@gnu.org>
11091
11092 * src/main.c, src/files.c:
11093 New file.
11094
110951993-04-15 Noah Friedman <friedman@gnu.org>
11096
11097 * configure.in: entered into RCS
11098
11099 * configure.in: *** empty log message ***
11100
11101 * configure.in: New file.
11102
111031993-04-14 Richard Stallman <rms@gnu.org>
11104
11105 * Makefile.in: New file.
11106
111071993-04-13 Richard Stallman <rms@gnu.org>
11108
11109 * src/version.c: New file.
11110
111111993-03-25 Richard Stallman <rms@gnu.org>
11112
11113 * src/output.c: entered into RCS
11114
111151992-09-25 Richard Stallman <rms@gnu.org>
11116
11117 * configure.bat: entered into RCS
11118
111191992-06-22 Richard Stallman <rms@gnu.org>
11120
11121 * src/vmsgetargs.c: entered into RCS
11122
111231992-06-22 Richard Stallman <rms@gnu.org>
11124
11125 * doc/bison.rnh: entered into RCS
11126
111271992-04-20 David J. MacKenzie <djm@gnu.org>
11128
11129 * README: entered into RCS
11130
111311992-01-22 Richard Stallman <rms@gnu.org>
11132
11133 * src/machine.h: entered into RCS
11134
111351991-12-21 Richard Stallman <rms@gnu.org>
11136
11137 * src/lalr.c, src/closure.c:
11138 entered into RCS
11139
111401991-12-20 Richard Stallman <rms@gnu.org>
11141
11142 * src/state.h: entered into RCS
11143
111441991-12-18 Richard Stallman <rms@gnu.org>
11145
11146 * src/print.c, src/nullable.c, src/derives.c:
11147 entered into RCS
11148
111491991-11-03 David J. MacKenzie <djm@gnu.org>
11150
11151 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11152 entered into RCS
11153
111541988-09-09 Richard Stallman <rms@gnu.org>
11155
11156 * src/bison.hairy: entered into RCS
11157
111581987-12-16 Richard Stallman <rms@gnu.org>
11159
11160 * REFERENCES: entered into RCS
dc546b0f 11161
f294a2c2
AD
11162-----
11163
33167b8b 11164Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
dc546b0f 111651998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
f294a2c2 11166
33167b8b 11167This file is part of Bison, the GNU Compiler Compiler.
f294a2c2 11168
33167b8b 11169Bison is free software; you can redistribute it and/or modify
f294a2c2
AD
11170it under the terms of the GNU General Public License as published by
11171the Free Software Foundation; either version 2, or (at your option)
11172any later version.
11173
33167b8b 11174Bison is distributed in the hope that it will be useful,
f294a2c2
AD
11175but WITHOUT ANY WARRANTY; without even the implied warranty of
11176MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11177GNU General Public License for more details.
11178
11179You should have received a copy of the GNU General Public License
33167b8b 11180along with Bison; see the file COPYING. If not, write to
f294a2c2
AD
11181the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11182Boston, MA 02111-1307, USA.