]> git.saurik.com Git - bison.git/blob - ChangeLog
use s.empty() rather than s == "" to test for empty string
[bison.git] / ChangeLog
1 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
2
3 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
4 use s.empty() rather than s == "" to test for empty string; see
5 <http://mail.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6 (trivial change)
7
8 2003-06-25 Akim Demaille <akim@epita.fr>
9
10 * config/depcomp, config/install-sh: Update from masters.
11
12 2003-06-20 Paul Eggert <eggert@twinsun.com>
13
14 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
15 and return properly parenthesized result.
16 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
17 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
18 Remove unnecessary parentheses from uses.
19 * doc/bison.texinfo (Location Default Action): Describe the
20 conventions for parentheses.
21
22 2003-06-19 Paul Eggert <eggert@twinsun.com>
23
24 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
25 yyreportTree): Do not assume that size_t is the same width as int,
26 when printing sizes. Print sizes using an unsigned format.
27 Problem reported by Frank Heckenbach in
28 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
29
30 Port to Forte Developer 7 C compiler.
31 * data/glr.c (struct YYLTYPE): If locations are not being used,
32 declare a single dummy member, as empty structs do not conform
33 to the C standard.
34 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
35 the Forte Developer 7 C compiler complains that end-of-loop
36 code is not reached.
37
38 2003-06-17 Paul Eggert <eggert@twinsun.com>
39
40 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
41 avoid warnings from picky compilers about redefinition of PARAMS.
42
43 2003-06-17 Paul Eggert <eggert@twinsun.com>
44
45 Version 1.875b.
46
47 * NEWS: Document 1.875b.
48
49 * lib/bbitset.h: Do not include config.h; that's the includer's job.
50 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
51 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
52 Don't use 'index' in comments, as it's a builtin fn on some hosts.
53 * lib/bitset_stats.c: Include gettext.h unconditionally, as
54 per recent gettext manual's suggestion.
55 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
56 Use prototypes, not old-style definitions.
57 * lib/lbitset.c (lbitset_unused_clear): Likewise.
58 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
59 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
60 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
61 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
62 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
63 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
64 vbitset_or_and_cmp, vbitset_copy): Likewise.
65
66 * lib/libiberty.h: Do not include config.h; that's the includer's job.
67 Do not include <stdlib.h>.
68 (PARAMS): Define unconditionally for C89.
69 (ATTRIBUTE_NORETURN): Remove.
70 (ATTRIBUTE_UNUSED): Define unconditionally.
71
72 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
73 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
74 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
75 * lib/vbitset.c, lib/vbitset.h: New files.
76 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
77 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
78 from libbitset.
79
80 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
81 `How Can I Reset @code{yyparse}', since texinfo does not allow
82 arbitrary @ in node names.
83
84 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
85 shouldn't be needed according to the gettext 0.12.1 documentation
86 but which seem to be needed anyway: codeset.m4 glibc21.m4
87 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
88 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
89 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
90
91 * lib/.cvsignore: Add stdbool.h.
92 * m4/.cvsignore: Add nls.m4, po.m4.
93
94 Upgrade to CVS gnulib.
95 * stdbool_.h: File renamed from stdbool.h.in.
96 * configure.ac (AM_STDBOOL_H): Invoke this instead of
97 AC_HEADER_STDBOOL.
98 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
99 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
100 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
101 (MOSTLYCLEANFILES): New var.
102 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
103 (stdbool.h): New rule.
104 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
105 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
106 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
107 m4/quote.m4: Upgrade to today's gnulib.
108
109 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
110 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
111 the tests right now.
112 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
113 yyerror are declared before use; C99 requires this.
114
115 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
116
117 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
118 first.
119 (yyrecoverSyntaxError): Correct the logic for setting and testing
120 yyerrState.
121 Correct comment on handling EOF.
122 Allow states with only a default reduction, rather than failing
123 (I can't quite reconstruct why these were not allowed before).
124
125 Fixes to avoid problem that $-N rules in GLR parsers can cause
126 buffer overruns, corrupting state.
127
128 * src/output.c (prepare_rules): Output max_left_semantic_context
129 definition.
130 * src/reader.h (max_left_semantic_context): New variable declaration.
131 * src/scan-gram.l (max_left_semantic_context): Define.
132 (handle_action_dollar): Update max_left_semantic_context.
133 * data/glr.c (YYMAXLEFT): New definition.
134 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
135 (yyresolveAction): Ditto.
136
137 Fixes to problems with location handling in GLR parsers reported by
138 Frank Heckenbach (2003/06/05).
139
140 * data/glr.c (YYLTYPE): Make trivial if locations not used.
141 (YYRHSLOC): Add parentheses, and define only if locations used.
142 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
143 locations not used.
144 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
145 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
146
147 * tests/cxx-type.at: Exercise location information; update tests
148 to differentiate output with and without locations.
149 Remove forward declarations of yylex and yyerror---caused errors
150 because default YYLTYPE not yet defined.
151 Change semantic actions to compute strings, rather than printing
152 them directly (to test proper passing of semantics values). Change
153 output to prefix notation and update test data and expected results.
154 (yylex): Track locations.
155 (stmtMerge): Return value rather than printing, and include arguments
156 in value.
157
158 2003-06-03 Paul Eggert <eggert@twinsun.com>
159
160 Avoid warnings generated by GCC 2.95.4 when Bison is
161 configured with --enable-gcc-warnings.
162 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
163 yy::]b4_parser_class_name[::translate_,
164 yy::Stack::operator[] (unsigned),
165 yy::Stack::operator[] (unsigned) const,
166 yy::Slice::operator[] (unsigned),
167 yy::Slice::operator[] (unsigned) const):
168 Rename local vars to avoid warnings.
169 * tests/glr-regression.at (Improper handling of embedded actions
170 and $-N in GLR parsers): Remove unused local variable from yylex.
171 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
172 (void) as arg when not pure, since we now assume C89 when building
173 Bison. Pacify GCC by using parameter.
174
175 2003-06-02 Paul Eggert <eggert@twinsun.com>
176
177 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
178 yy::Location::lines, yy::Location::columns): Rename arguments
179 to avoid shadowing; this removes a warning generated by GCC 3.3.
180
181 2003-06-01 Paul Eggert <eggert@twinsun.com>
182
183 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
184 to g++, as GCC 3.3 complains if you do it.
185 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
186 everything that WARNING_CFLAGS has, except omit warnings
187 not suitable for C++.
188 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
189 * tests/atlocal.in (CXXFLAGS): New var.
190 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
191
192 Fix a GLR parser bug I reported in February; see
193 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
194 The problem was that GLR parsers did not conform to the C standard,
195 because actions like { $1 = $2 + $3; } expanded to expressions
196 that invoked YYFILL in separate subexpressions, and YYFILL assigned
197 to a local variable. The C standard says that expressions
198 like (var = f ()) + (var = f ()) have undefined behavior.
199 Another problem was that GCC sometimes issues warnings that
200 yyfill and its parameters are unused.
201
202 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
203 as possibly unused.
204 (yyfill): New function.
205 (YYFILL): Use it.
206 (yyuserAction): Change type of yynormal to bool, so that it matches
207 the new yyfill signature. Mark it as possibly unused.
208
209
210 Follow up on a bug I reported in February, where a Bison-generated
211 parser can loop. Provide a test case and a fix for yacc.c. I
212 don't have a fix for lalr1.cc or for glr.c, unfortunately.
213 The original bug report is in:
214 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
215
216 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
217 macro's size was becoming unwieldy.
218 (yyerrlab): Do not discard an empty lookahead symbol, as this
219 might destroy garbage.
220 (yyerrorlab): New label, with the old contents of YYERROR,
221 plus the following change: pop the stack of rhs corresponding
222 to the production that invoked YYERROR. That is how Yacc
223 behaves, and POSIX requires this behavior.
224 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
225 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
226 Define 'alarm' to do nothing if unistd.h is not available.
227 Add a new rule "exp: '-' error;" to test the above change to
228 data/yacc.c. Use 'alarm' to abort any test taking longer than
229 10 seconds, as it's probably looping.
230 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
231 Also, the new yacc.c generates two fewer diagnostics for an
232 existing test.
233
234 2003-05-24 Paul Eggert <eggert@twinsun.com>
235
236 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
237 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
238 This fixes a problem reported by John Bowman when the Compaq/HP
239 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
240 -ansi -Wall -gall).
241 * data/yacc.c (union yyalloc): Likewise.
242 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
243
244 Switch from 'int' to 'bool' where that makes sense.
245
246 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
247 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
248 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
249 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
250 Return or accept bool, not int. All callers changed.
251 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
252 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
253 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
254 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
255 bitset_or_and_cmp_): Likewise.
256 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
257 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
258 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
259 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
260 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
261 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
262 bitset_stats_or_and_cmp): Likewise.
263 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
264 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
265 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
266 ebitset_xor_cmp): Likewise.
267 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
268 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
269 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
270 lbitset_xor_cmp): Likewise.
271 * lib/bbitset.h: Include <stdbool.h>.
272 (struct bitset_vtable): The following members now return bool, not
273 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
274 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
275 or_and_cmp).
276 * src/conflicts.c (count_rr_conflicts): Likewise.
277 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
278 All uses changed.
279 * lib/ebitset.c (ebitset_obstack_init): Likewise.
280 * lib/lbitset.c (lbitset_obstack_init): Likewise.
281 * src/getargs.c (debug_flag, defines_flag, locations_flag,
282 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
283 graph_flag): Likewise.
284 * src/getargs.h (debug_flag, defines_flag, locations_flag,
285 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
286 graph_flag): Likewise.
287 * src/output.c (error_verbose): Likewise.
288 * src/output.h (error_verbose): Likewise.
289 * src/reader.c (start_flag, typed): Likewise.
290 * src/reader.h (typed): Likewise.
291 * src/getargs.c (LOCATIONS_OPTION): New constant.
292 (long_options, getargs): Use it.
293 * src/lalr.c (build_relations): Use bool, not int.
294 * src/nullable.c (nullable_compute): Likewise.
295 * src/print.c (print_reductions): Likewise.
296 * src/tables.c (action_row, pack_vector): Likewise.
297 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
298 * src/output.c (prepare): Use it.
299 * src/output.c (token_definitions_output,
300 symbol_destructors_output, symbol_destructors_output): Use string,
301 not boolean integer, to keep track of whether to output separator.
302 * src/print_graph.c (print_core): Likewise.
303 * src/state.c (state_rule_lookaheads_print): Likewise.
304
305 * config/install-sh: Sync from automake 1.7.5.
306
307 2003-05-14 Paul Eggert <eggert@twinsun.com>
308
309 * src/parse-gram.y (rules_or_grammar_declaration): Require a
310 semicolon after a grammar declaration, in the interest of possible
311 future changes to the Bison input language.
312 Do not allow a stray semicolon at the start of the grammar.
313 (rhses.1): Allow one or more semicolons after any rule, including
314 just before "|" as required by POSIX.
315 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
316 grammar.
317
318 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
319
320 %parse-param support for lalr1.cc.
321
322 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
323 b4_cc_constructor_calls, b4_cc_constructor_call,
324 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
325 definitions.
326 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
327 parse-param arguments.
328 (yy::b4_parser_class_name): Declare instance variables to
329 hold parse-param arguments.
330 * tests/calc.at: s/value/semantic_value/ because value clashes
331 with a member of yy::b4_parser_class_name. Adjust C++ code
332 to handle %parse-param. Enable %parse-param test in C++.
333
334 2003-05-12 Paul Eggert <eggert@twinsun.com>
335
336 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
337 English a bit. Fix fclose typo. Change "const char" to "char
338 const", and use ANSI C rather than K&R for "main". Suggest
339 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
340 and suggest yy_switch_to_buffer.
341
342 2003-05-05 Paul Eggert <eggert@twinsun.com>
343
344 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
345 C89. This avoids a diagnostic on compilers that define __STDC__
346 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
347 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
348
349 2003-05-03 Paul Eggert <eggert@twinsun.com>
350
351 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
352 Do not overrun array bounds.
353 This should fix a bug reported today by Olatunji Oluwabukunmi in
354 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
355
356 2003-04-29 Akim Demaille <akim@epita.fr>
357
358 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
359 * src/getargs.c, src/getargs.h: here, as bool, not int.
360 (nondeterministic_parser): New.
361 * src/parse-gram.y, src/scan-gram.l: Support
362 %nondeterministic-parser.
363 * src/output.c (prepare): Use nondeterministic_parser instead
364 of glr_parser where appropriate.
365 * src/tables.c (conflict_row, action_row, save_row)
366 (token_actions, token_actions, pack_vector): Ditto.
367
368 2003-04-29 Akim Demaille <akim@epita.fr>
369
370 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
371
372 2003-04-29 Akim Demaille <akim@epita.fr>
373
374 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
375 with %pure-parser and %locations to exercise the patch from Yakov
376 Markovitch below.
377
378 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
379
380 * data/yacc.c: (b4_lex_param): Corrected for the case where
381 %lex-param is provided and %pure-parser isn't.
382
383 2003-04-27 Paul Eggert <eggert@twinsun.com>
384
385 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
386 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
387 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
388 if it is not defined.
389 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
390
391 2003-04-26 Paul Eggert <eggert@twinsun.com>
392
393 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
394 Declare to be of type suitable for the ninf value itself, not of
395 type suitable for the corresponding table, since the latter might
396 be unsigned but the ninf value might be negative. This fixes a
397 bug reported by Alexandre Duret-Lutz in
398 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
399
400 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
401 invokes it. We shouldn't invoke it twice because it will attempt
402 to put error.o in the archive twice. This fixes a glitch reported
403 by Martin Mokrejs in
404 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
405
406 2003-04-21 Paul Eggert <eggert@twinsun.com>
407
408 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
409 to gnulib.
410
411 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
412
413 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
414 Fix obvious typo that results in uncompilable GLR parsers
415 when both %pure-parser and %locations are used. (trivial change)
416
417 2003-04-17 Paul Eggert <eggert@twinsun.com>
418
419 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
420 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
421 Do not insert the expected token via unput, as this runs afoul
422 of a POSIX-compatibility bug in flex 2.5.31.
423 All uses changed to BEGIN the parent state,
424 since we no longer insert the expected token via unput.
425 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
426 that is no longer emitted after the above change.
427
428 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
429 the first one. This change is from Paul Hilfinger, and it fixes
430 regression reported by Werner Lemberg in
431 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
432
433 (resolve_sr_conflict): Don't invoke state_errs_set
434 unless one or more tokens have been explicitly made errors.
435 Otherwise, the above change causes Bison to abort.
436
437 * tests/existing.at (GNU pic Grammar): New test case, taken from
438 Lemberg's email.
439
440 2003-03-31 Akim Demaille <akim@epita.fr>
441
442 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
443
444 2003-03-31 Akim Demaille <akim@epita.fr>
445
446 * src/output.c (prepare_symbols): Avoid trailing spaces in the
447 output.
448
449 2003-03-31 Akim Demaille <akim@epita.fr>
450
451 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
452 From Paul Hilfinger.
453
454 2003-03-29 Akim Demaille <akim@epita.fr>
455
456 * m4/error.m4: Do not put under dynamic conditions some code which
457 expansion is under static control.
458
459 2003-03-29 Akim Demaille <akim@epita.fr>
460
461 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
462
463 2003-03-29 Akim Demaille <akim@epita.fr>
464
465 * doc/bison.texinfo (Strings are Destroyed): New.
466
467 2003-03-13 Paul Eggert <eggert@twinsun.com>
468
469 * .cvsignore: Add configure.lineno.
470 * src/.cvsignore: Add yacc.
471 * tests/.cvsignore: Add testsuite.log.
472 * doc/fdl.texi: Sync with latest FSF version.
473
474 2003-03-12 Paul Eggert <eggert@twinsun.com>
475
476 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
477 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
478 cursor, instead of leaving it undefined. This fixes a bug
479 reported by Tim Van Holder in
480 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
481 * tests/input.at (Torturing the Scanner): Test the scanner on
482 an empty input file, which was Tim Van Holder's test case.
483
484 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
485 <sys/resource.h> can be included, include sys/time.h and
486 sys/times.h first, if available. This works around the SunOS
487 4.1.4 porting bug reported by Bruce Becker in
488 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
489
490 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
491 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
492 AC_HEADER_SYS_WAIT.
493
494 Merge changes from gnulib. This was prompted because the CVS
495 snapshot didn't build on Solaris 7 due to strnlen problems.
496
497 These changes need to be merged back into gnulib:
498 * lib/hash.c: Include <stdbool.h> unconditionally.
499 * m4/onceonly.m4 (m4_quote): New macro.
500 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
501 Quote AC_FOREACH variable-expansions properly.
502 The 2003-01-03 obstack.h change also needs merging.
503 {end of changes requiring merging}
504
505 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
506 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
507 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
508 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
509 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
510 New files, imported from gnulib.
511 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
512 above.
513
514 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
515 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
516 gnulib sources.
517
518 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
519 Add.
520 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
521 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
522 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
523 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
524 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
525 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
526 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
527 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
528 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
529 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
530 (jm_PREREQ_ARGMATCH): Remove.
531 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
532 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
533
534 * src/system.h: Include <stdbool.h> unconditionally.
535
536 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
537 assuming at least C89 in the bitset code for some time now.
538
539 2003-03-03 Akim Demaille <akim@epita.fr>
540
541 * ro.po: New.
542
543 2003-03-02 Akim Demaille <akim@epita.fr>
544
545 * doc/bison.texinfo (Table of Symbols): Reactivate the
546 documentation for %lex-param, and %parse-param.
547
548 2003-03-02 Akim Demaille <akim@epita.fr>
549
550 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
551 generate verbose error messages.
552 Use the number of tokens as an upper bound in yytname, as it
553 cannot be a non terminal.
554
555 2003-03-02 Akim Demaille <akim@epita.fr>
556
557 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
558 message.
559
560 2003-03-02 Akim Demaille <akim@epita.fr>
561
562 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
563 Use them to exercise yycheck overrun.
564 Based on Andrew Suffield's grammar.
565
566 2003-03-02 Akim Demaille <akim@epita.fr>
567
568 Create tests/local.at for Bison generic testing macros.
569
570 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
571 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
572 This new file.
573 * tests/calc.at (AT_CHECK_CALC): Adjust.
574 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
575 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
576 * tests/local.at: here.
577 (AT_COMPILE_CXX): Tags the tests using it as c++.
578 Ignore the test if CXX is not functional.
579
580 2003-03-01 Paul Eggert <eggert@twinsun.com>
581
582 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
583 not loc->end, since loc->end might contain garbage and this leads
584 to undefined behavior on some platforms.
585 (id_loc, token_start): Use (IF_LINTed) initial values that do not
586 depend on *loc, so that the reader doesn't give the the false
587 impression that *loc is initialized.
588 (<INITIAL>"%%"): Do not bother setting code_start, since its value
589 does not survive the return.
590
591 2003-03-01 Akim Demaille <akim@epita.fr>
592
593 * src/scan-gram.l (code_start): Always initialize it when entering
594 into yylex, as SC_EPILOGUE is activated *before* the corresponding
595 yylex invocation. An alternative would be making it static, but
596 then it starts with the second %%'s beginning, instead of its end.
597
598 2003-02-28 Paul Eggert <eggert@twinsun.com>
599
600 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
601 around a UnixWare 7.1.1 porting bug reported by John Hughes in
602 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
603
604 2003-02-26 Paul Eggert <eggert@twinsun.com>
605
606 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
607 Remove Sequent/Pyramid discussion (nobody uses them any more).
608 Merge VMS and MS-DOS discussion; these ports may well be dead
609 but let's keep mentioning them for now. Put <> around email
610 addresses. Add copyright notice.
611
612 2003-02-24 Paul Eggert <eggert@twinsun.com>
613
614 * data/glr.c (yy_reduce_print): yylineno -> yylno,
615 to avoid collision with flex use of yylineno.
616 Problem reported by Bruce Lilly in
617 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
618 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
619 * data/yacc.c (yy_reduce_print): Likewise.
620
621 * config/depcomp: Sync with Automake 1.7.3.
622
623 2003-02-21 Akim Demaille <akim@epita.fr>
624
625 * data/lalr1.cc: Use temporary variables instead of casts to
626 change integer types.
627 Suggested by Paul Eggert.
628
629 2003-02-21 Akim Demaille <akim@epita.fr>
630
631 * doc/bison.texinfo: Use "location" consistently to refer to @n,
632 to avoid confusions with lalr1.cc's notion of Position.
633 Suggested by Paul Eggert.
634
635 2003-02-20 Akim Demaille <akim@epita.fr>
636
637 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
638 before initial_columns.
639 (location.hh): Use consistent variable names when defining the
640 operator<<.
641 Use "last" so that we subtract from Positions, not from unsigned.
642
643 2003-02-20 Akim Demaille <akim@epita.fr>
644
645 * data/lalr1.cc (position.hh): New subfile, including the extended
646 and Doxygen'ed documentation of class Position.
647 (location.hh): Use it.
648 Document a` la Doxygen.
649 With the help of Benoit Perrot.
650
651 2003-02-20 Akim Demaille <akim@epita.fr>
652
653 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
654 AT_YACC_IF.
655 Redefine AT_YYERROR_SEES_LOC_IF using it.
656 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
657 not defined.
658 Don't use the location in yy::Parser::error_ and
659 yy::Parser::print_ when not %locations.
660 Activate more lalr1.cc tests.
661
662 2003-02-19 Akim Demaille <akim@epita.fr>
663
664 * data/lalr1.cc: When displaying a line number, be sure to make it
665 an int.
666
667 2003-02-19 Akim Demaille <akim@epita.fr>
668
669 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
670 Remove, useless.
671 (YYABORT, YYACCEPT, YYERROR): New.
672 * tests/calc.at: Renable the lalr1.cc test.
673
674 2003-02-19 Akim Demaille <akim@epita.fr>
675
676 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
677 error recovery, mixing with/without pops and discarding of the
678 lookahead.
679 Exercise YYERROR.
680 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
681
682 2003-02-17 Paul Eggert <eggert@twinsun.com>
683
684 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
685 * tests/testsuite.at (AT_COMPILE): Use them.
686 This fixes the testsuite problem reported by Robert Lentz in
687 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
688
689 2003-02-12 Paul Eggert <eggert@twinsun.com>
690
691 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
692 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
693 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
694 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
695 Check for malloc failure, for consistency with yacc.c.
696 (yytname_size): Remove, for consistency with yacc.c.
697
698 The bug still remains in data/lalr1.cc, as I didn't have time
699 to fix it there.
700
701 2003-02-06 Akim Demaille <akim@epita.fr>
702
703 * configure.ac (GXX): Rename as...
704 (CXX): this, to keep the original Autoconf semantics.
705 Require 2.57.
706 * data/lalr1.cc: Fix b4_copyright invocations.
707 If YYDEBUG is not defined, don't depend upon name_ being defined.
708 (location.hh): Include string and iostream.
709 (Position::filename): New member.
710 (Position::Position ()): New.
711 (operator<< (Position)): New.
712 (operator- (Position, int)): New.
713 (Location::first, Location::last): Rename as...
714 (Location::begin, Location::end): these, to mock the conventional
715 iterator names.
716 (operator<< (Location)): New.
717 * tests/atlocal.in (CXX): New.
718 * tests/testsuite.at (AT_COMPILE_CXX): New.
719 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
720 locations in a more synthetic way.
721 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
722 lalr1.cc is used.
723 Adjust the C locations to match those from Emacs: first column is
724 column 0.
725 Change all the expected results.
726 Conform to the GCS: simplify the locations when applicable.
727 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
728 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
729 these CPP macros with the m4 macros new defined by...
730 (AT_CHECK_PUSHDEFS): this, i.e.:
731 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
732 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
733 New macros.
734 (AT_CHECK_POPDEFS): Undefine them.
735 (AT_CHECK_CALC_LALR1_CC): New.
736 Use it for the first lalr1.cc test.
737
738 2003-02-04 Akim Demaille <akim@epita.fr>
739
740 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
741 Location as is defined.
742
743 2003-02-04 Akim Demaille <akim@epita.fr>
744
745 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
746 name_ being defined.
747
748 2003-02-03 Paul Eggert <eggert@twinsun.com>
749
750 * src/gram.h (start_symbol): Remove unused decl.
751
752 Use more-consistent naming conventions for local vars.
753
754 * src/derives.c (derives_compute): Change type of local var from
755 int to rule_number.
756 * src/gram.c (grammar_rules_partial_print): Likewise.
757 * src/print.c (print_core): Likewise.
758 * src/reduce.c (reduce_grammar_tables): Likewise.
759
760 * src/gram.c (grammar_dump): Change name of item_number *
761 local var from r to rp.
762 * src/nullable.c (nullable_compute): Likewise.
763
764 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
765
766 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
767 for symbol or symbol_number var.
768 * src/reader.c (grammar_start_symbol_set): Likewise.
769 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
770 Likewise.
771 * src/state.c (transitions_to): Likewise.
772 * src/state.h: Likewise.
773 * src/tables.c (symbol_number_to_vector_number): Likewise.
774
775 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
776 char * var.
777
778 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
779 var.
780
781 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
782 var.
783
784 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
785 Use str, not s, for char * var. Use ch, not c, for character var.
786 Use size for size var.
787
788 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
789 char * var.
790 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
791 uniqstr var.
792 * src/uniqstr.h: Likewise.
793
794 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
795 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
796 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
797 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
798 param to have same name as that of enum, so that we don't use
799 "s" to stand for a non-state.
800
801 2003-02-02 Akim Demaille <akim@epita.fr>
802
803 * src/scan-skel.l: Scan more than one inert character per yylex
804 invocation.
805
806 2003-02-01 Paul Eggert <eggert@twinsun.com>
807
808 Version 1.875a.
809
810 * po/LINGUAS: Add ms.
811
812 2003-01-30 Akim Demaille <akim@epita.fr>
813
814 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
815
816 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
817
818 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
819 of $1.
820
821 Changes in response to error report by S. Eken: GLR mode does not
822 handle negative $ indices or $ indices in embedded rules correctly.
823 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
824
825 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
826 (b4_rhs_location): Ditto.
827 (yyfill): New function to copy from stack tree into array
828 incrementally.
829 (yyuserAction): Modify to allow incremental move of semantic values
830 to rhs array when in GLR mode.
831 Define YYFILL to use in user-defined actions to fill semantic array
832 as needed.
833 Remove dummy use of yystack, as there is now a guaranteed use.
834 (yydoAction): Modify to allow incremental move of semantic values
835 to rhs array when in GLR mode.
836 (yyresolveAction): Ditto.
837 (yyglrShiftDefer): Update comment.
838 (yyresolveStates): Use X == NULL for pointers, not !X.
839 (yyglrReduce): Ditto.
840 (yydoAction): Ditto
841
842 * tests/glr-regr1.at: Rename to ...
843 * tests/glr-regression.at: Add new regression test for the problems
844 described above (adapted from S. Eken).
845 Update copyright notice.
846 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
847 * tests/Makefile.am: Ditto.
848
849 2003-01-28 Paul Eggert <eggert@twinsun.com>
850
851 * data/lalr1.cc: Do not use @output_header_name@ unless
852 b4_defines_flag is set. This fixes two bugs reported by
853 Tim Van Holder in
854 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
855 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
856
857 2003-01-21 Paul Eggert <eggert@twinsun.com>
858
859 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
860 we don't need to worry about yyerrlab1 being reported as an
861 "unused label" by non-GCC C compilers. The downside is that if
862 locations are used then a couple of statements are duplicated each
863 time YYERROR is invoked, but the upside is that the warnings
864 should vanish.
865 (yyerrlab1): Move code to YERROR.
866 (yyerrlab2): Remove. Change uses back to yyerrlab1.
867 This reverts some of the 2002-12-27 change.
868
869 2003-01-17 Paul Eggert <eggert@twinsun.com>
870
871 * src/output.c (symbol_printers_output): Fix typo that led
872 to core dump. Problem reported by Antonio Rus in
873 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
874
875 2003-01-13 Akim Demaille <akim@epita.fr>,
876 Quoc Peyrot <chojin@lrde.epita.fr>,
877 Robert Anisko <anisko_r@lrde.epita.fr>
878
879 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
880 when the stacks contain one element, as the loop would otherwise
881 free the last state, and then use the top state (the one we just
882 popped). This means that the initial elements will not be freed
883 explicitly, as is the case in yacc.c; it is not a problem, as
884 these elements have fake values.
885
886 2003-01-11 Paul Eggert <eggert@twinsun.com>
887
888 * NEWS: %expect-violations are now just warnings, reverting
889 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
890 bootstrapping problem reported by Matthias Klose; see
891 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
892 * src/conflicts.c (conflicts_print): Likewise.
893 * tests/conflicts.at (%expect not enough, %expect too much,
894 %expect with reduce conflicts): Likewise.
895 * doc/bison.texinfo (Expect Decl): Document this. Also mention
896 that the warning is enabled if the number of conflicts changes
897 (not necessarily increases).
898
899 * src/getargs.c (version): Update copyright year.
900
901 2003-01-09 Akim Demaille <akim@epita.fr>
902
903 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
904
905 2003-01-08 Paul Eggert <eggert@twinsun.com>
906
907 * Makefile.maint (WGETFLAGS):
908 New macro, containing "-C off" to disable proxy caches.
909 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
910 (rel-check): Use $(WGET) instead of wget.
911
912 2003-01-06 Paul Eggert <eggert@twinsun.com>
913
914 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
915 the GLR paper of Scott, Johnstone and Hussain.
916
917 2003-01-04 Paul Eggert <eggert@twinsun.com>
918
919 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
920 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
921 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
922 (EXTRA_LIBRARIES): New var, for liby.a.
923 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
924 (EXTRA_SCRIPTS): New var, for yacc.
925
926 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
927 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
928 Problem reported by Nelson H. F. Beebe.
929
930 2003-01-03 Paul Eggert <eggert@twinsun.com>
931
932 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
933 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
934 when compiling Bison 1.875's `bitset bset = obstack_alloc
935 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
936
937 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
938 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
939 grow to a huge size with typical invocation.
940
941 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
942 Use the pattern recommended by Autoconf 2.57, except also protect
943 against double-definition.
944 * src/system.h: Likewise.
945 Portability issues reported by Nelson H. F. Beebe.
946
947 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
948 All uses changed. Provide a definition in both C and C++.
949 (yytrue, yyfalse): Define even if defined (__cplusplus).
950
951 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
952 Reported by Nelson H. F. Beebe.
953
954 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
955
956 2003-01-02 Paul Eggert <eggert@twinsun.com>
957
958 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
959 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
960 Bug reported by Nelson H. F. Beebe.
961
962 2003-01-01 Paul Eggert <eggert@twinsun.com>
963
964 * Version 1.875.
965
966 2002-12-30 Paul Eggert <eggert@twinsun.com>
967
968 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
969 Moved here from...
970 (<INITIAL>","): Here. This causes stray "," to be treated
971 more uniformly.
972
973 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
974 last brace in braced code when not in Yacc mode, for compatibility
975 with Bison 1.35. This resurrects the 2001-12-15 patch to
976 src/reader.c.
977
978 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
979 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
980
981 2002-12-28 Paul Eggert <eggert@twinsun.com>
982
983 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
984 that of SYM's type. This fixes Debian bug 168069, reported by
985 Thomas Olsson.
986
987 2002-12-28 Paul Eggert <eggert@twinsun.com>
988
989 Version 1.75f.
990
991 Switch back to the Yacc style of conflict reports, undoing some
992 of the 2002-07-30 change.
993 * doc/bison.texinfo (Understanding): Use Yacc style for
994 conflict reports. Also, use new way of locating rules.
995 * src/conflicts.c (conflict_report):
996 Renamed from conflict_report_yacc, removing the old
997 'conflict_report'. Translate the entire conflict report at once,
998 so that we don't assume that "," has the same interpretation in
999 all languages.
1000 (conflicts_output): Use Yacc-style conflict report for each state,
1001 instead of our more-complicated style.
1002 (conflicts_print): Use Yacc-style conflict report, except print
1003 the input file name when not emulating Yacc.
1004 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
1005 Conflicted Reduction, %expect not enough, %expect too much,
1006 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
1007 * tests/existing.at (GNU Cim Grammar): Likewise.
1008 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
1009
1010 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
1011 fatal): Don't invoke fflush; it's not needed and it might even be
1012 harmful for stdout, as stdout might not be open.
1013 * src/reduce.c (reduce_print): Likewise.
1014
1015 2002-12-27 Paul Eggert <eggert@twinsun.com>
1016
1017 Fix a bug where error locations were not being recorded correctly.
1018 This problem was originally reported by Paul Hilfinger in
1019 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1020
1021 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1022 top of the location stack's error locations.
1023 (yyerrlab): Set it. When discarding a token, push its location
1024 onto yylerrsp so that we don't lose track of the error's end.
1025 (yyerrlab1): Now is only the target of YYERROR, so that we can
1026 properly record the location of the action that failed. For GCC
1027 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1028 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1029 (yyerrlab2): New label, which yyerrlab now falls through to.
1030 Compute the error's location by applying YYLLOC_DEFAULT to
1031 the locations of all the symbols that went into the error.
1032 * doc/bison.texinfo (Location Default Action): Mention that
1033 YYLLOC_DEFAULT is also invoked for syntax errors.
1034 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1035 Error locations include the locations of all the tokens that were
1036 discarded, not just the last token.
1037
1038 2002-12-26 Paul Eggert <eggert@twinsun.com>
1039
1040 * src/files.c: Include quote.h.
1041 (compute_output_file_names): Warn if we detect conflicting
1042 outputs to the same file. This should catch the misunderstanding
1043 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1044
1045 * src/conflicts.c (conflicts_print): If the user specifies
1046 "%expect N", report an error if there are any reduce/reduce
1047 conflicts. This is what the manual says should happen.
1048 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1049 * tests/conflicts.at (%expect with reduce conflicts): New test.
1050
1051 Don't use m4_include on relative file names, as it doesn't work as
1052 desired if there happens to be a file with that name under ".".
1053
1054 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1055 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1056 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1057 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1058 * src/output.c (output_skeleton): Use full path names when
1059 specifying a file to include; don't rely on include path, as
1060 it's unreliable when the working file contains a file with
1061 that name.
1062
1063 2002-12-25 Paul Eggert <eggert@twinsun.com>
1064
1065 Remove obsolete references to bison.simple and bison.hairy.
1066 Problem mentioned by Aubin Mahe in
1067 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1068 * data/glr.c: Comment fix.
1069 * doc/bison.1: Remove references. Also, mention "yacc".
1070
1071 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1072 with -g option.
1073
1074 * src/parse-gram.y (declaration): Use enum "report_states" rather
1075 than its numeric value 1.
1076
1077 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1078 opening a new one. This fixes Debian bug 165349, reported by
1079 Bruce Stephens.
1080
1081 2002-12-24 Paul Eggert <eggert@twinsun.com>
1082
1083 Version 1.75e.
1084
1085 * Makefile.maint (cvs-update): Don't assume that the shell
1086 supports $(...), as Solaris sh doesn't.
1087
1088 * src/parse-gram.y (lloc_default): Remove test for empty
1089 nonterminals at the end, since it didn't change the result.
1090
1091 2002-12-24 Paul Eggert <eggert@twinsun.com>
1092
1093 If the user does not define YYSTYPE as a macro, Bison now declares it
1094 using typedef instead of defining it as a macro. POSIX requires this.
1095 For consistency, YYLTYPE is also declared instead of defined.
1096
1097 %union directives can now have a tag before the `{', e.g., the
1098 directive `%union foo {...}' now generates the C code
1099 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1100 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1101 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1102 instead of `yyltype'.
1103
1104 `yystype' and `yyltype' are now obsolescent macros instead of being
1105 typedefs or tags; they are no longer documented and will be
1106 withdrawn in a future release.
1107
1108 * data/glr.c (b4_location_type): Remove.
1109 (YYSTYPE): Renamed from yystype.
1110 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1111 (struct YYLTYPE): Renamed from struct yyltype.
1112 (YYLTYPE): Renamed from yyltype.
1113 (yyltype, yystype): New (and obsolescent) macros,
1114 for backward compatibility.
1115 * data/yacc.c: Likewise.
1116
1117 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1118 does not specify a union tag. This is for compatibility with
1119 Solaris 9 yacc.
1120
1121 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1122 const *, since it is now modified by stripping surrounding { }.
1123 (current_braced_code): Remove.
1124 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1125 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1126 trailing " {...}". Now of type <chars>.
1127 (grammar_declaration): Adjust to bundled tokens.
1128 (code_content): Remove; stripping is now done by add_param.
1129 (print_token_value): Print contents of bundled tokens.
1130 (token_name): New function.
1131
1132 * src/reader.h (braced_code, current_braced_code): Remove.
1133 (token_name): New decl.
1134
1135 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1136 token_type, not braced_code code_kind. All uses changed.
1137 (SC_PRE_CODE): New state, for scanning after a keyword that
1138 has (or usually has) an immediately-following braced code.
1139 (token_type): New local var, to keep track of which token type
1140 to return when scanning braced code.
1141 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1142 <INITIAL>"%parse-param", <INITIAL>"%printer",
1143 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1144 instead of returning a token type immediately.
1145 (<INITIAL>"{"): Set token type.
1146 (<SC_BRACED_CODE>"}"): Use it.
1147 (handle_action_dollar, handle_action_at): Now returns bool
1148 indicating success. Fail if ! current_rule; this prevents a core dump.
1149 (handle_symbol_code_dollar, handle_symbol_code_at):
1150 Remove; merge body into caller.
1151 (handle_dollar, handle_at): Complain in invalid contexts.
1152
1153 * NEWS, doc/bison.texinfo: Document the above.
1154 * NEWS: Fix years and program names in copyright notice.
1155
1156 2002-12-17 Paul Eggert <eggert@twinsun.com>
1157
1158 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1159 Reporting, Table of Symbols): Omit mentions of %lex-param and
1160 %parse-param from the documentation for now.
1161
1162 2002-12-15 Paul Eggert <eggert@twinsun.com>
1163
1164 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1165 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1166 lookahead symbol, and which sets yychar in parser actions) and it
1167 disagreed with the Bison documentation. Bug
1168 reported by Andrew Walrond.
1169
1170 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1171 as the caller now does that.
1172 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1173 (YYEMPTY): Parenthesize right hand side, since others use it.
1174 (yyparse): Don't assume that our generated code is the only code
1175 that sets yychar.
1176
1177 2002-12-13 Paul Eggert <eggert@twinsun.com>
1178
1179 Version 1.75d.
1180
1181 POSIX requires a "yacc" command.
1182 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1183 (MOSTLYCLEANFILES): Add yacc.
1184 (yacc): New rule.
1185 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1186 as an alias for bison y.
1187
1188 * po/LINGUAS: Add da.
1189
1190 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1191 problem with latest <getopt.h>.
1192 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1193
1194 * doc/fdl.texi: Upgrade to 1.2.
1195 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1196 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1197 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1198 gnulib.
1199 * config/install-sh: Sync with autotools.
1200
1201 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1202 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1203 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1204 locations are requested.
1205 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1206 locations are requested.
1207
1208 2002-12-12 Paul Eggert <eggert@twinsun.com>
1209
1210 Remove unportable casts and storage allocation tricks.
1211 While we're at it, remove almost all casts, since they
1212 usually aren't needed and are a sign of trouble.
1213
1214 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1215
1216 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1217 the pointer DSET returned by malloc; this isn't portable.
1218 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1219 Similarly for DERIVES.
1220 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1221 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1222 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1223
1224 * src/derives.c (derives_compute): Do not bother invoking
1225 int_of_rule_number, since rule numbers are integers.
1226
1227 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1228 rather than XMALLOC (char, N).
1229
1230 * src/files.c (filename_split): Rewrite to avoid cast.
1231
1232 * src/gram.h (symbol_number_as_item_number,
1233 item_number_as_symbol_number, rule_number_as_item_number,
1234 item_number_as_rule_number):
1235 Now inline functions rather than macros, to avoid casts.
1236 * src/state.h (state_number_as_int): Likewise.
1237 * src/tables.c (state_number_to_vector_number,
1238 symbol_number_to_vector_number): Likewise.
1239
1240 * src/gram.h (int_of_rule_number): Remove; no longer used.
1241
1242 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1243 since the resulting storage is always stored into.
1244
1245 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1246 where it's needed.
1247
1248 * src/muscle_tab.c (muscle_m4_output):
1249 Now inline. Return bool, not int.
1250 * src/state.c (state_compare): Likewise.
1251 * src/symtab.c (symbol_check_defined,
1252 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1253 hash_compare_symbol, hash_symbol):
1254 Likewise.
1255 * src/uniqstr.c (uniqstr_print): Likewise.
1256 * src/muscle_tab.c (muscle_m4_output_processor):
1257 New function, to avoid casts.
1258 * src/state.c (state_comparator, stage_hasher): Likewise.
1259 * src/symtab.c (symbol_check_defined_processor,
1260 symbol_check_alias_consistency_processor, symbol_pack_processor,
1261 symbol_translation_processor, hash_symbol_comparator,
1262 hash_symbol_hasher): Likewise.
1263 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1264 * src/muscle_tab.c (muscles_m4_output):
1265 Use new functions instead of casting old functions unportably.
1266 * src/state.c (state_hash_new): Likewise.
1267 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1268 symbols_token_translations_init):
1269 Likewise.
1270 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1271
1272 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1273 var instead of casting to long, to avoid casts.
1274 (prepare_states): Use MALLOC rather than alloca, so that we don't
1275 have to worry about alloca.
1276 * src/state.c (state_hash_lookup): Likewise.
1277
1278 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1279 local var instead of casting to unsigned char, to avoid casts.
1280
1281 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1282 STATE_ALLOC): Remove.
1283 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1284 rather than calloc, and use offsetof to avoid allocating slightly
1285 too much storage.
1286 (state_new): Initialize all members.
1287
1288 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1289
1290 * src/symtab.c (symbol_free): Remove; unused.
1291 (symbol_get): Remove cast in lhs of assignment.
1292 (symbols_do): Now static. Accept generic arguments, not
1293 hashing-related ones.
1294
1295 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1296 (symbol_processor): Remove.
1297 (symbols_do): Remove decl; now static.
1298
1299 * src/system.h (alloca): Remove; decl no longer needed.
1300 (<stddef.h>): Include, for offsetof.
1301 (<inttypes.>, <stdint.h>): Include if available.
1302 (uintptr_t): New type, if system lacks it.
1303 (CALLOC, MALLOC, REALLOC): New macros.
1304 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1305 new macros.
1306
1307 * src/tables.c (table_size): Now int, to pacify GCC.
1308 (table_grow, table_ninf_remap): Use signed table size.
1309 (save_row): Don't bother initializing locals when not needed.
1310 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1311 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1312
1313 * src/vcg.h: Correct misspellings.
1314
1315 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1316
1317
1318 * src/getargs.c (getargs): Don't assume EOF == -1.
1319
1320 2002-12-09 Paul Eggert <eggert@twinsun.com>
1321
1322 Change identifier spellings to avoid collisions with names
1323 that are reserved by POSIX.
1324
1325 Don't use names ending in _t, since POSIX reserves them.
1326 For consistency, remove _e and _s endings -- they're weren't
1327 needed to remove ambiguity. All uses changed.
1328 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1329 turn was just renamed from struniq_t.
1330 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1331 which in turn was just renamed from struniq_processor_t.
1332 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1333 in turn was renamed from hash_compare_struniq_t.
1334 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1335 (state_list): Renamed from state_list_t.
1336 * src/assoc.h (assoc): Renamed from assoc_t.
1337 * src/conflicts.c (enum conflict_resolution): Renamed from
1338 enum conflict_resolution_e.
1339 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1340 (rule_list): Renamed from rule_list_t.
1341 * src/getargs.h (enum trace): Renamed from enum trace_e.
1342 (enum report): Renamed from enum report_e.
1343 * src/gram.h (item_number): Renamed from item_number_t.
1344 (rule_number): Renamed from rule_number_t.
1345 (struct rule_s): Remove the "rule_s" part; not used.
1346 (rule): Renamed from rule_t.
1347 (rule_filter): Renamed from rule_filter_t.
1348 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1349 (goto_list): Renamed from goto_list_t.
1350 * src/lalr.h (goto_number): Renamed from goto_number_t.
1351 * src/location.h (location): Renamed from location_t.
1352 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1353 and moved here from:
1354 * src/muscle_tab.h (muscle_entry_t): here.
1355 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1356 (rule_list): Renamed from rule_list_t.
1357 * src/print_graph.c (static_graph): Renamed from graph.
1358 * src/reader.h (braced_code): Renamed from braced_code_t.
1359 Remove brace_code_e tag.
1360 * src/relation.h (relation_node): Renamed from relation_node_t.
1361 (relation_nodes): Renamed from relation_nodes_t.
1362 (relation): Renamed from relation_t.
1363 * src/state.h (state_number): Renamed from state_number_t.
1364 (struct state): Renamed from struct state_s.
1365 (state): Renamed from state_t.
1366 (transitions): Renamed from transitions_t. Unused (and
1367 misspelled) transtion_s tag removed.
1368 (errs): Renamed from errs_t. Unused errs_s tag removed.
1369 (reductions): Renamed from reductions_t. Unused tag
1370 reductions_s removed.
1371 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1372 (struct symbol_list): Renamed from struct symbol_list_s.
1373 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1374 (struct symbol): Renamed from struct symbol_s.
1375 (symbol): Renamed from symbol_t.
1376 * src/tables.c (vector_number): Renamed from vector_number_t.
1377 (action_number): Renamed from action_t.
1378 * src/tables.h (base_number): Renamed from base_t.
1379 * src/vcg.h (enum color): Renamed from enum color_e.
1380 (enum textmode): Renamed from enum textmode_e.
1381 (enum shape): Renamed from enum shape_e.
1382 (struct colorentry): Renamed from struct colorentry_s.
1383 (struct classname): Renamed from struct classname_s.
1384 (struct infoname): Renamed from struct infoname_s.
1385 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1386 (enum decision): Renamed from enum decision_e.
1387 (enum orientation): Renamed from enum orientation_e.
1388 (enum alignment): Renamed from enum alignment_e.
1389 (enum arrow_mode): Renamed from enum arrow_mode_e.
1390 (enum crossing_type): Renamed from enum crossing_type_e.
1391 (enum view): Renamed from enum view_e.
1392 (struct node): Renamed from struct node_s.
1393 (node): Renamed from node_t.
1394 (enum linestyle): Renamed from enum linestyle_e.
1395 (enum arrowstyle): Renamed from enum arrowstyle_e.
1396 (struct edge): Renamed from struct edge.
1397 (edge): Renamed from edge_t.
1398 (struct graph): Renamed from struct graph_s.
1399 (graph): Renamed from graph_t.
1400 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1401 Rename value_t -> value.
1402 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1403 value_t_as_yystype -> value_as_yystype.
1404
1405 Don't include <errno.h> in the mainstream code, since it
1406 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1407 * lib/get-errno.c, lib/get-errno.h: New files.
1408 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1409 get-errno.c.
1410 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1411 * src/output.c (output_skeleton): Likewise.
1412 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1413 instead of errno.
1414 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1415 Likewise.
1416 (handle_action_dollar, handle_action_at): Likewise.
1417 * src/system.h: Do not include <errno.h>.
1418 (TAB_EXT): Renamed from EXT_TAB.
1419 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1420
1421 Avoid str[a-z]*, since <string.h> reserves that name space.
1422 Change all instances of "struniq" in names to "uniqstr", and
1423 likewise for "STRUNIQ" and "UNIQSTR".
1424 * src/uniqstr.c: Renamed from src/struniq.c.
1425 * src/uniqstr.h: Renamed from src/struniq.h.
1426 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1427 * src/files.c (strsuffix): Remove; unused.
1428 (concat2): Renamed from stringappend. Now static.
1429 * src/files.h (strsuffix, stringappend): Remove; unused.
1430 * src/parse-gram.y (<chars>): Renamed from <string>.
1431 (<uniqstr>): Renamed from <struniq>.
1432 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1433 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1434 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1435 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1436 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1437 (N_EXPAND): Renamed from N_STRETCH.
1438
1439 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1440 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1441 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1442 Remove; unused.
1443 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1444 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1445 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1446 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1447 (BASE_MAXIMUM): Renamed from BASE_MAX.
1448 (BASE_MINIMUM): Renamed from BASE_MIN.
1449 (ACTION_MAX): Remove; unused.
1450 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1451 Unnecessary casts removed from above defines.
1452
1453
1454 Fix misspelling in names.
1455 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1456 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1457 G_NODE_ALIGNEMENT.
1458
1459
1460 * lib/timevar.c (timevar_report): Renamed from time_report,
1461 for consistency with other names.
1462 * lib/timevar.h (timevar_report): New decl.
1463 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1464
1465
1466 Sort include-file uses.
1467
1468 Reorder all include files under src to be in the order "system.h".
1469 then the ../lib include files in angle brackets (alphabetized),
1470 then the . include files in double-quotes (alphabetized). Fix
1471 dependency breakages encountered in this process, as follows:
1472 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1473 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1474 * src/state.h: Include "symtab.h".
1475
1476 2002-12-08 Paul Eggert <eggert@twinsun.com>
1477
1478 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1479 since this causes problems when __file__ contains character
1480 sequences like "@" that are treated specially by src/scan-skel.l.
1481 Instead, just use the file's basename. This fixes the bug
1482 reported by Martin Mokrejs in
1483 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
1484
1485 2002-12-06 Paul Eggert <eggert@twinsun.com>
1486
1487 Add support for rules that do not have trailing semicolons, as
1488 POSIX requires. Improve the quality of locations in Bison
1489 diagnostics.
1490
1491 * src/location.c: Include <quotearg.h>.
1492 (empty_location): Now const.
1493 (location_print): New function. Follow the recommendation of the
1494 GNU Coding Standards for locations that span file boundaries.
1495 * src/location.h: Do not include <quotearg.h>; no longer needed.
1496 (boundary): New type.
1497 (location_t): Use it. This allows locations to span file boundaries.
1498 All member uses changed: file -> start.file or end.file (as needed),
1499 first_line -> start.line, first_column -> start.column,
1500 last_line -> end.line, last_column -> end.column.
1501 (equal_boundaries): New function.
1502 (LOCATION_RESET, LOCATION_STEP): Remove.
1503 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1504 (empty_location): Now const.
1505 (location_print): New decl.
1506 * src/parse-gram.y (lloc_default): New function, which handles
1507 empty locations more accurately.
1508 (YYLLOC_DEFAULT): Use it.
1509 (%token COLON): Remove.
1510 (%token ID_COLON): New token.
1511 (rules): Use it.
1512 (declarations, rules): Remove trailing semicolon.
1513 (declaration, rules_or_grammar_declaration):
1514 Allow empty (";") declaration.
1515 (symbol_def): Remove empty actions; no longer needed.
1516 (rules_or_grammar_declaration): Remove trailing semicolon.
1517 (semi_colon.opt): Remove.
1518 * src/reader.h: Include location.h.
1519 (scanner_cursor): New decl.
1520 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1521 rolling our own.
1522 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1523 of *loc.
1524 (STEP): Remove. No longer needed, now that adjust_location does
1525 the work. All uses removed.
1526 (scanner_cursor): New var.
1527 (adjust_location): Renamed from extend_location. It now sets
1528 *loc and adjusts the scanner cursor. All uses changed.
1529 Don't bother testing for CR.
1530 (handle_syncline): Remove location arg; now updates scanner cursor.
1531 All callers changed.
1532 (unexpected_end_of_file): Now accepts start boundary of token or
1533 comment, not location. All callers changed. Update scanner cursor,
1534 not the location.
1535 (SC_AFTER_IDENTIFIER): New state.
1536 (context_state): Renamed from c_context. All uses changed.
1537 (id_loc, code_start, token_start): New local vars.
1538 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1539 processing of Yacc white space and equivalents here.
1540 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1541 instead of returning ID immediately, since we need to search for
1542 a subsequent colon.
1543 (<INITIAL>"'", "\""): Save token_start.
1544 (<INITIAL>"%{", "{", "%%"): Save code_start.
1545 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1546 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1547 BEGIN context_state at end, not INITIAL.
1548 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1549 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1550 Return correct token start.
1551 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1552 the start of a character, string or multiline comment is found.
1553 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1554 Reduction): Adjust reported locations to match the more-precise
1555 results now expected.
1556 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1557 * tests/reduce.at (Useless Rules, Reduced Automaton,
1558 Underivable Rules): Likewise.
1559 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1560 or "|"' now that so many other tokens are allowed by the new grammar.
1561
1562 * src/complain.h (current_file): Remove duplicate decl;
1563 current_file is now owned by files.h.
1564 * src/complain.c, src/scan-gram.l: Include files.h.
1565
1566 2002-12-06 Paul Eggert <eggert@twinsun.com>
1567
1568 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1569 promotes to int; it might be unsigned int.
1570 * data/yacc.c (yy_reduce_print): Likewise.
1571
1572 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1573 be #defined in the prologue, not in the Bison declarations.
1574 This fixes Debian Bug 102878, reported by Shaul Karl.
1575
1576 2002-12-02 Paul Eggert <eggert@twinsun.com>
1577
1578 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1579 * lib/strtoul.c: New file, from gnulib.
1580 This fixes a porting bug reported by Peter Klein in
1581 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1582
1583 2002-11-30 Paul Eggert <eggert@twinsun.com>
1584
1585 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1586 and put only a forward declaration in the prologue. This is for
1587 consistency with the other scanner helper functions.
1588
1589 Type clashes now generate warnings, not errors, since it
1590 appears that POSIX may allow some grammars with type clashes.
1591 * src/reader.c (grammar_current_rule_check): Warn about
1592 type clashes instead of complaining.
1593 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1594
1595 Add Yacc library, since POSIX requires it.
1596 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1597 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1598 * lib/main.c, lib/yyerror.c: New files.
1599
1600 gram_error can be static; it need not be extern.
1601 * src/reader.h (gram_error): Remove decl.
1602 * src/parse-gram.y (gram_error): Now static. Add static decl.
1603 (print_token_value): Omit parameter names from forward decl,
1604 for consistency.
1605
1606 2002-11-29 Paul Eggert <eggert@twinsun.com>
1607
1608 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1609 be declared before being used. E.g., one should typically
1610 declare them in the prologue. Use GNU coding style in examples.
1611 Put "const" consistently after the type it modifies. Mention
1612 that C99 supports "inline". Mention that yyerror traditionally
1613 returns "int".
1614
1615 %parse-param and %lex-param now take just one argument, the
1616 declaration; the argument name is deduced from the declaration.
1617
1618 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1619 Reporting, Table of Symbols): Document this.
1620 * src/parse-gram.y (add_param): New function.
1621 (COMMA): Remove.
1622 (declaration): Implement new rule for %parse-param and %lex-param.
1623 * src/scan-gram.l: "," now elicits a warning, rather than being
1624 a token; this is more compatible with byacc.
1625 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1626
1627 2002-11-27 Paul Eggert <eggert@twinsun.com>
1628
1629 Rename identifiers to avoid real and potential collisions.
1630
1631 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1632 to avoid collision with lex macro described by Bruce Lilly in
1633 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1634 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1635 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1636 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1637 All uses changed.
1638 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1639 The name "yycontrol" violates the name space rules, and this stuff
1640 wasn't being used anyway.
1641 (input): Remove action; this stuff wasn't being used.
1642 (gram_error): Rename local variable yylloc -> loc.
1643 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1644 (YY_DECL): Don't use "yy" at start of local variables.
1645 All uses changed, e.g., yylloc -> loc.
1646 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1647 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1648 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1649 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1650
1651 * src/parse-gram.y (gram_error): loc is now const *.
1652 * src/reader.h (gram_error): Likewise.
1653
1654 2002-11-24 Paul Eggert <eggert@twinsun.com>
1655
1656 Version 1.75c.
1657
1658 * tests/actions.at (Actions after errors): Use an output format
1659 more similar to that of the Printers and Destructors test.
1660 Test the position of the ';' token too.
1661 (Printers and Destructors): Likewise.
1662 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1663 unnecessarily alarming people when the test fails.
1664
1665 * data/yacc.c (yyerrlab1): Move this label down, so that the
1666 parser does not discard the lookahead token if the user code
1667 invokes YYERROR. This change is required for POSIX conformance.
1668
1669 * lib/error.c: Sync with gnulib.
1670
1671 2002-11-22 Paul Eggert <eggert@twinsun.com>
1672
1673 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1674 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1675 * lib/xmalloc.c: Likewise.
1676
1677 2002-11-20 Paul Eggert <eggert@twinsun.com>
1678
1679 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1680
1681 2002-11-20 Paul Eggert <eggert@twinsun.com>
1682
1683 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1684 should use `if (! x) abort ();' rather than `assert (x);', and
1685 anyway it's one less thing to worry about configuring.
1686
1687 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1688 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1689 and replace all instances of assert with abort.
1690 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1691 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1692
1693 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1694 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1695 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1696 hash_find_entry, hash_rehash, hash_insert): Likewise.
1697 * src/conflicts.c (resolve_sr_conflict): Likewise.
1698 * src/lalr.c (set_goto_map, map_goto): Likewise.
1699 * src/nullable.c (nullable_compute): Likewise.
1700 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1701 * src/reader.c (packgram, reader): Likewise.
1702 * src/state.c (state_new, state_free, state_transitions_set,
1703 state_reduction_find): Likewise.
1704 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1705 symbol_pack): Likewise.
1706 * src/tables.c (conflict_row, pack_vector): Likewise.
1707 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1708 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1709 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1710 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1711
1712 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1713 (ARGMATCH_CONSTRAINT): New macro.
1714 (ARGMATCH_ASSERT): Use it.
1715
1716 * src/system.h (verify): New macro.
1717 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1718 rather than assert.
1719 * src/tables.c (tables_generate): Likewise.
1720
1721 * src/struniq.c (struniq_assert): Now returns void, and aborts
1722 if the assertion is false.
1723 (struniq_assert_p): Remove.
1724 * src/struniq.h: Likewise.
1725
1726 2002-11-18 Paul Eggert <eggert@twinsun.com>
1727
1728 * data/glr.c (yygetLRActions): Replace `yyindex' with
1729 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1730 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1731 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1732
1733 2002-11-18 Akim Demaille <akim@epita.fr>
1734
1735 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1736 space.
1737 From Tim Van Holder.
1738
1739 2002-11-17 Paul Eggert <eggert@twinsun.com>
1740
1741 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1742 to "SyntaxError" for consistency with my 2002-11-15 change.
1743
1744 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1745 not define to {}, since this breaks the common use of `YYDPRINTF
1746 ((...));' if a single statement is desired (e.g. before `else').
1747 Work around GCC warnings by surrounding corresponding calls with
1748 {} if needed.
1749 (yyhasResolvedValue): Remove unused function.
1750 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1751 loop body.
1752 (yyreportSyntaxError): Renamed from yyreportParseError.
1753 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1754 All uses changed.
1755 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1756 extern when possible. Remove unused initializations.
1757
1758 2002-11-16 Akim Demaille <akim@epita.fr>
1759
1760 Augment the similarity between GLR and LALR traces.
1761
1762 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1763 (YY_REDUCE_PRINT): New.
1764 (yyparse): Use them.
1765 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1766 YYDPRINT here.
1767 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1768 state reached after the reduction/recovery, since...
1769 (yyparse, yyprocessOneStack): Report the state we are entering in.
1770
1771 2002-11-16 Akim Demaille <akim@epita.fr>
1772
1773 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1774 Add support for --trace=skeleton.
1775 * src/scan-skel.l: %option debug.
1776 Scan strings of non-@ or \n instead of character by character.
1777 (scan_skel): Handle trace_skeleton.
1778 (QPUTS): New.
1779 (@output_parser_name@, @output_header_name@): ``Restore'' their
1780 support (used to be M4 macros).
1781 * data/yacc.c: Quote larger chunks, a la glr.c.
1782 * data/lalr1.cc: Likewise.
1783 The header guards are no longer available, so use some other
1784 string than `YYLSP_NEEDED'.
1785
1786 2002-11-16 Akim Demaille <akim@epita.fr>
1787
1788 Make the ``Printers and Destructors'' test more verbose, taking
1789 `yacc.c''s behavior as (possibly wrong) reference.
1790
1791 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1792 instead of fprint on stdout.
1793 Set and report the last_line of the symbols.
1794 Consistently display values and locations.
1795
1796 2002-11-16 Paul Eggert <eggert@twinsun.com>
1797
1798 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1799
1800 2002-11-15 Paul Eggert <eggert@twinsun.com>
1801
1802 * tests/actions.at (Actions after errors): New test case.
1803
1804 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1805 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1806 tests/action.at, tests/calc.at, tests/conflicts.at,
1807 tests/cxx-type.at, tests/regression.at:
1808 "parse error" -> "syntax error" for POSIX compatibility.
1809 "parsing stack overflow..." -> "parser stack overflow" so
1810 that code matches Bison documentation.
1811
1812 2002-11-15 Akim Demaille <akim@epita.fr>
1813
1814 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1815 take two BRACED_CODE, not two string_content.
1816 Free the scanner's obstack when we are done.
1817 (code_content): New.
1818 * tests/calc.at: Adjust.
1819 * doc/bison.texinfo: Adjust.
1820 Also, make sure to include the `,' for these declarations.
1821
1822 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1823
1824 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1825 definition; avoids potential autoreconf problems.
1826
1827 2002-11-15 Akim Demaille <akim@epita.fr>
1828
1829 Always check the value returned by yyparse.
1830
1831 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1832 returned by yyparse.
1833 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1834 Adjust calls.
1835 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1836 returned by yyparse.
1837
1838 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1839
1840 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1841 on input.at test.
1842
1843 2002-11-14 Paul Eggert <eggert@twinsun.com>
1844
1845 * src/output.c (output_skeleton): Call xfopen instead of
1846 duplicating xfopen's body.
1847
1848 Fix bugs reported by Nelson H. F. Beebe in
1849 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1850
1851 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1852 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1853 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1854 file twice in the grammar, as an extra check.
1855
1856 * tests/input.at (Torturing the Scanner): Surround the
1857 backslash-newline tests with "#if 0", to make it less likely that
1858 we'll run into compiler bugs. Bring back solitary \ inside
1859 comment, but add a closing comment to work around HP C bug. Don't
1860 test backslash-newline in C character constant.
1861
1862 2002-11-14 Akim Demaille <akim@epita.fr>
1863
1864 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1865 status of the compiler.
1866 Calling `exit 1' is no longer needed.
1867 Reported by Nelson H. F. Beebe.
1868
1869 2002-11-14 Akim Demaille <akim@epita.fr>
1870
1871 * tests/atlocal.in (CPPFLAGS): We have config.h.
1872 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1873 New.
1874 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1875 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1876 * tests/regression.at, tests/torture.at: Use them for all the
1877 grammars that are to be compiled.
1878 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1879 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1880 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1881
1882 2002-11-14 Akim Demaille <akim@epita.fr>
1883
1884 * doc/bison.texinfo: Various formatting changes (alignments in
1885 samples, additional @group/@end group, GCS in samples.
1886 Use @deffn instead of simple @table to define the directives,
1887 macros, variables etc.
1888
1889 2002-11-13 Paul Eggert <eggert@twinsun.com>
1890
1891 Fix some bugs reported by Albert Chin-A-Young in
1892 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1893
1894 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1895 -o c"; the HP C compiler chatters during compilation.
1896 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1897 * tests/headers.at (export YYLTYPE): Likewise.
1898
1899 * tests/input.at (Torturing the Scanner): Remove lines containing
1900 solitary backslashes, as they tickle a bug in the HP C compiler.
1901
1902 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1903 comments, since they're not portable. Use GNU coding style.
1904
1905 2002-11-13 Akim Demaille <akim@epita.fr>
1906
1907 * data/yacc.c: Leave bigger chunks of quoted text.
1908 (YYDSYMPRINTF): New.
1909 Use it to report symbol activities.
1910 * data/glr.c (YYDSYMPRINTF): New.
1911 Use it.
1912
1913 2002-11-12 Paul Eggert <eggert@twinsun.com>
1914
1915 Version 1.75b.
1916
1917 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1918 (yyglrReduce): Return yyok, not 0.
1919 This should avoid the enumerated-type warnings reported
1920 by Nelson H. F. Beebe in
1921 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1922
1923 * lib/bbitset.h (BITSET_INLINE): Remove.
1924 * lib/bitset.h [! BITSET_INLINE]: Remove.
1925 (bitset_set, bitset_reset, bitset_test): Rename local vars
1926 to avoid shadowing warnings by GCC.
1927
1928 * data/glr.c (inline): Remove #define. It's the user's
1929 responsibility to #define it away, just like 'const'.
1930 This fixes one of the bugs reported by Nelson H. F. Beebe in
1931 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1932
1933 * Makefile.maint (po-check): Scan .l and .y files instead of the
1934 .c and the .h files that they generate. This fixes the bug
1935 reported by Tim Van Holder in:
1936 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1937 Look for N_ as well as for _. Try to avoid matching #define for
1938 N_ and _.
1939 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1940 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1941 * src/scan-gram.l: Revamp regular expressions so that " and '
1942 do not confuse xgettext.
1943
1944 * src/struniq.h (struniq_new): Do not declare the return type
1945 to be 'const'; this violates the C standard.
1946 * src/struniq.c (struniq_new): Likewise.
1947
1948 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1949
1950 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1951 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1952 linker.
1953
1954 2002-11-12 Akim Demaille <akim@epita.fr>
1955
1956 * Makefile.maint: Sync with Autoconf:
1957 (local_updates): New.
1958
1959 2002-11-12 Akim Demaille <akim@epita.fr>
1960
1961 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1962
1963 2002-11-12 Akim Demaille <akim@epita.fr>
1964
1965 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1966 locations.
1967
1968 2002-11-12 Akim Demaille <akim@epita.fr>
1969
1970 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1971 not yyvalue.
1972
1973 2002-11-12 Akim Demaille <akim@epita.fr>
1974
1975 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1976 Use it to test the GLR parser.
1977
1978 2002-11-12 Akim Demaille <akim@epita.fr>
1979
1980 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1981 defines it.
1982 * data/glr.c (yystos): New.
1983 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1984 (YYDSYMPRINT): New.
1985 (yyval): Don't define it, it is handled via M4.
1986 (yyrecoverParseError): Free verbosely the discarded symbols.
1987 * data/yacc.c (yysymprint): Remove, rather...
1988 (b4_yysymprint_generate): invoke.
1989 * data/c.m4 (b4_yysymprint_generate): New.
1990 Accept pointers as arguments, as opposed to the version from
1991 yacc.c.
1992 (b4_yydestruct_generate): Likewise.
1993 * tests/cations.at (Printers and Destructors): Use Bison directives
1994 instead of CPP macros.
1995 Don't rely on internal details.
1996
1997 2002-11-12 Akim Demaille <akim@epita.fr>
1998
1999 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
2000 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
2001 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
2002 it against YYEMPTY and so forth), work on yytoken (i.e., set
2003 it to YYEMPTY etc.).
2004 (yydestruct): Replace with a b4_yydestruct_generate invocation.
2005 (b4_symbol_actions): Remove.
2006 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
2007 for 0, end-of-input.
2008
2009 2002-11-12 Akim Demaille <akim@epita.fr>
2010
2011 * doc/bison.texinfo (Destructor Decl): New.
2012
2013 2002-11-12 Akim Demaille <akim@epita.fr>
2014
2015 * src/tables.c (tables_generate): Use free for pointers that
2016 cannot be NULL, not XFREE.
2017 (pack_vector): Use assert, not fatal, for bound violations.
2018 * src/state.c (state_new): Likewise.
2019 * src/reader.c (reader): Likewise.
2020 * src/lalr.c (set_goto_map): Likewise.
2021 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2022 the file name.
2023
2024 2002-11-12 Akim Demaille <akim@epita.fr>
2025
2026 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2027 Restore.
2028 * src/scan-gram.l (last_string): Is global to the file, not to
2029 yylex.
2030 * src/parse-gram.y (input): Don't append the epilogue here,
2031 (epilogue.opt): do it here, and free the scanner's obstack.
2032 * src/reader.c (epilogue_set): Rename as...
2033 (epilogue_augment): this.
2034 * data/c.m4 (b4_epilogue): Defaults to empty.
2035
2036 2002-11-12 Akim Demaille <akim@epita.fr>
2037
2038 * src/getargs.c (long_options): Remove duplicates.
2039 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2040 Remove.
2041 * doc/bison.rnh: Remove.
2042 * doc/bison.texinfo (VMS Invocation): Remove.
2043
2044 2002-11-12 Akim Demaille <akim@epita.fr>
2045
2046 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2047 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2048
2049 Use struniq for symbols.
2050
2051 * src/symtab.h (symbol_t): The tag member is a struniq.
2052 (symbol_type_set): Adjust.
2053 * src/symtab.c (symbol_new): Takes a struniq.
2054 (symbol_free): Don't free the tag member.
2055 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2056 (hash_compare_symbol, hash_symbol): these.
2057 Use the fact that tags as struniqs.
2058 (symbol_get): Use struniq_new.
2059 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2060 Returns a strniq.
2061 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2062 and type members are struniqs.
2063 * src/reader.c (get_merge_function)
2064 (grammar_current_rule_merge_set): Adjust.
2065 (TYPE, current_type): Are struniq.
2066
2067 Use struniq for file names.
2068
2069 * src/files.h, src/files.c (infile): Split into...
2070 (grammar_file, current_file): these.
2071 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2072 * src/reduce.c (reduce_print): Likewise.
2073 * src/getargs.c (getargs): Likewise.
2074 * src/complain.h, src/complain.c: Likewise.
2075 * src/main.c (main): Call struniqs_new early enough to use it for
2076 file names.
2077 Don't free the input file name.
2078
2079 2002-11-12 Akim Demaille <akim@epita.fr>
2080
2081 * src/symtab.c (symbol_free): Remove dead deactivated code:
2082 type_name are properly removed.
2083 Don't use XFREE to free items that cannot be NULL.
2084 * src/struniq.h, src/struniq.c: New.
2085 * src/main.c (main): Initialize/free struniqs.
2086 * src/parse-gram.y (%union): Add astruniq member.
2087 (yyprint): Adjust.
2088 * src/scan-gram.l (<{tag}>): Return a struniq.
2089 Free the obstack bit that used to store it.
2090 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2091
2092 2002-11-11 Paul Eggert <eggert@twinsun.com>
2093
2094 Revamp to fix many (but not all) of the C- and M4-related quoting
2095 problems. Among other things, this fixes the Bison bug reported
2096 by Jan Hubicka when processing the Bash grammar; see:
2097 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2098
2099 Use new @ escapes consistently. Represent brackets with @{ and @}
2100 rather than @<:@ and @:>@, since this works a bit better with dumb
2101 editors like vi. Represent @ with @@, since @ is now consistently
2102 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2103 __ofile__, to avoid unexpected expansions. Similarly, use @output
2104 rather than #output.
2105
2106 * data/c.m4 (b4_copyright): Omit file name from comment, since
2107 the file name could contain "*/".
2108 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2109 be quoted. All uses changed.
2110
2111 * data/glr.c: Use new @ escapes consistently.
2112 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2113 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2114 Remove, since they couldn't handle arbitrary characters in file
2115 names.
2116 * data/lalr1.cc: Likewise.
2117 * data/yacc.c: Likewise.
2118
2119 * src/files.c (output_infix): Remove; all uses removed.
2120 * src/files.h: Likewise.
2121
2122 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2123 mishandled funny characters in file names, and anyway it isn't
2124 needed any more.
2125 * data/yacc.c: Likewise.
2126 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2127
2128 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2129 * data/yacc.c: Likewise.
2130
2131 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2132 strings now.
2133 (muscle_init): Quote filename as a C string.
2134 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2135 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2136 * src/output.c (escaped_file_name_output): New function.
2137 (prepare_symbols): Quote tokens for M4.
2138 (prepare): Don't insert output_infix, output_prefix,
2139 output_parser_name, output_header_name; this is now down by scan-skel.
2140 Insert skeleton as a C string.
2141
2142 * src/output.c (user_actions_output, symbol_destructors_output,
2143 symbol_printers_output): Quote filenames for C and M4.
2144 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2145
2146 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2147 escapes other than \\ and \'; this simplifies the code.
2148 (<SC_STRING>): Likewise, for \\ and \".
2149 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2150 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2151 Use new escapes @{ and @} for [ and ].
2152
2153 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2154 them with auto vars.
2155 Switch to new escape scheme, where @ is the escape character uniformly.
2156 Abort if a stray escape character is found. Avoid unbounded input
2157 buffer when parsing non-escaped text.
2158
2159 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2160 __oline__, #output, $@, and @{ do not have unintended meanings.
2161
2162 2002-11-09 Paul Eggert <eggert@twinsun.com>
2163
2164 Fix the test failure due to GCC warnings described in
2165 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2166 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2167 evaluate to 0 if it's impossible for NINF to be in the respective
2168 table.
2169 (yygetLRActions, yyrecoverParseError): Use them.
2170
2171 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2172 counted in the token inserted at end of file. Now takes
2173 location_t *, not location_t, so that the location can be
2174 adjusted. All uses changed.
2175
2176 * tests/regression.at (Invalid inputs): Adjust wording in
2177 diagnostic to match the new behavior.
2178
2179 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2180 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2181 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2182 abort ();'. This reduces the runtime of the "Many lookaheads"
2183 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2184 GCC 3.2.
2185
2186 2002-11-07 Paul Eggert <eggert@twinsun.com>
2187
2188 * src/parse-gram.y (CHARACTER): Remove unused token.
2189 All uses removed.
2190
2191 * src/scan-gram.l: Remove stack option. We no longer use the
2192 stack, since the stack was never deeper than 1; instead, use the
2193 new auto var c_context to record the stacked value.
2194
2195 Remove nounput option. At an unexpected end of file, we now unput
2196 the minimal input necessary to end cleanly; this simplifies the
2197 code.
2198
2199 Avoid unbounded token sizes where this is easy.
2200
2201 (unexpected_end_of_file): New function.
2202 Use it to systematize the error message on unexpected EOF.
2203 (last-string): Now auto, not static.
2204 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2205 (scanner_last_string_free): Remove; not used.
2206 (percent_percent_count): Move decl to just before use.
2207 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2208 not the (never otherwised-used) CHARACTER.
2209
2210 2002-11-07 Akim Demaille <akim@epita.fr>
2211
2212 Let yyerror always receive the msg as last argument, so that
2213 yyerror can be variadic.
2214
2215 * data/yacc.c (b4_yyerror_args): New.
2216 Use it when calling yyerror.
2217 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2218 Use it when calling yyerror.
2219 * doc/bison.texinfo (Error Reporting): Adjust.
2220 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2221 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2222
2223 2002-11-06 Akim Demaille <akim@epita.fr>
2224
2225 #line should have quoted strings.
2226 Ideally, this should be done by m4_quotearg.
2227
2228 * src/scan-skel.l: Include quotearg.h.
2229 Quote __ofile__.
2230 * src/output.c (symbol_printers_output)
2231 (symbol_destructors_output): Quote the file name.
2232
2233 2002-11-06 Akim Demaille <akim@epita.fr>
2234
2235 * tests/regression.at (Invalid inputs): Adjust to the recent
2236 messages.
2237
2238 2002-11-06 Akim Demaille <akim@epita.fr>
2239
2240 Restore --no-lines.
2241 Reported by Jim Kent.
2242
2243 * data/c.m4 (b4_syncline): New.
2244 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2245 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2246 * src/output.c (user_actions_output): Likewise.
2247 (prepare): Define 'b4_synclines_flag'.
2248 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2249
2250 2002-11-06 Akim Demaille <akim@epita.fr>
2251
2252 * src/main.c (main): Free `infile'.
2253 * src/scan-gram.l (handle_syncline): New.
2254 Recognize `#line'.
2255 * src/output.c (user_actions_output, symbol_destructors_output)
2256 (symbol_printers_output): Use the location's file name, not
2257 infile.
2258 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2259
2260 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2261
2262 * src/tables.c (matching_state): Don't allow states to match if
2263 either has GLR conflict entries.
2264
2265 2002-11-05 Paul Eggert <eggert@twinsun.com>
2266
2267 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2268 "integer out of range" rather than "invalid value".
2269 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2270 accordingly.
2271
2272 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2273 Also, remove one static variable in the scanner.
2274
2275 * src/scan-gram.l (braces_level): Now auto, not static.
2276 Initialize to zero if the compiler is being picky.
2277 (INITIAL): Clear braces_level instead of incrementing it.
2278 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2279 as POSIX 1003.1-2001 requires.
2280 * src/system.h (IF_LINT): New macro, taken from coreutils.
2281 * configure.ac: Define "lint" if --enable-gcc-warnings.
2282
2283 2002-11-05 Akim Demaille <akim@epita.fr>
2284
2285 * src/scan-gram.l: When it starts with `%', complain about the
2286 whole directive, not just that `invalid character: %'.
2287
2288 2002-11-04 Akim Demaille <akim@epita.fr>
2289
2290 * Makefile.maint: Update from Autoconf.
2291 (update, cvs-update, po-update, do-po-update): New.
2292
2293 2002-11-04 Akim Demaille <akim@epita.fr>
2294
2295 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2296 and yyerror.
2297 Have yyerror `use' its arguments.
2298 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2299 returns true when location & yacc & pure & parse-param.
2300 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2301
2302 2002-11-04 Akim Demaille <akim@epita.fr>
2303
2304 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2305 clashes.
2306 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2307 font-lock-mode.
2308 Use complain_at.
2309 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2310 slot 0.
2311
2312 2002-11-03 Paul Eggert <eggert@twinsun.com>
2313
2314 * src/reader.c (get_merge_function, grammar_current_rule_check):
2315 Use consistent diagnostics for reporting type name clashes.
2316 Quote the types with <>, for consistency with Yacc.
2317 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2318
2319 2002-11-03 Akim Demaille <akim@epita.fr>
2320
2321 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2322 New.
2323 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2324 (b4_parse_param): Remove.
2325 Use b4_identification.
2326 Propagate b4_pure_args where needed to pass them to yyerror.
2327 * data/glr.m4 (b4_parse_param): Remove.
2328 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2329 (b4_lpure_formals): New.
2330 Use b4_identification.
2331 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2332 b4_user_formals and b4_user_args.
2333 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2334 (yyreportAmbiguity): When using a pure parser, also need
2335 the location, and the parse-params.
2336 Adjust callers.
2337 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2338 When using a pure parser, also need the parse-params.
2339 Adjust callers.
2340 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2341 (%pure-parser + %parse-param) LALR and GLR parsers.
2342 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2343 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2344 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2345 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2346 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2347 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2348 * doc/bison.texinfo: Untabify the whole file.
2349 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2350 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2351 (Error Reporting): Adjust to these new directives.
2352 Document %error-verbose, deprecate YYERROR_VERBOSE.
2353
2354 2002-11-03 Akim Demaille <akim@epita.fr>
2355
2356 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2357 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2358 command line options.
2359 * tests/cxx-type.at: Formatting changes.
2360
2361 2002-11-03 Paul Eggert <eggert@twinsun.com>
2362
2363 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2364 to count columns correctly, and to check for invalid inputs.
2365
2366 Use mbsnwidth to count columns correctly. Account for tabs, too.
2367 Include mbswidth.h.
2368 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2369 (extend_location): New function.
2370 (YY_LINES): Remove.
2371
2372 Handle CRLF in C code rather than in Lex code.
2373 (YY_INPUT): New macro.
2374 (no_cr_read): New function.
2375
2376 Scan UCNs, even though we don't fully handle them yet.
2377 (convert_ucn_to_byte): New function.
2378
2379 Handle backslash-newline correctly in C code.
2380 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2381 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2382 all uses changed.
2383 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2384 Use {splice} wherever C allows backslash-newline.
2385 YY_STEP after space, newline, vertical-tab.
2386 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2387
2388 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2389
2390 ({int}, handle_action_dollar, handle_action_at): Check for integer
2391 overflow.
2392
2393 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2394
2395 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2396 as well as \000. Check for UCHAR_MAX, not 255.
2397 Allow \x with an arbitrary positive number of digits, as in C.
2398 Check for overflow here.
2399 Allow \? and UCNs, for compatibility with C.
2400
2401 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2402 with quote slot used by complain_at.
2403
2404 * tests/input.at: Add tests for backslash-newline, m4 quotes
2405 in symbols, long literals, and funny escapes in strings.
2406
2407 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2408 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2409 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2410 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2411 * m4/mbswidth.m4: New file, from GNU coreutils.
2412
2413 * doc/bison.texinfo (Grammar Outline): Document // comments.
2414 (Symbols): Document that trigraphs have no special meaning in Bison,
2415 nor is backslash-newline allowed.
2416 (Actions): Document that trigraphs have no special meaning.
2417
2418 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2419 no longer used.
2420
2421 2002-11-02 Paul Eggert <eggert@twinsun.com>
2422
2423 * src/reader.c: Don't include quote.h; not needed.
2424 (get_merge_function): Reword warning to be consistent with
2425 type clash diagnostic in grammar_current_rule_check.
2426
2427 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2428 bug in trigraph handling.
2429
2430 * src/output.c (prepare_symbols): When printing token names,
2431 escape "[" as "@<:@" and likewise for "]".
2432
2433 * src/system.h (errno): Remove declaration, as we are now
2434 assuming C89 or better, and C89 guarantees errno.
2435
2436 2002-10-30 Paul Eggert <eggert@twinsun.com>
2437
2438 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2439 Check for close failures.
2440 * src/files.h (xfclose): Return void, not int, since it always
2441 returned zero.
2442 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2443 indicates one.
2444 * src/output.c (output_skeleton): Use xfclose rather than fclose
2445 and ferror. xfclose now checks ferror.
2446
2447 * data/glr.c (YYLEFTMOST_STATE): Remove.
2448 (yyreportTree): Use a stack-based leftmost state. This avoids
2449 our continuing battles with bogus warnings about initializers.
2450
2451 2002-10-30 Akim Demaille <akim@epita.fr>
2452
2453 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2454 #if.
2455
2456 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2457
2458 * tests/glr-regr1.at: New test for reported regressions.
2459 * tests/testsuite.at: Add glr-regr1.at test.
2460 * tests/Makefile.am: Add glr-regr1.at test.
2461
2462 2002-10-24 Paul Eggert <eggert@twinsun.com>
2463
2464 Version 1.75a.
2465
2466 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2467 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2468 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2469 Don't assume strdup exists; POSIX says its an XSI extension.
2470 Check for buffer overflow on input.
2471
2472 2002-10-24 Akim Demaille <akim@epita.fr>
2473
2474 * src/output.c (output_skeleton): Don't disable M4sugar comments
2475 too soon: it results in comments being expanded.
2476 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2477 first output.
2478
2479 2002-10-24 Akim Demaille <akim@epita.fr>
2480
2481 * data/yacc.c (m4_int_type): New.
2482 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2483 char' as only yacc.c wants K&R portability.
2484 * data/glr.c (yysigned_char): Remove.
2485 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2486 Reported by Quoc Peyrot.
2487
2488 2002-10-23 Paul Eggert <eggert@twinsun.com>
2489
2490 * src/main.c (main): With --trace=time, report times even if a
2491 non-fatal error occurs. Formerly, the times were reported in some
2492 such cases but not in others.
2493 * src/reader.c (reader): Just return if a complaint has been issued,
2494 instead of exiting, so that 'main' can report times.
2495
2496 2002-10-22 Akim Demaille <akim@epita.fr>
2497
2498 * src/system.h: Include sys/types.
2499 Reported by Bert Deknuydt.
2500
2501 2002-10-23 Paul Eggert <eggert@twinsun.com>
2502
2503 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2504 Suggested by Art Haas.
2505
2506 2002-10-22 Paul Eggert <eggert@twinsun.com>
2507
2508 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2509 decl; not needed any more.
2510 * src/main.c (main): Use return to exit, undoing yesterday's change.
2511 The last OS that we could find where this wouldn't work is
2512 SunOS 3.5, and that's too old to worry about now.
2513
2514 * data/glr.c (struct yyltype): Define members even when not
2515 doing locations. This is more consistent with yacc.c, and it
2516 works around the following bug reports:
2517 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2518 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
2519
2520 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2521 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2522 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2523
2524 2002-10-22 Akim Demaille <akim@epita.fr>
2525
2526 * data/README: New.
2527
2528 2002-10-21 Paul Eggert <eggert@twinsun.com>
2529
2530 Be consistent about 'bool'; the old code used an enum in one
2531 module and an int in another, and this violates the C standard.
2532 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2533 * configure.ac (AC_HEADER_STDBOOL): Add.
2534 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2535 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2536 * src/symtab.c (hash_compare_symbol_t): Likewise.
2537 * src/system.h (bool, false, true): Use a definition consistent
2538 with ../lib/hash.c. All uses changed.
2539
2540 * src/complain.c (warning_issued): Renamed from warn_message_count,
2541 so that we needn't worry about integer overflow (!).
2542 Now of type bool. All uses changed.
2543 (complaint_issued): Renamed from complain_message_count; likewise.
2544
2545 * src/main.c (main): Use exit to exit with failure.
2546
2547 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2548 rather than 1 and 0.
2549 * src/main.c (main): Likewise.
2550 * src/getargs.c (getargs): Likewise.
2551 * src/reader.c (reader): Likewise.
2552
2553 * src/getarg.c (getargs): Remove duplicate code for
2554 "Try `bison --help'".
2555
2556 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2557 What was that "2" for?
2558
2559 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2560 * src/getargs.c (usage): Likewise.
2561
2562 * src/getargs.c (getargs): When there are too few operands, report
2563 the last one. When there are too many, report the first extra
2564 one. This is how diffutils does it.
2565
2566 2002-10-20 Paul Eggert <eggert@twinsun.com>
2567
2568 Remove K&R vestiges.
2569 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2570 * src/complain.c (VA_START): Remove. Assume prototypes.
2571 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2572 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2573 fatal): Assume prototypes.
2574 * src/complain.h: Assume prototypes.
2575 * src/system.h (PARAMS): Remove.
2576 Include <limits.h> unconditionally, since it's guaranteeed even
2577 for a freestanding C89 compiler.
2578 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2579 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2580
2581 2002-10-20 Akim Demaille <akim@epita.fr>
2582
2583 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2584 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2585 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2586 (yyresolveStates, yyresolveAction, yyresolveStack)
2587 (yyprocessOneStack): Use them.
2588 (yy_reduce_print): New.
2589 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2590
2591 2002-10-20 Akim Demaille <akim@epita.fr>
2592
2593 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2594 arguments and output `void'.
2595 (b4_c_function): Rename as...
2596 (b4_c_function_def): this.
2597 (b4_c_function_decl, b4_c_ansi_function_def)
2598 (b4_c_ansi_function_decl): New.
2599 Change the interpretation of the arguments: before `int, foo', now
2600 `int foo, foo'.
2601 * data/yacc.c (yyparse): Prototype and define thanks to these.
2602 Adjust b4_c_function_def uses.
2603 * data/glr.c (yyparse): Likewise, but ANSI only.
2604
2605 2002-10-20 Akim Demaille <akim@epita.fr>
2606
2607 * src/output.c (prepare): Move the definition of `tokens_number',
2608 `nterms_number', `undef_token_number', `user_token_number_max'
2609 to...
2610 (prepare_tokens): Here.
2611 (prepare_tokens): Rename as...
2612 (prepare_symbols): this.
2613 (prepare): Move the definition of `rules_number' to...
2614 (prepare_rules): here.
2615 (prepare): Move the definition of `last', `final_state_number',
2616 `states_number' to...
2617 (prepare_states): here.
2618 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2619
2620 2002-10-20 Akim Demaille <akim@epita.fr>
2621
2622 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2623
2624 2002-10-20 Akim Demaille <akim@epita.fr>
2625
2626 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2627 * data/c.m4: here.
2628
2629 2002-10-20 Akim Demaille <akim@epita.fr>
2630
2631 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2632 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2633 `pair'.
2634 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2635 `name' to...
2636 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2637 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2638 These.
2639
2640 2002-10-19 Paul Eggert <eggert@twinsun.com>
2641
2642 Do not create a temporary file, as that involves security and
2643 cleanup headaches. Instead, use a pair of pipes.
2644 Derived from a suggestion by Florian Krohm.
2645 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2646 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2647 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2648 (BISON_PREREQ_SUBPIPE): Add.
2649 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2650 Add subpipe.h, subpipe.c.
2651 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2652 * po/POTFILES.in: Add lib/subpipe.c.
2653 * src/output.c: Include "subpipe.h".
2654 (m4_invoke): Remove decl.
2655 (scan_skel): New decl.
2656 (output_skeleton): Use pipe rather than temporary file for m4 input.
2657 Check that m4sugar.m4 is readable, to avoid deadlock.
2658 Check for pipe I/O error.
2659 * src/scan-skel.l (readpipe): Remove decl.
2660 (scan_skel): New function, to be used in place of m4_invoke.
2661 Read from stream rather than file.
2662
2663 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2664 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2665 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2666 this generates a more-accurate value anyway.
2667
2668 * lib/timevar.c (timervar_accumulate): Rename locals to
2669 avoid confusion with similarly-named more-global.
2670 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2671
2672 * src/output.c (prepare): Use xstrdup to convert char const *
2673 to char *, to avoid GCC warning.
2674
2675 2002-10-19 Akim Demaille <akim@epita.fr>
2676
2677 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2678 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2679 Use them to have `calc.y' ready for %pure-parser.
2680 * data/yacc.c (YYLEX): Pass a yylex return type to
2681 b4_c_function_call.
2682
2683 2002-10-19 Akim Demaille <akim@epita.fr>
2684
2685 Prototype support of %lex-param and %parse-param.
2686
2687 * src/parse-gram.y: Add the definition of the %lex-param and
2688 %parse-param tokens, plus their rules.
2689 Drop the `_' version of %glr-parser.
2690 Add the "," token.
2691 * src/scan-gram.l (INITIAL): Scan them.
2692 * src/muscle_tab.c: Comment changes.
2693 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2694 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2695 (muscle_entry_s): The `value' member is no longer const.
2696 Adjust all dependencies.
2697 * src/muscle_tab.c (muscle_init): Adjust: use
2698 MUSCLE_INSERT_STRING.
2699 Initialize the obstack earlier.
2700 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2701 (muscle_pair_list_grow): New.
2702 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2703 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2704 * tests/calc.at: Use %locations, not --locations.
2705 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2706
2707 2002-10-19 Akim Demaille <akim@epita.fr>
2708
2709 * src/getargs.c (usage): Take status as argument and exit
2710 accordingly.
2711 Report the traditional `Try ... --help' message when status != 0.
2712 (usage, version): Don't take a FILE * as arg, it is pointless.
2713 (getargs): When there is an incorrect number of arguments, make it
2714 an error, and report it GNUlically thanks to `usage ()'.
2715
2716 2002-10-18 Paul Eggert <eggert@twinsun.com>
2717
2718 * data/glr.c (yyreportParseError): Don't assume that sprintf
2719 yields the length of the printed string, as this is not true
2720 on SunOS 4.1.4. Reported by Peter Klein.
2721
2722 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2723 * tests/conflicts.at (%nonassoc and eof): Likewise.
2724 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2725
2726 2002-10-17 Akim Demaille <akim@epita.fr>
2727
2728 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2729 * src/getargs.c (trace_types, trace_args): Adjust.
2730 * src/reader.c (grammar_current_rule_prec_set)
2731 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2732 Standardize error messages.
2733 And s/@prec/%prec/!
2734 (reader): Use trace_flag to enable scanner/parser debugging,
2735 instead of an adhoc scheme.
2736 * src/scan-gram.l: Remove trailing debugging code.
2737
2738 2002-10-16 Paul Eggert <eggert@twinsun.com>
2739
2740 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2741 MUSCLE_TAB_H.
2742
2743 * NEWS: Officially drop support for building Bison with K&R C,
2744 since it didn't work anyway and it's not worth worrying about.
2745 * Makefile.maint (wget_files): Remove ansi2knr.c.
2746 (ansi2knr.c-url_prefix): Remove.
2747 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2748 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2749 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2750
2751 2002-10-15 Paul Eggert <eggert@twinsun.com>
2752
2753 Stop using the "enum_" trick for K&R-style function definitions;
2754 it confused me, and I was the author! Instead, assume that people
2755 who want to use K&R C compilers (when using these modules in GCC,
2756 perhaps?) will run ansi2knr.
2757
2758 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2759 All uses of "enum_" changed to "enum ".
2760 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2761 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2762
2763 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2764 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2765 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2766 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2767 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2768 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2769 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2770 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2771 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2772 Use function prototypes; this removes the need for declaring
2773 static functions simply to provide their prototypes.
2774 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2775 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2776 bitset_count_, bitset_create, bitset_dump, bitset_first,
2777 bitset_free, bitset_init, bitset_last, bitset_next,
2778 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2779 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2780 bitset_print, bitset_release_memory, bitset_toggle_,
2781 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2782 debug_bitset): Likewise.
2783 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2784 * lib/bitset_stats.c (bitset_log_histogram_print,
2785 bitset_percent_histogram_print, bitset_stats_and,
2786 bitset_stats_and_cmp, bitset_stats_and_or,
2787 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2788 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2789 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2790 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2791 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2792 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2793 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2794 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2795 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2796 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2797 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2798 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2799 bitset_stats_zero): Likewise.
2800 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2801 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2802 bitsetv_dump, debug_bitsetv): Likewise.
2803 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2804 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2805 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2806 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2807 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2808 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2809 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2810 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2811 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2812 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2813 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2814 Likewise.
2815 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2816 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2817 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2818 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2819 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2820 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2821 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2822 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2823 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2824 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2825 lbitset_xor_cmp, lbitset_zero): Likewise.
2826
2827 2002-10-14 Akim Demaille <akim@epita.fr>
2828
2829 Version 1.75.
2830
2831 2002-10-14 Akim Demaille <akim@epita.fr>
2832
2833 * tests/Makefile.am (maintainer-check-posix): New.
2834
2835 2002-10-14 Akim Demaille <akim@epita.fr>
2836
2837 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2838 member.
2839
2840 2002-10-14 Akim Demaille <akim@epita.fr>
2841
2842 * src/tables.c (table_ninf_remap): base -> tab.
2843 Reported by Matt Rosing.
2844
2845 2002-10-14 Paul Eggert <eggert@twinsun.com>
2846
2847 * tests/action.at, tests/calc.at, tests/conflicts.at,
2848 tests/cxx-type.at, tests/headers.at, tests/input.at,
2849 tests/regression.at, tests/synclines.at, tests/torture.at:
2850 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2851 so that the tests still work even if POSIXLY_CORRECT is set.
2852 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2853
2854 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2855 for portability to K&R hosts. Fix typo: signed char is guaranteed
2856 only to 127, not to 128.
2857 * data/glr.c (yysigned_char): New type.
2858 * data/yacc.c (yysigned_char): Likewise.
2859 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2860
2861 2002-10-13 Paul Eggert <eggert@twinsun.com>
2862
2863 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2864 true due to limited range of data type" warning from GCC.
2865
2866 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2867 by wrapping enum yytokentype's definition inside #ifndef
2868 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2869
2870 2002-10-13 Akim Demaille <akim@epita.fr>
2871
2872 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2873 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2874
2875 2002-10-13 Akim Demaille <akim@epita.fr>
2876
2877 * Makefile.maint: Update from Autoconf 2.54.
2878 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2879
2880 2002-10-13 Akim Demaille <akim@epita.fr>
2881
2882 * src/print.c (print_state): Separate the list of solved conflicts
2883 from the other items.
2884 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2885
2886 2002-10-13 Akim Demaille <akim@epita.fr>
2887
2888 Let nondeterministic skeletons be usable with deterministic
2889 tables.
2890
2891 With the patch, GAWK compiled by GCC without -O2 passes its test
2892 suite using a GLR parser driven by LALR tables. It fails with -O2
2893 because `struct stat' gives two different answers on my machine:
2894 88 (definition of an auto var) and later 96 (memset on this var).
2895 Hence the stack is badly corrumpted. The headers inclusion is to
2896 blame: if I move the awk.h inclusion before GLR's system header
2897 inclusion, the two struct stat have the same size.
2898
2899 * src/tables.c (pack_table): Always create conflict_table.
2900 (token_actions): Always create conflict_list.
2901 * data/glr.c (YYFLAG): Remove, unused.
2902
2903 2002-10-13 Akim Demaille <akim@epita.fr>
2904
2905 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2906 (O0FLAGS): New.
2907 (VALGRIND, GXX): New.
2908 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2909 * tests/bison.in: Run $PREBISON a pre-command.
2910 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2911 (maintainer-check-g++): New.
2912 * Makefile.am (maintainer-check): New.
2913
2914 2002-10-13 Akim Demaille <akim@epita.fr>
2915
2916 * data/glr.c: Formatting changes.
2917 Tweak some trace messages to match yacc.c's.
2918
2919 2002-10-13 Akim Demaille <akim@epita.fr>
2920
2921 GLR parsers sometimes raise parse errors instead of performing the
2922 default reduction.
2923 Reported by Charles-Henry de Boysson.
2924
2925 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2926 check the length of the traces when %glr.
2927 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2928 GLR's traces.
2929 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2930 Test GLR parsers.
2931 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2932 (yyltype): Remove the yy prefix from the member names.
2933 (yytable): Complete its comment.
2934 (yygetLRActions): Map error action number from YYTABLE from
2935 YYTABLE_NINF to 0.
2936 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2937 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2938 not satisfying as we could compare an YYACTION computed from
2939 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2940 only value for error actions.
2941 (yyreportParseError): In verbose parse error messages, don't issue
2942 `error' in the list of expected tokens.
2943 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2944 next action to perform to match glr.c's decoding.
2945 (yytable): Complete its comment.
2946
2947 2002-10-13 Paul Eggert <eggert@twinsun.com>
2948
2949 Fix problem reported by Henrik Grubbstroem in
2950 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2951 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2952 because the Bison parser reads the second action before reducing
2953 the first one.
2954 * src/scan-gram.l (rule_length): New static var.
2955 Use it to keep track of the rule length in the scanner, since
2956 we can't expect the parser to be in lock-step sync with the scanner.
2957 (handle_action_dollar, handle_action_at): Use this var.
2958 * tests/actions.at (Exotic Dollars): Test for the problem.
2959
2960 2002-10-12 Paul Eggert <eggert@twinsun.com>
2961
2962 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2963 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2964 Include <sys/time.h> when checking for clock_t and struct tms.
2965 Use same include order as source.
2966 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2967 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2968
2969 * lib/timevar.c: Update copyright date and clarify comments.
2970 (get_time) [IN_GCC]: Keep the GCC version for reference.
2971
2972 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2973 GCC version as of today, then merge Bison's changes.
2974 Change "GCC" to "Bison" in copyright notice. timevar.def's
2975 author is Akim, so change that too.
2976
2977 * src/reader.c (grammar_current_rule_check):
2978 Don't worry about the default action if $$ is untyped.
2979 Prevents bogus warnings reported by Jim Gifford in
2980 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2981
2982 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2983 * data/glr.c, data/lalr1.cc, data/yacc.c:
2984 Output token definitions before the first part of user declarations.
2985 Fixes compatibility problem reported by Jim Gifford for kbd in
2986 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2987
2988 2002-10-11 Paul Eggert <eggert@twinsun.com>
2989
2990 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2991 (yyparse): here. This undoes some of the 2002-07-25 change.
2992 Compatibility problem reported by Ralf S. Engelschall with
2993 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2994
2995 2002-10-11 Akim Demaille <akim@epita.fr>
2996
2997 * tests/regression.at Characters Escapes): New.
2998 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2999 characters.
3000 Reported by Jan Nieuwenhuizen.
3001
3002 2002-10-11 Akim Demaille <akim@epita.fr>
3003
3004 * po/id.po: New.
3005
3006 2002-10-10 Paul Eggert <eggert@twinsun.com>
3007
3008 Portability fixes for bitsets; this also avoids several GCC
3009 warnings.
3010
3011 * lib/abitset.c: Include <stddef.h>, for offsetof.
3012 * lib/lbitset.c: Likewise.
3013
3014 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3015 properly for vectors of objects. Do not assume that adding a
3016 header size to a multiple of a word size yields a value that is
3017 properly aligned for the whole union.
3018 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3019
3020 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3021 unique names for structures.
3022 * lib/ebitset.c (ebitset_bytes): Likewise.
3023 * lib/lbitset.c (lbitset_bytes): Likewise.
3024
3025 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3026 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3027 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3028 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3029 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3030 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3031 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3032 to improve the type-checking that GCC can do.
3033 * lib/bitset.c (bitset_op4_cmp): Likewise.
3034 * lib/bitset_stats.c (bitset_stats_count,
3035 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3036 bitset_stats_copy, bitset_stats_disjoint_p,
3037 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3038 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3039 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3040 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3041 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3042 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3043 bitset_stats_or_and_cmp): Likewise.
3044 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3045 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3046 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3047 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3048
3049 * lib/abitset.h: Include bitset.h, not bbitset.h.
3050 * lib/ebitset.h: Likewise.
3051 * lib/lbitset.h: Likewise.
3052
3053 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3054 All instances of parameters of type enum bitset_opts are now of
3055 type enum_bitset_opts, to conform to the C Standard, and similarly
3056 for enum_bitset_type.
3057 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3058 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3059
3060 Do not use "struct bitset_struct" to mean different things in
3061 different modules. Not only is this confusing, it violates
3062 the C Standard, which requires that structure types in different
3063 modules must be compatible if one is to be passed to the other.
3064 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3065 All instances of "struct bitset_struct *" replaced with "bitset".
3066 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3067 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3068 struct lbitset_struct, struct bitset_stats_struct): New types.
3069 All uses of struct bitset_struct changed to union bitset_union,
3070 etc.
3071 * lib/abitset.c (struct abitset_struct, abitset,
3072 struct bitset_struct): Remove.
3073 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3074 struct bitset_struct): Remove.
3075 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3076 bitset_struct): Remove.
3077 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3078 Likewise.
3079
3080 Do not call a function of type T using a call that assumes the
3081 function is of a different type U. Standard C requires that a
3082 function must be called with a type that is compatible with its
3083 definition.
3084 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3085 New decls.
3086 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3087 New functions.
3088 * lib/ebitset.c (PFV): Remove.
3089 * lib/lbitset.c (PFV): Likewise.
3090 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3091 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3092 decls.
3093 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3094 (ebitset_vtable): Use them.
3095 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3096 lbitset_xor): New functions.
3097 (lbitset_vtable): Use them.
3098
3099 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3100 Declare.
3101
3102 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3103 GCC warning.
3104 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3105 Use offsetof, for simplicity.
3106
3107 2002-10-06 Paul Eggert <eggert@twinsun.com>
3108
3109 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3110 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3111 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3112 which was inadvertently undone by the 2002-09-30 patch.
3113 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3114 the same width as int.
3115
3116 2002-10-04 Paul Eggert <eggert@twinsun.com>
3117
3118 Version 1.50.
3119
3120 * configure.ac (AC_INIT), NEWS: Increment version number.
3121
3122 * doc/bison.texinfo: Minor spelling, grammar, and white space
3123 fixes.
3124 (Symbols): Mention that any negative value returned from yylex
3125 signifies end-of-input. Warn about negative chars. Mention
3126 the portable Standard C character set.
3127
3128 The GNU coding standard says CFLAGS and YFLAGS are reserved
3129 for the installer to set.
3130 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3131 * src/Makefile.am (AM_CFLAGS): Likewise.
3132 (AM_YFLAGS): Renamed from YFLAGS.
3133
3134 Fix some MAX and MIN problems.
3135 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3136 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3137 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3138 * src/reader.c (reader): Use it.
3139
3140 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3141 POSIX 1003.1-2001 has removed fgrep.
3142
3143 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3144
3145 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3146 interpreted as signed.
3147 * lib/ebitset.c (ebitset_list): Fix bug.
3148
3149 2002-10-01 Paul Eggert <eggert@twinsun.com>
3150
3151 More fixes for 64-bit hosts and large bitsets.
3152
3153 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3154 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3155 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3156 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3157 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3158 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3159 bitset_count_): Likewise.
3160 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3161 bitset_first, bitset_last): Likewise.
3162 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3163 bitset_stats_list_reverse, bitset_stats_size,
3164 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3165 Likewise.
3166 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3167 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3168 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3169 bitsetv_reflexive_transitive_closure): Likewise.
3170 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3171 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3172 Likewise.
3173 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3174 Likewise.
3175
3176 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3177 Use size_t, not unsigned int, to count bytes.
3178 * lib/abitset.h (abitset_bytes): Likewise.
3179 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3180 Likewise.
3181 * lib/bitset.h (bitset_bytes): Likewise.
3182 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3183 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3184 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3185 * lib/ebitset.c (ebitset_bytes): Likewise.
3186 * lib/ebitset.h (ebitset_bytes): Likewise.
3187 * lib/lbitset.c (lbitset_bytes): Likewise.
3188 * lib/lbitset.h (lbitset_bytes): Likewise.
3189
3190 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3191 abitset_subset_p, abitset_disjoint_p, abitset_and,
3192 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3193 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3194 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3195 abitset_or_and, abitset_or_and_cmp):
3196 Use bitset_windex instead of unsigned int.
3197 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3198 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3199 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3200 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3201 Likewise.
3202 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3203
3204 * lib/bitset.c (bitset_print):
3205 Use proper printf formats for widths of integer types.
3206 * lib/bitset_stats.c (bitset_percent_histogram_print,
3207 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3208 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3209 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3210 * lib/lbitset.c (lbitset_bytes): Likewise.
3211
3212 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3213 BITSET_SIZE_MAX): New macros.
3214 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3215 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3216 to BITSET_WINDEX_MAX.
3217
3218 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3219 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3220 since we now return the bitset_bindex type (not int).
3221
3222 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3223 when computing sizes.
3224 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3225
3226 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3227 and avoid cast to unsigned.
3228
3229 2002-09-30 Akim Demaille <akim@epita.fr>
3230
3231 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3232 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3233 Updates from Michael Hayes.
3234
3235 2002-09-30 Art Haas <ahaas@neosoft.com>
3236
3237 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3238 invocations.
3239 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3240 defined.
3241
3242 2002-09-27 Akim Demaille <akim@epita.fr>
3243
3244 Version 1.49c.
3245
3246 2002-09-27 Akim Demaille <akim@epita.fr>
3247
3248 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3249 (Because of AC_LIBSOURCE).
3250
3251 2002-09-27 Akim Demaille <akim@epita.fr>
3252
3253 Playing with Autoscan.
3254
3255 * configure.ac: Remove the old LIBOBJ tweaks.
3256 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3257 * lib/strrchr.c: New.
3258 * lib/strtol.c: New, from the Coreutils 4.5.1.
3259
3260 2002-09-27 Akim Demaille <akim@epita.fr>
3261
3262 Playing with Autoscan.
3263
3264 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3265 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3266 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3267 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3268 Coreutils 4.5.1.
3269
3270 2002-09-24 Akim Demaille <akim@epita.fr>
3271
3272 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3273 (Frequently Asked Questions, Parser Stack Overflow): New.
3274
3275 2002-09-13 Akim Demaille <akim@epita.fr>
3276
3277 Playing with autoscan.
3278
3279 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3280 * src/files.c (skeleton_find): Remove, unused.
3281 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3282 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3283
3284 2002-09-13 Akim Demaille <akim@epita.fr>
3285
3286 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3287 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3288
3289 2002-09-13 Akim Demaille <akim@epita.fr>
3290
3291 * configure.ac: Require 2.54.
3292 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3293 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3294 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3295 Remove, provided by Autoconf macros.
3296
3297 2002-09-12 Akim Demaille <akim@epita.fr>
3298
3299 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3300
3301 2002-09-12 Akim Demaille <akim@epita.fr>
3302
3303 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3304 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3305 Reported by Martin Mokrejs.
3306
3307 2002-09-10 Akim Demaille <akim@epita.fr>
3308
3309 * src/parse-gram.y: Associate a human readable string to each
3310 token type.
3311 * tests/regression.at (Invalid inputs): Adjust.
3312
3313 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3314
3315 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3316 with an Autoconf-2.5x style configure.ac.
3317
3318 2002-09-06 Paul Eggert <eggert@twinsun.com>
3319
3320 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3321 exception applies only to yacc.c. This is a modification of a
3322 patch originally suggested by Akim Demaille.
3323
3324 2002-09-06 Akim Demaille <akim@epita.fr>
3325
3326 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3327 here to...
3328 * data/yacc.c: here.
3329
3330 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3331 LocationType.
3332 (b4_ltype): Default to yy::Location from location.hh.
3333
3334 2002-09-04 Jim Meyering <jim@meyering.net>
3335
3336 * data/yacc.c: Guard the declaration of yytoknum also with
3337 `#ifdef YYPRINT', so it is declared only when used.
3338
3339 2002-09-04 Akim Demaille <akim@epita.fr>
3340
3341 * configure.in: Rename as...
3342 * configure.ac: this.
3343 Bump to 1.49c.
3344
3345 2002-09-04 Akim Demaille <akim@epita.fr>
3346
3347 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3348 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3349 translate maintainer only messages.
3350
3351 2002-08-12 Paul Eggert <eggert@twinsun.com>
3352
3353 Version 1.49b.
3354
3355 * Makefile.am (SUBDIRS): Remove intl.
3356 (DISTCLEANFILES): Remove.
3357 * NEWS: Mention that GNU M4 is now required. Clarify what is
3358 meant by "larger grammars". Mention the pt_BR translation.
3359 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3360 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3361 Bump version from 0.11.2 to 0.11.5.
3362 (BISON_PREREQ_STAGE): Remove.
3363 (AM_GNU_GETTEXT): Use external gettext.
3364 (AC_OUTPUT): Remove intl/Makefile.
3365
3366 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3367
3368 * data/glr.c: Include string.h, for strlen.
3369 (yyreportParseError): Use size_t for yysize.
3370 (yy_yypstack): No longer nested inside yypstates, as nested
3371 functions are not portable. Do not assume size_t is the
3372 same width as int.
3373 (yypstates): Do not assume that ptrdiff_t is the same width
3374 as int, and similarly for yyposn and YYINDEX.
3375
3376 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3377
3378 * lib/Makefile.am (INCLUDES): Do not include from the intl
3379 directory, which has been removed.
3380 * src/Makefile.am (INCLUDES): Likewise.
3381
3382 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3383 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3384 New vars.
3385
3386 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3387 * tests/Makefile.am (EXTRA_DIST): Likewise.
3388
3389 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3390 Do not assume that bitset_windex is the same width as unsigned.
3391
3392 * lib/abitset.c (abitset_unused_clear): Do not assume that
3393 bitset_word is the same width as int.
3394 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3395 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3396 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3397 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3398 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3399
3400 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3401 portability to one's complement hosts!).
3402 * lib/ebitset.c (ebitset_op1): Likewise.
3403 * lib/lbitset.c (lbitset_op1): Likewise.
3404
3405 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3406 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3407 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3408 Sync with fileutils.
3409 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3410 lib/gettext.h: Sync with diffutils.
3411
3412 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3413 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3414
3415 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3416 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3417 check for void *.
3418
3419 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3420 size_t; the old version tried to do this but casted improperly.
3421 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3422 (bitset_test): Now returns int, not unsigned long.
3423
3424 * lib/bitset_stats.c: Include "gettext.h".
3425 (_): New macro.
3426 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3427 name locals "index", as it generates unnecessary warnings on some
3428 hosts that have an "index" function.
3429
3430 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3431 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3432 they need translation.
3433 * src/LR0.c (state_list_append, new_itemsets, get_state,
3434 append_states, generate_states): Likewise.
3435 * src/assoc.c (assoc_to_string): Likewise.
3436 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3437 * src/gram.c (grammar_dump): Likewise.
3438 * src/injections.c (injections_compute): Likewise.
3439 * src/lalr.c (lookaheads_print): Likewise.
3440 * src/relation.c (relation_transpose): Likewise.
3441 * src/scan-gram.l: Likewise.
3442 * src/tables.c (table_grow, pack_vector): Likewise.
3443
3444 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3445 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3446 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3447 * m4/mbstate_t.m4: Sync with fileutils.
3448 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3449
3450 * po/LINGUAS: Add pt_BR.
3451 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3452 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3453 lib/timevar.c.
3454 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3455 manual recommends.
3456 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3457
3458 * src/complain.c (strerror_r): Remove decl; not needed.
3459 (strerror): Use same pattern as ../lib/error.c.
3460
3461 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3462
3463 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3464
3465 * src/main.c (main): Cast result of bindtextdomain and textdomain
3466 to void, to avoid a GCC warning when --disable-nls is in effect.
3467
3468 * src/scan-gram.l: Use strings rather than escapes when possible,
3469 to minimize the number of warnings from xgettext.
3470 (handle_action_dollar, handle_action_at): Don't use isdigit,
3471 as it mishandles negative chars and it may not work as expected
3472 outside the C locale.
3473
3474 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3475 this is a GCC extension and is not portable to other compilers.
3476
3477 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3478 Do not include <ctype.h>; no longer needed.
3479 Do not include <malloc.h>; no longer needed (and generates
3480 warnings on OpenBSD 3.0).
3481
3482 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3483 it's not portable.
3484
3485 * tests/regression.at: Do not use 'cc -c input.c -o input';
3486 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3487
3488 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3489 exit status as failure, not just exit status 1. Sun C exits
3490 with status 2 sometimes.
3491
3492 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3493 Use it for the two large tests.
3494
3495 2002-08-02 Akim Demaille <akim@epita.fr>
3496
3497 * src/conflicts.c (conflicts_output): Don't output rules never
3498 reduced here, since anyway that computation doesn't work.
3499 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3500 (rule_useless_p, rule_never_reduced_p): New.
3501 (grammar_rules_partial_print): Use a filter instead of a range.
3502 Display the title only if needed.
3503 (grammar_rules_print): Adjust.
3504 (grammar_rules_never_reduced_report): New.
3505 * src/tables.c (action_row): Move the computation of rules never
3506 reduced to...
3507 (token_actions): here.
3508 * src/main.c (main): Make the parser before making the report, so
3509 that rules never reduced are computed.
3510 Call grammar_rules_never_reduced_report.
3511 * src/print.c (print_results): Report rules never reduced.
3512 * tests/conflicts.at, tests/reduce.at: Adjust.
3513
3514 2002-08-01 Akim Demaille <akim@epita.fr>
3515
3516 Instead of attaching lookaheads and duplicating the rules being
3517 reduced by a state, attach the lookaheads to the reductions.
3518
3519 * src/state.h (state_t): Remove the `lookaheads',
3520 `lookaheads_rule' member.
3521 (reductions_t): Add a `lookaheads' member.
3522 Use a regular array for the `rules'.
3523 * src/state.c (reductions_new): Initialize the lookaheads member
3524 to 0.
3525 (state_rule_lookaheads_print): Adjust.
3526 * src/state.h, src/state.c (state_reductions_find): New.
3527 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3528 (count_rr_conflicts): Adjust.
3529 * src/lalr.c (LArule): Remove.
3530 (add_lookback_edge): Adjust.
3531 (state_lookaheads_count): New.
3532 (states_lookaheads_initialize): Merge into...
3533 (initialize_LA): this.
3534 (lalr_free): Adjust.
3535 * src/main.c (main): Don't free nullable and derives too early: it
3536 is used by --verbose.
3537 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3538
3539 2002-08-01 Akim Demaille <akim@epita.fr>
3540
3541 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3542 `rule_number_t**'.
3543 (set_derives, free_derives): Rename as...
3544 (derives_compute, derives_free): this.
3545 Adjust all dependencies.
3546 * src/nullable.c (set_nullable, free_nullable): Rename as...
3547 (nullable_compute, nullable_free): these.
3548 (rule_list_t): Store rule_t *, not rule_number_t.
3549 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3550 pointers, instead of their numbers.
3551 * src/main.c (main): Call nullable_free, and derives_free earlier,
3552 as they were lo longer used.
3553
3554 2002-08-01 Akim Demaille <akim@epita.fr>
3555
3556 * lib/timevar.c (get_time): Include children time.
3557 * src/lalr.h (LA, LArule): Don't export them: used with the
3558 state_t.
3559 * src/lalr.c (LA, LArule): Static.
3560 * src/lalr.h, src/lalr.c (lalr_free): New.
3561 * src/main.c (main): Call it.
3562 * src/tables.c (pack_vector): Check whether loc is >= to the
3563 table_size, not >.
3564 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3565 (tables_generate): do it, since that's also it which allocates
3566 them.
3567 Don't free LA and LArule, main does.
3568
3569 2002-07-31 Akim Demaille <akim@epita.fr>
3570
3571 Separate parser tables computation and output.
3572
3573 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3574 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3575 (yydefgoto, yydefact, high): Move to...
3576 * src/tables.h, src/tables.c: here.
3577 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3578 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3579 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3580 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3581 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3582 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3583 (action_row, save_row, token_actions, save_column, default_goto)
3584 (goto_actions, sort_actions, matching_state, pack_vector)
3585 (table_ninf_remap, pack_table, prepare_actions): Move to...
3586 * src/tables.c: here.
3587 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3588 * src/output.c (token_actions, output_base, output_conflicts)
3589 (output_check): Merge into...
3590 (prepare_actions): this.
3591 (actions_output): Rename as...
3592 (user_actions_output): this.
3593 * src/main.c (main): Call tables_generate and tables_free.
3594
3595 2002-07-31 Akim Demaille <akim@epita.fr>
3596
3597 Steal GCC's --time-report support.
3598
3599 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3600 stolen/adjusted from GCC.
3601 * m4/stage.m4: Remove time related checks.
3602 * m4/timevar.m4: New.
3603 * configure.in: Adjust.
3604 * src/system.h: Adjust to using timevar.h.
3605 * src/getargs.h, src/getargs.c: Support trace_time for
3606 --trace=time.
3607 * src/main.c (stage): Remove.
3608 (main): Replace `stage' invocations with timevar calls.
3609 * src/output.c: Insert pertinent timevar calls.
3610
3611 2002-07-31 Akim Demaille <akim@epita.fr>
3612
3613 Let --trace have arguments.
3614
3615 * src/getargs.h (enum trace_e): New.
3616 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3617 (long_options, short_options): --trace/-T takes an optional
3618 argument.
3619 Change all the uses of trace_flag to reflect the new flags.
3620 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3621
3622 Strengthen `stage' portability.
3623
3624 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3625 * configure.in: Use it.
3626 Don't check for malloc.h and sys/times.h.
3627 * src/system.h: Include them when appropriate.
3628 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3629 times and struct tms are available.
3630
3631 2002-07-30 Akim Demaille <akim@epita.fr>
3632
3633 In verbose parse error message, don't report `error' as an
3634 expected token.
3635 * tests/actions.at (Printers and Destructors): Adjust.
3636 * tests/calc.at (Calculator $1): Adjust.
3637 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3638 error message, do not report the parser accepts the error token in
3639 that state.
3640
3641 2002-07-30 Akim Demaille <akim@epita.fr>
3642
3643 Normalize conflict related messages.
3644
3645 * src/complain.h, src/complain.c (warn, complain): New.
3646 * src/conflicts.c (conflicts_print): Use them.
3647 (conflict_report_yacc): New, extracted from...
3648 (conflicts_print): here.
3649 * tests/conflicts.at, tests/existing.at: Adjust.
3650
3651 2002-07-30 Akim Demaille <akim@epita.fr>
3652
3653 Report rules which are never reduced by the parser: those hidden
3654 by conflicts.
3655
3656 * src/LR0.c (save_reductions): Don't make the final state too
3657 different: save its reduction (accept) instead of having a state
3658 without any action (no shift or goto, no reduce).
3659 Note: the final state is now a ``regular'' state, i.e., the
3660 parsers now contain `reduce 0' as default reduction.
3661 Nevertheless, since they decide to `accept' when yystate =
3662 final_state, they still will not reduce rule 0.
3663 * src/print.c (print_actions, print_reduction): Adjust.
3664 * src/output.c (action_row): Track reduced rules.
3665 (token_actions): Report rules never reduced.
3666 * tests/conflicts.at, tests/regression.at: Adjust.
3667
3668 2002-07-30 Akim Demaille <akim@epita.fr>
3669
3670 `stage' was accidently included in a previous patch.
3671 Initiate its autoconfiscation.
3672
3673 * configure.in: Look for malloc.h and sys/times.h.
3674 * src/main.c (stage): Adjust.
3675 Report only when trace_flag.
3676
3677 2002-07-29 Akim Demaille <akim@epita.fr>
3678
3679 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3680 state_number_t.
3681 (errs_t): symbol_t*, not symbol_number_t.
3682 (reductions_t): rule_t*, not rule_number_t.
3683 (FOR_EACH_SHIFT): New.
3684 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3685 * src/print.c, src/print_graph.c: Adjust.
3686
3687 2002-07-29 Akim Demaille <akim@epita.fr>
3688
3689 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3690
3691 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3692 (endtoken, accept): these.
3693 * src/reader.c (reader): Set endtoken's default tag to "$end".
3694 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3695 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3696 Adjust.
3697
3698 2002-07-29 Akim Demaille <akim@epita.fr>
3699
3700 * src/reduce.c (reduce_grammar): When the language is empty,
3701 complain about the start symbol, not the axiom.
3702 Use its location.
3703 * tests/reduce.at (Empty Language): New.
3704
3705 2002-07-26 Akim Demaille <akim@epita.fr>
3706
3707 * src/reader.h, src/reader.c (gram_error): ... can't get
3708 yycontrol without making too strong assumptions on the parser
3709 itself.
3710 * src/output.c (prepare_tokens): Use the real 0th value of
3711 token_translations instead of `0'.
3712 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3713 visible here.
3714 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3715 for the time being: %locations ought to provide it to yyerror.
3716
3717 2002-07-25 Akim Demaille <akim@epita.fr>
3718
3719 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3720 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3721 * tests/regression.at (Web2c Actions): Adjust.
3722
3723 2002-07-25 Akim Demaille <akim@epita.fr>
3724
3725 Stop storing rules from 1 to nrules + 1.
3726
3727 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3728 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3729 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3730 Iterate from 0 to nrules.
3731 Use rule_number_as_item_number and item_number_as_rule_number.
3732 Adjust to `derive' now containing possibly 0.
3733 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3734 Handle the `- 1' part in rule numbers from/to item numbers.
3735 * src/conflicts.c (log_resolution): Fix the message which reversed
3736 shift and reduce.
3737 * src/output.c (action_row): Initialize default_rule to -1.
3738 (token_actions): Adjust.
3739 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3740 expected output.
3741 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3742
3743 2002-07-25 Akim Demaille <akim@epita.fr>
3744
3745 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3746 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3747 (b4_c_knr_arg_decl): New.
3748 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3749 yyreport_parse_error.
3750
3751 2002-07-25 Akim Demaille <akim@epita.fr>
3752
3753 * data/yacc.c (yyreport_parse_error): New, extracted from...
3754 (yyparse): here.
3755 (yydestruct, yysymprint): Move above yyparse.
3756 Be K&R compliant.
3757
3758 2002-07-25 Akim Demaille <akim@epita.fr>
3759
3760 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3761 replace...
3762 (b4_sint_type, b4_uint_type): these.
3763 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3764 * tests/regression.at (Web2c Actions): Adjust.
3765
3766 2002-07-25 Akim Demaille <akim@epita.fr>
3767
3768 * src/gram.h (TIEM_NUMBER_MAX): New.
3769 (item_number_of_rule_number, rule_number_of_item_number): Rename
3770 as...
3771 (rule_number_as_item_number, item_number_as_rule_number): these.
3772 Adjust dependencies.
3773 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3774 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3775 (symbol_number_to_vector_number): New.
3776 (order): Of vector_number_t* type.
3777 (base_t, BASE_MAX, BASE_MIN): New.
3778 (froms, tos, width, pos, check): Of base_t type.
3779 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3780 (actrow): Of action_number_t type.
3781 (conflrow): Of unsigned int type.
3782 (table_ninf, base_ninf): New.
3783 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3784 (muscle_insert_int_table, muscle_insert_base_table)
3785 (muscle_insert_rule_number_table): New.
3786 (prepare_tokens): Output `toknum' as int_table.
3787 (action_row): Returns a rule_number_t.
3788 Use ACTION_MIN, not SHRT_MIN.
3789 (token_actions): yydefact is rule_number_t*.
3790 (table_ninf_remap): New.
3791 (pack_table): Use it for `base' and `table'.
3792 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3793 replaced with...
3794 (YYPACT_NINF, YYTABLE_NINF): these.
3795 (yypact, yytable): Compute their types instead of hard-coded
3796 `short'.
3797 * tests/regression.at (Web2c Actions): Adjust.
3798
3799 2002-07-19 Akim Demaille <akim@epita.fr>
3800
3801 * src/scan-gram.l (id): Can start with an underscore.
3802
3803 2002-07-16 Akim Demaille <akim@epita.fr>
3804
3805 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3806 Adjust all former `associativity' dependencies.
3807 * src/symtab.c (symbol_new): Default associativity is `undef', not
3808 `right'.
3809 (symbol_check_alias_consistence): Adjust.
3810
3811 2002-07-09 Akim Demaille <akim@epita.fr>
3812
3813 * doc/bison.texinfo: Properly set the ``header'' part.
3814 Use @dircategory ``GNU programming tools'' as per Texinfo's
3815 documentation.
3816 Use @copying.
3817
3818 2002-07-09 Akim Demaille <akim@epita.fr>
3819
3820 * lib/quotearg.h: Protect against multiple inclusions.
3821 * src/location.h (location_t): Add a `file' member.
3822 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3823 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3824 `error_one_per_line' support.
3825
3826 2002-07-09 Akim Demaille <akim@epita.fr>
3827
3828 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3829 * src/reader.c (lineno): Remove.
3830 Adjust all dependencies.
3831 (get_merge_function): Take a location and use complain_at.
3832 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3833 * tests/regression.at (Invalid inputs, Mixing %token styles):
3834 Adjust.
3835
3836 2002-07-09 Akim Demaille <akim@epita.fr>
3837
3838 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3839 recovery rule, and forbid extensions when --yacc.
3840 (gram_error): Use complain_at.
3841 * src/reader.c (reader): Exit if there were parse errors.
3842
3843 2002-07-09 Akim Demaille <akim@epita.fr>
3844
3845 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3846 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3847 Reported by R Blake <blakers@mac.com>.
3848
3849 2002-07-09 Akim Demaille <akim@epita.fr>
3850
3851 * data/yacc.c: Output the copyright notive in the header.
3852
3853 2002-07-03 Akim Demaille <akim@epita.fr>
3854
3855 * src/output.c (froms, tos): Are state_number_t.
3856 (save_column): sp, sp1, and sp2 are state_number_t.
3857 (prepare): Rename `final' as `final_state_number', `nnts' as
3858 `nterms_number', `nrules' as `rules_number', `nstates' as
3859 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3860 unused.
3861 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3862 * data/lalr1.cc (nsym_): Remove, unused.
3863
3864 2002-07-03 Akim Demaille <akim@epita.fr>
3865
3866 * src/lalr.h, src/lalr.c (goto_number_t): New.
3867 * src/lalr.c (goto_list_t): New.
3868 Propagate them.
3869 * src/nullable.c (rule_list_t): New.
3870 Propagate.
3871 * src/types.h: Remove.
3872
3873 2002-07-03 Akim Demaille <akim@epita.fr>
3874
3875 * src/closure.c (print_fderives): Use rule_rhs_print.
3876 * src/derives.c (print_derives): Use rule_rhs_print.
3877 (rule_list_t): New, replaces `shorts'.
3878 (set_derives): Add comments.
3879 * tests/sets.at (Nullable, Firsts): Adjust.
3880
3881 2002-07-03 Akim Demaille <akim@epita.fr>
3882
3883 * src/output.c (prepare_actions): Free `tally' and `width'.
3884 (prepare_actions): Allocate and free `order'.
3885 * src/symtab.c (symbols_free): Free `symbols'.
3886 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3887 * src/output.c (m4_invoke): Move to...
3888 * src/scan-skel.l: here.
3889 (<<EOF>>): Close yyout, and free its name.
3890
3891 2002-07-03 Akim Demaille <akim@epita.fr>
3892
3893 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3894
3895 * src/LR0.c (new_state): Merge into...
3896 (state_list_append): this.
3897 (new_states): Merge into...
3898 (generate_states): here.
3899 (set_states): Don't ensure a proper `errs' state member here, do it...
3900 * src/conflicts.c (conflicts_solve): here.
3901 * src/state.h, src/state.c: Comment changes.
3902 (state_t): Rename member `shifts' as `transitions'.
3903 Adjust all dependencies.
3904 (errs_new): For consistency, also take the values as argument.
3905 (errs_dup): Remove.
3906 (state_errs_set): New.
3907 (state_reductions_set, state_transitions_set): Assert that no
3908 previous value was assigned.
3909 (state_free): New.
3910 (states_free): Use it.
3911 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3912 temporary storage: use `errs' and `nerrs' as elsewhere.
3913 (set_conflicts): Allocate and free this `errs'.
3914
3915 2002-07-02 Akim Demaille <akim@epita.fr>
3916
3917 * lib/libiberty.h: New.
3918 * lib: Update the bitset implementation from upstream.
3919 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3920 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3921 * src/main.c: Adjust bitset stats calls.
3922
3923 2002-07-01 Paul Eggert <eggert@twinsun.com>
3924
3925 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3926 char, so that negative chars don't collide with $.
3927
3928 2002-06-30 Akim Demaille <akim@epita.fr>
3929
3930 Have the GLR tests be `warning' checked, and fix the warnings.
3931
3932 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3933 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3934 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3935 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3936 (yyaddDeferredAction): static.
3937 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3938 (yyreportParseError): yyprefix is const.
3939 yytokenp is used only when verbose.
3940 (yy__GNUC__): Replace with __GNUC__.
3941 (yypdumpstack): yyi is size_t.
3942 (yypreference): Un-yy local variables and arguments, to avoid
3943 clashes with `yyr1'. Anyway, we are not in the user name space.
3944 (yytname_size): be an int, as is compared with ints.
3945 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3946 Use them.
3947 * tests/cxx-gram.at: Use quotation to protect $1.
3948 Use AT_COMPILE to enable warnings hunts.
3949 Prototype yylex and yyerror.
3950 `Use' argc.
3951 Include `string.h', not `strings.h'.
3952 Produce and prototype stmtMerge only when used.
3953 yylex takes a location.
3954
3955 2002-06-30 Akim Demaille <akim@epita.fr>
3956
3957 We spend a lot of time in quotearg, in particular when --verbose.
3958
3959 * src/symtab.c (symbol_get): Store a quoted version of the key.
3960 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3961 Adjust all callers.
3962
3963 2002-06-30 Akim Demaille <akim@epita.fr>
3964
3965 * src/state.h (reductions_t): Rename member `nreds' as num.
3966 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3967 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3968
3969 2002-06-30 Akim Demaille <akim@epita.fr>
3970
3971 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3972 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3973 (shifts_to): Rename as...
3974 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3975 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3976 (TRANSITION_IS_DISABLED, transitions_to): these.
3977
3978 2002-06-30 Akim Demaille <akim@epita.fr>
3979
3980 * src/print.c (print_shifts, print_gotos): Merge into...
3981 (print_transitions): this.
3982 (print_transitions, print_errs, print_reductions): Align the
3983 lookaheads columns.
3984 (print_core, print_transitions, print_errs, print_state,
3985 print_grammar): Output empty lines separator before, not after.
3986 (state_default_rule_compute): Rename as...
3987 (state_default_rule): this.
3988 * tests/conflicts.at (Defaulted Conflicted Reduction),
3989 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3990 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3991
3992 2002-06-30 Akim Demaille <akim@epita.fr>
3993
3994 Display items as we display rules.
3995
3996 * src/gram.h, src/gram.c (rule_lhs_print): New.
3997 * src/gram.c (grammar_rules_partial_print): Use it.
3998 * src/print.c (print_core): Likewise.
3999 * tests/conflicts.at (Defaulted Conflicted Reduction),
4000 (Unresolved SR Conflicts): Adjust.
4001 (Unresolved SR Conflicts): Adjust and rename as...
4002 (Resolved SR Conflicts): this, as was meant.
4003 * tests/regression.at (Web2c Report): Adjust.
4004
4005 2002-06-30 Akim Demaille <akim@epita.fr>
4006
4007 * src/print.c (state_default_rule_compute): New, extracted from...
4008 (print_reductions): here.
4009 Pessimize, but clarify the code.
4010 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
4011
4012 2002-06-30 Akim Demaille <akim@epita.fr>
4013
4014 * src/output.c (action_row): Let default_rule be always a rule
4015 number.
4016
4017 2002-06-30 Akim Demaille <akim@epita.fr>
4018
4019 * src/closure.c (print_firsts, print_fderives, closure):
4020 Use BITSET_EXECUTE.
4021 * src/lalr.c (lookaheads_print): Likewise.
4022 * src/state.c (state_rule_lookaheads_print): Likewise.
4023 * src/print_graph.c (print_core): Likewise.
4024 * src/print.c (print_reductions): Likewise.
4025 * src/output.c (action_row): Likewise.
4026 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4027
4028 2002-06-30 Akim Demaille <akim@epita.fr>
4029
4030 * src/print_graph.c: Use report_flag.
4031
4032 2002-06-30 Akim Demaille <akim@epita.fr>
4033
4034 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4035 to...
4036 * src/relation.h, src/relation.c (traverse, relation_digraph)
4037 (relation_print, relation_transpose): New.
4038
4039 2002-06-30 Akim Demaille <akim@epita.fr>
4040
4041 * src/state.h, src/state.c (shifts_to): New.
4042 * src/lalr.c (build_relations): Use it.
4043
4044 2002-06-30 Akim Demaille <akim@epita.fr>
4045
4046 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4047 (item_number_of_rule_number, rule_number_of_item_number): New.
4048 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4049 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4050 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4051 Propagate their use.
4052 Much remains to be done, in particular wrt `shorts' from types.h.
4053
4054 2002-06-30 Akim Demaille <akim@epita.fr>
4055
4056 * src/symtab.c (symbol_new): Initialize the `printer' member.
4057
4058 2002-06-30 Akim Demaille <akim@epita.fr>
4059
4060 * src/LR0.c (save_reductions): Remove, replaced by...
4061 * src/state.h, src/state.c (state_reductions_set): New.
4062 (reductions, errs): Rename as...
4063 (reductions_t, errs_t): these.
4064 Adjust all dependencies.
4065
4066 2002-06-30 Akim Demaille <akim@epita.fr>
4067
4068 * src/LR0.c (state_list_t, state_list_append): New.
4069 (first_state, last_state): Now symbol_list_t.
4070 (this_state): Remove.
4071 (new_itemsets, append_states, save_reductions): Take a state_t as
4072 argument.
4073 (set_states, generate_states): Adjust.
4074 (save_shifts): Remove, replaced by...
4075 * src/state.h, src/state.c (state_shifts_set): New.
4076 (shifts): Rename as...
4077 (shifts_t): this.
4078 Adjust all dependencies.
4079 * src/state.h (state_t): Remove the `next' member.
4080
4081 2002-06-30 Akim Demaille <akim@epita.fr>
4082
4083 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4084 escaped in slot 0.
4085
4086 2002-06-30 Akim Demaille <akim@epita.fr>
4087
4088 Use hash.h for the state hash table.
4089
4090 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4091 (allocate_storage): Use state_hash_new.
4092 (free_storage): Use state_hash_free.
4093 (new_state, get_state): Adjust.
4094 * src/lalr.h, src/lalr.c (states): Move to...
4095 * src/states.h (state_t): Remove the `link' member, no longer
4096 used.
4097 * src/states.h, src/states.c: here.
4098 (state_hash_new, state_hash_free, state_hash_lookup)
4099 (state_hash_insert, states_free): New.
4100 * src/states.c (state_table, state_compare, state_hash): New.
4101 * src/output.c (output_actions): Do not free states now, since we
4102 still need to know the final_state number in `prepare', called
4103 afterwards. Do it...
4104 * src/main.c (main): here: call states_free after `output'.
4105
4106 2002-06-30 Akim Demaille <akim@epita.fr>
4107
4108 * src/state.h, src/state.c (state_new): New, extracted from...
4109 * src/LR0.c (new_state): here.
4110 * src/state.h (STATE_ALLOC): Move to...
4111 * src/state.c: here.
4112 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4113 * src/state.h, src/state.c: here.
4114
4115 2002-06-30 Akim Demaille <akim@epita.fr>
4116
4117 * src/reader.c (gensym): Rename as...
4118 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4119 (getsym): Rename as...
4120 (symbol_get): this.
4121
4122 2002-06-30 Akim Demaille <akim@epita.fr>
4123
4124 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4125 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4126 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4127 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4128
4129 2002-06-30 Akim Demaille <akim@epita.fr>
4130
4131 Make the test suite pass with warnings checked.
4132
4133 * tests/actions.at (Printers and Destructors): Improve.
4134 Avoid unsigned vs. signed issues.
4135 * tests/calc.at: Don't exercise the scanner here, do it...
4136 * tests/input.at (Torturing the Scanner): here.
4137
4138 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4139
4140 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4141 reorganize first lines parallel to yacc.c.
4142
4143 2002-06-28 Akim Demaille <akim@epita.fr>
4144
4145 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4146 (b4_token_enum, b4_token_defines): New, factored from...
4147 * data/lalr1.cc, data/yacc.c, glr.c: here.
4148
4149 2002-06-28 Akim Demaille <akim@epita.fr>
4150
4151 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4152 unused variables.
4153 * src/output.c (merger_output): static.
4154
4155 2002-06-28 Akim Demaille <akim@epita.fr>
4156
4157 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4158 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4159 pacify GCC.
4160 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4161
4162 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4163
4164 Accumulated changelog for new GLR parsing features.
4165
4166 * src/conflicts.c (count_total_conflicts): Change name to
4167 conflicts_total_count.
4168 * src/conflicts.h: Ditto.
4169 * src/output.c (token_actions): Use the new name.
4170 (output_conflicts): Change conflp => conflict_list_heads, and
4171 confl => conflict_list for better readability.
4172 * data/glr.c: Use the new names.
4173 * NEWS: Add self to GLR announcement.
4174
4175 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4176
4177 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4178 Akim Demaille.
4179
4180 * data/bison.glr: Change name to glr.c
4181 * data/glr.c: Renamed from bison.glr.
4182 * data/Makefile.am: Add glr.c
4183
4184 * src/getargs.c:
4185
4186 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4187 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4188
4189 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4190
4191 * data/bison.glr: Be sure to restore the
4192 current #line when returning to the skeleton contents after having
4193 exposed the input file's #line.
4194
4195 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4196
4197 * data/bison.glr: Bring up to date with changes to bison.simple.
4198
4199 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4200
4201 * data/bison.glr: Correct definitions that use b4_prefix.
4202 Various reformatting.
4203 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4204 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4205 yytokenp argument; now part of stack.
4206 (yychar): Define to behave as documented.
4207 (yyclearin): Ditto.
4208
4209 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4210
4211 * src/reader.h: Add declaration for free_merger_functions.
4212
4213 * src/reader.c (merge_functions): New variable.
4214 (get_merge_function): New function.
4215 (free_merger_functions): New function.
4216 (readgram): Check for %prec that is not followed by a symbol.
4217 Handle %dprec and %merge declarations.
4218 (packgram): Initialize dprec and merger fields in rules array.
4219
4220 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4221 conflict_list_cnt, conflict_list_free): New variables.
4222 (table_grow): Also grow conflict_table.
4223 (prepare_rules): Output dprec and merger tables.
4224 (conflict_row): New function.
4225 (action_row): Output conflict lists for GLR parser. Don't use
4226 default reduction in conflicted states for GLR parser so that there
4227 are spaces for the conflict lists.
4228 (save_row): Also save conflict information.
4229 (token_actions): Allocate conflict list.
4230 (merger_output): New function.
4231 (pack_vector): Pack conflict table, too.
4232 (output_conflicts): New function to output yyconflp and yyconfl.
4233 (output_check): Allocate conflict_tos.
4234 (output_actions): Output conflict tables, also.
4235 (output_skeleton): Output b4_mergers definition.
4236 (prepare): Output b4_max_rhs_length definition.
4237 Use 'bison.glr' as default skeleton for GLR parsers.
4238
4239 * src/gram.c (glr_parser): New flag.
4240 (grammar_free): Call free_merger_functions.
4241
4242 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4243 all pairs of conflicting reductions, rather than just all tokens
4244 causing conflicts. Needed to size conflict tables.
4245 (conflicts_output): Modify call to count_rr_conflicts for new
4246 interface.
4247 (conflicts_print): Ditto.
4248 (count_total_conflicts): New function.
4249
4250 * src/reader.h (merger_list): New type.
4251 (merge_functions): New variable.
4252
4253 * src/lex.h (tok_dprec, tok_merge): New token types.
4254
4255 * src/gram.h (rule_s): Add dprec and merger fields.
4256 (glr_parser): New flag.
4257
4258 * src/conflicts.h (count_total_conflicts): New function.
4259
4260 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4261
4262 * doc/bison.texinfo (Generalized LR Parsing): New section.
4263 (GLR Parsers): New section.
4264 (Language and Grammar): Mention GLR parsing.
4265 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4266 Correct typo ("tge" -> "the").
4267
4268 * data/bison.glr: New skeleton for GLR parsing.
4269
4270 * tests/cxx-gram.at: New tests for GLR parsing.
4271
4272 * tests/testsuite.at: Include cxx-gram.at.
4273
4274 * tests/Makefile.am: Add cxx-gram.at.
4275
4276 * src/parse-gram.y:
4277
4278 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4279
4280 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4281
4282 2002-06-27 Akim Demaille <akim@epita.fr>
4283
4284 * src/options.h, src/options.c: Remove.
4285 * src/getargs.c (short_options, long_options): New.
4286
4287 2002-06-27 Akim Demaille <akim@epita.fr>
4288
4289 * data/bison.simple, data/bison.c++: Rename as...
4290 * data/yacc.c, data/lalr1.cc: these.
4291 * doc/bison.texinfo (Environment Variables): Remove.
4292
4293 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4294
4295 * src/getargs.c (report_argmatch): Initialize strtok().
4296
4297 2002-06-20 Akim Demaille <akim@epita.fr>
4298
4299 * data/bison.simple (b4_symbol_actions): New, replaces...
4300 (b4_symbol_destructor, b4_symbol_printer): these.
4301 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4302 user token numbers.
4303
4304 2002-06-20 Akim Demaille <akim@epita.fr>
4305
4306 * data/bison.simple (yydestructor): Rename as...
4307 (yydestruct): this.
4308
4309 2002-06-20 Akim Demaille <akim@epita.fr>
4310
4311 * src/symtab.h, src/symtab.c (symbol_type_set)
4312 (symbol_destructor_set, symbol_precedence_set): The location is
4313 the last argument.
4314 Adjust all callers.
4315
4316 2002-06-20 Akim Demaille <akim@epita.fr>
4317
4318 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4319 internals.
4320 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4321 Takes a location.
4322 * src/symtab.h, src/symtab.c (symbol_class_set)
4323 (symbol_user_token_number_set): Likewise.
4324 Adjust all callers.
4325 Promote complain_at.
4326 * tests/input.at (Type Clashes): Adjust.
4327
4328 2002-06-20 Akim Demaille <akim@epita.fr>
4329
4330 * data/bison.simple (YYLEX): Fix the declaration when
4331 %pure-parser.
4332
4333 2002-06-20 Akim Demaille <akim@epita.fr>
4334
4335 * data/bison.simple (yysymprint): Don't print the token number,
4336 just its name.
4337 * tests/actions.at (Destructors): Rename as...
4338 (Printers and Destructors): this.
4339 Also exercise %printer.
4340
4341 2002-06-20 Akim Demaille <akim@epita.fr>
4342
4343 * data/bison.simple (YYDSYMPRINT): New.
4344 Use it to remove many of the #if YYDEBUG/if (yydebug).
4345
4346 2002-06-20 Akim Demaille <akim@epita.fr>
4347
4348 * src/symtab.h, src/symtab.c (symbol_t): printer and
4349 printer_location are new members.
4350 (symbol_printer_set): New.
4351 * src/parse-gram.y (PERCENT_PRINTER): New token.
4352 Handle its associated rule.
4353 * src/scan-gram.l: Adjust.
4354 (handle_destructor_at, handle_destructor_dollar): Rename as...
4355 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4356 * src/output.c (symbol_printers_output): New.
4357 (output_skeleton): Call it.
4358 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4359 since there are already many grammar files with a user `yyprint'.
4360 Replace the calls to YYPRINT to calls to yysymprint.
4361 * tests/calc.at: Adjust.
4362 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4363 taking advantage of parser very internal details (stack size!).
4364
4365 2002-06-20 Akim Demaille <akim@epita.fr>
4366
4367 * src/scan-gram.l: Complete the scanner with the missing patterns
4368 to pacify Flex.
4369 Use `quote' and `symbol_tag_get' where appropriate.
4370
4371 2002-06-19 Akim Demaille <akim@epita.fr>
4372
4373 * tests/actions.at (Destructors): Augment to test locations.
4374 * data/bison.simple (yydestructor): Pass it the current location
4375 if locations are enabled.
4376 Prototype only when __STDC__ or C++.
4377 Change the argument names to move into the yy name space: there is
4378 user code here.
4379
4380 2002-06-19 Akim Demaille <akim@epita.fr>
4381
4382 * data/bison.simple (b4_pure_if): New.
4383 Use it instead of #ifdef YYPURE.
4384
4385 2002-06-19 Akim Demaille <akim@epita.fr>
4386
4387 * data/bison.simple (b4_location_if): New.
4388 Use it instead of #ifdef YYLSP_NEEDED.
4389
4390 2002-06-19 Akim Demaille <akim@epita.fr>
4391
4392 Prepare @$ in %destructor, but currently don't bind it in the
4393 skeleton, as %location use is not cleaned up yet.
4394
4395 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4396 (handle_action_at): New.
4397 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4398 a braced_code_t and a location as additional arguments.
4399 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4400 unquote one when outputting `b4_dollar_dollar'.
4401 Adjust callers.
4402 * data/bison.simple (b4_eval): Remove.
4403 (b4_symbol_destructor): Adjust.
4404 * tests/input.at (Invalid @n): Adjust.
4405
4406 2002-06-19 Zack Weinberg <zack@codesourcery.com>
4407
4408 * doc/bison.texinfo: Document ability to have multiple
4409 prologue sections.
4410
4411 2002-06-18 Akim Demaille <akim@epita.fr>
4412
4413 * src/files.c (compute_base_names): When computing the output file
4414 names from the input file name, strip the directory part.
4415
4416 2002-06-18 Akim Demaille <akim@epita.fr>
4417
4418 * data/bison.simple.new: Comment changes.
4419 Reported by Andreas Schwab.
4420
4421 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4422
4423 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4424 there are no `label `yyoverflowlab' defined but not used' warnings
4425 when yyoverflow is defined.
4426
4427 2002-06-18 Akim Demaille <akim@epita.fr>
4428
4429 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4430 new member.
4431 (symbol_destructor_set): Adjust.
4432 * src/output.c (symbol_destructors_output): Output the destructor
4433 locations.
4434 Output the symbol name.
4435 * data/bison.simple (b4_symbol_destructor): Adjust.
4436
4437 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4438 and Akim Demaille <akim@epita.fr>
4439
4440 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4441 what's left on the stack when the error recovery hits EOF.
4442 * tests/actions.at (Destructors): Complete to exercise this case.
4443
4444 2002-06-17 Akim Demaille <akim@epita.fr>
4445
4446 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4447 arguments is really empty, not only equal to `[]'.
4448 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4449 member.
4450 (symbol_destructor_set): New.
4451 * src/output.c (symbol_destructors_output): New.
4452 * src/reader.h (brace_code_t, current_braced_code): New.
4453 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4454 (handle_dollar): Rename as...
4455 (handle_action_dollar): this.
4456 (handle_destructor_dollar): New.
4457 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4458 (grammar_declaration): Use it.
4459 * data/bison.simple (yystos): Is always defined.
4460 (yydestructor): New.
4461 * tests/actions.at (Destructors): New.
4462 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4463
4464 2002-06-17 Akim Demaille <akim@epita.fr>
4465
4466 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4467 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4468 rule_length only when needed.
4469 * src/output.c (actions_output, token_definitions_output): Output
4470 the full M4 block.
4471 * src/symtab.c: Don't access directly to the symbol tag, use
4472 symbol_tag_get.
4473 * src/parse-gram.y: Use symbol_list_free.
4474
4475 2002-06-17 Akim Demaille <akim@epita.fr>
4476
4477 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4478 (symbol_list_prepend, get_type_name): Move to...
4479 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4480 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4481 Adjust all callers.
4482 (symbol_list_free): New.
4483 * src/scan-gram.l (handle_dollar): Takes a location.
4484 * tests/input.at (Invalid $n): Adjust.
4485
4486 2002-06-17 Akim Demaille <akim@epita.fr>
4487
4488 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4489 (symbol_list_prepend): New.
4490 * src/parse-gram.y (%union): `list' is a new member.
4491 (symbols.1): New, replaces...
4492 (terms_to_prec.1, nterms_to_type.1): these.
4493 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4494 Take a location as additional argument.
4495 Adjust all callers.
4496
4497 2002-06-15 Akim Demaille <akim@epita.fr>
4498
4499 * src/parse-gram.y: Move %token in the declaration section so that
4500 we don't depend upon CVS Bison.
4501
4502 2002-06-15 Akim Demaille <akim@epita.fr>
4503
4504 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4505 * src/print.c (print_core): Use it.
4506
4507 2002-06-15 Akim Demaille <akim@epita.fr>
4508
4509 * src/conflicts.c (log_resolution): Accept the rule involved in
4510 the sr conflicts instead of the lookahead number that points to
4511 that rule.
4512 (flush_reduce): Accept the current lookahead vector as argument,
4513 instead of the index in LA.
4514 (resolve_sr_conflict): Accept the current number of lookahead
4515 bitset to consider for the STATE, instead of the index in LA.
4516 (set_conflicts): Adjust.
4517 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4518
4519 2002-06-15 Akim Demaille <akim@epita.fr>
4520
4521 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4522 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4523 Adjust all dependencies.
4524 * src/lalr.c (initialize_lookaheads): Split into...
4525 (states_lookaheads_count, states_lookaheads_initialize): these.
4526 (lalr): Adjust.
4527
4528 2002-06-15 Akim Demaille <akim@epita.fr>
4529
4530 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4531 out of...
4532 (grammar_rules_print): here.
4533 * src/reduce.c (reduce_output): Use it.
4534 * tests/reduce.at (Useless Rules, Reduced Automaton)
4535 (Underivable Rules): Adjust.
4536
4537 2002-06-15 Akim Demaille <akim@epita.fr>
4538
4539 Copy BYacc's nice way to report the grammar.
4540
4541 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4542 New.
4543 Don't print the rules' location, it is confusing and useless.
4544 (rule_print): Use grammar_rhs_print.
4545 * src/print.c (print_grammar): Use grammar_rules_print.
4546
4547 2002-06-15 Akim Demaille <akim@epita.fr>
4548
4549 Complete and rationalize `useless thing' warnings.
4550
4551 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4552 (symbol_tag_print): New.
4553 Use them everywhere in place of accessing directly the tag member.
4554 * src/gram.h, src/gram.c (rule_print): New.
4555 Use it where a rule used to be printed `by hand'.
4556 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4557 (reduce_grammar_tables): Report the useless rules.
4558 (reduce_print): Useless things are a warning, not an error.
4559 Report it as such.
4560 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4561 (Reduced Automaton, Underivable Rules): Adjust.
4562 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4563 * tests/conflicts.at (Unresolved SR Conflicts)
4564 (Solved SR Conflicts): Adjust.
4565
4566 2002-06-15 Akim Demaille <akim@epita.fr>
4567
4568 Let symbols have a location.
4569
4570 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4571 (getsym): Adjust.
4572 Adjust all callers.
4573 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4574 Use location_t, not int.
4575 * src/symtab.c (symbol_check_defined): Take advantage of the
4576 location.
4577 * tests/regression.at (Invalid inputs): Adjust.
4578
4579 2002-06-15 Akim Demaille <akim@epita.fr>
4580
4581 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4582 (input): Don't try to initialize yylloc here, do it in the
4583 scanner.
4584 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4585 * src/gram.h (rule_t): Change line and action_line into location
4586 and action_location, of location_t type.
4587 Adjust all dependencies.
4588 * src/location.h, src/location.c (empty_location): New.
4589 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4590 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4591 (grammar_current_rule_symbol_append)
4592 (grammar_current_rule_action_append): Expect a location as argument.
4593 * src/reader.c (grammar_midrule_action): Adjust to attach an
4594 action's location as dummy symbol location.
4595 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4596 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4597 the line numbers.
4598
4599 2002-06-14 Akim Demaille <akim@epita.fr>
4600
4601 Grammar declarations may be found in the grammar section.
4602
4603 * src/parse-gram.y (rules_or_grammar_declaration): New.
4604 (declarations): Each declaration may end with a semicolon, not
4605 just...
4606 (grammar_declaration): `"%union"'.
4607 (grammar): Branch to rules_or_grammar_declaration.
4608
4609 2002-06-14 Akim Demaille <akim@epita.fr>
4610
4611 * src/main.c (main): Invoke scanner_free.
4612
4613 2002-06-14 Akim Demaille <akim@epita.fr>
4614
4615 * src/output.c (m4_invoke): Extracted from...
4616 (output_skeleton): here.
4617 Free tempfile.
4618
4619 2002-06-14 Akim Demaille <akim@epita.fr>
4620
4621 * src/parse-gram.y (directives, directive, gram)
4622 (grammar_directives, precedence_directives, precedence_directive):
4623 Rename as...
4624 (declarations, declaration, grammar, grammar_declaration)
4625 (precedence_declaration, precedence_declarator): these.
4626 (symbol_declaration): New.
4627
4628 2002-06-14 Akim Demaille <akim@epita.fr>
4629
4630 * src/files.c (action_obstack): Remove, unused.
4631 (output_obstack): Remove it, and all its dependencies, as it is no
4632 longer needed.
4633 * src/reader.c (epilogue_set): Build the epilogue in the
4634 muscle_obstack.
4635 * src/output.h, src/output.c (muscle_obstack): Move to...
4636 * src/muscle_tab.h, src/muscle_tab.h: here.
4637 (muscle_init): Initialize muscle_obstack.
4638 (muscle_free): New.
4639 * src/main.c (main): Call it.
4640
4641 2002-06-14 Akim Demaille <akim@epita.fr>
4642
4643 * src/location.h: New, extracted from...
4644 * src/reader.h: here.
4645 * src/Makefile.am (noinst_HEADERS): Merge into
4646 (bison_SOURCES): this.
4647 Add location.h.
4648 * src/parse-gram.y: Use location_t instead of Bison's.
4649 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4650 Use location_t instead of ints.
4651
4652 2002-06-14 Akim Demaille <akim@epita.fr>
4653
4654 * data/bison.simple, data/bison.c++: Be sure to restore the
4655 current #line when returning to the skeleton contents after having
4656 exposed the input file's #line.
4657
4658 2002-06-12 Akim Demaille <akim@epita.fr>
4659
4660 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4661 eager.
4662 * tests/actions.at (Exotic Dollars): New.
4663
4664 2002-06-12 Akim Demaille <akim@epita.fr>
4665
4666 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4667 ['"/] too eagerly.
4668 * tests/input.at (Torturing the Scanner): New.
4669
4670 2002-06-11 Akim Demaille <akim@epita.fr>
4671
4672 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4673 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4674 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4675 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4676 * src/reader.c (reader): Use it.
4677
4678 2002-06-11 Akim Demaille <akim@epita.fr>
4679
4680 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4681 Adjust all callers.
4682 (scanner_last_string_free): New.
4683
4684 2002-06-11 Akim Demaille <akim@epita.fr>
4685
4686 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4687 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4688 (last_string, YY_OBS_FREE): New.
4689 Use them when returning an ID.
4690
4691 2002-06-11 Akim Demaille <akim@epita.fr>
4692
4693 Have Bison grammars parsed by a Bison grammar.
4694
4695 * src/reader.c, src/reader.h (prologue_augment): New.
4696 * src/reader.c (copy_definition): Remove.
4697
4698 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4699 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4700 (grammar_current_rule_prec_set, grammar_current_rule_check)
4701 (grammar_current_rule_symbol_append)
4702 (grammar_current_rule_action_append): Export.
4703 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4704 (symbol_list_action_append): Remove.
4705 Hook the routines from reader.
4706 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4707 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4708
4709 * src/reader.c (read_declarations): Remove, unused.
4710
4711 * src/parse-gram.y: Handle the epilogue.
4712 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4713 (grammar_start_symbol_set): this.
4714 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4715 * src/reader.c (readgram): Remove, unused.
4716 (reader): Adjust to insert eoftoken and axiom where appropriate.
4717
4718 * src/reader.c (copy_dollar): Replace with...
4719 * src/scan-gram.h (handle_dollar): this.
4720 * src/parse-gram.y: Remove `%thong'.
4721
4722 * src/reader.c (copy_at): Replace with...
4723 * src/scan-gram.h (handle_at): this.
4724
4725 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4726 New.
4727
4728 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4729 time being.
4730
4731 * src/reader.h, src/reader.c (grammar_rule_end): New.
4732
4733 * src/parse.y (current_type, current_class): New.
4734 Implement `%nterm', `%token' support.
4735 Merge `%term' into `%token'.
4736 (string_as_id): New.
4737 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4738 type name.
4739
4740 * src/parse-gram.y: Be sure to handle properly the beginning of
4741 rules.
4742
4743 * src/parse-gram.y: Handle %type.
4744 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4745
4746 * src/parse-gram.y: More directives support.
4747 * src/options.c: No longer handle source directives.
4748
4749 * src/parse-gram.y: Fix %output.
4750
4751 * src/parse-gram.y: Handle %union.
4752 Use the prologue locations.
4753 * src/reader.c (parse_union_decl): Remove.
4754
4755 * src/reader.h, src/reader.c (epilogue_set): New.
4756 * src/parse-gram.y: Use it.
4757
4758 * data/bison.simple, data/bison.c++: b4_stype is now either not
4759 defined, then default to int, or to the contents of %union,
4760 without `union' itself.
4761 Adjust.
4762 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4763
4764 * src/output.c (actions_output): Don't output braces, as they are
4765 already handled by the scanner.
4766
4767 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4768 characters to themselves.
4769
4770 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4771 that the epilogue has a proper #line.
4772
4773 * src/parse-gram.y: Handle precedence/associativity.
4774
4775 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4776 a terminal.
4777 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4778 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4779 at all to define terminals that cannot be emitted.
4780
4781 * src/scan-gram.l: Escape M4 characters.
4782
4783 * src/scan-gram.l: Working properly with escapes in user
4784 strings/characters.
4785
4786 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4787 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4788 grammar.
4789 Use more modest sizes, as for the time being the parser does not
4790 release memory, and therefore the process swallows a huge amount
4791 of memory.
4792
4793 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4794 stricter %token grammar.
4795
4796 * src/symtab.h (associativity): Add `undef_assoc'.
4797 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4798 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4799
4800 * tests/regression.at (Invalid %directive): Remove, as it is now
4801 meaningless.
4802 (Invalid inputs): Adjust to the new error messages.
4803 (Token definitions): The new grammar doesn't allow too many
4804 eccentricities.
4805
4806 * src/lex.h, src/lex.c: Remove.
4807 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4808 (copy_character, copy_string2, copy_string, copy_identifier)
4809 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4810 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4811 (parse_action): Remove.
4812 * po/POTFILES.in: Adjust.
4813
4814 2002-06-11 Akim Demaille <akim@epita.fr>
4815
4816 * src/reader.c (parse_action): Don't store directly into the
4817 rule's action member: return the action as a string.
4818 Don't require `rule_length' as an argument: compute it.
4819 (grammar_current_rule_symbol_append)
4820 (grammar_current_rule_action_append): New, eved out from
4821 (readgram): here.
4822 Remove `action_flag', `rulelength', unused now.
4823
4824 2002-06-11 Akim Demaille <akim@epita.fr>
4825
4826 * src/reader.c (grammar_current_rule_prec_set).
4827 (grammar_current_rule_check): New, eved out from...
4828 (readgram): here.
4829 Remove `xaction', `first_rhs': useless.
4830 * tests/input.at (Type clashes): New.
4831 * tests/existing.at (GNU Cim Grammar): Adjust.
4832
4833 2002-06-11 Akim Demaille <akim@epita.fr>
4834
4835 * src/reader.c (grammar_midrule_action): New, Eved out from
4836 (readgram): here.
4837
4838 2002-06-11 Akim Demaille <akim@epita.fr>
4839
4840 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4841 New.
4842 (readgram): Use them as replacement of inlined code, crule and
4843 crule1.
4844
4845 2002-06-11 Akim Demaille <akim@epita.fr>
4846
4847 * src/reader.c (grammar_end, grammar_symbol_append): New.
4848 (readgram): Use them.
4849 Make the use of `p' as local as possible.
4850
4851 2002-06-10 Akim Demaille <akim@epita.fr>
4852
4853 GCJ's parser requires the tokens to be defined before the prologue.
4854
4855 * data/bison.simple: Output the token definition before the user's
4856 prologue.
4857 * tests/regression.at (Braces parsing, Duplicate string)
4858 (Mixing %token styles): Check the output from bison.
4859 (Early token definitions): New.
4860
4861 2002-06-10 Akim Demaille <akim@epita.fr>
4862
4863 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4864 assigning twice the same user number to a token, so that we can
4865 use it in...
4866 * src/lex.c (lex): here.
4867 Also use `symbol_class_set' instead of hand written code.
4868 * src/reader.c (parse_assoc_decl): Likewise.
4869
4870 2002-06-10 Akim Demaille <akim@epita.fr>
4871
4872 * src/symtab.c, src/symtab.c (symbol_class_set)
4873 (symbol_user_token_number_set): New.
4874 * src/reader.c (parse_token_decl): Use them.
4875 Use a switch instead of ifs.
4876 Use a single argument.
4877
4878 2002-06-10 Akim Demaille <akim@epita.fr>
4879
4880 Remove `%thong' support as it is undocumented, unused, duplicates
4881 `%token's job, and creates useless e-mail traffic with people who
4882 want to know what it is, why it is undocumented, unused, and
4883 duplicates `%token's job.
4884
4885 * src/reader.c (parse_thong_decl): Remove.
4886 * src/options.c (option_table): Remove "thong".
4887 * src/lex.h (tok_thong): Remove.
4888
4889 2002-06-10 Akim Demaille <akim@epita.fr>
4890
4891 * src/symtab.c, src/symtab.c (symbol_type_set)
4892 (symbol_precedence_set): New.
4893 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4894 (value_components_used): Remove, unused.
4895
4896 2002-06-09 Akim Demaille <akim@epita.fr>
4897
4898 Move symbols handling code out of the reader.
4899
4900 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4901 (axiom): Move to...
4902 * src/symtab.h, src/symtab.c: here.
4903
4904 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4905 * src/reader.c (startval): Rename as...
4906 * src/symtab.h, src/symtab.c (startsymbol): this.
4907 * src/reader.c: Adjust.
4908
4909 * src/reader.c (symbol_check_defined, symbol_make_alias)
4910 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4911 (token_translations_init)
4912 Move to...
4913 * src/symtab.c: here.
4914 * src/reader.c (packsymbols): Move to...
4915 * src/symtab.h, src/symtab.c (symbols_pack): here.
4916 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4917 argument.
4918
4919 2002-06-03 Akim Demaille <akim@epita.fr>
4920
4921 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4922 then statements.
4923
4924 2002-06-03 Akim Demaille <akim@epita.fr>
4925
4926 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4927 structs with non literals.
4928 * src/scan-skel.l: never-interactive.
4929 * src/conflicts.c (enum conflict_resolution_e): No trailing
4930 comma.
4931 * src/getargs.c (usage): Split long literal strings.
4932 Reported by Hans Aberg.
4933
4934 2002-05-28 Akim Demaille <akim@epita.fr>
4935
4936 * data/bison.c++: Use C++ ostreams.
4937 (cdebug_): New member.
4938
4939 2002-05-28 Akim Demaille <akim@epita.fr>
4940
4941 * src/output.c (output_skeleton): Be sure to allocate enough room
4942 for `/' _and_ for `\0' in full_skeleton.
4943
4944 2002-05-28 Akim Demaille <akim@epita.fr>
4945
4946 * data/bison.c++: Catch up with bison.simple:
4947 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4948 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4949 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4950 and popping traces.
4951
4952 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4953
4954 * src/output.c (output_skeleton): Put an explicit path in front of
4955 the skeleton file name, rather than relying on the -I directory,
4956 to partially alleviate effects of having a skeleton file lying around
4957 in the current directory.
4958
4959 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4960
4961 * src/conflicts.c (log_resolution): Correct typo:
4962 obstack_printf should be obstack_fgrow1.
4963
4964 2002-05-26 Akim Demaille <akim@epita.fr>
4965
4966 * src/state.h (state_t): `solved_conflicts' is a new member.
4967 * src/LR0.c (new_state): Set it to 0.
4968 * src/conflicts.h, src/conflicts.c (print_conflicts)
4969 (free_conflicts, solve_conflicts): Rename as...
4970 (conflicts_print, conflicts_free, conflicts_solve): these.
4971 Adjust callers.
4972 * src/conflicts.c (enum conflict_resolution_e)
4973 (solved_conflicts_obstack): New, used by...
4974 (log_resolution): this.
4975 Adjust to attach the conflict resolution to each state.
4976 Complete the description with the precedence/associativity
4977 information.
4978 (resolve_sr_conflict): Adjust.
4979 * src/print.c (print_state): Output its solved_conflicts.
4980 * tests/conflicts.at (Unresolved SR Conflicts)
4981 (Solved SR Conflicts): Exercise --report=all.
4982
4983 2002-05-26 Akim Demaille <akim@epita.fr>
4984
4985 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4986 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4987 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4988 (token_number_t, item_number_as_token_number)
4989 (token_number_as_item_number, muscle_insert_token_number_table):
4990 Rename as...
4991 (symbol_number_t, item_number_as_symbol_number)
4992 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4993 these, since it is more appropriate.
4994
4995 2002-05-26 Akim Demaille <akim@epita.fr>
4996
4997 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4998 `Error:' lines.
4999 * data/bison.simple (yystos) [YYDEBUG]: New.
5000 (yyparse) [YYDEBUG]: Display the symbols which are popped during
5001 error recovery.
5002 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
5003
5004 2002-05-25 Akim Demaille <akim@epita.fr>
5005
5006 * doc/bison.texinfo (Debugging): Split into...
5007 (Tracing): this new section, its former contents, and...
5008 (Understanding): this new section.
5009 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
5010 by...
5011 (report_flag): this.
5012 Adjust all dependencies.
5013 (report_args, report_types, report_argmatch): New.
5014 (usage, getargs): Report/support -r, --report.
5015 * src/options.h
5016 (struct option_table_struct): Rename as..,
5017 (struct option_table_s): this.
5018 Rename the `set_flag' member to `flag' to match with getopt_long's
5019 struct.
5020 * src/options.c (option_table): Split verbose into an entry for
5021 %verbose, and another for --verbose.
5022 Support --report/-r, so remove -r from the obsolete --raw.
5023 * src/print.c: Attach full item sets and lookaheads reports to
5024 report_flag instead of trace_flag.
5025 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5026
5027 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5028 and Paul Eggert <eggert@twinsun.com>
5029
5030 * data/bison.simple (yyparse): Correct error handling to conform to
5031 POSIX and yacc. Specifically, after syntax error is discovered,
5032 do not reduce further before shifting the error token.
5033 Clean up the code a bit by removing the labels yyerrdefault,
5034 yyerrhandle, yyerrpop.
5035 * NEWS: Document the above.
5036
5037 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5038
5039 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5040 type; it isn't always big enough, since it doesn't necessarily
5041 include non-terminals.
5042 (yytranslate): Expand definition of yy_token_number_type, so that
5043 the latter can be removed.
5044 (yy_token_number_type): Remove, only one use.
5045 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5046 don't use TokenNumberType as element type.
5047
5048 * tests/regression.at: Modify expected output to agree with change
5049 to yyr1 and yytranslate.
5050
5051 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5052
5053 * src/reader.c (parse_action): Use copy_character instead of
5054 obstack_1grow.
5055
5056 2002-05-13 Akim Demaille <akim@epita.fr>
5057
5058 * tests/regression.at (Token definitions): Prototype yylex and
5059 yyerror.
5060
5061 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5062
5063 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5064 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5065 32-bit arithmetic.
5066 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5067
5068 2002-05-07 Akim Demaille <akim@epita.fr>
5069
5070 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5071 avoid GCC warnings.
5072
5073 2002-05-07 Akim Demaille <akim@epita.fr>
5074
5075 Kill GCC warnings.
5076
5077 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5078 over the RHS of each rule.
5079 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5080 * src/state.h (state_t): Member `nitems' is unsigned short.
5081 * src/LR0.c (get_state): Adjust.
5082 * src/reader.c (packgram): Likewise.
5083 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5084 `Type'.
5085 (muscle_insert_int_table): Remove, unused.
5086 (prepare_rules): Remove `max'.
5087
5088 2002-05-06 Akim Demaille <akim@epita.fr>
5089
5090 * src/closure.c (print_firsts): Display of the symbol tags.
5091 (bitmatrix_print): Move to...
5092 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5093 here.
5094 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5095
5096 2002-05-06 Akim Demaille <akim@epita.fr>
5097
5098 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5099 hash_do_for_each.
5100
5101 2002-05-06 Akim Demaille <akim@epita.fr>
5102
5103 * src/LR0.c (new_state, get_state): Instead of using the global
5104 `kernel_size' and `kernel_base', have two new arguments:
5105 `core_size' and `core'.
5106 Adjust callers.
5107
5108 2002-05-06 Akim Demaille <akim@epita.fr>
5109
5110 * src/reader.c (packgram): No longer end `ritem' with a 0
5111 sentinel: it is not used.
5112
5113 2002-05-05 Akim Demaille <akim@epita.fr>
5114
5115 New experimental feature: display the lookaheads in the report and
5116 graph.
5117
5118 * src/print (print_core): When --trace-flag, display the rules
5119 lookaheads.
5120 * src/print_graph.c (print_core): Likewise.
5121 Swap the arguments.
5122 Adjust caller.
5123
5124 2002-05-05 Akim Demaille <akim@epita.fr>
5125
5126 * tests/torture.at (Many lookaheads): New test.
5127
5128 2002-05-05 Akim Demaille <akim@epita.fr>
5129
5130 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5131 (GENERATE_MUSCLE_INSERT_TABLE): this.
5132 (output_int_table, output_unsigned_int_table, output_short_table)
5133 (output_token_number_table, output_item_number_table): Replace with...
5134 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5135 (muscle_insert_short_table, muscle_insert_token_number_table)
5136 (muscle_insert_item_number_table): these.
5137 Adjust all callers.
5138 (prepare_tokens): Don't free `translations', since...
5139 * src/reader.h, src/reader.c (grammar_free): do it.
5140 Move to...
5141 * src/gram.h, src/gram.c (grammar_free): here.
5142 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5143 b4_translate_max.
5144
5145 2002-05-05 Akim Demaille <akim@epita.fr>
5146
5147 * src/output.c (output_unsigned_int_table): New.
5148 (prepare_rules): `i' is unsigned.
5149 `prhs', `rline', `r2' are unsigned int.
5150 Rename muscle `rhs_number_max' as `rhs_max'.
5151 Output muscles `prhs_max', `rline_max', and `r2_max'.
5152 Free rline and r1.
5153 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5154 to compute types instead of constant types.
5155 * tests/regression.at (Web2c Actions): Adjust.
5156
5157 2002-05-04 Akim Demaille <akim@epita.fr>
5158
5159 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5160 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5161 Adjust dependencies.
5162 * src/output.c (token_definitions_output): Be sure not to output a
5163 `#define 'a'' when fed with `%token 'a' "a"'.
5164 * tests/regression.at (Token definitions): New.
5165
5166 2002-05-03 Paul Eggert <eggert@twinsun.com>
5167
5168 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5169 for K&R C.
5170
5171 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5172
5173 * Makefile.am (SUBDIRS): Remove intl.
5174 (EXTRA_DIST): Add config/config.rpath.
5175
5176 2002-05-03 Akim Demaille <akim@epita.fr>
5177
5178 * data/bison.simple (m4_if): Don't output empty enums.
5179 And actually, output valid enum definitions :(.
5180
5181 2002-05-03 Akim Demaille <akim@epita.fr>
5182
5183 * configure.bat: Remove, completely obsolete.
5184 * Makefile.am (EXTRA_DIST): Adjust.
5185 Don't distribute config.rpath...
5186 * config/Makefile.am (EXTRA_DIST): Do it.
5187
5188 2002-05-03 Akim Demaille <akim@epita.fr>
5189
5190 * configure.in (GETTEXT_VERSION): New.
5191 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5192
5193 2002-05-03 Akim Demaille <akim@epita.fr>
5194
5195 * data/bison.simple (b4_token_enum): New.
5196 (b4_token_defines): Use it to output tokens both as #define and
5197 enums.
5198 Suggested by Paul Eggert.
5199 * src/output.c (token_definitions_output): Don't output spurious
5200 white spaces.
5201
5202 2002-05-03 Akim Demaille <akim@epita.fr>
5203
5204 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5205
5206 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5207
5208 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5209 Update the stack class, give a try to deque as the default container.
5210
5211 2002-05-02 Akim Demaille <akim@epita.fr>
5212
5213 * data/bison.simple (yyparse): Do not implement @$ = @1.
5214 (YYLLOC_DEFAULT): Adjust to do it.
5215 * doc/bison.texinfo (Location Default Action): Fix.
5216
5217 2002-05-02 Akim Demaille <akim@epita.fr>
5218
5219 * src/reader.c (parse_braces): Merge into...
5220 (parse_action): this.
5221
5222 2002-05-02 Akim Demaille <akim@epita.fr>
5223
5224 * configure.in (ALL_LINGUAS): Remove.
5225 * po/LINGUAS, hr.po: New.
5226
5227 2002-05-02 Akim Demaille <akim@epita.fr>
5228
5229 Remove the so called hairy (semantic) parsers.
5230
5231 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5232 * src/gram.h, src/gram.c (semantic_parser): Remove.
5233 (rule_t): Remove the guard and guard_line members.
5234 * src/lex.h (token_t): remove tok_guard.
5235 * src/options.c (option_table): Remove %guard and %semantic_parser
5236 support.
5237 * src/output.c, src/output.h (guards_output): Remove.
5238 (prepare): Adjust.
5239 (token_definitions_output): Don't output the `T'
5240 tokens (???).
5241 (output_skeleton): Don't output the guards.
5242 * src/files.c, src/files.c (attrsfile): Remove.
5243 * src/reader.c (symbol_list): Remove the guard and guard_line
5244 members.
5245 Adjust dependencies.
5246 (parse_guard): Remove.
5247 * data/bison.hairy: Remove.
5248 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5249 BISON_HAIRY.
5250
5251 2002-05-02 Akim Demaille <akim@epita.fr>
5252
5253 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5254 (parse_guard): Rename the formal argument `stack_offset' as
5255 `rule_length', which is more readable.
5256 Adjust callers.
5257 (copy_at, copy_dollar): Instead of outputting the hard coded
5258 values of $$, $n and so forth, output invocation to b4_lhs_value,
5259 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5260 Note: this patch partially drops `semantic-parser' support: it
5261 always does `rule_length - n', where semantic parsers ought to
5262 always use `-n'.
5263 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5264 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5265
5266 2002-05-02 Akim Demaille <akim@epita.fr>
5267
5268 * configure.in (AC_INIT): Bump to 1.49b.
5269 (AM_INIT_AUTOMAKE): Short invocation.
5270
5271 2002-05-02 Akim Demaille <akim@epita.fr>
5272
5273 Version 1.49a.
5274
5275 2002-05-01 Akim Demaille <akim@epita.fr>
5276
5277 * src/skeleton.h: Remove.
5278
5279 2002-05-01 Akim Demaille <akim@epita.fr>
5280
5281 * src/skeleton.h: Fix the #endif.
5282 Reported by Magnus Fromreide.
5283
5284 2002-04-26 Paul Eggert <eggert@twinsun.com>
5285
5286 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5287 Define if we define YYSTYPE and YYLTYPE, respectively.
5288 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5289
5290 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5291
5292 * src/scan-skel.l: Postprocess quadrigraphs.
5293
5294 * src/reader.c (copy_character): New function, used to output
5295 single characters while replacing `[' and `]' with quadrigraphs, to
5296 avoid troubles with M4 quotes.
5297 (copy_comment): Output characters with copy_character.
5298 (read_additionnal_code): Likewise.
5299 (copy_string2): Likewise.
5300 (copy_definition): Likewise.
5301
5302 * tests/calc.at: Exercise M4 quoting.
5303
5304 2002-04-25 Akim Demaille <akim@epita.fr>
5305
5306 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5307 between `!' and the command.
5308 Reported by Paul Eggert.
5309
5310 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5311
5312 * tests/calc.at: Exercise prologue splitting.
5313
5314 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5315 `b4_post_prologue' instead of `b4_prologue'.
5316
5317 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5318 muscles.
5319 (output): Free pre_prologue_obstack and post_prologue_obstack.
5320 * src/files.h, src/files.c (attrs_obstack): Remove.
5321 (pre_prologue_obstack, post_prologue_obstack): New.
5322 * src/reader.c (copy_definition): Add a parameter to specify the
5323 obstack to fill, instead of using attrs_obstack unconditionally.
5324 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5325 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5326
5327 2002-04-23 Paul Eggert <eggert@twinsun.com>
5328
5329 * data/bison.simple: Remove unnecessary commentary and white
5330 space differences from 1_29-branch.
5331 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5332
5333 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5334 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5335 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5336 constructors or destructors.
5337
5338 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5339
5340 2002-04-23 Akim Demaille <akim@epita.fr>
5341
5342 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5343 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5344 location with columns.
5345 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5346 All reported by Paul Eggert.
5347
5348 2002-04-22 Akim Demaille <akim@epita.fr>
5349
5350 * src/reduce.c (dump_grammar): Move to...
5351 * src/gram.h, src/gram.c (grammar_dump): here.
5352 Be sure to separate long item numbers.
5353 Don't read the members of a rule's prec if its nil.
5354
5355 2002-04-22 Akim Demaille <akim@epita.fr>
5356
5357 * src/output.c (table_size, table_grow): New.
5358 (MAXTABLE): Remove, replace uses with table_size.
5359 (pack_vector): Instead of dying when the table is too big, grow it.
5360
5361 2002-04-22 Akim Demaille <akim@epita.fr>
5362
5363 * data/bison.simple (yyr1): Its type is that of a token number.
5364 * data/bison.c++ (r1_): Likewise.
5365 * tests/regression.at (Web2c Actions): Adjust.
5366
5367 2002-04-22 Akim Demaille <akim@epita.fr>
5368
5369 * src/reader.c (token_translations_init): 256 is now the default
5370 value for the error token, i.e., it will be assigned another
5371 number if the user assigned 256 to one of her tokens.
5372 (reader): Don't force 256 to error.
5373 * doc/bison.texinfo (Symbols): Adjust.
5374 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5375 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5376 etc. instead of 10, 20, 30 (which was used to `jump' over error
5377 (256) and undefined (2)).
5378
5379 2002-04-22 Akim Demaille <akim@epita.fr>
5380
5381 Propagate more token_number_t.
5382
5383 * src/gram.h (token_number_as_item_number)
5384 (item_number_as_token_number): New.
5385 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5386 Use it to create output_item_number_table and
5387 output_token_number_table.
5388 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5389 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5390 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5391 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5392
5393 2002-04-22 Akim Demaille <akim@epita.fr>
5394
5395 * src/output.h, src/output.c (get_lines_number): Remove.
5396
5397 2002-04-19 Akim Demaille <akim@epita.fr>
5398
5399 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5400 as Lex/Flex'.
5401 (Debugging): More details about enabling the debugging features.
5402 (Table of Symbols): Describe $$, $n, @$, and @n.
5403 Suggested by Tim Josling.
5404
5405 2002-04-19 Akim Demaille <akim@epita.fr>
5406
5407 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5408
5409 2002-04-10 Akim Demaille <akim@epita.fr>
5410
5411 * src/system.h: Rely on HAVE_LIMITS_H.
5412 Suggested by Paul Eggert.
5413
5414 2002-04-09 Akim Demaille <akim@epita.fr>
5415
5416 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5417 full stderr, and strip it according to the bison options, instead
5418 of composing the error message from different bits.
5419 This makes it easier to check for several error messages.
5420 Adjust all the invocations.
5421 Add an invocation exercising the error token.
5422 Add an invocation demonstrating a stupid error message.
5423 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5424 Adjust the tests.
5425 Error message are for stderr, not stdout.
5426
5427 2002-04-09 Akim Demaille <akim@epita.fr>
5428
5429 * src/gram.h, src/gram.c (error_token_number): Remove, use
5430 errtoken->number.
5431 * src/reader.c (reader): Don't specify the user token number (2)
5432 for $undefined, as it uselessly prevents using it.
5433 * src/gram.h (token_number_t): Move to...
5434 * src/symtab.h: here.
5435 (state_t.number): Is a token_number_t.
5436 * src/print.c, src/reader.c: Use undeftoken->number instead of
5437 hard coded 2.
5438 (Even though this 2 is not the same as above: the number of the
5439 undeftoken remains being 2, it is its user token number which
5440 might not be 2).
5441 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5442 `user_token_number_max'.
5443 Output `undef_token_number'.
5444 * data/bison.simple, data/bison.c++: Use them.
5445 Be sure to map invalid yylex return values to
5446 `undef_token_number'. This saves us from gratuitous SEGV.
5447
5448 * tests/conflicts.at (Solved SR Conflicts)
5449 (Unresolved SR Conflicts): Adjust.
5450 * tests/regression.at (Web2c Actions): Adjust.
5451
5452 2002-04-08 Akim Demaille <akim@epita.fr>
5453
5454 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5455 Adding #line.
5456 Remove the duplicate `typedefs'.
5457 (RhsNumberType): Fix the declaration and various other typos.
5458 Use __ofile__.
5459 * data/bison.simple: Use __ofile__.
5460 * src/scan-skel.l: Handle __ofile__.
5461
5462 2002-04-08 Akim Demaille <akim@epita.fr>
5463
5464 * src/gram.h (item_number_t): New, the type of item numbers in
5465 RITEM. Note that it must be able to code symbol numbers as
5466 positive number, and the negation of rule numbers as negative
5467 numbers.
5468 Adjust all dependencies (pretty many).
5469 * src/reduce.c (rule): Remove this `short *' pointer: use
5470 item_number_t.
5471 * src/system.h (MINSHORT, MAXSHORT): Remove.
5472 Include `limits.h'.
5473 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5474 (shortcpy): Remove.
5475 (MAXTABLE): Move to...
5476 * src/output.c (MAXTABLE): here.
5477 (prepare_rules): Use output_int_table to output rhs.
5478 * data/bison.simple, data/bison.c++: Adjust.
5479 * tests/torture.at (Big triangle): Move the limit from 254 to
5480 500.
5481 * tests/regression.at (Web2c Actions): Ajust.
5482
5483 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5484 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5485 passes, but produces negative #line number, once fixed, GCC is
5486 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5487 C), it passes.
5488 * src/state.h (state_h): Code input lines on ints, not shorts.
5489
5490 2002-04-08 Akim Demaille <akim@epita.fr>
5491
5492 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5493 and then the grammar.
5494
5495 2002-04-08 Akim Demaille <akim@epita.fr>
5496
5497 * src/system.h: No longer using strndup.
5498
5499 2002-04-07 Akim Demaille <akim@epita.fr>
5500
5501 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5502 * src/output.c (output_table_data): Return the longest number.
5503 (prepare_tokens): Output `token_number_max').
5504 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5505 New.
5506 Use them to define yy_token_number_type/TokenNumberType.
5507 Use this type for yytranslate.
5508 * tests/torture.at (Big triangle): Push the limit from 124 to
5509 253.
5510 * tests/regression.at (Web2c Actions): Adjust.
5511
5512 2002-04-07 Akim Demaille <akim@epita.fr>
5513
5514 * tests/torture.at (Big triangle): New.
5515 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5516 * tests/existing.at: here.
5517
5518 2002-04-07 Akim Demaille <akim@epita.fr>
5519
5520 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5521 nritems.
5522 Adjust dependencies.
5523
5524 2002-04-07 Akim Demaille <akim@epita.fr>
5525
5526 * src/reader.c: Normalize increments to prefix form.
5527
5528 2002-04-07 Akim Demaille <akim@epita.fr>
5529
5530 * src/reader.c, symtab.c: Remove debugging code.
5531
5532 2002-04-07 Akim Demaille <akim@epita.fr>
5533
5534 Rename all the `bucket's as `symbol_t'.
5535
5536 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5537 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5538 * src/symtab.c, src/symtab.h (bucket): Rename as...
5539 (symbol_t): this.
5540 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5541 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5542 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5543 (buckets_new, buckets_free, buckets_do): Rename as...
5544 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5545 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5546 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5547 (symbols_new, symbols_free, symbols_do): these.
5548
5549 2002-04-07 Akim Demaille <akim@epita.fr>
5550
5551 Use lib/hash for the symbol table.
5552
5553 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5554 EOF.
5555 * src/lex.c (lex): Set the `number' member of new terminals.
5556 * src/reader.c (bucket_check_defined, bucket_make_alias)
5557 (bucket_check_alias_consistence, bucket_translation): New.
5558 (reader, grammar_free, readgram, token_translations_init)
5559 (packsymbols): Adjust.
5560 (reader): Number the predefined tokens.
5561 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5562 for predefined tokens.
5563 * src/symtab.h (bucket): Remove all the hash table related
5564 members.
5565 * src/symtab.c (symtab): Replace by...
5566 (bucket_table): this.
5567 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5568 (buckets_new, buckets_do): New.
5569
5570 2002-04-07 Akim Demaille <akim@epita.fr>
5571
5572 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5573 (start_symbol, max_user_token_number, semantic_parser)
5574 (error_token_number): Initialize.
5575 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5576 Initialize.
5577 (reader): Don't.
5578 (errtoken, eoftoken, undeftoken, axiom): Extern.
5579
5580 2002-04-07 Akim Demaille <akim@epita.fr>
5581
5582 * src/gram.h (rule_s): prec and precsym are now pointers
5583 to the bucket giving the priority/associativity.
5584 Member `associativity' removed: useless.
5585 * src/reduce.c, src/conflicts.c: Adjust.
5586
5587 2002-04-07 Akim Demaille <akim@epita.fr>
5588
5589 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5590 Properly escape the symbols' TAG when outputting them.
5591
5592 2002-04-07 Akim Demaille <akim@epita.fr>
5593
5594 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5595
5596 2002-04-07 Akim Demaille <akim@epita.fr>
5597
5598 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5599 (LArule): this, which is an array to rule_t*.
5600 * src/print.c, src/conflicts.c: Adjust.
5601
5602 2002-04-07 Akim Demaille <akim@epita.fr>
5603
5604 * src/gram.h (rule_t): Rename `number' as `user_number'.
5605 `number' is a new member.
5606 Adjust dependencies.
5607 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5608
5609 2002-04-07 Akim Demaille <akim@epita.fr>
5610
5611 As a result of the previous patch, it is no longer needed
5612 to reorder ritem itself.
5613
5614 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5615
5616 2002-04-07 Akim Demaille <akim@epita.fr>
5617
5618 Be sure never to walk through RITEMS, but use only data related to
5619 the rules themselves. RITEMS should be banished.
5620
5621 * src/output.c (output_token_translations): Rename as...
5622 (prepare_tokens): this.
5623 In addition to `translate', prepare the muscles `tname' and
5624 `toknum', which were handled by...
5625 (output_rule_data): this.
5626 Remove, and move the remainder of its outputs into...
5627 (prepare_rules): this new routines, which also merges content from
5628 (output_gram): this.
5629 (prepare_rules): Be sure never to walk through RITEMS.
5630 (output_stos): Rename as...
5631 (prepare_stos): this.
5632 (output): Always invoke prepare_states, after all, just don't use it
5633 in the output if you don't need it.
5634
5635 2002-04-07 Akim Demaille <akim@epita.fr>
5636
5637 * src/LR0.c (new_state): Display `nstates' as the name of the
5638 newly created state.
5639 Adjust to initialize first_state and last_state if needed.
5640 Be sure to distinguish the initial from the final state.
5641 (new_states): Create the itemset of the initial state, and use
5642 new_state.
5643 * src/closure.c (closure): Now that the initial state has its
5644 items properly set, there is no need for a special case when
5645 creating `ruleset'.
5646
5647 As a result, now the rule 0, reducing to $axiom, is visible in the
5648 outputs. Adjust the test suite.
5649
5650 * tests/conflicts.at (Solved SR Conflicts)
5651 (Unresolved SR Conflicts): Adjust.
5652 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5653 * tests/conflicts.at (S/R in initial): New.
5654
5655 2002-04-07 Akim Demaille <akim@epita.fr>
5656
5657 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5658 the RHS of the rules.
5659 * src/output.c (output_gram): Likewise.
5660
5661 2002-04-07 Akim Demaille <akim@epita.fr>
5662
5663 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5664 bucket.
5665 Adjust all dependencies.
5666 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5667 `number' of the buckets too.
5668 * src/gram.h: Include `symtab.h'.
5669 (associativity): Move to...
5670 * src/symtab.h: here.
5671 No longer include `gram.h'.
5672
5673 2002-04-07 Akim Demaille <akim@epita.fr>
5674
5675 * src/gram.h, src/gram.c (rules_rhs_length): New.
5676 (ritem_longest_rhs): Use it.
5677 * src/gram.h (rule_t): `number' is a new member.
5678 * src/reader.c (packgram): Set it.
5679 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5680 the end of `rules', and count them out of `nrules'.
5681 (reduce_output, dump_grammar): Adjust.
5682 * src/print.c (print_grammar): It is no longer needed to check for
5683 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5684 * tests/reduce.at (Reduced Automaton): New test.
5685
5686 2002-04-07 Akim Demaille <akim@epita.fr>
5687
5688 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5689 lacking `+ 1' to nrules, Bison reported as useless a token if it
5690 was used solely to set the precedence of the last rule...
5691
5692 2002-04-07 Akim Demaille <akim@epita.fr>
5693
5694 * data/bison.c++, data/bison.simple: Don't output the current file
5695 name in #line, to avoid useless diffs between two identical
5696 outputs under different names.
5697
5698 2002-04-07 Akim Demaille <akim@epita.fr>
5699
5700 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5701 Normalize loops to using `< nrules + 1', not `<= nrules'.
5702
5703 2002-04-07 Akim Demaille <akim@epita.fr>
5704
5705 * TODO: Update.
5706
5707 2002-04-07 Akim Demaille <akim@epita.fr>
5708
5709 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5710 bucket.value as bucket.number.
5711
5712 2002-04-07 Akim Demaille <akim@epita.fr>
5713
5714 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5715 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5716 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5717 RHS, instead of being an index in RITEMS.
5718
5719 2002-04-04 Paul Eggert <eggert@twinsun.com>
5720
5721 * doc/bison.texinfo: Update copyright date.
5722 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5723 (Symbols): Warn about running Bison in one character set,
5724 but compiling and/or running in an incompatible one.
5725 Warn about character code 256, too.
5726
5727 2002-04-03 Paul Eggert <eggert@twinsun.com>
5728
5729 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5730 YYERROR_VERBOSE is nonzero, not whether it is defined.
5731
5732 Merge changes from bison-1_29-branch.
5733
5734 2002-03-20 Paul Eggert <eggert@twinsun.com>
5735
5736 Merge fixes from Debian bison_1.34-1.diff.
5737
5738 * configure.in (AC_PREREQ): 2.53.
5739
5740 2002-03-20 Akim Demaille <akim@epita.fr>
5741
5742 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5743
5744 2002-03-19 Paul Eggert <eggert@twinsun.com>
5745
5746 * src/bison.simple (YYCOPY): New macro.
5747 (YYSTACK_RELOCATE): Use it.
5748 Remove Type arg; no longer needed. All callers changed.
5749 (yymemcpy): Remove; no longer needed.
5750
5751 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5752 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5753
5754 2002-03-19 Akim Demaille <akim@epita.fr>
5755
5756 Test and fix the #line outputs.
5757
5758 * tests/atlocal.at (GCC): New.
5759 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5760 (Prologue synch line, ,%union synch line, Postprologue synch line)
5761 (Action synch line, Epilogue synch line): New tests.
5762 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5763 * data/bison.simple, data/bison.c++: Use it.
5764
5765 2002-03-19 Akim Demaille <akim@epita.fr>
5766
5767 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5768 (Solved SR Conflicts, %expect not enough, %expect right)
5769 (%expect too much): Move to...
5770 * tests/conflicts.at: this new file.
5771
5772 2002-03-19 Akim Demaille <akim@epita.fr>
5773
5774 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5775 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5776 that we can move to enums for instance.
5777 * src/output.c (token_definitions_output): Output a list of
5778 `token-name, token-number' instead of the #define.
5779 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5780
5781 2002-03-14 Akim Demaille <akim@epita.fr>
5782
5783 Use Gettext 0.11.1.
5784
5785 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5786
5787 * data/bison.c++: Make the user able to add members to the generated
5788 parser by subclassing.
5789
5790 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5791
5792 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5793 a character.
5794 Reported by Nicolas Tisserand and Nicolas Burrus.
5795
5796 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5797
5798 * src/reader.c: Warn about lacking semi-colons, do not complain.
5799
5800 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5801
5802 * data/bison.c++: Remove a debug line.
5803
5804 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5805
5806 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5807 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5808 provide a default implementation.
5809
5810 2002-03-04 Akim Demaille <akim@epita.fr>
5811
5812 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5813 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5814 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5815 * tests/semantic.at (Parsing Guards): Similarly.
5816 * src/reader.at (readgram): Complain if the last rule is not ended
5817 with a semi-colon.
5818
5819 2002-03-04 Akim Demaille <akim@epita.fr>
5820
5821 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5822 * src/closure.c: here.
5823 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5824 RTC.
5825 * src/warshall.h, src/warshall.c: Remove.
5826 * tests/sets.at (Broken Closure): Adjust.
5827
5828 2002-03-04 Akim Demaille <akim@epita.fr>
5829
5830 * src/output.c (output_skeleton): tempdir is const.
5831 bytes_read is unused.
5832
5833 2002-03-04 Akim Demaille <akim@epita.fr>
5834
5835 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5836 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5837 Update.
5838 From Michael Hayes.
5839
5840 2002-03-04 Akim Demaille <akim@epita.fr>
5841
5842 * src/closure.c (closure): `r' is unused.
5843
5844 2002-03-04 Akim Demaille <akim@epita.fr>
5845
5846 * tests/sets.at (Broken Closure): Add the ending `;'.
5847 * src/reader.at (readgram): Complain if a rule is not ended with a
5848 semi-colon.
5849
5850 2002-03-04 Akim Demaille <akim@epita.fr>
5851
5852 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5853 (count_sr_conflicts): Use bitset_count.
5854 * src/reduce.c (inaccessable_symbols): Ditto.
5855 (bits_size): Remove.
5856 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5857
5858 2002-03-04 Akim Demaille <akim@epita.fr>
5859
5860 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5861 * src/reduce.c: Remove the `bitset_zero's following the
5862 `bitset_create's, as now it is performed by the latter.
5863
5864 2002-03-04 Akim Demaille <akim@epita.fr>
5865
5866 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5867 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5868 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5869 latest sources from Michael.
5870
5871 2002-03-04 Akim Demaille <akim@epita.fr>
5872
5873 * src/output.c (output): Don't free the grammar.
5874 * src/reader.c (grammar_free): New.
5875 * src/main.c (main): Call it and don't free symtab here.
5876
5877 2002-03-04 Akim Demaille <akim@epita.fr>
5878
5879 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5880 before returning.
5881 Reported by Benoit Perrot.
5882
5883 2002-03-04 Akim Demaille <akim@epita.fr>
5884
5885 Use bitset operations when possible, not loops over bits.
5886
5887 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5888 bitset_or.
5889 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5890 * src/reduce.c (useless_nonterminals): Formatting changes.
5891 * src/warshall.c (TC): Use bitset_or.
5892
5893 2002-03-04 Akim Demaille <akim@epita.fr>
5894
5895 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5896 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5897 Ditto.
5898
5899 2002-03-04 Akim Demaille <akim@epita.fr>
5900
5901 * src/lalr.c (F): Now a bitset*.
5902 Adjust all dependencies.
5903
5904 2002-03-04 Akim Demaille <akim@epita.fr>
5905
5906 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5907 Adjust all dependencies.
5908
5909 2002-03-04 Akim Demaille <akim@epita.fr>
5910
5911 * src/L0.c, src/LR0.h (nstates): Be size_t.
5912 Adjust comparisons (signed vs unsigned).
5913 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5914 bitset*.
5915 Adjust all dependencies.
5916
5917 2002-03-04 Akim Demaille <akim@epita.fr>
5918
5919 * src/closure.c (firsts): Now, also a bitset.
5920 Adjust all dependencies.
5921 (varsetsize): Remove, now unused.
5922 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5923
5924 2002-03-04 Akim Demaille <akim@epita.fr>
5925
5926 * src/print.c: Convert to use bitset.h, not hand coded iterations
5927 over ints.
5928
5929 2002-03-04 Akim Demaille <akim@epita.fr>
5930
5931 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5932
5933 2002-03-04 Akim Demaille <akim@epita.fr>
5934
5935 * src/closure.c (ruleset): Be a bitset.
5936 (rulesetsize): Remove.
5937
5938 2002-03-04 Akim Demaille <akim@epita.fr>
5939
5940 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5941 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5942 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5943 * src/closure.c (fderives): Be an array of bitsets.
5944
5945 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5946
5947 * data/bison.c++: Merge the two generated headers. Insert a copyright
5948 notice in each output file.
5949
5950 2002-02-28 Akim Demaille <akim@epita.fr>
5951
5952 * data/bison.c++: Copy the prologue of bison.simple to fetch
5953 useful M4 definitions, such as b4_header_guard.
5954
5955 2002-02-25 Akim Demaille <akim@epita.fr>
5956
5957 * src/getargs.c (version): Give the name of the authors, and use a
5958 translator friendly scheme for the bgr
5959 copyright notice.
5960
5961 2002-02-25 Akim Demaille <akim@epita.fr>
5962
5963 * src/output.c (header_output): Remove, now handled completely via
5964 M4.
5965
5966 2002-02-25 Akim Demaille <akim@epita.fr>
5967
5968 * m4/m4.m4: New, from CVS Autoconf.
5969 * configure.in: Invoke it.
5970 * src/output.c (output_skeleton): Use its result instead of the
5971 hard coded name.
5972
5973 2002-02-25 Akim Demaille <akim@epita.fr>
5974
5975 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5976 Fileutils 4.1.5.
5977 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5978 * src/output.c (output_skeleton): Use mkstemp to create a real
5979 temporary file.
5980 Move the filling of `skeleton' and its muscle to...
5981 (prepare): here.
5982 (output): Move the definition of the prologue muscle to...
5983 (prepare): here.
5984 * src/system.h (DEFAULT_TMPDIR): New.
5985
5986 2002-02-14 Paul Eggert <eggert@twinsun.com>
5987
5988 Remove the support for C++ namespace cleanliness; it was
5989 causing more problems than it was curing, since it didn't work
5990 properly on some nonstandard C++ compilers. This can wait
5991 for a proper C++ parser.
5992
5993 * NEWS: Document this.
5994 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5995 of C++, as it's treated like C now.
5996 * src/bison.simple (YYSTD): Remove.
5997 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5998 Treat C++ just like Standard C instead of trying to support
5999 namespace cleanliness.
6000
6001 2002-02-14 Akim Demaille <akim@epita.fr>
6002
6003 * tests/regression.at (else): Adjust to Andreas' change.
6004
6005 2002-02-14 Akim Demaille <akim@epita.fr>
6006
6007 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
6008
6009 2002-02-13 Andreas Schwab <schwab@suse.de>
6010
6011 * src/output.c (output_rule_data): Don't output NULL, it might
6012 not be defined yet.
6013
6014 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6015
6016 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6017 (Copyright notice): Update.
6018
6019 2002-02-11 Akim Demaille <akim@epita.fr>
6020
6021 * tests/regression.at (%nonassoc and eof): Don't include
6022 nonportable headers.
6023
6024 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6025
6026 * data/bison.c++: Correct error recovery. Make the user able to
6027 initialize the starting location.
6028
6029 2002-02-07 Akim Demaille <akim@epita.fr>
6030
6031 * tests/input.at: New.
6032
6033 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6034
6035 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6036 more consistent when naming methods and variables. Put preprocessor
6037 directives around tables only needed for debugging.
6038
6039 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6040
6041 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6042 C++ parsers.
6043 (yy::b4_name::parse): Use print_.
6044
6045 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6046
6047 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6048
6049 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6050
6051 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6052 C++ parsers.
6053 (yy::b4_name::parse): Build verbose error messages, and use error_.
6054
6055 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6056
6057 * data/bison.c++: Fix m4 quoting in comments.
6058
6059 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6060
6061 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6062 not expanded by m4.
6063
6064 2002-02-05 Akim Demaille <akim@epita.fr>
6065
6066 * data/bison.c++: Adjust to the M4 back end.
6067 More is certainly needed.
6068
6069 2002-02-05 Akim Demaille <akim@epita.fr>
6070
6071 Give a try to M4 as a back end.
6072
6073 * lib/readpipe.c: New, from wdiff.
6074 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6075 BISON_HAIRY.
6076 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6077 specific values. Now it is m4 that performs the lookup.
6078 * src/parse-skel.y: Remove.
6079 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6080 * src/output.c (actions_output, guards_output)
6081 (token_definitions_output): No longer keeps track of the output
6082 line number, hence remove the second argument.
6083 (guards_output): Check against the guard member of a rule, not the
6084 action member.
6085 Adjust callers.
6086 (output_skeleton): Don't look for the skeleton location, let m4 do
6087 that.
6088 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6089 file will be used.
6090 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6091 (prepare): Given that for the time being changesyntax is not
6092 usable in M4, rename the muscles using `-' to `_'.
6093 Define `defines_flag', `output_parser_name' and `output_header_name'.
6094 * src/output.h (actions_output, guards_output)
6095 (token_definitions_output): Adjust prototypes.
6096 * src/scan-skel.l: Instead of scanning the skeletons, it now
6097 processes the output of m4: `__oline__' and `#output'.
6098 * data/bison.simple: Adjust to be used by M4(sugar).
6099 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6100 to date.
6101 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6102 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6103 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6104 shamelessly stolen from CVS Autoconf.
6105
6106 2002-02-05 Akim Demaille <akim@epita.fr>
6107
6108 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6109 * configure.in: Check for the declarations of free and malloc.
6110 * src/muscle_tab.c: Adjust.
6111
6112 2002-02-05 Akim Demaille <akim@epita.fr>
6113
6114 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6115 which have no values.
6116
6117 2002-02-05 Akim Demaille <akim@epita.fr>
6118
6119 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6120 * data/: here.
6121
6122 2002-01-29 Paul Eggert <eggert@twinsun.com>
6123
6124 * src/bison.simple (YYSIZE_T): Do not define merely because
6125 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6126 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6127
6128 2002-01-27 Akim Demaille <akim@epita.fr>
6129
6130 Fix `%nonassoc and eof'.
6131
6132 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6133 which were not properly copied! Replace
6134 memcpy (res->errs, src->errs, src->nerrs);
6135 with
6136 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6137 !!!
6138 * tests/regression.at (%nonassoc and eof): Adjust to newest
6139 Autotest: `.' is not in the PATH.
6140
6141 2002-01-27 Akim Demaille <akim@epita.fr>
6142
6143 * tests/sets.at (AT_EXTRACT_SETS): New.
6144 (Nullable): Use it.
6145 (Firsts): New.
6146
6147 2002-01-26 Akim Demaille <akim@epita.fr>
6148
6149 * tests/actions.at, tests/calc.at, tests/headers.at,
6150 * tests/torture.at: Adjust to the newest Autotest which no longer
6151 forces `.' in the PATH.
6152
6153 2002-01-25 Akim Demaille <akim@epita.fr>
6154
6155 * tests/regression.at (%nonassoc and eof): New.
6156 Suggested by Robert Anisko.
6157
6158 2002-01-24 Akim Demaille <akim@epita.fr>
6159
6160 Bison dumps core when trying to complain about broken input files.
6161 Reported by Cris van Pelt.
6162
6163 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6164 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6165 into...
6166 (Invalid inputs): Strengthen: exercise parse_percent_token.
6167
6168 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6169
6170 * src/Makefile.am: Add bison.c++.
6171 * src/bison.c++: New skeleton.
6172
6173 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6174
6175 * po/it.po: New.
6176
6177 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6178
6179 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6180
6181 2002-01-20 Marc Autret <marc@gnu.org>
6182
6183 * src/files.c (compute_output_file_names): Fix
6184
6185 2002-01-20 Marc Autret <marc@gnu.org>
6186
6187 * tests/output.at: New test.
6188 * src/files.c (compute_base_names): Don't map extensions when
6189 the YACC flag is set, use defaults.
6190 Reported by Evgeny Stambulchik.
6191
6192 2002-01-20 Marc Autret <marc@gnu.org>
6193
6194 * src/system.h: Need to define __attribute__ away for non-GCC
6195 compilers as well (i.e. the vendor C compiler).
6196 Suggested by Albert Chin-A-Young.
6197
6198 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6199
6200 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6201 canonical definition.
6202 * src/system.h: Use the canonical definition for PARAMS (avoids
6203 a conflict with the macro from lib/hash.h).
6204
6205 2002-01-11 Akim Demaille <akim@epita.fr>
6206
6207 * configure.in: Use AC_FUNC_STRNLEN.
6208 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6209
6210 2002-01-09 Akim Demaille <akim@epita.fr>
6211
6212 * src/files.c, src/files.h (output_infix): New.
6213 (tab_extension): Remove.
6214 (compute_base_names): Compute the former, drop the latter.
6215 * src/output.c (prepare): Insert the muscles `output-infix', and
6216 `output-suffix'.
6217 * src/parse-skel.y (string, string.1): New.
6218 (section.header): Use it.
6219 (section.yacc): Remove.
6220 (prefix): Remove too.
6221 * src/scan-skel.l: Adjust.
6222 * src/bison.simple, src/bison.hairy: Adjust.
6223
6224 2002-01-09 Akim Demaille <akim@epita.fr>
6225
6226 * configure.in (WERROR_CFLAGS): Compute it.
6227 * src/Makefile.am (CFLAGS): Pass it.
6228 * tests/atlocal.in (CFLAGS): Idem.
6229 * src/files.c: Fix a few warnings.
6230 (get_extension_index): Remove, unused.
6231
6232 2002-01-08 Akim Demaille <akim@epita.fr>
6233
6234 * src/getargs.c (AS_FILE_NAME): New.
6235 (getargs): Use it to convert DOSish file names.
6236 * src/files.c (base_name): Rename as full_base_name to avoid
6237 clashes with `base_name ()'.
6238 (filename_split): New.
6239 (compute_base_names): N-th rewrite, using filename_split.
6240
6241 2002-01-08 Akim Demaille <akim@epita.fr>
6242
6243 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6244 New, stolen from the Fileutils 4.1.
6245 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6246 * configure.in: Check for the presence of memrchr, and of its
6247 prototype.
6248
6249 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6250
6251 * lib/hash.h (__P): Added definition for this macro.
6252 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6253 BUILT_SOURCES, to ensure they are generated first.
6254 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6255 %error-verbose to allow bootstrapping with bison 1.30x.
6256
6257 2002-01-06 Akim Demaille <akim@epita.fr>
6258
6259 * src/reader.c (parse_braces): Don't fetch the next char, the
6260 convention is to fetch on entry.
6261 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6262 'switch' without a following semicolon.
6263 * tests/regression.at (braces parsing): New.
6264
6265 2002-01-06 Akim Demaille <akim@epita.fr>
6266
6267 Bison is dead wrong in its RR conflict reports.
6268
6269 * tests/torture.at (GNU Cim Grammar): New.
6270 * src/conflicts.c (count_rr_conflicts): Fix.
6271
6272 2002-01-06 Akim Demaille <akim@epita.fr>
6273
6274 Creating package.m4 from configure.ac causes too many problems.
6275
6276 * tests/Makefile.am (package.m4): Create it by hand,
6277 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6278
6279 2002-01-06 Akim Demaille <akim@epita.fr>
6280
6281 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6282 skeleton.h.
6283
6284 2002-01-04 Paul Eggert <eggert@twinsun.com>
6285
6286 * doc/bison.texinfo (Debugging):
6287 Remove YYSTDERR; it's no longer defined or used.
6288 Also, s/cstdio.h/cstdio/.
6289
6290 2002-01-03 Akim Demaille <akim@epita.fr>
6291
6292 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6293
6294 2002-01-03 Akim Demaille <akim@epita.fr>
6295
6296 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6297 tracing code to --trace, wait for a better --trace option, with
6298 args.
6299
6300 2002-01-03 Akim Demaille <akim@epita.fr>
6301
6302 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6303 The ISO C++ standard is extremely clear about it: stderr is
6304 considered a macro, not a regular symbol (see table 94 `Header
6305 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6306 Therefore std:: does not apply to it. It still does with fprintf.
6307 Also, s/cstdio.h/cstdio/.
6308
6309 2002-01-03 Akim Demaille <akim@epita.fr>
6310
6311 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6312 for non system headers.
6313
6314 2002-01-02 Akim Demaille <akim@epita.fr>
6315
6316 Equip the skeleton chain with location tracking, runtime trace,
6317 pure parser and scanner.
6318
6319 * src/parse-skel.y: Request a pure parser, locations, and prefix
6320 renaming.
6321 (%union): Having several members with the same type does not help
6322 type mismatches, simplify.
6323 (YYPRINT, yyprint): New.
6324 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6325 (skel_error): this.
6326 Handle locations.
6327 * src/scan-skel.l: Adjust to these changes.
6328 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6329 (LOCATION_PRINT, skel_control_t): New.
6330
6331 2001-12-30 Akim Demaille <akim@epita.fr>
6332
6333 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6334 replace `gb' with BLANKS.
6335 * src/scan-skel.l: Adjust.
6336
6337 2001-12-30 Akim Demaille <akim@epita.fr>
6338
6339 * src/system.h: We don't need nor want bcopy.
6340 Throw away MS-DOS crap: we don't need getpid.
6341 * configure.in: We don't need strndup. It was even causing
6342 problems: because Flex includes the headers *before* us,
6343 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6344 not visible.
6345 * lib/xstrndup.c: New.
6346 * src/scan-skel.l: Use it.
6347 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6348 * src/parse-skel.y: Use %directives instead of #defines.
6349
6350 2001-12-30 Akim Demaille <akim@epita.fr>
6351
6352 * src/skeleton.h: New.
6353 * src/output.c (output_parser, output_master_parser): Remove, dead
6354 code.
6355 * src/output.h (get_lines_number, actions_output, guards_output)
6356 (token_definitions_output): Prototype them.
6357 * src/parse-skel.y: Add the license notice.
6358 Include output.h and skeleton.h.
6359 (process_skeleton): Returns void, and takes a single parameter.
6360 * src/scan-skel.l: Add the license notice.
6361 Include skeleton.h.
6362 Don't use %option yylineno: it seems that then Flex imagines
6363 REJECT has been used, and therefore it won't reallocate its
6364 buffers (which makes no other sense to me than a bug). It results
6365 in warnings for `unused: yy_flex_realloc'.
6366
6367 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6368
6369 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6370 (MUSCLE_INSERT_PREFIX): ...to there.
6371 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6372 (MUSCLE_INSERT_PREFIX): Move from here...
6373
6374 * src/bison.hairy: Add a section directive. Put braces around muscle
6375 names. This parser skeleton is still broken, but Bison should not
6376 choke on a bad muscle 'syntax'.
6377 * src/bison.simple: Add a section directive. Put braces around muscle
6378 names.
6379
6380 * src/files.h (strsuffix, stringappend): Add declarations.
6381 (tab_extension): Add declaration.
6382 (short_base_name): Add declaration.
6383
6384 * src/files.c (strsuffix, stringappend): No longer static. These
6385 functions are used in the skeleton parser.
6386 (tab_extension): New.
6387 (compute_base_names): Use the computations done in this function
6388 to guess if the generated parsers should have '.tab' in their
6389 names.
6390 (short_base_name): No longer static.
6391
6392 * src/output.c (output_skeleton): New.
6393 (output): Disable call to output_master_parser, and give a try to
6394 a new skeleton handling system.
6395 (guards_output, actions_output): No longer static.
6396 (token_definitions_output, get_lines_number): No longer static.
6397
6398 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6399
6400 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6401 parse-skel.y.
6402
6403 * src/parse-skel.y: New file.
6404 * src/scan-skel.l: New file.
6405
6406 2001-12-29 Akim Demaille <akim@epita.fr>
6407
6408 %name-prefix is broken.
6409
6410 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6411 Adjust all dependencies.
6412 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6413 %name-prefix.
6414
6415 Renaming yylval but not yylloc is not consistent. Now we do.
6416
6417 * src/bison.simple: Prefix yylloc if used.
6418 * doc/bison.texinfo (Decl Summary): Document that.
6419
6420 2001-12-29 Akim Demaille <akim@epita.fr>
6421
6422 * doc/bison.texinfo: Promote `%long-directive' over
6423 `%long_directive'.
6424 Remove all references to fixed-output-files, yacc is enough.
6425
6426 2001-12-29 Akim Demaille <akim@epita.fr>
6427
6428 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6429 user prologue. These are defaults.
6430 * tests/actions.at (Mid-rule actions): Make sure the user can
6431 define YYDEBUG and YYERROR_VERBOSE.
6432
6433 2001-12-29 Akim Demaille <akim@epita.fr>
6434
6435 * src/output.c (header_output): Don't forget to export YYLTYPE and
6436 yylloc.
6437 * tests/headers.at (export YYLTYPE): New, make sure it does.
6438 * tests/regression.at (%union and --defines, Invalid CPP headers):
6439 Move to...
6440 * tests/headers.at: here.
6441
6442 2001-12-29 Akim Demaille <akim@epita.fr>
6443
6444 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6445
6446 2001-12-29 Akim Demaille <akim@epita.fr>
6447
6448 * tests/actions.at (Mid-rule actions): Output on a single line
6449 instead of several.
6450
6451 2001-12-29 Akim Demaille <akim@epita.fr>
6452
6453 * doc/bison.texinfo: Formatting changes.
6454
6455 2001-12-29 Akim Demaille <akim@epita.fr>
6456
6457 Don't store the token defs in a muscle, just be ready to output it
6458 on command. Now possible via `symbols'. Fixes a memory leak.
6459
6460 * src/output.c (token_definitions_output): New.
6461 (output_parser, header_output): Use it.
6462 * src/reader.c (symbols_save): Remove.
6463
6464 2001-12-29 Akim Demaille <akim@epita.fr>
6465
6466 * src/bison.simple: Do not provide a default for YYSTYPE and
6467 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6468 default.
6469
6470 2001-12-29 Akim Demaille <akim@epita.fr>
6471
6472 Mid-rule actions are simply... ignored!
6473
6474 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6475 the empty-rule associated to the dummy symbol, not to the host
6476 rule.
6477 * tests/actions.at (Mid-rule actions): New.
6478
6479 2001-12-29 Akim Demaille <akim@epita.fr>
6480
6481 Memory leak.
6482
6483 * src/reader.c (reader): Free grammar.
6484
6485 2001-12-29 Akim Demaille <akim@epita.fr>
6486
6487 Memory leak.
6488
6489 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6490 since it allocates it for each state, although only one is needed.
6491 (allocate_storage): Do it here.
6492
6493 2001-12-29 Akim Demaille <akim@epita.fr>
6494
6495 * src/options.h, src/options.c (create_long_option_table): Rename
6496 as...
6497 (long_option_table_new): this, with a clearer prototype.
6498 (percent_table): Remove, unused,
6499 * src/getargs.c (getargs): Adjust.
6500
6501 2001-12-29 Akim Demaille <akim@epita.fr>
6502
6503 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6504 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6505 as states.
6506
6507 2001-12-29 Akim Demaille <akim@epita.fr>
6508
6509 * src/lalr.c (build_relations): Rename `states' as `states1'.
6510 Sorry, I don't understand exactly what it is, no better name...
6511
6512 2001-12-29 Akim Demaille <akim@epita.fr>
6513
6514 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6515 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6516 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6517 as rules.
6518
6519 2001-12-29 Akim Demaille <akim@epita.fr>
6520
6521 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6522 ago.
6523
6524 2001-12-29 Akim Demaille <akim@epita.fr>
6525
6526 * src/reader.c, src/reader.h (user_toknums): Remove.
6527 Adjust all users to use symbols[i]->user_token_number.
6528
6529 2001-12-29 Akim Demaille <akim@epita.fr>
6530
6531 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6532 Adjust all users to use symbols[i]->prec or ->assoc.
6533
6534 2001-12-29 Akim Demaille <akim@epita.fr>
6535
6536 * src/reader.c, src/reader.h (tags): Remove.
6537 Adjust all users to use symbols[i]->tag.
6538
6539 2001-12-29 Akim Demaille <akim@epita.fr>
6540
6541 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6542 and rule_table.
6543 * src/reader.c (packsymbols): Fill this table.
6544 Drop sprec.
6545 * src/conflicts.c (resolve_sr_conflict): Adjust.
6546 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6547 single table.
6548 Use symbols[i]->tag instead of tags[i].
6549
6550 2001-12-29 Akim Demaille <akim@epita.fr>
6551
6552 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6553 In addition, put a comment in there, to replace...
6554 * tests/regression.at (%union and C comments): Remove.
6555
6556 2001-12-29 Akim Demaille <akim@epita.fr>
6557
6558 * tests/regression.at (Web2c Actions): Blindly move the actual
6559 output as expected output. The contents *seem* right to me, but I
6560 can't pretend reading perfectly parser tables... Nonetheless, all
6561 the other tests pass correctly, the table look OK, even though the
6562 presence of `$axiom' is to be noted: AFAICS it is useless (but
6563 harmless).
6564
6565 2001-12-29 Akim Demaille <akim@epita.fr>
6566
6567 * src/reader.c (readgram): Don't add the rule 0 if there were no
6568 rules read. In other words, add it _after_ having performed
6569 grammar sanity checks.
6570 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6571
6572 2001-12-29 Akim Demaille <akim@epita.fr>
6573
6574 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6575 visible, and some states have now a different number.
6576
6577 2001-12-29 Akim Demaille <akim@epita.fr>
6578
6579 * src/reader.c (readgram): Bind the initial rule's lineno to that
6580 of the first rule.
6581 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6582 (Solved SR Conflicts): Adjust rule 0's line number.
6583
6584 2001-12-29 Akim Demaille <akim@epita.fr>
6585
6586 Fix the `GAWK Grammar' failure.
6587
6588 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6589 the reductions of the first state which was mistakenly confused
6590 with the final state because precisely final_state was initialized
6591 to 0.
6592 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6593 now noticed by Bison.
6594 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6595 have a reduction on $default.
6596
6597 2001-12-29 Akim Demaille <akim@epita.fr>
6598
6599 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6600 rule line numbers.
6601 * src/closure.c (print_closure): Likewise.
6602 * src/derives.c (print_derives): Likewise.
6603 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6604 now.
6605
6606 2001-12-29 Akim Demaille <akim@epita.fr>
6607
6608 * src/lalr.c (lookaheads_print): New.
6609 (lalr): Call it when --trace-flag.
6610 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6611 are dumped.
6612
6613 2001-12-29 Akim Demaille <akim@epita.fr>
6614
6615 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6616 when walking through ritem, even via rule->rhs.
6617 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6618 (useful_production, useless_nonterminals): Likewise.
6619 (reduce_grammar_tables): Likewise, plus update nritems.
6620 * src/nullable.c (set_nullable): Likewise.
6621 * src/lalr.c (build_relations): Likewise.
6622 * tests/sets.at (Nullable): Adjust.
6623 Fortunately, now, the $axiom is no longer nullable.
6624
6625 2001-12-29 Akim Demaille <akim@epita.fr>
6626
6627 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6628 the 0-sentinel.
6629 * src/gram.c (ritem_longest_rhs): Likewise.
6630 * src/reduce.c (nonterminals_reduce): Likewise.
6631 * src/print_graph.c (print_graph): Likewise.
6632 * src/output.c (output_rule_data): Likewise.
6633 * src/nullable.c (set_nullable): Likewise.
6634
6635 2001-12-29 Akim Demaille <akim@epita.fr>
6636
6637 * src/output.c: Comment changes.
6638
6639 2001-12-27 Paul Eggert <eggert@twinsun.com>
6640
6641 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6642 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6643 Sparc, as they were causing more porting problems than the
6644 (minor) performance improvement was worth.
6645
6646 Also, catch up with 1.31's YYSTD.
6647
6648 2001-12-27 Akim Demaille <akim@epita.fr>
6649
6650 * src/output.c (output_gram): Rely on nritems, not the
6651 0-sentinel. See below.
6652 Use -1 as separator, not 0.
6653 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6654 Rely on -1 as separator in yyrhs, instead of 0.
6655 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6656 twice `Now at end of input', therefore there are two lines less to
6657 expect.
6658
6659 2001-12-27 Akim Demaille <akim@epita.fr>
6660
6661 * tests/regression.at (Unresolved SR Conflicts):
6662 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6663 below.
6664
6665 2001-12-27 Akim Demaille <akim@epita.fr>
6666
6667 * src/LR0.c (new_state): Recognize the final state by the fact it
6668 is reached by eoftoken.
6669 (insert_start_shifting_state, insert_eof_shifting_state)
6670 (insert_accepting_state, augment_automaton): Remove, since now
6671 these states are automatically computed from the initial state.
6672 (generate_states): Adjust.
6673 * src/print.c: When reporting a rule number to the user, substract
6674 1, so that the axiom rule is rule 0, and the first user rule is 1.
6675 * src/reduce.c: Likewise.
6676 * src/print_graph.c (print_core): For the time being, just as for
6677 the report, depend upon --trace-flags to dump the full set of
6678 items.
6679 * src/reader.c (readgram): Once the grammar read, insert the rule
6680 0: `$axiom: START-SYMBOL $'.
6681 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6682 number of the states has changed (the final state is no longer
6683 necessarily the last), catch up.
6684
6685 2001-12-27 Akim Demaille <akim@epita.fr>
6686
6687 Try to make the use of the eoftoken valid. Given that its value
6688 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6689 is used instead of > 0 where appropriate, (ii), depend upon nritems
6690 instead of the 0-sentinel.
6691
6692 * src/gram.h, src/gram.c (nritems): New.
6693 Expected to be duplication of nitems, but for the time being...
6694 * src/reader.c (packgram): Assert nritems and nitems are equal.
6695 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6696 * src/closure.c (print_closure, print_fderives): Likewise.
6697 * src/gram.c (ritem_print): Likewise.
6698 * src/print.c (print_core, print_grammar): Likewise.
6699 * src/print_graph.c: Likewise.
6700
6701 2001-12-27 Akim Demaille <akim@epita.fr>
6702
6703 * src/main.c (main): If there are complains after grammar
6704 reductions, then output the report anyway if requested, then die.
6705 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6706 * src/reader.c (eoftoken): New.
6707 (parse_token_decl): If the token being defined has value `0', it
6708 is the eoftoken.
6709 (packsymbols): No longer hack `tags' to insert `$' by hand.
6710 Be sure to preserve the value of the eoftoken.
6711 (reader): Make sure eoftoken is defined.
6712 Initialize nsyms to 0: now eoftoken is created just like the others.
6713 * src/print.c (print_grammar): Don't special case the eof token.
6714 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6715 lie anyway, albeit pleasant.
6716 * tests/calc.at: Exercise error messages with eoftoken.
6717 Change the grammar so that empty input is invalid.
6718 Adjust expectations.
6719 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6720
6721 2001-12-27 Akim Demaille <akim@epita.fr>
6722
6723 * configure.in: Check the protos of strchr ans strspn.
6724 Replace strchr if needed.
6725 * src/system.h: Provide the protos of strchr, strspn and memchr if
6726 missing.
6727 * lib/strchr.c: New.
6728 * src/reader.c (symbols_save): Use strchr.
6729
6730 2001-12-27 Akim Demaille <akim@epita.fr>
6731
6732 * src/print.c, src/print_graph.c (escape): New.
6733 Use it to quote the TAGS outputs.
6734 * src/print_graph.c (print_state): Now errors are in red, and
6735 reductions in green.
6736 Prefer high to wide: output the state number on a line of its own.
6737
6738 2001-12-27 Akim Demaille <akim@epita.fr>
6739
6740 * src/state.h, src/state.c (reductions_new): New.
6741 * src/LR0.c (set_state_table): Let all the states have a
6742 `reductions', even if reduced to 0.
6743 (save_reductions): Adjust.
6744 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6745 * src/print.c (print_reductions, print_actions): Adjust.
6746 * src/output.c (action_row): Adjust.
6747
6748 2001-12-27 Akim Demaille <akim@epita.fr>
6749
6750 * src/state.h, src/state.c (errs_new, errs_dup): New.
6751 * src/LR0.c (set_state_table): Let all the states have an errs,
6752 even if reduced to 0.
6753 * src/print.c (print_errs, print_reductions): Adjust.
6754 * src/output.c (output_actions, action_row): Adjust.
6755 * src/conflicts.c (resolve_sr_conflict): Adjust.
6756
6757 2001-12-27 Akim Demaille <akim@epita.fr>
6758
6759 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6760
6761 2001-12-27 Akim Demaille <akim@epita.fr>
6762
6763 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6764 * src/print.c: here.
6765 (lookaheadset, shiftset): New, used as additional storage by
6766 print_reductions.
6767 (print_results): Adjust.
6768 (print_shifts, print_gotos, print_errs): New, extracted from...
6769 (print_actions): here.
6770 * src/print_graph.c (print_actions): Remove dead code.
6771
6772 2001-12-27 Akim Demaille <akim@epita.fr>
6773
6774 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6775 `$n' and `@n'.
6776
6777 2001-12-27 Akim Demaille <akim@epita.fr>
6778
6779 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6780 (build_relations): Adjust.
6781
6782 2001-12-27 Akim Demaille <akim@epita.fr>
6783
6784 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6785 duplication.
6786
6787 2001-12-27 Akim Demaille <akim@epita.fr>
6788
6789 * src/reader.c (packgram): Catch nitems overflows.
6790
6791 2001-12-27 Akim Demaille <akim@epita.fr>
6792
6793 * src/files.c, src/files.h (guard_obstack): Remove.
6794 * src/output.c (output): Adjust.
6795 * src/reader.c (parse_braces): New, factoring...
6796 (copy_action, copy_guard): these two which are renamed as...
6797 (parse_action, parse_guard): these.
6798 As a voluntary consequence, using braces around guards is now
6799 mandatory.
6800
6801 2001-12-27 Akim Demaille <akim@epita.fr>
6802
6803 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6804 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6805 members.
6806 (symbol_list_new): Adjust.
6807 (copy_action): action_line is the first line, not the last.
6808 (copy_guard): Just as for actions, store the `action' only, not
6809 the switch/case/break flesh.
6810 Don't parse the user action that might follow the guard, let...
6811 (readgram): do it, i.e., now, there can be an action after a
6812 guard.
6813 In other words the guard is just explicitly optional.
6814 (packgram): Adjust.
6815 * src/output.c (guards_output): New.
6816 (output_parser): Call it when needed.
6817 (output): Also free the guard and attrs obstacks.
6818 * src/files.c, src/files.h (obstack_save): Remove.
6819 (output_files): Remove.
6820 As a result, if one needs the former `.act' file, using an
6821 appropriate skeleton which requires actions and guards is now
6822 required.
6823 * src/main.c (main): Adjust.
6824 * tests/semantic.at: New.
6825 * tests/regression.at: Use `input.y' as input file name.
6826 Avoid 8+3 problems by requiring input.c when the test needs the
6827 parser.
6828
6829 2001-12-27 Akim Demaille <akim@epita.fr>
6830
6831 * src/reader.c (symbol_list_new): Be sure to initialize all the
6832 fields.
6833
6834 2001-12-27 Akim Demaille <akim@epita.fr>
6835
6836 All the hacks using a final pseudo state are now useless.
6837
6838 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6839 * src/lalr.c (nLA): New.
6840 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6841 instead of lookaheadsp from the pseudo state (nstate + 1).
6842
6843 2001-12-27 Akim Demaille <akim@epita.fr>
6844
6845 * src/output.c (action_row, token_actions): Use a state_t instead
6846 of a integer, and nlookaheads instead of the following state's
6847 lookaheadsp.
6848
6849 2001-12-27 Akim Demaille <akim@epita.fr>
6850
6851 * src/conflicts.c (log_resolution, flush_shift)
6852 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6853 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6854 (conflicts_print, print_reductions): Use a state_t instead of an
6855 integer when referring to a state.
6856 As much as possible, depend upon nlookaheads, instead of the
6857 `lookaheadsp' member of the following state (since lookaheads of
6858 successive states are successive, the difference between state n + 1
6859 and n served as the number of lookaheads for state n).
6860 * src/lalr.c (add_lookback_edge): Likewise.
6861 * src/print.c (print_core, print_actions, print_state)
6862 (print_results): Likewise.
6863 * src/print_graph.c (print_core, print_actions, print_state)
6864 (print_graph): Likewise.
6865 * src/conflicts.h: Adjust.
6866
6867 2001-12-27 Akim Demaille <akim@epita.fr>
6868
6869 * src/bison.hairy: Formatting/comment changes.
6870 ANSIfy.
6871 Remove `register' indications.
6872 Add plenty of `static'.
6873
6874 2001-12-27 Akim Demaille <akim@epita.fr>
6875
6876 * src/output.c (prepare): Drop the muscle `ntbase' which
6877 duplicates ntokens.
6878 * src/bison.simple: Formatting/comment changes.
6879 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6880 is an undocumented synonym.
6881
6882 2001-12-22 Akim Demaille <akim@epita.fr>
6883
6884 * src/output.c (output_table_data): Change the prototype to use
6885 `int' for array ranges: some invocations do pass an int, not a
6886 short.
6887 Reported by Wayne Green.
6888
6889 2001-12-22 Akim Demaille <akim@epita.fr>
6890
6891 Some actions of web2c.y are improperly triggered.
6892 Reported by Mike Castle.
6893
6894 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6895 * tests/regression.at (Web2c): Rename as...
6896 (Web2c Report): this.
6897 (Web2c Actions): New.
6898
6899 2001-12-22 Akim Demaille <akim@epita.fr>
6900
6901 Reductions in web2c.y are improperly reported.
6902 Reported by Mike Castle.
6903
6904 * src/conflicts.c (print_reductions): Fix.
6905 * tests/regression.at (Web2c): New.
6906
6907 2001-12-18 Akim Demaille <akim@epita.fr>
6908
6909 Some host fail on `assert (!"foo")', which expands to
6910 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6911 Reported by Nelson Beebee.
6912
6913 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6914 `#define it_succeeded 0' and `assert (it_succeeded)'.
6915
6916 2001-12-17 Marc Autret <autret_m@epita.fr>
6917
6918 * src/bison.simple: Don't hard code the skeleton line and filename.
6919 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6920 New line counter 'skeleton_line' (skeleton-line muscle).
6921
6922 2001-12-17 Paul Eggert <eggert@twinsun.com>
6923
6924 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6925 YYDEBUG must be defined to a nonzero value.
6926
6927 * src/bison.simple (yytname): Do not assume that the user defines
6928 YYDEBUG to a properly parenthesized expression.
6929
6930 2001-12-17 Akim Demaille <akim@epita.fr>
6931
6932 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6933 nlookaheads is a new member.
6934 Adjust all users.
6935 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6936 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6937 state.
6938
6939 2001-12-17 Akim Demaille <akim@epita.fr>
6940
6941 * src/files.h, src/files.c (open_files, close_files): Remove.
6942 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6943 let...
6944 * src/reader.c (reader): Do it.
6945
6946 2001-12-17 Akim Demaille <akim@epita.fr>
6947
6948 * src/conflicts.c (print_reductions): Formatting changes.
6949
6950 2001-12-17 Akim Demaille <akim@epita.fr>
6951
6952 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6953 (flush_reduce): New.
6954 (resolve_sr_conflict): Adjust.
6955
6956 2001-12-17 Akim Demaille <akim@epita.fr>
6957
6958 * src/output.c (output_obstack): Be static and rename as...
6959 (format_obstack): this, to avoid any confusion with files.c's
6960 output_obstack.
6961 * src/reader.h (muscle_obstack): Move to...
6962 * src/output.h: here, since it's defined in output.c.
6963
6964 2001-12-17 Akim Demaille <akim@epita.fr>
6965
6966 * src/output.c (action_row, save_column, default_goto)
6967 (sort_actions, matching_state, pack_vector): Better variable
6968 locality.
6969
6970 2001-12-17 Akim Demaille <akim@epita.fr>
6971
6972 * src/output.c: Various formatting changes.
6973
6974 2001-12-17 Akim Demaille <akim@epita.fr>
6975
6976 * src/files.c (output_files): Free the output_obstack.
6977 * src/main.c (main): Call print and print_graph conditionally.
6978 * src/print.c (print): Work unconditionally.
6979 * src/print_graph.c (print_graph): Work unconditionally.
6980 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6981
6982 2001-12-16 Marc Autret <autret_m@epita.fr>
6983
6984 * src/output.c (actions_output): Fix. When we use %no-lines,
6985 there is one less line per action.
6986
6987 2001-12-16 Marc Autret <autret_m@epita.fr>
6988
6989 * src/bison.simple: Remove a useless #line directive.
6990 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6991 * src/output.c (get_lines_number): New.
6992 (output_parser): Adjust, now takes care about the lines of a
6993 output muscles.
6994 Fix line numbering.
6995 (actions_output): Computes the number of lines taken by actions.
6996 (output_master_parser): Insert new skeleton which is the name of
6997 the output parser file name.
6998
6999 2001-12-15 Marc Autret <autret_m@epita.fr>
7000
7001 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
7002
7003 2001-12-15 Marc Autret <autret_m@epita.fr>
7004
7005 * src/output.c (output_gram): Keep track of the hairy one.
7006
7007 2001-12-15 Akim Demaille <akim@epita.fr>
7008
7009 Make `make distcheck' work.
7010
7011 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7012 system.h which uses libgettext.h.
7013
7014 2001-12-15 Akim Demaille <akim@epita.fr>
7015
7016 * src/nullable.c (set_nullable): Useless rules must be skipped,
7017 otherwise, since we range over their symbols, we might look at a
7018 nonterminal which no longer ``exists'', i.e., it is not counted in
7019 `nvars', hence we overflow our arrays.
7020
7021 2001-12-15 Akim Demaille <akim@epita.fr>
7022
7023 The header can also be produced directly, without any obstack!
7024 Yahoo!
7025
7026 * src/files.c, src/files.h (defines_obstack): Remove.
7027 (compute_header_macro): Global.
7028 (defines_obstack_save): Remove.
7029 * src/reader.c (parse_union_decl): No longer output to
7030 defines_obstack: its content can be found in the `stype' muscle
7031 anyway.
7032 (output_token_translations): Merge into...
7033 (symbols_output): this.
7034 Rename as...
7035 (symbols_save): this.
7036 (reader): Adjust.
7037 * src/output.c (header_output): New.
7038 (output): Call it.
7039
7040 2001-12-15 Akim Demaille <akim@epita.fr>
7041
7042 * src/reader.c (parse_union_decl): Instead of handling two obstack
7043 simultaneously, use one to define the `stype' muscle, and use the
7044 value of the latter to fill defines_obstack.
7045 (copy_comment): Remove.
7046 (copy_comment2): Work for a single obstack.
7047 Rename as...
7048 (copy_comment): this.
7049
7050 2001-12-15 Akim Demaille <akim@epita.fr>
7051
7052 * src/lex.c, src/lex.h (xgetc): No longer static.
7053 * src/reader.c (parse_union_decl): Revamp.
7054
7055 2001-12-15 Akim Demaille <akim@epita.fr>
7056
7057 Still making progress in separating Bison into (i) input, (ii)
7058 process, (iii) output: now we can directly output the parser file
7059 without using table_obstack at all.
7060
7061 * src/files.c, src/files.h (table_obstack): Bye bye.
7062 (parser_file_name): New.
7063 * src/files.c (compute_output_file_names): Compute it.
7064 * src/output.c (actions_output, output_parser)
7065 (output_master_parser): To a file instead of an obstack.
7066
7067 2001-12-15 Akim Demaille <akim@epita.fr>
7068
7069 Attach actions to rules, instead of pre-outputting them to
7070 actions_obstack.
7071
7072 * src/gram.h (rule_t): action and action_line are new members.
7073 * src/reader.c (symbol_list): Likewise.
7074 (copy_action): Save the actions within the rule.
7075 (packgram): Save them in rule_table.
7076 * src/output.c (actions_output): New.
7077 (output_parser): Use it on `%%actions'.
7078 (output_rule_data): Don't free rule_table.
7079 (output): Do it.
7080 (prepare): Don't save the `action' muscle.
7081 * src/bison.simple: s/%%action/%%actions/.
7082
7083 2001-12-15 Akim Demaille <akim@epita.fr>
7084
7085 * src/reader.c (copy_action): When --yacc, don't append a `;'
7086 to the user action: let it fail if lacking.
7087 Suggested by Arnold Robbins and Tom Tromey.
7088
7089 2001-12-14 Akim Demaille <akim@epita.fr>
7090
7091 * src/lex.c (literalchar): Simply return the char you decoded, non
7092 longer mess around with obstacks and int pointers.
7093 Adjust all callers.
7094
7095 2001-12-14 Akim Demaille <akim@epita.fr>
7096
7097 * src/lex.c (literalchar): Don't escape the special characters,
7098 just decode them, and keep them as char (before, eol was output as
7099 the 2 char string `\n' etc.).
7100 * src/output.c (output_rule_data): Use quotearg to output the
7101 token strings.
7102
7103 2001-12-13 Paul Eggert <eggert@twinsun.com>
7104
7105 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7106 Do not infringe on the global user namespace when using C++.
7107 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7108 All uses of `fprintf' and `stderr' changed.
7109
7110 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7111
7112 2001-12-13 Akim Demaille <akim@epita.fr>
7113
7114 The computation of nullable is broken: it doesn't handle empty
7115 RHS's properly.
7116
7117 * tests/torture.at (GNU AWK Grammar): New.
7118 * tests/sets.at (Nullable): New.
7119 * src/nullable.c (set_nullable): Instead of blindly looping over
7120 `ritems', loop over the rules, and then over their rhs's.
7121
7122 Work around Autotest bugs.
7123
7124 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7125 frame, because Autotest understand lines starting with a `+' as
7126 traces from the shell. Then, they are not processed properly.
7127 Admittedly an Autotest bug, but we don't have time to wait for
7128 Autotest to catch up.
7129 * tests/regression.at (Broken Closure): Adjust to the new table
7130 frames.
7131 Move to...
7132 * tests/sets.at: here.
7133
7134 2001-12-13 Akim Demaille <akim@epita.fr>
7135
7136 * src/closure.c (closure): Use nrules instead of playing tricks
7137 with BITS_PER_WORD.
7138
7139 2001-12-13 Akim Demaille <akim@epita.fr>
7140
7141 * src/print.c (print_actions): Output the handling of `$' as the
7142 traces do: shifting the token EOF. Before EOF was treated as a
7143 nonterminal.
7144 * tests/regression.at: Adjust some tests.
7145 * src/print_graph.c (print_core): Complete the set of items via
7146 closure. The next-to-final and final states are still unsatisfying,
7147 but that's to be addressed elsewhere.
7148 No longer output the rule numbers, but do output the state number.
7149 A single loop for the shifts + gotos is enough, but picked a
7150 distinct color for each.
7151 (print_graph): Initialize and finalize closure.
7152
7153 2001-12-13 Akim Demaille <akim@epita.fr>
7154
7155 * src/reader.c (readgram): Remove dead code, an strip useless
7156 braces.
7157 (get_type): Remove, unused.
7158
7159 2001-12-12 Akim Demaille <akim@epita.fr>
7160
7161 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7162 on that of lib/error.c.
7163
7164 2001-12-12 Akim Demaille <akim@epita.fr>
7165
7166 Some hosts don't like `/' in includes.
7167
7168 * src/system.h: Include libgettext.h without qualifying the path.
7169 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7170 $(top_srcdir).
7171
7172 2001-12-11 Marc Autret <autret_m@epita.fr>
7173
7174 * src/output.c (output_parser): Remove useless muscle.
7175
7176 2001-12-11 Marc Autret <autret_m@epita.fr>
7177
7178 * src/bison.simple: Remove #line just before %%epilogue. It
7179 is now handled in ...
7180 * src/reader.c (read_additionnal_code): Add the output of a
7181 #line for the epilogue.
7182
7183 2001-12-10 Marc Autret <autret_m@epita.fr>
7184
7185 * src/reader.c (copy_definition): Re-use CPP-outed code which
7186 replace precedent remove.
7187 * src/bison.simple: Remove #line before %%prologue because
7188 %%input-line is wrong at this time.
7189
7190 2001-12-10 Marc Autret <autret_m@epita.fr>
7191
7192 * src/reader.c (symbols_output): Clean up.
7193 * src/output.c (output_gram, output): Clean up.
7194
7195 2001-12-10 Akim Demaille <akim@epita.fr>
7196
7197 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7198 * src/LR0.c (set_state_table): here.
7199 * src/lalr.c (lalr): Call it.
7200
7201 2001-12-10 Akim Demaille <akim@epita.fr>
7202
7203 * src/state.h (shifts): Remove the `number' member: shifts are
7204 attached to state, hence no longer need to be labelled with a
7205 state number.
7206
7207 2001-12-10 Akim Demaille <akim@epita.fr>
7208
7209 Now that states have a complete set of members, the linked list of
7210 shifts is useless: just fill directly the state's shifts member.
7211
7212 * src/state.h (shifts): Remove the `next' member.
7213 * src/LR0.c (first_state, last_state): Remove.
7214 Adjust the callers.
7215 (augment_automaton): Don't look for the shifts that must be added
7216 a shift on EOF: it is those of the state we looked for! But now,
7217 since shifts are attached, it is no longer needed to looking
7218 merely by its id: its number.
7219
7220 2001-12-10 Akim Demaille <akim@epita.fr>
7221
7222 * src/LR0.c (augment_automaton): Better variable locality.
7223 Remove an impossible branch: if there is a state corresponding to
7224 the start symbol being shifted, then there is shift for the start
7225 symbol from the initial state.
7226
7227 2001-12-10 Akim Demaille <akim@epita.fr>
7228
7229 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7230 only when appropriate: when insert_start_shifting_state' is not
7231 invoked.
7232 * tests/regression.at (Rule Line Numbers): Adjust.
7233
7234 2001-12-10 Akim Demaille <akim@epita.fr>
7235
7236 * src/LR0.c (augment_automaton): Now that all states have shifts,
7237 merge the two cases addition shifts to the initial state.
7238
7239 2001-12-10 Akim Demaille <akim@epita.fr>
7240
7241 * src/lalr.c (set_state_table): Move to...
7242 * src/LR0.c: here.
7243 * src/lalr.c (lalr): Don't call it...
7244 * src/LR0.c (generate_states): do it.
7245 * src/LR0.h (first_state): Remove, only the table is used.
7246
7247 2001-12-10 Akim Demaille <akim@epita.fr>
7248
7249 * src/LR0.h (first_shift, first_reduction): Remove.
7250 * src/lalr.c: Don't use first_shift: find shifts through the
7251 states.
7252
7253 2001-12-10 Akim Demaille <akim@epita.fr>
7254
7255 * src/LR0.c: Attach shifts to states as soon as they are
7256 computed.
7257 * src/lalr.c (set_state_table): Instead of assigning shifts to
7258 state, just assert that the mapping was properly done.
7259
7260 2001-12-10 Akim Demaille <akim@epita.fr>
7261
7262 * src/LR0.c (insert_start_shift): Rename as...
7263 (insert_start_shifting_state): this.
7264 (insert_eof_shifting_state, insert_accepting_state): New.
7265 (augment_automaton): Adjust.
7266 Better locality of the variables.
7267 When looking if the start_symbol is shifted from the initial
7268 state, using `while (... symbol != start_symbol ...)' sounds
7269 better than `while (... symbol < start_symbol ...)': If fail
7270 to see how the order between symbols could be relevant!
7271
7272 2001-12-10 Akim Demaille <akim@epita.fr>
7273
7274 * src/getargs.h: Don't declare `spec_name_prefix' and
7275 `spec_file_prefix', declared by src/files.h.
7276 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7277 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7278 * src/output.c (prepare): Adjust.
7279 * src/reader.c (symbols_output): Likewise.
7280 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7281
7282 2001-12-10 Akim Demaille <akim@epita.fr>
7283
7284 * src/muscle_tab.c (muscle_init): NULL is a better default than
7285 `"0"'.
7286
7287 2001-12-10 Akim Demaille <akim@epita.fr>
7288
7289 * src/reader.c (reader): Calling symbols_output once is enough.
7290
7291 2001-12-10 Akim Demaille <akim@epita.fr>
7292
7293 Now that states have a complete set of members, the linked list of
7294 reductions is useless: just fill directly the state's reductions
7295 member.
7296
7297 * src/state.h (struct reductions): Remove member `number' and
7298 `next'.
7299 * src/LR0.c (first_reduction, last_reduction): Remove.
7300 (save_reductions): Don't link the new reductions, store them in
7301 this_state.
7302 * src/lalr.c (set_state_table): No need to attach reductions to
7303 states, it's already done.
7304 * src/output.c (output_actions): No longer free the shifts, then
7305 the reductions, then the states: free all the states and their
7306 members.
7307
7308 2001-12-10 Akim Demaille <akim@epita.fr>
7309
7310 * src/options.c (OPTN, DRTV, BOTH): New.
7311 (option_table): Use them.
7312
7313 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7314 the job of system.h.
7315 * src/options.c: Don't include stdio.h and xalloc.h for the same
7316 reasons.
7317
7318 2001-12-10 Akim Demaille <akim@epita.fr>
7319
7320 * src/output.c (output, prepare): Make sure the values of the
7321 muscles `action' and `prologue' are 0-terminated.
7322
7323 2001-12-10 Akim Demaille <akim@epita.fr>
7324
7325 Clean up GCC warnings.
7326
7327 * src/reader.c (copy_action): `buf' is not used.
7328 (parse_skel_decl): Be static.
7329 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7330 * src/options.h (create_long_option_table): Have a real prototype.
7331 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7332 (hash_delete_at): Return const void *.
7333 Adjust casts to preserve the const.
7334
7335 2001-12-10 Akim Demaille <akim@epita.fr>
7336
7337 * configure.in: Require 2.52g.
7338 M4 is not needed, but AUTOM4TE is.
7339 * m4/m4.m4: Remove.
7340 * tests/Makefile.am: Adjust.
7341
7342 2001-12-10 Akim Demaille <akim@epita.fr>
7343
7344 One structure for states is enough, even though theoretically
7345 there are LR(0) states and LALR(1) states.
7346
7347 * src/lalr.h (state_t): Remove.
7348 (state_table): Be state_t **, not state_t *.
7349 * src/state.h (core, CORE_ALLOC): Rename as...
7350 (state_t, STATE_ALLOC): this.
7351 Add the LALR(1) members: shifts, reductions, errs.
7352 * src/LR0.c (state_table): Rename as...
7353 (state_hash): this, to avoid name clashes with the global
7354 `state_table'.
7355 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7356 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7357
7358 2001-12-10 Akim Demaille <akim@epita.fr>
7359
7360 Bison dumps core on bash.y.
7361 Reported by Pascal Bart.
7362
7363 * src/warshall.c (bitmatrix_print): New.
7364 (TC): Use it.
7365 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7366 j must be the outer loop.
7367 * tests/regression.at (Broken Closure): New.
7368
7369 2001-12-05 Akim Demaille <akim@epita.fr>
7370
7371 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7372 its argument.
7373 Reported by Peter Hamorsky.
7374
7375 2001-12-05 Akim Demaille <akim@epita.fr>
7376
7377 * src/conflicts.c (err_table): Remove.
7378 (resolve_sr_conflict): Adjust.
7379 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7380 Rename as...
7381 (state_t.reductions, state_t.shifts): this.
7382
7383 2001-12-05 Akim Demaille <akim@epita.fr>
7384
7385 * src/reduce.c (reduce_grammar_tables): No longer disable the
7386 removal of useless rules via CPP but via `if (0)', so that the
7387 compiler still check the code is valid.
7388 For instance, it should have noticed `rline' no longer exists: use
7389 the `line' member of rule_t.
7390 * src/gram.c (dummy, rline): Remove, unused.
7391
7392 2001-12-05 Akim Demaille <akim@epita.fr>
7393
7394 * src/output.c (pack_vector): Use assert, not berror.
7395 * src/main.c (berror): Remove, unused.
7396
7397 2001-12-05 Akim Demaille <akim@epita.fr>
7398
7399 New experimental feature: if --verbose --trace output all the
7400 items of a state, not only its kernel.
7401
7402 * src/print.c (print_core): If `trace_flag', then invoke closure
7403 before outputting the items of the state (print_core is no longer
7404 a correct name them).
7405 (print_results): Invoke new_closure/free_closure if needed.
7406
7407 2001-12-05 Akim Demaille <akim@epita.fr>
7408
7409 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7410 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7411 (nitemset): for consistency with the rest of the project.
7412
7413 2001-12-05 Akim Demaille <akim@epita.fr>
7414
7415 * src/closure.c (print_closure): Improve.
7416 (closure): Use it for printing input and output.
7417
7418 2001-12-05 Akim Demaille <akim@epita.fr>
7419
7420 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7421 indexed by nonterminals.
7422
7423 2001-12-05 Akim Demaille <akim@epita.fr>
7424
7425 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7426 what it was!).
7427 * src/warshall.h: Remove accidental duplication of the content.
7428
7429 2001-12-05 Akim Demaille <akim@epita.fr>
7430
7431 * src/closure.c (set_fderives): De-obfuscate.
7432
7433 2001-12-05 Akim Demaille <akim@epita.fr>
7434
7435 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7436
7437 2001-12-05 Akim Demaille <akim@epita.fr>
7438
7439 * src/closure.c (set_firsts): De-obfuscate.
7440
7441 2001-12-05 Akim Demaille <akim@epita.fr>
7442
7443 * src/output.c (action_row): De-obfuscate
7444 using the good o' techniques: arrays not pointers, variable
7445 locality, BITISSET, RESETBIT etc.
7446
7447 2001-12-05 Akim Demaille <akim@epita.fr>
7448
7449 Pessimize the code to simplify it: from now on, all the states
7450 have a valid SHIFTS, which NSHIFTS is possibly 0.
7451
7452 * src/LR0.c (shifts_new): Be global and move to..
7453 * src/state.c, src/state.h: here.
7454 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7455 * src/print_graph: Adjust.
7456
7457 2001-12-05 Akim Demaille <akim@epita.fr>
7458
7459 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7460 * src/conflicts.c: Use it.
7461 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7462 incorrectly ``simplified''.
7463
7464 2001-12-05 Akim Demaille <akim@epita.fr>
7465
7466 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7467 using the good o' techniques: arrays not pointers, variable
7468 locality, BITISSET, RESETBIT etc.
7469
7470 2001-12-05 Akim Demaille <akim@epita.fr>
7471
7472 * src/state.h (SHIFT_SYMBOL): New.
7473 * src/conflicts.c: Use it to deobfuscate.
7474
7475 2001-12-05 Akim Demaille <akim@epita.fr>
7476
7477 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7478 (print_reductions): De-obfuscate using the good o' techniques:
7479 arrays not pointers, variable locality, BITISSET.
7480
7481 2001-12-05 Akim Demaille <akim@epita.fr>
7482
7483 * src/conflicts.c (print_reductions): Arrays, not pointers.
7484 Use BITISSET.
7485
7486 2001-12-05 Akim Demaille <akim@epita.fr>
7487
7488 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7489
7490 2001-12-05 Akim Demaille <akim@epita.fr>
7491
7492 * src/conflicts.c (print_reductions): Improve variable locality.
7493
7494 2001-12-05 Akim Demaille <akim@epita.fr>
7495
7496 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7497
7498 2001-12-05 Akim Demaille <akim@epita.fr>
7499
7500 * src/conflicts.c (print_reductions): Improve variable locality.
7501
7502 2001-12-05 Akim Demaille <akim@epita.fr>
7503
7504 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7505 * src/lalr.c: Use them.
7506
7507 2001-12-05 Akim Demaille <akim@epita.fr>
7508
7509 * src/LR0.c (augment_automaton): Formatting changes.
7510 Better variable locality.
7511
7512 2001-12-05 Akim Demaille <akim@epita.fr>
7513
7514 * src/lalr.c (matrix_print): New.
7515 (transpose): Use it.
7516 Use arrays instead of pointers.
7517
7518 2001-12-05 Akim Demaille <akim@epita.fr>
7519
7520 * src/lalr.c (maxrhs): Move to...
7521 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7522 * src/lalr.c (build_relations): Adjust.
7523
7524 2001-12-05 Akim Demaille <akim@epita.fr>
7525
7526 * src/lalr.c (transpose): Free the memory allocated to the
7527 argument, as it is replaced by the results by the unique caller.
7528 (build_relations): Merely invoke transpose: it handles the memory
7529 deallocation.
7530 Improve variable locality.
7531 Avoid variables used as mere abbreviations.
7532 (compute_lookaheads): Use arrays instead of pointers.
7533
7534 2001-12-05 Akim Demaille <akim@epita.fr>
7535
7536 * src/lalr.c (initialize_F): Improve variable locality.
7537 Avoid variables used as mere abbreviations.
7538
7539 2001-12-05 Akim Demaille <akim@epita.fr>
7540
7541 * src/derives.c (print_derives): Display the ruleno.
7542 * src/lalr.c (initialize_F, transpose): Better variable locality
7543 to improve readability.
7544 Avoid variables used as mere abbreviations.
7545
7546 2001-12-05 Akim Demaille <akim@epita.fr>
7547
7548 * src/lalr.c (traverse): Use arrays instead of pointers.
7549
7550 2001-12-05 Akim Demaille <akim@epita.fr>
7551
7552 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7553 the handling of squeue.
7554 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7555
7556 2001-12-05 Akim Demaille <akim@epita.fr>
7557
7558 Because useless nonterminals are now kept alive (instead of being
7559 `destroyed'), we now sometimes examine them, and store information
7560 related to them. Hence we need to know their number, and adjust
7561 memory allocations.
7562
7563 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7564 static.
7565 * src/LR0.c (allocate_itemsets): The memory allocated to
7566 `symbol_count' was used for two different purpose: once to count
7567 the number of occurrences of each symbol, and later reassigned to
7568 `shift_symbol', containing the symbol that can be shifted from a
7569 given state.
7570 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7571 only, and...
7572 (new_itemsets): Allocate `shift_symbol' here.
7573 (allocate_itemsets): symbol_count includes useless nonterminals.
7574 Make room for them.
7575 (free_storage): Use `free', not `XFREE', for pointers that cannot
7576 be null.
7577
7578 2001-12-05 Akim Demaille <akim@epita.fr>
7579
7580 * src/nullable.c (set_nullable): Deobfuscate the handling of
7581 ritem.
7582 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7583
7584 2001-12-05 Akim Demaille <akim@epita.fr>
7585
7586 * src/gram.c, src/gram.h (ritem_print): New.
7587 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7588 (This useless function was defined only to work around VMS linkers
7589 that can't handle compilation units with variables only).
7590 * src/reduce.c (dump_grammar): Use it to trace the construction of
7591 ritem.
7592
7593 2001-12-04 Paul Eggert <eggert@twinsun.com>
7594
7595 * src/bison.simple (union yyalloc): Change member names
7596 to be the same as the stack names.
7597 (yyparse): yyptr is now union yyalloc *, not char *.
7598 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7599 and may generate better code on some machines.
7600 (yystpcpy): Use prototype if __STDC__ is defined, not just
7601 if __cplusplus is defined.
7602
7603 2001-11-30 Akim Demaille <akim@epita.fr>
7604
7605 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7606 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7607 Gettext doesn't compile cleanly, and dies with -Werror.
7608 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7609 Include WARNING_CFLAGS here.
7610 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7611 before being defined.
7612
7613 2001-11-27 Paul Eggert <eggert@twinsun.com>
7614
7615 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7616 First arg is int, not unsigned.
7617 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7618 (SIZE_MAX, UINT_MAX): New macros.
7619 (quotearg_n_options): Abort if N is negative.
7620 Avoid overflow check on hosts where size_t is 64 bits and int
7621 is 32 bits, as overflow is impossible there.
7622 Fix off-by-one typo that caused unnecessary reallocation.
7623
7624 2001-11-29 Paul Eggert <eggert@twinsun.com>
7625
7626 Name space cleanup in generated parser.
7627
7628 * doc/bison.texinfo (Bison Parser): Discuss system headers
7629 and their effect on the user name space.
7630
7631 * src/bison.simple:
7632 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7633 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7634 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7635
7636 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7637 on user names when possible.
7638
7639 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7640 Simplify test for whather <alloca.h> exists.
7641
7642 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7643
7644 (<stdio.h>): Include if YYDEBUG.
7645
7646 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7647 ! defined (yyoverflow) && ! defined (yymemcpy).
7648
7649 (yymemcpy, yyparse): Rename local variables as needed so that
7650 they all begin with 'yy'.
7651
7652 (yystrlen, yystpcpy): New functions.
7653
7654 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7655 All uses changed.
7656
7657 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7658 instead of relying on string.h functions. Use YYSTACK_ALLOC
7659 and YYSTACK_FREE instead of malloc and free.
7660
7661 2001-11-30 Akim Demaille <akim@epita.fr>
7662
7663 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7664 before their first uses.
7665 (YYBISON, YYPURE): Move to the top of the output.
7666
7667 2001-11-30 Akim Demaille <akim@epita.fr>
7668
7669 * tests/reduce.at (Useless Nonterminals): Fix.
7670
7671 2001-11-30 Akim Demaille <akim@epita.fr>
7672
7673 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7674 if body instead of `;' to pacify GCC's warnings.
7675
7676 2001-11-30 Akim Demaille <akim@epita.fr>
7677
7678 Instead of mapping the LHS of unused rules to -1, keep the LHS
7679 valid, but flag the rules as invalid.
7680
7681 * src/gram.h (rule_t): `useful' is a new member.
7682 * src/print.c (print_grammar): Adjust.
7683 * src/derives.c (set_derives): Likewise.
7684 * src/reader.c (packgram, reduce_output): Likewise.
7685 * src/reduce.c (reduce_grammar_tables): Likewise.
7686 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7687
7688 2001-11-30 Akim Demaille <akim@epita.fr>
7689
7690 * src/reduce.c (reduce_output): Formatting changes.
7691 * src/print.c (print_results, print_grammar): Likewise.
7692 * tests/regression.at (Rule Line Numbers)
7693 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7694
7695 2001-11-30 Akim Demaille <akim@epita.fr>
7696
7697 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7698 useless nonterminals, move them at the end of the symbol arrays.
7699 (reduce_output): Adjust.
7700 * tests/reduce.at (Useless Nonterminals): Adjust.
7701
7702 2001-11-30 Akim Demaille <akim@epita.fr>
7703
7704 * src/reduce.c: Various comment/formatting changes.
7705 (nonterminals_reduce): New, extracted from...
7706 (reduce_grammar_tables): here.
7707 (reduce_grammar): Call nonterminals_reduce.
7708
7709 2001-11-29 Paul Eggert <eggert@twinsun.com>
7710
7711 * src/bison.simple (YYSTACK_REALLOC): Remove.
7712 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7713 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7714 New macros.
7715 (union yyalloc): New type.
7716 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7717 an arbitrary restriction on hosts where size_t is wider than int.
7718
7719 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7720 a parser stack overflow. Allocate just one block of memory for all
7721 three stacks, instead of allocating three blocks; this typically is
7722 faster and reduces fragmentation.
7723
7724 Do not limit the number of items in the stack to a value that fits
7725 in 'int', as this is an arbitrary limit on hosts with 64-bit
7726 size_t and 32-bit int.
7727
7728 2001-11-29 Marc Autret <autret_m@epita.fr>
7729
7730 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7731 of defining YYERROR_VERBOSE.
7732 [AT_DATA]: $4 is now out of C declarations in the prologue.
7733
7734 2001-11-28 Marc Autret <autret_m@epita.fr>
7735
7736 * src/reader.c (parse_dquoted_param): New.
7737 (parse_skel_decl): Use it.
7738 * src/lex.h: Add its prototype.
7739 * src/lex.c (literalchar): Become not static.
7740
7741 2001-11-28 Marc Autret <autret_m@epita.fr>
7742
7743 * src/output.h: And put its extern declaration here.
7744 * src/output.c (error_verbose): Define here.
7745 (prepare): Echo name modification.
7746 * src/getargs.h: Clean its extern declaration.
7747 * src/getargs.c (error_verbose_flag): Remove.
7748 (getargs): Remove case 'e'.
7749 * src/options.c (option_table): 'error-verbose' is now seen as simple
7750 percent option.
7751 Include output.h.
7752
7753 * src/reader.c (read_declarations): Remove case tok_include.
7754 (parse_include_decl): Remove.
7755 * src/lex.h (token_t): Remove tok_include.
7756 * src/options.c (option_table): 'include' is now a simple command line
7757 option.
7758
7759 2001-11-28 Marc Autret <autret_m@epita.fr>
7760
7761 * src/bison.simple: Adjust muscle names.
7762 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7763 * src/output.c (prepare): s/_/-/ for the muscles names.
7764 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7765
7766 2001-11-28 Marc Autret <autret_m@epita.fr>
7767
7768 * src/bison.simple: Fix debug.
7769 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7770
7771 2001-11-28 Akim Demaille <akim@epita.fr>
7772
7773 * src/LR0.c (shifts_new): New.
7774 (save_shifts, insert_start_shift, augment_automaton): Use it.
7775
7776 2001-11-28 Akim Demaille <akim@epita.fr>
7777
7778 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7779 keep ruleno only.
7780
7781 2001-11-28 Akim Demaille <akim@epita.fr>
7782
7783 * src/closure.c (closure): Instead of looping over word in array
7784 then bits in words, loop over bits in array.
7785
7786 2001-11-28 Akim Demaille <akim@epita.fr>
7787
7788 * src/closure.c (closure): No longer optimize the special case
7789 where all the bits of `ruleset[r]' are set to 0, to make the code
7790 clearer.
7791
7792 2001-11-28 Akim Demaille <akim@epita.fr>
7793
7794 * src/closure.c (closure): `r' and `c' are new variables, used to
7795 de-obfuscate accesses to RULESET and CORE.
7796
7797 2001-11-28 Akim Demaille <akim@epita.fr>
7798
7799 * src/reduce.c (reduce_print): Use ngettext.
7800 (dump_grammar): Improve the trace accuracy.
7801
7802 2001-11-28 Akim Demaille <akim@epita.fr>
7803
7804 * src/reduce.c (dump_grammar): Don't translate trace messages.
7805
7806 2001-11-28 Akim Demaille <akim@epita.fr>
7807
7808 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7809 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7810 as all tags are free'ed afterwards.
7811 From Enrico Scholz.
7812
7813 2001-11-27 Paul Eggert <eggert@twinsun.com>
7814
7815 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7816 use alloca when we didn't want to, and vice versa.
7817
7818 2001-11-27 Marc Autret <autret_m@epita.fr>
7819
7820 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7821 initialization.
7822 * src/output.c (prepare): Remove its update.
7823
7824 2001-11-27 Marc Autret <autret_m@epita.fr>
7825
7826 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7827 Use %error-verbose.
7828
7829 2001-11-27 Marc Autret <autret_m@epita.fr>
7830
7831 * src/bison.simple: Remove YYERROR_VERBOSE using.
7832 Use %%error_verbose.
7833 (yyparse): Likewise.
7834 * src/output.c (prepare): Give its final value.
7835 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7836 * src/getargs.h: Add its extern declaration.
7837 * src/getargs.c (error_verbose_flag): New int.
7838 (getargs): Update to catch new case.
7839 * src/options.c (option_table): 'error-verbose' is a new option.
7840 (shortopts): Update.
7841
7842 2001-11-27 Akim Demaille <akim@epita.fr>
7843
7844 * src/system.h: Use intl/libgettext.h.
7845 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7846
7847 2001-11-27 Akim Demaille <akim@epita.fr>
7848
7849 * tests/torture.at (Exploding the Stack Size with Malloc):
7850 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7851
7852 2001-11-27 Akim Demaille <akim@epita.fr>
7853
7854 * src/files.c: Include error.h.
7855 Reported by Hans Aberg.
7856
7857 2001-11-26 Marc Autret <autret_m@epita.fr>
7858
7859 * src/reader.c (parse_include_decl): New, not yet implemented.
7860 (read_declarations): Add case tok_include.
7861 * src/getargs.h (include): Add its extern definition.
7862 * src/getargs.c (include): New const char *.
7863 (getargs): Add case '-I'.
7864 * src/options.c (option_table): Add include as command line and
7865 percent option.
7866 * src/lex.h (token_t): Add tok_include.
7867
7868 2001-11-26 Akim Demaille <akim@epita.fr>
7869
7870 * src/reader.c (readgram): Make sure rules for mid-rule actions
7871 have a lineno equal to that of their host rule.
7872 Reported by Hans Aberg.
7873 * tests/regression.at (Rule Line Numbers): New.
7874
7875 2001-11-26 Akim Demaille <akim@epita.fr>
7876
7877 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7878 size_ts.
7879
7880 2001-11-26 Akim Demaille <akim@epita.fr>
7881
7882 * src/complain.c, src/complain.h (error): Remove, provided by
7883 lib/error.[ch].
7884
7885 2001-11-26 Akim Demaille <akim@epita.fr>
7886
7887 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7888 issue an error message.
7889 * tests/regression.at (Invalid %directive): New.
7890 Reported by Hans Aberg.
7891
7892 2001-11-26 Akim Demaille <akim@epita.fr>
7893
7894 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7895 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7896
7897 2001-11-26 Akim Demaille <akim@epita.fr>
7898
7899 * src/conflicts.c (conflicts_print): Don't complain at all when
7900 there are no reduce/reduce conflicts, and as many shift/reduce
7901 conflicts as expected.
7902 * tests/regression.at (%expect right): Adjust.
7903
7904 2001-11-23 Akim Demaille <akim@epita.fr>
7905
7906 * lib/alloca.c: Update, from fileutils.
7907
7908 2001-11-23 Akim Demaille <akim@epita.fr>
7909
7910 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7911
7912 2001-11-23 Akim Demaille <akim@epita.fr>
7913
7914 * src/system.h: Include alloca.h.
7915 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7916
7917 2001-11-23 Akim Demaille <akim@epita.fr>
7918
7919 * src/print_graph.c (print_actions): Remove `rule', unused.
7920 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7921 pacify GCC's signed < unsigned warnings.
7922 * src/closure.c (itemsetsize): Likewise.
7923 * src/reader.c (symbol_list_new): Static.
7924
7925 2001-11-23 Akim Demaille <akim@epita.fr>
7926
7927 Attaching lineno to buckets is stupid, since only one copy of each
7928 symbol is kept, only the line of the first occurrence is kept too.
7929
7930 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7931 * src/reader.c (rline_allocated): Remove, unused.
7932 (symbol_list): Have a `line' member.
7933 (symbol_list_new): New.
7934 (readgram): Use it.
7935 * src/print.c (print_grammar): Output the rule line numbers.
7936 * tests/regression.at (Solved SR Conflicts)
7937 (Unresolved SR Conflicts): Adjust.
7938 Reported by Hans Aberg.
7939
7940 2001-11-22 Marc Autret <autret_m@epita.fr>
7941
7942 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7943
7944 2001-11-22 Marc Autret <autret_m@epita.fr>
7945
7946 * src/muscle_tab.c (muscle_init): Remove initialization of
7947 skeleton muscle.
7948 * src/output.c (output_master_parser): Do it here.
7949
7950 2001-11-20 Akim Demaille <akim@epita.fr>
7951
7952 * po/sv.po: New.
7953 * configure.in (ALL_LINGUAS): Adjust.
7954 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7955 longer contains strings to translate.
7956
7957 2001-11-19 Akim Demaille <akim@epita.fr>
7958
7959 * src/conflicts.c (conflicts_print): Add a missing \n.
7960
7961 2001-11-19 Akim Demaille <akim@epita.fr>
7962
7963 * src/nullable.c (nullable_print): New.
7964 (set_nullable): Call it when tracing.
7965 Better locality of variables.
7966
7967 2001-11-19 Akim Demaille <akim@epita.fr>
7968
7969 * src/print.c (print_actions): Better locality of variables.
7970
7971 2001-11-19 Akim Demaille <akim@epita.fr>
7972
7973 * src/derives.c (print_derives): Fix and enrich.
7974 * src/closure.c (print_fderives): Likewise.
7975
7976 2001-11-19 Akim Demaille <akim@epita.fr>
7977
7978 * src/closure.c (itemsetend): Remove, replaced with...
7979 (itemsetsize): new.
7980
7981 2001-11-19 Akim Demaille <akim@epita.fr>
7982
7983 * src/LR0.c (kernel_end): Remove, replaced with...
7984 (kernel_size): new.
7985
7986 2001-11-19 Akim Demaille <akim@epita.fr>
7987
7988 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7989 to clarify.
7990
7991 2001-11-19 Akim Demaille <akim@epita.fr>
7992
7993 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7994
7995 2001-11-19 Akim Demaille <akim@epita.fr>
7996
7997 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7998 trace messages.
7999 * src/LR0.c: Likewise.
8000 (allocate_itemsets): Use arrays instead of pointers to clarify.
8001
8002 2001-11-19 Akim Demaille <akim@epita.fr>
8003
8004 * src/getargs.c (statistics_flag): Replace with...
8005 (trace_flag): New.
8006 (longopts): Accept --trace instead of --statistics.
8007 * src/getargs.h, src/options.c: Adjust.
8008 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
8009 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
8010
8011 2001-11-19 Akim Demaille <akim@epita.fr>
8012
8013 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8014 pointers to clarify the code.
8015 (save_reductions, save_shifts): Factor common parts of alternatives.
8016
8017 2001-11-19 Akim Demaille <akim@epita.fr>
8018
8019 * src/LR0.c (new_state, get_state): Complete TRACE code.
8020 * src/closure.c: Include `reader.h' to get `tags', needed by the
8021 trace code.
8022 Rename the conditional DEBUG as TRACE.
8023 Output consistently TRACEs to stderr, not stdout.
8024 * src/derives.c: Likewise.
8025 * src/reduce.c: (inaccessable_symbols): Using if is better style
8026 than goto.
8027 Use `#if TRACE' instead of `#if 0' for tracing code.
8028
8029 2001-11-19 Akim Demaille <akim@epita.fr>
8030
8031 * src/system.h (LIST_FREE, shortcpy): New.
8032 * src/LR0.c: Use them.
8033 * src/output.c (free_itemsets, free_reductions, free_shifts):
8034 Remove, replaced by LIST_FREE.
8035
8036 2001-11-19 Akim Demaille <akim@epita.fr>
8037
8038 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8039 (REDUCTIONS_ALLOC): New.
8040 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8041 allocation.
8042
8043 2001-11-19 Akim Demaille <akim@epita.fr>
8044
8045 * src/LR0.c (new_state): Complete trace code.
8046 * src/nullable.c (set_nullable): Don't translate traces.
8047
8048 2001-11-19 Akim Demaille <akim@epita.fr>
8049
8050 * src/print_graph.c (print_core): Better locality of variables.
8051 * src/print.c (print_core): Likewise.
8052
8053 2001-11-19 Akim Demaille <akim@epita.fr>
8054
8055 * src/vcg.c: You do the output, so you are responsible of the
8056 handling of VCG syntax, in particular: use quotearg.
8057 * src/print_graph.c: Don't.
8058 (print_actions): Don't output the actions as part of the nodes,
8059 since that's the job of the edges.
8060 (print_state): Don't output by hand: fill the node description,
8061 and ask for its output.
8062
8063 2001-11-19 Akim Demaille <akim@epita.fr>
8064
8065 * src/bison.simple (yyparse): When verbosely reporting an error,
8066 no longer put additional quotes around token names.
8067 * tests/calc.at: Adjust.
8068
8069 2001-11-19 Akim Demaille <akim@epita.fr>
8070
8071 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8072 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8073 * src/output.c: Adjust.
8074
8075 2001-11-19 Akim Demaille <akim@epita.fr>
8076
8077 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8078 (rule_t): this.
8079 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8080
8081 2001-11-19 Akim Demaille <akim@epita.fr>
8082
8083 * src/gram.h (rule_t): New.
8084 (rule_table): New.
8085 (rrhs, rlhs): Remove, part of state_t.
8086 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8087 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8088 * src/reader.c, src/reduce.c: Adjust.
8089
8090 2001-11-19 Akim Demaille <akim@epita.fr>
8091
8092 * src/reader.c (symbols_output): New, extracted from...
8093 (packsymbols): Here.
8094 (reader): Call it.
8095
8096 2001-11-19 Akim Demaille <akim@epita.fr>
8097
8098 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8099 (maxrhs): this new function.
8100
8101 2001-11-19 Akim Demaille <akim@epita.fr>
8102
8103 * src/lalr.c (F): New macro to access the variable F.
8104 Adjust.
8105
8106 2001-11-19 Akim Demaille <akim@epita.fr>
8107
8108 * src/lalr.h (LA): New macro to access the variable LA.
8109 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8110 * src/lalr.c: Adjust.
8111
8112 2001-11-19 Akim Demaille <akim@epita.fr>
8113
8114 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8115 (set_state_table): handle the `lookaheads' members.
8116
8117 2001-11-19 Akim Demaille <akim@epita.fr>
8118
8119 * src/lalr.h (lookaheads): Removed array, whose contents is now
8120 a member of...
8121 (state_t): this structure.
8122 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8123 Adjust.
8124
8125 2001-11-19 Akim Demaille <akim@epita.fr>
8126
8127 * src/lalr.h (consistent): Removed array, whose contents is now
8128 a member of...
8129 (state_t): this structure.
8130 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8131 Adjust.
8132
8133 2001-11-19 Akim Demaille <akim@epita.fr>
8134
8135 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8136 contents are now members of...
8137 (state_t): this structure.
8138 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8139 Adjust.
8140
8141 2001-11-19 Akim Demaille <akim@epita.fr>
8142
8143 * src/lalr.h (state_t): New.
8144 (state_table): Be a state_t * instead of a core **.
8145 (accessing_symbol): Remove, part of state_t.
8146 * src/lalr.c: Adjust.
8147 (set_accessing_symbol): Merge into...
8148 (set_state_table): this.
8149 * src/print_graph.c, src/conflicts.c: Adjust.
8150
8151 2001-11-14 Akim Demaille <akim@epita.fr>
8152
8153 * tests/calc.at, tests/output.at, tests/regression.at,
8154 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8155 now the tests are run in private dirs, therefore AC_CLEANUP and
8156 family can be simplified to 0-ary.
8157 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8158 use abs. path to find config.h.
8159 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8160 stderr, there can be way too much random noise.
8161 Instead pass -Werror to GCC and rely on the exit status.
8162 Reported by Wolfram Wagner.
8163
8164 2001-11-14 Akim Demaille <akim@epita.fr>
8165
8166 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8167 defined only if yyoverflow is defined, to avoid `warning: unused
8168 variable `yyvs1''.
8169 Reported by The Test Suite.
8170
8171 2001-11-14 Akim Demaille <akim@epita.fr>
8172
8173 * src/print.c: Include reduce.h.
8174 Reported by Hans Aberg.
8175
8176 2001-11-14 Akim Demaille <akim@epita.fr>
8177
8178 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8179 Revert a previous patch: these are really const.
8180 * src/conflicts.c (conflict_report): Additional useless pair of
8181 braces to pacify GCC's warnings for `if () if () {} else {}'.
8182 * src/lex.c (parse_percent_token): Replace equal_offset with
8183 arg_offset.
8184 arg is const.
8185 Be sure to strdup `arg' when used, since there is no reason for
8186 token_buffer not to change.
8187
8188 2001-11-14 Akim Demaille <akim@epita.fr>
8189
8190 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8191 definition.
8192 * src/main.c (main): Use them.
8193 Suggested by Hans Aberg.
8194
8195 2001-11-12 Akim Demaille <akim@epita.fr>
8196
8197 * src/system.h (ngettext): Now that we use ngettext, be sure to
8198 provide a default definition when NLS are not used.
8199
8200 2001-11-12 Akim Demaille <akim@epita.fr>
8201
8202 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8203 Use @kbd to denote user input.
8204 (Language and Grammar): ANSIfy the example.
8205 Adjust its layout for info/notinfo.
8206 (Location Tracking Calc): Output error messages to stderr.
8207 Output locations in a more GNUtically correct way.
8208 Fix a couple of Englishos.
8209 Adjust @group/@end group pairs.
8210
8211 2001-11-12 Akim Demaille <akim@epita.fr>
8212
8213 %expect was not functioning at all.
8214
8215 * src/conflicts.c (expected_conflicts): Set to -1.
8216 (conflict_report): Use ngettext.
8217 (conflicts_print): Check %expect and make its violation an error.
8218 * doc/bison.texinfo (Expect Decl): Adjust.
8219 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8220 * tests/regression.at (%expect not enough, %expect right)
8221 (%expect too much): New.
8222
8223 2001-11-12 Akim Demaille <akim@epita.fr>
8224
8225 * tests/regression.at (Conflicts): Rename as...
8226 (Unresolved SR Conflicts): this.
8227 (Solved SR Conflicts): New.
8228
8229 2001-11-12 Akim Demaille <akim@epita.fr>
8230
8231 * src/reduce.c (print_results): Rename as...
8232 (reduce_output): This.
8233 Output to OUT, passed as argument, instead of output_obstack.
8234 (dump_grammar): Likewise.
8235 (reduce_free): New.
8236 Also free V1.
8237 (reduce_grammar): No longer call reduce_output, since...
8238 * src/print.c (print_results): do it.
8239 * src/main.c (main): Call reduce_free;
8240
8241 2001-11-12 Akim Demaille <akim@epita.fr>
8242
8243 * src/conflicts.c (print_reductions): Accept OUT as argument.
8244 Output to it, not to output_obstack.
8245 * src/print.c (print_actions): Adjust.
8246
8247 2001-11-12 Akim Demaille <akim@epita.fr>
8248
8249 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8250 the result instead of using...
8251 (src_total, rrc_total, src_count, rrc_count): Remove.
8252 (any_conflicts): Remove.
8253 (print_conflicts): Split into...
8254 (conflicts_print, conflicts_output): New.
8255 * src/conflicts.h: Adjust.
8256 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8257 * src/print.c (print_grammar): Issue `\n' between two rules.
8258 * tests/regression.at (Conflicts): New.
8259 Reported by Tom Lane.
8260
8261 2001-11-12 Akim Demaille <akim@epita.fr>
8262
8263 * tests/regression.at (Invalid input): Remove, duplicate with
8264 ``Invalid input: 1''.
8265
8266 2001-11-12 Akim Demaille <akim@epita.fr>
8267
8268 * tests/torture.at (AT_DATA_STACK_TORTURE)
8269 (Exploding the Stack Size with Alloca)
8270 (Exploding the Stack Size with Malloc): New.
8271
8272 2001-11-12 Akim Demaille <akim@epita.fr>
8273
8274 * src/bison.simple (YYSTACK_REALLOC): New.
8275 (yyparse) [!yyoverflow]: Use it and free the old stack.
8276 Reported by Per Allansson.
8277
8278 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8279
8280 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8281 define CPP macro, which substitute YYSTYPE by yystype.
8282 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8283 with yyltype/YYLTYPE. This allows inclusion of the generated
8284 header within the parser if the compiler, such as GGC, accepts
8285 multiple equivalent #defines.
8286 From Akim.
8287
8288 2001-11-05 Akim Demaille <akim@epita.fr>
8289
8290 * src/reader.c (symbols_output): New, extracted from...
8291 (packsymbols): here.
8292 (reader): Adjust.
8293
8294 2001-11-05 Akim Demaille <akim@epita.fr>
8295
8296 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8297
8298 2001-11-05 Akim Demaille <akim@epita.fr>
8299
8300 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8301 pattern.
8302
8303 2001-11-05 Akim Demaille <akim@epita.fr>
8304
8305 * src/options.h (struct option_table_struct): set_flags is void*.
8306 * src/options.c (longopts): Support `--output' and `%output'.
8307 (usage): Adjust.
8308 * src/lex.h (tok_setopt): Remove, replaced with...
8309 (tok_intopt, tok_stropt): these new guys.
8310 * src/lex.c (getopt.h): Not needed.
8311 (token_buffer, unlexed_token_buffer): Not const.
8312 (percent_table): Promote `-' over `_' in directive names.
8313 Active `%name-prefix', `file-prefix', and `output'.
8314 (parse_percent_token): Accept possible arguments to directives.
8315 Promote `-' over `_' in directive names.
8316
8317 2001-11-04 Akim Demaille <akim@epita.fr>
8318
8319 * doc/bison.texinfo (Decl Summary): Split the list into
8320 `directives for grammars' and `directives for bison'.
8321 Sort'em.
8322 Add description of `%name-prefix', `file-prefix', and `output'.
8323 Promote `-' over `_' in directive names.
8324 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8325 Simplify the description of `--name-prefix'.
8326 Promote `-' over `_' in directive names.
8327 Promote `--output' over `--output-file'.
8328 Fix the description of `--defines'.
8329 * tests/output.at: Exercise %file-prefix and %output.
8330
8331 2001-11-02 Akim Demaille <akim@epita.fr>
8332
8333 * doc/refcard.tex: Update.
8334
8335 2001-11-02 Akim Demaille <akim@epita.fr>
8336
8337 * src/symtab.h (SUNDEF): New.
8338 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8339 stand for `uninitialized', instead of 0.
8340 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8341 * src/lex.c (lex): Adjust.
8342
8343 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8344 Number it 0.
8345 Let yylex return it instead of a plain 0.
8346 Reported by Dick Streefland.
8347
8348 2001-11-02 Akim Demaille <akim@epita.fr>
8349
8350 * tests/regression.at (Mixing %token styles): New test.
8351
8352 2001-11-02 Akim Demaille <akim@epita.fr>
8353
8354 * src/reader.c (parse_thong_decl): Formatting changes.
8355 (token_translations_init): New, extracted from...
8356 (packsymbols): Here.
8357 Adjust.
8358
8359 2001-11-01 Akim Demaille <akim@epita.fr>
8360
8361 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8362 Check that `9foo.y' produces correct cpp guards.
8363 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8364 guards.
8365 Reported by Wwp.
8366
8367 2001-11-01 Akim Demaille <akim@epita.fr>
8368
8369 * tests/regression.at (Invalid input: 2): New.
8370 * src/lex.c (unlexed_token_buffer): New.
8371 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8372 too.
8373 Reported by Wwp.
8374
8375 2001-11-01 Akim Demaille <akim@epita.fr>
8376
8377 * tests/calc.at: Catch up with 1.30.
8378 * configure.in: Bump to 1.49a.
8379 Adjust to newer Autotest.
8380
8381 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8382
8383 * src/conflicts.c: Move global variables rrc_total and src_total ...
8384 (print_conflicts): here.
8385 * src/output.c (output): Free global variable user_toknums.
8386 * src/lex.c (token_obstack): Become static.
8387
8388 2001-10-18 Akim Demaille <akim@epita.fr>
8389
8390 * tests/atlocal.in (GCC): Add.
8391 * tests/calc.at: s/m4_match/m4_bmatch/.
8392 s/m4_patsubst/m4_bpatsubst/.
8393 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8394 * configure.in: AC_SUBST(GCC).
8395
8396 2001-10-14 Marc Autret <autret_m@epita.fr>
8397
8398 * src/options.c (create_long_option_table): Fix.
8399
8400 2001-10-10 Akim Demaille <akim@epita.fr>
8401
8402 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8403
8404 2001-10-04 Akim Demaille <akim@epita.fr>
8405
8406 * src/reader.c (parse_union_decl): Push the caracters in
8407 union_obstack, not attrs_obstack.
8408
8409 2001-10-04 Akim Demaille <akim@epita.fr>
8410
8411 Merge in the branch 1.29.
8412
8413 * src/reader.c (packsymbols): Use a temporary obstack for
8414 `%%tokendef', since output_stack is already used elsewhere.
8415
8416 2001-10-02 Akim Demaille <akim@epita.fr>
8417
8418 Bump 1.29d.
8419
8420 2001-10-02 Akim Demaille <akim@epita.fr>
8421
8422 Version 1.29c.
8423
8424 2001-10-02 Akim Demaille <akim@epita.fr>
8425
8426 * tests/regression.at (Invalid CPP headers): New.
8427 From Alexander Belopolsky.
8428 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8429
8430 2001-10-02 Akim Demaille <akim@epita.fr>
8431
8432 * tests/regression.at (Invalid input): New.
8433 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8434 Reported by Shura.
8435
8436 2001-10-02 Akim Demaille <akim@epita.fr>
8437
8438 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8439
8440 2001-10-02 Akim Demaille <akim@epita.fr>
8441
8442 * src/output.c (output_parser): Assert `skeleton'.
8443 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8444 systems.
8445 From Shura.
8446
8447 2001-10-01 Marc Autret <autret_m@epita.fr>
8448
8449 * src/lex.h: Echo modifications.
8450 * src/lex.c (unlex): Parameter is now token_t.
8451 From Hans Aberg.
8452
8453 2001-10-01 Marc Autret <autret_m@epita.fr>
8454
8455 * src/main.c: Include lex.h.
8456 From Hans Aberg.
8457
8458 2001-09-29 Akim Demaille <akim@epita.fr>
8459
8460 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8461
8462 2001-09-28 Akim Demaille <akim@epita.fr>
8463
8464 * tests/testsuite.at: Update to newer Autotest.
8465 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8466
8467 2001-09-27 Akim Demaille <akim@epita.fr>
8468
8469 Position independent wrapper.
8470
8471 * tests/bison: Remove.
8472 * tests/bison.in: New.
8473 * configure.in: Adjust.
8474
8475 2001-09-27 Paul Eggert <eggert@twinsun.com>
8476
8477 Port quotearg fixes from tar 1.13.24.
8478
8479 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8480 tm to be declared.
8481 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8482 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8483
8484 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8485 * m4/mbrtowc.m4: New file.
8486 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8487 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8488
8489 2001-09-27 Akim Demaille <akim@epita.fr>
8490
8491 Bump to 1.29c.
8492
8493 2001-09-27 Akim Demaille <akim@epita.fr>
8494
8495 Version 1.29b.
8496
8497 2001-09-25 Akim Demaille <akim@epita.fr>
8498
8499 * src/system.h: Include `xalloc.h'.
8500 Remove it from the C files.
8501 * src/files.c (output_files): Free the obstacks.
8502 * src/lex.c (init_lex): Rename as...
8503 (lex_init): this.
8504 (lex_free): New.
8505 * src/main.c (main): Use it.
8506
8507 2001-09-24 Marc Autret <autret_m@epita.fr>
8508
8509 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8510 to output informations in fout (FILE*).
8511 (open_graph, close_graph): Likewise.
8512 (output_graph, output_edge, output_node): Likewise.
8513 * src/vcg.h: Update function prototypes.
8514 * src/print_graph.c (print_graph): Open output graph file.
8515 (print_actions): Adjust.
8516 * src/files.h: Remove extern declaration.
8517 * src/files.c: Remove graph_obstack declaration.
8518 (open_files): Remove graph_obstack initialization.
8519 (output_files): Remove graph_obstack saving.
8520
8521 2001-09-24 Marc Autret <autret_m@epita.fr>
8522
8523 * src/files.c (compute_output_file_names): Fix.
8524
8525 2001-09-24 Marc Autret <autret_m@epita.fr>,
8526 Akim Demaille <akim@epita.fr>
8527
8528 * src/reader.c (reader): Remove call to free_symtab ().
8529 * src/main.c (main): Call it here.
8530 Include symtab.h.
8531 * src/conflicts.c (initialize_conflicts): Rename as...
8532 (solve_conflicts): this.
8533 * src/print.c (print_core, print_actions, print_state)
8534 (print_grammar): Dump to a file instead a `output_obstack'.
8535 (print_results): Dump `output_obstack', and then proceed with the
8536 FILE *.
8537 * src/files.c (compute_output_file_names, close_files): New.
8538 (output_files): Adjust.
8539 * src/main.c (main): Adjust.
8540
8541 2001-09-23 Marc Autret <autret_m@epita.fr>
8542
8543 * src/files.c (compute_header_macro): Computes header macro name
8544 from spec_defines_file when given.
8545
8546 2001-09-23 Marc Autret <autret_m@epita.fr>
8547
8548 * src/files.c (output_files): Add default extensions.
8549
8550 2001-09-22 Akim Demaille <akim@epita.fr>
8551
8552 * src/conflicts.c (finalize_conflicts): Rename as...
8553 (free_conflicts): this.
8554
8555 2001-09-22 Akim Demaille <akim@epita.fr>
8556
8557 * src/gram.c (gram_free): Rename back as...
8558 (dummy): this.
8559 (output_token_translations): Free `token_translations'.
8560 * src/symtab.c (free_symtab): Free the tag field.
8561
8562 2001-09-22 Akim Demaille <akim@epita.fr>
8563
8564 Remove `translations' as it is always set to true.
8565
8566 * src/gram.h: Adjust.
8567 * src/reader.c (packsymbols, parse_token_decl): Adjust
8568 * src/print.c (print_grammar): Adjust.
8569 * src/output.c (output_token_translations): Adjust.
8570 * src/lex.c (lex): Adjust.
8571 * src/gram.c: Be sure the set pointers to NULL.
8572 (dummy): Rename as...
8573 (gram_free): this.
8574
8575 2001-09-22 Akim Demaille <akim@epita.fr>
8576
8577 * configure.in: Invoke AM_LIB_DMALLOC.
8578 * src/system.h: Use dmalloc.
8579 * src/LR0.c: Be sure to have pointers initialized to NULL.
8580 (allocate_itemsets): Allocate kernel_items only if needed.
8581
8582 2001-09-22 Akim Demaille <akim@epita.fr>
8583
8584 * configure.in: Bump to 1.29b.
8585 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8586 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8587 need xmalloc.c in calc.y.
8588 From Pascal Bart.
8589
8590 2001-09-21 Akim Demaille <akim@epita.fr>
8591
8592 Version 1.29a.
8593 * Makefile.maint, config/config.guess, config/config.sub,
8594 * config/missing: Update from masters.
8595 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8596 upon package.m4.
8597 * configure.in (ALL_LINGUAS): Add `tr'.
8598
8599 2001-09-21 Akim Demaille <akim@epita.fr>
8600
8601 * tests/Makefile.am (package.m4): Move to...
8602 ($(srcdir)/$(TESTSUITE)): here.
8603
8604 2001-09-20 Akim Demaille <akim@epita.fr>
8605
8606 * src/complain.c: No longer try to be standalone: use system.h.
8607 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8608 * src/complain.h: Likewise.
8609 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8610 Remove the unused variable `n'.
8611 From Albert Chin-A-Young.
8612
8613 2001-09-18 Marc Autret <autret_m@epita.fr>
8614
8615 * doc/bison.1: Update.
8616 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8617 descriptions.
8618 (Option Cross Key): Update.
8619 Add --graph.
8620
8621 2001-09-18 Marc Autret <autret_m@epita.fr>
8622
8623 * tests/regression.at: New test (comment in %union).
8624
8625 2001-09-18 Marc Autret <autret_m@epita.fr>
8626
8627 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8628 do that.
8629 Reported by Keith Browne.
8630
8631 2001-09-18 Marc Autret <autret_m@epita.fr>
8632
8633 * tests/output.at: Add tests for --defines and --graph.
8634
8635 2001-09-18 Marc Autret <autret_m@epita.fr>
8636
8637 * tests/output.at: Removes tests of %{header,src}_extension features.
8638
8639 2001-09-18 Akim Demaille <akim@epita.fr>
8640
8641 * tests/Makefile.am (package.m4): New.
8642 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8643 (_AT_CHECK_CALC_ERROR): Likewise.
8644 Factor the `, ' part of verbose error messages.
8645
8646 2001-09-18 Marc Autret <autret_m@epita.fr>
8647
8648 * src/getargs.c (longopts): Declare --defines and --graph as options
8649 with optional arguments.
8650 * src/files.h: Add extern declarations.
8651 * src/files.c (spec_graph_file, spec_defines_file): New.
8652 (output_files): Update.
8653 Remove CPP-outed code.
8654
8655 2001-09-18 Marc Autret <autret_m@epita.fr>
8656
8657 Turn off %{source,header}_extension feature.
8658
8659 * src/files.c (compute_exts_from_gf): Update.
8660 (compute_exts_from_src): Update.
8661 (output_files): CPP-out useless code.
8662 * src/files.h: Remove {header,source}_extension extern declarations.
8663 * src/reader.c (parse_dquoted_param): CPP-out.
8664 (parse_header_extension_decl): Remove.
8665 (parse_source_extension_decl): Remove.
8666 (read_declarations): Remove cases tok_{hdrext,srcext}.
8667 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8668 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8669
8670 2001-09-10 Akim Demaille <akim@epita.fr>
8671
8672 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8673 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8674 (AT_CHECK_OUTPUT): this.
8675 Merely check ls' exit status, its output is useless.
8676
8677 2001-09-10 Akim Demaille <akim@epita.fr>
8678
8679 * tests/calc.at: Use m4_match.
8680 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8681
8682 2001-09-10 Marc Autret <autret_m@epita.fr>,
8683 Akim Demaille <akim@epita.fr>
8684
8685 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8686 enum color_e.
8687 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8688 to `normal'.
8689 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8690 * src/lex.h: Adjust prototype.
8691 (token_t): Add `tok_undef'.
8692 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8693 (parse_percent_token): Now returns token_t.
8694 Add default statement in switch.
8695 (lex): Separate `c' as an input variable, from the token_t result
8696 part.
8697 (unlexed): Is a token_t.
8698
8699 2001-09-10 Akim Demaille <akim@epita.fr>
8700
8701 * configure.in: Bump to 1.29a.
8702
8703 2001-09-07 Akim Demaille <akim@epita.fr>
8704
8705 Version 1.29.
8706
8707 2001-08-30 Akim Demaille <akim@epita.fr>
8708
8709 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8710 * m4/atconfig.m4: Remove.
8711 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8712 * tests/bison: New.
8713 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8714 m4_if, m4_patsubst, and m4_regexp.
8715 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8716 `input' file instead of echo.
8717
8718 2001-08-29 Akim Demaille <akim@epita.fr>
8719
8720 Bump to 1.28e.
8721
8722 2001-08-29 Akim Demaille <akim@epita.fr>
8723
8724 Version 1.28d.
8725
8726 2001-08-29 Paul Eggert <eggert@twinsun.com>
8727
8728 * src/bison.simple (yyparse): Don't take the address of an
8729 item before the start of an array, as that doesn't conform to
8730 the C Standard.
8731
8732 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8733
8734 * doc/bison.texinfo (Location Tracking Calc): New node.
8735
8736 2001-08-29 Paul Eggert <eggert@twinsun.com>
8737
8738 * src/output.c (output): Do not define const, as this now
8739 causes more problems than it cures.
8740
8741 2001-08-29 Akim Demaille <akim@epita.fr>
8742
8743 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8744 the nodes.
8745 Be sure to tag the `detailmenu'.
8746
8747 2001-08-29 Akim Demaille <akim@epita.fr>
8748
8749 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8750 download in a tmp dir.
8751
8752 2001-08-28 Marc Autret <autret_m@epita.fr>
8753
8754 * config/depcomp: New file.
8755
8756 2001-08-28 Marc Autret <autret_m@epita.fr>
8757
8758 * doc/bison.1 (mandoc): Adjust.
8759 From Juan Manuel Guerrero.
8760
8761 2001-08-28 Marc Autret <autret_m@epita.fr>
8762
8763 * src/print_graph.c (print_state): Fix.
8764
8765 2001-08-27 Marc Autret <autret_m@epita.fr>
8766
8767 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8768 char * members.
8769 Echo modifications to the functions prototypes.
8770 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8771
8772 2001-08-27 Marc Autret <autret_m@epita.fr>
8773
8774 * src/vcg.c: Include `xalloc.h'.
8775 (add_colorentry): New.
8776 (add_classname): New.
8777 (add_infoname): New.
8778 * src/vcg.h: Add new prototypes.
8779
8780 2001-08-27 Akim Demaille <akim@epita.fr>
8781
8782 * Makefile.maint: Sync. again with CVS Autoconf.
8783
8784 2001-08-27 Akim Demaille <akim@epita.fr>
8785
8786 * Makefile.maint: Formatting changes.
8787 (po-update, cvs-update, update): New targets.
8788 (AMTAR): Remove.
8789
8790 2001-08-27 Akim Demaille <akim@epita.fr>
8791
8792 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8793 * Makefile.maint: Sync. with CVS Autoconf.
8794
8795 2001-08-27 Marc Autret <autret_m@epita.fr>
8796
8797 * src/vcg.h (struct infoname_s): New.
8798 (struct colorentry_s): New.
8799 (graph_s): New fields {vertical,horizontal}_order in structure.
8800 Add `infoname' field.
8801 Add `colorentry' field;
8802 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8803 (G_HORIZONTAL_ORDER): New.
8804 (G_INFONAME): New.
8805 (G_COLORENTRY): New.
8806 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8807 Add output of `infoname'.
8808 Add output of `colorentry'.
8809
8810 2001-08-27 Marc Autret <autret_m@epita.fr>
8811
8812 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8813 This one shadowed a global parameter.
8814
8815 2001-08-24 Marc Autret <autret_m@epita.fr>
8816
8817 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8818 instead of `unsigned'.
8819 (print_state): Do not call obstack_object_size () in obstack_grow ()
8820 to avoid macro variables shadowing.
8821
8822 2001-08-23 Marc Autret <autret_m@epita.fr>
8823
8824 * src/lex.c (percent_table): Typo: s/naem/name/.
8825 Add graph option.
8826 Normalize new options declarations.
8827
8828 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8829
8830 * tests/suite.at: Exercise %header_extension and %source_extension.
8831
8832 2001-08-16 Marc Autret <autret_m@epita.fr>
8833
8834 * src/reader.c (parse_dquoted_param): New.
8835 (parse_header_extension_decl): Use it.
8836 (parse_source_extension_decl): Likewise.
8837
8838 2001-08-16 Marc Autret <autret_m@epita.fr>
8839
8840 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8841 (get_xxxx_str): Use assert () instead of complain ().
8842 Remove return invokations in default cases.
8843 (get_decision_str): Modify default behaviour. Remove second argument.
8844 Echo modifications on calls.
8845 (output_graph): Fix.
8846
8847 2001-08-16 Marc Autret <autret_m@epita.fr>
8848
8849 * src/getargs.c (usage): Update with ``-g, --graph''.
8850
8851 2001-08-16 Marc Autret <autret_m@epita.fr>
8852
8853 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8854 (Option Cross Key): Likewise.
8855 * doc/bison.1: Update.
8856
8857 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8858
8859 * src/output.c (output_master_parser): Don't finish action_obstack.
8860 (output_parser): Don't care about the muscle action, here.
8861 (prepare): Copy the action_obstack in the action muscle.
8862 (output): Free action_obstack.
8863
8864 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8865
8866 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8867 will contain `%union' declaration.
8868 (parse_union_decl): Delete #line directive output.
8869 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8870 informations about %union.
8871 (parse_union_decl): Copy the union_obstack in the muscle stype.
8872 * src/bison.simple: Add new #line directive.
8873 Add typdef %%stype YYSTYPE.
8874
8875 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8876
8877 * src/bison.simple: Add new `#line' directive.
8878
8879 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8880
8881 * src/bison.simple: New `#line' directive.
8882 * src/output.c (output_parser): Support new dynamic muscle input_line.
8883
8884 2001-09-22 Marc Autret <autret_m@epita.fr>
8885
8886 * src/output.c (output_master_parser): New.
8887 (output_parser): Be more re-entrant.
8888
8889 2001-09-21 Marc Autret <autret_m@epita.fr>
8890
8891 * src/reader.c (copy_definition, parse_union_decl): Update and use
8892 `linef' muscle.
8893 (copy_action): Likewise.
8894 Use obstack_1grow ().
8895 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8896
8897 2001-09-21 Marc Autret <autret_m@epita.fr>
8898
8899 * src/options.c (option_table): Adjust.
8900 * src/lex.c (parse_percent_token): Fix.
8901
8902 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8903
8904 * src/options.c (symtab.h): Include it, need by lex.h.
8905
8906 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8907
8908 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8909 is now an option_table_struct*.
8910 (option_strcmp): New function option_strcmp.
8911 (parse_percent_token): Call option_strcmp.
8912 * src/getargs.c (xalloc.h, options.h): Include it.
8913 (getargs): Call create_long_option_table.
8914 (getargs): Free longopts at the end of the function.
8915 (shortopts): Move in options.c.
8916 * src/options.c (create_long_option_table): New function. Convert
8917 information from option_table to option structure.
8918 * src/reader.c (options.h): Include it.
8919
8920 * src/Makefile.am: Adjust.
8921 * src/options.c (option_table): Create from longopts and percent_table.
8922 * src/getargs.c (longopts): Delete.
8923 * src/lex.c (struct percent_table_struct): Delete.
8924 (percent_table): Delete.
8925 (options.h): Include it.
8926 * src/options.c: Create.
8927 * src/options.h: Create.
8928 Declare enum opt_access_e.
8929 Define struct option_table_struct.
8930
8931 2001-09-20 Marc Autret <autret_m@epita.fr>
8932
8933 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8934 sections of Bison.
8935
8936 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8937
8938 * src/bison.simple: s/%%filename/%%skeleton.
8939 * src/muscle_tab.c (getargs.h): Include it.
8940 (muscle_init): Insert new muscle skeleton.
8941
8942 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8943
8944 * src/output.c (output_parser): Delete unused variable actions_dumped.
8945
8946 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8947
8948 * src/output.c (output): Delete call to reader_output_yylsp.
8949 * src/reader.c (reader): Likewise.
8950 * src/reader.h: Delete declaration of reader_output_yylsp.
8951
8952 2001-09-02 Marc Autret <autret_m@epita.fr>
8953
8954 * src/reader.c: Include muscle_tab.h.
8955 (parse_union_decl): Update.
8956 (parse_macro_decl): Rename parse_muscle_decl.
8957 Update to use renamed functions and variable.
8958 (read_declarations, copy_action, read_additionnal_code, : Updated
8959 with correct variables and functions names.
8960 (packsymbols, reader): Likewise.
8961
8962 * src/reader.h (muscle_obstack): Extern declaration update.
8963
8964 * src/output.c: Include muscle_tab.h
8965 In all functions using macro_insert, change by using muscle_insert ().
8966 (macro_obstack): Rename muscle_obstack.
8967 Echo modifications in the whole file.
8968 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8969 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8970 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8971
8972 * src/muscle_tab.h: Update double inclusion macros.
8973 (macro_entry_s): Rename muscle_entry_s.
8974 Update prototypes.
8975
8976 * src/muscle_tab.c: Include muscle_tab.h.
8977 Rename macro_tabble to muscle_table.
8978 (mhash1, mhash2, mcmp): Use muscle_entry.
8979 (macro_init): Rename muscle_init. Update.
8980 (macro_insert): Rename muscle_insert. Update.
8981 (macro_find): Rename muscle_find. Update.
8982
8983 * src/main.c: Include muscle_tab.h.
8984 (main): Call muscle_init ().
8985 * src/Makefile.am (bison_SOURCES): Echo modifications.
8986
8987 2001-09-02 Marc Autret <autret_m@epita.fr>
8988
8989 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8990
8991 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8992
8993 2001-09-02 Marc Autret <autret_m@epita.fr>
8994
8995 * src/macrotab.c, src/macrotab.h: Remove.
8996
8997 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8998
8999 * src/reader.c (copy_guard): Use muscle to specify the `#line'
9000 filename.
9001
9002 2001-09-01 Marc Autret <autret_m@epita.fr>
9003
9004 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
9005 to an explicit value to activate the feature. We do it here.
9006
9007 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9008
9009 * src/output.c (prepare): Delete the `filename' muscule insertion.
9010 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
9011 (parse_union_decl): Likewise.
9012 * src/macrotab.c (macro_init): Initialize filename by infile.
9013
9014 2001-08-31 Marc Autret <autret_m@epita.fr>
9015
9016 * src/bison.simple (YYLSP_NEEDED): New definition.
9017 * src/output.c (prepare): Add macro insertion of `locations_flag'
9018
9019 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9020
9021 * src/output.c (prepare): Delete insertion of previous muscles,
9022 and insert the `prefix' muscles.
9023 * src/macrotab.c (macro_init): Likewise.
9024 (macro_init): Initialization prefix directive by `yy'.
9025 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9026 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9027 yylval, yydebug, yyerror, yynerrs and yyparse.
9028 New directive `#define' to substitute yydebug, ... with option
9029 name_prefix.
9030
9031 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9032
9033 * src/main.c (main): Standardize.
9034 * src/output.c (output_table_data, output_parser): Likewise.
9035 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9036
9037 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9038
9039 * src/reader.c (read_additionnal_code): Rename %%user_code to
9040 %%epilogue.
9041 * src/output.c (output): Rename %%declarations to %%prologue.
9042 * src/bison.simple: Echo modifications.
9043
9044 2001-08-31 Marc Autret <autret_m@epita.fr>
9045
9046 * src/reader.c (readgram): CleanUp.
9047 (output_token_defines): Likewise.
9048 (packsymbols): Likewise.
9049 (reader): Likewise.
9050 * src/output.c (output): CPP-out useless code.
9051
9052 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9053
9054 * src/reader.c (reader): Delete obsolete call to function
9055 output_trailers and output_headers.
9056 * src/output.h: Remove obsolete functions prototypes of output_headers
9057 and output_trailers.
9058
9059 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9060
9061 * src/main.c: Include macrotab.h.
9062 * src/macrotab.h (macro_entry_s): Constify fields.
9063 Adjust functions prototypes.
9064 * src/macrotab.c (macro_insert): Constify key and value.
9065 (macro_find): Constify key.
9066 (macro_insert): Include 'xalloc.h'
9067 (macro_insert): Use XMALLOC.
9068 (macro_find): Constify return value.
9069 * src/output.c (output_table_data): Rename table to table_data.
9070 (output_parser): Constify macro_key, macro_value.
9071
9072 2001-08-30 Marc Autret <autret_m@epita.fr>
9073
9074 * src/reader.c (parse_skel_decl): New.
9075 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9076 * src/lex.h (token_t): New token `tok_skel'.
9077 * src/lex.c (percent_table): Add skeleton option entry.
9078 Standardize.
9079
9080 2001-08-29 Marc Autret <autret_m@epita.fr>
9081
9082 * src/bison.simple: Add %%user_code directive at the end.
9083 * src/reader.c (read_additionnal_code): New.
9084 (reader): Use it.
9085 * src/output.c (output_program): Remove.
9086 (output): Update.
9087
9088 2001-08-28 Marc Autret <autret_m@epita.fr>
9089
9090 * src/output.c (output_actions): Clean up.
9091 (output_gram): CPP-out useless code.
9092 * src/reader.c (reader): Clean up, CPP-out useless code.
9093
9094 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9095
9096 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9097 directive.
9098 * src/bison.simple: Add `%%definitions'.
9099
9100 2001-08-28 Marc Autret <autret_m@epita.fr>
9101
9102 * config/depcomp: New file.
9103
9104 2001-08-27 Paul Eggert <eggert@twinsun.com>
9105
9106 * src/bison.simple (yyparse): Don't take the address of an
9107 item before the start of an array, as that doesn't conform to
9108 the C Standard.
9109
9110 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9111
9112 * src/output.c (output): Remove the initialization of the macro
9113 obstack. It was done too late here.
9114
9115 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9116 completely wrong.
9117 (reader): Initialize the macro obstack here, since we need it to grow
9118 '%define' directives.
9119
9120 * src/reader.h: Declare the macro obstack as extern.
9121
9122 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9123
9124 * src/output.c (output_parser): Fix. Store single '%' characters in
9125 the output obstack instead of throwing them away.
9126
9127 2001-08-27 Akim Demaille <akim@epita.fr>
9128
9129 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9130
9131 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9132
9133 * lib/Makefile.am: Adjust.
9134
9135 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9136
9137 * src/bison.simple: Update and add '%%' directives.
9138
9139 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9140
9141 * src/reader.c (reader): Remove calls to 'output_headers' and
9142 'output_trailers'. Remove some C output.
9143 (readgram): Disable a piece of code that was writing a default
9144 definition for 'YYSTYPE'.
9145 (reader_output_yylsp): Remove.
9146 (packsymbols): Output token defintions to a macro.
9147 (copy_definition): Disable C output.
9148
9149 * src/reader.c (parse_macro_decl): New function used to parse macro
9150 declarations.
9151 (copy_string2): Put the body of copy_string into this new function.
9152 Add a parameter to let the caller choose whether he wants to copy the
9153 string delimiters or not.
9154 (copy_string): Be a simple call to copy_string2 with the last argument
9155 bound to true.
9156 (read_declarations): Add case for macro definition.
9157 (copy_identifier): New.
9158 (parse_macro_decl): Read macro identifiers using copy_identifier
9159 rather than lex.
9160
9161 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9162
9163 * src/output.c (prepare): Add prefixed names.
9164 (output_parser): Output semantic actions.
9165 (output_parser): Fix bug on '%%line' directives.
9166
9167 * src/output.c (output_headers): Remove. The C code printed by this
9168 function should now be in the skeletons.
9169 (output_trailers): Remove.
9170 (output): Disable call to 'reader_output_yylsp'.
9171 (output_rule_data): Do not output tables to the table obstack.
9172
9173 * src/output.c: Remove some C dedicated output.
9174 Improve the use of macro and output obstacks.
9175 (output_defines): Remove.
9176
9177 * src/output.c (output_token_translations): Associate 'translate'
9178 table with a macro. No output to the table obstack.
9179 (output_gram): Same for 'rhs' and 'prhs'.
9180 (output_stos): Same for 'stos'.
9181 (output_rule_data): Same for 'r1' and 'r2'.
9182 (token_actions): Same for 'defact'.
9183 (goto_actions): Same for 'defgoto'.
9184 (output_base): Same for 'pact' and 'pgoto'.
9185 (output_table): Same for 'table'.
9186 (output_check): Same for 'check'.
9187
9188 * src/output.c (output_table_data): New function.
9189 (output_short_table): Remove.
9190 (output_short_or_char_table): Remove.
9191
9192 * src/output.c (output_parser): Replace most of the skeleton copy code
9193 with something new. Skeletons are now processed character by character
9194 rather than line by line, and Bison looks for '%%' macros. This is the
9195 first step in making Bison's output process (a lot) more flexible.
9196 (output_parser): Use the macro table.
9197
9198 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9199
9200 * src/main.c (main): Initialize the macro table.
9201
9202 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9203
9204 * src/lex.c (percent_table): Add tok_define.
9205 * src/lex.h: Add tok_define.
9206
9207 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9208
9209 * src/macrotab.c: New file.
9210 * src/macrotab.h: New file.
9211 * src/Makefile.am: Update.
9212
9213 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9214
9215 * lib/hash.c: New file.
9216 * lib/hash.h: New file.
9217 * lib/Makefile.am: Update.
9218
9219 2001-08-15 Akim Demaille <akim@epita.fr>
9220
9221 Version 1.28c.
9222
9223 2001-08-15 Marc Autret <autret_m@epita.fr>
9224
9225 * src/reader.c (readgram): Indent output macro YYSTYPE.
9226 (packsymbols): Likewise.
9227 (output_token_defines): Likewise.
9228 * src/files.c: Standardize.
9229 (compute_header_macro): New.
9230 (defines_obstack_save): New. Use compute_header_macro.
9231 (output_files): Update. Use defines_obstack_save.
9232
9233 2001-08-15 Akim Demaille <akim@epita.fr>
9234
9235 * doc/bison.texinfo (Table of Symbols): Document
9236 YYSTACK_USE_ALLOCA.
9237
9238 2001-08-15 Akim Demaille <akim@epita.fr>
9239
9240 * missing: Update from CVS Automake.
9241 * config/config.guess, config/config.sub, config/texinfo.tex:
9242 Update from gnu.org.
9243
9244 2001-08-15 Akim Demaille <akim@epita.fr>
9245
9246 * Makefile.maint: Sync with CVS Autoconf.
9247
9248 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9249
9250 * doc/bison.texinfo: Include GNU Free Documentation License from
9251 `fdl.texi'.
9252 * doc/fdl.texi: Add to package.
9253
9254 2001-08-14 Marc Autret <autret_m@epita.fr>
9255
9256 Turn on %{source,header}_extension features.
9257
9258 * src/lex.c (percent_table): Un-CPP out header_extension and
9259 source_extension.
9260 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9261 (compute_exts_from_src): Remove conditions. It restores priorities
9262 between options.
9263
9264 2001-08-14 Marc Autret <autret_m@epita.fr>
9265
9266 * src/files.c (compute_base_names): Add extensions computing when
9267 `--file-prefix' used.
9268 Standardize function calls.
9269
9270 2001-08-13 Marc Autret <autret_m@epita.fr>
9271
9272 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9273 defining it (defined but null disables alloca).
9274
9275 2001-08-13 Marc Autret <autret_m@epita.fr>
9276
9277 * src/bison.simple (_yy_memcpy): CPP reformat.
9278
9279 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9280
9281 * tests/atconfig.in (CPPFLAGS): Fix.
9282
9283 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9284
9285 * doc/bison.texinfo: Include GNU General Public License from
9286 `gpl.texi'.
9287 * doc/gpl.texi: Add to package.
9288
9289 2001-08-10 Marc Autret <autret_m@epita.fr>
9290
9291 * src/print_graph.h: Fix.
9292 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9293
9294 2001-08-10 Akim Demaille <akim@epita.fr>
9295
9296 * src/system.h: Provide default declarations for stpcpy, strndup,
9297 and strnlen.
9298
9299 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9300
9301 * doc/bison.texinfo (Locations): Update @$ stuff.
9302
9303 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9304
9305 * src/bison.simple (YYLLOC_DEFAULT): Update.
9306 (yyparse): Adjust.
9307
9308 2001-08-08 Marc Autret <autret_m@epita.fr>
9309
9310 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9311 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9312 Reported by Fabrice Bauzac.
9313
9314 2001-08-08 Marc Autret <autret_m@epita.fr>
9315
9316 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9317 * src/vcg.c (output_node): Fix.
9318 * src/vcg.h: Cleanup.
9319 * src/print_graph.c: Add comments.
9320 (node_output_size): New global variable. Simplify the formatting of
9321 the VCG graph output.
9322 (print_actions): Unused code is now used. It notifies the final state
9323 and no action states in the VCG graph. It also give the reduce actions.
9324 The `shift and goto' edges are red and the `go to state' edges are
9325 blue.
9326 Get the current node name and node_obstack by argument.
9327 (node_obstack): New variable.
9328 (print_state): Manage node_obstack.
9329 (print_core): Use node_obstack given by argument.
9330 A node is not only computed here but in print_actions also.
9331 (print_graph): CPP out useless code instead of commenting it.
9332
9333 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9334
9335 * tests/atconfig.in (CPPFLAGS): Fix.
9336
9337 2001-08-07 Akim Demaille <akim@epita.fr>
9338
9339 * src/print_graph.c (quote): New.
9340 (print_core): Use it.
9341
9342 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9343
9344 * src/vcg.c (complain.h): Include it.
9345 Unepitaize `return' invocations.
9346 [NDEBUG] (main): Remove.
9347 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9348 * src/files.c (open_files): Initialize graph_obstack.
9349 * src/print_graph.c (print_actions): CPP out useless code.
9350 (print_core): Don't output the last `\n' in labels.
9351 Use `quote'.
9352 * src/files.c (output_files): Output the VCG file.
9353 * src/main.c (main): Invoke print_graph ();
9354
9355 2001-08-06 Marc Autret <autret_m@epita.fr>
9356
9357 Automaton VCG graph output.
9358 Using option ``-g'' or long option ``--graph'', you can generate
9359 a gram_filename.vcg file containing a VCG description of the LALR (1)
9360 automaton of your grammar.
9361
9362 * src/main.c: Call to print_graph() function.
9363 * src/getargs.h: Update.
9364 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9365 (graph_flag): New flag.
9366 (longopts): Update.
9367 (getargs): Add case `g'.
9368 * src/files.c (graph_obstack): New obstack struct.
9369 (open_files): Initialize new obstack.
9370 (output_files): Saves graph_obstack if required.
9371 * src/files.h (graph_obstack): New extern declaration.
9372 * src/Makefile.am: Add new source files.
9373
9374 2001-08-06 Marc Autret <autret_m@epita.fr>
9375
9376 * src/print_graph.c, src/print_graph.h (graph): New.
9377 * src/vcg.h: New file.
9378 * src/vcg.c: New file, VCG graph handling.
9379
9380 2001-08-06 Marc Autret <autret_m@epita.fr>
9381
9382 Add of %source_extension and %header_extension which specify
9383 the source or/and the header output file extension.
9384
9385 * src/files.c (compute_base_names): Remove initialisation of
9386 src_extension and header_extension.
9387 (compute_exts_from_gf): Update.
9388 (compute_exts_from_src): Update.
9389 (output_files): Update.
9390 * src/reader.c (parse_header_extension_decl): New.
9391 (parse_source_extension_decl): New.
9392 (read_declarations): New case statements for the new tokens.
9393 * src/lex.c (percent_table): Add entries for %source_extension
9394 and %header_extension.
9395 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9396
9397 2001-08-06 Marc Autret <autret_m@epita.fr>
9398
9399 * configure.in: Bump to 1.28c.
9400 * doc/bison.texinfo: Texinfo thingies.
9401
9402 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
9403
9404 * tests/atconfig.in (CPPFLAGS): Add.
9405 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9406
9407 2001-08-03 Akim Demaille <akim@epita.fr>
9408
9409 Version 1.28b.
9410
9411 2001-08-03 Akim Demaille <akim@epita.fr>
9412
9413 * tests/Makefile.am (check-local): Ship testsuite.
9414 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9415 Include `string.h'.
9416
9417 2001-08-03 Akim Demaille <akim@epita.fr>
9418
9419 * configure.in: Try using -Wformat when compiling.
9420
9421 2001-08-03 Akim Demaille <akim@epita.fr>
9422
9423 * configure.in: Bump to 1.28b.
9424
9425 2001-08-03 Akim Demaille <akim@epita.fr>
9426
9427 * src/complain.c: Adjust strerror_r portability issues.
9428
9429 2001-08-03 Akim Demaille <akim@epita.fr>
9430
9431 Version 1.28a.
9432
9433 2001-08-03 Akim Demaille <akim@epita.fr>
9434
9435 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9436 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9437 * src/getargs.c: Include complain.h.
9438 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9439 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9440
9441 2001-08-03 Akim Demaille <akim@epita.fr>
9442
9443 * src/reader.c (readgram): Display hidden chars in error messages.
9444
9445 2001-08-03 Akim Demaille <akim@epita.fr>
9446
9447 Update to gettext 0.10.39.
9448
9449 2001-08-03 Akim Demaille <akim@epita.fr>
9450
9451 * lib/strspn.c: New.
9452
9453 2001-08-01 Marc Autret <autret_m@epita.fr>
9454
9455 * doc/bison.texinfo: Update.
9456 * doc/bison.1 (mandoc): Update.
9457 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9458 * src/files.c: Support output files extensions computing.
9459 (src_extension): New static variable.
9460 (header_extension): New static variable.
9461 (tr): New function.
9462 (get_extension_index): New function, gets the index of an extension
9463 filename in a string.
9464 (compute_exts_from_gf): New function, computes extensions from the
9465 grammar file extension.
9466 (compute_exts_from_src): New functions, computes extensions from the
9467 C source file extension, file given by ``-o'' option.
9468 (compute_base_names): Update.
9469 (output_files): Update.
9470
9471 2001-08-01 Robert Anisko <anisko_r@epita.fr>
9472
9473 * doc/bison.texi: Document @$.
9474 (Locations): New section.
9475
9476 2001-07-18 Akim Demaille <akim@epita.fr>
9477
9478 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9479 * config/prev-version.txt, config/move-if-change: New.
9480 * Makefile.am: Adjust.
9481
9482 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
9483
9484 * src/bison.simple (yyparse): Suppress warning `comparaison
9485 between signed and unsigned'.
9486
9487 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
9488
9489 * src/getargs.h (raw_flag): Remove.
9490 * src/getargs.c: Die on `-r'/`--raw'.
9491 * src/lex.c (parse_percent_token): Die on `%raw'.
9492 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9493 * tests/calc.at: Suppress test with option `--raw'.
9494
9495 2001-07-14 Akim Demaille <akim@epita.fr>
9496
9497 * config/: New.
9498 * configure.in: Require Autoconf 2.50.
9499 Update to gettext 0.10.38.
9500
9501 2001-03-16 Akim Demaille <akim@epita.fr>
9502
9503 * doc/bison.texinfo: ANSIfy the examples.
9504
9505 2001-03-16 Akim Demaille <akim@epita.fr>
9506
9507 * getargs.c (skeleton): New variable.
9508 (longopts): --skeleton is a new option.
9509 (shortopts, getargs): -S is a new option.
9510 * getargs.h: Declare skeleton.
9511 * output.c (output_parser): Use it.
9512
9513 2001-03-16 Akim Demaille <akim@epita.fr>
9514
9515 * m4/strerror_r.m4: New.
9516 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9517 * lib/error.h, lib/error.c: Update.
9518
9519 2001-03-16 Akim Demaille <akim@epita.fr>
9520
9521 * src/getargs.c (longopts): Clean up.
9522
9523 2001-02-21 Akim Demaille <akim@epita.fr>
9524
9525 * src/reader.c (gensym): `gensym_count' is your own.
9526 Use a static buf to create the symbol name, as token_buffer is no
9527 longer a buffer.
9528
9529 2001-02-08 Akim Demaille <akim@epita.fr>
9530
9531 * src/conflicts.c (conflict_report): Be sure not to append to res
9532 between two calls, which could happen if both first sprintf were
9533 skipped, but not the first cp += strlen.
9534
9535 2001-02-08 Akim Demaille <akim@epita.fr>
9536
9537 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9538 New, from fileutils 4.0.37.
9539 * configure.in: Require Autoconf 2.49c. I took some time before
9540 making this decision. This is the only way out for portability
9541 issues in Bison, it would mean way too much duplicate effort to
9542 import in Bison features implemented in 2.49c since 2.13.
9543 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9544
9545 2001-02-02 Akim Demaille <akim@epita.fr>
9546
9547 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9548 * lib/xalloc.h, lib/xmalloc.c: Update.
9549
9550 2001-01-19 Akim Demaille <akim@epita.fr>
9551
9552 Get rid of the ad hoc handling of token_buffer in the scanner: use
9553 the obstacks.
9554
9555 * src/lex.c (token_obstack): New.
9556 (init_lex): Initialize it. No longer call...
9557 (grow_token_buffer): this. Remove it.
9558 Adjust all the places which used it to use the obstack.
9559
9560 2001-01-19 Akim Demaille <akim@epita.fr>
9561
9562 * src/lex.h: Rename all the tokens:
9563 s/\bENDFILE\b/tok_eof/g;
9564 s/\bIDENTIFIER\b/tok_identifier/g;
9565 etc.
9566 Let them be enums, not #define, to ease debugging.
9567 Adjust all the code.
9568
9569 2001-01-18 Akim Demaille <akim@epita.fr>
9570
9571 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9572 * src/lex.c (maxtoken, grow_token_buffer): Static.
9573
9574 2001-01-18 Akim Demaille <akim@epita.fr>
9575
9576 Since we now use obstacks, more % directives can be enabled.
9577
9578 * src/lex.c (percent_table): Also accept `%yacc',
9579 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9580 `%debug'.
9581 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9582 instead of returning a token.
9583 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9584 * src/reader.c (read_declarations): Adjust.
9585 * src/files.c (open_files): Don't call `compute_base_names', don't
9586 compute `attrsfile' since they depend upon data which might be
9587 *in* the input file now.
9588 (output_files): Do it here.
9589 * src/output.c (output_headers): Document the fact that this patch
9590 introduces a guaranteed SEGV for semantic parsers.
9591 * doc/bison.texinfo: Document them.
9592 * tests/suite.at: Exercise these %options.
9593
9594 2000-12-20 Akim Demaille <akim@epita.fr>
9595
9596 Also handle the output file (--verbose) with obstacks.
9597
9598 * files.c (foutput): Remove.
9599 (output_obstack): New.
9600 Adjust all dependencies.
9601 * src/conflicts.c: Return a string.
9602 * src/system.h (obstack_grow_string): Rename as...
9603 (obstack_sgrow): this. Be ready to work with non literals.
9604 (obstack_fgrow4): New.
9605
9606 2000-12-20 Akim Demaille <akim@epita.fr>
9607
9608 * src/files.c (open_files): Fix the computation of short_base_name
9609 in the case of `-o foo.tab.c'.
9610
9611 2000-12-20 Akim Demaille <akim@epita.fr>
9612
9613 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9614 (copy_dollar): Now that everything uses obstacks, get rid of the
9615 FILE * parameters.
9616
9617 2000-12-20 Akim Demaille <akim@epita.fr>
9618
9619 * src/files.c (open_files): Actually the `.output' file is based
9620 on the short_base_name, not base_name.
9621 * tests/suite.at (Checking output file names): Adjust.
9622
9623 2000-12-20 Akim Demaille <akim@epita.fr>
9624
9625 * src/bison.s1: Remove, we now use directly...
9626 * src/bison.simple: this.
9627 * src/Makefile.am: Use pkgdata instead of data.
9628
9629 2000-12-20 Akim Demaille <akim@epita.fr>
9630
9631 * src/files.c (guard_obstack): New.
9632 (open_files): Initialize it.
9633 (output_files): Dump it...
9634 * src/files.h: Export it.
9635 * src/reader.c (copy_guard): Use it.
9636
9637 2000-12-19 Akim Demaille <akim@epita.fr>
9638
9639 * src/files.c (outfile, defsfile, actfile): Removed as global
9640 vars.
9641 (open_files): Don't compute them.
9642 (output_files): Adjust.
9643 (base_name, short_base_name): Be global.
9644 Adjust dependencies.
9645
9646 2000-12-19 Akim Demaille <akim@epita.fr>
9647
9648 * src/files.c (strsuffix): New.
9649 (stringappend): Be just like strcat but allocate.
9650 (base_names): Eve out from open_files.
9651 Try to simplify the rather hairy computation of base_name and
9652 short_base_name.
9653 (open_files): Use it.
9654 * tests/suite.at (Checking output file names): New test.
9655
9656 2000-12-19 Akim Demaille <akim@epita.fr>
9657
9658 * src/system.h (obstack_grow_literal_string): Rename as...
9659 (obstack_grow_string): this.
9660 * src/output.c (output_parser): Recognize `%% actions' instead of
9661 `$'.
9662 * src/bison.s1: s/$/%% actions/.
9663 * src/bison.hairy: Likewise.
9664
9665 2000-12-19 Akim Demaille <akim@epita.fr>
9666
9667 * src/output.c (output_parser): Compute the `#line' lines when
9668 there are.
9669 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9670 Suggested by Hans Aberg.
9671
9672 2000-12-19 Akim Demaille <akim@epita.fr>
9673
9674 Let the handling of the skeleton files be local to the procedures
9675 that use it.
9676
9677 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9678 longer static.
9679 (fparser, open_extra_files): Remove.
9680 (open_files, output_files): Don't take care of fparser.
9681 * src/files.h: Adjust.
9682 * src/output.c (output_parser): Open and close the file to the
9683 skeleton.
9684 * src/reader.c (read_declarations): When %semantic_parser, open
9685 fguard.
9686
9687 2000-12-19 Akim Demaille <akim@epita.fr>
9688
9689 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9690 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9691
9692 2000-12-19 Akim Demaille <akim@epita.fr>
9693
9694 * src/files.c (open_files): Yipee! We no longer need all the code
9695 looking for `/tmp' since we have no tmp file.
9696
9697 2000-12-19 Akim Demaille <akim@epita.fr>
9698
9699 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9700 New macros.
9701 * src/files.c (open_files): Less dependency on MSDOS etc.
9702
9703 2000-12-14 Akim Demaille <akim@epita.fr>
9704
9705 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9706 Provide a default definition.
9707 Use it when executing the default @ action.
9708 * src/reader.c (reader_output_yylsp): No longer include
9709 `timestamp' and `text' in the default YYLTYPE.
9710
9711 2000-12-12 Akim Demaille <akim@epita.fr>
9712
9713 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9714 (copy_guard): Quote the file names.
9715 Reported by Laurent Mascherpa.
9716
9717 2000-12-12 Akim Demaille <akim@epita.fr>
9718
9719 * src/output.c (output_headers, output_program, output): Be sure
9720 to escape special characters when outputting filenames.
9721 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9722 (output_headers): Don't depend on them, Use ACTSTR.
9723
9724 2000-11-17 Akim Demaille <akim@epita.fr>
9725
9726 * lib/obstack.h: Formatting changes.
9727 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9728 prevents type checking.
9729 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9730 cast the value to (void *): assigning a `foo *' to a `void *'
9731 variable is valid.
9732 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9733 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9734 append characters.
9735
9736 2000-11-17 Akim Demaille <akim@epita.fr>
9737
9738 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9739 as...
9740 (suite.m4, regression.m4, calc.m4): these.
9741 * tests/atgeneral.m4: Update from CVS Autoconf.
9742
9743 2000-11-17 Akim Demaille <akim@epita.fr>
9744
9745 * tests/regression.m4 (%union and --defines): New test,
9746 demonstrating a current bug in the obstack implementation.
9747
9748 2000-11-17 Akim Demaille <akim@epita.fr>
9749
9750 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9751 macros.
9752 Use them to declare the variables which are global or local to
9753 `yyparse'.
9754
9755 2000-11-17 Akim Demaille <akim@epita.fr>
9756
9757 * acconfig.h: Remove, no longer used.
9758
9759 2000-11-07 Akim Demaille <akim@epita.fr>
9760
9761 * src: s/Copyright (C)/Copyright/g.
9762
9763 2000-11-07 Akim Demaille <akim@epita.fr>
9764
9765 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9766 defining.
9767 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9768
9769 2000-11-07 Akim Demaille <akim@epita.fr>
9770
9771 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9772 Merge in a single CPP if/else.
9773
9774 2000-11-07 Akim Demaille <akim@epita.fr>
9775
9776 * src/output.c (output): Remove useless variables.
9777 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9778 argument `data' for consistency with the prototypes.
9779 Qualify it `const'.
9780 (obstack_copy, obstack_copy0): Rename the second argument as
9781 `address' for consistency. Qualify it `const'.
9782 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9783 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9784 `const' their input argument (`data' or `address').
9785 Adjust the corresponding macros to include `const' in casts.
9786
9787 2000-11-03 Akim Demaille <akim@epita.fr>
9788
9789 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9790 s/PFILE1/BISON_HAIRY/.
9791 Adjust dependencies.
9792
9793 2000-11-03 Akim Demaille <akim@epita.fr>
9794
9795 For some reason, this was not applied.
9796
9797 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9798 `unlink': it's no longer used.
9799
9800 2000-11-03 Akim Demaille <akim@epita.fr>
9801
9802 * src/files.c (skeleton_find): New function, eved out of...
9803 (open_files, open_extra_files): here.
9804
9805 2000-11-03 Akim Demaille <akim@epita.fr>
9806
9807 Don't use `atexit'.
9808
9809 * src/files.c (obstack_save): New function.
9810 (done): Rename as...
9811 (output_files): this.
9812 Use `obstack_save'.
9813 * src/main.c (main): Don't use `atexit' to register `done', since
9814 it no longer has to remove tmp files, just call `output_files'
9815 when there are no errors.
9816
9817 2000-11-02 Akim Demaille <akim@epita.fr>
9818
9819 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9820 `unlink': it's no longer used.
9821 * src/files.h: Formatting changes.
9822
9823 2000-11-02 Akim Demaille <akim@epita.fr>
9824
9825 Remove the last uses of mktemp and unlink/delete.
9826
9827 * src/files.c (fdefines, ftable): Removed.
9828 (defines_ostack, table_obstack): New.
9829 Adjust dependencies of the former into uses of the latter.
9830 * src/output.c (output_short_or_char_table, output_short_table):
9831 Convert to using obstacks.
9832 * src/reader.c (copy_comment2): Accept one FILE * and two
9833 obstacks.
9834 (output_token_defines, reader_output_yylsp): Use obstacks.
9835 * src/system.h (obstack_fgrow3): New.
9836
9837 2000-11-01 Akim Demaille <akim@epita.fr>
9838
9839 Change each use of `fattrs' into a use of `attrs_obstack'.
9840
9841 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9842 * src/files.c (fattrs): Remove.
9843 (attrs_obstack): New.
9844 Adjust all dependencies.
9845 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9846
9847 2000-11-01 Akim Demaille <akim@epita.fr>
9848
9849 Introduce obstacks.
9850 Change each use of `faction' into a use of `action_obstack'.
9851
9852 * lib/obstack.h, lib/obstack.c: New files.
9853 * src/files.c (faction): Remove.
9854 (action_obstack): New.
9855 Adjust all dependencies.
9856
9857 2000-10-20 Akim Demaille <akim@epita.fr>
9858
9859 * lib/quote.h (PARAMS): New macro. Use it.
9860
9861 2000-10-16 Akim Demaille <akim@epita.fr>
9862
9863 * src/output.c (output_short_or_char_table): New function.
9864 (output_short_table, output_token_translations): Use it.
9865 (goto_actions): Use output_short_table.
9866
9867 2000-10-16 Akim Demaille <akim@epita.fr>
9868
9869 * src/symtab.c (bucket_new): New function.
9870 (getsym): Use it.
9871
9872 * src/output.c (output_short_table): New argument to display the
9873 comment associated with the table.
9874 Adjust dependencies.
9875 (output_gram): Use it.
9876 (output_rule_data): Nicer output layout for YYTNAME.
9877
9878 2000-10-16 Akim Demaille <akim@epita.fr>
9879
9880 * src/lex.c (read_typename): New function.
9881 (lex): Use it.
9882 * src/reader.c (copy_dollar): Likewise.
9883
9884 2000-10-16 Akim Demaille <akim@epita.fr>
9885
9886 * src/reader.c (copy_comment2): Expect the input stream to be on
9887 the `/' which is suspected to open a comment, instead of being
9888 called after `//' or `/*' was read.
9889 (copy_comment, copy_definition, parse_union_decl, copy_action)
9890 (copy_guard): Adjust.
9891
9892 2000-10-16 Akim Demaille <akim@epita.fr>
9893
9894 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9895 `read_signed_integer'.
9896
9897 2000-10-16 Akim Demaille <akim@epita.fr>
9898
9899 * src/reader.c (copy_dollar): New function.
9900 (copy_guard, copy_action): Use it.
9901
9902 2000-10-16 Akim Demaille <akim@epita.fr>
9903
9904 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9905 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9906 New files, from Fileutils 4.0.27.
9907 * src/main.c (printable_version): Remove.
9908 * src/lex.c, src/reader.c: Use `quote'.
9909
9910 2000-10-04 Akim Demaille <akim@epita.fr>
9911
9912 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9913
9914 2000-10-04 Akim Demaille <akim@epita.fr>
9915
9916 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9917
9918 2000-10-04 Akim Demaille <akim@epita.fr>
9919
9920 When a literal string is used to define two different tokens,
9921 `bison -v' segfaults.
9922 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9923
9924 * tests/regression.m4: New file.
9925 Include the core of the sample provided by Piotr Gackiewicz.
9926 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9927 properly.
9928
9929 2000-10-04 Akim Demaille <akim@epita.fr>
9930
9931 * src/reader.c (parse_expect_decl): Keep `count' within the size
9932 of `buffer'.
9933 From Neil Booth.
9934
9935 2000-10-02 Paul Eggert <eggert@twinsun.com>
9936
9937 * bison.s1 (yyparse): Assign the default value
9938 unconditionally, to avoid a GCC warning and make the parser a
9939 tad smaller.
9940
9941 2000-10-02 Akim Demaille <akim@epita.fr>
9942
9943 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9944 options.
9945
9946 2000-10-02 Akim Demaille <akim@epita.fr>
9947
9948 * src/derives.c, src/print.c, src/reduce.c: To ease the
9949 translation, move some `\n' out of the translated strings.
9950
9951 2000-10-02 Akim Demaille <akim@epita.fr>
9952
9953 The location tracking mechanism is precious for parse error
9954 messages. Nevertheless, it is enabled only when `@n' is used in
9955 the grammar, which is a different issue (you can use it in error
9956 message, but not in the grammar per se). Therefore, there should
9957 be another means to enable it.
9958
9959 * src/getargs.c (getargs): Support `--locations'.
9960 (usage): Report it.
9961 * src/getargs.h (locationsflag): Export it.
9962 * src/lex.c (percent_table): Support `%locations'.
9963 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9964 with `locationsflag'.
9965 * doc/bison.texinfo: Document `--locations' and `%locations'.
9966 Sort the options.
9967 * tests/calc.m4: Test it.
9968
9969 For regularity of the names, replace each
9970 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9971 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9972 In addition replace each `flag' with `_flag'.
9973
9974 2000-10-02 Akim Demaille <akim@epita.fr>
9975
9976 Also test parse error messages, including with YYERROR_VERBOSE.
9977
9978 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9979 associative).
9980 Use it to check the computations.
9981 Use it to check `nonassoc' is honored.
9982 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9983 `--yyerror-verbose'.
9984 (_AT_CHECK_CALC): Adjust to this option.
9985 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9986
9987 2000-10-02 Akim Demaille <akim@epita.fr>
9988
9989 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9990 the latter demonstrates a flaw in the handling of non debugging
9991 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9992 was used in order to simplify:
9993
9994 #if YYDEBUG
9995 if (yydebug)
9996 {
9997 ...
9998 }
9999 #endif
10000
10001 into
10002
10003 if (yydebug)
10004 {
10005 ...
10006 }
10007
10008 unfortunately this leads to a CPP conflict when
10009 `--name-prefix=foo' is used since it produces `#define yydebug
10010 foodebug'.
10011
10012 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10013 (YYDPRINTF): New macro.
10014 Spread its use.
10015 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10016 the bison options.
10017 Also test `--verbose', `--defines' and `--name-prefix'.
10018
10019 2000-10-02 Akim Demaille <akim@epita.fr>
10020
10021 Improve the readability of the produced parsers.
10022
10023 * src/bison.s1: Formatting changes.
10024 Improve the comment related to the `$' mark.
10025 (yydefault): Don't fall through to `yyresume': `goto' there.
10026 * src/output.c (output_parser): When the `$' is met, skip the end
10027 of its line.
10028 New variable, `number_of_dollar_signs', to check there's exactly
10029 one `$' in the parser skeleton.
10030
10031 2000-10-02 Akim Demaille <akim@epita.fr>
10032
10033 * lib/xstrdup.c: New file, from the fileutils.
10034 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10035 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10036 instead of strlen + xmalloc + strcpy.
10037 * src/symtab.c (copys): Remove, use xstrdup instead.
10038
10039 2000-10-02 Akim Demaille <akim@epita.fr>
10040
10041 * src/gram.h (associativity): New enum type which replaces the
10042 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10043 `right_assoc', `left_assoc' and `non_assoc'.
10044 Adjust all dependencies.
10045 * src/reader.c: Formatting changes.
10046 (LTYPESTR): Don't define it, use it as a literal in
10047 `reader_output_yylsp'.
10048 * src/symtab.h (symbol_class): New enum type which replaces the
10049 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10050 `sunknown', `stoken and `snterm'.
10051
10052 2000-10-02 Akim Demaille <akim@epita.fr>
10053
10054 * src/getargs.c (fixed_outfiles): Rename as...
10055 (yaccflag): for consistency and accuracy.
10056 Adjust dependencies.
10057
10058 2000-10-02 Akim Demaille <akim@epita.fr>
10059
10060 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10061 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10062 difficult and introduced a lot of core dump. It turns out that
10063 Bison used an implementation of `xmalloc' based on `calloc', and
10064 at various places it does depend upon the initialization to 0. I
10065 have not tried to isolate the pertinent places, and all the former
10066 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10067 someone should address this issue.
10068
10069 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10070 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10071 files.
10072 Adjust dependencies.
10073 * src/warshall.h: New file.
10074 Propagate.
10075
10076 2000-10-02 Akim Demaille <akim@epita.fr>
10077
10078 Various anti-`extern in *.c' changes.
10079
10080 * src/system.h: Include `assert.h'.
10081
10082 2000-10-02 Akim Demaille <akim@epita.fr>
10083
10084 * src/state.h (nstates, final_state, first_state, first_shift)
10085 (first_reduction): Move their exportation from here...
10086 * src/LR0.h: to here.
10087 Adjust dependencies.
10088 * src/getargs.c (statisticsflag): New variable.
10089 Add support for `--statistics'.
10090 Adjust dependencies.
10091
10092 Remove a lot of now useless `extern' statements in most files.
10093
10094 2000-10-02 Akim Demaille <akim@epita.fr>
10095
10096 * src/LR0.h: New file.
10097 Propagate its use.
10098
10099 2000-10-02 Akim Demaille <akim@epita.fr>
10100
10101 * src/print.h: New file.
10102 Propagate its use.
10103 * src/print.c: Formatting and ordering changes.
10104 (verbose, terse): Replace with...
10105 (print_results): this new function.
10106 Adjust dependencies.
10107
10108 2000-10-02 Akim Demaille <akim@epita.fr>
10109
10110 * src/conflicts.c (conflict_report): New function.
10111 (conflict_log, verbose_conflict_log): Replace with...
10112 (print_conflicts): this function.
10113 Adjust dependencies.
10114 * src/conflicts.h: New file.
10115 Propagate its inclusion.
10116
10117 2000-10-02 Akim Demaille <akim@epita.fr>
10118
10119 * src/nullable.h: New file.
10120 Propagate its inclusion.
10121 * src/nullable.c: Formatting changes.
10122
10123 2000-10-02 Akim Demaille <akim@epita.fr>
10124
10125 * src/reduce.h: New file.
10126 Propagate its inclusion.
10127 * src/reduce.c: Topological sort and other formatting changes.
10128 (bool, TRUE, FALSE): Move their definition to...
10129 * src/system.h: here.
10130
10131 2000-10-02 Akim Demaille <akim@epita.fr>
10132
10133 * src/files.c: Formatting changes.
10134 (tryopen, tryclose, openfiles): Rename as...
10135 (xfopen, xfclose, open_files): this.
10136 (stringappend): static.
10137 * src/files.h: Complete the list of exported symbols.
10138 Propagate its use.
10139
10140 2000-10-02 Akim Demaille <akim@epita.fr>
10141
10142 * src/reader.h: New file.
10143 Propagate its use instead of tedious list of `extern' and
10144 prototypes.
10145 * src/reader.c: Formatting changes, topological sort,
10146 s/register//.
10147
10148 2000-10-02 Akim Demaille <akim@epita.fr>
10149
10150 * src/lex.h: Prototype `lex.c' exported functions.
10151 * src/reader.c: Adjust.
10152 * src/lex.c: Formatting changes.
10153 (safegetc): Rename as...
10154 (xgetc): this.
10155
10156 2000-10-02 Akim Demaille <akim@epita.fr>
10157
10158 * src/lalr.h: New file.
10159 Propagate its inclusion instead of prototypes and `extern'.
10160 * src/lalr.c: Formatting changes, topological sorting etc.
10161
10162 2000-10-02 Akim Demaille <akim@epita.fr>
10163
10164 * src/output.c (token_actions): Introduce a temporary array,
10165 YYDEFACT, that makes it possible for this function to use
10166 output_short_table.
10167
10168 2000-10-02 Akim Demaille <akim@epita.fr>
10169
10170 `user_toknums' is output as a `short[]' in `output.c', while it is
10171 defined as a `int[]' in `reader.c'. For consistency with the
10172 other output tables, `user_toknums' is now defined as a table of
10173 shorts.
10174
10175 * src/reader.c (user_toknums): Be a short table instead of an int
10176 table.
10177 Adjust dependencies.
10178
10179 Factor the short table outputs.
10180
10181 * src/output.c (output_short_table): New function.
10182 * src/output.c (output_gram, output_stos, output_rule_data)
10183 (output_base, output_table, output_check): Use it.
10184
10185 2000-10-02 Akim Demaille <akim@epita.fr>
10186
10187 * src/output.c (output): Topological sort of the functions, in
10188 order to get rid of the `static' prototypes.
10189 No longer use `register'.
10190 * src/output.h: New file.
10191 Propagate its inclusion in files explicitly prototyping functions
10192 from output.c.
10193
10194 2000-09-21 Akim Demaille <akim@epita.fr>
10195
10196 * src/atgeneral.m4: Update from Autoconf.
10197
10198 2000-09-21 Akim Demaille <akim@epita.fr>
10199
10200 * src/closure.h: New file.
10201 * src/closure.c: Formatting changes, topological sort over the
10202 functions, use of closure.h.
10203 (initialize_closure, finalize_closure): Rename as...
10204 (new_closure, free_closure): these. Adjust dependencies.
10205 * src/LR0.c: Formatting changes, topological sort, use of
10206 cloture.h.
10207 (initialize_states): Rename as...
10208 (new_states): this.
10209 * src/Makefile.am (noinst_HEADERS): Adjust.
10210
10211 2000-09-20 Akim Demaille <akim@epita.fr>
10212
10213 * src/acconfig.h: Don't protect config.h against multiple
10214 inclusion.
10215 Don't define PARAMS.
10216 * src/system.h: Define PARAMS.
10217 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10218 purpose of config.h. system.h must not try to fix wrong
10219 definitions in config.h.
10220
10221 2000-09-20 Akim Demaille <akim@epita.fr>
10222
10223 * src/derives.h: New file.
10224 * src/main.c, src/derives.h: Use it.
10225 Formatting changes.
10226 * src/Makefile.am (noinst_HEADERS): Adjust.
10227
10228 2000-09-20 Akim Demaille <akim@epita.fr>
10229
10230 * tests/atgeneral.m4: Update from Autoconf.
10231 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10232 (AT_CHECK_CALC): New macros.
10233 Use these macros to test bison with options `', `--raw',
10234 `--debug', `--yacc', `--yacc --debug'.
10235
10236 2000-09-19 Akim Demaille <akim@epita.fr>
10237
10238 * src/output.c: Formatting changes.
10239 * src/machine.h: Remove, leaving its contents in...
10240 * src/system.h: here.
10241 Include stdio.h.
10242 Adjust all dependencies on stdio.h and machine.h.
10243 * src/getargs.h: New file.
10244 Let all `extern' declarations about getargs.c be replaced with
10245 inclusion of `getargs.h'.
10246 * src/Makefile.am (noinst_HEADERS): Adjust.
10247
10248 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10249 scope.
10250 (yyerror): Returns void, not int.
10251 * doc/bison.texinfo: Formatting changes.
10252
10253 2000-09-19 Akim Demaille <akim@epita.fr>
10254
10255 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10256 portable.
10257
10258 2000-09-18 Akim Demaille <akim@epita.fr>
10259
10260 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10261 * src/Makefile.am (INCLUDES): Don't.
10262 Be ready to fetch headers in lib/.
10263
10264 2000-09-18 Akim Demaille <akim@epita.fr>
10265
10266 * doc/bison.texinfo: Update the copyright.
10267 ANSIfy and GNUify the examples.
10268 Remove the old menu.
10269
10270 2000-09-18 Akim Demaille <akim@epita.fr>
10271
10272 First set of tests: use the `calc' example from the documentation.
10273
10274 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10275 is defined only when YYDEBUG is.
10276 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10277 * src/files.c (tryopen, tryclose): Formatting changes.
10278 Move to the top and be static.
10279 * src/reader.c (read_signed_integer): Likewise.
10280 * tests/calc.m4: New file.
10281 * Makefile.am, suite.m4: Adjust.
10282 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10283
10284 2000-09-18 Akim Demaille <akim@epita.fr>
10285
10286 Add support for an Autotest test suite for Bison.
10287
10288 * m4/m4.m4, m4/atconfig.m4: New files.
10289 * m4/Makefile.am (EXTRA_DIST): Adjust.
10290 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10291 files.
10292 * src/getargs.c: Display a more standard --version message.
10293 * src/reader.c (reader): Formatting changes.
10294 No longer depend upon VERSION_STRING.
10295 * configure.in: No longer use `dnl'.
10296 Set up the test suite and the new directory `tests/.
10297 (VERSION_STRING): Remove.
10298
10299 2000-04-14 Akim Demaille <akim@epita.fr>
10300
10301 * src/reader.c (copy_comment2): New function, same as former
10302 `copy_comment', but outputs into two FILE *.
10303 (copy_comment): Use it.
10304 (parse_union_decl): Use it.
10305 (get_type, parse_start_decl): Use the same `invalid' message.
10306 (parse_start_decl, parse_union_decl): Use the same `multiple'
10307 message.
10308 (parse_union_decl, copy_guard, copy_action): Use the same
10309 `unmatched' message.
10310 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10311
10312 2000-03-31 Akim Demaille <akim@epita.fr>
10313
10314 * src/files.c (tryopen, tryclose): Move to the top.
10315 Be static.
10316
10317 2000-03-31 Akim Demaille <akim@epita.fr>
10318
10319 * src/main.c (main): Don't call `done', exit does it.
10320
10321 2000-03-31 Akim Demaille <akim@epita.fr>
10322
10323 * allocate.c: s/return (foo)/return foo/.
10324 * lalr.c: Likewise.
10325 * LR0.c: Likewise.
10326 * output.c: Likewise.
10327 * reader.c: Likewise.
10328 * symtab.c: Likewise.
10329 * vmsgetargs.c: Likewise.
10330
10331 2000-03-31 Akim Demaille <akim@epita.fr>
10332
10333 Clean up the error reporting functions.
10334
10335 * src/report.c: New file.
10336 * src/report.h: Likewise.
10337 * src/Makefile.am: Adjust.
10338 * m4/error.m4: New file.
10339 * m4/Makefile.am: Adjust.
10340 * configure.in (jm_PREREQ_ERROR): Call it.
10341 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10342 Remove.
10343 (fatal, fatals): Remove. All callers use complain.c::fatal.
10344 (warn, warni, warns, warnss, warnss): Remove. All callers use
10345 complain.c::complain.
10346 (toomany): Remove, use fatal instead.
10347 * src/files.c (done): No argument, use complain_message_count.
10348 * src/main.c (main): Register `done' to `atexit'.
10349
10350 * src/getargs.c (usage): More `fputs', less `fprintf'.
10351
10352 2000-03-28 Akim Demaille <akim@epita.fr>
10353
10354 * lib/: New directory.
10355 * Makefile.am (SUBDIRS): Adjust.
10356 * configure.in: Adjust.
10357 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10358 useless.
10359 * src/alloca.c: Moved to lib/.
10360 * src/getopt.c: Likewise.
10361 * src/getopt1.c: Likewise.
10362 * src/getopt.h: Likewise.
10363 * src/ansi2knr.c: Likewise.
10364 * src/ansi2knr.1: Likewise.
10365 * src/Makefile.am: Adjust.
10366 * lib/Makefile.am: New file.
10367
10368 2000-03-28 Akim Demaille <akim@epita.fr>
10369
10370 * src/getargs.c (usage): Refresh the help message.
10371
10372 2000-03-17 Akim Demaille <akim@epita.fr>
10373
10374 * src/getopt1.c: Updated from textutils 2.0e
10375 * src/getopt.c: Likewise.
10376 * src/getopt.h: Likewise.
10377
10378 2000-03-17 Akim Demaille <akim@epita.fr>
10379
10380 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10381 the file name, not the whole `#line LINE FILE'.
10382
10383 2000-03-17 Akim Demaille <akim@epita.fr>
10384
10385 On syntax errors, report the token on which we choked.
10386
10387 * src/bison.s1 (yyparse): In the label yyerrlab, when
10388 YYERROR_VERBOSE, add yychar in msg.
10389
10390 2000-03-17 Akim Demaille <akim@epita.fr>
10391
10392 * src/reader.c (copy_at): New function.
10393 (copy_guard): Use it.
10394 (copy_action): Use it.
10395
10396 2000-03-17 Akim Demaille <akim@epita.fr>
10397
10398 Be kind to translators, save some useless translations.
10399
10400 * src/main.c (banner): New function.
10401 (fatal_banner): Use it.
10402 (warn_banner): Use it.
10403
10404 2000-03-17 Akim Demaille <akim@epita.fr>
10405
10406 * src/reader.c (copy_definition): Use copy_string and
10407 copy_comment. Removed now unused `match', `ended',
10408 `cplus_comment'.
10409 (copy_comment, copy_string): Moved, to be visible from
10410 copy_definition.
10411
10412 2000-03-17 Akim Demaille <akim@epita.fr>
10413
10414 * src/reader.c (copy_string): Declare `static inline'. No
10415 problems with inline, since it is checked by configure.
10416 (copy_comment): Likewise.
10417
10418 2000-03-17 Akim Demaille <akim@epita.fr>
10419
10420 * src/reader.c (packsymbols): Formatting changes.
10421
10422 2000-03-17 Akim Demaille <akim@epita.fr>
10423
10424 * src/reader.c (copy_comment): New function, factored out from:
10425 (copy_action): Use it. Removed now unused `match', `ended',
10426 `cplus_comment'.
10427 (copy_guard): Likewise.
10428
10429 2000-03-17 Akim Demaille <akim@epita.fr>
10430
10431 * src/reader.c (copy_string): New function, factored out from:
10432 (copy_action): Use it.
10433 (copy_guard): Likewise.
10434
10435 2000-03-17 Akim Demaille <akim@epita.fr>
10436
10437 Change the handling of @s so that they behave exactly like $s.
10438 There is now a pseudo variable @$ (readble and writable), location
10439 of the lhs of the rule (by default ranging from the location of
10440 the first symbol of the rhs, to the location of the last symbol,
10441 or, if the rhs is empty, YYLLOC).
10442
10443 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10444 yyval.
10445 (yyparse): When providing a default semantic action, provide a
10446 default location action.
10447 (after the $): No longer change `*YYLSP', just stack YYLOC the
10448 same way you stack YYVAL.
10449 * src/reader.c (read_declarations): Use warns.
10450 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10451 (copy_action, case '@'): Likewise.
10452 Use a standard error message, to save useless work from
10453 translators.
10454
10455 2000-03-17 Akim Demaille <akim@epita.fr>
10456
10457 * src/bison.s1: Formatting and cosmetics changes.
10458 * src/reader.c: Likewise.
10459 Update the Copyright notice.
10460
10461 2000-03-17 Akim Demaille <akim@epita.fr>
10462
10463 * src/bison.s1 (#line): All set to `#line' only, since the
10464 Makefile now handles them.
10465
10466 2000-03-16 Akim Demaille <akim@epita.fr>
10467
10468 * src/output.c (output_rule_data): Output the documentation of
10469 some of the tables.
10470 (Copyright notice): Update.
10471 Formatting changes.
10472
10473 2000-03-16 Akim Demaille <akim@epita.fr>
10474
10475 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10476 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10477 One `#if YYDEBUG' remains, since it uses variables which are
10478 defined only if `YYDEBUG != 0'.
10479
10480 2000-03-16 Akim Demaille <akim@epita.fr>
10481
10482 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10483 and related variables so that the similarities are highlighted.
10484
10485 2000-03-16 Akim Demaille <akim@epita.fr>
10486
10487 * src/bison.s1: Properly indent CPP directives.
10488
10489 2000-03-16 Akim Demaille <akim@epita.fr>
10490
10491 * src/bison.s1: Properly indent the `alloca' CPP section.
10492
10493 2000-03-16 Akim Demaille <akim@epita.fr>
10494
10495 Do not hard code values of directories in `configure.in'.
10496 Update the `configure' tool chain.
10497
10498 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10499 src/makefile.am.
10500 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10501 (AC_OUTPUT): Add m4/Makefile.
10502 Bump to bison 1.28a, 1.29 has never been released.
10503 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10504 handled via src/Makefile.am.
10505 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10506 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10507 autoheader.
10508 * Makefile.am (SUBDIRS): Add m4.
10509 (ACLOCAL_AM_FLAGS): New variable.
10510 (AUTOMAKE_OPTIONS): Add check-news.
10511 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10512 the proper line number and file name.
10513 (DEFS): Propagate the location of bison library files and of the
10514 locale files.
10515 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10516 builddir.
10517 * acinclude.m4: Remove, replaced by the directory m4.
10518 * m4/Makefile.am (EXTRA_DIST): New variable.
10519 * m4/gettext.m4: New file, from the fileutils.
10520 * m4/lcmessage.m4: Likewise
10521 * m4/progtest.m4: Likewise.
10522 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10523
10524 2000-03-10 Akim Demaille <akim@epita.fr>
10525
10526 * src/closure.c:
10527 Formatting changes of various comments.
10528 Respect the GNU coding standards at various places.
10529 Don't use `_()' when no translation is needed.
10530
10531 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10532
10533 * src/files.c:
10534 OS/2 honors TMPDIR environment variable.
10535
10536 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10537
10538 * doc/bison.texinfo: Tweaked spelling and grammar.
10539 Updated ISBN.
10540 Removed reference to price of printed copy.
10541 Mention BISON_SIMPLE and BISON_HAIRY.
10542
10543 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10544
10545 * configure.in, NEWS:
10546 Bison 1.29 released.
10547
10548 1999-10-27 Jesse Thilo <jthilo@gnu.org>
10549
10550 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10551 Added reference card.
10552
10553 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10554
10555 * po/ru.po: Added Russian translation.
10556
10557 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10558
10559 * configure.in: Added Russian translation.
10560
10561 1999-07-06 Jesse Thilo <jthilo@gnu.org>
10562
10563 * configure.in, NEWS, README:
10564 Released version 1.28.
10565
10566 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10567
10568 * src/system.h:
10569 Squashed redefinition warning on some systems.
10570
10571 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10572 Have configure build version string instead of relying on ANSI string
10573 concatentation.
10574
10575 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10576
10577 * po/POTFILES.in: Got rid of version.c.
10578
10579 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10580
10581 * acconfig.h, configure.in:
10582 Have configure build version string instead of relying on ANSI string
10583 concatentation.
10584
10585 1999-06-08 Jesse Thilo <jthilo@gnu.org>
10586
10587 * doc/bison.1:
10588 Dropped mention of `+' for long-named options.
10589
10590 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10591
10592 * src/files.c: Added <unistd.h> for unlink().
10593
10594 * src/Makefile.am, src/system.h:
10595 I18n fixes.
10596
10597 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10598
10599 * README: Added a FAQ list.
10600
10601 * configure.in, acconfig.h:
10602 I18n fixes.
10603
10604 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10605
10606 * doc/FAQ, doc/Makefile.am:
10607 Added a FAQ list.
10608
10609 1999-05-19 Jesse Thilo <jthilo@gnu.org>
10610
10611 * src/alloc.h, src/symtab.h, src/version.c:
10612 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10613
10614 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10615
10616 * src/.cvsignore, src/Makefile.am:
10617 Reorganized: sources in `src', documentation in `doc'.
10618
10619 * src/lex.c (literalchar):
10620 fixed the code for escaping double quotes (thanks
10621 Jonathan Czisny.)
10622
10623 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10624
10625 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10626 Adjusted paths to reflect directory reorganization.
10627
10628 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10629
10630 * doc/.cvsignore, doc/Makefile.am:
10631 Reorganized: sources in `src', documentation in `doc'.
10632
10633 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10634
10635 * configure.in:
10636 Updated AC_INIT file to reflect directory reorganization.
10637
10638 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10639 Reorganized: sources in `src', documentation in `doc'.
10640
10641 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10642
10643 * src/allocate.c:
10644 Don't declare calloc() and realloc() if not necessary.
10645
10646 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10647
10648 * configure.in, acconfig.h, acinclude.m4:
10649 Don't declare calloc() and realloc() if not necessary.
10650
10651 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10652
10653 * po/.cvsignore: Added i18n support.
10654
10655 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10656
10657 * acconfig.h, configure.in, Makefile.am:
10658 Added i18n support.
10659
10660 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10661
10662 * src/bison.s1: Fixed #line numbers.
10663
10664 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10665
10666 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10667 Added PO files from Translation Project.
10668
10669 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10670
10671 * Makefile.am:
10672 Added support for non-ANSI compilers (ansi2knr).
10673
10674 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10675
10676 * configure.in: Bumped version number to 1.27.
10677
10678 * Makefile.am:
10679 Added `bison.simple' to list of files removed by `make distclean'.
10680
10681 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10682
10683 * src/files.c, src/files.h:
10684 Defined locations of parser files in config.h instead of Makefile.
10685
10686 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10687
10688 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10689 Defined locations of parser files in config.h instead of Makefile.
10690
10691 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10692
10693 * Makefile.am:
10694 Removed inappropriate use of $< macro.
10695
10696 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10697
10698 * po/Makefile.in.in, po/POTFILES.in:
10699 Add `po' directory skeleton.
10700
10701 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10702
10703 * README: Document help-bison list.
10704
10705 * configure.in: Add check for mkstemp().
10706
10707 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10708
10709 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10710 Hush a few compiler warnings.
10711
10712 * src/files.c:
10713 Add tryclose(), which verifies that fclose was successful.
10714 Hush a couple of compiler warnings.
10715
10716 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10717
10718 * Makefile.am, OChangeLog:
10719 ChangeLog is now automatically generated. Include the old version as
10720 OChangeLog.
10721
10722 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10723
10724 * 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:
10725 Update FSF address.
10726
10727 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10728
10729 * doc/bison.texinfo: Fix formatting glitch.
10730
10731 * doc/bison.texinfo: Update FSF address.
10732
10733 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10734
10735 * acconfig.h: Update FSF address.
10736
10737 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10738
10739 * src/system.h:
10740 Don't define PACKAGE here, since config.h defines it.
10741
10742 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10743
10744 * src/reader.c: Update copyright date.
10745
10746 * src/main.c:
10747 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10748 favor of output directly to stderr (avoids buffer overruns).
10749
10750 * src/reader.c: Some checks for premature EOF.
10751
10752 * 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:
10753 Use prototypes if the compiler understands them.
10754
10755 * src/files.c: Honor TMPDIR on Unix hosts.
10756 Use prototypes if the compiler understands them.
10757
10758 * src/reader.c:
10759 Fix a couple of buffer overrun bugs.
10760 Use prototypes if the compiler understands them.
10761
10762 * src/system.h: Include unistd.h and ctype.h.
10763 Use #ifdef instead of #if for NLS symbols.
10764
10765 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10766
10767 * doc/bison.texinfo:
10768 Delete comment "consider using @set for edition number, etc..." since
10769 we now are doing so.
10770
10771 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10772
10773 * configure.in:
10774 Use prototypes if the compiler understands them.
10775
10776 * NEWS: Document 1.26 highlights.
10777
10778 * Makefile.am: Require Automake 1.3 or later.
10779
10780 * acconfig.h:
10781 Use prototypes if the compiler understands them.
10782
10783 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10784
10785 * src/version.c:
10786 Use VERSION symbol from automake for version number.
10787
10788 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10789
10790 * acconfig.h, configure.in, version.cin:
10791 Use VERSION symbol from automake for version number.
10792
10793 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10794
10795 * Makefile.am:
10796 Distribute original version of simple parser (bison.s1), not built
10797 version (bison.simple).
10798
10799 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10800
10801 * doc/bison.texinfo: Add info dir entry.
10802
10803 * doc/bison.texinfo:
10804 Let automake put version number into documentation.
10805
10806 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10807
10808 * src/bison.cld, src/build.com, src/vmshlp.mar:
10809 Add non-RCS files from /gd/gnu/bison.
10810
10811 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10812
10813 * doc/bison.1:
10814 Document the BISON_HAIRY and BISON_SIMPLE variables.
10815
10816 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10817
10818 * src/version.c: Build version.c automatically.
10819
10820 * src/reader.c:
10821 Fix token numbering (used to start at 258, not 257).
10822
10823 * src/system.h: Include config.h.
10824
10825 * src/getargs.c: Update bug report address.
10826
10827 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10828 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10829
10830 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10831
10832 * Makefile.am:
10833 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10834
10835 * configure.in, version.cin:
10836 Build version.c automatically.
10837
10838 * AUTHORS: Add AUTHORS file.
10839
10840 * README: Update bug report address.
10841
10842 * bison.simple:
10843 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10844
10845 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10846 Add automake stuff.
10847
10848 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10849
10850 * doc/bison.texinfo: Clean up some formatting.
10851
10852 1998-05-05 Richard Stallman <rms@gnu.org>
10853
10854 * doc/bison.texinfo:
10855 Explain better why to make a pure parser.
10856
10857 1998-01-05 Richard Stallman <rms@gnu.org>
10858
10859 * src/files.c (openfiles):
10860 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10861 find a temporary directory, if possible. Do not unlink files while
10862 they are open.
10863
10864 1997-08-25 Richard Stallman <rms@gnu.org>
10865
10866 * src/reader.c (stack_offset;):
10867 Change some warni to warns.
10868
10869 * src/lex.c (literalchar): Use warns, not warni.
10870
10871 1997-06-28 Richard Stallman <rms@gnu.org>
10872
10873 * src/bison.s1: Add a Bison version comment.
10874
10875 * src/main.c (fatal, warn, berror):
10876 Use program_name.
10877
10878 1997-06-28 Richard Stallman <rms@gnu.org>
10879
10880 * Makefile.in (bison_version): New variable.
10881 (dist): Use that variable.
10882 (bison.s1): Substitute the Bison version into bison.simple.
10883
10884 * bison.simple: Add a Bison version comment.
10885
10886 1997-06-18 Richard Stallman <rms@gnu.org>
10887
10888 * src/main.c (fatal, warn, berror):
10889 Make error messages standard.
10890 (toomany): Improve error message text.
10891
10892 * 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:
10893 new.h renamed to alloc.h.
10894
10895 1997-06-18 Richard Stallman <rms@gnu.org>
10896
10897 * Makefile.in: new.h renamed to alloc.h.
10898
10899 1997-05-24 Richard Stallman <rms@gnu.org>
10900
10901 * src/lex.c (literalchar):
10902 Fix the code for escaping \, " and '.
10903
10904 (lex): Avoid trouble when there are many chars
10905 to discard in a char literal with just several chars in it.
10906
10907 1997-05-17 Richard Stallman <rms@gnu.org>
10908
10909 * src/bison.s1:
10910 Use malloc, if using alloca is troublesome.
10911 (YYSTACK_USE_ALLOCA): New flag macro.
10912 Define it for some systems and compilers.
10913 (YYSTACK_ALLOC): New macro.
10914 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10915 If it was malloc'd, free it.
10916
10917 1997-05-17 Richard Stallman <rms@gnu.org>
10918
10919 * bison.simple:
10920 Use malloc, if using alloca is troublesome.
10921 (YYSTACK_USE_ALLOCA): New flag macro.
10922 Define it for some systems and compilers.
10923 (YYSTACK_ALLOC): New macro.
10924 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10925 If it was malloc'd, free it.
10926
10927 1997-04-23 Richard Stallman <rms@gnu.org>
10928
10929 * src/bison.s1:
10930 (alloca) [__hpux]: Always define as __builtin_alloca.
10931
10932 1997-04-23 Richard Stallman <rms@gnu.org>
10933
10934 * bison.simple:
10935 (alloca) [__hpux]: Always define as __builtin_alloca.
10936
10937 1997-04-22 Richard Stallman <rms@gnu.org>
10938
10939 * src/bison.s1:
10940 [__hpux]: Include alloca.h (right for HPUX 10)
10941 instead of declaring alloca (right for HPUX 9).
10942
10943 * src/bison.s1 (__yy_memcpy):
10944 Declare arg `count' as unsigned int.
10945 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10946
10947 1997-04-22 Richard Stallman <rms@gnu.org>
10948
10949 * bison.simple:
10950 [__hpux]: Include alloca.h (right for HPUX 10)
10951 instead of declaring alloca (right for HPUX 9).
10952
10953 * bison.simple (__yy_memcpy):
10954 Declare arg `count' as unsigned int.
10955 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10956
10957 1997-01-03 Richard Stallman <rms@gnu.org>
10958
10959 * src/allocate.c: [__STDC__ or _MSC_VER]:
10960 Declare calloc and realloc to return void *.
10961
10962 1997-01-02 Richard Stallman <rms@gnu.org>
10963
10964 * src/system.h:
10965 [_MSC_VER]: Include stdlib.h and process.h.
10966 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10967
10968 * src/main.c (main): Return FAILURE as a value.
10969 (printable_version): Declare arg as int, not char.
10970
10971 1997-01-02 Richard Stallman <rms@gnu.org>
10972
10973 * Makefile.in (dist):
10974 Explicitly check for symlinks, and copy them.
10975
10976 1996-12-19 Richard Stallman <rms@gnu.org>
10977
10978 * src/files.c:
10979 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10980
10981 1996-12-18 Paul Eggert <eggert@gnu.org>
10982
10983 * src/bison.s1 (yyparse):
10984 If __GNUC__ and YYPARSE_PARAM are both defined,
10985 declare yyparse to have a void * argument.
10986
10987 1996-12-18 Paul Eggert <eggert@gnu.org>
10988
10989 * bison.simple (yyparse):
10990 If __GNUC__ and YYPARSE_PARAM are both defined,
10991 declare yyparse to have a void * argument.
10992
10993 1996-12-17 Richard Stallman <rms@gnu.org>
10994
10995 * src/reduce.c (nbits): Add some casts.
10996
10997 1996-08-12 Richard Stallman <rms@gnu.org>
10998
10999 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
11000
11001 1996-08-12 Richard Stallman <rms@gnu.org>
11002
11003 * bison.simple: Test _MSDOS as well as _MSDOS_.
11004
11005 1996-07-31 Richard Stallman <rms@gnu.org>
11006
11007 * src/bison.s1:
11008 [__sun && __i386]: Include alloca.h.
11009
11010 1996-07-31 Richard Stallman <rms@gnu.org>
11011
11012 * bison.simple:
11013 [__sun && __i386]: Include alloca.h.
11014
11015 1996-07-30 Richard Stallman <rms@gnu.org>
11016
11017 * src/bison.s1: Comment change.
11018
11019 * src/bison.s1: Test _MSDOS_, not MSDOS.
11020
11021 1996-07-30 Richard Stallman <rms@gnu.org>
11022
11023 * bison.simple: Comment change.
11024
11025 * bison.simple: Test _MSDOS_, not MSDOS.
11026
11027 1996-06-01 Richard Stallman <rms@gnu.org>
11028
11029 * 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:
11030 Insert `_' macro around many string constants.
11031
11032 * src/main.c:
11033 Insert `_' macro around many string constants.
11034
11035 (main): Call setlocale, bindtextdomain and textdomain.
11036
11037 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11038 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11039 [ENABLE_NLS]: Include libintl.h.
11040 [ENABLE_NLS] (gettext): Define.
11041 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11042 (N_, PACKAGE, LOCALEDIR): New macros.
11043
11044 1996-06-01 Richard Stallman <rms@gnu.org>
11045
11046 * POTFILES.in: New file.
11047
11048 * Makefile.in (allocate.o):
11049 Define target explicitly.
11050
11051 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11052 (LDFLAGS): Set to @LDFLAGS@.
11053 (configure): Run autoconf only if preceding `cd' succeeds.
11054 (bison.s1): Redirect output to temporary file then move the
11055 temporary to the target, rather than redirecting directly to bison.s1.
11056 (clean): Remove config.status and config.log.
11057 (distclean): Don't remove config.status here.
11058
11059 1996-05-12 Richard Stallman <rms@gnu.org>
11060
11061 * src/bison.s1:
11062 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11063
11064 1996-05-12 Richard Stallman <rms@gnu.org>
11065
11066 * bison.simple:
11067 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11068
11069 1996-05-11 Richard Stallman <rms@gnu.org>
11070
11071 * src/bison.s1 (__yy_memcpy):
11072 Really reorder the args, as was supposedly done on Feb 14 1995.
11073 (yyparse): Calls changed accordingly.
11074
11075 1996-05-11 Richard Stallman <rms@gnu.org>
11076
11077 * Makefile.in (dist): Don't use $(srcdir).
11078
11079 * bison.simple (__yy_memcpy):
11080 Really reorder the args, as was supposedly done on Feb 14 1995.
11081 (yyparse): Calls changed accordingly.
11082
11083 1996-01-27 Richard Stallman <rms@gnu.org>
11084
11085 * src/output.c (output_rule_data):
11086 Test YYERROR_VERBOSE in the conditional
11087 around the definition of ttyname.
11088
11089 1995-12-29 Richard Stallman <rms@gnu.org>
11090
11091 * src/bison.s1:
11092 Fix line numbers in #line commands.
11093
11094 1995-12-29 Richard Stallman <rms@gnu.org>
11095
11096 * bison.simple:
11097 Fix line numbers in #line commands.
11098
11099 1995-12-27 Richard Stallman <rms@gnu.org>
11100
11101 * src/bison.s1 (YYPARSE_PARAM_DECL):
11102 In C++, make it always null.
11103 (YYPARSE_PARAM_ARG): New macro.
11104 (yyparse): Use YYPARSE_PARAM_ARG.
11105
11106 1995-12-27 Richard Stallman <rms@gnu.org>
11107
11108 * bison.simple (YYPARSE_PARAM_DECL):
11109 In C++, make it always null.
11110 (YYPARSE_PARAM_ARG): New macro.
11111 (yyparse): Use YYPARSE_PARAM_ARG.
11112
11113 1995-11-29 Richard Stallman <rms@gnu.org>
11114
11115 * doc/bison.texinfo:
11116 Describe literal string tokens, %raw, %no_lines, %token_table.
11117
11118 1995-11-29 Daniel Hagerty <hag@gnu.org>
11119
11120 * doc/bison.texinfo: Fixed update date
11121
11122 1995-10-16 Richard Stallman <rms@gnu.org>
11123
11124 * src/version.c: Version 1.25.
11125
11126 1995-10-16 Richard Stallman <rms@gnu.org>
11127
11128 * NEWS: *** empty log message ***
11129
11130 1995-10-16 Richard Stallman <rms@gnu.org>
11131
11132 * doc/bison.1, doc/bison.rnh:
11133 Add new options.
11134
11135 1995-10-15 Richard Stallman <rms@gnu.org>
11136
11137 * src/vmsgetargs.c, src/getargs.c:
11138 Added -n, -k, and -raw switches.
11139 (noparserflag, toknumflag, rawtoknumflag): New variables.
11140
11141 * src/symtab.h (SALIAS):
11142 New #define for adding aliases to %token.
11143 (struct bucket): Added `alias' field.
11144
11145 * src/reduce.c (reduce_grammar):
11146 Revise error message.
11147 (print_notices): Remove final `.' from error message.
11148
11149 * src/reader.c (reader_output_yylsp):
11150 New function.
11151 (readgram): Use `#if 0' around code that accepted %command
11152 inside grammar rules: The documentation doesn't allow it,
11153 and it will fail since the %command processors scan for the next %.
11154 (parse_token_decl): Extended the %token
11155 declaration to allow a multi-character symbol as an alias.
11156 (parse_thong_decl): New function.
11157 (read_declarations): Added %thong declarations.
11158 (read_declarations): Handle NOOP to deal with allowing
11159 % declarations as another means to specify the flags.
11160 (readgram): Allow %prec prior to semantics embedded in a rule.
11161 (skip_to_char, read_declarations, copy_definition)
11162 (parse_token_decl, parse_start_decl, parse_type_decl)
11163 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11164 (get_type_name, copy_guard, copy_action, readgram)
11165 (get_type, packsymbols): Revised most error messages.
11166 Changed `fatal' to `warnxxx' to avoid aborting for error.
11167 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11168 (read_declarations): Improve the error message for
11169 an invalid character. Do not abort.
11170 (read_declarations, copy_guard, copy_action): Use
11171 printable_version to avoid unprintable characters in printed output.
11172 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11173 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11174 Allow the type of a non-terminal can be given
11175 more than once, as long as all specifications give the same type.
11176
11177 * src/output.c:
11178 (output_headers, output_trailers, output, output_gram)
11179 (output_rule_data): Implement noparserflag variable.
11180 Implement toknumflag variable.
11181 (output): Call reader_output_yylsp to output LTYPESTR.
11182
11183 * src/main.c (main):
11184 If reader sees an error, don't process the grammar.
11185 (fatals): Updated to not use VARARGS1.
11186 (printable_version, int_to_string, warn, warni, warns, warnss)
11187 (warnsss): New error reporting functions. Avoid abort for error.
11188
11189 * src/lex.h:
11190 Added THONG and NOOP for alias processing.
11191 Added SETOPT for the new code that allows setting options with %flags.
11192
11193 * src/lex.c:
11194 Include getopt.h. Add some extern decls.
11195 (safegetc): New function to deal with EOF gracefully.
11196 (literalchar); new function to deal with reading \ escapes.
11197 (lex): Use literalchar.
11198 (lex): Implemented "..." tokens.
11199 (literalchar, lex, parse_percent_token): Made tokenbuffer
11200 always contain the token. This includes growing the token
11201 buffer while reading an integer.
11202 (parse_percent_token): Replaced if-else statement with percent_table.
11203 (parse_percent_token): Added % declarations as another
11204 way to specify the flags -n, -l, and -r. Also added hooks for
11205 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11206 major changes to files.c.
11207 (lex) Retain in the incoming stream a character following
11208 an incorrect '/'.
11209 (skip_white_space, lex): Revised most error messages
11210 and changed fatal to warn to avoid aborting.
11211 (percent_table): Added %thong declarations.
11212
11213 * src/gram.h: Comment changes.
11214
11215 * src/files.c (openfiles, open_extra_files, done):
11216 Add faction flag
11217 and actfile file. Handle noparserflag. Both for -n switch.
11218
11219 * src/conflicts.c (resolve_sr_conflict):
11220 Remove use of alloca.
11221
11222 1995-06-01 Jim Meyering <meyering@gnu.org>
11223
11224 * doc/bison.texinfo: *** empty log message ***
11225
11226 1995-05-06 Richard Stallman <rms@gnu.org>
11227
11228 * src/bison.s1: Comment change.
11229
11230 1995-05-06 Richard Stallman <rms@gnu.org>
11231
11232 * bison.simple: Comment change.
11233
11234 1995-05-03 Richard Stallman <rms@gnu.org>
11235
11236 * src/version.c: Version now 1.24.
11237
11238 * src/bison.s1: Change distribution terms.
11239
11240 * src/version.c: Version now 1.23.
11241
11242 1995-05-03 Richard Stallman <rms@gnu.org>
11243
11244 * doc/bison.texinfo:
11245 Rewrite "Conditions for Using Bison".
11246 Update version to 1.24.
11247
11248 1995-05-03 Richard Stallman <rms@gnu.org>
11249
11250 * bison.simple: Change distribution terms.
11251
11252 1995-02-23 Richard Stallman <rms@gnu.org>
11253
11254 * src/files.c: Test __VMS_POSIX as well as VMS.
11255
11256 1995-02-14 Jim Meyering <meyering@gnu.org>
11257
11258 * src/bison.s1 (__yy_memcpy):
11259 Renamed from __yy_bcopy to avoid
11260 confusion. Reverse FROM and TO arguments to be consistent with
11261 those of memcpy.
11262
11263 1995-02-14 Jim Meyering <meyering@gnu.org>
11264
11265 * bison.simple (__yy_memcpy):
11266 Renamed from __yy_bcopy to avoid
11267 confusion. Reverse FROM and TO arguments to be consistent with
11268 those of memcpy.
11269
11270 1994-11-10 David J. MacKenzie <djm@gnu.org>
11271
11272 * NEWS: reformat
11273
11274 * NEWS: New file.
11275
11276 * Makefile.in (DISTFILES): Include NEWS.
11277
11278 * Makefile.in (DISTFILES):
11279 Include install-sh, not install.sh.
11280
11281 * configure.in: Update to Autoconf v2 macro names.
11282
11283 1994-10-05 David J. MacKenzie <djm@gnu.org>
11284
11285 * Makefile.in: fix typo
11286
11287 * Makefile.in (prefix, exec_prefix):
11288 Let configure set them.
11289
11290 1994-09-28 David J. MacKenzie <djm@gnu.org>
11291
11292 * Makefile.in: Set datadir to $(prefix)/share.
11293
11294 1994-09-15 Richard Stallman <rms@gnu.org>
11295
11296 * src/bison.s1:
11297 Update copyright notice and GPL version.
11298
11299 1994-09-15 Richard Stallman <rms@gnu.org>
11300
11301 * bison.simple:
11302 Update copyright notice and GPL version.
11303
11304 1994-07-12 Richard Stallman <rms@gnu.org>
11305
11306 * src/reduce.c, src/reader.c:
11307 entered into RCS
11308
11309 1994-05-05 David J. MacKenzie <djm@gnu.org>
11310
11311 * Makefile.in: entered into RCS
11312
11313 1994-03-26 Richard Stallman <rms@gnu.org>
11314
11315 * src/bison.s1: entered into RCS
11316
11317 1994-03-26 Richard Stallman <rms@gnu.org>
11318
11319 * bison.simple: entered into RCS
11320
11321 1994-03-25 Richard Stallman <rms@gnu.org>
11322
11323 * src/main.c: entered into RCS
11324
11325 1994-03-24 Richard Stallman <rms@gnu.org>
11326
11327 * src/conflicts.c: entered into RCS
11328
11329 1994-01-02 Richard Stallman <rms@gnu.org>
11330
11331 * Makefile.in: *** empty log message ***
11332
11333 1993-11-21 Richard Stallman <rms@gnu.org>
11334
11335 * src/bison.s1: *** empty log message ***
11336
11337 1993-11-21 Richard Stallman <rms@gnu.org>
11338
11339 * doc/bison.texinfo: entered into RCS
11340
11341 * doc/bison.texinfo: *** empty log message ***
11342
11343 1993-11-21 Richard Stallman <rms@gnu.org>
11344
11345 * bison.simple: *** empty log message ***
11346
11347 1993-10-25 David J. MacKenzie <djm@gnu.org>
11348
11349 * doc/bison.texinfo: *** empty log message ***
11350
11351 1993-10-19 Richard Stallman <rms@gnu.org>
11352
11353 * src/bison.s1: *** empty log message ***
11354
11355 1993-10-19 Richard Stallman <rms@gnu.org>
11356
11357 * bison.simple: *** empty log message ***
11358
11359 1993-10-14 Richard Stallman <rms@gnu.org>
11360
11361 * src/bison.s1: *** empty log message ***
11362
11363 1993-10-14 Richard Stallman <rms@gnu.org>
11364
11365 * bison.simple: *** empty log message ***
11366
11367 1993-09-14 David J. MacKenzie <djm@gnu.org>
11368
11369 * doc/bison.texinfo: *** empty log message ***
11370
11371 1993-09-13 Noah Friedman <friedman@gnu.org>
11372
11373 * Makefile.in: *** empty log message ***
11374
11375 1993-09-10 Richard Stallman <rms@gnu.org>
11376
11377 * src/conflicts.c: *** empty log message ***
11378
11379 * src/system.h: entered into RCS
11380
11381 1993-09-10 Richard Stallman <rms@gnu.org>
11382
11383 * doc/bison.1: entered into RCS
11384
11385 1993-09-06 Noah Friedman <friedman@gnu.org>
11386
11387 * src/version.c: entered into RCS
11388
11389 1993-09-06 Noah Friedman <friedman@gnu.org>
11390
11391 * Makefile.in: *** empty log message ***
11392
11393 1993-07-30 David J. MacKenzie <djm@gnu.org>
11394
11395 * Makefile.in: *** empty log message ***
11396
11397 1993-07-24 Richard Stallman <rms@gnu.org>
11398
11399 * src/bison.s1: *** empty log message ***
11400
11401 1993-07-24 Richard Stallman <rms@gnu.org>
11402
11403 * bison.simple: *** empty log message ***
11404
11405 1993-07-08 David J. MacKenzie <djm@gnu.org>
11406
11407 * Makefile.in: *** empty log message ***
11408
11409 1993-07-04 Richard Stallman <rms@gnu.org>
11410
11411 * src/bison.s1: *** empty log message ***
11412
11413 1993-07-04 Richard Stallman <rms@gnu.org>
11414
11415 * bison.simple: *** empty log message ***
11416
11417 1993-06-26 David J. MacKenzie <djm@gnu.org>
11418
11419 * src/getargs.c: entered into RCS
11420
11421 1993-06-26 David J. MacKenzie <djm@gnu.org>
11422
11423 * doc/bison.texinfo: *** empty log message ***
11424
11425 * doc/bison.1: New file.
11426
11427 1993-06-25 Richard Stallman <rms@gnu.org>
11428
11429 * src/getargs.c: New file.
11430
11431 1993-06-16 Richard Stallman <rms@gnu.org>
11432
11433 * src/bison.s1: *** empty log message ***
11434
11435 1993-06-16 Richard Stallman <rms@gnu.org>
11436
11437 * bison.simple: *** empty log message ***
11438
11439 1993-06-03 Richard Stallman <rms@gnu.org>
11440
11441 * src/bison.s1: New file.
11442
11443 1993-06-03 Richard Stallman <rms@gnu.org>
11444
11445 * doc/bison.texinfo: *** empty log message ***
11446
11447 1993-06-03 Richard Stallman <rms@gnu.org>
11448
11449 * bison.simple: New file.
11450
11451 1993-05-19 Richard Stallman <rms@gnu.org>
11452
11453 * doc/bison.texinfo: New file.
11454
11455 1993-05-07 Noah Friedman <friedman@gnu.org>
11456
11457 * Makefile.in: *** empty log message ***
11458
11459 1993-04-28 Noah Friedman <friedman@gnu.org>
11460
11461 * src/reader.c: *** empty log message ***
11462
11463 1993-04-23 Noah Friedman <friedman@gnu.org>
11464
11465 * src/alloc.h: entered into RCS
11466
11467 1993-04-20 David J. MacKenzie <djm@gnu.org>
11468
11469 * src/version.c: *** empty log message ***
11470
11471 * src/files.c, src/allocate.c:
11472 entered into RCS
11473
11474 * src/reader.c: *** empty log message ***
11475
11476 * src/lex.c: entered into RCS
11477
11478 * src/conflicts.c: New file.
11479
11480 * src/symtab.c: entered into RCS
11481
11482 * src/alloc.h: New file.
11483
11484 * src/LR0.c: entered into RCS
11485
11486 1993-04-18 Noah Friedman <friedman@gnu.org>
11487
11488 * src/reader.c: New file.
11489
11490 * src/version.c: *** empty log message ***
11491
11492 1993-04-18 Noah Friedman <friedman@gnu.org>
11493
11494 * Makefile.in: *** empty log message ***
11495
11496 1993-04-17 Noah Friedman <friedman@gnu.org>
11497
11498 * Makefile.in: *** empty log message ***
11499
11500 1993-04-15 Richard Stallman <rms@gnu.org>
11501
11502 * src/main.c, src/files.c:
11503 New file.
11504
11505 1993-04-15 Noah Friedman <friedman@gnu.org>
11506
11507 * configure.in: entered into RCS
11508
11509 * configure.in: *** empty log message ***
11510
11511 * configure.in: New file.
11512
11513 1993-04-14 Richard Stallman <rms@gnu.org>
11514
11515 * Makefile.in: New file.
11516
11517 1993-04-13 Richard Stallman <rms@gnu.org>
11518
11519 * src/version.c: New file.
11520
11521 1993-03-25 Richard Stallman <rms@gnu.org>
11522
11523 * src/output.c: entered into RCS
11524
11525 1992-09-25 Richard Stallman <rms@gnu.org>
11526
11527 * configure.bat: entered into RCS
11528
11529 1992-06-22 Richard Stallman <rms@gnu.org>
11530
11531 * src/vmsgetargs.c: entered into RCS
11532
11533 1992-06-22 Richard Stallman <rms@gnu.org>
11534
11535 * doc/bison.rnh: entered into RCS
11536
11537 1992-04-20 David J. MacKenzie <djm@gnu.org>
11538
11539 * README: entered into RCS
11540
11541 1992-01-22 Richard Stallman <rms@gnu.org>
11542
11543 * src/machine.h: entered into RCS
11544
11545 1991-12-21 Richard Stallman <rms@gnu.org>
11546
11547 * src/lalr.c, src/closure.c:
11548 entered into RCS
11549
11550 1991-12-20 Richard Stallman <rms@gnu.org>
11551
11552 * src/state.h: entered into RCS
11553
11554 1991-12-18 Richard Stallman <rms@gnu.org>
11555
11556 * src/print.c, src/nullable.c, src/derives.c:
11557 entered into RCS
11558
11559 1991-11-03 David J. MacKenzie <djm@gnu.org>
11560
11561 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11562 entered into RCS
11563
11564 1988-09-09 Richard Stallman <rms@gnu.org>
11565
11566 * src/bison.hairy: entered into RCS
11567
11568 1987-12-16 Richard Stallman <rms@gnu.org>
11569
11570 * REFERENCES: entered into RCS
11571
11572 -----
11573
11574 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11575 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11576
11577 This file is part of Bison, the GNU Compiler Compiler.
11578
11579 Bison is free software; you can redistribute it and/or modify
11580 it under the terms of the GNU General Public License as published by
11581 the Free Software Foundation; either version 2, or (at your option)
11582 any later version.
11583
11584 Bison is distributed in the hope that it will be useful,
11585 but WITHOUT ANY WARRANTY; without even the implied warranty of
11586 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11587 GNU General Public License for more details.
11588
11589 You should have received a copy of the GNU General Public License
11590 along with Bison; see the file COPYING. If not, write to
11591 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11592 Boston, MA 02111-1307, USA.