]> git.saurik.com Git - bison.git/blob - ChangeLog
Omit the (1.875b) date from the 1.875c line.
[bison.git] / ChangeLog
1 2003-06-25 Akim Demaille <akim@epita.fr>
2
3 * config/depcomp, config/install-sh: Update from masters.
4
5 2003-06-20 Paul Eggert <eggert@twinsun.com>
6
7 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8 and return properly parenthesized result.
9 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
10 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11 Remove unnecessary parentheses from uses.
12 * doc/bison.texinfo (Location Default Action): Describe the
13 conventions for parentheses.
14
15 2003-06-19 Paul Eggert <eggert@twinsun.com>
16
17 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
18 yyreportTree): Do not assume that size_t is the same width as int,
19 when printing sizes. Print sizes using an unsigned format.
20 Problem reported by Frank Heckenbach in
21 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
22
23 Port to Forte Developer 7 C compiler.
24 * data/glr.c (struct YYLTYPE): If locations are not being used,
25 declare a single dummy member, as empty structs do not conform
26 to the C standard.
27 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
28 the Forte Developer 7 C compiler complains that end-of-loop
29 code is not reached.
30
31 2003-06-17 Paul Eggert <eggert@twinsun.com>
32
33 Version 1.875b.
34
35 * NEWS: Document 1.875b.
36
37 * lib/bbitset.h: Do not include config.h; that's the includer's job.
38 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
39 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
40 Don't use 'index' in comments, as it's a builtin fn on some hosts.
41 * lib/bitset_stats.c: Include gettext.h unconditionally, as
42 per recent gettext manual's suggestion.
43 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
44 Use prototypes, not old-style definitions.
45 * lib/lbitset.c (lbitset_unused_clear): Likewise.
46 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
47 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
48 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
49 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
50 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
51 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
52 vbitset_or_and_cmp, vbitset_copy): Likewise.
53
54 * lib/libiberty.h: Do not include config.h; that's the includer's job.
55 Do not include <stdlib.h>.
56 (PARAMS): Define unconditionally for C89.
57 (ATTRIBUTE_NORETURN): Remove.
58 (ATTRIBUTE_UNUSED): Define unconditionally.
59
60 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
61 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
62 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
63 * lib/vbitset.c, lib/vbitset.h: New files.
64 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
65 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
66 from libbitset.
67
68 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
69 `How Can I Reset @code{yyparse}', since texinfo does not allow
70 arbitrary @ in node names.
71
72 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
73 shouldn't be needed according to the gettext 0.12.1 documentation
74 but which seem to be needed anyway: codeset.m4 glibc21.m4
75 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
76 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
77 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
78
79 * lib/.cvsignore: Add stdbool.h.
80 * m4/.cvsignore: Add nls.m4, po.m4.
81
82 Upgrade to CVS gnulib.
83 * stdbool_.h: File renamed from stdbool.h.in.
84 * configure.ac (AM_STDBOOL_H): Invoke this instead of
85 AC_HEADER_STDBOOL.
86 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
87 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
88 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
89 (MOSTLYCLEANFILES): New var.
90 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
91 (stdbool.h): New rule.
92 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
93 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
94 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
95 m4/quote.m4: Upgrade to today's gnulib.
96
97 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
98 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
99 the tests right now.
100 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
101 yyerror are declared before use; C99 requires this.
102
103 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
104
105 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
106 first.
107 (yyrecoverSyntaxError): Correct the logic for setting and testing
108 yyerrState.
109 Correct comment on handling EOF.
110 Allow states with only a default reduction, rather than failing
111 (I can't quite reconstruct why these were not allowed before).
112
113 Fixes to avoid problem that $-N rules in GLR parsers can cause
114 buffer overruns, corrupting state.
115
116 * src/output.c (prepare_rules): Output max_left_semantic_context
117 definition.
118 * src/reader.h (max_left_semantic_context): New variable declaration.
119 * src/scan-gram.l (max_left_semantic_context): Define.
120 (handle_action_dollar): Update max_left_semantic_context.
121 * data/glr.c (YYMAXLEFT): New definition.
122 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
123 (yyresolveAction): Ditto.
124
125 Fixes to problems with location handling in GLR parsers reported by
126 Frank Heckenbach (2003/06/05).
127
128 * data/glr.c (YYLTYPE): Make trivial if locations not used.
129 (YYRHSLOC): Add parentheses, and define only if locations used.
130 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
131 locations not used.
132 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
133 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
134
135 * tests/cxx-type.at: Exercise location information; update tests
136 to differentiate output with and without locations.
137 Remove forward declarations of yylex and yyerror---caused errors
138 because default YYLTYPE not yet defined.
139 Change semantic actions to compute strings, rather than printing
140 them directly (to test proper passing of semantics values). Change
141 output to prefix notation and update test data and expected results.
142 (yylex): Track locations.
143 (stmtMerge): Return value rather than printing, and include arguments
144 in value.
145
146 2003-06-03 Paul Eggert <eggert@twinsun.com>
147
148 Avoid warnings generated by GCC 2.95.4 when Bison is
149 configured with --enable-gcc-warnings.
150 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
151 yy::]b4_parser_class_name[::translate_,
152 yy::Stack::operator[] (unsigned),
153 yy::Stack::operator[] (unsigned) const,
154 yy::Slice::operator[] (unsigned),
155 yy::Slice::operator[] (unsigned) const):
156 Rename local vars to avoid warnings.
157 * tests/glr-regression.at (Improper handling of embedded actions
158 and $-N in GLR parsers): Remove unused local variable from yylex.
159 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
160 (void) as arg when not pure, since we now assume C89 when building
161 Bison. Pacify GCC by using parameter.
162
163 2003-06-02 Paul Eggert <eggert@twinsun.com>
164
165 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
166 yy::Location::lines, yy::Location::columns): Rename arguments
167 to avoid shadowing; this removes a warning generated by GCC 3.3.
168
169 2003-06-01 Paul Eggert <eggert@twinsun.com>
170
171 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
172 to g++, as GCC 3.3 complains if you do it.
173 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
174 everything that WARNING_CFLAGS has, except omit warnings
175 not suitable for C++.
176 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
177 * tests/atlocal.in (CXXFLAGS): New var.
178 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
179
180 Fix a GLR parser bug I reported in February; see
181 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
182 The problem was that GLR parsers did not conform to the C standard,
183 because actions like { $1 = $2 + $3; } expanded to expressions
184 that invoked YYFILL in separate subexpressions, and YYFILL assigned
185 to a local variable. The C standard says that expressions
186 like (var = f ()) + (var = f ()) have undefined behavior.
187 Another problem was that GCC sometimes issues warnings that
188 yyfill and its parameters are unused.
189
190 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
191 as possibly unused.
192 (yyfill): New function.
193 (YYFILL): Use it.
194 (yyuserAction): Change type of yynormal to bool, so that it matches
195 the new yyfill signature. Mark it as possibly unused.
196
197
198 Follow up on a bug I reported in February, where a Bison-generated
199 parser can loop. Provide a test case and a fix for yacc.c. I
200 don't have a fix for lalr1.cc or for glr.c, unfortunately.
201 The original bug report is in:
202 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
203
204 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
205 macro's size was becoming unwieldy.
206 (yyerrlab): Do not discard an empty lookahead symbol, as this
207 might destroy garbage.
208 (yyerrorlab): New label, with the old contents of YYERROR,
209 plus the following change: pop the stack of rhs corresponding
210 to the production that invoked YYERROR. That is how Yacc
211 behaves, and POSIX requires this behavior.
212 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
213 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
214 Define 'alarm' to do nothing if unistd.h is not available.
215 Add a new rule "exp: '-' error;" to test the above change to
216 data/yacc.c. Use 'alarm' to abort any test taking longer than
217 10 seconds, as it's probably looping.
218 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
219 Also, the new yacc.c generates two fewer diagnostics for an
220 existing test.
221
222 2003-05-24 Paul Eggert <eggert@twinsun.com>
223
224 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
225 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
226 This fixes a problem reported by John Bowman when the Compaq/HP
227 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
228 -ansi -Wall -gall).
229 * data/yacc.c (union yyalloc): Likewise.
230 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
231
232 Switch from 'int' to 'bool' where that makes sense.
233
234 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
235 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
236 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
237 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
238 Return or accept bool, not int. All callers changed.
239 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
240 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
241 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
242 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
243 bitset_or_and_cmp_): Likewise.
244 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
245 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
246 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
247 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
248 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
249 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
250 bitset_stats_or_and_cmp): Likewise.
251 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
252 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
253 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
254 ebitset_xor_cmp): Likewise.
255 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
256 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
257 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
258 lbitset_xor_cmp): Likewise.
259 * lib/bbitset.h: Include <stdbool.h>.
260 (struct bitset_vtable): The following members now return bool, not
261 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
262 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
263 or_and_cmp).
264 * src/conflicts.c (count_rr_conflicts): Likewise.
265 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
266 All uses changed.
267 * lib/ebitset.c (ebitset_obstack_init): Likewise.
268 * lib/lbitset.c (lbitset_obstack_init): Likewise.
269 * src/getargs.c (debug_flag, defines_flag, locations_flag,
270 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
271 graph_flag): Likewise.
272 * src/getargs.h (debug_flag, defines_flag, locations_flag,
273 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
274 graph_flag): Likewise.
275 * src/output.c (error_verbose): Likewise.
276 * src/output.h (error_verbose): Likewise.
277 * src/reader.c (start_flag, typed): Likewise.
278 * src/reader.h (typed): Likewise.
279 * src/getargs.c (LOCATIONS_OPTION): New constant.
280 (long_options, getargs): Use it.
281 * src/lalr.c (build_relations): Use bool, not int.
282 * src/nullable.c (nullable_compute): Likewise.
283 * src/print.c (print_reductions): Likewise.
284 * src/tables.c (action_row, pack_vector): Likewise.
285 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
286 * src/output.c (prepare): Use it.
287 * src/output.c (token_definitions_output,
288 symbol_destructors_output, symbol_destructors_output): Use string,
289 not boolean integer, to keep track of whether to output separator.
290 * src/print_graph.c (print_core): Likewise.
291 * src/state.c (state_rule_lookaheads_print): Likewise.
292
293 * config/install-sh: Sync from automake 1.7.5.
294
295 2003-05-14 Paul Eggert <eggert@twinsun.com>
296
297 * src/parse-gram.y (rules_or_grammar_declaration): Require a
298 semicolon after a grammar declaration, in the interest of possible
299 future changes to the Bison input language.
300 Do not allow a stray semicolon at the start of the grammar.
301 (rhses.1): Allow one or more semicolons after any rule, including
302 just before "|" as required by POSIX.
303 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
304 grammar.
305
306 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
307
308 %parse-param support for lalr1.cc.
309
310 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
311 b4_cc_constructor_calls, b4_cc_constructor_call,
312 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
313 definitions.
314 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
315 parse-param arguments.
316 (yy::b4_parser_class_name): Declare instance variables to
317 hold parse-param arguments.
318 * tests/calc.at: s/value/semantic_value/ because value clashes
319 with a member of yy::b4_parser_class_name. Adjust C++ code
320 to handle %parse-param. Enable %parse-param test in C++.
321
322 2003-05-12 Paul Eggert <eggert@twinsun.com>
323
324 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
325 English a bit. Fix fclose typo. Change "const char" to "char
326 const", and use ANSI C rather than K&R for "main". Suggest
327 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
328 and suggest yy_switch_to_buffer.
329
330 2003-05-05 Paul Eggert <eggert@twinsun.com>
331
332 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
333 C89. This avoids a diagnostic on compilers that define __STDC__
334 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
335 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
336
337 2003-05-03 Paul Eggert <eggert@twinsun.com>
338
339 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
340 Do not overrun array bounds.
341 This should fix a bug reported today by Olatunji Oluwabukunmi in
342 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
343
344 2003-04-29 Akim Demaille <akim@epita.fr>
345
346 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
347 * src/getargs.c, src/getargs.h: here, as bool, not int.
348 (nondeterministic_parser): New.
349 * src/parse-gram.y, src/scan-gram.l: Support
350 %nondeterministic-parser.
351 * src/output.c (prepare): Use nondeterministic_parser instead
352 of glr_parser where appropriate.
353 * src/tables.c (conflict_row, action_row, save_row)
354 (token_actions, token_actions, pack_vector): Ditto.
355
356 2003-04-29 Akim Demaille <akim@epita.fr>
357
358 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
359
360 2003-04-29 Akim Demaille <akim@epita.fr>
361
362 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
363 with %pure-parser and %locations to exercise the patch from Yakov
364 Markovitch below.
365
366 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
367
368 * data/yacc.c: (b4_lex_param): Corrected for the case where
369 %lex-param is provided and %pure-parser isn't.
370
371 2003-04-27 Paul Eggert <eggert@twinsun.com>
372
373 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
374 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
375 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
376 if it is not defined.
377 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
378
379 2003-04-26 Paul Eggert <eggert@twinsun.com>
380
381 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
382 Declare to be of type suitable for the ninf value itself, not of
383 type suitable for the corresponding table, since the latter might
384 be unsigned but the ninf value might be negative. This fixes a
385 bug reported by Alexandre Duret-Lutz in
386 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
387
388 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
389 invokes it. We shouldn't invoke it twice because it will attempt
390 to put error.o in the archive twice. This fixes a glitch reported
391 by Martin Mokrejs in
392 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
393
394 2003-04-21 Paul Eggert <eggert@twinsun.com>
395
396 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
397 to gnulib.
398
399 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
400
401 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
402 Fix obvious typo that results in uncompilable GLR parsers
403 when both %pure-parser and %locations are used. (trivial change)
404
405 2003-04-17 Paul Eggert <eggert@twinsun.com>
406
407 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
408 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
409 Do not insert the expected token via unput, as this runs afoul
410 of a POSIX-compatibility bug in flex 2.5.31.
411 All uses changed to BEGIN the parent state,
412 since we no longer insert the expected token via unput.
413 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
414 that is no longer emitted after the above change.
415
416 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
417 the first one. This change is from Paul Hilfinger, and it fixes
418 regression reported by Werner Lemberg in
419 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
420
421 (resolve_sr_conflict): Don't invoke state_errs_set
422 unless one or more tokens have been explicitly made errors.
423 Otherwise, the above change causes Bison to abort.
424
425 * tests/existing.at (GNU pic Grammar): New test case, taken from
426 Lemberg's email.
427
428 2003-03-31 Akim Demaille <akim@epita.fr>
429
430 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
431
432 2003-03-31 Akim Demaille <akim@epita.fr>
433
434 * src/output.c (prepare_symbols): Avoid trailing spaces in the
435 output.
436
437 2003-03-31 Akim Demaille <akim@epita.fr>
438
439 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
440 From Paul Hilfinger.
441
442 2003-03-29 Akim Demaille <akim@epita.fr>
443
444 * m4/error.m4: Do not put under dynamic conditions some code which
445 expansion is under static control.
446
447 2003-03-29 Akim Demaille <akim@epita.fr>
448
449 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
450
451 2003-03-29 Akim Demaille <akim@epita.fr>
452
453 * doc/bison.texinfo (Strings are Destroyed): New.
454
455 2003-03-13 Paul Eggert <eggert@twinsun.com>
456
457 * .cvsignore: Add configure.lineno.
458 * src/.cvsignore: Add yacc.
459 * tests/.cvsignore: Add testsuite.log.
460 * doc/fdl.texi: Sync with latest FSF version.
461
462 2003-03-12 Paul Eggert <eggert@twinsun.com>
463
464 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
465 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
466 cursor, instead of leaving it undefined. This fixes a bug
467 reported by Tim Van Holder in
468 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
469 * tests/input.at (Torturing the Scanner): Test the scanner on
470 an empty input file, which was Tim Van Holder's test case.
471
472 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
473 <sys/resource.h> can be included, include sys/time.h and
474 sys/times.h first, if available. This works around the SunOS
475 4.1.4 porting bug reported by Bruce Becker in
476 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
477
478 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
479 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
480 AC_HEADER_SYS_WAIT.
481
482 Merge changes from gnulib. This was prompted because the CVS
483 snapshot didn't build on Solaris 7 due to strnlen problems.
484
485 These changes need to be merged back into gnulib:
486 * lib/hash.c: Include <stdbool.h> unconditionally.
487 * m4/onceonly.m4 (m4_quote): New macro.
488 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
489 Quote AC_FOREACH variable-expansions properly.
490 The 2003-01-03 obstack.h change also needs merging.
491 {end of changes requiring merging}
492
493 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
494 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
495 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
496 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
497 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
498 New files, imported from gnulib.
499 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
500 above.
501
502 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
503 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
504 gnulib sources.
505
506 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
507 Add.
508 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
509 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
510 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
511 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
512 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
513 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
514 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
515 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
516 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
517 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
518 (jm_PREREQ_ARGMATCH): Remove.
519 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
520 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
521
522 * src/system.h: Include <stdbool.h> unconditionally.
523
524 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
525 assuming at least C89 in the bitset code for some time now.
526
527 2003-03-03 Akim Demaille <akim@epita.fr>
528
529 * ro.po: New.
530
531 2003-03-02 Akim Demaille <akim@epita.fr>
532
533 * doc/bison.texinfo (Table of Symbols): Reactivate the
534 documentation for %lex-param, and %parse-param.
535
536 2003-03-02 Akim Demaille <akim@epita.fr>
537
538 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
539 generate verbose error messages.
540 Use the number of tokens as an upper bound in yytname, as it
541 cannot be a non terminal.
542
543 2003-03-02 Akim Demaille <akim@epita.fr>
544
545 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
546 message.
547
548 2003-03-02 Akim Demaille <akim@epita.fr>
549
550 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
551 Use them to exercise yycheck overrun.
552 Based on Andrew Suffield's grammar.
553
554 2003-03-02 Akim Demaille <akim@epita.fr>
555
556 Create tests/local.at for Bison generic testing macros.
557
558 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
559 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
560 This new file.
561 * tests/calc.at (AT_CHECK_CALC): Adjust.
562 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
563 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
564 * tests/local.at: here.
565 (AT_COMPILE_CXX): Tags the tests using it as c++.
566 Ignore the test if CXX is not functional.
567
568 2003-03-01 Paul Eggert <eggert@twinsun.com>
569
570 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
571 not loc->end, since loc->end might contain garbage and this leads
572 to undefined behavior on some platforms.
573 (id_loc, token_start): Use (IF_LINTed) initial values that do not
574 depend on *loc, so that the reader doesn't give the the false
575 impression that *loc is initialized.
576 (<INITIAL>"%%"): Do not bother setting code_start, since its value
577 does not survive the return.
578
579 2003-03-01 Akim Demaille <akim@epita.fr>
580
581 * src/scan-gram.l (code_start): Always initialize it when entering
582 into yylex, as SC_EPILOGUE is activated *before* the corresponding
583 yylex invocation. An alternative would be making it static, but
584 then it starts with the second %%'s beginning, instead of its end.
585
586 2003-02-28 Paul Eggert <eggert@twinsun.com>
587
588 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
589 around a UnixWare 7.1.1 porting bug reported by John Hughes in
590 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
591
592 2003-02-26 Paul Eggert <eggert@twinsun.com>
593
594 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
595 Remove Sequent/Pyramid discussion (nobody uses them any more).
596 Merge VMS and MS-DOS discussion; these ports may well be dead
597 but let's keep mentioning them for now. Put <> around email
598 addresses. Add copyright notice.
599
600 2003-02-24 Paul Eggert <eggert@twinsun.com>
601
602 * data/glr.c (yy_reduce_print): yylineno -> yylno,
603 to avoid collision with flex use of yylineno.
604 Problem reported by Bruce Lilly in
605 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
606 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
607 * data/yacc.c (yy_reduce_print): Likewise.
608
609 * config/depcomp: Sync with Automake 1.7.3.
610
611 2003-02-21 Akim Demaille <akim@epita.fr>
612
613 * data/lalr1.cc: Use temporary variables instead of casts to
614 change integer types.
615 Suggested by Paul Eggert.
616
617 2003-02-21 Akim Demaille <akim@epita.fr>
618
619 * doc/bison.texinfo: Use "location" consistently to refer to @n,
620 to avoid confusions with lalr1.cc's notion of Position.
621 Suggested by Paul Eggert.
622
623 2003-02-20 Akim Demaille <akim@epita.fr>
624
625 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
626 before initial_columns.
627 (location.hh): Use consistent variable names when defining the
628 operator<<.
629 Use "last" so that we subtract from Positions, not from unsigned.
630
631 2003-02-20 Akim Demaille <akim@epita.fr>
632
633 * data/lalr1.cc (position.hh): New subfile, including the extended
634 and Doxygen'ed documentation of class Position.
635 (location.hh): Use it.
636 Document a` la Doxygen.
637 With the help of Benoit Perrot.
638
639 2003-02-20 Akim Demaille <akim@epita.fr>
640
641 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
642 AT_YACC_IF.
643 Redefine AT_YYERROR_SEES_LOC_IF using it.
644 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
645 not defined.
646 Don't use the location in yy::Parser::error_ and
647 yy::Parser::print_ when not %locations.
648 Activate more lalr1.cc tests.
649
650 2003-02-19 Akim Demaille <akim@epita.fr>
651
652 * data/lalr1.cc: When displaying a line number, be sure to make it
653 an int.
654
655 2003-02-19 Akim Demaille <akim@epita.fr>
656
657 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
658 Remove, useless.
659 (YYABORT, YYACCEPT, YYERROR): New.
660 * tests/calc.at: Renable the lalr1.cc test.
661
662 2003-02-19 Akim Demaille <akim@epita.fr>
663
664 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
665 error recovery, mixing with/without pops and discarding of the
666 lookahead.
667 Exercise YYERROR.
668 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
669
670 2003-02-17 Paul Eggert <eggert@twinsun.com>
671
672 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
673 * tests/testsuite.at (AT_COMPILE): Use them.
674 This fixes the testsuite problem reported by Robert Lentz in
675 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
676
677 2003-02-12 Paul Eggert <eggert@twinsun.com>
678
679 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
680 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
681 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
682 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
683 Check for malloc failure, for consistency with yacc.c.
684 (yytname_size): Remove, for consistency with yacc.c.
685
686 The bug still remains in data/lalr1.cc, as I didn't have time
687 to fix it there.
688
689 2003-02-06 Akim Demaille <akim@epita.fr>
690
691 * configure.ac (GXX): Rename as...
692 (CXX): this, to keep the original Autoconf semantics.
693 Require 2.57.
694 * data/lalr1.cc: Fix b4_copyright invocations.
695 If YYDEBUG is not defined, don't depend upon name_ being defined.
696 (location.hh): Include string and iostream.
697 (Position::filename): New member.
698 (Position::Position ()): New.
699 (operator<< (Position)): New.
700 (operator- (Position, int)): New.
701 (Location::first, Location::last): Rename as...
702 (Location::begin, Location::end): these, to mock the conventional
703 iterator names.
704 (operator<< (Location)): New.
705 * tests/atlocal.in (CXX): New.
706 * tests/testsuite.at (AT_COMPILE_CXX): New.
707 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
708 locations in a more synthetic way.
709 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
710 lalr1.cc is used.
711 Adjust the C locations to match those from Emacs: first column is
712 column 0.
713 Change all the expected results.
714 Conform to the GCS: simplify the locations when applicable.
715 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
716 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
717 these CPP macros with the m4 macros new defined by...
718 (AT_CHECK_PUSHDEFS): this, i.e.:
719 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
720 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
721 New macros.
722 (AT_CHECK_POPDEFS): Undefine them.
723 (AT_CHECK_CALC_LALR1_CC): New.
724 Use it for the first lalr1.cc test.
725
726 2003-02-04 Akim Demaille <akim@epita.fr>
727
728 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
729 Location as is defined.
730
731 2003-02-04 Akim Demaille <akim@epita.fr>
732
733 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
734 name_ being defined.
735
736 2003-02-03 Paul Eggert <eggert@twinsun.com>
737
738 * src/gram.h (start_symbol): Remove unused decl.
739
740 Use more-consistent naming conventions for local vars.
741
742 * src/derives.c (derives_compute): Change type of local var from
743 int to rule_number.
744 * src/gram.c (grammar_rules_partial_print): Likewise.
745 * src/print.c (print_core): Likewise.
746 * src/reduce.c (reduce_grammar_tables): Likewise.
747
748 * src/gram.c (grammar_dump): Change name of item_number *
749 local var from r to rp.
750 * src/nullable.c (nullable_compute): Likewise.
751
752 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
753
754 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
755 for symbol or symbol_number var.
756 * src/reader.c (grammar_start_symbol_set): Likewise.
757 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
758 Likewise.
759 * src/state.c (transitions_to): Likewise.
760 * src/state.h: Likewise.
761 * src/tables.c (symbol_number_to_vector_number): Likewise.
762
763 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
764 char * var.
765
766 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
767 var.
768
769 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
770 var.
771
772 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
773 Use str, not s, for char * var. Use ch, not c, for character var.
774 Use size for size var.
775
776 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
777 char * var.
778 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
779 uniqstr var.
780 * src/uniqstr.h: Likewise.
781
782 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
783 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
784 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
785 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
786 param to have same name as that of enum, so that we don't use
787 "s" to stand for a non-state.
788
789 2003-02-02 Akim Demaille <akim@epita.fr>
790
791 * src/scan-skel.l: Scan more than one inert character per yylex
792 invocation.
793
794 2003-02-01 Paul Eggert <eggert@twinsun.com>
795
796 Version 1.875a.
797
798 * po/LINGUAS: Add ms.
799
800 2003-01-30 Akim Demaille <akim@epita.fr>
801
802 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
803
804 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
805
806 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
807 of $1.
808
809 Changes in response to error report by S. Eken: GLR mode does not
810 handle negative $ indices or $ indices in embedded rules correctly.
811 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
812
813 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
814 (b4_rhs_location): Ditto.
815 (yyfill): New function to copy from stack tree into array
816 incrementally.
817 (yyuserAction): Modify to allow incremental move of semantic values
818 to rhs array when in GLR mode.
819 Define YYFILL to use in user-defined actions to fill semantic array
820 as needed.
821 Remove dummy use of yystack, as there is now a guaranteed use.
822 (yydoAction): Modify to allow incremental move of semantic values
823 to rhs array when in GLR mode.
824 (yyresolveAction): Ditto.
825 (yyglrShiftDefer): Update comment.
826 (yyresolveStates): Use X == NULL for pointers, not !X.
827 (yyglrReduce): Ditto.
828 (yydoAction): Ditto
829
830 * tests/glr-regr1.at: Rename to ...
831 * tests/glr-regression.at: Add new regression test for the problems
832 described above (adapted from S. Eken).
833 Update copyright notice.
834 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
835 * tests/Makefile.am: Ditto.
836
837 2003-01-28 Paul Eggert <eggert@twinsun.com>
838
839 * data/lalr1.cc: Do not use @output_header_name@ unless
840 b4_defines_flag is set. This fixes two bugs reported by
841 Tim Van Holder in
842 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
843 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
844
845 2003-01-21 Paul Eggert <eggert@twinsun.com>
846
847 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
848 we don't need to worry about yyerrlab1 being reported as an
849 "unused label" by non-GCC C compilers. The downside is that if
850 locations are used then a couple of statements are duplicated each
851 time YYERROR is invoked, but the upside is that the warnings
852 should vanish.
853 (yyerrlab1): Move code to YERROR.
854 (yyerrlab2): Remove. Change uses back to yyerrlab1.
855 This reverts some of the 2002-12-27 change.
856
857 2003-01-17 Paul Eggert <eggert@twinsun.com>
858
859 * src/output.c (symbol_printers_output): Fix typo that led
860 to core dump. Problem reported by Antonio Rus in
861 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
862
863 2003-01-13 Akim Demaille <akim@epita.fr>,
864 Quoc Peyrot <chojin@lrde.epita.fr>,
865 Robert Anisko <anisko_r@lrde.epita.fr>
866
867 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
868 when the stacks contain one element, as the loop would otherwise
869 free the last state, and then use the top state (the one we just
870 popped). This means that the initial elements will not be freed
871 explicitly, as is the case in yacc.c; it is not a problem, as
872 these elements have fake values.
873
874 2003-01-11 Paul Eggert <eggert@twinsun.com>
875
876 * NEWS: %expect-violations are now just warnings, reverting
877 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
878 bootstrapping problem reported by Matthias Klose; see
879 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
880 * src/conflicts.c (conflicts_print): Likewise.
881 * tests/conflicts.at (%expect not enough, %expect too much,
882 %expect with reduce conflicts): Likewise.
883 * doc/bison.texinfo (Expect Decl): Document this. Also mention
884 that the warning is enabled if the number of conflicts changes
885 (not necessarily increases).
886
887 * src/getargs.c (version): Update copyright year.
888
889 2003-01-09 Akim Demaille <akim@epita.fr>
890
891 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
892
893 2003-01-08 Paul Eggert <eggert@twinsun.com>
894
895 * Makefile.maint (WGETFLAGS):
896 New macro, containing "-C off" to disable proxy caches.
897 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
898 (rel-check): Use $(WGET) instead of wget.
899
900 2003-01-06 Paul Eggert <eggert@twinsun.com>
901
902 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
903 the GLR paper of Scott, Johnstone and Hussain.
904
905 2003-01-04 Paul Eggert <eggert@twinsun.com>
906
907 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
908 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
909 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
910 (EXTRA_LIBRARIES): New var, for liby.a.
911 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
912 (EXTRA_SCRIPTS): New var, for yacc.
913
914 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
915 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
916 Problem reported by Nelson H. F. Beebe.
917
918 2003-01-03 Paul Eggert <eggert@twinsun.com>
919
920 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
921 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
922 when compiling Bison 1.875's `bitset bset = obstack_alloc
923 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
924
925 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
926 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
927 grow to a huge size with typical invocation.
928
929 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
930 Use the pattern recommended by Autoconf 2.57, except also protect
931 against double-definition.
932 * src/system.h: Likewise.
933 Portability issues reported by Nelson H. F. Beebe.
934
935 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
936 All uses changed. Provide a definition in both C and C++.
937 (yytrue, yyfalse): Define even if defined (__cplusplus).
938
939 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
940 Reported by Nelson H. F. Beebe.
941
942 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
943
944 2003-01-02 Paul Eggert <eggert@twinsun.com>
945
946 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
947 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
948 Bug reported by Nelson H. F. Beebe.
949
950 2003-01-01 Paul Eggert <eggert@twinsun.com>
951
952 * Version 1.875.
953
954 2002-12-30 Paul Eggert <eggert@twinsun.com>
955
956 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
957 Moved here from...
958 (<INITIAL>","): Here. This causes stray "," to be treated
959 more uniformly.
960
961 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
962 last brace in braced code when not in Yacc mode, for compatibility
963 with Bison 1.35. This resurrects the 2001-12-15 patch to
964 src/reader.c.
965
966 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
967 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
968
969 2002-12-28 Paul Eggert <eggert@twinsun.com>
970
971 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
972 that of SYM's type. This fixes Debian bug 168069, reported by
973 Thomas Olsson.
974
975 2002-12-28 Paul Eggert <eggert@twinsun.com>
976
977 Version 1.75f.
978
979 Switch back to the Yacc style of conflict reports, undoing some
980 of the 2002-07-30 change.
981 * doc/bison.texinfo (Understanding): Use Yacc style for
982 conflict reports. Also, use new way of locating rules.
983 * src/conflicts.c (conflict_report):
984 Renamed from conflict_report_yacc, removing the old
985 'conflict_report'. Translate the entire conflict report at once,
986 so that we don't assume that "," has the same interpretation in
987 all languages.
988 (conflicts_output): Use Yacc-style conflict report for each state,
989 instead of our more-complicated style.
990 (conflicts_print): Use Yacc-style conflict report, except print
991 the input file name when not emulating Yacc.
992 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
993 Conflicted Reduction, %expect not enough, %expect too much,
994 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
995 * tests/existing.at (GNU Cim Grammar): Likewise.
996 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
997
998 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
999 fatal): Don't invoke fflush; it's not needed and it might even be
1000 harmful for stdout, as stdout might not be open.
1001 * src/reduce.c (reduce_print): Likewise.
1002
1003 2002-12-27 Paul Eggert <eggert@twinsun.com>
1004
1005 Fix a bug where error locations were not being recorded correctly.
1006 This problem was originally reported by Paul Hilfinger in
1007 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1008
1009 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1010 top of the location stack's error locations.
1011 (yyerrlab): Set it. When discarding a token, push its location
1012 onto yylerrsp so that we don't lose track of the error's end.
1013 (yyerrlab1): Now is only the target of YYERROR, so that we can
1014 properly record the location of the action that failed. For GCC
1015 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1016 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1017 (yyerrlab2): New label, which yyerrlab now falls through to.
1018 Compute the error's location by applying YYLLOC_DEFAULT to
1019 the locations of all the symbols that went into the error.
1020 * doc/bison.texinfo (Location Default Action): Mention that
1021 YYLLOC_DEFAULT is also invoked for syntax errors.
1022 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1023 Error locations include the locations of all the tokens that were
1024 discarded, not just the last token.
1025
1026 2002-12-26 Paul Eggert <eggert@twinsun.com>
1027
1028 * src/files.c: Include quote.h.
1029 (compute_output_file_names): Warn if we detect conflicting
1030 outputs to the same file. This should catch the misunderstanding
1031 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1032
1033 * src/conflicts.c (conflicts_print): If the user specifies
1034 "%expect N", report an error if there are any reduce/reduce
1035 conflicts. This is what the manual says should happen.
1036 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1037 * tests/conflicts.at (%expect with reduce conflicts): New test.
1038
1039 Don't use m4_include on relative file names, as it doesn't work as
1040 desired if there happens to be a file with that name under ".".
1041
1042 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1043 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1044 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1045 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1046 * src/output.c (output_skeleton): Use full path names when
1047 specifying a file to include; don't rely on include path, as
1048 it's unreliable when the working file contains a file with
1049 that name.
1050
1051 2002-12-25 Paul Eggert <eggert@twinsun.com>
1052
1053 Remove obsolete references to bison.simple and bison.hairy.
1054 Problem mentioned by Aubin Mahe in
1055 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1056 * data/glr.c: Comment fix.
1057 * doc/bison.1: Remove references. Also, mention "yacc".
1058
1059 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1060 with -g option.
1061
1062 * src/parse-gram.y (declaration): Use enum "report_states" rather
1063 than its numeric value 1.
1064
1065 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1066 opening a new one. This fixes Debian bug 165349, reported by
1067 Bruce Stephens.
1068
1069 2002-12-24 Paul Eggert <eggert@twinsun.com>
1070
1071 Version 1.75e.
1072
1073 * Makefile.maint (cvs-update): Don't assume that the shell
1074 supports $(...), as Solaris sh doesn't.
1075
1076 * src/parse-gram.y (lloc_default): Remove test for empty
1077 nonterminals at the end, since it didn't change the result.
1078
1079 2002-12-24 Paul Eggert <eggert@twinsun.com>
1080
1081 If the user does not define YYSTYPE as a macro, Bison now declares it
1082 using typedef instead of defining it as a macro. POSIX requires this.
1083 For consistency, YYLTYPE is also declared instead of defined.
1084
1085 %union directives can now have a tag before the `{', e.g., the
1086 directive `%union foo {...}' now generates the C code
1087 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1088 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1089 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1090 instead of `yyltype'.
1091
1092 `yystype' and `yyltype' are now obsolescent macros instead of being
1093 typedefs or tags; they are no longer documented and will be
1094 withdrawn in a future release.
1095
1096 * data/glr.c (b4_location_type): Remove.
1097 (YYSTYPE): Renamed from yystype.
1098 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1099 (struct YYLTYPE): Renamed from struct yyltype.
1100 (YYLTYPE): Renamed from yyltype.
1101 (yyltype, yystype): New (and obsolescent) macros,
1102 for backward compatibility.
1103 * data/yacc.c: Likewise.
1104
1105 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1106 does not specify a union tag. This is for compatibility with
1107 Solaris 9 yacc.
1108
1109 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1110 const *, since it is now modified by stripping surrounding { }.
1111 (current_braced_code): Remove.
1112 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1113 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1114 trailing " {...}". Now of type <chars>.
1115 (grammar_declaration): Adjust to bundled tokens.
1116 (code_content): Remove; stripping is now done by add_param.
1117 (print_token_value): Print contents of bundled tokens.
1118 (token_name): New function.
1119
1120 * src/reader.h (braced_code, current_braced_code): Remove.
1121 (token_name): New decl.
1122
1123 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1124 token_type, not braced_code code_kind. All uses changed.
1125 (SC_PRE_CODE): New state, for scanning after a keyword that
1126 has (or usually has) an immediately-following braced code.
1127 (token_type): New local var, to keep track of which token type
1128 to return when scanning braced code.
1129 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1130 <INITIAL>"%parse-param", <INITIAL>"%printer",
1131 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1132 instead of returning a token type immediately.
1133 (<INITIAL>"{"): Set token type.
1134 (<SC_BRACED_CODE>"}"): Use it.
1135 (handle_action_dollar, handle_action_at): Now returns bool
1136 indicating success. Fail if ! current_rule; this prevents a core dump.
1137 (handle_symbol_code_dollar, handle_symbol_code_at):
1138 Remove; merge body into caller.
1139 (handle_dollar, handle_at): Complain in invalid contexts.
1140
1141 * NEWS, doc/bison.texinfo: Document the above.
1142 * NEWS: Fix years and program names in copyright notice.
1143
1144 2002-12-17 Paul Eggert <eggert@twinsun.com>
1145
1146 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1147 Reporting, Table of Symbols): Omit mentions of %lex-param and
1148 %parse-param from the documentation for now.
1149
1150 2002-12-15 Paul Eggert <eggert@twinsun.com>
1151
1152 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1153 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1154 lookahead symbol, and which sets yychar in parser actions) and it
1155 disagreed with the Bison documentation. Bug
1156 reported by Andrew Walrond.
1157
1158 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1159 as the caller now does that.
1160 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1161 (YYEMPTY): Parenthesize right hand side, since others use it.
1162 (yyparse): Don't assume that our generated code is the only code
1163 that sets yychar.
1164
1165 2002-12-13 Paul Eggert <eggert@twinsun.com>
1166
1167 Version 1.75d.
1168
1169 POSIX requires a "yacc" command.
1170 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1171 (MOSTLYCLEANFILES): Add yacc.
1172 (yacc): New rule.
1173 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1174 as an alias for bison y.
1175
1176 * po/LINGUAS: Add da.
1177
1178 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1179 problem with latest <getopt.h>.
1180 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1181
1182 * doc/fdl.texi: Upgrade to 1.2.
1183 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1184 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1185 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1186 gnulib.
1187 * config/install-sh: Sync with autotools.
1188
1189 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1190 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1191 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1192 locations are requested.
1193 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1194 locations are requested.
1195
1196 2002-12-12 Paul Eggert <eggert@twinsun.com>
1197
1198 Remove unportable casts and storage allocation tricks.
1199 While we're at it, remove almost all casts, since they
1200 usually aren't needed and are a sign of trouble.
1201
1202 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1203
1204 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1205 the pointer DSET returned by malloc; this isn't portable.
1206 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1207 Similarly for DERIVES.
1208 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1209 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1210 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1211
1212 * src/derives.c (derives_compute): Do not bother invoking
1213 int_of_rule_number, since rule numbers are integers.
1214
1215 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1216 rather than XMALLOC (char, N).
1217
1218 * src/files.c (filename_split): Rewrite to avoid cast.
1219
1220 * src/gram.h (symbol_number_as_item_number,
1221 item_number_as_symbol_number, rule_number_as_item_number,
1222 item_number_as_rule_number):
1223 Now inline functions rather than macros, to avoid casts.
1224 * src/state.h (state_number_as_int): Likewise.
1225 * src/tables.c (state_number_to_vector_number,
1226 symbol_number_to_vector_number): Likewise.
1227
1228 * src/gram.h (int_of_rule_number): Remove; no longer used.
1229
1230 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1231 since the resulting storage is always stored into.
1232
1233 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1234 where it's needed.
1235
1236 * src/muscle_tab.c (muscle_m4_output):
1237 Now inline. Return bool, not int.
1238 * src/state.c (state_compare): Likewise.
1239 * src/symtab.c (symbol_check_defined,
1240 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1241 hash_compare_symbol, hash_symbol):
1242 Likewise.
1243 * src/uniqstr.c (uniqstr_print): Likewise.
1244 * src/muscle_tab.c (muscle_m4_output_processor):
1245 New function, to avoid casts.
1246 * src/state.c (state_comparator, stage_hasher): Likewise.
1247 * src/symtab.c (symbol_check_defined_processor,
1248 symbol_check_alias_consistency_processor, symbol_pack_processor,
1249 symbol_translation_processor, hash_symbol_comparator,
1250 hash_symbol_hasher): Likewise.
1251 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1252 * src/muscle_tab.c (muscles_m4_output):
1253 Use new functions instead of casting old functions unportably.
1254 * src/state.c (state_hash_new): Likewise.
1255 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1256 symbols_token_translations_init):
1257 Likewise.
1258 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1259
1260 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1261 var instead of casting to long, to avoid casts.
1262 (prepare_states): Use MALLOC rather than alloca, so that we don't
1263 have to worry about alloca.
1264 * src/state.c (state_hash_lookup): Likewise.
1265
1266 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1267 local var instead of casting to unsigned char, to avoid casts.
1268
1269 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1270 STATE_ALLOC): Remove.
1271 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1272 rather than calloc, and use offsetof to avoid allocating slightly
1273 too much storage.
1274 (state_new): Initialize all members.
1275
1276 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1277
1278 * src/symtab.c (symbol_free): Remove; unused.
1279 (symbol_get): Remove cast in lhs of assignment.
1280 (symbols_do): Now static. Accept generic arguments, not
1281 hashing-related ones.
1282
1283 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1284 (symbol_processor): Remove.
1285 (symbols_do): Remove decl; now static.
1286
1287 * src/system.h (alloca): Remove; decl no longer needed.
1288 (<stddef.h>): Include, for offsetof.
1289 (<inttypes.>, <stdint.h>): Include if available.
1290 (uintptr_t): New type, if system lacks it.
1291 (CALLOC, MALLOC, REALLOC): New macros.
1292 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1293 new macros.
1294
1295 * src/tables.c (table_size): Now int, to pacify GCC.
1296 (table_grow, table_ninf_remap): Use signed table size.
1297 (save_row): Don't bother initializing locals when not needed.
1298 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1299 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1300
1301 * src/vcg.h: Correct misspellings.
1302
1303 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1304
1305
1306 * src/getargs.c (getargs): Don't assume EOF == -1.
1307
1308 2002-12-09 Paul Eggert <eggert@twinsun.com>
1309
1310 Change identifier spellings to avoid collisions with names
1311 that are reserved by POSIX.
1312
1313 Don't use names ending in _t, since POSIX reserves them.
1314 For consistency, remove _e and _s endings -- they're weren't
1315 needed to remove ambiguity. All uses changed.
1316 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1317 turn was just renamed from struniq_t.
1318 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1319 which in turn was just renamed from struniq_processor_t.
1320 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1321 in turn was renamed from hash_compare_struniq_t.
1322 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1323 (state_list): Renamed from state_list_t.
1324 * src/assoc.h (assoc): Renamed from assoc_t.
1325 * src/conflicts.c (enum conflict_resolution): Renamed from
1326 enum conflict_resolution_e.
1327 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1328 (rule_list): Renamed from rule_list_t.
1329 * src/getargs.h (enum trace): Renamed from enum trace_e.
1330 (enum report): Renamed from enum report_e.
1331 * src/gram.h (item_number): Renamed from item_number_t.
1332 (rule_number): Renamed from rule_number_t.
1333 (struct rule_s): Remove the "rule_s" part; not used.
1334 (rule): Renamed from rule_t.
1335 (rule_filter): Renamed from rule_filter_t.
1336 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1337 (goto_list): Renamed from goto_list_t.
1338 * src/lalr.h (goto_number): Renamed from goto_number_t.
1339 * src/location.h (location): Renamed from location_t.
1340 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1341 and moved here from:
1342 * src/muscle_tab.h (muscle_entry_t): here.
1343 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1344 (rule_list): Renamed from rule_list_t.
1345 * src/print_graph.c (static_graph): Renamed from graph.
1346 * src/reader.h (braced_code): Renamed from braced_code_t.
1347 Remove brace_code_e tag.
1348 * src/relation.h (relation_node): Renamed from relation_node_t.
1349 (relation_nodes): Renamed from relation_nodes_t.
1350 (relation): Renamed from relation_t.
1351 * src/state.h (state_number): Renamed from state_number_t.
1352 (struct state): Renamed from struct state_s.
1353 (state): Renamed from state_t.
1354 (transitions): Renamed from transitions_t. Unused (and
1355 misspelled) transtion_s tag removed.
1356 (errs): Renamed from errs_t. Unused errs_s tag removed.
1357 (reductions): Renamed from reductions_t. Unused tag
1358 reductions_s removed.
1359 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1360 (struct symbol_list): Renamed from struct symbol_list_s.
1361 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1362 (struct symbol): Renamed from struct symbol_s.
1363 (symbol): Renamed from symbol_t.
1364 * src/tables.c (vector_number): Renamed from vector_number_t.
1365 (action_number): Renamed from action_t.
1366 * src/tables.h (base_number): Renamed from base_t.
1367 * src/vcg.h (enum color): Renamed from enum color_e.
1368 (enum textmode): Renamed from enum textmode_e.
1369 (enum shape): Renamed from enum shape_e.
1370 (struct colorentry): Renamed from struct colorentry_s.
1371 (struct classname): Renamed from struct classname_s.
1372 (struct infoname): Renamed from struct infoname_s.
1373 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1374 (enum decision): Renamed from enum decision_e.
1375 (enum orientation): Renamed from enum orientation_e.
1376 (enum alignment): Renamed from enum alignment_e.
1377 (enum arrow_mode): Renamed from enum arrow_mode_e.
1378 (enum crossing_type): Renamed from enum crossing_type_e.
1379 (enum view): Renamed from enum view_e.
1380 (struct node): Renamed from struct node_s.
1381 (node): Renamed from node_t.
1382 (enum linestyle): Renamed from enum linestyle_e.
1383 (enum arrowstyle): Renamed from enum arrowstyle_e.
1384 (struct edge): Renamed from struct edge.
1385 (edge): Renamed from edge_t.
1386 (struct graph): Renamed from struct graph_s.
1387 (graph): Renamed from graph_t.
1388 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1389 Rename value_t -> value.
1390 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1391 value_t_as_yystype -> value_as_yystype.
1392
1393 Don't include <errno.h> in the mainstream code, since it
1394 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1395 * lib/get-errno.c, lib/get-errno.h: New files.
1396 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1397 get-errno.c.
1398 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1399 * src/output.c (output_skeleton): Likewise.
1400 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1401 instead of errno.
1402 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1403 Likewise.
1404 (handle_action_dollar, handle_action_at): Likewise.
1405 * src/system.h: Do not include <errno.h>.
1406 (TAB_EXT): Renamed from EXT_TAB.
1407 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1408
1409 Avoid str[a-z]*, since <string.h> reserves that name space.
1410 Change all instances of "struniq" in names to "uniqstr", and
1411 likewise for "STRUNIQ" and "UNIQSTR".
1412 * src/uniqstr.c: Renamed from src/struniq.c.
1413 * src/uniqstr.h: Renamed from src/struniq.h.
1414 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1415 * src/files.c (strsuffix): Remove; unused.
1416 (concat2): Renamed from stringappend. Now static.
1417 * src/files.h (strsuffix, stringappend): Remove; unused.
1418 * src/parse-gram.y (<chars>): Renamed from <string>.
1419 (<uniqstr>): Renamed from <struniq>.
1420 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1421 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1422 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1423 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1424 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1425 (N_EXPAND): Renamed from N_STRETCH.
1426
1427 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1428 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1429 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1430 Remove; unused.
1431 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1432 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1433 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1434 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1435 (BASE_MAXIMUM): Renamed from BASE_MAX.
1436 (BASE_MINIMUM): Renamed from BASE_MIN.
1437 (ACTION_MAX): Remove; unused.
1438 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1439 Unnecessary casts removed from above defines.
1440
1441
1442 Fix misspelling in names.
1443 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1444 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1445 G_NODE_ALIGNEMENT.
1446
1447
1448 * lib/timevar.c (timevar_report): Renamed from time_report,
1449 for consistency with other names.
1450 * lib/timevar.h (timevar_report): New decl.
1451 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1452
1453
1454 Sort include-file uses.
1455
1456 Reorder all include files under src to be in the order "system.h".
1457 then the ../lib include files in angle brackets (alphabetized),
1458 then the . include files in double-quotes (alphabetized). Fix
1459 dependency breakages encountered in this process, as follows:
1460 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1461 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1462 * src/state.h: Include "symtab.h".
1463
1464 2002-12-08 Paul Eggert <eggert@twinsun.com>
1465
1466 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1467 since this causes problems when __file__ contains character
1468 sequences like "@" that are treated specially by src/scan-skel.l.
1469 Instead, just use the file's basename. This fixes the bug
1470 reported by Martin Mokrejs in
1471 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
1472
1473 2002-12-06 Paul Eggert <eggert@twinsun.com>
1474
1475 Add support for rules that do not have trailing semicolons, as
1476 POSIX requires. Improve the quality of locations in Bison
1477 diagnostics.
1478
1479 * src/location.c: Include <quotearg.h>.
1480 (empty_location): Now const.
1481 (location_print): New function. Follow the recommendation of the
1482 GNU Coding Standards for locations that span file boundaries.
1483 * src/location.h: Do not include <quotearg.h>; no longer needed.
1484 (boundary): New type.
1485 (location_t): Use it. This allows locations to span file boundaries.
1486 All member uses changed: file -> start.file or end.file (as needed),
1487 first_line -> start.line, first_column -> start.column,
1488 last_line -> end.line, last_column -> end.column.
1489 (equal_boundaries): New function.
1490 (LOCATION_RESET, LOCATION_STEP): Remove.
1491 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1492 (empty_location): Now const.
1493 (location_print): New decl.
1494 * src/parse-gram.y (lloc_default): New function, which handles
1495 empty locations more accurately.
1496 (YYLLOC_DEFAULT): Use it.
1497 (%token COLON): Remove.
1498 (%token ID_COLON): New token.
1499 (rules): Use it.
1500 (declarations, rules): Remove trailing semicolon.
1501 (declaration, rules_or_grammar_declaration):
1502 Allow empty (";") declaration.
1503 (symbol_def): Remove empty actions; no longer needed.
1504 (rules_or_grammar_declaration): Remove trailing semicolon.
1505 (semi_colon.opt): Remove.
1506 * src/reader.h: Include location.h.
1507 (scanner_cursor): New decl.
1508 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1509 rolling our own.
1510 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1511 of *loc.
1512 (STEP): Remove. No longer needed, now that adjust_location does
1513 the work. All uses removed.
1514 (scanner_cursor): New var.
1515 (adjust_location): Renamed from extend_location. It now sets
1516 *loc and adjusts the scanner cursor. All uses changed.
1517 Don't bother testing for CR.
1518 (handle_syncline): Remove location arg; now updates scanner cursor.
1519 All callers changed.
1520 (unexpected_end_of_file): Now accepts start boundary of token or
1521 comment, not location. All callers changed. Update scanner cursor,
1522 not the location.
1523 (SC_AFTER_IDENTIFIER): New state.
1524 (context_state): Renamed from c_context. All uses changed.
1525 (id_loc, code_start, token_start): New local vars.
1526 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1527 processing of Yacc white space and equivalents here.
1528 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1529 instead of returning ID immediately, since we need to search for
1530 a subsequent colon.
1531 (<INITIAL>"'", "\""): Save token_start.
1532 (<INITIAL>"%{", "{", "%%"): Save code_start.
1533 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1534 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1535 BEGIN context_state at end, not INITIAL.
1536 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1537 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1538 Return correct token start.
1539 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1540 the start of a character, string or multiline comment is found.
1541 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1542 Reduction): Adjust reported locations to match the more-precise
1543 results now expected.
1544 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1545 * tests/reduce.at (Useless Rules, Reduced Automaton,
1546 Underivable Rules): Likewise.
1547 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1548 or "|"' now that so many other tokens are allowed by the new grammar.
1549
1550 * src/complain.h (current_file): Remove duplicate decl;
1551 current_file is now owned by files.h.
1552 * src/complain.c, src/scan-gram.l: Include files.h.
1553
1554 2002-12-06 Paul Eggert <eggert@twinsun.com>
1555
1556 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1557 promotes to int; it might be unsigned int.
1558 * data/yacc.c (yy_reduce_print): Likewise.
1559
1560 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1561 be #defined in the prologue, not in the Bison declarations.
1562 This fixes Debian Bug 102878, reported by Shaul Karl.
1563
1564 2002-12-02 Paul Eggert <eggert@twinsun.com>
1565
1566 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1567 * lib/strtoul.c: New file, from gnulib.
1568 This fixes a porting bug reported by Peter Klein in
1569 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1570
1571 2002-11-30 Paul Eggert <eggert@twinsun.com>
1572
1573 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1574 and put only a forward declaration in the prologue. This is for
1575 consistency with the other scanner helper functions.
1576
1577 Type clashes now generate warnings, not errors, since it
1578 appears that POSIX may allow some grammars with type clashes.
1579 * src/reader.c (grammar_current_rule_check): Warn about
1580 type clashes instead of complaining.
1581 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1582
1583 Add Yacc library, since POSIX requires it.
1584 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1585 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1586 * lib/main.c, lib/yyerror.c: New files.
1587
1588 gram_error can be static; it need not be extern.
1589 * src/reader.h (gram_error): Remove decl.
1590 * src/parse-gram.y (gram_error): Now static. Add static decl.
1591 (print_token_value): Omit parameter names from forward decl,
1592 for consistency.
1593
1594 2002-11-29 Paul Eggert <eggert@twinsun.com>
1595
1596 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1597 be declared before being used. E.g., one should typically
1598 declare them in the prologue. Use GNU coding style in examples.
1599 Put "const" consistently after the type it modifies. Mention
1600 that C99 supports "inline". Mention that yyerror traditionally
1601 returns "int".
1602
1603 %parse-param and %lex-param now take just one argument, the
1604 declaration; the argument name is deduced from the declaration.
1605
1606 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1607 Reporting, Table of Symbols): Document this.
1608 * src/parse-gram.y (add_param): New function.
1609 (COMMA): Remove.
1610 (declaration): Implement new rule for %parse-param and %lex-param.
1611 * src/scan-gram.l: "," now elicits a warning, rather than being
1612 a token; this is more compatible with byacc.
1613 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1614
1615 2002-11-27 Paul Eggert <eggert@twinsun.com>
1616
1617 Rename identifiers to avoid real and potential collisions.
1618
1619 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1620 to avoid collision with lex macro described by Bruce Lilly in
1621 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1622 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1623 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1624 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1625 All uses changed.
1626 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1627 The name "yycontrol" violates the name space rules, and this stuff
1628 wasn't being used anyway.
1629 (input): Remove action; this stuff wasn't being used.
1630 (gram_error): Rename local variable yylloc -> loc.
1631 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1632 (YY_DECL): Don't use "yy" at start of local variables.
1633 All uses changed, e.g., yylloc -> loc.
1634 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1635 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1636 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1637 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1638
1639 * src/parse-gram.y (gram_error): loc is now const *.
1640 * src/reader.h (gram_error): Likewise.
1641
1642 2002-11-24 Paul Eggert <eggert@twinsun.com>
1643
1644 Version 1.75c.
1645
1646 * tests/actions.at (Actions after errors): Use an output format
1647 more similar to that of the Printers and Destructors test.
1648 Test the position of the ';' token too.
1649 (Printers and Destructors): Likewise.
1650 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1651 unnecessarily alarming people when the test fails.
1652
1653 * data/yacc.c (yyerrlab1): Move this label down, so that the
1654 parser does not discard the lookahead token if the user code
1655 invokes YYERROR. This change is required for POSIX conformance.
1656
1657 * lib/error.c: Sync with gnulib.
1658
1659 2002-11-22 Paul Eggert <eggert@twinsun.com>
1660
1661 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1662 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1663 * lib/xmalloc.c: Likewise.
1664
1665 2002-11-20 Paul Eggert <eggert@twinsun.com>
1666
1667 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1668
1669 2002-11-20 Paul Eggert <eggert@twinsun.com>
1670
1671 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1672 should use `if (! x) abort ();' rather than `assert (x);', and
1673 anyway it's one less thing to worry about configuring.
1674
1675 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1676 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1677 and replace all instances of assert with abort.
1678 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1679 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1680
1681 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1682 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1683 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1684 hash_find_entry, hash_rehash, hash_insert): Likewise.
1685 * src/conflicts.c (resolve_sr_conflict): Likewise.
1686 * src/lalr.c (set_goto_map, map_goto): Likewise.
1687 * src/nullable.c (nullable_compute): Likewise.
1688 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1689 * src/reader.c (packgram, reader): Likewise.
1690 * src/state.c (state_new, state_free, state_transitions_set,
1691 state_reduction_find): Likewise.
1692 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1693 symbol_pack): Likewise.
1694 * src/tables.c (conflict_row, pack_vector): Likewise.
1695 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1696 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1697 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1698 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1699
1700 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1701 (ARGMATCH_CONSTRAINT): New macro.
1702 (ARGMATCH_ASSERT): Use it.
1703
1704 * src/system.h (verify): New macro.
1705 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1706 rather than assert.
1707 * src/tables.c (tables_generate): Likewise.
1708
1709 * src/struniq.c (struniq_assert): Now returns void, and aborts
1710 if the assertion is false.
1711 (struniq_assert_p): Remove.
1712 * src/struniq.h: Likewise.
1713
1714 2002-11-18 Paul Eggert <eggert@twinsun.com>
1715
1716 * data/glr.c (yygetLRActions): Replace `yyindex' with
1717 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1718 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1719 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1720
1721 2002-11-18 Akim Demaille <akim@epita.fr>
1722
1723 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1724 space.
1725 From Tim Van Holder.
1726
1727 2002-11-17 Paul Eggert <eggert@twinsun.com>
1728
1729 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1730 to "SyntaxError" for consistency with my 2002-11-15 change.
1731
1732 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1733 not define to {}, since this breaks the common use of `YYDPRINTF
1734 ((...));' if a single statement is desired (e.g. before `else').
1735 Work around GCC warnings by surrounding corresponding calls with
1736 {} if needed.
1737 (yyhasResolvedValue): Remove unused function.
1738 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1739 loop body.
1740 (yyreportSyntaxError): Renamed from yyreportParseError.
1741 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1742 All uses changed.
1743 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1744 extern when possible. Remove unused initializations.
1745
1746 2002-11-16 Akim Demaille <akim@epita.fr>
1747
1748 Augment the similarity between GLR and LALR traces.
1749
1750 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1751 (YY_REDUCE_PRINT): New.
1752 (yyparse): Use them.
1753 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1754 YYDPRINT here.
1755 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1756 state reached after the reduction/recovery, since...
1757 (yyparse, yyprocessOneStack): Report the state we are entering in.
1758
1759 2002-11-16 Akim Demaille <akim@epita.fr>
1760
1761 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1762 Add support for --trace=skeleton.
1763 * src/scan-skel.l: %option debug.
1764 Scan strings of non-@ or \n instead of character by character.
1765 (scan_skel): Handle trace_skeleton.
1766 (QPUTS): New.
1767 (@output_parser_name@, @output_header_name@): ``Restore'' their
1768 support (used to be M4 macros).
1769 * data/yacc.c: Quote larger chunks, a la glr.c.
1770 * data/lalr1.cc: Likewise.
1771 The header guards are no longer available, so use some other
1772 string than `YYLSP_NEEDED'.
1773
1774 2002-11-16 Akim Demaille <akim@epita.fr>
1775
1776 Make the ``Printers and Destructors'' test more verbose, taking
1777 `yacc.c''s behavior as (possibly wrong) reference.
1778
1779 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1780 instead of fprint on stdout.
1781 Set and report the last_line of the symbols.
1782 Consistently display values and locations.
1783
1784 2002-11-16 Paul Eggert <eggert@twinsun.com>
1785
1786 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1787
1788 2002-11-15 Paul Eggert <eggert@twinsun.com>
1789
1790 * tests/actions.at (Actions after errors): New test case.
1791
1792 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1793 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1794 tests/action.at, tests/calc.at, tests/conflicts.at,
1795 tests/cxx-type.at, tests/regression.at:
1796 "parse error" -> "syntax error" for POSIX compatibility.
1797 "parsing stack overflow..." -> "parser stack overflow" so
1798 that code matches Bison documentation.
1799
1800 2002-11-15 Akim Demaille <akim@epita.fr>
1801
1802 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1803 take two BRACED_CODE, not two string_content.
1804 Free the scanner's obstack when we are done.
1805 (code_content): New.
1806 * tests/calc.at: Adjust.
1807 * doc/bison.texinfo: Adjust.
1808 Also, make sure to include the `,' for these declarations.
1809
1810 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1811
1812 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1813 definition; avoids potential autoreconf problems.
1814
1815 2002-11-15 Akim Demaille <akim@epita.fr>
1816
1817 Always check the value returned by yyparse.
1818
1819 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1820 returned by yyparse.
1821 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1822 Adjust calls.
1823 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1824 returned by yyparse.
1825
1826 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1827
1828 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1829 on input.at test.
1830
1831 2002-11-14 Paul Eggert <eggert@twinsun.com>
1832
1833 * src/output.c (output_skeleton): Call xfopen instead of
1834 duplicating xfopen's body.
1835
1836 Fix bugs reported by Nelson H. F. Beebe in
1837 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1838
1839 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1840 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1841 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1842 file twice in the grammar, as an extra check.
1843
1844 * tests/input.at (Torturing the Scanner): Surround the
1845 backslash-newline tests with "#if 0", to make it less likely that
1846 we'll run into compiler bugs. Bring back solitary \ inside
1847 comment, but add a closing comment to work around HP C bug. Don't
1848 test backslash-newline in C character constant.
1849
1850 2002-11-14 Akim Demaille <akim@epita.fr>
1851
1852 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1853 status of the compiler.
1854 Calling `exit 1' is no longer needed.
1855 Reported by Nelson H. F. Beebe.
1856
1857 2002-11-14 Akim Demaille <akim@epita.fr>
1858
1859 * tests/atlocal.in (CPPFLAGS): We have config.h.
1860 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1861 New.
1862 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1863 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1864 * tests/regression.at, tests/torture.at: Use them for all the
1865 grammars that are to be compiled.
1866 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1867 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1868 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1869
1870 2002-11-14 Akim Demaille <akim@epita.fr>
1871
1872 * doc/bison.texinfo: Various formatting changes (alignments in
1873 samples, additional @group/@end group, GCS in samples.
1874 Use @deffn instead of simple @table to define the directives,
1875 macros, variables etc.
1876
1877 2002-11-13 Paul Eggert <eggert@twinsun.com>
1878
1879 Fix some bugs reported by Albert Chin-A-Young in
1880 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1881
1882 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1883 -o c"; the HP C compiler chatters during compilation.
1884 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1885 * tests/headers.at (export YYLTYPE): Likewise.
1886
1887 * tests/input.at (Torturing the Scanner): Remove lines containing
1888 solitary backslashes, as they tickle a bug in the HP C compiler.
1889
1890 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1891 comments, since they're not portable. Use GNU coding style.
1892
1893 2002-11-13 Akim Demaille <akim@epita.fr>
1894
1895 * data/yacc.c: Leave bigger chunks of quoted text.
1896 (YYDSYMPRINTF): New.
1897 Use it to report symbol activities.
1898 * data/glr.c (YYDSYMPRINTF): New.
1899 Use it.
1900
1901 2002-11-12 Paul Eggert <eggert@twinsun.com>
1902
1903 Version 1.75b.
1904
1905 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1906 (yyglrReduce): Return yyok, not 0.
1907 This should avoid the enumerated-type warnings reported
1908 by Nelson H. F. Beebe in
1909 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1910
1911 * lib/bbitset.h (BITSET_INLINE): Remove.
1912 * lib/bitset.h [! BITSET_INLINE]: Remove.
1913 (bitset_set, bitset_reset, bitset_test): Rename local vars
1914 to avoid shadowing warnings by GCC.
1915
1916 * data/glr.c (inline): Remove #define. It's the user's
1917 responsibility to #define it away, just like 'const'.
1918 This fixes one of the bugs reported by Nelson H. F. Beebe in
1919 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1920
1921 * Makefile.maint (po-check): Scan .l and .y files instead of the
1922 .c and the .h files that they generate. This fixes the bug
1923 reported by Tim Van Holder in:
1924 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1925 Look for N_ as well as for _. Try to avoid matching #define for
1926 N_ and _.
1927 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1928 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1929 * src/scan-gram.l: Revamp regular expressions so that " and '
1930 do not confuse xgettext.
1931
1932 * src/struniq.h (struniq_new): Do not declare the return type
1933 to be 'const'; this violates the C standard.
1934 * src/struniq.c (struniq_new): Likewise.
1935
1936 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1937
1938 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1939 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1940 linker.
1941
1942 2002-11-12 Akim Demaille <akim@epita.fr>
1943
1944 * Makefile.maint: Sync with Autoconf:
1945 (local_updates): New.
1946
1947 2002-11-12 Akim Demaille <akim@epita.fr>
1948
1949 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1950
1951 2002-11-12 Akim Demaille <akim@epita.fr>
1952
1953 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1954 locations.
1955
1956 2002-11-12 Akim Demaille <akim@epita.fr>
1957
1958 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1959 not yyvalue.
1960
1961 2002-11-12 Akim Demaille <akim@epita.fr>
1962
1963 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1964 Use it to test the GLR parser.
1965
1966 2002-11-12 Akim Demaille <akim@epita.fr>
1967
1968 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1969 defines it.
1970 * data/glr.c (yystos): New.
1971 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1972 (YYDSYMPRINT): New.
1973 (yyval): Don't define it, it is handled via M4.
1974 (yyrecoverParseError): Free verbosely the discarded symbols.
1975 * data/yacc.c (yysymprint): Remove, rather...
1976 (b4_yysymprint_generate): invoke.
1977 * data/c.m4 (b4_yysymprint_generate): New.
1978 Accept pointers as arguments, as opposed to the version from
1979 yacc.c.
1980 (b4_yydestruct_generate): Likewise.
1981 * tests/cations.at (Printers and Destructors): Use Bison directives
1982 instead of CPP macros.
1983 Don't rely on internal details.
1984
1985 2002-11-12 Akim Demaille <akim@epita.fr>
1986
1987 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1988 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1989 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1990 it against YYEMPTY and so forth), work on yytoken (i.e., set
1991 it to YYEMPTY etc.).
1992 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1993 (b4_symbol_actions): Remove.
1994 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1995 for 0, end-of-input.
1996
1997 2002-11-12 Akim Demaille <akim@epita.fr>
1998
1999 * doc/bison.texinfo (Destructor Decl): New.
2000
2001 2002-11-12 Akim Demaille <akim@epita.fr>
2002
2003 * src/tables.c (tables_generate): Use free for pointers that
2004 cannot be NULL, not XFREE.
2005 (pack_vector): Use assert, not fatal, for bound violations.
2006 * src/state.c (state_new): Likewise.
2007 * src/reader.c (reader): Likewise.
2008 * src/lalr.c (set_goto_map): Likewise.
2009 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2010 the file name.
2011
2012 2002-11-12 Akim Demaille <akim@epita.fr>
2013
2014 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2015 Restore.
2016 * src/scan-gram.l (last_string): Is global to the file, not to
2017 yylex.
2018 * src/parse-gram.y (input): Don't append the epilogue here,
2019 (epilogue.opt): do it here, and free the scanner's obstack.
2020 * src/reader.c (epilogue_set): Rename as...
2021 (epilogue_augment): this.
2022 * data/c.m4 (b4_epilogue): Defaults to empty.
2023
2024 2002-11-12 Akim Demaille <akim@epita.fr>
2025
2026 * src/getargs.c (long_options): Remove duplicates.
2027 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2028 Remove.
2029 * doc/bison.rnh: Remove.
2030 * doc/bison.texinfo (VMS Invocation): Remove.
2031
2032 2002-11-12 Akim Demaille <akim@epita.fr>
2033
2034 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2035 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2036
2037 Use struniq for symbols.
2038
2039 * src/symtab.h (symbol_t): The tag member is a struniq.
2040 (symbol_type_set): Adjust.
2041 * src/symtab.c (symbol_new): Takes a struniq.
2042 (symbol_free): Don't free the tag member.
2043 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2044 (hash_compare_symbol, hash_symbol): these.
2045 Use the fact that tags as struniqs.
2046 (symbol_get): Use struniq_new.
2047 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2048 Returns a strniq.
2049 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2050 and type members are struniqs.
2051 * src/reader.c (get_merge_function)
2052 (grammar_current_rule_merge_set): Adjust.
2053 (TYPE, current_type): Are struniq.
2054
2055 Use struniq for file names.
2056
2057 * src/files.h, src/files.c (infile): Split into...
2058 (grammar_file, current_file): these.
2059 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2060 * src/reduce.c (reduce_print): Likewise.
2061 * src/getargs.c (getargs): Likewise.
2062 * src/complain.h, src/complain.c: Likewise.
2063 * src/main.c (main): Call struniqs_new early enough to use it for
2064 file names.
2065 Don't free the input file name.
2066
2067 2002-11-12 Akim Demaille <akim@epita.fr>
2068
2069 * src/symtab.c (symbol_free): Remove dead deactivated code:
2070 type_name are properly removed.
2071 Don't use XFREE to free items that cannot be NULL.
2072 * src/struniq.h, src/struniq.c: New.
2073 * src/main.c (main): Initialize/free struniqs.
2074 * src/parse-gram.y (%union): Add astruniq member.
2075 (yyprint): Adjust.
2076 * src/scan-gram.l (<{tag}>): Return a struniq.
2077 Free the obstack bit that used to store it.
2078 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2079
2080 2002-11-11 Paul Eggert <eggert@twinsun.com>
2081
2082 Revamp to fix many (but not all) of the C- and M4-related quoting
2083 problems. Among other things, this fixes the Bison bug reported
2084 by Jan Hubicka when processing the Bash grammar; see:
2085 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2086
2087 Use new @ escapes consistently. Represent brackets with @{ and @}
2088 rather than @<:@ and @:>@, since this works a bit better with dumb
2089 editors like vi. Represent @ with @@, since @ is now consistently
2090 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2091 __ofile__, to avoid unexpected expansions. Similarly, use @output
2092 rather than #output.
2093
2094 * data/c.m4 (b4_copyright): Omit file name from comment, since
2095 the file name could contain "*/".
2096 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2097 be quoted. All uses changed.
2098
2099 * data/glr.c: Use new @ escapes consistently.
2100 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2101 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2102 Remove, since they couldn't handle arbitrary characters in file
2103 names.
2104 * data/lalr1.cc: Likewise.
2105 * data/yacc.c: Likewise.
2106
2107 * src/files.c (output_infix): Remove; all uses removed.
2108 * src/files.h: Likewise.
2109
2110 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2111 mishandled funny characters in file names, and anyway it isn't
2112 needed any more.
2113 * data/yacc.c: Likewise.
2114 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2115
2116 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2117 * data/yacc.c: Likewise.
2118
2119 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2120 strings now.
2121 (muscle_init): Quote filename as a C string.
2122 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2123 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2124 * src/output.c (escaped_file_name_output): New function.
2125 (prepare_symbols): Quote tokens for M4.
2126 (prepare): Don't insert output_infix, output_prefix,
2127 output_parser_name, output_header_name; this is now down by scan-skel.
2128 Insert skeleton as a C string.
2129
2130 * src/output.c (user_actions_output, symbol_destructors_output,
2131 symbol_printers_output): Quote filenames for C and M4.
2132 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2133
2134 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2135 escapes other than \\ and \'; this simplifies the code.
2136 (<SC_STRING>): Likewise, for \\ and \".
2137 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2138 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2139 Use new escapes @{ and @} for [ and ].
2140
2141 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2142 them with auto vars.
2143 Switch to new escape scheme, where @ is the escape character uniformly.
2144 Abort if a stray escape character is found. Avoid unbounded input
2145 buffer when parsing non-escaped text.
2146
2147 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2148 __oline__, #output, $@, and @{ do not have unintended meanings.
2149
2150 2002-11-09 Paul Eggert <eggert@twinsun.com>
2151
2152 Fix the test failure due to GCC warnings described in
2153 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2154 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2155 evaluate to 0 if it's impossible for NINF to be in the respective
2156 table.
2157 (yygetLRActions, yyrecoverParseError): Use them.
2158
2159 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2160 counted in the token inserted at end of file. Now takes
2161 location_t *, not location_t, so that the location can be
2162 adjusted. All uses changed.
2163
2164 * tests/regression.at (Invalid inputs): Adjust wording in
2165 diagnostic to match the new behavior.
2166
2167 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2168 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2169 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2170 abort ();'. This reduces the runtime of the "Many lookaheads"
2171 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2172 GCC 3.2.
2173
2174 2002-11-07 Paul Eggert <eggert@twinsun.com>
2175
2176 * src/parse-gram.y (CHARACTER): Remove unused token.
2177 All uses removed.
2178
2179 * src/scan-gram.l: Remove stack option. We no longer use the
2180 stack, since the stack was never deeper than 1; instead, use the
2181 new auto var c_context to record the stacked value.
2182
2183 Remove nounput option. At an unexpected end of file, we now unput
2184 the minimal input necessary to end cleanly; this simplifies the
2185 code.
2186
2187 Avoid unbounded token sizes where this is easy.
2188
2189 (unexpected_end_of_file): New function.
2190 Use it to systematize the error message on unexpected EOF.
2191 (last-string): Now auto, not static.
2192 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2193 (scanner_last_string_free): Remove; not used.
2194 (percent_percent_count): Move decl to just before use.
2195 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2196 not the (never otherwised-used) CHARACTER.
2197
2198 2002-11-07 Akim Demaille <akim@epita.fr>
2199
2200 Let yyerror always receive the msg as last argument, so that
2201 yyerror can be variadic.
2202
2203 * data/yacc.c (b4_yyerror_args): New.
2204 Use it when calling yyerror.
2205 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2206 Use it when calling yyerror.
2207 * doc/bison.texinfo (Error Reporting): Adjust.
2208 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2209 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2210
2211 2002-11-06 Akim Demaille <akim@epita.fr>
2212
2213 #line should have quoted strings.
2214 Ideally, this should be done by m4_quotearg.
2215
2216 * src/scan-skel.l: Include quotearg.h.
2217 Quote __ofile__.
2218 * src/output.c (symbol_printers_output)
2219 (symbol_destructors_output): Quote the file name.
2220
2221 2002-11-06 Akim Demaille <akim@epita.fr>
2222
2223 * tests/regression.at (Invalid inputs): Adjust to the recent
2224 messages.
2225
2226 2002-11-06 Akim Demaille <akim@epita.fr>
2227
2228 Restore --no-lines.
2229 Reported by Jim Kent.
2230
2231 * data/c.m4 (b4_syncline): New.
2232 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2233 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2234 * src/output.c (user_actions_output): Likewise.
2235 (prepare): Define 'b4_synclines_flag'.
2236 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2237
2238 2002-11-06 Akim Demaille <akim@epita.fr>
2239
2240 * src/main.c (main): Free `infile'.
2241 * src/scan-gram.l (handle_syncline): New.
2242 Recognize `#line'.
2243 * src/output.c (user_actions_output, symbol_destructors_output)
2244 (symbol_printers_output): Use the location's file name, not
2245 infile.
2246 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2247
2248 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2249
2250 * src/tables.c (matching_state): Don't allow states to match if
2251 either has GLR conflict entries.
2252
2253 2002-11-05 Paul Eggert <eggert@twinsun.com>
2254
2255 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2256 "integer out of range" rather than "invalid value".
2257 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2258 accordingly.
2259
2260 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2261 Also, remove one static variable in the scanner.
2262
2263 * src/scan-gram.l (braces_level): Now auto, not static.
2264 Initialize to zero if the compiler is being picky.
2265 (INITIAL): Clear braces_level instead of incrementing it.
2266 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2267 as POSIX 1003.1-2001 requires.
2268 * src/system.h (IF_LINT): New macro, taken from coreutils.
2269 * configure.ac: Define "lint" if --enable-gcc-warnings.
2270
2271 2002-11-05 Akim Demaille <akim@epita.fr>
2272
2273 * src/scan-gram.l: When it starts with `%', complain about the
2274 whole directive, not just that `invalid character: %'.
2275
2276 2002-11-04 Akim Demaille <akim@epita.fr>
2277
2278 * Makefile.maint: Update from Autoconf.
2279 (update, cvs-update, po-update, do-po-update): New.
2280
2281 2002-11-04 Akim Demaille <akim@epita.fr>
2282
2283 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2284 and yyerror.
2285 Have yyerror `use' its arguments.
2286 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2287 returns true when location & yacc & pure & parse-param.
2288 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2289
2290 2002-11-04 Akim Demaille <akim@epita.fr>
2291
2292 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2293 clashes.
2294 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2295 font-lock-mode.
2296 Use complain_at.
2297 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2298 slot 0.
2299
2300 2002-11-03 Paul Eggert <eggert@twinsun.com>
2301
2302 * src/reader.c (get_merge_function, grammar_current_rule_check):
2303 Use consistent diagnostics for reporting type name clashes.
2304 Quote the types with <>, for consistency with Yacc.
2305 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2306
2307 2002-11-03 Akim Demaille <akim@epita.fr>
2308
2309 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2310 New.
2311 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2312 (b4_parse_param): Remove.
2313 Use b4_identification.
2314 Propagate b4_pure_args where needed to pass them to yyerror.
2315 * data/glr.m4 (b4_parse_param): Remove.
2316 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2317 (b4_lpure_formals): New.
2318 Use b4_identification.
2319 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2320 b4_user_formals and b4_user_args.
2321 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2322 (yyreportAmbiguity): When using a pure parser, also need
2323 the location, and the parse-params.
2324 Adjust callers.
2325 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2326 When using a pure parser, also need the parse-params.
2327 Adjust callers.
2328 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2329 (%pure-parser + %parse-param) LALR and GLR parsers.
2330 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2331 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2332 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2333 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2334 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2335 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2336 * doc/bison.texinfo: Untabify the whole file.
2337 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2338 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2339 (Error Reporting): Adjust to these new directives.
2340 Document %error-verbose, deprecate YYERROR_VERBOSE.
2341
2342 2002-11-03 Akim Demaille <akim@epita.fr>
2343
2344 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2345 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2346 command line options.
2347 * tests/cxx-type.at: Formatting changes.
2348
2349 2002-11-03 Paul Eggert <eggert@twinsun.com>
2350
2351 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2352 to count columns correctly, and to check for invalid inputs.
2353
2354 Use mbsnwidth to count columns correctly. Account for tabs, too.
2355 Include mbswidth.h.
2356 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2357 (extend_location): New function.
2358 (YY_LINES): Remove.
2359
2360 Handle CRLF in C code rather than in Lex code.
2361 (YY_INPUT): New macro.
2362 (no_cr_read): New function.
2363
2364 Scan UCNs, even though we don't fully handle them yet.
2365 (convert_ucn_to_byte): New function.
2366
2367 Handle backslash-newline correctly in C code.
2368 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2369 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2370 all uses changed.
2371 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2372 Use {splice} wherever C allows backslash-newline.
2373 YY_STEP after space, newline, vertical-tab.
2374 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2375
2376 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2377
2378 ({int}, handle_action_dollar, handle_action_at): Check for integer
2379 overflow.
2380
2381 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2382
2383 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2384 as well as \000. Check for UCHAR_MAX, not 255.
2385 Allow \x with an arbitrary positive number of digits, as in C.
2386 Check for overflow here.
2387 Allow \? and UCNs, for compatibility with C.
2388
2389 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2390 with quote slot used by complain_at.
2391
2392 * tests/input.at: Add tests for backslash-newline, m4 quotes
2393 in symbols, long literals, and funny escapes in strings.
2394
2395 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2396 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2397 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2398 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2399 * m4/mbswidth.m4: New file, from GNU coreutils.
2400
2401 * doc/bison.texinfo (Grammar Outline): Document // comments.
2402 (Symbols): Document that trigraphs have no special meaning in Bison,
2403 nor is backslash-newline allowed.
2404 (Actions): Document that trigraphs have no special meaning.
2405
2406 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2407 no longer used.
2408
2409 2002-11-02 Paul Eggert <eggert@twinsun.com>
2410
2411 * src/reader.c: Don't include quote.h; not needed.
2412 (get_merge_function): Reword warning to be consistent with
2413 type clash diagnostic in grammar_current_rule_check.
2414
2415 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2416 bug in trigraph handling.
2417
2418 * src/output.c (prepare_symbols): When printing token names,
2419 escape "[" as "@<:@" and likewise for "]".
2420
2421 * src/system.h (errno): Remove declaration, as we are now
2422 assuming C89 or better, and C89 guarantees errno.
2423
2424 2002-10-30 Paul Eggert <eggert@twinsun.com>
2425
2426 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2427 Check for close failures.
2428 * src/files.h (xfclose): Return void, not int, since it always
2429 returned zero.
2430 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2431 indicates one.
2432 * src/output.c (output_skeleton): Use xfclose rather than fclose
2433 and ferror. xfclose now checks ferror.
2434
2435 * data/glr.c (YYLEFTMOST_STATE): Remove.
2436 (yyreportTree): Use a stack-based leftmost state. This avoids
2437 our continuing battles with bogus warnings about initializers.
2438
2439 2002-10-30 Akim Demaille <akim@epita.fr>
2440
2441 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2442 #if.
2443
2444 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2445
2446 * tests/glr-regr1.at: New test for reported regressions.
2447 * tests/testsuite.at: Add glr-regr1.at test.
2448 * tests/Makefile.am: Add glr-regr1.at test.
2449
2450 2002-10-24 Paul Eggert <eggert@twinsun.com>
2451
2452 Version 1.75a.
2453
2454 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2455 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2456 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2457 Don't assume strdup exists; POSIX says its an XSI extension.
2458 Check for buffer overflow on input.
2459
2460 2002-10-24 Akim Demaille <akim@epita.fr>
2461
2462 * src/output.c (output_skeleton): Don't disable M4sugar comments
2463 too soon: it results in comments being expanded.
2464 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2465 first output.
2466
2467 2002-10-24 Akim Demaille <akim@epita.fr>
2468
2469 * data/yacc.c (m4_int_type): New.
2470 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2471 char' as only yacc.c wants K&R portability.
2472 * data/glr.c (yysigned_char): Remove.
2473 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2474 Reported by Quoc Peyrot.
2475
2476 2002-10-23 Paul Eggert <eggert@twinsun.com>
2477
2478 * src/main.c (main): With --trace=time, report times even if a
2479 non-fatal error occurs. Formerly, the times were reported in some
2480 such cases but not in others.
2481 * src/reader.c (reader): Just return if a complaint has been issued,
2482 instead of exiting, so that 'main' can report times.
2483
2484 2002-10-22 Akim Demaille <akim@epita.fr>
2485
2486 * src/system.h: Include sys/types.
2487 Reported by Bert Deknuydt.
2488
2489 2002-10-23 Paul Eggert <eggert@twinsun.com>
2490
2491 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2492 Suggested by Art Haas.
2493
2494 2002-10-22 Paul Eggert <eggert@twinsun.com>
2495
2496 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2497 decl; not needed any more.
2498 * src/main.c (main): Use return to exit, undoing yesterday's change.
2499 The last OS that we could find where this wouldn't work is
2500 SunOS 3.5, and that's too old to worry about now.
2501
2502 * data/glr.c (struct yyltype): Define members even when not
2503 doing locations. This is more consistent with yacc.c, and it
2504 works around the following bug reports:
2505 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2506 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
2507
2508 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2509 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2510 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2511
2512 2002-10-22 Akim Demaille <akim@epita.fr>
2513
2514 * data/README: New.
2515
2516 2002-10-21 Paul Eggert <eggert@twinsun.com>
2517
2518 Be consistent about 'bool'; the old code used an enum in one
2519 module and an int in another, and this violates the C standard.
2520 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2521 * configure.ac (AC_HEADER_STDBOOL): Add.
2522 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2523 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2524 * src/symtab.c (hash_compare_symbol_t): Likewise.
2525 * src/system.h (bool, false, true): Use a definition consistent
2526 with ../lib/hash.c. All uses changed.
2527
2528 * src/complain.c (warning_issued): Renamed from warn_message_count,
2529 so that we needn't worry about integer overflow (!).
2530 Now of type bool. All uses changed.
2531 (complaint_issued): Renamed from complain_message_count; likewise.
2532
2533 * src/main.c (main): Use exit to exit with failure.
2534
2535 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2536 rather than 1 and 0.
2537 * src/main.c (main): Likewise.
2538 * src/getargs.c (getargs): Likewise.
2539 * src/reader.c (reader): Likewise.
2540
2541 * src/getarg.c (getargs): Remove duplicate code for
2542 "Try `bison --help'".
2543
2544 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2545 What was that "2" for?
2546
2547 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2548 * src/getargs.c (usage): Likewise.
2549
2550 * src/getargs.c (getargs): When there are too few operands, report
2551 the last one. When there are too many, report the first extra
2552 one. This is how diffutils does it.
2553
2554 2002-10-20 Paul Eggert <eggert@twinsun.com>
2555
2556 Remove K&R vestiges.
2557 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2558 * src/complain.c (VA_START): Remove. Assume prototypes.
2559 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2560 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2561 fatal): Assume prototypes.
2562 * src/complain.h: Assume prototypes.
2563 * src/system.h (PARAMS): Remove.
2564 Include <limits.h> unconditionally, since it's guaranteeed even
2565 for a freestanding C89 compiler.
2566 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2567 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2568
2569 2002-10-20 Akim Demaille <akim@epita.fr>
2570
2571 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2572 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2573 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2574 (yyresolveStates, yyresolveAction, yyresolveStack)
2575 (yyprocessOneStack): Use them.
2576 (yy_reduce_print): New.
2577 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2578
2579 2002-10-20 Akim Demaille <akim@epita.fr>
2580
2581 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2582 arguments and output `void'.
2583 (b4_c_function): Rename as...
2584 (b4_c_function_def): this.
2585 (b4_c_function_decl, b4_c_ansi_function_def)
2586 (b4_c_ansi_function_decl): New.
2587 Change the interpretation of the arguments: before `int, foo', now
2588 `int foo, foo'.
2589 * data/yacc.c (yyparse): Prototype and define thanks to these.
2590 Adjust b4_c_function_def uses.
2591 * data/glr.c (yyparse): Likewise, but ANSI only.
2592
2593 2002-10-20 Akim Demaille <akim@epita.fr>
2594
2595 * src/output.c (prepare): Move the definition of `tokens_number',
2596 `nterms_number', `undef_token_number', `user_token_number_max'
2597 to...
2598 (prepare_tokens): Here.
2599 (prepare_tokens): Rename as...
2600 (prepare_symbols): this.
2601 (prepare): Move the definition of `rules_number' to...
2602 (prepare_rules): here.
2603 (prepare): Move the definition of `last', `final_state_number',
2604 `states_number' to...
2605 (prepare_states): here.
2606 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2607
2608 2002-10-20 Akim Demaille <akim@epita.fr>
2609
2610 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2611
2612 2002-10-20 Akim Demaille <akim@epita.fr>
2613
2614 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2615 * data/c.m4: here.
2616
2617 2002-10-20 Akim Demaille <akim@epita.fr>
2618
2619 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2620 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2621 `pair'.
2622 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2623 `name' to...
2624 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2625 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2626 These.
2627
2628 2002-10-19 Paul Eggert <eggert@twinsun.com>
2629
2630 Do not create a temporary file, as that involves security and
2631 cleanup headaches. Instead, use a pair of pipes.
2632 Derived from a suggestion by Florian Krohm.
2633 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2634 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2635 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2636 (BISON_PREREQ_SUBPIPE): Add.
2637 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2638 Add subpipe.h, subpipe.c.
2639 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2640 * po/POTFILES.in: Add lib/subpipe.c.
2641 * src/output.c: Include "subpipe.h".
2642 (m4_invoke): Remove decl.
2643 (scan_skel): New decl.
2644 (output_skeleton): Use pipe rather than temporary file for m4 input.
2645 Check that m4sugar.m4 is readable, to avoid deadlock.
2646 Check for pipe I/O error.
2647 * src/scan-skel.l (readpipe): Remove decl.
2648 (scan_skel): New function, to be used in place of m4_invoke.
2649 Read from stream rather than file.
2650
2651 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2652 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2653 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2654 this generates a more-accurate value anyway.
2655
2656 * lib/timevar.c (timervar_accumulate): Rename locals to
2657 avoid confusion with similarly-named more-global.
2658 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2659
2660 * src/output.c (prepare): Use xstrdup to convert char const *
2661 to char *, to avoid GCC warning.
2662
2663 2002-10-19 Akim Demaille <akim@epita.fr>
2664
2665 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2666 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2667 Use them to have `calc.y' ready for %pure-parser.
2668 * data/yacc.c (YYLEX): Pass a yylex return type to
2669 b4_c_function_call.
2670
2671 2002-10-19 Akim Demaille <akim@epita.fr>
2672
2673 Prototype support of %lex-param and %parse-param.
2674
2675 * src/parse-gram.y: Add the definition of the %lex-param and
2676 %parse-param tokens, plus their rules.
2677 Drop the `_' version of %glr-parser.
2678 Add the "," token.
2679 * src/scan-gram.l (INITIAL): Scan them.
2680 * src/muscle_tab.c: Comment changes.
2681 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2682 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2683 (muscle_entry_s): The `value' member is no longer const.
2684 Adjust all dependencies.
2685 * src/muscle_tab.c (muscle_init): Adjust: use
2686 MUSCLE_INSERT_STRING.
2687 Initialize the obstack earlier.
2688 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2689 (muscle_pair_list_grow): New.
2690 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2691 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2692 * tests/calc.at: Use %locations, not --locations.
2693 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2694
2695 2002-10-19 Akim Demaille <akim@epita.fr>
2696
2697 * src/getargs.c (usage): Take status as argument and exit
2698 accordingly.
2699 Report the traditional `Try ... --help' message when status != 0.
2700 (usage, version): Don't take a FILE * as arg, it is pointless.
2701 (getargs): When there is an incorrect number of arguments, make it
2702 an error, and report it GNUlically thanks to `usage ()'.
2703
2704 2002-10-18 Paul Eggert <eggert@twinsun.com>
2705
2706 * data/glr.c (yyreportParseError): Don't assume that sprintf
2707 yields the length of the printed string, as this is not true
2708 on SunOS 4.1.4. Reported by Peter Klein.
2709
2710 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2711 * tests/conflicts.at (%nonassoc and eof): Likewise.
2712 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2713
2714 2002-10-17 Akim Demaille <akim@epita.fr>
2715
2716 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2717 * src/getargs.c (trace_types, trace_args): Adjust.
2718 * src/reader.c (grammar_current_rule_prec_set)
2719 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2720 Standardize error messages.
2721 And s/@prec/%prec/!
2722 (reader): Use trace_flag to enable scanner/parser debugging,
2723 instead of an adhoc scheme.
2724 * src/scan-gram.l: Remove trailing debugging code.
2725
2726 2002-10-16 Paul Eggert <eggert@twinsun.com>
2727
2728 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2729 MUSCLE_TAB_H.
2730
2731 * NEWS: Officially drop support for building Bison with K&R C,
2732 since it didn't work anyway and it's not worth worrying about.
2733 * Makefile.maint (wget_files): Remove ansi2knr.c.
2734 (ansi2knr.c-url_prefix): Remove.
2735 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2736 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2737 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2738
2739 2002-10-15 Paul Eggert <eggert@twinsun.com>
2740
2741 Stop using the "enum_" trick for K&R-style function definitions;
2742 it confused me, and I was the author! Instead, assume that people
2743 who want to use K&R C compilers (when using these modules in GCC,
2744 perhaps?) will run ansi2knr.
2745
2746 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2747 All uses of "enum_" changed to "enum ".
2748 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2749 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2750
2751 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2752 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2753 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2754 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2755 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2756 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2757 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2758 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2759 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2760 Use function prototypes; this removes the need for declaring
2761 static functions simply to provide their prototypes.
2762 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2763 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2764 bitset_count_, bitset_create, bitset_dump, bitset_first,
2765 bitset_free, bitset_init, bitset_last, bitset_next,
2766 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2767 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2768 bitset_print, bitset_release_memory, bitset_toggle_,
2769 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2770 debug_bitset): Likewise.
2771 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2772 * lib/bitset_stats.c (bitset_log_histogram_print,
2773 bitset_percent_histogram_print, bitset_stats_and,
2774 bitset_stats_and_cmp, bitset_stats_and_or,
2775 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2776 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2777 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2778 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2779 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2780 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2781 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2782 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2783 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2784 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2785 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2786 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2787 bitset_stats_zero): Likewise.
2788 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2789 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2790 bitsetv_dump, debug_bitsetv): Likewise.
2791 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2792 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2793 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2794 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2795 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2796 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2797 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2798 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2799 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2800 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2801 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2802 Likewise.
2803 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2804 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2805 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2806 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2807 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2808 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2809 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2810 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2811 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2812 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2813 lbitset_xor_cmp, lbitset_zero): Likewise.
2814
2815 2002-10-14 Akim Demaille <akim@epita.fr>
2816
2817 Version 1.75.
2818
2819 2002-10-14 Akim Demaille <akim@epita.fr>
2820
2821 * tests/Makefile.am (maintainer-check-posix): New.
2822
2823 2002-10-14 Akim Demaille <akim@epita.fr>
2824
2825 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2826 member.
2827
2828 2002-10-14 Akim Demaille <akim@epita.fr>
2829
2830 * src/tables.c (table_ninf_remap): base -> tab.
2831 Reported by Matt Rosing.
2832
2833 2002-10-14 Paul Eggert <eggert@twinsun.com>
2834
2835 * tests/action.at, tests/calc.at, tests/conflicts.at,
2836 tests/cxx-type.at, tests/headers.at, tests/input.at,
2837 tests/regression.at, tests/synclines.at, tests/torture.at:
2838 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2839 so that the tests still work even if POSIXLY_CORRECT is set.
2840 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2841
2842 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2843 for portability to K&R hosts. Fix typo: signed char is guaranteed
2844 only to 127, not to 128.
2845 * data/glr.c (yysigned_char): New type.
2846 * data/yacc.c (yysigned_char): Likewise.
2847 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2848
2849 2002-10-13 Paul Eggert <eggert@twinsun.com>
2850
2851 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2852 true due to limited range of data type" warning from GCC.
2853
2854 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2855 by wrapping enum yytokentype's definition inside #ifndef
2856 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2857
2858 2002-10-13 Akim Demaille <akim@epita.fr>
2859
2860 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2861 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2862
2863 2002-10-13 Akim Demaille <akim@epita.fr>
2864
2865 * Makefile.maint: Update from Autoconf 2.54.
2866 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2867
2868 2002-10-13 Akim Demaille <akim@epita.fr>
2869
2870 * src/print.c (print_state): Separate the list of solved conflicts
2871 from the other items.
2872 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2873
2874 2002-10-13 Akim Demaille <akim@epita.fr>
2875
2876 Let nondeterministic skeletons be usable with deterministic
2877 tables.
2878
2879 With the patch, GAWK compiled by GCC without -O2 passes its test
2880 suite using a GLR parser driven by LALR tables. It fails with -O2
2881 because `struct stat' gives two different answers on my machine:
2882 88 (definition of an auto var) and later 96 (memset on this var).
2883 Hence the stack is badly corrumpted. The headers inclusion is to
2884 blame: if I move the awk.h inclusion before GLR's system header
2885 inclusion, the two struct stat have the same size.
2886
2887 * src/tables.c (pack_table): Always create conflict_table.
2888 (token_actions): Always create conflict_list.
2889 * data/glr.c (YYFLAG): Remove, unused.
2890
2891 2002-10-13 Akim Demaille <akim@epita.fr>
2892
2893 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2894 (O0FLAGS): New.
2895 (VALGRIND, GXX): New.
2896 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2897 * tests/bison.in: Run $PREBISON a pre-command.
2898 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2899 (maintainer-check-g++): New.
2900 * Makefile.am (maintainer-check): New.
2901
2902 2002-10-13 Akim Demaille <akim@epita.fr>
2903
2904 * data/glr.c: Formatting changes.
2905 Tweak some trace messages to match yacc.c's.
2906
2907 2002-10-13 Akim Demaille <akim@epita.fr>
2908
2909 GLR parsers sometimes raise parse errors instead of performing the
2910 default reduction.
2911 Reported by Charles-Henry de Boysson.
2912
2913 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2914 check the length of the traces when %glr.
2915 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2916 GLR's traces.
2917 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2918 Test GLR parsers.
2919 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2920 (yyltype): Remove the yy prefix from the member names.
2921 (yytable): Complete its comment.
2922 (yygetLRActions): Map error action number from YYTABLE from
2923 YYTABLE_NINF to 0.
2924 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2925 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2926 not satisfying as we could compare an YYACTION computed from
2927 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2928 only value for error actions.
2929 (yyreportParseError): In verbose parse error messages, don't issue
2930 `error' in the list of expected tokens.
2931 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2932 next action to perform to match glr.c's decoding.
2933 (yytable): Complete its comment.
2934
2935 2002-10-13 Paul Eggert <eggert@twinsun.com>
2936
2937 Fix problem reported by Henrik Grubbstroem in
2938 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2939 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2940 because the Bison parser reads the second action before reducing
2941 the first one.
2942 * src/scan-gram.l (rule_length): New static var.
2943 Use it to keep track of the rule length in the scanner, since
2944 we can't expect the parser to be in lock-step sync with the scanner.
2945 (handle_action_dollar, handle_action_at): Use this var.
2946 * tests/actions.at (Exotic Dollars): Test for the problem.
2947
2948 2002-10-12 Paul Eggert <eggert@twinsun.com>
2949
2950 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2951 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2952 Include <sys/time.h> when checking for clock_t and struct tms.
2953 Use same include order as source.
2954 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2955 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2956
2957 * lib/timevar.c: Update copyright date and clarify comments.
2958 (get_time) [IN_GCC]: Keep the GCC version for reference.
2959
2960 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2961 GCC version as of today, then merge Bison's changes.
2962 Change "GCC" to "Bison" in copyright notice. timevar.def's
2963 author is Akim, so change that too.
2964
2965 * src/reader.c (grammar_current_rule_check):
2966 Don't worry about the default action if $$ is untyped.
2967 Prevents bogus warnings reported by Jim Gifford in
2968 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2969
2970 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2971 * data/glr.c, data/lalr1.cc, data/yacc.c:
2972 Output token definitions before the first part of user declarations.
2973 Fixes compatibility problem reported by Jim Gifford for kbd in
2974 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2975
2976 2002-10-11 Paul Eggert <eggert@twinsun.com>
2977
2978 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2979 (yyparse): here. This undoes some of the 2002-07-25 change.
2980 Compatibility problem reported by Ralf S. Engelschall with
2981 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2982
2983 2002-10-11 Akim Demaille <akim@epita.fr>
2984
2985 * tests/regression.at Characters Escapes): New.
2986 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2987 characters.
2988 Reported by Jan Nieuwenhuizen.
2989
2990 2002-10-11 Akim Demaille <akim@epita.fr>
2991
2992 * po/id.po: New.
2993
2994 2002-10-10 Paul Eggert <eggert@twinsun.com>
2995
2996 Portability fixes for bitsets; this also avoids several GCC
2997 warnings.
2998
2999 * lib/abitset.c: Include <stddef.h>, for offsetof.
3000 * lib/lbitset.c: Likewise.
3001
3002 * lib/abitset.c (abitset_bytes): Return a size that is aligned
3003 properly for vectors of objects. Do not assume that adding a
3004 header size to a multiple of a word size yields a value that is
3005 properly aligned for the whole union.
3006 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3007
3008 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3009 unique names for structures.
3010 * lib/ebitset.c (ebitset_bytes): Likewise.
3011 * lib/lbitset.c (lbitset_bytes): Likewise.
3012
3013 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3014 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3015 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3016 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3017 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3018 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3019 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3020 to improve the type-checking that GCC can do.
3021 * lib/bitset.c (bitset_op4_cmp): Likewise.
3022 * lib/bitset_stats.c (bitset_stats_count,
3023 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3024 bitset_stats_copy, bitset_stats_disjoint_p,
3025 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3026 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3027 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3028 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3029 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3030 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3031 bitset_stats_or_and_cmp): Likewise.
3032 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3033 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3034 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3035 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3036
3037 * lib/abitset.h: Include bitset.h, not bbitset.h.
3038 * lib/ebitset.h: Likewise.
3039 * lib/lbitset.h: Likewise.
3040
3041 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3042 All instances of parameters of type enum bitset_opts are now of
3043 type enum_bitset_opts, to conform to the C Standard, and similarly
3044 for enum_bitset_type.
3045 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3046 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3047
3048 Do not use "struct bitset_struct" to mean different things in
3049 different modules. Not only is this confusing, it violates
3050 the C Standard, which requires that structure types in different
3051 modules must be compatible if one is to be passed to the other.
3052 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3053 All instances of "struct bitset_struct *" replaced with "bitset".
3054 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3055 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3056 struct lbitset_struct, struct bitset_stats_struct): New types.
3057 All uses of struct bitset_struct changed to union bitset_union,
3058 etc.
3059 * lib/abitset.c (struct abitset_struct, abitset,
3060 struct bitset_struct): Remove.
3061 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3062 struct bitset_struct): Remove.
3063 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3064 bitset_struct): Remove.
3065 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3066 Likewise.
3067
3068 Do not call a function of type T using a call that assumes the
3069 function is of a different type U. Standard C requires that a
3070 function must be called with a type that is compatible with its
3071 definition.
3072 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3073 New decls.
3074 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3075 New functions.
3076 * lib/ebitset.c (PFV): Remove.
3077 * lib/lbitset.c (PFV): Likewise.
3078 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3079 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3080 decls.
3081 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3082 (ebitset_vtable): Use them.
3083 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3084 lbitset_xor): New functions.
3085 (lbitset_vtable): Use them.
3086
3087 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3088 Declare.
3089
3090 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3091 GCC warning.
3092 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3093 Use offsetof, for simplicity.
3094
3095 2002-10-06 Paul Eggert <eggert@twinsun.com>
3096
3097 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3098 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3099 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3100 which was inadvertently undone by the 2002-09-30 patch.
3101 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3102 the same width as int.
3103
3104 2002-10-04 Paul Eggert <eggert@twinsun.com>
3105
3106 Version 1.50.
3107
3108 * configure.ac (AC_INIT), NEWS: Increment version number.
3109
3110 * doc/bison.texinfo: Minor spelling, grammar, and white space
3111 fixes.
3112 (Symbols): Mention that any negative value returned from yylex
3113 signifies end-of-input. Warn about negative chars. Mention
3114 the portable Standard C character set.
3115
3116 The GNU coding standard says CFLAGS and YFLAGS are reserved
3117 for the installer to set.
3118 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3119 * src/Makefile.am (AM_CFLAGS): Likewise.
3120 (AM_YFLAGS): Renamed from YFLAGS.
3121
3122 Fix some MAX and MIN problems.
3123 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3124 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3125 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3126 * src/reader.c (reader): Use it.
3127
3128 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3129 POSIX 1003.1-2001 has removed fgrep.
3130
3131 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3132
3133 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3134 interpreted as signed.
3135 * lib/ebitset.c (ebitset_list): Fix bug.
3136
3137 2002-10-01 Paul Eggert <eggert@twinsun.com>
3138
3139 More fixes for 64-bit hosts and large bitsets.
3140
3141 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3142 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3143 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3144 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3145 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3146 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3147 bitset_count_): Likewise.
3148 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3149 bitset_first, bitset_last): Likewise.
3150 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3151 bitset_stats_list_reverse, bitset_stats_size,
3152 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3153 Likewise.
3154 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3155 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3156 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3157 bitsetv_reflexive_transitive_closure): Likewise.
3158 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3159 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3160 Likewise.
3161 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3162 Likewise.
3163
3164 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3165 Use size_t, not unsigned int, to count bytes.
3166 * lib/abitset.h (abitset_bytes): Likewise.
3167 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3168 Likewise.
3169 * lib/bitset.h (bitset_bytes): Likewise.
3170 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3171 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3172 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3173 * lib/ebitset.c (ebitset_bytes): Likewise.
3174 * lib/ebitset.h (ebitset_bytes): Likewise.
3175 * lib/lbitset.c (lbitset_bytes): Likewise.
3176 * lib/lbitset.h (lbitset_bytes): Likewise.
3177
3178 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3179 abitset_subset_p, abitset_disjoint_p, abitset_and,
3180 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3181 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3182 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3183 abitset_or_and, abitset_or_and_cmp):
3184 Use bitset_windex instead of unsigned int.
3185 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3186 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3187 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3188 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3189 Likewise.
3190 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3191
3192 * lib/bitset.c (bitset_print):
3193 Use proper printf formats for widths of integer types.
3194 * lib/bitset_stats.c (bitset_percent_histogram_print,
3195 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3196 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3197 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3198 * lib/lbitset.c (lbitset_bytes): Likewise.
3199
3200 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3201 BITSET_SIZE_MAX): New macros.
3202 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3203 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3204 to BITSET_WINDEX_MAX.
3205
3206 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3207 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3208 since we now return the bitset_bindex type (not int).
3209
3210 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3211 when computing sizes.
3212 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3213
3214 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3215 and avoid cast to unsigned.
3216
3217 2002-09-30 Akim Demaille <akim@epita.fr>
3218
3219 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3220 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3221 Updates from Michael Hayes.
3222
3223 2002-09-30 Art Haas <ahaas@neosoft.com>
3224
3225 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3226 invocations.
3227 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3228 defined.
3229
3230 2002-09-27 Akim Demaille <akim@epita.fr>
3231
3232 Version 1.49c.
3233
3234 2002-09-27 Akim Demaille <akim@epita.fr>
3235
3236 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3237 (Because of AC_LIBSOURCE).
3238
3239 2002-09-27 Akim Demaille <akim@epita.fr>
3240
3241 Playing with Autoscan.
3242
3243 * configure.ac: Remove the old LIBOBJ tweaks.
3244 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3245 * lib/strrchr.c: New.
3246 * lib/strtol.c: New, from the Coreutils 4.5.1.
3247
3248 2002-09-27 Akim Demaille <akim@epita.fr>
3249
3250 Playing with Autoscan.
3251
3252 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3253 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3254 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3255 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3256 Coreutils 4.5.1.
3257
3258 2002-09-24 Akim Demaille <akim@epita.fr>
3259
3260 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3261 (Frequently Asked Questions, Parser Stack Overflow): New.
3262
3263 2002-09-13 Akim Demaille <akim@epita.fr>
3264
3265 Playing with autoscan.
3266
3267 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3268 * src/files.c (skeleton_find): Remove, unused.
3269 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3270 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3271
3272 2002-09-13 Akim Demaille <akim@epita.fr>
3273
3274 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3275 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3276
3277 2002-09-13 Akim Demaille <akim@epita.fr>
3278
3279 * configure.ac: Require 2.54.
3280 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3281 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3282 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3283 Remove, provided by Autoconf macros.
3284
3285 2002-09-12 Akim Demaille <akim@epita.fr>
3286
3287 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3288
3289 2002-09-12 Akim Demaille <akim@epita.fr>
3290
3291 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3292 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3293 Reported by Martin Mokrejs.
3294
3295 2002-09-10 Akim Demaille <akim@epita.fr>
3296
3297 * src/parse-gram.y: Associate a human readable string to each
3298 token type.
3299 * tests/regression.at (Invalid inputs): Adjust.
3300
3301 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3302
3303 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3304 with an Autoconf-2.5x style configure.ac.
3305
3306 2002-09-06 Paul Eggert <eggert@twinsun.com>
3307
3308 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3309 exception applies only to yacc.c. This is a modification of a
3310 patch originally suggested by Akim Demaille.
3311
3312 2002-09-06 Akim Demaille <akim@epita.fr>
3313
3314 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3315 here to...
3316 * data/yacc.c: here.
3317
3318 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3319 LocationType.
3320 (b4_ltype): Default to yy::Location from location.hh.
3321
3322 2002-09-04 Jim Meyering <jim@meyering.net>
3323
3324 * data/yacc.c: Guard the declaration of yytoknum also with
3325 `#ifdef YYPRINT', so it is declared only when used.
3326
3327 2002-09-04 Akim Demaille <akim@epita.fr>
3328
3329 * configure.in: Rename as...
3330 * configure.ac: this.
3331 Bump to 1.49c.
3332
3333 2002-09-04 Akim Demaille <akim@epita.fr>
3334
3335 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3336 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3337 translate maintainer only messages.
3338
3339 2002-08-12 Paul Eggert <eggert@twinsun.com>
3340
3341 Version 1.49b.
3342
3343 * Makefile.am (SUBDIRS): Remove intl.
3344 (DISTCLEANFILES): Remove.
3345 * NEWS: Mention that GNU M4 is now required. Clarify what is
3346 meant by "larger grammars". Mention the pt_BR translation.
3347 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3348 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3349 Bump version from 0.11.2 to 0.11.5.
3350 (BISON_PREREQ_STAGE): Remove.
3351 (AM_GNU_GETTEXT): Use external gettext.
3352 (AC_OUTPUT): Remove intl/Makefile.
3353
3354 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3355
3356 * data/glr.c: Include string.h, for strlen.
3357 (yyreportParseError): Use size_t for yysize.
3358 (yy_yypstack): No longer nested inside yypstates, as nested
3359 functions are not portable. Do not assume size_t is the
3360 same width as int.
3361 (yypstates): Do not assume that ptrdiff_t is the same width
3362 as int, and similarly for yyposn and YYINDEX.
3363
3364 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3365
3366 * lib/Makefile.am (INCLUDES): Do not include from the intl
3367 directory, which has been removed.
3368 * src/Makefile.am (INCLUDES): Likewise.
3369
3370 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3371 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3372 New vars.
3373
3374 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3375 * tests/Makefile.am (EXTRA_DIST): Likewise.
3376
3377 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3378 Do not assume that bitset_windex is the same width as unsigned.
3379
3380 * lib/abitset.c (abitset_unused_clear): Do not assume that
3381 bitset_word is the same width as int.
3382 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3383 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3384 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3385 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3386 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3387
3388 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3389 portability to one's complement hosts!).
3390 * lib/ebitset.c (ebitset_op1): Likewise.
3391 * lib/lbitset.c (lbitset_op1): Likewise.
3392
3393 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3394 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3395 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3396 Sync with fileutils.
3397 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3398 lib/gettext.h: Sync with diffutils.
3399
3400 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3401 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3402
3403 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3404 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3405 check for void *.
3406
3407 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3408 size_t; the old version tried to do this but casted improperly.
3409 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3410 (bitset_test): Now returns int, not unsigned long.
3411
3412 * lib/bitset_stats.c: Include "gettext.h".
3413 (_): New macro.
3414 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3415 name locals "index", as it generates unnecessary warnings on some
3416 hosts that have an "index" function.
3417
3418 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3419 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3420 they need translation.
3421 * src/LR0.c (state_list_append, new_itemsets, get_state,
3422 append_states, generate_states): Likewise.
3423 * src/assoc.c (assoc_to_string): Likewise.
3424 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3425 * src/gram.c (grammar_dump): Likewise.
3426 * src/injections.c (injections_compute): Likewise.
3427 * src/lalr.c (lookaheads_print): Likewise.
3428 * src/relation.c (relation_transpose): Likewise.
3429 * src/scan-gram.l: Likewise.
3430 * src/tables.c (table_grow, pack_vector): Likewise.
3431
3432 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3433 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3434 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3435 * m4/mbstate_t.m4: Sync with fileutils.
3436 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3437
3438 * po/LINGUAS: Add pt_BR.
3439 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3440 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3441 lib/timevar.c.
3442 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3443 manual recommends.
3444 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3445
3446 * src/complain.c (strerror_r): Remove decl; not needed.
3447 (strerror): Use same pattern as ../lib/error.c.
3448
3449 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3450
3451 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3452
3453 * src/main.c (main): Cast result of bindtextdomain and textdomain
3454 to void, to avoid a GCC warning when --disable-nls is in effect.
3455
3456 * src/scan-gram.l: Use strings rather than escapes when possible,
3457 to minimize the number of warnings from xgettext.
3458 (handle_action_dollar, handle_action_at): Don't use isdigit,
3459 as it mishandles negative chars and it may not work as expected
3460 outside the C locale.
3461
3462 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3463 this is a GCC extension and is not portable to other compilers.
3464
3465 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3466 Do not include <ctype.h>; no longer needed.
3467 Do not include <malloc.h>; no longer needed (and generates
3468 warnings on OpenBSD 3.0).
3469
3470 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3471 it's not portable.
3472
3473 * tests/regression.at: Do not use 'cc -c input.c -o input';
3474 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3475
3476 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3477 exit status as failure, not just exit status 1. Sun C exits
3478 with status 2 sometimes.
3479
3480 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3481 Use it for the two large tests.
3482
3483 2002-08-02 Akim Demaille <akim@epita.fr>
3484
3485 * src/conflicts.c (conflicts_output): Don't output rules never
3486 reduced here, since anyway that computation doesn't work.
3487 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3488 (rule_useless_p, rule_never_reduced_p): New.
3489 (grammar_rules_partial_print): Use a filter instead of a range.
3490 Display the title only if needed.
3491 (grammar_rules_print): Adjust.
3492 (grammar_rules_never_reduced_report): New.
3493 * src/tables.c (action_row): Move the computation of rules never
3494 reduced to...
3495 (token_actions): here.
3496 * src/main.c (main): Make the parser before making the report, so
3497 that rules never reduced are computed.
3498 Call grammar_rules_never_reduced_report.
3499 * src/print.c (print_results): Report rules never reduced.
3500 * tests/conflicts.at, tests/reduce.at: Adjust.
3501
3502 2002-08-01 Akim Demaille <akim@epita.fr>
3503
3504 Instead of attaching lookaheads and duplicating the rules being
3505 reduced by a state, attach the lookaheads to the reductions.
3506
3507 * src/state.h (state_t): Remove the `lookaheads',
3508 `lookaheads_rule' member.
3509 (reductions_t): Add a `lookaheads' member.
3510 Use a regular array for the `rules'.
3511 * src/state.c (reductions_new): Initialize the lookaheads member
3512 to 0.
3513 (state_rule_lookaheads_print): Adjust.
3514 * src/state.h, src/state.c (state_reductions_find): New.
3515 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3516 (count_rr_conflicts): Adjust.
3517 * src/lalr.c (LArule): Remove.
3518 (add_lookback_edge): Adjust.
3519 (state_lookaheads_count): New.
3520 (states_lookaheads_initialize): Merge into...
3521 (initialize_LA): this.
3522 (lalr_free): Adjust.
3523 * src/main.c (main): Don't free nullable and derives too early: it
3524 is used by --verbose.
3525 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3526
3527 2002-08-01 Akim Demaille <akim@epita.fr>
3528
3529 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3530 `rule_number_t**'.
3531 (set_derives, free_derives): Rename as...
3532 (derives_compute, derives_free): this.
3533 Adjust all dependencies.
3534 * src/nullable.c (set_nullable, free_nullable): Rename as...
3535 (nullable_compute, nullable_free): these.
3536 (rule_list_t): Store rule_t *, not rule_number_t.
3537 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3538 pointers, instead of their numbers.
3539 * src/main.c (main): Call nullable_free, and derives_free earlier,
3540 as they were lo longer used.
3541
3542 2002-08-01 Akim Demaille <akim@epita.fr>
3543
3544 * lib/timevar.c (get_time): Include children time.
3545 * src/lalr.h (LA, LArule): Don't export them: used with the
3546 state_t.
3547 * src/lalr.c (LA, LArule): Static.
3548 * src/lalr.h, src/lalr.c (lalr_free): New.
3549 * src/main.c (main): Call it.
3550 * src/tables.c (pack_vector): Check whether loc is >= to the
3551 table_size, not >.
3552 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3553 (tables_generate): do it, since that's also it which allocates
3554 them.
3555 Don't free LA and LArule, main does.
3556
3557 2002-07-31 Akim Demaille <akim@epita.fr>
3558
3559 Separate parser tables computation and output.
3560
3561 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3562 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3563 (yydefgoto, yydefact, high): Move to...
3564 * src/tables.h, src/tables.c: here.
3565 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3566 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3567 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3568 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3569 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3570 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3571 (action_row, save_row, token_actions, save_column, default_goto)
3572 (goto_actions, sort_actions, matching_state, pack_vector)
3573 (table_ninf_remap, pack_table, prepare_actions): Move to...
3574 * src/tables.c: here.
3575 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3576 * src/output.c (token_actions, output_base, output_conflicts)
3577 (output_check): Merge into...
3578 (prepare_actions): this.
3579 (actions_output): Rename as...
3580 (user_actions_output): this.
3581 * src/main.c (main): Call tables_generate and tables_free.
3582
3583 2002-07-31 Akim Demaille <akim@epita.fr>
3584
3585 Steal GCC's --time-report support.
3586
3587 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3588 stolen/adjusted from GCC.
3589 * m4/stage.m4: Remove time related checks.
3590 * m4/timevar.m4: New.
3591 * configure.in: Adjust.
3592 * src/system.h: Adjust to using timevar.h.
3593 * src/getargs.h, src/getargs.c: Support trace_time for
3594 --trace=time.
3595 * src/main.c (stage): Remove.
3596 (main): Replace `stage' invocations with timevar calls.
3597 * src/output.c: Insert pertinent timevar calls.
3598
3599 2002-07-31 Akim Demaille <akim@epita.fr>
3600
3601 Let --trace have arguments.
3602
3603 * src/getargs.h (enum trace_e): New.
3604 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3605 (long_options, short_options): --trace/-T takes an optional
3606 argument.
3607 Change all the uses of trace_flag to reflect the new flags.
3608 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3609
3610 Strengthen `stage' portability.
3611
3612 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3613 * configure.in: Use it.
3614 Don't check for malloc.h and sys/times.h.
3615 * src/system.h: Include them when appropriate.
3616 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3617 times and struct tms are available.
3618
3619 2002-07-30 Akim Demaille <akim@epita.fr>
3620
3621 In verbose parse error message, don't report `error' as an
3622 expected token.
3623 * tests/actions.at (Printers and Destructors): Adjust.
3624 * tests/calc.at (Calculator $1): Adjust.
3625 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3626 error message, do not report the parser accepts the error token in
3627 that state.
3628
3629 2002-07-30 Akim Demaille <akim@epita.fr>
3630
3631 Normalize conflict related messages.
3632
3633 * src/complain.h, src/complain.c (warn, complain): New.
3634 * src/conflicts.c (conflicts_print): Use them.
3635 (conflict_report_yacc): New, extracted from...
3636 (conflicts_print): here.
3637 * tests/conflicts.at, tests/existing.at: Adjust.
3638
3639 2002-07-30 Akim Demaille <akim@epita.fr>
3640
3641 Report rules which are never reduced by the parser: those hidden
3642 by conflicts.
3643
3644 * src/LR0.c (save_reductions): Don't make the final state too
3645 different: save its reduction (accept) instead of having a state
3646 without any action (no shift or goto, no reduce).
3647 Note: the final state is now a ``regular'' state, i.e., the
3648 parsers now contain `reduce 0' as default reduction.
3649 Nevertheless, since they decide to `accept' when yystate =
3650 final_state, they still will not reduce rule 0.
3651 * src/print.c (print_actions, print_reduction): Adjust.
3652 * src/output.c (action_row): Track reduced rules.
3653 (token_actions): Report rules never reduced.
3654 * tests/conflicts.at, tests/regression.at: Adjust.
3655
3656 2002-07-30 Akim Demaille <akim@epita.fr>
3657
3658 `stage' was accidently included in a previous patch.
3659 Initiate its autoconfiscation.
3660
3661 * configure.in: Look for malloc.h and sys/times.h.
3662 * src/main.c (stage): Adjust.
3663 Report only when trace_flag.
3664
3665 2002-07-29 Akim Demaille <akim@epita.fr>
3666
3667 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3668 state_number_t.
3669 (errs_t): symbol_t*, not symbol_number_t.
3670 (reductions_t): rule_t*, not rule_number_t.
3671 (FOR_EACH_SHIFT): New.
3672 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3673 * src/print.c, src/print_graph.c: Adjust.
3674
3675 2002-07-29 Akim Demaille <akim@epita.fr>
3676
3677 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3678
3679 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3680 (endtoken, accept): these.
3681 * src/reader.c (reader): Set endtoken's default tag to "$end".
3682 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3683 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3684 Adjust.
3685
3686 2002-07-29 Akim Demaille <akim@epita.fr>
3687
3688 * src/reduce.c (reduce_grammar): When the language is empty,
3689 complain about the start symbol, not the axiom.
3690 Use its location.
3691 * tests/reduce.at (Empty Language): New.
3692
3693 2002-07-26 Akim Demaille <akim@epita.fr>
3694
3695 * src/reader.h, src/reader.c (gram_error): ... can't get
3696 yycontrol without making too strong assumptions on the parser
3697 itself.
3698 * src/output.c (prepare_tokens): Use the real 0th value of
3699 token_translations instead of `0'.
3700 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3701 visible here.
3702 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3703 for the time being: %locations ought to provide it to yyerror.
3704
3705 2002-07-25 Akim Demaille <akim@epita.fr>
3706
3707 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3708 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3709 * tests/regression.at (Web2c Actions): Adjust.
3710
3711 2002-07-25 Akim Demaille <akim@epita.fr>
3712
3713 Stop storing rules from 1 to nrules + 1.
3714
3715 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3716 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3717 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3718 Iterate from 0 to nrules.
3719 Use rule_number_as_item_number and item_number_as_rule_number.
3720 Adjust to `derive' now containing possibly 0.
3721 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3722 Handle the `- 1' part in rule numbers from/to item numbers.
3723 * src/conflicts.c (log_resolution): Fix the message which reversed
3724 shift and reduce.
3725 * src/output.c (action_row): Initialize default_rule to -1.
3726 (token_actions): Adjust.
3727 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3728 expected output.
3729 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3730
3731 2002-07-25 Akim Demaille <akim@epita.fr>
3732
3733 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3734 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3735 (b4_c_knr_arg_decl): New.
3736 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3737 yyreport_parse_error.
3738
3739 2002-07-25 Akim Demaille <akim@epita.fr>
3740
3741 * data/yacc.c (yyreport_parse_error): New, extracted from...
3742 (yyparse): here.
3743 (yydestruct, yysymprint): Move above yyparse.
3744 Be K&R compliant.
3745
3746 2002-07-25 Akim Demaille <akim@epita.fr>
3747
3748 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3749 replace...
3750 (b4_sint_type, b4_uint_type): these.
3751 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3752 * tests/regression.at (Web2c Actions): Adjust.
3753
3754 2002-07-25 Akim Demaille <akim@epita.fr>
3755
3756 * src/gram.h (TIEM_NUMBER_MAX): New.
3757 (item_number_of_rule_number, rule_number_of_item_number): Rename
3758 as...
3759 (rule_number_as_item_number, item_number_as_rule_number): these.
3760 Adjust dependencies.
3761 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3762 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3763 (symbol_number_to_vector_number): New.
3764 (order): Of vector_number_t* type.
3765 (base_t, BASE_MAX, BASE_MIN): New.
3766 (froms, tos, width, pos, check): Of base_t type.
3767 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3768 (actrow): Of action_number_t type.
3769 (conflrow): Of unsigned int type.
3770 (table_ninf, base_ninf): New.
3771 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3772 (muscle_insert_int_table, muscle_insert_base_table)
3773 (muscle_insert_rule_number_table): New.
3774 (prepare_tokens): Output `toknum' as int_table.
3775 (action_row): Returns a rule_number_t.
3776 Use ACTION_MIN, not SHRT_MIN.
3777 (token_actions): yydefact is rule_number_t*.
3778 (table_ninf_remap): New.
3779 (pack_table): Use it for `base' and `table'.
3780 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3781 replaced with...
3782 (YYPACT_NINF, YYTABLE_NINF): these.
3783 (yypact, yytable): Compute their types instead of hard-coded
3784 `short'.
3785 * tests/regression.at (Web2c Actions): Adjust.
3786
3787 2002-07-19 Akim Demaille <akim@epita.fr>
3788
3789 * src/scan-gram.l (id): Can start with an underscore.
3790
3791 2002-07-16 Akim Demaille <akim@epita.fr>
3792
3793 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3794 Adjust all former `associativity' dependencies.
3795 * src/symtab.c (symbol_new): Default associativity is `undef', not
3796 `right'.
3797 (symbol_check_alias_consistence): Adjust.
3798
3799 2002-07-09 Akim Demaille <akim@epita.fr>
3800
3801 * doc/bison.texinfo: Properly set the ``header'' part.
3802 Use @dircategory ``GNU programming tools'' as per Texinfo's
3803 documentation.
3804 Use @copying.
3805
3806 2002-07-09 Akim Demaille <akim@epita.fr>
3807
3808 * lib/quotearg.h: Protect against multiple inclusions.
3809 * src/location.h (location_t): Add a `file' member.
3810 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3811 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3812 `error_one_per_line' support.
3813
3814 2002-07-09 Akim Demaille <akim@epita.fr>
3815
3816 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3817 * src/reader.c (lineno): Remove.
3818 Adjust all dependencies.
3819 (get_merge_function): Take a location and use complain_at.
3820 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3821 * tests/regression.at (Invalid inputs, Mixing %token styles):
3822 Adjust.
3823
3824 2002-07-09 Akim Demaille <akim@epita.fr>
3825
3826 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3827 recovery rule, and forbid extensions when --yacc.
3828 (gram_error): Use complain_at.
3829 * src/reader.c (reader): Exit if there were parse errors.
3830
3831 2002-07-09 Akim Demaille <akim@epita.fr>
3832
3833 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3834 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3835 Reported by R Blake <blakers@mac.com>.
3836
3837 2002-07-09 Akim Demaille <akim@epita.fr>
3838
3839 * data/yacc.c: Output the copyright notive in the header.
3840
3841 2002-07-03 Akim Demaille <akim@epita.fr>
3842
3843 * src/output.c (froms, tos): Are state_number_t.
3844 (save_column): sp, sp1, and sp2 are state_number_t.
3845 (prepare): Rename `final' as `final_state_number', `nnts' as
3846 `nterms_number', `nrules' as `rules_number', `nstates' as
3847 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3848 unused.
3849 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3850 * data/lalr1.cc (nsym_): Remove, unused.
3851
3852 2002-07-03 Akim Demaille <akim@epita.fr>
3853
3854 * src/lalr.h, src/lalr.c (goto_number_t): New.
3855 * src/lalr.c (goto_list_t): New.
3856 Propagate them.
3857 * src/nullable.c (rule_list_t): New.
3858 Propagate.
3859 * src/types.h: Remove.
3860
3861 2002-07-03 Akim Demaille <akim@epita.fr>
3862
3863 * src/closure.c (print_fderives): Use rule_rhs_print.
3864 * src/derives.c (print_derives): Use rule_rhs_print.
3865 (rule_list_t): New, replaces `shorts'.
3866 (set_derives): Add comments.
3867 * tests/sets.at (Nullable, Firsts): Adjust.
3868
3869 2002-07-03 Akim Demaille <akim@epita.fr>
3870
3871 * src/output.c (prepare_actions): Free `tally' and `width'.
3872 (prepare_actions): Allocate and free `order'.
3873 * src/symtab.c (symbols_free): Free `symbols'.
3874 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3875 * src/output.c (m4_invoke): Move to...
3876 * src/scan-skel.l: here.
3877 (<<EOF>>): Close yyout, and free its name.
3878
3879 2002-07-03 Akim Demaille <akim@epita.fr>
3880
3881 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3882
3883 * src/LR0.c (new_state): Merge into...
3884 (state_list_append): this.
3885 (new_states): Merge into...
3886 (generate_states): here.
3887 (set_states): Don't ensure a proper `errs' state member here, do it...
3888 * src/conflicts.c (conflicts_solve): here.
3889 * src/state.h, src/state.c: Comment changes.
3890 (state_t): Rename member `shifts' as `transitions'.
3891 Adjust all dependencies.
3892 (errs_new): For consistency, also take the values as argument.
3893 (errs_dup): Remove.
3894 (state_errs_set): New.
3895 (state_reductions_set, state_transitions_set): Assert that no
3896 previous value was assigned.
3897 (state_free): New.
3898 (states_free): Use it.
3899 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3900 temporary storage: use `errs' and `nerrs' as elsewhere.
3901 (set_conflicts): Allocate and free this `errs'.
3902
3903 2002-07-02 Akim Demaille <akim@epita.fr>
3904
3905 * lib/libiberty.h: New.
3906 * lib: Update the bitset implementation from upstream.
3907 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3908 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3909 * src/main.c: Adjust bitset stats calls.
3910
3911 2002-07-01 Paul Eggert <eggert@twinsun.com>
3912
3913 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3914 char, so that negative chars don't collide with $.
3915
3916 2002-06-30 Akim Demaille <akim@epita.fr>
3917
3918 Have the GLR tests be `warning' checked, and fix the warnings.
3919
3920 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3921 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3922 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3923 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3924 (yyaddDeferredAction): static.
3925 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3926 (yyreportParseError): yyprefix is const.
3927 yytokenp is used only when verbose.
3928 (yy__GNUC__): Replace with __GNUC__.
3929 (yypdumpstack): yyi is size_t.
3930 (yypreference): Un-yy local variables and arguments, to avoid
3931 clashes with `yyr1'. Anyway, we are not in the user name space.
3932 (yytname_size): be an int, as is compared with ints.
3933 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3934 Use them.
3935 * tests/cxx-gram.at: Use quotation to protect $1.
3936 Use AT_COMPILE to enable warnings hunts.
3937 Prototype yylex and yyerror.
3938 `Use' argc.
3939 Include `string.h', not `strings.h'.
3940 Produce and prototype stmtMerge only when used.
3941 yylex takes a location.
3942
3943 2002-06-30 Akim Demaille <akim@epita.fr>
3944
3945 We spend a lot of time in quotearg, in particular when --verbose.
3946
3947 * src/symtab.c (symbol_get): Store a quoted version of the key.
3948 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3949 Adjust all callers.
3950
3951 2002-06-30 Akim Demaille <akim@epita.fr>
3952
3953 * src/state.h (reductions_t): Rename member `nreds' as num.
3954 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3955 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3956
3957 2002-06-30 Akim Demaille <akim@epita.fr>
3958
3959 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3960 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3961 (shifts_to): Rename as...
3962 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3963 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3964 (TRANSITION_IS_DISABLED, transitions_to): these.
3965
3966 2002-06-30 Akim Demaille <akim@epita.fr>
3967
3968 * src/print.c (print_shifts, print_gotos): Merge into...
3969 (print_transitions): this.
3970 (print_transitions, print_errs, print_reductions): Align the
3971 lookaheads columns.
3972 (print_core, print_transitions, print_errs, print_state,
3973 print_grammar): Output empty lines separator before, not after.
3974 (state_default_rule_compute): Rename as...
3975 (state_default_rule): this.
3976 * tests/conflicts.at (Defaulted Conflicted Reduction),
3977 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3978 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3979
3980 2002-06-30 Akim Demaille <akim@epita.fr>
3981
3982 Display items as we display rules.
3983
3984 * src/gram.h, src/gram.c (rule_lhs_print): New.
3985 * src/gram.c (grammar_rules_partial_print): Use it.
3986 * src/print.c (print_core): Likewise.
3987 * tests/conflicts.at (Defaulted Conflicted Reduction),
3988 (Unresolved SR Conflicts): Adjust.
3989 (Unresolved SR Conflicts): Adjust and rename as...
3990 (Resolved SR Conflicts): this, as was meant.
3991 * tests/regression.at (Web2c Report): Adjust.
3992
3993 2002-06-30 Akim Demaille <akim@epita.fr>
3994
3995 * src/print.c (state_default_rule_compute): New, extracted from...
3996 (print_reductions): here.
3997 Pessimize, but clarify the code.
3998 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3999
4000 2002-06-30 Akim Demaille <akim@epita.fr>
4001
4002 * src/output.c (action_row): Let default_rule be always a rule
4003 number.
4004
4005 2002-06-30 Akim Demaille <akim@epita.fr>
4006
4007 * src/closure.c (print_firsts, print_fderives, closure):
4008 Use BITSET_EXECUTE.
4009 * src/lalr.c (lookaheads_print): Likewise.
4010 * src/state.c (state_rule_lookaheads_print): Likewise.
4011 * src/print_graph.c (print_core): Likewise.
4012 * src/print.c (print_reductions): Likewise.
4013 * src/output.c (action_row): Likewise.
4014 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4015
4016 2002-06-30 Akim Demaille <akim@epita.fr>
4017
4018 * src/print_graph.c: Use report_flag.
4019
4020 2002-06-30 Akim Demaille <akim@epita.fr>
4021
4022 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4023 to...
4024 * src/relation.h, src/relation.c (traverse, relation_digraph)
4025 (relation_print, relation_transpose): New.
4026
4027 2002-06-30 Akim Demaille <akim@epita.fr>
4028
4029 * src/state.h, src/state.c (shifts_to): New.
4030 * src/lalr.c (build_relations): Use it.
4031
4032 2002-06-30 Akim Demaille <akim@epita.fr>
4033
4034 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4035 (item_number_of_rule_number, rule_number_of_item_number): New.
4036 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4037 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4038 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4039 Propagate their use.
4040 Much remains to be done, in particular wrt `shorts' from types.h.
4041
4042 2002-06-30 Akim Demaille <akim@epita.fr>
4043
4044 * src/symtab.c (symbol_new): Initialize the `printer' member.
4045
4046 2002-06-30 Akim Demaille <akim@epita.fr>
4047
4048 * src/LR0.c (save_reductions): Remove, replaced by...
4049 * src/state.h, src/state.c (state_reductions_set): New.
4050 (reductions, errs): Rename as...
4051 (reductions_t, errs_t): these.
4052 Adjust all dependencies.
4053
4054 2002-06-30 Akim Demaille <akim@epita.fr>
4055
4056 * src/LR0.c (state_list_t, state_list_append): New.
4057 (first_state, last_state): Now symbol_list_t.
4058 (this_state): Remove.
4059 (new_itemsets, append_states, save_reductions): Take a state_t as
4060 argument.
4061 (set_states, generate_states): Adjust.
4062 (save_shifts): Remove, replaced by...
4063 * src/state.h, src/state.c (state_shifts_set): New.
4064 (shifts): Rename as...
4065 (shifts_t): this.
4066 Adjust all dependencies.
4067 * src/state.h (state_t): Remove the `next' member.
4068
4069 2002-06-30 Akim Demaille <akim@epita.fr>
4070
4071 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4072 escaped in slot 0.
4073
4074 2002-06-30 Akim Demaille <akim@epita.fr>
4075
4076 Use hash.h for the state hash table.
4077
4078 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4079 (allocate_storage): Use state_hash_new.
4080 (free_storage): Use state_hash_free.
4081 (new_state, get_state): Adjust.
4082 * src/lalr.h, src/lalr.c (states): Move to...
4083 * src/states.h (state_t): Remove the `link' member, no longer
4084 used.
4085 * src/states.h, src/states.c: here.
4086 (state_hash_new, state_hash_free, state_hash_lookup)
4087 (state_hash_insert, states_free): New.
4088 * src/states.c (state_table, state_compare, state_hash): New.
4089 * src/output.c (output_actions): Do not free states now, since we
4090 still need to know the final_state number in `prepare', called
4091 afterwards. Do it...
4092 * src/main.c (main): here: call states_free after `output'.
4093
4094 2002-06-30 Akim Demaille <akim@epita.fr>
4095
4096 * src/state.h, src/state.c (state_new): New, extracted from...
4097 * src/LR0.c (new_state): here.
4098 * src/state.h (STATE_ALLOC): Move to...
4099 * src/state.c: here.
4100 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4101 * src/state.h, src/state.c: here.
4102
4103 2002-06-30 Akim Demaille <akim@epita.fr>
4104
4105 * src/reader.c (gensym): Rename as...
4106 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4107 (getsym): Rename as...
4108 (symbol_get): this.
4109
4110 2002-06-30 Akim Demaille <akim@epita.fr>
4111
4112 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4113 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4114 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4115 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4116
4117 2002-06-30 Akim Demaille <akim@epita.fr>
4118
4119 Make the test suite pass with warnings checked.
4120
4121 * tests/actions.at (Printers and Destructors): Improve.
4122 Avoid unsigned vs. signed issues.
4123 * tests/calc.at: Don't exercise the scanner here, do it...
4124 * tests/input.at (Torturing the Scanner): here.
4125
4126 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4127
4128 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4129 reorganize first lines parallel to yacc.c.
4130
4131 2002-06-28 Akim Demaille <akim@epita.fr>
4132
4133 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4134 (b4_token_enum, b4_token_defines): New, factored from...
4135 * data/lalr1.cc, data/yacc.c, glr.c: here.
4136
4137 2002-06-28 Akim Demaille <akim@epita.fr>
4138
4139 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4140 unused variables.
4141 * src/output.c (merger_output): static.
4142
4143 2002-06-28 Akim Demaille <akim@epita.fr>
4144
4145 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4146 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4147 pacify GCC.
4148 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4149
4150 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4151
4152 Accumulated changelog for new GLR parsing features.
4153
4154 * src/conflicts.c (count_total_conflicts): Change name to
4155 conflicts_total_count.
4156 * src/conflicts.h: Ditto.
4157 * src/output.c (token_actions): Use the new name.
4158 (output_conflicts): Change conflp => conflict_list_heads, and
4159 confl => conflict_list for better readability.
4160 * data/glr.c: Use the new names.
4161 * NEWS: Add self to GLR announcement.
4162
4163 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4164
4165 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4166 Akim Demaille.
4167
4168 * data/bison.glr: Change name to glr.c
4169 * data/glr.c: Renamed from bison.glr.
4170 * data/Makefile.am: Add glr.c
4171
4172 * src/getargs.c:
4173
4174 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4175 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4176
4177 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4178
4179 * data/bison.glr: Be sure to restore the
4180 current #line when returning to the skeleton contents after having
4181 exposed the input file's #line.
4182
4183 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4184
4185 * data/bison.glr: Bring up to date with changes to bison.simple.
4186
4187 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4188
4189 * data/bison.glr: Correct definitions that use b4_prefix.
4190 Various reformatting.
4191 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4192 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4193 yytokenp argument; now part of stack.
4194 (yychar): Define to behave as documented.
4195 (yyclearin): Ditto.
4196
4197 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4198
4199 * src/reader.h: Add declaration for free_merger_functions.
4200
4201 * src/reader.c (merge_functions): New variable.
4202 (get_merge_function): New function.
4203 (free_merger_functions): New function.
4204 (readgram): Check for %prec that is not followed by a symbol.
4205 Handle %dprec and %merge declarations.
4206 (packgram): Initialize dprec and merger fields in rules array.
4207
4208 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4209 conflict_list_cnt, conflict_list_free): New variables.
4210 (table_grow): Also grow conflict_table.
4211 (prepare_rules): Output dprec and merger tables.
4212 (conflict_row): New function.
4213 (action_row): Output conflict lists for GLR parser. Don't use
4214 default reduction in conflicted states for GLR parser so that there
4215 are spaces for the conflict lists.
4216 (save_row): Also save conflict information.
4217 (token_actions): Allocate conflict list.
4218 (merger_output): New function.
4219 (pack_vector): Pack conflict table, too.
4220 (output_conflicts): New function to output yyconflp and yyconfl.
4221 (output_check): Allocate conflict_tos.
4222 (output_actions): Output conflict tables, also.
4223 (output_skeleton): Output b4_mergers definition.
4224 (prepare): Output b4_max_rhs_length definition.
4225 Use 'bison.glr' as default skeleton for GLR parsers.
4226
4227 * src/gram.c (glr_parser): New flag.
4228 (grammar_free): Call free_merger_functions.
4229
4230 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4231 all pairs of conflicting reductions, rather than just all tokens
4232 causing conflicts. Needed to size conflict tables.
4233 (conflicts_output): Modify call to count_rr_conflicts for new
4234 interface.
4235 (conflicts_print): Ditto.
4236 (count_total_conflicts): New function.
4237
4238 * src/reader.h (merger_list): New type.
4239 (merge_functions): New variable.
4240
4241 * src/lex.h (tok_dprec, tok_merge): New token types.
4242
4243 * src/gram.h (rule_s): Add dprec and merger fields.
4244 (glr_parser): New flag.
4245
4246 * src/conflicts.h (count_total_conflicts): New function.
4247
4248 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4249
4250 * doc/bison.texinfo (Generalized LR Parsing): New section.
4251 (GLR Parsers): New section.
4252 (Language and Grammar): Mention GLR parsing.
4253 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4254 Correct typo ("tge" -> "the").
4255
4256 * data/bison.glr: New skeleton for GLR parsing.
4257
4258 * tests/cxx-gram.at: New tests for GLR parsing.
4259
4260 * tests/testsuite.at: Include cxx-gram.at.
4261
4262 * tests/Makefile.am: Add cxx-gram.at.
4263
4264 * src/parse-gram.y:
4265
4266 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4267
4268 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4269
4270 2002-06-27 Akim Demaille <akim@epita.fr>
4271
4272 * src/options.h, src/options.c: Remove.
4273 * src/getargs.c (short_options, long_options): New.
4274
4275 2002-06-27 Akim Demaille <akim@epita.fr>
4276
4277 * data/bison.simple, data/bison.c++: Rename as...
4278 * data/yacc.c, data/lalr1.cc: these.
4279 * doc/bison.texinfo (Environment Variables): Remove.
4280
4281 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4282
4283 * src/getargs.c (report_argmatch): Initialize strtok().
4284
4285 2002-06-20 Akim Demaille <akim@epita.fr>
4286
4287 * data/bison.simple (b4_symbol_actions): New, replaces...
4288 (b4_symbol_destructor, b4_symbol_printer): these.
4289 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4290 user token numbers.
4291
4292 2002-06-20 Akim Demaille <akim@epita.fr>
4293
4294 * data/bison.simple (yydestructor): Rename as...
4295 (yydestruct): this.
4296
4297 2002-06-20 Akim Demaille <akim@epita.fr>
4298
4299 * src/symtab.h, src/symtab.c (symbol_type_set)
4300 (symbol_destructor_set, symbol_precedence_set): The location is
4301 the last argument.
4302 Adjust all callers.
4303
4304 2002-06-20 Akim Demaille <akim@epita.fr>
4305
4306 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4307 internals.
4308 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4309 Takes a location.
4310 * src/symtab.h, src/symtab.c (symbol_class_set)
4311 (symbol_user_token_number_set): Likewise.
4312 Adjust all callers.
4313 Promote complain_at.
4314 * tests/input.at (Type Clashes): Adjust.
4315
4316 2002-06-20 Akim Demaille <akim@epita.fr>
4317
4318 * data/bison.simple (YYLEX): Fix the declaration when
4319 %pure-parser.
4320
4321 2002-06-20 Akim Demaille <akim@epita.fr>
4322
4323 * data/bison.simple (yysymprint): Don't print the token number,
4324 just its name.
4325 * tests/actions.at (Destructors): Rename as...
4326 (Printers and Destructors): this.
4327 Also exercise %printer.
4328
4329 2002-06-20 Akim Demaille <akim@epita.fr>
4330
4331 * data/bison.simple (YYDSYMPRINT): New.
4332 Use it to remove many of the #if YYDEBUG/if (yydebug).
4333
4334 2002-06-20 Akim Demaille <akim@epita.fr>
4335
4336 * src/symtab.h, src/symtab.c (symbol_t): printer and
4337 printer_location are new members.
4338 (symbol_printer_set): New.
4339 * src/parse-gram.y (PERCENT_PRINTER): New token.
4340 Handle its associated rule.
4341 * src/scan-gram.l: Adjust.
4342 (handle_destructor_at, handle_destructor_dollar): Rename as...
4343 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4344 * src/output.c (symbol_printers_output): New.
4345 (output_skeleton): Call it.
4346 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4347 since there are already many grammar files with a user `yyprint'.
4348 Replace the calls to YYPRINT to calls to yysymprint.
4349 * tests/calc.at: Adjust.
4350 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4351 taking advantage of parser very internal details (stack size!).
4352
4353 2002-06-20 Akim Demaille <akim@epita.fr>
4354
4355 * src/scan-gram.l: Complete the scanner with the missing patterns
4356 to pacify Flex.
4357 Use `quote' and `symbol_tag_get' where appropriate.
4358
4359 2002-06-19 Akim Demaille <akim@epita.fr>
4360
4361 * tests/actions.at (Destructors): Augment to test locations.
4362 * data/bison.simple (yydestructor): Pass it the current location
4363 if locations are enabled.
4364 Prototype only when __STDC__ or C++.
4365 Change the argument names to move into the yy name space: there is
4366 user code here.
4367
4368 2002-06-19 Akim Demaille <akim@epita.fr>
4369
4370 * data/bison.simple (b4_pure_if): New.
4371 Use it instead of #ifdef YYPURE.
4372
4373 2002-06-19 Akim Demaille <akim@epita.fr>
4374
4375 * data/bison.simple (b4_location_if): New.
4376 Use it instead of #ifdef YYLSP_NEEDED.
4377
4378 2002-06-19 Akim Demaille <akim@epita.fr>
4379
4380 Prepare @$ in %destructor, but currently don't bind it in the
4381 skeleton, as %location use is not cleaned up yet.
4382
4383 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4384 (handle_action_at): New.
4385 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4386 a braced_code_t and a location as additional arguments.
4387 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4388 unquote one when outputting `b4_dollar_dollar'.
4389 Adjust callers.
4390 * data/bison.simple (b4_eval): Remove.
4391 (b4_symbol_destructor): Adjust.
4392 * tests/input.at (Invalid @n): Adjust.
4393
4394 2002-06-19 Zack Weinberg <zack@codesourcery.com>
4395
4396 * doc/bison.texinfo: Document ability to have multiple
4397 prologue sections.
4398
4399 2002-06-18 Akim Demaille <akim@epita.fr>
4400
4401 * src/files.c (compute_base_names): When computing the output file
4402 names from the input file name, strip the directory part.
4403
4404 2002-06-18 Akim Demaille <akim@epita.fr>
4405
4406 * data/bison.simple.new: Comment changes.
4407 Reported by Andreas Schwab.
4408
4409 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4410
4411 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4412 there are no `label `yyoverflowlab' defined but not used' warnings
4413 when yyoverflow is defined.
4414
4415 2002-06-18 Akim Demaille <akim@epita.fr>
4416
4417 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4418 new member.
4419 (symbol_destructor_set): Adjust.
4420 * src/output.c (symbol_destructors_output): Output the destructor
4421 locations.
4422 Output the symbol name.
4423 * data/bison.simple (b4_symbol_destructor): Adjust.
4424
4425 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4426 and Akim Demaille <akim@epita.fr>
4427
4428 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4429 what's left on the stack when the error recovery hits EOF.
4430 * tests/actions.at (Destructors): Complete to exercise this case.
4431
4432 2002-06-17 Akim Demaille <akim@epita.fr>
4433
4434 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4435 arguments is really empty, not only equal to `[]'.
4436 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4437 member.
4438 (symbol_destructor_set): New.
4439 * src/output.c (symbol_destructors_output): New.
4440 * src/reader.h (brace_code_t, current_braced_code): New.
4441 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4442 (handle_dollar): Rename as...
4443 (handle_action_dollar): this.
4444 (handle_destructor_dollar): New.
4445 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4446 (grammar_declaration): Use it.
4447 * data/bison.simple (yystos): Is always defined.
4448 (yydestructor): New.
4449 * tests/actions.at (Destructors): New.
4450 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4451
4452 2002-06-17 Akim Demaille <akim@epita.fr>
4453
4454 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4455 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4456 rule_length only when needed.
4457 * src/output.c (actions_output, token_definitions_output): Output
4458 the full M4 block.
4459 * src/symtab.c: Don't access directly to the symbol tag, use
4460 symbol_tag_get.
4461 * src/parse-gram.y: Use symbol_list_free.
4462
4463 2002-06-17 Akim Demaille <akim@epita.fr>
4464
4465 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4466 (symbol_list_prepend, get_type_name): Move to...
4467 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4468 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4469 Adjust all callers.
4470 (symbol_list_free): New.
4471 * src/scan-gram.l (handle_dollar): Takes a location.
4472 * tests/input.at (Invalid $n): Adjust.
4473
4474 2002-06-17 Akim Demaille <akim@epita.fr>
4475
4476 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4477 (symbol_list_prepend): New.
4478 * src/parse-gram.y (%union): `list' is a new member.
4479 (symbols.1): New, replaces...
4480 (terms_to_prec.1, nterms_to_type.1): these.
4481 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4482 Take a location as additional argument.
4483 Adjust all callers.
4484
4485 2002-06-15 Akim Demaille <akim@epita.fr>
4486
4487 * src/parse-gram.y: Move %token in the declaration section so that
4488 we don't depend upon CVS Bison.
4489
4490 2002-06-15 Akim Demaille <akim@epita.fr>
4491
4492 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4493 * src/print.c (print_core): Use it.
4494
4495 2002-06-15 Akim Demaille <akim@epita.fr>
4496
4497 * src/conflicts.c (log_resolution): Accept the rule involved in
4498 the sr conflicts instead of the lookahead number that points to
4499 that rule.
4500 (flush_reduce): Accept the current lookahead vector as argument,
4501 instead of the index in LA.
4502 (resolve_sr_conflict): Accept the current number of lookahead
4503 bitset to consider for the STATE, instead of the index in LA.
4504 (set_conflicts): Adjust.
4505 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4506
4507 2002-06-15 Akim Demaille <akim@epita.fr>
4508
4509 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4510 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4511 Adjust all dependencies.
4512 * src/lalr.c (initialize_lookaheads): Split into...
4513 (states_lookaheads_count, states_lookaheads_initialize): these.
4514 (lalr): Adjust.
4515
4516 2002-06-15 Akim Demaille <akim@epita.fr>
4517
4518 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4519 out of...
4520 (grammar_rules_print): here.
4521 * src/reduce.c (reduce_output): Use it.
4522 * tests/reduce.at (Useless Rules, Reduced Automaton)
4523 (Underivable Rules): Adjust.
4524
4525 2002-06-15 Akim Demaille <akim@epita.fr>
4526
4527 Copy BYacc's nice way to report the grammar.
4528
4529 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4530 New.
4531 Don't print the rules' location, it is confusing and useless.
4532 (rule_print): Use grammar_rhs_print.
4533 * src/print.c (print_grammar): Use grammar_rules_print.
4534
4535 2002-06-15 Akim Demaille <akim@epita.fr>
4536
4537 Complete and rationalize `useless thing' warnings.
4538
4539 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4540 (symbol_tag_print): New.
4541 Use them everywhere in place of accessing directly the tag member.
4542 * src/gram.h, src/gram.c (rule_print): New.
4543 Use it where a rule used to be printed `by hand'.
4544 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4545 (reduce_grammar_tables): Report the useless rules.
4546 (reduce_print): Useless things are a warning, not an error.
4547 Report it as such.
4548 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4549 (Reduced Automaton, Underivable Rules): Adjust.
4550 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4551 * tests/conflicts.at (Unresolved SR Conflicts)
4552 (Solved SR Conflicts): Adjust.
4553
4554 2002-06-15 Akim Demaille <akim@epita.fr>
4555
4556 Let symbols have a location.
4557
4558 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4559 (getsym): Adjust.
4560 Adjust all callers.
4561 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4562 Use location_t, not int.
4563 * src/symtab.c (symbol_check_defined): Take advantage of the
4564 location.
4565 * tests/regression.at (Invalid inputs): Adjust.
4566
4567 2002-06-15 Akim Demaille <akim@epita.fr>
4568
4569 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4570 (input): Don't try to initialize yylloc here, do it in the
4571 scanner.
4572 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4573 * src/gram.h (rule_t): Change line and action_line into location
4574 and action_location, of location_t type.
4575 Adjust all dependencies.
4576 * src/location.h, src/location.c (empty_location): New.
4577 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4578 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4579 (grammar_current_rule_symbol_append)
4580 (grammar_current_rule_action_append): Expect a location as argument.
4581 * src/reader.c (grammar_midrule_action): Adjust to attach an
4582 action's location as dummy symbol location.
4583 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4584 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4585 the line numbers.
4586
4587 2002-06-14 Akim Demaille <akim@epita.fr>
4588
4589 Grammar declarations may be found in the grammar section.
4590
4591 * src/parse-gram.y (rules_or_grammar_declaration): New.
4592 (declarations): Each declaration may end with a semicolon, not
4593 just...
4594 (grammar_declaration): `"%union"'.
4595 (grammar): Branch to rules_or_grammar_declaration.
4596
4597 2002-06-14 Akim Demaille <akim@epita.fr>
4598
4599 * src/main.c (main): Invoke scanner_free.
4600
4601 2002-06-14 Akim Demaille <akim@epita.fr>
4602
4603 * src/output.c (m4_invoke): Extracted from...
4604 (output_skeleton): here.
4605 Free tempfile.
4606
4607 2002-06-14 Akim Demaille <akim@epita.fr>
4608
4609 * src/parse-gram.y (directives, directive, gram)
4610 (grammar_directives, precedence_directives, precedence_directive):
4611 Rename as...
4612 (declarations, declaration, grammar, grammar_declaration)
4613 (precedence_declaration, precedence_declarator): these.
4614 (symbol_declaration): New.
4615
4616 2002-06-14 Akim Demaille <akim@epita.fr>
4617
4618 * src/files.c (action_obstack): Remove, unused.
4619 (output_obstack): Remove it, and all its dependencies, as it is no
4620 longer needed.
4621 * src/reader.c (epilogue_set): Build the epilogue in the
4622 muscle_obstack.
4623 * src/output.h, src/output.c (muscle_obstack): Move to...
4624 * src/muscle_tab.h, src/muscle_tab.h: here.
4625 (muscle_init): Initialize muscle_obstack.
4626 (muscle_free): New.
4627 * src/main.c (main): Call it.
4628
4629 2002-06-14 Akim Demaille <akim@epita.fr>
4630
4631 * src/location.h: New, extracted from...
4632 * src/reader.h: here.
4633 * src/Makefile.am (noinst_HEADERS): Merge into
4634 (bison_SOURCES): this.
4635 Add location.h.
4636 * src/parse-gram.y: Use location_t instead of Bison's.
4637 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4638 Use location_t instead of ints.
4639
4640 2002-06-14 Akim Demaille <akim@epita.fr>
4641
4642 * data/bison.simple, data/bison.c++: Be sure to restore the
4643 current #line when returning to the skeleton contents after having
4644 exposed the input file's #line.
4645
4646 2002-06-12 Akim Demaille <akim@epita.fr>
4647
4648 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4649 eager.
4650 * tests/actions.at (Exotic Dollars): New.
4651
4652 2002-06-12 Akim Demaille <akim@epita.fr>
4653
4654 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4655 ['"/] too eagerly.
4656 * tests/input.at (Torturing the Scanner): New.
4657
4658 2002-06-11 Akim Demaille <akim@epita.fr>
4659
4660 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4661 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4662 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4663 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4664 * src/reader.c (reader): Use it.
4665
4666 2002-06-11 Akim Demaille <akim@epita.fr>
4667
4668 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4669 Adjust all callers.
4670 (scanner_last_string_free): New.
4671
4672 2002-06-11 Akim Demaille <akim@epita.fr>
4673
4674 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4675 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4676 (last_string, YY_OBS_FREE): New.
4677 Use them when returning an ID.
4678
4679 2002-06-11 Akim Demaille <akim@epita.fr>
4680
4681 Have Bison grammars parsed by a Bison grammar.
4682
4683 * src/reader.c, src/reader.h (prologue_augment): New.
4684 * src/reader.c (copy_definition): Remove.
4685
4686 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4687 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4688 (grammar_current_rule_prec_set, grammar_current_rule_check)
4689 (grammar_current_rule_symbol_append)
4690 (grammar_current_rule_action_append): Export.
4691 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4692 (symbol_list_action_append): Remove.
4693 Hook the routines from reader.
4694 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4695 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4696
4697 * src/reader.c (read_declarations): Remove, unused.
4698
4699 * src/parse-gram.y: Handle the epilogue.
4700 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4701 (grammar_start_symbol_set): this.
4702 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4703 * src/reader.c (readgram): Remove, unused.
4704 (reader): Adjust to insert eoftoken and axiom where appropriate.
4705
4706 * src/reader.c (copy_dollar): Replace with...
4707 * src/scan-gram.h (handle_dollar): this.
4708 * src/parse-gram.y: Remove `%thong'.
4709
4710 * src/reader.c (copy_at): Replace with...
4711 * src/scan-gram.h (handle_at): this.
4712
4713 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4714 New.
4715
4716 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4717 time being.
4718
4719 * src/reader.h, src/reader.c (grammar_rule_end): New.
4720
4721 * src/parse.y (current_type, current_class): New.
4722 Implement `%nterm', `%token' support.
4723 Merge `%term' into `%token'.
4724 (string_as_id): New.
4725 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4726 type name.
4727
4728 * src/parse-gram.y: Be sure to handle properly the beginning of
4729 rules.
4730
4731 * src/parse-gram.y: Handle %type.
4732 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4733
4734 * src/parse-gram.y: More directives support.
4735 * src/options.c: No longer handle source directives.
4736
4737 * src/parse-gram.y: Fix %output.
4738
4739 * src/parse-gram.y: Handle %union.
4740 Use the prologue locations.
4741 * src/reader.c (parse_union_decl): Remove.
4742
4743 * src/reader.h, src/reader.c (epilogue_set): New.
4744 * src/parse-gram.y: Use it.
4745
4746 * data/bison.simple, data/bison.c++: b4_stype is now either not
4747 defined, then default to int, or to the contents of %union,
4748 without `union' itself.
4749 Adjust.
4750 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4751
4752 * src/output.c (actions_output): Don't output braces, as they are
4753 already handled by the scanner.
4754
4755 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4756 characters to themselves.
4757
4758 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4759 that the epilogue has a proper #line.
4760
4761 * src/parse-gram.y: Handle precedence/associativity.
4762
4763 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4764 a terminal.
4765 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4766 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4767 at all to define terminals that cannot be emitted.
4768
4769 * src/scan-gram.l: Escape M4 characters.
4770
4771 * src/scan-gram.l: Working properly with escapes in user
4772 strings/characters.
4773
4774 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4775 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4776 grammar.
4777 Use more modest sizes, as for the time being the parser does not
4778 release memory, and therefore the process swallows a huge amount
4779 of memory.
4780
4781 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4782 stricter %token grammar.
4783
4784 * src/symtab.h (associativity): Add `undef_assoc'.
4785 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4786 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4787
4788 * tests/regression.at (Invalid %directive): Remove, as it is now
4789 meaningless.
4790 (Invalid inputs): Adjust to the new error messages.
4791 (Token definitions): The new grammar doesn't allow too many
4792 eccentricities.
4793
4794 * src/lex.h, src/lex.c: Remove.
4795 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4796 (copy_character, copy_string2, copy_string, copy_identifier)
4797 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4798 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4799 (parse_action): Remove.
4800 * po/POTFILES.in: Adjust.
4801
4802 2002-06-11 Akim Demaille <akim@epita.fr>
4803
4804 * src/reader.c (parse_action): Don't store directly into the
4805 rule's action member: return the action as a string.
4806 Don't require `rule_length' as an argument: compute it.
4807 (grammar_current_rule_symbol_append)
4808 (grammar_current_rule_action_append): New, eved out from
4809 (readgram): here.
4810 Remove `action_flag', `rulelength', unused now.
4811
4812 2002-06-11 Akim Demaille <akim@epita.fr>
4813
4814 * src/reader.c (grammar_current_rule_prec_set).
4815 (grammar_current_rule_check): New, eved out from...
4816 (readgram): here.
4817 Remove `xaction', `first_rhs': useless.
4818 * tests/input.at (Type clashes): New.
4819 * tests/existing.at (GNU Cim Grammar): Adjust.
4820
4821 2002-06-11 Akim Demaille <akim@epita.fr>
4822
4823 * src/reader.c (grammar_midrule_action): New, Eved out from
4824 (readgram): here.
4825
4826 2002-06-11 Akim Demaille <akim@epita.fr>
4827
4828 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4829 New.
4830 (readgram): Use them as replacement of inlined code, crule and
4831 crule1.
4832
4833 2002-06-11 Akim Demaille <akim@epita.fr>
4834
4835 * src/reader.c (grammar_end, grammar_symbol_append): New.
4836 (readgram): Use them.
4837 Make the use of `p' as local as possible.
4838
4839 2002-06-10 Akim Demaille <akim@epita.fr>
4840
4841 GCJ's parser requires the tokens to be defined before the prologue.
4842
4843 * data/bison.simple: Output the token definition before the user's
4844 prologue.
4845 * tests/regression.at (Braces parsing, Duplicate string)
4846 (Mixing %token styles): Check the output from bison.
4847 (Early token definitions): New.
4848
4849 2002-06-10 Akim Demaille <akim@epita.fr>
4850
4851 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4852 assigning twice the same user number to a token, so that we can
4853 use it in...
4854 * src/lex.c (lex): here.
4855 Also use `symbol_class_set' instead of hand written code.
4856 * src/reader.c (parse_assoc_decl): Likewise.
4857
4858 2002-06-10 Akim Demaille <akim@epita.fr>
4859
4860 * src/symtab.c, src/symtab.c (symbol_class_set)
4861 (symbol_user_token_number_set): New.
4862 * src/reader.c (parse_token_decl): Use them.
4863 Use a switch instead of ifs.
4864 Use a single argument.
4865
4866 2002-06-10 Akim Demaille <akim@epita.fr>
4867
4868 Remove `%thong' support as it is undocumented, unused, duplicates
4869 `%token's job, and creates useless e-mail traffic with people who
4870 want to know what it is, why it is undocumented, unused, and
4871 duplicates `%token's job.
4872
4873 * src/reader.c (parse_thong_decl): Remove.
4874 * src/options.c (option_table): Remove "thong".
4875 * src/lex.h (tok_thong): Remove.
4876
4877 2002-06-10 Akim Demaille <akim@epita.fr>
4878
4879 * src/symtab.c, src/symtab.c (symbol_type_set)
4880 (symbol_precedence_set): New.
4881 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4882 (value_components_used): Remove, unused.
4883
4884 2002-06-09 Akim Demaille <akim@epita.fr>
4885
4886 Move symbols handling code out of the reader.
4887
4888 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4889 (axiom): Move to...
4890 * src/symtab.h, src/symtab.c: here.
4891
4892 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4893 * src/reader.c (startval): Rename as...
4894 * src/symtab.h, src/symtab.c (startsymbol): this.
4895 * src/reader.c: Adjust.
4896
4897 * src/reader.c (symbol_check_defined, symbol_make_alias)
4898 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4899 (token_translations_init)
4900 Move to...
4901 * src/symtab.c: here.
4902 * src/reader.c (packsymbols): Move to...
4903 * src/symtab.h, src/symtab.c (symbols_pack): here.
4904 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4905 argument.
4906
4907 2002-06-03 Akim Demaille <akim@epita.fr>
4908
4909 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4910 then statements.
4911
4912 2002-06-03 Akim Demaille <akim@epita.fr>
4913
4914 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4915 structs with non literals.
4916 * src/scan-skel.l: never-interactive.
4917 * src/conflicts.c (enum conflict_resolution_e): No trailing
4918 comma.
4919 * src/getargs.c (usage): Split long literal strings.
4920 Reported by Hans Aberg.
4921
4922 2002-05-28 Akim Demaille <akim@epita.fr>
4923
4924 * data/bison.c++: Use C++ ostreams.
4925 (cdebug_): New member.
4926
4927 2002-05-28 Akim Demaille <akim@epita.fr>
4928
4929 * src/output.c (output_skeleton): Be sure to allocate enough room
4930 for `/' _and_ for `\0' in full_skeleton.
4931
4932 2002-05-28 Akim Demaille <akim@epita.fr>
4933
4934 * data/bison.c++: Catch up with bison.simple:
4935 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4936 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4937 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4938 and popping traces.
4939
4940 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4941
4942 * src/output.c (output_skeleton): Put an explicit path in front of
4943 the skeleton file name, rather than relying on the -I directory,
4944 to partially alleviate effects of having a skeleton file lying around
4945 in the current directory.
4946
4947 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4948
4949 * src/conflicts.c (log_resolution): Correct typo:
4950 obstack_printf should be obstack_fgrow1.
4951
4952 2002-05-26 Akim Demaille <akim@epita.fr>
4953
4954 * src/state.h (state_t): `solved_conflicts' is a new member.
4955 * src/LR0.c (new_state): Set it to 0.
4956 * src/conflicts.h, src/conflicts.c (print_conflicts)
4957 (free_conflicts, solve_conflicts): Rename as...
4958 (conflicts_print, conflicts_free, conflicts_solve): these.
4959 Adjust callers.
4960 * src/conflicts.c (enum conflict_resolution_e)
4961 (solved_conflicts_obstack): New, used by...
4962 (log_resolution): this.
4963 Adjust to attach the conflict resolution to each state.
4964 Complete the description with the precedence/associativity
4965 information.
4966 (resolve_sr_conflict): Adjust.
4967 * src/print.c (print_state): Output its solved_conflicts.
4968 * tests/conflicts.at (Unresolved SR Conflicts)
4969 (Solved SR Conflicts): Exercise --report=all.
4970
4971 2002-05-26 Akim Demaille <akim@epita.fr>
4972
4973 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4974 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4975 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4976 (token_number_t, item_number_as_token_number)
4977 (token_number_as_item_number, muscle_insert_token_number_table):
4978 Rename as...
4979 (symbol_number_t, item_number_as_symbol_number)
4980 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4981 these, since it is more appropriate.
4982
4983 2002-05-26 Akim Demaille <akim@epita.fr>
4984
4985 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4986 `Error:' lines.
4987 * data/bison.simple (yystos) [YYDEBUG]: New.
4988 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4989 error recovery.
4990 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4991
4992 2002-05-25 Akim Demaille <akim@epita.fr>
4993
4994 * doc/bison.texinfo (Debugging): Split into...
4995 (Tracing): this new section, its former contents, and...
4996 (Understanding): this new section.
4997 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4998 by...
4999 (report_flag): this.
5000 Adjust all dependencies.
5001 (report_args, report_types, report_argmatch): New.
5002 (usage, getargs): Report/support -r, --report.
5003 * src/options.h
5004 (struct option_table_struct): Rename as..,
5005 (struct option_table_s): this.
5006 Rename the `set_flag' member to `flag' to match with getopt_long's
5007 struct.
5008 * src/options.c (option_table): Split verbose into an entry for
5009 %verbose, and another for --verbose.
5010 Support --report/-r, so remove -r from the obsolete --raw.
5011 * src/print.c: Attach full item sets and lookaheads reports to
5012 report_flag instead of trace_flag.
5013 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5014
5015 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5016 and Paul Eggert <eggert@twinsun.com>
5017
5018 * data/bison.simple (yyparse): Correct error handling to conform to
5019 POSIX and yacc. Specifically, after syntax error is discovered,
5020 do not reduce further before shifting the error token.
5021 Clean up the code a bit by removing the labels yyerrdefault,
5022 yyerrhandle, yyerrpop.
5023 * NEWS: Document the above.
5024
5025 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5026
5027 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5028 type; it isn't always big enough, since it doesn't necessarily
5029 include non-terminals.
5030 (yytranslate): Expand definition of yy_token_number_type, so that
5031 the latter can be removed.
5032 (yy_token_number_type): Remove, only one use.
5033 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5034 don't use TokenNumberType as element type.
5035
5036 * tests/regression.at: Modify expected output to agree with change
5037 to yyr1 and yytranslate.
5038
5039 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5040
5041 * src/reader.c (parse_action): Use copy_character instead of
5042 obstack_1grow.
5043
5044 2002-05-13 Akim Demaille <akim@epita.fr>
5045
5046 * tests/regression.at (Token definitions): Prototype yylex and
5047 yyerror.
5048
5049 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5050
5051 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5052 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5053 32-bit arithmetic.
5054 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5055
5056 2002-05-07 Akim Demaille <akim@epita.fr>
5057
5058 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5059 avoid GCC warnings.
5060
5061 2002-05-07 Akim Demaille <akim@epita.fr>
5062
5063 Kill GCC warnings.
5064
5065 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5066 over the RHS of each rule.
5067 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5068 * src/state.h (state_t): Member `nitems' is unsigned short.
5069 * src/LR0.c (get_state): Adjust.
5070 * src/reader.c (packgram): Likewise.
5071 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5072 `Type'.
5073 (muscle_insert_int_table): Remove, unused.
5074 (prepare_rules): Remove `max'.
5075
5076 2002-05-06 Akim Demaille <akim@epita.fr>
5077
5078 * src/closure.c (print_firsts): Display of the symbol tags.
5079 (bitmatrix_print): Move to...
5080 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5081 here.
5082 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5083
5084 2002-05-06 Akim Demaille <akim@epita.fr>
5085
5086 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5087 hash_do_for_each.
5088
5089 2002-05-06 Akim Demaille <akim@epita.fr>
5090
5091 * src/LR0.c (new_state, get_state): Instead of using the global
5092 `kernel_size' and `kernel_base', have two new arguments:
5093 `core_size' and `core'.
5094 Adjust callers.
5095
5096 2002-05-06 Akim Demaille <akim@epita.fr>
5097
5098 * src/reader.c (packgram): No longer end `ritem' with a 0
5099 sentinel: it is not used.
5100
5101 2002-05-05 Akim Demaille <akim@epita.fr>
5102
5103 New experimental feature: display the lookaheads in the report and
5104 graph.
5105
5106 * src/print (print_core): When --trace-flag, display the rules
5107 lookaheads.
5108 * src/print_graph.c (print_core): Likewise.
5109 Swap the arguments.
5110 Adjust caller.
5111
5112 2002-05-05 Akim Demaille <akim@epita.fr>
5113
5114 * tests/torture.at (Many lookaheads): New test.
5115
5116 2002-05-05 Akim Demaille <akim@epita.fr>
5117
5118 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5119 (GENERATE_MUSCLE_INSERT_TABLE): this.
5120 (output_int_table, output_unsigned_int_table, output_short_table)
5121 (output_token_number_table, output_item_number_table): Replace with...
5122 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5123 (muscle_insert_short_table, muscle_insert_token_number_table)
5124 (muscle_insert_item_number_table): these.
5125 Adjust all callers.
5126 (prepare_tokens): Don't free `translations', since...
5127 * src/reader.h, src/reader.c (grammar_free): do it.
5128 Move to...
5129 * src/gram.h, src/gram.c (grammar_free): here.
5130 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5131 b4_translate_max.
5132
5133 2002-05-05 Akim Demaille <akim@epita.fr>
5134
5135 * src/output.c (output_unsigned_int_table): New.
5136 (prepare_rules): `i' is unsigned.
5137 `prhs', `rline', `r2' are unsigned int.
5138 Rename muscle `rhs_number_max' as `rhs_max'.
5139 Output muscles `prhs_max', `rline_max', and `r2_max'.
5140 Free rline and r1.
5141 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5142 to compute types instead of constant types.
5143 * tests/regression.at (Web2c Actions): Adjust.
5144
5145 2002-05-04 Akim Demaille <akim@epita.fr>
5146
5147 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5148 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5149 Adjust dependencies.
5150 * src/output.c (token_definitions_output): Be sure not to output a
5151 `#define 'a'' when fed with `%token 'a' "a"'.
5152 * tests/regression.at (Token definitions): New.
5153
5154 2002-05-03 Paul Eggert <eggert@twinsun.com>
5155
5156 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5157 for K&R C.
5158
5159 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5160
5161 * Makefile.am (SUBDIRS): Remove intl.
5162 (EXTRA_DIST): Add config/config.rpath.
5163
5164 2002-05-03 Akim Demaille <akim@epita.fr>
5165
5166 * data/bison.simple (m4_if): Don't output empty enums.
5167 And actually, output valid enum definitions :(.
5168
5169 2002-05-03 Akim Demaille <akim@epita.fr>
5170
5171 * configure.bat: Remove, completely obsolete.
5172 * Makefile.am (EXTRA_DIST): Adjust.
5173 Don't distribute config.rpath...
5174 * config/Makefile.am (EXTRA_DIST): Do it.
5175
5176 2002-05-03 Akim Demaille <akim@epita.fr>
5177
5178 * configure.in (GETTEXT_VERSION): New.
5179 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5180
5181 2002-05-03 Akim Demaille <akim@epita.fr>
5182
5183 * data/bison.simple (b4_token_enum): New.
5184 (b4_token_defines): Use it to output tokens both as #define and
5185 enums.
5186 Suggested by Paul Eggert.
5187 * src/output.c (token_definitions_output): Don't output spurious
5188 white spaces.
5189
5190 2002-05-03 Akim Demaille <akim@epita.fr>
5191
5192 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5193
5194 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5195
5196 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5197 Update the stack class, give a try to deque as the default container.
5198
5199 2002-05-02 Akim Demaille <akim@epita.fr>
5200
5201 * data/bison.simple (yyparse): Do not implement @$ = @1.
5202 (YYLLOC_DEFAULT): Adjust to do it.
5203 * doc/bison.texinfo (Location Default Action): Fix.
5204
5205 2002-05-02 Akim Demaille <akim@epita.fr>
5206
5207 * src/reader.c (parse_braces): Merge into...
5208 (parse_action): this.
5209
5210 2002-05-02 Akim Demaille <akim@epita.fr>
5211
5212 * configure.in (ALL_LINGUAS): Remove.
5213 * po/LINGUAS, hr.po: New.
5214
5215 2002-05-02 Akim Demaille <akim@epita.fr>
5216
5217 Remove the so called hairy (semantic) parsers.
5218
5219 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5220 * src/gram.h, src/gram.c (semantic_parser): Remove.
5221 (rule_t): Remove the guard and guard_line members.
5222 * src/lex.h (token_t): remove tok_guard.
5223 * src/options.c (option_table): Remove %guard and %semantic_parser
5224 support.
5225 * src/output.c, src/output.h (guards_output): Remove.
5226 (prepare): Adjust.
5227 (token_definitions_output): Don't output the `T'
5228 tokens (???).
5229 (output_skeleton): Don't output the guards.
5230 * src/files.c, src/files.c (attrsfile): Remove.
5231 * src/reader.c (symbol_list): Remove the guard and guard_line
5232 members.
5233 Adjust dependencies.
5234 (parse_guard): Remove.
5235 * data/bison.hairy: Remove.
5236 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5237 BISON_HAIRY.
5238
5239 2002-05-02 Akim Demaille <akim@epita.fr>
5240
5241 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5242 (parse_guard): Rename the formal argument `stack_offset' as
5243 `rule_length', which is more readable.
5244 Adjust callers.
5245 (copy_at, copy_dollar): Instead of outputting the hard coded
5246 values of $$, $n and so forth, output invocation to b4_lhs_value,
5247 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5248 Note: this patch partially drops `semantic-parser' support: it
5249 always does `rule_length - n', where semantic parsers ought to
5250 always use `-n'.
5251 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5252 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5253
5254 2002-05-02 Akim Demaille <akim@epita.fr>
5255
5256 * configure.in (AC_INIT): Bump to 1.49b.
5257 (AM_INIT_AUTOMAKE): Short invocation.
5258
5259 2002-05-02 Akim Demaille <akim@epita.fr>
5260
5261 Version 1.49a.
5262
5263 2002-05-01 Akim Demaille <akim@epita.fr>
5264
5265 * src/skeleton.h: Remove.
5266
5267 2002-05-01 Akim Demaille <akim@epita.fr>
5268
5269 * src/skeleton.h: Fix the #endif.
5270 Reported by Magnus Fromreide.
5271
5272 2002-04-26 Paul Eggert <eggert@twinsun.com>
5273
5274 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5275 Define if we define YYSTYPE and YYLTYPE, respectively.
5276 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5277
5278 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5279
5280 * src/scan-skel.l: Postprocess quadrigraphs.
5281
5282 * src/reader.c (copy_character): New function, used to output
5283 single characters while replacing `[' and `]' with quadrigraphs, to
5284 avoid troubles with M4 quotes.
5285 (copy_comment): Output characters with copy_character.
5286 (read_additionnal_code): Likewise.
5287 (copy_string2): Likewise.
5288 (copy_definition): Likewise.
5289
5290 * tests/calc.at: Exercise M4 quoting.
5291
5292 2002-04-25 Akim Demaille <akim@epita.fr>
5293
5294 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5295 between `!' and the command.
5296 Reported by Paul Eggert.
5297
5298 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5299
5300 * tests/calc.at: Exercise prologue splitting.
5301
5302 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5303 `b4_post_prologue' instead of `b4_prologue'.
5304
5305 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5306 muscles.
5307 (output): Free pre_prologue_obstack and post_prologue_obstack.
5308 * src/files.h, src/files.c (attrs_obstack): Remove.
5309 (pre_prologue_obstack, post_prologue_obstack): New.
5310 * src/reader.c (copy_definition): Add a parameter to specify the
5311 obstack to fill, instead of using attrs_obstack unconditionally.
5312 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5313 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5314
5315 2002-04-23 Paul Eggert <eggert@twinsun.com>
5316
5317 * data/bison.simple: Remove unnecessary commentary and white
5318 space differences from 1_29-branch.
5319 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5320
5321 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5322 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5323 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5324 constructors or destructors.
5325
5326 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5327
5328 2002-04-23 Akim Demaille <akim@epita.fr>
5329
5330 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5331 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5332 location with columns.
5333 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5334 All reported by Paul Eggert.
5335
5336 2002-04-22 Akim Demaille <akim@epita.fr>
5337
5338 * src/reduce.c (dump_grammar): Move to...
5339 * src/gram.h, src/gram.c (grammar_dump): here.
5340 Be sure to separate long item numbers.
5341 Don't read the members of a rule's prec if its nil.
5342
5343 2002-04-22 Akim Demaille <akim@epita.fr>
5344
5345 * src/output.c (table_size, table_grow): New.
5346 (MAXTABLE): Remove, replace uses with table_size.
5347 (pack_vector): Instead of dying when the table is too big, grow it.
5348
5349 2002-04-22 Akim Demaille <akim@epita.fr>
5350
5351 * data/bison.simple (yyr1): Its type is that of a token number.
5352 * data/bison.c++ (r1_): Likewise.
5353 * tests/regression.at (Web2c Actions): Adjust.
5354
5355 2002-04-22 Akim Demaille <akim@epita.fr>
5356
5357 * src/reader.c (token_translations_init): 256 is now the default
5358 value for the error token, i.e., it will be assigned another
5359 number if the user assigned 256 to one of her tokens.
5360 (reader): Don't force 256 to error.
5361 * doc/bison.texinfo (Symbols): Adjust.
5362 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5363 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5364 etc. instead of 10, 20, 30 (which was used to `jump' over error
5365 (256) and undefined (2)).
5366
5367 2002-04-22 Akim Demaille <akim@epita.fr>
5368
5369 Propagate more token_number_t.
5370
5371 * src/gram.h (token_number_as_item_number)
5372 (item_number_as_token_number): New.
5373 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5374 Use it to create output_item_number_table and
5375 output_token_number_table.
5376 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5377 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5378 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5379 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5380
5381 2002-04-22 Akim Demaille <akim@epita.fr>
5382
5383 * src/output.h, src/output.c (get_lines_number): Remove.
5384
5385 2002-04-19 Akim Demaille <akim@epita.fr>
5386
5387 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5388 as Lex/Flex'.
5389 (Debugging): More details about enabling the debugging features.
5390 (Table of Symbols): Describe $$, $n, @$, and @n.
5391 Suggested by Tim Josling.
5392
5393 2002-04-19 Akim Demaille <akim@epita.fr>
5394
5395 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5396
5397 2002-04-10 Akim Demaille <akim@epita.fr>
5398
5399 * src/system.h: Rely on HAVE_LIMITS_H.
5400 Suggested by Paul Eggert.
5401
5402 2002-04-09 Akim Demaille <akim@epita.fr>
5403
5404 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5405 full stderr, and strip it according to the bison options, instead
5406 of composing the error message from different bits.
5407 This makes it easier to check for several error messages.
5408 Adjust all the invocations.
5409 Add an invocation exercising the error token.
5410 Add an invocation demonstrating a stupid error message.
5411 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5412 Adjust the tests.
5413 Error message are for stderr, not stdout.
5414
5415 2002-04-09 Akim Demaille <akim@epita.fr>
5416
5417 * src/gram.h, src/gram.c (error_token_number): Remove, use
5418 errtoken->number.
5419 * src/reader.c (reader): Don't specify the user token number (2)
5420 for $undefined, as it uselessly prevents using it.
5421 * src/gram.h (token_number_t): Move to...
5422 * src/symtab.h: here.
5423 (state_t.number): Is a token_number_t.
5424 * src/print.c, src/reader.c: Use undeftoken->number instead of
5425 hard coded 2.
5426 (Even though this 2 is not the same as above: the number of the
5427 undeftoken remains being 2, it is its user token number which
5428 might not be 2).
5429 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5430 `user_token_number_max'.
5431 Output `undef_token_number'.
5432 * data/bison.simple, data/bison.c++: Use them.
5433 Be sure to map invalid yylex return values to
5434 `undef_token_number'. This saves us from gratuitous SEGV.
5435
5436 * tests/conflicts.at (Solved SR Conflicts)
5437 (Unresolved SR Conflicts): Adjust.
5438 * tests/regression.at (Web2c Actions): Adjust.
5439
5440 2002-04-08 Akim Demaille <akim@epita.fr>
5441
5442 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5443 Adding #line.
5444 Remove the duplicate `typedefs'.
5445 (RhsNumberType): Fix the declaration and various other typos.
5446 Use __ofile__.
5447 * data/bison.simple: Use __ofile__.
5448 * src/scan-skel.l: Handle __ofile__.
5449
5450 2002-04-08 Akim Demaille <akim@epita.fr>
5451
5452 * src/gram.h (item_number_t): New, the type of item numbers in
5453 RITEM. Note that it must be able to code symbol numbers as
5454 positive number, and the negation of rule numbers as negative
5455 numbers.
5456 Adjust all dependencies (pretty many).
5457 * src/reduce.c (rule): Remove this `short *' pointer: use
5458 item_number_t.
5459 * src/system.h (MINSHORT, MAXSHORT): Remove.
5460 Include `limits.h'.
5461 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5462 (shortcpy): Remove.
5463 (MAXTABLE): Move to...
5464 * src/output.c (MAXTABLE): here.
5465 (prepare_rules): Use output_int_table to output rhs.
5466 * data/bison.simple, data/bison.c++: Adjust.
5467 * tests/torture.at (Big triangle): Move the limit from 254 to
5468 500.
5469 * tests/regression.at (Web2c Actions): Ajust.
5470
5471 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5472 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5473 passes, but produces negative #line number, once fixed, GCC is
5474 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5475 C), it passes.
5476 * src/state.h (state_h): Code input lines on ints, not shorts.
5477
5478 2002-04-08 Akim Demaille <akim@epita.fr>
5479
5480 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5481 and then the grammar.
5482
5483 2002-04-08 Akim Demaille <akim@epita.fr>
5484
5485 * src/system.h: No longer using strndup.
5486
5487 2002-04-07 Akim Demaille <akim@epita.fr>
5488
5489 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5490 * src/output.c (output_table_data): Return the longest number.
5491 (prepare_tokens): Output `token_number_max').
5492 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5493 New.
5494 Use them to define yy_token_number_type/TokenNumberType.
5495 Use this type for yytranslate.
5496 * tests/torture.at (Big triangle): Push the limit from 124 to
5497 253.
5498 * tests/regression.at (Web2c Actions): Adjust.
5499
5500 2002-04-07 Akim Demaille <akim@epita.fr>
5501
5502 * tests/torture.at (Big triangle): New.
5503 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5504 * tests/existing.at: here.
5505
5506 2002-04-07 Akim Demaille <akim@epita.fr>
5507
5508 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5509 nritems.
5510 Adjust dependencies.
5511
5512 2002-04-07 Akim Demaille <akim@epita.fr>
5513
5514 * src/reader.c: Normalize increments to prefix form.
5515
5516 2002-04-07 Akim Demaille <akim@epita.fr>
5517
5518 * src/reader.c, symtab.c: Remove debugging code.
5519
5520 2002-04-07 Akim Demaille <akim@epita.fr>
5521
5522 Rename all the `bucket's as `symbol_t'.
5523
5524 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5525 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5526 * src/symtab.c, src/symtab.h (bucket): Rename as...
5527 (symbol_t): this.
5528 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5529 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5530 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5531 (buckets_new, buckets_free, buckets_do): Rename as...
5532 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5533 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5534 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5535 (symbols_new, symbols_free, symbols_do): these.
5536
5537 2002-04-07 Akim Demaille <akim@epita.fr>
5538
5539 Use lib/hash for the symbol table.
5540
5541 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5542 EOF.
5543 * src/lex.c (lex): Set the `number' member of new terminals.
5544 * src/reader.c (bucket_check_defined, bucket_make_alias)
5545 (bucket_check_alias_consistence, bucket_translation): New.
5546 (reader, grammar_free, readgram, token_translations_init)
5547 (packsymbols): Adjust.
5548 (reader): Number the predefined tokens.
5549 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5550 for predefined tokens.
5551 * src/symtab.h (bucket): Remove all the hash table related
5552 members.
5553 * src/symtab.c (symtab): Replace by...
5554 (bucket_table): this.
5555 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5556 (buckets_new, buckets_do): New.
5557
5558 2002-04-07 Akim Demaille <akim@epita.fr>
5559
5560 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5561 (start_symbol, max_user_token_number, semantic_parser)
5562 (error_token_number): Initialize.
5563 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5564 Initialize.
5565 (reader): Don't.
5566 (errtoken, eoftoken, undeftoken, axiom): Extern.
5567
5568 2002-04-07 Akim Demaille <akim@epita.fr>
5569
5570 * src/gram.h (rule_s): prec and precsym are now pointers
5571 to the bucket giving the priority/associativity.
5572 Member `associativity' removed: useless.
5573 * src/reduce.c, src/conflicts.c: Adjust.
5574
5575 2002-04-07 Akim Demaille <akim@epita.fr>
5576
5577 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5578 Properly escape the symbols' TAG when outputting them.
5579
5580 2002-04-07 Akim Demaille <akim@epita.fr>
5581
5582 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5583
5584 2002-04-07 Akim Demaille <akim@epita.fr>
5585
5586 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5587 (LArule): this, which is an array to rule_t*.
5588 * src/print.c, src/conflicts.c: Adjust.
5589
5590 2002-04-07 Akim Demaille <akim@epita.fr>
5591
5592 * src/gram.h (rule_t): Rename `number' as `user_number'.
5593 `number' is a new member.
5594 Adjust dependencies.
5595 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5596
5597 2002-04-07 Akim Demaille <akim@epita.fr>
5598
5599 As a result of the previous patch, it is no longer needed
5600 to reorder ritem itself.
5601
5602 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5603
5604 2002-04-07 Akim Demaille <akim@epita.fr>
5605
5606 Be sure never to walk through RITEMS, but use only data related to
5607 the rules themselves. RITEMS should be banished.
5608
5609 * src/output.c (output_token_translations): Rename as...
5610 (prepare_tokens): this.
5611 In addition to `translate', prepare the muscles `tname' and
5612 `toknum', which were handled by...
5613 (output_rule_data): this.
5614 Remove, and move the remainder of its outputs into...
5615 (prepare_rules): this new routines, which also merges content from
5616 (output_gram): this.
5617 (prepare_rules): Be sure never to walk through RITEMS.
5618 (output_stos): Rename as...
5619 (prepare_stos): this.
5620 (output): Always invoke prepare_states, after all, just don't use it
5621 in the output if you don't need it.
5622
5623 2002-04-07 Akim Demaille <akim@epita.fr>
5624
5625 * src/LR0.c (new_state): Display `nstates' as the name of the
5626 newly created state.
5627 Adjust to initialize first_state and last_state if needed.
5628 Be sure to distinguish the initial from the final state.
5629 (new_states): Create the itemset of the initial state, and use
5630 new_state.
5631 * src/closure.c (closure): Now that the initial state has its
5632 items properly set, there is no need for a special case when
5633 creating `ruleset'.
5634
5635 As a result, now the rule 0, reducing to $axiom, is visible in the
5636 outputs. Adjust the test suite.
5637
5638 * tests/conflicts.at (Solved SR Conflicts)
5639 (Unresolved SR Conflicts): Adjust.
5640 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5641 * tests/conflicts.at (S/R in initial): New.
5642
5643 2002-04-07 Akim Demaille <akim@epita.fr>
5644
5645 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5646 the RHS of the rules.
5647 * src/output.c (output_gram): Likewise.
5648
5649 2002-04-07 Akim Demaille <akim@epita.fr>
5650
5651 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5652 bucket.
5653 Adjust all dependencies.
5654 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5655 `number' of the buckets too.
5656 * src/gram.h: Include `symtab.h'.
5657 (associativity): Move to...
5658 * src/symtab.h: here.
5659 No longer include `gram.h'.
5660
5661 2002-04-07 Akim Demaille <akim@epita.fr>
5662
5663 * src/gram.h, src/gram.c (rules_rhs_length): New.
5664 (ritem_longest_rhs): Use it.
5665 * src/gram.h (rule_t): `number' is a new member.
5666 * src/reader.c (packgram): Set it.
5667 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5668 the end of `rules', and count them out of `nrules'.
5669 (reduce_output, dump_grammar): Adjust.
5670 * src/print.c (print_grammar): It is no longer needed to check for
5671 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5672 * tests/reduce.at (Reduced Automaton): New test.
5673
5674 2002-04-07 Akim Demaille <akim@epita.fr>
5675
5676 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5677 lacking `+ 1' to nrules, Bison reported as useless a token if it
5678 was used solely to set the precedence of the last rule...
5679
5680 2002-04-07 Akim Demaille <akim@epita.fr>
5681
5682 * data/bison.c++, data/bison.simple: Don't output the current file
5683 name in #line, to avoid useless diffs between two identical
5684 outputs under different names.
5685
5686 2002-04-07 Akim Demaille <akim@epita.fr>
5687
5688 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5689 Normalize loops to using `< nrules + 1', not `<= nrules'.
5690
5691 2002-04-07 Akim Demaille <akim@epita.fr>
5692
5693 * TODO: Update.
5694
5695 2002-04-07 Akim Demaille <akim@epita.fr>
5696
5697 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5698 bucket.value as bucket.number.
5699
5700 2002-04-07 Akim Demaille <akim@epita.fr>
5701
5702 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5703 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5704 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5705 RHS, instead of being an index in RITEMS.
5706
5707 2002-04-04 Paul Eggert <eggert@twinsun.com>
5708
5709 * doc/bison.texinfo: Update copyright date.
5710 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5711 (Symbols): Warn about running Bison in one character set,
5712 but compiling and/or running in an incompatible one.
5713 Warn about character code 256, too.
5714
5715 2002-04-03 Paul Eggert <eggert@twinsun.com>
5716
5717 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5718 YYERROR_VERBOSE is nonzero, not whether it is defined.
5719
5720 Merge changes from bison-1_29-branch.
5721
5722 2002-03-20 Paul Eggert <eggert@twinsun.com>
5723
5724 Merge fixes from Debian bison_1.34-1.diff.
5725
5726 * configure.in (AC_PREREQ): 2.53.
5727
5728 2002-03-20 Akim Demaille <akim@epita.fr>
5729
5730 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5731
5732 2002-03-19 Paul Eggert <eggert@twinsun.com>
5733
5734 * src/bison.simple (YYCOPY): New macro.
5735 (YYSTACK_RELOCATE): Use it.
5736 Remove Type arg; no longer needed. All callers changed.
5737 (yymemcpy): Remove; no longer needed.
5738
5739 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5740 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5741
5742 2002-03-19 Akim Demaille <akim@epita.fr>
5743
5744 Test and fix the #line outputs.
5745
5746 * tests/atlocal.at (GCC): New.
5747 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5748 (Prologue synch line, ,%union synch line, Postprologue synch line)
5749 (Action synch line, Epilogue synch line): New tests.
5750 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5751 * data/bison.simple, data/bison.c++: Use it.
5752
5753 2002-03-19 Akim Demaille <akim@epita.fr>
5754
5755 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5756 (Solved SR Conflicts, %expect not enough, %expect right)
5757 (%expect too much): Move to...
5758 * tests/conflicts.at: this new file.
5759
5760 2002-03-19 Akim Demaille <akim@epita.fr>
5761
5762 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5763 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5764 that we can move to enums for instance.
5765 * src/output.c (token_definitions_output): Output a list of
5766 `token-name, token-number' instead of the #define.
5767 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5768
5769 2002-03-14 Akim Demaille <akim@epita.fr>
5770
5771 Use Gettext 0.11.1.
5772
5773 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5774
5775 * data/bison.c++: Make the user able to add members to the generated
5776 parser by subclassing.
5777
5778 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5779
5780 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5781 a character.
5782 Reported by Nicolas Tisserand and Nicolas Burrus.
5783
5784 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5785
5786 * src/reader.c: Warn about lacking semi-colons, do not complain.
5787
5788 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5789
5790 * data/bison.c++: Remove a debug line.
5791
5792 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5793
5794 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5795 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5796 provide a default implementation.
5797
5798 2002-03-04 Akim Demaille <akim@epita.fr>
5799
5800 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5801 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5802 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5803 * tests/semantic.at (Parsing Guards): Similarly.
5804 * src/reader.at (readgram): Complain if the last rule is not ended
5805 with a semi-colon.
5806
5807 2002-03-04 Akim Demaille <akim@epita.fr>
5808
5809 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5810 * src/closure.c: here.
5811 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5812 RTC.
5813 * src/warshall.h, src/warshall.c: Remove.
5814 * tests/sets.at (Broken Closure): Adjust.
5815
5816 2002-03-04 Akim Demaille <akim@epita.fr>
5817
5818 * src/output.c (output_skeleton): tempdir is const.
5819 bytes_read is unused.
5820
5821 2002-03-04 Akim Demaille <akim@epita.fr>
5822
5823 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5824 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5825 Update.
5826 From Michael Hayes.
5827
5828 2002-03-04 Akim Demaille <akim@epita.fr>
5829
5830 * src/closure.c (closure): `r' is unused.
5831
5832 2002-03-04 Akim Demaille <akim@epita.fr>
5833
5834 * tests/sets.at (Broken Closure): Add the ending `;'.
5835 * src/reader.at (readgram): Complain if a rule is not ended with a
5836 semi-colon.
5837
5838 2002-03-04 Akim Demaille <akim@epita.fr>
5839
5840 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5841 (count_sr_conflicts): Use bitset_count.
5842 * src/reduce.c (inaccessable_symbols): Ditto.
5843 (bits_size): Remove.
5844 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5845
5846 2002-03-04 Akim Demaille <akim@epita.fr>
5847
5848 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5849 * src/reduce.c: Remove the `bitset_zero's following the
5850 `bitset_create's, as now it is performed by the latter.
5851
5852 2002-03-04 Akim Demaille <akim@epita.fr>
5853
5854 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5855 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5856 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5857 latest sources from Michael.
5858
5859 2002-03-04 Akim Demaille <akim@epita.fr>
5860
5861 * src/output.c (output): Don't free the grammar.
5862 * src/reader.c (grammar_free): New.
5863 * src/main.c (main): Call it and don't free symtab here.
5864
5865 2002-03-04 Akim Demaille <akim@epita.fr>
5866
5867 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5868 before returning.
5869 Reported by Benoit Perrot.
5870
5871 2002-03-04 Akim Demaille <akim@epita.fr>
5872
5873 Use bitset operations when possible, not loops over bits.
5874
5875 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5876 bitset_or.
5877 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5878 * src/reduce.c (useless_nonterminals): Formatting changes.
5879 * src/warshall.c (TC): Use bitset_or.
5880
5881 2002-03-04 Akim Demaille <akim@epita.fr>
5882
5883 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5884 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5885 Ditto.
5886
5887 2002-03-04 Akim Demaille <akim@epita.fr>
5888
5889 * src/lalr.c (F): Now a bitset*.
5890 Adjust all dependencies.
5891
5892 2002-03-04 Akim Demaille <akim@epita.fr>
5893
5894 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5895 Adjust all dependencies.
5896
5897 2002-03-04 Akim Demaille <akim@epita.fr>
5898
5899 * src/L0.c, src/LR0.h (nstates): Be size_t.
5900 Adjust comparisons (signed vs unsigned).
5901 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5902 bitset*.
5903 Adjust all dependencies.
5904
5905 2002-03-04 Akim Demaille <akim@epita.fr>
5906
5907 * src/closure.c (firsts): Now, also a bitset.
5908 Adjust all dependencies.
5909 (varsetsize): Remove, now unused.
5910 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5911
5912 2002-03-04 Akim Demaille <akim@epita.fr>
5913
5914 * src/print.c: Convert to use bitset.h, not hand coded iterations
5915 over ints.
5916
5917 2002-03-04 Akim Demaille <akim@epita.fr>
5918
5919 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5920
5921 2002-03-04 Akim Demaille <akim@epita.fr>
5922
5923 * src/closure.c (ruleset): Be a bitset.
5924 (rulesetsize): Remove.
5925
5926 2002-03-04 Akim Demaille <akim@epita.fr>
5927
5928 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5929 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5930 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5931 * src/closure.c (fderives): Be an array of bitsets.
5932
5933 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5934
5935 * data/bison.c++: Merge the two generated headers. Insert a copyright
5936 notice in each output file.
5937
5938 2002-02-28 Akim Demaille <akim@epita.fr>
5939
5940 * data/bison.c++: Copy the prologue of bison.simple to fetch
5941 useful M4 definitions, such as b4_header_guard.
5942
5943 2002-02-25 Akim Demaille <akim@epita.fr>
5944
5945 * src/getargs.c (version): Give the name of the authors, and use a
5946 translator friendly scheme for the bgr
5947 copyright notice.
5948
5949 2002-02-25 Akim Demaille <akim@epita.fr>
5950
5951 * src/output.c (header_output): Remove, now handled completely via
5952 M4.
5953
5954 2002-02-25 Akim Demaille <akim@epita.fr>
5955
5956 * m4/m4.m4: New, from CVS Autoconf.
5957 * configure.in: Invoke it.
5958 * src/output.c (output_skeleton): Use its result instead of the
5959 hard coded name.
5960
5961 2002-02-25 Akim Demaille <akim@epita.fr>
5962
5963 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5964 Fileutils 4.1.5.
5965 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5966 * src/output.c (output_skeleton): Use mkstemp to create a real
5967 temporary file.
5968 Move the filling of `skeleton' and its muscle to...
5969 (prepare): here.
5970 (output): Move the definition of the prologue muscle to...
5971 (prepare): here.
5972 * src/system.h (DEFAULT_TMPDIR): New.
5973
5974 2002-02-14 Paul Eggert <eggert@twinsun.com>
5975
5976 Remove the support for C++ namespace cleanliness; it was
5977 causing more problems than it was curing, since it didn't work
5978 properly on some nonstandard C++ compilers. This can wait
5979 for a proper C++ parser.
5980
5981 * NEWS: Document this.
5982 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5983 of C++, as it's treated like C now.
5984 * src/bison.simple (YYSTD): Remove.
5985 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5986 Treat C++ just like Standard C instead of trying to support
5987 namespace cleanliness.
5988
5989 2002-02-14 Akim Demaille <akim@epita.fr>
5990
5991 * tests/regression.at (else): Adjust to Andreas' change.
5992
5993 2002-02-14 Akim Demaille <akim@epita.fr>
5994
5995 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5996
5997 2002-02-13 Andreas Schwab <schwab@suse.de>
5998
5999 * src/output.c (output_rule_data): Don't output NULL, it might
6000 not be defined yet.
6001
6002 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
6003
6004 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6005 (Copyright notice): Update.
6006
6007 2002-02-11 Akim Demaille <akim@epita.fr>
6008
6009 * tests/regression.at (%nonassoc and eof): Don't include
6010 nonportable headers.
6011
6012 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6013
6014 * data/bison.c++: Correct error recovery. Make the user able to
6015 initialize the starting location.
6016
6017 2002-02-07 Akim Demaille <akim@epita.fr>
6018
6019 * tests/input.at: New.
6020
6021 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6022
6023 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6024 more consistent when naming methods and variables. Put preprocessor
6025 directives around tables only needed for debugging.
6026
6027 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6028
6029 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6030 C++ parsers.
6031 (yy::b4_name::parse): Use print_.
6032
6033 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6034
6035 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6036
6037 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6038
6039 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6040 C++ parsers.
6041 (yy::b4_name::parse): Build verbose error messages, and use error_.
6042
6043 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6044
6045 * data/bison.c++: Fix m4 quoting in comments.
6046
6047 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6048
6049 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6050 not expanded by m4.
6051
6052 2002-02-05 Akim Demaille <akim@epita.fr>
6053
6054 * data/bison.c++: Adjust to the M4 back end.
6055 More is certainly needed.
6056
6057 2002-02-05 Akim Demaille <akim@epita.fr>
6058
6059 Give a try to M4 as a back end.
6060
6061 * lib/readpipe.c: New, from wdiff.
6062 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6063 BISON_HAIRY.
6064 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6065 specific values. Now it is m4 that performs the lookup.
6066 * src/parse-skel.y: Remove.
6067 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6068 * src/output.c (actions_output, guards_output)
6069 (token_definitions_output): No longer keeps track of the output
6070 line number, hence remove the second argument.
6071 (guards_output): Check against the guard member of a rule, not the
6072 action member.
6073 Adjust callers.
6074 (output_skeleton): Don't look for the skeleton location, let m4 do
6075 that.
6076 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6077 file will be used.
6078 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6079 (prepare): Given that for the time being changesyntax is not
6080 usable in M4, rename the muscles using `-' to `_'.
6081 Define `defines_flag', `output_parser_name' and `output_header_name'.
6082 * src/output.h (actions_output, guards_output)
6083 (token_definitions_output): Adjust prototypes.
6084 * src/scan-skel.l: Instead of scanning the skeletons, it now
6085 processes the output of m4: `__oline__' and `#output'.
6086 * data/bison.simple: Adjust to be used by M4(sugar).
6087 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6088 to date.
6089 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6090 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6091 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6092 shamelessly stolen from CVS Autoconf.
6093
6094 2002-02-05 Akim Demaille <akim@epita.fr>
6095
6096 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6097 * configure.in: Check for the declarations of free and malloc.
6098 * src/muscle_tab.c: Adjust.
6099
6100 2002-02-05 Akim Demaille <akim@epita.fr>
6101
6102 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6103 which have no values.
6104
6105 2002-02-05 Akim Demaille <akim@epita.fr>
6106
6107 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6108 * data/: here.
6109
6110 2002-01-29 Paul Eggert <eggert@twinsun.com>
6111
6112 * src/bison.simple (YYSIZE_T): Do not define merely because
6113 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6114 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6115
6116 2002-01-27 Akim Demaille <akim@epita.fr>
6117
6118 Fix `%nonassoc and eof'.
6119
6120 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6121 which were not properly copied! Replace
6122 memcpy (res->errs, src->errs, src->nerrs);
6123 with
6124 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6125 !!!
6126 * tests/regression.at (%nonassoc and eof): Adjust to newest
6127 Autotest: `.' is not in the PATH.
6128
6129 2002-01-27 Akim Demaille <akim@epita.fr>
6130
6131 * tests/sets.at (AT_EXTRACT_SETS): New.
6132 (Nullable): Use it.
6133 (Firsts): New.
6134
6135 2002-01-26 Akim Demaille <akim@epita.fr>
6136
6137 * tests/actions.at, tests/calc.at, tests/headers.at,
6138 * tests/torture.at: Adjust to the newest Autotest which no longer
6139 forces `.' in the PATH.
6140
6141 2002-01-25 Akim Demaille <akim@epita.fr>
6142
6143 * tests/regression.at (%nonassoc and eof): New.
6144 Suggested by Robert Anisko.
6145
6146 2002-01-24 Akim Demaille <akim@epita.fr>
6147
6148 Bison dumps core when trying to complain about broken input files.
6149 Reported by Cris van Pelt.
6150
6151 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6152 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6153 into...
6154 (Invalid inputs): Strengthen: exercise parse_percent_token.
6155
6156 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6157
6158 * src/Makefile.am: Add bison.c++.
6159 * src/bison.c++: New skeleton.
6160
6161 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6162
6163 * po/it.po: New.
6164
6165 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6166
6167 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6168
6169 2002-01-20 Marc Autret <marc@gnu.org>
6170
6171 * src/files.c (compute_output_file_names): Fix
6172
6173 2002-01-20 Marc Autret <marc@gnu.org>
6174
6175 * tests/output.at: New test.
6176 * src/files.c (compute_base_names): Don't map extensions when
6177 the YACC flag is set, use defaults.
6178 Reported by Evgeny Stambulchik.
6179
6180 2002-01-20 Marc Autret <marc@gnu.org>
6181
6182 * src/system.h: Need to define __attribute__ away for non-GCC
6183 compilers as well (i.e. the vendor C compiler).
6184 Suggested by Albert Chin-A-Young.
6185
6186 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6187
6188 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6189 canonical definition.
6190 * src/system.h: Use the canonical definition for PARAMS (avoids
6191 a conflict with the macro from lib/hash.h).
6192
6193 2002-01-11 Akim Demaille <akim@epita.fr>
6194
6195 * configure.in: Use AC_FUNC_STRNLEN.
6196 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6197
6198 2002-01-09 Akim Demaille <akim@epita.fr>
6199
6200 * src/files.c, src/files.h (output_infix): New.
6201 (tab_extension): Remove.
6202 (compute_base_names): Compute the former, drop the latter.
6203 * src/output.c (prepare): Insert the muscles `output-infix', and
6204 `output-suffix'.
6205 * src/parse-skel.y (string, string.1): New.
6206 (section.header): Use it.
6207 (section.yacc): Remove.
6208 (prefix): Remove too.
6209 * src/scan-skel.l: Adjust.
6210 * src/bison.simple, src/bison.hairy: Adjust.
6211
6212 2002-01-09 Akim Demaille <akim@epita.fr>
6213
6214 * configure.in (WERROR_CFLAGS): Compute it.
6215 * src/Makefile.am (CFLAGS): Pass it.
6216 * tests/atlocal.in (CFLAGS): Idem.
6217 * src/files.c: Fix a few warnings.
6218 (get_extension_index): Remove, unused.
6219
6220 2002-01-08 Akim Demaille <akim@epita.fr>
6221
6222 * src/getargs.c (AS_FILE_NAME): New.
6223 (getargs): Use it to convert DOSish file names.
6224 * src/files.c (base_name): Rename as full_base_name to avoid
6225 clashes with `base_name ()'.
6226 (filename_split): New.
6227 (compute_base_names): N-th rewrite, using filename_split.
6228
6229 2002-01-08 Akim Demaille <akim@epita.fr>
6230
6231 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6232 New, stolen from the Fileutils 4.1.
6233 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6234 * configure.in: Check for the presence of memrchr, and of its
6235 prototype.
6236
6237 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6238
6239 * lib/hash.h (__P): Added definition for this macro.
6240 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6241 BUILT_SOURCES, to ensure they are generated first.
6242 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6243 %error-verbose to allow bootstrapping with bison 1.30x.
6244
6245 2002-01-06 Akim Demaille <akim@epita.fr>
6246
6247 * src/reader.c (parse_braces): Don't fetch the next char, the
6248 convention is to fetch on entry.
6249 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6250 'switch' without a following semicolon.
6251 * tests/regression.at (braces parsing): New.
6252
6253 2002-01-06 Akim Demaille <akim@epita.fr>
6254
6255 Bison is dead wrong in its RR conflict reports.
6256
6257 * tests/torture.at (GNU Cim Grammar): New.
6258 * src/conflicts.c (count_rr_conflicts): Fix.
6259
6260 2002-01-06 Akim Demaille <akim@epita.fr>
6261
6262 Creating package.m4 from configure.ac causes too many problems.
6263
6264 * tests/Makefile.am (package.m4): Create it by hand,
6265 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6266
6267 2002-01-06 Akim Demaille <akim@epita.fr>
6268
6269 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6270 skeleton.h.
6271
6272 2002-01-04 Paul Eggert <eggert@twinsun.com>
6273
6274 * doc/bison.texinfo (Debugging):
6275 Remove YYSTDERR; it's no longer defined or used.
6276 Also, s/cstdio.h/cstdio/.
6277
6278 2002-01-03 Akim Demaille <akim@epita.fr>
6279
6280 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6281
6282 2002-01-03 Akim Demaille <akim@epita.fr>
6283
6284 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6285 tracing code to --trace, wait for a better --trace option, with
6286 args.
6287
6288 2002-01-03 Akim Demaille <akim@epita.fr>
6289
6290 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6291 The ISO C++ standard is extremely clear about it: stderr is
6292 considered a macro, not a regular symbol (see table 94 `Header
6293 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6294 Therefore std:: does not apply to it. It still does with fprintf.
6295 Also, s/cstdio.h/cstdio/.
6296
6297 2002-01-03 Akim Demaille <akim@epita.fr>
6298
6299 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6300 for non system headers.
6301
6302 2002-01-02 Akim Demaille <akim@epita.fr>
6303
6304 Equip the skeleton chain with location tracking, runtime trace,
6305 pure parser and scanner.
6306
6307 * src/parse-skel.y: Request a pure parser, locations, and prefix
6308 renaming.
6309 (%union): Having several members with the same type does not help
6310 type mismatches, simplify.
6311 (YYPRINT, yyprint): New.
6312 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6313 (skel_error): this.
6314 Handle locations.
6315 * src/scan-skel.l: Adjust to these changes.
6316 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6317 (LOCATION_PRINT, skel_control_t): New.
6318
6319 2001-12-30 Akim Demaille <akim@epita.fr>
6320
6321 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6322 replace `gb' with BLANKS.
6323 * src/scan-skel.l: Adjust.
6324
6325 2001-12-30 Akim Demaille <akim@epita.fr>
6326
6327 * src/system.h: We don't need nor want bcopy.
6328 Throw away MS-DOS crap: we don't need getpid.
6329 * configure.in: We don't need strndup. It was even causing
6330 problems: because Flex includes the headers *before* us,
6331 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6332 not visible.
6333 * lib/xstrndup.c: New.
6334 * src/scan-skel.l: Use it.
6335 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6336 * src/parse-skel.y: Use %directives instead of #defines.
6337
6338 2001-12-30 Akim Demaille <akim@epita.fr>
6339
6340 * src/skeleton.h: New.
6341 * src/output.c (output_parser, output_master_parser): Remove, dead
6342 code.
6343 * src/output.h (get_lines_number, actions_output, guards_output)
6344 (token_definitions_output): Prototype them.
6345 * src/parse-skel.y: Add the license notice.
6346 Include output.h and skeleton.h.
6347 (process_skeleton): Returns void, and takes a single parameter.
6348 * src/scan-skel.l: Add the license notice.
6349 Include skeleton.h.
6350 Don't use %option yylineno: it seems that then Flex imagines
6351 REJECT has been used, and therefore it won't reallocate its
6352 buffers (which makes no other sense to me than a bug). It results
6353 in warnings for `unused: yy_flex_realloc'.
6354
6355 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6356
6357 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6358 (MUSCLE_INSERT_PREFIX): ...to there.
6359 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6360 (MUSCLE_INSERT_PREFIX): Move from here...
6361
6362 * src/bison.hairy: Add a section directive. Put braces around muscle
6363 names. This parser skeleton is still broken, but Bison should not
6364 choke on a bad muscle 'syntax'.
6365 * src/bison.simple: Add a section directive. Put braces around muscle
6366 names.
6367
6368 * src/files.h (strsuffix, stringappend): Add declarations.
6369 (tab_extension): Add declaration.
6370 (short_base_name): Add declaration.
6371
6372 * src/files.c (strsuffix, stringappend): No longer static. These
6373 functions are used in the skeleton parser.
6374 (tab_extension): New.
6375 (compute_base_names): Use the computations done in this function
6376 to guess if the generated parsers should have '.tab' in their
6377 names.
6378 (short_base_name): No longer static.
6379
6380 * src/output.c (output_skeleton): New.
6381 (output): Disable call to output_master_parser, and give a try to
6382 a new skeleton handling system.
6383 (guards_output, actions_output): No longer static.
6384 (token_definitions_output, get_lines_number): No longer static.
6385
6386 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6387
6388 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6389 parse-skel.y.
6390
6391 * src/parse-skel.y: New file.
6392 * src/scan-skel.l: New file.
6393
6394 2001-12-29 Akim Demaille <akim@epita.fr>
6395
6396 %name-prefix is broken.
6397
6398 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6399 Adjust all dependencies.
6400 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6401 %name-prefix.
6402
6403 Renaming yylval but not yylloc is not consistent. Now we do.
6404
6405 * src/bison.simple: Prefix yylloc if used.
6406 * doc/bison.texinfo (Decl Summary): Document that.
6407
6408 2001-12-29 Akim Demaille <akim@epita.fr>
6409
6410 * doc/bison.texinfo: Promote `%long-directive' over
6411 `%long_directive'.
6412 Remove all references to fixed-output-files, yacc is enough.
6413
6414 2001-12-29 Akim Demaille <akim@epita.fr>
6415
6416 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6417 user prologue. These are defaults.
6418 * tests/actions.at (Mid-rule actions): Make sure the user can
6419 define YYDEBUG and YYERROR_VERBOSE.
6420
6421 2001-12-29 Akim Demaille <akim@epita.fr>
6422
6423 * src/output.c (header_output): Don't forget to export YYLTYPE and
6424 yylloc.
6425 * tests/headers.at (export YYLTYPE): New, make sure it does.
6426 * tests/regression.at (%union and --defines, Invalid CPP headers):
6427 Move to...
6428 * tests/headers.at: here.
6429
6430 2001-12-29 Akim Demaille <akim@epita.fr>
6431
6432 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6433
6434 2001-12-29 Akim Demaille <akim@epita.fr>
6435
6436 * tests/actions.at (Mid-rule actions): Output on a single line
6437 instead of several.
6438
6439 2001-12-29 Akim Demaille <akim@epita.fr>
6440
6441 * doc/bison.texinfo: Formatting changes.
6442
6443 2001-12-29 Akim Demaille <akim@epita.fr>
6444
6445 Don't store the token defs in a muscle, just be ready to output it
6446 on command. Now possible via `symbols'. Fixes a memory leak.
6447
6448 * src/output.c (token_definitions_output): New.
6449 (output_parser, header_output): Use it.
6450 * src/reader.c (symbols_save): Remove.
6451
6452 2001-12-29 Akim Demaille <akim@epita.fr>
6453
6454 * src/bison.simple: Do not provide a default for YYSTYPE and
6455 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6456 default.
6457
6458 2001-12-29 Akim Demaille <akim@epita.fr>
6459
6460 Mid-rule actions are simply... ignored!
6461
6462 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6463 the empty-rule associated to the dummy symbol, not to the host
6464 rule.
6465 * tests/actions.at (Mid-rule actions): New.
6466
6467 2001-12-29 Akim Demaille <akim@epita.fr>
6468
6469 Memory leak.
6470
6471 * src/reader.c (reader): Free grammar.
6472
6473 2001-12-29 Akim Demaille <akim@epita.fr>
6474
6475 Memory leak.
6476
6477 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6478 since it allocates it for each state, although only one is needed.
6479 (allocate_storage): Do it here.
6480
6481 2001-12-29 Akim Demaille <akim@epita.fr>
6482
6483 * src/options.h, src/options.c (create_long_option_table): Rename
6484 as...
6485 (long_option_table_new): this, with a clearer prototype.
6486 (percent_table): Remove, unused,
6487 * src/getargs.c (getargs): Adjust.
6488
6489 2001-12-29 Akim Demaille <akim@epita.fr>
6490
6491 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6492 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6493 as states.
6494
6495 2001-12-29 Akim Demaille <akim@epita.fr>
6496
6497 * src/lalr.c (build_relations): Rename `states' as `states1'.
6498 Sorry, I don't understand exactly what it is, no better name...
6499
6500 2001-12-29 Akim Demaille <akim@epita.fr>
6501
6502 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6503 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6504 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6505 as rules.
6506
6507 2001-12-29 Akim Demaille <akim@epita.fr>
6508
6509 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6510 ago.
6511
6512 2001-12-29 Akim Demaille <akim@epita.fr>
6513
6514 * src/reader.c, src/reader.h (user_toknums): Remove.
6515 Adjust all users to use symbols[i]->user_token_number.
6516
6517 2001-12-29 Akim Demaille <akim@epita.fr>
6518
6519 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6520 Adjust all users to use symbols[i]->prec or ->assoc.
6521
6522 2001-12-29 Akim Demaille <akim@epita.fr>
6523
6524 * src/reader.c, src/reader.h (tags): Remove.
6525 Adjust all users to use symbols[i]->tag.
6526
6527 2001-12-29 Akim Demaille <akim@epita.fr>
6528
6529 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6530 and rule_table.
6531 * src/reader.c (packsymbols): Fill this table.
6532 Drop sprec.
6533 * src/conflicts.c (resolve_sr_conflict): Adjust.
6534 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6535 single table.
6536 Use symbols[i]->tag instead of tags[i].
6537
6538 2001-12-29 Akim Demaille <akim@epita.fr>
6539
6540 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6541 In addition, put a comment in there, to replace...
6542 * tests/regression.at (%union and C comments): Remove.
6543
6544 2001-12-29 Akim Demaille <akim@epita.fr>
6545
6546 * tests/regression.at (Web2c Actions): Blindly move the actual
6547 output as expected output. The contents *seem* right to me, but I
6548 can't pretend reading perfectly parser tables... Nonetheless, all
6549 the other tests pass correctly, the table look OK, even though the
6550 presence of `$axiom' is to be noted: AFAICS it is useless (but
6551 harmless).
6552
6553 2001-12-29 Akim Demaille <akim@epita.fr>
6554
6555 * src/reader.c (readgram): Don't add the rule 0 if there were no
6556 rules read. In other words, add it _after_ having performed
6557 grammar sanity checks.
6558 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6559
6560 2001-12-29 Akim Demaille <akim@epita.fr>
6561
6562 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6563 visible, and some states have now a different number.
6564
6565 2001-12-29 Akim Demaille <akim@epita.fr>
6566
6567 * src/reader.c (readgram): Bind the initial rule's lineno to that
6568 of the first rule.
6569 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6570 (Solved SR Conflicts): Adjust rule 0's line number.
6571
6572 2001-12-29 Akim Demaille <akim@epita.fr>
6573
6574 Fix the `GAWK Grammar' failure.
6575
6576 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6577 the reductions of the first state which was mistakenly confused
6578 with the final state because precisely final_state was initialized
6579 to 0.
6580 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6581 now noticed by Bison.
6582 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6583 have a reduction on $default.
6584
6585 2001-12-29 Akim Demaille <akim@epita.fr>
6586
6587 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6588 rule line numbers.
6589 * src/closure.c (print_closure): Likewise.
6590 * src/derives.c (print_derives): Likewise.
6591 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6592 now.
6593
6594 2001-12-29 Akim Demaille <akim@epita.fr>
6595
6596 * src/lalr.c (lookaheads_print): New.
6597 (lalr): Call it when --trace-flag.
6598 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6599 are dumped.
6600
6601 2001-12-29 Akim Demaille <akim@epita.fr>
6602
6603 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6604 when walking through ritem, even via rule->rhs.
6605 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6606 (useful_production, useless_nonterminals): Likewise.
6607 (reduce_grammar_tables): Likewise, plus update nritems.
6608 * src/nullable.c (set_nullable): Likewise.
6609 * src/lalr.c (build_relations): Likewise.
6610 * tests/sets.at (Nullable): Adjust.
6611 Fortunately, now, the $axiom is no longer nullable.
6612
6613 2001-12-29 Akim Demaille <akim@epita.fr>
6614
6615 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6616 the 0-sentinel.
6617 * src/gram.c (ritem_longest_rhs): Likewise.
6618 * src/reduce.c (nonterminals_reduce): Likewise.
6619 * src/print_graph.c (print_graph): Likewise.
6620 * src/output.c (output_rule_data): Likewise.
6621 * src/nullable.c (set_nullable): Likewise.
6622
6623 2001-12-29 Akim Demaille <akim@epita.fr>
6624
6625 * src/output.c: Comment changes.
6626
6627 2001-12-27 Paul Eggert <eggert@twinsun.com>
6628
6629 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6630 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6631 Sparc, as they were causing more porting problems than the
6632 (minor) performance improvement was worth.
6633
6634 Also, catch up with 1.31's YYSTD.
6635
6636 2001-12-27 Akim Demaille <akim@epita.fr>
6637
6638 * src/output.c (output_gram): Rely on nritems, not the
6639 0-sentinel. See below.
6640 Use -1 as separator, not 0.
6641 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6642 Rely on -1 as separator in yyrhs, instead of 0.
6643 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6644 twice `Now at end of input', therefore there are two lines less to
6645 expect.
6646
6647 2001-12-27 Akim Demaille <akim@epita.fr>
6648
6649 * tests/regression.at (Unresolved SR Conflicts):
6650 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6651 below.
6652
6653 2001-12-27 Akim Demaille <akim@epita.fr>
6654
6655 * src/LR0.c (new_state): Recognize the final state by the fact it
6656 is reached by eoftoken.
6657 (insert_start_shifting_state, insert_eof_shifting_state)
6658 (insert_accepting_state, augment_automaton): Remove, since now
6659 these states are automatically computed from the initial state.
6660 (generate_states): Adjust.
6661 * src/print.c: When reporting a rule number to the user, substract
6662 1, so that the axiom rule is rule 0, and the first user rule is 1.
6663 * src/reduce.c: Likewise.
6664 * src/print_graph.c (print_core): For the time being, just as for
6665 the report, depend upon --trace-flags to dump the full set of
6666 items.
6667 * src/reader.c (readgram): Once the grammar read, insert the rule
6668 0: `$axiom: START-SYMBOL $'.
6669 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6670 number of the states has changed (the final state is no longer
6671 necessarily the last), catch up.
6672
6673 2001-12-27 Akim Demaille <akim@epita.fr>
6674
6675 Try to make the use of the eoftoken valid. Given that its value
6676 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6677 is used instead of > 0 where appropriate, (ii), depend upon nritems
6678 instead of the 0-sentinel.
6679
6680 * src/gram.h, src/gram.c (nritems): New.
6681 Expected to be duplication of nitems, but for the time being...
6682 * src/reader.c (packgram): Assert nritems and nitems are equal.
6683 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6684 * src/closure.c (print_closure, print_fderives): Likewise.
6685 * src/gram.c (ritem_print): Likewise.
6686 * src/print.c (print_core, print_grammar): Likewise.
6687 * src/print_graph.c: Likewise.
6688
6689 2001-12-27 Akim Demaille <akim@epita.fr>
6690
6691 * src/main.c (main): If there are complains after grammar
6692 reductions, then output the report anyway if requested, then die.
6693 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6694 * src/reader.c (eoftoken): New.
6695 (parse_token_decl): If the token being defined has value `0', it
6696 is the eoftoken.
6697 (packsymbols): No longer hack `tags' to insert `$' by hand.
6698 Be sure to preserve the value of the eoftoken.
6699 (reader): Make sure eoftoken is defined.
6700 Initialize nsyms to 0: now eoftoken is created just like the others.
6701 * src/print.c (print_grammar): Don't special case the eof token.
6702 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6703 lie anyway, albeit pleasant.
6704 * tests/calc.at: Exercise error messages with eoftoken.
6705 Change the grammar so that empty input is invalid.
6706 Adjust expectations.
6707 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6708
6709 2001-12-27 Akim Demaille <akim@epita.fr>
6710
6711 * configure.in: Check the protos of strchr ans strspn.
6712 Replace strchr if needed.
6713 * src/system.h: Provide the protos of strchr, strspn and memchr if
6714 missing.
6715 * lib/strchr.c: New.
6716 * src/reader.c (symbols_save): Use strchr.
6717
6718 2001-12-27 Akim Demaille <akim@epita.fr>
6719
6720 * src/print.c, src/print_graph.c (escape): New.
6721 Use it to quote the TAGS outputs.
6722 * src/print_graph.c (print_state): Now errors are in red, and
6723 reductions in green.
6724 Prefer high to wide: output the state number on a line of its own.
6725
6726 2001-12-27 Akim Demaille <akim@epita.fr>
6727
6728 * src/state.h, src/state.c (reductions_new): New.
6729 * src/LR0.c (set_state_table): Let all the states have a
6730 `reductions', even if reduced to 0.
6731 (save_reductions): Adjust.
6732 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6733 * src/print.c (print_reductions, print_actions): Adjust.
6734 * src/output.c (action_row): Adjust.
6735
6736 2001-12-27 Akim Demaille <akim@epita.fr>
6737
6738 * src/state.h, src/state.c (errs_new, errs_dup): New.
6739 * src/LR0.c (set_state_table): Let all the states have an errs,
6740 even if reduced to 0.
6741 * src/print.c (print_errs, print_reductions): Adjust.
6742 * src/output.c (output_actions, action_row): Adjust.
6743 * src/conflicts.c (resolve_sr_conflict): Adjust.
6744
6745 2001-12-27 Akim Demaille <akim@epita.fr>
6746
6747 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6748
6749 2001-12-27 Akim Demaille <akim@epita.fr>
6750
6751 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6752 * src/print.c: here.
6753 (lookaheadset, shiftset): New, used as additional storage by
6754 print_reductions.
6755 (print_results): Adjust.
6756 (print_shifts, print_gotos, print_errs): New, extracted from...
6757 (print_actions): here.
6758 * src/print_graph.c (print_actions): Remove dead code.
6759
6760 2001-12-27 Akim Demaille <akim@epita.fr>
6761
6762 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6763 `$n' and `@n'.
6764
6765 2001-12-27 Akim Demaille <akim@epita.fr>
6766
6767 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6768 (build_relations): Adjust.
6769
6770 2001-12-27 Akim Demaille <akim@epita.fr>
6771
6772 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6773 duplication.
6774
6775 2001-12-27 Akim Demaille <akim@epita.fr>
6776
6777 * src/reader.c (packgram): Catch nitems overflows.
6778
6779 2001-12-27 Akim Demaille <akim@epita.fr>
6780
6781 * src/files.c, src/files.h (guard_obstack): Remove.
6782 * src/output.c (output): Adjust.
6783 * src/reader.c (parse_braces): New, factoring...
6784 (copy_action, copy_guard): these two which are renamed as...
6785 (parse_action, parse_guard): these.
6786 As a voluntary consequence, using braces around guards is now
6787 mandatory.
6788
6789 2001-12-27 Akim Demaille <akim@epita.fr>
6790
6791 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6792 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6793 members.
6794 (symbol_list_new): Adjust.
6795 (copy_action): action_line is the first line, not the last.
6796 (copy_guard): Just as for actions, store the `action' only, not
6797 the switch/case/break flesh.
6798 Don't parse the user action that might follow the guard, let...
6799 (readgram): do it, i.e., now, there can be an action after a
6800 guard.
6801 In other words the guard is just explicitly optional.
6802 (packgram): Adjust.
6803 * src/output.c (guards_output): New.
6804 (output_parser): Call it when needed.
6805 (output): Also free the guard and attrs obstacks.
6806 * src/files.c, src/files.h (obstack_save): Remove.
6807 (output_files): Remove.
6808 As a result, if one needs the former `.act' file, using an
6809 appropriate skeleton which requires actions and guards is now
6810 required.
6811 * src/main.c (main): Adjust.
6812 * tests/semantic.at: New.
6813 * tests/regression.at: Use `input.y' as input file name.
6814 Avoid 8+3 problems by requiring input.c when the test needs the
6815 parser.
6816
6817 2001-12-27 Akim Demaille <akim@epita.fr>
6818
6819 * src/reader.c (symbol_list_new): Be sure to initialize all the
6820 fields.
6821
6822 2001-12-27 Akim Demaille <akim@epita.fr>
6823
6824 All the hacks using a final pseudo state are now useless.
6825
6826 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6827 * src/lalr.c (nLA): New.
6828 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6829 instead of lookaheadsp from the pseudo state (nstate + 1).
6830
6831 2001-12-27 Akim Demaille <akim@epita.fr>
6832
6833 * src/output.c (action_row, token_actions): Use a state_t instead
6834 of a integer, and nlookaheads instead of the following state's
6835 lookaheadsp.
6836
6837 2001-12-27 Akim Demaille <akim@epita.fr>
6838
6839 * src/conflicts.c (log_resolution, flush_shift)
6840 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6841 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6842 (conflicts_print, print_reductions): Use a state_t instead of an
6843 integer when referring to a state.
6844 As much as possible, depend upon nlookaheads, instead of the
6845 `lookaheadsp' member of the following state (since lookaheads of
6846 successive states are successive, the difference between state n + 1
6847 and n served as the number of lookaheads for state n).
6848 * src/lalr.c (add_lookback_edge): Likewise.
6849 * src/print.c (print_core, print_actions, print_state)
6850 (print_results): Likewise.
6851 * src/print_graph.c (print_core, print_actions, print_state)
6852 (print_graph): Likewise.
6853 * src/conflicts.h: Adjust.
6854
6855 2001-12-27 Akim Demaille <akim@epita.fr>
6856
6857 * src/bison.hairy: Formatting/comment changes.
6858 ANSIfy.
6859 Remove `register' indications.
6860 Add plenty of `static'.
6861
6862 2001-12-27 Akim Demaille <akim@epita.fr>
6863
6864 * src/output.c (prepare): Drop the muscle `ntbase' which
6865 duplicates ntokens.
6866 * src/bison.simple: Formatting/comment changes.
6867 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6868 is an undocumented synonym.
6869
6870 2001-12-22 Akim Demaille <akim@epita.fr>
6871
6872 * src/output.c (output_table_data): Change the prototype to use
6873 `int' for array ranges: some invocations do pass an int, not a
6874 short.
6875 Reported by Wayne Green.
6876
6877 2001-12-22 Akim Demaille <akim@epita.fr>
6878
6879 Some actions of web2c.y are improperly triggered.
6880 Reported by Mike Castle.
6881
6882 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6883 * tests/regression.at (Web2c): Rename as...
6884 (Web2c Report): this.
6885 (Web2c Actions): New.
6886
6887 2001-12-22 Akim Demaille <akim@epita.fr>
6888
6889 Reductions in web2c.y are improperly reported.
6890 Reported by Mike Castle.
6891
6892 * src/conflicts.c (print_reductions): Fix.
6893 * tests/regression.at (Web2c): New.
6894
6895 2001-12-18 Akim Demaille <akim@epita.fr>
6896
6897 Some host fail on `assert (!"foo")', which expands to
6898 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6899 Reported by Nelson Beebee.
6900
6901 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6902 `#define it_succeeded 0' and `assert (it_succeeded)'.
6903
6904 2001-12-17 Marc Autret <autret_m@epita.fr>
6905
6906 * src/bison.simple: Don't hard code the skeleton line and filename.
6907 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6908 New line counter 'skeleton_line' (skeleton-line muscle).
6909
6910 2001-12-17 Paul Eggert <eggert@twinsun.com>
6911
6912 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6913 YYDEBUG must be defined to a nonzero value.
6914
6915 * src/bison.simple (yytname): Do not assume that the user defines
6916 YYDEBUG to a properly parenthesized expression.
6917
6918 2001-12-17 Akim Demaille <akim@epita.fr>
6919
6920 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6921 nlookaheads is a new member.
6922 Adjust all users.
6923 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6924 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6925 state.
6926
6927 2001-12-17 Akim Demaille <akim@epita.fr>
6928
6929 * src/files.h, src/files.c (open_files, close_files): Remove.
6930 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6931 let...
6932 * src/reader.c (reader): Do it.
6933
6934 2001-12-17 Akim Demaille <akim@epita.fr>
6935
6936 * src/conflicts.c (print_reductions): Formatting changes.
6937
6938 2001-12-17 Akim Demaille <akim@epita.fr>
6939
6940 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6941 (flush_reduce): New.
6942 (resolve_sr_conflict): Adjust.
6943
6944 2001-12-17 Akim Demaille <akim@epita.fr>
6945
6946 * src/output.c (output_obstack): Be static and rename as...
6947 (format_obstack): this, to avoid any confusion with files.c's
6948 output_obstack.
6949 * src/reader.h (muscle_obstack): Move to...
6950 * src/output.h: here, since it's defined in output.c.
6951
6952 2001-12-17 Akim Demaille <akim@epita.fr>
6953
6954 * src/output.c (action_row, save_column, default_goto)
6955 (sort_actions, matching_state, pack_vector): Better variable
6956 locality.
6957
6958 2001-12-17 Akim Demaille <akim@epita.fr>
6959
6960 * src/output.c: Various formatting changes.
6961
6962 2001-12-17 Akim Demaille <akim@epita.fr>
6963
6964 * src/files.c (output_files): Free the output_obstack.
6965 * src/main.c (main): Call print and print_graph conditionally.
6966 * src/print.c (print): Work unconditionally.
6967 * src/print_graph.c (print_graph): Work unconditionally.
6968 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6969
6970 2001-12-16 Marc Autret <autret_m@epita.fr>
6971
6972 * src/output.c (actions_output): Fix. When we use %no-lines,
6973 there is one less line per action.
6974
6975 2001-12-16 Marc Autret <autret_m@epita.fr>
6976
6977 * src/bison.simple: Remove a useless #line directive.
6978 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6979 * src/output.c (get_lines_number): New.
6980 (output_parser): Adjust, now takes care about the lines of a
6981 output muscles.
6982 Fix line numbering.
6983 (actions_output): Computes the number of lines taken by actions.
6984 (output_master_parser): Insert new skeleton which is the name of
6985 the output parser file name.
6986
6987 2001-12-15 Marc Autret <autret_m@epita.fr>
6988
6989 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6990
6991 2001-12-15 Marc Autret <autret_m@epita.fr>
6992
6993 * src/output.c (output_gram): Keep track of the hairy one.
6994
6995 2001-12-15 Akim Demaille <akim@epita.fr>
6996
6997 Make `make distcheck' work.
6998
6999 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
7000 system.h which uses libgettext.h.
7001
7002 2001-12-15 Akim Demaille <akim@epita.fr>
7003
7004 * src/nullable.c (set_nullable): Useless rules must be skipped,
7005 otherwise, since we range over their symbols, we might look at a
7006 nonterminal which no longer ``exists'', i.e., it is not counted in
7007 `nvars', hence we overflow our arrays.
7008
7009 2001-12-15 Akim Demaille <akim@epita.fr>
7010
7011 The header can also be produced directly, without any obstack!
7012 Yahoo!
7013
7014 * src/files.c, src/files.h (defines_obstack): Remove.
7015 (compute_header_macro): Global.
7016 (defines_obstack_save): Remove.
7017 * src/reader.c (parse_union_decl): No longer output to
7018 defines_obstack: its content can be found in the `stype' muscle
7019 anyway.
7020 (output_token_translations): Merge into...
7021 (symbols_output): this.
7022 Rename as...
7023 (symbols_save): this.
7024 (reader): Adjust.
7025 * src/output.c (header_output): New.
7026 (output): Call it.
7027
7028 2001-12-15 Akim Demaille <akim@epita.fr>
7029
7030 * src/reader.c (parse_union_decl): Instead of handling two obstack
7031 simultaneously, use one to define the `stype' muscle, and use the
7032 value of the latter to fill defines_obstack.
7033 (copy_comment): Remove.
7034 (copy_comment2): Work for a single obstack.
7035 Rename as...
7036 (copy_comment): this.
7037
7038 2001-12-15 Akim Demaille <akim@epita.fr>
7039
7040 * src/lex.c, src/lex.h (xgetc): No longer static.
7041 * src/reader.c (parse_union_decl): Revamp.
7042
7043 2001-12-15 Akim Demaille <akim@epita.fr>
7044
7045 Still making progress in separating Bison into (i) input, (ii)
7046 process, (iii) output: now we can directly output the parser file
7047 without using table_obstack at all.
7048
7049 * src/files.c, src/files.h (table_obstack): Bye bye.
7050 (parser_file_name): New.
7051 * src/files.c (compute_output_file_names): Compute it.
7052 * src/output.c (actions_output, output_parser)
7053 (output_master_parser): To a file instead of an obstack.
7054
7055 2001-12-15 Akim Demaille <akim@epita.fr>
7056
7057 Attach actions to rules, instead of pre-outputting them to
7058 actions_obstack.
7059
7060 * src/gram.h (rule_t): action and action_line are new members.
7061 * src/reader.c (symbol_list): Likewise.
7062 (copy_action): Save the actions within the rule.
7063 (packgram): Save them in rule_table.
7064 * src/output.c (actions_output): New.
7065 (output_parser): Use it on `%%actions'.
7066 (output_rule_data): Don't free rule_table.
7067 (output): Do it.
7068 (prepare): Don't save the `action' muscle.
7069 * src/bison.simple: s/%%action/%%actions/.
7070
7071 2001-12-15 Akim Demaille <akim@epita.fr>
7072
7073 * src/reader.c (copy_action): When --yacc, don't append a `;'
7074 to the user action: let it fail if lacking.
7075 Suggested by Arnold Robbins and Tom Tromey.
7076
7077 2001-12-14 Akim Demaille <akim@epita.fr>
7078
7079 * src/lex.c (literalchar): Simply return the char you decoded, non
7080 longer mess around with obstacks and int pointers.
7081 Adjust all callers.
7082
7083 2001-12-14 Akim Demaille <akim@epita.fr>
7084
7085 * src/lex.c (literalchar): Don't escape the special characters,
7086 just decode them, and keep them as char (before, eol was output as
7087 the 2 char string `\n' etc.).
7088 * src/output.c (output_rule_data): Use quotearg to output the
7089 token strings.
7090
7091 2001-12-13 Paul Eggert <eggert@twinsun.com>
7092
7093 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7094 Do not infringe on the global user namespace when using C++.
7095 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7096 All uses of `fprintf' and `stderr' changed.
7097
7098 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7099
7100 2001-12-13 Akim Demaille <akim@epita.fr>
7101
7102 The computation of nullable is broken: it doesn't handle empty
7103 RHS's properly.
7104
7105 * tests/torture.at (GNU AWK Grammar): New.
7106 * tests/sets.at (Nullable): New.
7107 * src/nullable.c (set_nullable): Instead of blindly looping over
7108 `ritems', loop over the rules, and then over their rhs's.
7109
7110 Work around Autotest bugs.
7111
7112 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7113 frame, because Autotest understand lines starting with a `+' as
7114 traces from the shell. Then, they are not processed properly.
7115 Admittedly an Autotest bug, but we don't have time to wait for
7116 Autotest to catch up.
7117 * tests/regression.at (Broken Closure): Adjust to the new table
7118 frames.
7119 Move to...
7120 * tests/sets.at: here.
7121
7122 2001-12-13 Akim Demaille <akim@epita.fr>
7123
7124 * src/closure.c (closure): Use nrules instead of playing tricks
7125 with BITS_PER_WORD.
7126
7127 2001-12-13 Akim Demaille <akim@epita.fr>
7128
7129 * src/print.c (print_actions): Output the handling of `$' as the
7130 traces do: shifting the token EOF. Before EOF was treated as a
7131 nonterminal.
7132 * tests/regression.at: Adjust some tests.
7133 * src/print_graph.c (print_core): Complete the set of items via
7134 closure. The next-to-final and final states are still unsatisfying,
7135 but that's to be addressed elsewhere.
7136 No longer output the rule numbers, but do output the state number.
7137 A single loop for the shifts + gotos is enough, but picked a
7138 distinct color for each.
7139 (print_graph): Initialize and finalize closure.
7140
7141 2001-12-13 Akim Demaille <akim@epita.fr>
7142
7143 * src/reader.c (readgram): Remove dead code, an strip useless
7144 braces.
7145 (get_type): Remove, unused.
7146
7147 2001-12-12 Akim Demaille <akim@epita.fr>
7148
7149 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7150 on that of lib/error.c.
7151
7152 2001-12-12 Akim Demaille <akim@epita.fr>
7153
7154 Some hosts don't like `/' in includes.
7155
7156 * src/system.h: Include libgettext.h without qualifying the path.
7157 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7158 $(top_srcdir).
7159
7160 2001-12-11 Marc Autret <autret_m@epita.fr>
7161
7162 * src/output.c (output_parser): Remove useless muscle.
7163
7164 2001-12-11 Marc Autret <autret_m@epita.fr>
7165
7166 * src/bison.simple: Remove #line just before %%epilogue. It
7167 is now handled in ...
7168 * src/reader.c (read_additionnal_code): Add the output of a
7169 #line for the epilogue.
7170
7171 2001-12-10 Marc Autret <autret_m@epita.fr>
7172
7173 * src/reader.c (copy_definition): Re-use CPP-outed code which
7174 replace precedent remove.
7175 * src/bison.simple: Remove #line before %%prologue because
7176 %%input-line is wrong at this time.
7177
7178 2001-12-10 Marc Autret <autret_m@epita.fr>
7179
7180 * src/reader.c (symbols_output): Clean up.
7181 * src/output.c (output_gram, output): Clean up.
7182
7183 2001-12-10 Akim Demaille <akim@epita.fr>
7184
7185 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7186 * src/LR0.c (set_state_table): here.
7187 * src/lalr.c (lalr): Call it.
7188
7189 2001-12-10 Akim Demaille <akim@epita.fr>
7190
7191 * src/state.h (shifts): Remove the `number' member: shifts are
7192 attached to state, hence no longer need to be labelled with a
7193 state number.
7194
7195 2001-12-10 Akim Demaille <akim@epita.fr>
7196
7197 Now that states have a complete set of members, the linked list of
7198 shifts is useless: just fill directly the state's shifts member.
7199
7200 * src/state.h (shifts): Remove the `next' member.
7201 * src/LR0.c (first_state, last_state): Remove.
7202 Adjust the callers.
7203 (augment_automaton): Don't look for the shifts that must be added
7204 a shift on EOF: it is those of the state we looked for! But now,
7205 since shifts are attached, it is no longer needed to looking
7206 merely by its id: its number.
7207
7208 2001-12-10 Akim Demaille <akim@epita.fr>
7209
7210 * src/LR0.c (augment_automaton): Better variable locality.
7211 Remove an impossible branch: if there is a state corresponding to
7212 the start symbol being shifted, then there is shift for the start
7213 symbol from the initial state.
7214
7215 2001-12-10 Akim Demaille <akim@epita.fr>
7216
7217 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7218 only when appropriate: when insert_start_shifting_state' is not
7219 invoked.
7220 * tests/regression.at (Rule Line Numbers): Adjust.
7221
7222 2001-12-10 Akim Demaille <akim@epita.fr>
7223
7224 * src/LR0.c (augment_automaton): Now that all states have shifts,
7225 merge the two cases addition shifts to the initial state.
7226
7227 2001-12-10 Akim Demaille <akim@epita.fr>
7228
7229 * src/lalr.c (set_state_table): Move to...
7230 * src/LR0.c: here.
7231 * src/lalr.c (lalr): Don't call it...
7232 * src/LR0.c (generate_states): do it.
7233 * src/LR0.h (first_state): Remove, only the table is used.
7234
7235 2001-12-10 Akim Demaille <akim@epita.fr>
7236
7237 * src/LR0.h (first_shift, first_reduction): Remove.
7238 * src/lalr.c: Don't use first_shift: find shifts through the
7239 states.
7240
7241 2001-12-10 Akim Demaille <akim@epita.fr>
7242
7243 * src/LR0.c: Attach shifts to states as soon as they are
7244 computed.
7245 * src/lalr.c (set_state_table): Instead of assigning shifts to
7246 state, just assert that the mapping was properly done.
7247
7248 2001-12-10 Akim Demaille <akim@epita.fr>
7249
7250 * src/LR0.c (insert_start_shift): Rename as...
7251 (insert_start_shifting_state): this.
7252 (insert_eof_shifting_state, insert_accepting_state): New.
7253 (augment_automaton): Adjust.
7254 Better locality of the variables.
7255 When looking if the start_symbol is shifted from the initial
7256 state, using `while (... symbol != start_symbol ...)' sounds
7257 better than `while (... symbol < start_symbol ...)': If fail
7258 to see how the order between symbols could be relevant!
7259
7260 2001-12-10 Akim Demaille <akim@epita.fr>
7261
7262 * src/getargs.h: Don't declare `spec_name_prefix' and
7263 `spec_file_prefix', declared by src/files.h.
7264 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7265 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7266 * src/output.c (prepare): Adjust.
7267 * src/reader.c (symbols_output): Likewise.
7268 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7269
7270 2001-12-10 Akim Demaille <akim@epita.fr>
7271
7272 * src/muscle_tab.c (muscle_init): NULL is a better default than
7273 `"0"'.
7274
7275 2001-12-10 Akim Demaille <akim@epita.fr>
7276
7277 * src/reader.c (reader): Calling symbols_output once is enough.
7278
7279 2001-12-10 Akim Demaille <akim@epita.fr>
7280
7281 Now that states have a complete set of members, the linked list of
7282 reductions is useless: just fill directly the state's reductions
7283 member.
7284
7285 * src/state.h (struct reductions): Remove member `number' and
7286 `next'.
7287 * src/LR0.c (first_reduction, last_reduction): Remove.
7288 (save_reductions): Don't link the new reductions, store them in
7289 this_state.
7290 * src/lalr.c (set_state_table): No need to attach reductions to
7291 states, it's already done.
7292 * src/output.c (output_actions): No longer free the shifts, then
7293 the reductions, then the states: free all the states and their
7294 members.
7295
7296 2001-12-10 Akim Demaille <akim@epita.fr>
7297
7298 * src/options.c (OPTN, DRTV, BOTH): New.
7299 (option_table): Use them.
7300
7301 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7302 the job of system.h.
7303 * src/options.c: Don't include stdio.h and xalloc.h for the same
7304 reasons.
7305
7306 2001-12-10 Akim Demaille <akim@epita.fr>
7307
7308 * src/output.c (output, prepare): Make sure the values of the
7309 muscles `action' and `prologue' are 0-terminated.
7310
7311 2001-12-10 Akim Demaille <akim@epita.fr>
7312
7313 Clean up GCC warnings.
7314
7315 * src/reader.c (copy_action): `buf' is not used.
7316 (parse_skel_decl): Be static.
7317 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7318 * src/options.h (create_long_option_table): Have a real prototype.
7319 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7320 (hash_delete_at): Return const void *.
7321 Adjust casts to preserve the const.
7322
7323 2001-12-10 Akim Demaille <akim@epita.fr>
7324
7325 * configure.in: Require 2.52g.
7326 M4 is not needed, but AUTOM4TE is.
7327 * m4/m4.m4: Remove.
7328 * tests/Makefile.am: Adjust.
7329
7330 2001-12-10 Akim Demaille <akim@epita.fr>
7331
7332 One structure for states is enough, even though theoretically
7333 there are LR(0) states and LALR(1) states.
7334
7335 * src/lalr.h (state_t): Remove.
7336 (state_table): Be state_t **, not state_t *.
7337 * src/state.h (core, CORE_ALLOC): Rename as...
7338 (state_t, STATE_ALLOC): this.
7339 Add the LALR(1) members: shifts, reductions, errs.
7340 * src/LR0.c (state_table): Rename as...
7341 (state_hash): this, to avoid name clashes with the global
7342 `state_table'.
7343 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7344 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7345
7346 2001-12-10 Akim Demaille <akim@epita.fr>
7347
7348 Bison dumps core on bash.y.
7349 Reported by Pascal Bart.
7350
7351 * src/warshall.c (bitmatrix_print): New.
7352 (TC): Use it.
7353 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7354 j must be the outer loop.
7355 * tests/regression.at (Broken Closure): New.
7356
7357 2001-12-05 Akim Demaille <akim@epita.fr>
7358
7359 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7360 its argument.
7361 Reported by Peter Hamorsky.
7362
7363 2001-12-05 Akim Demaille <akim@epita.fr>
7364
7365 * src/conflicts.c (err_table): Remove.
7366 (resolve_sr_conflict): Adjust.
7367 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7368 Rename as...
7369 (state_t.reductions, state_t.shifts): this.
7370
7371 2001-12-05 Akim Demaille <akim@epita.fr>
7372
7373 * src/reduce.c (reduce_grammar_tables): No longer disable the
7374 removal of useless rules via CPP but via `if (0)', so that the
7375 compiler still check the code is valid.
7376 For instance, it should have noticed `rline' no longer exists: use
7377 the `line' member of rule_t.
7378 * src/gram.c (dummy, rline): Remove, unused.
7379
7380 2001-12-05 Akim Demaille <akim@epita.fr>
7381
7382 * src/output.c (pack_vector): Use assert, not berror.
7383 * src/main.c (berror): Remove, unused.
7384
7385 2001-12-05 Akim Demaille <akim@epita.fr>
7386
7387 New experimental feature: if --verbose --trace output all the
7388 items of a state, not only its kernel.
7389
7390 * src/print.c (print_core): If `trace_flag', then invoke closure
7391 before outputting the items of the state (print_core is no longer
7392 a correct name them).
7393 (print_results): Invoke new_closure/free_closure if needed.
7394
7395 2001-12-05 Akim Demaille <akim@epita.fr>
7396
7397 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7398 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7399 (nitemset): for consistency with the rest of the project.
7400
7401 2001-12-05 Akim Demaille <akim@epita.fr>
7402
7403 * src/closure.c (print_closure): Improve.
7404 (closure): Use it for printing input and output.
7405
7406 2001-12-05 Akim Demaille <akim@epita.fr>
7407
7408 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7409 indexed by nonterminals.
7410
7411 2001-12-05 Akim Demaille <akim@epita.fr>
7412
7413 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7414 what it was!).
7415 * src/warshall.h: Remove accidental duplication of the content.
7416
7417 2001-12-05 Akim Demaille <akim@epita.fr>
7418
7419 * src/closure.c (set_fderives): De-obfuscate.
7420
7421 2001-12-05 Akim Demaille <akim@epita.fr>
7422
7423 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7424
7425 2001-12-05 Akim Demaille <akim@epita.fr>
7426
7427 * src/closure.c (set_firsts): De-obfuscate.
7428
7429 2001-12-05 Akim Demaille <akim@epita.fr>
7430
7431 * src/output.c (action_row): De-obfuscate
7432 using the good o' techniques: arrays not pointers, variable
7433 locality, BITISSET, RESETBIT etc.
7434
7435 2001-12-05 Akim Demaille <akim@epita.fr>
7436
7437 Pessimize the code to simplify it: from now on, all the states
7438 have a valid SHIFTS, which NSHIFTS is possibly 0.
7439
7440 * src/LR0.c (shifts_new): Be global and move to..
7441 * src/state.c, src/state.h: here.
7442 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7443 * src/print_graph: Adjust.
7444
7445 2001-12-05 Akim Demaille <akim@epita.fr>
7446
7447 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7448 * src/conflicts.c: Use it.
7449 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7450 incorrectly ``simplified''.
7451
7452 2001-12-05 Akim Demaille <akim@epita.fr>
7453
7454 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7455 using the good o' techniques: arrays not pointers, variable
7456 locality, BITISSET, RESETBIT etc.
7457
7458 2001-12-05 Akim Demaille <akim@epita.fr>
7459
7460 * src/state.h (SHIFT_SYMBOL): New.
7461 * src/conflicts.c: Use it to deobfuscate.
7462
7463 2001-12-05 Akim Demaille <akim@epita.fr>
7464
7465 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7466 (print_reductions): De-obfuscate using the good o' techniques:
7467 arrays not pointers, variable locality, BITISSET.
7468
7469 2001-12-05 Akim Demaille <akim@epita.fr>
7470
7471 * src/conflicts.c (print_reductions): Arrays, not pointers.
7472 Use BITISSET.
7473
7474 2001-12-05 Akim Demaille <akim@epita.fr>
7475
7476 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7477
7478 2001-12-05 Akim Demaille <akim@epita.fr>
7479
7480 * src/conflicts.c (print_reductions): Improve variable locality.
7481
7482 2001-12-05 Akim Demaille <akim@epita.fr>
7483
7484 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7485
7486 2001-12-05 Akim Demaille <akim@epita.fr>
7487
7488 * src/conflicts.c (print_reductions): Improve variable locality.
7489
7490 2001-12-05 Akim Demaille <akim@epita.fr>
7491
7492 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7493 * src/lalr.c: Use them.
7494
7495 2001-12-05 Akim Demaille <akim@epita.fr>
7496
7497 * src/LR0.c (augment_automaton): Formatting changes.
7498 Better variable locality.
7499
7500 2001-12-05 Akim Demaille <akim@epita.fr>
7501
7502 * src/lalr.c (matrix_print): New.
7503 (transpose): Use it.
7504 Use arrays instead of pointers.
7505
7506 2001-12-05 Akim Demaille <akim@epita.fr>
7507
7508 * src/lalr.c (maxrhs): Move to...
7509 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7510 * src/lalr.c (build_relations): Adjust.
7511
7512 2001-12-05 Akim Demaille <akim@epita.fr>
7513
7514 * src/lalr.c (transpose): Free the memory allocated to the
7515 argument, as it is replaced by the results by the unique caller.
7516 (build_relations): Merely invoke transpose: it handles the memory
7517 deallocation.
7518 Improve variable locality.
7519 Avoid variables used as mere abbreviations.
7520 (compute_lookaheads): Use arrays instead of pointers.
7521
7522 2001-12-05 Akim Demaille <akim@epita.fr>
7523
7524 * src/lalr.c (initialize_F): Improve variable locality.
7525 Avoid variables used as mere abbreviations.
7526
7527 2001-12-05 Akim Demaille <akim@epita.fr>
7528
7529 * src/derives.c (print_derives): Display the ruleno.
7530 * src/lalr.c (initialize_F, transpose): Better variable locality
7531 to improve readability.
7532 Avoid variables used as mere abbreviations.
7533
7534 2001-12-05 Akim Demaille <akim@epita.fr>
7535
7536 * src/lalr.c (traverse): Use arrays instead of pointers.
7537
7538 2001-12-05 Akim Demaille <akim@epita.fr>
7539
7540 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7541 the handling of squeue.
7542 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7543
7544 2001-12-05 Akim Demaille <akim@epita.fr>
7545
7546 Because useless nonterminals are now kept alive (instead of being
7547 `destroyed'), we now sometimes examine them, and store information
7548 related to them. Hence we need to know their number, and adjust
7549 memory allocations.
7550
7551 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7552 static.
7553 * src/LR0.c (allocate_itemsets): The memory allocated to
7554 `symbol_count' was used for two different purpose: once to count
7555 the number of occurrences of each symbol, and later reassigned to
7556 `shift_symbol', containing the symbol that can be shifted from a
7557 given state.
7558 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7559 only, and...
7560 (new_itemsets): Allocate `shift_symbol' here.
7561 (allocate_itemsets): symbol_count includes useless nonterminals.
7562 Make room for them.
7563 (free_storage): Use `free', not `XFREE', for pointers that cannot
7564 be null.
7565
7566 2001-12-05 Akim Demaille <akim@epita.fr>
7567
7568 * src/nullable.c (set_nullable): Deobfuscate the handling of
7569 ritem.
7570 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7571
7572 2001-12-05 Akim Demaille <akim@epita.fr>
7573
7574 * src/gram.c, src/gram.h (ritem_print): New.
7575 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7576 (This useless function was defined only to work around VMS linkers
7577 that can't handle compilation units with variables only).
7578 * src/reduce.c (dump_grammar): Use it to trace the construction of
7579 ritem.
7580
7581 2001-12-04 Paul Eggert <eggert@twinsun.com>
7582
7583 * src/bison.simple (union yyalloc): Change member names
7584 to be the same as the stack names.
7585 (yyparse): yyptr is now union yyalloc *, not char *.
7586 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7587 and may generate better code on some machines.
7588 (yystpcpy): Use prototype if __STDC__ is defined, not just
7589 if __cplusplus is defined.
7590
7591 2001-11-30 Akim Demaille <akim@epita.fr>
7592
7593 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7594 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7595 Gettext doesn't compile cleanly, and dies with -Werror.
7596 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7597 Include WARNING_CFLAGS here.
7598 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7599 before being defined.
7600
7601 2001-11-27 Paul Eggert <eggert@twinsun.com>
7602
7603 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7604 First arg is int, not unsigned.
7605 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7606 (SIZE_MAX, UINT_MAX): New macros.
7607 (quotearg_n_options): Abort if N is negative.
7608 Avoid overflow check on hosts where size_t is 64 bits and int
7609 is 32 bits, as overflow is impossible there.
7610 Fix off-by-one typo that caused unnecessary reallocation.
7611
7612 2001-11-29 Paul Eggert <eggert@twinsun.com>
7613
7614 Name space cleanup in generated parser.
7615
7616 * doc/bison.texinfo (Bison Parser): Discuss system headers
7617 and their effect on the user name space.
7618
7619 * src/bison.simple:
7620 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7621 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7622 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7623
7624 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7625 on user names when possible.
7626
7627 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7628 Simplify test for whather <alloca.h> exists.
7629
7630 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7631
7632 (<stdio.h>): Include if YYDEBUG.
7633
7634 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7635 ! defined (yyoverflow) && ! defined (yymemcpy).
7636
7637 (yymemcpy, yyparse): Rename local variables as needed so that
7638 they all begin with 'yy'.
7639
7640 (yystrlen, yystpcpy): New functions.
7641
7642 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7643 All uses changed.
7644
7645 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7646 instead of relying on string.h functions. Use YYSTACK_ALLOC
7647 and YYSTACK_FREE instead of malloc and free.
7648
7649 2001-11-30 Akim Demaille <akim@epita.fr>
7650
7651 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7652 before their first uses.
7653 (YYBISON, YYPURE): Move to the top of the output.
7654
7655 2001-11-30 Akim Demaille <akim@epita.fr>
7656
7657 * tests/reduce.at (Useless Nonterminals): Fix.
7658
7659 2001-11-30 Akim Demaille <akim@epita.fr>
7660
7661 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7662 if body instead of `;' to pacify GCC's warnings.
7663
7664 2001-11-30 Akim Demaille <akim@epita.fr>
7665
7666 Instead of mapping the LHS of unused rules to -1, keep the LHS
7667 valid, but flag the rules as invalid.
7668
7669 * src/gram.h (rule_t): `useful' is a new member.
7670 * src/print.c (print_grammar): Adjust.
7671 * src/derives.c (set_derives): Likewise.
7672 * src/reader.c (packgram, reduce_output): Likewise.
7673 * src/reduce.c (reduce_grammar_tables): Likewise.
7674 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7675
7676 2001-11-30 Akim Demaille <akim@epita.fr>
7677
7678 * src/reduce.c (reduce_output): Formatting changes.
7679 * src/print.c (print_results, print_grammar): Likewise.
7680 * tests/regression.at (Rule Line Numbers)
7681 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7682
7683 2001-11-30 Akim Demaille <akim@epita.fr>
7684
7685 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7686 useless nonterminals, move them at the end of the symbol arrays.
7687 (reduce_output): Adjust.
7688 * tests/reduce.at (Useless Nonterminals): Adjust.
7689
7690 2001-11-30 Akim Demaille <akim@epita.fr>
7691
7692 * src/reduce.c: Various comment/formatting changes.
7693 (nonterminals_reduce): New, extracted from...
7694 (reduce_grammar_tables): here.
7695 (reduce_grammar): Call nonterminals_reduce.
7696
7697 2001-11-29 Paul Eggert <eggert@twinsun.com>
7698
7699 * src/bison.simple (YYSTACK_REALLOC): Remove.
7700 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7701 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7702 New macros.
7703 (union yyalloc): New type.
7704 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7705 an arbitrary restriction on hosts where size_t is wider than int.
7706
7707 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7708 a parser stack overflow. Allocate just one block of memory for all
7709 three stacks, instead of allocating three blocks; this typically is
7710 faster and reduces fragmentation.
7711
7712 Do not limit the number of items in the stack to a value that fits
7713 in 'int', as this is an arbitrary limit on hosts with 64-bit
7714 size_t and 32-bit int.
7715
7716 2001-11-29 Marc Autret <autret_m@epita.fr>
7717
7718 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7719 of defining YYERROR_VERBOSE.
7720 [AT_DATA]: $4 is now out of C declarations in the prologue.
7721
7722 2001-11-28 Marc Autret <autret_m@epita.fr>
7723
7724 * src/reader.c (parse_dquoted_param): New.
7725 (parse_skel_decl): Use it.
7726 * src/lex.h: Add its prototype.
7727 * src/lex.c (literalchar): Become not static.
7728
7729 2001-11-28 Marc Autret <autret_m@epita.fr>
7730
7731 * src/output.h: And put its extern declaration here.
7732 * src/output.c (error_verbose): Define here.
7733 (prepare): Echo name modification.
7734 * src/getargs.h: Clean its extern declaration.
7735 * src/getargs.c (error_verbose_flag): Remove.
7736 (getargs): Remove case 'e'.
7737 * src/options.c (option_table): 'error-verbose' is now seen as simple
7738 percent option.
7739 Include output.h.
7740
7741 * src/reader.c (read_declarations): Remove case tok_include.
7742 (parse_include_decl): Remove.
7743 * src/lex.h (token_t): Remove tok_include.
7744 * src/options.c (option_table): 'include' is now a simple command line
7745 option.
7746
7747 2001-11-28 Marc Autret <autret_m@epita.fr>
7748
7749 * src/bison.simple: Adjust muscle names.
7750 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7751 * src/output.c (prepare): s/_/-/ for the muscles names.
7752 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7753
7754 2001-11-28 Marc Autret <autret_m@epita.fr>
7755
7756 * src/bison.simple: Fix debug.
7757 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7758
7759 2001-11-28 Akim Demaille <akim@epita.fr>
7760
7761 * src/LR0.c (shifts_new): New.
7762 (save_shifts, insert_start_shift, augment_automaton): Use it.
7763
7764 2001-11-28 Akim Demaille <akim@epita.fr>
7765
7766 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7767 keep ruleno only.
7768
7769 2001-11-28 Akim Demaille <akim@epita.fr>
7770
7771 * src/closure.c (closure): Instead of looping over word in array
7772 then bits in words, loop over bits in array.
7773
7774 2001-11-28 Akim Demaille <akim@epita.fr>
7775
7776 * src/closure.c (closure): No longer optimize the special case
7777 where all the bits of `ruleset[r]' are set to 0, to make the code
7778 clearer.
7779
7780 2001-11-28 Akim Demaille <akim@epita.fr>
7781
7782 * src/closure.c (closure): `r' and `c' are new variables, used to
7783 de-obfuscate accesses to RULESET and CORE.
7784
7785 2001-11-28 Akim Demaille <akim@epita.fr>
7786
7787 * src/reduce.c (reduce_print): Use ngettext.
7788 (dump_grammar): Improve the trace accuracy.
7789
7790 2001-11-28 Akim Demaille <akim@epita.fr>
7791
7792 * src/reduce.c (dump_grammar): Don't translate trace messages.
7793
7794 2001-11-28 Akim Demaille <akim@epita.fr>
7795
7796 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7797 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7798 as all tags are free'ed afterwards.
7799 From Enrico Scholz.
7800
7801 2001-11-27 Paul Eggert <eggert@twinsun.com>
7802
7803 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7804 use alloca when we didn't want to, and vice versa.
7805
7806 2001-11-27 Marc Autret <autret_m@epita.fr>
7807
7808 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7809 initialization.
7810 * src/output.c (prepare): Remove its update.
7811
7812 2001-11-27 Marc Autret <autret_m@epita.fr>
7813
7814 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7815 Use %error-verbose.
7816
7817 2001-11-27 Marc Autret <autret_m@epita.fr>
7818
7819 * src/bison.simple: Remove YYERROR_VERBOSE using.
7820 Use %%error_verbose.
7821 (yyparse): Likewise.
7822 * src/output.c (prepare): Give its final value.
7823 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7824 * src/getargs.h: Add its extern declaration.
7825 * src/getargs.c (error_verbose_flag): New int.
7826 (getargs): Update to catch new case.
7827 * src/options.c (option_table): 'error-verbose' is a new option.
7828 (shortopts): Update.
7829
7830 2001-11-27 Akim Demaille <akim@epita.fr>
7831
7832 * src/system.h: Use intl/libgettext.h.
7833 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7834
7835 2001-11-27 Akim Demaille <akim@epita.fr>
7836
7837 * tests/torture.at (Exploding the Stack Size with Malloc):
7838 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7839
7840 2001-11-27 Akim Demaille <akim@epita.fr>
7841
7842 * src/files.c: Include error.h.
7843 Reported by Hans Aberg.
7844
7845 2001-11-26 Marc Autret <autret_m@epita.fr>
7846
7847 * src/reader.c (parse_include_decl): New, not yet implemented.
7848 (read_declarations): Add case tok_include.
7849 * src/getargs.h (include): Add its extern definition.
7850 * src/getargs.c (include): New const char *.
7851 (getargs): Add case '-I'.
7852 * src/options.c (option_table): Add include as command line and
7853 percent option.
7854 * src/lex.h (token_t): Add tok_include.
7855
7856 2001-11-26 Akim Demaille <akim@epita.fr>
7857
7858 * src/reader.c (readgram): Make sure rules for mid-rule actions
7859 have a lineno equal to that of their host rule.
7860 Reported by Hans Aberg.
7861 * tests/regression.at (Rule Line Numbers): New.
7862
7863 2001-11-26 Akim Demaille <akim@epita.fr>
7864
7865 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7866 size_ts.
7867
7868 2001-11-26 Akim Demaille <akim@epita.fr>
7869
7870 * src/complain.c, src/complain.h (error): Remove, provided by
7871 lib/error.[ch].
7872
7873 2001-11-26 Akim Demaille <akim@epita.fr>
7874
7875 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7876 issue an error message.
7877 * tests/regression.at (Invalid %directive): New.
7878 Reported by Hans Aberg.
7879
7880 2001-11-26 Akim Demaille <akim@epita.fr>
7881
7882 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7883 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7884
7885 2001-11-26 Akim Demaille <akim@epita.fr>
7886
7887 * src/conflicts.c (conflicts_print): Don't complain at all when
7888 there are no reduce/reduce conflicts, and as many shift/reduce
7889 conflicts as expected.
7890 * tests/regression.at (%expect right): Adjust.
7891
7892 2001-11-23 Akim Demaille <akim@epita.fr>
7893
7894 * lib/alloca.c: Update, from fileutils.
7895
7896 2001-11-23 Akim Demaille <akim@epita.fr>
7897
7898 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7899
7900 2001-11-23 Akim Demaille <akim@epita.fr>
7901
7902 * src/system.h: Include alloca.h.
7903 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7904
7905 2001-11-23 Akim Demaille <akim@epita.fr>
7906
7907 * src/print_graph.c (print_actions): Remove `rule', unused.
7908 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7909 pacify GCC's signed < unsigned warnings.
7910 * src/closure.c (itemsetsize): Likewise.
7911 * src/reader.c (symbol_list_new): Static.
7912
7913 2001-11-23 Akim Demaille <akim@epita.fr>
7914
7915 Attaching lineno to buckets is stupid, since only one copy of each
7916 symbol is kept, only the line of the first occurrence is kept too.
7917
7918 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7919 * src/reader.c (rline_allocated): Remove, unused.
7920 (symbol_list): Have a `line' member.
7921 (symbol_list_new): New.
7922 (readgram): Use it.
7923 * src/print.c (print_grammar): Output the rule line numbers.
7924 * tests/regression.at (Solved SR Conflicts)
7925 (Unresolved SR Conflicts): Adjust.
7926 Reported by Hans Aberg.
7927
7928 2001-11-22 Marc Autret <autret_m@epita.fr>
7929
7930 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7931
7932 2001-11-22 Marc Autret <autret_m@epita.fr>
7933
7934 * src/muscle_tab.c (muscle_init): Remove initialization of
7935 skeleton muscle.
7936 * src/output.c (output_master_parser): Do it here.
7937
7938 2001-11-20 Akim Demaille <akim@epita.fr>
7939
7940 * po/sv.po: New.
7941 * configure.in (ALL_LINGUAS): Adjust.
7942 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7943 longer contains strings to translate.
7944
7945 2001-11-19 Akim Demaille <akim@epita.fr>
7946
7947 * src/conflicts.c (conflicts_print): Add a missing \n.
7948
7949 2001-11-19 Akim Demaille <akim@epita.fr>
7950
7951 * src/nullable.c (nullable_print): New.
7952 (set_nullable): Call it when tracing.
7953 Better locality of variables.
7954
7955 2001-11-19 Akim Demaille <akim@epita.fr>
7956
7957 * src/print.c (print_actions): Better locality of variables.
7958
7959 2001-11-19 Akim Demaille <akim@epita.fr>
7960
7961 * src/derives.c (print_derives): Fix and enrich.
7962 * src/closure.c (print_fderives): Likewise.
7963
7964 2001-11-19 Akim Demaille <akim@epita.fr>
7965
7966 * src/closure.c (itemsetend): Remove, replaced with...
7967 (itemsetsize): new.
7968
7969 2001-11-19 Akim Demaille <akim@epita.fr>
7970
7971 * src/LR0.c (kernel_end): Remove, replaced with...
7972 (kernel_size): new.
7973
7974 2001-11-19 Akim Demaille <akim@epita.fr>
7975
7976 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7977 to clarify.
7978
7979 2001-11-19 Akim Demaille <akim@epita.fr>
7980
7981 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7982
7983 2001-11-19 Akim Demaille <akim@epita.fr>
7984
7985 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7986 trace messages.
7987 * src/LR0.c: Likewise.
7988 (allocate_itemsets): Use arrays instead of pointers to clarify.
7989
7990 2001-11-19 Akim Demaille <akim@epita.fr>
7991
7992 * src/getargs.c (statistics_flag): Replace with...
7993 (trace_flag): New.
7994 (longopts): Accept --trace instead of --statistics.
7995 * src/getargs.h, src/options.c: Adjust.
7996 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7997 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7998
7999 2001-11-19 Akim Demaille <akim@epita.fr>
8000
8001 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
8002 pointers to clarify the code.
8003 (save_reductions, save_shifts): Factor common parts of alternatives.
8004
8005 2001-11-19 Akim Demaille <akim@epita.fr>
8006
8007 * src/LR0.c (new_state, get_state): Complete TRACE code.
8008 * src/closure.c: Include `reader.h' to get `tags', needed by the
8009 trace code.
8010 Rename the conditional DEBUG as TRACE.
8011 Output consistently TRACEs to stderr, not stdout.
8012 * src/derives.c: Likewise.
8013 * src/reduce.c: (inaccessable_symbols): Using if is better style
8014 than goto.
8015 Use `#if TRACE' instead of `#if 0' for tracing code.
8016
8017 2001-11-19 Akim Demaille <akim@epita.fr>
8018
8019 * src/system.h (LIST_FREE, shortcpy): New.
8020 * src/LR0.c: Use them.
8021 * src/output.c (free_itemsets, free_reductions, free_shifts):
8022 Remove, replaced by LIST_FREE.
8023
8024 2001-11-19 Akim Demaille <akim@epita.fr>
8025
8026 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8027 (REDUCTIONS_ALLOC): New.
8028 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8029 allocation.
8030
8031 2001-11-19 Akim Demaille <akim@epita.fr>
8032
8033 * src/LR0.c (new_state): Complete trace code.
8034 * src/nullable.c (set_nullable): Don't translate traces.
8035
8036 2001-11-19 Akim Demaille <akim@epita.fr>
8037
8038 * src/print_graph.c (print_core): Better locality of variables.
8039 * src/print.c (print_core): Likewise.
8040
8041 2001-11-19 Akim Demaille <akim@epita.fr>
8042
8043 * src/vcg.c: You do the output, so you are responsible of the
8044 handling of VCG syntax, in particular: use quotearg.
8045 * src/print_graph.c: Don't.
8046 (print_actions): Don't output the actions as part of the nodes,
8047 since that's the job of the edges.
8048 (print_state): Don't output by hand: fill the node description,
8049 and ask for its output.
8050
8051 2001-11-19 Akim Demaille <akim@epita.fr>
8052
8053 * src/bison.simple (yyparse): When verbosely reporting an error,
8054 no longer put additional quotes around token names.
8055 * tests/calc.at: Adjust.
8056
8057 2001-11-19 Akim Demaille <akim@epita.fr>
8058
8059 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8060 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8061 * src/output.c: Adjust.
8062
8063 2001-11-19 Akim Demaille <akim@epita.fr>
8064
8065 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8066 (rule_t): this.
8067 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8068
8069 2001-11-19 Akim Demaille <akim@epita.fr>
8070
8071 * src/gram.h (rule_t): New.
8072 (rule_table): New.
8073 (rrhs, rlhs): Remove, part of state_t.
8074 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8075 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8076 * src/reader.c, src/reduce.c: Adjust.
8077
8078 2001-11-19 Akim Demaille <akim@epita.fr>
8079
8080 * src/reader.c (symbols_output): New, extracted from...
8081 (packsymbols): Here.
8082 (reader): Call it.
8083
8084 2001-11-19 Akim Demaille <akim@epita.fr>
8085
8086 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8087 (maxrhs): this new function.
8088
8089 2001-11-19 Akim Demaille <akim@epita.fr>
8090
8091 * src/lalr.c (F): New macro to access the variable F.
8092 Adjust.
8093
8094 2001-11-19 Akim Demaille <akim@epita.fr>
8095
8096 * src/lalr.h (LA): New macro to access the variable LA.
8097 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8098 * src/lalr.c: Adjust.
8099
8100 2001-11-19 Akim Demaille <akim@epita.fr>
8101
8102 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8103 (set_state_table): handle the `lookaheads' members.
8104
8105 2001-11-19 Akim Demaille <akim@epita.fr>
8106
8107 * src/lalr.h (lookaheads): Removed array, whose contents is now
8108 a member of...
8109 (state_t): this structure.
8110 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8111 Adjust.
8112
8113 2001-11-19 Akim Demaille <akim@epita.fr>
8114
8115 * src/lalr.h (consistent): Removed array, whose contents is now
8116 a member of...
8117 (state_t): this structure.
8118 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8119 Adjust.
8120
8121 2001-11-19 Akim Demaille <akim@epita.fr>
8122
8123 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8124 contents are now members of...
8125 (state_t): this structure.
8126 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8127 Adjust.
8128
8129 2001-11-19 Akim Demaille <akim@epita.fr>
8130
8131 * src/lalr.h (state_t): New.
8132 (state_table): Be a state_t * instead of a core **.
8133 (accessing_symbol): Remove, part of state_t.
8134 * src/lalr.c: Adjust.
8135 (set_accessing_symbol): Merge into...
8136 (set_state_table): this.
8137 * src/print_graph.c, src/conflicts.c: Adjust.
8138
8139 2001-11-14 Akim Demaille <akim@epita.fr>
8140
8141 * tests/calc.at, tests/output.at, tests/regression.at,
8142 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8143 now the tests are run in private dirs, therefore AC_CLEANUP and
8144 family can be simplified to 0-ary.
8145 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8146 use abs. path to find config.h.
8147 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8148 stderr, there can be way too much random noise.
8149 Instead pass -Werror to GCC and rely on the exit status.
8150 Reported by Wolfram Wagner.
8151
8152 2001-11-14 Akim Demaille <akim@epita.fr>
8153
8154 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8155 defined only if yyoverflow is defined, to avoid `warning: unused
8156 variable `yyvs1''.
8157 Reported by The Test Suite.
8158
8159 2001-11-14 Akim Demaille <akim@epita.fr>
8160
8161 * src/print.c: Include reduce.h.
8162 Reported by Hans Aberg.
8163
8164 2001-11-14 Akim Demaille <akim@epita.fr>
8165
8166 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8167 Revert a previous patch: these are really const.
8168 * src/conflicts.c (conflict_report): Additional useless pair of
8169 braces to pacify GCC's warnings for `if () if () {} else {}'.
8170 * src/lex.c (parse_percent_token): Replace equal_offset with
8171 arg_offset.
8172 arg is const.
8173 Be sure to strdup `arg' when used, since there is no reason for
8174 token_buffer not to change.
8175
8176 2001-11-14 Akim Demaille <akim@epita.fr>
8177
8178 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8179 definition.
8180 * src/main.c (main): Use them.
8181 Suggested by Hans Aberg.
8182
8183 2001-11-12 Akim Demaille <akim@epita.fr>
8184
8185 * src/system.h (ngettext): Now that we use ngettext, be sure to
8186 provide a default definition when NLS are not used.
8187
8188 2001-11-12 Akim Demaille <akim@epita.fr>
8189
8190 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8191 Use @kbd to denote user input.
8192 (Language and Grammar): ANSIfy the example.
8193 Adjust its layout for info/notinfo.
8194 (Location Tracking Calc): Output error messages to stderr.
8195 Output locations in a more GNUtically correct way.
8196 Fix a couple of Englishos.
8197 Adjust @group/@end group pairs.
8198
8199 2001-11-12 Akim Demaille <akim@epita.fr>
8200
8201 %expect was not functioning at all.
8202
8203 * src/conflicts.c (expected_conflicts): Set to -1.
8204 (conflict_report): Use ngettext.
8205 (conflicts_print): Check %expect and make its violation an error.
8206 * doc/bison.texinfo (Expect Decl): Adjust.
8207 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8208 * tests/regression.at (%expect not enough, %expect right)
8209 (%expect too much): New.
8210
8211 2001-11-12 Akim Demaille <akim@epita.fr>
8212
8213 * tests/regression.at (Conflicts): Rename as...
8214 (Unresolved SR Conflicts): this.
8215 (Solved SR Conflicts): New.
8216
8217 2001-11-12 Akim Demaille <akim@epita.fr>
8218
8219 * src/reduce.c (print_results): Rename as...
8220 (reduce_output): This.
8221 Output to OUT, passed as argument, instead of output_obstack.
8222 (dump_grammar): Likewise.
8223 (reduce_free): New.
8224 Also free V1.
8225 (reduce_grammar): No longer call reduce_output, since...
8226 * src/print.c (print_results): do it.
8227 * src/main.c (main): Call reduce_free;
8228
8229 2001-11-12 Akim Demaille <akim@epita.fr>
8230
8231 * src/conflicts.c (print_reductions): Accept OUT as argument.
8232 Output to it, not to output_obstack.
8233 * src/print.c (print_actions): Adjust.
8234
8235 2001-11-12 Akim Demaille <akim@epita.fr>
8236
8237 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8238 the result instead of using...
8239 (src_total, rrc_total, src_count, rrc_count): Remove.
8240 (any_conflicts): Remove.
8241 (print_conflicts): Split into...
8242 (conflicts_print, conflicts_output): New.
8243 * src/conflicts.h: Adjust.
8244 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8245 * src/print.c (print_grammar): Issue `\n' between two rules.
8246 * tests/regression.at (Conflicts): New.
8247 Reported by Tom Lane.
8248
8249 2001-11-12 Akim Demaille <akim@epita.fr>
8250
8251 * tests/regression.at (Invalid input): Remove, duplicate with
8252 ``Invalid input: 1''.
8253
8254 2001-11-12 Akim Demaille <akim@epita.fr>
8255
8256 * tests/torture.at (AT_DATA_STACK_TORTURE)
8257 (Exploding the Stack Size with Alloca)
8258 (Exploding the Stack Size with Malloc): New.
8259
8260 2001-11-12 Akim Demaille <akim@epita.fr>
8261
8262 * src/bison.simple (YYSTACK_REALLOC): New.
8263 (yyparse) [!yyoverflow]: Use it and free the old stack.
8264 Reported by Per Allansson.
8265
8266 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8267
8268 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8269 define CPP macro, which substitute YYSTYPE by yystype.
8270 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8271 with yyltype/YYLTYPE. This allows inclusion of the generated
8272 header within the parser if the compiler, such as GGC, accepts
8273 multiple equivalent #defines.
8274 From Akim.
8275
8276 2001-11-05 Akim Demaille <akim@epita.fr>
8277
8278 * src/reader.c (symbols_output): New, extracted from...
8279 (packsymbols): here.
8280 (reader): Adjust.
8281
8282 2001-11-05 Akim Demaille <akim@epita.fr>
8283
8284 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8285
8286 2001-11-05 Akim Demaille <akim@epita.fr>
8287
8288 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8289 pattern.
8290
8291 2001-11-05 Akim Demaille <akim@epita.fr>
8292
8293 * src/options.h (struct option_table_struct): set_flags is void*.
8294 * src/options.c (longopts): Support `--output' and `%output'.
8295 (usage): Adjust.
8296 * src/lex.h (tok_setopt): Remove, replaced with...
8297 (tok_intopt, tok_stropt): these new guys.
8298 * src/lex.c (getopt.h): Not needed.
8299 (token_buffer, unlexed_token_buffer): Not const.
8300 (percent_table): Promote `-' over `_' in directive names.
8301 Active `%name-prefix', `file-prefix', and `output'.
8302 (parse_percent_token): Accept possible arguments to directives.
8303 Promote `-' over `_' in directive names.
8304
8305 2001-11-04 Akim Demaille <akim@epita.fr>
8306
8307 * doc/bison.texinfo (Decl Summary): Split the list into
8308 `directives for grammars' and `directives for bison'.
8309 Sort'em.
8310 Add description of `%name-prefix', `file-prefix', and `output'.
8311 Promote `-' over `_' in directive names.
8312 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8313 Simplify the description of `--name-prefix'.
8314 Promote `-' over `_' in directive names.
8315 Promote `--output' over `--output-file'.
8316 Fix the description of `--defines'.
8317 * tests/output.at: Exercise %file-prefix and %output.
8318
8319 2001-11-02 Akim Demaille <akim@epita.fr>
8320
8321 * doc/refcard.tex: Update.
8322
8323 2001-11-02 Akim Demaille <akim@epita.fr>
8324
8325 * src/symtab.h (SUNDEF): New.
8326 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8327 stand for `uninitialized', instead of 0.
8328 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8329 * src/lex.c (lex): Adjust.
8330
8331 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8332 Number it 0.
8333 Let yylex return it instead of a plain 0.
8334 Reported by Dick Streefland.
8335
8336 2001-11-02 Akim Demaille <akim@epita.fr>
8337
8338 * tests/regression.at (Mixing %token styles): New test.
8339
8340 2001-11-02 Akim Demaille <akim@epita.fr>
8341
8342 * src/reader.c (parse_thong_decl): Formatting changes.
8343 (token_translations_init): New, extracted from...
8344 (packsymbols): Here.
8345 Adjust.
8346
8347 2001-11-01 Akim Demaille <akim@epita.fr>
8348
8349 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8350 Check that `9foo.y' produces correct cpp guards.
8351 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8352 guards.
8353 Reported by Wwp.
8354
8355 2001-11-01 Akim Demaille <akim@epita.fr>
8356
8357 * tests/regression.at (Invalid input: 2): New.
8358 * src/lex.c (unlexed_token_buffer): New.
8359 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8360 too.
8361 Reported by Wwp.
8362
8363 2001-11-01 Akim Demaille <akim@epita.fr>
8364
8365 * tests/calc.at: Catch up with 1.30.
8366 * configure.in: Bump to 1.49a.
8367 Adjust to newer Autotest.
8368
8369 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8370
8371 * src/conflicts.c: Move global variables rrc_total and src_total ...
8372 (print_conflicts): here.
8373 * src/output.c (output): Free global variable user_toknums.
8374 * src/lex.c (token_obstack): Become static.
8375
8376 2001-10-18 Akim Demaille <akim@epita.fr>
8377
8378 * tests/atlocal.in (GCC): Add.
8379 * tests/calc.at: s/m4_match/m4_bmatch/.
8380 s/m4_patsubst/m4_bpatsubst/.
8381 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8382 * configure.in: AC_SUBST(GCC).
8383
8384 2001-10-14 Marc Autret <autret_m@epita.fr>
8385
8386 * src/options.c (create_long_option_table): Fix.
8387
8388 2001-10-10 Akim Demaille <akim@epita.fr>
8389
8390 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8391
8392 2001-10-04 Akim Demaille <akim@epita.fr>
8393
8394 * src/reader.c (parse_union_decl): Push the caracters in
8395 union_obstack, not attrs_obstack.
8396
8397 2001-10-04 Akim Demaille <akim@epita.fr>
8398
8399 Merge in the branch 1.29.
8400
8401 * src/reader.c (packsymbols): Use a temporary obstack for
8402 `%%tokendef', since output_stack is already used elsewhere.
8403
8404 2001-10-02 Akim Demaille <akim@epita.fr>
8405
8406 Bump 1.29d.
8407
8408 2001-10-02 Akim Demaille <akim@epita.fr>
8409
8410 Version 1.29c.
8411
8412 2001-10-02 Akim Demaille <akim@epita.fr>
8413
8414 * tests/regression.at (Invalid CPP headers): New.
8415 From Alexander Belopolsky.
8416 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8417
8418 2001-10-02 Akim Demaille <akim@epita.fr>
8419
8420 * tests/regression.at (Invalid input): New.
8421 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8422 Reported by Shura.
8423
8424 2001-10-02 Akim Demaille <akim@epita.fr>
8425
8426 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8427
8428 2001-10-02 Akim Demaille <akim@epita.fr>
8429
8430 * src/output.c (output_parser): Assert `skeleton'.
8431 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8432 systems.
8433 From Shura.
8434
8435 2001-10-01 Marc Autret <autret_m@epita.fr>
8436
8437 * src/lex.h: Echo modifications.
8438 * src/lex.c (unlex): Parameter is now token_t.
8439 From Hans Aberg.
8440
8441 2001-10-01 Marc Autret <autret_m@epita.fr>
8442
8443 * src/main.c: Include lex.h.
8444 From Hans Aberg.
8445
8446 2001-09-29 Akim Demaille <akim@epita.fr>
8447
8448 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8449
8450 2001-09-28 Akim Demaille <akim@epita.fr>
8451
8452 * tests/testsuite.at: Update to newer Autotest.
8453 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8454
8455 2001-09-27 Akim Demaille <akim@epita.fr>
8456
8457 Position independent wrapper.
8458
8459 * tests/bison: Remove.
8460 * tests/bison.in: New.
8461 * configure.in: Adjust.
8462
8463 2001-09-27 Paul Eggert <eggert@twinsun.com>
8464
8465 Port quotearg fixes from tar 1.13.24.
8466
8467 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8468 tm to be declared.
8469 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8470 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8471
8472 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8473 * m4/mbrtowc.m4: New file.
8474 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8475 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8476
8477 2001-09-27 Akim Demaille <akim@epita.fr>
8478
8479 Bump to 1.29c.
8480
8481 2001-09-27 Akim Demaille <akim@epita.fr>
8482
8483 Version 1.29b.
8484
8485 2001-09-25 Akim Demaille <akim@epita.fr>
8486
8487 * src/system.h: Include `xalloc.h'.
8488 Remove it from the C files.
8489 * src/files.c (output_files): Free the obstacks.
8490 * src/lex.c (init_lex): Rename as...
8491 (lex_init): this.
8492 (lex_free): New.
8493 * src/main.c (main): Use it.
8494
8495 2001-09-24 Marc Autret <autret_m@epita.fr>
8496
8497 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8498 to output informations in fout (FILE*).
8499 (open_graph, close_graph): Likewise.
8500 (output_graph, output_edge, output_node): Likewise.
8501 * src/vcg.h: Update function prototypes.
8502 * src/print_graph.c (print_graph): Open output graph file.
8503 (print_actions): Adjust.
8504 * src/files.h: Remove extern declaration.
8505 * src/files.c: Remove graph_obstack declaration.
8506 (open_files): Remove graph_obstack initialization.
8507 (output_files): Remove graph_obstack saving.
8508
8509 2001-09-24 Marc Autret <autret_m@epita.fr>
8510
8511 * src/files.c (compute_output_file_names): Fix.
8512
8513 2001-09-24 Marc Autret <autret_m@epita.fr>,
8514 Akim Demaille <akim@epita.fr>
8515
8516 * src/reader.c (reader): Remove call to free_symtab ().
8517 * src/main.c (main): Call it here.
8518 Include symtab.h.
8519 * src/conflicts.c (initialize_conflicts): Rename as...
8520 (solve_conflicts): this.
8521 * src/print.c (print_core, print_actions, print_state)
8522 (print_grammar): Dump to a file instead a `output_obstack'.
8523 (print_results): Dump `output_obstack', and then proceed with the
8524 FILE *.
8525 * src/files.c (compute_output_file_names, close_files): New.
8526 (output_files): Adjust.
8527 * src/main.c (main): Adjust.
8528
8529 2001-09-23 Marc Autret <autret_m@epita.fr>
8530
8531 * src/files.c (compute_header_macro): Computes header macro name
8532 from spec_defines_file when given.
8533
8534 2001-09-23 Marc Autret <autret_m@epita.fr>
8535
8536 * src/files.c (output_files): Add default extensions.
8537
8538 2001-09-22 Akim Demaille <akim@epita.fr>
8539
8540 * src/conflicts.c (finalize_conflicts): Rename as...
8541 (free_conflicts): this.
8542
8543 2001-09-22 Akim Demaille <akim@epita.fr>
8544
8545 * src/gram.c (gram_free): Rename back as...
8546 (dummy): this.
8547 (output_token_translations): Free `token_translations'.
8548 * src/symtab.c (free_symtab): Free the tag field.
8549
8550 2001-09-22 Akim Demaille <akim@epita.fr>
8551
8552 Remove `translations' as it is always set to true.
8553
8554 * src/gram.h: Adjust.
8555 * src/reader.c (packsymbols, parse_token_decl): Adjust
8556 * src/print.c (print_grammar): Adjust.
8557 * src/output.c (output_token_translations): Adjust.
8558 * src/lex.c (lex): Adjust.
8559 * src/gram.c: Be sure the set pointers to NULL.
8560 (dummy): Rename as...
8561 (gram_free): this.
8562
8563 2001-09-22 Akim Demaille <akim@epita.fr>
8564
8565 * configure.in: Invoke AM_LIB_DMALLOC.
8566 * src/system.h: Use dmalloc.
8567 * src/LR0.c: Be sure to have pointers initialized to NULL.
8568 (allocate_itemsets): Allocate kernel_items only if needed.
8569
8570 2001-09-22 Akim Demaille <akim@epita.fr>
8571
8572 * configure.in: Bump to 1.29b.
8573 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8574 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8575 need xmalloc.c in calc.y.
8576 From Pascal Bart.
8577
8578 2001-09-21 Akim Demaille <akim@epita.fr>
8579
8580 Version 1.29a.
8581 * Makefile.maint, config/config.guess, config/config.sub,
8582 * config/missing: Update from masters.
8583 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8584 upon package.m4.
8585 * configure.in (ALL_LINGUAS): Add `tr'.
8586
8587 2001-09-21 Akim Demaille <akim@epita.fr>
8588
8589 * tests/Makefile.am (package.m4): Move to...
8590 ($(srcdir)/$(TESTSUITE)): here.
8591
8592 2001-09-20 Akim Demaille <akim@epita.fr>
8593
8594 * src/complain.c: No longer try to be standalone: use system.h.
8595 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8596 * src/complain.h: Likewise.
8597 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8598 Remove the unused variable `n'.
8599 From Albert Chin-A-Young.
8600
8601 2001-09-18 Marc Autret <autret_m@epita.fr>
8602
8603 * doc/bison.1: Update.
8604 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8605 descriptions.
8606 (Option Cross Key): Update.
8607 Add --graph.
8608
8609 2001-09-18 Marc Autret <autret_m@epita.fr>
8610
8611 * tests/regression.at: New test (comment in %union).
8612
8613 2001-09-18 Marc Autret <autret_m@epita.fr>
8614
8615 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8616 do that.
8617 Reported by Keith Browne.
8618
8619 2001-09-18 Marc Autret <autret_m@epita.fr>
8620
8621 * tests/output.at: Add tests for --defines and --graph.
8622
8623 2001-09-18 Marc Autret <autret_m@epita.fr>
8624
8625 * tests/output.at: Removes tests of %{header,src}_extension features.
8626
8627 2001-09-18 Akim Demaille <akim@epita.fr>
8628
8629 * tests/Makefile.am (package.m4): New.
8630 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8631 (_AT_CHECK_CALC_ERROR): Likewise.
8632 Factor the `, ' part of verbose error messages.
8633
8634 2001-09-18 Marc Autret <autret_m@epita.fr>
8635
8636 * src/getargs.c (longopts): Declare --defines and --graph as options
8637 with optional arguments.
8638 * src/files.h: Add extern declarations.
8639 * src/files.c (spec_graph_file, spec_defines_file): New.
8640 (output_files): Update.
8641 Remove CPP-outed code.
8642
8643 2001-09-18 Marc Autret <autret_m@epita.fr>
8644
8645 Turn off %{source,header}_extension feature.
8646
8647 * src/files.c (compute_exts_from_gf): Update.
8648 (compute_exts_from_src): Update.
8649 (output_files): CPP-out useless code.
8650 * src/files.h: Remove {header,source}_extension extern declarations.
8651 * src/reader.c (parse_dquoted_param): CPP-out.
8652 (parse_header_extension_decl): Remove.
8653 (parse_source_extension_decl): Remove.
8654 (read_declarations): Remove cases tok_{hdrext,srcext}.
8655 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8656 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8657
8658 2001-09-10 Akim Demaille <akim@epita.fr>
8659
8660 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8661 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8662 (AT_CHECK_OUTPUT): this.
8663 Merely check ls' exit status, its output is useless.
8664
8665 2001-09-10 Akim Demaille <akim@epita.fr>
8666
8667 * tests/calc.at: Use m4_match.
8668 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8669
8670 2001-09-10 Marc Autret <autret_m@epita.fr>,
8671 Akim Demaille <akim@epita.fr>
8672
8673 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8674 enum color_e.
8675 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8676 to `normal'.
8677 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8678 * src/lex.h: Adjust prototype.
8679 (token_t): Add `tok_undef'.
8680 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8681 (parse_percent_token): Now returns token_t.
8682 Add default statement in switch.
8683 (lex): Separate `c' as an input variable, from the token_t result
8684 part.
8685 (unlexed): Is a token_t.
8686
8687 2001-09-10 Akim Demaille <akim@epita.fr>
8688
8689 * configure.in: Bump to 1.29a.
8690
8691 2001-09-07 Akim Demaille <akim@epita.fr>
8692
8693 Version 1.29.
8694
8695 2001-08-30 Akim Demaille <akim@epita.fr>
8696
8697 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8698 * m4/atconfig.m4: Remove.
8699 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8700 * tests/bison: New.
8701 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8702 m4_if, m4_patsubst, and m4_regexp.
8703 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8704 `input' file instead of echo.
8705
8706 2001-08-29 Akim Demaille <akim@epita.fr>
8707
8708 Bump to 1.28e.
8709
8710 2001-08-29 Akim Demaille <akim@epita.fr>
8711
8712 Version 1.28d.
8713
8714 2001-08-29 Paul Eggert <eggert@twinsun.com>
8715
8716 * src/bison.simple (yyparse): Don't take the address of an
8717 item before the start of an array, as that doesn't conform to
8718 the C Standard.
8719
8720 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8721
8722 * doc/bison.texinfo (Location Tracking Calc): New node.
8723
8724 2001-08-29 Paul Eggert <eggert@twinsun.com>
8725
8726 * src/output.c (output): Do not define const, as this now
8727 causes more problems than it cures.
8728
8729 2001-08-29 Akim Demaille <akim@epita.fr>
8730
8731 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8732 the nodes.
8733 Be sure to tag the `detailmenu'.
8734
8735 2001-08-29 Akim Demaille <akim@epita.fr>
8736
8737 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8738 download in a tmp dir.
8739
8740 2001-08-28 Marc Autret <autret_m@epita.fr>
8741
8742 * config/depcomp: New file.
8743
8744 2001-08-28 Marc Autret <autret_m@epita.fr>
8745
8746 * doc/bison.1 (mandoc): Adjust.
8747 From Juan Manuel Guerrero.
8748
8749 2001-08-28 Marc Autret <autret_m@epita.fr>
8750
8751 * src/print_graph.c (print_state): Fix.
8752
8753 2001-08-27 Marc Autret <autret_m@epita.fr>
8754
8755 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8756 char * members.
8757 Echo modifications to the functions prototypes.
8758 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8759
8760 2001-08-27 Marc Autret <autret_m@epita.fr>
8761
8762 * src/vcg.c: Include `xalloc.h'.
8763 (add_colorentry): New.
8764 (add_classname): New.
8765 (add_infoname): New.
8766 * src/vcg.h: Add new prototypes.
8767
8768 2001-08-27 Akim Demaille <akim@epita.fr>
8769
8770 * Makefile.maint: Sync. again with CVS Autoconf.
8771
8772 2001-08-27 Akim Demaille <akim@epita.fr>
8773
8774 * Makefile.maint: Formatting changes.
8775 (po-update, cvs-update, update): New targets.
8776 (AMTAR): Remove.
8777
8778 2001-08-27 Akim Demaille <akim@epita.fr>
8779
8780 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8781 * Makefile.maint: Sync. with CVS Autoconf.
8782
8783 2001-08-27 Marc Autret <autret_m@epita.fr>
8784
8785 * src/vcg.h (struct infoname_s): New.
8786 (struct colorentry_s): New.
8787 (graph_s): New fields {vertical,horizontal}_order in structure.
8788 Add `infoname' field.
8789 Add `colorentry' field;
8790 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8791 (G_HORIZONTAL_ORDER): New.
8792 (G_INFONAME): New.
8793 (G_COLORENTRY): New.
8794 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8795 Add output of `infoname'.
8796 Add output of `colorentry'.
8797
8798 2001-08-27 Marc Autret <autret_m@epita.fr>
8799
8800 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8801 This one shadowed a global parameter.
8802
8803 2001-08-24 Marc Autret <autret_m@epita.fr>
8804
8805 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8806 instead of `unsigned'.
8807 (print_state): Do not call obstack_object_size () in obstack_grow ()
8808 to avoid macro variables shadowing.
8809
8810 2001-08-23 Marc Autret <autret_m@epita.fr>
8811
8812 * src/lex.c (percent_table): Typo: s/naem/name/.
8813 Add graph option.
8814 Normalize new options declarations.
8815
8816 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8817
8818 * tests/suite.at: Exercise %header_extension and %source_extension.
8819
8820 2001-08-16 Marc Autret <autret_m@epita.fr>
8821
8822 * src/reader.c (parse_dquoted_param): New.
8823 (parse_header_extension_decl): Use it.
8824 (parse_source_extension_decl): Likewise.
8825
8826 2001-08-16 Marc Autret <autret_m@epita.fr>
8827
8828 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8829 (get_xxxx_str): Use assert () instead of complain ().
8830 Remove return invokations in default cases.
8831 (get_decision_str): Modify default behaviour. Remove second argument.
8832 Echo modifications on calls.
8833 (output_graph): Fix.
8834
8835 2001-08-16 Marc Autret <autret_m@epita.fr>
8836
8837 * src/getargs.c (usage): Update with ``-g, --graph''.
8838
8839 2001-08-16 Marc Autret <autret_m@epita.fr>
8840
8841 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8842 (Option Cross Key): Likewise.
8843 * doc/bison.1: Update.
8844
8845 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8846
8847 * src/output.c (output_master_parser): Don't finish action_obstack.
8848 (output_parser): Don't care about the muscle action, here.
8849 (prepare): Copy the action_obstack in the action muscle.
8850 (output): Free action_obstack.
8851
8852 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8853
8854 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8855 will contain `%union' declaration.
8856 (parse_union_decl): Delete #line directive output.
8857 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8858 informations about %union.
8859 (parse_union_decl): Copy the union_obstack in the muscle stype.
8860 * src/bison.simple: Add new #line directive.
8861 Add typdef %%stype YYSTYPE.
8862
8863 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8864
8865 * src/bison.simple: Add new `#line' directive.
8866
8867 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8868
8869 * src/bison.simple: New `#line' directive.
8870 * src/output.c (output_parser): Support new dynamic muscle input_line.
8871
8872 2001-09-22 Marc Autret <autret_m@epita.fr>
8873
8874 * src/output.c (output_master_parser): New.
8875 (output_parser): Be more re-entrant.
8876
8877 2001-09-21 Marc Autret <autret_m@epita.fr>
8878
8879 * src/reader.c (copy_definition, parse_union_decl): Update and use
8880 `linef' muscle.
8881 (copy_action): Likewise.
8882 Use obstack_1grow ().
8883 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8884
8885 2001-09-21 Marc Autret <autret_m@epita.fr>
8886
8887 * src/options.c (option_table): Adjust.
8888 * src/lex.c (parse_percent_token): Fix.
8889
8890 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8891
8892 * src/options.c (symtab.h): Include it, need by lex.h.
8893
8894 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8895
8896 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8897 is now an option_table_struct*.
8898 (option_strcmp): New function option_strcmp.
8899 (parse_percent_token): Call option_strcmp.
8900 * src/getargs.c (xalloc.h, options.h): Include it.
8901 (getargs): Call create_long_option_table.
8902 (getargs): Free longopts at the end of the function.
8903 (shortopts): Move in options.c.
8904 * src/options.c (create_long_option_table): New function. Convert
8905 information from option_table to option structure.
8906 * src/reader.c (options.h): Include it.
8907
8908 * src/Makefile.am: Adjust.
8909 * src/options.c (option_table): Create from longopts and percent_table.
8910 * src/getargs.c (longopts): Delete.
8911 * src/lex.c (struct percent_table_struct): Delete.
8912 (percent_table): Delete.
8913 (options.h): Include it.
8914 * src/options.c: Create.
8915 * src/options.h: Create.
8916 Declare enum opt_access_e.
8917 Define struct option_table_struct.
8918
8919 2001-09-20 Marc Autret <autret_m@epita.fr>
8920
8921 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8922 sections of Bison.
8923
8924 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8925
8926 * src/bison.simple: s/%%filename/%%skeleton.
8927 * src/muscle_tab.c (getargs.h): Include it.
8928 (muscle_init): Insert new muscle skeleton.
8929
8930 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8931
8932 * src/output.c (output_parser): Delete unused variable actions_dumped.
8933
8934 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8935
8936 * src/output.c (output): Delete call to reader_output_yylsp.
8937 * src/reader.c (reader): Likewise.
8938 * src/reader.h: Delete declaration of reader_output_yylsp.
8939
8940 2001-09-02 Marc Autret <autret_m@epita.fr>
8941
8942 * src/reader.c: Include muscle_tab.h.
8943 (parse_union_decl): Update.
8944 (parse_macro_decl): Rename parse_muscle_decl.
8945 Update to use renamed functions and variable.
8946 (read_declarations, copy_action, read_additionnal_code, : Updated
8947 with correct variables and functions names.
8948 (packsymbols, reader): Likewise.
8949
8950 * src/reader.h (muscle_obstack): Extern declaration update.
8951
8952 * src/output.c: Include muscle_tab.h
8953 In all functions using macro_insert, change by using muscle_insert ().
8954 (macro_obstack): Rename muscle_obstack.
8955 Echo modifications in the whole file.
8956 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8957 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8958 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8959
8960 * src/muscle_tab.h: Update double inclusion macros.
8961 (macro_entry_s): Rename muscle_entry_s.
8962 Update prototypes.
8963
8964 * src/muscle_tab.c: Include muscle_tab.h.
8965 Rename macro_tabble to muscle_table.
8966 (mhash1, mhash2, mcmp): Use muscle_entry.
8967 (macro_init): Rename muscle_init. Update.
8968 (macro_insert): Rename muscle_insert. Update.
8969 (macro_find): Rename muscle_find. Update.
8970
8971 * src/main.c: Include muscle_tab.h.
8972 (main): Call muscle_init ().
8973 * src/Makefile.am (bison_SOURCES): Echo modifications.
8974
8975 2001-09-02 Marc Autret <autret_m@epita.fr>
8976
8977 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8978
8979 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8980
8981 2001-09-02 Marc Autret <autret_m@epita.fr>
8982
8983 * src/macrotab.c, src/macrotab.h: Remove.
8984
8985 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8986
8987 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8988 filename.
8989
8990 2001-09-01 Marc Autret <autret_m@epita.fr>
8991
8992 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8993 to an explicit value to activate the feature. We do it here.
8994
8995 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8996
8997 * src/output.c (prepare): Delete the `filename' muscule insertion.
8998 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8999 (parse_union_decl): Likewise.
9000 * src/macrotab.c (macro_init): Initialize filename by infile.
9001
9002 2001-08-31 Marc Autret <autret_m@epita.fr>
9003
9004 * src/bison.simple (YYLSP_NEEDED): New definition.
9005 * src/output.c (prepare): Add macro insertion of `locations_flag'
9006
9007 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9008
9009 * src/output.c (prepare): Delete insertion of previous muscles,
9010 and insert the `prefix' muscles.
9011 * src/macrotab.c (macro_init): Likewise.
9012 (macro_init): Initialization prefix directive by `yy'.
9013 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9014 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9015 yylval, yydebug, yyerror, yynerrs and yyparse.
9016 New directive `#define' to substitute yydebug, ... with option
9017 name_prefix.
9018
9019 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9020
9021 * src/main.c (main): Standardize.
9022 * src/output.c (output_table_data, output_parser): Likewise.
9023 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9024
9025 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9026
9027 * src/reader.c (read_additionnal_code): Rename %%user_code to
9028 %%epilogue.
9029 * src/output.c (output): Rename %%declarations to %%prologue.
9030 * src/bison.simple: Echo modifications.
9031
9032 2001-08-31 Marc Autret <autret_m@epita.fr>
9033
9034 * src/reader.c (readgram): CleanUp.
9035 (output_token_defines): Likewise.
9036 (packsymbols): Likewise.
9037 (reader): Likewise.
9038 * src/output.c (output): CPP-out useless code.
9039
9040 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9041
9042 * src/reader.c (reader): Delete obsolete call to function
9043 output_trailers and output_headers.
9044 * src/output.h: Remove obsolete functions prototypes of output_headers
9045 and output_trailers.
9046
9047 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9048
9049 * src/main.c: Include macrotab.h.
9050 * src/macrotab.h (macro_entry_s): Constify fields.
9051 Adjust functions prototypes.
9052 * src/macrotab.c (macro_insert): Constify key and value.
9053 (macro_find): Constify key.
9054 (macro_insert): Include 'xalloc.h'
9055 (macro_insert): Use XMALLOC.
9056 (macro_find): Constify return value.
9057 * src/output.c (output_table_data): Rename table to table_data.
9058 (output_parser): Constify macro_key, macro_value.
9059
9060 2001-08-30 Marc Autret <autret_m@epita.fr>
9061
9062 * src/reader.c (parse_skel_decl): New.
9063 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9064 * src/lex.h (token_t): New token `tok_skel'.
9065 * src/lex.c (percent_table): Add skeleton option entry.
9066 Standardize.
9067
9068 2001-08-29 Marc Autret <autret_m@epita.fr>
9069
9070 * src/bison.simple: Add %%user_code directive at the end.
9071 * src/reader.c (read_additionnal_code): New.
9072 (reader): Use it.
9073 * src/output.c (output_program): Remove.
9074 (output): Update.
9075
9076 2001-08-28 Marc Autret <autret_m@epita.fr>
9077
9078 * src/output.c (output_actions): Clean up.
9079 (output_gram): CPP-out useless code.
9080 * src/reader.c (reader): Clean up, CPP-out useless code.
9081
9082 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9083
9084 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9085 directive.
9086 * src/bison.simple: Add `%%definitions'.
9087
9088 2001-08-28 Marc Autret <autret_m@epita.fr>
9089
9090 * config/depcomp: New file.
9091
9092 2001-08-27 Paul Eggert <eggert@twinsun.com>
9093
9094 * src/bison.simple (yyparse): Don't take the address of an
9095 item before the start of an array, as that doesn't conform to
9096 the C Standard.
9097
9098 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9099
9100 * src/output.c (output): Remove the initialization of the macro
9101 obstack. It was done too late here.
9102
9103 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9104 completely wrong.
9105 (reader): Initialize the macro obstack here, since we need it to grow
9106 '%define' directives.
9107
9108 * src/reader.h: Declare the macro obstack as extern.
9109
9110 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9111
9112 * src/output.c (output_parser): Fix. Store single '%' characters in
9113 the output obstack instead of throwing them away.
9114
9115 2001-08-27 Akim Demaille <akim@epita.fr>
9116
9117 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9118
9119 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9120
9121 * lib/Makefile.am: Adjust.
9122
9123 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9124
9125 * src/bison.simple: Update and add '%%' directives.
9126
9127 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9128
9129 * src/reader.c (reader): Remove calls to 'output_headers' and
9130 'output_trailers'. Remove some C output.
9131 (readgram): Disable a piece of code that was writing a default
9132 definition for 'YYSTYPE'.
9133 (reader_output_yylsp): Remove.
9134 (packsymbols): Output token defintions to a macro.
9135 (copy_definition): Disable C output.
9136
9137 * src/reader.c (parse_macro_decl): New function used to parse macro
9138 declarations.
9139 (copy_string2): Put the body of copy_string into this new function.
9140 Add a parameter to let the caller choose whether he wants to copy the
9141 string delimiters or not.
9142 (copy_string): Be a simple call to copy_string2 with the last argument
9143 bound to true.
9144 (read_declarations): Add case for macro definition.
9145 (copy_identifier): New.
9146 (parse_macro_decl): Read macro identifiers using copy_identifier
9147 rather than lex.
9148
9149 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9150
9151 * src/output.c (prepare): Add prefixed names.
9152 (output_parser): Output semantic actions.
9153 (output_parser): Fix bug on '%%line' directives.
9154
9155 * src/output.c (output_headers): Remove. The C code printed by this
9156 function should now be in the skeletons.
9157 (output_trailers): Remove.
9158 (output): Disable call to 'reader_output_yylsp'.
9159 (output_rule_data): Do not output tables to the table obstack.
9160
9161 * src/output.c: Remove some C dedicated output.
9162 Improve the use of macro and output obstacks.
9163 (output_defines): Remove.
9164
9165 * src/output.c (output_token_translations): Associate 'translate'
9166 table with a macro. No output to the table obstack.
9167 (output_gram): Same for 'rhs' and 'prhs'.
9168 (output_stos): Same for 'stos'.
9169 (output_rule_data): Same for 'r1' and 'r2'.
9170 (token_actions): Same for 'defact'.
9171 (goto_actions): Same for 'defgoto'.
9172 (output_base): Same for 'pact' and 'pgoto'.
9173 (output_table): Same for 'table'.
9174 (output_check): Same for 'check'.
9175
9176 * src/output.c (output_table_data): New function.
9177 (output_short_table): Remove.
9178 (output_short_or_char_table): Remove.
9179
9180 * src/output.c (output_parser): Replace most of the skeleton copy code
9181 with something new. Skeletons are now processed character by character
9182 rather than line by line, and Bison looks for '%%' macros. This is the
9183 first step in making Bison's output process (a lot) more flexible.
9184 (output_parser): Use the macro table.
9185
9186 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9187
9188 * src/main.c (main): Initialize the macro table.
9189
9190 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9191
9192 * src/lex.c (percent_table): Add tok_define.
9193 * src/lex.h: Add tok_define.
9194
9195 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9196
9197 * src/macrotab.c: New file.
9198 * src/macrotab.h: New file.
9199 * src/Makefile.am: Update.
9200
9201 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9202
9203 * lib/hash.c: New file.
9204 * lib/hash.h: New file.
9205 * lib/Makefile.am: Update.
9206
9207 2001-08-15 Akim Demaille <akim@epita.fr>
9208
9209 Version 1.28c.
9210
9211 2001-08-15 Marc Autret <autret_m@epita.fr>
9212
9213 * src/reader.c (readgram): Indent output macro YYSTYPE.
9214 (packsymbols): Likewise.
9215 (output_token_defines): Likewise.
9216 * src/files.c: Standardize.
9217 (compute_header_macro): New.
9218 (defines_obstack_save): New. Use compute_header_macro.
9219 (output_files): Update. Use defines_obstack_save.
9220
9221 2001-08-15 Akim Demaille <akim@epita.fr>
9222
9223 * doc/bison.texinfo (Table of Symbols): Document
9224 YYSTACK_USE_ALLOCA.
9225
9226 2001-08-15 Akim Demaille <akim@epita.fr>
9227
9228 * missing: Update from CVS Automake.
9229 * config/config.guess, config/config.sub, config/texinfo.tex:
9230 Update from gnu.org.
9231
9232 2001-08-15 Akim Demaille <akim@epita.fr>
9233
9234 * Makefile.maint: Sync with CVS Autoconf.
9235
9236 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9237
9238 * doc/bison.texinfo: Include GNU Free Documentation License from
9239 `fdl.texi'.
9240 * doc/fdl.texi: Add to package.
9241
9242 2001-08-14 Marc Autret <autret_m@epita.fr>
9243
9244 Turn on %{source,header}_extension features.
9245
9246 * src/lex.c (percent_table): Un-CPP out header_extension and
9247 source_extension.
9248 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9249 (compute_exts_from_src): Remove conditions. It restores priorities
9250 between options.
9251
9252 2001-08-14 Marc Autret <autret_m@epita.fr>
9253
9254 * src/files.c (compute_base_names): Add extensions computing when
9255 `--file-prefix' used.
9256 Standardize function calls.
9257
9258 2001-08-13 Marc Autret <autret_m@epita.fr>
9259
9260 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9261 defining it (defined but null disables alloca).
9262
9263 2001-08-13 Marc Autret <autret_m@epita.fr>
9264
9265 * src/bison.simple (_yy_memcpy): CPP reformat.
9266
9267 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9268
9269 * tests/atconfig.in (CPPFLAGS): Fix.
9270
9271 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9272
9273 * doc/bison.texinfo: Include GNU General Public License from
9274 `gpl.texi'.
9275 * doc/gpl.texi: Add to package.
9276
9277 2001-08-10 Marc Autret <autret_m@epita.fr>
9278
9279 * src/print_graph.h: Fix.
9280 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9281
9282 2001-08-10 Akim Demaille <akim@epita.fr>
9283
9284 * src/system.h: Provide default declarations for stpcpy, strndup,
9285 and strnlen.
9286
9287 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9288
9289 * doc/bison.texinfo (Locations): Update @$ stuff.
9290
9291 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9292
9293 * src/bison.simple (YYLLOC_DEFAULT): Update.
9294 (yyparse): Adjust.
9295
9296 2001-08-08 Marc Autret <autret_m@epita.fr>
9297
9298 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9299 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9300 Reported by Fabrice Bauzac.
9301
9302 2001-08-08 Marc Autret <autret_m@epita.fr>
9303
9304 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9305 * src/vcg.c (output_node): Fix.
9306 * src/vcg.h: Cleanup.
9307 * src/print_graph.c: Add comments.
9308 (node_output_size): New global variable. Simplify the formatting of
9309 the VCG graph output.
9310 (print_actions): Unused code is now used. It notifies the final state
9311 and no action states in the VCG graph. It also give the reduce actions.
9312 The `shift and goto' edges are red and the `go to state' edges are
9313 blue.
9314 Get the current node name and node_obstack by argument.
9315 (node_obstack): New variable.
9316 (print_state): Manage node_obstack.
9317 (print_core): Use node_obstack given by argument.
9318 A node is not only computed here but in print_actions also.
9319 (print_graph): CPP out useless code instead of commenting it.
9320
9321 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9322
9323 * tests/atconfig.in (CPPFLAGS): Fix.
9324
9325 2001-08-07 Akim Demaille <akim@epita.fr>
9326
9327 * src/print_graph.c (quote): New.
9328 (print_core): Use it.
9329
9330 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9331
9332 * src/vcg.c (complain.h): Include it.
9333 Unepitaize `return' invocations.
9334 [NDEBUG] (main): Remove.
9335 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9336 * src/files.c (open_files): Initialize graph_obstack.
9337 * src/print_graph.c (print_actions): CPP out useless code.
9338 (print_core): Don't output the last `\n' in labels.
9339 Use `quote'.
9340 * src/files.c (output_files): Output the VCG file.
9341 * src/main.c (main): Invoke print_graph ();
9342
9343 2001-08-06 Marc Autret <autret_m@epita.fr>
9344
9345 Automaton VCG graph output.
9346 Using option ``-g'' or long option ``--graph'', you can generate
9347 a gram_filename.vcg file containing a VCG description of the LALR (1)
9348 automaton of your grammar.
9349
9350 * src/main.c: Call to print_graph() function.
9351 * src/getargs.h: Update.
9352 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9353 (graph_flag): New flag.
9354 (longopts): Update.
9355 (getargs): Add case `g'.
9356 * src/files.c (graph_obstack): New obstack struct.
9357 (open_files): Initialize new obstack.
9358 (output_files): Saves graph_obstack if required.
9359 * src/files.h (graph_obstack): New extern declaration.
9360 * src/Makefile.am: Add new source files.
9361
9362 2001-08-06 Marc Autret <autret_m@epita.fr>
9363
9364 * src/print_graph.c, src/print_graph.h (graph): New.
9365 * src/vcg.h: New file.
9366 * src/vcg.c: New file, VCG graph handling.
9367
9368 2001-08-06 Marc Autret <autret_m@epita.fr>
9369
9370 Add of %source_extension and %header_extension which specify
9371 the source or/and the header output file extension.
9372
9373 * src/files.c (compute_base_names): Remove initialisation of
9374 src_extension and header_extension.
9375 (compute_exts_from_gf): Update.
9376 (compute_exts_from_src): Update.
9377 (output_files): Update.
9378 * src/reader.c (parse_header_extension_decl): New.
9379 (parse_source_extension_decl): New.
9380 (read_declarations): New case statements for the new tokens.
9381 * src/lex.c (percent_table): Add entries for %source_extension
9382 and %header_extension.
9383 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9384
9385 2001-08-06 Marc Autret <autret_m@epita.fr>
9386
9387 * configure.in: Bump to 1.28c.
9388 * doc/bison.texinfo: Texinfo thingies.
9389
9390 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
9391
9392 * tests/atconfig.in (CPPFLAGS): Add.
9393 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9394
9395 2001-08-03 Akim Demaille <akim@epita.fr>
9396
9397 Version 1.28b.
9398
9399 2001-08-03 Akim Demaille <akim@epita.fr>
9400
9401 * tests/Makefile.am (check-local): Ship testsuite.
9402 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9403 Include `string.h'.
9404
9405 2001-08-03 Akim Demaille <akim@epita.fr>
9406
9407 * configure.in: Try using -Wformat when compiling.
9408
9409 2001-08-03 Akim Demaille <akim@epita.fr>
9410
9411 * configure.in: Bump to 1.28b.
9412
9413 2001-08-03 Akim Demaille <akim@epita.fr>
9414
9415 * src/complain.c: Adjust strerror_r portability issues.
9416
9417 2001-08-03 Akim Demaille <akim@epita.fr>
9418
9419 Version 1.28a.
9420
9421 2001-08-03 Akim Demaille <akim@epita.fr>
9422
9423 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9424 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9425 * src/getargs.c: Include complain.h.
9426 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9427 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9428
9429 2001-08-03 Akim Demaille <akim@epita.fr>
9430
9431 * src/reader.c (readgram): Display hidden chars in error messages.
9432
9433 2001-08-03 Akim Demaille <akim@epita.fr>
9434
9435 Update to gettext 0.10.39.
9436
9437 2001-08-03 Akim Demaille <akim@epita.fr>
9438
9439 * lib/strspn.c: New.
9440
9441 2001-08-01 Marc Autret <autret_m@epita.fr>
9442
9443 * doc/bison.texinfo: Update.
9444 * doc/bison.1 (mandoc): Update.
9445 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9446 * src/files.c: Support output files extensions computing.
9447 (src_extension): New static variable.
9448 (header_extension): New static variable.
9449 (tr): New function.
9450 (get_extension_index): New function, gets the index of an extension
9451 filename in a string.
9452 (compute_exts_from_gf): New function, computes extensions from the
9453 grammar file extension.
9454 (compute_exts_from_src): New functions, computes extensions from the
9455 C source file extension, file given by ``-o'' option.
9456 (compute_base_names): Update.
9457 (output_files): Update.
9458
9459 2001-08-01 Robert Anisko <anisko_r@epita.fr>
9460
9461 * doc/bison.texi: Document @$.
9462 (Locations): New section.
9463
9464 2001-07-18 Akim Demaille <akim@epita.fr>
9465
9466 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9467 * config/prev-version.txt, config/move-if-change: New.
9468 * Makefile.am: Adjust.
9469
9470 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
9471
9472 * src/bison.simple (yyparse): Suppress warning `comparaison
9473 between signed and unsigned'.
9474
9475 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
9476
9477 * src/getargs.h (raw_flag): Remove.
9478 * src/getargs.c: Die on `-r'/`--raw'.
9479 * src/lex.c (parse_percent_token): Die on `%raw'.
9480 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9481 * tests/calc.at: Suppress test with option `--raw'.
9482
9483 2001-07-14 Akim Demaille <akim@epita.fr>
9484
9485 * config/: New.
9486 * configure.in: Require Autoconf 2.50.
9487 Update to gettext 0.10.38.
9488
9489 2001-03-16 Akim Demaille <akim@epita.fr>
9490
9491 * doc/bison.texinfo: ANSIfy the examples.
9492
9493 2001-03-16 Akim Demaille <akim@epita.fr>
9494
9495 * getargs.c (skeleton): New variable.
9496 (longopts): --skeleton is a new option.
9497 (shortopts, getargs): -S is a new option.
9498 * getargs.h: Declare skeleton.
9499 * output.c (output_parser): Use it.
9500
9501 2001-03-16 Akim Demaille <akim@epita.fr>
9502
9503 * m4/strerror_r.m4: New.
9504 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9505 * lib/error.h, lib/error.c: Update.
9506
9507 2001-03-16 Akim Demaille <akim@epita.fr>
9508
9509 * src/getargs.c (longopts): Clean up.
9510
9511 2001-02-21 Akim Demaille <akim@epita.fr>
9512
9513 * src/reader.c (gensym): `gensym_count' is your own.
9514 Use a static buf to create the symbol name, as token_buffer is no
9515 longer a buffer.
9516
9517 2001-02-08 Akim Demaille <akim@epita.fr>
9518
9519 * src/conflicts.c (conflict_report): Be sure not to append to res
9520 between two calls, which could happen if both first sprintf were
9521 skipped, but not the first cp += strlen.
9522
9523 2001-02-08 Akim Demaille <akim@epita.fr>
9524
9525 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9526 New, from fileutils 4.0.37.
9527 * configure.in: Require Autoconf 2.49c. I took some time before
9528 making this decision. This is the only way out for portability
9529 issues in Bison, it would mean way too much duplicate effort to
9530 import in Bison features implemented in 2.49c since 2.13.
9531 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9532
9533 2001-02-02 Akim Demaille <akim@epita.fr>
9534
9535 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9536 * lib/xalloc.h, lib/xmalloc.c: Update.
9537
9538 2001-01-19 Akim Demaille <akim@epita.fr>
9539
9540 Get rid of the ad hoc handling of token_buffer in the scanner: use
9541 the obstacks.
9542
9543 * src/lex.c (token_obstack): New.
9544 (init_lex): Initialize it. No longer call...
9545 (grow_token_buffer): this. Remove it.
9546 Adjust all the places which used it to use the obstack.
9547
9548 2001-01-19 Akim Demaille <akim@epita.fr>
9549
9550 * src/lex.h: Rename all the tokens:
9551 s/\bENDFILE\b/tok_eof/g;
9552 s/\bIDENTIFIER\b/tok_identifier/g;
9553 etc.
9554 Let them be enums, not #define, to ease debugging.
9555 Adjust all the code.
9556
9557 2001-01-18 Akim Demaille <akim@epita.fr>
9558
9559 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9560 * src/lex.c (maxtoken, grow_token_buffer): Static.
9561
9562 2001-01-18 Akim Demaille <akim@epita.fr>
9563
9564 Since we now use obstacks, more % directives can be enabled.
9565
9566 * src/lex.c (percent_table): Also accept `%yacc',
9567 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9568 `%debug'.
9569 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9570 instead of returning a token.
9571 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9572 * src/reader.c (read_declarations): Adjust.
9573 * src/files.c (open_files): Don't call `compute_base_names', don't
9574 compute `attrsfile' since they depend upon data which might be
9575 *in* the input file now.
9576 (output_files): Do it here.
9577 * src/output.c (output_headers): Document the fact that this patch
9578 introduces a guaranteed SEGV for semantic parsers.
9579 * doc/bison.texinfo: Document them.
9580 * tests/suite.at: Exercise these %options.
9581
9582 2000-12-20 Akim Demaille <akim@epita.fr>
9583
9584 Also handle the output file (--verbose) with obstacks.
9585
9586 * files.c (foutput): Remove.
9587 (output_obstack): New.
9588 Adjust all dependencies.
9589 * src/conflicts.c: Return a string.
9590 * src/system.h (obstack_grow_string): Rename as...
9591 (obstack_sgrow): this. Be ready to work with non literals.
9592 (obstack_fgrow4): New.
9593
9594 2000-12-20 Akim Demaille <akim@epita.fr>
9595
9596 * src/files.c (open_files): Fix the computation of short_base_name
9597 in the case of `-o foo.tab.c'.
9598
9599 2000-12-20 Akim Demaille <akim@epita.fr>
9600
9601 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9602 (copy_dollar): Now that everything uses obstacks, get rid of the
9603 FILE * parameters.
9604
9605 2000-12-20 Akim Demaille <akim@epita.fr>
9606
9607 * src/files.c (open_files): Actually the `.output' file is based
9608 on the short_base_name, not base_name.
9609 * tests/suite.at (Checking output file names): Adjust.
9610
9611 2000-12-20 Akim Demaille <akim@epita.fr>
9612
9613 * src/bison.s1: Remove, we now use directly...
9614 * src/bison.simple: this.
9615 * src/Makefile.am: Use pkgdata instead of data.
9616
9617 2000-12-20 Akim Demaille <akim@epita.fr>
9618
9619 * src/files.c (guard_obstack): New.
9620 (open_files): Initialize it.
9621 (output_files): Dump it...
9622 * src/files.h: Export it.
9623 * src/reader.c (copy_guard): Use it.
9624
9625 2000-12-19 Akim Demaille <akim@epita.fr>
9626
9627 * src/files.c (outfile, defsfile, actfile): Removed as global
9628 vars.
9629 (open_files): Don't compute them.
9630 (output_files): Adjust.
9631 (base_name, short_base_name): Be global.
9632 Adjust dependencies.
9633
9634 2000-12-19 Akim Demaille <akim@epita.fr>
9635
9636 * src/files.c (strsuffix): New.
9637 (stringappend): Be just like strcat but allocate.
9638 (base_names): Eve out from open_files.
9639 Try to simplify the rather hairy computation of base_name and
9640 short_base_name.
9641 (open_files): Use it.
9642 * tests/suite.at (Checking output file names): New test.
9643
9644 2000-12-19 Akim Demaille <akim@epita.fr>
9645
9646 * src/system.h (obstack_grow_literal_string): Rename as...
9647 (obstack_grow_string): this.
9648 * src/output.c (output_parser): Recognize `%% actions' instead of
9649 `$'.
9650 * src/bison.s1: s/$/%% actions/.
9651 * src/bison.hairy: Likewise.
9652
9653 2000-12-19 Akim Demaille <akim@epita.fr>
9654
9655 * src/output.c (output_parser): Compute the `#line' lines when
9656 there are.
9657 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9658 Suggested by Hans Aberg.
9659
9660 2000-12-19 Akim Demaille <akim@epita.fr>
9661
9662 Let the handling of the skeleton files be local to the procedures
9663 that use it.
9664
9665 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9666 longer static.
9667 (fparser, open_extra_files): Remove.
9668 (open_files, output_files): Don't take care of fparser.
9669 * src/files.h: Adjust.
9670 * src/output.c (output_parser): Open and close the file to the
9671 skeleton.
9672 * src/reader.c (read_declarations): When %semantic_parser, open
9673 fguard.
9674
9675 2000-12-19 Akim Demaille <akim@epita.fr>
9676
9677 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9678 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9679
9680 2000-12-19 Akim Demaille <akim@epita.fr>
9681
9682 * src/files.c (open_files): Yipee! We no longer need all the code
9683 looking for `/tmp' since we have no tmp file.
9684
9685 2000-12-19 Akim Demaille <akim@epita.fr>
9686
9687 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9688 New macros.
9689 * src/files.c (open_files): Less dependency on MSDOS etc.
9690
9691 2000-12-14 Akim Demaille <akim@epita.fr>
9692
9693 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9694 Provide a default definition.
9695 Use it when executing the default @ action.
9696 * src/reader.c (reader_output_yylsp): No longer include
9697 `timestamp' and `text' in the default YYLTYPE.
9698
9699 2000-12-12 Akim Demaille <akim@epita.fr>
9700
9701 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9702 (copy_guard): Quote the file names.
9703 Reported by Laurent Mascherpa.
9704
9705 2000-12-12 Akim Demaille <akim@epita.fr>
9706
9707 * src/output.c (output_headers, output_program, output): Be sure
9708 to escape special characters when outputting filenames.
9709 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9710 (output_headers): Don't depend on them, Use ACTSTR.
9711
9712 2000-11-17 Akim Demaille <akim@epita.fr>
9713
9714 * lib/obstack.h: Formatting changes.
9715 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9716 prevents type checking.
9717 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9718 cast the value to (void *): assigning a `foo *' to a `void *'
9719 variable is valid.
9720 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9721 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9722 append characters.
9723
9724 2000-11-17 Akim Demaille <akim@epita.fr>
9725
9726 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9727 as...
9728 (suite.m4, regression.m4, calc.m4): these.
9729 * tests/atgeneral.m4: Update from CVS Autoconf.
9730
9731 2000-11-17 Akim Demaille <akim@epita.fr>
9732
9733 * tests/regression.m4 (%union and --defines): New test,
9734 demonstrating a current bug in the obstack implementation.
9735
9736 2000-11-17 Akim Demaille <akim@epita.fr>
9737
9738 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9739 macros.
9740 Use them to declare the variables which are global or local to
9741 `yyparse'.
9742
9743 2000-11-17 Akim Demaille <akim@epita.fr>
9744
9745 * acconfig.h: Remove, no longer used.
9746
9747 2000-11-07 Akim Demaille <akim@epita.fr>
9748
9749 * src: s/Copyright (C)/Copyright/g.
9750
9751 2000-11-07 Akim Demaille <akim@epita.fr>
9752
9753 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9754 defining.
9755 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9756
9757 2000-11-07 Akim Demaille <akim@epita.fr>
9758
9759 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9760 Merge in a single CPP if/else.
9761
9762 2000-11-07 Akim Demaille <akim@epita.fr>
9763
9764 * src/output.c (output): Remove useless variables.
9765 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9766 argument `data' for consistency with the prototypes.
9767 Qualify it `const'.
9768 (obstack_copy, obstack_copy0): Rename the second argument as
9769 `address' for consistency. Qualify it `const'.
9770 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9771 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9772 `const' their input argument (`data' or `address').
9773 Adjust the corresponding macros to include `const' in casts.
9774
9775 2000-11-03 Akim Demaille <akim@epita.fr>
9776
9777 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9778 s/PFILE1/BISON_HAIRY/.
9779 Adjust dependencies.
9780
9781 2000-11-03 Akim Demaille <akim@epita.fr>
9782
9783 For some reason, this was not applied.
9784
9785 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9786 `unlink': it's no longer used.
9787
9788 2000-11-03 Akim Demaille <akim@epita.fr>
9789
9790 * src/files.c (skeleton_find): New function, eved out of...
9791 (open_files, open_extra_files): here.
9792
9793 2000-11-03 Akim Demaille <akim@epita.fr>
9794
9795 Don't use `atexit'.
9796
9797 * src/files.c (obstack_save): New function.
9798 (done): Rename as...
9799 (output_files): this.
9800 Use `obstack_save'.
9801 * src/main.c (main): Don't use `atexit' to register `done', since
9802 it no longer has to remove tmp files, just call `output_files'
9803 when there are no errors.
9804
9805 2000-11-02 Akim Demaille <akim@epita.fr>
9806
9807 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9808 `unlink': it's no longer used.
9809 * src/files.h: Formatting changes.
9810
9811 2000-11-02 Akim Demaille <akim@epita.fr>
9812
9813 Remove the last uses of mktemp and unlink/delete.
9814
9815 * src/files.c (fdefines, ftable): Removed.
9816 (defines_ostack, table_obstack): New.
9817 Adjust dependencies of the former into uses of the latter.
9818 * src/output.c (output_short_or_char_table, output_short_table):
9819 Convert to using obstacks.
9820 * src/reader.c (copy_comment2): Accept one FILE * and two
9821 obstacks.
9822 (output_token_defines, reader_output_yylsp): Use obstacks.
9823 * src/system.h (obstack_fgrow3): New.
9824
9825 2000-11-01 Akim Demaille <akim@epita.fr>
9826
9827 Change each use of `fattrs' into a use of `attrs_obstack'.
9828
9829 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9830 * src/files.c (fattrs): Remove.
9831 (attrs_obstack): New.
9832 Adjust all dependencies.
9833 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9834
9835 2000-11-01 Akim Demaille <akim@epita.fr>
9836
9837 Introduce obstacks.
9838 Change each use of `faction' into a use of `action_obstack'.
9839
9840 * lib/obstack.h, lib/obstack.c: New files.
9841 * src/files.c (faction): Remove.
9842 (action_obstack): New.
9843 Adjust all dependencies.
9844
9845 2000-10-20 Akim Demaille <akim@epita.fr>
9846
9847 * lib/quote.h (PARAMS): New macro. Use it.
9848
9849 2000-10-16 Akim Demaille <akim@epita.fr>
9850
9851 * src/output.c (output_short_or_char_table): New function.
9852 (output_short_table, output_token_translations): Use it.
9853 (goto_actions): Use output_short_table.
9854
9855 2000-10-16 Akim Demaille <akim@epita.fr>
9856
9857 * src/symtab.c (bucket_new): New function.
9858 (getsym): Use it.
9859
9860 * src/output.c (output_short_table): New argument to display the
9861 comment associated with the table.
9862 Adjust dependencies.
9863 (output_gram): Use it.
9864 (output_rule_data): Nicer output layout for YYTNAME.
9865
9866 2000-10-16 Akim Demaille <akim@epita.fr>
9867
9868 * src/lex.c (read_typename): New function.
9869 (lex): Use it.
9870 * src/reader.c (copy_dollar): Likewise.
9871
9872 2000-10-16 Akim Demaille <akim@epita.fr>
9873
9874 * src/reader.c (copy_comment2): Expect the input stream to be on
9875 the `/' which is suspected to open a comment, instead of being
9876 called after `//' or `/*' was read.
9877 (copy_comment, copy_definition, parse_union_decl, copy_action)
9878 (copy_guard): Adjust.
9879
9880 2000-10-16 Akim Demaille <akim@epita.fr>
9881
9882 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9883 `read_signed_integer'.
9884
9885 2000-10-16 Akim Demaille <akim@epita.fr>
9886
9887 * src/reader.c (copy_dollar): New function.
9888 (copy_guard, copy_action): Use it.
9889
9890 2000-10-16 Akim Demaille <akim@epita.fr>
9891
9892 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9893 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9894 New files, from Fileutils 4.0.27.
9895 * src/main.c (printable_version): Remove.
9896 * src/lex.c, src/reader.c: Use `quote'.
9897
9898 2000-10-04 Akim Demaille <akim@epita.fr>
9899
9900 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9901
9902 2000-10-04 Akim Demaille <akim@epita.fr>
9903
9904 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9905
9906 2000-10-04 Akim Demaille <akim@epita.fr>
9907
9908 When a literal string is used to define two different tokens,
9909 `bison -v' segfaults.
9910 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9911
9912 * tests/regression.m4: New file.
9913 Include the core of the sample provided by Piotr Gackiewicz.
9914 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9915 properly.
9916
9917 2000-10-04 Akim Demaille <akim@epita.fr>
9918
9919 * src/reader.c (parse_expect_decl): Keep `count' within the size
9920 of `buffer'.
9921 From Neil Booth.
9922
9923 2000-10-02 Paul Eggert <eggert@twinsun.com>
9924
9925 * bison.s1 (yyparse): Assign the default value
9926 unconditionally, to avoid a GCC warning and make the parser a
9927 tad smaller.
9928
9929 2000-10-02 Akim Demaille <akim@epita.fr>
9930
9931 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9932 options.
9933
9934 2000-10-02 Akim Demaille <akim@epita.fr>
9935
9936 * src/derives.c, src/print.c, src/reduce.c: To ease the
9937 translation, move some `\n' out of the translated strings.
9938
9939 2000-10-02 Akim Demaille <akim@epita.fr>
9940
9941 The location tracking mechanism is precious for parse error
9942 messages. Nevertheless, it is enabled only when `@n' is used in
9943 the grammar, which is a different issue (you can use it in error
9944 message, but not in the grammar per se). Therefore, there should
9945 be another means to enable it.
9946
9947 * src/getargs.c (getargs): Support `--locations'.
9948 (usage): Report it.
9949 * src/getargs.h (locationsflag): Export it.
9950 * src/lex.c (percent_table): Support `%locations'.
9951 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9952 with `locationsflag'.
9953 * doc/bison.texinfo: Document `--locations' and `%locations'.
9954 Sort the options.
9955 * tests/calc.m4: Test it.
9956
9957 For regularity of the names, replace each
9958 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9959 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9960 In addition replace each `flag' with `_flag'.
9961
9962 2000-10-02 Akim Demaille <akim@epita.fr>
9963
9964 Also test parse error messages, including with YYERROR_VERBOSE.
9965
9966 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9967 associative).
9968 Use it to check the computations.
9969 Use it to check `nonassoc' is honored.
9970 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9971 `--yyerror-verbose'.
9972 (_AT_CHECK_CALC): Adjust to this option.
9973 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9974
9975 2000-10-02 Akim Demaille <akim@epita.fr>
9976
9977 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9978 the latter demonstrates a flaw in the handling of non debugging
9979 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9980 was used in order to simplify:
9981
9982 #if YYDEBUG
9983 if (yydebug)
9984 {
9985 ...
9986 }
9987 #endif
9988
9989 into
9990
9991 if (yydebug)
9992 {
9993 ...
9994 }
9995
9996 unfortunately this leads to a CPP conflict when
9997 `--name-prefix=foo' is used since it produces `#define yydebug
9998 foodebug'.
9999
10000 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
10001 (YYDPRINTF): New macro.
10002 Spread its use.
10003 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10004 the bison options.
10005 Also test `--verbose', `--defines' and `--name-prefix'.
10006
10007 2000-10-02 Akim Demaille <akim@epita.fr>
10008
10009 Improve the readability of the produced parsers.
10010
10011 * src/bison.s1: Formatting changes.
10012 Improve the comment related to the `$' mark.
10013 (yydefault): Don't fall through to `yyresume': `goto' there.
10014 * src/output.c (output_parser): When the `$' is met, skip the end
10015 of its line.
10016 New variable, `number_of_dollar_signs', to check there's exactly
10017 one `$' in the parser skeleton.
10018
10019 2000-10-02 Akim Demaille <akim@epita.fr>
10020
10021 * lib/xstrdup.c: New file, from the fileutils.
10022 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10023 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10024 instead of strlen + xmalloc + strcpy.
10025 * src/symtab.c (copys): Remove, use xstrdup instead.
10026
10027 2000-10-02 Akim Demaille <akim@epita.fr>
10028
10029 * src/gram.h (associativity): New enum type which replaces the
10030 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10031 `right_assoc', `left_assoc' and `non_assoc'.
10032 Adjust all dependencies.
10033 * src/reader.c: Formatting changes.
10034 (LTYPESTR): Don't define it, use it as a literal in
10035 `reader_output_yylsp'.
10036 * src/symtab.h (symbol_class): New enum type which replaces the
10037 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10038 `sunknown', `stoken and `snterm'.
10039
10040 2000-10-02 Akim Demaille <akim@epita.fr>
10041
10042 * src/getargs.c (fixed_outfiles): Rename as...
10043 (yaccflag): for consistency and accuracy.
10044 Adjust dependencies.
10045
10046 2000-10-02 Akim Demaille <akim@epita.fr>
10047
10048 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10049 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10050 difficult and introduced a lot of core dump. It turns out that
10051 Bison used an implementation of `xmalloc' based on `calloc', and
10052 at various places it does depend upon the initialization to 0. I
10053 have not tried to isolate the pertinent places, and all the former
10054 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10055 someone should address this issue.
10056
10057 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10058 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10059 files.
10060 Adjust dependencies.
10061 * src/warshall.h: New file.
10062 Propagate.
10063
10064 2000-10-02 Akim Demaille <akim@epita.fr>
10065
10066 Various anti-`extern in *.c' changes.
10067
10068 * src/system.h: Include `assert.h'.
10069
10070 2000-10-02 Akim Demaille <akim@epita.fr>
10071
10072 * src/state.h (nstates, final_state, first_state, first_shift)
10073 (first_reduction): Move their exportation from here...
10074 * src/LR0.h: to here.
10075 Adjust dependencies.
10076 * src/getargs.c (statisticsflag): New variable.
10077 Add support for `--statistics'.
10078 Adjust dependencies.
10079
10080 Remove a lot of now useless `extern' statements in most files.
10081
10082 2000-10-02 Akim Demaille <akim@epita.fr>
10083
10084 * src/LR0.h: New file.
10085 Propagate its use.
10086
10087 2000-10-02 Akim Demaille <akim@epita.fr>
10088
10089 * src/print.h: New file.
10090 Propagate its use.
10091 * src/print.c: Formatting and ordering changes.
10092 (verbose, terse): Replace with...
10093 (print_results): this new function.
10094 Adjust dependencies.
10095
10096 2000-10-02 Akim Demaille <akim@epita.fr>
10097
10098 * src/conflicts.c (conflict_report): New function.
10099 (conflict_log, verbose_conflict_log): Replace with...
10100 (print_conflicts): this function.
10101 Adjust dependencies.
10102 * src/conflicts.h: New file.
10103 Propagate its inclusion.
10104
10105 2000-10-02 Akim Demaille <akim@epita.fr>
10106
10107 * src/nullable.h: New file.
10108 Propagate its inclusion.
10109 * src/nullable.c: Formatting changes.
10110
10111 2000-10-02 Akim Demaille <akim@epita.fr>
10112
10113 * src/reduce.h: New file.
10114 Propagate its inclusion.
10115 * src/reduce.c: Topological sort and other formatting changes.
10116 (bool, TRUE, FALSE): Move their definition to...
10117 * src/system.h: here.
10118
10119 2000-10-02 Akim Demaille <akim@epita.fr>
10120
10121 * src/files.c: Formatting changes.
10122 (tryopen, tryclose, openfiles): Rename as...
10123 (xfopen, xfclose, open_files): this.
10124 (stringappend): static.
10125 * src/files.h: Complete the list of exported symbols.
10126 Propagate its use.
10127
10128 2000-10-02 Akim Demaille <akim@epita.fr>
10129
10130 * src/reader.h: New file.
10131 Propagate its use instead of tedious list of `extern' and
10132 prototypes.
10133 * src/reader.c: Formatting changes, topological sort,
10134 s/register//.
10135
10136 2000-10-02 Akim Demaille <akim@epita.fr>
10137
10138 * src/lex.h: Prototype `lex.c' exported functions.
10139 * src/reader.c: Adjust.
10140 * src/lex.c: Formatting changes.
10141 (safegetc): Rename as...
10142 (xgetc): this.
10143
10144 2000-10-02 Akim Demaille <akim@epita.fr>
10145
10146 * src/lalr.h: New file.
10147 Propagate its inclusion instead of prototypes and `extern'.
10148 * src/lalr.c: Formatting changes, topological sorting etc.
10149
10150 2000-10-02 Akim Demaille <akim@epita.fr>
10151
10152 * src/output.c (token_actions): Introduce a temporary array,
10153 YYDEFACT, that makes it possible for this function to use
10154 output_short_table.
10155
10156 2000-10-02 Akim Demaille <akim@epita.fr>
10157
10158 `user_toknums' is output as a `short[]' in `output.c', while it is
10159 defined as a `int[]' in `reader.c'. For consistency with the
10160 other output tables, `user_toknums' is now defined as a table of
10161 shorts.
10162
10163 * src/reader.c (user_toknums): Be a short table instead of an int
10164 table.
10165 Adjust dependencies.
10166
10167 Factor the short table outputs.
10168
10169 * src/output.c (output_short_table): New function.
10170 * src/output.c (output_gram, output_stos, output_rule_data)
10171 (output_base, output_table, output_check): Use it.
10172
10173 2000-10-02 Akim Demaille <akim@epita.fr>
10174
10175 * src/output.c (output): Topological sort of the functions, in
10176 order to get rid of the `static' prototypes.
10177 No longer use `register'.
10178 * src/output.h: New file.
10179 Propagate its inclusion in files explicitly prototyping functions
10180 from output.c.
10181
10182 2000-09-21 Akim Demaille <akim@epita.fr>
10183
10184 * src/atgeneral.m4: Update from Autoconf.
10185
10186 2000-09-21 Akim Demaille <akim@epita.fr>
10187
10188 * src/closure.h: New file.
10189 * src/closure.c: Formatting changes, topological sort over the
10190 functions, use of closure.h.
10191 (initialize_closure, finalize_closure): Rename as...
10192 (new_closure, free_closure): these. Adjust dependencies.
10193 * src/LR0.c: Formatting changes, topological sort, use of
10194 cloture.h.
10195 (initialize_states): Rename as...
10196 (new_states): this.
10197 * src/Makefile.am (noinst_HEADERS): Adjust.
10198
10199 2000-09-20 Akim Demaille <akim@epita.fr>
10200
10201 * src/acconfig.h: Don't protect config.h against multiple
10202 inclusion.
10203 Don't define PARAMS.
10204 * src/system.h: Define PARAMS.
10205 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10206 purpose of config.h. system.h must not try to fix wrong
10207 definitions in config.h.
10208
10209 2000-09-20 Akim Demaille <akim@epita.fr>
10210
10211 * src/derives.h: New file.
10212 * src/main.c, src/derives.h: Use it.
10213 Formatting changes.
10214 * src/Makefile.am (noinst_HEADERS): Adjust.
10215
10216 2000-09-20 Akim Demaille <akim@epita.fr>
10217
10218 * tests/atgeneral.m4: Update from Autoconf.
10219 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10220 (AT_CHECK_CALC): New macros.
10221 Use these macros to test bison with options `', `--raw',
10222 `--debug', `--yacc', `--yacc --debug'.
10223
10224 2000-09-19 Akim Demaille <akim@epita.fr>
10225
10226 * src/output.c: Formatting changes.
10227 * src/machine.h: Remove, leaving its contents in...
10228 * src/system.h: here.
10229 Include stdio.h.
10230 Adjust all dependencies on stdio.h and machine.h.
10231 * src/getargs.h: New file.
10232 Let all `extern' declarations about getargs.c be replaced with
10233 inclusion of `getargs.h'.
10234 * src/Makefile.am (noinst_HEADERS): Adjust.
10235
10236 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10237 scope.
10238 (yyerror): Returns void, not int.
10239 * doc/bison.texinfo: Formatting changes.
10240
10241 2000-09-19 Akim Demaille <akim@epita.fr>
10242
10243 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10244 portable.
10245
10246 2000-09-18 Akim Demaille <akim@epita.fr>
10247
10248 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10249 * src/Makefile.am (INCLUDES): Don't.
10250 Be ready to fetch headers in lib/.
10251
10252 2000-09-18 Akim Demaille <akim@epita.fr>
10253
10254 * doc/bison.texinfo: Update the copyright.
10255 ANSIfy and GNUify the examples.
10256 Remove the old menu.
10257
10258 2000-09-18 Akim Demaille <akim@epita.fr>
10259
10260 First set of tests: use the `calc' example from the documentation.
10261
10262 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10263 is defined only when YYDEBUG is.
10264 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10265 * src/files.c (tryopen, tryclose): Formatting changes.
10266 Move to the top and be static.
10267 * src/reader.c (read_signed_integer): Likewise.
10268 * tests/calc.m4: New file.
10269 * Makefile.am, suite.m4: Adjust.
10270 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10271
10272 2000-09-18 Akim Demaille <akim@epita.fr>
10273
10274 Add support for an Autotest test suite for Bison.
10275
10276 * m4/m4.m4, m4/atconfig.m4: New files.
10277 * m4/Makefile.am (EXTRA_DIST): Adjust.
10278 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10279 files.
10280 * src/getargs.c: Display a more standard --version message.
10281 * src/reader.c (reader): Formatting changes.
10282 No longer depend upon VERSION_STRING.
10283 * configure.in: No longer use `dnl'.
10284 Set up the test suite and the new directory `tests/.
10285 (VERSION_STRING): Remove.
10286
10287 2000-04-14 Akim Demaille <akim@epita.fr>
10288
10289 * src/reader.c (copy_comment2): New function, same as former
10290 `copy_comment', but outputs into two FILE *.
10291 (copy_comment): Use it.
10292 (parse_union_decl): Use it.
10293 (get_type, parse_start_decl): Use the same `invalid' message.
10294 (parse_start_decl, parse_union_decl): Use the same `multiple'
10295 message.
10296 (parse_union_decl, copy_guard, copy_action): Use the same
10297 `unmatched' message.
10298 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10299
10300 2000-03-31 Akim Demaille <akim@epita.fr>
10301
10302 * src/files.c (tryopen, tryclose): Move to the top.
10303 Be static.
10304
10305 2000-03-31 Akim Demaille <akim@epita.fr>
10306
10307 * src/main.c (main): Don't call `done', exit does it.
10308
10309 2000-03-31 Akim Demaille <akim@epita.fr>
10310
10311 * allocate.c: s/return (foo)/return foo/.
10312 * lalr.c: Likewise.
10313 * LR0.c: Likewise.
10314 * output.c: Likewise.
10315 * reader.c: Likewise.
10316 * symtab.c: Likewise.
10317 * vmsgetargs.c: Likewise.
10318
10319 2000-03-31 Akim Demaille <akim@epita.fr>
10320
10321 Clean up the error reporting functions.
10322
10323 * src/report.c: New file.
10324 * src/report.h: Likewise.
10325 * src/Makefile.am: Adjust.
10326 * m4/error.m4: New file.
10327 * m4/Makefile.am: Adjust.
10328 * configure.in (jm_PREREQ_ERROR): Call it.
10329 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10330 Remove.
10331 (fatal, fatals): Remove. All callers use complain.c::fatal.
10332 (warn, warni, warns, warnss, warnss): Remove. All callers use
10333 complain.c::complain.
10334 (toomany): Remove, use fatal instead.
10335 * src/files.c (done): No argument, use complain_message_count.
10336 * src/main.c (main): Register `done' to `atexit'.
10337
10338 * src/getargs.c (usage): More `fputs', less `fprintf'.
10339
10340 2000-03-28 Akim Demaille <akim@epita.fr>
10341
10342 * lib/: New directory.
10343 * Makefile.am (SUBDIRS): Adjust.
10344 * configure.in: Adjust.
10345 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10346 useless.
10347 * src/alloca.c: Moved to lib/.
10348 * src/getopt.c: Likewise.
10349 * src/getopt1.c: Likewise.
10350 * src/getopt.h: Likewise.
10351 * src/ansi2knr.c: Likewise.
10352 * src/ansi2knr.1: Likewise.
10353 * src/Makefile.am: Adjust.
10354 * lib/Makefile.am: New file.
10355
10356 2000-03-28 Akim Demaille <akim@epita.fr>
10357
10358 * src/getargs.c (usage): Refresh the help message.
10359
10360 2000-03-17 Akim Demaille <akim@epita.fr>
10361
10362 * src/getopt1.c: Updated from textutils 2.0e
10363 * src/getopt.c: Likewise.
10364 * src/getopt.h: Likewise.
10365
10366 2000-03-17 Akim Demaille <akim@epita.fr>
10367
10368 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10369 the file name, not the whole `#line LINE FILE'.
10370
10371 2000-03-17 Akim Demaille <akim@epita.fr>
10372
10373 On syntax errors, report the token on which we choked.
10374
10375 * src/bison.s1 (yyparse): In the label yyerrlab, when
10376 YYERROR_VERBOSE, add yychar in msg.
10377
10378 2000-03-17 Akim Demaille <akim@epita.fr>
10379
10380 * src/reader.c (copy_at): New function.
10381 (copy_guard): Use it.
10382 (copy_action): Use it.
10383
10384 2000-03-17 Akim Demaille <akim@epita.fr>
10385
10386 Be kind to translators, save some useless translations.
10387
10388 * src/main.c (banner): New function.
10389 (fatal_banner): Use it.
10390 (warn_banner): Use it.
10391
10392 2000-03-17 Akim Demaille <akim@epita.fr>
10393
10394 * src/reader.c (copy_definition): Use copy_string and
10395 copy_comment. Removed now unused `match', `ended',
10396 `cplus_comment'.
10397 (copy_comment, copy_string): Moved, to be visible from
10398 copy_definition.
10399
10400 2000-03-17 Akim Demaille <akim@epita.fr>
10401
10402 * src/reader.c (copy_string): Declare `static inline'. No
10403 problems with inline, since it is checked by configure.
10404 (copy_comment): Likewise.
10405
10406 2000-03-17 Akim Demaille <akim@epita.fr>
10407
10408 * src/reader.c (packsymbols): Formatting changes.
10409
10410 2000-03-17 Akim Demaille <akim@epita.fr>
10411
10412 * src/reader.c (copy_comment): New function, factored out from:
10413 (copy_action): Use it. Removed now unused `match', `ended',
10414 `cplus_comment'.
10415 (copy_guard): Likewise.
10416
10417 2000-03-17 Akim Demaille <akim@epita.fr>
10418
10419 * src/reader.c (copy_string): New function, factored out from:
10420 (copy_action): Use it.
10421 (copy_guard): Likewise.
10422
10423 2000-03-17 Akim Demaille <akim@epita.fr>
10424
10425 Change the handling of @s so that they behave exactly like $s.
10426 There is now a pseudo variable @$ (readble and writable), location
10427 of the lhs of the rule (by default ranging from the location of
10428 the first symbol of the rhs, to the location of the last symbol,
10429 or, if the rhs is empty, YYLLOC).
10430
10431 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10432 yyval.
10433 (yyparse): When providing a default semantic action, provide a
10434 default location action.
10435 (after the $): No longer change `*YYLSP', just stack YYLOC the
10436 same way you stack YYVAL.
10437 * src/reader.c (read_declarations): Use warns.
10438 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10439 (copy_action, case '@'): Likewise.
10440 Use a standard error message, to save useless work from
10441 translators.
10442
10443 2000-03-17 Akim Demaille <akim@epita.fr>
10444
10445 * src/bison.s1: Formatting and cosmetics changes.
10446 * src/reader.c: Likewise.
10447 Update the Copyright notice.
10448
10449 2000-03-17 Akim Demaille <akim@epita.fr>
10450
10451 * src/bison.s1 (#line): All set to `#line' only, since the
10452 Makefile now handles them.
10453
10454 2000-03-16 Akim Demaille <akim@epita.fr>
10455
10456 * src/output.c (output_rule_data): Output the documentation of
10457 some of the tables.
10458 (Copyright notice): Update.
10459 Formatting changes.
10460
10461 2000-03-16 Akim Demaille <akim@epita.fr>
10462
10463 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10464 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10465 One `#if YYDEBUG' remains, since it uses variables which are
10466 defined only if `YYDEBUG != 0'.
10467
10468 2000-03-16 Akim Demaille <akim@epita.fr>
10469
10470 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10471 and related variables so that the similarities are highlighted.
10472
10473 2000-03-16 Akim Demaille <akim@epita.fr>
10474
10475 * src/bison.s1: Properly indent CPP directives.
10476
10477 2000-03-16 Akim Demaille <akim@epita.fr>
10478
10479 * src/bison.s1: Properly indent the `alloca' CPP section.
10480
10481 2000-03-16 Akim Demaille <akim@epita.fr>
10482
10483 Do not hard code values of directories in `configure.in'.
10484 Update the `configure' tool chain.
10485
10486 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10487 src/makefile.am.
10488 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10489 (AC_OUTPUT): Add m4/Makefile.
10490 Bump to bison 1.28a, 1.29 has never been released.
10491 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10492 handled via src/Makefile.am.
10493 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10494 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10495 autoheader.
10496 * Makefile.am (SUBDIRS): Add m4.
10497 (ACLOCAL_AM_FLAGS): New variable.
10498 (AUTOMAKE_OPTIONS): Add check-news.
10499 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10500 the proper line number and file name.
10501 (DEFS): Propagate the location of bison library files and of the
10502 locale files.
10503 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10504 builddir.
10505 * acinclude.m4: Remove, replaced by the directory m4.
10506 * m4/Makefile.am (EXTRA_DIST): New variable.
10507 * m4/gettext.m4: New file, from the fileutils.
10508 * m4/lcmessage.m4: Likewise
10509 * m4/progtest.m4: Likewise.
10510 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10511
10512 2000-03-10 Akim Demaille <akim@epita.fr>
10513
10514 * src/closure.c:
10515 Formatting changes of various comments.
10516 Respect the GNU coding standards at various places.
10517 Don't use `_()' when no translation is needed.
10518
10519 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10520
10521 * src/files.c:
10522 OS/2 honors TMPDIR environment variable.
10523
10524 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10525
10526 * doc/bison.texinfo: Tweaked spelling and grammar.
10527 Updated ISBN.
10528 Removed reference to price of printed copy.
10529 Mention BISON_SIMPLE and BISON_HAIRY.
10530
10531 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10532
10533 * configure.in, NEWS:
10534 Bison 1.29 released.
10535
10536 1999-10-27 Jesse Thilo <jthilo@gnu.org>
10537
10538 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10539 Added reference card.
10540
10541 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10542
10543 * po/ru.po: Added Russian translation.
10544
10545 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10546
10547 * configure.in: Added Russian translation.
10548
10549 1999-07-06 Jesse Thilo <jthilo@gnu.org>
10550
10551 * configure.in, NEWS, README:
10552 Released version 1.28.
10553
10554 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10555
10556 * src/system.h:
10557 Squashed redefinition warning on some systems.
10558
10559 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10560 Have configure build version string instead of relying on ANSI string
10561 concatentation.
10562
10563 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10564
10565 * po/POTFILES.in: Got rid of version.c.
10566
10567 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10568
10569 * acconfig.h, configure.in:
10570 Have configure build version string instead of relying on ANSI string
10571 concatentation.
10572
10573 1999-06-08 Jesse Thilo <jthilo@gnu.org>
10574
10575 * doc/bison.1:
10576 Dropped mention of `+' for long-named options.
10577
10578 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10579
10580 * src/files.c: Added <unistd.h> for unlink().
10581
10582 * src/Makefile.am, src/system.h:
10583 I18n fixes.
10584
10585 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10586
10587 * README: Added a FAQ list.
10588
10589 * configure.in, acconfig.h:
10590 I18n fixes.
10591
10592 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10593
10594 * doc/FAQ, doc/Makefile.am:
10595 Added a FAQ list.
10596
10597 1999-05-19 Jesse Thilo <jthilo@gnu.org>
10598
10599 * src/alloc.h, src/symtab.h, src/version.c:
10600 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10601
10602 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10603
10604 * src/.cvsignore, src/Makefile.am:
10605 Reorganized: sources in `src', documentation in `doc'.
10606
10607 * src/lex.c (literalchar):
10608 fixed the code for escaping double quotes (thanks
10609 Jonathan Czisny.)
10610
10611 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10612
10613 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10614 Adjusted paths to reflect directory reorganization.
10615
10616 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10617
10618 * doc/.cvsignore, doc/Makefile.am:
10619 Reorganized: sources in `src', documentation in `doc'.
10620
10621 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10622
10623 * configure.in:
10624 Updated AC_INIT file to reflect directory reorganization.
10625
10626 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10627 Reorganized: sources in `src', documentation in `doc'.
10628
10629 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10630
10631 * src/allocate.c:
10632 Don't declare calloc() and realloc() if not necessary.
10633
10634 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10635
10636 * configure.in, acconfig.h, acinclude.m4:
10637 Don't declare calloc() and realloc() if not necessary.
10638
10639 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10640
10641 * po/.cvsignore: Added i18n support.
10642
10643 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10644
10645 * acconfig.h, configure.in, Makefile.am:
10646 Added i18n support.
10647
10648 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10649
10650 * src/bison.s1: Fixed #line numbers.
10651
10652 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10653
10654 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10655 Added PO files from Translation Project.
10656
10657 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10658
10659 * Makefile.am:
10660 Added support for non-ANSI compilers (ansi2knr).
10661
10662 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10663
10664 * configure.in: Bumped version number to 1.27.
10665
10666 * Makefile.am:
10667 Added `bison.simple' to list of files removed by `make distclean'.
10668
10669 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10670
10671 * src/files.c, src/files.h:
10672 Defined locations of parser files in config.h instead of Makefile.
10673
10674 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10675
10676 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10677 Defined locations of parser files in config.h instead of Makefile.
10678
10679 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10680
10681 * Makefile.am:
10682 Removed inappropriate use of $< macro.
10683
10684 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10685
10686 * po/Makefile.in.in, po/POTFILES.in:
10687 Add `po' directory skeleton.
10688
10689 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10690
10691 * README: Document help-bison list.
10692
10693 * configure.in: Add check for mkstemp().
10694
10695 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10696
10697 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10698 Hush a few compiler warnings.
10699
10700 * src/files.c:
10701 Add tryclose(), which verifies that fclose was successful.
10702 Hush a couple of compiler warnings.
10703
10704 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10705
10706 * Makefile.am, OChangeLog:
10707 ChangeLog is now automatically generated. Include the old version as
10708 OChangeLog.
10709
10710 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10711
10712 * 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:
10713 Update FSF address.
10714
10715 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10716
10717 * doc/bison.texinfo: Fix formatting glitch.
10718
10719 * doc/bison.texinfo: Update FSF address.
10720
10721 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10722
10723 * acconfig.h: Update FSF address.
10724
10725 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10726
10727 * src/system.h:
10728 Don't define PACKAGE here, since config.h defines it.
10729
10730 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10731
10732 * src/reader.c: Update copyright date.
10733
10734 * src/main.c:
10735 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10736 favor of output directly to stderr (avoids buffer overruns).
10737
10738 * src/reader.c: Some checks for premature EOF.
10739
10740 * 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:
10741 Use prototypes if the compiler understands them.
10742
10743 * src/files.c: Honor TMPDIR on Unix hosts.
10744 Use prototypes if the compiler understands them.
10745
10746 * src/reader.c:
10747 Fix a couple of buffer overrun bugs.
10748 Use prototypes if the compiler understands them.
10749
10750 * src/system.h: Include unistd.h and ctype.h.
10751 Use #ifdef instead of #if for NLS symbols.
10752
10753 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10754
10755 * doc/bison.texinfo:
10756 Delete comment "consider using @set for edition number, etc..." since
10757 we now are doing so.
10758
10759 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10760
10761 * configure.in:
10762 Use prototypes if the compiler understands them.
10763
10764 * NEWS: Document 1.26 highlights.
10765
10766 * Makefile.am: Require Automake 1.3 or later.
10767
10768 * acconfig.h:
10769 Use prototypes if the compiler understands them.
10770
10771 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10772
10773 * src/version.c:
10774 Use VERSION symbol from automake for version number.
10775
10776 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10777
10778 * acconfig.h, configure.in, version.cin:
10779 Use VERSION symbol from automake for version number.
10780
10781 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10782
10783 * Makefile.am:
10784 Distribute original version of simple parser (bison.s1), not built
10785 version (bison.simple).
10786
10787 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10788
10789 * doc/bison.texinfo: Add info dir entry.
10790
10791 * doc/bison.texinfo:
10792 Let automake put version number into documentation.
10793
10794 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10795
10796 * src/bison.cld, src/build.com, src/vmshlp.mar:
10797 Add non-RCS files from /gd/gnu/bison.
10798
10799 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10800
10801 * doc/bison.1:
10802 Document the BISON_HAIRY and BISON_SIMPLE variables.
10803
10804 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10805
10806 * src/version.c: Build version.c automatically.
10807
10808 * src/reader.c:
10809 Fix token numbering (used to start at 258, not 257).
10810
10811 * src/system.h: Include config.h.
10812
10813 * src/getargs.c: Update bug report address.
10814
10815 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10816 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10817
10818 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10819
10820 * Makefile.am:
10821 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10822
10823 * configure.in, version.cin:
10824 Build version.c automatically.
10825
10826 * AUTHORS: Add AUTHORS file.
10827
10828 * README: Update bug report address.
10829
10830 * bison.simple:
10831 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10832
10833 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10834 Add automake stuff.
10835
10836 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10837
10838 * doc/bison.texinfo: Clean up some formatting.
10839
10840 1998-05-05 Richard Stallman <rms@gnu.org>
10841
10842 * doc/bison.texinfo:
10843 Explain better why to make a pure parser.
10844
10845 1998-01-05 Richard Stallman <rms@gnu.org>
10846
10847 * src/files.c (openfiles):
10848 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10849 find a temporary directory, if possible. Do not unlink files while
10850 they are open.
10851
10852 1997-08-25 Richard Stallman <rms@gnu.org>
10853
10854 * src/reader.c (stack_offset;):
10855 Change some warni to warns.
10856
10857 * src/lex.c (literalchar): Use warns, not warni.
10858
10859 1997-06-28 Richard Stallman <rms@gnu.org>
10860
10861 * src/bison.s1: Add a Bison version comment.
10862
10863 * src/main.c (fatal, warn, berror):
10864 Use program_name.
10865
10866 1997-06-28 Richard Stallman <rms@gnu.org>
10867
10868 * Makefile.in (bison_version): New variable.
10869 (dist): Use that variable.
10870 (bison.s1): Substitute the Bison version into bison.simple.
10871
10872 * bison.simple: Add a Bison version comment.
10873
10874 1997-06-18 Richard Stallman <rms@gnu.org>
10875
10876 * src/main.c (fatal, warn, berror):
10877 Make error messages standard.
10878 (toomany): Improve error message text.
10879
10880 * 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:
10881 new.h renamed to alloc.h.
10882
10883 1997-06-18 Richard Stallman <rms@gnu.org>
10884
10885 * Makefile.in: new.h renamed to alloc.h.
10886
10887 1997-05-24 Richard Stallman <rms@gnu.org>
10888
10889 * src/lex.c (literalchar):
10890 Fix the code for escaping \, " and '.
10891
10892 (lex): Avoid trouble when there are many chars
10893 to discard in a char literal with just several chars in it.
10894
10895 1997-05-17 Richard Stallman <rms@gnu.org>
10896
10897 * src/bison.s1:
10898 Use malloc, if using alloca is troublesome.
10899 (YYSTACK_USE_ALLOCA): New flag macro.
10900 Define it for some systems and compilers.
10901 (YYSTACK_ALLOC): New macro.
10902 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10903 If it was malloc'd, free it.
10904
10905 1997-05-17 Richard Stallman <rms@gnu.org>
10906
10907 * bison.simple:
10908 Use malloc, if using alloca is troublesome.
10909 (YYSTACK_USE_ALLOCA): New flag macro.
10910 Define it for some systems and compilers.
10911 (YYSTACK_ALLOC): New macro.
10912 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10913 If it was malloc'd, free it.
10914
10915 1997-04-23 Richard Stallman <rms@gnu.org>
10916
10917 * src/bison.s1:
10918 (alloca) [__hpux]: Always define as __builtin_alloca.
10919
10920 1997-04-23 Richard Stallman <rms@gnu.org>
10921
10922 * bison.simple:
10923 (alloca) [__hpux]: Always define as __builtin_alloca.
10924
10925 1997-04-22 Richard Stallman <rms@gnu.org>
10926
10927 * src/bison.s1:
10928 [__hpux]: Include alloca.h (right for HPUX 10)
10929 instead of declaring alloca (right for HPUX 9).
10930
10931 * src/bison.s1 (__yy_memcpy):
10932 Declare arg `count' as unsigned int.
10933 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10934
10935 1997-04-22 Richard Stallman <rms@gnu.org>
10936
10937 * bison.simple:
10938 [__hpux]: Include alloca.h (right for HPUX 10)
10939 instead of declaring alloca (right for HPUX 9).
10940
10941 * bison.simple (__yy_memcpy):
10942 Declare arg `count' as unsigned int.
10943 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10944
10945 1997-01-03 Richard Stallman <rms@gnu.org>
10946
10947 * src/allocate.c: [__STDC__ or _MSC_VER]:
10948 Declare calloc and realloc to return void *.
10949
10950 1997-01-02 Richard Stallman <rms@gnu.org>
10951
10952 * src/system.h:
10953 [_MSC_VER]: Include stdlib.h and process.h.
10954 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10955
10956 * src/main.c (main): Return FAILURE as a value.
10957 (printable_version): Declare arg as int, not char.
10958
10959 1997-01-02 Richard Stallman <rms@gnu.org>
10960
10961 * Makefile.in (dist):
10962 Explicitly check for symlinks, and copy them.
10963
10964 1996-12-19 Richard Stallman <rms@gnu.org>
10965
10966 * src/files.c:
10967 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10968
10969 1996-12-18 Paul Eggert <eggert@gnu.org>
10970
10971 * src/bison.s1 (yyparse):
10972 If __GNUC__ and YYPARSE_PARAM are both defined,
10973 declare yyparse to have a void * argument.
10974
10975 1996-12-18 Paul Eggert <eggert@gnu.org>
10976
10977 * bison.simple (yyparse):
10978 If __GNUC__ and YYPARSE_PARAM are both defined,
10979 declare yyparse to have a void * argument.
10980
10981 1996-12-17 Richard Stallman <rms@gnu.org>
10982
10983 * src/reduce.c (nbits): Add some casts.
10984
10985 1996-08-12 Richard Stallman <rms@gnu.org>
10986
10987 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10988
10989 1996-08-12 Richard Stallman <rms@gnu.org>
10990
10991 * bison.simple: Test _MSDOS as well as _MSDOS_.
10992
10993 1996-07-31 Richard Stallman <rms@gnu.org>
10994
10995 * src/bison.s1:
10996 [__sun && __i386]: Include alloca.h.
10997
10998 1996-07-31 Richard Stallman <rms@gnu.org>
10999
11000 * bison.simple:
11001 [__sun && __i386]: Include alloca.h.
11002
11003 1996-07-30 Richard Stallman <rms@gnu.org>
11004
11005 * src/bison.s1: Comment change.
11006
11007 * src/bison.s1: Test _MSDOS_, not MSDOS.
11008
11009 1996-07-30 Richard Stallman <rms@gnu.org>
11010
11011 * bison.simple: Comment change.
11012
11013 * bison.simple: Test _MSDOS_, not MSDOS.
11014
11015 1996-06-01 Richard Stallman <rms@gnu.org>
11016
11017 * 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:
11018 Insert `_' macro around many string constants.
11019
11020 * src/main.c:
11021 Insert `_' macro around many string constants.
11022
11023 (main): Call setlocale, bindtextdomain and textdomain.
11024
11025 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11026 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11027 [ENABLE_NLS]: Include libintl.h.
11028 [ENABLE_NLS] (gettext): Define.
11029 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11030 (N_, PACKAGE, LOCALEDIR): New macros.
11031
11032 1996-06-01 Richard Stallman <rms@gnu.org>
11033
11034 * POTFILES.in: New file.
11035
11036 * Makefile.in (allocate.o):
11037 Define target explicitly.
11038
11039 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11040 (LDFLAGS): Set to @LDFLAGS@.
11041 (configure): Run autoconf only if preceding `cd' succeeds.
11042 (bison.s1): Redirect output to temporary file then move the
11043 temporary to the target, rather than redirecting directly to bison.s1.
11044 (clean): Remove config.status and config.log.
11045 (distclean): Don't remove config.status here.
11046
11047 1996-05-12 Richard Stallman <rms@gnu.org>
11048
11049 * src/bison.s1:
11050 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11051
11052 1996-05-12 Richard Stallman <rms@gnu.org>
11053
11054 * bison.simple:
11055 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11056
11057 1996-05-11 Richard Stallman <rms@gnu.org>
11058
11059 * src/bison.s1 (__yy_memcpy):
11060 Really reorder the args, as was supposedly done on Feb 14 1995.
11061 (yyparse): Calls changed accordingly.
11062
11063 1996-05-11 Richard Stallman <rms@gnu.org>
11064
11065 * Makefile.in (dist): Don't use $(srcdir).
11066
11067 * bison.simple (__yy_memcpy):
11068 Really reorder the args, as was supposedly done on Feb 14 1995.
11069 (yyparse): Calls changed accordingly.
11070
11071 1996-01-27 Richard Stallman <rms@gnu.org>
11072
11073 * src/output.c (output_rule_data):
11074 Test YYERROR_VERBOSE in the conditional
11075 around the definition of ttyname.
11076
11077 1995-12-29 Richard Stallman <rms@gnu.org>
11078
11079 * src/bison.s1:
11080 Fix line numbers in #line commands.
11081
11082 1995-12-29 Richard Stallman <rms@gnu.org>
11083
11084 * bison.simple:
11085 Fix line numbers in #line commands.
11086
11087 1995-12-27 Richard Stallman <rms@gnu.org>
11088
11089 * src/bison.s1 (YYPARSE_PARAM_DECL):
11090 In C++, make it always null.
11091 (YYPARSE_PARAM_ARG): New macro.
11092 (yyparse): Use YYPARSE_PARAM_ARG.
11093
11094 1995-12-27 Richard Stallman <rms@gnu.org>
11095
11096 * bison.simple (YYPARSE_PARAM_DECL):
11097 In C++, make it always null.
11098 (YYPARSE_PARAM_ARG): New macro.
11099 (yyparse): Use YYPARSE_PARAM_ARG.
11100
11101 1995-11-29 Richard Stallman <rms@gnu.org>
11102
11103 * doc/bison.texinfo:
11104 Describe literal string tokens, %raw, %no_lines, %token_table.
11105
11106 1995-11-29 Daniel Hagerty <hag@gnu.org>
11107
11108 * doc/bison.texinfo: Fixed update date
11109
11110 1995-10-16 Richard Stallman <rms@gnu.org>
11111
11112 * src/version.c: Version 1.25.
11113
11114 1995-10-16 Richard Stallman <rms@gnu.org>
11115
11116 * NEWS: *** empty log message ***
11117
11118 1995-10-16 Richard Stallman <rms@gnu.org>
11119
11120 * doc/bison.1, doc/bison.rnh:
11121 Add new options.
11122
11123 1995-10-15 Richard Stallman <rms@gnu.org>
11124
11125 * src/vmsgetargs.c, src/getargs.c:
11126 Added -n, -k, and -raw switches.
11127 (noparserflag, toknumflag, rawtoknumflag): New variables.
11128
11129 * src/symtab.h (SALIAS):
11130 New #define for adding aliases to %token.
11131 (struct bucket): Added `alias' field.
11132
11133 * src/reduce.c (reduce_grammar):
11134 Revise error message.
11135 (print_notices): Remove final `.' from error message.
11136
11137 * src/reader.c (reader_output_yylsp):
11138 New function.
11139 (readgram): Use `#if 0' around code that accepted %command
11140 inside grammar rules: The documentation doesn't allow it,
11141 and it will fail since the %command processors scan for the next %.
11142 (parse_token_decl): Extended the %token
11143 declaration to allow a multi-character symbol as an alias.
11144 (parse_thong_decl): New function.
11145 (read_declarations): Added %thong declarations.
11146 (read_declarations): Handle NOOP to deal with allowing
11147 % declarations as another means to specify the flags.
11148 (readgram): Allow %prec prior to semantics embedded in a rule.
11149 (skip_to_char, read_declarations, copy_definition)
11150 (parse_token_decl, parse_start_decl, parse_type_decl)
11151 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11152 (get_type_name, copy_guard, copy_action, readgram)
11153 (get_type, packsymbols): Revised most error messages.
11154 Changed `fatal' to `warnxxx' to avoid aborting for error.
11155 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11156 (read_declarations): Improve the error message for
11157 an invalid character. Do not abort.
11158 (read_declarations, copy_guard, copy_action): Use
11159 printable_version to avoid unprintable characters in printed output.
11160 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11161 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11162 Allow the type of a non-terminal can be given
11163 more than once, as long as all specifications give the same type.
11164
11165 * src/output.c:
11166 (output_headers, output_trailers, output, output_gram)
11167 (output_rule_data): Implement noparserflag variable.
11168 Implement toknumflag variable.
11169 (output): Call reader_output_yylsp to output LTYPESTR.
11170
11171 * src/main.c (main):
11172 If reader sees an error, don't process the grammar.
11173 (fatals): Updated to not use VARARGS1.
11174 (printable_version, int_to_string, warn, warni, warns, warnss)
11175 (warnsss): New error reporting functions. Avoid abort for error.
11176
11177 * src/lex.h:
11178 Added THONG and NOOP for alias processing.
11179 Added SETOPT for the new code that allows setting options with %flags.
11180
11181 * src/lex.c:
11182 Include getopt.h. Add some extern decls.
11183 (safegetc): New function to deal with EOF gracefully.
11184 (literalchar); new function to deal with reading \ escapes.
11185 (lex): Use literalchar.
11186 (lex): Implemented "..." tokens.
11187 (literalchar, lex, parse_percent_token): Made tokenbuffer
11188 always contain the token. This includes growing the token
11189 buffer while reading an integer.
11190 (parse_percent_token): Replaced if-else statement with percent_table.
11191 (parse_percent_token): Added % declarations as another
11192 way to specify the flags -n, -l, and -r. Also added hooks for
11193 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11194 major changes to files.c.
11195 (lex) Retain in the incoming stream a character following
11196 an incorrect '/'.
11197 (skip_white_space, lex): Revised most error messages
11198 and changed fatal to warn to avoid aborting.
11199 (percent_table): Added %thong declarations.
11200
11201 * src/gram.h: Comment changes.
11202
11203 * src/files.c (openfiles, open_extra_files, done):
11204 Add faction flag
11205 and actfile file. Handle noparserflag. Both for -n switch.
11206
11207 * src/conflicts.c (resolve_sr_conflict):
11208 Remove use of alloca.
11209
11210 1995-06-01 Jim Meyering <meyering@gnu.org>
11211
11212 * doc/bison.texinfo: *** empty log message ***
11213
11214 1995-05-06 Richard Stallman <rms@gnu.org>
11215
11216 * src/bison.s1: Comment change.
11217
11218 1995-05-06 Richard Stallman <rms@gnu.org>
11219
11220 * bison.simple: Comment change.
11221
11222 1995-05-03 Richard Stallman <rms@gnu.org>
11223
11224 * src/version.c: Version now 1.24.
11225
11226 * src/bison.s1: Change distribution terms.
11227
11228 * src/version.c: Version now 1.23.
11229
11230 1995-05-03 Richard Stallman <rms@gnu.org>
11231
11232 * doc/bison.texinfo:
11233 Rewrite "Conditions for Using Bison".
11234 Update version to 1.24.
11235
11236 1995-05-03 Richard Stallman <rms@gnu.org>
11237
11238 * bison.simple: Change distribution terms.
11239
11240 1995-02-23 Richard Stallman <rms@gnu.org>
11241
11242 * src/files.c: Test __VMS_POSIX as well as VMS.
11243
11244 1995-02-14 Jim Meyering <meyering@gnu.org>
11245
11246 * src/bison.s1 (__yy_memcpy):
11247 Renamed from __yy_bcopy to avoid
11248 confusion. Reverse FROM and TO arguments to be consistent with
11249 those of memcpy.
11250
11251 1995-02-14 Jim Meyering <meyering@gnu.org>
11252
11253 * bison.simple (__yy_memcpy):
11254 Renamed from __yy_bcopy to avoid
11255 confusion. Reverse FROM and TO arguments to be consistent with
11256 those of memcpy.
11257
11258 1994-11-10 David J. MacKenzie <djm@gnu.org>
11259
11260 * NEWS: reformat
11261
11262 * NEWS: New file.
11263
11264 * Makefile.in (DISTFILES): Include NEWS.
11265
11266 * Makefile.in (DISTFILES):
11267 Include install-sh, not install.sh.
11268
11269 * configure.in: Update to Autoconf v2 macro names.
11270
11271 1994-10-05 David J. MacKenzie <djm@gnu.org>
11272
11273 * Makefile.in: fix typo
11274
11275 * Makefile.in (prefix, exec_prefix):
11276 Let configure set them.
11277
11278 1994-09-28 David J. MacKenzie <djm@gnu.org>
11279
11280 * Makefile.in: Set datadir to $(prefix)/share.
11281
11282 1994-09-15 Richard Stallman <rms@gnu.org>
11283
11284 * src/bison.s1:
11285 Update copyright notice and GPL version.
11286
11287 1994-09-15 Richard Stallman <rms@gnu.org>
11288
11289 * bison.simple:
11290 Update copyright notice and GPL version.
11291
11292 1994-07-12 Richard Stallman <rms@gnu.org>
11293
11294 * src/reduce.c, src/reader.c:
11295 entered into RCS
11296
11297 1994-05-05 David J. MacKenzie <djm@gnu.org>
11298
11299 * Makefile.in: entered into RCS
11300
11301 1994-03-26 Richard Stallman <rms@gnu.org>
11302
11303 * src/bison.s1: entered into RCS
11304
11305 1994-03-26 Richard Stallman <rms@gnu.org>
11306
11307 * bison.simple: entered into RCS
11308
11309 1994-03-25 Richard Stallman <rms@gnu.org>
11310
11311 * src/main.c: entered into RCS
11312
11313 1994-03-24 Richard Stallman <rms@gnu.org>
11314
11315 * src/conflicts.c: entered into RCS
11316
11317 1994-01-02 Richard Stallman <rms@gnu.org>
11318
11319 * Makefile.in: *** empty log message ***
11320
11321 1993-11-21 Richard Stallman <rms@gnu.org>
11322
11323 * src/bison.s1: *** empty log message ***
11324
11325 1993-11-21 Richard Stallman <rms@gnu.org>
11326
11327 * doc/bison.texinfo: entered into RCS
11328
11329 * doc/bison.texinfo: *** empty log message ***
11330
11331 1993-11-21 Richard Stallman <rms@gnu.org>
11332
11333 * bison.simple: *** empty log message ***
11334
11335 1993-10-25 David J. MacKenzie <djm@gnu.org>
11336
11337 * doc/bison.texinfo: *** empty log message ***
11338
11339 1993-10-19 Richard Stallman <rms@gnu.org>
11340
11341 * src/bison.s1: *** empty log message ***
11342
11343 1993-10-19 Richard Stallman <rms@gnu.org>
11344
11345 * bison.simple: *** empty log message ***
11346
11347 1993-10-14 Richard Stallman <rms@gnu.org>
11348
11349 * src/bison.s1: *** empty log message ***
11350
11351 1993-10-14 Richard Stallman <rms@gnu.org>
11352
11353 * bison.simple: *** empty log message ***
11354
11355 1993-09-14 David J. MacKenzie <djm@gnu.org>
11356
11357 * doc/bison.texinfo: *** empty log message ***
11358
11359 1993-09-13 Noah Friedman <friedman@gnu.org>
11360
11361 * Makefile.in: *** empty log message ***
11362
11363 1993-09-10 Richard Stallman <rms@gnu.org>
11364
11365 * src/conflicts.c: *** empty log message ***
11366
11367 * src/system.h: entered into RCS
11368
11369 1993-09-10 Richard Stallman <rms@gnu.org>
11370
11371 * doc/bison.1: entered into RCS
11372
11373 1993-09-06 Noah Friedman <friedman@gnu.org>
11374
11375 * src/version.c: entered into RCS
11376
11377 1993-09-06 Noah Friedman <friedman@gnu.org>
11378
11379 * Makefile.in: *** empty log message ***
11380
11381 1993-07-30 David J. MacKenzie <djm@gnu.org>
11382
11383 * Makefile.in: *** empty log message ***
11384
11385 1993-07-24 Richard Stallman <rms@gnu.org>
11386
11387 * src/bison.s1: *** empty log message ***
11388
11389 1993-07-24 Richard Stallman <rms@gnu.org>
11390
11391 * bison.simple: *** empty log message ***
11392
11393 1993-07-08 David J. MacKenzie <djm@gnu.org>
11394
11395 * Makefile.in: *** empty log message ***
11396
11397 1993-07-04 Richard Stallman <rms@gnu.org>
11398
11399 * src/bison.s1: *** empty log message ***
11400
11401 1993-07-04 Richard Stallman <rms@gnu.org>
11402
11403 * bison.simple: *** empty log message ***
11404
11405 1993-06-26 David J. MacKenzie <djm@gnu.org>
11406
11407 * src/getargs.c: entered into RCS
11408
11409 1993-06-26 David J. MacKenzie <djm@gnu.org>
11410
11411 * doc/bison.texinfo: *** empty log message ***
11412
11413 * doc/bison.1: New file.
11414
11415 1993-06-25 Richard Stallman <rms@gnu.org>
11416
11417 * src/getargs.c: New file.
11418
11419 1993-06-16 Richard Stallman <rms@gnu.org>
11420
11421 * src/bison.s1: *** empty log message ***
11422
11423 1993-06-16 Richard Stallman <rms@gnu.org>
11424
11425 * bison.simple: *** empty log message ***
11426
11427 1993-06-03 Richard Stallman <rms@gnu.org>
11428
11429 * src/bison.s1: New file.
11430
11431 1993-06-03 Richard Stallman <rms@gnu.org>
11432
11433 * doc/bison.texinfo: *** empty log message ***
11434
11435 1993-06-03 Richard Stallman <rms@gnu.org>
11436
11437 * bison.simple: New file.
11438
11439 1993-05-19 Richard Stallman <rms@gnu.org>
11440
11441 * doc/bison.texinfo: New file.
11442
11443 1993-05-07 Noah Friedman <friedman@gnu.org>
11444
11445 * Makefile.in: *** empty log message ***
11446
11447 1993-04-28 Noah Friedman <friedman@gnu.org>
11448
11449 * src/reader.c: *** empty log message ***
11450
11451 1993-04-23 Noah Friedman <friedman@gnu.org>
11452
11453 * src/alloc.h: entered into RCS
11454
11455 1993-04-20 David J. MacKenzie <djm@gnu.org>
11456
11457 * src/version.c: *** empty log message ***
11458
11459 * src/files.c, src/allocate.c:
11460 entered into RCS
11461
11462 * src/reader.c: *** empty log message ***
11463
11464 * src/lex.c: entered into RCS
11465
11466 * src/conflicts.c: New file.
11467
11468 * src/symtab.c: entered into RCS
11469
11470 * src/alloc.h: New file.
11471
11472 * src/LR0.c: entered into RCS
11473
11474 1993-04-18 Noah Friedman <friedman@gnu.org>
11475
11476 * src/reader.c: New file.
11477
11478 * src/version.c: *** empty log message ***
11479
11480 1993-04-18 Noah Friedman <friedman@gnu.org>
11481
11482 * Makefile.in: *** empty log message ***
11483
11484 1993-04-17 Noah Friedman <friedman@gnu.org>
11485
11486 * Makefile.in: *** empty log message ***
11487
11488 1993-04-15 Richard Stallman <rms@gnu.org>
11489
11490 * src/main.c, src/files.c:
11491 New file.
11492
11493 1993-04-15 Noah Friedman <friedman@gnu.org>
11494
11495 * configure.in: entered into RCS
11496
11497 * configure.in: *** empty log message ***
11498
11499 * configure.in: New file.
11500
11501 1993-04-14 Richard Stallman <rms@gnu.org>
11502
11503 * Makefile.in: New file.
11504
11505 1993-04-13 Richard Stallman <rms@gnu.org>
11506
11507 * src/version.c: New file.
11508
11509 1993-03-25 Richard Stallman <rms@gnu.org>
11510
11511 * src/output.c: entered into RCS
11512
11513 1992-09-25 Richard Stallman <rms@gnu.org>
11514
11515 * configure.bat: entered into RCS
11516
11517 1992-06-22 Richard Stallman <rms@gnu.org>
11518
11519 * src/vmsgetargs.c: entered into RCS
11520
11521 1992-06-22 Richard Stallman <rms@gnu.org>
11522
11523 * doc/bison.rnh: entered into RCS
11524
11525 1992-04-20 David J. MacKenzie <djm@gnu.org>
11526
11527 * README: entered into RCS
11528
11529 1992-01-22 Richard Stallman <rms@gnu.org>
11530
11531 * src/machine.h: entered into RCS
11532
11533 1991-12-21 Richard Stallman <rms@gnu.org>
11534
11535 * src/lalr.c, src/closure.c:
11536 entered into RCS
11537
11538 1991-12-20 Richard Stallman <rms@gnu.org>
11539
11540 * src/state.h: entered into RCS
11541
11542 1991-12-18 Richard Stallman <rms@gnu.org>
11543
11544 * src/print.c, src/nullable.c, src/derives.c:
11545 entered into RCS
11546
11547 1991-11-03 David J. MacKenzie <djm@gnu.org>
11548
11549 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11550 entered into RCS
11551
11552 1988-09-09 Richard Stallman <rms@gnu.org>
11553
11554 * src/bison.hairy: entered into RCS
11555
11556 1987-12-16 Richard Stallman <rms@gnu.org>
11557
11558 * REFERENCES: entered into RCS
11559
11560 -----
11561
11562 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11563 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11564
11565 This file is part of Bison, the GNU Compiler Compiler.
11566
11567 Bison is free software; you can redistribute it and/or modify
11568 it under the terms of the GNU General Public License as published by
11569 the Free Software Foundation; either version 2, or (at your option)
11570 any later version.
11571
11572 Bison is distributed in the hope that it will be useful,
11573 but WITHOUT ANY WARRANTY; without even the implied warranty of
11574 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11575 GNU General Public License for more details.
11576
11577 You should have received a copy of the GNU General Public License
11578 along with Bison; see the file COPYING. If not, write to
11579 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11580 Boston, MA 02111-1307, USA.