]> git.saurik.com Git - bison.git/blame - ChangeLog
* doc/bison.texinfo (How Can I Reset @code{yyparse}):
[bison.git] / ChangeLog
CommitLineData
3ab37077
PE
12003-05-12 Paul Eggert <eggert@twinsun.com>
2
3 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
4 English a bit. Fix fclose typo. Change "const char" to "char
5 const", and use ANSI C rather than K&R for "main". Suggest
6 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
7 and suggest yy_switch_to_buffer.
8
92003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
10
11 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12 C89. This avoids a diagnostic on compilers that define __STDC__
13 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
14 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
15
e743727f
PE
162003-05-03 Paul Eggert <eggert@twinsun.com>
17
18 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
19 Do not overrun array bounds.
20 This should fix a bug reported today by Olatunji Oluwabukunmi in
21 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
22
916708d5
AD
232003-04-29 Akim Demaille <akim@epita.fr>
24
25 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
26 * src/getargs.c, src/getargs.h: here, as bool, not int.
27 (nondeterministic_parser): New.
28 * src/parse-gram.y, src/scan-gram.l: Support
29 %nondeterministic-parser.
30 * src/output.c (prepare): Use nondeterministic_parser instead
31 of glr_parser where appropriate.
32 * src/tables.c (conflict_row, action_row, save_row)
33 (token_actions, token_actions, pack_vector): Ditto.
34
a06ea4aa
AD
352003-04-29 Akim Demaille <akim@epita.fr>
36
37 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
38
211074ca
AD
392003-04-29 Akim Demaille <akim@epita.fr>
40
41 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
42 with %pure-parser and %locations to exercise the patch from Yakov
43 Markovitch below.
44
6175ffe3
PE
452003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
46
47 * data/yacc.c: (b4_lex_param): Corrected for the case where
48 %lex-param is provided and %pure-parser isn't.
49
b1e95857
PE
502003-04-27 Paul Eggert <eggert@twinsun.com>
51
52 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
53 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
54 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
55 if it is not defined.
56 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
57
acda9df6
PE
582003-04-26 Paul Eggert <eggert@twinsun.com>
59
3470c57b
PE
60 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
61 Declare to be of type suitable for the ninf value itself, not of
62 type suitable for the corresponding table, since the latter might
63 be unsigned but the ninf value might be negative. This fixes a
64 bug reported by Alexandre Duret-Lutz in
65 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
66
acda9df6
PE
67 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
68 invokes it. We shouldn't invoke it twice because it will attempt
69 to put error.o in the archive twice. This fixes a glitch reported
70 by Martin Mokrejs in
71 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
72
b5250f26
PE
732003-04-21 Paul Eggert <eggert@twinsun.com>
74
75 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
76 to gnulib.
77
089ac0f1
PE
782003-04-21 Yakov Markovitch <Markovitch@iso.ru>
79
80 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
81 Fix obvious typo that results in uncompilable GLR parsers
82 when both %pure-parser and %locations are used. (trivial change)
83
5ededac6
PE
842003-04-17 Paul Eggert <eggert@twinsun.com>
85
1b8f2fff
PE
86 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
87 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
88 Do not insert the expected token via unput, as this runs afoul
89 of a POSIX-compatibility bug in flex 2.5.31.
90 All uses changed to BEGIN the parent state,
91 since we no longer insert the expected token via unput.
92 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
93 that is no longer emitted after the above change.
94
5ededac6
PE
95 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
96 the first one. This change is from Paul Hilfinger, and it fixes
97 regression reported by Werner Lemberg in
98 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
99
100 (resolve_sr_conflict): Don't invoke state_errs_set
101 unless one or more tokens have been explicitly made errors.
102 Otherwise, the above change causes Bison to abort.
103
104 * tests/existing.at (GNU pic Grammar): New test case, taken from
105 Lemberg's email.
106
b8be9132
AD
1072003-03-31 Akim Demaille <akim@epita.fr>
108
109 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
110
d423d460
AD
1112003-03-31 Akim Demaille <akim@epita.fr>
112
113 * src/output.c (prepare_symbols): Avoid trailing spaces in the
114 output.
115
c7e441b4
AD
1162003-03-31 Akim Demaille <akim@epita.fr>
117
118 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
119 From Paul Hilfinger.
120
231897ad
AD
1212003-03-29 Akim Demaille <akim@epita.fr>
122
123 * m4/error.m4: Do not put under dynamic conditions some code which
124 expansion is under static control.
125
5b066063
AD
1262003-03-29 Akim Demaille <akim@epita.fr>
127
128 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
129
22a74fec
AD
1302003-03-29 Akim Demaille <akim@epita.fr>
131
132 * doc/bison.texinfo (Strings are Destroyed): New.
133
0eee27e7
PE
1342003-03-13 Paul Eggert <eggert@twinsun.com>
135
136 * .cvsignore: Add configure.lineno.
137 * src/.cvsignore: Add yacc.
138 * tests/.cvsignore: Add testsuite.log.
139 * doc/fdl.texi: Sync with latest FSF version.
140
f61aad93
PE
1412003-03-12 Paul Eggert <eggert@twinsun.com>
142
537636c7
PE
143 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
144 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
145 cursor, instead of leaving it undefined. This fixes a bug
146 reported by Tim Van Holder in
147 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
148 * tests/input.at (Torturing the Scanner): Test the scanner on
149 an empty input file, which was Tim Van Holder's test case.
150
151 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
152 <sys/resource.h> can be included, include sys/time.h and
153 sys/times.h first, if available. This works around the SunOS
154 4.1.4 porting bug reported by Bruce Becker in
155 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
156
157 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
158 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
159 AC_HEADER_SYS_WAIT.
160
f61aad93
PE
161 Merge changes from gnulib. This was prompted because the CVS
162 snapshot didn't build on Solaris 7 due to strnlen problems.
163
164 These changes need to be merged back into gnulib:
165 * lib/hash.c: Include <stdbool.h> unconditionally.
166 * m4/onceonly.m4 (m4_quote): New macro.
167 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
168 Quote AC_FOREACH variable-expansions properly.
169 The 2003-01-03 obstack.h change also needs merging.
170 {end of changes requiring merging}
5b066063 171
f61aad93
PE
172 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
173 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
174 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
175 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
176 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
177 New files, imported from gnulib.
178 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
179 above.
180
181 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
182 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
183 gnulib sources.
184
185 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
186 Add.
187 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
188 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
189 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
190 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
191 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
192 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
193 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
194 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
195 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
196 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
197 (jm_PREREQ_ARGMATCH): Remove.
198 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
199 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
200
201 * src/system.h: Include <stdbool.h> unconditionally.
202
203 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
204 assuming at least C89 in the bitset code for some time now.
205
d2ffe116
AD
2062003-03-03 Akim Demaille <akim@epita.fr>
207
208 * ro.po: New.
209
052826fd
AD
2102003-03-02 Akim Demaille <akim@epita.fr>
211
212 * doc/bison.texinfo (Table of Symbols): Reactivate the
213 documentation for %lex-param, and %parse-param.
214
c4749565
AD
2152003-03-02 Akim Demaille <akim@epita.fr>
216
217 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
218 generate verbose error messages.
219 Use the number of tokens as an upper bound in yytname, as it
220 cannot be a non terminal.
221
d5286af1
AD
2222003-03-02 Akim Demaille <akim@epita.fr>
223
224 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
225 message.
226
22e304a6
AD
2272003-03-02 Akim Demaille <akim@epita.fr>
228
22e304a6
AD
229 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
230 Use them to exercise yycheck overrun.
231 Based on Andrew Suffield's grammar.
232
67a25fed
AD
2332003-03-02 Akim Demaille <akim@epita.fr>
234
235 Create tests/local.at for Bison generic testing macros.
236
237 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
238 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
239 This new file.
240 * tests/calc.at (AT_CHECK_CALC): Adjust.
241 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
242 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
243 * tests/local.at: here.
244 (AT_COMPILE_CXX): Tags the tests using it as c++.
245 Ignore the test if CXX is not functional.
246
9c2b381f
PE
2472003-03-01 Paul Eggert <eggert@twinsun.com>
248
249 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
250 not loc->end, since loc->end might contain garbage and this leads
251 to undefined behavior on some platforms.
252 (id_loc, token_start): Use (IF_LINTed) initial values that do not
253 depend on *loc, so that the reader doesn't give the the false
254 impression that *loc is initialized.
255 (<INITIAL>"%%"): Do not bother setting code_start, since its value
256 does not survive the return.
257
0433ba88
AD
2582003-03-01 Akim Demaille <akim@epita.fr>
259
260 * src/scan-gram.l (code_start): Always initialize it when entering
261 into yylex, as SC_EPILOGUE is activated *before* the corresponding
262 yylex invocation. An alternative would be making it static, but
263 then it starts with the second %%'s beginning, instead of its end.
264
b305ea69
PE
2652003-02-28 Paul Eggert <eggert@twinsun.com>
266
267 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
268 around a UnixWare 7.1.1 porting bug reported by John Hughes in
269 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
270
c3d25e01
PE
2712003-02-26 Paul Eggert <eggert@twinsun.com>
272
273 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
274 Remove Sequent/Pyramid discussion (nobody uses them any more).
275 Merge VMS and MS-DOS discussion; these ports may well be dead
276 but let's keep mentioning them for now. Put <> around email
277 addresses. Add copyright notice.
278
c267ffbc
PE
2792003-02-24 Paul Eggert <eggert@twinsun.com>
280
281 * data/glr.c (yy_reduce_print): yylineno -> yylno,
282 to avoid collision with flex use of yylineno.
283 Problem reported by Bruce Lilly in
284 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
285 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
286 * data/yacc.c (yy_reduce_print): Likewise.
287
288 * config/depcomp: Sync with Automake 1.7.3.
289
f939fc12
AD
2902003-02-21 Akim Demaille <akim@epita.fr>
291
292 * data/lalr1.cc: Use temporary variables instead of casts to
293 change integer types.
294 Suggested by Paul Eggert.
295
95923bd6
AD
2962003-02-21 Akim Demaille <akim@epita.fr>
297
298 * doc/bison.texinfo: Use "location" consistently to refer to @n,
299 to avoid confusions with lalr1.cc's notion of Position.
300 Suggested by Paul Eggert.
301
2cdc240e
AD
3022003-02-20 Akim Demaille <akim@epita.fr>
303
304 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
305 before initial_columns.
306 (location.hh): Use consistent variable names when defining the
307 operator<<.
308 Use "last" so that we subtract from Positions, not from unsigned.
309
5d003116
AD
3102003-02-20 Akim Demaille <akim@epita.fr>
311
312 * data/lalr1.cc (position.hh): New subfile, including the extended
313 and Doxygen'ed documentation of class Position.
314 (location.hh): Use it.
315 Document a` la Doxygen.
ba1ecc07 316 With the help of Benoit Perrot.
5d003116 317
d02b25f9
AD
3182003-02-20 Akim Demaille <akim@epita.fr>
319
320 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
321 AT_YACC_IF.
322 Redefine AT_YYERROR_SEES_LOC_IF using it.
323 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
324 not defined.
325 Don't use the location in yy::Parser::error_ and
326 yy::Parser::print_ when not %locations.
327 Activate more lalr1.cc tests.
328
0d1c3a04
AD
3292003-02-19 Akim Demaille <akim@epita.fr>
330
331 * data/lalr1.cc: When displaying a line number, be sure to make it
332 an int.
333
60a777aa
AD
3342003-02-19 Akim Demaille <akim@epita.fr>
335
336 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
337 Remove, useless.
338 (YYABORT, YYACCEPT, YYERROR): New.
339 * tests/calc.at: Renable the lalr1.cc test.
340
0b86fc41
AD
3412003-02-19 Akim Demaille <akim@epita.fr>
342
343 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
344 error recovery, mixing with/without pops and discarding of the
345 lookahead.
346 Exercise YYERROR.
347 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
348
da99a5dc
PE
3492003-02-17 Paul Eggert <eggert@twinsun.com>
350
351 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
352 * tests/testsuite.at (AT_COMPILE): Use them.
353 This fixes the testsuite problem reported by Robert Lentz in
354 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
355
93b8c255
PE
3562003-02-12 Paul Eggert <eggert@twinsun.com>
357
358 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
359 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
360 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
361 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
362 Check for malloc failure, for consistency with yacc.c.
363 (yytname_size): Remove, for consistency with yacc.c.
364
365 The bug still remains in data/lalr1.cc, as I didn't have time
366 to fix it there.
367
7548fed2
AD
3682003-02-06 Akim Demaille <akim@epita.fr>
369
370 * configure.ac (GXX): Rename as...
371 (CXX): this, to keep the original Autoconf semantics.
372 Require 2.57.
373 * data/lalr1.cc: Fix b4_copyright invocations.
374 If YYDEBUG is not defined, don't depend upon name_ being defined.
375 (location.hh): Include string and iostream.
376 (Position::filename): New member.
377 (Position::Position ()): New.
378 (operator<< (Position)): New.
379 (operator- (Position, int)): New.
380 (Location::first, Location::last): Rename as...
381 (Location::begin, Location::end): these, to mock the conventional
382 iterator names.
383 (operator<< (Location)): New.
384 * tests/atlocal.in (CXX): New.
385 * tests/testsuite.at (AT_COMPILE_CXX): New.
386 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
387 locations in a more synthetic way.
388 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
389 lalr1.cc is used.
390 Adjust the C locations to match those from Emacs: first column is
391 column 0.
392 Change all the expected results.
393 Conform to the GCS: simplify the locations when applicable.
394 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
395 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
396 these CPP macros with the m4 macros new defined by...
397 (AT_CHECK_PUSHDEFS): this, i.e.:
398 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 399 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
400 New macros.
401 (AT_CHECK_POPDEFS): Undefine them.
402 (AT_CHECK_CALC_LALR1_CC): New.
403 Use it for the first lalr1.cc test.
404
43a176ef
AD
4052003-02-04 Akim Demaille <akim@epita.fr>
406
407 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
408 Location as is defined.
409
fc049e9c
AD
4102003-02-04 Akim Demaille <akim@epita.fr>
411
412 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
413 name_ being defined.
414
a737b216
PE
4152003-02-03 Paul Eggert <eggert@twinsun.com>
416
417 * src/gram.h (start_symbol): Remove unused decl.
418
419 Use more-consistent naming conventions for local vars.
420
421 * src/derives.c (derives_compute): Change type of local var from
422 int to rule_number.
423 * src/gram.c (grammar_rules_partial_print): Likewise.
424 * src/print.c (print_core): Likewise.
425 * src/reduce.c (reduce_grammar_tables): Likewise.
426
427 * src/gram.c (grammar_dump): Change name of item_number *
428 local var from r to rp.
429 * src/nullable.c (nullable_compute): Likewise.
430
431 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
432
433 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
434 for symbol or symbol_number var.
435 * src/reader.c (grammar_start_symbol_set): Likewise.
436 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
437 Likewise.
438 * src/state.c (transitions_to): Likewise.
439 * src/state.h: Likewise.
440 * src/tables.c (symbol_number_to_vector_number): Likewise.
441
442 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
443 char * var.
444
445 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
446 var.
447
448 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
449 var.
450
451 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
452 Use str, not s, for char * var. Use ch, not c, for character var.
453 Use size for size var.
454
455 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
456 char * var.
457 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
458 uniqstr var.
459 * src/uniqstr.h: Likewise.
460
461 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
462 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
463 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
464 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
465 param to have same name as that of enum, so that we don't use
466 "s" to stand for a non-state.
467
68e93ad5
AD
4682003-02-02 Akim Demaille <akim@epita.fr>
469
470 * src/scan-skel.l: Scan more than one inert character per yylex
471 invocation.
472
92898986
PE
4732003-02-01 Paul Eggert <eggert@twinsun.com>
474
475 Version 1.875a.
476
1d9d5d71
PE
477 * po/LINGUAS: Add ms.
478
0435d061
AD
4792003-01-30 Akim Demaille <akim@epita.fr>
480
481 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
482
6029a57f
PH
4832003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
484
485 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
486 of $1.
0435d061
AD
487
488 Changes in response to error report by S. Eken: GLR mode does not
6029a57f
PH
489 handle negative $ indices or $ indices in embedded rules correctly.
490 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 491
6029a57f
PH
492 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
493 (b4_rhs_location): Ditto.
0435d061 494 (yyfill): New function to copy from stack tree into array
6029a57f 495 incrementally.
0435d061
AD
496 (yyuserAction): Modify to allow incremental move of semantic values
497 to rhs array when in GLR mode.
498 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
499 as needed.
500 Remove dummy use of yystack, as there is now a guaranteed use.
501 (yydoAction): Modify to allow incremental move of semantic values
502 to rhs array when in GLR mode.
503 (yyresolveAction): Ditto.
504 (yyglrShiftDefer): Update comment.
0435d061 505 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
506 (yyglrReduce): Ditto.
507 (yydoAction): Ditto
0435d061 508
6029a57f
PH
509 * tests/glr-regr1.at: Rename to ...
510 * tests/glr-regression.at: Add new regression test for the problems
511 described above (adapted from S. Eken).
512 Update copyright notice.
513 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
514 * tests/Makefile.am: Ditto.
515
6cee6297
PE
5162003-01-28 Paul Eggert <eggert@twinsun.com>
517
518 * data/lalr1.cc: Do not use @output_header_name@ unless
519 b4_defines_flag is set. This fixes two bugs reported by
520 Tim Van Holder in
521 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
522 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
523
b2a836b5
PE
5242003-01-21 Paul Eggert <eggert@twinsun.com>
525
526 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
527 we don't need to worry about yyerrlab1 being reported as an
528 "unused label" by non-GCC C compilers. The downside is that if
529 locations are used then a couple of statements are duplicated each
530 time YYERROR is invoked, but the upside is that the warnings
531 should vanish.
532 (yyerrlab1): Move code to YERROR.
533 (yyerrlab2): Remove. Change uses back to yyerrlab1.
534 This reverts some of the 2002-12-27 change.
535
4196b931
PE
5362003-01-17 Paul Eggert <eggert@twinsun.com>
537
538 * src/output.c (symbol_printers_output): Fix typo that led
539 to core dump. Problem reported by Antonio Rus in
540 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
541
3ae831b4
AD
5422003-01-13 Akim Demaille <akim@epita.fr>,
543 Quoc Peyrot <chojin@lrde.epita.fr>,
544 Robert Anisko <anisko_r@lrde.epita.fr>
545
546 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
547 when the stacks contain one element, as the loop would otherwise
548 free the last state, and then use the top state (the one we just
549 popped). This means that the initial elements will not be freed
550 explicitly, as is the case in yacc.c; it is not a problem, as
551 these elements have fake values.
552
e3aa65c5
PE
5532003-01-11 Paul Eggert <eggert@twinsun.com>
554
555 * NEWS: %expect-violations are now just warnings, reverting
556 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
557 bootstrapping problem reported by Matthias Klose; see
558 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
559 * src/conflicts.c (conflicts_print): Likewise.
560 * tests/conflicts.at (%expect not enough, %expect too much,
561 %expect with reduce conflicts): Likewise.
562 * doc/bison.texinfo (Expect Decl): Document this. Also mention
563 that the warning is enabled if the number of conflicts changes
564 (not necessarily increases).
565
566 * src/getargs.c (version): Update copyright year.
567
f0057011
AD
5682003-01-09 Akim Demaille <akim@epita.fr>
569
570 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
571
1ee6d2a0
PE
5722003-01-08 Paul Eggert <eggert@twinsun.com>
573
574 * Makefile.maint (WGETFLAGS):
575 New macro, containing "-C off" to disable proxy caches.
576 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
577 (rel-check): Use $(WGET) instead of wget.
578
d4fd77c4
PE
5792003-01-06 Paul Eggert <eggert@twinsun.com>
580
581 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
582 the GLR paper of Scott, Johnstone and Hussain.
583
464c6927
PE
5842003-01-04 Paul Eggert <eggert@twinsun.com>
585
d600ee67
PE
586 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
587 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
588 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
589 (EXTRA_LIBRARIES): New var, for liby.a.
590 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
591 (EXTRA_SCRIPTS): New var, for yacc.
592
464c6927
PE
593 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
594 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
595 Problem reported by Nelson H. F. Beebe.
596
5972003-01-03 Paul Eggert <eggert@twinsun.com>
598
599 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
600 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
601 when compiling Bison 1.875's `bitset bset = obstack_alloc
602 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
603
604 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
605 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
606 grow to a huge size with typical invocation.
d600ee67 607
464c6927
PE
608 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
609 Use the pattern recommended by Autoconf 2.57, except also protect
610 against double-definition.
611 * src/system.h: Likewise.
612 Portability issues reported by Nelson H. F. Beebe.
d600ee67 613
464c6927
PE
614 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
615 All uses changed. Provide a definition in both C and C++.
616 (yytrue, yyfalse): Define even if defined (__cplusplus).
617
618 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
619 Reported by Nelson H. F. Beebe.
d600ee67 620
464c6927
PE
621 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
622
0f42c7d5
PE
6232003-01-02 Paul Eggert <eggert@twinsun.com>
624
625 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
626 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
627 Bug reported by Nelson H. F. Beebe.
628
dc546b0f
PE
6292003-01-01 Paul Eggert <eggert@twinsun.com>
630
631 * Version 1.875.
632
2c09b6a7
PE
6332002-12-30 Paul Eggert <eggert@twinsun.com>
634
635 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
636 Moved here from...
637 (<INITIAL>","): Here. This causes stray "," to be treated
638 more uniformly.
639
dc546b0f 640 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
641 last brace in braced code when not in Yacc mode, for compatibility
642 with Bison 1.35. This resurrects the 2001-12-15 patch to
643 src/reader.c.
644
645 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
646 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
647
535c0f63
PE
6482002-12-28 Paul Eggert <eggert@twinsun.com>
649
650 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
651 that of SYM's type. This fixes Debian bug 168069, reported by
652 Thomas Olsson.
d600ee67 653
963fcc17
PE
6542002-12-28 Paul Eggert <eggert@twinsun.com>
655
656 Version 1.75f.
657
658 Switch back to the Yacc style of conflict reports, undoing some
659 of the 2002-07-30 change.
660 * doc/bison.texinfo (Understanding): Use Yacc style for
661 conflict reports. Also, use new way of locating rules.
662 * src/conflicts.c (conflict_report):
663 Renamed from conflict_report_yacc, removing the old
664 'conflict_report'. Translate the entire conflict report at once,
665 so that we don't assume that "," has the same interpretation in
666 all languages.
667 (conflicts_output): Use Yacc-style conflict report for each state,
668 instead of our more-complicated style.
669 (conflicts_print): Use Yacc-style conflict report, except print
670 the input file name when not emulating Yacc.
671 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
672 Conflicted Reduction, %expect not enough, %expect too much,
673 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
674 * tests/existing.at (GNU Cim Grammar): Likewise.
675 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
676
677 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
678 fatal): Don't invoke fflush; it's not needed and it might even be
679 harmful for stdout, as stdout might not be open.
680 * src/reduce.c (reduce_print): Likewise.
681
b1efe548
PE
6822002-12-27 Paul Eggert <eggert@twinsun.com>
683
684 Fix a bug where error locations were not being recorded correctly.
685 This problem was originally reported by Paul Hilfinger in
e3aa65c5 686 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
687
688 * data/yacc.c (yyparse): New local var yylerrsp, to record the
689 top of the location stack's error locations.
690 (yyerrlab): Set it. When discarding a token, push its location
691 onto yylerrsp so that we don't lose track of the error's end.
692 (yyerrlab1): Now is only the target of YYERROR, so that we can
693 properly record the location of the action that failed. For GCC
694 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
695 GCC warning about yyerrlab1 being unused if YYERROR is unused.
696 (yyerrlab2): New label, which yyerrlab now falls through to.
697 Compute the error's location by applying YYLLOC_DEFAULT to
698 the locations of all the symbols that went into the error.
699 * doc/bison.texinfo (Location Default Action): Mention that
700 YYLLOC_DEFAULT is also invoked for syntax errors.
701 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
702 Error locations include the locations of all the tokens that were
703 discarded, not just the last token.
d600ee67 704
983c5c2c
PE
7052002-12-26 Paul Eggert <eggert@twinsun.com>
706
b1efe548
PE
707 * src/files.c: Include quote.h.
708 (compute_output_file_names): Warn if we detect conflicting
709 outputs to the same file. This should catch the misunderstanding
710 exemplified by Debian Bug 165349, reported by Bruce Stephens..
711
712 * src/conflicts.c (conflicts_print): If the user specifies
713 "%expect N", report an error if there are any reduce/reduce
714 conflicts. This is what the manual says should happen.
715 This fixes Debian bug 130890, reported by Anthony DeRobertis.
716 * tests/conflicts.at (%expect with reduce conflicts): New test.
717
983c5c2c
PE
718 Don't use m4_include on relative file names, as it doesn't work as
719 desired if there happens to be a file with that name under ".".
d600ee67 720
983c5c2c
PE
721 * m4sugar/version.m4: Remove; it was included but it wasn't used.
722 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
723 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
724 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
725 * src/output.c (output_skeleton): Use full path names when
726 specifying a file to include; don't rely on include path, as
727 it's unreliable when the working file contains a file with
728 that name.
d600ee67 729
983c5c2c
PE
7302002-12-25 Paul Eggert <eggert@twinsun.com>
731
732 Remove obsolete references to bison.simple and bison.hairy.
733 Problem mentioned by Aubin Mahe in
e3aa65c5 734 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
735 * data/glr.c: Comment fix.
736 * doc/bison.1: Remove references. Also, mention "yacc".
737
738 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
739 with -g option.
740
741 * src/parse-gram.y (declaration): Use enum "report_states" rather
742 than its numeric value 1.
743
744 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
745 opening a new one. This fixes Debian bug 165349, reported by
746 Bruce Stephens.
747
23f2d9dc
PE
7482002-12-24 Paul Eggert <eggert@twinsun.com>
749
750 Version 1.75e.
751
752 * Makefile.maint (cvs-update): Don't assume that the shell
753 supports $(...), as Solaris sh doesn't.
754
755 * src/parse-gram.y (lloc_default): Remove test for empty
756 nonterminals at the end, since it didn't change the result.
757
7582002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
759
760 If the user does not define YYSTYPE as a macro, Bison now declares it
761 using typedef instead of defining it as a macro. POSIX requires this.
762 For consistency, YYLTYPE is also declared instead of defined.
763
764 %union directives can now have a tag before the `{', e.g., the
765 directive `%union foo {...}' now generates the C code
766 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
767 The default union tag is `YYSTYPE', for compatibility with Solaris 9
768 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
769 instead of `yyltype'.
770
771 `yystype' and `yyltype' are now obsolescent macros instead of being
772 typedefs or tags; they are no longer documented and will be
773 withdrawn in a future release.
774
775 * data/glr.c (b4_location_type): Remove.
776 (YYSTYPE): Renamed from yystype.
777 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
778 (struct YYLTYPE): Renamed from struct yyltype.
779 (YYLTYPE): Renamed from yyltype.
780 (yyltype, yystype): New (and obsolescent) macros,
781 for backward compatibility.
782 * data/yacc.c: Likewise.
783
784 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
785 does not specify a union tag. This is for compatibility with
786 Solaris 9 yacc.
787
788 * src/parse-gram.y (add_param): 2nd arg is now char * not char
789 const *, since it is now modified by stripping surrounding { }.
790 (current_braced_code): Remove.
791 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
792 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
793 trailing " {...}". Now of type <chars>.
794 (grammar_declaration): Adjust to bundled tokens.
795 (code_content): Remove; stripping is now done by add_param.
796 (print_token_value): Print contents of bundled tokens.
797 (token_name): New function.
798
799 * src/reader.h (braced_code, current_braced_code): Remove.
800 (token_name): New decl.
801
802 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
803 token_type, not braced_code code_kind. All uses changed.
804 (SC_PRE_CODE): New state, for scanning after a keyword that
805 has (or usually has) an immediately-following braced code.
806 (token_type): New local var, to keep track of which token type
807 to return when scanning braced code.
808 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 809 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
810 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
811 instead of returning a token type immediately.
812 (<INITIAL>"{"): Set token type.
813 (<SC_BRACED_CODE>"}"): Use it.
814 (handle_action_dollar, handle_action_at): Now returns bool
815 indicating success. Fail if ! current_rule; this prevents a core dump.
816 (handle_symbol_code_dollar, handle_symbol_code_at):
817 Remove; merge body into caller.
818 (handle_dollar, handle_at): Complain in invalid contexts.
819
820 * NEWS, doc/bison.texinfo: Document the above.
821 * NEWS: Fix years and program names in copyright notice.
822
879ca4f8
PE
8232002-12-17 Paul Eggert <eggert@twinsun.com>
824
825 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
826 Reporting, Table of Symbols): Omit mentions of %lex-param and
827 %parse-param from the documentation for now.
828
1c5fe69d
PE
8292002-12-15 Paul Eggert <eggert@twinsun.com>
830
831 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
832 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
833 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
834 disagreed with the Bison documentation. Bug
835 reported by Andrew Walrond.
d600ee67 836
1c5fe69d
PE
837 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
838 as the caller now does that.
839 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
840 (YYEMPTY): Parenthesize right hand side, since others use it.
841 (yyparse): Don't assume that our generated code is the only code
842 that sets yychar.
843
d1de5372
PE
8442002-12-13 Paul Eggert <eggert@twinsun.com>
845
846 Version 1.75d.
847
848 POSIX requires a "yacc" command.
849 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
850 (MOSTLYCLEANFILES): Add yacc.
851 (yacc): New rule.
1c5fe69d 852 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
853 as an alias for bison y.
854
855 * po/LINGUAS: Add da.
d600ee67 856
d1de5372
PE
857 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
858 problem with latest <getopt.h>.
859 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
860
861 * doc/fdl.texi: Upgrade to 1.2.
862 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
863 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
864 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
865 gnulib.
866 * config/install-sh: Sync with autotools.
867
868 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
e3aa65c5 869 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
870 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
871 locations are requested.
872 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
873 locations are requested.
874
d0f3fe23
PE
8752002-12-12 Paul Eggert <eggert@twinsun.com>
876
877 Remove unportable casts and storage allocation tricks.
878 While we're at it, remove almost all casts, since they
879 usually aren't needed and are a sign of trouble.
880
881 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
882
883 * src/derives.c (derives_compute): Do not subtract NTOKENS from
884 the pointer DSET returned by malloc; this isn't portable.
885 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
886 Similarly for DERIVES.
887 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
888 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
889 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
890
891 * src/derives.c (derives_compute): Do not bother invoking
892 int_of_rule_number, since rule numbers are integers.
893
894 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
895 rather than XMALLOC (char, N).
896
897 * src/files.c (filename_split): Rewrite to avoid cast.
898
899 * src/gram.h (symbol_number_as_item_number,
900 item_number_as_symbol_number, rule_number_as_item_number,
901 item_number_as_rule_number):
902 Now inline functions rather than macros, to avoid casts.
903 * src/state.h (state_number_as_int): Likewise.
904 * src/tables.c (state_number_to_vector_number,
905 symbol_number_to_vector_number): Likewise.
906
907 * src/gram.h (int_of_rule_number): Remove; no longer used.
908
909 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
910 since the resulting storage is always stored into.
911
912 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
913 where it's needed.
914
915 * src/muscle_tab.c (muscle_m4_output):
916 Now inline. Return bool, not int.
917 * src/state.c (state_compare): Likewise.
918 * src/symtab.c (symbol_check_defined,
919 symbol_check_alias_consistency, symbol_pack, symbol_translation,
920 hash_compare_symbol, hash_symbol):
921 Likewise.
922 * src/uniqstr.c (uniqstr_print): Likewise.
923 * src/muscle_tab.c (muscle_m4_output_processor):
924 New function, to avoid casts.
925 * src/state.c (state_comparator, stage_hasher): Likewise.
926 * src/symtab.c (symbol_check_defined_processor,
927 symbol_check_alias_consistency_processor, symbol_pack_processor,
928 symbol_translation_processor, hash_symbol_comparator,
929 hash_symbol_hasher): Likewise.
930 * src/uniqstr.c (uniqstr_print_processor): Likewise.
931 * src/muscle_tab.c (muscles_m4_output):
932 Use new functions instead of casting old functions unportably.
933 * src/state.c (state_hash_new): Likewise.
934 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
935 symbols_token_translations_init):
936 Likewise.
937 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
938
939 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
940 var instead of casting to long, to avoid casts.
941 (prepare_states): Use MALLOC rather than alloca, so that we don't
942 have to worry about alloca.
943 * src/state.c (state_hash_lookup): Likewise.
944
945 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
946 local var instead of casting to unsigned char, to avoid casts.
947
948 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
949 STATE_ALLOC): Remove.
950 (transitions_new, errs_new, reductions_new, state_new): Use malloc
951 rather than calloc, and use offsetof to avoid allocating slightly
952 too much storage.
953 (state_new): Initialize all members.
954
955 * src/state.c (state_hash): Use unsigned accumulator, not signed.
956
957 * src/symtab.c (symbol_free): Remove; unused.
958 (symbol_get): Remove cast in lhs of assignment.
959 (symbols_do): Now static. Accept generic arguments, not
960 hashing-related ones.
961
962 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
963 (symbol_processor): Remove.
964 (symbols_do): Remove decl; now static.
965
966 * src/system.h (alloca): Remove; decl no longer needed.
967 (<stddef.h>): Include, for offsetof.
968 (<inttypes.>, <stdint.h>): Include if available.
969 (uintptr_t): New type, if system lacks it.
970 (CALLOC, MALLOC, REALLOC): New macros.
971 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
972 new macros.
973
974 * src/tables.c (table_size): Now int, to pacify GCC.
975 (table_grow, table_ninf_remap): Use signed table size.
976 (save_row): Don't bother initializing locals when not needed.
977 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
978 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
979
980 * src/vcg.h: Correct misspellings.
981
982 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
983
984
985 * src/getargs.c (getargs): Don't assume EOF == -1.
986
26b4a969
PE
9872002-12-09 Paul Eggert <eggert@twinsun.com>
988
989 Change identifier spellings to avoid collisions with names
990 that are reserved by POSIX.
991
992 Don't use names ending in _t, since POSIX reserves them.
993 For consistency, remove _e and _s endings -- they're weren't
994 needed to remove ambiguity. All uses changed.
995 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
996 turn was just renamed from struniq_t.
997 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
998 which in turn was just renamed from struniq_processor_t.
999 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1000 in turn was renamed from hash_compare_struniq_t.
1001 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1002 (state_list): Renamed from state_list_t.
1003 * src/assoc.h (assoc): Renamed from assoc_t.
1004 * src/conflicts.c (enum conflict_resolution): Renamed from
1005 enum conflict_resolution_e.
1006 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1007 (rule_list): Renamed from rule_list_t.
1008 * src/getargs.h (enum trace): Renamed from enum trace_e.
1009 (enum report): Renamed from enum report_e.
1010 * src/gram.h (item_number): Renamed from item_number_t.
1011 (rule_number): Renamed from rule_number_t.
1012 (struct rule_s): Remove the "rule_s" part; not used.
1013 (rule): Renamed from rule_t.
1014 (rule_filter): Renamed from rule_filter_t.
1015 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1016 (goto_list): Renamed from goto_list_t.
1017 * src/lalr.h (goto_number): Renamed from goto_number_t.
1018 * src/location.h (location): Renamed from location_t.
1019 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1020 and moved here from:
1021 * src/muscle_tab.h (muscle_entry_t): here.
1022 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1023 (rule_list): Renamed from rule_list_t.
1024 * src/print_graph.c (static_graph): Renamed from graph.
1025 * src/reader.h (braced_code): Renamed from braced_code_t.
1026 Remove brace_code_e tag.
1027 * src/relation.h (relation_node): Renamed from relation_node_t.
1028 (relation_nodes): Renamed from relation_nodes_t.
1029 (relation): Renamed from relation_t.
1030 * src/state.h (state_number): Renamed from state_number_t.
1031 (struct state): Renamed from struct state_s.
1032 (state): Renamed from state_t.
1033 (transitions): Renamed from transitions_t. Unused (and
1034 misspelled) transtion_s tag removed.
1035 (errs): Renamed from errs_t. Unused errs_s tag removed.
1036 (reductions): Renamed from reductions_t. Unused tag
1037 reductions_s removed.
1038 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1039 (struct symbol_list): Renamed from struct symbol_list_s.
1040 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1041 (struct symbol): Renamed from struct symbol_s.
1042 (symbol): Renamed from symbol_t.
1043 * src/tables.c (vector_number): Renamed from vector_number_t.
1044 (action_number): Renamed from action_t.
1045 * src/tables.h (base_number): Renamed from base_t.
1046 * src/vcg.h (enum color): Renamed from enum color_e.
1047 (enum textmode): Renamed from enum textmode_e.
1048 (enum shape): Renamed from enum shape_e.
1049 (struct colorentry): Renamed from struct colorentry_s.
1050 (struct classname): Renamed from struct classname_s.
1051 (struct infoname): Renamed from struct infoname_s.
1052 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1053 (enum decision): Renamed from enum decision_e.
1054 (enum orientation): Renamed from enum orientation_e.
1055 (enum alignment): Renamed from enum alignment_e.
1056 (enum arrow_mode): Renamed from enum arrow_mode_e.
1057 (enum crossing_type): Renamed from enum crossing_type_e.
1058 (enum view): Renamed from enum view_e.
1059 (struct node): Renamed from struct node_s.
1060 (node): Renamed from node_t.
1061 (enum linestyle): Renamed from enum linestyle_e.
1062 (enum arrowstyle): Renamed from enum arrowstyle_e.
1063 (struct edge): Renamed from struct edge.
1064 (edge): Renamed from edge_t.
1065 (struct graph): Renamed from struct graph_s.
1066 (graph): Renamed from graph_t.
1067 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1068 Rename value_t -> value.
1069 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1070 value_t_as_yystype -> value_as_yystype.
1071
1072 Don't include <errno.h> in the mainstream code, since it
1073 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1074 * lib/get-errno.c, lib/get-errno.h: New files.
1075 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1076 get-errno.c.
1077 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1078 * src/output.c (output_skeleton): Likewise.
1079 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1080 instead of errno.
1081 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1082 Likewise.
1083 (handle_action_dollar, handle_action_at): Likewise.
1084 * src/system.h: Do not include <errno.h>.
1085 (TAB_EXT): Renamed from EXT_TAB.
1086 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1087
1088 Avoid str[a-z]*, since <string.h> reserves that name space.
1089 Change all instances of "struniq" in names to "uniqstr", and
1090 likewise for "STRUNIQ" and "UNIQSTR".
1091 * src/uniqstr.c: Renamed from src/struniq.c.
1092 * src/uniqstr.h: Renamed from src/struniq.h.
1093 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1094 * src/files.c (strsuffix): Remove; unused.
1095 (concat2): Renamed from stringappend. Now static.
1096 * src/files.h (strsuffix, stringappend): Remove; unused.
1097 * src/parse-gram.y (<chars>): Renamed from <string>.
1098 (<uniqstr>): Renamed from <struniq>.
1099 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1100 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1101 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1102 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1103 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1104 (N_EXPAND): Renamed from N_STRETCH.
1105
1106 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1107 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1108 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1109 Remove; unused.
1110 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1111 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1112 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1113 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1114 (BASE_MAXIMUM): Renamed from BASE_MAX.
1115 (BASE_MINIMUM): Renamed from BASE_MIN.
1116 (ACTION_MAX): Remove; unused.
1117 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1118 Unnecessary casts removed from above defines.
1119
1120
1121 Fix misspelling in names.
1122 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1123 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1124 G_NODE_ALIGNEMENT.
1125
1126
1127 * lib/timevar.c (timevar_report): Renamed from time_report,
1128 for consistency with other names.
1129 * lib/timevar.h (timevar_report): New decl.
1130 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1131
1132
1133 Sort include-file uses.
1134
1135 Reorder all include files under src to be in the order "system.h".
1136 then the ../lib include files in angle brackets (alphabetized),
1137 then the . include files in double-quotes (alphabetized). Fix
1138 dependency breakages encountered in this process, as follows:
1139 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1140 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1141 * src/state.h: Include "symtab.h".
1142
996b1c7e
PE
11432002-12-08 Paul Eggert <eggert@twinsun.com>
1144
1145 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1146 since this causes problems when __file__ contains character
1147 sequences like "@" that are treated specially by src/scan-skel.l.
1148 Instead, just use the file's basename. This fixes the bug
1149 reported by Martin Mokrejs in
e3aa65c5 1150 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 1151
e19c4e5d
PE
11522002-12-06 Paul Eggert <eggert@twinsun.com>
1153
1154 Add support for rules that do not have trailing semicolons, as
1155 POSIX requires. Improve the quality of locations in Bison
1156 diagnostics.
26b4a969 1157
e19c4e5d
PE
1158 * src/location.c: Include <quotearg.h>.
1159 (empty_location): Now const.
1160 (location_print): New function. Follow the recommendation of the
1161 GNU Coding Standards for locations that span file boundaries.
1162 * src/location.h: Do not include <quotearg.h>; no longer needed.
1163 (boundary): New type.
1164 (location_t): Use it. This allows locations to span file boundaries.
1165 All member uses changed: file -> start.file or end.file (as needed),
1166 first_line -> start.line, first_column -> start.column,
1167 last_line -> end.line, last_column -> end.column.
1168 (equal_boundaries): New function.
1169 (LOCATION_RESET, LOCATION_STEP): Remove.
1170 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1171 (empty_location): Now const.
1172 (location_print): New decl.
1173 * src/parse-gram.y (lloc_default): New function, which handles
1174 empty locations more accurately.
1175 (YYLLOC_DEFAULT): Use it.
1176 (%token COLON): Remove.
1177 (%token ID_COLON): New token.
26b4a969 1178 (rules): Use it.
e19c4e5d
PE
1179 (declarations, rules): Remove trailing semicolon.
1180 (declaration, rules_or_grammar_declaration):
1181 Allow empty (";") declaration.
1182 (symbol_def): Remove empty actions; no longer needed.
1183 (rules_or_grammar_declaration): Remove trailing semicolon.
1184 (semi_colon.opt): Remove.
1185 * src/reader.h: Include location.h.
1186 (scanner_cursor): New decl.
1187 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1188 rolling our own.
1189 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1190 of *loc.
1191 (STEP): Remove. No longer needed, now that adjust_location does
1192 the work. All uses removed.
1193 (scanner_cursor): New var.
1194 (adjust_location): Renamed from extend_location. It now sets
1195 *loc and adjusts the scanner cursor. All uses changed.
1196 Don't bother testing for CR.
1197 (handle_syncline): Remove location arg; now updates scanner cursor.
1198 All callers changed.
1199 (unexpected_end_of_file): Now accepts start boundary of token or
1200 comment, not location. All callers changed. Update scanner cursor,
1201 not the location.
1202 (SC_AFTER_IDENTIFIER): New state.
1203 (context_state): Renamed from c_context. All uses changed.
1204 (id_loc, code_start, token_start): New local vars.
1205 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1206 processing of Yacc white space and equivalents here.
1207 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1208 instead of returning ID immediately, since we need to search for
1209 a subsequent colon.
1210 (<INITIAL>"'", "\""): Save token_start.
1211 (<INITIAL>"%{", "{", "%%"): Save code_start.
1212 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1213 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1214 BEGIN context_state at end, not INITIAL.
1215 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1216 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1217 Return correct token start.
1218 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1219 the start of a character, string or multiline comment is found.
1220 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1221 Reduction): Adjust reported locations to match the more-precise
1222 results now expected.
1223 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1224 * tests/reduce.at (Useless Rules, Reduced Automaton,
1225 Underivable Rules): Likewise.
1226 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1227 or "|"' now that so many other tokens are allowed by the new grammar.
1228
1229 * src/complain.h (current_file): Remove duplicate decl;
1230 current_file is now owned by files.h.
1231 * src/complain.c, src/scan-gram.l: Include files.h.
1232
12332002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 1234
e19c4e5d
PE
1235 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1236 promotes to int; it might be unsigned int.
1237 * data/yacc.c (yy_reduce_print): Likewise.
1238
1239 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1240 be #defined in the prologue, not in the Bison declarations.
1241 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 1242
b64755e3
PE
12432002-12-02 Paul Eggert <eggert@twinsun.com>
1244
1245 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1246 * lib/strtoul.c: New file, from gnulib.
1247 This fixes a porting bug reported by Peter Klein in
e3aa65c5 1248 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 1249
6e746484
PE
12502002-11-30 Paul Eggert <eggert@twinsun.com>
1251
b64755e3
PE
1252 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1253 and put only a forward declaration in the prologue. This is for
1254 consistency with the other scanner helper functions.
1255
6ba55592
PE
1256 Type clashes now generate warnings, not errors, since it
1257 appears that POSIX may allow some grammars with type clashes.
1258 * src/reader.c (grammar_current_rule_check): Warn about
1259 type clashes instead of complaining.
1260 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1261
6e746484
PE
1262 Add Yacc library, since POSIX requires it.
1263 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1264 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1265 * lib/main.c, lib/yyerror.c: New files.
1266
1267 gram_error can be static; it need not be extern.
1268 * src/reader.h (gram_error): Remove decl.
1269 * src/parse-gram.y (gram_error): Now static. Add static decl.
1270 (print_token_value): Omit parameter names from forward decl,
1271 for consistency.
1272
88510f9c
PE
12732002-11-29 Paul Eggert <eggert@twinsun.com>
1274
6e746484
PE
1275 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1276 be declared before being used. E.g., one should typically
1277 declare them in the prologue. Use GNU coding style in examples.
1278 Put "const" consistently after the type it modifies. Mention
1279 that C99 supports "inline". Mention that yyerror traditionally
1280 returns "int".
1281
88510f9c
PE
1282 %parse-param and %lex-param now take just one argument, the
1283 declaration; the argument name is deduced from the declaration.
1284
1285 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1286 Reporting, Table of Symbols): Document this.
1287 * src/parse-gram.y (add_param): New function.
1288 (COMMA): Remove.
1289 (declaration): Implement new rule for %parse-param and %lex-param.
1290 * src/scan-gram.l: "," now elicits a warning, rather than being
1291 a token; this is more compatible with byacc.
1292 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1293
bb92250c
PE
12942002-11-27 Paul Eggert <eggert@twinsun.com>
1295
1296 Rename identifiers to avoid real and potential collisions.
1297
1298 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1299 to avoid collision with lex macro described by Bruce Lilly in
e3aa65c5 1300 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
1301 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1302 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1303 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1304 All uses changed.
1305 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1306 The name "yycontrol" violates the name space rules, and this stuff
1307 wasn't being used anyway.
1308 (input): Remove action; this stuff wasn't being used.
1309 (gram_error): Rename local variable yylloc -> loc.
1310 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1311 (YY_DECL): Don't use "yy" at start of local variables.
1312 All uses changed, e.g., yylloc -> loc.
1313 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1314 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1315 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1316 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1317
1318 * src/parse-gram.y (gram_error): loc is now const *.
1319 * src/reader.h (gram_error): Likewise.
1320
3af4feb2
PE
13212002-11-24 Paul Eggert <eggert@twinsun.com>
1322
1323 Version 1.75c.
1324
1325 * tests/actions.at (Actions after errors): Use an output format
1326 more similar to that of the Printers and Destructors test.
1327 Test the position of the ';' token too.
1328 (Printers and Destructors): Likewise.
1329 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1330 unnecessarily alarming people when the test fails.
1331
1332 * data/yacc.c (yyerrlab1): Move this label down, so that the
1333 parser does not discard the lookahead token if the user code
1334 invokes YYERROR. This change is required for POSIX conformance.
1335
1336 * lib/error.c: Sync with gnulib.
1337
13382002-11-22 Paul Eggert <eggert@twinsun.com>
1339
1340 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1341 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1342 * lib/xmalloc.c: Likewise.
26b4a969 1343
58004308
PE
13442002-11-20 Paul Eggert <eggert@twinsun.com>
1345
1346 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1347
13482002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 1349
58004308
PE
1350 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1351 should use `if (! x) abort ();' rather than `assert (x);', and
1352 anyway it's one less thing to worry about configuring.
1353
1354 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1355 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1356 and replace all instances of assert with abort.
1357 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1358 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1359
1360 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1361 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1362 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1363 hash_find_entry, hash_rehash, hash_insert): Likewise.
1364 * src/conflicts.c (resolve_sr_conflict): Likewise.
1365 * src/lalr.c (set_goto_map, map_goto): Likewise.
1366 * src/nullable.c (nullable_compute): Likewise.
1367 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1368 * src/reader.c (packgram, reader): Likewise.
1369 * src/state.c (state_new, state_free, state_transitions_set,
1370 state_reduction_find): Likewise.
1371 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1372 symbol_pack): Likewise.
1373 * src/tables.c (conflict_row, pack_vector): Likewise.
1374 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1375 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1376 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1377 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1378
1379 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1380 (ARGMATCH_CONSTRAINT): New macro.
1381 (ARGMATCH_ASSERT): Use it.
1382
1383 * src/system.h (verify): New macro.
1384 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1385 rather than assert.
1386 * src/tables.c (tables_generate): Likewise.
1387
1388 * src/struniq.c (struniq_assert): Now returns void, and aborts
1389 if the assertion is false.
1390 (struniq_assert_p): Remove.
1391 * src/struniq.h: Likewise.
1392
76ae8198
PE
13932002-11-18 Paul Eggert <eggert@twinsun.com>
1394
1395 * data/glr.c (yygetLRActions): Replace `yyindex' with
1396 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1397 This fixes the regression with Sun ONE Studio 7 cc that I reported in
e3aa65c5 1398 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 1399
d3c4e709
AD
14002002-11-18 Akim Demaille <akim@epita.fr>
1401
1402 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1403 space.
1404 From Tim Van Holder.
1405
8d8a7238
PE
14062002-11-17 Paul Eggert <eggert@twinsun.com>
1407
1408 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1409 to "SyntaxError" for consistency with my 2002-11-15 change.
1410
1411 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1412 not define to {}, since this breaks the common use of `YYDPRINTF
1413 ((...));' if a single statement is desired (e.g. before `else').
1414 Work around GCC warnings by surrounding corresponding calls with
1415 {} if needed.
1416 (yyhasResolvedValue): Remove unused function.
1417 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1418 loop body.
1419 (yyreportSyntaxError): Renamed from yyreportParseError.
1420 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1421 All uses changed.
1422 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1423 extern when possible. Remove unused initializations.
1424
b0937b22
AD
14252002-11-16 Akim Demaille <akim@epita.fr>
1426
1427 Augment the similarity between GLR and LALR traces.
1428
1429 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1430 (YY_REDUCE_PRINT): New.
1431 (yyparse): Use them.
1432 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1433 YYDPRINT here.
1434 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1435 state reached after the reduction/recovery, since...
1436 (yyparse, yyprocessOneStack): Report the state we are entering in.
1437
c5e3e510
AD
14382002-11-16 Akim Demaille <akim@epita.fr>
1439
1440 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1441 Add support for --trace=skeleton.
1442 * src/scan-skel.l: %option debug.
1443 Scan strings of non-@ or \n instead of character by character.
1444 (scan_skel): Handle trace_skeleton.
1445 (QPUTS): New.
1446 (@output_parser_name@, @output_header_name@): ``Restore'' their
1447 support (used to be M4 macros).
1448 * data/yacc.c: Quote larger chunks, a la glr.c.
1449 * data/lalr1.cc: Likewise.
1450 The header guards are no longer available, so use some other
1451 string than `YYLSP_NEEDED'.
1452
4c6cc1db
AD
14532002-11-16 Akim Demaille <akim@epita.fr>
1454
1455 Make the ``Printers and Destructors'' test more verbose, taking
1456 `yacc.c''s behavior as (possibly wrong) reference.
1457
1458 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1459 instead of fprint on stdout.
1460 Set and report the last_line of the symbols.
1461 Consistently display values and locations.
1462
6d9e8019
PE
14632002-11-16 Paul Eggert <eggert@twinsun.com>
1464
1465 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1466
6e649e65
PE
14672002-11-15 Paul Eggert <eggert@twinsun.com>
1468
b25d88f6
PE
1469 * tests/actions.at (Actions after errors): New test case.
1470
6e649e65
PE
1471 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1472 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1473 tests/action.at, tests/calc.at, tests/conflicts.at,
1474 tests/cxx-type.at, tests/regression.at:
1475 "parse error" -> "syntax error" for POSIX compatibility.
1476 "parsing stack overflow..." -> "parser stack overflow" so
1477 that code matches Bison documentation.
1478
0f39aab9
AD
14792002-11-15 Akim Demaille <akim@epita.fr>
1480
1481 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1482 take two BRACED_CODE, not two string_content.
1483 Free the scanner's obstack when we are done.
1484 (code_content): New.
1485 * tests/calc.at: Adjust.
1486 * doc/bison.texinfo: Adjust.
1487 Also, make sure to include the `,' for these declarations.
1488
761c1926
AD
14892002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1490
1491 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1492 definition; avoids potential autoreconf problems.
1493
b0f98b10
AD
14942002-11-15 Akim Demaille <akim@epita.fr>
1495
1496 Always check the value returned by yyparse.
1497
1498 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1499 returned by yyparse.
1500 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1501 Adjust calls.
1502 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1503 returned by yyparse.
1504
970785f1
PH
15052002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1506
1507 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1508 on input.at test.
1509
8fcc7db1
PE
15102002-11-14 Paul Eggert <eggert@twinsun.com>
1511
7ec1b48e
PE
1512 * src/output.c (output_skeleton): Call xfopen instead of
1513 duplicating xfopen's body.
1514
cfff7583 1515 Fix bugs reported by Nelson H. F. Beebe in
e3aa65c5 1516 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 1517
8fcc7db1
PE
1518 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1519 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1520 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1521 file twice in the grammar, as an extra check.
1522
1523 * tests/input.at (Torturing the Scanner): Surround the
1524 backslash-newline tests with "#if 0", to make it less likely that
1525 we'll run into compiler bugs. Bring back solitary \ inside
1526 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 1527 test backslash-newline in C character constant.
8fcc7db1 1528
4e8d992c
AD
15292002-11-14 Akim Demaille <akim@epita.fr>
1530
1531 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1532 status of the compiler.
f32b346d 1533 Calling `exit 1' is no longer needed.
4e8d992c
AD
1534 Reported by Nelson H. F. Beebe.
1535
9501dc6e
AD
15362002-11-14 Akim Demaille <akim@epita.fr>
1537
1538 * tests/atlocal.in (CPPFLAGS): We have config.h.
1539 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1540 New.
1541 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1542 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1543 * tests/regression.at, tests/torture.at: Use them for all the
1544 grammars that are to be compiled.
1545 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1546 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1547 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1548
18b519c0
AD
15492002-11-14 Akim Demaille <akim@epita.fr>
1550
1551 * doc/bison.texinfo: Various formatting changes (alignments in
1552 samples, additional @group/@end group, GCS in samples.
1553 Use @deffn instead of simple @table to define the directives,
1554 macros, variables etc.
1555
9a86cdb9
PE
15562002-11-13 Paul Eggert <eggert@twinsun.com>
1557
daa33def 1558 Fix some bugs reported by Albert Chin-A-Young in
e3aa65c5 1559 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 1560
daa33def 1561 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 1562 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
1563 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1564 * tests/headers.at (export YYLTYPE): Likewise.
1565
1566 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 1567 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 1568
9a86cdb9
PE
1569 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1570 comments, since they're not portable. Use GNU coding style.
1571
9c1e26bd
AD
15722002-11-13 Akim Demaille <akim@epita.fr>
1573
1574 * data/yacc.c: Leave bigger chunks of quoted text.
1575 (YYDSYMPRINTF): New.
1576 Use it to report symbol activities.
1577 * data/glr.c (YYDSYMPRINTF): New.
1578 Use it.
1579
87f721cc
PE
15802002-11-12 Paul Eggert <eggert@twinsun.com>
1581
1582 Version 1.75b.
1583
1584 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1585 (yyglrReduce): Return yyok, not 0.
1586 This should avoid the enumerated-type warnings reported
464c6927 1587 by Nelson H. F. Beebe in
e3aa65c5 1588 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
1589
1590 * lib/bbitset.h (BITSET_INLINE): Remove.
1591 * lib/bitset.h [! BITSET_INLINE]: Remove.
1592 (bitset_set, bitset_reset, bitset_test): Rename local vars
1593 to avoid shadowing warnings by GCC.
1594
1595 * data/glr.c (inline): Remove #define. It's the user's
1596 responsibility to #define it away, just like 'const'.
464c6927 1597 This fixes one of the bugs reported by Nelson H. F. Beebe in
e3aa65c5 1598 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 1599
87f721cc
PE
1600 * Makefile.maint (po-check): Scan .l and .y files instead of the
1601 .c and the .h files that they generate. This fixes the bug
1602 reported by Tim Van Holder in:
e3aa65c5 1603 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
1604 Look for N_ as well as for _. Try to avoid matching #define for
1605 N_ and _.
1606 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1607 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1608 * src/scan-gram.l: Revamp regular expressions so that " and '
1609 do not confuse xgettext.
1610
1611 * src/struniq.h (struniq_new): Do not declare the return type
1612 to be 'const'; this violates the C standard.
1613 * src/struniq.c (struniq_new): Likewise.
1614
be14ade5
AD
16152002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1616
1617 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1618 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1619 linker.
1620
05291fbc
AD
16212002-11-12 Akim Demaille <akim@epita.fr>
1622
1623 * Makefile.maint: Sync with Autoconf:
1624 (local_updates): New.
1625
1f5fd52e
AD
16262002-11-12 Akim Demaille <akim@epita.fr>
1627
1628 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1629
283f1e64
AD
16302002-11-12 Akim Demaille <akim@epita.fr>
1631
1632 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1633 locations.
1634
886b69d1
AD
16352002-11-12 Akim Demaille <akim@epita.fr>
1636
1637 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1638 not yyvalue.
1639
3df37415
AD
16402002-11-12 Akim Demaille <akim@epita.fr>
1641
1642 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1643 Use it to test the GLR parser.
1644
7bd6c77e
AD
16452002-11-12 Akim Demaille <akim@epita.fr>
1646
1647 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1648 defines it.
1649 * data/glr.c (yystos): New.
1650 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1651 (YYDSYMPRINT): New.
1652 (yyval): Don't define it, it is handled via M4.
1653 (yyrecoverParseError): Free verbosely the discarded symbols.
1654 * data/yacc.c (yysymprint): Remove, rather...
1655 (b4_yysymprint_generate): invoke.
1656 * data/c.m4 (b4_yysymprint_generate): New.
1657 Accept pointers as arguments, as opposed to the version from
1658 yacc.c.
1659 (b4_yydestruct_generate): Likewise.
1660 * tests/cations.at (Printers and Destructors): Use Bison directives
1661 instead of CPP macros.
1662 Don't rely on internal details.
1663
b0400cc6
AD
16642002-11-12 Akim Demaille <akim@epita.fr>
1665
1666 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1667 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1668 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1669 it against YYEMPTY and so forth), work on yytoken (i.e., set
1670 it to YYEMPTY etc.).
1671 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1672 (b4_symbol_actions): Remove.
1673 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1674 for 0, end-of-input.
1675
72f889cc
AD
16762002-11-12 Akim Demaille <akim@epita.fr>
1677
1678 * doc/bison.texinfo (Destructor Decl): New.
1679
b1ae9233
AD
16802002-11-12 Akim Demaille <akim@epita.fr>
1681
1682 * src/tables.c (tables_generate): Use free for pointers that
1683 cannot be NULL, not XFREE.
1684 (pack_vector): Use assert, not fatal, for bound violations.
1685 * src/state.c (state_new): Likewise.
1686 * src/reader.c (reader): Likewise.
1687 * src/lalr.c (set_goto_map): Likewise.
72f889cc 1688 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
1689 the file name.
1690
7ec2d4cd
AD
16912002-11-12 Akim Demaille <akim@epita.fr>
1692
1693 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1694 Restore.
1695 * src/scan-gram.l (last_string): Is global to the file, not to
1696 yylex.
1697 * src/parse-gram.y (input): Don't append the epilogue here,
1698 (epilogue.opt): do it here, and free the scanner's obstack.
1699 * src/reader.c (epilogue_set): Rename as...
1700 (epilogue_augment): this.
1701 * data/c.m4 (b4_epilogue): Defaults to empty.
1702
573a6cd3
AD
17032002-11-12 Akim Demaille <akim@epita.fr>
1704
1705 * src/getargs.c (long_options): Remove duplicates.
1706 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1707 Remove.
1708 * doc/bison.rnh: Remove.
1709 * doc/bison.texinfo (VMS Invocation): Remove.
1710
95612cfa
AD
17112002-11-12 Akim Demaille <akim@epita.fr>
1712
1713 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1714 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1715
1716 Use struniq for symbols.
1717
1718 * src/symtab.h (symbol_t): The tag member is a struniq.
1719 (symbol_type_set): Adjust.
1720 * src/symtab.c (symbol_new): Takes a struniq.
1721 (symbol_free): Don't free the tag member.
1722 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1723 (hash_compare_symbol, hash_symbol): these.
1724 Use the fact that tags as struniqs.
1725 (symbol_get): Use struniq_new.
1726 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1727 Returns a strniq.
1728 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1729 and type members are struniqs.
1730 * src/reader.c (get_merge_function)
1731 (grammar_current_rule_merge_set): Adjust.
1732 (TYPE, current_type): Are struniq.
1733
1734 Use struniq for file names.
1735
1736 * src/files.h, src/files.c (infile): Split into...
1737 (grammar_file, current_file): these.
1738 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1739 * src/reduce.c (reduce_print): Likewise.
1740 * src/getargs.c (getargs): Likewise.
1741 * src/complain.h, src/complain.c: Likewise.
1742 * src/main.c (main): Call struniqs_new early enough to use it for
1743 file names.
1744 Don't free the input file name.
1745
3e6656f9
AD
17462002-11-12 Akim Demaille <akim@epita.fr>
1747
1748 * src/symtab.c (symbol_free): Remove dead deactivated code:
1749 type_name are properly removed.
1750 Don't use XFREE to free items that cannot be NULL.
1751 * src/struniq.h, src/struniq.c: New.
1752 * src/main.c (main): Initialize/free struniqs.
1753 * src/parse-gram.y (%union): Add astruniq member.
1754 (yyprint): Adjust.
1755 * src/scan-gram.l (<{tag}>): Return a struniq.
1756 Free the obstack bit that used to store it.
1757 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1758
7672019c
PE
17592002-11-11 Paul Eggert <eggert@twinsun.com>
1760
1761 Revamp to fix many (but not all) of the C- and M4-related quoting
1762 problems. Among other things, this fixes the Bison bug reported
1763 by Jan Hubicka when processing the Bash grammar; see:
e3aa65c5 1764 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
1765
1766 Use new @ escapes consistently. Represent brackets with @{ and @}
1767 rather than @<:@ and @:>@, since this works a bit better with dumb
1768 editors like vi. Represent @ with @@, since @ is now consistently
1769 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1770 __ofile__, to avoid unexpected expansions. Similarly, use @output
1771 rather than #output.
1772
1773 * data/c.m4 (b4_copyright): Omit file name from comment, since
1774 the file name could contain "*/".
1775 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1776 be quoted. All uses changed.
1777
1778 * data/glr.c: Use new @ escapes consistently.
1779 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1780 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1781 Remove, since they couldn't handle arbitrary characters in file
1782 names.
1783 * data/lalr1.cc: Likewise.
1784 * data/yacc.c: Likewise.
1785
1786 * src/files.c (output_infix): Remove; all uses removed.
1787 * src/files.h: Likewise.
1788
1789 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1790 mishandled funny characters in file names, and anyway it isn't
1791 needed any more.
1792 * data/yacc.c: Likewise.
1793 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1794
1795 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1796 * data/yacc.c: Likewise.
1797
1798 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1799 strings now.
1800 (muscle_init): Quote filename as a C string.
1801 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1802 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1803 * src/output.c (escaped_file_name_output): New function.
1804 (prepare_symbols): Quote tokens for M4.
1805 (prepare): Don't insert output_infix, output_prefix,
1806 output_parser_name, output_header_name; this is now down by scan-skel.
1807 Insert skeleton as a C string.
1808
1809 * src/output.c (user_actions_output, symbol_destructors_output,
1810 symbol_printers_output): Quote filenames for C and M4.
1811 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1812
1813 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1814 escapes other than \\ and \'; this simplifies the code.
1815 (<SC_STRING>): Likewise, for \\ and \".
1816 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1817 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1818 Use new escapes @{ and @} for [ and ].
1819
1820 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1821 them with auto vars.
1822 Switch to new escape scheme, where @ is the escape character uniformly.
1823 Abort if a stray escape character is found. Avoid unbounded input
1824 buffer when parsing non-escaped text.
1825
1826 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1827 __oline__, #output, $@, and @{ do not have unintended meanings.
1828
acea4f3b
PE
18292002-11-09 Paul Eggert <eggert@twinsun.com>
1830
1831 Fix the test failure due to GCC warnings described in
e3aa65c5 1832 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
1833 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1834 evaluate to 0 if it's impossible for NINF to be in the respective
1835 table.
1836 (yygetLRActions, yyrecoverParseError): Use them.
1837
1838 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1839 counted in the token inserted at end of file. Now takes
1840 location_t *, not location_t, so that the location can be
1841 adjusted. All uses changed.
1842
1843 * tests/regression.at (Invalid inputs): Adjust wording in
1844 diagnostic to match the new behavior.
1845
1846 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1847 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1848 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1849 abort ();'. This reduces the runtime of the "Many lookaheads"
1850 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1851 GCC 3.2.
1852
20ef1ad5
PE
18532002-11-07 Paul Eggert <eggert@twinsun.com>
1854
1855 * src/parse-gram.y (CHARACTER): Remove unused token.
1856 All uses removed.
1857
1858 * src/scan-gram.l: Remove stack option. We no longer use the
1859 stack, since the stack was never deeper than 1; instead, use the
1860 new auto var c_context to record the stacked value.
1861
1862 Remove nounput option. At an unexpected end of file, we now unput
1863 the minimal input necessary to end cleanly; this simplifies the
1864 code.
1865
1866 Avoid unbounded token sizes where this is easy.
1867
1868 (unexpected_end_of_file): New function.
1869 Use it to systematize the error message on unexpected EOF.
1870 (last-string): Now auto, not static.
1871 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1872 (scanner_last_string_free): Remove; not used.
1873 (percent_percent_count): Move decl to just before use.
1874 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1875 not the (never otherwised-used) CHARACTER.
1876
93724f13
AD
18772002-11-07 Akim Demaille <akim@epita.fr>
1878
1879 Let yyerror always receive the msg as last argument, so that
1880 yyerror can be variadic.
1881
1882 * data/yacc.c (b4_yyerror_args): New.
1883 Use it when calling yyerror.
1884 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1885 Use it when calling yyerror.
1886 * doc/bison.texinfo (Error Reporting): Adjust.
1887 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1888 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1889
6e40b4eb
AD
18902002-11-06 Akim Demaille <akim@epita.fr>
1891
1892 #line should have quoted strings.
1893 Ideally, this should be done by m4_quotearg.
1894
1895 * src/scan-skel.l: Include quotearg.h.
1896 Quote __ofile__.
1897 * src/output.c (symbol_printers_output)
1898 (symbol_destructors_output): Quote the file name.
1899
2dfbfc12
AD
19002002-11-06 Akim Demaille <akim@epita.fr>
1901
1902 * tests/regression.at (Invalid inputs): Adjust to the recent
1903 messages.
1904
437c2d80
AD
19052002-11-06 Akim Demaille <akim@epita.fr>
1906
1907 Restore --no-lines.
1908 Reported by Jim Kent.
1909
1910 * data/c.m4 (b4_syncline): New.
1911 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1912 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1913 * src/output.c (user_actions_output): Likewise.
1914 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 1915 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 1916
900c5db5
AD
19172002-11-06 Akim Demaille <akim@epita.fr>
1918
1919 * src/main.c (main): Free `infile'.
1920 * src/scan-gram.l (handle_syncline): New.
1921 Recognize `#line'.
1922 * src/output.c (user_actions_output, symbol_destructors_output)
1923 (symbol_printers_output): Use the location's file name, not
1924 infile.
1925 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1926
e183b123 19272002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 1928
e183b123 1929 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 1930 either has GLR conflict entries.
e183b123 1931
193eb6b7
PE
19322002-11-05 Paul Eggert <eggert@twinsun.com>
1933
e183b123
PE
1934 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1935 "integer out of range" rather than "invalid value".
1936 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1937 accordingly.
1938
193eb6b7
PE
1939 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1940 Also, remove one static variable in the scanner.
1941
1942 * src/scan-gram.l (braces_level): Now auto, not static.
1943 Initialize to zero if the compiler is being picky.
1944 (INITIAL): Clear braces_level instead of incrementing it.
1945 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1946 as POSIX 1003.1-2001 requires.
1947 * src/system.h (IF_LINT): New macro, taken from coreutils.
1948 * configure.ac: Define "lint" if --enable-gcc-warnings.
1949
29c01725
AD
19502002-11-05 Akim Demaille <akim@epita.fr>
1951
1952 * src/scan-gram.l: When it starts with `%', complain about the
1953 whole directive, not just that `invalid character: %'.
1954
8aeac3ca
AD
19552002-11-04 Akim Demaille <akim@epita.fr>
1956
1957 * Makefile.maint: Update from Autoconf.
1958 (update, cvs-update, po-update, do-po-update): New.
1959
793a58bb
AD
19602002-11-04 Akim Demaille <akim@epita.fr>
1961
1962 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1963 and yyerror.
1964 Have yyerror `use' its arguments.
1965 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1966 returns true when location & yacc & pure & parse-param.
1967 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1968
c4d720cd
AD
19692002-11-04 Akim Demaille <akim@epita.fr>
1970
1971 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1972 clashes.
1973 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1974 font-lock-mode.
1975 Use complain_at.
1976 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1977 slot 0.
1978
613a0dc5
PE
19792002-11-03 Paul Eggert <eggert@twinsun.com>
1980
1981 * src/reader.c (get_merge_function, grammar_current_rule_check):
1982 Use consistent diagnostics for reporting type name clashes.
1983 Quote the types with <>, for consistency with Yacc.
1984 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1985
2a8d363a
AD
19862002-11-03 Akim Demaille <akim@epita.fr>
1987
1988 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1989 New.
1990 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1991 (b4_parse_param): Remove.
1992 Use b4_identification.
1993 Propagate b4_pure_args where needed to pass them to yyerror.
1994 * data/glr.m4 (b4_parse_param): Remove.
1995 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1996 (b4_lpure_formals): New.
1997 Use b4_identification.
1998 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1999 b4_user_formals and b4_user_args.
2000 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2001 (yyreportAmbiguity): When using a pure parser, also need
2002 the location, and the parse-params.
2003 Adjust callers.
2004 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2005 When using a pure parser, also need the parse-params.
2006 Adjust callers.
2007 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2008 (%pure-parser + %parse-param) LALR and GLR parsers.
2009 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2010 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2011 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2012 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2013 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2014 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2015 * doc/bison.texinfo: Untabify the whole file.
2016 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2017 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2018 (Error Reporting): Adjust to these new directives.
2019 Document %error-verbose, deprecate YYERROR_VERBOSE.
2020
9e32add8
AD
20212002-11-03 Akim Demaille <akim@epita.fr>
2022
2023 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2024 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2025 command line options.
2026 * tests/cxx-type.at: Formatting changes.
2027
b02d90a5
PE
20282002-11-03 Paul Eggert <eggert@twinsun.com>
2029
2030 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2031 to count columns correctly, and to check for invalid inputs.
9e32add8 2032
b02d90a5
PE
2033 Use mbsnwidth to count columns correctly. Account for tabs, too.
2034 Include mbswidth.h.
2035 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2036 (extend_location): New function.
2037 (YY_LINES): Remove.
2038
2039 Handle CRLF in C code rather than in Lex code.
2040 (YY_INPUT): New macro.
2041 (no_cr_read): New function.
2042
2043 Scan UCNs, even though we don't fully handle them yet.
2044 (convert_ucn_to_byte): New function.
2045
2046 Handle backslash-newline correctly in C code.
2047 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2048 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2049 all uses changed.
2050 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2051 Use {splice} wherever C allows backslash-newline.
2052 YY_STEP after space, newline, vertical-tab.
2053 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 2054
b02d90a5
PE
2055 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2056
2057 ({int}, handle_action_dollar, handle_action_at): Check for integer
2058 overflow.
9e32add8 2059
b02d90a5
PE
2060 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2061
2062 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2063 as well as \000. Check for UCHAR_MAX, not 255.
2064 Allow \x with an arbitrary positive number of digits, as in C.
2065 Check for overflow here.
2066 Allow \? and UCNs, for compatibility with C.
2067
2068 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2069 with quote slot used by complain_at.
2070
2071 * tests/input.at: Add tests for backslash-newline, m4 quotes
2072 in symbols, long literals, and funny escapes in strings.
2073
2074 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2075 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2076 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2077 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2078 * m4/mbswidth.m4: New file, from GNU coreutils.
2079
2080 * doc/bison.texinfo (Grammar Outline): Document // comments.
2081 (Symbols): Document that trigraphs have no special meaning in Bison,
2082 nor is backslash-newline allowed.
2083 (Actions): Document that trigraphs have no special meaning.
2084
2085 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2086 no longer used.
2087
20882002-11-02 Paul Eggert <eggert@twinsun.com>
2089
2090 * src/reader.c: Don't include quote.h; not needed.
2091 (get_merge_function): Reword warning to be consistent with
2092 type clash diagnostic in grammar_current_rule_check.
2093
2094 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2095 bug in trigraph handling.
2096
2097 * src/output.c (prepare_symbols): When printing token names,
2098 escape "[" as "@<:@" and likewise for "]".
2099
2100 * src/system.h (errno): Remove declaration, as we are now
2101 assuming C89 or better, and C89 guarantees errno.
2102
762b212b
PE
21032002-10-30 Paul Eggert <eggert@twinsun.com>
2104
2105 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2106 Check for close failures.
2107 * src/files.h (xfclose): Return void, not int, since it always
2108 returned zero.
2109 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2110 indicates one.
2111 * src/output.c (output_skeleton): Use xfclose rather than fclose
2112 and ferror. xfclose now checks ferror.
2113
2114 * data/glr.c (YYLEFTMOST_STATE): Remove.
2115 (yyreportTree): Use a stack-based leftmost state. This avoids
2116 our continuing battles with bogus warnings about initializers.
2117
56100c60
AD
21182002-10-30 Akim Demaille <akim@epita.fr>
2119
2120 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2121 #if.
2122
51b4a04c
PH
21232002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2124
2125 * tests/glr-regr1.at: New test for reported regressions.
2126 * tests/testsuite.at: Add glr-regr1.at test.
2127 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 2128
bf1ebda2
PE
21292002-10-24 Paul Eggert <eggert@twinsun.com>
2130
5c16c6b1
PE
2131 Version 1.75a.
2132
bf1ebda2
PE
2133 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2134 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2135 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2136 Don't assume strdup exists; POSIX says its an XSI extension.
2137 Check for buffer overflow on input.
2138
b526ee61
AD
21392002-10-24 Akim Demaille <akim@epita.fr>
2140
2141 * src/output.c (output_skeleton): Don't disable M4sugar comments
2142 too soon: it results in comments being expanded.
2143 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2144 first output.
2145
f1886bb2
AD
21462002-10-24 Akim Demaille <akim@epita.fr>
2147
2148 * data/yacc.c (m4_int_type): New.
2149 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2150 char' as only yacc.c wants K&R portability.
2151 * data/glr.c (yysigned_char): Remove.
2152 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2153 Reported by Quoc Peyrot.
2154
c5576256
PE
21552002-10-23 Paul Eggert <eggert@twinsun.com>
2156
2157 * src/main.c (main): With --trace=time, report times even if a
2158 non-fatal error occurs. Formerly, the times were reported in some
2159 such cases but not in others.
2160 * src/reader.c (reader): Just return if a complaint has been issued,
2161 instead of exiting, so that 'main' can report times.
2162
27b0ffea
AD
21632002-10-22 Akim Demaille <akim@epita.fr>
2164
2165 * src/system.h: Include sys/types.
2166 Reported by Bert Deknuydt.
2167
223a7883
PE
21682002-10-23 Paul Eggert <eggert@twinsun.com>
2169
2170 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2171 Suggested by Art Haas.
2172
21732002-10-22 Paul Eggert <eggert@twinsun.com>
2174
2175 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2176 decl; not needed any more.
2177 * src/main.c (main): Use return to exit, undoing yesterday's change.
2178 The last OS that we could find where this wouldn't work is
2179 SunOS 3.5, and that's too old to worry about now.
2180
2181 * data/glr.c (struct yyltype): Define members even when not
2182 doing locations. This is more consistent with yacc.c, and it
2183 works around the following bug reports:
e3aa65c5
PE
2184 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2185 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 2186
223a7883
PE
2187 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2188 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2189 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2190
8b76775a
AD
21912002-10-22 Akim Demaille <akim@epita.fr>
2192
2193 * data/README: New.
2194
6db10d14
PE
21952002-10-21 Paul Eggert <eggert@twinsun.com>
2196
2197 Be consistent about 'bool'; the old code used an enum in one
2198 module and an int in another, and this violates the C standard.
2199 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2200 * configure.ac (AC_HEADER_STDBOOL): Add.
2201 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2202 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2203 * src/symtab.c (hash_compare_symbol_t): Likewise.
2204 * src/system.h (bool, false, true): Use a definition consistent
2205 with ../lib/hash.c. All uses changed.
2206
2207 * src/complain.c (warning_issued): Renamed from warn_message_count,
2208 so that we needn't worry about integer overflow (!).
2209 Now of type bool. All uses changed.
2210 (complaint_issued): Renamed from complain_message_count; likewise.
2211
2212 * src/main.c (main): Use exit to exit with failure.
27b0ffea 2213
6db10d14
PE
2214 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2215 rather than 1 and 0.
2216 * src/main.c (main): Likewise.
2217 * src/getargs.c (getargs): Likewise.
2218 * src/reader.c (reader): Likewise.
2219
2220 * src/getarg.c (getargs): Remove duplicate code for
2221 "Try `bison --help'".
2222
2223 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2224 What was that "2" for?
2225
2226 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2227 * src/getargs.c (usage): Likewise.
2228
2229 * src/getargs.c (getargs): When there are too few operands, report
2230 the last one. When there are too many, report the first extra
2231 one. This is how diffutils does it.
2232
92a060fd
PE
22332002-10-20 Paul Eggert <eggert@twinsun.com>
2234
2235 Remove K&R vestiges.
2236 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2237 * src/complain.c (VA_START): Remove. Assume prototypes.
2238 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2239 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2240 fatal): Assume prototypes.
2241 * src/complain.h: Assume prototypes.
2242 * src/system.h (PARAMS): Remove.
2243 Include <limits.h> unconditionally, since it's guaranteeed even
2244 for a freestanding C89 compiler.
2245 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2246 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 2247
e7cb57c0
AD
22482002-10-20 Akim Demaille <akim@epita.fr>
2249
2250 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2251 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2252 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2253 (yyresolveStates, yyresolveAction, yyresolveStack)
2254 (yyprocessOneStack): Use them.
2255 (yy_reduce_print): New.
2256 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2257
0245f82d
AD
22582002-10-20 Akim Demaille <akim@epita.fr>
2259
2260 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2261 arguments and output `void'.
2262 (b4_c_function): Rename as...
2263 (b4_c_function_def): this.
2264 (b4_c_function_decl, b4_c_ansi_function_def)
2265 (b4_c_ansi_function_decl): New.
2266 Change the interpretation of the arguments: before `int, foo', now
2267 `int foo, foo'.
2268 * data/yacc.c (yyparse): Prototype and define thanks to these.
2269 Adjust b4_c_function_def uses.
2270 * data/glr.c (yyparse): Likewise, but ANSI only.
2271
39912f52
AD
22722002-10-20 Akim Demaille <akim@epita.fr>
2273
2274 * src/output.c (prepare): Move the definition of `tokens_number',
2275 `nterms_number', `undef_token_number', `user_token_number_max'
2276 to...
2277 (prepare_tokens): Here.
2278 (prepare_tokens): Rename as...
2279 (prepare_symbols): this.
2280 (prepare): Move the definition of `rules_number' to...
2281 (prepare_rules): here.
2282 (prepare): Move the definition of `last', `final_state_number',
2283 `states_number' to...
2284 (prepare_states): here.
2285 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2286
20c1e2ad
AD
22872002-10-20 Akim Demaille <akim@epita.fr>
2288
2289 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2290
21964f43
AD
22912002-10-20 Akim Demaille <akim@epita.fr>
2292
2293 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2294 * data/c.m4: here.
2295
66d30cd4
AD
22962002-10-20 Akim Demaille <akim@epita.fr>
2297
2298 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2299 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2300 `pair'.
2301 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2302 `name' to...
2303 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2304 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2305 These.
2306
95f2c9fe
PE
23072002-10-19 Paul Eggert <eggert@twinsun.com>
2308
2309 Do not create a temporary file, as that involves security and
2310 cleanup headaches. Instead, use a pair of pipes.
2311 Derived from a suggestion by Florian Krohm.
2312 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2313 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2314 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2315 (BISON_PREREQ_SUBPIPE): Add.
2316 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2317 Add subpipe.h, subpipe.c.
2318 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2319 * po/POTFILES.in: Add lib/subpipe.c.
2320 * src/output.c: Include "subpipe.h".
2321 (m4_invoke): Remove decl.
2322 (scan_skel): New decl.
2323 (output_skeleton): Use pipe rather than temporary file for m4 input.
2324 Check that m4sugar.m4 is readable, to avoid deadlock.
2325 Check for pipe I/O error.
2326 * src/scan-skel.l (readpipe): Remove decl.
2327 (scan_skel): New function, to be used in place of m4_invoke.
2328 Read from stream rather than file.
66d30cd4 2329
95f2c9fe
PE
2330 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2331 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2332 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2333 this generates a more-accurate value anyway.
2334
2335 * lib/timevar.c (timervar_accumulate): Rename locals to
2336 avoid confusion with similarly-named more-global.
2337 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2338
2339 * src/output.c (prepare): Use xstrdup to convert char const *
2340 to char *, to avoid GCC warning.
2341
c19988b7
AD
23422002-10-19 Akim Demaille <akim@epita.fr>
2343
2344 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2345 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2346 Use them to have `calc.y' ready for %pure-parser.
2347 * data/yacc.c (YYLEX): Pass a yylex return type to
2348 b4_c_function_call.
2349
ae7453f2
AD
23502002-10-19 Akim Demaille <akim@epita.fr>
2351
2352 Prototype support of %lex-param and %parse-param.
2353
2354 * src/parse-gram.y: Add the definition of the %lex-param and
2355 %parse-param tokens, plus their rules.
2356 Drop the `_' version of %glr-parser.
2357 Add the "," token.
2358 * src/scan-gram.l (INITIAL): Scan them.
2359 * src/muscle_tab.c: Comment changes.
2360 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2361 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2362 (muscle_entry_s): The `value' member is no longer const.
2363 Adjust all dependencies.
2364 * src/muscle_tab.c (muscle_init): Adjust: use
2365 MUSCLE_INSERT_STRING.
2366 Initialize the obstack earlier.
2367 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2368 (muscle_pair_list_grow): New.
2369 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2370 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2371 * tests/calc.at: Use %locations, not --locations.
2372 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2373
0e575721
AD
23742002-10-19 Akim Demaille <akim@epita.fr>
2375
2376 * src/getargs.c (usage): Take status as argument and exit
2377 accordingly.
2378 Report the traditional `Try ... --help' message when status != 0.
2379 (usage, version): Don't take a FILE * as arg, it is pointless.
2380 (getargs): When there is an incorrect number of arguments, make it
2381 an error, and report it GNUlically thanks to `usage ()'.
2382
724ce7f5
PE
23832002-10-18 Paul Eggert <eggert@twinsun.com>
2384
3a781eb2
PE
2385 * data/glr.c (yyreportParseError): Don't assume that sprintf
2386 yields the length of the printed string, as this is not true
2387 on SunOS 4.1.4. Reported by Peter Klein.
2388
724ce7f5
PE
2389 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2390 * tests/conflicts.at (%nonassoc and eof): Likewise.
2391 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2392
473d0a75
AD
23932002-10-17 Akim Demaille <akim@epita.fr>
2394
2395 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2396 * src/getargs.c (trace_types, trace_args): Adjust.
2397 * src/reader.c (grammar_current_rule_prec_set)
2398 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2399 Standardize error messages.
2400 And s/@prec/%prec/!
2401 (reader): Use trace_flag to enable scanner/parser debugging,
2402 instead of an adhoc scheme.
2403 * src/scan-gram.l: Remove trailing debugging code.
2404
e76d2469
PE
24052002-10-16 Paul Eggert <eggert@twinsun.com>
2406
93e2236a
PE
2407 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2408 MUSCLE_TAB_H.
2409
e76d2469
PE
2410 * NEWS: Officially drop support for building Bison with K&R C,
2411 since it didn't work anyway and it's not worth worrying about.
2412 * Makefile.maint (wget_files): Remove ansi2knr.c.
2413 (ansi2knr.c-url_prefix): Remove.
2414 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2415 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2416 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2417
5bd1c419
PE
24182002-10-15 Paul Eggert <eggert@twinsun.com>
2419
2420 Stop using the "enum_" trick for K&R-style function definitions;
2421 it confused me, and I was the author! Instead, assume that people
2422 who want to use K&R C compilers (when using these modules in GCC,
2423 perhaps?) will run ansi2knr.
2424
2425 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2426 All uses of "enum_" changed to "enum ".
2427 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2428 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 2429
5bd1c419
PE
2430 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2431 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2432 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2433 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2434 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2435 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2436 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2437 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2438 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2439 Use function prototypes; this removes the need for declaring
2440 static functions simply to provide their prototypes.
2441 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2442 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2443 bitset_count_, bitset_create, bitset_dump, bitset_first,
2444 bitset_free, bitset_init, bitset_last, bitset_next,
2445 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2446 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2447 bitset_print, bitset_release_memory, bitset_toggle_,
2448 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2449 debug_bitset): Likewise.
2450 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2451 * lib/bitset_stats.c (bitset_log_histogram_print,
2452 bitset_percent_histogram_print, bitset_stats_and,
2453 bitset_stats_and_cmp, bitset_stats_and_or,
2454 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2455 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2456 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2457 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2458 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2459 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2460 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2461 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2462 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2463 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2464 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2465 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2466 bitset_stats_zero): Likewise.
2467 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2468 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2469 bitsetv_dump, debug_bitsetv): Likewise.
2470 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2471 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2472 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2473 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2474 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2475 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2476 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2477 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2478 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2479 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2480 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2481 Likewise.
2482 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2483 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2484 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2485 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2486 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2487 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2488 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2489 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2490 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2491 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2492 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 2493
ae26e1f0
AD
24942002-10-14 Akim Demaille <akim@epita.fr>
2495
2496 Version 1.75.
2497
d43baf71
AD
24982002-10-14 Akim Demaille <akim@epita.fr>
2499
2500 * tests/Makefile.am (maintainer-check-posix): New.
2501
7ebc83e3
AD
25022002-10-14 Akim Demaille <akim@epita.fr>
2503
2504 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2505 member.
2506
05846dae
AD
25072002-10-14 Akim Demaille <akim@epita.fr>
2508
2509 * src/tables.c (table_ninf_remap): base -> tab.
2510 Reported by Matt Rosing.
2511
1318e37d
PE
25122002-10-14 Paul Eggert <eggert@twinsun.com>
2513
447fbb17
PE
2514 * tests/action.at, tests/calc.at, tests/conflicts.at,
2515 tests/cxx-type.at, tests/headers.at, tests/input.at,
2516 tests/regression.at, tests/synclines.at, tests/torture.at:
2517 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2518 so that the tests still work even if POSIXLY_CORRECT is set.
2519 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 2520
1318e37d
PE
2521 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2522 for portability to K&R hosts. Fix typo: signed char is guaranteed
2523 only to 127, not to 128.
2524 * data/glr.c (yysigned_char): New type.
2525 * data/yacc.c (yysigned_char): Likewise.
2526 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2527
cc0f0794
PE
25282002-10-13 Paul Eggert <eggert@twinsun.com>
2529
5038f418
PE
2530 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2531 true due to limited range of data type" warning from GCC.
2532
cc0f0794
PE
2533 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2534 by wrapping enum yytokentype's definition inside #ifndef
2535 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2536
6fed0802
AD
25372002-10-13 Akim Demaille <akim@epita.fr>
2538
2539 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2540 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2541
32f0598d
AD
25422002-10-13 Akim Demaille <akim@epita.fr>
2543
2544 * Makefile.maint: Update from Autoconf 2.54.
2545 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2546
7ea9a33f
AD
25472002-10-13 Akim Demaille <akim@epita.fr>
2548
2549 * src/print.c (print_state): Separate the list of solved conflicts
2550 from the other items.
2551 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2552
ea99527d
AD
25532002-10-13 Akim Demaille <akim@epita.fr>
2554
2555 Let nondeterministic skeletons be usable with deterministic
2556 tables.
2557
2558 With the patch, GAWK compiled by GCC without -O2 passes its test
2559 suite using a GLR parser driven by LALR tables. It fails with -O2
2560 because `struct stat' gives two different answers on my machine:
2561 88 (definition of an auto var) and later 96 (memset on this var).
2562 Hence the stack is badly corrumpted. The headers inclusion is to
2563 blame: if I move the awk.h inclusion before GLR's system header
2564 inclusion, the two struct stat have the same size.
2565
2566 * src/tables.c (pack_table): Always create conflict_table.
2567 (token_actions): Always create conflict_list.
2568 * data/glr.c (YYFLAG): Remove, unused.
2569
f377f69f
AD
25702002-10-13 Akim Demaille <akim@epita.fr>
2571
2572 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2573 (O0FLAGS): New.
2574 (VALGRIND, GXX): New.
2575 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2576 * tests/bison.in: Run $PREBISON a pre-command.
2577 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2578 (maintainer-check-g++): New.
2579 * Makefile.am (maintainer-check): New.
2580
2a1fe6ed
AD
25812002-10-13 Akim Demaille <akim@epita.fr>
2582
2583 * data/glr.c: Formatting changes.
2584 Tweak some trace messages to match yacc.c's.
2585
f50adbbd
AD
25862002-10-13 Akim Demaille <akim@epita.fr>
2587
2588 GLR parsers sometimes raise parse errors instead of performing the
2589 default reduction.
2590 Reported by Charles-Henry de Boysson.
2591
2592 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2593 check the length of the traces when %glr.
2594 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2595 GLR's traces.
2596 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2597 Test GLR parsers.
2598 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2599 (yyltype): Remove the yy prefix from the member names.
2600 (yytable): Complete its comment.
2601 (yygetLRActions): Map error action number from YYTABLE from
2602 YYTABLE_NINF to 0.
2603 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2604 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2605 not satisfying as we could compare an YYACTION computed from
2606 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2607 only value for error actions.
2608 (yyreportParseError): In verbose parse error messages, don't issue
2609 `error' in the list of expected tokens.
2610 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2611 next action to perform to match glr.c's decoding.
2612 (yytable): Complete its comment.
2613
bcbad5b9
PE
26142002-10-13 Paul Eggert <eggert@twinsun.com>
2615
2616 Fix problem reported by Henrik Grubbstroem in
e3aa65c5 2617 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
2618 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2619 because the Bison parser reads the second action before reducing
2620 the first one.
2621 * src/scan-gram.l (rule_length): New static var.
2622 Use it to keep track of the rule length in the scanner, since
2623 we can't expect the parser to be in lock-step sync with the scanner.
2624 (handle_action_dollar, handle_action_at): Use this var.
2625 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 2626
14904b89
PE
26272002-10-12 Paul Eggert <eggert@twinsun.com>
2628
1fe611e5
PE
2629 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2630 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2631 Include <sys/time.h> when checking for clock_t and struct tms.
2632 Use same include order as source.
2633 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
e3aa65c5 2634 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 2635
1fe611e5
PE
2636 * lib/timevar.c: Update copyright date and clarify comments.
2637 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 2638
1fe611e5
PE
2639 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2640 GCC version as of today, then merge Bison's changes.
2641 Change "GCC" to "Bison" in copyright notice. timevar.def's
2642 author is Akim, so change that too.
2643
98194095
PE
2644 * src/reader.c (grammar_current_rule_check):
2645 Don't worry about the default action if $$ is untyped.
2646 Prevents bogus warnings reported by Jim Gifford in
e3aa65c5 2647 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 2648
14904b89
PE
2649 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2650 * data/glr.c, data/lalr1.cc, data/yacc.c:
2651 Output token definitions before the first part of user declarations.
2652 Fixes compatibility problem reported by Jim Gifford for kbd in
e3aa65c5 2653 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 2654
ff6dca18
PE
26552002-10-11 Paul Eggert <eggert@twinsun.com>
2656
2657 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2658 (yyparse): here. This undoes some of the 2002-07-25 change.
2659 Compatibility problem reported by Ralf S. Engelschall with
2660 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2661
eb714592
AD
26622002-10-11 Akim Demaille <akim@epita.fr>
2663
2664 * tests/regression.at Characters Escapes): New.
2665 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2666 characters.
2667 Reported by Jan Nieuwenhuizen.
2668
b7195100
AD
26692002-10-11 Akim Demaille <akim@epita.fr>
2670
2671 * po/id.po: New.
2672
f28a0f2d
PE
26732002-10-10 Paul Eggert <eggert@twinsun.com>
2674
2675 Portability fixes for bitsets; this also avoids several GCC
2676 warnings.
2677
2678 * lib/abitset.c: Include <stddef.h>, for offsetof.
2679 * lib/lbitset.c: Likewise.
2680
2681 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2682 properly for vectors of objects. Do not assume that adding a
2683 header size to a multiple of a word size yields a value that is
2684 properly aligned for the whole union.
2685 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2686
2687 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2688 unique names for structures.
2689 * lib/ebitset.c (ebitset_bytes): Likewise.
2690 * lib/lbitset.c (lbitset_bytes): Likewise.
2691
2692 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2693 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2694 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2695 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2696 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2697 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2698 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2699 to improve the type-checking that GCC can do.
2700 * lib/bitset.c (bitset_op4_cmp): Likewise.
2701 * lib/bitset_stats.c (bitset_stats_count,
2702 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2703 bitset_stats_copy, bitset_stats_disjoint_p,
2704 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2705 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2706 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2707 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2708 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2709 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2710 bitset_stats_or_and_cmp): Likewise.
2711 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2712 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2713 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2714 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2715
2716 * lib/abitset.h: Include bitset.h, not bbitset.h.
2717 * lib/ebitset.h: Likewise.
2718 * lib/lbitset.h: Likewise.
2719
2720 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2721 All instances of parameters of type enum bitset_opts are now of
2722 type enum_bitset_opts, to conform to the C Standard, and similarly
2723 for enum_bitset_type.
2724 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2725 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2726
2727 Do not use "struct bitset_struct" to mean different things in
2728 different modules. Not only is this confusing, it violates
2729 the C Standard, which requires that structure types in different
2730 modules must be compatible if one is to be passed to the other.
2731 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2732 All instances of "struct bitset_struct *" replaced with "bitset".
2733 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2734 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2735 struct lbitset_struct, struct bitset_stats_struct): New types.
2736 All uses of struct bitset_struct changed to union bitset_union,
2737 etc.
2738 * lib/abitset.c (struct abitset_struct, abitset,
2739 struct bitset_struct): Remove.
2740 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2741 struct bitset_struct): Remove.
2742 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2743 bitset_struct): Remove.
2744 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2745 Likewise.
2746
2747 Do not call a function of type T using a call that assumes the
2748 function is of a different type U. Standard C requires that a
2749 function must be called with a type that is compatible with its
2750 definition.
2751 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2752 New decls.
2753 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2754 New functions.
2755 * lib/ebitset.c (PFV): Remove.
2756 * lib/lbitset.c (PFV): Likewise.
2757 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2758 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2759 decls.
2760 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2761 (ebitset_vtable): Use them.
2762 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2763 lbitset_xor): New functions.
2764 (lbitset_vtable): Use them.
2765
2766 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2767 Declare.
2768
2769 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2770 GCC warning.
2771 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2772 Use offsetof, for simplicity.
2773
6fbe4984
PE
27742002-10-06 Paul Eggert <eggert@twinsun.com>
2775
2776 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2777 the same width as int. This reapplies a hunk of the 2002-08-12 patch
e3aa65c5 2778 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
2779 which was inadvertently undone by the 2002-09-30 patch.
2780 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2781 the same width as int.
2782
420f93c8
PE
27832002-10-04 Paul Eggert <eggert@twinsun.com>
2784
2785 Version 1.50.
2786
2787 * configure.ac (AC_INIT), NEWS: Increment version number.
2788
2789 * doc/bison.texinfo: Minor spelling, grammar, and white space
2790 fixes.
2791 (Symbols): Mention that any negative value returned from yylex
2792 signifies end-of-input. Warn about negative chars. Mention
2793 the portable Standard C character set.
2794
2795 The GNU coding standard says CFLAGS and YFLAGS are reserved
2796 for the installer to set.
2797 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2798 * src/Makefile.am (AM_CFLAGS): Likewise.
2799 (AM_YFLAGS): Renamed from YFLAGS.
2800
2801 Fix some MAX and MIN problems.
2802 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2803 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2804 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2805 * src/reader.c (reader): Use it.
2806
2807 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2808 POSIX 1003.1-2001 has removed fgrep.
2809
28102002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2811
2812 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2813 interpreted as signed.
2814 * lib/ebitset.c (ebitset_list): Fix bug.
2815
ff68026d
PE
28162002-10-01 Paul Eggert <eggert@twinsun.com>
2817
2818 More fixes for 64-bit hosts and large bitsets.
2819
2820 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2821 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2822 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2823 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2824 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2825 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2826 bitset_count_): Likewise.
2827 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2828 bitset_first, bitset_last): Likewise.
2829 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2830 bitset_stats_list_reverse, bitset_stats_size,
2831 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2832 Likewise.
2833 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2834 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2835 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2836 bitsetv_reflexive_transitive_closure): Likewise.
2837 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2838 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2839 Likewise.
2840 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2841 Likewise.
420f93c8 2842
ff68026d
PE
2843 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2844 Use size_t, not unsigned int, to count bytes.
2845 * lib/abitset.h (abitset_bytes): Likewise.
2846 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2847 Likewise.
2848 * lib/bitset.h (bitset_bytes): Likewise.
2849 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2850 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2851 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2852 * lib/ebitset.c (ebitset_bytes): Likewise.
2853 * lib/ebitset.h (ebitset_bytes): Likewise.
2854 * lib/lbitset.c (lbitset_bytes): Likewise.
2855 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 2856
ff68026d
PE
2857 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2858 abitset_subset_p, abitset_disjoint_p, abitset_and,
2859 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2860 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2861 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2862 abitset_or_and, abitset_or_and_cmp):
2863 Use bitset_windex instead of unsigned int.
2864 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2865 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2866 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2867 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2868 Likewise.
2869 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 2870
ff68026d
PE
2871 * lib/bitset.c (bitset_print):
2872 Use proper printf formats for widths of integer types.
2873 * lib/bitset_stats.c (bitset_percent_histogram_print,
2874 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2875 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2876 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2877 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 2878
ff68026d
PE
2879 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2880 BITSET_SIZE_MAX): New macros.
2881 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2882 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2883 to BITSET_WINDEX_MAX.
2884
2885 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2886 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2887 since we now return the bitset_bindex type (not int).
2888
2889 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2890 when computing sizes.
2891 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2892
2893 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2894 and avoid cast to unsigned.
2895
6aa452a6
AD
28962002-09-30 Akim Demaille <akim@epita.fr>
2897
2898 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2899 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2900 Updates from Michael Hayes.
2901
927f7817
AD
29022002-09-30 Art Haas <ahaas@neosoft.com>
2903
2904 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2905 invocations.
2906 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2907 defined.
2908
9738f41e
AD
29092002-09-27 Akim Demaille <akim@epita.fr>
2910
2911 Version 1.49c.
2912
a5c75d7f
AD
29132002-09-27 Akim Demaille <akim@epita.fr>
2914
2915 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2916 (Because of AC_LIBSOURCE).
2917
8280e179
AD
29182002-09-27 Akim Demaille <akim@epita.fr>
2919
2920 Playing with Autoscan.
2921
2922 * configure.ac: Remove the old LIBOBJ tweaks.
2923 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2924 * lib/strrchr.c: New.
2925 * lib/strtol.c: New, from the Coreutils 4.5.1.
2926
ae64af35
AD
29272002-09-27 Akim Demaille <akim@epita.fr>
2928
2929 Playing with Autoscan.
2930
2931 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2932 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2933 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2934 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2935 Coreutils 4.5.1.
2936
d1a1114f
AD
29372002-09-24 Akim Demaille <akim@epita.fr>
2938
2939 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2940 (Frequently Asked Questions, Parser Stack Overflow): New.
2941
b906441c
AD
29422002-09-13 Akim Demaille <akim@epita.fr>
2943
2944 Playing with autoscan.
2945
2946 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2947 * src/files.c (skeleton_find): Remove, unused.
2948 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2949 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2950
bd701811
AD
29512002-09-13 Akim Demaille <akim@epita.fr>
2952
2953 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2954 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2955
e0a13e7b
AD
29562002-09-13 Akim Demaille <akim@epita.fr>
2957
2958 * configure.ac: Require 2.54.
2959 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2960 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2961 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2962 Remove, provided by Autoconf macros.
2963
c97011bf
AD
29642002-09-12 Akim Demaille <akim@epita.fr>
2965
2966 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2967
d862b1be
AD
29682002-09-12 Akim Demaille <akim@epita.fr>
2969
2970 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2971 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2972 Reported by Martin Mokrejs.
2973
3d38c03a
AD
29742002-09-10 Akim Demaille <akim@epita.fr>
2975
2976 * src/parse-gram.y: Associate a human readable string to each
2977 token type.
2978 * tests/regression.at (Invalid inputs): Adjust.
2979
b6347355
AD
29802002-09-10 Gary V. Vaughan <gary@gnu.org>
2981
2982 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2983 with an Autoconf-2.5x style configure.ac.
2984
09ba4ab2
PE
29852002-09-06 Paul Eggert <eggert@twinsun.com>
2986
2987 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2988 exception applies only to yacc.c. This is a modification of a
2989 patch originally suggested by Akim Demaille.
2990
21846f69
AD
29912002-09-06 Akim Demaille <akim@epita.fr>
2992
09ba4ab2
PE
2993 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2994 here to...
2995 * data/yacc.c: here.
2996
21846f69
AD
2997 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2998 LocationType.
2999 (b4_ltype): Default to yy::Location from location.hh.
3000
c0ad8bf3
AD
30012002-09-04 Jim Meyering <jim@meyering.net>
3002
3003 * data/yacc.c: Guard the declaration of yytoknum also with
3004 `#ifdef YYPRINT', so it is declared only when used.
3005
3a93251e
AD
30062002-09-04 Akim Demaille <akim@epita.fr>
3007
3008 * configure.in: Rename as...
3009 * configure.ac: this.
3010 Bump to 1.49c.
3011
427c0dda
AD
30122002-09-04 Akim Demaille <akim@epita.fr>
3013
3014 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3015 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3016 translate maintainer only messages.
3017
6a254321
PE
30182002-08-12 Paul Eggert <eggert@twinsun.com>
3019
645e30d1
PE
3020 Version 1.49b.
3021
6a254321
PE
3022 * Makefile.am (SUBDIRS): Remove intl.
3023 (DISTCLEANFILES): Remove.
3024 * NEWS: Mention that GNU M4 is now required. Clarify what is
3025 meant by "larger grammars". Mention the pt_BR translation.
3026 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3027 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3028 Bump version from 0.11.2 to 0.11.5.
3029 (BISON_PREREQ_STAGE): Remove.
3030 (AM_GNU_GETTEXT): Use external gettext.
3031 (AC_OUTPUT): Remove intl/Makefile.
3032
3033 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3034
3035 * data/glr.c: Include string.h, for strlen.
3036 (yyreportParseError): Use size_t for yysize.
3037 (yy_yypstack): No longer nested inside yypstates, as nested
3038 functions are not portable. Do not assume size_t is the
3039 same width as int.
3040 (yypstates): Do not assume that ptrdiff_t is the same width
3041 as int, and similarly for yyposn and YYINDEX.
3042
3043 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3044
3045 * lib/Makefile.am (INCLUDES): Do not include from the intl
3046 directory, which has been removed.
3047 * src/Makefile.am (INCLUDES): Likewise.
3048
3049 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3050 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3051 New vars.
3052
3053 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3054 * tests/Makefile.am (EXTRA_DIST): Likewise.
3055
3056 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3057 Do not assume that bitset_windex is the same width as unsigned.
3058
3059 * lib/abitset.c (abitset_unused_clear): Do not assume that
3060 bitset_word is the same width as int.
3061 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3062 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3063 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3064 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3065 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3066
3067 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3068 portability to one's complement hosts!).
3069 * lib/ebitset.c (ebitset_op1): Likewise.
3070 * lib/lbitset.c (lbitset_op1): Likewise.
3071
3072 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3073 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3074 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3075 Sync with fileutils.
3076 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3077 lib/gettext.h: Sync with diffutils.
3078
3079 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3080 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3081
3082 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3083 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3084 check for void *.
3085
3086 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3087 size_t; the old version tried to do this but casted improperly.
3088 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3089 (bitset_test): Now returns int, not unsigned long.
3090
3091 * lib/bitset_stats.c: Include "gettext.h".
3092 (_): New macro.
3093 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3094 name locals "index", as it generates unnecessary warnings on some
3095 hosts that have an "index" function.
3096
3097 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3098 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3099 they need translation.
3100 * src/LR0.c (state_list_append, new_itemsets, get_state,
3101 append_states, generate_states): Likewise.
3102 * src/assoc.c (assoc_to_string): Likewise.
3103 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3104 * src/gram.c (grammar_dump): Likewise.
3105 * src/injections.c (injections_compute): Likewise.
3106 * src/lalr.c (lookaheads_print): Likewise.
3107 * src/relation.c (relation_transpose): Likewise.
3108 * src/scan-gram.l: Likewise.
3109 * src/tables.c (table_grow, pack_vector): Likewise.
3110
3111 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3112 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3113 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3114 * m4/mbstate_t.m4: Sync with fileutils.
3115 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3116
3117 * po/LINGUAS: Add pt_BR.
3118 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3119 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3120 lib/timevar.c.
3121 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3122 manual recommends.
3123 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3124
3125 * src/complain.c (strerror_r): Remove decl; not needed.
3126 (strerror): Use same pattern as ../lib/error.c.
3127
3128 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3129
3130 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3131
3132 * src/main.c (main): Cast result of bindtextdomain and textdomain
3133 to void, to avoid a GCC warning when --disable-nls is in effect.
3134
3135 * src/scan-gram.l: Use strings rather than escapes when possible,
3136 to minimize the number of warnings from xgettext.
3137 (handle_action_dollar, handle_action_at): Don't use isdigit,
3138 as it mishandles negative chars and it may not work as expected
3139 outside the C locale.
3140
3141 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3142 this is a GCC extension and is not portable to other compilers.
3143
3144 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3145 Do not include <ctype.h>; no longer needed.
3146 Do not include <malloc.h>; no longer needed (and generates
3147 warnings on OpenBSD 3.0).
3148
3149 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3150 it's not portable.
3151
3152 * tests/regression.at: Do not use 'cc -c input.c -o input';
3153 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3154
3155 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3156 exit status as failure, not just exit status 1. Sun C exits
3157 with status 2 sometimes.
3158
3159 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3160 Use it for the two large tests.
3161
c8f002c7
AD
31622002-08-02 Akim Demaille <akim@epita.fr>
3163
3164 * src/conflicts.c (conflicts_output): Don't output rules never
3165 reduced here, since anyway that computation doesn't work.
3166 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3167 (rule_useless_p, rule_never_reduced_p): New.
3168 (grammar_rules_partial_print): Use a filter instead of a range.
3169 Display the title only if needed.
3170 (grammar_rules_print): Adjust.
3171 (grammar_rules_never_reduced_report): New.
3172 * src/tables.c (action_row): Move the computation of rules never
3173 reduced to...
3174 (token_actions): here.
3175 * src/main.c (main): Make the parser before making the report, so
3176 that rules never reduced are computed.
3177 Call grammar_rules_never_reduced_report.
3178 * src/print.c (print_results): Report rules never reduced.
3179 * tests/conflicts.at, tests/reduce.at: Adjust.
3180
cd08e51e
AD
31812002-08-01 Akim Demaille <akim@epita.fr>
3182
3183 Instead of attaching lookaheads and duplicating the rules being
3184 reduced by a state, attach the lookaheads to the reductions.
3185
3186 * src/state.h (state_t): Remove the `lookaheads',
3187 `lookaheads_rule' member.
3188 (reductions_t): Add a `lookaheads' member.
3189 Use a regular array for the `rules'.
3190 * src/state.c (reductions_new): Initialize the lookaheads member
3191 to 0.
3192 (state_rule_lookaheads_print): Adjust.
3193 * src/state.h, src/state.c (state_reductions_find): New.
3194 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3195 (count_rr_conflicts): Adjust.
3196 * src/lalr.c (LArule): Remove.
3197 (add_lookback_edge): Adjust.
3198 (state_lookaheads_count): New.
3199 (states_lookaheads_initialize): Merge into...
3200 (initialize_LA): this.
3201 (lalr_free): Adjust.
3202 * src/main.c (main): Don't free nullable and derives too early: it
3203 is used by --verbose.
3204 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3205
bb0027a9
AD
32062002-08-01 Akim Demaille <akim@epita.fr>
3207
3208 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3209 `rule_number_t**'.
3210 (set_derives, free_derives): Rename as...
3211 (derives_compute, derives_free): this.
3212 Adjust all dependencies.
3213 * src/nullable.c (set_nullable, free_nullable): Rename as...
3214 (nullable_compute, nullable_free): these.
3215 (rule_list_t): Store rule_t *, not rule_number_t.
3216 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3217 pointers, instead of their numbers.
3218 * src/main.c (main): Call nullable_free, and derives_free earlier,
3219 as they were lo longer used.
3220
3325ddc4
AD
32212002-08-01 Akim Demaille <akim@epita.fr>
3222
3223 * lib/timevar.c (get_time): Include children time.
3224 * src/lalr.h (LA, LArule): Don't export them: used with the
3225 state_t.
3226 * src/lalr.c (LA, LArule): Static.
3227 * src/lalr.h, src/lalr.c (lalr_free): New.
3228 * src/main.c (main): Call it.
3229 * src/tables.c (pack_vector): Check whether loc is >= to the
3230 table_size, not >.
3231 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3232 (tables_generate): do it, since that's also it which allocates
3233 them.
3234 Don't free LA and LArule, main does.
3235
c6f1a33c
AD
32362002-07-31 Akim Demaille <akim@epita.fr>
3237
3238 Separate parser tables computation and output.
3239
3240 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3241 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3242 (yydefgoto, yydefact, high): Move to...
3243 * src/tables.h, src/tables.c: here.
3244 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3245 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3246 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3247 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3248 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3249 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3250 (action_row, save_row, token_actions, save_column, default_goto)
3251 (goto_actions, sort_actions, matching_state, pack_vector)
3252 (table_ninf_remap, pack_table, prepare_actions): Move to...
3253 * src/tables.c: here.
3254 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3255 * src/output.c (token_actions, output_base, output_conflicts)
3256 (output_check): Merge into...
3257 (prepare_actions): this.
3258 (actions_output): Rename as...
3259 (user_actions_output): this.
3260 * src/main.c (main): Call tables_generate and tables_free.
3261
1509d42f
AD
32622002-07-31 Akim Demaille <akim@epita.fr>
3263
3264 Steal GCC's --time-report support.
3265
3266 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3267 stolen/adjusted from GCC.
3268 * m4/stage.m4: Remove time related checks.
3269 * m4/timevar.m4: New.
3270 * configure.in: Adjust.
3271 * src/system.h: Adjust to using timevar.h.
3272 * src/getargs.h, src/getargs.c: Support trace_time for
3273 --trace=time.
3274 * src/main.c (stage): Remove.
3275 (main): Replace `stage' invocations with timevar calls.
3276 * src/output.c: Insert pertinent timevar calls.
3277
273a74fa
AD
32782002-07-31 Akim Demaille <akim@epita.fr>
3279
3280 Let --trace have arguments.
3281
3282 * src/getargs.h (enum trace_e): New.
3283 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3284 (long_options, short_options): --trace/-T takes an optional
3285 argument.
3286 Change all the uses of trace_flag to reflect the new flags.
3287 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3288
3289 Strengthen `stage' portability.
3290
3291 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3292 * configure.in: Use it.
3293 Don't check for malloc.h and sys/times.h.
3294 * src/system.h: Include them when appropriate.
3295 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3296 times and struct tms are available.
3297
217598da
AD
32982002-07-30 Akim Demaille <akim@epita.fr>
3299
3300 In verbose parse error message, don't report `error' as an
3301 expected token.
3302 * tests/actions.at (Printers and Destructors): Adjust.
3303 * tests/calc.at (Calculator $1): Adjust.
3304 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3305 error message, do not report the parser accepts the error token in
3306 that state.
3307
52489d44
AD
33082002-07-30 Akim Demaille <akim@epita.fr>
3309
3310 Normalize conflict related messages.
3311
3312 * src/complain.h, src/complain.c (warn, complain): New.
3313 * src/conflicts.c (conflicts_print): Use them.
3314 (conflict_report_yacc): New, extracted from...
3315 (conflicts_print): here.
3316 * tests/conflicts.at, tests/existing.at: Adjust.
3317
e8832397
AD
33182002-07-30 Akim Demaille <akim@epita.fr>
3319
3320 Report rules which are never reduced by the parser: those hidden
3321 by conflicts.
3322
3323 * src/LR0.c (save_reductions): Don't make the final state too
3324 different: save its reduction (accept) instead of having a state
3325 without any action (no shift or goto, no reduce).
3326 Note: the final state is now a ``regular'' state, i.e., the
3327 parsers now contain `reduce 0' as default reduction.
3328 Nevertheless, since they decide to `accept' when yystate =
3329 final_state, they still will not reduce rule 0.
3330 * src/print.c (print_actions, print_reduction): Adjust.
3331 * src/output.c (action_row): Track reduced rules.
3332 (token_actions): Report rules never reduced.
3333 * tests/conflicts.at, tests/regression.at: Adjust.
3334
caf23d24
AD
33352002-07-30 Akim Demaille <akim@epita.fr>
3336
3337 `stage' was accidently included in a previous patch.
3338 Initiate its autoconfiscation.
3339
3340 * configure.in: Look for malloc.h and sys/times.h.
3341 * src/main.c (stage): Adjust.
3342 Report only when trace_flag.
3343
640748ee
AD
33442002-07-29 Akim Demaille <akim@epita.fr>
3345
3346 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3347 state_number_t.
3348 (errs_t): symbol_t*, not symbol_number_t.
3349 (reductions_t): rule_t*, not rule_number_t.
3350 (FOR_EACH_SHIFT): New.
3351 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3352 * src/print.c, src/print_graph.c: Adjust.
3353
88bce5a2
AD
33542002-07-29 Akim Demaille <akim@epita.fr>
3355
3356 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3357
3358 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3359 (endtoken, accept): these.
3360 * src/reader.c (reader): Set endtoken's default tag to "$end".
3361 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3362 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3363 Adjust.
3364
1bfb97db
AD
33652002-07-29 Akim Demaille <akim@epita.fr>
3366
3367 * src/reduce.c (reduce_grammar): When the language is empty,
3368 complain about the start symbol, not the axiom.
3369 Use its location.
3370 * tests/reduce.at (Empty Language): New.
3371
fc5734fe
AD
33722002-07-26 Akim Demaille <akim@epita.fr>
3373
3374 * src/reader.h, src/reader.c (gram_error): ... can't get
3375 yycontrol without making too strong assumptions on the parser
3376 itself.
3377 * src/output.c (prepare_tokens): Use the real 0th value of
3378 token_translations instead of `0'.
3379 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3380 visible here.
3381 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3382 for the time being: %locations ought to provide it to yyerror.
3383
3650b4b8
AD
33842002-07-25 Akim Demaille <akim@epita.fr>
3385
3386 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3387 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3388 * tests/regression.at (Web2c Actions): Adjust.
3389
4b3d3a8e
AD
33902002-07-25 Akim Demaille <akim@epita.fr>
3391
3392 Stop storing rules from 1 to nrules + 1.
3393
3394 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3395 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3396 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3397 Iterate from 0 to nrules.
3398 Use rule_number_as_item_number and item_number_as_rule_number.
3399 Adjust to `derive' now containing possibly 0.
3400 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3401 Handle the `- 1' part in rule numbers from/to item numbers.
3402 * src/conflicts.c (log_resolution): Fix the message which reversed
3403 shift and reduce.
3404 * src/output.c (action_row): Initialize default_rule to -1.
3405 (token_actions): Adjust.
3406 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3407 expected output.
3408 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3409
4a2a22f4
AD
34102002-07-25 Akim Demaille <akim@epita.fr>
3411
3412 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3413 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3414 (b4_c_knr_arg_decl): New.
3415 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3416 yyreport_parse_error.
3417
b8df3223
AD
34182002-07-25 Akim Demaille <akim@epita.fr>
3419
3420 * data/yacc.c (yyreport_parse_error): New, extracted from...
3421 (yyparse): here.
3422 (yydestruct, yysymprint): Move above yyparse.
3423 Be K&R compliant.
3424
a762e609
AD
34252002-07-25 Akim Demaille <akim@epita.fr>
3426
3427 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3428 replace...
3429 (b4_sint_type, b4_uint_type): these.
3430 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3431 * tests/regression.at (Web2c Actions): Adjust.
3432
12b0043a
AD
34332002-07-25 Akim Demaille <akim@epita.fr>
3434
3435 * src/gram.h (TIEM_NUMBER_MAX): New.
3436 (item_number_of_rule_number, rule_number_of_item_number): Rename
3437 as...
3438 (rule_number_as_item_number, item_number_as_rule_number): these.
3439 Adjust dependencies.
3440 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3441 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3442 (symbol_number_to_vector_number): New.
3443 (order): Of vector_number_t* type.
3444 (base_t, BASE_MAX, BASE_MIN): New.
3445 (froms, tos, width, pos, check): Of base_t type.
3446 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3447 (actrow): Of action_number_t type.
3448 (conflrow): Of unsigned int type.
3449 (table_ninf, base_ninf): New.
3450 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3451 (muscle_insert_int_table, muscle_insert_base_table)
3452 (muscle_insert_rule_number_table): New.
3453 (prepare_tokens): Output `toknum' as int_table.
3454 (action_row): Returns a rule_number_t.
3455 Use ACTION_MIN, not SHRT_MIN.
3456 (token_actions): yydefact is rule_number_t*.
3457 (table_ninf_remap): New.
3458 (pack_table): Use it for `base' and `table'.
3459 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3460 replaced with...
3461 (YYPACT_NINF, YYTABLE_NINF): these.
3462 (yypact, yytable): Compute their types instead of hard-coded
3463 `short'.
3464 * tests/regression.at (Web2c Actions): Adjust.
3465
5dde258a
AD
34662002-07-19 Akim Demaille <akim@epita.fr>
3467
3468 * src/scan-gram.l (id): Can start with an underscore.
3469
a945ec39
AD
34702002-07-16 Akim Demaille <akim@epita.fr>
3471
3472 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3473 Adjust all former `associativity' dependencies.
3474 * src/symtab.c (symbol_new): Default associativity is `undef', not
3475 `right'.
3476 (symbol_check_alias_consistence): Adjust.
3477
fae437e8
AD
34782002-07-09 Akim Demaille <akim@epita.fr>
3479
3480 * doc/bison.texinfo: Properly set the ``header'' part.
3481 Use @dircategory ``GNU programming tools'' as per Texinfo's
3482 documentation.
3483 Use @copying.
3484
1a715ef2
AD
34852002-07-09 Akim Demaille <akim@epita.fr>
3486
3487 * lib/quotearg.h: Protect against multiple inclusions.
3488 * src/location.h (location_t): Add a `file' member.
3489 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3490 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3491 `error_one_per_line' support.
3492
a5d50994
AD
34932002-07-09 Akim Demaille <akim@epita.fr>
3494
3495 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3496 * src/reader.c (lineno): Remove.
3497 Adjust all dependencies.
3498 (get_merge_function): Take a location and use complain_at.
3499 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3500 * tests/regression.at (Invalid inputs, Mixing %token styles):
3501 Adjust.
3502
b275314e
AD
35032002-07-09 Akim Demaille <akim@epita.fr>
3504
3505 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3506 recovery rule, and forbid extensions when --yacc.
3507 (gram_error): Use complain_at.
3508 * src/reader.c (reader): Exit if there were parse errors.
3509
865b9df1
AD
35102002-07-09 Akim Demaille <akim@epita.fr>
3511
3512 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3513 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3514 Reported by R Blake <blakers@mac.com>.
3515
c76e14da
AD
35162002-07-09 Akim Demaille <akim@epita.fr>
3517
3518 * data/yacc.c: Output the copyright notive in the header.
3519
7db2ed2d
AD
35202002-07-03 Akim Demaille <akim@epita.fr>
3521
3522 * src/output.c (froms, tos): Are state_number_t.
3523 (save_column): sp, sp1, and sp2 are state_number_t.
3524 (prepare): Rename `final' as `final_state_number', `nnts' as
3525 `nterms_number', `nrules' as `rules_number', `nstates' as
3526 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3527 unused.
3528 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3529 * data/lalr1.cc (nsym_): Remove, unused.
3530
e68e0410
AD
35312002-07-03 Akim Demaille <akim@epita.fr>
3532
3533 * src/lalr.h, src/lalr.c (goto_number_t): New.
3534 * src/lalr.c (goto_list_t): New.
3535 Propagate them.
3536 * src/nullable.c (rule_list_t): New.
3537 Propagate.
3538 * src/types.h: Remove.
3539
e1a4f3a4
AD
35402002-07-03 Akim Demaille <akim@epita.fr>
3541
3542 * src/closure.c (print_fderives): Use rule_rhs_print.
3543 * src/derives.c (print_derives): Use rule_rhs_print.
3544 (rule_list_t): New, replaces `shorts'.
3545 (set_derives): Add comments.
3546 * tests/sets.at (Nullable, Firsts): Adjust.
3547
536545f3
AD
35482002-07-03 Akim Demaille <akim@epita.fr>
3549
3550 * src/output.c (prepare_actions): Free `tally' and `width'.
3551 (prepare_actions): Allocate and free `order'.
3552 * src/symtab.c (symbols_free): Free `symbols'.
3553 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3554 * src/output.c (m4_invoke): Move to...
3555 * src/scan-skel.l: here.
3556 (<<EOF>>): Close yyout, and free its name.
3557
8b752b00
AD
35582002-07-03 Akim Demaille <akim@epita.fr>
3559
3560 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3561
3562 * src/LR0.c (new_state): Merge into...
3563 (state_list_append): this.
3564 (new_states): Merge into...
3565 (generate_states): here.
3566 (set_states): Don't ensure a proper `errs' state member here, do it...
3567 * src/conflicts.c (conflicts_solve): here.
3568 * src/state.h, src/state.c: Comment changes.
3569 (state_t): Rename member `shifts' as `transitions'.
3570 Adjust all dependencies.
3571 (errs_new): For consistency, also take the values as argument.
3572 (errs_dup): Remove.
3573 (state_errs_set): New.
3574 (state_reductions_set, state_transitions_set): Assert that no
3575 previous value was assigned.
3576 (state_free): New.
3577 (states_free): Use it.
3578 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3579 temporary storage: use `errs' and `nerrs' as elsewhere.
3580 (set_conflicts): Allocate and free this `errs'.
3581
613f5e1a
AD
35822002-07-02 Akim Demaille <akim@epita.fr>
3583
3584 * lib/libiberty.h: New.
3585 * lib: Update the bitset implementation from upstream.
3586 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3587 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3588 * src/main.c: Adjust bitset stats calls.
3589
26e0cadc
PE
35902002-07-01 Paul Eggert <eggert@twinsun.com>
3591
3592 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3593 char, so that negative chars don't collide with $.
3594
1154cced
AD
35952002-06-30 Akim Demaille <akim@epita.fr>
3596
3597 Have the GLR tests be `warning' checked, and fix the warnings.
3598
3599 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3600 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3601 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3602 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3603 (yyaddDeferredAction): static.
3604 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3605 (yyreportParseError): yyprefix is const.
3606 yytokenp is used only when verbose.
3607 (yy__GNUC__): Replace with __GNUC__.
3608 (yypdumpstack): yyi is size_t.
3609 (yypreference): Un-yy local variables and arguments, to avoid
3610 clashes with `yyr1'. Anyway, we are not in the user name space.
3611 (yytname_size): be an int, as is compared with ints.
3612 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3613 Use them.
3614 * tests/cxx-gram.at: Use quotation to protect $1.
3615 Use AT_COMPILE to enable warnings hunts.
3616 Prototype yylex and yyerror.
3617 `Use' argc.
3618 Include `string.h', not `strings.h'.
3619 Produce and prototype stmtMerge only when used.
3620 yylex takes a location.
3621
97650f4e
AD
36222002-06-30 Akim Demaille <akim@epita.fr>
3623
3624 We spend a lot of time in quotearg, in particular when --verbose.
3625
3626 * src/symtab.c (symbol_get): Store a quoted version of the key.
3627 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3628 Adjust all callers.
3629
d2576365
AD
36302002-06-30 Akim Demaille <akim@epita.fr>
3631
3632 * src/state.h (reductions_t): Rename member `nreds' as num.
3633 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3634 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3635
ccaf65bc
AD
36362002-06-30 Akim Demaille <akim@epita.fr>
3637
3638 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3639 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3640 (shifts_to): Rename as...
3641 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3642 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3643 (TRANSITION_IS_DISABLED, transitions_to): these.
3644
87675353
AD
36452002-06-30 Akim Demaille <akim@epita.fr>
3646
3647 * src/print.c (print_shifts, print_gotos): Merge into...
3648 (print_transitions): this.
3649 (print_transitions, print_errs, print_reductions): Align the
3650 lookaheads columns.
3651 (print_core, print_transitions, print_errs, print_state,
3652 print_grammar): Output empty lines separator before, not after.
3653 (state_default_rule_compute): Rename as...
3654 (state_default_rule): this.
3655 * tests/conflicts.at (Defaulted Conflicted Reduction),
3656 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3657 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3658
ce4ccb4b
AD
36592002-06-30 Akim Demaille <akim@epita.fr>
3660
3661 Display items as we display rules.
3662
3663 * src/gram.h, src/gram.c (rule_lhs_print): New.
3664 * src/gram.c (grammar_rules_partial_print): Use it.
3665 * src/print.c (print_core): Likewise.
3666 * tests/conflicts.at (Defaulted Conflicted Reduction),
3667 (Unresolved SR Conflicts): Adjust.
3668 (Unresolved SR Conflicts): Adjust and rename as...
3669 (Resolved SR Conflicts): this, as was meant.
3670 * tests/regression.at (Web2c Report): Adjust.
3671
bc933ef1
AD
36722002-06-30 Akim Demaille <akim@epita.fr>
3673
3674 * src/print.c (state_default_rule_compute): New, extracted from...
3675 (print_reductions): here.
3676 Pessimize, but clarify the code.
3677 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3678
53d4308d
AD
36792002-06-30 Akim Demaille <akim@epita.fr>
3680
3681 * src/output.c (action_row): Let default_rule be always a rule
3682 number.
3683
574fb2d5
AD
36842002-06-30 Akim Demaille <akim@epita.fr>
3685
3686 * src/closure.c (print_firsts, print_fderives, closure):
3687 Use BITSET_EXECUTE.
3688 * src/lalr.c (lookaheads_print): Likewise.
3689 * src/state.c (state_rule_lookaheads_print): Likewise.
3690 * src/print_graph.c (print_core): Likewise.
3691 * src/print.c (print_reductions): Likewise.
3692 * src/output.c (action_row): Likewise.
3693 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3694
05811fd7
AD
36952002-06-30 Akim Demaille <akim@epita.fr>
3696
3697 * src/print_graph.c: Use report_flag.
3698
0e4d5753
AD
36992002-06-30 Akim Demaille <akim@epita.fr>
3700
3701 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3702 to...
3703 * src/relation.h, src/relation.c (traverse, relation_digraph)
3704 (relation_print, relation_transpose): New.
3705
24c7d800
AD
37062002-06-30 Akim Demaille <akim@epita.fr>
3707
3708 * src/state.h, src/state.c (shifts_to): New.
3709 * src/lalr.c (build_relations): Use it.
3710
9222837b
AD
37112002-06-30 Akim Demaille <akim@epita.fr>
3712
3713 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3714 (item_number_of_rule_number, rule_number_of_item_number): New.
3715 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3716 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3717 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3718 Propagate their use.
3719 Much remains to be done, in particular wrt `shorts' from types.h.
3720
260008e5
AD
37212002-06-30 Akim Demaille <akim@epita.fr>
3722
3723 * src/symtab.c (symbol_new): Initialize the `printer' member.
3724
8a731ca8
AD
37252002-06-30 Akim Demaille <akim@epita.fr>
3726
3727 * src/LR0.c (save_reductions): Remove, replaced by...
3728 * src/state.h, src/state.c (state_reductions_set): New.
3729 (reductions, errs): Rename as...
3730 (reductions_t, errs_t): these.
3731 Adjust all dependencies.
3732
32e1e0a4
AD
37332002-06-30 Akim Demaille <akim@epita.fr>
3734
3735 * src/LR0.c (state_list_t, state_list_append): New.
3736 (first_state, last_state): Now symbol_list_t.
3737 (this_state): Remove.
3738 (new_itemsets, append_states, save_reductions): Take a state_t as
3739 argument.
3740 (set_states, generate_states): Adjust.
3741 (save_shifts): Remove, replaced by...
3742 * src/state.h, src/state.c (state_shifts_set): New.
3743 (shifts): Rename as...
3744 (shifts_t): this.
3745 Adjust all dependencies.
3746 * src/state.h (state_t): Remove the `next' member.
3747
e5fb6710
AD
37482002-06-30 Akim Demaille <akim@epita.fr>
3749
3750 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3751 escaped in slot 0.
3752
c7ca99d4
AD
37532002-06-30 Akim Demaille <akim@epita.fr>
3754
3755 Use hash.h for the state hash table.
3756
3757 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3758 (allocate_storage): Use state_hash_new.
3759 (free_storage): Use state_hash_free.
3760 (new_state, get_state): Adjust.
3761 * src/lalr.h, src/lalr.c (states): Move to...
3762 * src/states.h (state_t): Remove the `link' member, no longer
3763 used.
3764 * src/states.h, src/states.c: here.
3765 (state_hash_new, state_hash_free, state_hash_lookup)
3766 (state_hash_insert, states_free): New.
3767 * src/states.c (state_table, state_compare, state_hash): New.
3768 * src/output.c (output_actions): Do not free states now, since we
3769 still need to know the final_state number in `prepare', called
3770 afterwards. Do it...
3771 * src/main.c (main): here: call states_free after `output'.
3772
df0e7316
AD
37732002-06-30 Akim Demaille <akim@epita.fr>
3774
3775 * src/state.h, src/state.c (state_new): New, extracted from...
3776 * src/LR0.c (new_state): here.
3777 * src/state.h (STATE_ALLOC): Move to...
3778 * src/state.c: here.
3779 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3780 * src/state.h, src/state.c: here.
3781
39f41916
AD
37822002-06-30 Akim Demaille <akim@epita.fr>
3783
3784 * src/reader.c (gensym): Rename as...
3785 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3786 (getsym): Rename as...
3787 (symbol_get): this.
3788
d57650a5
AD
37892002-06-30 Akim Demaille <akim@epita.fr>
3790
3791 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3792 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3793 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3794 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3795
5a08f1ce
AD
37962002-06-30 Akim Demaille <akim@epita.fr>
3797
3798 Make the test suite pass with warnings checked.
3799
3800 * tests/actions.at (Printers and Destructors): Improve.
3801 Avoid unsigned vs. signed issues.
3802 * tests/calc.at: Don't exercise the scanner here, do it...
3803 * tests/input.at (Torturing the Scanner): here.
3804
720623af
PH
38052002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3806
88e7e941 3807 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
3808 reorganize first lines parallel to yacc.c.
3809
fb8135fa
AD
38102002-06-28 Akim Demaille <akim@epita.fr>
3811
3812 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3813 (b4_token_enum, b4_token_defines): New, factored from...
3814 * data/lalr1.cc, data/yacc.c, glr.c: here.
3815
41442480
AD
38162002-06-28 Akim Demaille <akim@epita.fr>
3817
3818 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3819 unused variables.
3820 * src/output.c (merger_output): static.
3821
e0e5bf84
AD
38222002-06-28 Akim Demaille <akim@epita.fr>
3823
3824 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3825 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3826 pacify GCC.
3827 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 3828
676385e2
PH
38292002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3830
3831 Accumulated changelog for new GLR parsing features.
3832
6a254321 3833 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
3834 conflicts_total_count.
3835 * src/conflicts.h: Ditto.
3836 * src/output.c (token_actions): Use the new name.
3837 (output_conflicts): Change conflp => conflict_list_heads, and
3838 confl => conflict_list for better readability.
3839 * data/glr.c: Use the new names.
3840 * NEWS: Add self to GLR announcement.
e0e5bf84 3841
676385e2
PH
3842 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3843
3844 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3845 Akim Demaille.
3846
3847 * data/bison.glr: Change name to glr.c
3848 * data/glr.c: Renamed from bison.glr.
3849 * data/Makefile.am: Add glr.c
e0e5bf84
AD
3850
3851 * src/getargs.c:
3852
676385e2
PH
3853 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3854 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 3855
676385e2
PH
3856 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3857
3858 * data/bison.glr: Be sure to restore the
3859 current #line when returning to the skeleton contents after having
3860 exposed the input file's #line.
3861
3862 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3863
3864 * data/bison.glr: Bring up to date with changes to bison.simple.
3865
3866 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3867
3868 * data/bison.glr: Correct definitions that use b4_prefix.
3869 Various reformatting.
3870 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3871 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3872 yytokenp argument; now part of stack.
3873 (yychar): Define to behave as documented.
3874 (yyclearin): Ditto.
e0e5bf84 3875
676385e2
PH
3876 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3877
3878 * src/reader.h: Add declaration for free_merger_functions.
3879
3880 * src/reader.c (merge_functions): New variable.
3881 (get_merge_function): New function.
3882 (free_merger_functions): New function.
3883 (readgram): Check for %prec that is not followed by a symbol.
3884 Handle %dprec and %merge declarations.
3885 (packgram): Initialize dprec and merger fields in rules array.
3886
3887 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3888 conflict_list_cnt, conflict_list_free): New variables.
3889 (table_grow): Also grow conflict_table.
e0e5bf84 3890 (prepare_rules): Output dprec and merger tables.
676385e2 3891 (conflict_row): New function.
e0e5bf84 3892 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
3893 default reduction in conflicted states for GLR parser so that there
3894 are spaces for the conflict lists.
3895 (save_row): Also save conflict information.
3896 (token_actions): Allocate conflict list.
3897 (merger_output): New function.
3898 (pack_vector): Pack conflict table, too.
3899 (output_conflicts): New function to output yyconflp and yyconfl.
3900 (output_check): Allocate conflict_tos.
3901 (output_actions): Output conflict tables, also.
3902 (output_skeleton): Output b4_mergers definition.
3903 (prepare): Output b4_max_rhs_length definition.
3904 Use 'bison.glr' as default skeleton for GLR parsers.
3905
3906 * src/gram.c (glr_parser): New flag.
3907 (grammar_free): Call free_merger_functions.
3908
3909 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3910 all pairs of conflicting reductions, rather than just all tokens
3911 causing conflicts. Needed to size conflict tables.
e0e5bf84 3912 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
3913 interface.
3914 (conflicts_print): Ditto.
3915 (count_total_conflicts): New function.
3916
3917 * src/reader.h (merger_list): New type.
3918 (merge_functions): New variable.
3919
3920 * src/lex.h (tok_dprec, tok_merge): New token types.
3921
3922 * src/gram.h (rule_s): Add dprec and merger fields.
3923 (glr_parser): New flag.
3924
3925 * src/conflicts.h (count_total_conflicts): New function.
3926
3927 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3928
3929 * doc/bison.texinfo (Generalized LR Parsing): New section.
3930 (GLR Parsers): New section.
3931 (Language and Grammar): Mention GLR parsing.
3932 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3933 Correct typo ("tge" -> "the").
3934
3935 * data/bison.glr: New skeleton for GLR parsing.
3936
3937 * tests/cxx-gram.at: New tests for GLR parsing.
3938
3939 * tests/testsuite.at: Include cxx-gram.at.
3940
3941 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 3942
676385e2
PH
3943 * src/parse-gram.y:
3944
3945 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3946
3947 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 3948
b5480d74 39492002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
3950
3951 * src/options.h, src/options.c: Remove.
3952 * src/getargs.c (short_options, long_options): New.
3953
60491a94
AD
39542002-06-27 Akim Demaille <akim@epita.fr>
3955
3956 * data/bison.simple, data/bison.c++: Rename as...
3957 * data/yacc.c, data/lalr1.cc: these.
3958 * doc/bison.texinfo (Environment Variables): Remove.
3959
9be0c25b
AD
39602002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3961
3962 * src/getargs.c (report_argmatch): Initialize strtok().
3963
1ae72863
AD
39642002-06-20 Akim Demaille <akim@epita.fr>
3965
3966 * data/bison.simple (b4_symbol_actions): New, replaces...
3967 (b4_symbol_destructor, b4_symbol_printer): these.
3968 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3969 user token numbers.
3970
87542d29
AD
39712002-06-20 Akim Demaille <akim@epita.fr>
3972
3973 * data/bison.simple (yydestructor): Rename as...
3974 (yydestruct): this.
3975
1a31ed21
AD
39762002-06-20 Akim Demaille <akim@epita.fr>
3977
3978 * src/symtab.h, src/symtab.c (symbol_type_set)
3979 (symbol_destructor_set, symbol_precedence_set): The location is
3980 the last argument.
3981 Adjust all callers.
3982
e776192e
AD
39832002-06-20 Akim Demaille <akim@epita.fr>
3984
3985 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3986 internals.
3987 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3988 Takes a location.
3989 * src/symtab.h, src/symtab.c (symbol_class_set)
3990 (symbol_user_token_number_set): Likewise.
3991 Adjust all callers.
3992 Promote complain_at.
3993 * tests/input.at (Type Clashes): Adjust.
3994
5c1180b3
AD
39952002-06-20 Akim Demaille <akim@epita.fr>
3996
3997 * data/bison.simple (YYLEX): Fix the declaration when
3998 %pure-parser.
3999
e3170060
AD
40002002-06-20 Akim Demaille <akim@epita.fr>
4001
4002 * data/bison.simple (yysymprint): Don't print the token number,
4003 just its name.
4004 * tests/actions.at (Destructors): Rename as...
4005 (Printers and Destructors): this.
4006 Also exercise %printer.
4007
253862fd
AD
40082002-06-20 Akim Demaille <akim@epita.fr>
4009
4010 * data/bison.simple (YYDSYMPRINT): New.
4011 Use it to remove many of the #if YYDEBUG/if (yydebug).
4012
366eea36
AD
40132002-06-20 Akim Demaille <akim@epita.fr>
4014
4015 * src/symtab.h, src/symtab.c (symbol_t): printer and
4016 printer_location are new members.
4017 (symbol_printer_set): New.
4018 * src/parse-gram.y (PERCENT_PRINTER): New token.
4019 Handle its associated rule.
4020 * src/scan-gram.l: Adjust.
4021 (handle_destructor_at, handle_destructor_dollar): Rename as...
4022 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4023 * src/output.c (symbol_printers_output): New.
4024 (output_skeleton): Call it.
4025 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4026 since there are already many grammar files with a user `yyprint'.
4027 Replace the calls to YYPRINT to calls to yysymprint.
4028 * tests/calc.at: Adjust.
4029 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4030 taking advantage of parser very internal details (stack size!).
4031
4f25ebb0
AD
40322002-06-20 Akim Demaille <akim@epita.fr>
4033
4034 * src/scan-gram.l: Complete the scanner with the missing patterns
4035 to pacify Flex.
4036 Use `quote' and `symbol_tag_get' where appropriate.
4037
93b68a0e
AD
40382002-06-19 Akim Demaille <akim@epita.fr>
4039
4040 * tests/actions.at (Destructors): Augment to test locations.
4041 * data/bison.simple (yydestructor): Pass it the current location
4042 if locations are enabled.
4043 Prototype only when __STDC__ or C++.
4044 Change the argument names to move into the yy name space: there is
4045 user code here.
4046
58612f1d
AD
40472002-06-19 Akim Demaille <akim@epita.fr>
4048
74310291
AD
4049 * data/bison.simple (b4_pure_if): New.
4050 Use it instead of #ifdef YYPURE.
4051
40522002-06-19 Akim Demaille <akim@epita.fr>
4053
4054 * data/bison.simple (b4_location_if): New.
58612f1d
AD
4055 Use it instead of #ifdef YYLSP_NEEDED.
4056
f25bfb75
AD
40572002-06-19 Akim Demaille <akim@epita.fr>
4058
4059 Prepare @$ in %destructor, but currently don't bind it in the
4060 skeleton, as %location use is not cleaned up yet.
4061
4062 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4063 (handle_action_at): New.
4064 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4065 a braced_code_t and a location as additional arguments.
4066 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4067 unquote one when outputting `b4_dollar_dollar'.
4068 Adjust callers.
4069 * data/bison.simple (b4_eval): Remove.
4070 (b4_symbol_destructor): Adjust.
4071 * tests/input.at (Invalid @n): Adjust.
4072
c732d2c6
AD
40732002-06-19 Zack Weinberg <zack@codesourcery.com>
4074
4075 * doc/bison.texinfo: Document ability to have multiple
4076 prologue sections.
4077
8c165d89
AD
40782002-06-18 Akim Demaille <akim@epita.fr>
4079
4080 * src/files.c (compute_base_names): When computing the output file
4081 names from the input file name, strip the directory part.
4082
ca98bf57
AD
40832002-06-18 Akim Demaille <akim@epita.fr>
4084
4085 * data/bison.simple.new: Comment changes.
4086 Reported by Andreas Schwab.
4087
0bfb02ff
AD
40882002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4089
4090 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4091 there are no `label `yyoverflowlab' defined but not used' warnings
4092 when yyoverflow is defined.
4093
24c0aad7
AD
40942002-06-18 Akim Demaille <akim@epita.fr>
4095
4096 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4097 new member.
4098 (symbol_destructor_set): Adjust.
4099 * src/output.c (symbol_destructors_output): Output the destructor
4100 locations.
4101 Output the symbol name.
4102 * data/bison.simple (b4_symbol_destructor): Adjust.
4103
5719c109
AD
41042002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4105 and Akim Demaille <akim@epita.fr>
4106
4107 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4108 what's left on the stack when the error recovery hits EOF.
4109 * tests/actions.at (Destructors): Complete to exercise this case.
4110
9280d3ef
AD
41112002-06-17 Akim Demaille <akim@epita.fr>
4112
4113 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4114 arguments is really empty, not only equal to `[]'.
4115 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4116 member.
4117 (symbol_destructor_set): New.
4118 * src/output.c (symbol_destructors_output): New.
4119 * src/reader.h (brace_code_t, current_braced_code): New.
4120 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4121 (handle_dollar): Rename as...
4122 (handle_action_dollar): this.
4123 (handle_destructor_dollar): New.
4124 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4125 (grammar_declaration): Use it.
4126 * data/bison.simple (yystos): Is always defined.
4127 (yydestructor): New.
4128 * tests/actions.at (Destructors): New.
4129 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4130
dafdc66f
AD
41312002-06-17 Akim Demaille <akim@epita.fr>
4132
4133 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4134 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4135 rule_length only when needed.
4136 * src/output.c (actions_output, token_definitions_output): Output
4137 the full M4 block.
4138 * src/symtab.c: Don't access directly to the symbol tag, use
4139 symbol_tag_get.
4140 * src/parse-gram.y: Use symbol_list_free.
4141
56c47203
AD
41422002-06-17 Akim Demaille <akim@epita.fr>
4143
4144 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4145 (symbol_list_prepend, get_type_name): Move to...
4146 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4147 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4148 Adjust all callers.
4149 (symbol_list_free): New.
4150 * src/scan-gram.l (handle_dollar): Takes a location.
4151 * tests/input.at (Invalid $n): Adjust.
4152
1e0bab92
AD
41532002-06-17 Akim Demaille <akim@epita.fr>
4154
4155 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4156 (symbol_list_prepend): New.
4157 * src/parse-gram.y (%union): `list' is a new member.
4158 (symbols.1): New, replaces...
4159 (terms_to_prec.1, nterms_to_type.1): these.
4160 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4161 Take a location as additional argument.
4162 Adjust all callers.
4163
04e60654
AD
41642002-06-15 Akim Demaille <akim@epita.fr>
4165
4166 * src/parse-gram.y: Move %token in the declaration section so that
4167 we don't depend upon CVS Bison.
4168
10e5b8bd
AD
41692002-06-15 Akim Demaille <akim@epita.fr>
4170
4171 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4172 * src/print.c (print_core): Use it.
4173
9801d40c
AD
41742002-06-15 Akim Demaille <akim@epita.fr>
4175
4176 * src/conflicts.c (log_resolution): Accept the rule involved in
4177 the sr conflicts instead of the lookahead number that points to
4178 that rule.
4179 (flush_reduce): Accept the current lookahead vector as argument,
4180 instead of the index in LA.
4181 (resolve_sr_conflict): Accept the current number of lookahead
4182 bitset to consider for the STATE, instead of the index in LA.
4183 (set_conflicts): Adjust.
4184 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4185
c0263492
AD
41862002-06-15 Akim Demaille <akim@epita.fr>
4187
4188 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4189 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4190 Adjust all dependencies.
4191 * src/lalr.c (initialize_lookaheads): Split into...
4192 (states_lookaheads_count, states_lookaheads_initialize): these.
4193 (lalr): Adjust.
4194
9757c359
AD
41952002-06-15 Akim Demaille <akim@epita.fr>
4196
4197 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4198 out of...
4199 (grammar_rules_print): here.
4200 * src/reduce.c (reduce_output): Use it.
4201 * tests/reduce.at (Useless Rules, Reduced Automaton)
4202 (Underivable Rules): Adjust.
4203
6b98e4b5
AD
42042002-06-15 Akim Demaille <akim@epita.fr>
4205
4206 Copy BYacc's nice way to report the grammar.
4207
4208 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4209 New.
4210 Don't print the rules' location, it is confusing and useless.
4211 (rule_print): Use grammar_rhs_print.
4212 * src/print.c (print_grammar): Use grammar_rules_print.
4213
6b98e4b5
AD
42142002-06-15 Akim Demaille <akim@epita.fr>
4215
4216 Complete and rationalize `useless thing' warnings.
4217
4218 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4219 (symbol_tag_print): New.
4220 Use them everywhere in place of accessing directly the tag member.
4221 * src/gram.h, src/gram.c (rule_print): New.
4222 Use it where a rule used to be printed `by hand'.
4223 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4224 (reduce_grammar_tables): Report the useless rules.
4225 (reduce_print): Useless things are a warning, not an error.
4226 Report it as such.
4227 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4228 (Reduced Automaton, Underivable Rules): Adjust.
4229 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4230 * tests/conflicts.at (Unresolved SR Conflicts)
4231 (Solved SR Conflicts): Adjust.
4232
ee000ba4
AD
42332002-06-15 Akim Demaille <akim@epita.fr>
4234
4235 Let symbols have a location.
4236
4237 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4238 (getsym): Adjust.
4239 Adjust all callers.
4240 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4241 Use location_t, not int.
4242 * src/symtab.c (symbol_check_defined): Take advantage of the
4243 location.
4244 * tests/regression.at (Invalid inputs): Adjust.
4245
8efe435c
AD
42462002-06-15 Akim Demaille <akim@epita.fr>
4247
4248 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4249 (input): Don't try to initialize yylloc here, do it in the
4250 scanner.
4251 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4252 * src/gram.h (rule_t): Change line and action_line into location
4253 and action_location, of location_t type.
4254 Adjust all dependencies.
4255 * src/location.h, src/location.c (empty_location): New.
4256 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4257 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4258 (grammar_current_rule_symbol_append)
4259 (grammar_current_rule_action_append): Expect a location as argument.
4260 * src/reader.c (grammar_midrule_action): Adjust to attach an
4261 action's location as dummy symbol location.
4262 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4263 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4264 the line numbers.
4265
1921f1d7
AD
42662002-06-14 Akim Demaille <akim@epita.fr>
4267
4268 Grammar declarations may be found in the grammar section.
4269
4270 * src/parse-gram.y (rules_or_grammar_declaration): New.
4271 (declarations): Each declaration may end with a semicolon, not
4272 just...
4273 (grammar_declaration): `"%union"'.
4274 (grammar): Branch to rules_or_grammar_declaration.
4275
4515534c
AD
42762002-06-14 Akim Demaille <akim@epita.fr>
4277
4278 * src/main.c (main): Invoke scanner_free.
4279
f958596b
AD
42802002-06-14 Akim Demaille <akim@epita.fr>
4281
4282 * src/output.c (m4_invoke): Extracted from...
4283 (output_skeleton): here.
4284 Free tempfile.
4285
2c569025
AD
42862002-06-14 Akim Demaille <akim@epita.fr>
4287
4288 * src/parse-gram.y (directives, directive, gram)
4289 (grammar_directives, precedence_directives, precedence_directive):
4290 Rename as...
4291 (declarations, declaration, grammar, grammar_declaration)
4292 (precedence_declaration, precedence_declarator): these.
4293 (symbol_declaration): New.
4294
592e8d4d
AD
42952002-06-14 Akim Demaille <akim@epita.fr>
4296
4297 * src/files.c (action_obstack): Remove, unused.
4298 (output_obstack): Remove it, and all its dependencies, as it is no
4299 longer needed.
4300 * src/reader.c (epilogue_set): Build the epilogue in the
4301 muscle_obstack.
4302 * src/output.h, src/output.c (muscle_obstack): Move to...
4303 * src/muscle_tab.h, src/muscle_tab.h: here.
4304 (muscle_init): Initialize muscle_obstack.
4305 (muscle_free): New.
4306 * src/main.c (main): Call it.
4307
0c15323d
AD
43082002-06-14 Akim Demaille <akim@epita.fr>
4309
4310 * src/location.h: New, extracted from...
4311 * src/reader.h: here.
4312 * src/Makefile.am (noinst_HEADERS): Merge into
4313 (bison_SOURCES): this.
4314 Add location.h.
4315 * src/parse-gram.y: Use location_t instead of Bison's.
4316 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4317 Use location_t instead of ints.
4318
e96c9728
AD
43192002-06-14 Akim Demaille <akim@epita.fr>
4320
4321 * data/bison.simple, data/bison.c++: Be sure to restore the
4322 current #line when returning to the skeleton contents after having
4323 exposed the input file's #line.
4324
75d1fe16
AD
43252002-06-12 Akim Demaille <akim@epita.fr>
4326
4327 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4328 eager.
4329 * tests/actions.at (Exotic Dollars): New.
4330
6c35d22c
AD
43312002-06-12 Akim Demaille <akim@epita.fr>
4332
4333 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4334 ['"/] too eagerly.
4335 * tests/input.at (Torturing the Scanner): New.
4336
1d6412ad
AD
43372002-06-11 Akim Demaille <akim@epita.fr>
4338
4339 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4340 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4341 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4342 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4343 * src/reader.c (reader): Use it.
4344
4cdb01db
AD
43452002-06-11 Akim Demaille <akim@epita.fr>
4346
4347 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4348 Adjust all callers.
4349 (scanner_last_string_free): New.
4350
44995b2e
AD
43512002-06-11 Akim Demaille <akim@epita.fr>
4352
4353 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4354 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4355 (last_string, YY_OBS_FREE): New.
4356 Use them when returning an ID.
4357
e9955c83
AD
43582002-06-11 Akim Demaille <akim@epita.fr>
4359
4360 Have Bison grammars parsed by a Bison grammar.
4361
4362 * src/reader.c, src/reader.h (prologue_augment): New.
4363 * src/reader.c (copy_definition): Remove.
4364
4365 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4366 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4367 (grammar_current_rule_prec_set, grammar_current_rule_check)
4368 (grammar_current_rule_symbol_append)
4369 (grammar_current_rule_action_append): Export.
4370 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4371 (symbol_list_action_append): Remove.
4372 Hook the routines from reader.
4373 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4374 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4375
4376 * src/reader.c (read_declarations): Remove, unused.
4377
4378 * src/parse-gram.y: Handle the epilogue.
4379 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4380 (grammar_start_symbol_set): this.
4381 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4382 * src/reader.c (readgram): Remove, unused.
4383 (reader): Adjust to insert eoftoken and axiom where appropriate.
4384
4385 * src/reader.c (copy_dollar): Replace with...
4386 * src/scan-gram.h (handle_dollar): this.
4387 * src/parse-gram.y: Remove `%thong'.
4388
4389 * src/reader.c (copy_at): Replace with...
4390 * src/scan-gram.h (handle_at): this.
4391
4392 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4393 New.
4394
4395 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4396 time being.
4397
4398 * src/reader.h, src/reader.c (grammar_rule_end): New.
4399
4400 * src/parse.y (current_type, current_class): New.
4401 Implement `%nterm', `%token' support.
4402 Merge `%term' into `%token'.
4403 (string_as_id): New.
4404 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4405 type name.
4406
4407 * src/parse-gram.y: Be sure to handle properly the beginning of
4408 rules.
4409
4410 * src/parse-gram.y: Handle %type.
4411 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4412
4413 * src/parse-gram.y: More directives support.
4414 * src/options.c: No longer handle source directives.
4415
4416 * src/parse-gram.y: Fix %output.
4417
4418 * src/parse-gram.y: Handle %union.
4419 Use the prologue locations.
4420 * src/reader.c (parse_union_decl): Remove.
4421
4422 * src/reader.h, src/reader.c (epilogue_set): New.
4423 * src/parse-gram.y: Use it.
4424
4425 * data/bison.simple, data/bison.c++: b4_stype is now either not
4426 defined, then default to int, or to the contents of %union,
4427 without `union' itself.
4428 Adjust.
4429 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4430
4431 * src/output.c (actions_output): Don't output braces, as they are
4432 already handled by the scanner.
4433
4434 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4435 characters to themselves.
4436
4437 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4438 that the epilogue has a proper #line.
4439
4440 * src/parse-gram.y: Handle precedence/associativity.
4441
4442 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4443 a terminal.
4444 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4445 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4446 at all to define terminals that cannot be emitted.
4447
4448 * src/scan-gram.l: Escape M4 characters.
4449
4450 * src/scan-gram.l: Working properly with escapes in user
4451 strings/characters.
4452
4453 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4454 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4455 grammar.
4456 Use more modest sizes, as for the time being the parser does not
4457 release memory, and therefore the process swallows a huge amount
4458 of memory.
4459
4460 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4461 stricter %token grammar.
4462
4463 * src/symtab.h (associativity): Add `undef_assoc'.
4464 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4465 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4466
4467 * tests/regression.at (Invalid %directive): Remove, as it is now
4468 meaningless.
4469 (Invalid inputs): Adjust to the new error messages.
4470 (Token definitions): The new grammar doesn't allow too many
4471 eccentricities.
4472
4473 * src/lex.h, src/lex.c: Remove.
4474 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4475 (copy_character, copy_string2, copy_string, copy_identifier)
4476 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4477 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4478 (parse_action): Remove.
4479 * po/POTFILES.in: Adjust.
4480
2e047461
AD
44812002-06-11 Akim Demaille <akim@epita.fr>
4482
4483 * src/reader.c (parse_action): Don't store directly into the
4484 rule's action member: return the action as a string.
4485 Don't require `rule_length' as an argument: compute it.
4486 (grammar_current_rule_symbol_append)
4487 (grammar_current_rule_action_append): New, eved out from
4488 (readgram): here.
4489 Remove `action_flag', `rulelength', unused now.
4490
9af3fbce
AD
44912002-06-11 Akim Demaille <akim@epita.fr>
4492
4493 * src/reader.c (grammar_current_rule_prec_set).
4494 (grammar_current_rule_check): New, eved out from...
4495 (readgram): here.
4496 Remove `xaction', `first_rhs': useless.
4497 * tests/input.at (Type clashes): New.
4498 * tests/existing.at (GNU Cim Grammar): Adjust.
4499
1485e106
AD
45002002-06-11 Akim Demaille <akim@epita.fr>
4501
4502 * src/reader.c (grammar_midrule_action): New, Eved out from
4503 (readgram): here.
4504
da4160c3
AD
45052002-06-11 Akim Demaille <akim@epita.fr>
4506
4507 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4508 New.
4509 (readgram): Use them as replacement of inlined code, crule and
4510 crule1.
4511
f6d0f937
AD
45122002-06-11 Akim Demaille <akim@epita.fr>
4513
4514 * src/reader.c (grammar_end, grammar_symbol_append): New.
4515 (readgram): Use them.
4516 Make the use of `p' as local as possible.
4517
69078d4b
AD
45182002-06-10 Akim Demaille <akim@epita.fr>
4519
4520 GCJ's parser requires the tokens to be defined before the prologue.
4521
4522 * data/bison.simple: Output the token definition before the user's
4523 prologue.
4524 * tests/regression.at (Braces parsing, Duplicate string)
4525 (Mixing %token styles): Check the output from bison.
4526 (Early token definitions): New.
4527
5e424082
AD
45282002-06-10 Akim Demaille <akim@epita.fr>
4529
4530 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4531 assigning twice the same user number to a token, so that we can
4532 use it in...
4533 * src/lex.c (lex): here.
4534 Also use `symbol_class_set' instead of hand written code.
4535 * src/reader.c (parse_assoc_decl): Likewise.
4536
44536b35
AD
45372002-06-10 Akim Demaille <akim@epita.fr>
4538
4539 * src/symtab.c, src/symtab.c (symbol_class_set)
4540 (symbol_user_token_number_set): New.
4541 * src/reader.c (parse_token_decl): Use them.
4542 Use a switch instead of ifs.
4543 Use a single argument.
4544
8b9f2372
AD
45452002-06-10 Akim Demaille <akim@epita.fr>
4546
4547 Remove `%thong' support as it is undocumented, unused, duplicates
4548 `%token's job, and creates useless e-mail traffic with people who
4549 want to know what it is, why it is undocumented, unused, and
4550 duplicates `%token's job.
4551
4552 * src/reader.c (parse_thong_decl): Remove.
4553 * src/options.c (option_table): Remove "thong".
4554 * src/lex.h (tok_thong): Remove.
4555
3ae2b51f
AD
45562002-06-10 Akim Demaille <akim@epita.fr>
4557
4558 * src/symtab.c, src/symtab.c (symbol_type_set)
4559 (symbol_precedence_set): New.
4560 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4561 (value_components_used): Remove, unused.
4562
2f1afb73
AD
45632002-06-09 Akim Demaille <akim@epita.fr>
4564
4565 Move symbols handling code out of the reader.
4566
4567 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4568 (axiom): Move to...
4569 * src/symtab.h, src/symtab.c: here.
4570
4571 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4572 * src/reader.c (startval): Rename as...
4573 * src/symtab.h, src/symtab.c (startsymbol): this.
4574 * src/reader.c: Adjust.
4575
4576 * src/reader.c (symbol_check_defined, symbol_make_alias)
4577 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4578 (token_translations_init)
4579 Move to...
4580 * src/symtab.c: here.
4581 * src/reader.c (packsymbols): Move to...
4582 * src/symtab.h, src/symtab.c (symbols_pack): here.
4583 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4584 argument.
4585
e9bca3ad
AD
45862002-06-03 Akim Demaille <akim@epita.fr>
4587
4588 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4589 then statements.
4590
86eff183
AD
45912002-06-03 Akim Demaille <akim@epita.fr>
4592
4593 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4594 structs with non literals.
4595 * src/scan-skel.l: never-interactive.
4596 * src/conflicts.c (enum conflict_resolution_e): No trailing
4597 comma.
4598 * src/getargs.c (usage): Split long literal strings.
4599 Reported by Hans Aberg.
4600
717be197
AD
46012002-05-28 Akim Demaille <akim@epita.fr>
4602
4603 * data/bison.c++: Use C++ ostreams.
4604 (cdebug_): New member.
4605
670ddffd
AD
46062002-05-28 Akim Demaille <akim@epita.fr>
4607
4608 * src/output.c (output_skeleton): Be sure to allocate enough room
4609 for `/' _and_ for `\0' in full_skeleton.
4610
769b430f
AD
46112002-05-28 Akim Demaille <akim@epita.fr>
4612
4613 * data/bison.c++: Catch up with bison.simple:
4614 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4615 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4616 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4617 and popping traces.
4618
7067cb36
PH
46192002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4620
4621 * src/output.c (output_skeleton): Put an explicit path in front of
4622 the skeleton file name, rather than relying on the -I directory,
4623 to partially alleviate effects of having a skeleton file lying around
4624 in the current directory.
769b430f 4625
4a713ec2
PH
46262002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4627
769b430f 4628 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
4629 obstack_printf should be obstack_fgrow1.
4630
b408954b
AD
46312002-05-26 Akim Demaille <akim@epita.fr>
4632
4633 * src/state.h (state_t): `solved_conflicts' is a new member.
4634 * src/LR0.c (new_state): Set it to 0.
4635 * src/conflicts.h, src/conflicts.c (print_conflicts)
4636 (free_conflicts, solve_conflicts): Rename as...
4637 (conflicts_print, conflicts_free, conflicts_solve): these.
4638 Adjust callers.
4639 * src/conflicts.c (enum conflict_resolution_e)
4640 (solved_conflicts_obstack): New, used by...
4641 (log_resolution): this.
4642 Adjust to attach the conflict resolution to each state.
4643 Complete the description with the precedence/associativity
4644 information.
4645 (resolve_sr_conflict): Adjust.
4646 * src/print.c (print_state): Output its solved_conflicts.
4647 * tests/conflicts.at (Unresolved SR Conflicts)
4648 (Solved SR Conflicts): Exercise --report=all.
4649
a49aecd5
AD
46502002-05-26 Akim Demaille <akim@epita.fr>
4651
4652 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4653 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4654 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4655 (token_number_t, item_number_as_token_number)
4656 (token_number_as_item_number, muscle_insert_token_number_table):
4657 Rename as...
4658 (symbol_number_t, item_number_as_symbol_number)
4659 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4660 these, since it is more appropriate.
4661
5504898e
AD
46622002-05-26 Akim Demaille <akim@epita.fr>
4663
4664 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4665 `Error:' lines.
4666 * data/bison.simple (yystos) [YYDEBUG]: New.
4667 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4668 error recovery.
4669 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4670
ec3bc396
AD
46712002-05-25 Akim Demaille <akim@epita.fr>
4672
4673 * doc/bison.texinfo (Debugging): Split into...
4674 (Tracing): this new section, its former contents, and...
4675 (Understanding): this new section.
4676 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4677 by...
4678 (report_flag): this.
4679 Adjust all dependencies.
4680 (report_args, report_types, report_argmatch): New.
4681 (usage, getargs): Report/support -r, --report.
4682 * src/options.h
4683 (struct option_table_struct): Rename as..,
4684 (struct option_table_s): this.
4685 Rename the `set_flag' member to `flag' to match with getopt_long's
4686 struct.
4687 * src/options.c (option_table): Split verbose into an entry for
4688 %verbose, and another for --verbose.
4689 Support --report/-r, so remove -r from the obsolete --raw.
4690 * src/print.c: Attach full item sets and lookaheads reports to
4691 report_flag instead of trace_flag.
4692 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4693
78df8250
PE
46942002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4695 and Paul Eggert <eggert@twinsun.com>
769b430f 4696
78df8250
PE
4697 * data/bison.simple (yyparse): Correct error handling to conform to
4698 POSIX and yacc. Specifically, after syntax error is discovered,
4699 do not reduce further before shifting the error token.
4700 Clean up the code a bit by removing the labels yyerrdefault,
4701 yyerrhandle, yyerrpop.
4702 * NEWS: Document the above.
4703
c0c9ea05
PH
47042002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4705
4706 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4707 type; it isn't always big enough, since it doesn't necessarily
4708 include non-terminals.
769b430f 4709 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
4710 the latter can be removed.
4711 (yy_token_number_type): Remove, only one use.
4712 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4713 don't use TokenNumberType as element type.
769b430f 4714
c0c9ea05
PH
4715 * tests/regression.at: Modify expected output to agree with change
4716 to yyr1 and yytranslate.
769b430f 4717
6390a83f
FK
47182002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4719
4720 * src/reader.c (parse_action): Use copy_character instead of
4721 obstack_1grow.
4722
db7c8e9a
AD
47232002-05-13 Akim Demaille <akim@epita.fr>
4724
4725 * tests/regression.at (Token definitions): Prototype yylex and
4726 yyerror.
4727
fcc61800
PH
47282002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4729
158c687b 4730 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
4731 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4732 32-bit arithmetic.
4733 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4734
5683e9b2
AD
47352002-05-07 Akim Demaille <akim@epita.fr>
4736
4737 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4738 avoid GCC warnings.
4739
0c2d3f4c
AD
47402002-05-07 Akim Demaille <akim@epita.fr>
4741
4742 Kill GCC warnings.
4743
4744 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4745 over the RHS of each rule.
4746 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4747 * src/state.h (state_t): Member `nitems' is unsigned short.
4748 * src/LR0.c (get_state): Adjust.
4749 * src/reader.c (packgram): Likewise.
4750 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4751 `Type'.
4752 (muscle_insert_int_table): Remove, unused.
4753 (prepare_rules): Remove `max'.
4754
1565b720
AD
47552002-05-06 Akim Demaille <akim@epita.fr>
4756
4757 * src/closure.c (print_firsts): Display of the symbol tags.
4758 (bitmatrix_print): Move to...
4759 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4760 here.
4761 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4762
cfaee611
AD
47632002-05-06 Akim Demaille <akim@epita.fr>
4764
4765 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4766 hash_do_for_each.
4767
458be8e0
AD
47682002-05-06 Akim Demaille <akim@epita.fr>
4769
4770 * src/LR0.c (new_state, get_state): Instead of using the global
4771 `kernel_size' and `kernel_base', have two new arguments:
4772 `core_size' and `core'.
4773 Adjust callers.
4774
a900a624
AD
47752002-05-06 Akim Demaille <akim@epita.fr>
4776
4777 * src/reader.c (packgram): No longer end `ritem' with a 0
4778 sentinel: it is not used.
4779
d4e7d3a1
AD
47802002-05-05 Akim Demaille <akim@epita.fr>
4781
4782 New experimental feature: display the lookaheads in the report and
4783 graph.
4784
4785 * src/print (print_core): When --trace-flag, display the rules
4786 lookaheads.
4787 * src/print_graph.c (print_core): Likewise.
4788 Swap the arguments.
4789 Adjust caller.
4790
39ceb25b
AD
47912002-05-05 Akim Demaille <akim@epita.fr>
4792
4793 * tests/torture.at (Many lookaheads): New test.
4794
5372019f
AD
47952002-05-05 Akim Demaille <akim@epita.fr>
4796
4797 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4798 (GENERATE_MUSCLE_INSERT_TABLE): this.
4799 (output_int_table, output_unsigned_int_table, output_short_table)
4800 (output_token_number_table, output_item_number_table): Replace with...
4801 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4802 (muscle_insert_short_table, muscle_insert_token_number_table)
4803 (muscle_insert_item_number_table): these.
4804 Adjust all callers.
4805 (prepare_tokens): Don't free `translations', since...
4806 * src/reader.h, src/reader.c (grammar_free): do it.
4807 Move to...
4808 * src/gram.h, src/gram.c (grammar_free): here.
4809 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4810 b4_translate_max.
4811
5df5f6d5
AD
48122002-05-05 Akim Demaille <akim@epita.fr>
4813
4814 * src/output.c (output_unsigned_int_table): New.
4815 (prepare_rules): `i' is unsigned.
4816 `prhs', `rline', `r2' are unsigned int.
4817 Rename muscle `rhs_number_max' as `rhs_max'.
4818 Output muscles `prhs_max', `rline_max', and `r2_max'.
4819 Free rline and r1.
4820 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4821 to compute types instead of constant types.
4822 * tests/regression.at (Web2c Actions): Adjust.
4823
b87f8b21
AD
48242002-05-04 Akim Demaille <akim@epita.fr>
4825
4826 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4827 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4828 Adjust dependencies.
4829 * src/output.c (token_definitions_output): Be sure not to output a
4830 `#define 'a'' when fed with `%token 'a' "a"'.
4831 * tests/regression.at (Token definitions): New.
4832
8bb936e4
PE
48332002-05-03 Paul Eggert <eggert@twinsun.com>
4834
4835 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4836 for K&R C.
4837
48382002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4839
4840 * Makefile.am (SUBDIRS): Remove intl.
4841 (EXTRA_DIST): Add config/config.rpath.
4842
53c71a12
AD
48432002-05-03 Akim Demaille <akim@epita.fr>
4844
4845 * data/bison.simple (m4_if): Don't output empty enums.
4846 And actually, output valid enum definitions :(.
4847
289dd0cf
AD
48482002-05-03 Akim Demaille <akim@epita.fr>
4849
4850 * configure.bat: Remove, completely obsolete.
4851 * Makefile.am (EXTRA_DIST): Adjust.
4852 Don't distribute config.rpath...
4853 * config/Makefile.am (EXTRA_DIST): Do it.
4854
db85e524
AD
48552002-05-03 Akim Demaille <akim@epita.fr>
4856
4857 * configure.in (GETTEXT_VERSION): New.
4858 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4859
83ccf991
AD
48602002-05-03 Akim Demaille <akim@epita.fr>
4861
4862 * data/bison.simple (b4_token_enum): New.
4863 (b4_token_defines): Use it to output tokens both as #define and
4864 enums.
4865 Suggested by Paul Eggert.
4866 * src/output.c (token_definitions_output): Don't output spurious
4867 white spaces.
4868
1f418995
AD
48692002-05-03 Akim Demaille <akim@epita.fr>
4870
4871 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4872
45119f04
RA
48732002-05-02 Robert Anisko <robert@lrde.epita.fr>
4874
4875 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4876 Update the stack class, give a try to deque as the default container.
4877
b2d52318
AD
48782002-05-02 Akim Demaille <akim@epita.fr>
4879
4880 * data/bison.simple (yyparse): Do not implement @$ = @1.
4881 (YYLLOC_DEFAULT): Adjust to do it.
4882 * doc/bison.texinfo (Location Default Action): Fix.
4883
3a8b4109
AD
48842002-05-02 Akim Demaille <akim@epita.fr>
4885
4886 * src/reader.c (parse_braces): Merge into...
4887 (parse_action): this.
4888
84614e13
AD
48892002-05-02 Akim Demaille <akim@epita.fr>
4890
4891 * configure.in (ALL_LINGUAS): Remove.
4892 * po/LINGUAS, hr.po: New.
4893
fdbcd8e2
AD
48942002-05-02 Akim Demaille <akim@epita.fr>
4895
4896 Remove the so called hairy (semantic) parsers.
4897
4898 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4899 * src/gram.h, src/gram.c (semantic_parser): Remove.
4900 (rule_t): Remove the guard and guard_line members.
4901 * src/lex.h (token_t): remove tok_guard.
4902 * src/options.c (option_table): Remove %guard and %semantic_parser
4903 support.
4904 * src/output.c, src/output.h (guards_output): Remove.
4905 (prepare): Adjust.
4906 (token_definitions_output): Don't output the `T'
4907 tokens (???).
4908 (output_skeleton): Don't output the guards.
4909 * src/files.c, src/files.c (attrsfile): Remove.
4910 * src/reader.c (symbol_list): Remove the guard and guard_line
4911 members.
4912 Adjust dependencies.
4913 (parse_guard): Remove.
4914 * data/bison.hairy: Remove.
4915 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4916 BISON_HAIRY.
4917
82b6cb3f
AD
49182002-05-02 Akim Demaille <akim@epita.fr>
4919
4920 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4921 (parse_guard): Rename the formal argument `stack_offset' as
4922 `rule_length', which is more readable.
4923 Adjust callers.
4924 (copy_at, copy_dollar): Instead of outputting the hard coded
4925 values of $$, $n and so forth, output invocation to b4_lhs_value,
4926 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
4927 Note: this patch partially drops `semantic-parser' support: it
4928 always does `rule_length - n', where semantic parsers ought to
4929 always use `-n'.
82b6cb3f
AD
4930 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4931 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4932
6cbfbcc5
AD
49332002-05-02 Akim Demaille <akim@epita.fr>
4934
4935 * configure.in (AC_INIT): Bump to 1.49b.
4936 (AM_INIT_AUTOMAKE): Short invocation.
4937
b8548114
AD
49382002-05-02 Akim Demaille <akim@epita.fr>
4939
4940 Version 1.49a.
4941
c20cd1fa
AD
49422002-05-01 Akim Demaille <akim@epita.fr>
4943
4944 * src/skeleton.h: Remove.
4945
8a9566d4
AD
49462002-05-01 Akim Demaille <akim@epita.fr>
4947
4948 * src/skeleton.h: Fix the #endif.
4949 Reported by Magnus Fromreide.
4950
8c6d399a
PE
49512002-04-26 Paul Eggert <eggert@twinsun.com>
4952
4953 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4954 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 4955 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 4956
2b7ed18a
RA
49572002-04-25 Robert Anisko <robert@lrde.epita.fr>
4958
4959 * src/scan-skel.l: Postprocess quadrigraphs.
4960
4961 * src/reader.c (copy_character): New function, used to output
4962 single characters while replacing `[' and `]' with quadrigraphs, to
4963 avoid troubles with M4 quotes.
4964 (copy_comment): Output characters with copy_character.
4965 (read_additionnal_code): Likewise.
4966 (copy_string2): Likewise.
4967 (copy_definition): Likewise.
4968
4969 * tests/calc.at: Exercise M4 quoting.
4970
34a89c50
AD
49712002-04-25 Akim Demaille <akim@epita.fr>
4972
4973 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4974 between `!' and the command.
4975 Reported by Paul Eggert.
4976
0dd1580a
RA
49772002-04-24 Robert Anisko <robert@lrde.epita.fr>
4978
4979 * tests/calc.at: Exercise prologue splitting.
4980
4981 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4982 `b4_post_prologue' instead of `b4_prologue'.
4983
4984 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4985 muscles.
4986 (output): Free pre_prologue_obstack and post_prologue_obstack.
4987 * src/files.h, src/files.c (attrs_obstack): Remove.
4988 (pre_prologue_obstack, post_prologue_obstack): New.
4989 * src/reader.c (copy_definition): Add a parameter to specify the
4990 obstack to fill, instead of using attrs_obstack unconditionally.
4991 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4992 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4993
83c1796f
PE
49942002-04-23 Paul Eggert <eggert@twinsun.com>
4995
4996 * data/bison.simple: Remove unnecessary commentary and white
4997 space differences from 1_29-branch.
4998 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4999
5000 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5001 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5002 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5003 constructors or destructors.
5004
5005 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5006
1207eeac
AD
50072002-04-23 Akim Demaille <akim@epita.fr>
5008
5009 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5010 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5011 location with columns.
5012 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5013 All reported by Paul Eggert.
5014
78ab8f67
AD
50152002-04-22 Akim Demaille <akim@epita.fr>
5016
5017 * src/reduce.c (dump_grammar): Move to...
5018 * src/gram.h, src/gram.c (grammar_dump): here.
5019 Be sure to separate long item numbers.
5020 Don't read the members of a rule's prec if its nil.
5021
133c20e2
AD
50222002-04-22 Akim Demaille <akim@epita.fr>
5023
5024 * src/output.c (table_size, table_grow): New.
5025 (MAXTABLE): Remove, replace uses with table_size.
5026 (pack_vector): Instead of dying when the table is too big, grow it.
5027
9515e8a7
AD
50282002-04-22 Akim Demaille <akim@epita.fr>
5029
5030 * data/bison.simple (yyr1): Its type is that of a token number.
5031 * data/bison.c++ (r1_): Likewise.
5032 * tests/regression.at (Web2c Actions): Adjust.
5033
23c5a174
AD
50342002-04-22 Akim Demaille <akim@epita.fr>
5035
5036 * src/reader.c (token_translations_init): 256 is now the default
5037 value for the error token, i.e., it will be assigned another
5038 number if the user assigned 256 to one of her tokens.
5039 (reader): Don't force 256 to error.
5040 * doc/bison.texinfo (Symbols): Adjust.
5041 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5042 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5043 etc. instead of 10, 20, 30 (which was used to `jump' over error
5044 (256) and undefined (2)).
5045
5fbb0954
AD
50462002-04-22 Akim Demaille <akim@epita.fr>
5047
5048 Propagate more token_number_t.
5049
5050 * src/gram.h (token_number_as_item_number)
5051 (item_number_as_token_number): New.
5052 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5053 Use it to create output_item_number_table and
5054 output_token_number_table.
5055 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5056 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5057 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5058 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5059
4f940944
AD
50602002-04-22 Akim Demaille <akim@epita.fr>
5061
5062 * src/output.h, src/output.c (get_lines_number): Remove.
5063
3ded9a63
AD
50642002-04-19 Akim Demaille <akim@epita.fr>
5065
5066 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5067 as Lex/Flex'.
5068 (Debugging): More details about enabling the debugging features.
5069 (Table of Symbols): Describe $$, $n, @$, and @n.
5070 Suggested by Tim Josling.
5071
e0c471a9
AD
50722002-04-19 Akim Demaille <akim@epita.fr>
5073
5074 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5075
fecc10cd
AD
50762002-04-10 Akim Demaille <akim@epita.fr>
5077
5078 * src/system.h: Rely on HAVE_LIMITS_H.
5079 Suggested by Paul Eggert.
5080
51dec47b
AD
50812002-04-09 Akim Demaille <akim@epita.fr>
5082
5083 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5084 full stderr, and strip it according to the bison options, instead
5085 of composing the error message from different bits.
5086 This makes it easier to check for several error messages.
5087 Adjust all the invocations.
5088 Add an invocation exercising the error token.
5089 Add an invocation demonstrating a stupid error message.
5090 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5091 Adjust the tests.
5092 Error message are for stderr, not stdout.
5093
007a50a4
AD
50942002-04-09 Akim Demaille <akim@epita.fr>
5095
5096 * src/gram.h, src/gram.c (error_token_number): Remove, use
5097 errtoken->number.
5098 * src/reader.c (reader): Don't specify the user token number (2)
5099 for $undefined, as it uselessly prevents using it.
5100 * src/gram.h (token_number_t): Move to...
5101 * src/symtab.h: here.
5102 (state_t.number): Is a token_number_t.
5103 * src/print.c, src/reader.c: Use undeftoken->number instead of
5104 hard coded 2.
5105 (Even though this 2 is not the same as above: the number of the
5106 undeftoken remains being 2, it is its user token number which
5107 might not be 2).
5108 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5109 `user_token_number_max'.
5110 Output `undef_token_number'.
5111 * data/bison.simple, data/bison.c++: Use them.
5112 Be sure to map invalid yylex return values to
5113 `undef_token_number'. This saves us from gratuitous SEGV.
5114
5115 * tests/conflicts.at (Solved SR Conflicts)
5116 (Unresolved SR Conflicts): Adjust.
5117 * tests/regression.at (Web2c Actions): Adjust.
5118
06446ccf
AD
51192002-04-08 Akim Demaille <akim@epita.fr>
5120
5121 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5122 Adding #line.
5123 Remove the duplicate `typedefs'.
5124 (RhsNumberType): Fix the declaration and various other typos.
5125 Use __ofile__.
5126 * data/bison.simple: Use __ofile__.
5127 * src/scan-skel.l: Handle __ofile__.
5128
62a3e4f0
AD
51292002-04-08 Akim Demaille <akim@epita.fr>
5130
5131 * src/gram.h (item_number_t): New, the type of item numbers in
5132 RITEM. Note that it must be able to code symbol numbers as
5133 positive number, and the negation of rule numbers as negative
5134 numbers.
5135 Adjust all dependencies (pretty many).
5136 * src/reduce.c (rule): Remove this `short *' pointer: use
5137 item_number_t.
5138 * src/system.h (MINSHORT, MAXSHORT): Remove.
5139 Include `limits.h'.
5140 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5141 (shortcpy): Remove.
5142 (MAXTABLE): Move to...
5143 * src/output.c (MAXTABLE): here.
5144 (prepare_rules): Use output_int_table to output rhs.
5145 * data/bison.simple, data/bison.c++: Adjust.
5146 * tests/torture.at (Big triangle): Move the limit from 254 to
5147 500.
5148 * tests/regression.at (Web2c Actions): Ajust.
5149
5150 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5151 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5152 passes, but produces negative #line number, once fixed, GCC is
5153 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5154 C), it passes.
5155 * src/state.h (state_h): Code input lines on ints, not shorts.
5156
bb88b0fc
AD
51572002-04-08 Akim Demaille <akim@epita.fr>
5158
5159 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5160 and then the grammar.
5161
9a636f47
AD
51622002-04-08 Akim Demaille <akim@epita.fr>
5163
5164 * src/system.h: No longer using strndup.
5165
680e8701
AD
51662002-04-07 Akim Demaille <akim@epita.fr>
5167
5168 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5169 * src/output.c (output_table_data): Return the longest number.
5170 (prepare_tokens): Output `token_number_max').
5171 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5172 New.
5173 Use them to define yy_token_number_type/TokenNumberType.
5174 Use this type for yytranslate.
5175 * tests/torture.at (Big triangle): Push the limit from 124 to
5176 253.
5177 * tests/regression.at (Web2c Actions): Adjust.
5178
817e9f41
AD
51792002-04-07 Akim Demaille <akim@epita.fr>
5180
5181 * tests/torture.at (Big triangle): New.
5182 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5183 * tests/existing.at: here.
5184
5123689b
AD
51852002-04-07 Akim Demaille <akim@epita.fr>
5186
5187 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5188 nritems.
5189 Adjust dependencies.
5190
f3849179
AD
51912002-04-07 Akim Demaille <akim@epita.fr>
5192
5193 * src/reader.c: Normalize increments to prefix form.
5194
bd02036a
AD
51952002-04-07 Akim Demaille <akim@epita.fr>
5196
5197 * src/reader.c, symtab.c: Remove debugging code.
5198
db8837cb
AD
51992002-04-07 Akim Demaille <akim@epita.fr>
5200
5201 Rename all the `bucket's as `symbol_t'.
5202
5203 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5204 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5205 * src/symtab.c, src/symtab.h (bucket): Rename as...
5206 (symbol_t): this.
5207 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5208 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5209 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5210 (buckets_new, buckets_free, buckets_do): Rename as...
5211 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5212 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5213 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5214 (symbols_new, symbols_free, symbols_do): these.
5215
72a23c97
AD
52162002-04-07 Akim Demaille <akim@epita.fr>
5217
5218 Use lib/hash for the symbol table.
5219
5220 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5221 EOF.
5222 * src/lex.c (lex): Set the `number' member of new terminals.
5223 * src/reader.c (bucket_check_defined, bucket_make_alias)
5224 (bucket_check_alias_consistence, bucket_translation): New.
5225 (reader, grammar_free, readgram, token_translations_init)
5226 (packsymbols): Adjust.
5227 (reader): Number the predefined tokens.
5228 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5229 for predefined tokens.
5230 * src/symtab.h (bucket): Remove all the hash table related
5231 members.
5232 * src/symtab.c (symtab): Replace by...
5233 (bucket_table): this.
5234 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5235 (buckets_new, buckets_do): New.
5236
280a38c3
AD
52372002-04-07 Akim Demaille <akim@epita.fr>
5238
5239 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5240 (start_symbol, max_user_token_number, semantic_parser)
5241 (error_token_number): Initialize.
5242 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5243 Initialize.
5244 (reader): Don't.
5245 (errtoken, eoftoken, undeftoken, axiom): Extern.
5246
03b31c0c
AD
52472002-04-07 Akim Demaille <akim@epita.fr>
5248
5249 * src/gram.h (rule_s): prec and precsym are now pointers
5250 to the bucket giving the priority/associativity.
5251 Member `associativity' removed: useless.
5252 * src/reduce.c, src/conflicts.c: Adjust.
5253
8b3df748
AD
52542002-04-07 Akim Demaille <akim@epita.fr>
5255
5256 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5257 Properly escape the symbols' TAG when outputting them.
5258
e601aa1d
AD
52592002-04-07 Akim Demaille <akim@epita.fr>
5260
5261 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5262
b0299a2e
AD
52632002-04-07 Akim Demaille <akim@epita.fr>
5264
5265 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5266 (LArule): this, which is an array to rule_t*.
5267 * src/print.c, src/conflicts.c: Adjust.
5268
d7e1f00c
AD
52692002-04-07 Akim Demaille <akim@epita.fr>
5270
5271 * src/gram.h (rule_t): Rename `number' as `user_number'.
5272 `number' is a new member.
5273 Adjust dependencies.
5274 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5275
cc9305dd
AD
52762002-04-07 Akim Demaille <akim@epita.fr>
5277
5278 As a result of the previous patch, it is no longer needed
5279 to reorder ritem itself.
5280
5281 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5282
b0940840
AD
52832002-04-07 Akim Demaille <akim@epita.fr>
5284
5285 Be sure never to walk through RITEMS, but use only data related to
5286 the rules themselves. RITEMS should be banished.
5287
5288 * src/output.c (output_token_translations): Rename as...
5289 (prepare_tokens): this.
5290 In addition to `translate', prepare the muscles `tname' and
5291 `toknum', which were handled by...
5292 (output_rule_data): this.
5293 Remove, and move the remainder of its outputs into...
5294 (prepare_rules): this new routines, which also merges content from
5295 (output_gram): this.
5296 (prepare_rules): Be sure never to walk through RITEMS.
5297 (output_stos): Rename as...
5298 (prepare_stos): this.
5299 (output): Always invoke prepare_states, after all, just don't use it
5300 in the output if you don't need it.
5301
643a5994
AD
53022002-04-07 Akim Demaille <akim@epita.fr>
5303
5304 * src/LR0.c (new_state): Display `nstates' as the name of the
5305 newly created state.
5306 Adjust to initialize first_state and last_state if needed.
5307 Be sure to distinguish the initial from the final state.
5308 (new_states): Create the itemset of the initial state, and use
5309 new_state.
5310 * src/closure.c (closure): Now that the initial state has its
5311 items properly set, there is no need for a special case when
5312 creating `ruleset'.
5313
5314 As a result, now the rule 0, reducing to $axiom, is visible in the
5315 outputs. Adjust the test suite.
5316
5317 * tests/conflicts.at (Solved SR Conflicts)
5318 (Unresolved SR Conflicts): Adjust.
5319 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5320 * tests/conflicts.at (S/R in initial): New.
5321
b4c4ccc2
AD
53222002-04-07 Akim Demaille <akim@epita.fr>
5323
5324 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5325 the RHS of the rules.
5326 * src/output.c (output_gram): Likewise.
5327
bba97eb2
AD
53282002-04-07 Akim Demaille <akim@epita.fr>
5329
5330 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5331 bucket.
5332 Adjust all dependencies.
5333 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5334 `number' of the buckets too.
5335 * src/gram.h: Include `symtab.h'.
5336 (associativity): Move to...
5337 * src/symtab.h: here.
5338 No longer include `gram.h'.
5339
c3b407f4
AD
53402002-04-07 Akim Demaille <akim@epita.fr>
5341
5342 * src/gram.h, src/gram.c (rules_rhs_length): New.
5343 (ritem_longest_rhs): Use it.
5344 * src/gram.h (rule_t): `number' is a new member.
5345 * src/reader.c (packgram): Set it.
5346 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5347 the end of `rules', and count them out of `nrules'.
5348 (reduce_output, dump_grammar): Adjust.
5349 * src/print.c (print_grammar): It is no longer needed to check for
5350 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5351 * tests/reduce.at (Reduced Automaton): New test.
5352
11652ab3
AD
53532002-04-07 Akim Demaille <akim@epita.fr>
5354
5355 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5356 lacking `+ 1' to nrules, Bison reported as useless a token if it
5357 was used solely to set the precedence of the last rule...
5358
26b23c1a
AD
53592002-04-07 Akim Demaille <akim@epita.fr>
5360
5361 * data/bison.c++, data/bison.simple: Don't output the current file
5362 name in #line, to avoid useless diffs between two identical
5363 outputs under different names.
5364
18bcecb0
AD
53652002-04-07 Akim Demaille <akim@epita.fr>
5366
5367 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5368 Normalize loops to using `< nrules + 1', not `<= nrules'.
5369
fa770c86
AD
53702002-04-07 Akim Demaille <akim@epita.fr>
5371
5372 * TODO: Update.
5373
d9b739c3
AD
53742002-04-07 Akim Demaille <akim@epita.fr>
5375
5376 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5377 bucket.value as bucket.number.
5378
99013900
AD
53792002-04-07 Akim Demaille <akim@epita.fr>
5380
5381 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5382 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5383 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5384 RHS, instead of being an index in RITEMS.
5385
e966383b
PE
53862002-04-04 Paul Eggert <eggert@twinsun.com>
5387
5388 * doc/bison.texinfo: Update copyright date.
5389 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5390 (Symbols): Warn about running Bison in one character set,
5391 but compiling and/or running in an incompatible one.
5392 Warn about character code 256, too.
5393
53942002-04-03 Paul Eggert <eggert@twinsun.com>
5395
5396 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5397 YYERROR_VERBOSE is nonzero, not whether it is defined.
5398
5399 Merge changes from bison-1_29-branch.
c307773e 5400
8d6c48b9
PE
54012002-03-20 Paul Eggert <eggert@twinsun.com>
5402
5403 Merge fixes from Debian bison_1.34-1.diff.
5404
5405 * configure.in (AC_PREREQ): 2.53.
5406
e53c6322
AD
54072002-03-20 Akim Demaille <akim@epita.fr>
5408
5409 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5410
9ffbeca7
PE
54112002-03-19 Paul Eggert <eggert@twinsun.com>
5412
21db0b2a
PE
5413 * src/bison.simple (YYCOPY): New macro.
5414 (YYSTACK_RELOCATE): Use it.
5415 Remove Type arg; no longer needed. All callers changed.
5416 (yymemcpy): Remove; no longer needed.
5417
9ffbeca7
PE
5418 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5419 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5420
642cb8f8
AD
54212002-03-19 Akim Demaille <akim@epita.fr>
5422
5423 Test and fix the #line outputs.
5424
5425 * tests/atlocal.at (GCC): New.
5426 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5427 (Prologue synch line, ,%union synch line, Postprologue synch line)
5428 (Action synch line, Epilogue synch line): New tests.
5429 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5430 * data/bison.simple, data/bison.c++: Use it.
5431
3c31a486
AD
54322002-03-19 Akim Demaille <akim@epita.fr>
5433
5434 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5435 (Solved SR Conflicts, %expect not enough, %expect right)
5436 (%expect too much): Move to...
5437 * tests/conflicts.at: this new file.
5438
0d8bed56
AD
54392002-03-19 Akim Demaille <akim@epita.fr>
5440
5441 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5442 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5443 that we can move to enums for instance.
5444 * src/output.c (token_definitions_output): Output a list of
5445 `token-name, token-number' instead of the #define.
5446 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5447
9208d17f
AD
54482002-03-14 Akim Demaille <akim@epita.fr>
5449
5450 Use Gettext 0.11.1.
5451
af27eacb
RA
54522002-03-09 Robert Anisko <robert@lrde.epita.fr>
5453
5454 * data/bison.c++: Make the user able to add members to the generated
5455 parser by subclassing.
5456
9101a310
RA
54572002-03-05 Robert Anisko <robert@lrde.epita.fr>
5458
5459 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5460 a character.
5461 Reported by Nicolas Tisserand and Nicolas Burrus.
5462
fff9bf0b
RA
54632002-03-04 Robert Anisko <robert@lrde.epita.fr>
5464
5465 * src/reader.c: Warn about lacking semi-colons, do not complain.
5466
64dba31e
RA
54672002-03-04 Robert Anisko <robert@lrde.epita.fr>
5468
5469 * data/bison.c++: Remove a debug line.
5470
374f5a14
RA
54712002-03-04 Robert Anisko <robert@lrde.epita.fr>
5472
5473 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5474 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5475 provide a default implementation.
5476
bfcf1f3a
AD
54772002-03-04 Akim Demaille <akim@epita.fr>
5478
5479 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5480 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5481 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5482 * tests/semantic.at (Parsing Guards): Similarly.
5483 * src/reader.at (readgram): Complain if the last rule is not ended
5484 with a semi-colon.
5485
65ccf9fc
AD
54862002-03-04 Akim Demaille <akim@epita.fr>
5487
5488 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5489 * src/closure.c: here.
5490 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5491 RTC.
5492 * src/warshall.h, src/warshall.c: Remove.
5493 * tests/sets.at (Broken Closure): Adjust.
5494
d0039cbc
AD
54952002-03-04 Akim Demaille <akim@epita.fr>
5496
5497 * src/output.c (output_skeleton): tempdir is const.
5498 bytes_read is unused.
5499
345cea78
AD
55002002-03-04 Akim Demaille <akim@epita.fr>
5501
5502 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5503 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5504 Update.
5505 From Michael Hayes.
5506
564801f7
AD
55072002-03-04 Akim Demaille <akim@epita.fr>
5508
5509 * src/closure.c (closure): `r' is unused.
5510
e5352bc7
AD
55112002-03-04 Akim Demaille <akim@epita.fr>
5512
5513 * tests/sets.at (Broken Closure): Add the ending `;'.
5514 * src/reader.at (readgram): Complain if a rule is not ended with a
5515 semi-colon.
5516
914feea9
AD
55172002-03-04 Akim Demaille <akim@epita.fr>
5518
5519 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5520 (count_sr_conflicts): Use bitset_count.
5521 * src/reduce.c (inaccessable_symbols): Ditto.
5522 (bits_size): Remove.
5523 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5524
f0250de6
AD
55252002-03-04 Akim Demaille <akim@epita.fr>
5526
5527 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5528 * src/reduce.c: Remove the `bitset_zero's following the
5529 `bitset_create's, as now it is performed by the latter.
5530
ef017502
AD
55312002-03-04 Akim Demaille <akim@epita.fr>
5532
5533 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5534 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5535 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5536 latest sources from Michael.
5537
76514394
AD
55382002-03-04 Akim Demaille <akim@epita.fr>
5539
5540 * src/output.c (output): Don't free the grammar.
5541 * src/reader.c (grammar_free): New.
5542 * src/main.c (main): Call it and don't free symtab here.
5543
55024580
AD
55442002-03-04 Akim Demaille <akim@epita.fr>
5545
5546 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5547 before returning.
5548 Reported by Benoit Perrot.
5549
f9abaa2c
AD
55502002-03-04 Akim Demaille <akim@epita.fr>
5551
5552 Use bitset operations when possible, not loops over bits.
5553
5554 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5555 bitset_or.
5556 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5557 * src/reduce.c (useless_nonterminals): Formatting changes.
5558 * src/warshall.c (TC): Use bitset_or.
5559
0e721e75
AD
55602002-03-04 Akim Demaille <akim@epita.fr>
5561
5562 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5563 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5564 Ditto.
5565
0fb1ffb1
AD
55662002-03-04 Akim Demaille <akim@epita.fr>
5567
5568 * src/lalr.c (F): Now a bitset*.
5569 Adjust all dependencies.
5570
b86796bf
AD
55712002-03-04 Akim Demaille <akim@epita.fr>
5572
5573 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5574 Adjust all dependencies.
5575
602bbf31
AD
55762002-03-04 Akim Demaille <akim@epita.fr>
5577
5578 * src/L0.c, src/LR0.h (nstates): Be size_t.
5579 Adjust comparisons (signed vs unsigned).
5580 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5581 bitset*.
5582 Adjust all dependencies.
5583
d8a0245c
AD
55842002-03-04 Akim Demaille <akim@epita.fr>
5585
5586 * src/closure.c (firsts): Now, also a bitset.
5587 Adjust all dependencies.
5588 (varsetsize): Remove, now unused.
5589 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5590
34ba9743
AD
55912002-03-04 Akim Demaille <akim@epita.fr>
5592
5593 * src/print.c: Convert to use bitset.h, not hand coded iterations
5594 over ints.
5595
ed86e78c
AD
55962002-03-04 Akim Demaille <akim@epita.fr>
5597
5598 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5599
dfdb1797
AD
56002002-03-04 Akim Demaille <akim@epita.fr>
5601
5602 * src/closure.c (ruleset): Be a bitset.
5603 (rulesetsize): Remove.
5604
7086e707
AD
56052002-03-04 Akim Demaille <akim@epita.fr>
5606
5607 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5608 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5609 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5610 * src/closure.c (fderives): Be an array of bitsets.
5611
98254360
RA
56122002-02-28 Robert Anisko <robert@lrde.epita.fr>
5613
5614 * data/bison.c++: Merge the two generated headers. Insert a copyright
5615 notice in each output file.
5616
a75c057f
AD
56172002-02-28 Akim Demaille <akim@epita.fr>
5618
5619 * data/bison.c++: Copy the prologue of bison.simple to fetch
5620 useful M4 definitions, such as b4_header_guard.
5621
06b00abc
AD
56222002-02-25 Akim Demaille <akim@epita.fr>
5623
5624 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
5625 translator friendly scheme for the bgr
5626 copyright notice.
06b00abc 5627
70e7d534
AD
56282002-02-25 Akim Demaille <akim@epita.fr>
5629
5630 * src/output.c (header_output): Remove, now handled completely via
5631 M4.
5632
abe017f6
AD
56332002-02-25 Akim Demaille <akim@epita.fr>
5634
5635 * m4/m4.m4: New, from CVS Autoconf.
5636 * configure.in: Invoke it.
5637 * src/output.c (output_skeleton): Use its result instead of the
5638 hard coded name.
5639
381fb12e
AD
56402002-02-25 Akim Demaille <akim@epita.fr>
5641
5642 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5643 Fileutils 4.1.5.
5644 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5645 * src/output.c (output_skeleton): Use mkstemp to create a real
5646 temporary file.
5647 Move the filling of `skeleton' and its muscle to...
5648 (prepare): here.
5649 (output): Move the definition of the prologue muscle to...
5650 (prepare): here.
5651 * src/system.h (DEFAULT_TMPDIR): New.
5652
6f38107f
PE
56532002-02-14 Paul Eggert <eggert@twinsun.com>
5654
5655 Remove the support for C++ namespace cleanliness; it was
5656 causing more problems than it was curing, since it didn't work
5657 properly on some nonstandard C++ compilers. This can wait
5658 for a proper C++ parser.
5659
5660 * NEWS: Document this.
5661 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5662 of C++, as it's treated like C now.
5663 * src/bison.simple (YYSTD): Remove.
5664 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5665 Treat C++ just like Standard C instead of trying to support
5666 namespace cleanliness.
5667
80cce3da
AD
56682002-02-14 Akim Demaille <akim@epita.fr>
5669
5670 * tests/regression.at (else): Adjust to Andreas' change.
5671
842e8679
AD
56722002-02-14 Akim Demaille <akim@epita.fr>
5673
5674 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5675
4bda3f10
AD
56762002-02-13 Andreas Schwab <schwab@suse.de>
5677
5678 * src/output.c (output_rule_data): Don't output NULL, it might
5679 not be defined yet.
5680
4162fa07 56812002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 5682
4162fa07
RA
5683 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5684 (Copyright notice): Update.
b418ecd8 5685
bd16a5dc
AD
56862002-02-11 Akim Demaille <akim@epita.fr>
5687
5688 * tests/regression.at (%nonassoc and eof): Don't include
5689 nonportable headers.
5690
8d69a1a3
RA
56912002-02-08 Robert Anisko <robert@lrde.epita.fr>
5692
5693 * data/bison.c++: Correct error recovery. Make the user able to
5694 initialize the starting location.
5695
9b2d0677
AD
56962002-02-07 Akim Demaille <akim@epita.fr>
5697
5698 * tests/input.at: New.
5699
69e2658b
RA
57002002-02-07 Robert Anisko <robert@lrde.epita.fr>
5701
5702 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 5703 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
5704 directives around tables only needed for debugging.
5705
4aacc3a7
RA
57062002-02-07 Robert Anisko <robert@lrde.epita.fr>
5707
5708 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5709 C++ parsers.
5710 (yy::b4_name::parse): Use print_.
5711
762a801e
RA
57122002-02-07 Robert Anisko <robert@lrde.epita.fr>
5713
5714 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5715
4bb2bc3f
RA
57162002-02-07 Robert Anisko <robert@lrde.epita.fr>
5717
5718 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5719 C++ parsers.
5720 (yy::b4_name::parse): Build verbose error messages, and use error_.
5721
6b45a3ca
RA
57222002-02-06 Robert Anisko <robert@lrde.epita.fr>
5723
5724 * data/bison.c++: Fix m4 quoting in comments.
5725
50997c6e
RA
57262002-02-06 Robert Anisko <robert@lrde.epita.fr>
5727
5728 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5729 not expanded by m4.
5730
3f3eed27
AD
57312002-02-05 Akim Demaille <akim@epita.fr>
5732
5733 * data/bison.c++: Adjust to the M4 back end.
5734 More is certainly needed.
5735
be2a1a68
AD
57362002-02-05 Akim Demaille <akim@epita.fr>
5737
5738 Give a try to M4 as a back end.
5739
5740 * lib/readpipe.c: New, from wdiff.
5741 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5742 BISON_HAIRY.
5743 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5744 specific values. Now it is m4 that performs the lookup.
5745 * src/parse-skel.y: Remove.
5746 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5747 * src/output.c (actions_output, guards_output)
5748 (token_definitions_output): No longer keeps track of the output
5749 line number, hence remove the second argument.
5750 (guards_output): Check against the guard member of a rule, not the
5751 action member.
5752 Adjust callers.
5753 (output_skeleton): Don't look for the skeleton location, let m4 do
5754 that.
5755 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5756 file will be used.
5757 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5758 (prepare): Given that for the time being changesyntax is not
5759 usable in M4, rename the muscles using `-' to `_'.
5760 Define `defines_flag', `output_parser_name' and `output_header_name'.
5761 * src/output.h (actions_output, guards_output)
5762 (token_definitions_output): Adjust prototypes.
5763 * src/scan-skel.l: Instead of scanning the skeletons, it now
5764 processes the output of m4: `__oline__' and `#output'.
5765 * data/bison.simple: Adjust to be used by M4(sugar).
5766 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5767 to date.
5768 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5769 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5770 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5771 shamelessly stolen from CVS Autoconf.
5772
beda758b
AD
57732002-02-05 Akim Demaille <akim@epita.fr>
5774
5775 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5776 * configure.in: Check for the declarations of free and malloc.
5777 * src/muscle_tab.c: Adjust.
5778
5ece6d43
AD
57792002-02-05 Akim Demaille <akim@epita.fr>
5780
5781 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5782 which have no values.
5783
5bb18f9a
AD
57842002-02-05 Akim Demaille <akim@epita.fr>
5785
5786 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5787 * data/: here.
5788
894dd62e
PE
57892002-01-29 Paul Eggert <eggert@twinsun.com>
5790
5791 * src/bison.simple (YYSIZE_T): Do not define merely because
5792 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5793 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5794
82841af7
AD
57952002-01-27 Akim Demaille <akim@epita.fr>
5796
5797 Fix `%nonassoc and eof'.
5798
5799 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5800 which were not properly copied! Replace
5801 memcpy (res->errs, src->errs, src->nerrs);
5802 with
5803 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5804 !!!
5805 * tests/regression.at (%nonassoc and eof): Adjust to newest
5806 Autotest: `.' is not in the PATH.
5807
318b76e9
AD
58082002-01-27 Akim Demaille <akim@epita.fr>
5809
5810 * tests/sets.at (AT_EXTRACT_SETS): New.
5811 (Nullable): Use it.
5812 (Firsts): New.
5813
30d2f3d5
AD
58142002-01-26 Akim Demaille <akim@epita.fr>
5815
5816 * tests/actions.at, tests/calc.at, tests/headers.at,
5817 * tests/torture.at: Adjust to the newest Autotest which no longer
5818 forces `.' in the PATH.
5819
30f8c395
AD
58202002-01-25 Akim Demaille <akim@epita.fr>
5821
5822 * tests/regression.at (%nonassoc and eof): New.
5823 Suggested by Robert Anisko.
5824
29ae55f1
AD
58252002-01-24 Akim Demaille <akim@epita.fr>
5826
5827 Bison dumps core when trying to complain about broken input files.
5828 Reported by Cris van Pelt.
5829
5830 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5831 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5832 into...
5833 (Invalid inputs): Strengthen: exercise parse_percent_token.
5834
2b548aa6
RA
58352002-01-24 Robert Anisko <robert.anisko@epita.fr>
5836
5837 * src/Makefile.am: Add bison.c++.
5838 * src/bison.c++: New skeleton.
5839
bb0146c2
AD
58402002-01-21 Paolo Bonzini <bonzini@gnu.org>
5841
5842 * po/it.po: New.
5843
bec30531
AD
58442002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5845
5846 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5847
fc6edc45
MA
58482002-01-20 Marc Autret <marc@gnu.org>
5849
5850 * src/files.c (compute_output_file_names): Fix
5851
5e5d5415
MA
58522002-01-20 Marc Autret <marc@gnu.org>
5853
5854 * tests/output.at: New test.
5855 * src/files.c (compute_base_names): Don't map extensions when
5856 the YACC flag is set, use defaults.
5857 Reported by Evgeny Stambulchik.
5858
44ea3fbd
MA
58592002-01-20 Marc Autret <marc@gnu.org>
5860
bb0146c2 5861 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
5862 compilers as well (i.e. the vendor C compiler).
5863 Suggested by Albert Chin-A-Young.
5864
338963d1
TVH
58652002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5866
5867 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5868 canonical definition.
5869 * src/system.h: Use the canonical definition for PARAMS (avoids
5870 a conflict with the macro from lib/hash.h).
5871
c57b2479
AD
58722002-01-11 Akim Demaille <akim@epita.fr>
5873
5874 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 5875 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 5876
b85810ae
AD
58772002-01-09 Akim Demaille <akim@epita.fr>
5878
5879 * src/files.c, src/files.h (output_infix): New.
5880 (tab_extension): Remove.
5881 (compute_base_names): Compute the former, drop the latter.
5882 * src/output.c (prepare): Insert the muscles `output-infix', and
5883 `output-suffix'.
5884 * src/parse-skel.y (string, string.1): New.
5885 (section.header): Use it.
5886 (section.yacc): Remove.
5887 (prefix): Remove too.
5888 * src/scan-skel.l: Adjust.
5889 * src/bison.simple, src/bison.hairy: Adjust.
5890
cae60122
AD
58912002-01-09 Akim Demaille <akim@epita.fr>
5892
5893 * configure.in (WERROR_CFLAGS): Compute it.
5894 * src/Makefile.am (CFLAGS): Pass it.
5895 * tests/atlocal.in (CFLAGS): Idem.
5896 * src/files.c: Fix a few warnings.
5897 (get_extension_index): Remove, unused.
5898
ae404801
AD
58992002-01-08 Akim Demaille <akim@epita.fr>
5900
5901 * src/getargs.c (AS_FILE_NAME): New.
5902 (getargs): Use it to convert DOSish file names.
5903 * src/files.c (base_name): Rename as full_base_name to avoid
5904 clashes with `base_name ()'.
5905 (filename_split): New.
5906 (compute_base_names): N-th rewrite, using filename_split.
5907
22312b71
AD
59082002-01-08 Akim Demaille <akim@epita.fr>
5909
5910 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5911 New, stolen from the Fileutils 4.1.
5912 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5913 * configure.in: Check for the presence of memrchr, and of its
5914 prototype.
5915
a67cef01
TVH
59162002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5917
5918 * lib/hash.h (__P): Added definition for this macro.
5919 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5920 BUILT_SOURCES, to ensure they are generated first.
5921 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5922 %error-verbose to allow bootstrapping with bison 1.30x.
5923
2b25d624
AD
59242002-01-06 Akim Demaille <akim@epita.fr>
5925
5926 * src/reader.c (parse_braces): Don't fetch the next char, the
5927 convention is to fetch on entry.
5928 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5929 'switch' without a following semicolon.
5930 * tests/regression.at (braces parsing): New.
5931
3460813b
AD
59322002-01-06 Akim Demaille <akim@epita.fr>
5933
5934 Bison is dead wrong in its RR conflict reports.
5935
5936 * tests/torture.at (GNU Cim Grammar): New.
5937 * src/conflicts.c (count_rr_conflicts): Fix.
5938
73784c64
AD
59392002-01-06 Akim Demaille <akim@epita.fr>
5940
5941 Creating package.m4 from configure.ac causes too many problems.
5942
5943 * tests/Makefile.am (package.m4): Create it by hand,
5944 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5945
25d81090
AD
59462002-01-06 Akim Demaille <akim@epita.fr>
5947
5948 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5949 skeleton.h.
5950
a9b8959e
PE
59512002-01-04 Paul Eggert <eggert@twinsun.com>
5952
5953 * doc/bison.texinfo (Debugging):
5954 Remove YYSTDERR; it's no longer defined or used.
5955 Also, s/cstdio.h/cstdio/.
5956
25d81090
AD
59572002-01-03 Akim Demaille <akim@epita.fr>
5958
5959 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5960
1109455c
AD
59612002-01-03 Akim Demaille <akim@epita.fr>
5962
5963 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5964 tracing code to --trace, wait for a better --trace option, with
5965 args.
5966
7ea5e977
AD
59672002-01-03 Akim Demaille <akim@epita.fr>
5968
5969 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5970 The ISO C++ standard is extremely clear about it: stderr is
5971 considered a macro, not a regular symbol (see table 94 `Header
5972 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5973 Therefore std:: does not apply to it. It still does with fprintf.
5974 Also, s/cstdio.h/cstdio/.
5975
fab5b110
AD
59762002-01-03 Akim Demaille <akim@epita.fr>
5977
5978 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5979 for non system headers.
5980
aed7fd9b
AD
59812002-01-02 Akim Demaille <akim@epita.fr>
5982
5983 Equip the skeleton chain with location tracking, runtime trace,
5984 pure parser and scanner.
5985
5986 * src/parse-skel.y: Request a pure parser, locations, and prefix
5987 renaming.
5988 (%union): Having several members with the same type does not help
5989 type mismatches, simplify.
5990 (YYPRINT, yyprint): New.
5991 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5992 (skel_error): this.
5993 Handle locations.
5994 * src/scan-skel.l: Adjust to these changes.
5995 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5996 (LOCATION_PRINT, skel_control_t): New.
5997
24fad99e
AD
59982001-12-30 Akim Demaille <akim@epita.fr>
5999
6000 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6001 replace `gb' with BLANKS.
6002 * src/scan-skel.l: Adjust.
6003
a4b36db4
AD
60042001-12-30 Akim Demaille <akim@epita.fr>
6005
6006 * src/system.h: We don't need nor want bcopy.
6007 Throw away MS-DOS crap: we don't need getpid.
6008 * configure.in: We don't need strndup. It was even causing
6009 problems: because Flex includes the headers *before* us,
6010 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6011 not visible.
6012 * lib/xstrndup.c: New.
6013 * src/scan-skel.l: Use it.
6014 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6015 * src/parse-skel.y: Use %directives instead of #defines.
6016
1239777d
AD
60172001-12-30 Akim Demaille <akim@epita.fr>
6018
6019 * src/skeleton.h: New.
6020 * src/output.c (output_parser, output_master_parser): Remove, dead
6021 code.
6022 * src/output.h (get_lines_number, actions_output, guards_output)
6023 (token_definitions_output): Prototype them.
6024 * src/parse-skel.y: Add the license notice.
6025 Include output.h and skeleton.h.
6026 (process_skeleton): Returns void, and takes a single parameter.
6027 * src/scan-skel.l: Add the license notice.
6028 Include skeleton.h.
6029 Don't use %option yylineno: it seems that then Flex imagines
6030 REJECT has been used, and therefore it won't reallocate its
6031 buffers (which makes no other sense to me than a bug). It results
6032 in warnings for `unused: yy_flex_realloc'.
6033
9b3add5b
RA
60342001-12-30 Robert Anisko <robert.anisko@epita.fr>
6035
6036 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6037 (MUSCLE_INSERT_PREFIX): ...to there.
6038 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6039 (MUSCLE_INSERT_PREFIX): Move from here...
6040
6041 * src/bison.hairy: Add a section directive. Put braces around muscle
6042 names. This parser skeleton is still broken, but Bison should not
6043 choke on a bad muscle 'syntax'.
6044 * src/bison.simple: Add a section directive. Put braces around muscle
6045 names.
6046
6047 * src/files.h (strsuffix, stringappend): Add declarations.
6048 (tab_extension): Add declaration.
6049 (short_base_name): Add declaration.
6050
6051 * src/files.c (strsuffix, stringappend): No longer static. These
6052 functions are used in the skeleton parser.
6053 (tab_extension): New.
6054 (compute_base_names): Use the computations done in this function
fab5b110 6055 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
6056 names.
6057 (short_base_name): No longer static.
6058
6059 * src/output.c (output_skeleton): New.
6060 (output): Disable call to output_master_parser, and give a try to
6061 a new skeleton handling system.
6062 (guards_output, actions_output): No longer static.
6063 (token_definitions_output, get_lines_number): No longer static.
6064
6065 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6066
fab5b110 6067 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
6068 parse-skel.y.
6069
6070 * src/parse-skel.y: New file.
6071 * src/scan-skel.l: New file.
6072
b5b61c61
AD
60732001-12-29 Akim Demaille <akim@epita.fr>
6074
6075 %name-prefix is broken.
6076
6077 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6078 Adjust all dependencies.
6079 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6080 %name-prefix.
6081
6082 Renaming yylval but not yylloc is not consistent. Now we do.
6083
6084 * src/bison.simple: Prefix yylloc if used.
6085 * doc/bison.texinfo (Decl Summary): Document that.
6086
8c9a50be
AD
60872001-12-29 Akim Demaille <akim@epita.fr>
6088
6089 * doc/bison.texinfo: Promote `%long-directive' over
6090 `%long_directive'.
6091 Remove all references to fixed-output-files, yacc is enough.
6092
d99361e6
AD
60932001-12-29 Akim Demaille <akim@epita.fr>
6094
6095 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6096 user prologue. These are defaults.
6097 * tests/actions.at (Mid-rule actions): Make sure the user can
6098 define YYDEBUG and YYERROR_VERBOSE.
6099
b9cecb91
AD
61002001-12-29 Akim Demaille <akim@epita.fr>
6101
6102 * src/output.c (header_output): Don't forget to export YYLTYPE and
6103 yylloc.
6104 * tests/headers.at (export YYLTYPE): New, make sure it does.
6105 * tests/regression.at (%union and --defines, Invalid CPP headers):
6106 Move to...
6107 * tests/headers.at: here.
6108
aea13e97
AD
61092001-12-29 Akim Demaille <akim@epita.fr>
6110
6111 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6112
931394cb
AD
61132001-12-29 Akim Demaille <akim@epita.fr>
6114
6115 * tests/actions.at (Mid-rule actions): Output on a single line
6116 instead of several.
6117
704a47c4
AD
61182001-12-29 Akim Demaille <akim@epita.fr>
6119
6120 * doc/bison.texinfo: Formatting changes.
6121
091e20bb
AD
61222001-12-29 Akim Demaille <akim@epita.fr>
6123
6124 Don't store the token defs in a muscle, just be ready to output it
6125 on command. Now possible via `symbols'. Fixes a memory leak.
6126
6127 * src/output.c (token_definitions_output): New.
6128 (output_parser, header_output): Use it.
6129 * src/reader.c (symbols_save): Remove.
6130
cce71710
AD
61312001-12-29 Akim Demaille <akim@epita.fr>
6132
6133 * src/bison.simple: Do not provide a default for YYSTYPE and
6134 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6135 default.
6136
82c035a8
AD
61372001-12-29 Akim Demaille <akim@epita.fr>
6138
6139 Mid-rule actions are simply... ignored!
6140
6141 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6142 the empty-rule associated to the dummy symbol, not to the host
6143 rule.
6144 * tests/actions.at (Mid-rule actions): New.
6145
8419d367
AD
61462001-12-29 Akim Demaille <akim@epita.fr>
6147
6148 Memory leak.
6149
6150 * src/reader.c (reader): Free grammar.
6151
375d5806
AD
61522001-12-29 Akim Demaille <akim@epita.fr>
6153
6154 Memory leak.
6155
6156 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6157 since it allocates it for each state, although only one is needed.
6158 (allocate_storage): Do it here.
6159
f51cb8ff
AD
61602001-12-29 Akim Demaille <akim@epita.fr>
6161
6162 * src/options.h, src/options.c (create_long_option_table): Rename
6163 as...
6164 (long_option_table_new): this, with a clearer prototype.
6165 (percent_table): Remove, unused,
6166 * src/getargs.c (getargs): Adjust.
6167
29e88316
AD
61682001-12-29 Akim Demaille <akim@epita.fr>
6169
6170 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6171 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6172 as states.
6173
b9f71f19
AD
61742001-12-29 Akim Demaille <akim@epita.fr>
6175
6176 * src/lalr.c (build_relations): Rename `states' as `states1'.
6177 Sorry, I don't understand exactly what it is, no better name...
6178
1a2b5d37
AD
61792001-12-29 Akim Demaille <akim@epita.fr>
6180
6181 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6182 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6183 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6184 as rules.
6185
1cca533e
AD
61862001-12-29 Akim Demaille <akim@epita.fr>
6187
6188 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6189 ago.
6190
c03ae966
AD
61912001-12-29 Akim Demaille <akim@epita.fr>
6192
6193 * src/reader.c, src/reader.h (user_toknums): Remove.
6194 Adjust all users to use symbols[i]->user_token_number.
6195
5a670b1e
AD
61962001-12-29 Akim Demaille <akim@epita.fr>
6197
6198 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6199 Adjust all users to use symbols[i]->prec or ->assoc.
6200
ad949da9
AD
62012001-12-29 Akim Demaille <akim@epita.fr>
6202
6203 * src/reader.c, src/reader.h (tags): Remove.
6204 Adjust all users to use symbols[i]->tag.
6205
0e78e603
AD
62062001-12-29 Akim Demaille <akim@epita.fr>
6207
6208 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6209 and rule_table.
6210 * src/reader.c (packsymbols): Fill this table.
6211 Drop sprec.
6212 * src/conflicts.c (resolve_sr_conflict): Adjust.
6213 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6214 single table.
6215 Use symbols[i]->tag instead of tags[i].
6216
213e640e
AD
62172001-12-29 Akim Demaille <akim@epita.fr>
6218
6219 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6220 In addition, put a comment in there, to replace...
6221 * tests/regression.at (%union and C comments): Remove.
6222
e7b8bef1
AD
62232001-12-29 Akim Demaille <akim@epita.fr>
6224
6225 * tests/regression.at (Web2c Actions): Blindly move the actual
6226 output as expected output. The contents *seem* right to me, but I
6227 can't pretend reading perfectly parser tables... Nonetheless, all
6228 the other tests pass correctly, the table look OK, even though the
6229 presence of `$axiom' is to be noted: AFAICS it is useless (but
6230 harmless).
6231
b68e7744
AD
62322001-12-29 Akim Demaille <akim@epita.fr>
6233
6234 * src/reader.c (readgram): Don't add the rule 0 if there were no
6235 rules read. In other words, add it _after_ having performed
6236 grammar sanity checks.
6237 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6238
78d5bae9
AD
62392001-12-29 Akim Demaille <akim@epita.fr>
6240
6241 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6242 visible, and some states have now a different number.
6243
ff442794
AD
62442001-12-29 Akim Demaille <akim@epita.fr>
6245
6246 * src/reader.c (readgram): Bind the initial rule's lineno to that
6247 of the first rule.
6248 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6249 (Solved SR Conflicts): Adjust rule 0's line number.
6250
610ab194
AD
62512001-12-29 Akim Demaille <akim@epita.fr>
6252
6253 Fix the `GAWK Grammar' failure.
6254
6255 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6256 the reductions of the first state which was mistakenly confused
6257 with the final state because precisely final_state was initialized
6258 to 0.
6259 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6260 now noticed by Bison.
6261 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6262 have a reduction on $default.
6263
29d29c8f
AD
62642001-12-29 Akim Demaille <akim@epita.fr>
6265
6266 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6267 rule line numbers.
6268 * src/closure.c (print_closure): Likewise.
6269 * src/derives.c (print_derives): Likewise.
6270 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6271 now.
6272
7c6b64d0
AD
62732001-12-29 Akim Demaille <akim@epita.fr>
6274
6275 * src/lalr.c (lookaheads_print): New.
6276 (lalr): Call it when --trace-flag.
6277 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6278 are dumped.
6279
3d4daee3
AD
62802001-12-29 Akim Demaille <akim@epita.fr>
6281
6282 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6283 when walking through ritem, even via rule->rhs.
6284 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6285 (useful_production, useless_nonterminals): Likewise.
6286 (reduce_grammar_tables): Likewise, plus update nritems.
6287 * src/nullable.c (set_nullable): Likewise.
6288 * src/lalr.c (build_relations): Likewise.
6289 * tests/sets.at (Nullable): Adjust.
6290 Fortunately, now, the $axiom is no longer nullable.
6291
9e7f6bbd
AD
62922001-12-29 Akim Demaille <akim@epita.fr>
6293
6294 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6295 the 0-sentinel.
6296 * src/gram.c (ritem_longest_rhs): Likewise.
6297 * src/reduce.c (nonterminals_reduce): Likewise.
6298 * src/print_graph.c (print_graph): Likewise.
6299 * src/output.c (output_rule_data): Likewise.
6300 * src/nullable.c (set_nullable): Likewise.
6301
255ef638
AD
63022001-12-29 Akim Demaille <akim@epita.fr>
6303
6304 * src/output.c: Comment changes.
6305
0d8a7363
AD
63062001-12-27 Paul Eggert <eggert@twinsun.com>
6307
6308 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6309 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6310 Sparc, as they were causing more porting problems than the
6311 (minor) performance improvement was worth.
6312
6313 Also, catch up with 1.31's YYSTD.
6314
3db472b9
AD
63152001-12-27 Akim Demaille <akim@epita.fr>
6316
6317 * src/output.c (output_gram): Rely on nritems, not the
6318 0-sentinel. See below.
6319 Use -1 as separator, not 0.
6320 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6321 Rely on -1 as separator in yyrhs, instead of 0.
6322 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6323 twice `Now at end of input', therefore there are two lines less to
6324 expect.
6325
b365aa05
AD
63262001-12-27 Akim Demaille <akim@epita.fr>
6327
6328 * tests/regression.at (Unresolved SR Conflicts):
6329 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6330 below.
6331
30171f79
AD
63322001-12-27 Akim Demaille <akim@epita.fr>
6333
6334 * src/LR0.c (new_state): Recognize the final state by the fact it
6335 is reached by eoftoken.
6336 (insert_start_shifting_state, insert_eof_shifting_state)
6337 (insert_accepting_state, augment_automaton): Remove, since now
6338 these states are automatically computed from the initial state.
6339 (generate_states): Adjust.
6340 * src/print.c: When reporting a rule number to the user, substract
6341 1, so that the axiom rule is rule 0, and the first user rule is 1.
6342 * src/reduce.c: Likewise.
6343 * src/print_graph.c (print_core): For the time being, just as for
6344 the report, depend upon --trace-flags to dump the full set of
6345 items.
6346 * src/reader.c (readgram): Once the grammar read, insert the rule
6347 0: `$axiom: START-SYMBOL $'.
6348 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6349 number of the states has changed (the final state is no longer
6350 necessarily the last), catch up.
6351
75142d45
AD
63522001-12-27 Akim Demaille <akim@epita.fr>
6353
6354 Try to make the use of the eoftoken valid. Given that its value
6355 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6356 is used instead of > 0 where appropriate, (ii), depend upon nritems
6357 instead of the 0-sentinel.
6358
6359 * src/gram.h, src/gram.c (nritems): New.
6360 Expected to be duplication of nitems, but for the time being...
6361 * src/reader.c (packgram): Assert nritems and nitems are equal.
6362 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6363 * src/closure.c (print_closure, print_fderives): Likewise.
6364 * src/gram.c (ritem_print): Likewise.
6365 * src/print.c (print_core, print_grammar): Likewise.
6366 * src/print_graph.c: Likewise.
6367
b7c49edf
AD
63682001-12-27 Akim Demaille <akim@epita.fr>
6369
6370 * src/main.c (main): If there are complains after grammar
6371 reductions, then output the report anyway if requested, then die.
6372 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6373 * src/reader.c (eoftoken): New.
6374 (parse_token_decl): If the token being defined has value `0', it
6375 is the eoftoken.
6376 (packsymbols): No longer hack `tags' to insert `$' by hand.
6377 Be sure to preserve the value of the eoftoken.
6378 (reader): Make sure eoftoken is defined.
6379 Initialize nsyms to 0: now eoftoken is created just like the others.
6380 * src/print.c (print_grammar): Don't special case the eof token.
6381 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6382 lie anyway, albeit pleasant.
6383 * tests/calc.at: Exercise error messages with eoftoken.
6384 Change the grammar so that empty input is invalid.
6385 Adjust expectations.
6386 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6387
ec2da99f
AD
63882001-12-27 Akim Demaille <akim@epita.fr>
6389
6390 * configure.in: Check the protos of strchr ans strspn.
6391 Replace strchr if needed.
6392 * src/system.h: Provide the protos of strchr, strspn and memchr if
6393 missing.
6394 * lib/strchr.c: New.
6395 * src/reader.c (symbols_save): Use strchr.
6396
8adfa272
AD
63972001-12-27 Akim Demaille <akim@epita.fr>
6398
6399 * src/print.c, src/print_graph.c (escape): New.
6400 Use it to quote the TAGS outputs.
6401 * src/print_graph.c (print_state): Now errors are in red, and
6402 reductions in green.
6403 Prefer high to wide: output the state number on a line of its own.
6404
80dac38c
AD
64052001-12-27 Akim Demaille <akim@epita.fr>
6406
6407 * src/state.h, src/state.c (reductions_new): New.
6408 * src/LR0.c (set_state_table): Let all the states have a
6409 `reductions', even if reduced to 0.
6410 (save_reductions): Adjust.
6411 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6412 * src/print.c (print_reductions, print_actions): Adjust.
6413 * src/output.c (action_row): Adjust.
6414
2cec70b9
AD
64152001-12-27 Akim Demaille <akim@epita.fr>
6416
6417 * src/state.h, src/state.c (errs_new, errs_dup): New.
6418 * src/LR0.c (set_state_table): Let all the states have an errs,
6419 even if reduced to 0.
6420 * src/print.c (print_errs, print_reductions): Adjust.
6421 * src/output.c (output_actions, action_row): Adjust.
6422 * src/conflicts.c (resolve_sr_conflict): Adjust.
6423
13ca549a
AD
64242001-12-27 Akim Demaille <akim@epita.fr>
6425
6426 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6427
5092aba5
AD
64282001-12-27 Akim Demaille <akim@epita.fr>
6429
6430 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6431 * src/print.c: here.
6432 (lookaheadset, shiftset): New, used as additional storage by
6433 print_reductions.
6434 (print_results): Adjust.
6435 (print_shifts, print_gotos, print_errs): New, extracted from...
6436 (print_actions): here.
6437 * src/print_graph.c (print_actions): Remove dead code.
6438
11e2beca
AD
64392001-12-27 Akim Demaille <akim@epita.fr>
6440
6441 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6442 `$n' and `@n'.
6443
dac3c910
AD
64442001-12-27 Akim Demaille <akim@epita.fr>
6445
6446 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6447 (build_relations): Adjust.
6448
d0b0fefa
AD
64492001-12-27 Akim Demaille <akim@epita.fr>
6450
6451 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6452 duplication.
6453
adc8c848
AD
64542001-12-27 Akim Demaille <akim@epita.fr>
6455
6456 * src/reader.c (packgram): Catch nitems overflows.
6457
14d293ac
AD
64582001-12-27 Akim Demaille <akim@epita.fr>
6459
6460 * src/files.c, src/files.h (guard_obstack): Remove.
6461 * src/output.c (output): Adjust.
6462 * src/reader.c (parse_braces): New, factoring...
6463 (copy_action, copy_guard): these two which are renamed as...
6464 (parse_action, parse_guard): these.
6465 As a voluntary consequence, using braces around guards is now
6466 mandatory.
6467
f499b062
AD
64682001-12-27 Akim Demaille <akim@epita.fr>
6469
6470 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6471 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6472 members.
6473 (symbol_list_new): Adjust.
6474 (copy_action): action_line is the first line, not the last.
6475 (copy_guard): Just as for actions, store the `action' only, not
6476 the switch/case/break flesh.
6477 Don't parse the user action that might follow the guard, let...
6478 (readgram): do it, i.e., now, there can be an action after a
6479 guard.
6480 In other words the guard is just explicitly optional.
6481 (packgram): Adjust.
6482 * src/output.c (guards_output): New.
6483 (output_parser): Call it when needed.
6484 (output): Also free the guard and attrs obstacks.
6485 * src/files.c, src/files.h (obstack_save): Remove.
6486 (output_files): Remove.
6487 As a result, if one needs the former `.act' file, using an
6488 appropriate skeleton which requires actions and guards is now
6489 required.
6490 * src/main.c (main): Adjust.
6491 * tests/semantic.at: New.
6492 * tests/regression.at: Use `input.y' as input file name.
6493 Avoid 8+3 problems by requiring input.c when the test needs the
6494 parser.
6495
d945f5cd
AD
64962001-12-27 Akim Demaille <akim@epita.fr>
6497
6498 * src/reader.c (symbol_list_new): Be sure to initialize all the
6499 fields.
6500
d200e455
AD
65012001-12-27 Akim Demaille <akim@epita.fr>
6502
6503 All the hacks using a final pseudo state are now useless.
6504
6505 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6506 * src/lalr.c (nLA): New.
6507 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6508 instead of lookaheadsp from the pseudo state (nstate + 1).
6509
f9507c28
AD
65102001-12-27 Akim Demaille <akim@epita.fr>
6511
6512 * src/output.c (action_row, token_actions): Use a state_t instead
6513 of a integer, and nlookaheads instead of the following state's
6514 lookaheadsp.
6515
065fbd27
AD
65162001-12-27 Akim Demaille <akim@epita.fr>
6517
6518 * src/conflicts.c (log_resolution, flush_shift)
6519 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6520 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6521 (conflicts_print, print_reductions): Use a state_t instead of an
6522 integer when referring to a state.
6523 As much as possible, depend upon nlookaheads, instead of the
6524 `lookaheadsp' member of the following state (since lookaheads of
6525 successive states are successive, the difference between state n + 1
6526 and n served as the number of lookaheads for state n).
6527 * src/lalr.c (add_lookback_edge): Likewise.
6528 * src/print.c (print_core, print_actions, print_state)
6529 (print_results): Likewise.
6530 * src/print_graph.c (print_core, print_actions, print_state)
6531 (print_graph): Likewise.
6532 * src/conflicts.h: Adjust.
6533
1b177bd7
AD
65342001-12-27 Akim Demaille <akim@epita.fr>
6535
6536 * src/bison.hairy: Formatting/comment changes.
6537 ANSIfy.
6538 Remove `register' indications.
6539 Add plenty of `static'.
6540
7742ddeb
AD
65412001-12-27 Akim Demaille <akim@epita.fr>
6542
6543 * src/output.c (prepare): Drop the muscle `ntbase' which
6544 duplicates ntokens.
6545 * src/bison.simple: Formatting/comment changes.
6546 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6547 is an undocumented synonym.
6548
1fa14068
AD
65492001-12-22 Akim Demaille <akim@epita.fr>
6550
6551 * src/output.c (output_table_data): Change the prototype to use
6552 `int' for array ranges: some invocations do pass an int, not a
6553 short.
6554 Reported by Wayne Green.
6555
b9752825
AD
65562001-12-22 Akim Demaille <akim@epita.fr>
6557
6558 Some actions of web2c.y are improperly triggered.
6559 Reported by Mike Castle.
6560
6561 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6562 * tests/regression.at (Web2c): Rename as...
6563 (Web2c Report): this.
6564 (Web2c Actions): New.
6565
776209d6
AD
65662001-12-22 Akim Demaille <akim@epita.fr>
6567
6568 Reductions in web2c.y are improperly reported.
6569 Reported by Mike Castle.
6570
6571 * src/conflicts.c (print_reductions): Fix.
6572 * tests/regression.at (Web2c): New.
6573
275fc3ad
AD
65742001-12-18 Akim Demaille <akim@epita.fr>
6575
6576 Some host fail on `assert (!"foo")', which expands to
6577 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6578 Reported by Nelson Beebee.
6579
6580 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6581 `#define it_succeeded 0' and `assert (it_succeeded)'.
6582
897668ee
MA
65832001-12-17 Marc Autret <autret_m@epita.fr>
6584
6585 * src/bison.simple: Don't hard code the skeleton line and filename.
6586 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6587 New line counter 'skeleton_line' (skeleton-line muscle).
6588
ab3399e0
PE
65892001-12-17 Paul Eggert <eggert@twinsun.com>
6590
6591 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6592 YYDEBUG must be defined to a nonzero value.
6593
6594 * src/bison.simple (yytname): Do not assume that the user defines
6595 YYDEBUG to a properly parenthesized expression.
6596
3877f72b
AD
65972001-12-17 Akim Demaille <akim@epita.fr>
6598
6599 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6600 nlookaheads is a new member.
6601 Adjust all users.
6602 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6603 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6604 state.
776209d6 6605
331dbc1b
AD
66062001-12-17 Akim Demaille <akim@epita.fr>
6607
6608 * src/files.h, src/files.c (open_files, close_files): Remove.
6609 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6610 let...
6611 * src/reader.c (reader): Do it.
776209d6 6612
be750e4c
AD
66132001-12-17 Akim Demaille <akim@epita.fr>
6614
6615 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 6616
709ae8c6
AD
66172001-12-17 Akim Demaille <akim@epita.fr>
6618
6619 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6620 (flush_reduce): New.
6621 (resolve_sr_conflict): Adjust.
776209d6 6622
f87685c3
AD
66232001-12-17 Akim Demaille <akim@epita.fr>
6624
6625 * src/output.c (output_obstack): Be static and rename as...
6626 (format_obstack): this, to avoid any confusion with files.c's
6627 output_obstack.
6628 * src/reader.h (muscle_obstack): Move to...
6629 * src/output.h: here, since it's defined in output.c.
6630
837491d8
AD
66312001-12-17 Akim Demaille <akim@epita.fr>
6632
6633 * src/output.c (action_row, save_column, default_goto)
6634 (sort_actions, matching_state, pack_vector): Better variable
6635 locality.
6636
796d61fb
AD
66372001-12-17 Akim Demaille <akim@epita.fr>
6638
6639 * src/output.c: Various formatting changes.
776209d6 6640
64d15509
AD
66412001-12-17 Akim Demaille <akim@epita.fr>
6642
6643 * src/files.c (output_files): Free the output_obstack.
6644 * src/main.c (main): Call print and print_graph conditionally.
6645 * src/print.c (print): Work unconditionally.
6646 * src/print_graph.c (print_graph): Work unconditionally.
6647 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6648
fbc8ecb7
MA
66492001-12-16 Marc Autret <autret_m@epita.fr>
6650
6651 * src/output.c (actions_output): Fix. When we use %no-lines,
6652 there is one less line per action.
6653
f0440388
MA
66542001-12-16 Marc Autret <autret_m@epita.fr>
6655
6656 * src/bison.simple: Remove a useless #line directive.
6657 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6658 * src/output.c (get_lines_number): New.
776209d6 6659 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
6660 output muscles.
6661 Fix line numbering.
6662 (actions_output): Computes the number of lines taken by actions.
6663 (output_master_parser): Insert new skeleton which is the name of
6664 the output parser file name.
6665
a79986b8
MA
66662001-12-15 Marc Autret <autret_m@epita.fr>
6667
6668 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6669
4ec8e00f
MA
66702001-12-15 Marc Autret <autret_m@epita.fr>
6671
6672 * src/output.c (output_gram): Keep track of the hairy one.
6673
1a4648ff
AD
66742001-12-15 Akim Demaille <akim@epita.fr>
6675
6676 Make `make distcheck' work.
6677
6678 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6679 system.h which uses libgettext.h.
6680
9c2c67e6
AD
66812001-12-15 Akim Demaille <akim@epita.fr>
6682
6683 * src/nullable.c (set_nullable): Useless rules must be skipped,
6684 otherwise, since we range over their symbols, we might look at a
6685 nonterminal which no longer ``exists'', i.e., it is not counted in
6686 `nvars', hence we overflow our arrays.
6687
93ede233
AD
66882001-12-15 Akim Demaille <akim@epita.fr>
6689
6690 The header can also be produced directly, without any obstack!
6691 Yahoo!
6692
6693 * src/files.c, src/files.h (defines_obstack): Remove.
6694 (compute_header_macro): Global.
6695 (defines_obstack_save): Remove.
6696 * src/reader.c (parse_union_decl): No longer output to
6697 defines_obstack: its content can be found in the `stype' muscle
6698 anyway.
6699 (output_token_translations): Merge into...
6700 (symbols_output): this.
6701 Rename as...
6702 (symbols_save): this.
6703 (reader): Adjust.
6704 * src/output.c (header_output): New.
6705 (output): Call it.
6706
2666f928
AD
67072001-12-15 Akim Demaille <akim@epita.fr>
6708
6709 * src/reader.c (parse_union_decl): Instead of handling two obstack
6710 simultaneously, use one to define the `stype' muscle, and use the
6711 value of the latter to fill defines_obstack.
6712 (copy_comment): Remove.
6713 (copy_comment2): Work for a single obstack.
6714 Rename as...
6715 (copy_comment): this.
6716
428046f8
AD
67172001-12-15 Akim Demaille <akim@epita.fr>
6718
6719 * src/lex.c, src/lex.h (xgetc): No longer static.
6720 * src/reader.c (parse_union_decl): Revamp.
6721
ea52d706
AD
67222001-12-15 Akim Demaille <akim@epita.fr>
6723
6724 Still making progress in separating Bison into (i) input, (ii)
6725 process, (iii) output: now we can directly output the parser file
6726 without using table_obstack at all.
6727
6728 * src/files.c, src/files.h (table_obstack): Bye bye.
6729 (parser_file_name): New.
6730 * src/files.c (compute_output_file_names): Compute it.
6731 * src/output.c (actions_output, output_parser)
6732 (output_master_parser): To a file instead of an obstack.
6733
3f96f4dc
AD
67342001-12-15 Akim Demaille <akim@epita.fr>
6735
6736 Attach actions to rules, instead of pre-outputting them to
6737 actions_obstack.
6738
6739 * src/gram.h (rule_t): action and action_line are new members.
6740 * src/reader.c (symbol_list): Likewise.
6741 (copy_action): Save the actions within the rule.
6742 (packgram): Save them in rule_table.
6743 * src/output.c (actions_output): New.
6744 (output_parser): Use it on `%%actions'.
6745 (output_rule_data): Don't free rule_table.
6746 (output): Do it.
6747 (prepare): Don't save the `action' muscle.
6748 * src/bison.simple: s/%%action/%%actions/.
6749
51576fb3
AD
67502001-12-15 Akim Demaille <akim@epita.fr>
6751
6752 * src/reader.c (copy_action): When --yacc, don't append a `;'
6753 to the user action: let it fail if lacking.
dee049eb 6754 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 6755
2648a72d
AD
67562001-12-14 Akim Demaille <akim@epita.fr>
6757
6758 * src/lex.c (literalchar): Simply return the char you decoded, non
6759 longer mess around with obstacks and int pointers.
6760 Adjust all callers.
6761
92790e5b
AD
67622001-12-14 Akim Demaille <akim@epita.fr>
6763
6764 * src/lex.c (literalchar): Don't escape the special characters,
6765 just decode them, and keep them as char (before, eol was output as
6766 the 2 char string `\n' etc.).
6767 * src/output.c (output_rule_data): Use quotearg to output the
6768 token strings.
6769
927c1557
PE
67702001-12-13 Paul Eggert <eggert@twinsun.com>
6771
6772 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6773 Do not infringe on the global user namespace when using C++.
6774 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6775 All uses of `fprintf' and `stderr' changed.
6776
6777 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6778
ed8e1f68
AD
67792001-12-13 Akim Demaille <akim@epita.fr>
6780
6781 The computation of nullable is broken: it doesn't handle empty
6782 RHS's properly.
6783
6784 * tests/torture.at (GNU AWK Grammar): New.
6785 * tests/sets.at (Nullable): New.
6786 * src/nullable.c (set_nullable): Instead of blindly looping over
6787 `ritems', loop over the rules, and then over their rhs's.
6788
6789 Work around Autotest bugs.
6790
6791 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6792 frame, because Autotest understand lines starting with a `+' as
6793 traces from the shell. Then, they are not processed properly.
6794 Admittedly an Autotest bug, but we don't have time to wait for
6795 Autotest to catch up.
6796 * tests/regression.at (Broken Closure): Adjust to the new table
6797 frames.
6798 Move to...
6799 * tests/sets.at: here.
6800
cb581495
AD
68012001-12-13 Akim Demaille <akim@epita.fr>
6802
6803 * src/closure.c (closure): Use nrules instead of playing tricks
6804 with BITS_PER_WORD.
6805
2e729273
AD
68062001-12-13 Akim Demaille <akim@epita.fr>
6807
6808 * src/print.c (print_actions): Output the handling of `$' as the
6809 traces do: shifting the token EOF. Before EOF was treated as a
6810 nonterminal.
6811 * tests/regression.at: Adjust some tests.
6812 * src/print_graph.c (print_core): Complete the set of items via
6813 closure. The next-to-final and final states are still unsatisfying,
6814 but that's to be addressed elsewhere.
6815 No longer output the rule numbers, but do output the state number.
6816 A single loop for the shifts + gotos is enough, but picked a
6817 distinct color for each.
6818 (print_graph): Initialize and finalize closure.
6819
107f7dfb
AD
68202001-12-13 Akim Demaille <akim@epita.fr>
6821
6822 * src/reader.c (readgram): Remove dead code, an strip useless
6823 braces.
6824 (get_type): Remove, unused.
6825
9b53a24f
AD
68262001-12-12 Akim Demaille <akim@epita.fr>
6827
6828 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6829 on that of lib/error.c.
6830
dbfb6dcd
AD
68312001-12-12 Akim Demaille <akim@epita.fr>
6832
6833 Some hosts don't like `/' in includes.
6834
6835 * src/system.h: Include libgettext.h without qualifying the path.
6836 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6837 $(top_srcdir).
6838
c25fb648
MA
68392001-12-11 Marc Autret <autret_m@epita.fr>
6840
6841 * src/output.c (output_parser): Remove useless muscle.
6842
710ddc4f
MA
68432001-12-11 Marc Autret <autret_m@epita.fr>
6844
6845 * src/bison.simple: Remove #line just before %%epilogue. It
6846 is now handled in ...
6847 * src/reader.c (read_additionnal_code): Add the output of a
6848 #line for the epilogue.
6849
e83d80b8
MA
68502001-12-10 Marc Autret <autret_m@epita.fr>
6851
927c1557 6852 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
6853 replace precedent remove.
6854 * src/bison.simple: Remove #line before %%prologue because
6855 %%input-line is wrong at this time.
6856
971d5158
MA
68572001-12-10 Marc Autret <autret_m@epita.fr>
6858
6859 * src/reader.c (symbols_output): Clean up.
927c1557 6860 * src/output.c (output_gram, output): Clean up.
971d5158 6861
5edafffd
AD
68622001-12-10 Akim Demaille <akim@epita.fr>
6863
6864 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6865 * src/LR0.c (set_state_table): here.
6866 * src/lalr.c (lalr): Call it.
6867
0279f8e9
AD
68682001-12-10 Akim Demaille <akim@epita.fr>
6869
6870 * src/state.h (shifts): Remove the `number' member: shifts are
6871 attached to state, hence no longer need to be labelled with a
6872 state number.
6873
190c4f5f
AD
68742001-12-10 Akim Demaille <akim@epita.fr>
6875
6876 Now that states have a complete set of members, the linked list of
6877 shifts is useless: just fill directly the state's shifts member.
6878
6879 * src/state.h (shifts): Remove the `next' member.
6880 * src/LR0.c (first_state, last_state): Remove.
6881 Adjust the callers.
6882 (augment_automaton): Don't look for the shifts that must be added
6883 a shift on EOF: it is those of the state we looked for! But now,
6884 since shifts are attached, it is no longer needed to looking
6885 merely by its id: its number.
6886
2a73b93d
AD
68872001-12-10 Akim Demaille <akim@epita.fr>
6888
6889 * src/LR0.c (augment_automaton): Better variable locality.
6890 Remove an impossible branch: if there is a state corresponding to
6891 the start symbol being shifted, then there is shift for the start
6892 symbol from the initial state.
6893
74392f6a
AD
68942001-12-10 Akim Demaille <akim@epita.fr>
6895
6896 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6897 only when appropriate: when insert_start_shifting_state' is not
6898 invoked.
6899 * tests/regression.at (Rule Line Numbers): Adjust.
6900
37c82725
AD
69012001-12-10 Akim Demaille <akim@epita.fr>
6902
6903 * src/LR0.c (augment_automaton): Now that all states have shifts,
6904 merge the two cases addition shifts to the initial state.
6905
6a164e0c
AD
69062001-12-10 Akim Demaille <akim@epita.fr>
6907
6908 * src/lalr.c (set_state_table): Move to...
6909 * src/LR0.c: here.
6910 * src/lalr.c (lalr): Don't call it...
6911 * src/LR0.c (generate_states): do it.
6912 * src/LR0.h (first_state): Remove, only the table is used.
6913
7215de24
AD
69142001-12-10 Akim Demaille <akim@epita.fr>
6915
6916 * src/LR0.h (first_shift, first_reduction): Remove.
6917 * src/lalr.c: Don't use first_shift: find shifts through the
6918 states.
6919
80e25d4d
AD
69202001-12-10 Akim Demaille <akim@epita.fr>
6921
6922 * src/LR0.c: Attach shifts to states as soon as they are
6923 computed.
6924 * src/lalr.c (set_state_table): Instead of assigning shifts to
6925 state, just assert that the mapping was properly done.
6926
0ab3728b
AD
69272001-12-10 Akim Demaille <akim@epita.fr>
6928
6929 * src/LR0.c (insert_start_shift): Rename as...
6930 (insert_start_shifting_state): this.
6931 (insert_eof_shifting_state, insert_accepting_state): New.
6932 (augment_automaton): Adjust.
6933 Better locality of the variables.
6934 When looking if the start_symbol is shifted from the initial
6935 state, using `while (... symbol != start_symbol ...)' sounds
6936 better than `while (... symbol < start_symbol ...)': If fail
6937 to see how the order between symbols could be relevant!
6938
78af9bbc
AD
69392001-12-10 Akim Demaille <akim@epita.fr>
6940
6941 * src/getargs.h: Don't declare `spec_name_prefix' and
6942 `spec_file_prefix', declared by src/files.h.
6943 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6944 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6945 * src/output.c (prepare): Adjust.
6946 * src/reader.c (symbols_output): Likewise.
6947 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6948
bdef2a41
AD
69492001-12-10 Akim Demaille <akim@epita.fr>
6950
6951 * src/muscle_tab.c (muscle_init): NULL is a better default than
6952 `"0"'.
6953
3735969c
AD
69542001-12-10 Akim Demaille <akim@epita.fr>
6955
6956 * src/reader.c (reader): Calling symbols_output once is enough.
6957
49701457
AD
69582001-12-10 Akim Demaille <akim@epita.fr>
6959
6960 Now that states have a complete set of members, the linked list of
6961 reductions is useless: just fill directly the state's reductions
6962 member.
6963
6964 * src/state.h (struct reductions): Remove member `number' and
6965 `next'.
6966 * src/LR0.c (first_reduction, last_reduction): Remove.
6967 (save_reductions): Don't link the new reductions, store them in
6968 this_state.
6969 * src/lalr.c (set_state_table): No need to attach reductions to
6970 states, it's already done.
6971 * src/output.c (output_actions): No longer free the shifts, then
6972 the reductions, then the states: free all the states and their
6973 members.
6974
0edad749
AD
69752001-12-10 Akim Demaille <akim@epita.fr>
6976
6977 * src/options.c (OPTN, DRTV, BOTH): New.
6978 (option_table): Use them.
6979
0edad749
AD
6980 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6981 the job of system.h.
6982 * src/options.c: Don't include stdio.h and xalloc.h for the same
6983 reasons.
6984
5449dd0f
AD
69852001-12-10 Akim Demaille <akim@epita.fr>
6986
6987 * src/output.c (output, prepare): Make sure the values of the
6988 muscles `action' and `prologue' are 0-terminated.
6989
a870c567
AD
69902001-12-10 Akim Demaille <akim@epita.fr>
6991
6992 Clean up GCC warnings.
6993
6994 * src/reader.c (copy_action): `buf' is not used.
6995 (parse_skel_decl): Be static.
6996 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6997 * src/options.h (create_long_option_table): Have a real prototype.
6998 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6999 (hash_delete_at): Return const void *.
7000 Adjust casts to preserve the const.
7001
80df8768
AD
70022001-12-10 Akim Demaille <akim@epita.fr>
7003
7004 * configure.in: Require 2.52g.
7005 M4 is not needed, but AUTOM4TE is.
7006 * m4/m4.m4: Remove.
7007 * tests/Makefile.am: Adjust.
7008
f693ad14
AD
70092001-12-10 Akim Demaille <akim@epita.fr>
7010
7011 One structure for states is enough, even though theoretically
7012 there are LR(0) states and LALR(1) states.
7013
7014 * src/lalr.h (state_t): Remove.
7015 (state_table): Be state_t **, not state_t *.
7016 * src/state.h (core, CORE_ALLOC): Rename as...
7017 (state_t, STATE_ALLOC): this.
7018 Add the LALR(1) members: shifts, reductions, errs.
7019 * src/LR0.c (state_table): Rename as...
7020 (state_hash): this, to avoid name clashes with the global
7021 `state_table'.
7022 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7023 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7024
74ffbcb6
AD
70252001-12-10 Akim Demaille <akim@epita.fr>
7026
7027 Bison dumps core on bash.y.
7028 Reported by Pascal Bart.
7029
7030 * src/warshall.c (bitmatrix_print): New.
7031 (TC): Use it.
7032 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7033 j must be the outer loop.
7034 * tests/regression.at (Broken Closure): New.
7035
07708e19
AD
70362001-12-05 Akim Demaille <akim@epita.fr>
7037
7038 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7039 its argument.
ba1ecc07 7040 Reported by Peter Hamorsky.
07708e19 7041
92b16366
AD
70422001-12-05 Akim Demaille <akim@epita.fr>
7043
7044 * src/conflicts.c (err_table): Remove.
7045 (resolve_sr_conflict): Adjust.
7046 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7047 Rename as...
7048 (state_t.reductions, state_t.shifts): this.
7049
076ab033
AD
70502001-12-05 Akim Demaille <akim@epita.fr>
7051
7052 * src/reduce.c (reduce_grammar_tables): No longer disable the
7053 removal of useless rules via CPP but via `if (0)', so that the
7054 compiler still check the code is valid.
7055 For instance, it should have noticed `rline' no longer exists: use
7056 the `line' member of rule_t.
7057 * src/gram.c (dummy, rline): Remove, unused.
7058
3843c413
AD
70592001-12-05 Akim Demaille <akim@epita.fr>
7060
7061 * src/output.c (pack_vector): Use assert, not berror.
7062 * src/main.c (berror): Remove, unused.
7063
43168960
AD
70642001-12-05 Akim Demaille <akim@epita.fr>
7065
7066 New experimental feature: if --verbose --trace output all the
7067 items of a state, not only its kernel.
7068
7069 * src/print.c (print_core): If `trace_flag', then invoke closure
7070 before outputting the items of the state (print_core is no longer
7071 a correct name them).
7072 (print_results): Invoke new_closure/free_closure if needed.
7073
b2872512
AD
70742001-12-05 Akim Demaille <akim@epita.fr>
7075
7076 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7077 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7078 (nitemset): for consistency with the rest of the project.
7079
23cbcc6c
AD
70802001-12-05 Akim Demaille <akim@epita.fr>
7081
7082 * src/closure.c (print_closure): Improve.
7083 (closure): Use it for printing input and output.
7084
03ec521c
AD
70852001-12-05 Akim Demaille <akim@epita.fr>
7086
7087 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7088 indexed by nonterminals.
7089
3a7456dd
AD
70902001-12-05 Akim Demaille <akim@epita.fr>
7091
7092 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7093 what it was!).
7094 * src/warshall.h: Remove accidental duplication of the content.
7095
1cbcf2e7
AD
70962001-12-05 Akim Demaille <akim@epita.fr>
7097
7098 * src/closure.c (set_fderives): De-obfuscate.
7099
84182270
AD
71002001-12-05 Akim Demaille <akim@epita.fr>
7101
7102 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7103
3f6f053c
AD
71042001-12-05 Akim Demaille <akim@epita.fr>
7105
7106 * src/closure.c (set_firsts): De-obfuscate.
7107
7a5350ba
AD
71082001-12-05 Akim Demaille <akim@epita.fr>
7109
7110 * src/output.c (action_row): De-obfuscate
7111 using the good o' techniques: arrays not pointers, variable
7112 locality, BITISSET, RESETBIT etc.
7113
d954473d
AD
71142001-12-05 Akim Demaille <akim@epita.fr>
7115
7116 Pessimize the code to simplify it: from now on, all the states
7117 have a valid SHIFTS, which NSHIFTS is possibly 0.
7118
7119 * src/LR0.c (shifts_new): Be global and move to..
7120 * src/state.c, src/state.h: here.
7121 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7122 * src/print_graph: Adjust.
7123
9839bbe5
AD
71242001-12-05 Akim Demaille <akim@epita.fr>
7125
7126 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7127 * src/conflicts.c: Use it.
7128 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7129 incorrectly ``simplified''.
7130
9f136c07
AD
71312001-12-05 Akim Demaille <akim@epita.fr>
7132
7133 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7134 using the good o' techniques: arrays not pointers, variable
7135 locality, BITISSET, RESETBIT etc.
7136
b608206e
AD
71372001-12-05 Akim Demaille <akim@epita.fr>
7138
7139 * src/state.h (SHIFT_SYMBOL): New.
7140 * src/conflicts.c: Use it to deobfuscate.
7141
52afa962
AD
71422001-12-05 Akim Demaille <akim@epita.fr>
7143
7144 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7145 (print_reductions): De-obfuscate using the good o' techniques:
7146 arrays not pointers, variable locality, BITISSET.
7147
e74dc321
AD
71482001-12-05 Akim Demaille <akim@epita.fr>
7149
7150 * src/conflicts.c (print_reductions): Arrays, not pointers.
7151 Use BITISSET.
7152
768fca83
AD
71532001-12-05 Akim Demaille <akim@epita.fr>
7154
7155 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7156
a17e599f
AD
71572001-12-05 Akim Demaille <akim@epita.fr>
7158
7159 * src/conflicts.c (print_reductions): Improve variable locality.
7160
a04bc341
AD
71612001-12-05 Akim Demaille <akim@epita.fr>
7162
7163 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7164
c8ea038e
AD
71652001-12-05 Akim Demaille <akim@epita.fr>
7166
7167 * src/conflicts.c (print_reductions): Improve variable locality.
7168
aa2aab3c
AD
71692001-12-05 Akim Demaille <akim@epita.fr>
7170
7171 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7172 * src/lalr.c: Use them.
7173
b178c8cc
AD
71742001-12-05 Akim Demaille <akim@epita.fr>
7175
7176 * src/LR0.c (augment_automaton): Formatting changes.
7177 Better variable locality.
7178
f67d13aa
AD
71792001-12-05 Akim Demaille <akim@epita.fr>
7180
7181 * src/lalr.c (matrix_print): New.
7182 (transpose): Use it.
7183 Use arrays instead of pointers.
7184
c2713865
AD
71852001-12-05 Akim Demaille <akim@epita.fr>
7186
7187 * src/lalr.c (maxrhs): Move to...
7188 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7189 * src/lalr.c (build_relations): Adjust.
7190
9887c18a
AD
71912001-12-05 Akim Demaille <akim@epita.fr>
7192
7193 * src/lalr.c (transpose): Free the memory allocated to the
7194 argument, as it is replaced by the results by the unique caller.
7195 (build_relations): Merely invoke transpose: it handles the memory
7196 deallocation.
7197 Improve variable locality.
7198 Avoid variables used as mere abbreviations.
7199 (compute_lookaheads): Use arrays instead of pointers.
7200
4d4f699c
AD
72012001-12-05 Akim Demaille <akim@epita.fr>
7202
7203 * src/lalr.c (initialize_F): Improve variable locality.
7204 Avoid variables used as mere abbreviations.
7205
80a69750
AD
72062001-12-05 Akim Demaille <akim@epita.fr>
7207
7208 * src/derives.c (print_derives): Display the ruleno.
7209 * src/lalr.c (initialize_F, transpose): Better variable locality
7210 to improve readability.
7211 Avoid variables used as mere abbreviations.
7212
fe961097
AD
72132001-12-05 Akim Demaille <akim@epita.fr>
7214
7215 * src/lalr.c (traverse): Use arrays instead of pointers.
7216
e3e4e814
AD
72172001-12-05 Akim Demaille <akim@epita.fr>
7218
7219 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7220 the handling of squeue.
7221 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7222
630e182b
AD
72232001-12-05 Akim Demaille <akim@epita.fr>
7224
7225 Because useless nonterminals are now kept alive (instead of being
7226 `destroyed'), we now sometimes examine them, and store information
7227 related to them. Hence we need to know their number, and adjust
7228 memory allocations.
7229
7230 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7231 static.
7232 * src/LR0.c (allocate_itemsets): The memory allocated to
7233 `symbol_count' was used for two different purpose: once to count
7234 the number of occurrences of each symbol, and later reassigned to
7235 `shift_symbol', containing the symbol that can be shifted from a
7236 given state.
7237 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7238 only, and...
7239 (new_itemsets): Allocate `shift_symbol' here.
7240 (allocate_itemsets): symbol_count includes useless nonterminals.
7241 Make room for them.
7242 (free_storage): Use `free', not `XFREE', for pointers that cannot
7243 be null.
7244
81b51460
AD
72452001-12-05 Akim Demaille <akim@epita.fr>
7246
7247 * src/nullable.c (set_nullable): Deobfuscate the handling of
7248 ritem.
7249 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7250
3067fbef
AD
72512001-12-05 Akim Demaille <akim@epita.fr>
7252
7253 * src/gram.c, src/gram.h (ritem_print): New.
7254 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7255 (This useless function was defined only to work around VMS linkers
7256 that can't handle compilation units with variables only).
7257 * src/reduce.c (dump_grammar): Use it to trace the construction of
7258 ritem.
7259
c2bea5f9
PE
72602001-12-04 Paul Eggert <eggert@twinsun.com>
7261
7d27c823
PE
7262 * src/bison.simple (union yyalloc): Change member names
7263 to be the same as the stack names.
7264 (yyparse): yyptr is now union yyalloc *, not char *.
7265 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7266 and may generate better code on some machines.
c2bea5f9
PE
7267 (yystpcpy): Use prototype if __STDC__ is defined, not just
7268 if __cplusplus is defined.
35687a9d 7269
2c8a9dfa
AD
72702001-11-30 Akim Demaille <akim@epita.fr>
7271
7272 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7273 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7274 Gettext doesn't compile cleanly, and dies with -Werror.
7275 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7276 Include WARNING_CFLAGS here.
7277 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7278 before being defined.
7279
f4e421e6
AD
72802001-11-27 Paul Eggert <eggert@twinsun.com>
7281
7282 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7283 First arg is int, not unsigned.
7284 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7285 (SIZE_MAX, UINT_MAX): New macros.
7286 (quotearg_n_options): Abort if N is negative.
7287 Avoid overflow check on hosts where size_t is 64 bits and int
7288 is 32 bits, as overflow is impossible there.
7289 Fix off-by-one typo that caused unnecessary reallocation.
7290
7093d0f5
AD
72912001-11-29 Paul Eggert <eggert@twinsun.com>
7292
7293 Name space cleanup in generated parser.
7294
7295 * doc/bison.texinfo (Bison Parser): Discuss system headers
7296 and their effect on the user name space.
7297
7298 * src/bison.simple:
7299 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7300 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7301 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7302
7303 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7304 on user names when possible.
7305
7306 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7307 Simplify test for whather <alloca.h> exists.
7308
7309 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7310
7311 (<stdio.h>): Include if YYDEBUG.
7312
7313 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7314 ! defined (yyoverflow) && ! defined (yymemcpy).
7315
7316 (yymemcpy, yyparse): Rename local variables as needed so that
7317 they all begin with 'yy'.
7318
7319 (yystrlen, yystpcpy): New functions.
7320
7321 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7322 All uses changed.
7323
7324 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7325 instead of relying on string.h functions. Use YYSTACK_ALLOC
7326 and YYSTACK_FREE instead of malloc and free.
7327
fd51e5ff
AD
73282001-11-30 Akim Demaille <akim@epita.fr>
7329
7330 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7331 before their first uses.
7332 (YYBISON, YYPURE): Move to the top of the output.
7333
7d13ff5f
AD
73342001-11-30 Akim Demaille <akim@epita.fr>
7335
7336 * tests/reduce.at (Useless Nonterminals): Fix.
7337
892a3995
AD
73382001-11-30 Akim Demaille <akim@epita.fr>
7339
7340 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7341 if body instead of `;' to pacify GCC's warnings.
7342
68f1e3ed
AD
73432001-11-30 Akim Demaille <akim@epita.fr>
7344
7345 Instead of mapping the LHS of unused rules to -1, keep the LHS
7346 valid, but flag the rules as invalid.
7347
7348 * src/gram.h (rule_t): `useful' is a new member.
7349 * src/print.c (print_grammar): Adjust.
7350 * src/derives.c (set_derives): Likewise.
7351 * src/reader.c (packgram, reduce_output): Likewise.
7352 * src/reduce.c (reduce_grammar_tables): Likewise.
7353 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7354
d2d1b42b
AD
73552001-11-30 Akim Demaille <akim@epita.fr>
7356
7357 * src/reduce.c (reduce_output): Formatting changes.
7358 * src/print.c (print_results, print_grammar): Likewise.
7359 * tests/regression.at (Rule Line Numbers)
7360 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7361
760b53a8
AD
73622001-11-30 Akim Demaille <akim@epita.fr>
7363
7364 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7365 useless nonterminals, move them at the end of the symbol arrays.
7366 (reduce_output): Adjust.
7367 * tests/reduce.at (Useless Nonterminals): Adjust.
7368
00238958
AD
73692001-11-30 Akim Demaille <akim@epita.fr>
7370
7371 * src/reduce.c: Various comment/formatting changes.
7372 (nonterminals_reduce): New, extracted from...
7373 (reduce_grammar_tables): here.
7374 (reduce_grammar): Call nonterminals_reduce.
7375
396452de
PE
73762001-11-29 Paul Eggert <eggert@twinsun.com>
7377
7378 * src/bison.simple (YYSTACK_REALLOC): Remove.
7379 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7380 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7381 New macros.
7382 (union yyalloc): New type.
7383 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7384 an arbitrary restriction on hosts where size_t is wider than int.
7385
7386 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7387 a parser stack overflow. Allocate just one block of memory for all
7388 three stacks, instead of allocating three blocks; this typically is
7389 faster and reduces fragmentation.
7390
7391 Do not limit the number of items in the stack to a value that fits
7392 in 'int', as this is an arbitrary limit on hosts with 64-bit
7393 size_t and 32-bit int.
7394
147e184c
MA
73952001-11-29 Marc Autret <autret_m@epita.fr>
7396
7397 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7398 of defining YYERROR_VERBOSE.
7399 [AT_DATA]: $4 is now out of C declarations in the prologue.
7400
426cf563
MA
74012001-11-28 Marc Autret <autret_m@epita.fr>
7402
7403 * src/reader.c (parse_dquoted_param): New.
7404 (parse_skel_decl): Use it.
7405 * src/lex.h: Add its prototype.
7406 * src/lex.c (literalchar): Become not static.
7407
c7925b99
MA
74082001-11-28 Marc Autret <autret_m@epita.fr>
7409
7410 * src/output.h: And put its extern declaration here.
7411 * src/output.c (error_verbose): Define here.
7412 (prepare): Echo name modification.
7413 * src/getargs.h: Clean its extern declaration.
7414 * src/getargs.c (error_verbose_flag): Remove.
7415 (getargs): Remove case 'e'.
7416 * src/options.c (option_table): 'error-verbose' is now seen as simple
7417 percent option.
7418 Include output.h.
7419
7420 * src/reader.c (read_declarations): Remove case tok_include.
7421 (parse_include_decl): Remove.
7422 * src/lex.h (token_t): Remove tok_include.
7423 * src/options.c (option_table): 'include' is now a simple command line
7424 option.
7425
5b5d1929
MA
74262001-11-28 Marc Autret <autret_m@epita.fr>
7427
7428 * src/bison.simple: Adjust muscle names.
7429 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7430 * src/output.c (prepare): s/_/-/ for the muscles names.
7431 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7432
8850be4b
MA
74332001-11-28 Marc Autret <autret_m@epita.fr>
7434
7435 * src/bison.simple: Fix debug.
7436 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7437
4a38e613
AD
74382001-11-28 Akim Demaille <akim@epita.fr>
7439
7440 * src/LR0.c (shifts_new): New.
7441 (save_shifts, insert_start_shift, augment_automaton): Use it.
7442
4b35e1c1
AD
74432001-11-28 Akim Demaille <akim@epita.fr>
7444
7445 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7446 keep ruleno only.
7447
d2b04478
AD
74482001-11-28 Akim Demaille <akim@epita.fr>
7449
7450 * src/closure.c (closure): Instead of looping over word in array
7451 then bits in words, loop over bits in array.
7452
2c4c30aa
AD
74532001-11-28 Akim Demaille <akim@epita.fr>
7454
7455 * src/closure.c (closure): No longer optimize the special case
7456 where all the bits of `ruleset[r]' are set to 0, to make the code
7457 clearer.
7458
576890b7
AD
74592001-11-28 Akim Demaille <akim@epita.fr>
7460
7461 * src/closure.c (closure): `r' and `c' are new variables, used to
7462 de-obfuscate accesses to RULESET and CORE.
7463
cb487d7d
AD
74642001-11-28 Akim Demaille <akim@epita.fr>
7465
7466 * src/reduce.c (reduce_print): Use ngettext.
7467 (dump_grammar): Improve the trace accuracy.
7468
6013d43f
AD
74692001-11-28 Akim Demaille <akim@epita.fr>
7470
7471 * src/reduce.c (dump_grammar): Don't translate trace messages.
7472
cb4956ee
AD
74732001-11-28 Akim Demaille <akim@epita.fr>
7474
7475 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7476 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7477 as all tags are free'ed afterwards.
7478 From Enrico Scholz.
7479
648185ab
PE
74802001-11-27 Paul Eggert <eggert@twinsun.com>
7481
7482 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7483 use alloca when we didn't want to, and vice versa.
7484
68254a03
MA
74852001-11-27 Marc Autret <autret_m@epita.fr>
7486
9113b58f
AD
7487 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7488 initialization.
68254a03
MA
7489 * src/output.c (prepare): Remove its update.
7490
04d843a2
MA
74912001-11-27 Marc Autret <autret_m@epita.fr>
7492
7493 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7494 Use %error-verbose.
7495
d2079671 74962001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
7497
7498 * src/bison.simple: Remove YYERROR_VERBOSE using.
7499 Use %%error_verbose.
7500 (yyparse): Likewise.
7501 * src/output.c (prepare): Give its final value.
7502 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7503 * src/getargs.h: Add its extern declaration.
7504 * src/getargs.c (error_verbose_flag): New int.
7505 (getargs): Update to catch new case.
7506 * src/options.c (option_table): 'error-verbose' is a new option.
7507 (shortopts): Update.
7508
e0327bc8
AD
75092001-11-27 Akim Demaille <akim@epita.fr>
7510
7511 * src/system.h: Use intl/libgettext.h.
7512 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7513
000f1a3c
AD
75142001-11-27 Akim Demaille <akim@epita.fr>
7515
7516 * tests/torture.at (Exploding the Stack Size with Malloc):
7517 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7518
26cfe0be
AD
75192001-11-27 Akim Demaille <akim@epita.fr>
7520
7521 * src/files.c: Include error.h.
7522 Reported by Hans Aberg.
7523
f6bd5427
MA
75242001-11-26 Marc Autret <autret_m@epita.fr>
7525
d2079671 7526 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
7527 (read_declarations): Add case tok_include.
7528 * src/getargs.h (include): Add its extern definition.
7529 * src/getargs.c (include): New const char *.
7530 (getargs): Add case '-I'.
7531 * src/options.c (option_table): Add include as command line and
7532 percent option.
7533 * src/lex.h (token_t): Add tok_include.
7534
2ca209c1
AD
75352001-11-26 Akim Demaille <akim@epita.fr>
7536
7537 * src/reader.c (readgram): Make sure rules for mid-rule actions
7538 have a lineno equal to that of their host rule.
7539 Reported by Hans Aberg.
7540 * tests/regression.at (Rule Line Numbers): New.
7541
0e41b407
AD
75422001-11-26 Akim Demaille <akim@epita.fr>
7543
7544 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7545 size_ts.
7546
75472001-11-26 Akim Demaille <akim@epita.fr>
7548
7549 * src/complain.c, src/complain.h (error): Remove, provided by
7550 lib/error.[ch].
7551
e0c40012
AD
75522001-11-26 Akim Demaille <akim@epita.fr>
7553
7554 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7555 issue an error message.
7556 * tests/regression.at (Invalid %directive): New.
7557 Reported by Hans Aberg.
7558
5e147124
AD
75592001-11-26 Akim Demaille <akim@epita.fr>
7560
7561 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7562 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7563
a034c8b8
AD
75642001-11-26 Akim Demaille <akim@epita.fr>
7565
7566 * src/conflicts.c (conflicts_print): Don't complain at all when
7567 there are no reduce/reduce conflicts, and as many shift/reduce
7568 conflicts as expected.
7569 * tests/regression.at (%expect right): Adjust.
7570
c64a20f3
AD
75712001-11-23 Akim Demaille <akim@epita.fr>
7572
7573 * lib/alloca.c: Update, from fileutils.
7574
5b0d29bb
AD
75752001-11-23 Akim Demaille <akim@epita.fr>
7576
7577 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7578
722c4bfe
AD
75792001-11-23 Akim Demaille <akim@epita.fr>
7580
7581 * src/system.h: Include alloca.h.
7582 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7583
6255b435
AD
75842001-11-23 Akim Demaille <akim@epita.fr>
7585
7586 * src/print_graph.c (print_actions): Remove `rule', unused.
7587 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7588 pacify GCC's signed < unsigned warnings.
7589 * src/closure.c (itemsetsize): Likewise.
7590 * src/reader.c (symbol_list_new): Static.
7591
b29b2ed5
AD
75922001-11-23 Akim Demaille <akim@epita.fr>
7593
7594 Attaching lineno to buckets is stupid, since only one copy of each
7595 symbol is kept, only the line of the first occurrence is kept too.
7596
7597 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7598 * src/reader.c (rline_allocated): Remove, unused.
7599 (symbol_list): Have a `line' member.
7600 (symbol_list_new): New.
7601 (readgram): Use it.
7602 * src/print.c (print_grammar): Output the rule line numbers.
7603 * tests/regression.at (Solved SR Conflicts)
7604 (Unresolved SR Conflicts): Adjust.
7605 Reported by Hans Aberg.
7606
a81b1d4a
MA
76072001-11-22 Marc Autret <autret_m@epita.fr>
7608
7609 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7610
c1ecb3c1
MA
76112001-11-22 Marc Autret <autret_m@epita.fr>
7612
7613 * src/muscle_tab.c (muscle_init): Remove initialization of
7614 skeleton muscle.
7615 * src/output.c (output_master_parser): Do it here.
7616
fbe01355
AD
76172001-11-20 Akim Demaille <akim@epita.fr>
7618
7619 * po/sv.po: New.
7620 * configure.in (ALL_LINGUAS): Adjust.
7621 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7622 longer contains strings to translate.
7623
81e895c0
AD
76242001-11-19 Akim Demaille <akim@epita.fr>
7625
7626 * src/conflicts.c (conflicts_print): Add a missing \n.
7627
6bb1878b
AD
76282001-11-19 Akim Demaille <akim@epita.fr>
7629
7630 * src/nullable.c (nullable_print): New.
7631 (set_nullable): Call it when tracing.
7632 Better locality of variables.
7633
d9ec2d07
AD
76342001-11-19 Akim Demaille <akim@epita.fr>
7635
7636 * src/print.c (print_actions): Better locality of variables.
7637
720e5c1b
AD
76382001-11-19 Akim Demaille <akim@epita.fr>
7639
7640 * src/derives.c (print_derives): Fix and enrich.
7641 * src/closure.c (print_fderives): Likewise.
7642
fb908786
AD
76432001-11-19 Akim Demaille <akim@epita.fr>
7644
7645 * src/closure.c (itemsetend): Remove, replaced with...
7646 (itemsetsize): new.
7647
125ecb56
AD
76482001-11-19 Akim Demaille <akim@epita.fr>
7649
7650 * src/LR0.c (kernel_end): Remove, replaced with...
7651 (kernel_size): new.
7652
d8cf039f
AD
76532001-11-19 Akim Demaille <akim@epita.fr>
7654
7655 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7656 to clarify.
7657
7bec0760
AD
76582001-11-19 Akim Demaille <akim@epita.fr>
7659
7660 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7661
c87d4863
AD
76622001-11-19 Akim Demaille <akim@epita.fr>
7663
7664 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7665 trace messages.
7666 * src/LR0.c: Likewise.
7667 (allocate_itemsets): Use arrays instead of pointers to clarify.
7668
9bfe901c
AD
76692001-11-19 Akim Demaille <akim@epita.fr>
7670
7671 * src/getargs.c (statistics_flag): Replace with...
7672 (trace_flag): New.
7673 (longopts): Accept --trace instead of --statistics.
7674 * src/getargs.h, src/options.c: Adjust.
7675 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7676 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7677
97db7bd4
AD
76782001-11-19 Akim Demaille <akim@epita.fr>
7679
cc72668c 7680 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
7681 pointers to clarify the code.
7682 (save_reductions, save_shifts): Factor common parts of alternatives.
7683
2c5f66ed
AD
76842001-11-19 Akim Demaille <akim@epita.fr>
7685
7686 * src/LR0.c (new_state, get_state): Complete TRACE code.
7687 * src/closure.c: Include `reader.h' to get `tags', needed by the
7688 trace code.
7689 Rename the conditional DEBUG as TRACE.
7690 Output consistently TRACEs to stderr, not stdout.
7691 * src/derives.c: Likewise.
7692 * src/reduce.c: (inaccessable_symbols): Using if is better style
7693 than goto.
7694 Use `#if TRACE' instead of `#if 0' for tracing code.
7695
300f275f
AD
76962001-11-19 Akim Demaille <akim@epita.fr>
7697
7698 * src/system.h (LIST_FREE, shortcpy): New.
7699 * src/LR0.c: Use them.
7700 * src/output.c (free_itemsets, free_reductions, free_shifts):
7701 Remove, replaced by LIST_FREE.
7702
f59c437a
AD
77032001-11-19 Akim Demaille <akim@epita.fr>
7704
7705 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7706 (REDUCTIONS_ALLOC): New.
7707 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7708 allocation.
7709
6986fd9e
AD
77102001-11-19 Akim Demaille <akim@epita.fr>
7711
7712 * src/LR0.c (new_state): Complete trace code.
7713 * src/nullable.c (set_nullable): Don't translate traces.
7714
4bc30f78
AD
77152001-11-19 Akim Demaille <akim@epita.fr>
7716
7717 * src/print_graph.c (print_core): Better locality of variables.
7718 * src/print.c (print_core): Likewise.
7719
08a946e0
AD
77202001-11-19 Akim Demaille <akim@epita.fr>
7721
7722 * src/vcg.c: You do the output, so you are responsible of the
7723 handling of VCG syntax, in particular: use quotearg.
7724 * src/print_graph.c: Don't.
7725 (print_actions): Don't output the actions as part of the nodes,
7726 since that's the job of the edges.
7727 (print_state): Don't output by hand: fill the node description,
9bfe901c 7728 and ask for its output.
08a946e0 7729
f0473484
AD
77302001-11-19 Akim Demaille <akim@epita.fr>
7731
cc72668c
AD
7732 * src/bison.simple (yyparse): When verbosely reporting an error,
7733 no longer put additional quotes around token names.
f0473484
AD
7734 * tests/calc.at: Adjust.
7735
e41dc700
AD
77362001-11-19 Akim Demaille <akim@epita.fr>
7737
7738 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7739 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7740 * src/output.c: Adjust.
7741
652a871c
AD
77422001-11-19 Akim Demaille <akim@epita.fr>
7743
7744 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7745 (rule_t): this.
7746 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7747
b2ed6e58
AD
77482001-11-19 Akim Demaille <akim@epita.fr>
7749
7750 * src/gram.h (rule_t): New.
7751 (rule_table): New.
7752 (rrhs, rlhs): Remove, part of state_t.
7753 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7754 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7755 * src/reader.c, src/reduce.c: Adjust.
7756
edad7067
AD
77572001-11-19 Akim Demaille <akim@epita.fr>
7758
7759 * src/reader.c (symbols_output): New, extracted from...
7760 (packsymbols): Here.
7761 (reader): Call it.
7762
3feec034
AD
77632001-11-19 Akim Demaille <akim@epita.fr>
7764
7765 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7766 (maxrhs): this new function.
7767
ddcd5fdf
AD
77682001-11-19 Akim Demaille <akim@epita.fr>
7769
cc72668c 7770 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
7771 Adjust.
7772
bb527fc2
AD
77732001-11-19 Akim Demaille <akim@epita.fr>
7774
cc72668c 7775 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
7776 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7777 * src/lalr.c: Adjust.
7778
a845a697
AD
77792001-11-19 Akim Demaille <akim@epita.fr>
7780
7781 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7782 (set_state_table): handle the `lookaheads' members.
7783
f004bf6a
AD
77842001-11-19 Akim Demaille <akim@epita.fr>
7785
cc72668c
AD
7786 * src/lalr.h (lookaheads): Removed array, whose contents is now
7787 a member of...
f004bf6a
AD
7788 (state_t): this structure.
7789 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7790 Adjust.
7791
de326cc0
AD
77922001-11-19 Akim Demaille <akim@epita.fr>
7793
cc72668c
AD
7794 * src/lalr.h (consistent): Removed array, whose contents is now
7795 a member of...
de326cc0
AD
7796 (state_t): this structure.
7797 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7798 Adjust.
7799
90b4416b
AD
78002001-11-19 Akim Demaille <akim@epita.fr>
7801
cc72668c
AD
7802 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7803 contents are now members of...
90b4416b
AD
7804 (state_t): this structure.
7805 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7806 Adjust.
7807
9703cc49
AD
78082001-11-19 Akim Demaille <akim@epita.fr>
7809
7810 * src/lalr.h (state_t): New.
7811 (state_table): Be a state_t * instead of a core **.
7812 (accessing_symbol): Remove, part of state_t.
7813 * src/lalr.c: Adjust.
7814 (set_accessing_symbol): Merge into...
7815 (set_state_table): this.
7816 * src/print_graph.c, src/conflicts.c: Adjust.
7817
d803322e
AD
78182001-11-14 Akim Demaille <akim@epita.fr>
7819
7820 * tests/calc.at, tests/output.at, tests/regression.at,
7821 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7822 now the tests are run in private dirs, therefore AC_CLEANUP and
7823 family can be simplified to 0-ary.
7824 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7825 use abs. path to find config.h.
7826 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7827 stderr, there can be way too much random noise.
7828 Instead pass -Werror to GCC and rely on the exit status.
7829 Reported by Wolfram Wagner.
7830
3d76b07d
AD
78312001-11-14 Akim Demaille <akim@epita.fr>
7832
7833 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7834 defined only if yyoverflow is defined, to avoid `warning: unused
7835 variable `yyvs1''.
7836 Reported by The Test Suite.
7837
09b503c8
AD
78382001-11-14 Akim Demaille <akim@epita.fr>
7839
7840 * src/print.c: Include reduce.h.
7841 Reported by Hans Aberg.
7842
78432001-11-14 Akim Demaille <akim@epita.fr>
7844
7845 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7846 Revert a previous patch: these are really const.
7847 * src/conflicts.c (conflict_report): Additional useless pair of
7848 braces to pacify GCC's warnings for `if () if () {} else {}'.
7849 * src/lex.c (parse_percent_token): Replace equal_offset with
7850 arg_offset.
7851 arg is const.
7852 Be sure to strdup `arg' when used, since there is no reason for
7853 token_buffer not to change.
7854
0f37a994
AD
78552001-11-14 Akim Demaille <akim@epita.fr>
7856
7857 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7858 definition.
7859 * src/main.c (main): Use them.
7860 Suggested by Hans Aberg.
7861
d39d93b8
AD
78622001-11-12 Akim Demaille <akim@epita.fr>
7863
7864 * src/system.h (ngettext): Now that we use ngettext, be sure to
7865 provide a default definition when NLS are not used.
7866
9edcd895
AD
78672001-11-12 Akim Demaille <akim@epita.fr>
7868
7869 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7870 Use @kbd to denote user input.
7871 (Language and Grammar): ANSIfy the example.
7872 Adjust its layout for info/notinfo.
7873 (Location Tracking Calc): Output error messages to stderr.
7874 Output locations in a more GNUtically correct way.
7875 Fix a couple of Englishos.
7876 Adjust @group/@end group pairs.
7877
7da99ede
AD
78782001-11-12 Akim Demaille <akim@epita.fr>
7879
e3aa65c5 7880 %expect was not functioning at all.
7da99ede
AD
7881
7882 * src/conflicts.c (expected_conflicts): Set to -1.
7883 (conflict_report): Use ngettext.
7884 (conflicts_print): Check %expect and make its violation an error.
7885 * doc/bison.texinfo (Expect Decl): Adjust.
7886 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7887 * tests/regression.at (%expect not enough, %expect right)
7888 (%expect too much): New.
7889
ba9dda1a
AD
78902001-11-12 Akim Demaille <akim@epita.fr>
7891
7892 * tests/regression.at (Conflicts): Rename as...
7893 (Unresolved SR Conflicts): this.
7894 (Solved SR Conflicts): New.
7895
337c5bd1
AD
78962001-11-12 Akim Demaille <akim@epita.fr>
7897
7898 * src/reduce.c (print_results): Rename as...
7899 (reduce_output): This.
7900 Output to OUT, passed as argument, instead of output_obstack.
7901 (dump_grammar): Likewise.
7902 (reduce_free): New.
7903 Also free V1.
7904 (reduce_grammar): No longer call reduce_output, since...
7905 * src/print.c (print_results): do it.
7906 * src/main.c (main): Call reduce_free;
7907
c73a41af
AD
79082001-11-12 Akim Demaille <akim@epita.fr>
7909
7910 * src/conflicts.c (print_reductions): Accept OUT as argument.
7911 Output to it, not to output_obstack.
7912 * src/print.c (print_actions): Adjust.
7913
0df87bb6
AD
79142001-11-12 Akim Demaille <akim@epita.fr>
7915
7916 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7917 the result instead of using...
7918 (src_total, rrc_total, src_count, rrc_count): Remove.
7919 (any_conflicts): Remove.
7920 (print_conflicts): Split into...
7921 (conflicts_print, conflicts_output): New.
7922 * src/conflicts.h: Adjust.
7923 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 7924 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
7925 * tests/regression.at (Conflicts): New.
7926 Reported by Tom Lane.
7927
e4d3d4de
AD
79282001-11-12 Akim Demaille <akim@epita.fr>
7929
7930 * tests/regression.at (Invalid input): Remove, duplicate with
7931 ``Invalid input: 1''.
7932
6d7d248e
AD
79332001-11-12 Akim Demaille <akim@epita.fr>
7934
7935 * tests/torture.at (AT_DATA_STACK_TORTURE)
7936 (Exploding the Stack Size with Alloca)
7937 (Exploding the Stack Size with Malloc): New.
7938
e9e4c321
AD
79392001-11-12 Akim Demaille <akim@epita.fr>
7940
7941 * src/bison.simple (YYSTACK_REALLOC): New.
7942 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 7943 Reported by Per Allansson.
e9e4c321 7944
5f7e0832
AD
79452001-11-12 Pascal Bart <pascal.bart@epita.fr>
7946
7947 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7948 define CPP macro, which substitute YYSTYPE by yystype.
7949 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7950 with yyltype/YYLTYPE. This allows inclusion of the generated
7951 header within the parser if the compiler, such as GGC, accepts
7952 multiple equivalent #defines.
7953 From Akim.
7954
e3f1699f
AD
79552001-11-05 Akim Demaille <akim@epita.fr>
7956
7957 * src/reader.c (symbols_output): New, extracted from...
7958 (packsymbols): here.
7959 (reader): Adjust.
7960
65be0866
AD
79612001-11-05 Akim Demaille <akim@epita.fr>
7962
7963 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7964
e4d910bf
AD
79652001-11-05 Akim Demaille <akim@epita.fr>
7966
7967 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7968 pattern.
7969
951366c1
AD
79702001-11-05 Akim Demaille <akim@epita.fr>
7971
7972 * src/options.h (struct option_table_struct): set_flags is void*.
7973 * src/options.c (longopts): Support `--output' and `%output'.
7974 (usage): Adjust.
7975 * src/lex.h (tok_setopt): Remove, replaced with...
7976 (tok_intopt, tok_stropt): these new guys.
7977 * src/lex.c (getopt.h): Not needed.
7978 (token_buffer, unlexed_token_buffer): Not const.
7979 (percent_table): Promote `-' over `_' in directive names.
7980 Active `%name-prefix', `file-prefix', and `output'.
7981 (parse_percent_token): Accept possible arguments to directives.
7982 Promote `-' over `_' in directive names.
7983
d8988b2f
AD
79842001-11-04 Akim Demaille <akim@epita.fr>
7985
7986 * doc/bison.texinfo (Decl Summary): Split the list into
7987 `directives for grammars' and `directives for bison'.
7988 Sort'em.
7989 Add description of `%name-prefix', `file-prefix', and `output'.
7990 Promote `-' over `_' in directive names.
7991 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7992 Simplify the description of `--name-prefix'.
7993 Promote `-' over `_' in directive names.
7994 Promote `--output' over `--output-file'.
7995 Fix the description of `--defines'.
7996 * tests/output.at: Exercise %file-prefix and %output.
7997
6468d18e
AD
79982001-11-02 Akim Demaille <akim@epita.fr>
7999
8000 * doc/refcard.tex: Update.
8001
6b7e85b9
AD
80022001-11-02 Akim Demaille <akim@epita.fr>
8003
8004 * src/symtab.h (SUNDEF): New.
8005 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8006 stand for `uninitialized', instead of 0.
8007 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8008 * src/lex.c (lex): Adjust.
8009
8010 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8011 Number it 0.
8012 Let yylex return it instead of a plain 0.
8013 Reported by Dick Streefland.
8014
cd5aafcf
AD
80152001-11-02 Akim Demaille <akim@epita.fr>
8016
8017 * tests/regression.at (Mixing %token styles): New test.
8018
037ca2f1
AD
80192001-11-02 Akim Demaille <akim@epita.fr>
8020
8021 * src/reader.c (parse_thong_decl): Formatting changes.
8022 (token_translations_init): New, extracted from...
8023 (packsymbols): Here.
8024 Adjust.
8025
270a173c
AD
80262001-11-01 Akim Demaille <akim@epita.fr>
8027
8028 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8029 Check that `9foo.y' produces correct cpp guards.
8030 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8031 guards.
8032 Reported by Wwp.
8033
561f9a30
AD
80342001-11-01 Akim Demaille <akim@epita.fr>
8035
8036 * tests/regression.at (Invalid input: 2): New.
8037 * src/lex.c (unlexed_token_buffer): New.
8038 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8039 too.
8040 Reported by Wwp.
8041
f987e9d2
AD
80422001-11-01 Akim Demaille <akim@epita.fr>
8043
8044 * tests/calc.at: Catch up with 1.30.
8045 * configure.in: Bump to 1.49a.
8046 Adjust to newer Autotest.
8047
0846f581
PB
80482001-10-19 Pascal Bart <pascal.bart@epita.fr>
8049
8050 * src/conflicts.c: Move global variables rrc_total and src_total ...
8051 (print_conflicts): here.
8052 * src/output.c (output): Free global variable user_toknums.
8053 * src/lex.c (token_obstack): Become static.
8054
3c1a79b3
AD
80552001-10-18 Akim Demaille <akim@epita.fr>
8056
8057 * tests/atlocal.in (GCC): Add.
8058 * tests/calc.at: s/m4_match/m4_bmatch/.
8059 s/m4_patsubst/m4_bpatsubst/.
8060 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8061 * configure.in: AC_SUBST(GCC).
8062
5d52e7d0
MA
80632001-10-14 Marc Autret <autret_m@epita.fr>
8064
8065 * src/options.c (create_long_option_table): Fix.
8066
631aa1d3
AD
80672001-10-10 Akim Demaille <akim@epita.fr>
8068
8069 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8070
f6ec6d13
AD
80712001-10-04 Akim Demaille <akim@epita.fr>
8072
8073 * src/reader.c (parse_union_decl): Push the caracters in
8074 union_obstack, not attrs_obstack.
8075
342b8b6e
AD
80762001-10-04 Akim Demaille <akim@epita.fr>
8077
8078 Merge in the branch 1.29.
8079
8080 * src/reader.c (packsymbols): Use a temporary obstack for
8081 `%%tokendef', since output_stack is already used elsewhere.
8082
8083 2001-10-02 Akim Demaille <akim@epita.fr>
8084
8085 Bump 1.29d.
8086
8087 2001-10-02 Akim Demaille <akim@epita.fr>
8088
8089 Version 1.29c.
8090
8091 2001-10-02 Akim Demaille <akim@epita.fr>
8092
8093 * tests/regression.at (Invalid CPP headers): New.
8094 From Alexander Belopolsky.
8095 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8096
8097 2001-10-02 Akim Demaille <akim@epita.fr>
8098
8099 * tests/regression.at (Invalid input): New.
8100 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8101 Reported by Shura.
8102
8103 2001-10-02 Akim Demaille <akim@epita.fr>
8104
8105 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8106
8107 2001-10-02 Akim Demaille <akim@epita.fr>
8108
8109 * src/output.c (output_parser): Assert `skeleton'.
8110 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8111 systems.
8112 From Shura.
8113
8114 2001-10-01 Marc Autret <autret_m@epita.fr>
8115
8116 * src/lex.h: Echo modifications.
8117 * src/lex.c (unlex): Parameter is now token_t.
8118 From Hans Aberg.
8119
8120 2001-10-01 Marc Autret <autret_m@epita.fr>
8121
8122 * src/main.c: Include lex.h.
8123 From Hans Aberg.
8124
8125 2001-09-29 Akim Demaille <akim@epita.fr>
8126
8127 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8128
8129 2001-09-28 Akim Demaille <akim@epita.fr>
8130
8131 * tests/testsuite.at: Update to newer Autotest.
8132 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8133
8134 2001-09-27 Akim Demaille <akim@epita.fr>
8135
8136 Position independent wrapper.
8137
8138 * tests/bison: Remove.
8139 * tests/bison.in: New.
8140 * configure.in: Adjust.
8141
8142 2001-09-27 Paul Eggert <eggert@twinsun.com>
8143
8144 Port quotearg fixes from tar 1.13.24.
8145
8146 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8147 tm to be declared.
8148 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8149 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8150
8151 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8152 * m4/mbrtowc.m4: New file.
8153 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8154 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8155
8156 2001-09-27 Akim Demaille <akim@epita.fr>
8157
8158 Bump to 1.29c.
8159
8160 2001-09-27 Akim Demaille <akim@epita.fr>
8161
8162 Version 1.29b.
8163
8164 2001-09-25 Akim Demaille <akim@epita.fr>
8165
8166 * src/system.h: Include `xalloc.h'.
8167 Remove it from the C files.
8168 * src/files.c (output_files): Free the obstacks.
8169 * src/lex.c (init_lex): Rename as...
8170 (lex_init): this.
8171 (lex_free): New.
8172 * src/main.c (main): Use it.
8173
8174 2001-09-24 Marc Autret <autret_m@epita.fr>
8175
8176 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8177 to output informations in fout (FILE*).
8178 (open_graph, close_graph): Likewise.
8179 (output_graph, output_edge, output_node): Likewise.
8180 * src/vcg.h: Update function prototypes.
8181 * src/print_graph.c (print_graph): Open output graph file.
8182 (print_actions): Adjust.
8183 * src/files.h: Remove extern declaration.
8184 * src/files.c: Remove graph_obstack declaration.
8185 (open_files): Remove graph_obstack initialization.
8186 (output_files): Remove graph_obstack saving.
8187
8188 2001-09-24 Marc Autret <autret_m@epita.fr>
8189
8190 * src/files.c (compute_output_file_names): Fix.
8191
8192 2001-09-24 Marc Autret <autret_m@epita.fr>,
8193 Akim Demaille <akim@epita.fr>
8194
8195 * src/reader.c (reader): Remove call to free_symtab ().
8196 * src/main.c (main): Call it here.
8197 Include symtab.h.
8198 * src/conflicts.c (initialize_conflicts): Rename as...
8199 (solve_conflicts): this.
8200 * src/print.c (print_core, print_actions, print_state)
8201 (print_grammar): Dump to a file instead a `output_obstack'.
8202 (print_results): Dump `output_obstack', and then proceed with the
8203 FILE *.
8204 * src/files.c (compute_output_file_names, close_files): New.
8205 (output_files): Adjust.
8206 * src/main.c (main): Adjust.
8207
8208 2001-09-23 Marc Autret <autret_m@epita.fr>
8209
8210 * src/files.c (compute_header_macro): Computes header macro name
8211 from spec_defines_file when given.
8212
8213 2001-09-23 Marc Autret <autret_m@epita.fr>
8214
8215 * src/files.c (output_files): Add default extensions.
8216
8217 2001-09-22 Akim Demaille <akim@epita.fr>
8218
8219 * src/conflicts.c (finalize_conflicts): Rename as...
8220 (free_conflicts): this.
8221
8222 2001-09-22 Akim Demaille <akim@epita.fr>
8223
8224 * src/gram.c (gram_free): Rename back as...
8225 (dummy): this.
8226 (output_token_translations): Free `token_translations'.
8227 * src/symtab.c (free_symtab): Free the tag field.
8228
8229 2001-09-22 Akim Demaille <akim@epita.fr>
8230
8231 Remove `translations' as it is always set to true.
8232
8233 * src/gram.h: Adjust.
8234 * src/reader.c (packsymbols, parse_token_decl): Adjust
8235 * src/print.c (print_grammar): Adjust.
8236 * src/output.c (output_token_translations): Adjust.
8237 * src/lex.c (lex): Adjust.
8238 * src/gram.c: Be sure the set pointers to NULL.
8239 (dummy): Rename as...
8240 (gram_free): this.
8241
8242 2001-09-22 Akim Demaille <akim@epita.fr>
8243
8244 * configure.in: Invoke AM_LIB_DMALLOC.
8245 * src/system.h: Use dmalloc.
8246 * src/LR0.c: Be sure to have pointers initialized to NULL.
8247 (allocate_itemsets): Allocate kernel_items only if needed.
8248
8249 2001-09-22 Akim Demaille <akim@epita.fr>
8250
8251 * configure.in: Bump to 1.29b.
8252 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8253 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8254 need xmalloc.c in calc.y.
8255 From Pascal Bart.
8256
8257 2001-09-21 Akim Demaille <akim@epita.fr>
8258
8259 Version 1.29a.
8260 * Makefile.maint, config/config.guess, config/config.sub,
8261 * config/missing: Update from masters.
8262 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8263 upon package.m4.
8264 * configure.in (ALL_LINGUAS): Add `tr'.
8265
8266 2001-09-21 Akim Demaille <akim@epita.fr>
8267
8268 * tests/Makefile.am (package.m4): Move to...
8269 ($(srcdir)/$(TESTSUITE)): here.
8270
8271 2001-09-20 Akim Demaille <akim@epita.fr>
8272
8273 * src/complain.c: No longer try to be standalone: use system.h.
8274 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8275 * src/complain.h: Likewise.
8276 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8277 Remove the unused variable `n'.
8278 From Albert Chin-A-Young.
8279
8280 2001-09-18 Marc Autret <autret_m@epita.fr>
8281
8282 * doc/bison.1: Update.
8283 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8284 descriptions.
8285 (Option Cross Key): Update.
8286 Add --graph.
8287
8288 2001-09-18 Marc Autret <autret_m@epita.fr>
8289
8290 * tests/regression.at: New test (comment in %union).
8291
8292 2001-09-18 Marc Autret <autret_m@epita.fr>
8293
8294 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8295 do that.
8296 Reported by Keith Browne.
8297
8298 2001-09-18 Marc Autret <autret_m@epita.fr>
8299
8300 * tests/output.at: Add tests for --defines and --graph.
8301
8302 2001-09-18 Marc Autret <autret_m@epita.fr>
8303
8304 * tests/output.at: Removes tests of %{header,src}_extension features.
8305
8306 2001-09-18 Akim Demaille <akim@epita.fr>
8307
8308 * tests/Makefile.am (package.m4): New.
8309 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8310 (_AT_CHECK_CALC_ERROR): Likewise.
8311 Factor the `, ' part of verbose error messages.
8312
8313 2001-09-18 Marc Autret <autret_m@epita.fr>
8314
8315 * src/getargs.c (longopts): Declare --defines and --graph as options
8316 with optional arguments.
8317 * src/files.h: Add extern declarations.
8318 * src/files.c (spec_graph_file, spec_defines_file): New.
8319 (output_files): Update.
8320 Remove CPP-outed code.
8321
8322 2001-09-18 Marc Autret <autret_m@epita.fr>
8323
8324 Turn off %{source,header}_extension feature.
8325
8326 * src/files.c (compute_exts_from_gf): Update.
8327 (compute_exts_from_src): Update.
8328 (output_files): CPP-out useless code.
8329 * src/files.h: Remove {header,source}_extension extern declarations.
8330 * src/reader.c (parse_dquoted_param): CPP-out.
8331 (parse_header_extension_decl): Remove.
8332 (parse_source_extension_decl): Remove.
8333 (read_declarations): Remove cases tok_{hdrext,srcext}.
8334 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8335 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8336
8337 2001-09-10 Akim Demaille <akim@epita.fr>
8338
8339 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8340 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8341 (AT_CHECK_OUTPUT): this.
8342 Merely check ls' exit status, its output is useless.
8343
8344 2001-09-10 Akim Demaille <akim@epita.fr>
8345
8346 * tests/calc.at: Use m4_match.
8347 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8348
8349 2001-09-10 Marc Autret <autret_m@epita.fr>,
8350 Akim Demaille <akim@epita.fr>
8351
8352 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8353 enum color_e.
8354 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8355 to `normal'.
8356 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8357 * src/lex.h: Adjust prototype.
8358 (token_t): Add `tok_undef'.
8359 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8360 (parse_percent_token): Now returns token_t.
8361 Add default statement in switch.
8362 (lex): Separate `c' as an input variable, from the token_t result
8363 part.
8364 (unlexed): Is a token_t.
8365
8366 2001-09-10 Akim Demaille <akim@epita.fr>
8367
8368 * configure.in: Bump to 1.29a.
8369
8370 2001-09-07 Akim Demaille <akim@epita.fr>
8371
8372 Version 1.29.
8373
8374 2001-08-30 Akim Demaille <akim@epita.fr>
8375
8376 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8377 * m4/atconfig.m4: Remove.
8378 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8379 * tests/bison: New.
8380 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8381 m4_if, m4_patsubst, and m4_regexp.
8382 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8383 `input' file instead of echo.
8384
8385 2001-08-29 Akim Demaille <akim@epita.fr>
8386
8387 Bump to 1.28e.
8388
8389 2001-08-29 Akim Demaille <akim@epita.fr>
8390
8391 Version 1.28d.
8392
8393 2001-08-29 Paul Eggert <eggert@twinsun.com>
8394
8395 * src/bison.simple (yyparse): Don't take the address of an
8396 item before the start of an array, as that doesn't conform to
8397 the C Standard.
8398
8399 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8400
8401 * doc/bison.texinfo (Location Tracking Calc): New node.
8402
8403 2001-08-29 Paul Eggert <eggert@twinsun.com>
8404
8405 * src/output.c (output): Do not define const, as this now
8406 causes more problems than it cures.
8407
8408 2001-08-29 Akim Demaille <akim@epita.fr>
8409
8410 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8411 the nodes.
8412 Be sure to tag the `detailmenu'.
8413
8414 2001-08-29 Akim Demaille <akim@epita.fr>
8415
8416 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8417 download in a tmp dir.
8418
8419 2001-08-28 Marc Autret <autret_m@epita.fr>
8420
8421 * config/depcomp: New file.
8422
8423 2001-08-28 Marc Autret <autret_m@epita.fr>
8424
8425 * doc/bison.1 (mandoc): Adjust.
8426 From Juan Manuel Guerrero.
8427
8428 2001-08-28 Marc Autret <autret_m@epita.fr>
8429
8430 * src/print_graph.c (print_state): Fix.
8431
8432 2001-08-27 Marc Autret <autret_m@epita.fr>
8433
8434 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8435 char * members.
8436 Echo modifications to the functions prototypes.
8437 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8438
8439 2001-08-27 Marc Autret <autret_m@epita.fr>
8440
8441 * src/vcg.c: Include `xalloc.h'.
8442 (add_colorentry): New.
8443 (add_classname): New.
8444 (add_infoname): New.
8445 * src/vcg.h: Add new prototypes.
8446
8447 2001-08-27 Akim Demaille <akim@epita.fr>
8448
8449 * Makefile.maint: Sync. again with CVS Autoconf.
8450
8451 2001-08-27 Akim Demaille <akim@epita.fr>
8452
8453 * Makefile.maint: Formatting changes.
8454 (po-update, cvs-update, update): New targets.
8455 (AMTAR): Remove.
8456
8457 2001-08-27 Akim Demaille <akim@epita.fr>
8458
8459 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8460 * Makefile.maint: Sync. with CVS Autoconf.
8461
8462 2001-08-27 Marc Autret <autret_m@epita.fr>
8463
8464 * src/vcg.h (struct infoname_s): New.
8465 (struct colorentry_s): New.
8466 (graph_s): New fields {vertical,horizontal}_order in structure.
8467 Add `infoname' field.
8468 Add `colorentry' field;
8469 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8470 (G_HORIZONTAL_ORDER): New.
8471 (G_INFONAME): New.
8472 (G_COLORENTRY): New.
8473 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8474 Add output of `infoname'.
8475 Add output of `colorentry'.
8476
8477 2001-08-27 Marc Autret <autret_m@epita.fr>
8478
8479 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8480 This one shadowed a global parameter.
8481
8482 2001-08-24 Marc Autret <autret_m@epita.fr>
8483
8484 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8485 instead of `unsigned'.
8486 (print_state): Do not call obstack_object_size () in obstack_grow ()
8487 to avoid macro variables shadowing.
8488
8489 2001-08-23 Marc Autret <autret_m@epita.fr>
8490
8491 * src/lex.c (percent_table): Typo: s/naem/name/.
8492 Add graph option.
8493 Normalize new options declarations.
8494
8495 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8496
8497 * tests/suite.at: Exercise %header_extension and %source_extension.
8498
8499 2001-08-16 Marc Autret <autret_m@epita.fr>
8500
8501 * src/reader.c (parse_dquoted_param): New.
8502 (parse_header_extension_decl): Use it.
8503 (parse_source_extension_decl): Likewise.
8504
8505 2001-08-16 Marc Autret <autret_m@epita.fr>
8506
8507 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8508 (get_xxxx_str): Use assert () instead of complain ().
8509 Remove return invokations in default cases.
8510 (get_decision_str): Modify default behaviour. Remove second argument.
8511 Echo modifications on calls.
8512 (output_graph): Fix.
8513
8514 2001-08-16 Marc Autret <autret_m@epita.fr>
8515
8516 * src/getargs.c (usage): Update with ``-g, --graph''.
8517
8518 2001-08-16 Marc Autret <autret_m@epita.fr>
8519
8520 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8521 (Option Cross Key): Likewise.
8522 * doc/bison.1: Update.
8523
1c8c2190
PB
85242001-09-25 Pascal Bart <pascal.bart@epita.fr>
8525
8526 * src/output.c (output_master_parser): Don't finish action_obstack.
8527 (output_parser): Don't care about the muscle action, here.
8528 (prepare): Copy the action_obstack in the action muscle.
8529 (output): Free action_obstack.
8530
180d45ba
PB
85312001-09-23 Pascal Bart <pascal.bart@epita.fr>
8532
8533 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8534 will contain `%union' declaration.
8535 (parse_union_decl): Delete #line directive output.
8536 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8537 informations about %union.
8538 (parse_union_decl): Copy the union_obstack in the muscle stype.
8539 * src/bison.simple: Add new #line directive.
8540 Add typdef %%stype YYSTYPE.
8541
c51d1a19
PB
85422001-09-23 Pascal Bart <pascal.bart@epita.fr>
8543
8544 * src/bison.simple: Add new `#line' directive.
8545
6f9344da
PB
85462001-09-22 Pascal Bart <pascal.bart@epita.fr>
8547
8548 * src/bison.simple: New `#line' directive.
8549 * src/output.c (output_parser): Support new dynamic muscle input_line.
8550
652def80
MA
85512001-09-22 Marc Autret <autret_m@epita.fr>
8552
8553 * src/output.c (output_master_parser): New.
8554 (output_parser): Be more re-entrant.
8555
25b222fa
MA
85562001-09-21 Marc Autret <autret_m@epita.fr>
8557
8558 * src/reader.c (copy_definition, parse_union_decl): Update and use
8559 `linef' muscle.
8560 (copy_action): Likewise.
8561 Use obstack_1grow ().
8562 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8563
6bc35ae5
MA
85642001-09-21 Marc Autret <autret_m@epita.fr>
8565
8566 * src/options.c (option_table): Adjust.
8567 * src/lex.c (parse_percent_token): Fix.
8568
c0629aa1
PB
85692001-09-20 Pascal Bart <pascal.bart@epita.fr>
8570
8571 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 8572
82b6d266
PB
85732001-09-20 Pascal Bart <pascal.bart@epita.fr>
8574
8575 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8576 is now an option_table_struct*.
8577 (option_strcmp): New function option_strcmp.
8578 (parse_percent_token): Call option_strcmp.
8579 * src/getargs.c (xalloc.h, options.h): Include it.
8580 (getargs): Call create_long_option_table.
8581 (getargs): Free longopts at the end of the function.
8582 (shortopts): Move in options.c.
8583 * src/options.c (create_long_option_table): New function. Convert
8584 information from option_table to option structure.
8585 * src/reader.c (options.h): Include it.
8586
8587 * src/Makefile.am: Adjust.
8588 * src/options.c (option_table): Create from longopts and percent_table.
8589 * src/getargs.c (longopts): Delete.
8590 * src/lex.c (struct percent_table_struct): Delete.
8591 (percent_table): Delete.
8592 (options.h): Include it.
8593 * src/options.c: Create.
8594 * src/options.h: Create.
8595 Declare enum opt_access_e.
8596 Define struct option_table_struct.
8597
75f5aaea
MA
85982001-09-20 Marc Autret <autret_m@epita.fr>
8599
8600 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8601 sections of Bison.
8602
f508cb0a
PB
86032001-09-19 Pascal Bart <pascal.bart@epita.fr>
8604
8605 * src/bison.simple: s/%%filename/%%skeleton.
8606 * src/muscle_tab.c (getargs.h): Include it.
8607 (muscle_init): Insert new muscle skeleton.
8608
13105fc1
PB
86092001-09-18 Pascal Bart <pascal.bart@epita.fr>
8610
8611 * src/output.c (output_parser): Delete unused variable actions_dumped.
8612
b0c4483e
PB
86132001-09-07 Pascal Bart <pascal.bart@epita.fr>
8614
8615 * src/output.c (output): Delete call to reader_output_yylsp.
8616 * src/reader.c (reader): Likewise.
8617 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 8618
11d82f03
MA
86192001-09-02 Marc Autret <autret_m@epita.fr>
8620
8621 * src/reader.c: Include muscle_tab.h.
8622 (parse_union_decl): Update.
8623 (parse_macro_decl): Rename parse_muscle_decl.
8624 Update to use renamed functions and variable.
8625 (read_declarations, copy_action, read_additionnal_code, : Updated
8626 with correct variables and functions names.
8627 (packsymbols, reader): Likewise.
342b8b6e 8628
11d82f03 8629 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 8630
11d82f03
MA
8631 * src/output.c: Include muscle_tab.h
8632 In all functions using macro_insert, change by using muscle_insert ().
8633 (macro_obstack): Rename muscle_obstack.
8634 Echo modifications in the whole file.
8635 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8636 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8637 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8638
8639 * src/muscle_tab.h: Update double inclusion macros.
8640 (macro_entry_s): Rename muscle_entry_s.
8641 Update prototypes.
342b8b6e 8642
11d82f03
MA
8643 * src/muscle_tab.c: Include muscle_tab.h.
8644 Rename macro_tabble to muscle_table.
8645 (mhash1, mhash2, mcmp): Use muscle_entry.
8646 (macro_init): Rename muscle_init. Update.
8647 (macro_insert): Rename muscle_insert. Update.
8648 (macro_find): Rename muscle_find. Update.
8649
8650 * src/main.c: Include muscle_tab.h.
8651 (main): Call muscle_init ().
8652 * src/Makefile.am (bison_SOURCES): Echo modifications.
8653
93a37297
MA
86542001-09-02 Marc Autret <autret_m@epita.fr>
8655
f753cd62 8656 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 8657
f753cd62
MA
8658 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8659
86602001-09-02 Marc Autret <autret_m@epita.fr>
8661
8662 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 8663
682d48cd
PB
86642001-09-01 Pascal Bart <pascal.bart@epita.fr>
8665
342b8b6e 8666 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
8667 filename.
8668
087c8fda
MA
86692001-09-01 Marc Autret <autret_m@epita.fr>
8670
8671 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8672 to an explicit value to activate the feature. We do it here.
8673
dda680cb
PB
86742001-08-31 Pascal Bart <pascal.bart@epita.fr>
8675
8676 * src/output.c (prepare): Delete the `filename' muscule insertion.
8677 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8678 (parse_union_decl): Likewise.
8679 * src/macrotab.c (macro_init): Initialize filename by infile.
8680
9e644e64
MA
86812001-08-31 Marc Autret <autret_m@epita.fr>
8682
8683 * src/bison.simple (YYLSP_NEEDED): New definition.
8684 * src/output.c (prepare): Add macro insertion of `locations_flag'
8685
17da6427
PB
86862001-08-31 Pascal Bart <pascal.bart@epita.fr>
8687
8688 * src/output.c (prepare): Delete insertion of previous muscles,
8689 and insert the `prefix' muscles.
8690 * src/macrotab.c (macro_init): Likewise.
8691 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 8692 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
8693 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8694 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 8695 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
8696 name_prefix.
8697
e8cb70b9
PB
86982001-08-31 Pascal Bart <pascal.bart@epita.fr>
8699
8700 * src/main.c (main): Standardize.
8701 * src/output.c (output_table_data, output_parser): Likewise.
8702 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8703
63c2d5de
MA
87042001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8705
342b8b6e 8706 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
8707 %%epilogue.
8708 * src/output.c (output): Rename %%declarations to %%prologue.
8709 * src/bison.simple: Echo modifications.
342b8b6e 8710
d8cb5183
MA
87112001-08-31 Marc Autret <autret_m@epita.fr>
8712
8713 * src/reader.c (readgram): CleanUp.
8714 (output_token_defines): Likewise.
8715 (packsymbols): Likewise.
8716 (reader): Likewise.
8717 * src/output.c (output): CPP-out useless code.
8718
6c686258
PB
87192001-08-31 Pascal Bart <pascal.bart@epita.fr>
8720
342b8b6e 8721 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
8722 output_trailers and output_headers.
8723 * src/output.h: Remove obsolete functions prototypes of output_headers
8724 and output_trailers.
8725
8f451ef7
PB
87262001-08-30 Pascal Bart <pascal.bart@epita.fr>
8727
8728 * src/main.c: Include macrotab.h.
342b8b6e 8729 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
8730 Adjust functions prototypes.
8731 * src/macrotab.c (macro_insert): Constify key and value.
8732 (macro_find): Constify key.
8733 (macro_insert): Include 'xalloc.h'
8734 (macro_insert): Use XMALLOC.
8735 (macro_find): Constify return value.
8736 * src/output.c (output_table_data): Rename table to table_data.
8737 (output_parser): Constify macro_key, macro_value.
8738
997b6fd0 87392001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
8740
8741 * src/reader.c (parse_skel_decl): New.
342b8b6e 8742 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
8743 * src/lex.h (token_t): New token `tok_skel'.
8744 * src/lex.c (percent_table): Add skeleton option entry.
8745 Standardize.
8746
ff48177d
MA
87472001-08-29 Marc Autret <autret_m@epita.fr>
8748
8749 * src/bison.simple: Add %%user_code directive at the end.
8750 * src/reader.c (read_additionnal_code): New.
8751 (reader): Use it.
8752 * src/output.c (output_program): Remove.
8753 (output): Update.
8754
b33160bf
MA
87552001-08-28 Marc Autret <autret_m@epita.fr>
8756
8757 * src/output.c (output_actions): Clean up.
4e5caae2 8758 (output_gram): CPP-out useless code.
b33160bf
MA
8759 * src/reader.c (reader): Clean up, CPP-out useless code.
8760
d1a2daf7
PB
87612001-08-28 Pascal Bart <pascal.bart@epita.fr>
8762
342b8b6e 8763 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 8764 directive.
d1a2daf7
PB
8765 * src/bison.simple: Add `%%definitions'.
8766
2b763dfe
MA
87672001-08-28 Marc Autret <autret_m@epita.fr>
8768
8769 * config/depcomp: New file.
8770
f1a87ef6
PE
87712001-08-27 Paul Eggert <eggert@twinsun.com>
8772
8773 * src/bison.simple (yyparse): Don't take the address of an
8774 item before the start of an array, as that doesn't conform to
8775 the C Standard.
8776
82e236e2
RA
87772001-08-27 Robert Anisko <robert.anisko@epita.fr>
8778
f1a87ef6 8779 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
8780 obstack. It was done too late here.
8781
8782 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8783 completely wrong.
8784 (reader): Initialize the macro obstack here, since we need it to grow
8785 '%define' directives.
8786
8787 * src/reader.h: Declare the macro obstack as extern.
8788
b0cfa28a
RA
87892001-08-27 Robert Anisko <robert.anisko@epita.fr>
8790
8791 * src/output.c (output_parser): Fix. Store single '%' characters in
8792 the output obstack instead of throwing them away.
8793
6fc74234
AD
87942001-08-27 Akim Demaille <akim@epita.fr>
8795
8796 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8797
9c76d118
RA
87982001-08-25 Robert Anisko <robert.anisko@epita.fr>
8799
8800 * lib/Makefile.am: Adjust.
8801
a8289c62
RA
88022001-08-25 Robert Anisko <robert.anisko@epita.fr>
8803
8804 * src/bison.simple: Update and add '%%' directives.
8805
b6610515
RA
88062001-08-25 Robert Anisko <robert.anisko@epita.fr>
8807
8808 * src/reader.c (reader): Remove calls to 'output_headers' and
8809 'output_trailers'. Remove some C output.
8810 (readgram): Disable a piece of code that was writing a default
8811 definition for 'YYSTYPE'.
8812 (reader_output_yylsp): Remove.
8813 (packsymbols): Output token defintions to a macro.
8814 (copy_definition): Disable C output.
6fc74234 8815
b6610515
RA
8816 * src/reader.c (parse_macro_decl): New function used to parse macro
8817 declarations.
8818 (copy_string2): Put the body of copy_string into this new function.
8819 Add a parameter to let the caller choose whether he wants to copy the
8820 string delimiters or not.
8821 (copy_string): Be a simple call to copy_string2 with the last argument
8822 bound to true.
8823 (read_declarations): Add case for macro definition.
8824 (copy_identifier): New.
6fc74234 8825 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
8826 rather than lex.
8827
26f609ff
RA
88282001-08-25 Robert Anisko <robert.anisko@epita.fr>
8829
8830 * src/output.c (prepare): Add prefixed names.
8831 (output_parser): Output semantic actions.
8832 (output_parser): Fix bug on '%%line' directives.
6fc74234 8833
26f609ff
RA
8834 * src/output.c (output_headers): Remove. The C code printed by this
8835 function should now be in the skeletons.
8836 (output_trailers): Remove.
8837 (output): Disable call to 'reader_output_yylsp'.
8838 (output_rule_data): Do not output tables to the table obstack.
8839
8840 * src/output.c: Remove some C dedicated output.
8841 Improve the use of macro and output obstacks.
8842 (output_defines): Remove.
6fc74234 8843
26f609ff
RA
8844 * src/output.c (output_token_translations): Associate 'translate'
8845 table with a macro. No output to the table obstack.
8846 (output_gram): Same for 'rhs' and 'prhs'.
8847 (output_stos): Same for 'stos'.
8848 (output_rule_data): Same for 'r1' and 'r2'.
8849 (token_actions): Same for 'defact'.
8850 (goto_actions): Same for 'defgoto'.
8851 (output_base): Same for 'pact' and 'pgoto'.
8852 (output_table): Same for 'table'.
8853 (output_check): Same for 'check'.
6fc74234 8854
26f609ff
RA
8855 * src/output.c (output_table_data): New function.
8856 (output_short_table): Remove.
8857 (output_short_or_char_table): Remove.
6fc74234 8858
26f609ff
RA
8859 * src/output.c (output_parser): Replace most of the skeleton copy code
8860 with something new. Skeletons are now processed character by character
8861 rather than line by line, and Bison looks for '%%' macros. This is the
8862 first step in making Bison's output process (a lot) more flexible.
8863 (output_parser): Use the macro table.
8864
6f43b113
RA
88652001-08-25 Robert Anisko <robert.anisko@epita.fr>
8866
8867 * src/main.c (main): Initialize the macro table.
8868
dd3127cf
RA
88692001-08-25 Robert Anisko <robert.anisko@epita.fr>
8870
8871 * src/lex.c (percent_table): Add tok_define.
8872 * src/lex.h: Add tok_define.
8873
aa321494
RA
88742001-08-25 Robert Anisko <robert.anisko@epita.fr>
8875
8876 * src/macrotab.c: New file.
8877 * src/macrotab.h: New file.
8878 * src/Makefile.am: Update.
8879
68bd3b6b
RA
88802001-08-25 Robert Anisko <robert.anisko@epita.fr>
8881
8882 * lib/hash.c: New file.
8883 * lib/hash.h: New file.
8884 * lib/Makefile.am: Update.
8885
45f8dd1e
AD
88862001-08-15 Akim Demaille <akim@epita.fr>
8887
8888 Version 1.28c.
8889
40a64a7a 88902001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
8891
8892 * src/reader.c (readgram): Indent output macro YYSTYPE.
8893 (packsymbols): Likewise.
8894 (output_token_defines): Likewise.
8895 * src/files.c: Standardize.
8896 (compute_header_macro): New.
8897 (defines_obstack_save): New. Use compute_header_macro.
8898 (output_files): Update. Use defines_obstack_save.
8899
f9a8293a
AD
89002001-08-15 Akim Demaille <akim@epita.fr>
8901
8902 * doc/bison.texinfo (Table of Symbols): Document
8903 YYSTACK_USE_ALLOCA.
8904
150ca7a7
AD
89052001-08-15 Akim Demaille <akim@epita.fr>
8906
8907 * missing: Update from CVS Automake.
8908 * config/config.guess, config/config.sub, config/texinfo.tex:
8909 Update from gnu.org.
8910
69b5cec4
AD
89112001-08-15 Akim Demaille <akim@epita.fr>
8912
8913 * Makefile.maint: Sync with CVS Autoconf.
8914
f2b5126e
PB
89152001-08-14 Pascal Bart <pascal.bart@epita.fr>
8916
69b5cec4 8917 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
8918 `fdl.texi'.
8919 * doc/fdl.texi: Add to package.
8920
4ecbf796
MA
89212001-08-14 Marc Autret <autret_m@epita.fr>
8922
8923 Turn on %{source,header}_extension features.
8924
69b5cec4 8925 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
8926 source_extension.
8927 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 8928 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
8929 between options.
8930
95fb5662
MA
89312001-08-14 Marc Autret <autret_m@epita.fr>
8932
8933 * src/files.c (compute_base_names): Add extensions computing when
8934 `--file-prefix' used.
8935 Standardize function calls.
8936
78d09da9
MA
89372001-08-13 Marc Autret <autret_m@epita.fr>
8938
69b5cec4 8939 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
8940 defining it (defined but null disables alloca).
8941
5a009f2c
MA
89422001-08-13 Marc Autret <autret_m@epita.fr>
8943
8944 * src/bison.simple (_yy_memcpy): CPP reformat.
8945
1e41465a
PB
89462001-08-13 Pascal Bart <pascal.bart@epita.fr>
8947
8948 * tests/atconfig.in (CPPFLAGS): Fix.
8949
c67a198d
PB
89502001-08-10 Pascal Bart <pascal.bart@epita.fr>
8951
79282c6c 8952 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
8953 `gpl.texi'.
8954 * doc/gpl.texi: Add to package.
8955
09a6de7e
MA
89562001-08-10 Marc Autret <autret_m@epita.fr>
8957
8958 * src/print_graph.h: Fix.
8959 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8960
b77b9ee0
AD
89612001-08-10 Akim Demaille <akim@epita.fr>
8962
8963 * src/system.h: Provide default declarations for stpcpy, strndup,
8964 and strnlen.
8965
3e259915
MA
89662001-08-10 Robert Anisko <anisko_r@epita.fr>
8967
8968 * doc/bison.texinfo (Locations): Update @$ stuff.
8969
ca96bc2d
MA
89702001-08-09 Robert Anisko <anisko_r@epita.fr>
8971
8972 * src/bison.simple (YYLLOC_DEFAULT): Update.
8973 (yyparse): Adjust.
8974
fdc6758b
MA
89752001-08-08 Marc Autret <autret_m@epita.fr>
8976
b77b9ee0 8977 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
8978 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8979 Reported by Fabrice Bauzac.
957d4dbf 8980
600cad3b
MA
89812001-08-08 Marc Autret <autret_m@epita.fr>
8982
8983 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8984 * src/vcg.c (output_node): Fix.
8985 * src/vcg.h: Cleanup.
8986 * src/print_graph.c: Add comments.
b77b9ee0 8987 (node_output_size): New global variable. Simplify the formatting of
600cad3b 8988 the VCG graph output.
b77b9ee0 8989 (print_actions): Unused code is now used. It notifies the final state
600cad3b 8990 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 8991 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
8992 blue.
8993 Get the current node name and node_obstack by argument.
8994 (node_obstack): New variable.
8995 (print_state): Manage node_obstack.
8996 (print_core): Use node_obstack given by argument.
8997 A node is not only computed here but in print_actions also.
8998 (print_graph): CPP out useless code instead of commenting it.
8999
976e528f
AD
90002001-08-07 Pascal Bart <pascal.bart@epita.fr>
9001
9002 * tests/atconfig.in (CPPFLAGS): Fix.
9003
20e8e5ca
AD
90042001-08-07 Akim Demaille <akim@epita.fr>
9005
9006 * src/print_graph.c (quote): New.
9007 (print_core): Use it.
9008
957d4dbf 90092001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 9010
3e3da797
AD
9011 * src/vcg.c (complain.h): Include it.
9012 Unepitaize `return' invocations.
c4b66126 9013 [NDEBUG] (main): Remove.
79282c6c 9014 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
9015 * src/files.c (open_files): Initialize graph_obstack.
9016 * src/print_graph.c (print_actions): CPP out useless code.
9017 (print_core): Don't output the last `\n' in labels.
9018 Use `quote'.
9019 * src/files.c (output_files): Output the VCG file.
9020 * src/main.c (main): Invoke print_graph ();
3e3da797 9021
957d4dbf 90222001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
9023
9024 Automaton VCG graph output.
9025 Using option ``-g'' or long option ``--graph'', you can generate
9026 a gram_filename.vcg file containing a VCG description of the LALR (1)
9027 automaton of your grammar.
9028
9029 * src/main.c: Call to print_graph() function.
9030 * src/getargs.h: Update.
9031 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9032 (graph_flag): New flag.
9033 (longopts): Update.
9034 (getargs): Add case `g'.
9035 * src/files.c (graph_obstack): New obstack struct.
9036 (open_files): Initialize new obstack.
9037 (output_files): Saves graph_obstack if required.
9038 * src/files.h (graph_obstack): New extern declaration.
9039 * src/Makefile.am: Add new source files.
9040
927c1557 90412001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
9042
9043 * src/print_graph.c, src/print_graph.h (graph): New.
9044 * src/vcg.h: New file.
9045 * src/vcg.c: New file, VCG graph handling.
9046
7333d403
AD
90472001-08-06 Marc Autret <autret_m@epita.fr>
9048
9049 Add of %source_extension and %header_extension which specify
9050 the source or/and the header output file extension.
9051
9052 * src/files.c (compute_base_names): Remove initialisation of
9053 src_extension and header_extension.
9054 (compute_exts_from_gf): Update.
9055 (compute_exts_from_src): Update.
9056 (output_files): Update.
9057 * src/reader.c (parse_header_extension_decl): New.
9058 (parse_source_extension_decl): New.
9059 (read_declarations): New case statements for the new tokens.
9060 * src/lex.c (percent_table): Add entries for %source_extension
9061 and %header_extension.
9062 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9063
84163231
AD
90642001-08-06 Marc Autret <autret_m@epita.fr>
9065
9066 * configure.in: Bump to 1.28c.
9067 * doc/bison.texinfo: Texinfo thingies.
9068
8303fc42
AD
90692001-08-04 Pascal Bart <pascal.bart@epita.fr>
9070
9071 * tests/atconfig.in (CPPFLAGS): Add.
9072 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9073
70a84437
AD
90742001-08-03 Akim Demaille <akim@epita.fr>
9075
9076 Version 1.28b.
9077
2ce10144
AD
90782001-08-03 Akim Demaille <akim@epita.fr>
9079
9080 * tests/Makefile.am (check-local): Ship testsuite.
9081 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9082 Include `string.h'.
9083
1e3e4bc1
AD
90842001-08-03 Akim Demaille <akim@epita.fr>
9085
9086 * configure.in: Try using -Wformat when compiling.
9087
42b45b7f
AD
90882001-08-03 Akim Demaille <akim@epita.fr>
9089
9090 * configure.in: Bump to 1.28b.
9091
8f13fe33
AD
90922001-08-03 Akim Demaille <akim@epita.fr>
9093
9094 * src/complain.c: Adjust strerror_r portability issues.
9095
b37ba92c
AD
90962001-08-03 Akim Demaille <akim@epita.fr>
9097
9098 Version 1.28a.
9099
b0ce6046
AD
91002001-08-03 Akim Demaille <akim@epita.fr>
9101
9102 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9103 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9104 * src/getargs.c: Include complain.h.
9105 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9106 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9107
d01c415b
AD
91082001-08-03 Akim Demaille <akim@epita.fr>
9109
9110 * src/reader.c (readgram): Display hidden chars in error messages.
9111
459dd1a6
AD
91122001-08-03 Akim Demaille <akim@epita.fr>
9113
9114 Update to gettext 0.10.39.
9115
53b74c0c
AD
91162001-08-03 Akim Demaille <akim@epita.fr>
9117
9118 * lib/strspn.c: New.
9119
234a3be3
AD
91202001-08-01 Marc Autret <autret_m@epita.fr>
9121
9122 * doc/bison.texinfo: Update.
9123 * doc/bison.1 (mandoc): Update.
9124 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9125 * src/files.c: Support output files extensions computing.
9126 (src_extension): New static variable.
9127 (header_extension): New static variable.
9128 (tr): New function.
9129 (get_extension_index): New function, gets the index of an extension
9130 filename in a string.
9131 (compute_exts_from_gf): New function, computes extensions from the
9132 grammar file extension.
9133 (compute_exts_from_src): New functions, computes extensions from the
9134 C source file extension, file given by ``-o'' option.
9135 (compute_base_names): Update.
9136 (output_files): Update.
9137
847bf1f5
AD
91382001-08-01 Robert Anisko <anisko_r@epita.fr>
9139
d995fee7 9140 * doc/bison.texi: Document @$.
847bf1f5
AD
9141 (Locations): New section.
9142
d074a105
AD
91432001-07-18 Akim Demaille <akim@epita.fr>
9144
9145 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9146 * config/prev-version.txt, config/move-if-change: New.
9147 * Makefile.am: Adjust.
9148
3419715d
AD
91492001-07-08 Pascal Bart <pascal.bart@epita.fr>
9150
9151 * src/bison.simple (yyparse): Suppress warning `comparaison
9152 between signed and unsigned'.
9153
62ab6972
AD
91542001-07-05 Pascal Bart <pascal.bart@epita.fr>
9155
9156 * src/getargs.h (raw_flag): Remove.
9157 * src/getargs.c: Die on `-r'/`--raw'.
9158 * src/lex.c (parse_percent_token): Die on `%raw'.
9159 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9160 * tests/calc.at: Suppress test with option `--raw'.
9161
1e24cc5b
AD
91622001-07-14 Akim Demaille <akim@epita.fr>
9163
9164 * config/: New.
9165 * configure.in: Require Autoconf 2.50.
9166 Update to gettext 0.10.38.
9167
32dfccf8
AD
91682001-03-16 Akim Demaille <akim@epita.fr>
9169
9170 * doc/bison.texinfo: ANSIfy the examples.
9171
cd5bd6ac
AD
91722001-03-16 Akim Demaille <akim@epita.fr>
9173
9174 * getargs.c (skeleton): New variable.
9175 (longopts): --skeleton is a new option.
9176 (shortopts, getargs): -S is a new option.
9177 * getargs.h: Declare skeleton.
9178 * output.c (output_parser): Use it.
9179
5141b016
AD
91802001-03-16 Akim Demaille <akim@epita.fr>
9181
9182 * m4/strerror_r.m4: New.
9183 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9184 * lib/error.h, lib/error.c: Update.
9185
447992b9
AD
91862001-03-16 Akim Demaille <akim@epita.fr>
9187
9188 * src/getargs.c (longopts): Clean up.
9189
274d42ce
AD
91902001-02-21 Akim Demaille <akim@epita.fr>
9191
9192 * src/reader.c (gensym): `gensym_count' is your own.
9193 Use a static buf to create the symbol name, as token_buffer is no
9194 longer a buffer.
9195
22c821f3
AD
91962001-02-08 Akim Demaille <akim@epita.fr>
9197
9198 * src/conflicts.c (conflict_report): Be sure not to append to res
9199 between two calls, which could happen if both first sprintf were
9200 skipped, but not the first cp += strlen.
9201
18569462
AD
92022001-02-08 Akim Demaille <akim@epita.fr>
9203
9204 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9205 New, from fileutils 4.0.37.
9206 * configure.in: Require Autoconf 2.49c. I took some time before
9207 making this decision. This is the only way out for portability
9208 issues in Bison, it would mean way too much duplicate effort to
9209 import in Bison features implemented in 2.49c since 2.13.
9210 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9211
0d8f3c8a
AD
92122001-02-02 Akim Demaille <akim@epita.fr>
9213
9214 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 9215 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 9216
f17bcd1f
AD
92172001-01-19 Akim Demaille <akim@epita.fr>
9218
9219 Get rid of the ad hoc handling of token_buffer in the scanner: use
9220 the obstacks.
9221
9222 * src/lex.c (token_obstack): New.
9223 (init_lex): Initialize it. No longer call...
9224 (grow_token_buffer): this. Remove it.
9225 Adjust all the places which used it to use the obstack.
9226
511e79b3
AD
92272001-01-19 Akim Demaille <akim@epita.fr>
9228
9229 * src/lex.h: Rename all the tokens:
9230 s/\bENDFILE\b/tok_eof/g;
9231 s/\bIDENTIFIER\b/tok_identifier/g;
9232 etc.
9233 Let them be enums, not #define, to ease debugging.
9234 Adjust all the code.
9235
0d6508ef
AD
92362001-01-18 Akim Demaille <akim@epita.fr>
9237
9238 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9239 * src/lex.c (maxtoken, grow_token_buffer): Static.
9240
6deb4447
AD
92412001-01-18 Akim Demaille <akim@epita.fr>
9242
9243 Since we now use obstacks, more % directives can be enabled.
9244
9245 * src/lex.c (percent_table): Also accept `%yacc',
9246 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9247 `%debug'.
9248 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9249 instead of returning a token.
9250 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9251 * src/reader.c (read_declarations): Adjust.
9252 * src/files.c (open_files): Don't call `compute_base_names', don't
9253 compute `attrsfile' since they depend upon data which might be
9254 *in* the input file now.
9255 (output_files): Do it here.
9256 * src/output.c (output_headers): Document the fact that this patch
9257 introduces a guaranteed SEGV for semantic parsers.
9258 * doc/bison.texinfo: Document them.
9259 * tests/suite.at: Exercise these %options.
9260
ff4423cc
AD
92612000-12-20 Akim Demaille <akim@epita.fr>
9262
9263 Also handle the output file (--verbose) with obstacks.
9264
9265 * files.c (foutput): Remove.
9266 (output_obstack): New.
9267 Adjust all dependencies.
9268 * src/conflicts.c: Return a string.
9269 * src/system.h (obstack_grow_string): Rename as...
9270 (obstack_sgrow): this. Be ready to work with non literals.
9271 (obstack_fgrow4): New.
9272
956dba3a
AD
92732000-12-20 Akim Demaille <akim@epita.fr>
9274
9275 * src/files.c (open_files): Fix the computation of short_base_name
9276 in the case of `-o foo.tab.c'.
9277
337bab46
AD
92782000-12-20 Akim Demaille <akim@epita.fr>
9279
9280 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9281 (copy_dollar): Now that everything uses obstacks, get rid of the
9282 FILE * parameters.
9283
5d3214b8
AD
92842000-12-20 Akim Demaille <akim@epita.fr>
9285
9286 * src/files.c (open_files): Actually the `.output' file is based
9287 on the short_base_name, not base_name.
9288 * tests/suite.at (Checking output file names): Adjust.
9289
29092a57
AD
92902000-12-20 Akim Demaille <akim@epita.fr>
9291
9292 * src/bison.s1: Remove, we now use directly...
9293 * src/bison.simple: this.
9294 * src/Makefile.am: Use pkgdata instead of data.
9295
ea5607fd
AD
92962000-12-20 Akim Demaille <akim@epita.fr>
9297
9298 * src/files.c (guard_obstack): New.
9299 (open_files): Initialize it.
9300 (output_files): Dump it...
9301 * src/files.h: Export it.
9302 * src/reader.c (copy_guard): Use it.
9303
27110317
AD
93042000-12-19 Akim Demaille <akim@epita.fr>
9305
9306 * src/files.c (outfile, defsfile, actfile): Removed as global
9307 vars.
9308 (open_files): Don't compute them.
9309 (output_files): Adjust.
9310 (base_name, short_base_name): Be global.
9311 Adjust dependencies.
9312
19c50364
AD
93132000-12-19 Akim Demaille <akim@epita.fr>
9314
9315 * src/files.c (strsuffix): New.
9316 (stringappend): Be just like strcat but allocate.
9317 (base_names): Eve out from open_files.
9318 Try to simplify the rather hairy computation of base_name and
9319 short_base_name.
9320 (open_files): Use it.
9321 * tests/suite.at (Checking output file names): New test.
9322
573c1d9f
AD
93232000-12-19 Akim Demaille <akim@epita.fr>
9324
9325 * src/system.h (obstack_grow_literal_string): Rename as...
9326 (obstack_grow_string): this.
9327 * src/output.c (output_parser): Recognize `%% actions' instead of
9328 `$'.
9329 * src/bison.s1: s/$/%% actions/.
9330 * src/bison.hairy: Likewise.
9331
ef7ddedd
AD
93322000-12-19 Akim Demaille <akim@epita.fr>
9333
9334 * src/output.c (output_parser): Compute the `#line' lines when
9335 there are.
9336 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9337 Suggested by Hans Aberg.
9338
ff61dabd
AD
93392000-12-19 Akim Demaille <akim@epita.fr>
9340
9341 Let the handling of the skeleton files be local to the procedures
9342 that use it.
9343
9344 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9345 longer static.
9346 (fparser, open_extra_files): Remove.
9347 (open_files, output_files): Don't take care of fparser.
9348 * src/files.h: Adjust.
9349 * src/output.c (output_parser): Open and close the file to the
9350 skeleton.
9351 * src/reader.c (read_declarations): When %semantic_parser, open
9352 fguard.
9353
55b96341
AD
93542000-12-19 Akim Demaille <akim@epita.fr>
9355
9356 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9357 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9358
358c15b7
AD
93592000-12-19 Akim Demaille <akim@epita.fr>
9360
9361 * src/files.c (open_files): Yipee! We no longer need all the code
9362 looking for `/tmp' since we have no tmp file.
9363
7de3329e
AD
93642000-12-19 Akim Demaille <akim@epita.fr>
9365
9366 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9367 New macros.
9368 * src/files.c (open_files): Less dependency on MSDOS etc.
9369
3abcd459
AD
93702000-12-14 Akim Demaille <akim@epita.fr>
9371
9372 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9373 Provide a default definition.
9374 Use it when executing the default @ action.
9375 * src/reader.c (reader_output_yylsp): No longer include
9376 `timestamp' and `text' in the default YYLTYPE.
9377
2a91a95e
AD
93782000-12-12 Akim Demaille <akim@epita.fr>
9379
9380 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9381 (copy_guard): Quote the file names.
9382 Reported by Laurent Mascherpa.
9383
14d3eb9b
AD
93842000-12-12 Akim Demaille <akim@epita.fr>
9385
9386 * src/output.c (output_headers, output_program, output): Be sure
9387 to escape special characters when outputting filenames.
9388 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9389 (output_headers): Don't depend on them, Use ACTSTR.
9390
d7045ec6
AD
93912000-11-17 Akim Demaille <akim@epita.fr>
9392
9393 * lib/obstack.h: Formatting changes.
9394 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9395 prevents type checking.
9396 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9397 cast the value to (void *): assigning a `foo *' to a `void *'
9398 variable is valid.
9399 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9400 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9401 append characters.
9402
6fd54b73
AD
94032000-11-17 Akim Demaille <akim@epita.fr>
9404
9405 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9406 as...
9407 (suite.m4, regression.m4, calc.m4): these.
9408 * tests/atgeneral.m4: Update from CVS Autoconf.
9409
4c50eae6
AD
94102000-11-17 Akim Demaille <akim@epita.fr>
9411
9412 * tests/regression.m4 (%union and --defines): New test,
9413 demonstrating a current bug in the obstack implementation.
9414
a35f64ea
AD
94152000-11-17 Akim Demaille <akim@epita.fr>
9416
9417 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9418 macros.
9419 Use them to declare the variables which are global or local to
9420 `yyparse'.
9421
7de23534
AD
94222000-11-17 Akim Demaille <akim@epita.fr>
9423
9424 * acconfig.h: Remove, no longer used.
9425
aa7815f5
AD
94262000-11-07 Akim Demaille <akim@epita.fr>
9427
9428 * src: s/Copyright (C)/Copyright/g.
9429
5af1f549
AD
94302000-11-07 Akim Demaille <akim@epita.fr>
9431
9432 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9433 defining.
9434 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9435
553e2b22
AD
94362000-11-07 Akim Demaille <akim@epita.fr>
9437
9438 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9439 Merge in a single CPP if/else.
9440
8a4f41d6
AD
94412000-11-07 Akim Demaille <akim@epita.fr>
9442
9443 * src/output.c (output): Remove useless variables.
9444 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9445 argument `data' for consistency with the prototypes.
9446 Qualify it `const'.
9447 (obstack_copy, obstack_copy0): Rename the second argument as
9448 `address' for consistency. Qualify it `const'.
9449 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9450 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9451 `const' their input argument (`data' or `address').
9452 Adjust the corresponding macros to include `const' in casts.
9453
095a3fb5
AD
94542000-11-03 Akim Demaille <akim@epita.fr>
9455
9456 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9457 s/PFILE1/BISON_HAIRY/.
9458 Adjust dependencies.
9459
d1cdce7c
AD
94602000-11-03 Akim Demaille <akim@epita.fr>
9461
090c5ebf 9462 For some reason, this was not applied.
d1cdce7c
AD
9463
9464 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9465 `unlink': it's no longer used.
9466
9311529b
AD
94672000-11-03 Akim Demaille <akim@epita.fr>
9468
9469 * src/files.c (skeleton_find): New function, eved out of...
9470 (open_files, open_extra_files): here.
9471
d8880f69
AD
94722000-11-03 Akim Demaille <akim@epita.fr>
9473
9474 Don't use `atexit'.
9475
9476 * src/files.c (obstack_save): New function.
9477 (done): Rename as...
9478 (output_files): this.
9479 Use `obstack_save'.
9480 * src/main.c (main): Don't use `atexit' to register `done', since
9481 it no longer has to remove tmp files, just call `output_files'
9482 when there are no errors.
9483
0dbb648e
AD
94842000-11-02 Akim Demaille <akim@epita.fr>
9485
9486 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9487 `unlink': it's no longer used.
9488 * src/files.h: Formatting changes.
9489
896fe5c1
AD
94902000-11-02 Akim Demaille <akim@epita.fr>
9491
9492 Remove the last uses of mktemp and unlink/delete.
9493
9494 * src/files.c (fdefines, ftable): Removed.
9495 (defines_ostack, table_obstack): New.
9496 Adjust dependencies of the former into uses of the latter.
9497 * src/output.c (output_short_or_char_table, output_short_table):
9498 Convert to using obstacks.
9499 * src/reader.c (copy_comment2): Accept one FILE * and two
9500 obstacks.
9501 (output_token_defines, reader_output_yylsp): Use obstacks.
9502 * src/system.h (obstack_fgrow3): New.
9503
dd60faec
AD
95042000-11-01 Akim Demaille <akim@epita.fr>
9505
9506 Change each use of `fattrs' into a use of `attrs_obstack'.
9507
9508 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9509 * src/files.c (fattrs): Remove.
9510 (attrs_obstack): New.
9511 Adjust all dependencies.
9512 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9513
8c7ebe49
AD
95142000-11-01 Akim Demaille <akim@epita.fr>
9515
9516 Introduce obstacks.
9517 Change each use of `faction' into a use of `action_obstack'.
9518
9519 * lib/obstack.h, lib/obstack.c: New files.
9520 * src/files.c (faction): Remove.
9521 (action_obstack): New.
9522 Adjust all dependencies.
9523
77aee789
AD
95242000-10-20 Akim Demaille <akim@epita.fr>
9525
9526 * lib/quote.h (PARAMS): New macro. Use it.
9527
43591cec
AD
95282000-10-16 Akim Demaille <akim@epita.fr>
9529
9530 * src/output.c (output_short_or_char_table): New function.
9531 (output_short_table, output_token_translations): Use it.
9532 (goto_actions): Use output_short_table.
9533
1e9798d5
AD
95342000-10-16 Akim Demaille <akim@epita.fr>
9535
9536 * src/symtab.c (bucket_new): New function.
9537 (getsym): Use it.
9538
9539 * src/output.c (output_short_table): New argument to display the
9540 comment associated with the table.
9541 Adjust dependencies.
9542 (output_gram): Use it.
9543 (output_rule_data): Nicer output layout for YYTNAME.
9544
f282676b
AD
95452000-10-16 Akim Demaille <akim@epita.fr>
9546
9547 * src/lex.c (read_typename): New function.
9548 (lex): Use it.
9549 * src/reader.c (copy_dollar): Likewise.
9550
550a72a3
AD
95512000-10-16 Akim Demaille <akim@epita.fr>
9552
9553 * src/reader.c (copy_comment2): Expect the input stream to be on
9554 the `/' which is suspected to open a comment, instead of being
9555 called after `//' or `/*' was read.
9556 (copy_comment, copy_definition, parse_union_decl, copy_action)
9557 (copy_guard): Adjust.
9558
131e2fef
AD
95592000-10-16 Akim Demaille <akim@epita.fr>
9560
9561 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9562 `read_signed_integer'.
9563
79282c5a
AD
95642000-10-16 Akim Demaille <akim@epita.fr>
9565
9566 * src/reader.c (copy_dollar): New function.
9567 (copy_guard, copy_action): Use it.
9568
ff4a34be
AD
95692000-10-16 Akim Demaille <akim@epita.fr>
9570
9571 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9572 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9573 New files, from Fileutils 4.0.27.
9574 * src/main.c (printable_version): Remove.
9575 * src/lex.c, src/reader.c: Use `quote'.
9576
95772000-10-04 Akim Demaille <akim@epita.fr>
9578
9579 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9580
14ded682
AD
95812000-10-04 Akim Demaille <akim@epita.fr>
9582
9583 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9584
8e03724b
AD
95852000-10-04 Akim Demaille <akim@epita.fr>
9586
9587 When a literal string is used to define two different tokens,
9588 `bison -v' segfaults.
9589 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9590
9591 * tests/regression.m4: New file.
9592 Include the core of the sample provided by Piotr Gackiewicz.
9593 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9594 properly.
9595
a9e64249
AD
95962000-10-04 Akim Demaille <akim@epita.fr>
9597
9598 * src/reader.c (parse_expect_decl): Keep `count' within the size
9599 of `buffer'.
9600 From Neil Booth.
9601
da9abf43
AD
96022000-10-02 Paul Eggert <eggert@twinsun.com>
9603
9604 * bison.s1 (yyparse): Assign the default value
9605 unconditionally, to avoid a GCC warning and make the parser a
9606 tad smaller.
9607
c33638bb
AD
96082000-10-02 Akim Demaille <akim@epita.fr>
9609
9610 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9611 options.
9612
444c570a
AD
96132000-10-02 Akim Demaille <akim@epita.fr>
9614
9615 * src/derives.c, src/print.c, src/reduce.c: To ease the
9616 translation, move some `\n' out of the translated strings.
9617
89cab50d
AD
96182000-10-02 Akim Demaille <akim@epita.fr>
9619
9620 The location tracking mechanism is precious for parse error
9621 messages. Nevertheless, it is enabled only when `@n' is used in
9622 the grammar, which is a different issue (you can use it in error
9623 message, but not in the grammar per se). Therefore, there should
9624 be another means to enable it.
9625
9626 * src/getargs.c (getargs): Support `--locations'.
9627 (usage): Report it.
9628 * src/getargs.h (locationsflag): Export it.
9629 * src/lex.c (percent_table): Support `%locations'.
9630 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9631 with `locationsflag'.
9632 * doc/bison.texinfo: Document `--locations' and `%locations'.
9633 Sort the options.
9634 * tests/calc.m4: Test it.
9635
9636 For regularity of the names, replace each
9637 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9638 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9639 In addition replace each `flag' with `_flag'.
9640
d6c2cba0
AD
96412000-10-02 Akim Demaille <akim@epita.fr>
9642
9643 Also test parse error messages, including with YYERROR_VERBOSE.
9644
9645 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9646 associative).
9647 Use it to check the computations.
9648 Use it to check `nonassoc' is honored.
9649 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9650 `--yyerror-verbose'.
9651 (_AT_CHECK_CALC): Adjust to this option.
9652 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9653
5a35a6cb
AD
96542000-10-02 Akim Demaille <akim@epita.fr>
9655
9656 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9657 the latter demonstrates a flaw in the handling of non debugging
9658 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9659 was used in order to simplify:
9660
9661 #if YYDEBUG
9662 if (yydebug)
9663 {
9664 ...
9665 }
9666 #endif
9667
9668 into
9669
9670 if (yydebug)
9671 {
9672 ...
9673 }
9674
9675 unfortunately this leads to a CPP conflict when
9676 `--name-prefix=foo' is used since it produces `#define yydebug
9677 foodebug'.
9678
9679 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9680 (YYDPRINTF): New macro.
9681 Spread its use.
9682 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9683 the bison options.
9684 Also test `--verbose', `--defines' and `--name-prefix'.
9685
71da9eea
AD
96862000-10-02 Akim Demaille <akim@epita.fr>
9687
9688 Improve the readability of the produced parsers.
9689
9690 * src/bison.s1: Formatting changes.
9691 Improve the comment related to the `$' mark.
9692 (yydefault): Don't fall through to `yyresume': `goto' there.
9693 * src/output.c (output_parser): When the `$' is met, skip the end
9694 of its line.
9695 New variable, `number_of_dollar_signs', to check there's exactly
9696 one `$' in the parser skeleton.
9697
95e36146
AD
96982000-10-02 Akim Demaille <akim@epita.fr>
9699
9700 * lib/xstrdup.c: New file, from the fileutils.
9701 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9702 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9703 instead of strlen + xmalloc + strcpy.
9704 * src/symtab.c (copys): Remove, use xstrdup instead.
9705
d7020c20
AD
97062000-10-02 Akim Demaille <akim@epita.fr>
9707
9708 * src/gram.h (associativity): New enum type which replaces the
9709 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9710 `right_assoc', `left_assoc' and `non_assoc'.
9711 Adjust all dependencies.
9712 * src/reader.c: Formatting changes.
9713 (LTYPESTR): Don't define it, use it as a literal in
9714 `reader_output_yylsp'.
9715 * src/symtab.h (symbol_class): New enum type which replaces the
9716 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9717 `sunknown', `stoken and `snterm'.
9718
1916f98e
AD
97192000-10-02 Akim Demaille <akim@epita.fr>
9720
9721 * src/getargs.c (fixed_outfiles): Rename as...
9722 (yaccflag): for consistency and accuracy.
9723 Adjust dependencies.
9724
d7913476
AD
97252000-10-02 Akim Demaille <akim@epita.fr>
9726
9727 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9728 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9729 difficult and introduced a lot of core dump. It turns out that
9730 Bison used an implementation of `xmalloc' based on `calloc', and
9731 at various places it does depend upon the initialization to 0. I
9732 have not tried to isolate the pertinent places, and all the former
9733 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9734 someone should address this issue.
9735
9736 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9737 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9738 files.
9739 Adjust dependencies.
9740 * src/warshall.h: New file.
9741 Propagate.
9742
340ef489
AD
97432000-10-02 Akim Demaille <akim@epita.fr>
9744
9745 Various anti-`extern in *.c' changes.
9746
9747 * src/system.h: Include `assert.h'.
9748
b2ca4022
AD
97492000-10-02 Akim Demaille <akim@epita.fr>
9750
9751 * src/state.h (nstates, final_state, first_state, first_shift)
9752 (first_reduction): Move their exportation from here...
9753 * src/LR0.h: to here.
9754 Adjust dependencies.
9755 * src/getargs.c (statisticsflag): New variable.
9756 Add support for `--statistics'.
9757 Adjust dependencies.
9758
9759 Remove a lot of now useless `extern' statements in most files.
9760
403b315b
AD
97612000-10-02 Akim Demaille <akim@epita.fr>
9762
9763 * src/LR0.h: New file.
9764 Propagate its use.
9765
07a58c13
AD
97662000-10-02 Akim Demaille <akim@epita.fr>
9767
9768 * src/print.h: New file.
9769 Propagate its use.
9770 * src/print.c: Formatting and ordering changes.
9771 (verbose, terse): Replace with...
9772 (print_results): this new function.
9773 Adjust dependencies.
9774
0619caf0
AD
97752000-10-02 Akim Demaille <akim@epita.fr>
9776
9777 * src/conflicts.c (conflict_report): New function.
9778 (conflict_log, verbose_conflict_log): Replace with...
9779 (print_conflicts): this function.
9780 Adjust dependencies.
9781 * src/conflicts.h: New file.
9782 Propagate its inclusion.
9783
3519ec76
AD
97842000-10-02 Akim Demaille <akim@epita.fr>
9785
9786 * src/nullable.h: New file.
9787 Propagate its inclusion.
9788 * src/nullable.c: Formatting changes.
9789
015acc48
AD
97902000-10-02 Akim Demaille <akim@epita.fr>
9791
9792 * src/reduce.h: New file.
9793 Propagate its inclusion.
9794 * src/reduce.c: Topological sort and other formatting changes.
9795 (bool, TRUE, FALSE): Move their definition to...
9796 * src/system.h: here.
9797
8963a27b
AD
97982000-10-02 Akim Demaille <akim@epita.fr>
9799
9800 * src/files.c: Formatting changes.
9801 (tryopen, tryclose, openfiles): Rename as...
9802 (xfopen, xfclose, open_files): this.
9803 (stringappend): static.
9804 * src/files.h: Complete the list of exported symbols.
9805 Propagate its use.
9806
a70083a3
AD
98072000-10-02 Akim Demaille <akim@epita.fr>
9808
9809 * src/reader.h: New file.
9810 Propagate its use instead of tedious list of `extern' and
9811 prototypes.
9812 * src/reader.c: Formatting changes, topological sort,
9813 s/register//.
9814
abadc117
AD
98152000-10-02 Akim Demaille <akim@epita.fr>
9816
9817 * src/lex.h: Prototype `lex.c' exported functions.
9818 * src/reader.c: Adjust.
9819 * src/lex.c: Formatting changes.
9820 (safegetc): Rename as...
9821 (xgetc): this.
9822
720d742f
AD
98232000-10-02 Akim Demaille <akim@epita.fr>
9824
9825 * src/lalr.h: New file.
9826 Propagate its inclusion instead of prototypes and `extern'.
9827 * src/lalr.c: Formatting changes, topological sorting etc.
9828
f2acea59
AD
98292000-10-02 Akim Demaille <akim@epita.fr>
9830
9831 * src/output.c (token_actions): Introduce a temporary array,
9832 YYDEFACT, that makes it possible for this function to use
9833 output_short_table.
9834
d019d655
AD
98352000-10-02 Akim Demaille <akim@epita.fr>
9836
9837 `user_toknums' is output as a `short[]' in `output.c', while it is
9838 defined as a `int[]' in `reader.c'. For consistency with the
9839 other output tables, `user_toknums' is now defined as a table of
9840 shorts.
9841
9842 * src/reader.c (user_toknums): Be a short table instead of an int
9843 table.
9844 Adjust dependencies.
9845
9846 Factor the short table outputs.
9847
9848 * src/output.c (output_short_table): New function.
9849 * src/output.c (output_gram, output_stos, output_rule_data)
9850 (output_base, output_table, output_check): Use it.
9851
6c89f1c1
AD
98522000-10-02 Akim Demaille <akim@epita.fr>
9853
9854 * src/output.c (output): Topological sort of the functions, in
9855 order to get rid of the `static' prototypes.
9856 No longer use `register'.
9857 * src/output.h: New file.
9858 Propagate its inclusion in files explicitly prototyping functions
9859 from output.c.
9860
d9efd181
AD
98612000-09-21 Akim Demaille <akim@epita.fr>
9862
9863 * src/atgeneral.m4: Update from Autoconf.
9864
c29240e7 98652000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
9866
9867 * src/closure.h: New file.
9868 * src/closure.c: Formatting changes, topological sort over the
9869 functions, use of closure.h.
9870 (initialize_closure, finalize_closure): Rename as...
9871 (new_closure, free_closure): these. Adjust dependencies.
9872 * src/LR0.c: Formatting changes, topological sort, use of
9873 cloture.h.
9874 (initialize_states): Rename as...
9875 (new_states): this.
9876 * src/Makefile.am (noinst_HEADERS): Adjust.
9877
499daa50
AD
98782000-09-20 Akim Demaille <akim@epita.fr>
9879
9880 * src/acconfig.h: Don't protect config.h against multiple
9881 inclusion.
9882 Don't define PARAMS.
9883 * src/system.h: Define PARAMS.
9884 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9885 purpose of config.h. system.h must not try to fix wrong
9886 definitions in config.h.
9887
cc84fd5d
AD
98882000-09-20 Akim Demaille <akim@epita.fr>
9889
9890 * src/derives.h: New file.
9891 * src/main.c, src/derives.h: Use it.
9892 Formatting changes.
9893 * src/Makefile.am (noinst_HEADERS): Adjust.
9894
db5b3a89
AD
98952000-09-20 Akim Demaille <akim@epita.fr>
9896
9897 * tests/atgeneral.m4: Update from Autoconf.
9898 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9899 (AT_CHECK_CALC): New macros.
9900 Use these macros to test bison with options `', `--raw',
9901 `--debug', `--yacc', `--yacc --debug'.
9902
ceed8467
AD
99032000-09-19 Akim Demaille <akim@epita.fr>
9904
9905 * src/output.c: Formatting changes.
9906 * src/machine.h: Remove, leaving its contents in...
9907 * src/system.h: here.
9908 Include stdio.h.
9909 Adjust all dependencies on stdio.h and machine.h.
9910 * src/getargs.h: New file.
9911 Let all `extern' declarations about getargs.c be replaced with
9912 inclusion of `getargs.h'.
9913 * src/Makefile.am (noinst_HEADERS): Adjust.
9914
9915 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9916 scope.
9917 (yyerror): Returns void, not int.
9918 * doc/bison.texinfo: Formatting changes.
9919
05a1d24b
AD
99202000-09-19 Akim Demaille <akim@epita.fr>
9921
9922 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9923 portable.
9924
cbd25751
AD
99252000-09-18 Akim Demaille <akim@epita.fr>
9926
9927 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9928 * src/Makefile.am (INCLUDES): Don't.
9929 Be ready to fetch headers in lib/.
9930
13863333
AD
99312000-09-18 Akim Demaille <akim@epita.fr>
9932
9933 * doc/bison.texinfo: Update the copyright.
9934 ANSIfy and GNUify the examples.
9935 Remove the old menu.
9936
0d533154
AD
99372000-09-18 Akim Demaille <akim@epita.fr>
9938
9939 First set of tests: use the `calc' example from the documentation.
9940
9941 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9942 is defined only when YYDEBUG is.
9943 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9944 * src/files.c (tryopen, tryclose): Formatting changes.
9945 Move to the top and be static.
9946 * src/reader.c (read_signed_integer): Likewise.
9947 * tests/calc.m4: New file.
9948 * Makefile.am, suite.m4: Adjust.
9949 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9950
e79137ac
AD
99512000-09-18 Akim Demaille <akim@epita.fr>
9952
9953 Add support for an Autotest test suite for Bison.
9954
9955 * m4/m4.m4, m4/atconfig.m4: New files.
9956 * m4/Makefile.am (EXTRA_DIST): Adjust.
9957 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9958 files.
9959 * src/getargs.c: Display a more standard --version message.
9960 * src/reader.c (reader): Formatting changes.
9961 No longer depend upon VERSION_STRING.
9962 * configure.in: No longer use `dnl'.
9963 Set up the test suite and the new directory `tests/.
9964 (VERSION_STRING): Remove.
9965
27821bff
AD
99662000-04-14 Akim Demaille <akim@epita.fr>
9967
9968 * src/reader.c (copy_comment2): New function, same as former
9969 `copy_comment', but outputs into two FILE *.
9970 (copy_comment): Use it.
9971 (parse_union_decl): Use it.
9972 (get_type, parse_start_decl): Use the same `invalid' message.
9973 (parse_start_decl, parse_union_decl): Use the same `multiple'
9974 message.
9975 (parse_union_decl, copy_guard, copy_action): Use the same
9976 `unmatched' message.
9977 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9978
cfe5fbc0
AD
99792000-03-31 Akim Demaille <akim@epita.fr>
9980
9981 * src/files.c (tryopen, tryclose): Move to the top.
9982 Be static.
9983
cb7db13e
AD
99842000-03-31 Akim Demaille <akim@epita.fr>
9985
9986 * src/main.c (main): Don't call `done', exit does it.
9987
a0f6b076
AD
99882000-03-31 Akim Demaille <akim@epita.fr>
9989
36281465
AD
9990 * allocate.c: s/return (foo)/return foo/.
9991 * lalr.c: Likewise.
9992 * LR0.c: Likewise.
9993 * output.c: Likewise.
9994 * reader.c: Likewise.
9995 * symtab.c: Likewise.
9996 * vmsgetargs.c: Likewise.
9997
99982000-03-31 Akim Demaille <akim@epita.fr>
9999
10000 Clean up the error reporting functions.
a0f6b076
AD
10001
10002 * src/report.c: New file.
10003 * src/report.h: Likewise.
10004 * src/Makefile.am: Adjust.
10005 * m4/error.m4: New file.
10006 * m4/Makefile.am: Adjust.
10007 * configure.in (jm_PREREQ_ERROR): Call it.
10008 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10009 Remove.
10010 (fatal, fatals): Remove. All callers use complain.c::fatal.
10011 (warn, warni, warns, warnss, warnss): Remove. All callers use
10012 complain.c::complain.
10013 (toomany): Remove, use fatal instead.
10014 * src/files.c (done): No argument, use complain_message_count.
10015 * src/main.c (main): Register `done' to `atexit'.
10016
10017 * src/getargs.c (usage): More `fputs', less `fprintf'.
10018
18539825
AD
100192000-03-28 Akim Demaille <akim@epita.fr>
10020
10021 * lib/: New directory.
10022 * Makefile.am (SUBDIRS): Adjust.
10023 * configure.in: Adjust.
10024 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10025 useless.
10026 * src/alloca.c: Moved to lib/.
10027 * src/getopt.c: Likewise.
10028 * src/getopt1.c: Likewise.
10029 * src/getopt.h: Likewise.
10030 * src/ansi2knr.c: Likewise.
10031 * src/ansi2knr.1: Likewise.
10032 * src/Makefile.am: Adjust.
10033 * lib/Makefile.am: New file.
10034
9f306f2a
AD
100352000-03-28 Akim Demaille <akim@epita.fr>
10036
10037 * src/getargs.c (usage): Refresh the help message.
10038
0ba347b6
AD
100392000-03-17 Akim Demaille <akim@epita.fr>
10040
10041 * src/getopt1.c: Updated from textutils 2.0e
10042 * src/getopt.c: Likewise.
10043 * src/getopt.h: Likewise.
10044
dbe7f271
AD
100452000-03-17 Akim Demaille <akim@epita.fr>
10046
10047 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10048 the file name, not the whole `#line LINE FILE'.
10049
75bbe78d
AD
100502000-03-17 Akim Demaille <akim@epita.fr>
10051
10052 On syntax errors, report the token on which we choked.
10053
aa5fd0ee
AD
10054 * src/bison.s1 (yyparse): In the label yyerrlab, when
10055 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 10056
7b306f52
AD
100572000-03-17 Akim Demaille <akim@epita.fr>
10058
aa5fd0ee 10059 * src/reader.c (copy_at): New function.
7b306f52
AD
10060 (copy_guard): Use it.
10061 (copy_action): Use it.
10062
e87b5700
AD
100632000-03-17 Akim Demaille <akim@epita.fr>
10064
10065 Be kind to translators, save some useless translations.
10066
aa5fd0ee 10067 * src/main.c (banner): New function.
e87b5700
AD
10068 (fatal_banner): Use it.
10069 (warn_banner): Use it.
10070
ae3c3164
AD
100712000-03-17 Akim Demaille <akim@epita.fr>
10072
aa5fd0ee
AD
10073 * src/reader.c (copy_definition): Use copy_string and
10074 copy_comment. Removed now unused `match', `ended',
10075 `cplus_comment'.
ae3c3164
AD
10076 (copy_comment, copy_string): Moved, to be visible from
10077 copy_definition.
10078
4dc58e7c
AD
100792000-03-17 Akim Demaille <akim@epita.fr>
10080
aa5fd0ee
AD
10081 * src/reader.c (copy_string): Declare `static inline'. No
10082 problems with inline, since it is checked by configure.
4dc58e7c
AD
10083 (copy_comment): Likewise.
10084
0a6384c4
AD
100852000-03-17 Akim Demaille <akim@epita.fr>
10086
aa5fd0ee 10087 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 10088
3cef001a
AD
100892000-03-17 Akim Demaille <akim@epita.fr>
10090
aa5fd0ee 10091 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
10092 (copy_action): Use it. Removed now unused `match', `ended',
10093 `cplus_comment'.
10094 (copy_guard): Likewise.
10095
ca36d2ef
AD
100962000-03-17 Akim Demaille <akim@epita.fr>
10097
aa5fd0ee 10098 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
10099 (copy_action): Use it.
10100 (copy_guard): Likewise.
10101
6666f98f
AD
101022000-03-17 Akim Demaille <akim@epita.fr>
10103
10104 Change the handling of @s so that they behave exactly like $s.
10105 There is now a pseudo variable @$ (readble and writable), location
10106 of the lhs of the rule (by default ranging from the location of
10107 the first symbol of the rhs, to the location of the last symbol,
10108 or, if the rhs is empty, YYLLOC).
10109
10110 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10111 yyval.
10112 (yyparse): When providing a default semantic action, provide a
10113 default location action.
10114 (after the $): No longer change `*YYLSP', just stack YYLOC the
10115 same way you stack YYVAL.
10116 * src/reader.c (read_declarations): Use warns.
10117 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10118 (copy_action, case '@'): Likewise.
10119 Use a standard error message, to save useless work from
10120 translators.
10121
41aca2e0
AD
101222000-03-17 Akim Demaille <akim@epita.fr>
10123
aa5fd0ee
AD
10124 * src/bison.s1: Formatting and cosmetics changes.
10125 * src/reader.c: Likewise.
41aca2e0
AD
10126 Update the Copyright notice.
10127
dc08c1d5
AD
101282000-03-17 Akim Demaille <akim@epita.fr>
10129
aa5fd0ee
AD
10130 * src/bison.s1 (#line): All set to `#line' only, since the
10131 Makefile now handles them.
dc08c1d5 10132
9ee3c97b
AD
101332000-03-16 Akim Demaille <akim@epita.fr>
10134
10135 * src/output.c (output_rule_data): Output the documentation of
10136 some of the tables.
10137 (Copyright notice): Update.
10138 Formatting changes.
10139
0de741ca
AD
101402000-03-16 Akim Demaille <akim@epita.fr>
10141
10142 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10143 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10144 One `#if YYDEBUG' remains, since it uses variables which are
10145 defined only if `YYDEBUG != 0'.
10146
bb10be54
AD
101472000-03-16 Akim Demaille <akim@epita.fr>
10148
10149 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10150 and related variables so that the similarities are highlighted.
10151
b07b484a
AD
101522000-03-16 Akim Demaille <akim@epita.fr>
10153
10154 * src/bison.s1: Properly indent CPP directives.
10155
361f60b3
AD
101562000-03-16 Akim Demaille <akim@epita.fr>
10157
10158 * src/bison.s1: Properly indent the `alloca' CPP section.
10159
8c44d3ec
AD
101602000-03-16 Akim Demaille <akim@epita.fr>
10161
10162 Do not hard code values of directories in `configure.in'.
10163 Update the `configure' tool chain.
10164
10165 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10166 src/makefile.am.
10167 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10168 (AC_OUTPUT): Add m4/Makefile.
10169 Bump to bison 1.28a, 1.29 has never been released.
10170 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10171 handled via src/Makefile.am.
10172 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10173 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10174 autoheader.
10175 * Makefile.am (SUBDIRS): Add m4.
10176 (ACLOCAL_AM_FLAGS): New variable.
10177 (AUTOMAKE_OPTIONS): Add check-news.
10178 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10179 the proper line number and file name.
10180 (DEFS): Propagate the location of bison library files and of the
10181 locale files.
10182 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10183 builddir.
10184 * acinclude.m4: Remove, replaced by the directory m4.
10185 * m4/Makefile.am (EXTRA_DIST): New variable.
10186 * m4/gettext.m4: New file, from the fileutils.
10187 * m4/lcmessage.m4: Likewise
10188 * m4/progtest.m4: Likewise.
10189 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10190
f95997e7
AD
101912000-03-10 Akim Demaille <akim@epita.fr>
10192
10193 * src/closure.c:
10194 Formatting changes of various comments.
10195 Respect the GNU coding standards at various places.
10196 Don't use `_()' when no translation is needed.
10197
101981999-12-13 Jesse Thilo <jthilo@gnu.org>
10199
10200 * src/files.c:
10201 OS/2 honors TMPDIR environment variable.
10202
102031999-12-13 Jesse Thilo <jthilo@gnu.org>
10204
10205 * doc/bison.texinfo: Tweaked spelling and grammar.
10206 Updated ISBN.
10207 Removed reference to price of printed copy.
10208 Mention BISON_SIMPLE and BISON_HAIRY.
10209
102101999-12-13 Jesse Thilo <jthilo@gnu.org>
10211
10212 * configure.in, NEWS:
10213 Bison 1.29 released.
10214
102151999-10-27 Jesse Thilo <jthilo@gnu.org>
10216
10217 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10218 Added reference card.
10219
102201999-07-26 Jesse Thilo <jthilo@gnu.org>
10221
10222 * po/ru.po: Added Russian translation.
10223
102241999-07-26 Jesse Thilo <jthilo@gnu.org>
10225
10226 * configure.in: Added Russian translation.
10227
102281999-07-06 Jesse Thilo <jthilo@gnu.org>
10229
10230 * configure.in, NEWS, README:
10231 Released version 1.28.
10232
102331999-06-14 Jesse Thilo <jthilo@gnu.org>
10234
10235 * src/system.h:
10236 Squashed redefinition warning on some systems.
10237
10238 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10239 Have configure build version string instead of relying on ANSI string
10240 concatentation.
10241
102421999-06-14 Jesse Thilo <jthilo@gnu.org>
10243
10244 * po/POTFILES.in: Got rid of version.c.
10245
102461999-06-14 Jesse Thilo <jthilo@gnu.org>
10247
10248 * acconfig.h, configure.in:
10249 Have configure build version string instead of relying on ANSI string
10250 concatentation.
10251
102521999-06-08 Jesse Thilo <jthilo@gnu.org>
10253
10254 * doc/bison.1:
10255 Dropped mention of `+' for long-named options.
10256
102571999-05-30 Jesse Thilo <jthilo@gnu.org>
10258
10259 * src/files.c: Added <unistd.h> for unlink().
10260
10261 * src/Makefile.am, src/system.h:
10262 I18n fixes.
10263
102641999-05-30 Jesse Thilo <jthilo@gnu.org>
10265
10266 * README: Added a FAQ list.
10267
10268 * configure.in, acconfig.h:
10269 I18n fixes.
10270
102711999-05-30 Jesse Thilo <jthilo@gnu.org>
10272
10273 * doc/FAQ, doc/Makefile.am:
10274 Added a FAQ list.
10275
102761999-05-19 Jesse Thilo <jthilo@gnu.org>
10277
10278 * src/alloc.h, src/symtab.h, src/version.c:
10279 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10280
102811999-04-18 Jesse Thilo <jthilo@gnu.org>
10282
10283 * src/.cvsignore, src/Makefile.am:
10284 Reorganized: sources in `src', documentation in `doc'.
10285
10286 * src/lex.c (literalchar):
10287 fixed the code for escaping double quotes (thanks
10288 Jonathan Czisny.)
10289
102901999-04-18 Jesse Thilo <jthilo@gnu.org>
10291
10292 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10293 Adjusted paths to reflect directory reorganization.
10294
102951999-04-18 Jesse Thilo <jthilo@gnu.org>
10296
10297 * doc/.cvsignore, doc/Makefile.am:
10298 Reorganized: sources in `src', documentation in `doc'.
10299
103001999-04-18 Jesse Thilo <jthilo@gnu.org>
10301
10302 * configure.in:
10303 Updated AC_INIT file to reflect directory reorganization.
10304
10305 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10306 Reorganized: sources in `src', documentation in `doc'.
10307
103081999-04-13 Jesse Thilo <jthilo@gnu.org>
10309
10310 * src/allocate.c:
10311 Don't declare calloc() and realloc() if not necessary.
10312
103131999-04-13 Jesse Thilo <jthilo@gnu.org>
10314
10315 * configure.in, acconfig.h, acinclude.m4:
10316 Don't declare calloc() and realloc() if not necessary.
10317
103181999-03-23 Jesse Thilo <jthilo@gnu.org>
10319
10320 * po/.cvsignore: Added i18n support.
10321
103221999-03-23 Jesse Thilo <jthilo@gnu.org>
10323
10324 * acconfig.h, configure.in, Makefile.am:
10325 Added i18n support.
10326
103271999-03-22 Jesse Thilo <jthilo@gnu.org>
10328
10329 * src/bison.s1: Fixed #line numbers.
10330
103311999-03-15 Jesse Thilo <jthilo@gnu.org>
10332
10333 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10334 Added PO files from Translation Project.
10335
103361999-03-03 Jesse Thilo <jthilo@gnu.org>
10337
10338 * Makefile.am:
10339 Added support for non-ANSI compilers (ansi2knr).
10340
103411999-02-16 Jesse Thilo <jthilo@gnu.org>
10342
10343 * configure.in: Bumped version number to 1.27.
10344
10345 * Makefile.am:
10346 Added `bison.simple' to list of files removed by `make distclean'.
10347
103481999-02-12 Jesse Thilo <jthilo@gnu.org>
10349
10350 * src/files.c, src/files.h:
10351 Defined locations of parser files in config.h instead of Makefile.
10352
103531999-02-12 Jesse Thilo <jthilo@gnu.org>
10354
10355 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10356 Defined locations of parser files in config.h instead of Makefile.
10357
103581999-02-09 Jesse Thilo <jthilo@gnu.org>
10359
10360 * Makefile.am:
10361 Removed inappropriate use of $< macro.
10362
103631999-02-05 Jesse Thilo <jthilo@gnu.org>
10364
10365 * po/Makefile.in.in, po/POTFILES.in:
10366 Add `po' directory skeleton.
10367
103681999-01-27 Jesse Thilo <jthilo@gnu.org>
10369
10370 * README: Document help-bison list.
10371
10372 * configure.in: Add check for mkstemp().
10373
103741999-01-20 Jesse Thilo <jthilo@gnu.org>
10375
10376 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10377 Hush a few compiler warnings.
10378
10379 * src/files.c:
10380 Add tryclose(), which verifies that fclose was successful.
10381 Hush a couple of compiler warnings.
10382
103831999-01-20 Jesse Thilo <jthilo@gnu.org>
10384
10385 * Makefile.am, OChangeLog:
10386 ChangeLog is now automatically generated. Include the old version as
10387 OChangeLog.
10388
103891999-01-14 Jesse Thilo <jthilo@gnu.org>
10390
10391 * 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:
10392 Update FSF address.
10393
103941999-01-14 Jesse Thilo <jthilo@gnu.org>
10395
10396 * doc/bison.texinfo: Fix formatting glitch.
10397
10398 * doc/bison.texinfo: Update FSF address.
10399
104001999-01-14 Jesse Thilo <jthilo@gnu.org>
10401
10402 * acconfig.h: Update FSF address.
10403
104041999-01-08 Jesse Thilo <jthilo@gnu.org>
10405
10406 * src/system.h:
10407 Don't define PACKAGE here, since config.h defines it.
10408
104091998-12-30 Jesse Thilo <jthilo@gnu.org>
10410
10411 * src/reader.c: Update copyright date.
10412
10413 * src/main.c:
10414 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10415 favor of output directly to stderr (avoids buffer overruns).
10416
10417 * src/reader.c: Some checks for premature EOF.
10418
10419 * 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:
10420 Use prototypes if the compiler understands them.
10421
10422 * src/files.c: Honor TMPDIR on Unix hosts.
10423 Use prototypes if the compiler understands them.
10424
10425 * src/reader.c:
10426 Fix a couple of buffer overrun bugs.
10427 Use prototypes if the compiler understands them.
10428
10429 * src/system.h: Include unistd.h and ctype.h.
10430 Use #ifdef instead of #if for NLS symbols.
10431
104321998-12-30 Jesse Thilo <jthilo@gnu.org>
10433
10434 * doc/bison.texinfo:
10435 Delete comment "consider using @set for edition number, etc..." since
10436 we now are doing so.
10437
104381998-12-30 Jesse Thilo <jthilo@gnu.org>
10439
10440 * configure.in:
10441 Use prototypes if the compiler understands them.
10442
10443 * NEWS: Document 1.26 highlights.
10444
10445 * Makefile.am: Require Automake 1.3 or later.
10446
10447 * acconfig.h:
10448 Use prototypes if the compiler understands them.
10449
104501998-12-29 Jesse Thilo <jthilo@gnu.org>
10451
10452 * src/version.c:
10453 Use VERSION symbol from automake for version number.
10454
104551998-12-29 Jesse Thilo <jthilo@gnu.org>
10456
10457 * acconfig.h, configure.in, version.cin:
10458 Use VERSION symbol from automake for version number.
10459
104601998-11-28 Jesse Thilo <jthilo@gnu.org>
10461
10462 * Makefile.am:
10463 Distribute original version of simple parser (bison.s1), not built
10464 version (bison.simple).
10465
104661998-11-28 Jesse Thilo <jthilo@gnu.org>
10467
10468 * doc/bison.texinfo: Add info dir entry.
10469
10470 * doc/bison.texinfo:
10471 Let automake put version number into documentation.
10472
104731998-11-26 Jesse Thilo <jthilo@gnu.org>
10474
10475 * src/bison.cld, src/build.com, src/vmshlp.mar:
10476 Add non-RCS files from /gd/gnu/bison.
10477
104781998-11-26 Jesse Thilo <jthilo@gnu.org>
10479
10480 * doc/bison.1:
10481 Document the BISON_HAIRY and BISON_SIMPLE variables.
10482
104831998-11-25 Jesse Thilo <jthilo@gnu.org>
10484
10485 * src/version.c: Build version.c automatically.
10486
10487 * src/reader.c:
10488 Fix token numbering (used to start at 258, not 257).
10489
10490 * src/system.h: Include config.h.
10491
10492 * src/getargs.c: Update bug report address.
10493
10494 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10495 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10496
104971998-11-25 Jesse Thilo <jthilo@gnu.org>
10498
10499 * Makefile.am:
10500 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10501
10502 * configure.in, version.cin:
10503 Build version.c automatically.
10504
10505 * AUTHORS: Add AUTHORS file.
10506
10507 * README: Update bug report address.
10508
10509 * bison.simple:
10510 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10511
10512 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10513 Add automake stuff.
10514
105151998-11-25 Jesse Thilo <jthilo@gnu.org>
10516
10517 * doc/bison.texinfo: Clean up some formatting.
10518
105191998-05-05 Richard Stallman <rms@gnu.org>
10520
10521 * doc/bison.texinfo:
10522 Explain better why to make a pure parser.
10523
105241998-01-05 Richard Stallman <rms@gnu.org>
10525
10526 * src/files.c (openfiles):
10527 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10528 find a temporary directory, if possible. Do not unlink files while
10529 they are open.
10530
105311997-08-25 Richard Stallman <rms@gnu.org>
10532
10533 * src/reader.c (stack_offset;):
10534 Change some warni to warns.
10535
10536 * src/lex.c (literalchar): Use warns, not warni.
10537
105381997-06-28 Richard Stallman <rms@gnu.org>
10539
10540 * src/bison.s1: Add a Bison version comment.
10541
10542 * src/main.c (fatal, warn, berror):
10543 Use program_name.
10544
105451997-06-28 Richard Stallman <rms@gnu.org>
10546
10547 * Makefile.in (bison_version): New variable.
10548 (dist): Use that variable.
10549 (bison.s1): Substitute the Bison version into bison.simple.
10550
10551 * bison.simple: Add a Bison version comment.
10552
105531997-06-18 Richard Stallman <rms@gnu.org>
10554
10555 * src/main.c (fatal, warn, berror):
10556 Make error messages standard.
10557 (toomany): Improve error message text.
10558
10559 * 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:
10560 new.h renamed to alloc.h.
10561
105621997-06-18 Richard Stallman <rms@gnu.org>
10563
10564 * Makefile.in: new.h renamed to alloc.h.
10565
105661997-05-24 Richard Stallman <rms@gnu.org>
10567
10568 * src/lex.c (literalchar):
10569 Fix the code for escaping \, " and '.
10570
10571 (lex): Avoid trouble when there are many chars
10572 to discard in a char literal with just several chars in it.
10573
105741997-05-17 Richard Stallman <rms@gnu.org>
10575
10576 * src/bison.s1:
10577 Use malloc, if using alloca is troublesome.
10578 (YYSTACK_USE_ALLOCA): New flag macro.
10579 Define it for some systems and compilers.
10580 (YYSTACK_ALLOC): New macro.
10581 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10582 If it was malloc'd, free it.
10583
105841997-05-17 Richard Stallman <rms@gnu.org>
10585
10586 * bison.simple:
10587 Use malloc, if using alloca is troublesome.
10588 (YYSTACK_USE_ALLOCA): New flag macro.
10589 Define it for some systems and compilers.
10590 (YYSTACK_ALLOC): New macro.
10591 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10592 If it was malloc'd, free it.
10593
105941997-04-23 Richard Stallman <rms@gnu.org>
10595
10596 * src/bison.s1:
10597 (alloca) [__hpux]: Always define as __builtin_alloca.
10598
105991997-04-23 Richard Stallman <rms@gnu.org>
10600
10601 * bison.simple:
10602 (alloca) [__hpux]: Always define as __builtin_alloca.
10603
106041997-04-22 Richard Stallman <rms@gnu.org>
10605
10606 * src/bison.s1:
10607 [__hpux]: Include alloca.h (right for HPUX 10)
10608 instead of declaring alloca (right for HPUX 9).
10609
10610 * src/bison.s1 (__yy_memcpy):
10611 Declare arg `count' as unsigned int.
10612 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10613
106141997-04-22 Richard Stallman <rms@gnu.org>
10615
10616 * bison.simple:
10617 [__hpux]: Include alloca.h (right for HPUX 10)
10618 instead of declaring alloca (right for HPUX 9).
10619
10620 * bison.simple (__yy_memcpy):
10621 Declare arg `count' as unsigned int.
10622 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10623
106241997-01-03 Richard Stallman <rms@gnu.org>
10625
10626 * src/allocate.c: [__STDC__ or _MSC_VER]:
10627 Declare calloc and realloc to return void *.
10628
106291997-01-02 Richard Stallman <rms@gnu.org>
10630
10631 * src/system.h:
10632 [_MSC_VER]: Include stdlib.h and process.h.
10633 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10634
10635 * src/main.c (main): Return FAILURE as a value.
10636 (printable_version): Declare arg as int, not char.
10637
106381997-01-02 Richard Stallman <rms@gnu.org>
10639
10640 * Makefile.in (dist):
10641 Explicitly check for symlinks, and copy them.
10642
106431996-12-19 Richard Stallman <rms@gnu.org>
10644
10645 * src/files.c:
10646 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10647
106481996-12-18 Paul Eggert <eggert@gnu.org>
10649
10650 * src/bison.s1 (yyparse):
10651 If __GNUC__ and YYPARSE_PARAM are both defined,
10652 declare yyparse to have a void * argument.
10653
106541996-12-18 Paul Eggert <eggert@gnu.org>
10655
10656 * bison.simple (yyparse):
10657 If __GNUC__ and YYPARSE_PARAM are both defined,
10658 declare yyparse to have a void * argument.
10659
106601996-12-17 Richard Stallman <rms@gnu.org>
10661
10662 * src/reduce.c (nbits): Add some casts.
10663
106641996-08-12 Richard Stallman <rms@gnu.org>
10665
10666 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10667
106681996-08-12 Richard Stallman <rms@gnu.org>
10669
10670 * bison.simple: Test _MSDOS as well as _MSDOS_.
10671
106721996-07-31 Richard Stallman <rms@gnu.org>
10673
10674 * src/bison.s1:
10675 [__sun && __i386]: Include alloca.h.
10676
106771996-07-31 Richard Stallman <rms@gnu.org>
10678
10679 * bison.simple:
10680 [__sun && __i386]: Include alloca.h.
10681
106821996-07-30 Richard Stallman <rms@gnu.org>
10683
10684 * src/bison.s1: Comment change.
10685
10686 * src/bison.s1: Test _MSDOS_, not MSDOS.
10687
106881996-07-30 Richard Stallman <rms@gnu.org>
10689
10690 * bison.simple: Comment change.
10691
10692 * bison.simple: Test _MSDOS_, not MSDOS.
10693
106941996-06-01 Richard Stallman <rms@gnu.org>
10695
10696 * 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:
10697 Insert `_' macro around many string constants.
10698
10699 * src/main.c:
10700 Insert `_' macro around many string constants.
10701
10702 (main): Call setlocale, bindtextdomain and textdomain.
10703
10704 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10705 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10706 [ENABLE_NLS]: Include libintl.h.
10707 [ENABLE_NLS] (gettext): Define.
10708 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10709 (N_, PACKAGE, LOCALEDIR): New macros.
10710
107111996-06-01 Richard Stallman <rms@gnu.org>
10712
10713 * POTFILES.in: New file.
10714
10715 * Makefile.in (allocate.o):
10716 Define target explicitly.
10717
10718 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10719 (LDFLAGS): Set to @LDFLAGS@.
10720 (configure): Run autoconf only if preceding `cd' succeeds.
10721 (bison.s1): Redirect output to temporary file then move the
10722 temporary to the target, rather than redirecting directly to bison.s1.
10723 (clean): Remove config.status and config.log.
10724 (distclean): Don't remove config.status here.
10725
107261996-05-12 Richard Stallman <rms@gnu.org>
10727
10728 * src/bison.s1:
10729 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10730
107311996-05-12 Richard Stallman <rms@gnu.org>
10732
10733 * bison.simple:
10734 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10735
107361996-05-11 Richard Stallman <rms@gnu.org>
10737
10738 * src/bison.s1 (__yy_memcpy):
10739 Really reorder the args, as was supposedly done on Feb 14 1995.
10740 (yyparse): Calls changed accordingly.
10741
107421996-05-11 Richard Stallman <rms@gnu.org>
10743
10744 * Makefile.in (dist): Don't use $(srcdir).
10745
10746 * bison.simple (__yy_memcpy):
10747 Really reorder the args, as was supposedly done on Feb 14 1995.
10748 (yyparse): Calls changed accordingly.
10749
107501996-01-27 Richard Stallman <rms@gnu.org>
10751
10752 * src/output.c (output_rule_data):
10753 Test YYERROR_VERBOSE in the conditional
10754 around the definition of ttyname.
10755
107561995-12-29 Richard Stallman <rms@gnu.org>
10757
10758 * src/bison.s1:
10759 Fix line numbers in #line commands.
10760
107611995-12-29 Richard Stallman <rms@gnu.org>
10762
10763 * bison.simple:
10764 Fix line numbers in #line commands.
10765
107661995-12-27 Richard Stallman <rms@gnu.org>
10767
10768 * src/bison.s1 (YYPARSE_PARAM_DECL):
10769 In C++, make it always null.
10770 (YYPARSE_PARAM_ARG): New macro.
10771 (yyparse): Use YYPARSE_PARAM_ARG.
10772
107731995-12-27 Richard Stallman <rms@gnu.org>
10774
10775 * bison.simple (YYPARSE_PARAM_DECL):
10776 In C++, make it always null.
10777 (YYPARSE_PARAM_ARG): New macro.
10778 (yyparse): Use YYPARSE_PARAM_ARG.
10779
107801995-11-29 Richard Stallman <rms@gnu.org>
10781
10782 * doc/bison.texinfo:
10783 Describe literal string tokens, %raw, %no_lines, %token_table.
10784
107851995-11-29 Daniel Hagerty <hag@gnu.org>
10786
10787 * doc/bison.texinfo: Fixed update date
10788
107891995-10-16 Richard Stallman <rms@gnu.org>
10790
10791 * src/version.c: Version 1.25.
10792
107931995-10-16 Richard Stallman <rms@gnu.org>
10794
10795 * NEWS: *** empty log message ***
10796
107971995-10-16 Richard Stallman <rms@gnu.org>
10798
10799 * doc/bison.1, doc/bison.rnh:
10800 Add new options.
10801
108021995-10-15 Richard Stallman <rms@gnu.org>
10803
10804 * src/vmsgetargs.c, src/getargs.c:
10805 Added -n, -k, and -raw switches.
10806 (noparserflag, toknumflag, rawtoknumflag): New variables.
10807
10808 * src/symtab.h (SALIAS):
10809 New #define for adding aliases to %token.
10810 (struct bucket): Added `alias' field.
10811
10812 * src/reduce.c (reduce_grammar):
10813 Revise error message.
10814 (print_notices): Remove final `.' from error message.
10815
10816 * src/reader.c (reader_output_yylsp):
10817 New function.
10818 (readgram): Use `#if 0' around code that accepted %command
10819 inside grammar rules: The documentation doesn't allow it,
10820 and it will fail since the %command processors scan for the next %.
10821 (parse_token_decl): Extended the %token
10822 declaration to allow a multi-character symbol as an alias.
10823 (parse_thong_decl): New function.
10824 (read_declarations): Added %thong declarations.
10825 (read_declarations): Handle NOOP to deal with allowing
10826 % declarations as another means to specify the flags.
10827 (readgram): Allow %prec prior to semantics embedded in a rule.
10828 (skip_to_char, read_declarations, copy_definition)
10829 (parse_token_decl, parse_start_decl, parse_type_decl)
10830 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10831 (get_type_name, copy_guard, copy_action, readgram)
10832 (get_type, packsymbols): Revised most error messages.
10833 Changed `fatal' to `warnxxx' to avoid aborting for error.
10834 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10835 (read_declarations): Improve the error message for
10836 an invalid character. Do not abort.
10837 (read_declarations, copy_guard, copy_action): Use
10838 printable_version to avoid unprintable characters in printed output.
10839 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10840 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10841 Allow the type of a non-terminal can be given
10842 more than once, as long as all specifications give the same type.
10843
10844 * src/output.c:
10845 (output_headers, output_trailers, output, output_gram)
10846 (output_rule_data): Implement noparserflag variable.
10847 Implement toknumflag variable.
10848 (output): Call reader_output_yylsp to output LTYPESTR.
10849
10850 * src/main.c (main):
10851 If reader sees an error, don't process the grammar.
10852 (fatals): Updated to not use VARARGS1.
10853 (printable_version, int_to_string, warn, warni, warns, warnss)
10854 (warnsss): New error reporting functions. Avoid abort for error.
10855
10856 * src/lex.h:
10857 Added THONG and NOOP for alias processing.
10858 Added SETOPT for the new code that allows setting options with %flags.
10859
10860 * src/lex.c:
10861 Include getopt.h. Add some extern decls.
10862 (safegetc): New function to deal with EOF gracefully.
10863 (literalchar); new function to deal with reading \ escapes.
10864 (lex): Use literalchar.
10865 (lex): Implemented "..." tokens.
10866 (literalchar, lex, parse_percent_token): Made tokenbuffer
10867 always contain the token. This includes growing the token
10868 buffer while reading an integer.
10869 (parse_percent_token): Replaced if-else statement with percent_table.
10870 (parse_percent_token): Added % declarations as another
10871 way to specify the flags -n, -l, and -r. Also added hooks for
10872 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10873 major changes to files.c.
10874 (lex) Retain in the incoming stream a character following
10875 an incorrect '/'.
10876 (skip_white_space, lex): Revised most error messages
10877 and changed fatal to warn to avoid aborting.
10878 (percent_table): Added %thong declarations.
10879
10880 * src/gram.h: Comment changes.
10881
10882 * src/files.c (openfiles, open_extra_files, done):
10883 Add faction flag
10884 and actfile file. Handle noparserflag. Both for -n switch.
10885
10886 * src/conflicts.c (resolve_sr_conflict):
10887 Remove use of alloca.
10888
108891995-06-01 Jim Meyering <meyering@gnu.org>
10890
10891 * doc/bison.texinfo: *** empty log message ***
10892
108931995-05-06 Richard Stallman <rms@gnu.org>
10894
10895 * src/bison.s1: Comment change.
10896
108971995-05-06 Richard Stallman <rms@gnu.org>
10898
10899 * bison.simple: Comment change.
10900
109011995-05-03 Richard Stallman <rms@gnu.org>
10902
10903 * src/version.c: Version now 1.24.
10904
10905 * src/bison.s1: Change distribution terms.
10906
10907 * src/version.c: Version now 1.23.
10908
109091995-05-03 Richard Stallman <rms@gnu.org>
10910
10911 * doc/bison.texinfo:
10912 Rewrite "Conditions for Using Bison".
10913 Update version to 1.24.
10914
109151995-05-03 Richard Stallman <rms@gnu.org>
10916
10917 * bison.simple: Change distribution terms.
10918
109191995-02-23 Richard Stallman <rms@gnu.org>
10920
10921 * src/files.c: Test __VMS_POSIX as well as VMS.
10922
109231995-02-14 Jim Meyering <meyering@gnu.org>
10924
10925 * src/bison.s1 (__yy_memcpy):
10926 Renamed from __yy_bcopy to avoid
10927 confusion. Reverse FROM and TO arguments to be consistent with
10928 those of memcpy.
10929
109301995-02-14 Jim Meyering <meyering@gnu.org>
10931
10932 * bison.simple (__yy_memcpy):
10933 Renamed from __yy_bcopy to avoid
10934 confusion. Reverse FROM and TO arguments to be consistent with
10935 those of memcpy.
10936
109371994-11-10 David J. MacKenzie <djm@gnu.org>
10938
10939 * NEWS: reformat
10940
10941 * NEWS: New file.
10942
10943 * Makefile.in (DISTFILES): Include NEWS.
10944
10945 * Makefile.in (DISTFILES):
10946 Include install-sh, not install.sh.
10947
10948 * configure.in: Update to Autoconf v2 macro names.
10949
109501994-10-05 David J. MacKenzie <djm@gnu.org>
10951
10952 * Makefile.in: fix typo
10953
10954 * Makefile.in (prefix, exec_prefix):
10955 Let configure set them.
10956
109571994-09-28 David J. MacKenzie <djm@gnu.org>
10958
10959 * Makefile.in: Set datadir to $(prefix)/share.
10960
109611994-09-15 Richard Stallman <rms@gnu.org>
10962
10963 * src/bison.s1:
10964 Update copyright notice and GPL version.
10965
109661994-09-15 Richard Stallman <rms@gnu.org>
10967
10968 * bison.simple:
10969 Update copyright notice and GPL version.
10970
109711994-07-12 Richard Stallman <rms@gnu.org>
10972
10973 * src/reduce.c, src/reader.c:
10974 entered into RCS
10975
109761994-05-05 David J. MacKenzie <djm@gnu.org>
10977
10978 * Makefile.in: entered into RCS
10979
109801994-03-26 Richard Stallman <rms@gnu.org>
10981
10982 * src/bison.s1: entered into RCS
10983
109841994-03-26 Richard Stallman <rms@gnu.org>
10985
10986 * bison.simple: entered into RCS
10987
109881994-03-25 Richard Stallman <rms@gnu.org>
10989
10990 * src/main.c: entered into RCS
10991
109921994-03-24 Richard Stallman <rms@gnu.org>
10993
10994 * src/conflicts.c: entered into RCS
10995
109961994-01-02 Richard Stallman <rms@gnu.org>
10997
10998 * Makefile.in: *** empty log message ***
10999
110001993-11-21 Richard Stallman <rms@gnu.org>
11001
11002 * src/bison.s1: *** empty log message ***
11003
110041993-11-21 Richard Stallman <rms@gnu.org>
11005
11006 * doc/bison.texinfo: entered into RCS
11007
11008 * doc/bison.texinfo: *** empty log message ***
11009
110101993-11-21 Richard Stallman <rms@gnu.org>
11011
11012 * bison.simple: *** empty log message ***
11013
110141993-10-25 David J. MacKenzie <djm@gnu.org>
11015
11016 * doc/bison.texinfo: *** empty log message ***
11017
110181993-10-19 Richard Stallman <rms@gnu.org>
11019
11020 * src/bison.s1: *** empty log message ***
11021
110221993-10-19 Richard Stallman <rms@gnu.org>
11023
11024 * bison.simple: *** empty log message ***
11025
110261993-10-14 Richard Stallman <rms@gnu.org>
11027
11028 * src/bison.s1: *** empty log message ***
11029
110301993-10-14 Richard Stallman <rms@gnu.org>
11031
11032 * bison.simple: *** empty log message ***
11033
110341993-09-14 David J. MacKenzie <djm@gnu.org>
11035
11036 * doc/bison.texinfo: *** empty log message ***
11037
110381993-09-13 Noah Friedman <friedman@gnu.org>
11039
11040 * Makefile.in: *** empty log message ***
11041
110421993-09-10 Richard Stallman <rms@gnu.org>
11043
11044 * src/conflicts.c: *** empty log message ***
11045
11046 * src/system.h: entered into RCS
11047
110481993-09-10 Richard Stallman <rms@gnu.org>
11049
11050 * doc/bison.1: entered into RCS
11051
110521993-09-06 Noah Friedman <friedman@gnu.org>
11053
11054 * src/version.c: entered into RCS
11055
110561993-09-06 Noah Friedman <friedman@gnu.org>
11057
11058 * Makefile.in: *** empty log message ***
11059
110601993-07-30 David J. MacKenzie <djm@gnu.org>
11061
11062 * Makefile.in: *** empty log message ***
11063
110641993-07-24 Richard Stallman <rms@gnu.org>
11065
11066 * src/bison.s1: *** empty log message ***
11067
110681993-07-24 Richard Stallman <rms@gnu.org>
11069
11070 * bison.simple: *** empty log message ***
11071
110721993-07-08 David J. MacKenzie <djm@gnu.org>
11073
11074 * Makefile.in: *** empty log message ***
11075
110761993-07-04 Richard Stallman <rms@gnu.org>
11077
11078 * src/bison.s1: *** empty log message ***
11079
110801993-07-04 Richard Stallman <rms@gnu.org>
11081
11082 * bison.simple: *** empty log message ***
11083
110841993-06-26 David J. MacKenzie <djm@gnu.org>
11085
11086 * src/getargs.c: entered into RCS
11087
110881993-06-26 David J. MacKenzie <djm@gnu.org>
11089
11090 * doc/bison.texinfo: *** empty log message ***
11091
11092 * doc/bison.1: New file.
11093
110941993-06-25 Richard Stallman <rms@gnu.org>
11095
11096 * src/getargs.c: New file.
11097
110981993-06-16 Richard Stallman <rms@gnu.org>
11099
11100 * src/bison.s1: *** empty log message ***
11101
111021993-06-16 Richard Stallman <rms@gnu.org>
11103
11104 * bison.simple: *** empty log message ***
11105
111061993-06-03 Richard Stallman <rms@gnu.org>
11107
11108 * src/bison.s1: New file.
11109
111101993-06-03 Richard Stallman <rms@gnu.org>
11111
11112 * doc/bison.texinfo: *** empty log message ***
11113
111141993-06-03 Richard Stallman <rms@gnu.org>
11115
11116 * bison.simple: New file.
11117
111181993-05-19 Richard Stallman <rms@gnu.org>
11119
11120 * doc/bison.texinfo: New file.
11121
111221993-05-07 Noah Friedman <friedman@gnu.org>
11123
11124 * Makefile.in: *** empty log message ***
11125
111261993-04-28 Noah Friedman <friedman@gnu.org>
11127
11128 * src/reader.c: *** empty log message ***
11129
111301993-04-23 Noah Friedman <friedman@gnu.org>
11131
11132 * src/alloc.h: entered into RCS
11133
111341993-04-20 David J. MacKenzie <djm@gnu.org>
11135
11136 * src/version.c: *** empty log message ***
11137
11138 * src/files.c, src/allocate.c:
11139 entered into RCS
11140
11141 * src/reader.c: *** empty log message ***
11142
11143 * src/lex.c: entered into RCS
11144
11145 * src/conflicts.c: New file.
11146
11147 * src/symtab.c: entered into RCS
11148
11149 * src/alloc.h: New file.
11150
11151 * src/LR0.c: entered into RCS
11152
111531993-04-18 Noah Friedman <friedman@gnu.org>
11154
11155 * src/reader.c: New file.
11156
11157 * src/version.c: *** empty log message ***
11158
111591993-04-18 Noah Friedman <friedman@gnu.org>
11160
11161 * Makefile.in: *** empty log message ***
11162
111631993-04-17 Noah Friedman <friedman@gnu.org>
11164
11165 * Makefile.in: *** empty log message ***
11166
111671993-04-15 Richard Stallman <rms@gnu.org>
11168
11169 * src/main.c, src/files.c:
11170 New file.
11171
111721993-04-15 Noah Friedman <friedman@gnu.org>
11173
11174 * configure.in: entered into RCS
11175
11176 * configure.in: *** empty log message ***
11177
11178 * configure.in: New file.
11179
111801993-04-14 Richard Stallman <rms@gnu.org>
11181
11182 * Makefile.in: New file.
11183
111841993-04-13 Richard Stallman <rms@gnu.org>
11185
11186 * src/version.c: New file.
11187
111881993-03-25 Richard Stallman <rms@gnu.org>
11189
11190 * src/output.c: entered into RCS
11191
111921992-09-25 Richard Stallman <rms@gnu.org>
11193
11194 * configure.bat: entered into RCS
11195
111961992-06-22 Richard Stallman <rms@gnu.org>
11197
11198 * src/vmsgetargs.c: entered into RCS
11199
112001992-06-22 Richard Stallman <rms@gnu.org>
11201
11202 * doc/bison.rnh: entered into RCS
11203
112041992-04-20 David J. MacKenzie <djm@gnu.org>
11205
11206 * README: entered into RCS
11207
112081992-01-22 Richard Stallman <rms@gnu.org>
11209
11210 * src/machine.h: entered into RCS
11211
112121991-12-21 Richard Stallman <rms@gnu.org>
11213
11214 * src/lalr.c, src/closure.c:
11215 entered into RCS
11216
112171991-12-20 Richard Stallman <rms@gnu.org>
11218
11219 * src/state.h: entered into RCS
11220
112211991-12-18 Richard Stallman <rms@gnu.org>
11222
11223 * src/print.c, src/nullable.c, src/derives.c:
11224 entered into RCS
11225
112261991-11-03 David J. MacKenzie <djm@gnu.org>
11227
11228 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11229 entered into RCS
11230
112311988-09-09 Richard Stallman <rms@gnu.org>
11232
11233 * src/bison.hairy: entered into RCS
11234
112351987-12-16 Richard Stallman <rms@gnu.org>
11236
11237 * REFERENCES: entered into RCS
dc546b0f 11238
f294a2c2
AD
11239-----
11240
33167b8b 11241Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
dc546b0f 112421998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
f294a2c2 11243
33167b8b 11244This file is part of Bison, the GNU Compiler Compiler.
f294a2c2 11245
33167b8b 11246Bison is free software; you can redistribute it and/or modify
f294a2c2
AD
11247it under the terms of the GNU General Public License as published by
11248the Free Software Foundation; either version 2, or (at your option)
11249any later version.
11250
33167b8b 11251Bison is distributed in the hope that it will be useful,
f294a2c2
AD
11252but WITHOUT ANY WARRANTY; without even the implied warranty of
11253MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11254GNU General Public License for more details.
11255
11256You should have received a copy of the GNU General Public License
33167b8b 11257along with Bison; see the file COPYING. If not, write to
f294a2c2
AD
11258the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11259Boston, MA 02111-1307, USA.