]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
[bison.git] / ChangeLog
1 2003-06-20 Paul Eggert <eggert@twinsun.com>
2
3 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
4 and return properly parenthesized result.
5 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7 Remove unnecessary parentheses from uses.
8 * doc/bison.texinfo (Location Default Action): Describe the
9 conventions for parentheses.
10
11 2003-06-19 Paul Eggert <eggert@twinsun.com>
12
13 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
14 yyreportTree): Do not assume that size_t is the same width as int,
15 when printing sizes. Print sizes using an unsigned format.
16 Problem reported by Frank Heckenbach in
17 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
18
19 Port to Forte Developer 7 C compiler.
20 * data/glr.c (struct YYLTYPE): If locations are not being used,
21 declare a single dummy member, as empty structs do not conform
22 to the C standard.
23 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
24 the Forte Developer 7 C compiler complains that end-of-loop
25 code is not reached.
26
27 2003-06-17 Paul Eggert <eggert@twinsun.com>
28
29 Version 1.875b.
30
31 * NEWS: Document 1.875b.
32
33 * lib/bbitset.h: Do not include config.h; that's the includer's job.
34 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
35 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
36 Don't use 'index' in comments, as it's a builtin fn on some hosts.
37 * lib/bitset_stats.c: Include gettext.h unconditionally, as
38 per recent gettext manual's suggestion.
39 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
40 Use prototypes, not old-style definitions.
41 * lib/lbitset.c (lbitset_unused_clear): Likewise.
42 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
43 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
44 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
45 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
46 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
47 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
48 vbitset_or_and_cmp, vbitset_copy): Likewise.
49
50 * lib/libiberty.h: Do not include config.h; that's the includer's job.
51 Do not include <stdlib.h>.
52 (PARAMS): Define unconditionally for C89.
53 (ATTRIBUTE_NORETURN): Remove.
54 (ATTRIBUTE_UNUSED): Define unconditionally.
55
56 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
57 <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
58 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
59 * lib/vbitset.c, lib/vbitset.h: New files.
60 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
61 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
62 from libbitset.
63
64 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
65 `How Can I Reset @code{yyparse}', since texinfo does not allow
66 arbitrary @ in node names.
67
68 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
69 shouldn't be needed according to the gettext 0.12.1 documentation
70 but which seem to be needed anyway: codeset.m4 glibc21.m4
71 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
72 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
73 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
74
75 * lib/.cvsignore: Add stdbool.h.
76 * m4/.cvsignore: Add nls.m4, po.m4.
77
78 Upgrade to CVS gnulib.
79 * stdbool_.h: File renamed from stdbool.h.in.
80 * configure.ac (AM_STDBOOL_H): Invoke this instead of
81 AC_HEADER_STDBOOL.
82 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
83 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
84 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
85 (MOSTLYCLEANFILES): New var.
86 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
87 (stdbool.h): New rule.
88 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
89 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
90 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
91 m4/quote.m4: Upgrade to today's gnulib.
92
93 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
94 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
95 the tests right now.
96 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
97 yyerror are declared before use; C99 requires this.
98
99 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
100
101 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
102 first.
103 (yyrecoverSyntaxError): Correct the logic for setting and testing
104 yyerrState.
105 Correct comment on handling EOF.
106 Allow states with only a default reduction, rather than failing
107 (I can't quite reconstruct why these were not allowed before).
108
109 Fixes to avoid problem that $-N rules in GLR parsers can cause
110 buffer overruns, corrupting state.
111
112 * src/output.c (prepare_rules): Output max_left_semantic_context
113 definition.
114 * src/reader.h (max_left_semantic_context): New variable declaration.
115 * src/scan-gram.l (max_left_semantic_context): Define.
116 (handle_action_dollar): Update max_left_semantic_context.
117 * data/glr.c (YYMAXLEFT): New definition.
118 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
119 (yyresolveAction): Ditto.
120
121 Fixes to problems with location handling in GLR parsers reported by
122 Frank Heckenbach (2003/06/05).
123
124 * data/glr.c (YYLTYPE): Make trivial if locations not used.
125 (YYRHSLOC): Add parentheses, and define only if locations used.
126 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
127 locations not used.
128 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
129 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
130
131 * tests/cxx-type.at: Exercise location information; update tests
132 to differentiate output with and without locations.
133 Remove forward declarations of yylex and yyerror---caused errors
134 because default YYLTYPE not yet defined.
135 Change semantic actions to compute strings, rather than printing
136 them directly (to test proper passing of semantics values). Change
137 output to prefix notation and update test data and expected results.
138 (yylex): Track locations.
139 (stmtMerge): Return value rather than printing, and include arguments
140 in value.
141
142 2003-06-03 Paul Eggert <eggert@twinsun.com>
143
144 Avoid warnings generated by GCC 2.95.4 when Bison is
145 configured with --enable-gcc-warnings.
146 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
147 yy::]b4_parser_class_name[::translate_,
148 yy::Stack::operator[] (unsigned),
149 yy::Stack::operator[] (unsigned) const,
150 yy::Slice::operator[] (unsigned),
151 yy::Slice::operator[] (unsigned) const):
152 Rename local vars to avoid warnings.
153 * tests/glr-regression.at (Improper handling of embedded actions
154 and $-N in GLR parsers): Remove unused local variable from yylex.
155 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
156 (void) as arg when not pure, since we now assume C89 when building
157 Bison. Pacify GCC by using parameter.
158
159 2003-06-02 Paul Eggert <eggert@twinsun.com>
160
161 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
162 yy::Location::lines, yy::Location::columns): Rename arguments
163 to avoid shadowing; this removes a warning generated by GCC 3.3.
164
165 2003-06-01 Paul Eggert <eggert@twinsun.com>
166
167 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
168 to g++, as GCC 3.3 complains if you do it.
169 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
170 everything that WARNING_CFLAGS has, except omit warnings
171 not suitable for C++.
172 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
173 * tests/atlocal.in (CXXFLAGS): New var.
174 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
175
176 Fix a GLR parser bug I reported in February; see
177 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
178 The problem was that GLR parsers did not conform to the C standard,
179 because actions like { $1 = $2 + $3; } expanded to expressions
180 that invoked YYFILL in separate subexpressions, and YYFILL assigned
181 to a local variable. The C standard says that expressions
182 like (var = f ()) + (var = f ()) have undefined behavior.
183 Another problem was that GCC sometimes issues warnings that
184 yyfill and its parameters are unused.
185
186 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
187 as possibly unused.
188 (yyfill): New function.
189 (YYFILL): Use it.
190 (yyuserAction): Change type of yynormal to bool, so that it matches
191 the new yyfill signature. Mark it as possibly unused.
192
193
194 Follow up on a bug I reported in February, where a Bison-generated
195 parser can loop. Provide a test case and a fix for yacc.c. I
196 don't have a fix for lalr1.cc or for glr.c, unfortunately.
197 The original bug report is in:
198 <http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
199
200 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
201 macro's size was becoming unwieldy.
202 (yyerrlab): Do not discard an empty lookahead symbol, as this
203 might destroy garbage.
204 (yyerrorlab): New label, with the old contents of YYERROR,
205 plus the following change: pop the stack of rhs corresponding
206 to the production that invoked YYERROR. That is how Yacc
207 behaves, and POSIX requires this behavior.
208 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
209 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
210 Define 'alarm' to do nothing if unistd.h is not available.
211 Add a new rule "exp: '-' error;" to test the above change to
212 data/yacc.c. Use 'alarm' to abort any test taking longer than
213 10 seconds, as it's probably looping.
214 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
215 Also, the new yacc.c generates two fewer diagnostics for an
216 existing test.
217
218 2003-05-24 Paul Eggert <eggert@twinsun.com>
219
220 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
221 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
222 This fixes a problem reported by John Bowman when the Compaq/HP
223 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
224 -ansi -Wall -gall).
225 * data/yacc.c (union yyalloc): Likewise.
226 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
227
228 Switch from 'int' to 'bool' where that makes sense.
229
230 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
231 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
232 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
233 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
234 Return or accept bool, not int. All callers changed.
235 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
236 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
237 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
238 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
239 bitset_or_and_cmp_): Likewise.
240 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
241 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
242 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
243 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
244 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
245 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
246 bitset_stats_or_and_cmp): Likewise.
247 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
248 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
249 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
250 ebitset_xor_cmp): Likewise.
251 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
252 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
253 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
254 lbitset_xor_cmp): Likewise.
255 * lib/bbitset.h: Include <stdbool.h>.
256 (struct bitset_vtable): The following members now return bool, not
257 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
258 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
259 or_and_cmp).
260 * src/conflicts.c (count_rr_conflicts): Likewise.
261 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
262 All uses changed.
263 * lib/ebitset.c (ebitset_obstack_init): Likewise.
264 * lib/lbitset.c (lbitset_obstack_init): Likewise.
265 * src/getargs.c (debug_flag, defines_flag, locations_flag,
266 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
267 graph_flag): Likewise.
268 * src/getargs.h (debug_flag, defines_flag, locations_flag,
269 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
270 graph_flag): Likewise.
271 * src/output.c (error_verbose): Likewise.
272 * src/output.h (error_verbose): Likewise.
273 * src/reader.c (start_flag, typed): Likewise.
274 * src/reader.h (typed): Likewise.
275 * src/getargs.c (LOCATIONS_OPTION): New constant.
276 (long_options, getargs): Use it.
277 * src/lalr.c (build_relations): Use bool, not int.
278 * src/nullable.c (nullable_compute): Likewise.
279 * src/print.c (print_reductions): Likewise.
280 * src/tables.c (action_row, pack_vector): Likewise.
281 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
282 * src/output.c (prepare): Use it.
283 * src/output.c (token_definitions_output,
284 symbol_destructors_output, symbol_destructors_output): Use string,
285 not boolean integer, to keep track of whether to output separator.
286 * src/print_graph.c (print_core): Likewise.
287 * src/state.c (state_rule_lookaheads_print): Likewise.
288
289 * config/install-sh: Sync from automake 1.7.5.
290
291 2003-05-14 Paul Eggert <eggert@twinsun.com>
292
293 * src/parse-gram.y (rules_or_grammar_declaration): Require a
294 semicolon after a grammar declaration, in the interest of possible
295 future changes to the Bison input language.
296 Do not allow a stray semicolon at the start of the grammar.
297 (rhses.1): Allow one or more semicolons after any rule, including
298 just before "|" as required by POSIX.
299 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
300 grammar.
301
302 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
303
304 %parse-param support for lalr1.cc.
305
306 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
307 b4_cc_constructor_calls, b4_cc_constructor_call,
308 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
309 definitions.
310 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
311 parse-param arguments.
312 (yy::b4_parser_class_name): Declare instance variables to
313 hold parse-param arguments.
314 * tests/calc.at: s/value/semantic_value/ because value clashes
315 with a member of yy::b4_parser_class_name. Adjust C++ code
316 to handle %parse-param. Enable %parse-param test in C++.
317
318 2003-05-12 Paul Eggert <eggert@twinsun.com>
319
320 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
321 English a bit. Fix fclose typo. Change "const char" to "char
322 const", and use ANSI C rather than K&R for "main". Suggest
323 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
324 and suggest yy_switch_to_buffer.
325
326 2003-05-05 Paul Eggert <eggert@twinsun.com>
327
328 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
329 C89. This avoids a diagnostic on compilers that define __STDC__
330 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
331 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
332
333 2003-05-03 Paul Eggert <eggert@twinsun.com>
334
335 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
336 Do not overrun array bounds.
337 This should fix a bug reported today by Olatunji Oluwabukunmi in
338 <http://mail.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
339
340 2003-04-29 Akim Demaille <akim@epita.fr>
341
342 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
343 * src/getargs.c, src/getargs.h: here, as bool, not int.
344 (nondeterministic_parser): New.
345 * src/parse-gram.y, src/scan-gram.l: Support
346 %nondeterministic-parser.
347 * src/output.c (prepare): Use nondeterministic_parser instead
348 of glr_parser where appropriate.
349 * src/tables.c (conflict_row, action_row, save_row)
350 (token_actions, token_actions, pack_vector): Ditto.
351
352 2003-04-29 Akim Demaille <akim@epita.fr>
353
354 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
355
356 2003-04-29 Akim Demaille <akim@epita.fr>
357
358 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
359 with %pure-parser and %locations to exercise the patch from Yakov
360 Markovitch below.
361
362 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
363
364 * data/yacc.c: (b4_lex_param): Corrected for the case where
365 %lex-param is provided and %pure-parser isn't.
366
367 2003-04-27 Paul Eggert <eggert@twinsun.com>
368
369 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
370 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
371 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
372 if it is not defined.
373 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
374
375 2003-04-26 Paul Eggert <eggert@twinsun.com>
376
377 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
378 Declare to be of type suitable for the ninf value itself, not of
379 type suitable for the corresponding table, since the latter might
380 be unsigned but the ninf value might be negative. This fixes a
381 bug reported by Alexandre Duret-Lutz in
382 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
383
384 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
385 invokes it. We shouldn't invoke it twice because it will attempt
386 to put error.o in the archive twice. This fixes a glitch reported
387 by Martin Mokrejs in
388 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
389
390 2003-04-21 Paul Eggert <eggert@twinsun.com>
391
392 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
393 to gnulib.
394
395 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
396
397 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
398 Fix obvious typo that results in uncompilable GLR parsers
399 when both %pure-parser and %locations are used. (trivial change)
400
401 2003-04-17 Paul Eggert <eggert@twinsun.com>
402
403 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
404 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
405 Do not insert the expected token via unput, as this runs afoul
406 of a POSIX-compatibility bug in flex 2.5.31.
407 All uses changed to BEGIN the parent state,
408 since we no longer insert the expected token via unput.
409 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
410 that is no longer emitted after the above change.
411
412 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
413 the first one. This change is from Paul Hilfinger, and it fixes
414 regression reported by Werner Lemberg in
415 <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
416
417 (resolve_sr_conflict): Don't invoke state_errs_set
418 unless one or more tokens have been explicitly made errors.
419 Otherwise, the above change causes Bison to abort.
420
421 * tests/existing.at (GNU pic Grammar): New test case, taken from
422 Lemberg's email.
423
424 2003-03-31 Akim Demaille <akim@epita.fr>
425
426 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
427
428 2003-03-31 Akim Demaille <akim@epita.fr>
429
430 * src/output.c (prepare_symbols): Avoid trailing spaces in the
431 output.
432
433 2003-03-31 Akim Demaille <akim@epita.fr>
434
435 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
436 From Paul Hilfinger.
437
438 2003-03-29 Akim Demaille <akim@epita.fr>
439
440 * m4/error.m4: Do not put under dynamic conditions some code which
441 expansion is under static control.
442
443 2003-03-29 Akim Demaille <akim@epita.fr>
444
445 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
446
447 2003-03-29 Akim Demaille <akim@epita.fr>
448
449 * doc/bison.texinfo (Strings are Destroyed): New.
450
451 2003-03-13 Paul Eggert <eggert@twinsun.com>
452
453 * .cvsignore: Add configure.lineno.
454 * src/.cvsignore: Add yacc.
455 * tests/.cvsignore: Add testsuite.log.
456 * doc/fdl.texi: Sync with latest FSF version.
457
458 2003-03-12 Paul Eggert <eggert@twinsun.com>
459
460 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
461 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
462 cursor, instead of leaving it undefined. This fixes a bug
463 reported by Tim Van Holder in
464 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
465 * tests/input.at (Torturing the Scanner): Test the scanner on
466 an empty input file, which was Tim Van Holder's test case.
467
468 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
469 <sys/resource.h> can be included, include sys/time.h and
470 sys/times.h first, if available. This works around the SunOS
471 4.1.4 porting bug reported by Bruce Becker in
472 <http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
473
474 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
475 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
476 AC_HEADER_SYS_WAIT.
477
478 Merge changes from gnulib. This was prompted because the CVS
479 snapshot didn't build on Solaris 7 due to strnlen problems.
480
481 These changes need to be merged back into gnulib:
482 * lib/hash.c: Include <stdbool.h> unconditionally.
483 * m4/onceonly.m4 (m4_quote): New macro.
484 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
485 Quote AC_FOREACH variable-expansions properly.
486 The 2003-01-03 obstack.h change also needs merging.
487 {end of changes requiring merging}
488
489 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
490 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
491 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
492 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
493 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
494 New files, imported from gnulib.
495 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
496 above.
497
498 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
499 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
500 gnulib sources.
501
502 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
503 Add.
504 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
505 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
506 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
507 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
508 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
509 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
510 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
511 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
512 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
513 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
514 (jm_PREREQ_ARGMATCH): Remove.
515 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
516 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
517
518 * src/system.h: Include <stdbool.h> unconditionally.
519
520 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
521 assuming at least C89 in the bitset code for some time now.
522
523 2003-03-03 Akim Demaille <akim@epita.fr>
524
525 * ro.po: New.
526
527 2003-03-02 Akim Demaille <akim@epita.fr>
528
529 * doc/bison.texinfo (Table of Symbols): Reactivate the
530 documentation for %lex-param, and %parse-param.
531
532 2003-03-02 Akim Demaille <akim@epita.fr>
533
534 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
535 generate verbose error messages.
536 Use the number of tokens as an upper bound in yytname, as it
537 cannot be a non terminal.
538
539 2003-03-02 Akim Demaille <akim@epita.fr>
540
541 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
542 message.
543
544 2003-03-02 Akim Demaille <akim@epita.fr>
545
546 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
547 Use them to exercise yycheck overrun.
548 Based on Andrew Suffield's grammar.
549
550 2003-03-02 Akim Demaille <akim@epita.fr>
551
552 Create tests/local.at for Bison generic testing macros.
553
554 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
555 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
556 This new file.
557 * tests/calc.at (AT_CHECK_CALC): Adjust.
558 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
559 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
560 * tests/local.at: here.
561 (AT_COMPILE_CXX): Tags the tests using it as c++.
562 Ignore the test if CXX is not functional.
563
564 2003-03-01 Paul Eggert <eggert@twinsun.com>
565
566 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
567 not loc->end, since loc->end might contain garbage and this leads
568 to undefined behavior on some platforms.
569 (id_loc, token_start): Use (IF_LINTed) initial values that do not
570 depend on *loc, so that the reader doesn't give the the false
571 impression that *loc is initialized.
572 (<INITIAL>"%%"): Do not bother setting code_start, since its value
573 does not survive the return.
574
575 2003-03-01 Akim Demaille <akim@epita.fr>
576
577 * src/scan-gram.l (code_start): Always initialize it when entering
578 into yylex, as SC_EPILOGUE is activated *before* the corresponding
579 yylex invocation. An alternative would be making it static, but
580 then it starts with the second %%'s beginning, instead of its end.
581
582 2003-02-28 Paul Eggert <eggert@twinsun.com>
583
584 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
585 around a UnixWare 7.1.1 porting bug reported by John Hughes in
586 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
587
588 2003-02-26 Paul Eggert <eggert@twinsun.com>
589
590 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
591 Remove Sequent/Pyramid discussion (nobody uses them any more).
592 Merge VMS and MS-DOS discussion; these ports may well be dead
593 but let's keep mentioning them for now. Put <> around email
594 addresses. Add copyright notice.
595
596 2003-02-24 Paul Eggert <eggert@twinsun.com>
597
598 * data/glr.c (yy_reduce_print): yylineno -> yylno,
599 to avoid collision with flex use of yylineno.
600 Problem reported by Bruce Lilly in
601 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
602 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
603 * data/yacc.c (yy_reduce_print): Likewise.
604
605 * config/depcomp: Sync with Automake 1.7.3.
606
607 2003-02-21 Akim Demaille <akim@epita.fr>
608
609 * data/lalr1.cc: Use temporary variables instead of casts to
610 change integer types.
611 Suggested by Paul Eggert.
612
613 2003-02-21 Akim Demaille <akim@epita.fr>
614
615 * doc/bison.texinfo: Use "location" consistently to refer to @n,
616 to avoid confusions with lalr1.cc's notion of Position.
617 Suggested by Paul Eggert.
618
619 2003-02-20 Akim Demaille <akim@epita.fr>
620
621 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
622 before initial_columns.
623 (location.hh): Use consistent variable names when defining the
624 operator<<.
625 Use "last" so that we subtract from Positions, not from unsigned.
626
627 2003-02-20 Akim Demaille <akim@epita.fr>
628
629 * data/lalr1.cc (position.hh): New subfile, including the extended
630 and Doxygen'ed documentation of class Position.
631 (location.hh): Use it.
632 Document a` la Doxygen.
633 With the help of Benoit Perrot.
634
635 2003-02-20 Akim Demaille <akim@epita.fr>
636
637 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
638 AT_YACC_IF.
639 Redefine AT_YYERROR_SEES_LOC_IF using it.
640 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
641 not defined.
642 Don't use the location in yy::Parser::error_ and
643 yy::Parser::print_ when not %locations.
644 Activate more lalr1.cc tests.
645
646 2003-02-19 Akim Demaille <akim@epita.fr>
647
648 * data/lalr1.cc: When displaying a line number, be sure to make it
649 an int.
650
651 2003-02-19 Akim Demaille <akim@epita.fr>
652
653 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
654 Remove, useless.
655 (YYABORT, YYACCEPT, YYERROR): New.
656 * tests/calc.at: Renable the lalr1.cc test.
657
658 2003-02-19 Akim Demaille <akim@epita.fr>
659
660 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
661 error recovery, mixing with/without pops and discarding of the
662 lookahead.
663 Exercise YYERROR.
664 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
665
666 2003-02-17 Paul Eggert <eggert@twinsun.com>
667
668 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
669 * tests/testsuite.at (AT_COMPILE): Use them.
670 This fixes the testsuite problem reported by Robert Lentz in
671 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
672
673 2003-02-12 Paul Eggert <eggert@twinsun.com>
674
675 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
676 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
677 <http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
678 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
679 Check for malloc failure, for consistency with yacc.c.
680 (yytname_size): Remove, for consistency with yacc.c.
681
682 The bug still remains in data/lalr1.cc, as I didn't have time
683 to fix it there.
684
685 2003-02-06 Akim Demaille <akim@epita.fr>
686
687 * configure.ac (GXX): Rename as...
688 (CXX): this, to keep the original Autoconf semantics.
689 Require 2.57.
690 * data/lalr1.cc: Fix b4_copyright invocations.
691 If YYDEBUG is not defined, don't depend upon name_ being defined.
692 (location.hh): Include string and iostream.
693 (Position::filename): New member.
694 (Position::Position ()): New.
695 (operator<< (Position)): New.
696 (operator- (Position, int)): New.
697 (Location::first, Location::last): Rename as...
698 (Location::begin, Location::end): these, to mock the conventional
699 iterator names.
700 (operator<< (Location)): New.
701 * tests/atlocal.in (CXX): New.
702 * tests/testsuite.at (AT_COMPILE_CXX): New.
703 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
704 locations in a more synthetic way.
705 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
706 lalr1.cc is used.
707 Adjust the C locations to match those from Emacs: first column is
708 column 0.
709 Change all the expected results.
710 Conform to the GCS: simplify the locations when applicable.
711 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
712 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
713 these CPP macros with the m4 macros new defined by...
714 (AT_CHECK_PUSHDEFS): this, i.e.:
715 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
716 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
717 New macros.
718 (AT_CHECK_POPDEFS): Undefine them.
719 (AT_CHECK_CALC_LALR1_CC): New.
720 Use it for the first lalr1.cc test.
721
722 2003-02-04 Akim Demaille <akim@epita.fr>
723
724 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
725 Location as is defined.
726
727 2003-02-04 Akim Demaille <akim@epita.fr>
728
729 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
730 name_ being defined.
731
732 2003-02-03 Paul Eggert <eggert@twinsun.com>
733
734 * src/gram.h (start_symbol): Remove unused decl.
735
736 Use more-consistent naming conventions for local vars.
737
738 * src/derives.c (derives_compute): Change type of local var from
739 int to rule_number.
740 * src/gram.c (grammar_rules_partial_print): Likewise.
741 * src/print.c (print_core): Likewise.
742 * src/reduce.c (reduce_grammar_tables): Likewise.
743
744 * src/gram.c (grammar_dump): Change name of item_number *
745 local var from r to rp.
746 * src/nullable.c (nullable_compute): Likewise.
747
748 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
749
750 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
751 for symbol or symbol_number var.
752 * src/reader.c (grammar_start_symbol_set): Likewise.
753 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
754 Likewise.
755 * src/state.c (transitions_to): Likewise.
756 * src/state.h: Likewise.
757 * src/tables.c (symbol_number_to_vector_number): Likewise.
758
759 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
760 char * var.
761
762 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
763 var.
764
765 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
766 var.
767
768 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
769 Use str, not s, for char * var. Use ch, not c, for character var.
770 Use size for size var.
771
772 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
773 char * var.
774 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
775 uniqstr var.
776 * src/uniqstr.h: Likewise.
777
778 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
779 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
780 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
781 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
782 param to have same name as that of enum, so that we don't use
783 "s" to stand for a non-state.
784
785 2003-02-02 Akim Demaille <akim@epita.fr>
786
787 * src/scan-skel.l: Scan more than one inert character per yylex
788 invocation.
789
790 2003-02-01 Paul Eggert <eggert@twinsun.com>
791
792 Version 1.875a.
793
794 * po/LINGUAS: Add ms.
795
796 2003-01-30 Akim Demaille <akim@epita.fr>
797
798 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
799
800 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
801
802 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
803 of $1.
804
805 Changes in response to error report by S. Eken: GLR mode does not
806 handle negative $ indices or $ indices in embedded rules correctly.
807 See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
808
809 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
810 (b4_rhs_location): Ditto.
811 (yyfill): New function to copy from stack tree into array
812 incrementally.
813 (yyuserAction): Modify to allow incremental move of semantic values
814 to rhs array when in GLR mode.
815 Define YYFILL to use in user-defined actions to fill semantic array
816 as needed.
817 Remove dummy use of yystack, as there is now a guaranteed use.
818 (yydoAction): Modify to allow incremental move of semantic values
819 to rhs array when in GLR mode.
820 (yyresolveAction): Ditto.
821 (yyglrShiftDefer): Update comment.
822 (yyresolveStates): Use X == NULL for pointers, not !X.
823 (yyglrReduce): Ditto.
824 (yydoAction): Ditto
825
826 * tests/glr-regr1.at: Rename to ...
827 * tests/glr-regression.at: Add new regression test for the problems
828 described above (adapted from S. Eken).
829 Update copyright notice.
830 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
831 * tests/Makefile.am: Ditto.
832
833 2003-01-28 Paul Eggert <eggert@twinsun.com>
834
835 * data/lalr1.cc: Do not use @output_header_name@ unless
836 b4_defines_flag is set. This fixes two bugs reported by
837 Tim Van Holder in
838 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
839 and <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
840
841 2003-01-21 Paul Eggert <eggert@twinsun.com>
842
843 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
844 we don't need to worry about yyerrlab1 being reported as an
845 "unused label" by non-GCC C compilers. The downside is that if
846 locations are used then a couple of statements are duplicated each
847 time YYERROR is invoked, but the upside is that the warnings
848 should vanish.
849 (yyerrlab1): Move code to YERROR.
850 (yyerrlab2): Remove. Change uses back to yyerrlab1.
851 This reverts some of the 2002-12-27 change.
852
853 2003-01-17 Paul Eggert <eggert@twinsun.com>
854
855 * src/output.c (symbol_printers_output): Fix typo that led
856 to core dump. Problem reported by Antonio Rus in
857 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
858
859 2003-01-13 Akim Demaille <akim@epita.fr>,
860 Quoc Peyrot <chojin@lrde.epita.fr>,
861 Robert Anisko <anisko_r@lrde.epita.fr>
862
863 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
864 when the stacks contain one element, as the loop would otherwise
865 free the last state, and then use the top state (the one we just
866 popped). This means that the initial elements will not be freed
867 explicitly, as is the case in yacc.c; it is not a problem, as
868 these elements have fake values.
869
870 2003-01-11 Paul Eggert <eggert@twinsun.com>
871
872 * NEWS: %expect-violations are now just warnings, reverting
873 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
874 bootstrapping problem reported by Matthias Klose; see
875 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
876 * src/conflicts.c (conflicts_print): Likewise.
877 * tests/conflicts.at (%expect not enough, %expect too much,
878 %expect with reduce conflicts): Likewise.
879 * doc/bison.texinfo (Expect Decl): Document this. Also mention
880 that the warning is enabled if the number of conflicts changes
881 (not necessarily increases).
882
883 * src/getargs.c (version): Update copyright year.
884
885 2003-01-09 Akim Demaille <akim@epita.fr>
886
887 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
888
889 2003-01-08 Paul Eggert <eggert@twinsun.com>
890
891 * Makefile.maint (WGETFLAGS):
892 New macro, containing "-C off" to disable proxy caches.
893 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
894 (rel-check): Use $(WGET) instead of wget.
895
896 2003-01-06 Paul Eggert <eggert@twinsun.com>
897
898 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
899 the GLR paper of Scott, Johnstone and Hussain.
900
901 2003-01-04 Paul Eggert <eggert@twinsun.com>
902
903 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
904 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
905 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
906 (EXTRA_LIBRARIES): New var, for liby.a.
907 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
908 (EXTRA_SCRIPTS): New var, for yacc.
909
910 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
911 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
912 Problem reported by Nelson H. F. Beebe.
913
914 2003-01-03 Paul Eggert <eggert@twinsun.com>
915
916 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
917 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
918 when compiling Bison 1.875's `bitset bset = obstack_alloc
919 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
920
921 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
922 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
923 grow to a huge size with typical invocation.
924
925 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
926 Use the pattern recommended by Autoconf 2.57, except also protect
927 against double-definition.
928 * src/system.h: Likewise.
929 Portability issues reported by Nelson H. F. Beebe.
930
931 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
932 All uses changed. Provide a definition in both C and C++.
933 (yytrue, yyfalse): Define even if defined (__cplusplus).
934
935 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
936 Reported by Nelson H. F. Beebe.
937
938 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
939
940 2003-01-02 Paul Eggert <eggert@twinsun.com>
941
942 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
943 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
944 Bug reported by Nelson H. F. Beebe.
945
946 2003-01-01 Paul Eggert <eggert@twinsun.com>
947
948 * Version 1.875.
949
950 2002-12-30 Paul Eggert <eggert@twinsun.com>
951
952 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
953 Moved here from...
954 (<INITIAL>","): Here. This causes stray "," to be treated
955 more uniformly.
956
957 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
958 last brace in braced code when not in Yacc mode, for compatibility
959 with Bison 1.35. This resurrects the 2001-12-15 patch to
960 src/reader.c.
961
962 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
963 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
964
965 2002-12-28 Paul Eggert <eggert@twinsun.com>
966
967 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
968 that of SYM's type. This fixes Debian bug 168069, reported by
969 Thomas Olsson.
970
971 2002-12-28 Paul Eggert <eggert@twinsun.com>
972
973 Version 1.75f.
974
975 Switch back to the Yacc style of conflict reports, undoing some
976 of the 2002-07-30 change.
977 * doc/bison.texinfo (Understanding): Use Yacc style for
978 conflict reports. Also, use new way of locating rules.
979 * src/conflicts.c (conflict_report):
980 Renamed from conflict_report_yacc, removing the old
981 'conflict_report'. Translate the entire conflict report at once,
982 so that we don't assume that "," has the same interpretation in
983 all languages.
984 (conflicts_output): Use Yacc-style conflict report for each state,
985 instead of our more-complicated style.
986 (conflicts_print): Use Yacc-style conflict report, except print
987 the input file name when not emulating Yacc.
988 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
989 Conflicted Reduction, %expect not enough, %expect too much,
990 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
991 * tests/existing.at (GNU Cim Grammar): Likewise.
992 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
993
994 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
995 fatal): Don't invoke fflush; it's not needed and it might even be
996 harmful for stdout, as stdout might not be open.
997 * src/reduce.c (reduce_print): Likewise.
998
999 2002-12-27 Paul Eggert <eggert@twinsun.com>
1000
1001 Fix a bug where error locations were not being recorded correctly.
1002 This problem was originally reported by Paul Hilfinger in
1003 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
1004
1005 * data/yacc.c (yyparse): New local var yylerrsp, to record the
1006 top of the location stack's error locations.
1007 (yyerrlab): Set it. When discarding a token, push its location
1008 onto yylerrsp so that we don't lose track of the error's end.
1009 (yyerrlab1): Now is only the target of YYERROR, so that we can
1010 properly record the location of the action that failed. For GCC
1011 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
1012 GCC warning about yyerrlab1 being unused if YYERROR is unused.
1013 (yyerrlab2): New label, which yyerrlab now falls through to.
1014 Compute the error's location by applying YYLLOC_DEFAULT to
1015 the locations of all the symbols that went into the error.
1016 * doc/bison.texinfo (Location Default Action): Mention that
1017 YYLLOC_DEFAULT is also invoked for syntax errors.
1018 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1019 Error locations include the locations of all the tokens that were
1020 discarded, not just the last token.
1021
1022 2002-12-26 Paul Eggert <eggert@twinsun.com>
1023
1024 * src/files.c: Include quote.h.
1025 (compute_output_file_names): Warn if we detect conflicting
1026 outputs to the same file. This should catch the misunderstanding
1027 exemplified by Debian Bug 165349, reported by Bruce Stephens..
1028
1029 * src/conflicts.c (conflicts_print): If the user specifies
1030 "%expect N", report an error if there are any reduce/reduce
1031 conflicts. This is what the manual says should happen.
1032 This fixes Debian bug 130890, reported by Anthony DeRobertis.
1033 * tests/conflicts.at (%expect with reduce conflicts): New test.
1034
1035 Don't use m4_include on relative file names, as it doesn't work as
1036 desired if there happens to be a file with that name under ".".
1037
1038 * m4sugar/version.m4: Remove; it was included but it wasn't used.
1039 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
1040 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
1041 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
1042 * src/output.c (output_skeleton): Use full path names when
1043 specifying a file to include; don't rely on include path, as
1044 it's unreliable when the working file contains a file with
1045 that name.
1046
1047 2002-12-25 Paul Eggert <eggert@twinsun.com>
1048
1049 Remove obsolete references to bison.simple and bison.hairy.
1050 Problem mentioned by Aubin Mahe in
1051 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
1052 * data/glr.c: Comment fix.
1053 * doc/bison.1: Remove references. Also, mention "yacc".
1054
1055 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
1056 with -g option.
1057
1058 * src/parse-gram.y (declaration): Use enum "report_states" rather
1059 than its numeric value 1.
1060
1061 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
1062 opening a new one. This fixes Debian bug 165349, reported by
1063 Bruce Stephens.
1064
1065 2002-12-24 Paul Eggert <eggert@twinsun.com>
1066
1067 Version 1.75e.
1068
1069 * Makefile.maint (cvs-update): Don't assume that the shell
1070 supports $(...), as Solaris sh doesn't.
1071
1072 * src/parse-gram.y (lloc_default): Remove test for empty
1073 nonterminals at the end, since it didn't change the result.
1074
1075 2002-12-24 Paul Eggert <eggert@twinsun.com>
1076
1077 If the user does not define YYSTYPE as a macro, Bison now declares it
1078 using typedef instead of defining it as a macro. POSIX requires this.
1079 For consistency, YYLTYPE is also declared instead of defined.
1080
1081 %union directives can now have a tag before the `{', e.g., the
1082 directive `%union foo {...}' now generates the C code
1083 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
1084 The default union tag is `YYSTYPE', for compatibility with Solaris 9
1085 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
1086 instead of `yyltype'.
1087
1088 `yystype' and `yyltype' are now obsolescent macros instead of being
1089 typedefs or tags; they are no longer documented and will be
1090 withdrawn in a future release.
1091
1092 * data/glr.c (b4_location_type): Remove.
1093 (YYSTYPE): Renamed from yystype.
1094 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
1095 (struct YYLTYPE): Renamed from struct yyltype.
1096 (YYLTYPE): Renamed from yyltype.
1097 (yyltype, yystype): New (and obsolescent) macros,
1098 for backward compatibility.
1099 * data/yacc.c: Likewise.
1100
1101 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
1102 does not specify a union tag. This is for compatibility with
1103 Solaris 9 yacc.
1104
1105 * src/parse-gram.y (add_param): 2nd arg is now char * not char
1106 const *, since it is now modified by stripping surrounding { }.
1107 (current_braced_code): Remove.
1108 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
1109 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
1110 trailing " {...}". Now of type <chars>.
1111 (grammar_declaration): Adjust to bundled tokens.
1112 (code_content): Remove; stripping is now done by add_param.
1113 (print_token_value): Print contents of bundled tokens.
1114 (token_name): New function.
1115
1116 * src/reader.h (braced_code, current_braced_code): Remove.
1117 (token_name): New decl.
1118
1119 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
1120 token_type, not braced_code code_kind. All uses changed.
1121 (SC_PRE_CODE): New state, for scanning after a keyword that
1122 has (or usually has) an immediately-following braced code.
1123 (token_type): New local var, to keep track of which token type
1124 to return when scanning braced code.
1125 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
1126 <INITIAL>"%parse-param", <INITIAL>"%printer",
1127 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
1128 instead of returning a token type immediately.
1129 (<INITIAL>"{"): Set token type.
1130 (<SC_BRACED_CODE>"}"): Use it.
1131 (handle_action_dollar, handle_action_at): Now returns bool
1132 indicating success. Fail if ! current_rule; this prevents a core dump.
1133 (handle_symbol_code_dollar, handle_symbol_code_at):
1134 Remove; merge body into caller.
1135 (handle_dollar, handle_at): Complain in invalid contexts.
1136
1137 * NEWS, doc/bison.texinfo: Document the above.
1138 * NEWS: Fix years and program names in copyright notice.
1139
1140 2002-12-17 Paul Eggert <eggert@twinsun.com>
1141
1142 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
1143 Reporting, Table of Symbols): Omit mentions of %lex-param and
1144 %parse-param from the documentation for now.
1145
1146 2002-12-15 Paul Eggert <eggert@twinsun.com>
1147
1148 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
1149 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
1150 lookahead symbol, and which sets yychar in parser actions) and it
1151 disagreed with the Bison documentation. Bug
1152 reported by Andrew Walrond.
1153
1154 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
1155 as the caller now does that.
1156 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
1157 (YYEMPTY): Parenthesize right hand side, since others use it.
1158 (yyparse): Don't assume that our generated code is the only code
1159 that sets yychar.
1160
1161 2002-12-13 Paul Eggert <eggert@twinsun.com>
1162
1163 Version 1.75d.
1164
1165 POSIX requires a "yacc" command.
1166 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
1167 (MOSTLYCLEANFILES): Add yacc.
1168 (yacc): New rule.
1169 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
1170 as an alias for bison y.
1171
1172 * po/LINGUAS: Add da.
1173
1174 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
1175 problem with latest <getopt.h>.
1176 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
1177
1178 * doc/fdl.texi: Upgrade to 1.2.
1179 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
1180 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
1181 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
1182 gnulib.
1183 * config/install-sh: Sync with autotools.
1184
1185 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
1186 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1187 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
1188 locations are requested.
1189 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
1190 locations are requested.
1191
1192 2002-12-12 Paul Eggert <eggert@twinsun.com>
1193
1194 Remove unportable casts and storage allocation tricks.
1195 While we're at it, remove almost all casts, since they
1196 usually aren't needed and are a sign of trouble.
1197
1198 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
1199
1200 * src/derives.c (derives_compute): Do not subtract NTOKENS from
1201 the pointer DSET returned by malloc; this isn't portable.
1202 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
1203 Similarly for DERIVES.
1204 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
1205 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
1206 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
1207
1208 * src/derives.c (derives_compute): Do not bother invoking
1209 int_of_rule_number, since rule numbers are integers.
1210
1211 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
1212 rather than XMALLOC (char, N).
1213
1214 * src/files.c (filename_split): Rewrite to avoid cast.
1215
1216 * src/gram.h (symbol_number_as_item_number,
1217 item_number_as_symbol_number, rule_number_as_item_number,
1218 item_number_as_rule_number):
1219 Now inline functions rather than macros, to avoid casts.
1220 * src/state.h (state_number_as_int): Likewise.
1221 * src/tables.c (state_number_to_vector_number,
1222 symbol_number_to_vector_number): Likewise.
1223
1224 * src/gram.h (int_of_rule_number): Remove; no longer used.
1225
1226 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
1227 since the resulting storage is always stored into.
1228
1229 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
1230 where it's needed.
1231
1232 * src/muscle_tab.c (muscle_m4_output):
1233 Now inline. Return bool, not int.
1234 * src/state.c (state_compare): Likewise.
1235 * src/symtab.c (symbol_check_defined,
1236 symbol_check_alias_consistency, symbol_pack, symbol_translation,
1237 hash_compare_symbol, hash_symbol):
1238 Likewise.
1239 * src/uniqstr.c (uniqstr_print): Likewise.
1240 * src/muscle_tab.c (muscle_m4_output_processor):
1241 New function, to avoid casts.
1242 * src/state.c (state_comparator, stage_hasher): Likewise.
1243 * src/symtab.c (symbol_check_defined_processor,
1244 symbol_check_alias_consistency_processor, symbol_pack_processor,
1245 symbol_translation_processor, hash_symbol_comparator,
1246 hash_symbol_hasher): Likewise.
1247 * src/uniqstr.c (uniqstr_print_processor): Likewise.
1248 * src/muscle_tab.c (muscles_m4_output):
1249 Use new functions instead of casting old functions unportably.
1250 * src/state.c (state_hash_new): Likewise.
1251 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
1252 symbols_token_translations_init):
1253 Likewise.
1254 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
1255
1256 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
1257 var instead of casting to long, to avoid casts.
1258 (prepare_states): Use MALLOC rather than alloca, so that we don't
1259 have to worry about alloca.
1260 * src/state.c (state_hash_lookup): Likewise.
1261
1262 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
1263 local var instead of casting to unsigned char, to avoid casts.
1264
1265 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
1266 STATE_ALLOC): Remove.
1267 (transitions_new, errs_new, reductions_new, state_new): Use malloc
1268 rather than calloc, and use offsetof to avoid allocating slightly
1269 too much storage.
1270 (state_new): Initialize all members.
1271
1272 * src/state.c (state_hash): Use unsigned accumulator, not signed.
1273
1274 * src/symtab.c (symbol_free): Remove; unused.
1275 (symbol_get): Remove cast in lhs of assignment.
1276 (symbols_do): Now static. Accept generic arguments, not
1277 hashing-related ones.
1278
1279 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
1280 (symbol_processor): Remove.
1281 (symbols_do): Remove decl; now static.
1282
1283 * src/system.h (alloca): Remove; decl no longer needed.
1284 (<stddef.h>): Include, for offsetof.
1285 (<inttypes.>, <stdint.h>): Include if available.
1286 (uintptr_t): New type, if system lacks it.
1287 (CALLOC, MALLOC, REALLOC): New macros.
1288 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
1289 new macros.
1290
1291 * src/tables.c (table_size): Now int, to pacify GCC.
1292 (table_grow, table_ninf_remap): Use signed table size.
1293 (save_row): Don't bother initializing locals when not needed.
1294 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
1295 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
1296
1297 * src/vcg.h: Correct misspellings.
1298
1299 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
1300
1301
1302 * src/getargs.c (getargs): Don't assume EOF == -1.
1303
1304 2002-12-09 Paul Eggert <eggert@twinsun.com>
1305
1306 Change identifier spellings to avoid collisions with names
1307 that are reserved by POSIX.
1308
1309 Don't use names ending in _t, since POSIX reserves them.
1310 For consistency, remove _e and _s endings -- they're weren't
1311 needed to remove ambiguity. All uses changed.
1312 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
1313 turn was just renamed from struniq_t.
1314 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
1315 which in turn was just renamed from struniq_processor_t.
1316 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
1317 in turn was renamed from hash_compare_struniq_t.
1318 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
1319 (state_list): Renamed from state_list_t.
1320 * src/assoc.h (assoc): Renamed from assoc_t.
1321 * src/conflicts.c (enum conflict_resolution): Renamed from
1322 enum conflict_resolution_e.
1323 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
1324 (rule_list): Renamed from rule_list_t.
1325 * src/getargs.h (enum trace): Renamed from enum trace_e.
1326 (enum report): Renamed from enum report_e.
1327 * src/gram.h (item_number): Renamed from item_number_t.
1328 (rule_number): Renamed from rule_number_t.
1329 (struct rule_s): Remove the "rule_s" part; not used.
1330 (rule): Renamed from rule_t.
1331 (rule_filter): Renamed from rule_filter_t.
1332 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
1333 (goto_list): Renamed from goto_list_t.
1334 * src/lalr.h (goto_number): Renamed from goto_number_t.
1335 * src/location.h (location): Renamed from location_t.
1336 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
1337 and moved here from:
1338 * src/muscle_tab.h (muscle_entry_t): here.
1339 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
1340 (rule_list): Renamed from rule_list_t.
1341 * src/print_graph.c (static_graph): Renamed from graph.
1342 * src/reader.h (braced_code): Renamed from braced_code_t.
1343 Remove brace_code_e tag.
1344 * src/relation.h (relation_node): Renamed from relation_node_t.
1345 (relation_nodes): Renamed from relation_nodes_t.
1346 (relation): Renamed from relation_t.
1347 * src/state.h (state_number): Renamed from state_number_t.
1348 (struct state): Renamed from struct state_s.
1349 (state): Renamed from state_t.
1350 (transitions): Renamed from transitions_t. Unused (and
1351 misspelled) transtion_s tag removed.
1352 (errs): Renamed from errs_t. Unused errs_s tag removed.
1353 (reductions): Renamed from reductions_t. Unused tag
1354 reductions_s removed.
1355 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
1356 (struct symbol_list): Renamed from struct symbol_list_s.
1357 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
1358 (struct symbol): Renamed from struct symbol_s.
1359 (symbol): Renamed from symbol_t.
1360 * src/tables.c (vector_number): Renamed from vector_number_t.
1361 (action_number): Renamed from action_t.
1362 * src/tables.h (base_number): Renamed from base_t.
1363 * src/vcg.h (enum color): Renamed from enum color_e.
1364 (enum textmode): Renamed from enum textmode_e.
1365 (enum shape): Renamed from enum shape_e.
1366 (struct colorentry): Renamed from struct colorentry_s.
1367 (struct classname): Renamed from struct classname_s.
1368 (struct infoname): Renamed from struct infoname_s.
1369 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
1370 (enum decision): Renamed from enum decision_e.
1371 (enum orientation): Renamed from enum orientation_e.
1372 (enum alignment): Renamed from enum alignment_e.
1373 (enum arrow_mode): Renamed from enum arrow_mode_e.
1374 (enum crossing_type): Renamed from enum crossing_type_e.
1375 (enum view): Renamed from enum view_e.
1376 (struct node): Renamed from struct node_s.
1377 (node): Renamed from node_t.
1378 (enum linestyle): Renamed from enum linestyle_e.
1379 (enum arrowstyle): Renamed from enum arrowstyle_e.
1380 (struct edge): Renamed from struct edge.
1381 (edge): Renamed from edge_t.
1382 (struct graph): Renamed from struct graph_s.
1383 (graph): Renamed from graph_t.
1384 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
1385 Rename value_t -> value.
1386 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
1387 value_t_as_yystype -> value_as_yystype.
1388
1389 Don't include <errno.h> in the mainstream code, since it
1390 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
1391 * lib/get-errno.c, lib/get-errno.h: New files.
1392 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
1393 get-errno.c.
1394 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
1395 * src/output.c (output_skeleton): Likewise.
1396 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
1397 instead of errno.
1398 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
1399 Likewise.
1400 (handle_action_dollar, handle_action_at): Likewise.
1401 * src/system.h: Do not include <errno.h>.
1402 (TAB_EXT): Renamed from EXT_TAB.
1403 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
1404
1405 Avoid str[a-z]*, since <string.h> reserves that name space.
1406 Change all instances of "struniq" in names to "uniqstr", and
1407 likewise for "STRUNIQ" and "UNIQSTR".
1408 * src/uniqstr.c: Renamed from src/struniq.c.
1409 * src/uniqstr.h: Renamed from src/struniq.h.
1410 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
1411 * src/files.c (strsuffix): Remove; unused.
1412 (concat2): Renamed from stringappend. Now static.
1413 * src/files.h (strsuffix, stringappend): Remove; unused.
1414 * src/parse-gram.y (<chars>): Renamed from <string>.
1415 (<uniqstr>): Renamed from <struniq>.
1416 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
1417 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
1418 (struct graph_s.expand): Renamed from struct graph_s.stretch.
1419 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
1420 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
1421 (N_EXPAND): Renamed from N_STRETCH.
1422
1423 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
1424 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
1425 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
1426 Remove; unused.
1427 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
1428 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
1429 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
1430 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
1431 (BASE_MAXIMUM): Renamed from BASE_MAX.
1432 (BASE_MINIMUM): Renamed from BASE_MIN.
1433 (ACTION_MAX): Remove; unused.
1434 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
1435 Unnecessary casts removed from above defines.
1436
1437
1438 Fix misspelling in names.
1439 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
1440 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
1441 G_NODE_ALIGNEMENT.
1442
1443
1444 * lib/timevar.c (timevar_report): Renamed from time_report,
1445 for consistency with other names.
1446 * lib/timevar.h (timevar_report): New decl.
1447 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
1448
1449
1450 Sort include-file uses.
1451
1452 Reorder all include files under src to be in the order "system.h".
1453 then the ../lib include files in angle brackets (alphabetized),
1454 then the . include files in double-quotes (alphabetized). Fix
1455 dependency breakages encountered in this process, as follows:
1456 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
1457 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
1458 * src/state.h: Include "symtab.h".
1459
1460 2002-12-08 Paul Eggert <eggert@twinsun.com>
1461
1462 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
1463 since this causes problems when __file__ contains character
1464 sequences like "@" that are treated specially by src/scan-skel.l.
1465 Instead, just use the file's basename. This fixes the bug
1466 reported by Martin Mokrejs in
1467 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
1468
1469 2002-12-06 Paul Eggert <eggert@twinsun.com>
1470
1471 Add support for rules that do not have trailing semicolons, as
1472 POSIX requires. Improve the quality of locations in Bison
1473 diagnostics.
1474
1475 * src/location.c: Include <quotearg.h>.
1476 (empty_location): Now const.
1477 (location_print): New function. Follow the recommendation of the
1478 GNU Coding Standards for locations that span file boundaries.
1479 * src/location.h: Do not include <quotearg.h>; no longer needed.
1480 (boundary): New type.
1481 (location_t): Use it. This allows locations to span file boundaries.
1482 All member uses changed: file -> start.file or end.file (as needed),
1483 first_line -> start.line, first_column -> start.column,
1484 last_line -> end.line, last_column -> end.column.
1485 (equal_boundaries): New function.
1486 (LOCATION_RESET, LOCATION_STEP): Remove.
1487 (LOCATION_PRINT): Remove. All callers changed to use location_print.
1488 (empty_location): Now const.
1489 (location_print): New decl.
1490 * src/parse-gram.y (lloc_default): New function, which handles
1491 empty locations more accurately.
1492 (YYLLOC_DEFAULT): Use it.
1493 (%token COLON): Remove.
1494 (%token ID_COLON): New token.
1495 (rules): Use it.
1496 (declarations, rules): Remove trailing semicolon.
1497 (declaration, rules_or_grammar_declaration):
1498 Allow empty (";") declaration.
1499 (symbol_def): Remove empty actions; no longer needed.
1500 (rules_or_grammar_declaration): Remove trailing semicolon.
1501 (semi_colon.opt): Remove.
1502 * src/reader.h: Include location.h.
1503 (scanner_cursor): New decl.
1504 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
1505 rolling our own.
1506 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
1507 of *loc.
1508 (STEP): Remove. No longer needed, now that adjust_location does
1509 the work. All uses removed.
1510 (scanner_cursor): New var.
1511 (adjust_location): Renamed from extend_location. It now sets
1512 *loc and adjusts the scanner cursor. All uses changed.
1513 Don't bother testing for CR.
1514 (handle_syncline): Remove location arg; now updates scanner cursor.
1515 All callers changed.
1516 (unexpected_end_of_file): Now accepts start boundary of token or
1517 comment, not location. All callers changed. Update scanner cursor,
1518 not the location.
1519 (SC_AFTER_IDENTIFIER): New state.
1520 (context_state): Renamed from c_context. All uses changed.
1521 (id_loc, code_start, token_start): New local vars.
1522 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
1523 processing of Yacc white space and equivalents here.
1524 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
1525 instead of returning ID immediately, since we need to search for
1526 a subsequent colon.
1527 (<INITIAL>"'", "\""): Save token_start.
1528 (<INITIAL>"%{", "{", "%%"): Save code_start.
1529 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
1530 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
1531 BEGIN context_state at end, not INITIAL.
1532 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
1533 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
1534 Return correct token start.
1535 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
1536 the start of a character, string or multiline comment is found.
1537 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
1538 Reduction): Adjust reported locations to match the more-precise
1539 results now expected.
1540 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
1541 * tests/reduce.at (Useless Rules, Reduced Automaton,
1542 Underivable Rules): Likewise.
1543 * tests/regression.at (Invalid inputs): No longer `expecting ";"
1544 or "|"' now that so many other tokens are allowed by the new grammar.
1545
1546 * src/complain.h (current_file): Remove duplicate decl;
1547 current_file is now owned by files.h.
1548 * src/complain.c, src/scan-gram.l: Include files.h.
1549
1550 2002-12-06 Paul Eggert <eggert@twinsun.com>
1551
1552 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
1553 promotes to int; it might be unsigned int.
1554 * data/yacc.c (yy_reduce_print): Likewise.
1555
1556 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
1557 be #defined in the prologue, not in the Bison declarations.
1558 This fixes Debian Bug 102878, reported by Shaul Karl.
1559
1560 2002-12-02 Paul Eggert <eggert@twinsun.com>
1561
1562 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
1563 * lib/strtoul.c: New file, from gnulib.
1564 This fixes a porting bug reported by Peter Klein in
1565 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
1566
1567 2002-11-30 Paul Eggert <eggert@twinsun.com>
1568
1569 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
1570 and put only a forward declaration in the prologue. This is for
1571 consistency with the other scanner helper functions.
1572
1573 Type clashes now generate warnings, not errors, since it
1574 appears that POSIX may allow some grammars with type clashes.
1575 * src/reader.c (grammar_current_rule_check): Warn about
1576 type clashes instead of complaining.
1577 * tests/input.at (Type Clashes): Expect warnings, not complaints.
1578
1579 Add Yacc library, since POSIX requires it.
1580 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
1581 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
1582 * lib/main.c, lib/yyerror.c: New files.
1583
1584 gram_error can be static; it need not be extern.
1585 * src/reader.h (gram_error): Remove decl.
1586 * src/parse-gram.y (gram_error): Now static. Add static decl.
1587 (print_token_value): Omit parameter names from forward decl,
1588 for consistency.
1589
1590 2002-11-29 Paul Eggert <eggert@twinsun.com>
1591
1592 * doc/bison.texinfo: Emphasize that yylex and yyerror must
1593 be declared before being used. E.g., one should typically
1594 declare them in the prologue. Use GNU coding style in examples.
1595 Put "const" consistently after the type it modifies. Mention
1596 that C99 supports "inline". Mention that yyerror traditionally
1597 returns "int".
1598
1599 %parse-param and %lex-param now take just one argument, the
1600 declaration; the argument name is deduced from the declaration.
1601
1602 * doc/bison.texinfo (Parser Function, Pure Calling, Error
1603 Reporting, Table of Symbols): Document this.
1604 * src/parse-gram.y (add_param): New function.
1605 (COMMA): Remove.
1606 (declaration): Implement new rule for %parse-param and %lex-param.
1607 * src/scan-gram.l: "," now elicits a warning, rather than being
1608 a token; this is more compatible with byacc.
1609 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
1610
1611 2002-11-27 Paul Eggert <eggert@twinsun.com>
1612
1613 Rename identifiers to avoid real and potential collisions.
1614
1615 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
1616 to avoid collision with lex macro described by Bruce Lilly in
1617 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
1618 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1619 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
1620 * src/parse-gram.y (print_token_value): Renamed from yyprint.
1621 All uses changed.
1622 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
1623 The name "yycontrol" violates the name space rules, and this stuff
1624 wasn't being used anyway.
1625 (input): Remove action; this stuff wasn't being used.
1626 (gram_error): Rename local variable yylloc -> loc.
1627 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
1628 (YY_DECL): Don't use "yy" at start of local variables.
1629 All uses changed, e.g., yylloc -> loc.
1630 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
1631 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
1632 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
1633 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
1634
1635 * src/parse-gram.y (gram_error): loc is now const *.
1636 * src/reader.h (gram_error): Likewise.
1637
1638 2002-11-24 Paul Eggert <eggert@twinsun.com>
1639
1640 Version 1.75c.
1641
1642 * tests/actions.at (Actions after errors): Use an output format
1643 more similar to that of the Printers and Destructors test.
1644 Test the position of the ';' token too.
1645 (Printers and Destructors): Likewise.
1646 (Printers and Destructors: %glr-parser): Remove for now, to avoid
1647 unnecessarily alarming people when the test fails.
1648
1649 * data/yacc.c (yyerrlab1): Move this label down, so that the
1650 parser does not discard the lookahead token if the user code
1651 invokes YYERROR. This change is required for POSIX conformance.
1652
1653 * lib/error.c: Sync with gnulib.
1654
1655 2002-11-22 Paul Eggert <eggert@twinsun.com>
1656
1657 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
1658 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
1659 * lib/xmalloc.c: Likewise.
1660
1661 2002-11-20 Paul Eggert <eggert@twinsun.com>
1662
1663 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
1664
1665 2002-11-20 Paul Eggert <eggert@twinsun.com>
1666
1667 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
1668 should use `if (! x) abort ();' rather than `assert (x);', and
1669 anyway it's one less thing to worry about configuring.
1670
1671 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
1672 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
1673 and replace all instances of assert with abort.
1674 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
1675 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
1676
1677 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
1678 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
1679 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
1680 hash_find_entry, hash_rehash, hash_insert): Likewise.
1681 * src/conflicts.c (resolve_sr_conflict): Likewise.
1682 * src/lalr.c (set_goto_map, map_goto): Likewise.
1683 * src/nullable.c (nullable_compute): Likewise.
1684 * src/output.c (prepare_rules, token_definitions_output): Likewise.
1685 * src/reader.c (packgram, reader): Likewise.
1686 * src/state.c (state_new, state_free, state_transitions_set,
1687 state_reduction_find): Likewise.
1688 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
1689 symbol_pack): Likewise.
1690 * src/tables.c (conflict_row, pack_vector): Likewise.
1691 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
1692 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
1693 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
1694 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
1695
1696 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
1697 (ARGMATCH_CONSTRAINT): New macro.
1698 (ARGMATCH_ASSERT): Use it.
1699
1700 * src/system.h (verify): New macro.
1701 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
1702 rather than assert.
1703 * src/tables.c (tables_generate): Likewise.
1704
1705 * src/struniq.c (struniq_assert): Now returns void, and aborts
1706 if the assertion is false.
1707 (struniq_assert_p): Remove.
1708 * src/struniq.h: Likewise.
1709
1710 2002-11-18 Paul Eggert <eggert@twinsun.com>
1711
1712 * data/glr.c (yygetLRActions): Replace `yyindex' with
1713 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
1714 This fixes the regression with Sun ONE Studio 7 cc that I reported in
1715 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
1716
1717 2002-11-18 Akim Demaille <akim@epita.fr>
1718
1719 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
1720 space.
1721 From Tim Van Holder.
1722
1723 2002-11-17 Paul Eggert <eggert@twinsun.com>
1724
1725 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
1726 to "SyntaxError" for consistency with my 2002-11-15 change.
1727
1728 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
1729 not define to {}, since this breaks the common use of `YYDPRINTF
1730 ((...));' if a single statement is desired (e.g. before `else').
1731 Work around GCC warnings by surrounding corresponding calls with
1732 {} if needed.
1733 (yyhasResolvedValue): Remove unused function.
1734 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
1735 loop body.
1736 (yyreportSyntaxError): Renamed from yyreportParseError.
1737 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
1738 All uses changed.
1739 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
1740 extern when possible. Remove unused initializations.
1741
1742 2002-11-16 Akim Demaille <akim@epita.fr>
1743
1744 Augment the similarity between GLR and LALR traces.
1745
1746 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
1747 (YY_REDUCE_PRINT): New.
1748 (yyparse): Use them.
1749 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
1750 YYDPRINT here.
1751 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
1752 state reached after the reduction/recovery, since...
1753 (yyparse, yyprocessOneStack): Report the state we are entering in.
1754
1755 2002-11-16 Akim Demaille <akim@epita.fr>
1756
1757 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
1758 Add support for --trace=skeleton.
1759 * src/scan-skel.l: %option debug.
1760 Scan strings of non-@ or \n instead of character by character.
1761 (scan_skel): Handle trace_skeleton.
1762 (QPUTS): New.
1763 (@output_parser_name@, @output_header_name@): ``Restore'' their
1764 support (used to be M4 macros).
1765 * data/yacc.c: Quote larger chunks, a la glr.c.
1766 * data/lalr1.cc: Likewise.
1767 The header guards are no longer available, so use some other
1768 string than `YYLSP_NEEDED'.
1769
1770 2002-11-16 Akim Demaille <akim@epita.fr>
1771
1772 Make the ``Printers and Destructors'' test more verbose, taking
1773 `yacc.c''s behavior as (possibly wrong) reference.
1774
1775 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
1776 instead of fprint on stdout.
1777 Set and report the last_line of the symbols.
1778 Consistently display values and locations.
1779
1780 2002-11-16 Paul Eggert <eggert@twinsun.com>
1781
1782 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
1783
1784 2002-11-15 Paul Eggert <eggert@twinsun.com>
1785
1786 * tests/actions.at (Actions after errors): New test case.
1787
1788 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
1789 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
1790 tests/action.at, tests/calc.at, tests/conflicts.at,
1791 tests/cxx-type.at, tests/regression.at:
1792 "parse error" -> "syntax error" for POSIX compatibility.
1793 "parsing stack overflow..." -> "parser stack overflow" so
1794 that code matches Bison documentation.
1795
1796 2002-11-15 Akim Demaille <akim@epita.fr>
1797
1798 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
1799 take two BRACED_CODE, not two string_content.
1800 Free the scanner's obstack when we are done.
1801 (code_content): New.
1802 * tests/calc.at: Adjust.
1803 * doc/bison.texinfo: Adjust.
1804 Also, make sure to include the `,' for these declarations.
1805
1806 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
1807
1808 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
1809 definition; avoids potential autoreconf problems.
1810
1811 2002-11-15 Akim Demaille <akim@epita.fr>
1812
1813 Always check the value returned by yyparse.
1814
1815 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
1816 returned by yyparse.
1817 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
1818 Adjust calls.
1819 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
1820 returned by yyparse.
1821
1822 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1823
1824 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
1825 on input.at test.
1826
1827 2002-11-14 Paul Eggert <eggert@twinsun.com>
1828
1829 * src/output.c (output_skeleton): Call xfopen instead of
1830 duplicating xfopen's body.
1831
1832 Fix bugs reported by Nelson H. F. Beebe in
1833 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
1834
1835 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
1836 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
1837 Group compiler. Instead, use "$CC -E bar.c". Include the .h
1838 file twice in the grammar, as an extra check.
1839
1840 * tests/input.at (Torturing the Scanner): Surround the
1841 backslash-newline tests with "#if 0", to make it less likely that
1842 we'll run into compiler bugs. Bring back solitary \ inside
1843 comment, but add a closing comment to work around HP C bug. Don't
1844 test backslash-newline in C character constant.
1845
1846 2002-11-14 Akim Demaille <akim@epita.fr>
1847
1848 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1849 status of the compiler.
1850 Calling `exit 1' is no longer needed.
1851 Reported by Nelson H. F. Beebe.
1852
1853 2002-11-14 Akim Demaille <akim@epita.fr>
1854
1855 * tests/atlocal.in (CPPFLAGS): We have config.h.
1856 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1857 New.
1858 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1859 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1860 * tests/regression.at, tests/torture.at: Use them for all the
1861 grammars that are to be compiled.
1862 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1863 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1864 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1865
1866 2002-11-14 Akim Demaille <akim@epita.fr>
1867
1868 * doc/bison.texinfo: Various formatting changes (alignments in
1869 samples, additional @group/@end group, GCS in samples.
1870 Use @deffn instead of simple @table to define the directives,
1871 macros, variables etc.
1872
1873 2002-11-13 Paul Eggert <eggert@twinsun.com>
1874
1875 Fix some bugs reported by Albert Chin-A-Young in
1876 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1877
1878 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1879 -o c"; the HP C compiler chatters during compilation.
1880 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1881 * tests/headers.at (export YYLTYPE): Likewise.
1882
1883 * tests/input.at (Torturing the Scanner): Remove lines containing
1884 solitary backslashes, as they tickle a bug in the HP C compiler.
1885
1886 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1887 comments, since they're not portable. Use GNU coding style.
1888
1889 2002-11-13 Akim Demaille <akim@epita.fr>
1890
1891 * data/yacc.c: Leave bigger chunks of quoted text.
1892 (YYDSYMPRINTF): New.
1893 Use it to report symbol activities.
1894 * data/glr.c (YYDSYMPRINTF): New.
1895 Use it.
1896
1897 2002-11-12 Paul Eggert <eggert@twinsun.com>
1898
1899 Version 1.75b.
1900
1901 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1902 (yyglrReduce): Return yyok, not 0.
1903 This should avoid the enumerated-type warnings reported
1904 by Nelson H. F. Beebe in
1905 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1906
1907 * lib/bbitset.h (BITSET_INLINE): Remove.
1908 * lib/bitset.h [! BITSET_INLINE]: Remove.
1909 (bitset_set, bitset_reset, bitset_test): Rename local vars
1910 to avoid shadowing warnings by GCC.
1911
1912 * data/glr.c (inline): Remove #define. It's the user's
1913 responsibility to #define it away, just like 'const'.
1914 This fixes one of the bugs reported by Nelson H. F. Beebe in
1915 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1916
1917 * Makefile.maint (po-check): Scan .l and .y files instead of the
1918 .c and the .h files that they generate. This fixes the bug
1919 reported by Tim Van Holder in:
1920 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1921 Look for N_ as well as for _. Try to avoid matching #define for
1922 N_ and _.
1923 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1924 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1925 * src/scan-gram.l: Revamp regular expressions so that " and '
1926 do not confuse xgettext.
1927
1928 * src/struniq.h (struniq_new): Do not declare the return type
1929 to be 'const'; this violates the C standard.
1930 * src/struniq.c (struniq_new): Likewise.
1931
1932 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1933
1934 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1935 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1936 linker.
1937
1938 2002-11-12 Akim Demaille <akim@epita.fr>
1939
1940 * Makefile.maint: Sync with Autoconf:
1941 (local_updates): New.
1942
1943 2002-11-12 Akim Demaille <akim@epita.fr>
1944
1945 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1946
1947 2002-11-12 Akim Demaille <akim@epita.fr>
1948
1949 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1950 locations.
1951
1952 2002-11-12 Akim Demaille <akim@epita.fr>
1953
1954 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1955 not yyvalue.
1956
1957 2002-11-12 Akim Demaille <akim@epita.fr>
1958
1959 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1960 Use it to test the GLR parser.
1961
1962 2002-11-12 Akim Demaille <akim@epita.fr>
1963
1964 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1965 defines it.
1966 * data/glr.c (yystos): New.
1967 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1968 (YYDSYMPRINT): New.
1969 (yyval): Don't define it, it is handled via M4.
1970 (yyrecoverParseError): Free verbosely the discarded symbols.
1971 * data/yacc.c (yysymprint): Remove, rather...
1972 (b4_yysymprint_generate): invoke.
1973 * data/c.m4 (b4_yysymprint_generate): New.
1974 Accept pointers as arguments, as opposed to the version from
1975 yacc.c.
1976 (b4_yydestruct_generate): Likewise.
1977 * tests/cations.at (Printers and Destructors): Use Bison directives
1978 instead of CPP macros.
1979 Don't rely on internal details.
1980
1981 2002-11-12 Akim Demaille <akim@epita.fr>
1982
1983 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1984 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1985 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1986 it against YYEMPTY and so forth), work on yytoken (i.e., set
1987 it to YYEMPTY etc.).
1988 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1989 (b4_symbol_actions): Remove.
1990 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1991 for 0, end-of-input.
1992
1993 2002-11-12 Akim Demaille <akim@epita.fr>
1994
1995 * doc/bison.texinfo (Destructor Decl): New.
1996
1997 2002-11-12 Akim Demaille <akim@epita.fr>
1998
1999 * src/tables.c (tables_generate): Use free for pointers that
2000 cannot be NULL, not XFREE.
2001 (pack_vector): Use assert, not fatal, for bound violations.
2002 * src/state.c (state_new): Likewise.
2003 * src/reader.c (reader): Likewise.
2004 * src/lalr.c (set_goto_map): Likewise.
2005 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
2006 the file name.
2007
2008 2002-11-12 Akim Demaille <akim@epita.fr>
2009
2010 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
2011 Restore.
2012 * src/scan-gram.l (last_string): Is global to the file, not to
2013 yylex.
2014 * src/parse-gram.y (input): Don't append the epilogue here,
2015 (epilogue.opt): do it here, and free the scanner's obstack.
2016 * src/reader.c (epilogue_set): Rename as...
2017 (epilogue_augment): this.
2018 * data/c.m4 (b4_epilogue): Defaults to empty.
2019
2020 2002-11-12 Akim Demaille <akim@epita.fr>
2021
2022 * src/getargs.c (long_options): Remove duplicates.
2023 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
2024 Remove.
2025 * doc/bison.rnh: Remove.
2026 * doc/bison.texinfo (VMS Invocation): Remove.
2027
2028 2002-11-12 Akim Demaille <akim@epita.fr>
2029
2030 * src/struniq.h, src/struniq.c (struniq_t): Is const.
2031 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
2032
2033 Use struniq for symbols.
2034
2035 * src/symtab.h (symbol_t): The tag member is a struniq.
2036 (symbol_type_set): Adjust.
2037 * src/symtab.c (symbol_new): Takes a struniq.
2038 (symbol_free): Don't free the tag member.
2039 (hash_compare_symbol_t, hash_symbol_t): Rename as...
2040 (hash_compare_symbol, hash_symbol): these.
2041 Use the fact that tags as struniqs.
2042 (symbol_get): Use struniq_new.
2043 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
2044 Returns a strniq.
2045 * src/reader.h (merger_list, grammar_currentmerge_set): The name
2046 and type members are struniqs.
2047 * src/reader.c (get_merge_function)
2048 (grammar_current_rule_merge_set): Adjust.
2049 (TYPE, current_type): Are struniq.
2050
2051 Use struniq for file names.
2052
2053 * src/files.h, src/files.c (infile): Split into...
2054 (grammar_file, current_file): these.
2055 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
2056 * src/reduce.c (reduce_print): Likewise.
2057 * src/getargs.c (getargs): Likewise.
2058 * src/complain.h, src/complain.c: Likewise.
2059 * src/main.c (main): Call struniqs_new early enough to use it for
2060 file names.
2061 Don't free the input file name.
2062
2063 2002-11-12 Akim Demaille <akim@epita.fr>
2064
2065 * src/symtab.c (symbol_free): Remove dead deactivated code:
2066 type_name are properly removed.
2067 Don't use XFREE to free items that cannot be NULL.
2068 * src/struniq.h, src/struniq.c: New.
2069 * src/main.c (main): Initialize/free struniqs.
2070 * src/parse-gram.y (%union): Add astruniq member.
2071 (yyprint): Adjust.
2072 * src/scan-gram.l (<{tag}>): Return a struniq.
2073 Free the obstack bit that used to store it.
2074 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
2075
2076 2002-11-11 Paul Eggert <eggert@twinsun.com>
2077
2078 Revamp to fix many (but not all) of the C- and M4-related quoting
2079 problems. Among other things, this fixes the Bison bug reported
2080 by Jan Hubicka when processing the Bash grammar; see:
2081 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
2082
2083 Use new @ escapes consistently. Represent brackets with @{ and @}
2084 rather than @<:@ and @:>@, since this works a bit better with dumb
2085 editors like vi. Represent @ with @@, since @ is now consistently
2086 an escape. Use @oline@ and @ofile@ rather than __oline__ and
2087 __ofile__, to avoid unexpected expansions. Similarly, use @output
2088 rather than #output.
2089
2090 * data/c.m4 (b4_copyright): Omit file name from comment, since
2091 the file name could contain "*/".
2092 (b4_synclines_flag): Don't quote the 2nd argument; it should already
2093 be quoted. All uses changed.
2094
2095 * data/glr.c: Use new @ escapes consistently.
2096 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
2097 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
2098 Remove, since they couldn't handle arbitrary characters in file
2099 names.
2100 * data/lalr1.cc: Likewise.
2101 * data/yacc.c: Likewise.
2102
2103 * src/files.c (output_infix): Remove; all uses removed.
2104 * src/files.h: Likewise.
2105
2106 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
2107 mishandled funny characters in file names, and anyway it isn't
2108 needed any more.
2109 * data/yacc.c: Likewise.
2110 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
2111
2112 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
2113 * data/yacc.c: Likewise.
2114
2115 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
2116 strings now.
2117 (muscle_init): Quote filename as a C string.
2118 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
2119 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
2120 * src/output.c (escaped_file_name_output): New function.
2121 (prepare_symbols): Quote tokens for M4.
2122 (prepare): Don't insert output_infix, output_prefix,
2123 output_parser_name, output_header_name; this is now down by scan-skel.
2124 Insert skeleton as a C string.
2125
2126 * src/output.c (user_actions_output, symbol_destructors_output,
2127 symbol_printers_output): Quote filenames for C and M4.
2128 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2129
2130 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
2131 escapes other than \\ and \'; this simplifies the code.
2132 (<SC_STRING>): Likewise, for \\ and \".
2133 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
2134 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
2135 Use new escapes @{ and @} for [ and ].
2136
2137 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
2138 them with auto vars.
2139 Switch to new escape scheme, where @ is the escape character uniformly.
2140 Abort if a stray escape character is found. Avoid unbounded input
2141 buffer when parsing non-escaped text.
2142
2143 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
2144 __oline__, #output, $@, and @{ do not have unintended meanings.
2145
2146 2002-11-09 Paul Eggert <eggert@twinsun.com>
2147
2148 Fix the test failure due to GCC warnings described in
2149 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
2150 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
2151 evaluate to 0 if it's impossible for NINF to be in the respective
2152 table.
2153 (yygetLRActions, yyrecoverParseError): Use them.
2154
2155 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
2156 counted in the token inserted at end of file. Now takes
2157 location_t *, not location_t, so that the location can be
2158 adjusted. All uses changed.
2159
2160 * tests/regression.at (Invalid inputs): Adjust wording in
2161 diagnostic to match the new behavior.
2162
2163 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
2164 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
2165 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
2166 abort ();'. This reduces the runtime of the "Many lookaheads"
2167 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
2168 GCC 3.2.
2169
2170 2002-11-07 Paul Eggert <eggert@twinsun.com>
2171
2172 * src/parse-gram.y (CHARACTER): Remove unused token.
2173 All uses removed.
2174
2175 * src/scan-gram.l: Remove stack option. We no longer use the
2176 stack, since the stack was never deeper than 1; instead, use the
2177 new auto var c_context to record the stacked value.
2178
2179 Remove nounput option. At an unexpected end of file, we now unput
2180 the minimal input necessary to end cleanly; this simplifies the
2181 code.
2182
2183 Avoid unbounded token sizes where this is easy.
2184
2185 (unexpected_end_of_file): New function.
2186 Use it to systematize the error message on unexpected EOF.
2187 (last-string): Now auto, not static.
2188 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
2189 (scanner_last_string_free): Remove; not used.
2190 (percent_percent_count): Move decl to just before use.
2191 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
2192 not the (never otherwised-used) CHARACTER.
2193
2194 2002-11-07 Akim Demaille <akim@epita.fr>
2195
2196 Let yyerror always receive the msg as last argument, so that
2197 yyerror can be variadic.
2198
2199 * data/yacc.c (b4_yyerror_args): New.
2200 Use it when calling yyerror.
2201 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
2202 Use it when calling yyerror.
2203 * doc/bison.texinfo (Error Reporting): Adjust.
2204 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
2205 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
2206
2207 2002-11-06 Akim Demaille <akim@epita.fr>
2208
2209 #line should have quoted strings.
2210 Ideally, this should be done by m4_quotearg.
2211
2212 * src/scan-skel.l: Include quotearg.h.
2213 Quote __ofile__.
2214 * src/output.c (symbol_printers_output)
2215 (symbol_destructors_output): Quote the file name.
2216
2217 2002-11-06 Akim Demaille <akim@epita.fr>
2218
2219 * tests/regression.at (Invalid inputs): Adjust to the recent
2220 messages.
2221
2222 2002-11-06 Akim Demaille <akim@epita.fr>
2223
2224 Restore --no-lines.
2225 Reported by Jim Kent.
2226
2227 * data/c.m4 (b4_syncline): New.
2228 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
2229 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
2230 * src/output.c (user_actions_output): Likewise.
2231 (prepare): Define 'b4_synclines_flag'.
2232 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
2233
2234 2002-11-06 Akim Demaille <akim@epita.fr>
2235
2236 * src/main.c (main): Free `infile'.
2237 * src/scan-gram.l (handle_syncline): New.
2238 Recognize `#line'.
2239 * src/output.c (user_actions_output, symbol_destructors_output)
2240 (symbol_printers_output): Use the location's file name, not
2241 infile.
2242 * src/reader.c (prologue_augment, epilogue_set): Likewise.
2243
2244 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2245
2246 * src/tables.c (matching_state): Don't allow states to match if
2247 either has GLR conflict entries.
2248
2249 2002-11-05 Paul Eggert <eggert@twinsun.com>
2250
2251 * src/scan-gram.l: Use more accurate diagnostics, e.g.
2252 "integer out of range" rather than "invalid value".
2253 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
2254 accordingly.
2255
2256 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
2257 Also, remove one static variable in the scanner.
2258
2259 * src/scan-gram.l (braces_level): Now auto, not static.
2260 Initialize to zero if the compiler is being picky.
2261 (INITIAL): Clear braces_level instead of incrementing it.
2262 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
2263 as POSIX 1003.1-2001 requires.
2264 * src/system.h (IF_LINT): New macro, taken from coreutils.
2265 * configure.ac: Define "lint" if --enable-gcc-warnings.
2266
2267 2002-11-05 Akim Demaille <akim@epita.fr>
2268
2269 * src/scan-gram.l: When it starts with `%', complain about the
2270 whole directive, not just that `invalid character: %'.
2271
2272 2002-11-04 Akim Demaille <akim@epita.fr>
2273
2274 * Makefile.maint: Update from Autoconf.
2275 (update, cvs-update, po-update, do-po-update): New.
2276
2277 2002-11-04 Akim Demaille <akim@epita.fr>
2278
2279 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
2280 and yyerror.
2281 Have yyerror `use' its arguments.
2282 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
2283 returns true when location & yacc & pure & parse-param.
2284 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
2285
2286 2002-11-04 Akim Demaille <akim@epita.fr>
2287
2288 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
2289 clashes.
2290 * src/scan-gram.l: Use [\'] instead of ['] to pacify
2291 font-lock-mode.
2292 Use complain_at.
2293 Use quote, not quote_n since LOCATION_PRINT no longer uses the
2294 slot 0.
2295
2296 2002-11-03 Paul Eggert <eggert@twinsun.com>
2297
2298 * src/reader.c (get_merge_function, grammar_current_rule_check):
2299 Use consistent diagnostics for reporting type name clashes.
2300 Quote the types with <>, for consistency with Yacc.
2301 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
2302
2303 2002-11-03 Akim Demaille <akim@epita.fr>
2304
2305 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
2306 New.
2307 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
2308 (b4_parse_param): Remove.
2309 Use b4_identification.
2310 Propagate b4_pure_args where needed to pass them to yyerror.
2311 * data/glr.m4 (b4_parse_param): Remove.
2312 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
2313 (b4_lpure_formals): New.
2314 Use b4_identification.
2315 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
2316 b4_user_formals and b4_user_args.
2317 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
2318 (yyreportAmbiguity): When using a pure parser, also need
2319 the location, and the parse-params.
2320 Adjust callers.
2321 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
2322 When using a pure parser, also need the parse-params.
2323 Adjust callers.
2324 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
2325 (%pure-parser + %parse-param) LALR and GLR parsers.
2326 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
2327 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
2328 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
2329 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
2330 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
2331 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
2332 * doc/bison.texinfo: Untabify the whole file.
2333 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
2334 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
2335 (Error Reporting): Adjust to these new directives.
2336 Document %error-verbose, deprecate YYERROR_VERBOSE.
2337
2338 2002-11-03 Akim Demaille <akim@epita.fr>
2339
2340 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
2341 AT_CHECK_CALC_GLR invocations to use % directives, instead of
2342 command line options.
2343 * tests/cxx-type.at: Formatting changes.
2344
2345 2002-11-03 Paul Eggert <eggert@twinsun.com>
2346
2347 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
2348 to count columns correctly, and to check for invalid inputs.
2349
2350 Use mbsnwidth to count columns correctly. Account for tabs, too.
2351 Include mbswidth.h.
2352 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
2353 (extend_location): New function.
2354 (YY_LINES): Remove.
2355
2356 Handle CRLF in C code rather than in Lex code.
2357 (YY_INPUT): New macro.
2358 (no_cr_read): New function.
2359
2360 Scan UCNs, even though we don't fully handle them yet.
2361 (convert_ucn_to_byte): New function.
2362
2363 Handle backslash-newline correctly in C code.
2364 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
2365 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
2366 all uses changed.
2367 (tag, splice): New EREs. Do not allow NUL or newline in tags.
2368 Use {splice} wherever C allows backslash-newline.
2369 YY_STEP after space, newline, vertical-tab.
2370 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
2371
2372 (letter, id): Don't assume ASCII; e.g., spell out a-z.
2373
2374 ({int}, handle_action_dollar, handle_action_at): Check for integer
2375 overflow.
2376
2377 (YY_STEP): Omit trailing semicolon, so that it's more like C.
2378
2379 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
2380 as well as \000. Check for UCHAR_MAX, not 255.
2381 Allow \x with an arbitrary positive number of digits, as in C.
2382 Check for overflow here.
2383 Allow \? and UCNs, for compatibility with C.
2384
2385 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
2386 with quote slot used by complain_at.
2387
2388 * tests/input.at: Add tests for backslash-newline, m4 quotes
2389 in symbols, long literals, and funny escapes in strings.
2390
2391 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
2392 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
2393 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
2394 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
2395 * m4/mbswidth.m4: New file, from GNU coreutils.
2396
2397 * doc/bison.texinfo (Grammar Outline): Document // comments.
2398 (Symbols): Document that trigraphs have no special meaning in Bison,
2399 nor is backslash-newline allowed.
2400 (Actions): Document that trigraphs have no special meaning.
2401
2402 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
2403 no longer used.
2404
2405 2002-11-02 Paul Eggert <eggert@twinsun.com>
2406
2407 * src/reader.c: Don't include quote.h; not needed.
2408 (get_merge_function): Reword warning to be consistent with
2409 type clash diagnostic in grammar_current_rule_check.
2410
2411 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
2412 bug in trigraph handling.
2413
2414 * src/output.c (prepare_symbols): When printing token names,
2415 escape "[" as "@<:@" and likewise for "]".
2416
2417 * src/system.h (errno): Remove declaration, as we are now
2418 assuming C89 or better, and C89 guarantees errno.
2419
2420 2002-10-30 Paul Eggert <eggert@twinsun.com>
2421
2422 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
2423 Check for close failures.
2424 * src/files.h (xfclose): Return void, not int, since it always
2425 returned zero.
2426 * src/files.c (xfclose): Likewise. Report I/O error if ferror
2427 indicates one.
2428 * src/output.c (output_skeleton): Use xfclose rather than fclose
2429 and ferror. xfclose now checks ferror.
2430
2431 * data/glr.c (YYLEFTMOST_STATE): Remove.
2432 (yyreportTree): Use a stack-based leftmost state. This avoids
2433 our continuing battles with bogus warnings about initializers.
2434
2435 2002-10-30 Akim Demaille <akim@epita.fr>
2436
2437 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
2438 #if.
2439
2440 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2441
2442 * tests/glr-regr1.at: New test for reported regressions.
2443 * tests/testsuite.at: Add glr-regr1.at test.
2444 * tests/Makefile.am: Add glr-regr1.at test.
2445
2446 2002-10-24 Paul Eggert <eggert@twinsun.com>
2447
2448 Version 1.75a.
2449
2450 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
2451 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
2452 we use malloc. Don't assume 'A' through 'Z' are contiguous.
2453 Don't assume strdup exists; POSIX says its an XSI extension.
2454 Check for buffer overflow on input.
2455
2456 2002-10-24 Akim Demaille <akim@epita.fr>
2457
2458 * src/output.c (output_skeleton): Don't disable M4sugar comments
2459 too soon: it results in comments being expanded.
2460 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
2461 first output.
2462
2463 2002-10-24 Akim Demaille <akim@epita.fr>
2464
2465 * data/yacc.c (m4_int_type): New.
2466 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
2467 char' as only yacc.c wants K&R portability.
2468 * data/glr.c (yysigned_char): Remove.
2469 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
2470 Reported by Quoc Peyrot.
2471
2472 2002-10-23 Paul Eggert <eggert@twinsun.com>
2473
2474 * src/main.c (main): With --trace=time, report times even if a
2475 non-fatal error occurs. Formerly, the times were reported in some
2476 such cases but not in others.
2477 * src/reader.c (reader): Just return if a complaint has been issued,
2478 instead of exiting, so that 'main' can report times.
2479
2480 2002-10-22 Akim Demaille <akim@epita.fr>
2481
2482 * src/system.h: Include sys/types.
2483 Reported by Bert Deknuydt.
2484
2485 2002-10-23 Paul Eggert <eggert@twinsun.com>
2486
2487 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
2488 Suggested by Art Haas.
2489
2490 2002-10-22 Paul Eggert <eggert@twinsun.com>
2491
2492 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
2493 decl; not needed any more.
2494 * src/main.c (main): Use return to exit, undoing yesterday's change.
2495 The last OS that we could find where this wouldn't work is
2496 SunOS 3.5, and that's too old to worry about now.
2497
2498 * data/glr.c (struct yyltype): Define members even when not
2499 doing locations. This is more consistent with yacc.c, and it
2500 works around the following bug reports:
2501 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
2502 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
2503
2504 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
2505 @acronym consistently. Standardize on "Yacc" instead of "YACC",
2506 "Algol" instead of "ALGOL". Give a bit more history about BNF.
2507
2508 2002-10-22 Akim Demaille <akim@epita.fr>
2509
2510 * data/README: New.
2511
2512 2002-10-21 Paul Eggert <eggert@twinsun.com>
2513
2514 Be consistent about 'bool'; the old code used an enum in one
2515 module and an int in another, and this violates the C standard.
2516 * m4/stdbool.m4: New file, from coreutils 4.5.3.
2517 * configure.ac (AC_HEADER_STDBOOL): Add.
2518 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
2519 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
2520 * src/symtab.c (hash_compare_symbol_t): Likewise.
2521 * src/system.h (bool, false, true): Use a definition consistent
2522 with ../lib/hash.c. All uses changed.
2523
2524 * src/complain.c (warning_issued): Renamed from warn_message_count,
2525 so that we needn't worry about integer overflow (!).
2526 Now of type bool. All uses changed.
2527 (complaint_issued): Renamed from complain_message_count; likewise.
2528
2529 * src/main.c (main): Use exit to exit with failure.
2530
2531 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
2532 rather than 1 and 0.
2533 * src/main.c (main): Likewise.
2534 * src/getargs.c (getargs): Likewise.
2535 * src/reader.c (reader): Likewise.
2536
2537 * src/getarg.c (getargs): Remove duplicate code for
2538 "Try `bison --help'".
2539
2540 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
2541 What was that "2" for?
2542
2543 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
2544 * src/getargs.c (usage): Likewise.
2545
2546 * src/getargs.c (getargs): When there are too few operands, report
2547 the last one. When there are too many, report the first extra
2548 one. This is how diffutils does it.
2549
2550 2002-10-20 Paul Eggert <eggert@twinsun.com>
2551
2552 Remove K&R vestiges.
2553 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
2554 * src/complain.c (VA_START): Remove. Assume prototypes.
2555 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
2556 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
2557 fatal): Assume prototypes.
2558 * src/complain.h: Assume prototypes.
2559 * src/system.h (PARAMS): Remove.
2560 Include <limits.h> unconditionally, since it's guaranteeed even
2561 for a freestanding C89 compiler.
2562 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2563 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2564
2565 2002-10-20 Akim Demaille <akim@epita.fr>
2566
2567 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
2568 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
2569 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
2570 (yyresolveStates, yyresolveAction, yyresolveStack)
2571 (yyprocessOneStack): Use them.
2572 (yy_reduce_print): New.
2573 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2574
2575 2002-10-20 Akim Demaille <akim@epita.fr>
2576
2577 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
2578 arguments and output `void'.
2579 (b4_c_function): Rename as...
2580 (b4_c_function_def): this.
2581 (b4_c_function_decl, b4_c_ansi_function_def)
2582 (b4_c_ansi_function_decl): New.
2583 Change the interpretation of the arguments: before `int, foo', now
2584 `int foo, foo'.
2585 * data/yacc.c (yyparse): Prototype and define thanks to these.
2586 Adjust b4_c_function_def uses.
2587 * data/glr.c (yyparse): Likewise, but ANSI only.
2588
2589 2002-10-20 Akim Demaille <akim@epita.fr>
2590
2591 * src/output.c (prepare): Move the definition of `tokens_number',
2592 `nterms_number', `undef_token_number', `user_token_number_max'
2593 to...
2594 (prepare_tokens): Here.
2595 (prepare_tokens): Rename as...
2596 (prepare_symbols): this.
2597 (prepare): Move the definition of `rules_number' to...
2598 (prepare_rules): here.
2599 (prepare): Move the definition of `last', `final_state_number',
2600 `states_number' to...
2601 (prepare_states): here.
2602 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2603
2604 2002-10-20 Akim Demaille <akim@epita.fr>
2605
2606 * src/tables.h, src/tables.c, src/output.c: Comment changes.
2607
2608 2002-10-20 Akim Demaille <akim@epita.fr>
2609
2610 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
2611 * data/c.m4: here.
2612
2613 2002-10-20 Akim Demaille <akim@epita.fr>
2614
2615 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
2616 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
2617 `pair'.
2618 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
2619 `name' to...
2620 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
2621 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
2622 These.
2623
2624 2002-10-19 Paul Eggert <eggert@twinsun.com>
2625
2626 Do not create a temporary file, as that involves security and
2627 cleanup headaches. Instead, use a pair of pipes.
2628 Derived from a suggestion by Florian Krohm.
2629 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
2630 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
2631 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
2632 (BISON_PREREQ_SUBPIPE): Add.
2633 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
2634 Add subpipe.h, subpipe.c.
2635 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
2636 * po/POTFILES.in: Add lib/subpipe.c.
2637 * src/output.c: Include "subpipe.h".
2638 (m4_invoke): Remove decl.
2639 (scan_skel): New decl.
2640 (output_skeleton): Use pipe rather than temporary file for m4 input.
2641 Check that m4sugar.m4 is readable, to avoid deadlock.
2642 Check for pipe I/O error.
2643 * src/scan-skel.l (readpipe): Remove decl.
2644 (scan_skel): New function, to be used in place of m4_invoke.
2645 Read from stream rather than file.
2646
2647 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
2648 float, as this generates a warning on Solaris 8 + GCC 3.2 with
2649 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
2650 this generates a more-accurate value anyway.
2651
2652 * lib/timevar.c (timervar_accumulate): Rename locals to
2653 avoid confusion with similarly-named more-global.
2654 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
2655
2656 * src/output.c (prepare): Use xstrdup to convert char const *
2657 to char *, to avoid GCC warning.
2658
2659 2002-10-19 Akim Demaille <akim@epita.fr>
2660
2661 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
2662 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
2663 Use them to have `calc.y' ready for %pure-parser.
2664 * data/yacc.c (YYLEX): Pass a yylex return type to
2665 b4_c_function_call.
2666
2667 2002-10-19 Akim Demaille <akim@epita.fr>
2668
2669 Prototype support of %lex-param and %parse-param.
2670
2671 * src/parse-gram.y: Add the definition of the %lex-param and
2672 %parse-param tokens, plus their rules.
2673 Drop the `_' version of %glr-parser.
2674 Add the "," token.
2675 * src/scan-gram.l (INITIAL): Scan them.
2676 * src/muscle_tab.c: Comment changes.
2677 (muscle_insert, muscle_find): Rename `pair' as `probe'.
2678 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
2679 (muscle_entry_s): The `value' member is no longer const.
2680 Adjust all dependencies.
2681 * src/muscle_tab.c (muscle_init): Adjust: use
2682 MUSCLE_INSERT_STRING.
2683 Initialize the obstack earlier.
2684 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
2685 (muscle_pair_list_grow): New.
2686 * data/c.m4 (b4_c_function_call, b4_c_args): New.
2687 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
2688 * tests/calc.at: Use %locations, not --locations.
2689 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
2690
2691 2002-10-19 Akim Demaille <akim@epita.fr>
2692
2693 * src/getargs.c (usage): Take status as argument and exit
2694 accordingly.
2695 Report the traditional `Try ... --help' message when status != 0.
2696 (usage, version): Don't take a FILE * as arg, it is pointless.
2697 (getargs): When there is an incorrect number of arguments, make it
2698 an error, and report it GNUlically thanks to `usage ()'.
2699
2700 2002-10-18 Paul Eggert <eggert@twinsun.com>
2701
2702 * data/glr.c (yyreportParseError): Don't assume that sprintf
2703 yields the length of the printed string, as this is not true
2704 on SunOS 4.1.4. Reported by Peter Klein.
2705
2706 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
2707 * tests/conflicts.at (%nonassoc and eof): Likewise.
2708 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
2709
2710 2002-10-17 Akim Demaille <akim@epita.fr>
2711
2712 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
2713 * src/getargs.c (trace_types, trace_args): Adjust.
2714 * src/reader.c (grammar_current_rule_prec_set)
2715 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
2716 Standardize error messages.
2717 And s/@prec/%prec/!
2718 (reader): Use trace_flag to enable scanner/parser debugging,
2719 instead of an adhoc scheme.
2720 * src/scan-gram.l: Remove trailing debugging code.
2721
2722 2002-10-16 Paul Eggert <eggert@twinsun.com>
2723
2724 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
2725 MUSCLE_TAB_H.
2726
2727 * NEWS: Officially drop support for building Bison with K&R C,
2728 since it didn't work anyway and it's not worth worrying about.
2729 * Makefile.maint (wget_files): Remove ansi2knr.c.
2730 (ansi2knr.c-url_prefix): Remove.
2731 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
2732 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2733 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2734
2735 2002-10-15 Paul Eggert <eggert@twinsun.com>
2736
2737 Stop using the "enum_" trick for K&R-style function definitions;
2738 it confused me, and I was the author! Instead, assume that people
2739 who want to use K&R C compilers (when using these modules in GCC,
2740 perhaps?) will run ansi2knr.
2741
2742 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
2743 All uses of "enum_" changed to "enum ".
2744 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2745 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2746
2747 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
2748 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
2749 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
2750 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
2751 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
2752 abitset_not, abitset_ones, abitset_or, abitset_or_and,
2753 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
2754 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
2755 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
2756 Use function prototypes; this removes the need for declaring
2757 static functions simply to provide their prototypes.
2758 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
2759 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
2760 bitset_count_, bitset_create, bitset_dump, bitset_first,
2761 bitset_free, bitset_init, bitset_last, bitset_next,
2762 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
2763 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
2764 bitset_print, bitset_release_memory, bitset_toggle_,
2765 bitset_type_choose, bitset_type_get, bitset_type_name_get,
2766 debug_bitset): Likewise.
2767 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
2768 * lib/bitset_stats.c (bitset_log_histogram_print,
2769 bitset_percent_histogram_print, bitset_stats_and,
2770 bitset_stats_and_cmp, bitset_stats_and_or,
2771 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
2772 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
2773 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
2774 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
2775 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
2776 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
2777 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
2778 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
2779 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
2780 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
2781 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
2782 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
2783 bitset_stats_zero): Likewise.
2784 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2785 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2786 bitsetv_dump, debug_bitsetv): Likewise.
2787 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
2788 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
2789 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
2790 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
2791 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
2792 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
2793 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
2794 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
2795 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
2796 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
2797 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
2798 Likewise.
2799 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
2800 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
2801 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
2802 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
2803 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
2804 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
2805 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
2806 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
2807 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
2808 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
2809 lbitset_xor_cmp, lbitset_zero): Likewise.
2810
2811 2002-10-14 Akim Demaille <akim@epita.fr>
2812
2813 Version 1.75.
2814
2815 2002-10-14 Akim Demaille <akim@epita.fr>
2816
2817 * tests/Makefile.am (maintainer-check-posix): New.
2818
2819 2002-10-14 Akim Demaille <akim@epita.fr>
2820
2821 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
2822 member.
2823
2824 2002-10-14 Akim Demaille <akim@epita.fr>
2825
2826 * src/tables.c (table_ninf_remap): base -> tab.
2827 Reported by Matt Rosing.
2828
2829 2002-10-14 Paul Eggert <eggert@twinsun.com>
2830
2831 * tests/action.at, tests/calc.at, tests/conflicts.at,
2832 tests/cxx-type.at, tests/headers.at, tests/input.at,
2833 tests/regression.at, tests/synclines.at, tests/torture.at:
2834 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
2835 so that the tests still work even if POSIXLY_CORRECT is set.
2836 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
2837
2838 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
2839 for portability to K&R hosts. Fix typo: signed char is guaranteed
2840 only to 127, not to 128.
2841 * data/glr.c (yysigned_char): New type.
2842 * data/yacc.c (yysigned_char): Likewise.
2843 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2844
2845 2002-10-13 Paul Eggert <eggert@twinsun.com>
2846
2847 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2848 true due to limited range of data type" warning from GCC.
2849
2850 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2851 by wrapping enum yytokentype's definition inside #ifndef
2852 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2853
2854 2002-10-13 Akim Demaille <akim@epita.fr>
2855
2856 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2857 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2858
2859 2002-10-13 Akim Demaille <akim@epita.fr>
2860
2861 * Makefile.maint: Update from Autoconf 2.54.
2862 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2863
2864 2002-10-13 Akim Demaille <akim@epita.fr>
2865
2866 * src/print.c (print_state): Separate the list of solved conflicts
2867 from the other items.
2868 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2869
2870 2002-10-13 Akim Demaille <akim@epita.fr>
2871
2872 Let nondeterministic skeletons be usable with deterministic
2873 tables.
2874
2875 With the patch, GAWK compiled by GCC without -O2 passes its test
2876 suite using a GLR parser driven by LALR tables. It fails with -O2
2877 because `struct stat' gives two different answers on my machine:
2878 88 (definition of an auto var) and later 96 (memset on this var).
2879 Hence the stack is badly corrumpted. The headers inclusion is to
2880 blame: if I move the awk.h inclusion before GLR's system header
2881 inclusion, the two struct stat have the same size.
2882
2883 * src/tables.c (pack_table): Always create conflict_table.
2884 (token_actions): Always create conflict_list.
2885 * data/glr.c (YYFLAG): Remove, unused.
2886
2887 2002-10-13 Akim Demaille <akim@epita.fr>
2888
2889 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2890 (O0FLAGS): New.
2891 (VALGRIND, GXX): New.
2892 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2893 * tests/bison.in: Run $PREBISON a pre-command.
2894 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2895 (maintainer-check-g++): New.
2896 * Makefile.am (maintainer-check): New.
2897
2898 2002-10-13 Akim Demaille <akim@epita.fr>
2899
2900 * data/glr.c: Formatting changes.
2901 Tweak some trace messages to match yacc.c's.
2902
2903 2002-10-13 Akim Demaille <akim@epita.fr>
2904
2905 GLR parsers sometimes raise parse errors instead of performing the
2906 default reduction.
2907 Reported by Charles-Henry de Boysson.
2908
2909 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2910 check the length of the traces when %glr.
2911 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2912 GLR's traces.
2913 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2914 Test GLR parsers.
2915 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2916 (yyltype): Remove the yy prefix from the member names.
2917 (yytable): Complete its comment.
2918 (yygetLRActions): Map error action number from YYTABLE from
2919 YYTABLE_NINF to 0.
2920 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2921 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2922 not satisfying as we could compare an YYACTION computed from
2923 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2924 only value for error actions.
2925 (yyreportParseError): In verbose parse error messages, don't issue
2926 `error' in the list of expected tokens.
2927 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2928 next action to perform to match glr.c's decoding.
2929 (yytable): Complete its comment.
2930
2931 2002-10-13 Paul Eggert <eggert@twinsun.com>
2932
2933 Fix problem reported by Henrik Grubbstroem in
2934 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2935 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2936 because the Bison parser reads the second action before reducing
2937 the first one.
2938 * src/scan-gram.l (rule_length): New static var.
2939 Use it to keep track of the rule length in the scanner, since
2940 we can't expect the parser to be in lock-step sync with the scanner.
2941 (handle_action_dollar, handle_action_at): Use this var.
2942 * tests/actions.at (Exotic Dollars): Test for the problem.
2943
2944 2002-10-12 Paul Eggert <eggert@twinsun.com>
2945
2946 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2947 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2948 Include <sys/time.h> when checking for clock_t and struct tms.
2949 Use same include order as source.
2950 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2951 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2952
2953 * lib/timevar.c: Update copyright date and clarify comments.
2954 (get_time) [IN_GCC]: Keep the GCC version for reference.
2955
2956 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2957 GCC version as of today, then merge Bison's changes.
2958 Change "GCC" to "Bison" in copyright notice. timevar.def's
2959 author is Akim, so change that too.
2960
2961 * src/reader.c (grammar_current_rule_check):
2962 Don't worry about the default action if $$ is untyped.
2963 Prevents bogus warnings reported by Jim Gifford in
2964 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2965
2966 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2967 * data/glr.c, data/lalr1.cc, data/yacc.c:
2968 Output token definitions before the first part of user declarations.
2969 Fixes compatibility problem reported by Jim Gifford for kbd in
2970 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2971
2972 2002-10-11 Paul Eggert <eggert@twinsun.com>
2973
2974 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2975 (yyparse): here. This undoes some of the 2002-07-25 change.
2976 Compatibility problem reported by Ralf S. Engelschall with
2977 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2978
2979 2002-10-11 Akim Demaille <akim@epita.fr>
2980
2981 * tests/regression.at Characters Escapes): New.
2982 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2983 characters.
2984 Reported by Jan Nieuwenhuizen.
2985
2986 2002-10-11 Akim Demaille <akim@epita.fr>
2987
2988 * po/id.po: New.
2989
2990 2002-10-10 Paul Eggert <eggert@twinsun.com>
2991
2992 Portability fixes for bitsets; this also avoids several GCC
2993 warnings.
2994
2995 * lib/abitset.c: Include <stddef.h>, for offsetof.
2996 * lib/lbitset.c: Likewise.
2997
2998 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2999 properly for vectors of objects. Do not assume that adding a
3000 header size to a multiple of a word size yields a value that is
3001 properly aligned for the whole union.
3002 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3003
3004 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
3005 unique names for structures.
3006 * lib/ebitset.c (ebitset_bytes): Likewise.
3007 * lib/lbitset.c (lbitset_bytes): Likewise.
3008
3009 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
3010 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
3011 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
3012 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
3013 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
3014 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
3015 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
3016 to improve the type-checking that GCC can do.
3017 * lib/bitset.c (bitset_op4_cmp): Likewise.
3018 * lib/bitset_stats.c (bitset_stats_count,
3019 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
3020 bitset_stats_copy, bitset_stats_disjoint_p,
3021 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
3022 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
3023 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
3024 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
3025 bitset_stats_and_or_cmp, bitset_stats_andn_or,
3026 bitset_stats_andn_or_cmp, bitset_stats_or_and,
3027 bitset_stats_or_and_cmp): Likewise.
3028 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
3029 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
3030 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
3031 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
3032
3033 * lib/abitset.h: Include bitset.h, not bbitset.h.
3034 * lib/ebitset.h: Likewise.
3035 * lib/lbitset.h: Likewise.
3036
3037 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
3038 All instances of parameters of type enum bitset_opts are now of
3039 type enum_bitset_opts, to conform to the C Standard, and similarly
3040 for enum_bitset_type.
3041 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
3042 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
3043
3044 Do not use "struct bitset_struct" to mean different things in
3045 different modules. Not only is this confusing, it violates
3046 the C Standard, which requires that structure types in different
3047 modules must be compatible if one is to be passed to the other.
3048 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
3049 All instances of "struct bitset_struct *" replaced with "bitset".
3050 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
3051 (union bitset_union, struct abitset_struct, struct ebitset_struct,
3052 struct lbitset_struct, struct bitset_stats_struct): New types.
3053 All uses of struct bitset_struct changed to union bitset_union,
3054 etc.
3055 * lib/abitset.c (struct abitset_struct, abitset,
3056 struct bitset_struct): Remove.
3057 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
3058 struct bitset_struct): Remove.
3059 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
3060 bitset_struct): Remove.
3061 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
3062 Likewise.
3063
3064 Do not call a function of type T using a call that assumes the
3065 function is of a different type U. Standard C requires that a
3066 function must be called with a type that is compatible with its
3067 definition.
3068 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3069 New decls.
3070 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
3071 New functions.
3072 * lib/ebitset.c (PFV): Remove.
3073 * lib/lbitset.c (PFV): Likewise.
3074 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
3075 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
3076 decls.
3077 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
3078 (ebitset_vtable): Use them.
3079 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
3080 lbitset_xor): New functions.
3081 (lbitset_vtable): Use them.
3082
3083 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
3084 Declare.
3085
3086 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
3087 GCC warning.
3088 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
3089 Use offsetof, for simplicity.
3090
3091 2002-10-06 Paul Eggert <eggert@twinsun.com>
3092
3093 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
3094 the same width as int. This reapplies a hunk of the 2002-08-12 patch
3095 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
3096 which was inadvertently undone by the 2002-09-30 patch.
3097 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
3098 the same width as int.
3099
3100 2002-10-04 Paul Eggert <eggert@twinsun.com>
3101
3102 Version 1.50.
3103
3104 * configure.ac (AC_INIT), NEWS: Increment version number.
3105
3106 * doc/bison.texinfo: Minor spelling, grammar, and white space
3107 fixes.
3108 (Symbols): Mention that any negative value returned from yylex
3109 signifies end-of-input. Warn about negative chars. Mention
3110 the portable Standard C character set.
3111
3112 The GNU coding standard says CFLAGS and YFLAGS are reserved
3113 for the installer to set.
3114 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
3115 * src/Makefile.am (AM_CFLAGS): Likewise.
3116 (AM_YFLAGS): Renamed from YFLAGS.
3117
3118 Fix some MAX and MIN problems.
3119 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
3120 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
3121 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
3122 * src/reader.c (reader): Use it.
3123
3124 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
3125 POSIX 1003.1-2001 has removed fgrep.
3126
3127 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3128
3129 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
3130 interpreted as signed.
3131 * lib/ebitset.c (ebitset_list): Fix bug.
3132
3133 2002-10-01 Paul Eggert <eggert@twinsun.com>
3134
3135 More fixes for 64-bit hosts and large bitsets.
3136
3137 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
3138 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
3139 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
3140 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
3141 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
3142 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
3143 bitset_count_): Likewise.
3144 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
3145 bitset_first, bitset_last): Likewise.
3146 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
3147 bitset_stats_list_reverse, bitset_stats_size,
3148 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
3149 Likewise.
3150 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3151 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
3152 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
3153 bitsetv_reflexive_transitive_closure): Likewise.
3154 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
3155 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
3156 Likewise.
3157 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
3158 Likewise.
3159
3160 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
3161 Use size_t, not unsigned int, to count bytes.
3162 * lib/abitset.h (abitset_bytes): Likewise.
3163 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
3164 Likewise.
3165 * lib/bitset.h (bitset_bytes): Likewise.
3166 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
3167 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
3168 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3169 * lib/ebitset.c (ebitset_bytes): Likewise.
3170 * lib/ebitset.h (ebitset_bytes): Likewise.
3171 * lib/lbitset.c (lbitset_bytes): Likewise.
3172 * lib/lbitset.h (lbitset_bytes): Likewise.
3173
3174 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
3175 abitset_subset_p, abitset_disjoint_p, abitset_and,
3176 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
3177 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
3178 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
3179 abitset_or_and, abitset_or_and_cmp):
3180 Use bitset_windex instead of unsigned int.
3181 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3182 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
3183 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
3184 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
3185 Likewise.
3186 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
3187
3188 * lib/bitset.c (bitset_print):
3189 Use proper printf formats for widths of integer types.
3190 * lib/bitset_stats.c (bitset_percent_histogram_print,
3191 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
3192 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
3193 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
3194 * lib/lbitset.c (lbitset_bytes): Likewise.
3195
3196 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
3197 BITSET_SIZE_MAX): New macros.
3198 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
3199 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
3200 to BITSET_WINDEX_MAX.
3201
3202 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
3203 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
3204 since we now return the bitset_bindex type (not int).
3205
3206 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
3207 when computing sizes.
3208 * lib/ebitset.c (ebitset_elts_grow): Likewise.
3209
3210 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
3211 and avoid cast to unsigned.
3212
3213 2002-09-30 Akim Demaille <akim@epita.fr>
3214
3215 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3216 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
3217 Updates from Michael Hayes.
3218
3219 2002-09-30 Art Haas <ahaas@neosoft.com>
3220
3221 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
3222 invocations.
3223 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
3224 defined.
3225
3226 2002-09-27 Akim Demaille <akim@epita.fr>
3227
3228 Version 1.49c.
3229
3230 2002-09-27 Akim Demaille <akim@epita.fr>
3231
3232 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
3233 (Because of AC_LIBSOURCE).
3234
3235 2002-09-27 Akim Demaille <akim@epita.fr>
3236
3237 Playing with Autoscan.
3238
3239 * configure.ac: Remove the old LIBOBJ tweaks.
3240 (AC_REPLACE_FUNCS): Add strrchr and strtol.
3241 * lib/strrchr.c: New.
3242 * lib/strtol.c: New, from the Coreutils 4.5.1.
3243
3244 2002-09-27 Akim Demaille <akim@epita.fr>
3245
3246 Playing with Autoscan.
3247
3248 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
3249 * lib/Makefile.am (libbison_a_SOURCES): No longer include
3250 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
3251 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
3252 Coreutils 4.5.1.
3253
3254 2002-09-24 Akim Demaille <akim@epita.fr>
3255
3256 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
3257 (Frequently Asked Questions, Parser Stack Overflow): New.
3258
3259 2002-09-13 Akim Demaille <akim@epita.fr>
3260
3261 Playing with autoscan.
3262
3263 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
3264 * src/files.c (skeleton_find): Remove, unused.
3265 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
3266 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
3267
3268 2002-09-13 Akim Demaille <akim@epita.fr>
3269
3270 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
3271 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
3272
3273 2002-09-13 Akim Demaille <akim@epita.fr>
3274
3275 * configure.ac: Require 2.54.
3276 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
3277 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
3278 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
3279 Remove, provided by Autoconf macros.
3280
3281 2002-09-12 Akim Demaille <akim@epita.fr>
3282
3283 * m4/prereq.m4: Update, from Coreutils 4.5.1.
3284
3285 2002-09-12 Akim Demaille <akim@epita.fr>
3286
3287 * m4/prereq.m4: Update, from Fileutils 4.1.5.
3288 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
3289 Reported by Martin Mokrejs.
3290
3291 2002-09-10 Akim Demaille <akim@epita.fr>
3292
3293 * src/parse-gram.y: Associate a human readable string to each
3294 token type.
3295 * tests/regression.at (Invalid inputs): Adjust.
3296
3297 2002-09-10 Gary V. Vaughan <gary@gnu.org>
3298
3299 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
3300 with an Autoconf-2.5x style configure.ac.
3301
3302 2002-09-06 Paul Eggert <eggert@twinsun.com>
3303
3304 * doc/bison.texinfo (Conditions): Make explicit that the GPL
3305 exception applies only to yacc.c. This is a modification of a
3306 patch originally suggested by Akim Demaille.
3307
3308 2002-09-06 Akim Demaille <akim@epita.fr>
3309
3310 * data/c.m4 (b4_copyright): Move the GPL exception comment from
3311 here to...
3312 * data/yacc.c: here.
3313
3314 * data/lalr1.cc (struct yyltype): Don't define it, since we use
3315 LocationType.
3316 (b4_ltype): Default to yy::Location from location.hh.
3317
3318 2002-09-04 Jim Meyering <jim@meyering.net>
3319
3320 * data/yacc.c: Guard the declaration of yytoknum also with
3321 `#ifdef YYPRINT', so it is declared only when used.
3322
3323 2002-09-04 Akim Demaille <akim@epita.fr>
3324
3325 * configure.in: Rename as...
3326 * configure.ac: this.
3327 Bump to 1.49c.
3328
3329 2002-09-04 Akim Demaille <akim@epita.fr>
3330
3331 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
3332 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
3333 translate maintainer only messages.
3334
3335 2002-08-12 Paul Eggert <eggert@twinsun.com>
3336
3337 Version 1.49b.
3338
3339 * Makefile.am (SUBDIRS): Remove intl.
3340 (DISTCLEANFILES): Remove.
3341 * NEWS: Mention that GNU M4 is now required. Clarify what is
3342 meant by "larger grammars". Mention the pt_BR translation.
3343 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
3344 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
3345 Bump version from 0.11.2 to 0.11.5.
3346 (BISON_PREREQ_STAGE): Remove.
3347 (AM_GNU_GETTEXT): Use external gettext.
3348 (AC_OUTPUT): Remove intl/Makefile.
3349
3350 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
3351
3352 * data/glr.c: Include string.h, for strlen.
3353 (yyreportParseError): Use size_t for yysize.
3354 (yy_yypstack): No longer nested inside yypstates, as nested
3355 functions are not portable. Do not assume size_t is the
3356 same width as int.
3357 (yypstates): Do not assume that ptrdiff_t is the same width
3358 as int, and similarly for yyposn and YYINDEX.
3359
3360 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
3361
3362 * lib/Makefile.am (INCLUDES): Do not include from the intl
3363 directory, which has been removed.
3364 * src/Makefile.am (INCLUDES): Likewise.
3365
3366 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
3367 (bitsets_sources, additional_bitsets_sources, timevars_sources):
3368 New vars.
3369
3370 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
3371 * tests/Makefile.am (EXTRA_DIST): Likewise.
3372
3373 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
3374 Do not assume that bitset_windex is the same width as unsigned.
3375
3376 * lib/abitset.c (abitset_unused_clear): Do not assume that
3377 bitset_word is the same width as int.
3378 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
3379 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
3380 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
3381 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
3382 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
3383
3384 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
3385 portability to one's complement hosts!).
3386 * lib/ebitset.c (ebitset_op1): Likewise.
3387 * lib/lbitset.c (lbitset_op1): Likewise.
3388
3389 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
3390 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
3391 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
3392 Sync with fileutils.
3393 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
3394 lib/gettext.h: Sync with diffutils.
3395
3396 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
3397 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
3398
3399 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
3400 PROTOTYPES to check for prototypes, and "defined __STDC__" to
3401 check for void *.
3402
3403 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
3404 size_t; the old version tried to do this but casted improperly.
3405 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
3406 (bitset_test): Now returns int, not unsigned long.
3407
3408 * lib/bitset_stats.c: Include "gettext.h".
3409 (_): New macro.
3410 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
3411 name locals "index", as it generates unnecessary warnings on some
3412 hosts that have an "index" function.
3413
3414 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
3415 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
3416 they need translation.
3417 * src/LR0.c (state_list_append, new_itemsets, get_state,
3418 append_states, generate_states): Likewise.
3419 * src/assoc.c (assoc_to_string): Likewise.
3420 * src/closure.c (print_closure, set_firsts, closure): Likewise.
3421 * src/gram.c (grammar_dump): Likewise.
3422 * src/injections.c (injections_compute): Likewise.
3423 * src/lalr.c (lookaheads_print): Likewise.
3424 * src/relation.c (relation_transpose): Likewise.
3425 * src/scan-gram.l: Likewise.
3426 * src/tables.c (table_grow, pack_vector): Likewise.
3427
3428 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
3429 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
3430 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
3431 * m4/mbstate_t.m4: Sync with fileutils.
3432 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
3433
3434 * po/LINGUAS: Add pt_BR.
3435 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
3436 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
3437 lib/timevar.c.
3438 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
3439 manual recommends.
3440 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
3441
3442 * src/complain.c (strerror_r): Remove decl; not needed.
3443 (strerror): Use same pattern as ../lib/error.c.
3444
3445 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
3446
3447 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
3448
3449 * src/main.c (main): Cast result of bindtextdomain and textdomain
3450 to void, to avoid a GCC warning when --disable-nls is in effect.
3451
3452 * src/scan-gram.l: Use strings rather than escapes when possible,
3453 to minimize the number of warnings from xgettext.
3454 (handle_action_dollar, handle_action_at): Don't use isdigit,
3455 as it mishandles negative chars and it may not work as expected
3456 outside the C locale.
3457
3458 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
3459 this is a GCC extension and is not portable to other compilers.
3460
3461 * src/system.h (alloca): Use same pattern as ../lib/error.c.
3462 Do not include <ctype.h>; no longer needed.
3463 Do not include <malloc.h>; no longer needed (and generates
3464 warnings on OpenBSD 3.0).
3465
3466 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
3467 it's not portable.
3468
3469 * tests/regression.at: Do not use 'cc -c input.c -o input';
3470 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
3471
3472 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
3473 exit status as failure, not just exit status 1. Sun C exits
3474 with status 2 sometimes.
3475
3476 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
3477 Use it for the two large tests.
3478
3479 2002-08-02 Akim Demaille <akim@epita.fr>
3480
3481 * src/conflicts.c (conflicts_output): Don't output rules never
3482 reduced here, since anyway that computation doesn't work.
3483 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
3484 (rule_useless_p, rule_never_reduced_p): New.
3485 (grammar_rules_partial_print): Use a filter instead of a range.
3486 Display the title only if needed.
3487 (grammar_rules_print): Adjust.
3488 (grammar_rules_never_reduced_report): New.
3489 * src/tables.c (action_row): Move the computation of rules never
3490 reduced to...
3491 (token_actions): here.
3492 * src/main.c (main): Make the parser before making the report, so
3493 that rules never reduced are computed.
3494 Call grammar_rules_never_reduced_report.
3495 * src/print.c (print_results): Report rules never reduced.
3496 * tests/conflicts.at, tests/reduce.at: Adjust.
3497
3498 2002-08-01 Akim Demaille <akim@epita.fr>
3499
3500 Instead of attaching lookaheads and duplicating the rules being
3501 reduced by a state, attach the lookaheads to the reductions.
3502
3503 * src/state.h (state_t): Remove the `lookaheads',
3504 `lookaheads_rule' member.
3505 (reductions_t): Add a `lookaheads' member.
3506 Use a regular array for the `rules'.
3507 * src/state.c (reductions_new): Initialize the lookaheads member
3508 to 0.
3509 (state_rule_lookaheads_print): Adjust.
3510 * src/state.h, src/state.c (state_reductions_find): New.
3511 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
3512 (count_rr_conflicts): Adjust.
3513 * src/lalr.c (LArule): Remove.
3514 (add_lookback_edge): Adjust.
3515 (state_lookaheads_count): New.
3516 (states_lookaheads_initialize): Merge into...
3517 (initialize_LA): this.
3518 (lalr_free): Adjust.
3519 * src/main.c (main): Don't free nullable and derives too early: it
3520 is used by --verbose.
3521 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
3522
3523 2002-08-01 Akim Demaille <akim@epita.fr>
3524
3525 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
3526 `rule_number_t**'.
3527 (set_derives, free_derives): Rename as...
3528 (derives_compute, derives_free): this.
3529 Adjust all dependencies.
3530 * src/nullable.c (set_nullable, free_nullable): Rename as...
3531 (nullable_compute, nullable_free): these.
3532 (rule_list_t): Store rule_t *, not rule_number_t.
3533 * src/state.c (state_rule_lookaheads_print): Directly compare rule
3534 pointers, instead of their numbers.
3535 * src/main.c (main): Call nullable_free, and derives_free earlier,
3536 as they were lo longer used.
3537
3538 2002-08-01 Akim Demaille <akim@epita.fr>
3539
3540 * lib/timevar.c (get_time): Include children time.
3541 * src/lalr.h (LA, LArule): Don't export them: used with the
3542 state_t.
3543 * src/lalr.c (LA, LArule): Static.
3544 * src/lalr.h, src/lalr.c (lalr_free): New.
3545 * src/main.c (main): Call it.
3546 * src/tables.c (pack_vector): Check whether loc is >= to the
3547 table_size, not >.
3548 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
3549 (tables_generate): do it, since that's also it which allocates
3550 them.
3551 Don't free LA and LArule, main does.
3552
3553 2002-07-31 Akim Demaille <akim@epita.fr>
3554
3555 Separate parser tables computation and output.
3556
3557 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
3558 (conflict_list, conflict_list_cnt, table, check, table_ninf)
3559 (yydefgoto, yydefact, high): Move to...
3560 * src/tables.h, src/tables.c: here.
3561 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3562 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3563 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
3564 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
3565 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
3566 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
3567 (action_row, save_row, token_actions, save_column, default_goto)
3568 (goto_actions, sort_actions, matching_state, pack_vector)
3569 (table_ninf_remap, pack_table, prepare_actions): Move to...
3570 * src/tables.c: here.
3571 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
3572 * src/output.c (token_actions, output_base, output_conflicts)
3573 (output_check): Merge into...
3574 (prepare_actions): this.
3575 (actions_output): Rename as...
3576 (user_actions_output): this.
3577 * src/main.c (main): Call tables_generate and tables_free.
3578
3579 2002-07-31 Akim Demaille <akim@epita.fr>
3580
3581 Steal GCC's --time-report support.
3582
3583 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
3584 stolen/adjusted from GCC.
3585 * m4/stage.m4: Remove time related checks.
3586 * m4/timevar.m4: New.
3587 * configure.in: Adjust.
3588 * src/system.h: Adjust to using timevar.h.
3589 * src/getargs.h, src/getargs.c: Support trace_time for
3590 --trace=time.
3591 * src/main.c (stage): Remove.
3592 (main): Replace `stage' invocations with timevar calls.
3593 * src/output.c: Insert pertinent timevar calls.
3594
3595 2002-07-31 Akim Demaille <akim@epita.fr>
3596
3597 Let --trace have arguments.
3598
3599 * src/getargs.h (enum trace_e): New.
3600 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
3601 (long_options, short_options): --trace/-T takes an optional
3602 argument.
3603 Change all the uses of trace_flag to reflect the new flags.
3604 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
3605
3606 Strengthen `stage' portability.
3607
3608 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
3609 * configure.in: Use it.
3610 Don't check for malloc.h and sys/times.h.
3611 * src/system.h: Include them when appropriate.
3612 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
3613 times and struct tms are available.
3614
3615 2002-07-30 Akim Demaille <akim@epita.fr>
3616
3617 In verbose parse error message, don't report `error' as an
3618 expected token.
3619 * tests/actions.at (Printers and Destructors): Adjust.
3620 * tests/calc.at (Calculator $1): Adjust.
3621 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
3622 error message, do not report the parser accepts the error token in
3623 that state.
3624
3625 2002-07-30 Akim Demaille <akim@epita.fr>
3626
3627 Normalize conflict related messages.
3628
3629 * src/complain.h, src/complain.c (warn, complain): New.
3630 * src/conflicts.c (conflicts_print): Use them.
3631 (conflict_report_yacc): New, extracted from...
3632 (conflicts_print): here.
3633 * tests/conflicts.at, tests/existing.at: Adjust.
3634
3635 2002-07-30 Akim Demaille <akim@epita.fr>
3636
3637 Report rules which are never reduced by the parser: those hidden
3638 by conflicts.
3639
3640 * src/LR0.c (save_reductions): Don't make the final state too
3641 different: save its reduction (accept) instead of having a state
3642 without any action (no shift or goto, no reduce).
3643 Note: the final state is now a ``regular'' state, i.e., the
3644 parsers now contain `reduce 0' as default reduction.
3645 Nevertheless, since they decide to `accept' when yystate =
3646 final_state, they still will not reduce rule 0.
3647 * src/print.c (print_actions, print_reduction): Adjust.
3648 * src/output.c (action_row): Track reduced rules.
3649 (token_actions): Report rules never reduced.
3650 * tests/conflicts.at, tests/regression.at: Adjust.
3651
3652 2002-07-30 Akim Demaille <akim@epita.fr>
3653
3654 `stage' was accidently included in a previous patch.
3655 Initiate its autoconfiscation.
3656
3657 * configure.in: Look for malloc.h and sys/times.h.
3658 * src/main.c (stage): Adjust.
3659 Report only when trace_flag.
3660
3661 2002-07-29 Akim Demaille <akim@epita.fr>
3662
3663 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
3664 state_number_t.
3665 (errs_t): symbol_t*, not symbol_number_t.
3666 (reductions_t): rule_t*, not rule_number_t.
3667 (FOR_EACH_SHIFT): New.
3668 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
3669 * src/print.c, src/print_graph.c: Adjust.
3670
3671 2002-07-29 Akim Demaille <akim@epita.fr>
3672
3673 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
3674
3675 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
3676 (endtoken, accept): these.
3677 * src/reader.c (reader): Set endtoken's default tag to "$end".
3678 Set undeftoken's tag to "$undefined" instead of "$undefined.".
3679 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
3680 Adjust.
3681
3682 2002-07-29 Akim Demaille <akim@epita.fr>
3683
3684 * src/reduce.c (reduce_grammar): When the language is empty,
3685 complain about the start symbol, not the axiom.
3686 Use its location.
3687 * tests/reduce.at (Empty Language): New.
3688
3689 2002-07-26 Akim Demaille <akim@epita.fr>
3690
3691 * src/reader.h, src/reader.c (gram_error): ... can't get
3692 yycontrol without making too strong assumptions on the parser
3693 itself.
3694 * src/output.c (prepare_tokens): Use the real 0th value of
3695 token_translations instead of `0'.
3696 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
3697 visible here.
3698 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
3699 for the time being: %locations ought to provide it to yyerror.
3700
3701 2002-07-25 Akim Demaille <akim@epita.fr>
3702
3703 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
3704 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
3705 * tests/regression.at (Web2c Actions): Adjust.
3706
3707 2002-07-25 Akim Demaille <akim@epita.fr>
3708
3709 Stop storing rules from 1 to nrules + 1.
3710
3711 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
3712 * src/nullable.c, src/output.c, src/print.c, src/reader.c
3713 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
3714 Iterate from 0 to nrules.
3715 Use rule_number_as_item_number and item_number_as_rule_number.
3716 Adjust to `derive' now containing possibly 0.
3717 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
3718 Handle the `- 1' part in rule numbers from/to item numbers.
3719 * src/conflicts.c (log_resolution): Fix the message which reversed
3720 shift and reduce.
3721 * src/output.c (action_row): Initialize default_rule to -1.
3722 (token_actions): Adjust.
3723 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
3724 expected output.
3725 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
3726
3727 2002-07-25 Akim Demaille <akim@epita.fr>
3728
3729 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
3730 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
3731 (b4_c_knr_arg_decl): New.
3732 * data/yacc.c: Use it to define yysymprint, yydestruct, and
3733 yyreport_parse_error.
3734
3735 2002-07-25 Akim Demaille <akim@epita.fr>
3736
3737 * data/yacc.c (yyreport_parse_error): New, extracted from...
3738 (yyparse): here.
3739 (yydestruct, yysymprint): Move above yyparse.
3740 Be K&R compliant.
3741
3742 2002-07-25 Akim Demaille <akim@epita.fr>
3743
3744 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
3745 replace...
3746 (b4_sint_type, b4_uint_type): these.
3747 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
3748 * tests/regression.at (Web2c Actions): Adjust.
3749
3750 2002-07-25 Akim Demaille <akim@epita.fr>
3751
3752 * src/gram.h (TIEM_NUMBER_MAX): New.
3753 (item_number_of_rule_number, rule_number_of_item_number): Rename
3754 as...
3755 (rule_number_as_item_number, item_number_as_rule_number): these.
3756 Adjust dependencies.
3757 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
3758 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
3759 (symbol_number_to_vector_number): New.
3760 (order): Of vector_number_t* type.
3761 (base_t, BASE_MAX, BASE_MIN): New.
3762 (froms, tos, width, pos, check): Of base_t type.
3763 (action_number_t, ACTION_MIN, ACTION_MAX): New.
3764 (actrow): Of action_number_t type.
3765 (conflrow): Of unsigned int type.
3766 (table_ninf, base_ninf): New.
3767 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
3768 (muscle_insert_int_table, muscle_insert_base_table)
3769 (muscle_insert_rule_number_table): New.
3770 (prepare_tokens): Output `toknum' as int_table.
3771 (action_row): Returns a rule_number_t.
3772 Use ACTION_MIN, not SHRT_MIN.
3773 (token_actions): yydefact is rule_number_t*.
3774 (table_ninf_remap): New.
3775 (pack_table): Use it for `base' and `table'.
3776 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
3777 replaced with...
3778 (YYPACT_NINF, YYTABLE_NINF): these.
3779 (yypact, yytable): Compute their types instead of hard-coded
3780 `short'.
3781 * tests/regression.at (Web2c Actions): Adjust.
3782
3783 2002-07-19 Akim Demaille <akim@epita.fr>
3784
3785 * src/scan-gram.l (id): Can start with an underscore.
3786
3787 2002-07-16 Akim Demaille <akim@epita.fr>
3788
3789 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
3790 Adjust all former `associativity' dependencies.
3791 * src/symtab.c (symbol_new): Default associativity is `undef', not
3792 `right'.
3793 (symbol_check_alias_consistence): Adjust.
3794
3795 2002-07-09 Akim Demaille <akim@epita.fr>
3796
3797 * doc/bison.texinfo: Properly set the ``header'' part.
3798 Use @dircategory ``GNU programming tools'' as per Texinfo's
3799 documentation.
3800 Use @copying.
3801
3802 2002-07-09 Akim Demaille <akim@epita.fr>
3803
3804 * lib/quotearg.h: Protect against multiple inclusions.
3805 * src/location.h (location_t): Add a `file' member.
3806 (LOCATION_RESET, LOCATION_PRINT): Adjust.
3807 * src/complain.c (warn_at, complain_at, fatal_at): Drop
3808 `error_one_per_line' support.
3809
3810 2002-07-09 Akim Demaille <akim@epita.fr>
3811
3812 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
3813 * src/reader.c (lineno): Remove.
3814 Adjust all dependencies.
3815 (get_merge_function): Take a location and use complain_at.
3816 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
3817 * tests/regression.at (Invalid inputs, Mixing %token styles):
3818 Adjust.
3819
3820 2002-07-09 Akim Demaille <akim@epita.fr>
3821
3822 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
3823 recovery rule, and forbid extensions when --yacc.
3824 (gram_error): Use complain_at.
3825 * src/reader.c (reader): Exit if there were parse errors.
3826
3827 2002-07-09 Akim Demaille <akim@epita.fr>
3828
3829 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
3830 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
3831 Reported by R Blake <blakers@mac.com>.
3832
3833 2002-07-09 Akim Demaille <akim@epita.fr>
3834
3835 * data/yacc.c: Output the copyright notive in the header.
3836
3837 2002-07-03 Akim Demaille <akim@epita.fr>
3838
3839 * src/output.c (froms, tos): Are state_number_t.
3840 (save_column): sp, sp1, and sp2 are state_number_t.
3841 (prepare): Rename `final' as `final_state_number', `nnts' as
3842 `nterms_number', `nrules' as `rules_number', `nstates' as
3843 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3844 unused.
3845 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3846 * data/lalr1.cc (nsym_): Remove, unused.
3847
3848 2002-07-03 Akim Demaille <akim@epita.fr>
3849
3850 * src/lalr.h, src/lalr.c (goto_number_t): New.
3851 * src/lalr.c (goto_list_t): New.
3852 Propagate them.
3853 * src/nullable.c (rule_list_t): New.
3854 Propagate.
3855 * src/types.h: Remove.
3856
3857 2002-07-03 Akim Demaille <akim@epita.fr>
3858
3859 * src/closure.c (print_fderives): Use rule_rhs_print.
3860 * src/derives.c (print_derives): Use rule_rhs_print.
3861 (rule_list_t): New, replaces `shorts'.
3862 (set_derives): Add comments.
3863 * tests/sets.at (Nullable, Firsts): Adjust.
3864
3865 2002-07-03 Akim Demaille <akim@epita.fr>
3866
3867 * src/output.c (prepare_actions): Free `tally' and `width'.
3868 (prepare_actions): Allocate and free `order'.
3869 * src/symtab.c (symbols_free): Free `symbols'.
3870 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3871 * src/output.c (m4_invoke): Move to...
3872 * src/scan-skel.l: here.
3873 (<<EOF>>): Close yyout, and free its name.
3874
3875 2002-07-03 Akim Demaille <akim@epita.fr>
3876
3877 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3878
3879 * src/LR0.c (new_state): Merge into...
3880 (state_list_append): this.
3881 (new_states): Merge into...
3882 (generate_states): here.
3883 (set_states): Don't ensure a proper `errs' state member here, do it...
3884 * src/conflicts.c (conflicts_solve): here.
3885 * src/state.h, src/state.c: Comment changes.
3886 (state_t): Rename member `shifts' as `transitions'.
3887 Adjust all dependencies.
3888 (errs_new): For consistency, also take the values as argument.
3889 (errs_dup): Remove.
3890 (state_errs_set): New.
3891 (state_reductions_set, state_transitions_set): Assert that no
3892 previous value was assigned.
3893 (state_free): New.
3894 (states_free): Use it.
3895 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3896 temporary storage: use `errs' and `nerrs' as elsewhere.
3897 (set_conflicts): Allocate and free this `errs'.
3898
3899 2002-07-02 Akim Demaille <akim@epita.fr>
3900
3901 * lib/libiberty.h: New.
3902 * lib: Update the bitset implementation from upstream.
3903 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3904 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3905 * src/main.c: Adjust bitset stats calls.
3906
3907 2002-07-01 Paul Eggert <eggert@twinsun.com>
3908
3909 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3910 char, so that negative chars don't collide with $.
3911
3912 2002-06-30 Akim Demaille <akim@epita.fr>
3913
3914 Have the GLR tests be `warning' checked, and fix the warnings.
3915
3916 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3917 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3918 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3919 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3920 (yyaddDeferredAction): static.
3921 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3922 (yyreportParseError): yyprefix is const.
3923 yytokenp is used only when verbose.
3924 (yy__GNUC__): Replace with __GNUC__.
3925 (yypdumpstack): yyi is size_t.
3926 (yypreference): Un-yy local variables and arguments, to avoid
3927 clashes with `yyr1'. Anyway, we are not in the user name space.
3928 (yytname_size): be an int, as is compared with ints.
3929 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3930 Use them.
3931 * tests/cxx-gram.at: Use quotation to protect $1.
3932 Use AT_COMPILE to enable warnings hunts.
3933 Prototype yylex and yyerror.
3934 `Use' argc.
3935 Include `string.h', not `strings.h'.
3936 Produce and prototype stmtMerge only when used.
3937 yylex takes a location.
3938
3939 2002-06-30 Akim Demaille <akim@epita.fr>
3940
3941 We spend a lot of time in quotearg, in particular when --verbose.
3942
3943 * src/symtab.c (symbol_get): Store a quoted version of the key.
3944 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3945 Adjust all callers.
3946
3947 2002-06-30 Akim Demaille <akim@epita.fr>
3948
3949 * src/state.h (reductions_t): Rename member `nreds' as num.
3950 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3951 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3952
3953 2002-06-30 Akim Demaille <akim@epita.fr>
3954
3955 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3956 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3957 (shifts_to): Rename as...
3958 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3959 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3960 (TRANSITION_IS_DISABLED, transitions_to): these.
3961
3962 2002-06-30 Akim Demaille <akim@epita.fr>
3963
3964 * src/print.c (print_shifts, print_gotos): Merge into...
3965 (print_transitions): this.
3966 (print_transitions, print_errs, print_reductions): Align the
3967 lookaheads columns.
3968 (print_core, print_transitions, print_errs, print_state,
3969 print_grammar): Output empty lines separator before, not after.
3970 (state_default_rule_compute): Rename as...
3971 (state_default_rule): this.
3972 * tests/conflicts.at (Defaulted Conflicted Reduction),
3973 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3974 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3975
3976 2002-06-30 Akim Demaille <akim@epita.fr>
3977
3978 Display items as we display rules.
3979
3980 * src/gram.h, src/gram.c (rule_lhs_print): New.
3981 * src/gram.c (grammar_rules_partial_print): Use it.
3982 * src/print.c (print_core): Likewise.
3983 * tests/conflicts.at (Defaulted Conflicted Reduction),
3984 (Unresolved SR Conflicts): Adjust.
3985 (Unresolved SR Conflicts): Adjust and rename as...
3986 (Resolved SR Conflicts): this, as was meant.
3987 * tests/regression.at (Web2c Report): Adjust.
3988
3989 2002-06-30 Akim Demaille <akim@epita.fr>
3990
3991 * src/print.c (state_default_rule_compute): New, extracted from...
3992 (print_reductions): here.
3993 Pessimize, but clarify the code.
3994 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3995
3996 2002-06-30 Akim Demaille <akim@epita.fr>
3997
3998 * src/output.c (action_row): Let default_rule be always a rule
3999 number.
4000
4001 2002-06-30 Akim Demaille <akim@epita.fr>
4002
4003 * src/closure.c (print_firsts, print_fderives, closure):
4004 Use BITSET_EXECUTE.
4005 * src/lalr.c (lookaheads_print): Likewise.
4006 * src/state.c (state_rule_lookaheads_print): Likewise.
4007 * src/print_graph.c (print_core): Likewise.
4008 * src/print.c (print_reductions): Likewise.
4009 * src/output.c (action_row): Likewise.
4010 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
4011
4012 2002-06-30 Akim Demaille <akim@epita.fr>
4013
4014 * src/print_graph.c: Use report_flag.
4015
4016 2002-06-30 Akim Demaille <akim@epita.fr>
4017
4018 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
4019 to...
4020 * src/relation.h, src/relation.c (traverse, relation_digraph)
4021 (relation_print, relation_transpose): New.
4022
4023 2002-06-30 Akim Demaille <akim@epita.fr>
4024
4025 * src/state.h, src/state.c (shifts_to): New.
4026 * src/lalr.c (build_relations): Use it.
4027
4028 2002-06-30 Akim Demaille <akim@epita.fr>
4029
4030 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
4031 (item_number_of_rule_number, rule_number_of_item_number): New.
4032 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
4033 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
4034 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
4035 Propagate their use.
4036 Much remains to be done, in particular wrt `shorts' from types.h.
4037
4038 2002-06-30 Akim Demaille <akim@epita.fr>
4039
4040 * src/symtab.c (symbol_new): Initialize the `printer' member.
4041
4042 2002-06-30 Akim Demaille <akim@epita.fr>
4043
4044 * src/LR0.c (save_reductions): Remove, replaced by...
4045 * src/state.h, src/state.c (state_reductions_set): New.
4046 (reductions, errs): Rename as...
4047 (reductions_t, errs_t): these.
4048 Adjust all dependencies.
4049
4050 2002-06-30 Akim Demaille <akim@epita.fr>
4051
4052 * src/LR0.c (state_list_t, state_list_append): New.
4053 (first_state, last_state): Now symbol_list_t.
4054 (this_state): Remove.
4055 (new_itemsets, append_states, save_reductions): Take a state_t as
4056 argument.
4057 (set_states, generate_states): Adjust.
4058 (save_shifts): Remove, replaced by...
4059 * src/state.h, src/state.c (state_shifts_set): New.
4060 (shifts): Rename as...
4061 (shifts_t): this.
4062 Adjust all dependencies.
4063 * src/state.h (state_t): Remove the `next' member.
4064
4065 2002-06-30 Akim Demaille <akim@epita.fr>
4066
4067 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
4068 escaped in slot 0.
4069
4070 2002-06-30 Akim Demaille <akim@epita.fr>
4071
4072 Use hash.h for the state hash table.
4073
4074 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
4075 (allocate_storage): Use state_hash_new.
4076 (free_storage): Use state_hash_free.
4077 (new_state, get_state): Adjust.
4078 * src/lalr.h, src/lalr.c (states): Move to...
4079 * src/states.h (state_t): Remove the `link' member, no longer
4080 used.
4081 * src/states.h, src/states.c: here.
4082 (state_hash_new, state_hash_free, state_hash_lookup)
4083 (state_hash_insert, states_free): New.
4084 * src/states.c (state_table, state_compare, state_hash): New.
4085 * src/output.c (output_actions): Do not free states now, since we
4086 still need to know the final_state number in `prepare', called
4087 afterwards. Do it...
4088 * src/main.c (main): here: call states_free after `output'.
4089
4090 2002-06-30 Akim Demaille <akim@epita.fr>
4091
4092 * src/state.h, src/state.c (state_new): New, extracted from...
4093 * src/LR0.c (new_state): here.
4094 * src/state.h (STATE_ALLOC): Move to...
4095 * src/state.c: here.
4096 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
4097 * src/state.h, src/state.c: here.
4098
4099 2002-06-30 Akim Demaille <akim@epita.fr>
4100
4101 * src/reader.c (gensym): Rename as...
4102 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
4103 (getsym): Rename as...
4104 (symbol_get): this.
4105
4106 2002-06-30 Akim Demaille <akim@epita.fr>
4107
4108 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
4109 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
4110 * src/output.c, src/print.c, src/print_graph.c: Propagate.
4111 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
4112
4113 2002-06-30 Akim Demaille <akim@epita.fr>
4114
4115 Make the test suite pass with warnings checked.
4116
4117 * tests/actions.at (Printers and Destructors): Improve.
4118 Avoid unsigned vs. signed issues.
4119 * tests/calc.at: Don't exercise the scanner here, do it...
4120 * tests/input.at (Torturing the Scanner): here.
4121
4122 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4123
4124 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
4125 reorganize first lines parallel to yacc.c.
4126
4127 2002-06-28 Akim Demaille <akim@epita.fr>
4128
4129 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
4130 (b4_token_enum, b4_token_defines): New, factored from...
4131 * data/lalr1.cc, data/yacc.c, glr.c: here.
4132
4133 2002-06-28 Akim Demaille <akim@epita.fr>
4134
4135 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
4136 unused variables.
4137 * src/output.c (merger_output): static.
4138
4139 2002-06-28 Akim Demaille <akim@epita.fr>
4140
4141 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
4142 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
4143 pacify GCC.
4144 * src/output.c (save_row): Initialize all the variables to pacify GCC.
4145
4146 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4147
4148 Accumulated changelog for new GLR parsing features.
4149
4150 * src/conflicts.c (count_total_conflicts): Change name to
4151 conflicts_total_count.
4152 * src/conflicts.h: Ditto.
4153 * src/output.c (token_actions): Use the new name.
4154 (output_conflicts): Change conflp => conflict_list_heads, and
4155 confl => conflict_list for better readability.
4156 * data/glr.c: Use the new names.
4157 * NEWS: Add self to GLR announcement.
4158
4159 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
4160
4161 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
4162 Akim Demaille.
4163
4164 * data/bison.glr: Change name to glr.c
4165 * data/glr.c: Renamed from bison.glr.
4166 * data/Makefile.am: Add glr.c
4167
4168 * src/getargs.c:
4169
4170 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
4171 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
4172
4173 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4174
4175 * data/bison.glr: Be sure to restore the
4176 current #line when returning to the skeleton contents after having
4177 exposed the input file's #line.
4178
4179 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4180
4181 * data/bison.glr: Bring up to date with changes to bison.simple.
4182
4183 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4184
4185 * data/bison.glr: Correct definitions that use b4_prefix.
4186 Various reformatting.
4187 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
4188 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
4189 yytokenp argument; now part of stack.
4190 (yychar): Define to behave as documented.
4191 (yyclearin): Ditto.
4192
4193 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4194
4195 * src/reader.h: Add declaration for free_merger_functions.
4196
4197 * src/reader.c (merge_functions): New variable.
4198 (get_merge_function): New function.
4199 (free_merger_functions): New function.
4200 (readgram): Check for %prec that is not followed by a symbol.
4201 Handle %dprec and %merge declarations.
4202 (packgram): Initialize dprec and merger fields in rules array.
4203
4204 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
4205 conflict_list_cnt, conflict_list_free): New variables.
4206 (table_grow): Also grow conflict_table.
4207 (prepare_rules): Output dprec and merger tables.
4208 (conflict_row): New function.
4209 (action_row): Output conflict lists for GLR parser. Don't use
4210 default reduction in conflicted states for GLR parser so that there
4211 are spaces for the conflict lists.
4212 (save_row): Also save conflict information.
4213 (token_actions): Allocate conflict list.
4214 (merger_output): New function.
4215 (pack_vector): Pack conflict table, too.
4216 (output_conflicts): New function to output yyconflp and yyconfl.
4217 (output_check): Allocate conflict_tos.
4218 (output_actions): Output conflict tables, also.
4219 (output_skeleton): Output b4_mergers definition.
4220 (prepare): Output b4_max_rhs_length definition.
4221 Use 'bison.glr' as default skeleton for GLR parsers.
4222
4223 * src/gram.c (glr_parser): New flag.
4224 (grammar_free): Call free_merger_functions.
4225
4226 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
4227 all pairs of conflicting reductions, rather than just all tokens
4228 causing conflicts. Needed to size conflict tables.
4229 (conflicts_output): Modify call to count_rr_conflicts for new
4230 interface.
4231 (conflicts_print): Ditto.
4232 (count_total_conflicts): New function.
4233
4234 * src/reader.h (merger_list): New type.
4235 (merge_functions): New variable.
4236
4237 * src/lex.h (tok_dprec, tok_merge): New token types.
4238
4239 * src/gram.h (rule_s): Add dprec and merger fields.
4240 (glr_parser): New flag.
4241
4242 * src/conflicts.h (count_total_conflicts): New function.
4243
4244 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
4245
4246 * doc/bison.texinfo (Generalized LR Parsing): New section.
4247 (GLR Parsers): New section.
4248 (Language and Grammar): Mention GLR parsing.
4249 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
4250 Correct typo ("tge" -> "the").
4251
4252 * data/bison.glr: New skeleton for GLR parsing.
4253
4254 * tests/cxx-gram.at: New tests for GLR parsing.
4255
4256 * tests/testsuite.at: Include cxx-gram.at.
4257
4258 * tests/Makefile.am: Add cxx-gram.at.
4259
4260 * src/parse-gram.y:
4261
4262 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
4263
4264 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
4265
4266 2002-06-27 Akim Demaille <akim@epita.fr>
4267
4268 * src/options.h, src/options.c: Remove.
4269 * src/getargs.c (short_options, long_options): New.
4270
4271 2002-06-27 Akim Demaille <akim@epita.fr>
4272
4273 * data/bison.simple, data/bison.c++: Rename as...
4274 * data/yacc.c, data/lalr1.cc: these.
4275 * doc/bison.texinfo (Environment Variables): Remove.
4276
4277 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
4278
4279 * src/getargs.c (report_argmatch): Initialize strtok().
4280
4281 2002-06-20 Akim Demaille <akim@epita.fr>
4282
4283 * data/bison.simple (b4_symbol_actions): New, replaces...
4284 (b4_symbol_destructor, b4_symbol_printer): these.
4285 (yysymprint): Be sure to call YYPRINT only for tokens, and using
4286 user token numbers.
4287
4288 2002-06-20 Akim Demaille <akim@epita.fr>
4289
4290 * data/bison.simple (yydestructor): Rename as...
4291 (yydestruct): this.
4292
4293 2002-06-20 Akim Demaille <akim@epita.fr>
4294
4295 * src/symtab.h, src/symtab.c (symbol_type_set)
4296 (symbol_destructor_set, symbol_precedence_set): The location is
4297 the last argument.
4298 Adjust all callers.
4299
4300 2002-06-20 Akim Demaille <akim@epita.fr>
4301
4302 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
4303 internals.
4304 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
4305 Takes a location.
4306 * src/symtab.h, src/symtab.c (symbol_class_set)
4307 (symbol_user_token_number_set): Likewise.
4308 Adjust all callers.
4309 Promote complain_at.
4310 * tests/input.at (Type Clashes): Adjust.
4311
4312 2002-06-20 Akim Demaille <akim@epita.fr>
4313
4314 * data/bison.simple (YYLEX): Fix the declaration when
4315 %pure-parser.
4316
4317 2002-06-20 Akim Demaille <akim@epita.fr>
4318
4319 * data/bison.simple (yysymprint): Don't print the token number,
4320 just its name.
4321 * tests/actions.at (Destructors): Rename as...
4322 (Printers and Destructors): this.
4323 Also exercise %printer.
4324
4325 2002-06-20 Akim Demaille <akim@epita.fr>
4326
4327 * data/bison.simple (YYDSYMPRINT): New.
4328 Use it to remove many of the #if YYDEBUG/if (yydebug).
4329
4330 2002-06-20 Akim Demaille <akim@epita.fr>
4331
4332 * src/symtab.h, src/symtab.c (symbol_t): printer and
4333 printer_location are new members.
4334 (symbol_printer_set): New.
4335 * src/parse-gram.y (PERCENT_PRINTER): New token.
4336 Handle its associated rule.
4337 * src/scan-gram.l: Adjust.
4338 (handle_destructor_at, handle_destructor_dollar): Rename as...
4339 (handle_symbol_code_at, handle_symbol_code_dollar): these.
4340 * src/output.c (symbol_printers_output): New.
4341 (output_skeleton): Call it.
4342 * data/bison.simple (yysymprint): New. Cannot be named yyprint
4343 since there are already many grammar files with a user `yyprint'.
4344 Replace the calls to YYPRINT to calls to yysymprint.
4345 * tests/calc.at: Adjust.
4346 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
4347 taking advantage of parser very internal details (stack size!).
4348
4349 2002-06-20 Akim Demaille <akim@epita.fr>
4350
4351 * src/scan-gram.l: Complete the scanner with the missing patterns
4352 to pacify Flex.
4353 Use `quote' and `symbol_tag_get' where appropriate.
4354
4355 2002-06-19 Akim Demaille <akim@epita.fr>
4356
4357 * tests/actions.at (Destructors): Augment to test locations.
4358 * data/bison.simple (yydestructor): Pass it the current location
4359 if locations are enabled.
4360 Prototype only when __STDC__ or C++.
4361 Change the argument names to move into the yy name space: there is
4362 user code here.
4363
4364 2002-06-19 Akim Demaille <akim@epita.fr>
4365
4366 * data/bison.simple (b4_pure_if): New.
4367 Use it instead of #ifdef YYPURE.
4368
4369 2002-06-19 Akim Demaille <akim@epita.fr>
4370
4371 * data/bison.simple (b4_location_if): New.
4372 Use it instead of #ifdef YYLSP_NEEDED.
4373
4374 2002-06-19 Akim Demaille <akim@epita.fr>
4375
4376 Prepare @$ in %destructor, but currently don't bind it in the
4377 skeleton, as %location use is not cleaned up yet.
4378
4379 * src/scan-gram.l (handle_dollar, handle_destructor_at)
4380 (handle_action_at): New.
4381 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
4382 a braced_code_t and a location as additional arguments.
4383 (handle_destructor_dollar): Instead of requiring `b4_eval', just
4384 unquote one when outputting `b4_dollar_dollar'.
4385 Adjust callers.
4386 * data/bison.simple (b4_eval): Remove.
4387 (b4_symbol_destructor): Adjust.
4388 * tests/input.at (Invalid @n): Adjust.
4389
4390 2002-06-19 Zack Weinberg <zack@codesourcery.com>
4391
4392 * doc/bison.texinfo: Document ability to have multiple
4393 prologue sections.
4394
4395 2002-06-18 Akim Demaille <akim@epita.fr>
4396
4397 * src/files.c (compute_base_names): When computing the output file
4398 names from the input file name, strip the directory part.
4399
4400 2002-06-18 Akim Demaille <akim@epita.fr>
4401
4402 * data/bison.simple.new: Comment changes.
4403 Reported by Andreas Schwab.
4404
4405 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
4406
4407 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
4408 there are no `label `yyoverflowlab' defined but not used' warnings
4409 when yyoverflow is defined.
4410
4411 2002-06-18 Akim Demaille <akim@epita.fr>
4412
4413 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
4414 new member.
4415 (symbol_destructor_set): Adjust.
4416 * src/output.c (symbol_destructors_output): Output the destructor
4417 locations.
4418 Output the symbol name.
4419 * data/bison.simple (b4_symbol_destructor): Adjust.
4420
4421 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
4422 and Akim Demaille <akim@epita.fr>
4423
4424 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
4425 what's left on the stack when the error recovery hits EOF.
4426 * tests/actions.at (Destructors): Complete to exercise this case.
4427
4428 2002-06-17 Akim Demaille <akim@epita.fr>
4429
4430 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
4431 arguments is really empty, not only equal to `[]'.
4432 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
4433 member.
4434 (symbol_destructor_set): New.
4435 * src/output.c (symbol_destructors_output): New.
4436 * src/reader.h (brace_code_t, current_braced_code): New.
4437 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
4438 (handle_dollar): Rename as...
4439 (handle_action_dollar): this.
4440 (handle_destructor_dollar): New.
4441 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
4442 (grammar_declaration): Use it.
4443 * data/bison.simple (yystos): Is always defined.
4444 (yydestructor): New.
4445 * tests/actions.at (Destructors): New.
4446 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
4447
4448 2002-06-17 Akim Demaille <akim@epita.fr>
4449
4450 * src/symlist.h, src/symlist.c (symbol_list_length): New.
4451 * src/scan-gram.l (handle_dollar, handle_at): Compute the
4452 rule_length only when needed.
4453 * src/output.c (actions_output, token_definitions_output): Output
4454 the full M4 block.
4455 * src/symtab.c: Don't access directly to the symbol tag, use
4456 symbol_tag_get.
4457 * src/parse-gram.y: Use symbol_list_free.
4458
4459 2002-06-17 Akim Demaille <akim@epita.fr>
4460
4461 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
4462 (symbol_list_prepend, get_type_name): Move to...
4463 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
4464 (symbol_list_prepend, symbol_list_n_type_name_get): here.
4465 Adjust all callers.
4466 (symbol_list_free): New.
4467 * src/scan-gram.l (handle_dollar): Takes a location.
4468 * tests/input.at (Invalid $n): Adjust.
4469
4470 2002-06-17 Akim Demaille <akim@epita.fr>
4471
4472 * src/reader.h, src/reader.c (symbol_list_new): Export it.
4473 (symbol_list_prepend): New.
4474 * src/parse-gram.y (%union): `list' is a new member.
4475 (symbols.1): New, replaces...
4476 (terms_to_prec.1, nterms_to_type.1): these.
4477 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
4478 Take a location as additional argument.
4479 Adjust all callers.
4480
4481 2002-06-15 Akim Demaille <akim@epita.fr>
4482
4483 * src/parse-gram.y: Move %token in the declaration section so that
4484 we don't depend upon CVS Bison.
4485
4486 2002-06-15 Akim Demaille <akim@epita.fr>
4487
4488 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
4489 * src/print.c (print_core): Use it.
4490
4491 2002-06-15 Akim Demaille <akim@epita.fr>
4492
4493 * src/conflicts.c (log_resolution): Accept the rule involved in
4494 the sr conflicts instead of the lookahead number that points to
4495 that rule.
4496 (flush_reduce): Accept the current lookahead vector as argument,
4497 instead of the index in LA.
4498 (resolve_sr_conflict): Accept the current number of lookahead
4499 bitset to consider for the STATE, instead of the index in LA.
4500 (set_conflicts): Adjust.
4501 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
4502
4503 2002-06-15 Akim Demaille <akim@epita.fr>
4504
4505 * src/state.h (state_t): Replace the `lookaheadsp' member, a
4506 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
4507 Adjust all dependencies.
4508 * src/lalr.c (initialize_lookaheads): Split into...
4509 (states_lookaheads_count, states_lookaheads_initialize): these.
4510 (lalr): Adjust.
4511
4512 2002-06-15 Akim Demaille <akim@epita.fr>
4513
4514 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
4515 out of...
4516 (grammar_rules_print): here.
4517 * src/reduce.c (reduce_output): Use it.
4518 * tests/reduce.at (Useless Rules, Reduced Automaton)
4519 (Underivable Rules): Adjust.
4520
4521 2002-06-15 Akim Demaille <akim@epita.fr>
4522
4523 Copy BYacc's nice way to report the grammar.
4524
4525 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
4526 New.
4527 Don't print the rules' location, it is confusing and useless.
4528 (rule_print): Use grammar_rhs_print.
4529 * src/print.c (print_grammar): Use grammar_rules_print.
4530
4531 2002-06-15 Akim Demaille <akim@epita.fr>
4532
4533 Complete and rationalize `useless thing' warnings.
4534
4535 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
4536 (symbol_tag_print): New.
4537 Use them everywhere in place of accessing directly the tag member.
4538 * src/gram.h, src/gram.c (rule_print): New.
4539 Use it where a rule used to be printed `by hand'.
4540 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
4541 (reduce_grammar_tables): Report the useless rules.
4542 (reduce_print): Useless things are a warning, not an error.
4543 Report it as such.
4544 * tests/reduce.at (Useless Nonterminals, Useless Rules):
4545 (Reduced Automaton, Underivable Rules): Adjust.
4546 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
4547 * tests/conflicts.at (Unresolved SR Conflicts)
4548 (Solved SR Conflicts): Adjust.
4549
4550 2002-06-15 Akim Demaille <akim@epita.fr>
4551
4552 Let symbols have a location.
4553
4554 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
4555 (getsym): Adjust.
4556 Adjust all callers.
4557 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
4558 Use location_t, not int.
4559 * src/symtab.c (symbol_check_defined): Take advantage of the
4560 location.
4561 * tests/regression.at (Invalid inputs): Adjust.
4562
4563 2002-06-15 Akim Demaille <akim@epita.fr>
4564
4565 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
4566 (input): Don't try to initialize yylloc here, do it in the
4567 scanner.
4568 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
4569 * src/gram.h (rule_t): Change line and action_line into location
4570 and action_location, of location_t type.
4571 Adjust all dependencies.
4572 * src/location.h, src/location.c (empty_location): New.
4573 * src/reader.h, src/reader.c (grammar_start_symbol_set)
4574 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
4575 (grammar_current_rule_symbol_append)
4576 (grammar_current_rule_action_append): Expect a location as argument.
4577 * src/reader.c (grammar_midrule_action): Adjust to attach an
4578 action's location as dummy symbol location.
4579 * src/symtab.h, src/symtab.c (startsymbol_location): New.
4580 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
4581 the line numbers.
4582
4583 2002-06-14 Akim Demaille <akim@epita.fr>
4584
4585 Grammar declarations may be found in the grammar section.
4586
4587 * src/parse-gram.y (rules_or_grammar_declaration): New.
4588 (declarations): Each declaration may end with a semicolon, not
4589 just...
4590 (grammar_declaration): `"%union"'.
4591 (grammar): Branch to rules_or_grammar_declaration.
4592
4593 2002-06-14 Akim Demaille <akim@epita.fr>
4594
4595 * src/main.c (main): Invoke scanner_free.
4596
4597 2002-06-14 Akim Demaille <akim@epita.fr>
4598
4599 * src/output.c (m4_invoke): Extracted from...
4600 (output_skeleton): here.
4601 Free tempfile.
4602
4603 2002-06-14 Akim Demaille <akim@epita.fr>
4604
4605 * src/parse-gram.y (directives, directive, gram)
4606 (grammar_directives, precedence_directives, precedence_directive):
4607 Rename as...
4608 (declarations, declaration, grammar, grammar_declaration)
4609 (precedence_declaration, precedence_declarator): these.
4610 (symbol_declaration): New.
4611
4612 2002-06-14 Akim Demaille <akim@epita.fr>
4613
4614 * src/files.c (action_obstack): Remove, unused.
4615 (output_obstack): Remove it, and all its dependencies, as it is no
4616 longer needed.
4617 * src/reader.c (epilogue_set): Build the epilogue in the
4618 muscle_obstack.
4619 * src/output.h, src/output.c (muscle_obstack): Move to...
4620 * src/muscle_tab.h, src/muscle_tab.h: here.
4621 (muscle_init): Initialize muscle_obstack.
4622 (muscle_free): New.
4623 * src/main.c (main): Call it.
4624
4625 2002-06-14 Akim Demaille <akim@epita.fr>
4626
4627 * src/location.h: New, extracted from...
4628 * src/reader.h: here.
4629 * src/Makefile.am (noinst_HEADERS): Merge into
4630 (bison_SOURCES): this.
4631 Add location.h.
4632 * src/parse-gram.y: Use location_t instead of Bison's.
4633 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
4634 Use location_t instead of ints.
4635
4636 2002-06-14 Akim Demaille <akim@epita.fr>
4637
4638 * data/bison.simple, data/bison.c++: Be sure to restore the
4639 current #line when returning to the skeleton contents after having
4640 exposed the input file's #line.
4641
4642 2002-06-12 Akim Demaille <akim@epita.fr>
4643
4644 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
4645 eager.
4646 * tests/actions.at (Exotic Dollars): New.
4647
4648 2002-06-12 Akim Demaille <akim@epita.fr>
4649
4650 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
4651 ['"/] too eagerly.
4652 * tests/input.at (Torturing the Scanner): New.
4653
4654 2002-06-11 Akim Demaille <akim@epita.fr>
4655
4656 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
4657 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
4658 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
4659 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
4660 * src/reader.c (reader): Use it.
4661
4662 2002-06-11 Akim Demaille <akim@epita.fr>
4663
4664 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
4665 Adjust all callers.
4666 (scanner_last_string_free): New.
4667
4668 2002-06-11 Akim Demaille <akim@epita.fr>
4669
4670 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
4671 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
4672 (last_string, YY_OBS_FREE): New.
4673 Use them when returning an ID.
4674
4675 2002-06-11 Akim Demaille <akim@epita.fr>
4676
4677 Have Bison grammars parsed by a Bison grammar.
4678
4679 * src/reader.c, src/reader.h (prologue_augment): New.
4680 * src/reader.c (copy_definition): Remove.
4681
4682 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
4683 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
4684 (grammar_current_rule_prec_set, grammar_current_rule_check)
4685 (grammar_current_rule_symbol_append)
4686 (grammar_current_rule_action_append): Export.
4687 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
4688 (symbol_list_action_append): Remove.
4689 Hook the routines from reader.
4690 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
4691 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
4692
4693 * src/reader.c (read_declarations): Remove, unused.
4694
4695 * src/parse-gram.y: Handle the epilogue.
4696 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
4697 (grammar_start_symbol_set): this.
4698 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
4699 * src/reader.c (readgram): Remove, unused.
4700 (reader): Adjust to insert eoftoken and axiom where appropriate.
4701
4702 * src/reader.c (copy_dollar): Replace with...
4703 * src/scan-gram.h (handle_dollar): this.
4704 * src/parse-gram.y: Remove `%thong'.
4705
4706 * src/reader.c (copy_at): Replace with...
4707 * src/scan-gram.h (handle_at): this.
4708
4709 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
4710 New.
4711
4712 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
4713 time being.
4714
4715 * src/reader.h, src/reader.c (grammar_rule_end): New.
4716
4717 * src/parse.y (current_type, current_class): New.
4718 Implement `%nterm', `%token' support.
4719 Merge `%term' into `%token'.
4720 (string_as_id): New.
4721 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
4722 type name.
4723
4724 * src/parse-gram.y: Be sure to handle properly the beginning of
4725 rules.
4726
4727 * src/parse-gram.y: Handle %type.
4728 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
4729
4730 * src/parse-gram.y: More directives support.
4731 * src/options.c: No longer handle source directives.
4732
4733 * src/parse-gram.y: Fix %output.
4734
4735 * src/parse-gram.y: Handle %union.
4736 Use the prologue locations.
4737 * src/reader.c (parse_union_decl): Remove.
4738
4739 * src/reader.h, src/reader.c (epilogue_set): New.
4740 * src/parse-gram.y: Use it.
4741
4742 * data/bison.simple, data/bison.c++: b4_stype is now either not
4743 defined, then default to int, or to the contents of %union,
4744 without `union' itself.
4745 Adjust.
4746 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
4747
4748 * src/output.c (actions_output): Don't output braces, as they are
4749 already handled by the scanner.
4750
4751 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
4752 characters to themselves.
4753
4754 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
4755 that the epilogue has a proper #line.
4756
4757 * src/parse-gram.y: Handle precedence/associativity.
4758
4759 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
4760 a terminal.
4761 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
4762 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
4763 at all to define terminals that cannot be emitted.
4764
4765 * src/scan-gram.l: Escape M4 characters.
4766
4767 * src/scan-gram.l: Working properly with escapes in user
4768 strings/characters.
4769
4770 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
4771 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
4772 grammar.
4773 Use more modest sizes, as for the time being the parser does not
4774 release memory, and therefore the process swallows a huge amount
4775 of memory.
4776
4777 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
4778 stricter %token grammar.
4779
4780 * src/symtab.h (associativity): Add `undef_assoc'.
4781 (symbol_precedence_set): Do nothing when passed an undef_assoc.
4782 * src/symtab.c (symbol_check_alias_consistence): Adjust.
4783
4784 * tests/regression.at (Invalid %directive): Remove, as it is now
4785 meaningless.
4786 (Invalid inputs): Adjust to the new error messages.
4787 (Token definitions): The new grammar doesn't allow too many
4788 eccentricities.
4789
4790 * src/lex.h, src/lex.c: Remove.
4791 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
4792 (copy_character, copy_string2, copy_string, copy_identifier)
4793 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
4794 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
4795 (parse_action): Remove.
4796 * po/POTFILES.in: Adjust.
4797
4798 2002-06-11 Akim Demaille <akim@epita.fr>
4799
4800 * src/reader.c (parse_action): Don't store directly into the
4801 rule's action member: return the action as a string.
4802 Don't require `rule_length' as an argument: compute it.
4803 (grammar_current_rule_symbol_append)
4804 (grammar_current_rule_action_append): New, eved out from
4805 (readgram): here.
4806 Remove `action_flag', `rulelength', unused now.
4807
4808 2002-06-11 Akim Demaille <akim@epita.fr>
4809
4810 * src/reader.c (grammar_current_rule_prec_set).
4811 (grammar_current_rule_check): New, eved out from...
4812 (readgram): here.
4813 Remove `xaction', `first_rhs': useless.
4814 * tests/input.at (Type clashes): New.
4815 * tests/existing.at (GNU Cim Grammar): Adjust.
4816
4817 2002-06-11 Akim Demaille <akim@epita.fr>
4818
4819 * src/reader.c (grammar_midrule_action): New, Eved out from
4820 (readgram): here.
4821
4822 2002-06-11 Akim Demaille <akim@epita.fr>
4823
4824 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
4825 New.
4826 (readgram): Use them as replacement of inlined code, crule and
4827 crule1.
4828
4829 2002-06-11 Akim Demaille <akim@epita.fr>
4830
4831 * src/reader.c (grammar_end, grammar_symbol_append): New.
4832 (readgram): Use them.
4833 Make the use of `p' as local as possible.
4834
4835 2002-06-10 Akim Demaille <akim@epita.fr>
4836
4837 GCJ's parser requires the tokens to be defined before the prologue.
4838
4839 * data/bison.simple: Output the token definition before the user's
4840 prologue.
4841 * tests/regression.at (Braces parsing, Duplicate string)
4842 (Mixing %token styles): Check the output from bison.
4843 (Early token definitions): New.
4844
4845 2002-06-10 Akim Demaille <akim@epita.fr>
4846
4847 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4848 assigning twice the same user number to a token, so that we can
4849 use it in...
4850 * src/lex.c (lex): here.
4851 Also use `symbol_class_set' instead of hand written code.
4852 * src/reader.c (parse_assoc_decl): Likewise.
4853
4854 2002-06-10 Akim Demaille <akim@epita.fr>
4855
4856 * src/symtab.c, src/symtab.c (symbol_class_set)
4857 (symbol_user_token_number_set): New.
4858 * src/reader.c (parse_token_decl): Use them.
4859 Use a switch instead of ifs.
4860 Use a single argument.
4861
4862 2002-06-10 Akim Demaille <akim@epita.fr>
4863
4864 Remove `%thong' support as it is undocumented, unused, duplicates
4865 `%token's job, and creates useless e-mail traffic with people who
4866 want to know what it is, why it is undocumented, unused, and
4867 duplicates `%token's job.
4868
4869 * src/reader.c (parse_thong_decl): Remove.
4870 * src/options.c (option_table): Remove "thong".
4871 * src/lex.h (tok_thong): Remove.
4872
4873 2002-06-10 Akim Demaille <akim@epita.fr>
4874
4875 * src/symtab.c, src/symtab.c (symbol_type_set)
4876 (symbol_precedence_set): New.
4877 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4878 (value_components_used): Remove, unused.
4879
4880 2002-06-09 Akim Demaille <akim@epita.fr>
4881
4882 Move symbols handling code out of the reader.
4883
4884 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4885 (axiom): Move to...
4886 * src/symtab.h, src/symtab.c: here.
4887
4888 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4889 * src/reader.c (startval): Rename as...
4890 * src/symtab.h, src/symtab.c (startsymbol): this.
4891 * src/reader.c: Adjust.
4892
4893 * src/reader.c (symbol_check_defined, symbol_make_alias)
4894 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4895 (token_translations_init)
4896 Move to...
4897 * src/symtab.c: here.
4898 * src/reader.c (packsymbols): Move to...
4899 * src/symtab.h, src/symtab.c (symbols_pack): here.
4900 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4901 argument.
4902
4903 2002-06-03 Akim Demaille <akim@epita.fr>
4904
4905 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4906 then statements.
4907
4908 2002-06-03 Akim Demaille <akim@epita.fr>
4909
4910 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4911 structs with non literals.
4912 * src/scan-skel.l: never-interactive.
4913 * src/conflicts.c (enum conflict_resolution_e): No trailing
4914 comma.
4915 * src/getargs.c (usage): Split long literal strings.
4916 Reported by Hans Aberg.
4917
4918 2002-05-28 Akim Demaille <akim@epita.fr>
4919
4920 * data/bison.c++: Use C++ ostreams.
4921 (cdebug_): New member.
4922
4923 2002-05-28 Akim Demaille <akim@epita.fr>
4924
4925 * src/output.c (output_skeleton): Be sure to allocate enough room
4926 for `/' _and_ for `\0' in full_skeleton.
4927
4928 2002-05-28 Akim Demaille <akim@epita.fr>
4929
4930 * data/bison.c++: Catch up with bison.simple:
4931 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4932 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4933 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4934 and popping traces.
4935
4936 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4937
4938 * src/output.c (output_skeleton): Put an explicit path in front of
4939 the skeleton file name, rather than relying on the -I directory,
4940 to partially alleviate effects of having a skeleton file lying around
4941 in the current directory.
4942
4943 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4944
4945 * src/conflicts.c (log_resolution): Correct typo:
4946 obstack_printf should be obstack_fgrow1.
4947
4948 2002-05-26 Akim Demaille <akim@epita.fr>
4949
4950 * src/state.h (state_t): `solved_conflicts' is a new member.
4951 * src/LR0.c (new_state): Set it to 0.
4952 * src/conflicts.h, src/conflicts.c (print_conflicts)
4953 (free_conflicts, solve_conflicts): Rename as...
4954 (conflicts_print, conflicts_free, conflicts_solve): these.
4955 Adjust callers.
4956 * src/conflicts.c (enum conflict_resolution_e)
4957 (solved_conflicts_obstack): New, used by...
4958 (log_resolution): this.
4959 Adjust to attach the conflict resolution to each state.
4960 Complete the description with the precedence/associativity
4961 information.
4962 (resolve_sr_conflict): Adjust.
4963 * src/print.c (print_state): Output its solved_conflicts.
4964 * tests/conflicts.at (Unresolved SR Conflicts)
4965 (Solved SR Conflicts): Exercise --report=all.
4966
4967 2002-05-26 Akim Demaille <akim@epita.fr>
4968
4969 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4970 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4971 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4972 (token_number_t, item_number_as_token_number)
4973 (token_number_as_item_number, muscle_insert_token_number_table):
4974 Rename as...
4975 (symbol_number_t, item_number_as_symbol_number)
4976 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4977 these, since it is more appropriate.
4978
4979 2002-05-26 Akim Demaille <akim@epita.fr>
4980
4981 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4982 `Error:' lines.
4983 * data/bison.simple (yystos) [YYDEBUG]: New.
4984 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4985 error recovery.
4986 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4987
4988 2002-05-25 Akim Demaille <akim@epita.fr>
4989
4990 * doc/bison.texinfo (Debugging): Split into...
4991 (Tracing): this new section, its former contents, and...
4992 (Understanding): this new section.
4993 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4994 by...
4995 (report_flag): this.
4996 Adjust all dependencies.
4997 (report_args, report_types, report_argmatch): New.
4998 (usage, getargs): Report/support -r, --report.
4999 * src/options.h
5000 (struct option_table_struct): Rename as..,
5001 (struct option_table_s): this.
5002 Rename the `set_flag' member to `flag' to match with getopt_long's
5003 struct.
5004 * src/options.c (option_table): Split verbose into an entry for
5005 %verbose, and another for --verbose.
5006 Support --report/-r, so remove -r from the obsolete --raw.
5007 * src/print.c: Attach full item sets and lookaheads reports to
5008 report_flag instead of trace_flag.
5009 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
5010
5011 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5012 and Paul Eggert <eggert@twinsun.com>
5013
5014 * data/bison.simple (yyparse): Correct error handling to conform to
5015 POSIX and yacc. Specifically, after syntax error is discovered,
5016 do not reduce further before shifting the error token.
5017 Clean up the code a bit by removing the labels yyerrdefault,
5018 yyerrhandle, yyerrpop.
5019 * NEWS: Document the above.
5020
5021 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5022
5023 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
5024 type; it isn't always big enough, since it doesn't necessarily
5025 include non-terminals.
5026 (yytranslate): Expand definition of yy_token_number_type, so that
5027 the latter can be removed.
5028 (yy_token_number_type): Remove, only one use.
5029 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
5030 don't use TokenNumberType as element type.
5031
5032 * tests/regression.at: Modify expected output to agree with change
5033 to yyr1 and yytranslate.
5034
5035 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
5036
5037 * src/reader.c (parse_action): Use copy_character instead of
5038 obstack_1grow.
5039
5040 2002-05-13 Akim Demaille <akim@epita.fr>
5041
5042 * tests/regression.at (Token definitions): Prototype yylex and
5043 yyerror.
5044
5045 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5046
5047 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
5048 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
5049 32-bit arithmetic.
5050 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
5051
5052 2002-05-07 Akim Demaille <akim@epita.fr>
5053
5054 * tests/synclines.at: Be sure to prototype yylex and yyerror to
5055 avoid GCC warnings.
5056
5057 2002-05-07 Akim Demaille <akim@epita.fr>
5058
5059 Kill GCC warnings.
5060
5061 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
5062 over the RHS of each rule.
5063 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
5064 * src/state.h (state_t): Member `nitems' is unsigned short.
5065 * src/LR0.c (get_state): Adjust.
5066 * src/reader.c (packgram): Likewise.
5067 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
5068 `Type'.
5069 (muscle_insert_int_table): Remove, unused.
5070 (prepare_rules): Remove `max'.
5071
5072 2002-05-06 Akim Demaille <akim@epita.fr>
5073
5074 * src/closure.c (print_firsts): Display of the symbol tags.
5075 (bitmatrix_print): Move to...
5076 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
5077 here.
5078 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
5079
5080 2002-05-06 Akim Demaille <akim@epita.fr>
5081
5082 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
5083 hash_do_for_each.
5084
5085 2002-05-06 Akim Demaille <akim@epita.fr>
5086
5087 * src/LR0.c (new_state, get_state): Instead of using the global
5088 `kernel_size' and `kernel_base', have two new arguments:
5089 `core_size' and `core'.
5090 Adjust callers.
5091
5092 2002-05-06 Akim Demaille <akim@epita.fr>
5093
5094 * src/reader.c (packgram): No longer end `ritem' with a 0
5095 sentinel: it is not used.
5096
5097 2002-05-05 Akim Demaille <akim@epita.fr>
5098
5099 New experimental feature: display the lookaheads in the report and
5100 graph.
5101
5102 * src/print (print_core): When --trace-flag, display the rules
5103 lookaheads.
5104 * src/print_graph.c (print_core): Likewise.
5105 Swap the arguments.
5106 Adjust caller.
5107
5108 2002-05-05 Akim Demaille <akim@epita.fr>
5109
5110 * tests/torture.at (Many lookaheads): New test.
5111
5112 2002-05-05 Akim Demaille <akim@epita.fr>
5113
5114 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
5115 (GENERATE_MUSCLE_INSERT_TABLE): this.
5116 (output_int_table, output_unsigned_int_table, output_short_table)
5117 (output_token_number_table, output_item_number_table): Replace with...
5118 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
5119 (muscle_insert_short_table, muscle_insert_token_number_table)
5120 (muscle_insert_item_number_table): these.
5121 Adjust all callers.
5122 (prepare_tokens): Don't free `translations', since...
5123 * src/reader.h, src/reader.c (grammar_free): do it.
5124 Move to...
5125 * src/gram.h, src/gram.c (grammar_free): here.
5126 * data/bison.simple, data/bison.c++: b4_token_number_max is now
5127 b4_translate_max.
5128
5129 2002-05-05 Akim Demaille <akim@epita.fr>
5130
5131 * src/output.c (output_unsigned_int_table): New.
5132 (prepare_rules): `i' is unsigned.
5133 `prhs', `rline', `r2' are unsigned int.
5134 Rename muscle `rhs_number_max' as `rhs_max'.
5135 Output muscles `prhs_max', `rline_max', and `r2_max'.
5136 Free rline and r1.
5137 * data/bison.simple, data/bison.c++: Adjust to use these muscles
5138 to compute types instead of constant types.
5139 * tests/regression.at (Web2c Actions): Adjust.
5140
5141 2002-05-04 Akim Demaille <akim@epita.fr>
5142
5143 * src/symtab.h (SALIAS, SUNDEF): Rename as...
5144 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
5145 Adjust dependencies.
5146 * src/output.c (token_definitions_output): Be sure not to output a
5147 `#define 'a'' when fed with `%token 'a' "a"'.
5148 * tests/regression.at (Token definitions): New.
5149
5150 2002-05-03 Paul Eggert <eggert@twinsun.com>
5151
5152 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
5153 for K&R C.
5154
5155 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
5156
5157 * Makefile.am (SUBDIRS): Remove intl.
5158 (EXTRA_DIST): Add config/config.rpath.
5159
5160 2002-05-03 Akim Demaille <akim@epita.fr>
5161
5162 * data/bison.simple (m4_if): Don't output empty enums.
5163 And actually, output valid enum definitions :(.
5164
5165 2002-05-03 Akim Demaille <akim@epita.fr>
5166
5167 * configure.bat: Remove, completely obsolete.
5168 * Makefile.am (EXTRA_DIST): Adjust.
5169 Don't distribute config.rpath...
5170 * config/Makefile.am (EXTRA_DIST): Do it.
5171
5172 2002-05-03 Akim Demaille <akim@epita.fr>
5173
5174 * configure.in (GETTEXT_VERSION): New.
5175 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
5176
5177 2002-05-03 Akim Demaille <akim@epita.fr>
5178
5179 * data/bison.simple (b4_token_enum): New.
5180 (b4_token_defines): Use it to output tokens both as #define and
5181 enums.
5182 Suggested by Paul Eggert.
5183 * src/output.c (token_definitions_output): Don't output spurious
5184 white spaces.
5185
5186 2002-05-03 Akim Demaille <akim@epita.fr>
5187
5188 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5189
5190 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
5191
5192 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
5193 Update the stack class, give a try to deque as the default container.
5194
5195 2002-05-02 Akim Demaille <akim@epita.fr>
5196
5197 * data/bison.simple (yyparse): Do not implement @$ = @1.
5198 (YYLLOC_DEFAULT): Adjust to do it.
5199 * doc/bison.texinfo (Location Default Action): Fix.
5200
5201 2002-05-02 Akim Demaille <akim@epita.fr>
5202
5203 * src/reader.c (parse_braces): Merge into...
5204 (parse_action): this.
5205
5206 2002-05-02 Akim Demaille <akim@epita.fr>
5207
5208 * configure.in (ALL_LINGUAS): Remove.
5209 * po/LINGUAS, hr.po: New.
5210
5211 2002-05-02 Akim Demaille <akim@epita.fr>
5212
5213 Remove the so called hairy (semantic) parsers.
5214
5215 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
5216 * src/gram.h, src/gram.c (semantic_parser): Remove.
5217 (rule_t): Remove the guard and guard_line members.
5218 * src/lex.h (token_t): remove tok_guard.
5219 * src/options.c (option_table): Remove %guard and %semantic_parser
5220 support.
5221 * src/output.c, src/output.h (guards_output): Remove.
5222 (prepare): Adjust.
5223 (token_definitions_output): Don't output the `T'
5224 tokens (???).
5225 (output_skeleton): Don't output the guards.
5226 * src/files.c, src/files.c (attrsfile): Remove.
5227 * src/reader.c (symbol_list): Remove the guard and guard_line
5228 members.
5229 Adjust dependencies.
5230 (parse_guard): Remove.
5231 * data/bison.hairy: Remove.
5232 * doc/bison.texinfo (Environment Variables): Remove occurrences of
5233 BISON_HAIRY.
5234
5235 2002-05-02 Akim Demaille <akim@epita.fr>
5236
5237 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
5238 (parse_guard): Rename the formal argument `stack_offset' as
5239 `rule_length', which is more readable.
5240 Adjust callers.
5241 (copy_at, copy_dollar): Instead of outputting the hard coded
5242 values of $$, $n and so forth, output invocation to b4_lhs_value,
5243 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
5244 Note: this patch partially drops `semantic-parser' support: it
5245 always does `rule_length - n', where semantic parsers ought to
5246 always use `-n'.
5247 * data/bison.simple, data/bison.c++ (b4_lhs_value)
5248 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
5249
5250 2002-05-02 Akim Demaille <akim@epita.fr>
5251
5252 * configure.in (AC_INIT): Bump to 1.49b.
5253 (AM_INIT_AUTOMAKE): Short invocation.
5254
5255 2002-05-02 Akim Demaille <akim@epita.fr>
5256
5257 Version 1.49a.
5258
5259 2002-05-01 Akim Demaille <akim@epita.fr>
5260
5261 * src/skeleton.h: Remove.
5262
5263 2002-05-01 Akim Demaille <akim@epita.fr>
5264
5265 * src/skeleton.h: Fix the #endif.
5266 Reported by Magnus Fromreide.
5267
5268 2002-04-26 Paul Eggert <eggert@twinsun.com>
5269
5270 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
5271 Define if we define YYSTYPE and YYLTYPE, respectively.
5272 (YYCOPY): Fix [] quoting problem in the non-GCC case.
5273
5274 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
5275
5276 * src/scan-skel.l: Postprocess quadrigraphs.
5277
5278 * src/reader.c (copy_character): New function, used to output
5279 single characters while replacing `[' and `]' with quadrigraphs, to
5280 avoid troubles with M4 quotes.
5281 (copy_comment): Output characters with copy_character.
5282 (read_additionnal_code): Likewise.
5283 (copy_string2): Likewise.
5284 (copy_definition): Likewise.
5285
5286 * tests/calc.at: Exercise M4 quoting.
5287
5288 2002-04-25 Akim Demaille <akim@epita.fr>
5289
5290 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
5291 between `!' and the command.
5292 Reported by Paul Eggert.
5293
5294 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
5295
5296 * tests/calc.at: Exercise prologue splitting.
5297
5298 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
5299 `b4_post_prologue' instead of `b4_prologue'.
5300
5301 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
5302 muscles.
5303 (output): Free pre_prologue_obstack and post_prologue_obstack.
5304 * src/files.h, src/files.c (attrs_obstack): Remove.
5305 (pre_prologue_obstack, post_prologue_obstack): New.
5306 * src/reader.c (copy_definition): Add a parameter to specify the
5307 obstack to fill, instead of using attrs_obstack unconditionally.
5308 (read_declarations): Pass pre_prologue_obstack to copy_definition if
5309 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
5310
5311 2002-04-23 Paul Eggert <eggert@twinsun.com>
5312
5313 * data/bison.simple: Remove unnecessary commentary and white
5314 space differences from 1_29-branch.
5315 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
5316
5317 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
5318 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
5319 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
5320 constructors or destructors.
5321
5322 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
5323
5324 2002-04-23 Akim Demaille <akim@epita.fr>
5325
5326 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
5327 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
5328 location with columns.
5329 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
5330 All reported by Paul Eggert.
5331
5332 2002-04-22 Akim Demaille <akim@epita.fr>
5333
5334 * src/reduce.c (dump_grammar): Move to...
5335 * src/gram.h, src/gram.c (grammar_dump): here.
5336 Be sure to separate long item numbers.
5337 Don't read the members of a rule's prec if its nil.
5338
5339 2002-04-22 Akim Demaille <akim@epita.fr>
5340
5341 * src/output.c (table_size, table_grow): New.
5342 (MAXTABLE): Remove, replace uses with table_size.
5343 (pack_vector): Instead of dying when the table is too big, grow it.
5344
5345 2002-04-22 Akim Demaille <akim@epita.fr>
5346
5347 * data/bison.simple (yyr1): Its type is that of a token number.
5348 * data/bison.c++ (r1_): Likewise.
5349 * tests/regression.at (Web2c Actions): Adjust.
5350
5351 2002-04-22 Akim Demaille <akim@epita.fr>
5352
5353 * src/reader.c (token_translations_init): 256 is now the default
5354 value for the error token, i.e., it will be assigned another
5355 number if the user assigned 256 to one of her tokens.
5356 (reader): Don't force 256 to error.
5357 * doc/bison.texinfo (Symbols): Adjust.
5358 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
5359 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
5360 etc. instead of 10, 20, 30 (which was used to `jump' over error
5361 (256) and undefined (2)).
5362
5363 2002-04-22 Akim Demaille <akim@epita.fr>
5364
5365 Propagate more token_number_t.
5366
5367 * src/gram.h (token_number_as_item_number)
5368 (item_number_as_token_number): New.
5369 * src/output.c (GENERATE_OUTPUT_TABLE): New.
5370 Use it to create output_item_number_table and
5371 output_token_number_table.
5372 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
5373 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
5374 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
5375 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
5376
5377 2002-04-22 Akim Demaille <akim@epita.fr>
5378
5379 * src/output.h, src/output.c (get_lines_number): Remove.
5380
5381 2002-04-19 Akim Demaille <akim@epita.fr>
5382
5383 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
5384 as Lex/Flex'.
5385 (Debugging): More details about enabling the debugging features.
5386 (Table of Symbols): Describe $$, $n, @$, and @n.
5387 Suggested by Tim Josling.
5388
5389 2002-04-19 Akim Demaille <akim@epita.fr>
5390
5391 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
5392
5393 2002-04-10 Akim Demaille <akim@epita.fr>
5394
5395 * src/system.h: Rely on HAVE_LIMITS_H.
5396 Suggested by Paul Eggert.
5397
5398 2002-04-09 Akim Demaille <akim@epita.fr>
5399
5400 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
5401 full stderr, and strip it according to the bison options, instead
5402 of composing the error message from different bits.
5403 This makes it easier to check for several error messages.
5404 Adjust all the invocations.
5405 Add an invocation exercising the error token.
5406 Add an invocation demonstrating a stupid error message.
5407 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
5408 Adjust the tests.
5409 Error message are for stderr, not stdout.
5410
5411 2002-04-09 Akim Demaille <akim@epita.fr>
5412
5413 * src/gram.h, src/gram.c (error_token_number): Remove, use
5414 errtoken->number.
5415 * src/reader.c (reader): Don't specify the user token number (2)
5416 for $undefined, as it uselessly prevents using it.
5417 * src/gram.h (token_number_t): Move to...
5418 * src/symtab.h: here.
5419 (state_t.number): Is a token_number_t.
5420 * src/print.c, src/reader.c: Use undeftoken->number instead of
5421 hard coded 2.
5422 (Even though this 2 is not the same as above: the number of the
5423 undeftoken remains being 2, it is its user token number which
5424 might not be 2).
5425 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
5426 `user_token_number_max'.
5427 Output `undef_token_number'.
5428 * data/bison.simple, data/bison.c++: Use them.
5429 Be sure to map invalid yylex return values to
5430 `undef_token_number'. This saves us from gratuitous SEGV.
5431
5432 * tests/conflicts.at (Solved SR Conflicts)
5433 (Unresolved SR Conflicts): Adjust.
5434 * tests/regression.at (Web2c Actions): Adjust.
5435
5436 2002-04-08 Akim Demaille <akim@epita.fr>
5437
5438 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
5439 Adding #line.
5440 Remove the duplicate `typedefs'.
5441 (RhsNumberType): Fix the declaration and various other typos.
5442 Use __ofile__.
5443 * data/bison.simple: Use __ofile__.
5444 * src/scan-skel.l: Handle __ofile__.
5445
5446 2002-04-08 Akim Demaille <akim@epita.fr>
5447
5448 * src/gram.h (item_number_t): New, the type of item numbers in
5449 RITEM. Note that it must be able to code symbol numbers as
5450 positive number, and the negation of rule numbers as negative
5451 numbers.
5452 Adjust all dependencies (pretty many).
5453 * src/reduce.c (rule): Remove this `short *' pointer: use
5454 item_number_t.
5455 * src/system.h (MINSHORT, MAXSHORT): Remove.
5456 Include `limits.h'.
5457 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
5458 (shortcpy): Remove.
5459 (MAXTABLE): Move to...
5460 * src/output.c (MAXTABLE): here.
5461 (prepare_rules): Use output_int_table to output rhs.
5462 * data/bison.simple, data/bison.c++: Adjust.
5463 * tests/torture.at (Big triangle): Move the limit from 254 to
5464 500.
5465 * tests/regression.at (Web2c Actions): Ajust.
5466
5467 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
5468 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
5469 passes, but produces negative #line number, once fixed, GCC is
5470 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
5471 C), it passes.
5472 * src/state.h (state_h): Code input lines on ints, not shorts.
5473
5474 2002-04-08 Akim Demaille <akim@epita.fr>
5475
5476 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
5477 and then the grammar.
5478
5479 2002-04-08 Akim Demaille <akim@epita.fr>
5480
5481 * src/system.h: No longer using strndup.
5482
5483 2002-04-07 Akim Demaille <akim@epita.fr>
5484
5485 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
5486 * src/output.c (output_table_data): Return the longest number.
5487 (prepare_tokens): Output `token_number_max').
5488 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
5489 New.
5490 Use them to define yy_token_number_type/TokenNumberType.
5491 Use this type for yytranslate.
5492 * tests/torture.at (Big triangle): Push the limit from 124 to
5493 253.
5494 * tests/regression.at (Web2c Actions): Adjust.
5495
5496 2002-04-07 Akim Demaille <akim@epita.fr>
5497
5498 * tests/torture.at (Big triangle): New.
5499 (GNU AWK Grammar, GNU Cim Grammar): Move to...
5500 * tests/existing.at: here.
5501
5502 2002-04-07 Akim Demaille <akim@epita.fr>
5503
5504 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
5505 nritems.
5506 Adjust dependencies.
5507
5508 2002-04-07 Akim Demaille <akim@epita.fr>
5509
5510 * src/reader.c: Normalize increments to prefix form.
5511
5512 2002-04-07 Akim Demaille <akim@epita.fr>
5513
5514 * src/reader.c, symtab.c: Remove debugging code.
5515
5516 2002-04-07 Akim Demaille <akim@epita.fr>
5517
5518 Rename all the `bucket's as `symbol_t'.
5519
5520 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
5521 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
5522 * src/symtab.c, src/symtab.h (bucket): Rename as...
5523 (symbol_t): this.
5524 (symbol_list_new, bucket_check_defined, bucket_make_alias)
5525 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
5526 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5527 (buckets_new, buckets_free, buckets_do): Rename as...
5528 (symbol_list_new, symbol_check_defined, symbol_make_alias)
5529 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
5530 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
5531 (symbols_new, symbols_free, symbols_do): these.
5532
5533 2002-04-07 Akim Demaille <akim@epita.fr>
5534
5535 Use lib/hash for the symbol table.
5536
5537 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
5538 EOF.
5539 * src/lex.c (lex): Set the `number' member of new terminals.
5540 * src/reader.c (bucket_check_defined, bucket_make_alias)
5541 (bucket_check_alias_consistence, bucket_translation): New.
5542 (reader, grammar_free, readgram, token_translations_init)
5543 (packsymbols): Adjust.
5544 (reader): Number the predefined tokens.
5545 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
5546 for predefined tokens.
5547 * src/symtab.h (bucket): Remove all the hash table related
5548 members.
5549 * src/symtab.c (symtab): Replace by...
5550 (bucket_table): this.
5551 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
5552 (buckets_new, buckets_do): New.
5553
5554 2002-04-07 Akim Demaille <akim@epita.fr>
5555
5556 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
5557 (start_symbol, max_user_token_number, semantic_parser)
5558 (error_token_number): Initialize.
5559 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
5560 Initialize.
5561 (reader): Don't.
5562 (errtoken, eoftoken, undeftoken, axiom): Extern.
5563
5564 2002-04-07 Akim Demaille <akim@epita.fr>
5565
5566 * src/gram.h (rule_s): prec and precsym are now pointers
5567 to the bucket giving the priority/associativity.
5568 Member `associativity' removed: useless.
5569 * src/reduce.c, src/conflicts.c: Adjust.
5570
5571 2002-04-07 Akim Demaille <akim@epita.fr>
5572
5573 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
5574 Properly escape the symbols' TAG when outputting them.
5575
5576 2002-04-07 Akim Demaille <akim@epita.fr>
5577
5578 * src/lalr.h (LA): Is a bitsetv, not bitset*.
5579
5580 2002-04-07 Akim Demaille <akim@epita.fr>
5581
5582 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
5583 (LArule): this, which is an array to rule_t*.
5584 * src/print.c, src/conflicts.c: Adjust.
5585
5586 2002-04-07 Akim Demaille <akim@epita.fr>
5587
5588 * src/gram.h (rule_t): Rename `number' as `user_number'.
5589 `number' is a new member.
5590 Adjust dependencies.
5591 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
5592
5593 2002-04-07 Akim Demaille <akim@epita.fr>
5594
5595 As a result of the previous patch, it is no longer needed
5596 to reorder ritem itself.
5597
5598 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
5599
5600 2002-04-07 Akim Demaille <akim@epita.fr>
5601
5602 Be sure never to walk through RITEMS, but use only data related to
5603 the rules themselves. RITEMS should be banished.
5604
5605 * src/output.c (output_token_translations): Rename as...
5606 (prepare_tokens): this.
5607 In addition to `translate', prepare the muscles `tname' and
5608 `toknum', which were handled by...
5609 (output_rule_data): this.
5610 Remove, and move the remainder of its outputs into...
5611 (prepare_rules): this new routines, which also merges content from
5612 (output_gram): this.
5613 (prepare_rules): Be sure never to walk through RITEMS.
5614 (output_stos): Rename as...
5615 (prepare_stos): this.
5616 (output): Always invoke prepare_states, after all, just don't use it
5617 in the output if you don't need it.
5618
5619 2002-04-07 Akim Demaille <akim@epita.fr>
5620
5621 * src/LR0.c (new_state): Display `nstates' as the name of the
5622 newly created state.
5623 Adjust to initialize first_state and last_state if needed.
5624 Be sure to distinguish the initial from the final state.
5625 (new_states): Create the itemset of the initial state, and use
5626 new_state.
5627 * src/closure.c (closure): Now that the initial state has its
5628 items properly set, there is no need for a special case when
5629 creating `ruleset'.
5630
5631 As a result, now the rule 0, reducing to $axiom, is visible in the
5632 outputs. Adjust the test suite.
5633
5634 * tests/conflicts.at (Solved SR Conflicts)
5635 (Unresolved SR Conflicts): Adjust.
5636 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
5637 * tests/conflicts.at (S/R in initial): New.
5638
5639 2002-04-07 Akim Demaille <akim@epita.fr>
5640
5641 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
5642 the RHS of the rules.
5643 * src/output.c (output_gram): Likewise.
5644
5645 2002-04-07 Akim Demaille <akim@epita.fr>
5646
5647 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
5648 bucket.
5649 Adjust all dependencies.
5650 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
5651 `number' of the buckets too.
5652 * src/gram.h: Include `symtab.h'.
5653 (associativity): Move to...
5654 * src/symtab.h: here.
5655 No longer include `gram.h'.
5656
5657 2002-04-07 Akim Demaille <akim@epita.fr>
5658
5659 * src/gram.h, src/gram.c (rules_rhs_length): New.
5660 (ritem_longest_rhs): Use it.
5661 * src/gram.h (rule_t): `number' is a new member.
5662 * src/reader.c (packgram): Set it.
5663 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
5664 the end of `rules', and count them out of `nrules'.
5665 (reduce_output, dump_grammar): Adjust.
5666 * src/print.c (print_grammar): It is no longer needed to check for
5667 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
5668 * tests/reduce.at (Reduced Automaton): New test.
5669
5670 2002-04-07 Akim Demaille <akim@epita.fr>
5671
5672 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
5673 lacking `+ 1' to nrules, Bison reported as useless a token if it
5674 was used solely to set the precedence of the last rule...
5675
5676 2002-04-07 Akim Demaille <akim@epita.fr>
5677
5678 * data/bison.c++, data/bison.simple: Don't output the current file
5679 name in #line, to avoid useless diffs between two identical
5680 outputs under different names.
5681
5682 2002-04-07 Akim Demaille <akim@epita.fr>
5683
5684 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
5685 Normalize loops to using `< nrules + 1', not `<= nrules'.
5686
5687 2002-04-07 Akim Demaille <akim@epita.fr>
5688
5689 * TODO: Update.
5690
5691 2002-04-07 Akim Demaille <akim@epita.fr>
5692
5693 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
5694 bucket.value as bucket.number.
5695
5696 2002-04-07 Akim Demaille <akim@epita.fr>
5697
5698 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
5699 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
5700 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
5701 RHS, instead of being an index in RITEMS.
5702
5703 2002-04-04 Paul Eggert <eggert@twinsun.com>
5704
5705 * doc/bison.texinfo: Update copyright date.
5706 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
5707 (Symbols): Warn about running Bison in one character set,
5708 but compiling and/or running in an incompatible one.
5709 Warn about character code 256, too.
5710
5711 2002-04-03 Paul Eggert <eggert@twinsun.com>
5712
5713 * src/bison.data (YYSTACK_ALLOC): Depend on whether
5714 YYERROR_VERBOSE is nonzero, not whether it is defined.
5715
5716 Merge changes from bison-1_29-branch.
5717
5718 2002-03-20 Paul Eggert <eggert@twinsun.com>
5719
5720 Merge fixes from Debian bison_1.34-1.diff.
5721
5722 * configure.in (AC_PREREQ): 2.53.
5723
5724 2002-03-20 Akim Demaille <akim@epita.fr>
5725
5726 * src/conflicts.c (log_resolution): Argument `resolution' is const.
5727
5728 2002-03-19 Paul Eggert <eggert@twinsun.com>
5729
5730 * src/bison.simple (YYCOPY): New macro.
5731 (YYSTACK_RELOCATE): Use it.
5732 Remove Type arg; no longer needed. All callers changed.
5733 (yymemcpy): Remove; no longer needed.
5734
5735 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
5736 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5737
5738 2002-03-19 Akim Demaille <akim@epita.fr>
5739
5740 Test and fix the #line outputs.
5741
5742 * tests/atlocal.at (GCC): New.
5743 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
5744 (Prologue synch line, ,%union synch line, Postprologue synch line)
5745 (Action synch line, Epilogue synch line): New tests.
5746 * src/reader.c (parse_union_decl): Define the muscle stype_line.
5747 * data/bison.simple, data/bison.c++: Use it.
5748
5749 2002-03-19 Akim Demaille <akim@epita.fr>
5750
5751 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
5752 (Solved SR Conflicts, %expect not enough, %expect right)
5753 (%expect too much): Move to...
5754 * tests/conflicts.at: this new file.
5755
5756 2002-03-19 Akim Demaille <akim@epita.fr>
5757
5758 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
5759 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
5760 that we can move to enums for instance.
5761 * src/output.c (token_definitions_output): Output a list of
5762 `token-name, token-number' instead of the #define.
5763 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
5764
5765 2002-03-14 Akim Demaille <akim@epita.fr>
5766
5767 Use Gettext 0.11.1.
5768
5769 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
5770
5771 * data/bison.c++: Make the user able to add members to the generated
5772 parser by subclassing.
5773
5774 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
5775
5776 * src/reader.c (read_additionnal_code): `c' should be an integer, not
5777 a character.
5778 Reported by Nicolas Tisserand and Nicolas Burrus.
5779
5780 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5781
5782 * src/reader.c: Warn about lacking semi-colons, do not complain.
5783
5784 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5785
5786 * data/bison.c++: Remove a debug line.
5787
5788 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
5789
5790 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
5791 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5792 provide a default implementation.
5793
5794 2002-03-04 Akim Demaille <akim@epita.fr>
5795
5796 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
5797 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
5798 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
5799 * tests/semantic.at (Parsing Guards): Similarly.
5800 * src/reader.at (readgram): Complain if the last rule is not ended
5801 with a semi-colon.
5802
5803 2002-03-04 Akim Demaille <akim@epita.fr>
5804
5805 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
5806 * src/closure.c: here.
5807 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
5808 RTC.
5809 * src/warshall.h, src/warshall.c: Remove.
5810 * tests/sets.at (Broken Closure): Adjust.
5811
5812 2002-03-04 Akim Demaille <akim@epita.fr>
5813
5814 * src/output.c (output_skeleton): tempdir is const.
5815 bytes_read is unused.
5816
5817 2002-03-04 Akim Demaille <akim@epita.fr>
5818
5819 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5820 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
5821 Update.
5822 From Michael Hayes.
5823
5824 2002-03-04 Akim Demaille <akim@epita.fr>
5825
5826 * src/closure.c (closure): `r' is unused.
5827
5828 2002-03-04 Akim Demaille <akim@epita.fr>
5829
5830 * tests/sets.at (Broken Closure): Add the ending `;'.
5831 * src/reader.at (readgram): Complain if a rule is not ended with a
5832 semi-colon.
5833
5834 2002-03-04 Akim Demaille <akim@epita.fr>
5835
5836 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
5837 (count_sr_conflicts): Use bitset_count.
5838 * src/reduce.c (inaccessable_symbols): Ditto.
5839 (bits_size): Remove.
5840 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5841
5842 2002-03-04 Akim Demaille <akim@epita.fr>
5843
5844 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5845 * src/reduce.c: Remove the `bitset_zero's following the
5846 `bitset_create's, as now it is performed by the latter.
5847
5848 2002-03-04 Akim Demaille <akim@epita.fr>
5849
5850 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5851 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5852 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5853 latest sources from Michael.
5854
5855 2002-03-04 Akim Demaille <akim@epita.fr>
5856
5857 * src/output.c (output): Don't free the grammar.
5858 * src/reader.c (grammar_free): New.
5859 * src/main.c (main): Call it and don't free symtab here.
5860
5861 2002-03-04 Akim Demaille <akim@epita.fr>
5862
5863 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5864 before returning.
5865 Reported by Benoit Perrot.
5866
5867 2002-03-04 Akim Demaille <akim@epita.fr>
5868
5869 Use bitset operations when possible, not loops over bits.
5870
5871 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5872 bitset_or.
5873 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5874 * src/reduce.c (useless_nonterminals): Formatting changes.
5875 * src/warshall.c (TC): Use bitset_or.
5876
5877 2002-03-04 Akim Demaille <akim@epita.fr>
5878
5879 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5880 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5881 Ditto.
5882
5883 2002-03-04 Akim Demaille <akim@epita.fr>
5884
5885 * src/lalr.c (F): Now a bitset*.
5886 Adjust all dependencies.
5887
5888 2002-03-04 Akim Demaille <akim@epita.fr>
5889
5890 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5891 Adjust all dependencies.
5892
5893 2002-03-04 Akim Demaille <akim@epita.fr>
5894
5895 * src/L0.c, src/LR0.h (nstates): Be size_t.
5896 Adjust comparisons (signed vs unsigned).
5897 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5898 bitset*.
5899 Adjust all dependencies.
5900
5901 2002-03-04 Akim Demaille <akim@epita.fr>
5902
5903 * src/closure.c (firsts): Now, also a bitset.
5904 Adjust all dependencies.
5905 (varsetsize): Remove, now unused.
5906 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5907
5908 2002-03-04 Akim Demaille <akim@epita.fr>
5909
5910 * src/print.c: Convert to use bitset.h, not hand coded iterations
5911 over ints.
5912
5913 2002-03-04 Akim Demaille <akim@epita.fr>
5914
5915 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5916
5917 2002-03-04 Akim Demaille <akim@epita.fr>
5918
5919 * src/closure.c (ruleset): Be a bitset.
5920 (rulesetsize): Remove.
5921
5922 2002-03-04 Akim Demaille <akim@epita.fr>
5923
5924 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5925 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5926 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5927 * src/closure.c (fderives): Be an array of bitsets.
5928
5929 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5930
5931 * data/bison.c++: Merge the two generated headers. Insert a copyright
5932 notice in each output file.
5933
5934 2002-02-28 Akim Demaille <akim@epita.fr>
5935
5936 * data/bison.c++: Copy the prologue of bison.simple to fetch
5937 useful M4 definitions, such as b4_header_guard.
5938
5939 2002-02-25 Akim Demaille <akim@epita.fr>
5940
5941 * src/getargs.c (version): Give the name of the authors, and use a
5942 translator friendly scheme for the bgr
5943 copyright notice.
5944
5945 2002-02-25 Akim Demaille <akim@epita.fr>
5946
5947 * src/output.c (header_output): Remove, now handled completely via
5948 M4.
5949
5950 2002-02-25 Akim Demaille <akim@epita.fr>
5951
5952 * m4/m4.m4: New, from CVS Autoconf.
5953 * configure.in: Invoke it.
5954 * src/output.c (output_skeleton): Use its result instead of the
5955 hard coded name.
5956
5957 2002-02-25 Akim Demaille <akim@epita.fr>
5958
5959 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5960 Fileutils 4.1.5.
5961 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5962 * src/output.c (output_skeleton): Use mkstemp to create a real
5963 temporary file.
5964 Move the filling of `skeleton' and its muscle to...
5965 (prepare): here.
5966 (output): Move the definition of the prologue muscle to...
5967 (prepare): here.
5968 * src/system.h (DEFAULT_TMPDIR): New.
5969
5970 2002-02-14 Paul Eggert <eggert@twinsun.com>
5971
5972 Remove the support for C++ namespace cleanliness; it was
5973 causing more problems than it was curing, since it didn't work
5974 properly on some nonstandard C++ compilers. This can wait
5975 for a proper C++ parser.
5976
5977 * NEWS: Document this.
5978 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5979 of C++, as it's treated like C now.
5980 * src/bison.simple (YYSTD): Remove.
5981 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5982 Treat C++ just like Standard C instead of trying to support
5983 namespace cleanliness.
5984
5985 2002-02-14 Akim Demaille <akim@epita.fr>
5986
5987 * tests/regression.at (else): Adjust to Andreas' change.
5988
5989 2002-02-14 Akim Demaille <akim@epita.fr>
5990
5991 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5992
5993 2002-02-13 Andreas Schwab <schwab@suse.de>
5994
5995 * src/output.c (output_rule_data): Don't output NULL, it might
5996 not be defined yet.
5997
5998 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5999
6000 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
6001 (Copyright notice): Update.
6002
6003 2002-02-11 Akim Demaille <akim@epita.fr>
6004
6005 * tests/regression.at (%nonassoc and eof): Don't include
6006 nonportable headers.
6007
6008 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
6009
6010 * data/bison.c++: Correct error recovery. Make the user able to
6011 initialize the starting location.
6012
6013 2002-02-07 Akim Demaille <akim@epita.fr>
6014
6015 * tests/input.at: New.
6016
6017 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6018
6019 * data/bison.c++: Replace some direct m4 expansions by constants. Be
6020 more consistent when naming methods and variables. Put preprocessor
6021 directives around tables only needed for debugging.
6022
6023 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6024
6025 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
6026 C++ parsers.
6027 (yy::b4_name::parse): Use print_.
6028
6029 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6030
6031 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
6032
6033 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
6034
6035 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
6036 C++ parsers.
6037 (yy::b4_name::parse): Build verbose error messages, and use error_.
6038
6039 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6040
6041 * data/bison.c++: Fix m4 quoting in comments.
6042
6043 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
6044
6045 * data/bison.c++: Adjust the parser code. Fix some muscles that were
6046 not expanded by m4.
6047
6048 2002-02-05 Akim Demaille <akim@epita.fr>
6049
6050 * data/bison.c++: Adjust to the M4 back end.
6051 More is certainly needed.
6052
6053 2002-02-05 Akim Demaille <akim@epita.fr>
6054
6055 Give a try to M4 as a back end.
6056
6057 * lib/readpipe.c: New, from wdiff.
6058 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
6059 BISON_HAIRY.
6060 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
6061 specific values. Now it is m4 that performs the lookup.
6062 * src/parse-skel.y: Remove.
6063 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
6064 * src/output.c (actions_output, guards_output)
6065 (token_definitions_output): No longer keeps track of the output
6066 line number, hence remove the second argument.
6067 (guards_output): Check against the guard member of a rule, not the
6068 action member.
6069 Adjust callers.
6070 (output_skeleton): Don't look for the skeleton location, let m4 do
6071 that.
6072 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
6073 file will be used.
6074 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
6075 (prepare): Given that for the time being changesyntax is not
6076 usable in M4, rename the muscles using `-' to `_'.
6077 Define `defines_flag', `output_parser_name' and `output_header_name'.
6078 * src/output.h (actions_output, guards_output)
6079 (token_definitions_output): Adjust prototypes.
6080 * src/scan-skel.l: Instead of scanning the skeletons, it now
6081 processes the output of m4: `__oline__' and `#output'.
6082 * data/bison.simple: Adjust to be used by M4(sugar).
6083 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
6084 to date.
6085 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
6086 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
6087 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
6088 shamelessly stolen from CVS Autoconf.
6089
6090 2002-02-05 Akim Demaille <akim@epita.fr>
6091
6092 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
6093 * configure.in: Check for the declarations of free and malloc.
6094 * src/muscle_tab.c: Adjust.
6095
6096 2002-02-05 Akim Demaille <akim@epita.fr>
6097
6098 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
6099 which have no values.
6100
6101 2002-02-05 Akim Demaille <akim@epita.fr>
6102
6103 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
6104 * data/: here.
6105
6106 2002-01-29 Paul Eggert <eggert@twinsun.com>
6107
6108 * src/bison.simple (YYSIZE_T): Do not define merely because
6109 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
6110 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6111
6112 2002-01-27 Akim Demaille <akim@epita.fr>
6113
6114 Fix `%nonassoc and eof'.
6115
6116 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
6117 which were not properly copied! Replace
6118 memcpy (res->errs, src->errs, src->nerrs);
6119 with
6120 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
6121 !!!
6122 * tests/regression.at (%nonassoc and eof): Adjust to newest
6123 Autotest: `.' is not in the PATH.
6124
6125 2002-01-27 Akim Demaille <akim@epita.fr>
6126
6127 * tests/sets.at (AT_EXTRACT_SETS): New.
6128 (Nullable): Use it.
6129 (Firsts): New.
6130
6131 2002-01-26 Akim Demaille <akim@epita.fr>
6132
6133 * tests/actions.at, tests/calc.at, tests/headers.at,
6134 * tests/torture.at: Adjust to the newest Autotest which no longer
6135 forces `.' in the PATH.
6136
6137 2002-01-25 Akim Demaille <akim@epita.fr>
6138
6139 * tests/regression.at (%nonassoc and eof): New.
6140 Suggested by Robert Anisko.
6141
6142 2002-01-24 Akim Demaille <akim@epita.fr>
6143
6144 Bison dumps core when trying to complain about broken input files.
6145 Reported by Cris van Pelt.
6146
6147 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
6148 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
6149 into...
6150 (Invalid inputs): Strengthen: exercise parse_percent_token.
6151
6152 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
6153
6154 * src/Makefile.am: Add bison.c++.
6155 * src/bison.c++: New skeleton.
6156
6157 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
6158
6159 * po/it.po: New.
6160
6161 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
6162
6163 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
6164
6165 2002-01-20 Marc Autret <marc@gnu.org>
6166
6167 * src/files.c (compute_output_file_names): Fix
6168
6169 2002-01-20 Marc Autret <marc@gnu.org>
6170
6171 * tests/output.at: New test.
6172 * src/files.c (compute_base_names): Don't map extensions when
6173 the YACC flag is set, use defaults.
6174 Reported by Evgeny Stambulchik.
6175
6176 2002-01-20 Marc Autret <marc@gnu.org>
6177
6178 * src/system.h: Need to define __attribute__ away for non-GCC
6179 compilers as well (i.e. the vendor C compiler).
6180 Suggested by Albert Chin-A-Young.
6181
6182 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
6183
6184 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
6185 canonical definition.
6186 * src/system.h: Use the canonical definition for PARAMS (avoids
6187 a conflict with the macro from lib/hash.h).
6188
6189 2002-01-11 Akim Demaille <akim@epita.fr>
6190
6191 * configure.in: Use AC_FUNC_STRNLEN.
6192 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
6193
6194 2002-01-09 Akim Demaille <akim@epita.fr>
6195
6196 * src/files.c, src/files.h (output_infix): New.
6197 (tab_extension): Remove.
6198 (compute_base_names): Compute the former, drop the latter.
6199 * src/output.c (prepare): Insert the muscles `output-infix', and
6200 `output-suffix'.
6201 * src/parse-skel.y (string, string.1): New.
6202 (section.header): Use it.
6203 (section.yacc): Remove.
6204 (prefix): Remove too.
6205 * src/scan-skel.l: Adjust.
6206 * src/bison.simple, src/bison.hairy: Adjust.
6207
6208 2002-01-09 Akim Demaille <akim@epita.fr>
6209
6210 * configure.in (WERROR_CFLAGS): Compute it.
6211 * src/Makefile.am (CFLAGS): Pass it.
6212 * tests/atlocal.in (CFLAGS): Idem.
6213 * src/files.c: Fix a few warnings.
6214 (get_extension_index): Remove, unused.
6215
6216 2002-01-08 Akim Demaille <akim@epita.fr>
6217
6218 * src/getargs.c (AS_FILE_NAME): New.
6219 (getargs): Use it to convert DOSish file names.
6220 * src/files.c (base_name): Rename as full_base_name to avoid
6221 clashes with `base_name ()'.
6222 (filename_split): New.
6223 (compute_base_names): N-th rewrite, using filename_split.
6224
6225 2002-01-08 Akim Demaille <akim@epita.fr>
6226
6227 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
6228 New, stolen from the Fileutils 4.1.
6229 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6230 * configure.in: Check for the presence of memrchr, and of its
6231 prototype.
6232
6233 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
6234
6235 * lib/hash.h (__P): Added definition for this macro.
6236 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
6237 BUILT_SOURCES, to ensure they are generated first.
6238 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
6239 %error-verbose to allow bootstrapping with bison 1.30x.
6240
6241 2002-01-06 Akim Demaille <akim@epita.fr>
6242
6243 * src/reader.c (parse_braces): Don't fetch the next char, the
6244 convention is to fetch on entry.
6245 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
6246 'switch' without a following semicolon.
6247 * tests/regression.at (braces parsing): New.
6248
6249 2002-01-06 Akim Demaille <akim@epita.fr>
6250
6251 Bison is dead wrong in its RR conflict reports.
6252
6253 * tests/torture.at (GNU Cim Grammar): New.
6254 * src/conflicts.c (count_rr_conflicts): Fix.
6255
6256 2002-01-06 Akim Demaille <akim@epita.fr>
6257
6258 Creating package.m4 from configure.ac causes too many problems.
6259
6260 * tests/Makefile.am (package.m4): Create it by hand,
6261 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
6262
6263 2002-01-06 Akim Demaille <akim@epita.fr>
6264
6265 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
6266 skeleton.h.
6267
6268 2002-01-04 Paul Eggert <eggert@twinsun.com>
6269
6270 * doc/bison.texinfo (Debugging):
6271 Remove YYSTDERR; it's no longer defined or used.
6272 Also, s/cstdio.h/cstdio/.
6273
6274 2002-01-03 Akim Demaille <akim@epita.fr>
6275
6276 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
6277
6278 2002-01-03 Akim Demaille <akim@epita.fr>
6279
6280 * src/parse-skel.y (process_skeleton): Don't bind the parser's
6281 tracing code to --trace, wait for a better --trace option, with
6282 args.
6283
6284 2002-01-03 Akim Demaille <akim@epita.fr>
6285
6286 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
6287 The ISO C++ standard is extremely clear about it: stderr is
6288 considered a macro, not a regular symbol (see table 94 `Header
6289 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
6290 Therefore std:: does not apply to it. It still does with fprintf.
6291 Also, s/cstdio.h/cstdio/.
6292
6293 2002-01-03 Akim Demaille <akim@epita.fr>
6294
6295 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
6296 for non system headers.
6297
6298 2002-01-02 Akim Demaille <akim@epita.fr>
6299
6300 Equip the skeleton chain with location tracking, runtime trace,
6301 pure parser and scanner.
6302
6303 * src/parse-skel.y: Request a pure parser, locations, and prefix
6304 renaming.
6305 (%union): Having several members with the same type does not help
6306 type mismatches, simplify.
6307 (YYPRINT, yyprint): New.
6308 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
6309 (skel_error): this.
6310 Handle locations.
6311 * src/scan-skel.l: Adjust to these changes.
6312 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
6313 (LOCATION_PRINT, skel_control_t): New.
6314
6315 2001-12-30 Akim Demaille <akim@epita.fr>
6316
6317 * src/parse-skel.y: Get rid of the shift/reduce conflict:
6318 replace `gb' with BLANKS.
6319 * src/scan-skel.l: Adjust.
6320
6321 2001-12-30 Akim Demaille <akim@epita.fr>
6322
6323 * src/system.h: We don't need nor want bcopy.
6324 Throw away MS-DOS crap: we don't need getpid.
6325 * configure.in: We don't need strndup. It was even causing
6326 problems: because Flex includes the headers *before* us,
6327 _GNU_SOURCE is not defined by config.h, and therefore strndup was
6328 not visible.
6329 * lib/xstrndup.c: New.
6330 * src/scan-skel.l: Use it.
6331 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
6332 * src/parse-skel.y: Use %directives instead of #defines.
6333
6334 2001-12-30 Akim Demaille <akim@epita.fr>
6335
6336 * src/skeleton.h: New.
6337 * src/output.c (output_parser, output_master_parser): Remove, dead
6338 code.
6339 * src/output.h (get_lines_number, actions_output, guards_output)
6340 (token_definitions_output): Prototype them.
6341 * src/parse-skel.y: Add the license notice.
6342 Include output.h and skeleton.h.
6343 (process_skeleton): Returns void, and takes a single parameter.
6344 * src/scan-skel.l: Add the license notice.
6345 Include skeleton.h.
6346 Don't use %option yylineno: it seems that then Flex imagines
6347 REJECT has been used, and therefore it won't reallocate its
6348 buffers (which makes no other sense to me than a bug). It results
6349 in warnings for `unused: yy_flex_realloc'.
6350
6351 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
6352
6353 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6354 (MUSCLE_INSERT_PREFIX): ...to there.
6355 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
6356 (MUSCLE_INSERT_PREFIX): Move from here...
6357
6358 * src/bison.hairy: Add a section directive. Put braces around muscle
6359 names. This parser skeleton is still broken, but Bison should not
6360 choke on a bad muscle 'syntax'.
6361 * src/bison.simple: Add a section directive. Put braces around muscle
6362 names.
6363
6364 * src/files.h (strsuffix, stringappend): Add declarations.
6365 (tab_extension): Add declaration.
6366 (short_base_name): Add declaration.
6367
6368 * src/files.c (strsuffix, stringappend): No longer static. These
6369 functions are used in the skeleton parser.
6370 (tab_extension): New.
6371 (compute_base_names): Use the computations done in this function
6372 to guess if the generated parsers should have '.tab' in their
6373 names.
6374 (short_base_name): No longer static.
6375
6376 * src/output.c (output_skeleton): New.
6377 (output): Disable call to output_master_parser, and give a try to
6378 a new skeleton handling system.
6379 (guards_output, actions_output): No longer static.
6380 (token_definitions_output, get_lines_number): No longer static.
6381
6382 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
6383
6384 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
6385 parse-skel.y.
6386
6387 * src/parse-skel.y: New file.
6388 * src/scan-skel.l: New file.
6389
6390 2001-12-29 Akim Demaille <akim@epita.fr>
6391
6392 %name-prefix is broken.
6393
6394 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
6395 Adjust all dependencies.
6396 * tests/headers.at (export YYLTYPE): Strengthen this test: use
6397 %name-prefix.
6398
6399 Renaming yylval but not yylloc is not consistent. Now we do.
6400
6401 * src/bison.simple: Prefix yylloc if used.
6402 * doc/bison.texinfo (Decl Summary): Document that.
6403
6404 2001-12-29 Akim Demaille <akim@epita.fr>
6405
6406 * doc/bison.texinfo: Promote `%long-directive' over
6407 `%long_directive'.
6408 Remove all references to fixed-output-files, yacc is enough.
6409
6410 2001-12-29 Akim Demaille <akim@epita.fr>
6411
6412 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
6413 user prologue. These are defaults.
6414 * tests/actions.at (Mid-rule actions): Make sure the user can
6415 define YYDEBUG and YYERROR_VERBOSE.
6416
6417 2001-12-29 Akim Demaille <akim@epita.fr>
6418
6419 * src/output.c (header_output): Don't forget to export YYLTYPE and
6420 yylloc.
6421 * tests/headers.at (export YYLTYPE): New, make sure it does.
6422 * tests/regression.at (%union and --defines, Invalid CPP headers):
6423 Move to...
6424 * tests/headers.at: here.
6425
6426 2001-12-29 Akim Demaille <akim@epita.fr>
6427
6428 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
6429
6430 2001-12-29 Akim Demaille <akim@epita.fr>
6431
6432 * tests/actions.at (Mid-rule actions): Output on a single line
6433 instead of several.
6434
6435 2001-12-29 Akim Demaille <akim@epita.fr>
6436
6437 * doc/bison.texinfo: Formatting changes.
6438
6439 2001-12-29 Akim Demaille <akim@epita.fr>
6440
6441 Don't store the token defs in a muscle, just be ready to output it
6442 on command. Now possible via `symbols'. Fixes a memory leak.
6443
6444 * src/output.c (token_definitions_output): New.
6445 (output_parser, header_output): Use it.
6446 * src/reader.c (symbols_save): Remove.
6447
6448 2001-12-29 Akim Demaille <akim@epita.fr>
6449
6450 * src/bison.simple: Do not provide a default for YYSTYPE and
6451 YYLTYPE before the user's prologue. Otherwise it's hardly... a
6452 default.
6453
6454 2001-12-29 Akim Demaille <akim@epita.fr>
6455
6456 Mid-rule actions are simply... ignored!
6457
6458 * src/reader.c (readgram): Be sure to attach mid-rule actions to
6459 the empty-rule associated to the dummy symbol, not to the host
6460 rule.
6461 * tests/actions.at (Mid-rule actions): New.
6462
6463 2001-12-29 Akim Demaille <akim@epita.fr>
6464
6465 Memory leak.
6466
6467 * src/reader.c (reader): Free grammar.
6468
6469 2001-12-29 Akim Demaille <akim@epita.fr>
6470
6471 Memory leak.
6472
6473 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
6474 since it allocates it for each state, although only one is needed.
6475 (allocate_storage): Do it here.
6476
6477 2001-12-29 Akim Demaille <akim@epita.fr>
6478
6479 * src/options.h, src/options.c (create_long_option_table): Rename
6480 as...
6481 (long_option_table_new): this, with a clearer prototype.
6482 (percent_table): Remove, unused,
6483 * src/getargs.c (getargs): Adjust.
6484
6485 2001-12-29 Akim Demaille <akim@epita.fr>
6486
6487 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
6488 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
6489 as states.
6490
6491 2001-12-29 Akim Demaille <akim@epita.fr>
6492
6493 * src/lalr.c (build_relations): Rename `states' as `states1'.
6494 Sorry, I don't understand exactly what it is, no better name...
6495
6496 2001-12-29 Akim Demaille <akim@epita.fr>
6497
6498 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
6499 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
6500 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
6501 as rules.
6502
6503 2001-12-29 Akim Demaille <akim@epita.fr>
6504
6505 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
6506 ago.
6507
6508 2001-12-29 Akim Demaille <akim@epita.fr>
6509
6510 * src/reader.c, src/reader.h (user_toknums): Remove.
6511 Adjust all users to use symbols[i]->user_token_number.
6512
6513 2001-12-29 Akim Demaille <akim@epita.fr>
6514
6515 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
6516 Adjust all users to use symbols[i]->prec or ->assoc.
6517
6518 2001-12-29 Akim Demaille <akim@epita.fr>
6519
6520 * src/reader.c, src/reader.h (tags): Remove.
6521 Adjust all users to use symbols[i]->tag.
6522
6523 2001-12-29 Akim Demaille <akim@epita.fr>
6524
6525 * src/gram.h, src/gram.c (symbols): New, similar to state_table
6526 and rule_table.
6527 * src/reader.c (packsymbols): Fill this table.
6528 Drop sprec.
6529 * src/conflicts.c (resolve_sr_conflict): Adjust.
6530 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
6531 single table.
6532 Use symbols[i]->tag instead of tags[i].
6533
6534 2001-12-29 Akim Demaille <akim@epita.fr>
6535
6536 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
6537 In addition, put a comment in there, to replace...
6538 * tests/regression.at (%union and C comments): Remove.
6539
6540 2001-12-29 Akim Demaille <akim@epita.fr>
6541
6542 * tests/regression.at (Web2c Actions): Blindly move the actual
6543 output as expected output. The contents *seem* right to me, but I
6544 can't pretend reading perfectly parser tables... Nonetheless, all
6545 the other tests pass correctly, the table look OK, even though the
6546 presence of `$axiom' is to be noted: AFAICS it is useless (but
6547 harmless).
6548
6549 2001-12-29 Akim Demaille <akim@epita.fr>
6550
6551 * src/reader.c (readgram): Don't add the rule 0 if there were no
6552 rules read. In other words, add it _after_ having performed
6553 grammar sanity checks.
6554 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
6555
6556 2001-12-29 Akim Demaille <akim@epita.fr>
6557
6558 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
6559 visible, and some states have now a different number.
6560
6561 2001-12-29 Akim Demaille <akim@epita.fr>
6562
6563 * src/reader.c (readgram): Bind the initial rule's lineno to that
6564 of the first rule.
6565 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
6566 (Solved SR Conflicts): Adjust rule 0's line number.
6567
6568 2001-12-29 Akim Demaille <akim@epita.fr>
6569
6570 Fix the `GAWK Grammar' failure.
6571
6572 * src/LR0.c (final_state): Initialize to -1 so that we do compute
6573 the reductions of the first state which was mistakenly confused
6574 with the final state because precisely final_state was initialized
6575 to 0.
6576 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
6577 now noticed by Bison.
6578 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
6579 have a reduction on $default.
6580
6581 2001-12-29 Akim Demaille <akim@epita.fr>
6582
6583 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
6584 rule line numbers.
6585 * src/closure.c (print_closure): Likewise.
6586 * src/derives.c (print_derives): Likewise.
6587 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
6588 now.
6589
6590 2001-12-29 Akim Demaille <akim@epita.fr>
6591
6592 * src/lalr.c (lookaheads_print): New.
6593 (lalr): Call it when --trace-flag.
6594 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
6595 are dumped.
6596
6597 2001-12-29 Akim Demaille <akim@epita.fr>
6598
6599 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
6600 when walking through ritem, even via rule->rhs.
6601 * src/reduce.c (dump_grammar, useful_production, reduce_output)
6602 (useful_production, useless_nonterminals): Likewise.
6603 (reduce_grammar_tables): Likewise, plus update nritems.
6604 * src/nullable.c (set_nullable): Likewise.
6605 * src/lalr.c (build_relations): Likewise.
6606 * tests/sets.at (Nullable): Adjust.
6607 Fortunately, now, the $axiom is no longer nullable.
6608
6609 2001-12-29 Akim Demaille <akim@epita.fr>
6610
6611 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
6612 the 0-sentinel.
6613 * src/gram.c (ritem_longest_rhs): Likewise.
6614 * src/reduce.c (nonterminals_reduce): Likewise.
6615 * src/print_graph.c (print_graph): Likewise.
6616 * src/output.c (output_rule_data): Likewise.
6617 * src/nullable.c (set_nullable): Likewise.
6618
6619 2001-12-29 Akim Demaille <akim@epita.fr>
6620
6621 * src/output.c: Comment changes.
6622
6623 2001-12-27 Paul Eggert <eggert@twinsun.com>
6624
6625 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
6626 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
6627 Sparc, as they were causing more porting problems than the
6628 (minor) performance improvement was worth.
6629
6630 Also, catch up with 1.31's YYSTD.
6631
6632 2001-12-27 Akim Demaille <akim@epita.fr>
6633
6634 * src/output.c (output_gram): Rely on nritems, not the
6635 0-sentinel. See below.
6636 Use -1 as separator, not 0.
6637 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
6638 Rely on -1 as separator in yyrhs, instead of 0.
6639 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
6640 twice `Now at end of input', therefore there are two lines less to
6641 expect.
6642
6643 2001-12-27 Akim Demaille <akim@epita.fr>
6644
6645 * tests/regression.at (Unresolved SR Conflicts):
6646 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
6647 below.
6648
6649 2001-12-27 Akim Demaille <akim@epita.fr>
6650
6651 * src/LR0.c (new_state): Recognize the final state by the fact it
6652 is reached by eoftoken.
6653 (insert_start_shifting_state, insert_eof_shifting_state)
6654 (insert_accepting_state, augment_automaton): Remove, since now
6655 these states are automatically computed from the initial state.
6656 (generate_states): Adjust.
6657 * src/print.c: When reporting a rule number to the user, substract
6658 1, so that the axiom rule is rule 0, and the first user rule is 1.
6659 * src/reduce.c: Likewise.
6660 * src/print_graph.c (print_core): For the time being, just as for
6661 the report, depend upon --trace-flags to dump the full set of
6662 items.
6663 * src/reader.c (readgram): Once the grammar read, insert the rule
6664 0: `$axiom: START-SYMBOL $'.
6665 * tests/set.at: Adjust: rule 0 is now displayed, and since the
6666 number of the states has changed (the final state is no longer
6667 necessarily the last), catch up.
6668
6669 2001-12-27 Akim Demaille <akim@epita.fr>
6670
6671 Try to make the use of the eoftoken valid. Given that its value
6672 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
6673 is used instead of > 0 where appropriate, (ii), depend upon nritems
6674 instead of the 0-sentinel.
6675
6676 * src/gram.h, src/gram.c (nritems): New.
6677 Expected to be duplication of nitems, but for the time being...
6678 * src/reader.c (packgram): Assert nritems and nitems are equal.
6679 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
6680 * src/closure.c (print_closure, print_fderives): Likewise.
6681 * src/gram.c (ritem_print): Likewise.
6682 * src/print.c (print_core, print_grammar): Likewise.
6683 * src/print_graph.c: Likewise.
6684
6685 2001-12-27 Akim Demaille <akim@epita.fr>
6686
6687 * src/main.c (main): If there are complains after grammar
6688 reductions, then output the report anyway if requested, then die.
6689 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
6690 * src/reader.c (eoftoken): New.
6691 (parse_token_decl): If the token being defined has value `0', it
6692 is the eoftoken.
6693 (packsymbols): No longer hack `tags' to insert `$' by hand.
6694 Be sure to preserve the value of the eoftoken.
6695 (reader): Make sure eoftoken is defined.
6696 Initialize nsyms to 0: now eoftoken is created just like the others.
6697 * src/print.c (print_grammar): Don't special case the eof token.
6698 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
6699 lie anyway, albeit pleasant.
6700 * tests/calc.at: Exercise error messages with eoftoken.
6701 Change the grammar so that empty input is invalid.
6702 Adjust expectations.
6703 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
6704
6705 2001-12-27 Akim Demaille <akim@epita.fr>
6706
6707 * configure.in: Check the protos of strchr ans strspn.
6708 Replace strchr if needed.
6709 * src/system.h: Provide the protos of strchr, strspn and memchr if
6710 missing.
6711 * lib/strchr.c: New.
6712 * src/reader.c (symbols_save): Use strchr.
6713
6714 2001-12-27 Akim Demaille <akim@epita.fr>
6715
6716 * src/print.c, src/print_graph.c (escape): New.
6717 Use it to quote the TAGS outputs.
6718 * src/print_graph.c (print_state): Now errors are in red, and
6719 reductions in green.
6720 Prefer high to wide: output the state number on a line of its own.
6721
6722 2001-12-27 Akim Demaille <akim@epita.fr>
6723
6724 * src/state.h, src/state.c (reductions_new): New.
6725 * src/LR0.c (set_state_table): Let all the states have a
6726 `reductions', even if reduced to 0.
6727 (save_reductions): Adjust.
6728 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
6729 * src/print.c (print_reductions, print_actions): Adjust.
6730 * src/output.c (action_row): Adjust.
6731
6732 2001-12-27 Akim Demaille <akim@epita.fr>
6733
6734 * src/state.h, src/state.c (errs_new, errs_dup): New.
6735 * src/LR0.c (set_state_table): Let all the states have an errs,
6736 even if reduced to 0.
6737 * src/print.c (print_errs, print_reductions): Adjust.
6738 * src/output.c (output_actions, action_row): Adjust.
6739 * src/conflicts.c (resolve_sr_conflict): Adjust.
6740
6741 2001-12-27 Akim Demaille <akim@epita.fr>
6742
6743 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
6744
6745 2001-12-27 Akim Demaille <akim@epita.fr>
6746
6747 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
6748 * src/print.c: here.
6749 (lookaheadset, shiftset): New, used as additional storage by
6750 print_reductions.
6751 (print_results): Adjust.
6752 (print_shifts, print_gotos, print_errs): New, extracted from...
6753 (print_actions): here.
6754 * src/print_graph.c (print_actions): Remove dead code.
6755
6756 2001-12-27 Akim Demaille <akim@epita.fr>
6757
6758 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
6759 `$n' and `@n'.
6760
6761 2001-12-27 Akim Demaille <akim@epita.fr>
6762
6763 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
6764 (build_relations): Adjust.
6765
6766 2001-12-27 Akim Demaille <akim@epita.fr>
6767
6768 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
6769 duplication.
6770
6771 2001-12-27 Akim Demaille <akim@epita.fr>
6772
6773 * src/reader.c (packgram): Catch nitems overflows.
6774
6775 2001-12-27 Akim Demaille <akim@epita.fr>
6776
6777 * src/files.c, src/files.h (guard_obstack): Remove.
6778 * src/output.c (output): Adjust.
6779 * src/reader.c (parse_braces): New, factoring...
6780 (copy_action, copy_guard): these two which are renamed as...
6781 (parse_action, parse_guard): these.
6782 As a voluntary consequence, using braces around guards is now
6783 mandatory.
6784
6785 2001-12-27 Akim Demaille <akim@epita.fr>
6786
6787 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
6788 * src/reader.c (symbol_list): `guard' and `guard_line' are new
6789 members.
6790 (symbol_list_new): Adjust.
6791 (copy_action): action_line is the first line, not the last.
6792 (copy_guard): Just as for actions, store the `action' only, not
6793 the switch/case/break flesh.
6794 Don't parse the user action that might follow the guard, let...
6795 (readgram): do it, i.e., now, there can be an action after a
6796 guard.
6797 In other words the guard is just explicitly optional.
6798 (packgram): Adjust.
6799 * src/output.c (guards_output): New.
6800 (output_parser): Call it when needed.
6801 (output): Also free the guard and attrs obstacks.
6802 * src/files.c, src/files.h (obstack_save): Remove.
6803 (output_files): Remove.
6804 As a result, if one needs the former `.act' file, using an
6805 appropriate skeleton which requires actions and guards is now
6806 required.
6807 * src/main.c (main): Adjust.
6808 * tests/semantic.at: New.
6809 * tests/regression.at: Use `input.y' as input file name.
6810 Avoid 8+3 problems by requiring input.c when the test needs the
6811 parser.
6812
6813 2001-12-27 Akim Demaille <akim@epita.fr>
6814
6815 * src/reader.c (symbol_list_new): Be sure to initialize all the
6816 fields.
6817
6818 2001-12-27 Akim Demaille <akim@epita.fr>
6819
6820 All the hacks using a final pseudo state are now useless.
6821
6822 * src/LR0.c (set_state_table): state_table holds exactly nstates.
6823 * src/lalr.c (nLA): New.
6824 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
6825 instead of lookaheadsp from the pseudo state (nstate + 1).
6826
6827 2001-12-27 Akim Demaille <akim@epita.fr>
6828
6829 * src/output.c (action_row, token_actions): Use a state_t instead
6830 of a integer, and nlookaheads instead of the following state's
6831 lookaheadsp.
6832
6833 2001-12-27 Akim Demaille <akim@epita.fr>
6834
6835 * src/conflicts.c (log_resolution, flush_shift)
6836 (resolve_sr_conflict, set_conflicts, solve_conflicts)
6837 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
6838 (conflicts_print, print_reductions): Use a state_t instead of an
6839 integer when referring to a state.
6840 As much as possible, depend upon nlookaheads, instead of the
6841 `lookaheadsp' member of the following state (since lookaheads of
6842 successive states are successive, the difference between state n + 1
6843 and n served as the number of lookaheads for state n).
6844 * src/lalr.c (add_lookback_edge): Likewise.
6845 * src/print.c (print_core, print_actions, print_state)
6846 (print_results): Likewise.
6847 * src/print_graph.c (print_core, print_actions, print_state)
6848 (print_graph): Likewise.
6849 * src/conflicts.h: Adjust.
6850
6851 2001-12-27 Akim Demaille <akim@epita.fr>
6852
6853 * src/bison.hairy: Formatting/comment changes.
6854 ANSIfy.
6855 Remove `register' indications.
6856 Add plenty of `static'.
6857
6858 2001-12-27 Akim Demaille <akim@epita.fr>
6859
6860 * src/output.c (prepare): Drop the muscle `ntbase' which
6861 duplicates ntokens.
6862 * src/bison.simple: Formatting/comment changes.
6863 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6864 is an undocumented synonym.
6865
6866 2001-12-22 Akim Demaille <akim@epita.fr>
6867
6868 * src/output.c (output_table_data): Change the prototype to use
6869 `int' for array ranges: some invocations do pass an int, not a
6870 short.
6871 Reported by Wayne Green.
6872
6873 2001-12-22 Akim Demaille <akim@epita.fr>
6874
6875 Some actions of web2c.y are improperly triggered.
6876 Reported by Mike Castle.
6877
6878 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6879 * tests/regression.at (Web2c): Rename as...
6880 (Web2c Report): this.
6881 (Web2c Actions): New.
6882
6883 2001-12-22 Akim Demaille <akim@epita.fr>
6884
6885 Reductions in web2c.y are improperly reported.
6886 Reported by Mike Castle.
6887
6888 * src/conflicts.c (print_reductions): Fix.
6889 * tests/regression.at (Web2c): New.
6890
6891 2001-12-18 Akim Demaille <akim@epita.fr>
6892
6893 Some host fail on `assert (!"foo")', which expands to
6894 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6895 Reported by Nelson Beebee.
6896
6897 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6898 `#define it_succeeded 0' and `assert (it_succeeded)'.
6899
6900 2001-12-17 Marc Autret <autret_m@epita.fr>
6901
6902 * src/bison.simple: Don't hard code the skeleton line and filename.
6903 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6904 New line counter 'skeleton_line' (skeleton-line muscle).
6905
6906 2001-12-17 Paul Eggert <eggert@twinsun.com>
6907
6908 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6909 YYDEBUG must be defined to a nonzero value.
6910
6911 * src/bison.simple (yytname): Do not assume that the user defines
6912 YYDEBUG to a properly parenthesized expression.
6913
6914 2001-12-17 Akim Demaille <akim@epita.fr>
6915
6916 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6917 nlookaheads is a new member.
6918 Adjust all users.
6919 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6920 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6921 state.
6922
6923 2001-12-17 Akim Demaille <akim@epita.fr>
6924
6925 * src/files.h, src/files.c (open_files, close_files): Remove.
6926 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6927 let...
6928 * src/reader.c (reader): Do it.
6929
6930 2001-12-17 Akim Demaille <akim@epita.fr>
6931
6932 * src/conflicts.c (print_reductions): Formatting changes.
6933
6934 2001-12-17 Akim Demaille <akim@epita.fr>
6935
6936 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6937 (flush_reduce): New.
6938 (resolve_sr_conflict): Adjust.
6939
6940 2001-12-17 Akim Demaille <akim@epita.fr>
6941
6942 * src/output.c (output_obstack): Be static and rename as...
6943 (format_obstack): this, to avoid any confusion with files.c's
6944 output_obstack.
6945 * src/reader.h (muscle_obstack): Move to...
6946 * src/output.h: here, since it's defined in output.c.
6947
6948 2001-12-17 Akim Demaille <akim@epita.fr>
6949
6950 * src/output.c (action_row, save_column, default_goto)
6951 (sort_actions, matching_state, pack_vector): Better variable
6952 locality.
6953
6954 2001-12-17 Akim Demaille <akim@epita.fr>
6955
6956 * src/output.c: Various formatting changes.
6957
6958 2001-12-17 Akim Demaille <akim@epita.fr>
6959
6960 * src/files.c (output_files): Free the output_obstack.
6961 * src/main.c (main): Call print and print_graph conditionally.
6962 * src/print.c (print): Work unconditionally.
6963 * src/print_graph.c (print_graph): Work unconditionally.
6964 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6965
6966 2001-12-16 Marc Autret <autret_m@epita.fr>
6967
6968 * src/output.c (actions_output): Fix. When we use %no-lines,
6969 there is one less line per action.
6970
6971 2001-12-16 Marc Autret <autret_m@epita.fr>
6972
6973 * src/bison.simple: Remove a useless #line directive.
6974 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6975 * src/output.c (get_lines_number): New.
6976 (output_parser): Adjust, now takes care about the lines of a
6977 output muscles.
6978 Fix line numbering.
6979 (actions_output): Computes the number of lines taken by actions.
6980 (output_master_parser): Insert new skeleton which is the name of
6981 the output parser file name.
6982
6983 2001-12-15 Marc Autret <autret_m@epita.fr>
6984
6985 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6986
6987 2001-12-15 Marc Autret <autret_m@epita.fr>
6988
6989 * src/output.c (output_gram): Keep track of the hairy one.
6990
6991 2001-12-15 Akim Demaille <akim@epita.fr>
6992
6993 Make `make distcheck' work.
6994
6995 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6996 system.h which uses libgettext.h.
6997
6998 2001-12-15 Akim Demaille <akim@epita.fr>
6999
7000 * src/nullable.c (set_nullable): Useless rules must be skipped,
7001 otherwise, since we range over their symbols, we might look at a
7002 nonterminal which no longer ``exists'', i.e., it is not counted in
7003 `nvars', hence we overflow our arrays.
7004
7005 2001-12-15 Akim Demaille <akim@epita.fr>
7006
7007 The header can also be produced directly, without any obstack!
7008 Yahoo!
7009
7010 * src/files.c, src/files.h (defines_obstack): Remove.
7011 (compute_header_macro): Global.
7012 (defines_obstack_save): Remove.
7013 * src/reader.c (parse_union_decl): No longer output to
7014 defines_obstack: its content can be found in the `stype' muscle
7015 anyway.
7016 (output_token_translations): Merge into...
7017 (symbols_output): this.
7018 Rename as...
7019 (symbols_save): this.
7020 (reader): Adjust.
7021 * src/output.c (header_output): New.
7022 (output): Call it.
7023
7024 2001-12-15 Akim Demaille <akim@epita.fr>
7025
7026 * src/reader.c (parse_union_decl): Instead of handling two obstack
7027 simultaneously, use one to define the `stype' muscle, and use the
7028 value of the latter to fill defines_obstack.
7029 (copy_comment): Remove.
7030 (copy_comment2): Work for a single obstack.
7031 Rename as...
7032 (copy_comment): this.
7033
7034 2001-12-15 Akim Demaille <akim@epita.fr>
7035
7036 * src/lex.c, src/lex.h (xgetc): No longer static.
7037 * src/reader.c (parse_union_decl): Revamp.
7038
7039 2001-12-15 Akim Demaille <akim@epita.fr>
7040
7041 Still making progress in separating Bison into (i) input, (ii)
7042 process, (iii) output: now we can directly output the parser file
7043 without using table_obstack at all.
7044
7045 * src/files.c, src/files.h (table_obstack): Bye bye.
7046 (parser_file_name): New.
7047 * src/files.c (compute_output_file_names): Compute it.
7048 * src/output.c (actions_output, output_parser)
7049 (output_master_parser): To a file instead of an obstack.
7050
7051 2001-12-15 Akim Demaille <akim@epita.fr>
7052
7053 Attach actions to rules, instead of pre-outputting them to
7054 actions_obstack.
7055
7056 * src/gram.h (rule_t): action and action_line are new members.
7057 * src/reader.c (symbol_list): Likewise.
7058 (copy_action): Save the actions within the rule.
7059 (packgram): Save them in rule_table.
7060 * src/output.c (actions_output): New.
7061 (output_parser): Use it on `%%actions'.
7062 (output_rule_data): Don't free rule_table.
7063 (output): Do it.
7064 (prepare): Don't save the `action' muscle.
7065 * src/bison.simple: s/%%action/%%actions/.
7066
7067 2001-12-15 Akim Demaille <akim@epita.fr>
7068
7069 * src/reader.c (copy_action): When --yacc, don't append a `;'
7070 to the user action: let it fail if lacking.
7071 Suggested by Arnold Robbins and Tom Tromey.
7072
7073 2001-12-14 Akim Demaille <akim@epita.fr>
7074
7075 * src/lex.c (literalchar): Simply return the char you decoded, non
7076 longer mess around with obstacks and int pointers.
7077 Adjust all callers.
7078
7079 2001-12-14 Akim Demaille <akim@epita.fr>
7080
7081 * src/lex.c (literalchar): Don't escape the special characters,
7082 just decode them, and keep them as char (before, eol was output as
7083 the 2 char string `\n' etc.).
7084 * src/output.c (output_rule_data): Use quotearg to output the
7085 token strings.
7086
7087 2001-12-13 Paul Eggert <eggert@twinsun.com>
7088
7089 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
7090 Do not infringe on the global user namespace when using C++.
7091 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
7092 All uses of `fprintf' and `stderr' changed.
7093
7094 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
7095
7096 2001-12-13 Akim Demaille <akim@epita.fr>
7097
7098 The computation of nullable is broken: it doesn't handle empty
7099 RHS's properly.
7100
7101 * tests/torture.at (GNU AWK Grammar): New.
7102 * tests/sets.at (Nullable): New.
7103 * src/nullable.c (set_nullable): Instead of blindly looping over
7104 `ritems', loop over the rules, and then over their rhs's.
7105
7106 Work around Autotest bugs.
7107
7108 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
7109 frame, because Autotest understand lines starting with a `+' as
7110 traces from the shell. Then, they are not processed properly.
7111 Admittedly an Autotest bug, but we don't have time to wait for
7112 Autotest to catch up.
7113 * tests/regression.at (Broken Closure): Adjust to the new table
7114 frames.
7115 Move to...
7116 * tests/sets.at: here.
7117
7118 2001-12-13 Akim Demaille <akim@epita.fr>
7119
7120 * src/closure.c (closure): Use nrules instead of playing tricks
7121 with BITS_PER_WORD.
7122
7123 2001-12-13 Akim Demaille <akim@epita.fr>
7124
7125 * src/print.c (print_actions): Output the handling of `$' as the
7126 traces do: shifting the token EOF. Before EOF was treated as a
7127 nonterminal.
7128 * tests/regression.at: Adjust some tests.
7129 * src/print_graph.c (print_core): Complete the set of items via
7130 closure. The next-to-final and final states are still unsatisfying,
7131 but that's to be addressed elsewhere.
7132 No longer output the rule numbers, but do output the state number.
7133 A single loop for the shifts + gotos is enough, but picked a
7134 distinct color for each.
7135 (print_graph): Initialize and finalize closure.
7136
7137 2001-12-13 Akim Demaille <akim@epita.fr>
7138
7139 * src/reader.c (readgram): Remove dead code, an strip useless
7140 braces.
7141 (get_type): Remove, unused.
7142
7143 2001-12-12 Akim Demaille <akim@epita.fr>
7144
7145 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
7146 on that of lib/error.c.
7147
7148 2001-12-12 Akim Demaille <akim@epita.fr>
7149
7150 Some hosts don't like `/' in includes.
7151
7152 * src/system.h: Include libgettext.h without qualifying the path.
7153 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
7154 $(top_srcdir).
7155
7156 2001-12-11 Marc Autret <autret_m@epita.fr>
7157
7158 * src/output.c (output_parser): Remove useless muscle.
7159
7160 2001-12-11 Marc Autret <autret_m@epita.fr>
7161
7162 * src/bison.simple: Remove #line just before %%epilogue. It
7163 is now handled in ...
7164 * src/reader.c (read_additionnal_code): Add the output of a
7165 #line for the epilogue.
7166
7167 2001-12-10 Marc Autret <autret_m@epita.fr>
7168
7169 * src/reader.c (copy_definition): Re-use CPP-outed code which
7170 replace precedent remove.
7171 * src/bison.simple: Remove #line before %%prologue because
7172 %%input-line is wrong at this time.
7173
7174 2001-12-10 Marc Autret <autret_m@epita.fr>
7175
7176 * src/reader.c (symbols_output): Clean up.
7177 * src/output.c (output_gram, output): Clean up.
7178
7179 2001-12-10 Akim Demaille <akim@epita.fr>
7180
7181 * src/lalr.c (initialize_lookaheads): New. Extracted from...
7182 * src/LR0.c (set_state_table): here.
7183 * src/lalr.c (lalr): Call it.
7184
7185 2001-12-10 Akim Demaille <akim@epita.fr>
7186
7187 * src/state.h (shifts): Remove the `number' member: shifts are
7188 attached to state, hence no longer need to be labelled with a
7189 state number.
7190
7191 2001-12-10 Akim Demaille <akim@epita.fr>
7192
7193 Now that states have a complete set of members, the linked list of
7194 shifts is useless: just fill directly the state's shifts member.
7195
7196 * src/state.h (shifts): Remove the `next' member.
7197 * src/LR0.c (first_state, last_state): Remove.
7198 Adjust the callers.
7199 (augment_automaton): Don't look for the shifts that must be added
7200 a shift on EOF: it is those of the state we looked for! But now,
7201 since shifts are attached, it is no longer needed to looking
7202 merely by its id: its number.
7203
7204 2001-12-10 Akim Demaille <akim@epita.fr>
7205
7206 * src/LR0.c (augment_automaton): Better variable locality.
7207 Remove an impossible branch: if there is a state corresponding to
7208 the start symbol being shifted, then there is shift for the start
7209 symbol from the initial state.
7210
7211 2001-12-10 Akim Demaille <akim@epita.fr>
7212
7213 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
7214 only when appropriate: when insert_start_shifting_state' is not
7215 invoked.
7216 * tests/regression.at (Rule Line Numbers): Adjust.
7217
7218 2001-12-10 Akim Demaille <akim@epita.fr>
7219
7220 * src/LR0.c (augment_automaton): Now that all states have shifts,
7221 merge the two cases addition shifts to the initial state.
7222
7223 2001-12-10 Akim Demaille <akim@epita.fr>
7224
7225 * src/lalr.c (set_state_table): Move to...
7226 * src/LR0.c: here.
7227 * src/lalr.c (lalr): Don't call it...
7228 * src/LR0.c (generate_states): do it.
7229 * src/LR0.h (first_state): Remove, only the table is used.
7230
7231 2001-12-10 Akim Demaille <akim@epita.fr>
7232
7233 * src/LR0.h (first_shift, first_reduction): Remove.
7234 * src/lalr.c: Don't use first_shift: find shifts through the
7235 states.
7236
7237 2001-12-10 Akim Demaille <akim@epita.fr>
7238
7239 * src/LR0.c: Attach shifts to states as soon as they are
7240 computed.
7241 * src/lalr.c (set_state_table): Instead of assigning shifts to
7242 state, just assert that the mapping was properly done.
7243
7244 2001-12-10 Akim Demaille <akim@epita.fr>
7245
7246 * src/LR0.c (insert_start_shift): Rename as...
7247 (insert_start_shifting_state): this.
7248 (insert_eof_shifting_state, insert_accepting_state): New.
7249 (augment_automaton): Adjust.
7250 Better locality of the variables.
7251 When looking if the start_symbol is shifted from the initial
7252 state, using `while (... symbol != start_symbol ...)' sounds
7253 better than `while (... symbol < start_symbol ...)': If fail
7254 to see how the order between symbols could be relevant!
7255
7256 2001-12-10 Akim Demaille <akim@epita.fr>
7257
7258 * src/getargs.h: Don't declare `spec_name_prefix' and
7259 `spec_file_prefix', declared by src/files.h.
7260 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
7261 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
7262 * src/output.c (prepare): Adjust.
7263 * src/reader.c (symbols_output): Likewise.
7264 * src/vmsgetargs.c: Vaguely adjust, but who cares?
7265
7266 2001-12-10 Akim Demaille <akim@epita.fr>
7267
7268 * src/muscle_tab.c (muscle_init): NULL is a better default than
7269 `"0"'.
7270
7271 2001-12-10 Akim Demaille <akim@epita.fr>
7272
7273 * src/reader.c (reader): Calling symbols_output once is enough.
7274
7275 2001-12-10 Akim Demaille <akim@epita.fr>
7276
7277 Now that states have a complete set of members, the linked list of
7278 reductions is useless: just fill directly the state's reductions
7279 member.
7280
7281 * src/state.h (struct reductions): Remove member `number' and
7282 `next'.
7283 * src/LR0.c (first_reduction, last_reduction): Remove.
7284 (save_reductions): Don't link the new reductions, store them in
7285 this_state.
7286 * src/lalr.c (set_state_table): No need to attach reductions to
7287 states, it's already done.
7288 * src/output.c (output_actions): No longer free the shifts, then
7289 the reductions, then the states: free all the states and their
7290 members.
7291
7292 2001-12-10 Akim Demaille <akim@epita.fr>
7293
7294 * src/options.c (OPTN, DRTV, BOTH): New.
7295 (option_table): Use them.
7296
7297 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
7298 the job of system.h.
7299 * src/options.c: Don't include stdio.h and xalloc.h for the same
7300 reasons.
7301
7302 2001-12-10 Akim Demaille <akim@epita.fr>
7303
7304 * src/output.c (output, prepare): Make sure the values of the
7305 muscles `action' and `prologue' are 0-terminated.
7306
7307 2001-12-10 Akim Demaille <akim@epita.fr>
7308
7309 Clean up GCC warnings.
7310
7311 * src/reader.c (copy_action): `buf' is not used.
7312 (parse_skel_decl): Be static.
7313 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
7314 * src/options.h (create_long_option_table): Have a real prototype.
7315 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
7316 (hash_delete_at): Return const void *.
7317 Adjust casts to preserve the const.
7318
7319 2001-12-10 Akim Demaille <akim@epita.fr>
7320
7321 * configure.in: Require 2.52g.
7322 M4 is not needed, but AUTOM4TE is.
7323 * m4/m4.m4: Remove.
7324 * tests/Makefile.am: Adjust.
7325
7326 2001-12-10 Akim Demaille <akim@epita.fr>
7327
7328 One structure for states is enough, even though theoretically
7329 there are LR(0) states and LALR(1) states.
7330
7331 * src/lalr.h (state_t): Remove.
7332 (state_table): Be state_t **, not state_t *.
7333 * src/state.h (core, CORE_ALLOC): Rename as...
7334 (state_t, STATE_ALLOC): this.
7335 Add the LALR(1) members: shifts, reductions, errs.
7336 * src/LR0.c (state_table): Rename as...
7337 (state_hash): this, to avoid name clashes with the global
7338 `state_table'.
7339 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
7340 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
7341
7342 2001-12-10 Akim Demaille <akim@epita.fr>
7343
7344 Bison dumps core on bash.y.
7345 Reported by Pascal Bart.
7346
7347 * src/warshall.c (bitmatrix_print): New.
7348 (TC): Use it.
7349 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
7350 j must be the outer loop.
7351 * tests/regression.at (Broken Closure): New.
7352
7353 2001-12-05 Akim Demaille <akim@epita.fr>
7354
7355 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
7356 its argument.
7357 Reported by Peter Hamorsky.
7358
7359 2001-12-05 Akim Demaille <akim@epita.fr>
7360
7361 * src/conflicts.c (err_table): Remove.
7362 (resolve_sr_conflict): Adjust.
7363 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
7364 Rename as...
7365 (state_t.reductions, state_t.shifts): this.
7366
7367 2001-12-05 Akim Demaille <akim@epita.fr>
7368
7369 * src/reduce.c (reduce_grammar_tables): No longer disable the
7370 removal of useless rules via CPP but via `if (0)', so that the
7371 compiler still check the code is valid.
7372 For instance, it should have noticed `rline' no longer exists: use
7373 the `line' member of rule_t.
7374 * src/gram.c (dummy, rline): Remove, unused.
7375
7376 2001-12-05 Akim Demaille <akim@epita.fr>
7377
7378 * src/output.c (pack_vector): Use assert, not berror.
7379 * src/main.c (berror): Remove, unused.
7380
7381 2001-12-05 Akim Demaille <akim@epita.fr>
7382
7383 New experimental feature: if --verbose --trace output all the
7384 items of a state, not only its kernel.
7385
7386 * src/print.c (print_core): If `trace_flag', then invoke closure
7387 before outputting the items of the state (print_core is no longer
7388 a correct name them).
7389 (print_results): Invoke new_closure/free_closure if needed.
7390
7391 2001-12-05 Akim Demaille <akim@epita.fr>
7392
7393 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
7394 * src/closure.c, src/closure.h (itemsetsize): Rename as...
7395 (nitemset): for consistency with the rest of the project.
7396
7397 2001-12-05 Akim Demaille <akim@epita.fr>
7398
7399 * src/closure.c (print_closure): Improve.
7400 (closure): Use it for printing input and output.
7401
7402 2001-12-05 Akim Demaille <akim@epita.fr>
7403
7404 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
7405 indexed by nonterminals.
7406
7407 2001-12-05 Akim Demaille <akim@epita.fr>
7408
7409 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
7410 what it was!).
7411 * src/warshall.h: Remove accidental duplication of the content.
7412
7413 2001-12-05 Akim Demaille <akim@epita.fr>
7414
7415 * src/closure.c (set_fderives): De-obfuscate.
7416
7417 2001-12-05 Akim Demaille <akim@epita.fr>
7418
7419 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
7420
7421 2001-12-05 Akim Demaille <akim@epita.fr>
7422
7423 * src/closure.c (set_firsts): De-obfuscate.
7424
7425 2001-12-05 Akim Demaille <akim@epita.fr>
7426
7427 * src/output.c (action_row): De-obfuscate
7428 using the good o' techniques: arrays not pointers, variable
7429 locality, BITISSET, RESETBIT etc.
7430
7431 2001-12-05 Akim Demaille <akim@epita.fr>
7432
7433 Pessimize the code to simplify it: from now on, all the states
7434 have a valid SHIFTS, which NSHIFTS is possibly 0.
7435
7436 * src/LR0.c (shifts_new): Be global and move to..
7437 * src/state.c, src/state.h: here.
7438 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
7439 * src/print_graph: Adjust.
7440
7441 2001-12-05 Akim Demaille <akim@epita.fr>
7442
7443 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
7444 * src/conflicts.c: Use it.
7445 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
7446 incorrectly ``simplified''.
7447
7448 2001-12-05 Akim Demaille <akim@epita.fr>
7449
7450 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
7451 using the good o' techniques: arrays not pointers, variable
7452 locality, BITISSET, RESETBIT etc.
7453
7454 2001-12-05 Akim Demaille <akim@epita.fr>
7455
7456 * src/state.h (SHIFT_SYMBOL): New.
7457 * src/conflicts.c: Use it to deobfuscate.
7458
7459 2001-12-05 Akim Demaille <akim@epita.fr>
7460
7461 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
7462 (print_reductions): De-obfuscate using the good o' techniques:
7463 arrays not pointers, variable locality, BITISSET.
7464
7465 2001-12-05 Akim Demaille <akim@epita.fr>
7466
7467 * src/conflicts.c (print_reductions): Arrays, not pointers.
7468 Use BITISSET.
7469
7470 2001-12-05 Akim Demaille <akim@epita.fr>
7471
7472 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7473
7474 2001-12-05 Akim Demaille <akim@epita.fr>
7475
7476 * src/conflicts.c (print_reductions): Improve variable locality.
7477
7478 2001-12-05 Akim Demaille <akim@epita.fr>
7479
7480 * src/conflicts.c (print_reductions): Pessimize, but clarify.
7481
7482 2001-12-05 Akim Demaille <akim@epita.fr>
7483
7484 * src/conflicts.c (print_reductions): Improve variable locality.
7485
7486 2001-12-05 Akim Demaille <akim@epita.fr>
7487
7488 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
7489 * src/lalr.c: Use them.
7490
7491 2001-12-05 Akim Demaille <akim@epita.fr>
7492
7493 * src/LR0.c (augment_automaton): Formatting changes.
7494 Better variable locality.
7495
7496 2001-12-05 Akim Demaille <akim@epita.fr>
7497
7498 * src/lalr.c (matrix_print): New.
7499 (transpose): Use it.
7500 Use arrays instead of pointers.
7501
7502 2001-12-05 Akim Demaille <akim@epita.fr>
7503
7504 * src/lalr.c (maxrhs): Move to...
7505 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
7506 * src/lalr.c (build_relations): Adjust.
7507
7508 2001-12-05 Akim Demaille <akim@epita.fr>
7509
7510 * src/lalr.c (transpose): Free the memory allocated to the
7511 argument, as it is replaced by the results by the unique caller.
7512 (build_relations): Merely invoke transpose: it handles the memory
7513 deallocation.
7514 Improve variable locality.
7515 Avoid variables used as mere abbreviations.
7516 (compute_lookaheads): Use arrays instead of pointers.
7517
7518 2001-12-05 Akim Demaille <akim@epita.fr>
7519
7520 * src/lalr.c (initialize_F): Improve variable locality.
7521 Avoid variables used as mere abbreviations.
7522
7523 2001-12-05 Akim Demaille <akim@epita.fr>
7524
7525 * src/derives.c (print_derives): Display the ruleno.
7526 * src/lalr.c (initialize_F, transpose): Better variable locality
7527 to improve readability.
7528 Avoid variables used as mere abbreviations.
7529
7530 2001-12-05 Akim Demaille <akim@epita.fr>
7531
7532 * src/lalr.c (traverse): Use arrays instead of pointers.
7533
7534 2001-12-05 Akim Demaille <akim@epita.fr>
7535
7536 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
7537 the handling of squeue.
7538 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7539
7540 2001-12-05 Akim Demaille <akim@epita.fr>
7541
7542 Because useless nonterminals are now kept alive (instead of being
7543 `destroyed'), we now sometimes examine them, and store information
7544 related to them. Hence we need to know their number, and adjust
7545 memory allocations.
7546
7547 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
7548 static.
7549 * src/LR0.c (allocate_itemsets): The memory allocated to
7550 `symbol_count' was used for two different purpose: once to count
7551 the number of occurrences of each symbol, and later reassigned to
7552 `shift_symbol', containing the symbol that can be shifted from a
7553 given state.
7554 Deobfuscate, i.e., allocate, use and free `symbol_count' here
7555 only, and...
7556 (new_itemsets): Allocate `shift_symbol' here.
7557 (allocate_itemsets): symbol_count includes useless nonterminals.
7558 Make room for them.
7559 (free_storage): Use `free', not `XFREE', for pointers that cannot
7560 be null.
7561
7562 2001-12-05 Akim Demaille <akim@epita.fr>
7563
7564 * src/nullable.c (set_nullable): Deobfuscate the handling of
7565 ritem.
7566 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
7567
7568 2001-12-05 Akim Demaille <akim@epita.fr>
7569
7570 * src/gram.c, src/gram.h (ritem_print): New.
7571 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
7572 (This useless function was defined only to work around VMS linkers
7573 that can't handle compilation units with variables only).
7574 * src/reduce.c (dump_grammar): Use it to trace the construction of
7575 ritem.
7576
7577 2001-12-04 Paul Eggert <eggert@twinsun.com>
7578
7579 * src/bison.simple (union yyalloc): Change member names
7580 to be the same as the stack names.
7581 (yyparse): yyptr is now union yyalloc *, not char *.
7582 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
7583 and may generate better code on some machines.
7584 (yystpcpy): Use prototype if __STDC__ is defined, not just
7585 if __cplusplus is defined.
7586
7587 2001-11-30 Akim Demaille <akim@epita.fr>
7588
7589 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
7590 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
7591 Gettext doesn't compile cleanly, and dies with -Werror.
7592 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
7593 Include WARNING_CFLAGS here.
7594 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
7595 before being defined.
7596
7597 2001-11-27 Paul Eggert <eggert@twinsun.com>
7598
7599 * lib/quotearg.h (quotearg_n, quotearg_n_style):
7600 First arg is int, not unsigned.
7601 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
7602 (SIZE_MAX, UINT_MAX): New macros.
7603 (quotearg_n_options): Abort if N is negative.
7604 Avoid overflow check on hosts where size_t is 64 bits and int
7605 is 32 bits, as overflow is impossible there.
7606 Fix off-by-one typo that caused unnecessary reallocation.
7607
7608 2001-11-29 Paul Eggert <eggert@twinsun.com>
7609
7610 Name space cleanup in generated parser.
7611
7612 * doc/bison.texinfo (Bison Parser): Discuss system headers
7613 and their effect on the user name space.
7614
7615 * src/bison.simple:
7616 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
7617 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
7618 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
7619
7620 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
7621 on user names when possible.
7622
7623 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
7624 Simplify test for whather <alloca.h> exists.
7625
7626 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
7627
7628 (<stdio.h>): Include if YYDEBUG.
7629
7630 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
7631 ! defined (yyoverflow) && ! defined (yymemcpy).
7632
7633 (yymemcpy, yyparse): Rename local variables as needed so that
7634 they all begin with 'yy'.
7635
7636 (yystrlen, yystpcpy): New functions.
7637
7638 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
7639 All uses changed.
7640
7641 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
7642 instead of relying on string.h functions. Use YYSTACK_ALLOC
7643 and YYSTACK_FREE instead of malloc and free.
7644
7645 2001-11-30 Akim Demaille <akim@epita.fr>
7646
7647 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
7648 before their first uses.
7649 (YYBISON, YYPURE): Move to the top of the output.
7650
7651 2001-11-30 Akim Demaille <akim@epita.fr>
7652
7653 * tests/reduce.at (Useless Nonterminals): Fix.
7654
7655 2001-11-30 Akim Demaille <akim@epita.fr>
7656
7657 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
7658 if body instead of `;' to pacify GCC's warnings.
7659
7660 2001-11-30 Akim Demaille <akim@epita.fr>
7661
7662 Instead of mapping the LHS of unused rules to -1, keep the LHS
7663 valid, but flag the rules as invalid.
7664
7665 * src/gram.h (rule_t): `useful' is a new member.
7666 * src/print.c (print_grammar): Adjust.
7667 * src/derives.c (set_derives): Likewise.
7668 * src/reader.c (packgram, reduce_output): Likewise.
7669 * src/reduce.c (reduce_grammar_tables): Likewise.
7670 * tests/reduce.at (Underivable Rules, Useless Rules): New.
7671
7672 2001-11-30 Akim Demaille <akim@epita.fr>
7673
7674 * src/reduce.c (reduce_output): Formatting changes.
7675 * src/print.c (print_results, print_grammar): Likewise.
7676 * tests/regression.at (Rule Line Numbers)
7677 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
7678
7679 2001-11-30 Akim Demaille <akim@epita.fr>
7680
7681 * src/reduce.c (nonterminals_reduce): Instead of throwing away
7682 useless nonterminals, move them at the end of the symbol arrays.
7683 (reduce_output): Adjust.
7684 * tests/reduce.at (Useless Nonterminals): Adjust.
7685
7686 2001-11-30 Akim Demaille <akim@epita.fr>
7687
7688 * src/reduce.c: Various comment/formatting changes.
7689 (nonterminals_reduce): New, extracted from...
7690 (reduce_grammar_tables): here.
7691 (reduce_grammar): Call nonterminals_reduce.
7692
7693 2001-11-29 Paul Eggert <eggert@twinsun.com>
7694
7695 * src/bison.simple (YYSTACK_REALLOC): Remove.
7696 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
7697 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
7698 New macros.
7699 (union yyalloc): New type.
7700 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
7701 an arbitrary restriction on hosts where size_t is wider than int.
7702
7703 (yyparse): Don't dump core if alloca or malloc fails; instead, report
7704 a parser stack overflow. Allocate just one block of memory for all
7705 three stacks, instead of allocating three blocks; this typically is
7706 faster and reduces fragmentation.
7707
7708 Do not limit the number of items in the stack to a value that fits
7709 in 'int', as this is an arbitrary limit on hosts with 64-bit
7710 size_t and 32-bit int.
7711
7712 2001-11-29 Marc Autret <autret_m@epita.fr>
7713
7714 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
7715 of defining YYERROR_VERBOSE.
7716 [AT_DATA]: $4 is now out of C declarations in the prologue.
7717
7718 2001-11-28 Marc Autret <autret_m@epita.fr>
7719
7720 * src/reader.c (parse_dquoted_param): New.
7721 (parse_skel_decl): Use it.
7722 * src/lex.h: Add its prototype.
7723 * src/lex.c (literalchar): Become not static.
7724
7725 2001-11-28 Marc Autret <autret_m@epita.fr>
7726
7727 * src/output.h: And put its extern declaration here.
7728 * src/output.c (error_verbose): Define here.
7729 (prepare): Echo name modification.
7730 * src/getargs.h: Clean its extern declaration.
7731 * src/getargs.c (error_verbose_flag): Remove.
7732 (getargs): Remove case 'e'.
7733 * src/options.c (option_table): 'error-verbose' is now seen as simple
7734 percent option.
7735 Include output.h.
7736
7737 * src/reader.c (read_declarations): Remove case tok_include.
7738 (parse_include_decl): Remove.
7739 * src/lex.h (token_t): Remove tok_include.
7740 * src/options.c (option_table): 'include' is now a simple command line
7741 option.
7742
7743 2001-11-28 Marc Autret <autret_m@epita.fr>
7744
7745 * src/bison.simple: Adjust muscle names.
7746 * src/muscle_tab.c (muscle_init): Also rename the muscles.
7747 * src/output.c (prepare): s/_/-/ for the muscles names.
7748 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
7749
7750 2001-11-28 Marc Autret <autret_m@epita.fr>
7751
7752 * src/bison.simple: Fix debug.
7753 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
7754
7755 2001-11-28 Akim Demaille <akim@epita.fr>
7756
7757 * src/LR0.c (shifts_new): New.
7758 (save_shifts, insert_start_shift, augment_automaton): Use it.
7759
7760 2001-11-28 Akim Demaille <akim@epita.fr>
7761
7762 * src/closure.c (closure): `b' and `ruleno' denote the same value:
7763 keep ruleno only.
7764
7765 2001-11-28 Akim Demaille <akim@epita.fr>
7766
7767 * src/closure.c (closure): Instead of looping over word in array
7768 then bits in words, loop over bits in array.
7769
7770 2001-11-28 Akim Demaille <akim@epita.fr>
7771
7772 * src/closure.c (closure): No longer optimize the special case
7773 where all the bits of `ruleset[r]' are set to 0, to make the code
7774 clearer.
7775
7776 2001-11-28 Akim Demaille <akim@epita.fr>
7777
7778 * src/closure.c (closure): `r' and `c' are new variables, used to
7779 de-obfuscate accesses to RULESET and CORE.
7780
7781 2001-11-28 Akim Demaille <akim@epita.fr>
7782
7783 * src/reduce.c (reduce_print): Use ngettext.
7784 (dump_grammar): Improve the trace accuracy.
7785
7786 2001-11-28 Akim Demaille <akim@epita.fr>
7787
7788 * src/reduce.c (dump_grammar): Don't translate trace messages.
7789
7790 2001-11-28 Akim Demaille <akim@epita.fr>
7791
7792 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
7793 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
7794 as all tags are free'ed afterwards.
7795 From Enrico Scholz.
7796
7797 2001-11-27 Paul Eggert <eggert@twinsun.com>
7798
7799 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
7800 use alloca when we didn't want to, and vice versa.
7801
7802 2001-11-27 Marc Autret <autret_m@epita.fr>
7803
7804 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
7805 initialization.
7806 * src/output.c (prepare): Remove its update.
7807
7808 2001-11-27 Marc Autret <autret_m@epita.fr>
7809
7810 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
7811 Use %error-verbose.
7812
7813 2001-11-27 Marc Autret <autret_m@epita.fr>
7814
7815 * src/bison.simple: Remove YYERROR_VERBOSE using.
7816 Use %%error_verbose.
7817 (yyparse): Likewise.
7818 * src/output.c (prepare): Give its final value.
7819 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
7820 * src/getargs.h: Add its extern declaration.
7821 * src/getargs.c (error_verbose_flag): New int.
7822 (getargs): Update to catch new case.
7823 * src/options.c (option_table): 'error-verbose' is a new option.
7824 (shortopts): Update.
7825
7826 2001-11-27 Akim Demaille <akim@epita.fr>
7827
7828 * src/system.h: Use intl/libgettext.h.
7829 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
7830
7831 2001-11-27 Akim Demaille <akim@epita.fr>
7832
7833 * tests/torture.at (Exploding the Stack Size with Malloc):
7834 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
7835
7836 2001-11-27 Akim Demaille <akim@epita.fr>
7837
7838 * src/files.c: Include error.h.
7839 Reported by Hans Aberg.
7840
7841 2001-11-26 Marc Autret <autret_m@epita.fr>
7842
7843 * src/reader.c (parse_include_decl): New, not yet implemented.
7844 (read_declarations): Add case tok_include.
7845 * src/getargs.h (include): Add its extern definition.
7846 * src/getargs.c (include): New const char *.
7847 (getargs): Add case '-I'.
7848 * src/options.c (option_table): Add include as command line and
7849 percent option.
7850 * src/lex.h (token_t): Add tok_include.
7851
7852 2001-11-26 Akim Demaille <akim@epita.fr>
7853
7854 * src/reader.c (readgram): Make sure rules for mid-rule actions
7855 have a lineno equal to that of their host rule.
7856 Reported by Hans Aberg.
7857 * tests/regression.at (Rule Line Numbers): New.
7858
7859 2001-11-26 Akim Demaille <akim@epita.fr>
7860
7861 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7862 size_ts.
7863
7864 2001-11-26 Akim Demaille <akim@epita.fr>
7865
7866 * src/complain.c, src/complain.h (error): Remove, provided by
7867 lib/error.[ch].
7868
7869 2001-11-26 Akim Demaille <akim@epita.fr>
7870
7871 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7872 issue an error message.
7873 * tests/regression.at (Invalid %directive): New.
7874 Reported by Hans Aberg.
7875
7876 2001-11-26 Akim Demaille <akim@epita.fr>
7877
7878 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7879 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7880
7881 2001-11-26 Akim Demaille <akim@epita.fr>
7882
7883 * src/conflicts.c (conflicts_print): Don't complain at all when
7884 there are no reduce/reduce conflicts, and as many shift/reduce
7885 conflicts as expected.
7886 * tests/regression.at (%expect right): Adjust.
7887
7888 2001-11-23 Akim Demaille <akim@epita.fr>
7889
7890 * lib/alloca.c: Update, from fileutils.
7891
7892 2001-11-23 Akim Demaille <akim@epita.fr>
7893
7894 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7895
7896 2001-11-23 Akim Demaille <akim@epita.fr>
7897
7898 * src/system.h: Include alloca.h.
7899 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7900
7901 2001-11-23 Akim Demaille <akim@epita.fr>
7902
7903 * src/print_graph.c (print_actions): Remove `rule', unused.
7904 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7905 pacify GCC's signed < unsigned warnings.
7906 * src/closure.c (itemsetsize): Likewise.
7907 * src/reader.c (symbol_list_new): Static.
7908
7909 2001-11-23 Akim Demaille <akim@epita.fr>
7910
7911 Attaching lineno to buckets is stupid, since only one copy of each
7912 symbol is kept, only the line of the first occurrence is kept too.
7913
7914 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7915 * src/reader.c (rline_allocated): Remove, unused.
7916 (symbol_list): Have a `line' member.
7917 (symbol_list_new): New.
7918 (readgram): Use it.
7919 * src/print.c (print_grammar): Output the rule line numbers.
7920 * tests/regression.at (Solved SR Conflicts)
7921 (Unresolved SR Conflicts): Adjust.
7922 Reported by Hans Aberg.
7923
7924 2001-11-22 Marc Autret <autret_m@epita.fr>
7925
7926 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7927
7928 2001-11-22 Marc Autret <autret_m@epita.fr>
7929
7930 * src/muscle_tab.c (muscle_init): Remove initialization of
7931 skeleton muscle.
7932 * src/output.c (output_master_parser): Do it here.
7933
7934 2001-11-20 Akim Demaille <akim@epita.fr>
7935
7936 * po/sv.po: New.
7937 * configure.in (ALL_LINGUAS): Adjust.
7938 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7939 longer contains strings to translate.
7940
7941 2001-11-19 Akim Demaille <akim@epita.fr>
7942
7943 * src/conflicts.c (conflicts_print): Add a missing \n.
7944
7945 2001-11-19 Akim Demaille <akim@epita.fr>
7946
7947 * src/nullable.c (nullable_print): New.
7948 (set_nullable): Call it when tracing.
7949 Better locality of variables.
7950
7951 2001-11-19 Akim Demaille <akim@epita.fr>
7952
7953 * src/print.c (print_actions): Better locality of variables.
7954
7955 2001-11-19 Akim Demaille <akim@epita.fr>
7956
7957 * src/derives.c (print_derives): Fix and enrich.
7958 * src/closure.c (print_fderives): Likewise.
7959
7960 2001-11-19 Akim Demaille <akim@epita.fr>
7961
7962 * src/closure.c (itemsetend): Remove, replaced with...
7963 (itemsetsize): new.
7964
7965 2001-11-19 Akim Demaille <akim@epita.fr>
7966
7967 * src/LR0.c (kernel_end): Remove, replaced with...
7968 (kernel_size): new.
7969
7970 2001-11-19 Akim Demaille <akim@epita.fr>
7971
7972 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7973 to clarify.
7974
7975 2001-11-19 Akim Demaille <akim@epita.fr>
7976
7977 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7978
7979 2001-11-19 Akim Demaille <akim@epita.fr>
7980
7981 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7982 trace messages.
7983 * src/LR0.c: Likewise.
7984 (allocate_itemsets): Use arrays instead of pointers to clarify.
7985
7986 2001-11-19 Akim Demaille <akim@epita.fr>
7987
7988 * src/getargs.c (statistics_flag): Replace with...
7989 (trace_flag): New.
7990 (longopts): Accept --trace instead of --statistics.
7991 * src/getargs.h, src/options.c: Adjust.
7992 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7993 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7994
7995 2001-11-19 Akim Demaille <akim@epita.fr>
7996
7997 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7998 pointers to clarify the code.
7999 (save_reductions, save_shifts): Factor common parts of alternatives.
8000
8001 2001-11-19 Akim Demaille <akim@epita.fr>
8002
8003 * src/LR0.c (new_state, get_state): Complete TRACE code.
8004 * src/closure.c: Include `reader.h' to get `tags', needed by the
8005 trace code.
8006 Rename the conditional DEBUG as TRACE.
8007 Output consistently TRACEs to stderr, not stdout.
8008 * src/derives.c: Likewise.
8009 * src/reduce.c: (inaccessable_symbols): Using if is better style
8010 than goto.
8011 Use `#if TRACE' instead of `#if 0' for tracing code.
8012
8013 2001-11-19 Akim Demaille <akim@epita.fr>
8014
8015 * src/system.h (LIST_FREE, shortcpy): New.
8016 * src/LR0.c: Use them.
8017 * src/output.c (free_itemsets, free_reductions, free_shifts):
8018 Remove, replaced by LIST_FREE.
8019
8020 2001-11-19 Akim Demaille <akim@epita.fr>
8021
8022 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
8023 (REDUCTIONS_ALLOC): New.
8024 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
8025 allocation.
8026
8027 2001-11-19 Akim Demaille <akim@epita.fr>
8028
8029 * src/LR0.c (new_state): Complete trace code.
8030 * src/nullable.c (set_nullable): Don't translate traces.
8031
8032 2001-11-19 Akim Demaille <akim@epita.fr>
8033
8034 * src/print_graph.c (print_core): Better locality of variables.
8035 * src/print.c (print_core): Likewise.
8036
8037 2001-11-19 Akim Demaille <akim@epita.fr>
8038
8039 * src/vcg.c: You do the output, so you are responsible of the
8040 handling of VCG syntax, in particular: use quotearg.
8041 * src/print_graph.c: Don't.
8042 (print_actions): Don't output the actions as part of the nodes,
8043 since that's the job of the edges.
8044 (print_state): Don't output by hand: fill the node description,
8045 and ask for its output.
8046
8047 2001-11-19 Akim Demaille <akim@epita.fr>
8048
8049 * src/bison.simple (yyparse): When verbosely reporting an error,
8050 no longer put additional quotes around token names.
8051 * tests/calc.at: Adjust.
8052
8053 2001-11-19 Akim Demaille <akim@epita.fr>
8054
8055 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
8056 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
8057 * src/output.c: Adjust.
8058
8059 2001-11-19 Akim Demaille <akim@epita.fr>
8060
8061 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
8062 (rule_t): this.
8063 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
8064
8065 2001-11-19 Akim Demaille <akim@epita.fr>
8066
8067 * src/gram.h (rule_t): New.
8068 (rule_table): New.
8069 (rrhs, rlhs): Remove, part of state_t.
8070 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
8071 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
8072 * src/reader.c, src/reduce.c: Adjust.
8073
8074 2001-11-19 Akim Demaille <akim@epita.fr>
8075
8076 * src/reader.c (symbols_output): New, extracted from...
8077 (packsymbols): Here.
8078 (reader): Call it.
8079
8080 2001-11-19 Akim Demaille <akim@epita.fr>
8081
8082 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
8083 (maxrhs): this new function.
8084
8085 2001-11-19 Akim Demaille <akim@epita.fr>
8086
8087 * src/lalr.c (F): New macro to access the variable F.
8088 Adjust.
8089
8090 2001-11-19 Akim Demaille <akim@epita.fr>
8091
8092 * src/lalr.h (LA): New macro to access the variable LA.
8093 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8094 * src/lalr.c: Adjust.
8095
8096 2001-11-19 Akim Demaille <akim@epita.fr>
8097
8098 * src/lalr.c (initialize_LA): Only initialize LA. Let...
8099 (set_state_table): handle the `lookaheads' members.
8100
8101 2001-11-19 Akim Demaille <akim@epita.fr>
8102
8103 * src/lalr.h (lookaheads): Removed array, whose contents is now
8104 a member of...
8105 (state_t): this structure.
8106 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8107 Adjust.
8108
8109 2001-11-19 Akim Demaille <akim@epita.fr>
8110
8111 * src/lalr.h (consistent): Removed array, whose contents is now
8112 a member of...
8113 (state_t): this structure.
8114 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8115 Adjust.
8116
8117 2001-11-19 Akim Demaille <akim@epita.fr>
8118
8119 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
8120 contents are now members of...
8121 (state_t): this structure.
8122 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
8123 Adjust.
8124
8125 2001-11-19 Akim Demaille <akim@epita.fr>
8126
8127 * src/lalr.h (state_t): New.
8128 (state_table): Be a state_t * instead of a core **.
8129 (accessing_symbol): Remove, part of state_t.
8130 * src/lalr.c: Adjust.
8131 (set_accessing_symbol): Merge into...
8132 (set_state_table): this.
8133 * src/print_graph.c, src/conflicts.c: Adjust.
8134
8135 2001-11-14 Akim Demaille <akim@epita.fr>
8136
8137 * tests/calc.at, tests/output.at, tests/regression.at,
8138 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
8139 now the tests are run in private dirs, therefore AC_CLEANUP and
8140 family can be simplified to 0-ary.
8141 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
8142 use abs. path to find config.h.
8143 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
8144 stderr, there can be way too much random noise.
8145 Instead pass -Werror to GCC and rely on the exit status.
8146 Reported by Wolfram Wagner.
8147
8148 2001-11-14 Akim Demaille <akim@epita.fr>
8149
8150 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
8151 defined only if yyoverflow is defined, to avoid `warning: unused
8152 variable `yyvs1''.
8153 Reported by The Test Suite.
8154
8155 2001-11-14 Akim Demaille <akim@epita.fr>
8156
8157 * src/print.c: Include reduce.h.
8158 Reported by Hans Aberg.
8159
8160 2001-11-14 Akim Demaille <akim@epita.fr>
8161
8162 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
8163 Revert a previous patch: these are really const.
8164 * src/conflicts.c (conflict_report): Additional useless pair of
8165 braces to pacify GCC's warnings for `if () if () {} else {}'.
8166 * src/lex.c (parse_percent_token): Replace equal_offset with
8167 arg_offset.
8168 arg is const.
8169 Be sure to strdup `arg' when used, since there is no reason for
8170 token_buffer not to change.
8171
8172 2001-11-14 Akim Demaille <akim@epita.fr>
8173
8174 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
8175 definition.
8176 * src/main.c (main): Use them.
8177 Suggested by Hans Aberg.
8178
8179 2001-11-12 Akim Demaille <akim@epita.fr>
8180
8181 * src/system.h (ngettext): Now that we use ngettext, be sure to
8182 provide a default definition when NLS are not used.
8183
8184 2001-11-12 Akim Demaille <akim@epita.fr>
8185
8186 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
8187 Use @kbd to denote user input.
8188 (Language and Grammar): ANSIfy the example.
8189 Adjust its layout for info/notinfo.
8190 (Location Tracking Calc): Output error messages to stderr.
8191 Output locations in a more GNUtically correct way.
8192 Fix a couple of Englishos.
8193 Adjust @group/@end group pairs.
8194
8195 2001-11-12 Akim Demaille <akim@epita.fr>
8196
8197 %expect was not functioning at all.
8198
8199 * src/conflicts.c (expected_conflicts): Set to -1.
8200 (conflict_report): Use ngettext.
8201 (conflicts_print): Check %expect and make its violation an error.
8202 * doc/bison.texinfo (Expect Decl): Adjust.
8203 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
8204 * tests/regression.at (%expect not enough, %expect right)
8205 (%expect too much): New.
8206
8207 2001-11-12 Akim Demaille <akim@epita.fr>
8208
8209 * tests/regression.at (Conflicts): Rename as...
8210 (Unresolved SR Conflicts): this.
8211 (Solved SR Conflicts): New.
8212
8213 2001-11-12 Akim Demaille <akim@epita.fr>
8214
8215 * src/reduce.c (print_results): Rename as...
8216 (reduce_output): This.
8217 Output to OUT, passed as argument, instead of output_obstack.
8218 (dump_grammar): Likewise.
8219 (reduce_free): New.
8220 Also free V1.
8221 (reduce_grammar): No longer call reduce_output, since...
8222 * src/print.c (print_results): do it.
8223 * src/main.c (main): Call reduce_free;
8224
8225 2001-11-12 Akim Demaille <akim@epita.fr>
8226
8227 * src/conflicts.c (print_reductions): Accept OUT as argument.
8228 Output to it, not to output_obstack.
8229 * src/print.c (print_actions): Adjust.
8230
8231 2001-11-12 Akim Demaille <akim@epita.fr>
8232
8233 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
8234 the result instead of using...
8235 (src_total, rrc_total, src_count, rrc_count): Remove.
8236 (any_conflicts): Remove.
8237 (print_conflicts): Split into...
8238 (conflicts_print, conflicts_output): New.
8239 * src/conflicts.h: Adjust.
8240 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
8241 * src/print.c (print_grammar): Issue `\n' between two rules.
8242 * tests/regression.at (Conflicts): New.
8243 Reported by Tom Lane.
8244
8245 2001-11-12 Akim Demaille <akim@epita.fr>
8246
8247 * tests/regression.at (Invalid input): Remove, duplicate with
8248 ``Invalid input: 1''.
8249
8250 2001-11-12 Akim Demaille <akim@epita.fr>
8251
8252 * tests/torture.at (AT_DATA_STACK_TORTURE)
8253 (Exploding the Stack Size with Alloca)
8254 (Exploding the Stack Size with Malloc): New.
8255
8256 2001-11-12 Akim Demaille <akim@epita.fr>
8257
8258 * src/bison.simple (YYSTACK_REALLOC): New.
8259 (yyparse) [!yyoverflow]: Use it and free the old stack.
8260 Reported by Per Allansson.
8261
8262 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
8263
8264 * src/bison.simple: Define type yystype instead of YYSTYPE, and
8265 define CPP macro, which substitute YYSTYPE by yystype.
8266 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
8267 with yyltype/YYLTYPE. This allows inclusion of the generated
8268 header within the parser if the compiler, such as GGC, accepts
8269 multiple equivalent #defines.
8270 From Akim.
8271
8272 2001-11-05 Akim Demaille <akim@epita.fr>
8273
8274 * src/reader.c (symbols_output): New, extracted from...
8275 (packsymbols): here.
8276 (reader): Adjust.
8277
8278 2001-11-05 Akim Demaille <akim@epita.fr>
8279
8280 * src/lex.c (parse_percent_token): s/quotearg/quote/.
8281
8282 2001-11-05 Akim Demaille <akim@epita.fr>
8283
8284 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
8285 pattern.
8286
8287 2001-11-05 Akim Demaille <akim@epita.fr>
8288
8289 * src/options.h (struct option_table_struct): set_flags is void*.
8290 * src/options.c (longopts): Support `--output' and `%output'.
8291 (usage): Adjust.
8292 * src/lex.h (tok_setopt): Remove, replaced with...
8293 (tok_intopt, tok_stropt): these new guys.
8294 * src/lex.c (getopt.h): Not needed.
8295 (token_buffer, unlexed_token_buffer): Not const.
8296 (percent_table): Promote `-' over `_' in directive names.
8297 Active `%name-prefix', `file-prefix', and `output'.
8298 (parse_percent_token): Accept possible arguments to directives.
8299 Promote `-' over `_' in directive names.
8300
8301 2001-11-04 Akim Demaille <akim@epita.fr>
8302
8303 * doc/bison.texinfo (Decl Summary): Split the list into
8304 `directives for grammars' and `directives for bison'.
8305 Sort'em.
8306 Add description of `%name-prefix', `file-prefix', and `output'.
8307 Promote `-' over `_' in directive names.
8308 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
8309 Simplify the description of `--name-prefix'.
8310 Promote `-' over `_' in directive names.
8311 Promote `--output' over `--output-file'.
8312 Fix the description of `--defines'.
8313 * tests/output.at: Exercise %file-prefix and %output.
8314
8315 2001-11-02 Akim Demaille <akim@epita.fr>
8316
8317 * doc/refcard.tex: Update.
8318
8319 2001-11-02 Akim Demaille <akim@epita.fr>
8320
8321 * src/symtab.h (SUNDEF): New.
8322 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
8323 stand for `uninitialized', instead of 0.
8324 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
8325 * src/lex.c (lex): Adjust.
8326
8327 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
8328 Number it 0.
8329 Let yylex return it instead of a plain 0.
8330 Reported by Dick Streefland.
8331
8332 2001-11-02 Akim Demaille <akim@epita.fr>
8333
8334 * tests/regression.at (Mixing %token styles): New test.
8335
8336 2001-11-02 Akim Demaille <akim@epita.fr>
8337
8338 * src/reader.c (parse_thong_decl): Formatting changes.
8339 (token_translations_init): New, extracted from...
8340 (packsymbols): Here.
8341 Adjust.
8342
8343 2001-11-01 Akim Demaille <akim@epita.fr>
8344
8345 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
8346 Check that `9foo.y' produces correct cpp guards.
8347 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
8348 guards.
8349 Reported by Wwp.
8350
8351 2001-11-01 Akim Demaille <akim@epita.fr>
8352
8353 * tests/regression.at (Invalid input: 2): New.
8354 * src/lex.c (unlexed_token_buffer): New.
8355 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
8356 too.
8357 Reported by Wwp.
8358
8359 2001-11-01 Akim Demaille <akim@epita.fr>
8360
8361 * tests/calc.at: Catch up with 1.30.
8362 * configure.in: Bump to 1.49a.
8363 Adjust to newer Autotest.
8364
8365 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
8366
8367 * src/conflicts.c: Move global variables rrc_total and src_total ...
8368 (print_conflicts): here.
8369 * src/output.c (output): Free global variable user_toknums.
8370 * src/lex.c (token_obstack): Become static.
8371
8372 2001-10-18 Akim Demaille <akim@epita.fr>
8373
8374 * tests/atlocal.in (GCC): Add.
8375 * tests/calc.at: s/m4_match/m4_bmatch/.
8376 s/m4_patsubst/m4_bpatsubst/.
8377 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
8378 * configure.in: AC_SUBST(GCC).
8379
8380 2001-10-14 Marc Autret <autret_m@epita.fr>
8381
8382 * src/options.c (create_long_option_table): Fix.
8383
8384 2001-10-10 Akim Demaille <akim@epita.fr>
8385
8386 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
8387
8388 2001-10-04 Akim Demaille <akim@epita.fr>
8389
8390 * src/reader.c (parse_union_decl): Push the caracters in
8391 union_obstack, not attrs_obstack.
8392
8393 2001-10-04 Akim Demaille <akim@epita.fr>
8394
8395 Merge in the branch 1.29.
8396
8397 * src/reader.c (packsymbols): Use a temporary obstack for
8398 `%%tokendef', since output_stack is already used elsewhere.
8399
8400 2001-10-02 Akim Demaille <akim@epita.fr>
8401
8402 Bump 1.29d.
8403
8404 2001-10-02 Akim Demaille <akim@epita.fr>
8405
8406 Version 1.29c.
8407
8408 2001-10-02 Akim Demaille <akim@epita.fr>
8409
8410 * tests/regression.at (Invalid CPP headers): New.
8411 From Alexander Belopolsky.
8412 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
8413
8414 2001-10-02 Akim Demaille <akim@epita.fr>
8415
8416 * tests/regression.at (Invalid input): New.
8417 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
8418 Reported by Shura.
8419
8420 2001-10-02 Akim Demaille <akim@epita.fr>
8421
8422 * tests/calc.at: Now that --debug works, the tests must be adjusted.
8423
8424 2001-10-02 Akim Demaille <akim@epita.fr>
8425
8426 * src/output.c (output_parser): Assert `skeleton'.
8427 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
8428 systems.
8429 From Shura.
8430
8431 2001-10-01 Marc Autret <autret_m@epita.fr>
8432
8433 * src/lex.h: Echo modifications.
8434 * src/lex.c (unlex): Parameter is now token_t.
8435 From Hans Aberg.
8436
8437 2001-10-01 Marc Autret <autret_m@epita.fr>
8438
8439 * src/main.c: Include lex.h.
8440 From Hans Aberg.
8441
8442 2001-09-29 Akim Demaille <akim@epita.fr>
8443
8444 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
8445
8446 2001-09-28 Akim Demaille <akim@epita.fr>
8447
8448 * tests/testsuite.at: Update to newer Autotest.
8449 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
8450
8451 2001-09-27 Akim Demaille <akim@epita.fr>
8452
8453 Position independent wrapper.
8454
8455 * tests/bison: Remove.
8456 * tests/bison.in: New.
8457 * configure.in: Adjust.
8458
8459 2001-09-27 Paul Eggert <eggert@twinsun.com>
8460
8461 Port quotearg fixes from tar 1.13.24.
8462
8463 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
8464 tm to be declared.
8465 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
8466 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
8467
8468 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
8469 * m4/mbrtowc.m4: New file.
8470 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
8471 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
8472
8473 2001-09-27 Akim Demaille <akim@epita.fr>
8474
8475 Bump to 1.29c.
8476
8477 2001-09-27 Akim Demaille <akim@epita.fr>
8478
8479 Version 1.29b.
8480
8481 2001-09-25 Akim Demaille <akim@epita.fr>
8482
8483 * src/system.h: Include `xalloc.h'.
8484 Remove it from the C files.
8485 * src/files.c (output_files): Free the obstacks.
8486 * src/lex.c (init_lex): Rename as...
8487 (lex_init): this.
8488 (lex_free): New.
8489 * src/main.c (main): Use it.
8490
8491 2001-09-24 Marc Autret <autret_m@epita.fr>
8492
8493 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
8494 to output informations in fout (FILE*).
8495 (open_graph, close_graph): Likewise.
8496 (output_graph, output_edge, output_node): Likewise.
8497 * src/vcg.h: Update function prototypes.
8498 * src/print_graph.c (print_graph): Open output graph file.
8499 (print_actions): Adjust.
8500 * src/files.h: Remove extern declaration.
8501 * src/files.c: Remove graph_obstack declaration.
8502 (open_files): Remove graph_obstack initialization.
8503 (output_files): Remove graph_obstack saving.
8504
8505 2001-09-24 Marc Autret <autret_m@epita.fr>
8506
8507 * src/files.c (compute_output_file_names): Fix.
8508
8509 2001-09-24 Marc Autret <autret_m@epita.fr>,
8510 Akim Demaille <akim@epita.fr>
8511
8512 * src/reader.c (reader): Remove call to free_symtab ().
8513 * src/main.c (main): Call it here.
8514 Include symtab.h.
8515 * src/conflicts.c (initialize_conflicts): Rename as...
8516 (solve_conflicts): this.
8517 * src/print.c (print_core, print_actions, print_state)
8518 (print_grammar): Dump to a file instead a `output_obstack'.
8519 (print_results): Dump `output_obstack', and then proceed with the
8520 FILE *.
8521 * src/files.c (compute_output_file_names, close_files): New.
8522 (output_files): Adjust.
8523 * src/main.c (main): Adjust.
8524
8525 2001-09-23 Marc Autret <autret_m@epita.fr>
8526
8527 * src/files.c (compute_header_macro): Computes header macro name
8528 from spec_defines_file when given.
8529
8530 2001-09-23 Marc Autret <autret_m@epita.fr>
8531
8532 * src/files.c (output_files): Add default extensions.
8533
8534 2001-09-22 Akim Demaille <akim@epita.fr>
8535
8536 * src/conflicts.c (finalize_conflicts): Rename as...
8537 (free_conflicts): this.
8538
8539 2001-09-22 Akim Demaille <akim@epita.fr>
8540
8541 * src/gram.c (gram_free): Rename back as...
8542 (dummy): this.
8543 (output_token_translations): Free `token_translations'.
8544 * src/symtab.c (free_symtab): Free the tag field.
8545
8546 2001-09-22 Akim Demaille <akim@epita.fr>
8547
8548 Remove `translations' as it is always set to true.
8549
8550 * src/gram.h: Adjust.
8551 * src/reader.c (packsymbols, parse_token_decl): Adjust
8552 * src/print.c (print_grammar): Adjust.
8553 * src/output.c (output_token_translations): Adjust.
8554 * src/lex.c (lex): Adjust.
8555 * src/gram.c: Be sure the set pointers to NULL.
8556 (dummy): Rename as...
8557 (gram_free): this.
8558
8559 2001-09-22 Akim Demaille <akim@epita.fr>
8560
8561 * configure.in: Invoke AM_LIB_DMALLOC.
8562 * src/system.h: Use dmalloc.
8563 * src/LR0.c: Be sure to have pointers initialized to NULL.
8564 (allocate_itemsets): Allocate kernel_items only if needed.
8565
8566 2001-09-22 Akim Demaille <akim@epita.fr>
8567
8568 * configure.in: Bump to 1.29b.
8569 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
8570 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
8571 need xmalloc.c in calc.y.
8572 From Pascal Bart.
8573
8574 2001-09-21 Akim Demaille <akim@epita.fr>
8575
8576 Version 1.29a.
8577 * Makefile.maint, config/config.guess, config/config.sub,
8578 * config/missing: Update from masters.
8579 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
8580 upon package.m4.
8581 * configure.in (ALL_LINGUAS): Add `tr'.
8582
8583 2001-09-21 Akim Demaille <akim@epita.fr>
8584
8585 * tests/Makefile.am (package.m4): Move to...
8586 ($(srcdir)/$(TESTSUITE)): here.
8587
8588 2001-09-20 Akim Demaille <akim@epita.fr>
8589
8590 * src/complain.c: No longer try to be standalone: use system.h.
8591 Don't assume __STDC__ is defined to 1. Just test if it is defined.
8592 * src/complain.h: Likewise.
8593 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
8594 Remove the unused variable `n'.
8595 From Albert Chin-A-Young.
8596
8597 2001-09-18 Marc Autret <autret_m@epita.fr>
8598
8599 * doc/bison.1: Update.
8600 * doc/bison.texinfo (Bison Options): Update --defines and --graph
8601 descriptions.
8602 (Option Cross Key): Update.
8603 Add --graph.
8604
8605 2001-09-18 Marc Autret <autret_m@epita.fr>
8606
8607 * tests/regression.at: New test (comment in %union).
8608
8609 2001-09-18 Marc Autret <autret_m@epita.fr>
8610
8611 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
8612 do that.
8613 Reported by Keith Browne.
8614
8615 2001-09-18 Marc Autret <autret_m@epita.fr>
8616
8617 * tests/output.at: Add tests for --defines and --graph.
8618
8619 2001-09-18 Marc Autret <autret_m@epita.fr>
8620
8621 * tests/output.at: Removes tests of %{header,src}_extension features.
8622
8623 2001-09-18 Akim Demaille <akim@epita.fr>
8624
8625 * tests/Makefile.am (package.m4): New.
8626 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
8627 (_AT_CHECK_CALC_ERROR): Likewise.
8628 Factor the `, ' part of verbose error messages.
8629
8630 2001-09-18 Marc Autret <autret_m@epita.fr>
8631
8632 * src/getargs.c (longopts): Declare --defines and --graph as options
8633 with optional arguments.
8634 * src/files.h: Add extern declarations.
8635 * src/files.c (spec_graph_file, spec_defines_file): New.
8636 (output_files): Update.
8637 Remove CPP-outed code.
8638
8639 2001-09-18 Marc Autret <autret_m@epita.fr>
8640
8641 Turn off %{source,header}_extension feature.
8642
8643 * src/files.c (compute_exts_from_gf): Update.
8644 (compute_exts_from_src): Update.
8645 (output_files): CPP-out useless code.
8646 * src/files.h: Remove {header,source}_extension extern declarations.
8647 * src/reader.c (parse_dquoted_param): CPP-out.
8648 (parse_header_extension_decl): Remove.
8649 (parse_source_extension_decl): Remove.
8650 (read_declarations): Remove cases tok_{hdrext,srcext}.
8651 * src/lex.c (percent_table): Remove {header,source}_extension entries.
8652 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
8653
8654 2001-09-10 Akim Demaille <akim@epita.fr>
8655
8656 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
8657 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
8658 (AT_CHECK_OUTPUT): this.
8659 Merely check ls' exit status, its output is useless.
8660
8661 2001-09-10 Akim Demaille <akim@epita.fr>
8662
8663 * tests/calc.at: Use m4_match.
8664 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
8665
8666 2001-09-10 Marc Autret <autret_m@epita.fr>,
8667 Akim Demaille <akim@epita.fr>
8668
8669 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
8670 enum color_e.
8671 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
8672 to `normal'.
8673 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
8674 * src/lex.h: Adjust prototype.
8675 (token_t): Add `tok_undef'.
8676 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
8677 (parse_percent_token): Now returns token_t.
8678 Add default statement in switch.
8679 (lex): Separate `c' as an input variable, from the token_t result
8680 part.
8681 (unlexed): Is a token_t.
8682
8683 2001-09-10 Akim Demaille <akim@epita.fr>
8684
8685 * configure.in: Bump to 1.29a.
8686
8687 2001-09-07 Akim Demaille <akim@epita.fr>
8688
8689 Version 1.29.
8690
8691 2001-08-30 Akim Demaille <akim@epita.fr>
8692
8693 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
8694 * m4/atconfig.m4: Remove.
8695 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
8696 * tests/bison: New.
8697 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
8698 m4_if, m4_patsubst, and m4_regexp.
8699 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
8700 `input' file instead of echo.
8701
8702 2001-08-29 Akim Demaille <akim@epita.fr>
8703
8704 Bump to 1.28e.
8705
8706 2001-08-29 Akim Demaille <akim@epita.fr>
8707
8708 Version 1.28d.
8709
8710 2001-08-29 Paul Eggert <eggert@twinsun.com>
8711
8712 * src/bison.simple (yyparse): Don't take the address of an
8713 item before the start of an array, as that doesn't conform to
8714 the C Standard.
8715
8716 2001-08-29 Robert Anisko <anisko_r@epita.fr>
8717
8718 * doc/bison.texinfo (Location Tracking Calc): New node.
8719
8720 2001-08-29 Paul Eggert <eggert@twinsun.com>
8721
8722 * src/output.c (output): Do not define const, as this now
8723 causes more problems than it cures.
8724
8725 2001-08-29 Akim Demaille <akim@epita.fr>
8726
8727 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
8728 the nodes.
8729 Be sure to tag the `detailmenu'.
8730
8731 2001-08-29 Akim Demaille <akim@epita.fr>
8732
8733 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
8734 download in a tmp dir.
8735
8736 2001-08-28 Marc Autret <autret_m@epita.fr>
8737
8738 * config/depcomp: New file.
8739
8740 2001-08-28 Marc Autret <autret_m@epita.fr>
8741
8742 * doc/bison.1 (mandoc): Adjust.
8743 From Juan Manuel Guerrero.
8744
8745 2001-08-28 Marc Autret <autret_m@epita.fr>
8746
8747 * src/print_graph.c (print_state): Fix.
8748
8749 2001-08-27 Marc Autret <autret_m@epita.fr>
8750
8751 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
8752 char * members.
8753 Echo modifications to the functions prototypes.
8754 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
8755
8756 2001-08-27 Marc Autret <autret_m@epita.fr>
8757
8758 * src/vcg.c: Include `xalloc.h'.
8759 (add_colorentry): New.
8760 (add_classname): New.
8761 (add_infoname): New.
8762 * src/vcg.h: Add new prototypes.
8763
8764 2001-08-27 Akim Demaille <akim@epita.fr>
8765
8766 * Makefile.maint: Sync. again with CVS Autoconf.
8767
8768 2001-08-27 Akim Demaille <akim@epita.fr>
8769
8770 * Makefile.maint: Formatting changes.
8771 (po-update, cvs-update, update): New targets.
8772 (AMTAR): Remove.
8773
8774 2001-08-27 Akim Demaille <akim@epita.fr>
8775
8776 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8777 * Makefile.maint: Sync. with CVS Autoconf.
8778
8779 2001-08-27 Marc Autret <autret_m@epita.fr>
8780
8781 * src/vcg.h (struct infoname_s): New.
8782 (struct colorentry_s): New.
8783 (graph_s): New fields {vertical,horizontal}_order in structure.
8784 Add `infoname' field.
8785 Add `colorentry' field;
8786 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
8787 (G_HORIZONTAL_ORDER): New.
8788 (G_INFONAME): New.
8789 (G_COLORENTRY): New.
8790 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
8791 Add output of `infoname'.
8792 Add output of `colorentry'.
8793
8794 2001-08-27 Marc Autret <autret_m@epita.fr>
8795
8796 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
8797 This one shadowed a global parameter.
8798
8799 2001-08-24 Marc Autret <autret_m@epita.fr>
8800
8801 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
8802 instead of `unsigned'.
8803 (print_state): Do not call obstack_object_size () in obstack_grow ()
8804 to avoid macro variables shadowing.
8805
8806 2001-08-23 Marc Autret <autret_m@epita.fr>
8807
8808 * src/lex.c (percent_table): Typo: s/naem/name/.
8809 Add graph option.
8810 Normalize new options declarations.
8811
8812 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
8813
8814 * tests/suite.at: Exercise %header_extension and %source_extension.
8815
8816 2001-08-16 Marc Autret <autret_m@epita.fr>
8817
8818 * src/reader.c (parse_dquoted_param): New.
8819 (parse_header_extension_decl): Use it.
8820 (parse_source_extension_decl): Likewise.
8821
8822 2001-08-16 Marc Autret <autret_m@epita.fr>
8823
8824 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
8825 (get_xxxx_str): Use assert () instead of complain ().
8826 Remove return invokations in default cases.
8827 (get_decision_str): Modify default behaviour. Remove second argument.
8828 Echo modifications on calls.
8829 (output_graph): Fix.
8830
8831 2001-08-16 Marc Autret <autret_m@epita.fr>
8832
8833 * src/getargs.c (usage): Update with ``-g, --graph''.
8834
8835 2001-08-16 Marc Autret <autret_m@epita.fr>
8836
8837 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
8838 (Option Cross Key): Likewise.
8839 * doc/bison.1: Update.
8840
8841 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8842
8843 * src/output.c (output_master_parser): Don't finish action_obstack.
8844 (output_parser): Don't care about the muscle action, here.
8845 (prepare): Copy the action_obstack in the action muscle.
8846 (output): Free action_obstack.
8847
8848 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8849
8850 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8851 will contain `%union' declaration.
8852 (parse_union_decl): Delete #line directive output.
8853 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8854 informations about %union.
8855 (parse_union_decl): Copy the union_obstack in the muscle stype.
8856 * src/bison.simple: Add new #line directive.
8857 Add typdef %%stype YYSTYPE.
8858
8859 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8860
8861 * src/bison.simple: Add new `#line' directive.
8862
8863 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8864
8865 * src/bison.simple: New `#line' directive.
8866 * src/output.c (output_parser): Support new dynamic muscle input_line.
8867
8868 2001-09-22 Marc Autret <autret_m@epita.fr>
8869
8870 * src/output.c (output_master_parser): New.
8871 (output_parser): Be more re-entrant.
8872
8873 2001-09-21 Marc Autret <autret_m@epita.fr>
8874
8875 * src/reader.c (copy_definition, parse_union_decl): Update and use
8876 `linef' muscle.
8877 (copy_action): Likewise.
8878 Use obstack_1grow ().
8879 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8880
8881 2001-09-21 Marc Autret <autret_m@epita.fr>
8882
8883 * src/options.c (option_table): Adjust.
8884 * src/lex.c (parse_percent_token): Fix.
8885
8886 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8887
8888 * src/options.c (symtab.h): Include it, need by lex.h.
8889
8890 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8891
8892 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8893 is now an option_table_struct*.
8894 (option_strcmp): New function option_strcmp.
8895 (parse_percent_token): Call option_strcmp.
8896 * src/getargs.c (xalloc.h, options.h): Include it.
8897 (getargs): Call create_long_option_table.
8898 (getargs): Free longopts at the end of the function.
8899 (shortopts): Move in options.c.
8900 * src/options.c (create_long_option_table): New function. Convert
8901 information from option_table to option structure.
8902 * src/reader.c (options.h): Include it.
8903
8904 * src/Makefile.am: Adjust.
8905 * src/options.c (option_table): Create from longopts and percent_table.
8906 * src/getargs.c (longopts): Delete.
8907 * src/lex.c (struct percent_table_struct): Delete.
8908 (percent_table): Delete.
8909 (options.h): Include it.
8910 * src/options.c: Create.
8911 * src/options.h: Create.
8912 Declare enum opt_access_e.
8913 Define struct option_table_struct.
8914
8915 2001-09-20 Marc Autret <autret_m@epita.fr>
8916
8917 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8918 sections of Bison.
8919
8920 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8921
8922 * src/bison.simple: s/%%filename/%%skeleton.
8923 * src/muscle_tab.c (getargs.h): Include it.
8924 (muscle_init): Insert new muscle skeleton.
8925
8926 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8927
8928 * src/output.c (output_parser): Delete unused variable actions_dumped.
8929
8930 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8931
8932 * src/output.c (output): Delete call to reader_output_yylsp.
8933 * src/reader.c (reader): Likewise.
8934 * src/reader.h: Delete declaration of reader_output_yylsp.
8935
8936 2001-09-02 Marc Autret <autret_m@epita.fr>
8937
8938 * src/reader.c: Include muscle_tab.h.
8939 (parse_union_decl): Update.
8940 (parse_macro_decl): Rename parse_muscle_decl.
8941 Update to use renamed functions and variable.
8942 (read_declarations, copy_action, read_additionnal_code, : Updated
8943 with correct variables and functions names.
8944 (packsymbols, reader): Likewise.
8945
8946 * src/reader.h (muscle_obstack): Extern declaration update.
8947
8948 * src/output.c: Include muscle_tab.h
8949 In all functions using macro_insert, change by using muscle_insert ().
8950 (macro_obstack): Rename muscle_obstack.
8951 Echo modifications in the whole file.
8952 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8953 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8954 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8955
8956 * src/muscle_tab.h: Update double inclusion macros.
8957 (macro_entry_s): Rename muscle_entry_s.
8958 Update prototypes.
8959
8960 * src/muscle_tab.c: Include muscle_tab.h.
8961 Rename macro_tabble to muscle_table.
8962 (mhash1, mhash2, mcmp): Use muscle_entry.
8963 (macro_init): Rename muscle_init. Update.
8964 (macro_insert): Rename muscle_insert. Update.
8965 (macro_find): Rename muscle_find. Update.
8966
8967 * src/main.c: Include muscle_tab.h.
8968 (main): Call muscle_init ().
8969 * src/Makefile.am (bison_SOURCES): Echo modifications.
8970
8971 2001-09-02 Marc Autret <autret_m@epita.fr>
8972
8973 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8974
8975 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8976
8977 2001-09-02 Marc Autret <autret_m@epita.fr>
8978
8979 * src/macrotab.c, src/macrotab.h: Remove.
8980
8981 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8982
8983 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8984 filename.
8985
8986 2001-09-01 Marc Autret <autret_m@epita.fr>
8987
8988 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8989 to an explicit value to activate the feature. We do it here.
8990
8991 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8992
8993 * src/output.c (prepare): Delete the `filename' muscule insertion.
8994 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8995 (parse_union_decl): Likewise.
8996 * src/macrotab.c (macro_init): Initialize filename by infile.
8997
8998 2001-08-31 Marc Autret <autret_m@epita.fr>
8999
9000 * src/bison.simple (YYLSP_NEEDED): New definition.
9001 * src/output.c (prepare): Add macro insertion of `locations_flag'
9002
9003 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9004
9005 * src/output.c (prepare): Delete insertion of previous muscles,
9006 and insert the `prefix' muscles.
9007 * src/macrotab.c (macro_init): Likewise.
9008 (macro_init): Initialization prefix directive by `yy'.
9009 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
9010 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
9011 yylval, yydebug, yyerror, yynerrs and yyparse.
9012 New directive `#define' to substitute yydebug, ... with option
9013 name_prefix.
9014
9015 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9016
9017 * src/main.c (main): Standardize.
9018 * src/output.c (output_table_data, output_parser): Likewise.
9019 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
9020
9021 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
9022
9023 * src/reader.c (read_additionnal_code): Rename %%user_code to
9024 %%epilogue.
9025 * src/output.c (output): Rename %%declarations to %%prologue.
9026 * src/bison.simple: Echo modifications.
9027
9028 2001-08-31 Marc Autret <autret_m@epita.fr>
9029
9030 * src/reader.c (readgram): CleanUp.
9031 (output_token_defines): Likewise.
9032 (packsymbols): Likewise.
9033 (reader): Likewise.
9034 * src/output.c (output): CPP-out useless code.
9035
9036 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
9037
9038 * src/reader.c (reader): Delete obsolete call to function
9039 output_trailers and output_headers.
9040 * src/output.h: Remove obsolete functions prototypes of output_headers
9041 and output_trailers.
9042
9043 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
9044
9045 * src/main.c: Include macrotab.h.
9046 * src/macrotab.h (macro_entry_s): Constify fields.
9047 Adjust functions prototypes.
9048 * src/macrotab.c (macro_insert): Constify key and value.
9049 (macro_find): Constify key.
9050 (macro_insert): Include 'xalloc.h'
9051 (macro_insert): Use XMALLOC.
9052 (macro_find): Constify return value.
9053 * src/output.c (output_table_data): Rename table to table_data.
9054 (output_parser): Constify macro_key, macro_value.
9055
9056 2001-08-30 Marc Autret <autret_m@epita.fr>
9057
9058 * src/reader.c (parse_skel_decl): New.
9059 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
9060 * src/lex.h (token_t): New token `tok_skel'.
9061 * src/lex.c (percent_table): Add skeleton option entry.
9062 Standardize.
9063
9064 2001-08-29 Marc Autret <autret_m@epita.fr>
9065
9066 * src/bison.simple: Add %%user_code directive at the end.
9067 * src/reader.c (read_additionnal_code): New.
9068 (reader): Use it.
9069 * src/output.c (output_program): Remove.
9070 (output): Update.
9071
9072 2001-08-28 Marc Autret <autret_m@epita.fr>
9073
9074 * src/output.c (output_actions): Clean up.
9075 (output_gram): CPP-out useless code.
9076 * src/reader.c (reader): Clean up, CPP-out useless code.
9077
9078 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
9079
9080 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
9081 directive.
9082 * src/bison.simple: Add `%%definitions'.
9083
9084 2001-08-28 Marc Autret <autret_m@epita.fr>
9085
9086 * config/depcomp: New file.
9087
9088 2001-08-27 Paul Eggert <eggert@twinsun.com>
9089
9090 * src/bison.simple (yyparse): Don't take the address of an
9091 item before the start of an array, as that doesn't conform to
9092 the C Standard.
9093
9094 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9095
9096 * src/output.c (output): Remove the initialization of the macro
9097 obstack. It was done too late here.
9098
9099 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
9100 completely wrong.
9101 (reader): Initialize the macro obstack here, since we need it to grow
9102 '%define' directives.
9103
9104 * src/reader.h: Declare the macro obstack as extern.
9105
9106 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
9107
9108 * src/output.c (output_parser): Fix. Store single '%' characters in
9109 the output obstack instead of throwing them away.
9110
9111 2001-08-27 Akim Demaille <akim@epita.fr>
9112
9113 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
9114
9115 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9116
9117 * lib/Makefile.am: Adjust.
9118
9119 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9120
9121 * src/bison.simple: Update and add '%%' directives.
9122
9123 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9124
9125 * src/reader.c (reader): Remove calls to 'output_headers' and
9126 'output_trailers'. Remove some C output.
9127 (readgram): Disable a piece of code that was writing a default
9128 definition for 'YYSTYPE'.
9129 (reader_output_yylsp): Remove.
9130 (packsymbols): Output token defintions to a macro.
9131 (copy_definition): Disable C output.
9132
9133 * src/reader.c (parse_macro_decl): New function used to parse macro
9134 declarations.
9135 (copy_string2): Put the body of copy_string into this new function.
9136 Add a parameter to let the caller choose whether he wants to copy the
9137 string delimiters or not.
9138 (copy_string): Be a simple call to copy_string2 with the last argument
9139 bound to true.
9140 (read_declarations): Add case for macro definition.
9141 (copy_identifier): New.
9142 (parse_macro_decl): Read macro identifiers using copy_identifier
9143 rather than lex.
9144
9145 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9146
9147 * src/output.c (prepare): Add prefixed names.
9148 (output_parser): Output semantic actions.
9149 (output_parser): Fix bug on '%%line' directives.
9150
9151 * src/output.c (output_headers): Remove. The C code printed by this
9152 function should now be in the skeletons.
9153 (output_trailers): Remove.
9154 (output): Disable call to 'reader_output_yylsp'.
9155 (output_rule_data): Do not output tables to the table obstack.
9156
9157 * src/output.c: Remove some C dedicated output.
9158 Improve the use of macro and output obstacks.
9159 (output_defines): Remove.
9160
9161 * src/output.c (output_token_translations): Associate 'translate'
9162 table with a macro. No output to the table obstack.
9163 (output_gram): Same for 'rhs' and 'prhs'.
9164 (output_stos): Same for 'stos'.
9165 (output_rule_data): Same for 'r1' and 'r2'.
9166 (token_actions): Same for 'defact'.
9167 (goto_actions): Same for 'defgoto'.
9168 (output_base): Same for 'pact' and 'pgoto'.
9169 (output_table): Same for 'table'.
9170 (output_check): Same for 'check'.
9171
9172 * src/output.c (output_table_data): New function.
9173 (output_short_table): Remove.
9174 (output_short_or_char_table): Remove.
9175
9176 * src/output.c (output_parser): Replace most of the skeleton copy code
9177 with something new. Skeletons are now processed character by character
9178 rather than line by line, and Bison looks for '%%' macros. This is the
9179 first step in making Bison's output process (a lot) more flexible.
9180 (output_parser): Use the macro table.
9181
9182 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9183
9184 * src/main.c (main): Initialize the macro table.
9185
9186 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9187
9188 * src/lex.c (percent_table): Add tok_define.
9189 * src/lex.h: Add tok_define.
9190
9191 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9192
9193 * src/macrotab.c: New file.
9194 * src/macrotab.h: New file.
9195 * src/Makefile.am: Update.
9196
9197 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
9198
9199 * lib/hash.c: New file.
9200 * lib/hash.h: New file.
9201 * lib/Makefile.am: Update.
9202
9203 2001-08-15 Akim Demaille <akim@epita.fr>
9204
9205 Version 1.28c.
9206
9207 2001-08-15 Marc Autret <autret_m@epita.fr>
9208
9209 * src/reader.c (readgram): Indent output macro YYSTYPE.
9210 (packsymbols): Likewise.
9211 (output_token_defines): Likewise.
9212 * src/files.c: Standardize.
9213 (compute_header_macro): New.
9214 (defines_obstack_save): New. Use compute_header_macro.
9215 (output_files): Update. Use defines_obstack_save.
9216
9217 2001-08-15 Akim Demaille <akim@epita.fr>
9218
9219 * doc/bison.texinfo (Table of Symbols): Document
9220 YYSTACK_USE_ALLOCA.
9221
9222 2001-08-15 Akim Demaille <akim@epita.fr>
9223
9224 * missing: Update from CVS Automake.
9225 * config/config.guess, config/config.sub, config/texinfo.tex:
9226 Update from gnu.org.
9227
9228 2001-08-15 Akim Demaille <akim@epita.fr>
9229
9230 * Makefile.maint: Sync with CVS Autoconf.
9231
9232 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
9233
9234 * doc/bison.texinfo: Include GNU Free Documentation License from
9235 `fdl.texi'.
9236 * doc/fdl.texi: Add to package.
9237
9238 2001-08-14 Marc Autret <autret_m@epita.fr>
9239
9240 Turn on %{source,header}_extension features.
9241
9242 * src/lex.c (percent_table): Un-CPP out header_extension and
9243 source_extension.
9244 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
9245 (compute_exts_from_src): Remove conditions. It restores priorities
9246 between options.
9247
9248 2001-08-14 Marc Autret <autret_m@epita.fr>
9249
9250 * src/files.c (compute_base_names): Add extensions computing when
9251 `--file-prefix' used.
9252 Standardize function calls.
9253
9254 2001-08-13 Marc Autret <autret_m@epita.fr>
9255
9256 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
9257 defining it (defined but null disables alloca).
9258
9259 2001-08-13 Marc Autret <autret_m@epita.fr>
9260
9261 * src/bison.simple (_yy_memcpy): CPP reformat.
9262
9263 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
9264
9265 * tests/atconfig.in (CPPFLAGS): Fix.
9266
9267 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
9268
9269 * doc/bison.texinfo: Include GNU General Public License from
9270 `gpl.texi'.
9271 * doc/gpl.texi: Add to package.
9272
9273 2001-08-10 Marc Autret <autret_m@epita.fr>
9274
9275 * src/print_graph.h: Fix.
9276 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
9277
9278 2001-08-10 Akim Demaille <akim@epita.fr>
9279
9280 * src/system.h: Provide default declarations for stpcpy, strndup,
9281 and strnlen.
9282
9283 2001-08-10 Robert Anisko <anisko_r@epita.fr>
9284
9285 * doc/bison.texinfo (Locations): Update @$ stuff.
9286
9287 2001-08-09 Robert Anisko <anisko_r@epita.fr>
9288
9289 * src/bison.simple (YYLLOC_DEFAULT): Update.
9290 (yyparse): Adjust.
9291
9292 2001-08-08 Marc Autret <autret_m@epita.fr>
9293
9294 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
9295 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
9296 Reported by Fabrice Bauzac.
9297
9298 2001-08-08 Marc Autret <autret_m@epita.fr>
9299
9300 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
9301 * src/vcg.c (output_node): Fix.
9302 * src/vcg.h: Cleanup.
9303 * src/print_graph.c: Add comments.
9304 (node_output_size): New global variable. Simplify the formatting of
9305 the VCG graph output.
9306 (print_actions): Unused code is now used. It notifies the final state
9307 and no action states in the VCG graph. It also give the reduce actions.
9308 The `shift and goto' edges are red and the `go to state' edges are
9309 blue.
9310 Get the current node name and node_obstack by argument.
9311 (node_obstack): New variable.
9312 (print_state): Manage node_obstack.
9313 (print_core): Use node_obstack given by argument.
9314 A node is not only computed here but in print_actions also.
9315 (print_graph): CPP out useless code instead of commenting it.
9316
9317 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
9318
9319 * tests/atconfig.in (CPPFLAGS): Fix.
9320
9321 2001-08-07 Akim Demaille <akim@epita.fr>
9322
9323 * src/print_graph.c (quote): New.
9324 (print_core): Use it.
9325
9326 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
9327
9328 * src/vcg.c (complain.h): Include it.
9329 Unepitaize `return' invocations.
9330 [NDEBUG] (main): Remove.
9331 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
9332 * src/files.c (open_files): Initialize graph_obstack.
9333 * src/print_graph.c (print_actions): CPP out useless code.
9334 (print_core): Don't output the last `\n' in labels.
9335 Use `quote'.
9336 * src/files.c (output_files): Output the VCG file.
9337 * src/main.c (main): Invoke print_graph ();
9338
9339 2001-08-06 Marc Autret <autret_m@epita.fr>
9340
9341 Automaton VCG graph output.
9342 Using option ``-g'' or long option ``--graph'', you can generate
9343 a gram_filename.vcg file containing a VCG description of the LALR (1)
9344 automaton of your grammar.
9345
9346 * src/main.c: Call to print_graph() function.
9347 * src/getargs.h: Update.
9348 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
9349 (graph_flag): New flag.
9350 (longopts): Update.
9351 (getargs): Add case `g'.
9352 * src/files.c (graph_obstack): New obstack struct.
9353 (open_files): Initialize new obstack.
9354 (output_files): Saves graph_obstack if required.
9355 * src/files.h (graph_obstack): New extern declaration.
9356 * src/Makefile.am: Add new source files.
9357
9358 2001-08-06 Marc Autret <autret_m@epita.fr>
9359
9360 * src/print_graph.c, src/print_graph.h (graph): New.
9361 * src/vcg.h: New file.
9362 * src/vcg.c: New file, VCG graph handling.
9363
9364 2001-08-06 Marc Autret <autret_m@epita.fr>
9365
9366 Add of %source_extension and %header_extension which specify
9367 the source or/and the header output file extension.
9368
9369 * src/files.c (compute_base_names): Remove initialisation of
9370 src_extension and header_extension.
9371 (compute_exts_from_gf): Update.
9372 (compute_exts_from_src): Update.
9373 (output_files): Update.
9374 * src/reader.c (parse_header_extension_decl): New.
9375 (parse_source_extension_decl): New.
9376 (read_declarations): New case statements for the new tokens.
9377 * src/lex.c (percent_table): Add entries for %source_extension
9378 and %header_extension.
9379 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
9380
9381 2001-08-06 Marc Autret <autret_m@epita.fr>
9382
9383 * configure.in: Bump to 1.28c.
9384 * doc/bison.texinfo: Texinfo thingies.
9385
9386 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
9387
9388 * tests/atconfig.in (CPPFLAGS): Add.
9389 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
9390
9391 2001-08-03 Akim Demaille <akim@epita.fr>
9392
9393 Version 1.28b.
9394
9395 2001-08-03 Akim Demaille <akim@epita.fr>
9396
9397 * tests/Makefile.am (check-local): Ship testsuite.
9398 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
9399 Include `string.h'.
9400
9401 2001-08-03 Akim Demaille <akim@epita.fr>
9402
9403 * configure.in: Try using -Wformat when compiling.
9404
9405 2001-08-03 Akim Demaille <akim@epita.fr>
9406
9407 * configure.in: Bump to 1.28b.
9408
9409 2001-08-03 Akim Demaille <akim@epita.fr>
9410
9411 * src/complain.c: Adjust strerror_r portability issues.
9412
9413 2001-08-03 Akim Demaille <akim@epita.fr>
9414
9415 Version 1.28a.
9416
9417 2001-08-03 Akim Demaille <akim@epita.fr>
9418
9419 * src/getargs.c, src/getarg.h (skeleton)): Constify.
9420 * src/lex.c (literalchar): Avoid name clashes on `buf'.
9421 * src/getargs.c: Include complain.h.
9422 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
9423 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
9424
9425 2001-08-03 Akim Demaille <akim@epita.fr>
9426
9427 * src/reader.c (readgram): Display hidden chars in error messages.
9428
9429 2001-08-03 Akim Demaille <akim@epita.fr>
9430
9431 Update to gettext 0.10.39.
9432
9433 2001-08-03 Akim Demaille <akim@epita.fr>
9434
9435 * lib/strspn.c: New.
9436
9437 2001-08-01 Marc Autret <autret_m@epita.fr>
9438
9439 * doc/bison.texinfo: Update.
9440 * doc/bison.1 (mandoc): Update.
9441 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
9442 * src/files.c: Support output files extensions computing.
9443 (src_extension): New static variable.
9444 (header_extension): New static variable.
9445 (tr): New function.
9446 (get_extension_index): New function, gets the index of an extension
9447 filename in a string.
9448 (compute_exts_from_gf): New function, computes extensions from the
9449 grammar file extension.
9450 (compute_exts_from_src): New functions, computes extensions from the
9451 C source file extension, file given by ``-o'' option.
9452 (compute_base_names): Update.
9453 (output_files): Update.
9454
9455 2001-08-01 Robert Anisko <anisko_r@epita.fr>
9456
9457 * doc/bison.texi: Document @$.
9458 (Locations): New section.
9459
9460 2001-07-18 Akim Demaille <akim@epita.fr>
9461
9462 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
9463 * config/prev-version.txt, config/move-if-change: New.
9464 * Makefile.am: Adjust.
9465
9466 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
9467
9468 * src/bison.simple (yyparse): Suppress warning `comparaison
9469 between signed and unsigned'.
9470
9471 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
9472
9473 * src/getargs.h (raw_flag): Remove.
9474 * src/getargs.c: Die on `-r'/`--raw'.
9475 * src/lex.c (parse_percent_token): Die on `%raw'.
9476 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
9477 * tests/calc.at: Suppress test with option `--raw'.
9478
9479 2001-07-14 Akim Demaille <akim@epita.fr>
9480
9481 * config/: New.
9482 * configure.in: Require Autoconf 2.50.
9483 Update to gettext 0.10.38.
9484
9485 2001-03-16 Akim Demaille <akim@epita.fr>
9486
9487 * doc/bison.texinfo: ANSIfy the examples.
9488
9489 2001-03-16 Akim Demaille <akim@epita.fr>
9490
9491 * getargs.c (skeleton): New variable.
9492 (longopts): --skeleton is a new option.
9493 (shortopts, getargs): -S is a new option.
9494 * getargs.h: Declare skeleton.
9495 * output.c (output_parser): Use it.
9496
9497 2001-03-16 Akim Demaille <akim@epita.fr>
9498
9499 * m4/strerror_r.m4: New.
9500 * m4/error.m4: Run AC_FUNC_STRERROR_R.
9501 * lib/error.h, lib/error.c: Update.
9502
9503 2001-03-16 Akim Demaille <akim@epita.fr>
9504
9505 * src/getargs.c (longopts): Clean up.
9506
9507 2001-02-21 Akim Demaille <akim@epita.fr>
9508
9509 * src/reader.c (gensym): `gensym_count' is your own.
9510 Use a static buf to create the symbol name, as token_buffer is no
9511 longer a buffer.
9512
9513 2001-02-08 Akim Demaille <akim@epita.fr>
9514
9515 * src/conflicts.c (conflict_report): Be sure not to append to res
9516 between two calls, which could happen if both first sprintf were
9517 skipped, but not the first cp += strlen.
9518
9519 2001-02-08 Akim Demaille <akim@epita.fr>
9520
9521 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
9522 New, from fileutils 4.0.37.
9523 * configure.in: Require Autoconf 2.49c. I took some time before
9524 making this decision. This is the only way out for portability
9525 issues in Bison, it would mean way too much duplicate effort to
9526 import in Bison features implemented in 2.49c since 2.13.
9527 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
9528
9529 2001-02-02 Akim Demaille <akim@epita.fr>
9530
9531 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
9532 * lib/xalloc.h, lib/xmalloc.c: Update.
9533
9534 2001-01-19 Akim Demaille <akim@epita.fr>
9535
9536 Get rid of the ad hoc handling of token_buffer in the scanner: use
9537 the obstacks.
9538
9539 * src/lex.c (token_obstack): New.
9540 (init_lex): Initialize it. No longer call...
9541 (grow_token_buffer): this. Remove it.
9542 Adjust all the places which used it to use the obstack.
9543
9544 2001-01-19 Akim Demaille <akim@epita.fr>
9545
9546 * src/lex.h: Rename all the tokens:
9547 s/\bENDFILE\b/tok_eof/g;
9548 s/\bIDENTIFIER\b/tok_identifier/g;
9549 etc.
9550 Let them be enums, not #define, to ease debugging.
9551 Adjust all the code.
9552
9553 2001-01-18 Akim Demaille <akim@epita.fr>
9554
9555 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
9556 * src/lex.c (maxtoken, grow_token_buffer): Static.
9557
9558 2001-01-18 Akim Demaille <akim@epita.fr>
9559
9560 Since we now use obstacks, more % directives can be enabled.
9561
9562 * src/lex.c (percent_table): Also accept `%yacc',
9563 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
9564 `%debug'.
9565 Handle the actions for `%semantic_parser' and `%pure_parser' here,
9566 instead of returning a token.
9567 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
9568 * src/reader.c (read_declarations): Adjust.
9569 * src/files.c (open_files): Don't call `compute_base_names', don't
9570 compute `attrsfile' since they depend upon data which might be
9571 *in* the input file now.
9572 (output_files): Do it here.
9573 * src/output.c (output_headers): Document the fact that this patch
9574 introduces a guaranteed SEGV for semantic parsers.
9575 * doc/bison.texinfo: Document them.
9576 * tests/suite.at: Exercise these %options.
9577
9578 2000-12-20 Akim Demaille <akim@epita.fr>
9579
9580 Also handle the output file (--verbose) with obstacks.
9581
9582 * files.c (foutput): Remove.
9583 (output_obstack): New.
9584 Adjust all dependencies.
9585 * src/conflicts.c: Return a string.
9586 * src/system.h (obstack_grow_string): Rename as...
9587 (obstack_sgrow): this. Be ready to work with non literals.
9588 (obstack_fgrow4): New.
9589
9590 2000-12-20 Akim Demaille <akim@epita.fr>
9591
9592 * src/files.c (open_files): Fix the computation of short_base_name
9593 in the case of `-o foo.tab.c'.
9594
9595 2000-12-20 Akim Demaille <akim@epita.fr>
9596
9597 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
9598 (copy_dollar): Now that everything uses obstacks, get rid of the
9599 FILE * parameters.
9600
9601 2000-12-20 Akim Demaille <akim@epita.fr>
9602
9603 * src/files.c (open_files): Actually the `.output' file is based
9604 on the short_base_name, not base_name.
9605 * tests/suite.at (Checking output file names): Adjust.
9606
9607 2000-12-20 Akim Demaille <akim@epita.fr>
9608
9609 * src/bison.s1: Remove, we now use directly...
9610 * src/bison.simple: this.
9611 * src/Makefile.am: Use pkgdata instead of data.
9612
9613 2000-12-20 Akim Demaille <akim@epita.fr>
9614
9615 * src/files.c (guard_obstack): New.
9616 (open_files): Initialize it.
9617 (output_files): Dump it...
9618 * src/files.h: Export it.
9619 * src/reader.c (copy_guard): Use it.
9620
9621 2000-12-19 Akim Demaille <akim@epita.fr>
9622
9623 * src/files.c (outfile, defsfile, actfile): Removed as global
9624 vars.
9625 (open_files): Don't compute them.
9626 (output_files): Adjust.
9627 (base_name, short_base_name): Be global.
9628 Adjust dependencies.
9629
9630 2000-12-19 Akim Demaille <akim@epita.fr>
9631
9632 * src/files.c (strsuffix): New.
9633 (stringappend): Be just like strcat but allocate.
9634 (base_names): Eve out from open_files.
9635 Try to simplify the rather hairy computation of base_name and
9636 short_base_name.
9637 (open_files): Use it.
9638 * tests/suite.at (Checking output file names): New test.
9639
9640 2000-12-19 Akim Demaille <akim@epita.fr>
9641
9642 * src/system.h (obstack_grow_literal_string): Rename as...
9643 (obstack_grow_string): this.
9644 * src/output.c (output_parser): Recognize `%% actions' instead of
9645 `$'.
9646 * src/bison.s1: s/$/%% actions/.
9647 * src/bison.hairy: Likewise.
9648
9649 2000-12-19 Akim Demaille <akim@epita.fr>
9650
9651 * src/output.c (output_parser): Compute the `#line' lines when
9652 there are.
9653 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
9654 Suggested by Hans Aberg.
9655
9656 2000-12-19 Akim Demaille <akim@epita.fr>
9657
9658 Let the handling of the skeleton files be local to the procedures
9659 that use it.
9660
9661 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
9662 longer static.
9663 (fparser, open_extra_files): Remove.
9664 (open_files, output_files): Don't take care of fparser.
9665 * src/files.h: Adjust.
9666 * src/output.c (output_parser): Open and close the file to the
9667 skeleton.
9668 * src/reader.c (read_declarations): When %semantic_parser, open
9669 fguard.
9670
9671 2000-12-19 Akim Demaille <akim@epita.fr>
9672
9673 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
9674 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
9675
9676 2000-12-19 Akim Demaille <akim@epita.fr>
9677
9678 * src/files.c (open_files): Yipee! We no longer need all the code
9679 looking for `/tmp' since we have no tmp file.
9680
9681 2000-12-19 Akim Demaille <akim@epita.fr>
9682
9683 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
9684 New macros.
9685 * src/files.c (open_files): Less dependency on MSDOS etc.
9686
9687 2000-12-14 Akim Demaille <akim@epita.fr>
9688
9689 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
9690 Provide a default definition.
9691 Use it when executing the default @ action.
9692 * src/reader.c (reader_output_yylsp): No longer include
9693 `timestamp' and `text' in the default YYLTYPE.
9694
9695 2000-12-12 Akim Demaille <akim@epita.fr>
9696
9697 * src/reader.c (copy_definition, parse_union_decl, copy_action)
9698 (copy_guard): Quote the file names.
9699 Reported by Laurent Mascherpa.
9700
9701 2000-12-12 Akim Demaille <akim@epita.fr>
9702
9703 * src/output.c (output_headers, output_program, output): Be sure
9704 to escape special characters when outputting filenames.
9705 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
9706 (output_headers): Don't depend on them, Use ACTSTR.
9707
9708 2000-11-17 Akim Demaille <akim@epita.fr>
9709
9710 * lib/obstack.h: Formatting changes.
9711 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
9712 prevents type checking.
9713 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
9714 cast the value to (void *): assigning a `foo *' to a `void *'
9715 variable is valid.
9716 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
9717 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
9718 append characters.
9719
9720 2000-11-17 Akim Demaille <akim@epita.fr>
9721
9722 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
9723 as...
9724 (suite.m4, regression.m4, calc.m4): these.
9725 * tests/atgeneral.m4: Update from CVS Autoconf.
9726
9727 2000-11-17 Akim Demaille <akim@epita.fr>
9728
9729 * tests/regression.m4 (%union and --defines): New test,
9730 demonstrating a current bug in the obstack implementation.
9731
9732 2000-11-17 Akim Demaille <akim@epita.fr>
9733
9734 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
9735 macros.
9736 Use them to declare the variables which are global or local to
9737 `yyparse'.
9738
9739 2000-11-17 Akim Demaille <akim@epita.fr>
9740
9741 * acconfig.h: Remove, no longer used.
9742
9743 2000-11-07 Akim Demaille <akim@epita.fr>
9744
9745 * src: s/Copyright (C)/Copyright/g.
9746
9747 2000-11-07 Akim Demaille <akim@epita.fr>
9748
9749 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
9750 defining.
9751 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
9752
9753 2000-11-07 Akim Demaille <akim@epita.fr>
9754
9755 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
9756 Merge in a single CPP if/else.
9757
9758 2000-11-07 Akim Demaille <akim@epita.fr>
9759
9760 * src/output.c (output): Remove useless variables.
9761 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
9762 argument `data' for consistency with the prototypes.
9763 Qualify it `const'.
9764 (obstack_copy, obstack_copy0): Rename the second argument as
9765 `address' for consistency. Qualify it `const'.
9766 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
9767 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
9768 `const' their input argument (`data' or `address').
9769 Adjust the corresponding macros to include `const' in casts.
9770
9771 2000-11-03 Akim Demaille <akim@epita.fr>
9772
9773 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
9774 s/PFILE1/BISON_HAIRY/.
9775 Adjust dependencies.
9776
9777 2000-11-03 Akim Demaille <akim@epita.fr>
9778
9779 For some reason, this was not applied.
9780
9781 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9782 `unlink': it's no longer used.
9783
9784 2000-11-03 Akim Demaille <akim@epita.fr>
9785
9786 * src/files.c (skeleton_find): New function, eved out of...
9787 (open_files, open_extra_files): here.
9788
9789 2000-11-03 Akim Demaille <akim@epita.fr>
9790
9791 Don't use `atexit'.
9792
9793 * src/files.c (obstack_save): New function.
9794 (done): Rename as...
9795 (output_files): this.
9796 Use `obstack_save'.
9797 * src/main.c (main): Don't use `atexit' to register `done', since
9798 it no longer has to remove tmp files, just call `output_files'
9799 when there are no errors.
9800
9801 2000-11-02 Akim Demaille <akim@epita.fr>
9802
9803 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
9804 `unlink': it's no longer used.
9805 * src/files.h: Formatting changes.
9806
9807 2000-11-02 Akim Demaille <akim@epita.fr>
9808
9809 Remove the last uses of mktemp and unlink/delete.
9810
9811 * src/files.c (fdefines, ftable): Removed.
9812 (defines_ostack, table_obstack): New.
9813 Adjust dependencies of the former into uses of the latter.
9814 * src/output.c (output_short_or_char_table, output_short_table):
9815 Convert to using obstacks.
9816 * src/reader.c (copy_comment2): Accept one FILE * and two
9817 obstacks.
9818 (output_token_defines, reader_output_yylsp): Use obstacks.
9819 * src/system.h (obstack_fgrow3): New.
9820
9821 2000-11-01 Akim Demaille <akim@epita.fr>
9822
9823 Change each use of `fattrs' into a use of `attrs_obstack'.
9824
9825 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
9826 * src/files.c (fattrs): Remove.
9827 (attrs_obstack): New.
9828 Adjust all dependencies.
9829 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
9830
9831 2000-11-01 Akim Demaille <akim@epita.fr>
9832
9833 Introduce obstacks.
9834 Change each use of `faction' into a use of `action_obstack'.
9835
9836 * lib/obstack.h, lib/obstack.c: New files.
9837 * src/files.c (faction): Remove.
9838 (action_obstack): New.
9839 Adjust all dependencies.
9840
9841 2000-10-20 Akim Demaille <akim@epita.fr>
9842
9843 * lib/quote.h (PARAMS): New macro. Use it.
9844
9845 2000-10-16 Akim Demaille <akim@epita.fr>
9846
9847 * src/output.c (output_short_or_char_table): New function.
9848 (output_short_table, output_token_translations): Use it.
9849 (goto_actions): Use output_short_table.
9850
9851 2000-10-16 Akim Demaille <akim@epita.fr>
9852
9853 * src/symtab.c (bucket_new): New function.
9854 (getsym): Use it.
9855
9856 * src/output.c (output_short_table): New argument to display the
9857 comment associated with the table.
9858 Adjust dependencies.
9859 (output_gram): Use it.
9860 (output_rule_data): Nicer output layout for YYTNAME.
9861
9862 2000-10-16 Akim Demaille <akim@epita.fr>
9863
9864 * src/lex.c (read_typename): New function.
9865 (lex): Use it.
9866 * src/reader.c (copy_dollar): Likewise.
9867
9868 2000-10-16 Akim Demaille <akim@epita.fr>
9869
9870 * src/reader.c (copy_comment2): Expect the input stream to be on
9871 the `/' which is suspected to open a comment, instead of being
9872 called after `//' or `/*' was read.
9873 (copy_comment, copy_definition, parse_union_decl, copy_action)
9874 (copy_guard): Adjust.
9875
9876 2000-10-16 Akim Demaille <akim@epita.fr>
9877
9878 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9879 `read_signed_integer'.
9880
9881 2000-10-16 Akim Demaille <akim@epita.fr>
9882
9883 * src/reader.c (copy_dollar): New function.
9884 (copy_guard, copy_action): Use it.
9885
9886 2000-10-16 Akim Demaille <akim@epita.fr>
9887
9888 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9889 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9890 New files, from Fileutils 4.0.27.
9891 * src/main.c (printable_version): Remove.
9892 * src/lex.c, src/reader.c: Use `quote'.
9893
9894 2000-10-04 Akim Demaille <akim@epita.fr>
9895
9896 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9897
9898 2000-10-04 Akim Demaille <akim@epita.fr>
9899
9900 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9901
9902 2000-10-04 Akim Demaille <akim@epita.fr>
9903
9904 When a literal string is used to define two different tokens,
9905 `bison -v' segfaults.
9906 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9907
9908 * tests/regression.m4: New file.
9909 Include the core of the sample provided by Piotr Gackiewicz.
9910 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9911 properly.
9912
9913 2000-10-04 Akim Demaille <akim@epita.fr>
9914
9915 * src/reader.c (parse_expect_decl): Keep `count' within the size
9916 of `buffer'.
9917 From Neil Booth.
9918
9919 2000-10-02 Paul Eggert <eggert@twinsun.com>
9920
9921 * bison.s1 (yyparse): Assign the default value
9922 unconditionally, to avoid a GCC warning and make the parser a
9923 tad smaller.
9924
9925 2000-10-02 Akim Demaille <akim@epita.fr>
9926
9927 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9928 options.
9929
9930 2000-10-02 Akim Demaille <akim@epita.fr>
9931
9932 * src/derives.c, src/print.c, src/reduce.c: To ease the
9933 translation, move some `\n' out of the translated strings.
9934
9935 2000-10-02 Akim Demaille <akim@epita.fr>
9936
9937 The location tracking mechanism is precious for parse error
9938 messages. Nevertheless, it is enabled only when `@n' is used in
9939 the grammar, which is a different issue (you can use it in error
9940 message, but not in the grammar per se). Therefore, there should
9941 be another means to enable it.
9942
9943 * src/getargs.c (getargs): Support `--locations'.
9944 (usage): Report it.
9945 * src/getargs.h (locationsflag): Export it.
9946 * src/lex.c (percent_table): Support `%locations'.
9947 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9948 with `locationsflag'.
9949 * doc/bison.texinfo: Document `--locations' and `%locations'.
9950 Sort the options.
9951 * tests/calc.m4: Test it.
9952
9953 For regularity of the names, replace each
9954 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9955 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9956 In addition replace each `flag' with `_flag'.
9957
9958 2000-10-02 Akim Demaille <akim@epita.fr>
9959
9960 Also test parse error messages, including with YYERROR_VERBOSE.
9961
9962 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9963 associative).
9964 Use it to check the computations.
9965 Use it to check `nonassoc' is honored.
9966 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9967 `--yyerror-verbose'.
9968 (_AT_CHECK_CALC): Adjust to this option.
9969 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9970
9971 2000-10-02 Akim Demaille <akim@epita.fr>
9972
9973 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9974 the latter demonstrates a flaw in the handling of non debugging
9975 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9976 was used in order to simplify:
9977
9978 #if YYDEBUG
9979 if (yydebug)
9980 {
9981 ...
9982 }
9983 #endif
9984
9985 into
9986
9987 if (yydebug)
9988 {
9989 ...
9990 }
9991
9992 unfortunately this leads to a CPP conflict when
9993 `--name-prefix=foo' is used since it produces `#define yydebug
9994 foodebug'.
9995
9996 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9997 (YYDPRINTF): New macro.
9998 Spread its use.
9999 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
10000 the bison options.
10001 Also test `--verbose', `--defines' and `--name-prefix'.
10002
10003 2000-10-02 Akim Demaille <akim@epita.fr>
10004
10005 Improve the readability of the produced parsers.
10006
10007 * src/bison.s1: Formatting changes.
10008 Improve the comment related to the `$' mark.
10009 (yydefault): Don't fall through to `yyresume': `goto' there.
10010 * src/output.c (output_parser): When the `$' is met, skip the end
10011 of its line.
10012 New variable, `number_of_dollar_signs', to check there's exactly
10013 one `$' in the parser skeleton.
10014
10015 2000-10-02 Akim Demaille <akim@epita.fr>
10016
10017 * lib/xstrdup.c: New file, from the fileutils.
10018 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
10019 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
10020 instead of strlen + xmalloc + strcpy.
10021 * src/symtab.c (copys): Remove, use xstrdup instead.
10022
10023 2000-10-02 Akim Demaille <akim@epita.fr>
10024
10025 * src/gram.h (associativity): New enum type which replaces the
10026 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
10027 `right_assoc', `left_assoc' and `non_assoc'.
10028 Adjust all dependencies.
10029 * src/reader.c: Formatting changes.
10030 (LTYPESTR): Don't define it, use it as a literal in
10031 `reader_output_yylsp'.
10032 * src/symtab.h (symbol_class): New enum type which replaces the
10033 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
10034 `sunknown', `stoken and `snterm'.
10035
10036 2000-10-02 Akim Demaille <akim@epita.fr>
10037
10038 * src/getargs.c (fixed_outfiles): Rename as...
10039 (yaccflag): for consistency and accuracy.
10040 Adjust dependencies.
10041
10042 2000-10-02 Akim Demaille <akim@epita.fr>
10043
10044 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
10045 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
10046 difficult and introduced a lot of core dump. It turns out that
10047 Bison used an implementation of `xmalloc' based on `calloc', and
10048 at various places it does depend upon the initialization to 0. I
10049 have not tried to isolate the pertinent places, and all the former
10050 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
10051 someone should address this issue.
10052
10053 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
10054 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
10055 files.
10056 Adjust dependencies.
10057 * src/warshall.h: New file.
10058 Propagate.
10059
10060 2000-10-02 Akim Demaille <akim@epita.fr>
10061
10062 Various anti-`extern in *.c' changes.
10063
10064 * src/system.h: Include `assert.h'.
10065
10066 2000-10-02 Akim Demaille <akim@epita.fr>
10067
10068 * src/state.h (nstates, final_state, first_state, first_shift)
10069 (first_reduction): Move their exportation from here...
10070 * src/LR0.h: to here.
10071 Adjust dependencies.
10072 * src/getargs.c (statisticsflag): New variable.
10073 Add support for `--statistics'.
10074 Adjust dependencies.
10075
10076 Remove a lot of now useless `extern' statements in most files.
10077
10078 2000-10-02 Akim Demaille <akim@epita.fr>
10079
10080 * src/LR0.h: New file.
10081 Propagate its use.
10082
10083 2000-10-02 Akim Demaille <akim@epita.fr>
10084
10085 * src/print.h: New file.
10086 Propagate its use.
10087 * src/print.c: Formatting and ordering changes.
10088 (verbose, terse): Replace with...
10089 (print_results): this new function.
10090 Adjust dependencies.
10091
10092 2000-10-02 Akim Demaille <akim@epita.fr>
10093
10094 * src/conflicts.c (conflict_report): New function.
10095 (conflict_log, verbose_conflict_log): Replace with...
10096 (print_conflicts): this function.
10097 Adjust dependencies.
10098 * src/conflicts.h: New file.
10099 Propagate its inclusion.
10100
10101 2000-10-02 Akim Demaille <akim@epita.fr>
10102
10103 * src/nullable.h: New file.
10104 Propagate its inclusion.
10105 * src/nullable.c: Formatting changes.
10106
10107 2000-10-02 Akim Demaille <akim@epita.fr>
10108
10109 * src/reduce.h: New file.
10110 Propagate its inclusion.
10111 * src/reduce.c: Topological sort and other formatting changes.
10112 (bool, TRUE, FALSE): Move their definition to...
10113 * src/system.h: here.
10114
10115 2000-10-02 Akim Demaille <akim@epita.fr>
10116
10117 * src/files.c: Formatting changes.
10118 (tryopen, tryclose, openfiles): Rename as...
10119 (xfopen, xfclose, open_files): this.
10120 (stringappend): static.
10121 * src/files.h: Complete the list of exported symbols.
10122 Propagate its use.
10123
10124 2000-10-02 Akim Demaille <akim@epita.fr>
10125
10126 * src/reader.h: New file.
10127 Propagate its use instead of tedious list of `extern' and
10128 prototypes.
10129 * src/reader.c: Formatting changes, topological sort,
10130 s/register//.
10131
10132 2000-10-02 Akim Demaille <akim@epita.fr>
10133
10134 * src/lex.h: Prototype `lex.c' exported functions.
10135 * src/reader.c: Adjust.
10136 * src/lex.c: Formatting changes.
10137 (safegetc): Rename as...
10138 (xgetc): this.
10139
10140 2000-10-02 Akim Demaille <akim@epita.fr>
10141
10142 * src/lalr.h: New file.
10143 Propagate its inclusion instead of prototypes and `extern'.
10144 * src/lalr.c: Formatting changes, topological sorting etc.
10145
10146 2000-10-02 Akim Demaille <akim@epita.fr>
10147
10148 * src/output.c (token_actions): Introduce a temporary array,
10149 YYDEFACT, that makes it possible for this function to use
10150 output_short_table.
10151
10152 2000-10-02 Akim Demaille <akim@epita.fr>
10153
10154 `user_toknums' is output as a `short[]' in `output.c', while it is
10155 defined as a `int[]' in `reader.c'. For consistency with the
10156 other output tables, `user_toknums' is now defined as a table of
10157 shorts.
10158
10159 * src/reader.c (user_toknums): Be a short table instead of an int
10160 table.
10161 Adjust dependencies.
10162
10163 Factor the short table outputs.
10164
10165 * src/output.c (output_short_table): New function.
10166 * src/output.c (output_gram, output_stos, output_rule_data)
10167 (output_base, output_table, output_check): Use it.
10168
10169 2000-10-02 Akim Demaille <akim@epita.fr>
10170
10171 * src/output.c (output): Topological sort of the functions, in
10172 order to get rid of the `static' prototypes.
10173 No longer use `register'.
10174 * src/output.h: New file.
10175 Propagate its inclusion in files explicitly prototyping functions
10176 from output.c.
10177
10178 2000-09-21 Akim Demaille <akim@epita.fr>
10179
10180 * src/atgeneral.m4: Update from Autoconf.
10181
10182 2000-09-21 Akim Demaille <akim@epita.fr>
10183
10184 * src/closure.h: New file.
10185 * src/closure.c: Formatting changes, topological sort over the
10186 functions, use of closure.h.
10187 (initialize_closure, finalize_closure): Rename as...
10188 (new_closure, free_closure): these. Adjust dependencies.
10189 * src/LR0.c: Formatting changes, topological sort, use of
10190 cloture.h.
10191 (initialize_states): Rename as...
10192 (new_states): this.
10193 * src/Makefile.am (noinst_HEADERS): Adjust.
10194
10195 2000-09-20 Akim Demaille <akim@epita.fr>
10196
10197 * src/acconfig.h: Don't protect config.h against multiple
10198 inclusion.
10199 Don't define PARAMS.
10200 * src/system.h: Define PARAMS.
10201 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
10202 purpose of config.h. system.h must not try to fix wrong
10203 definitions in config.h.
10204
10205 2000-09-20 Akim Demaille <akim@epita.fr>
10206
10207 * src/derives.h: New file.
10208 * src/main.c, src/derives.h: Use it.
10209 Formatting changes.
10210 * src/Makefile.am (noinst_HEADERS): Adjust.
10211
10212 2000-09-20 Akim Demaille <akim@epita.fr>
10213
10214 * tests/atgeneral.m4: Update from Autoconf.
10215 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
10216 (AT_CHECK_CALC): New macros.
10217 Use these macros to test bison with options `', `--raw',
10218 `--debug', `--yacc', `--yacc --debug'.
10219
10220 2000-09-19 Akim Demaille <akim@epita.fr>
10221
10222 * src/output.c: Formatting changes.
10223 * src/machine.h: Remove, leaving its contents in...
10224 * src/system.h: here.
10225 Include stdio.h.
10226 Adjust all dependencies on stdio.h and machine.h.
10227 * src/getargs.h: New file.
10228 Let all `extern' declarations about getargs.c be replaced with
10229 inclusion of `getargs.h'.
10230 * src/Makefile.am (noinst_HEADERS): Adjust.
10231
10232 * tests/calc.m4 (yyin): Be initialized in main, not on the global
10233 scope.
10234 (yyerror): Returns void, not int.
10235 * doc/bison.texinfo: Formatting changes.
10236
10237 2000-09-19 Akim Demaille <akim@epita.fr>
10238
10239 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
10240 portable.
10241
10242 2000-09-18 Akim Demaille <akim@epita.fr>
10243
10244 * configure.in: Append WARNING_CFLAGS to CFLAGS.
10245 * src/Makefile.am (INCLUDES): Don't.
10246 Be ready to fetch headers in lib/.
10247
10248 2000-09-18 Akim Demaille <akim@epita.fr>
10249
10250 * doc/bison.texinfo: Update the copyright.
10251 ANSIfy and GNUify the examples.
10252 Remove the old menu.
10253
10254 2000-09-18 Akim Demaille <akim@epita.fr>
10255
10256 First set of tests: use the `calc' example from the documentation.
10257
10258 * src/bison.s1 (yyparse): Condition the code using `yytname' which
10259 is defined only when YYDEBUG is.
10260 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
10261 * src/files.c (tryopen, tryclose): Formatting changes.
10262 Move to the top and be static.
10263 * src/reader.c (read_signed_integer): Likewise.
10264 * tests/calc.m4: New file.
10265 * Makefile.am, suite.m4: Adjust.
10266 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
10267
10268 2000-09-18 Akim Demaille <akim@epita.fr>
10269
10270 Add support for an Autotest test suite for Bison.
10271
10272 * m4/m4.m4, m4/atconfig.m4: New files.
10273 * m4/Makefile.am (EXTRA_DIST): Adjust.
10274 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
10275 files.
10276 * src/getargs.c: Display a more standard --version message.
10277 * src/reader.c (reader): Formatting changes.
10278 No longer depend upon VERSION_STRING.
10279 * configure.in: No longer use `dnl'.
10280 Set up the test suite and the new directory `tests/.
10281 (VERSION_STRING): Remove.
10282
10283 2000-04-14 Akim Demaille <akim@epita.fr>
10284
10285 * src/reader.c (copy_comment2): New function, same as former
10286 `copy_comment', but outputs into two FILE *.
10287 (copy_comment): Use it.
10288 (parse_union_decl): Use it.
10289 (get_type, parse_start_decl): Use the same `invalid' message.
10290 (parse_start_decl, parse_union_decl): Use the same `multiple'
10291 message.
10292 (parse_union_decl, copy_guard, copy_action): Use the same
10293 `unmatched' message.
10294 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
10295
10296 2000-03-31 Akim Demaille <akim@epita.fr>
10297
10298 * src/files.c (tryopen, tryclose): Move to the top.
10299 Be static.
10300
10301 2000-03-31 Akim Demaille <akim@epita.fr>
10302
10303 * src/main.c (main): Don't call `done', exit does it.
10304
10305 2000-03-31 Akim Demaille <akim@epita.fr>
10306
10307 * allocate.c: s/return (foo)/return foo/.
10308 * lalr.c: Likewise.
10309 * LR0.c: Likewise.
10310 * output.c: Likewise.
10311 * reader.c: Likewise.
10312 * symtab.c: Likewise.
10313 * vmsgetargs.c: Likewise.
10314
10315 2000-03-31 Akim Demaille <akim@epita.fr>
10316
10317 Clean up the error reporting functions.
10318
10319 * src/report.c: New file.
10320 * src/report.h: Likewise.
10321 * src/Makefile.am: Adjust.
10322 * m4/error.m4: New file.
10323 * m4/Makefile.am: Adjust.
10324 * configure.in (jm_PREREQ_ERROR): Call it.
10325 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
10326 Remove.
10327 (fatal, fatals): Remove. All callers use complain.c::fatal.
10328 (warn, warni, warns, warnss, warnss): Remove. All callers use
10329 complain.c::complain.
10330 (toomany): Remove, use fatal instead.
10331 * src/files.c (done): No argument, use complain_message_count.
10332 * src/main.c (main): Register `done' to `atexit'.
10333
10334 * src/getargs.c (usage): More `fputs', less `fprintf'.
10335
10336 2000-03-28 Akim Demaille <akim@epita.fr>
10337
10338 * lib/: New directory.
10339 * Makefile.am (SUBDIRS): Adjust.
10340 * configure.in: Adjust.
10341 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
10342 useless.
10343 * src/alloca.c: Moved to lib/.
10344 * src/getopt.c: Likewise.
10345 * src/getopt1.c: Likewise.
10346 * src/getopt.h: Likewise.
10347 * src/ansi2knr.c: Likewise.
10348 * src/ansi2knr.1: Likewise.
10349 * src/Makefile.am: Adjust.
10350 * lib/Makefile.am: New file.
10351
10352 2000-03-28 Akim Demaille <akim@epita.fr>
10353
10354 * src/getargs.c (usage): Refresh the help message.
10355
10356 2000-03-17 Akim Demaille <akim@epita.fr>
10357
10358 * src/getopt1.c: Updated from textutils 2.0e
10359 * src/getopt.c: Likewise.
10360 * src/getopt.h: Likewise.
10361
10362 2000-03-17 Akim Demaille <akim@epita.fr>
10363
10364 * src/Makefile.am (bison.simple): Fix the awk program: quote only
10365 the file name, not the whole `#line LINE FILE'.
10366
10367 2000-03-17 Akim Demaille <akim@epita.fr>
10368
10369 On syntax errors, report the token on which we choked.
10370
10371 * src/bison.s1 (yyparse): In the label yyerrlab, when
10372 YYERROR_VERBOSE, add yychar in msg.
10373
10374 2000-03-17 Akim Demaille <akim@epita.fr>
10375
10376 * src/reader.c (copy_at): New function.
10377 (copy_guard): Use it.
10378 (copy_action): Use it.
10379
10380 2000-03-17 Akim Demaille <akim@epita.fr>
10381
10382 Be kind to translators, save some useless translations.
10383
10384 * src/main.c (banner): New function.
10385 (fatal_banner): Use it.
10386 (warn_banner): Use it.
10387
10388 2000-03-17 Akim Demaille <akim@epita.fr>
10389
10390 * src/reader.c (copy_definition): Use copy_string and
10391 copy_comment. Removed now unused `match', `ended',
10392 `cplus_comment'.
10393 (copy_comment, copy_string): Moved, to be visible from
10394 copy_definition.
10395
10396 2000-03-17 Akim Demaille <akim@epita.fr>
10397
10398 * src/reader.c (copy_string): Declare `static inline'. No
10399 problems with inline, since it is checked by configure.
10400 (copy_comment): Likewise.
10401
10402 2000-03-17 Akim Demaille <akim@epita.fr>
10403
10404 * src/reader.c (packsymbols): Formatting changes.
10405
10406 2000-03-17 Akim Demaille <akim@epita.fr>
10407
10408 * src/reader.c (copy_comment): New function, factored out from:
10409 (copy_action): Use it. Removed now unused `match', `ended',
10410 `cplus_comment'.
10411 (copy_guard): Likewise.
10412
10413 2000-03-17 Akim Demaille <akim@epita.fr>
10414
10415 * src/reader.c (copy_string): New function, factored out from:
10416 (copy_action): Use it.
10417 (copy_guard): Likewise.
10418
10419 2000-03-17 Akim Demaille <akim@epita.fr>
10420
10421 Change the handling of @s so that they behave exactly like $s.
10422 There is now a pseudo variable @$ (readble and writable), location
10423 of the lhs of the rule (by default ranging from the location of
10424 the first symbol of the rhs, to the location of the last symbol,
10425 or, if the rhs is empty, YYLLOC).
10426
10427 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
10428 yyval.
10429 (yyparse): When providing a default semantic action, provide a
10430 default location action.
10431 (after the $): No longer change `*YYLSP', just stack YYLOC the
10432 same way you stack YYVAL.
10433 * src/reader.c (read_declarations): Use warns.
10434 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
10435 (copy_action, case '@'): Likewise.
10436 Use a standard error message, to save useless work from
10437 translators.
10438
10439 2000-03-17 Akim Demaille <akim@epita.fr>
10440
10441 * src/bison.s1: Formatting and cosmetics changes.
10442 * src/reader.c: Likewise.
10443 Update the Copyright notice.
10444
10445 2000-03-17 Akim Demaille <akim@epita.fr>
10446
10447 * src/bison.s1 (#line): All set to `#line' only, since the
10448 Makefile now handles them.
10449
10450 2000-03-16 Akim Demaille <akim@epita.fr>
10451
10452 * src/output.c (output_rule_data): Output the documentation of
10453 some of the tables.
10454 (Copyright notice): Update.
10455 Formatting changes.
10456
10457 2000-03-16 Akim Demaille <akim@epita.fr>
10458
10459 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
10460 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
10461 One `#if YYDEBUG' remains, since it uses variables which are
10462 defined only if `YYDEBUG != 0'.
10463
10464 2000-03-16 Akim Demaille <akim@epita.fr>
10465
10466 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
10467 and related variables so that the similarities are highlighted.
10468
10469 2000-03-16 Akim Demaille <akim@epita.fr>
10470
10471 * src/bison.s1: Properly indent CPP directives.
10472
10473 2000-03-16 Akim Demaille <akim@epita.fr>
10474
10475 * src/bison.s1: Properly indent the `alloca' CPP section.
10476
10477 2000-03-16 Akim Demaille <akim@epita.fr>
10478
10479 Do not hard code values of directories in `configure.in'.
10480 Update the `configure' tool chain.
10481
10482 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
10483 src/makefile.am.
10484 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
10485 (AC_OUTPUT): Add m4/Makefile.
10486 Bump to bison 1.28a, 1.29 has never been released.
10487 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
10488 handled via src/Makefile.am.
10489 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
10490 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
10491 autoheader.
10492 * Makefile.am (SUBDIRS): Add m4.
10493 (ACLOCAL_AM_FLAGS): New variable.
10494 (AUTOMAKE_OPTIONS): Add check-news.
10495 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
10496 the proper line number and file name.
10497 (DEFS): Propagate the location of bison library files and of the
10498 locale files.
10499 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
10500 builddir.
10501 * acinclude.m4: Remove, replaced by the directory m4.
10502 * m4/Makefile.am (EXTRA_DIST): New variable.
10503 * m4/gettext.m4: New file, from the fileutils.
10504 * m4/lcmessage.m4: Likewise
10505 * m4/progtest.m4: Likewise.
10506 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
10507
10508 2000-03-10 Akim Demaille <akim@epita.fr>
10509
10510 * src/closure.c:
10511 Formatting changes of various comments.
10512 Respect the GNU coding standards at various places.
10513 Don't use `_()' when no translation is needed.
10514
10515 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10516
10517 * src/files.c:
10518 OS/2 honors TMPDIR environment variable.
10519
10520 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10521
10522 * doc/bison.texinfo: Tweaked spelling and grammar.
10523 Updated ISBN.
10524 Removed reference to price of printed copy.
10525 Mention BISON_SIMPLE and BISON_HAIRY.
10526
10527 1999-12-13 Jesse Thilo <jthilo@gnu.org>
10528
10529 * configure.in, NEWS:
10530 Bison 1.29 released.
10531
10532 1999-10-27 Jesse Thilo <jthilo@gnu.org>
10533
10534 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
10535 Added reference card.
10536
10537 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10538
10539 * po/ru.po: Added Russian translation.
10540
10541 1999-07-26 Jesse Thilo <jthilo@gnu.org>
10542
10543 * configure.in: Added Russian translation.
10544
10545 1999-07-06 Jesse Thilo <jthilo@gnu.org>
10546
10547 * configure.in, NEWS, README:
10548 Released version 1.28.
10549
10550 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10551
10552 * src/system.h:
10553 Squashed redefinition warning on some systems.
10554
10555 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
10556 Have configure build version string instead of relying on ANSI string
10557 concatentation.
10558
10559 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10560
10561 * po/POTFILES.in: Got rid of version.c.
10562
10563 1999-06-14 Jesse Thilo <jthilo@gnu.org>
10564
10565 * acconfig.h, configure.in:
10566 Have configure build version string instead of relying on ANSI string
10567 concatentation.
10568
10569 1999-06-08 Jesse Thilo <jthilo@gnu.org>
10570
10571 * doc/bison.1:
10572 Dropped mention of `+' for long-named options.
10573
10574 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10575
10576 * src/files.c: Added <unistd.h> for unlink().
10577
10578 * src/Makefile.am, src/system.h:
10579 I18n fixes.
10580
10581 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10582
10583 * README: Added a FAQ list.
10584
10585 * configure.in, acconfig.h:
10586 I18n fixes.
10587
10588 1999-05-30 Jesse Thilo <jthilo@gnu.org>
10589
10590 * doc/FAQ, doc/Makefile.am:
10591 Added a FAQ list.
10592
10593 1999-05-19 Jesse Thilo <jthilo@gnu.org>
10594
10595 * src/alloc.h, src/symtab.h, src/version.c:
10596 Protected inclusion of "config.h" with HAVE_CONFIG_H.
10597
10598 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10599
10600 * src/.cvsignore, src/Makefile.am:
10601 Reorganized: sources in `src', documentation in `doc'.
10602
10603 * src/lex.c (literalchar):
10604 fixed the code for escaping double quotes (thanks
10605 Jonathan Czisny.)
10606
10607 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10608
10609 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
10610 Adjusted paths to reflect directory reorganization.
10611
10612 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10613
10614 * doc/.cvsignore, doc/Makefile.am:
10615 Reorganized: sources in `src', documentation in `doc'.
10616
10617 1999-04-18 Jesse Thilo <jthilo@gnu.org>
10618
10619 * configure.in:
10620 Updated AC_INIT file to reflect directory reorganization.
10621
10622 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
10623 Reorganized: sources in `src', documentation in `doc'.
10624
10625 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10626
10627 * src/allocate.c:
10628 Don't declare calloc() and realloc() if not necessary.
10629
10630 1999-04-13 Jesse Thilo <jthilo@gnu.org>
10631
10632 * configure.in, acconfig.h, acinclude.m4:
10633 Don't declare calloc() and realloc() if not necessary.
10634
10635 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10636
10637 * po/.cvsignore: Added i18n support.
10638
10639 1999-03-23 Jesse Thilo <jthilo@gnu.org>
10640
10641 * acconfig.h, configure.in, Makefile.am:
10642 Added i18n support.
10643
10644 1999-03-22 Jesse Thilo <jthilo@gnu.org>
10645
10646 * src/bison.s1: Fixed #line numbers.
10647
10648 1999-03-15 Jesse Thilo <jthilo@gnu.org>
10649
10650 * po/es.po, po/fr.po, po/nl.po, po/de.po:
10651 Added PO files from Translation Project.
10652
10653 1999-03-03 Jesse Thilo <jthilo@gnu.org>
10654
10655 * Makefile.am:
10656 Added support for non-ANSI compilers (ansi2knr).
10657
10658 1999-02-16 Jesse Thilo <jthilo@gnu.org>
10659
10660 * configure.in: Bumped version number to 1.27.
10661
10662 * Makefile.am:
10663 Added `bison.simple' to list of files removed by `make distclean'.
10664
10665 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10666
10667 * src/files.c, src/files.h:
10668 Defined locations of parser files in config.h instead of Makefile.
10669
10670 1999-02-12 Jesse Thilo <jthilo@gnu.org>
10671
10672 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
10673 Defined locations of parser files in config.h instead of Makefile.
10674
10675 1999-02-09 Jesse Thilo <jthilo@gnu.org>
10676
10677 * Makefile.am:
10678 Removed inappropriate use of $< macro.
10679
10680 1999-02-05 Jesse Thilo <jthilo@gnu.org>
10681
10682 * po/Makefile.in.in, po/POTFILES.in:
10683 Add `po' directory skeleton.
10684
10685 1999-01-27 Jesse Thilo <jthilo@gnu.org>
10686
10687 * README: Document help-bison list.
10688
10689 * configure.in: Add check for mkstemp().
10690
10691 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10692
10693 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
10694 Hush a few compiler warnings.
10695
10696 * src/files.c:
10697 Add tryclose(), which verifies that fclose was successful.
10698 Hush a couple of compiler warnings.
10699
10700 1999-01-20 Jesse Thilo <jthilo@gnu.org>
10701
10702 * Makefile.am, OChangeLog:
10703 ChangeLog is now automatically generated. Include the old version as
10704 OChangeLog.
10705
10706 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10707
10708 * 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:
10709 Update FSF address.
10710
10711 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10712
10713 * doc/bison.texinfo: Fix formatting glitch.
10714
10715 * doc/bison.texinfo: Update FSF address.
10716
10717 1999-01-14 Jesse Thilo <jthilo@gnu.org>
10718
10719 * acconfig.h: Update FSF address.
10720
10721 1999-01-08 Jesse Thilo <jthilo@gnu.org>
10722
10723 * src/system.h:
10724 Don't define PACKAGE here, since config.h defines it.
10725
10726 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10727
10728 * src/reader.c: Update copyright date.
10729
10730 * src/main.c:
10731 Ditch sprintf to statically-sized buffers in fatal/warn functions in
10732 favor of output directly to stderr (avoids buffer overruns).
10733
10734 * src/reader.c: Some checks for premature EOF.
10735
10736 * 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:
10737 Use prototypes if the compiler understands them.
10738
10739 * src/files.c: Honor TMPDIR on Unix hosts.
10740 Use prototypes if the compiler understands them.
10741
10742 * src/reader.c:
10743 Fix a couple of buffer overrun bugs.
10744 Use prototypes if the compiler understands them.
10745
10746 * src/system.h: Include unistd.h and ctype.h.
10747 Use #ifdef instead of #if for NLS symbols.
10748
10749 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10750
10751 * doc/bison.texinfo:
10752 Delete comment "consider using @set for edition number, etc..." since
10753 we now are doing so.
10754
10755 1998-12-30 Jesse Thilo <jthilo@gnu.org>
10756
10757 * configure.in:
10758 Use prototypes if the compiler understands them.
10759
10760 * NEWS: Document 1.26 highlights.
10761
10762 * Makefile.am: Require Automake 1.3 or later.
10763
10764 * acconfig.h:
10765 Use prototypes if the compiler understands them.
10766
10767 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10768
10769 * src/version.c:
10770 Use VERSION symbol from automake for version number.
10771
10772 1998-12-29 Jesse Thilo <jthilo@gnu.org>
10773
10774 * acconfig.h, configure.in, version.cin:
10775 Use VERSION symbol from automake for version number.
10776
10777 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10778
10779 * Makefile.am:
10780 Distribute original version of simple parser (bison.s1), not built
10781 version (bison.simple).
10782
10783 1998-11-28 Jesse Thilo <jthilo@gnu.org>
10784
10785 * doc/bison.texinfo: Add info dir entry.
10786
10787 * doc/bison.texinfo:
10788 Let automake put version number into documentation.
10789
10790 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10791
10792 * src/bison.cld, src/build.com, src/vmshlp.mar:
10793 Add non-RCS files from /gd/gnu/bison.
10794
10795 1998-11-26 Jesse Thilo <jthilo@gnu.org>
10796
10797 * doc/bison.1:
10798 Document the BISON_HAIRY and BISON_SIMPLE variables.
10799
10800 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10801
10802 * src/version.c: Build version.c automatically.
10803
10804 * src/reader.c:
10805 Fix token numbering (used to start at 258, not 257).
10806
10807 * src/system.h: Include config.h.
10808
10809 * src/getargs.c: Update bug report address.
10810
10811 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
10812 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
10813
10814 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10815
10816 * Makefile.am:
10817 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10818
10819 * configure.in, version.cin:
10820 Build version.c automatically.
10821
10822 * AUTHORS: Add AUTHORS file.
10823
10824 * README: Update bug report address.
10825
10826 * bison.simple:
10827 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
10828
10829 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
10830 Add automake stuff.
10831
10832 1998-11-25 Jesse Thilo <jthilo@gnu.org>
10833
10834 * doc/bison.texinfo: Clean up some formatting.
10835
10836 1998-05-05 Richard Stallman <rms@gnu.org>
10837
10838 * doc/bison.texinfo:
10839 Explain better why to make a pure parser.
10840
10841 1998-01-05 Richard Stallman <rms@gnu.org>
10842
10843 * src/files.c (openfiles):
10844 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10845 find a temporary directory, if possible. Do not unlink files while
10846 they are open.
10847
10848 1997-08-25 Richard Stallman <rms@gnu.org>
10849
10850 * src/reader.c (stack_offset;):
10851 Change some warni to warns.
10852
10853 * src/lex.c (literalchar): Use warns, not warni.
10854
10855 1997-06-28 Richard Stallman <rms@gnu.org>
10856
10857 * src/bison.s1: Add a Bison version comment.
10858
10859 * src/main.c (fatal, warn, berror):
10860 Use program_name.
10861
10862 1997-06-28 Richard Stallman <rms@gnu.org>
10863
10864 * Makefile.in (bison_version): New variable.
10865 (dist): Use that variable.
10866 (bison.s1): Substitute the Bison version into bison.simple.
10867
10868 * bison.simple: Add a Bison version comment.
10869
10870 1997-06-18 Richard Stallman <rms@gnu.org>
10871
10872 * src/main.c (fatal, warn, berror):
10873 Make error messages standard.
10874 (toomany): Improve error message text.
10875
10876 * 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:
10877 new.h renamed to alloc.h.
10878
10879 1997-06-18 Richard Stallman <rms@gnu.org>
10880
10881 * Makefile.in: new.h renamed to alloc.h.
10882
10883 1997-05-24 Richard Stallman <rms@gnu.org>
10884
10885 * src/lex.c (literalchar):
10886 Fix the code for escaping \, " and '.
10887
10888 (lex): Avoid trouble when there are many chars
10889 to discard in a char literal with just several chars in it.
10890
10891 1997-05-17 Richard Stallman <rms@gnu.org>
10892
10893 * src/bison.s1:
10894 Use malloc, if using alloca is troublesome.
10895 (YYSTACK_USE_ALLOCA): New flag macro.
10896 Define it for some systems and compilers.
10897 (YYSTACK_ALLOC): New macro.
10898 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10899 If it was malloc'd, free it.
10900
10901 1997-05-17 Richard Stallman <rms@gnu.org>
10902
10903 * bison.simple:
10904 Use malloc, if using alloca is troublesome.
10905 (YYSTACK_USE_ALLOCA): New flag macro.
10906 Define it for some systems and compilers.
10907 (YYSTACK_ALLOC): New macro.
10908 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10909 If it was malloc'd, free it.
10910
10911 1997-04-23 Richard Stallman <rms@gnu.org>
10912
10913 * src/bison.s1:
10914 (alloca) [__hpux]: Always define as __builtin_alloca.
10915
10916 1997-04-23 Richard Stallman <rms@gnu.org>
10917
10918 * bison.simple:
10919 (alloca) [__hpux]: Always define as __builtin_alloca.
10920
10921 1997-04-22 Richard Stallman <rms@gnu.org>
10922
10923 * src/bison.s1:
10924 [__hpux]: Include alloca.h (right for HPUX 10)
10925 instead of declaring alloca (right for HPUX 9).
10926
10927 * src/bison.s1 (__yy_memcpy):
10928 Declare arg `count' as unsigned int.
10929 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10930
10931 1997-04-22 Richard Stallman <rms@gnu.org>
10932
10933 * bison.simple:
10934 [__hpux]: Include alloca.h (right for HPUX 10)
10935 instead of declaring alloca (right for HPUX 9).
10936
10937 * bison.simple (__yy_memcpy):
10938 Declare arg `count' as unsigned int.
10939 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10940
10941 1997-01-03 Richard Stallman <rms@gnu.org>
10942
10943 * src/allocate.c: [__STDC__ or _MSC_VER]:
10944 Declare calloc and realloc to return void *.
10945
10946 1997-01-02 Richard Stallman <rms@gnu.org>
10947
10948 * src/system.h:
10949 [_MSC_VER]: Include stdlib.h and process.h.
10950 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10951
10952 * src/main.c (main): Return FAILURE as a value.
10953 (printable_version): Declare arg as int, not char.
10954
10955 1997-01-02 Richard Stallman <rms@gnu.org>
10956
10957 * Makefile.in (dist):
10958 Explicitly check for symlinks, and copy them.
10959
10960 1996-12-19 Richard Stallman <rms@gnu.org>
10961
10962 * src/files.c:
10963 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10964
10965 1996-12-18 Paul Eggert <eggert@gnu.org>
10966
10967 * src/bison.s1 (yyparse):
10968 If __GNUC__ and YYPARSE_PARAM are both defined,
10969 declare yyparse to have a void * argument.
10970
10971 1996-12-18 Paul Eggert <eggert@gnu.org>
10972
10973 * bison.simple (yyparse):
10974 If __GNUC__ and YYPARSE_PARAM are both defined,
10975 declare yyparse to have a void * argument.
10976
10977 1996-12-17 Richard Stallman <rms@gnu.org>
10978
10979 * src/reduce.c (nbits): Add some casts.
10980
10981 1996-08-12 Richard Stallman <rms@gnu.org>
10982
10983 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10984
10985 1996-08-12 Richard Stallman <rms@gnu.org>
10986
10987 * bison.simple: Test _MSDOS as well as _MSDOS_.
10988
10989 1996-07-31 Richard Stallman <rms@gnu.org>
10990
10991 * src/bison.s1:
10992 [__sun && __i386]: Include alloca.h.
10993
10994 1996-07-31 Richard Stallman <rms@gnu.org>
10995
10996 * bison.simple:
10997 [__sun && __i386]: Include alloca.h.
10998
10999 1996-07-30 Richard Stallman <rms@gnu.org>
11000
11001 * src/bison.s1: Comment change.
11002
11003 * src/bison.s1: Test _MSDOS_, not MSDOS.
11004
11005 1996-07-30 Richard Stallman <rms@gnu.org>
11006
11007 * bison.simple: Comment change.
11008
11009 * bison.simple: Test _MSDOS_, not MSDOS.
11010
11011 1996-06-01 Richard Stallman <rms@gnu.org>
11012
11013 * 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:
11014 Insert `_' macro around many string constants.
11015
11016 * src/main.c:
11017 Insert `_' macro around many string constants.
11018
11019 (main): Call setlocale, bindtextdomain and textdomain.
11020
11021 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
11022 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
11023 [ENABLE_NLS]: Include libintl.h.
11024 [ENABLE_NLS] (gettext): Define.
11025 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
11026 (N_, PACKAGE, LOCALEDIR): New macros.
11027
11028 1996-06-01 Richard Stallman <rms@gnu.org>
11029
11030 * POTFILES.in: New file.
11031
11032 * Makefile.in (allocate.o):
11033 Define target explicitly.
11034
11035 * Makefile.in (CFLAGS): Set to @CFLAGS@.
11036 (LDFLAGS): Set to @LDFLAGS@.
11037 (configure): Run autoconf only if preceding `cd' succeeds.
11038 (bison.s1): Redirect output to temporary file then move the
11039 temporary to the target, rather than redirecting directly to bison.s1.
11040 (clean): Remove config.status and config.log.
11041 (distclean): Don't remove config.status here.
11042
11043 1996-05-12 Richard Stallman <rms@gnu.org>
11044
11045 * src/bison.s1:
11046 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11047
11048 1996-05-12 Richard Stallman <rms@gnu.org>
11049
11050 * bison.simple:
11051 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
11052
11053 1996-05-11 Richard Stallman <rms@gnu.org>
11054
11055 * src/bison.s1 (__yy_memcpy):
11056 Really reorder the args, as was supposedly done on Feb 14 1995.
11057 (yyparse): Calls changed accordingly.
11058
11059 1996-05-11 Richard Stallman <rms@gnu.org>
11060
11061 * Makefile.in (dist): Don't use $(srcdir).
11062
11063 * bison.simple (__yy_memcpy):
11064 Really reorder the args, as was supposedly done on Feb 14 1995.
11065 (yyparse): Calls changed accordingly.
11066
11067 1996-01-27 Richard Stallman <rms@gnu.org>
11068
11069 * src/output.c (output_rule_data):
11070 Test YYERROR_VERBOSE in the conditional
11071 around the definition of ttyname.
11072
11073 1995-12-29 Richard Stallman <rms@gnu.org>
11074
11075 * src/bison.s1:
11076 Fix line numbers in #line commands.
11077
11078 1995-12-29 Richard Stallman <rms@gnu.org>
11079
11080 * bison.simple:
11081 Fix line numbers in #line commands.
11082
11083 1995-12-27 Richard Stallman <rms@gnu.org>
11084
11085 * src/bison.s1 (YYPARSE_PARAM_DECL):
11086 In C++, make it always null.
11087 (YYPARSE_PARAM_ARG): New macro.
11088 (yyparse): Use YYPARSE_PARAM_ARG.
11089
11090 1995-12-27 Richard Stallman <rms@gnu.org>
11091
11092 * bison.simple (YYPARSE_PARAM_DECL):
11093 In C++, make it always null.
11094 (YYPARSE_PARAM_ARG): New macro.
11095 (yyparse): Use YYPARSE_PARAM_ARG.
11096
11097 1995-11-29 Richard Stallman <rms@gnu.org>
11098
11099 * doc/bison.texinfo:
11100 Describe literal string tokens, %raw, %no_lines, %token_table.
11101
11102 1995-11-29 Daniel Hagerty <hag@gnu.org>
11103
11104 * doc/bison.texinfo: Fixed update date
11105
11106 1995-10-16 Richard Stallman <rms@gnu.org>
11107
11108 * src/version.c: Version 1.25.
11109
11110 1995-10-16 Richard Stallman <rms@gnu.org>
11111
11112 * NEWS: *** empty log message ***
11113
11114 1995-10-16 Richard Stallman <rms@gnu.org>
11115
11116 * doc/bison.1, doc/bison.rnh:
11117 Add new options.
11118
11119 1995-10-15 Richard Stallman <rms@gnu.org>
11120
11121 * src/vmsgetargs.c, src/getargs.c:
11122 Added -n, -k, and -raw switches.
11123 (noparserflag, toknumflag, rawtoknumflag): New variables.
11124
11125 * src/symtab.h (SALIAS):
11126 New #define for adding aliases to %token.
11127 (struct bucket): Added `alias' field.
11128
11129 * src/reduce.c (reduce_grammar):
11130 Revise error message.
11131 (print_notices): Remove final `.' from error message.
11132
11133 * src/reader.c (reader_output_yylsp):
11134 New function.
11135 (readgram): Use `#if 0' around code that accepted %command
11136 inside grammar rules: The documentation doesn't allow it,
11137 and it will fail since the %command processors scan for the next %.
11138 (parse_token_decl): Extended the %token
11139 declaration to allow a multi-character symbol as an alias.
11140 (parse_thong_decl): New function.
11141 (read_declarations): Added %thong declarations.
11142 (read_declarations): Handle NOOP to deal with allowing
11143 % declarations as another means to specify the flags.
11144 (readgram): Allow %prec prior to semantics embedded in a rule.
11145 (skip_to_char, read_declarations, copy_definition)
11146 (parse_token_decl, parse_start_decl, parse_type_decl)
11147 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
11148 (get_type_name, copy_guard, copy_action, readgram)
11149 (get_type, packsymbols): Revised most error messages.
11150 Changed `fatal' to `warnxxx' to avoid aborting for error.
11151 Revised and use multiple warnxxx functions to avoid using VARARGS1.
11152 (read_declarations): Improve the error message for
11153 an invalid character. Do not abort.
11154 (read_declarations, copy_guard, copy_action): Use
11155 printable_version to avoid unprintable characters in printed output.
11156 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
11157 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
11158 Allow the type of a non-terminal can be given
11159 more than once, as long as all specifications give the same type.
11160
11161 * src/output.c:
11162 (output_headers, output_trailers, output, output_gram)
11163 (output_rule_data): Implement noparserflag variable.
11164 Implement toknumflag variable.
11165 (output): Call reader_output_yylsp to output LTYPESTR.
11166
11167 * src/main.c (main):
11168 If reader sees an error, don't process the grammar.
11169 (fatals): Updated to not use VARARGS1.
11170 (printable_version, int_to_string, warn, warni, warns, warnss)
11171 (warnsss): New error reporting functions. Avoid abort for error.
11172
11173 * src/lex.h:
11174 Added THONG and NOOP for alias processing.
11175 Added SETOPT for the new code that allows setting options with %flags.
11176
11177 * src/lex.c:
11178 Include getopt.h. Add some extern decls.
11179 (safegetc): New function to deal with EOF gracefully.
11180 (literalchar); new function to deal with reading \ escapes.
11181 (lex): Use literalchar.
11182 (lex): Implemented "..." tokens.
11183 (literalchar, lex, parse_percent_token): Made tokenbuffer
11184 always contain the token. This includes growing the token
11185 buffer while reading an integer.
11186 (parse_percent_token): Replaced if-else statement with percent_table.
11187 (parse_percent_token): Added % declarations as another
11188 way to specify the flags -n, -l, and -r. Also added hooks for
11189 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
11190 major changes to files.c.
11191 (lex) Retain in the incoming stream a character following
11192 an incorrect '/'.
11193 (skip_white_space, lex): Revised most error messages
11194 and changed fatal to warn to avoid aborting.
11195 (percent_table): Added %thong declarations.
11196
11197 * src/gram.h: Comment changes.
11198
11199 * src/files.c (openfiles, open_extra_files, done):
11200 Add faction flag
11201 and actfile file. Handle noparserflag. Both for -n switch.
11202
11203 * src/conflicts.c (resolve_sr_conflict):
11204 Remove use of alloca.
11205
11206 1995-06-01 Jim Meyering <meyering@gnu.org>
11207
11208 * doc/bison.texinfo: *** empty log message ***
11209
11210 1995-05-06 Richard Stallman <rms@gnu.org>
11211
11212 * src/bison.s1: Comment change.
11213
11214 1995-05-06 Richard Stallman <rms@gnu.org>
11215
11216 * bison.simple: Comment change.
11217
11218 1995-05-03 Richard Stallman <rms@gnu.org>
11219
11220 * src/version.c: Version now 1.24.
11221
11222 * src/bison.s1: Change distribution terms.
11223
11224 * src/version.c: Version now 1.23.
11225
11226 1995-05-03 Richard Stallman <rms@gnu.org>
11227
11228 * doc/bison.texinfo:
11229 Rewrite "Conditions for Using Bison".
11230 Update version to 1.24.
11231
11232 1995-05-03 Richard Stallman <rms@gnu.org>
11233
11234 * bison.simple: Change distribution terms.
11235
11236 1995-02-23 Richard Stallman <rms@gnu.org>
11237
11238 * src/files.c: Test __VMS_POSIX as well as VMS.
11239
11240 1995-02-14 Jim Meyering <meyering@gnu.org>
11241
11242 * src/bison.s1 (__yy_memcpy):
11243 Renamed from __yy_bcopy to avoid
11244 confusion. Reverse FROM and TO arguments to be consistent with
11245 those of memcpy.
11246
11247 1995-02-14 Jim Meyering <meyering@gnu.org>
11248
11249 * bison.simple (__yy_memcpy):
11250 Renamed from __yy_bcopy to avoid
11251 confusion. Reverse FROM and TO arguments to be consistent with
11252 those of memcpy.
11253
11254 1994-11-10 David J. MacKenzie <djm@gnu.org>
11255
11256 * NEWS: reformat
11257
11258 * NEWS: New file.
11259
11260 * Makefile.in (DISTFILES): Include NEWS.
11261
11262 * Makefile.in (DISTFILES):
11263 Include install-sh, not install.sh.
11264
11265 * configure.in: Update to Autoconf v2 macro names.
11266
11267 1994-10-05 David J. MacKenzie <djm@gnu.org>
11268
11269 * Makefile.in: fix typo
11270
11271 * Makefile.in (prefix, exec_prefix):
11272 Let configure set them.
11273
11274 1994-09-28 David J. MacKenzie <djm@gnu.org>
11275
11276 * Makefile.in: Set datadir to $(prefix)/share.
11277
11278 1994-09-15 Richard Stallman <rms@gnu.org>
11279
11280 * src/bison.s1:
11281 Update copyright notice and GPL version.
11282
11283 1994-09-15 Richard Stallman <rms@gnu.org>
11284
11285 * bison.simple:
11286 Update copyright notice and GPL version.
11287
11288 1994-07-12 Richard Stallman <rms@gnu.org>
11289
11290 * src/reduce.c, src/reader.c:
11291 entered into RCS
11292
11293 1994-05-05 David J. MacKenzie <djm@gnu.org>
11294
11295 * Makefile.in: entered into RCS
11296
11297 1994-03-26 Richard Stallman <rms@gnu.org>
11298
11299 * src/bison.s1: entered into RCS
11300
11301 1994-03-26 Richard Stallman <rms@gnu.org>
11302
11303 * bison.simple: entered into RCS
11304
11305 1994-03-25 Richard Stallman <rms@gnu.org>
11306
11307 * src/main.c: entered into RCS
11308
11309 1994-03-24 Richard Stallman <rms@gnu.org>
11310
11311 * src/conflicts.c: entered into RCS
11312
11313 1994-01-02 Richard Stallman <rms@gnu.org>
11314
11315 * Makefile.in: *** empty log message ***
11316
11317 1993-11-21 Richard Stallman <rms@gnu.org>
11318
11319 * src/bison.s1: *** empty log message ***
11320
11321 1993-11-21 Richard Stallman <rms@gnu.org>
11322
11323 * doc/bison.texinfo: entered into RCS
11324
11325 * doc/bison.texinfo: *** empty log message ***
11326
11327 1993-11-21 Richard Stallman <rms@gnu.org>
11328
11329 * bison.simple: *** empty log message ***
11330
11331 1993-10-25 David J. MacKenzie <djm@gnu.org>
11332
11333 * doc/bison.texinfo: *** empty log message ***
11334
11335 1993-10-19 Richard Stallman <rms@gnu.org>
11336
11337 * src/bison.s1: *** empty log message ***
11338
11339 1993-10-19 Richard Stallman <rms@gnu.org>
11340
11341 * bison.simple: *** empty log message ***
11342
11343 1993-10-14 Richard Stallman <rms@gnu.org>
11344
11345 * src/bison.s1: *** empty log message ***
11346
11347 1993-10-14 Richard Stallman <rms@gnu.org>
11348
11349 * bison.simple: *** empty log message ***
11350
11351 1993-09-14 David J. MacKenzie <djm@gnu.org>
11352
11353 * doc/bison.texinfo: *** empty log message ***
11354
11355 1993-09-13 Noah Friedman <friedman@gnu.org>
11356
11357 * Makefile.in: *** empty log message ***
11358
11359 1993-09-10 Richard Stallman <rms@gnu.org>
11360
11361 * src/conflicts.c: *** empty log message ***
11362
11363 * src/system.h: entered into RCS
11364
11365 1993-09-10 Richard Stallman <rms@gnu.org>
11366
11367 * doc/bison.1: entered into RCS
11368
11369 1993-09-06 Noah Friedman <friedman@gnu.org>
11370
11371 * src/version.c: entered into RCS
11372
11373 1993-09-06 Noah Friedman <friedman@gnu.org>
11374
11375 * Makefile.in: *** empty log message ***
11376
11377 1993-07-30 David J. MacKenzie <djm@gnu.org>
11378
11379 * Makefile.in: *** empty log message ***
11380
11381 1993-07-24 Richard Stallman <rms@gnu.org>
11382
11383 * src/bison.s1: *** empty log message ***
11384
11385 1993-07-24 Richard Stallman <rms@gnu.org>
11386
11387 * bison.simple: *** empty log message ***
11388
11389 1993-07-08 David J. MacKenzie <djm@gnu.org>
11390
11391 * Makefile.in: *** empty log message ***
11392
11393 1993-07-04 Richard Stallman <rms@gnu.org>
11394
11395 * src/bison.s1: *** empty log message ***
11396
11397 1993-07-04 Richard Stallman <rms@gnu.org>
11398
11399 * bison.simple: *** empty log message ***
11400
11401 1993-06-26 David J. MacKenzie <djm@gnu.org>
11402
11403 * src/getargs.c: entered into RCS
11404
11405 1993-06-26 David J. MacKenzie <djm@gnu.org>
11406
11407 * doc/bison.texinfo: *** empty log message ***
11408
11409 * doc/bison.1: New file.
11410
11411 1993-06-25 Richard Stallman <rms@gnu.org>
11412
11413 * src/getargs.c: New file.
11414
11415 1993-06-16 Richard Stallman <rms@gnu.org>
11416
11417 * src/bison.s1: *** empty log message ***
11418
11419 1993-06-16 Richard Stallman <rms@gnu.org>
11420
11421 * bison.simple: *** empty log message ***
11422
11423 1993-06-03 Richard Stallman <rms@gnu.org>
11424
11425 * src/bison.s1: New file.
11426
11427 1993-06-03 Richard Stallman <rms@gnu.org>
11428
11429 * doc/bison.texinfo: *** empty log message ***
11430
11431 1993-06-03 Richard Stallman <rms@gnu.org>
11432
11433 * bison.simple: New file.
11434
11435 1993-05-19 Richard Stallman <rms@gnu.org>
11436
11437 * doc/bison.texinfo: New file.
11438
11439 1993-05-07 Noah Friedman <friedman@gnu.org>
11440
11441 * Makefile.in: *** empty log message ***
11442
11443 1993-04-28 Noah Friedman <friedman@gnu.org>
11444
11445 * src/reader.c: *** empty log message ***
11446
11447 1993-04-23 Noah Friedman <friedman@gnu.org>
11448
11449 * src/alloc.h: entered into RCS
11450
11451 1993-04-20 David J. MacKenzie <djm@gnu.org>
11452
11453 * src/version.c: *** empty log message ***
11454
11455 * src/files.c, src/allocate.c:
11456 entered into RCS
11457
11458 * src/reader.c: *** empty log message ***
11459
11460 * src/lex.c: entered into RCS
11461
11462 * src/conflicts.c: New file.
11463
11464 * src/symtab.c: entered into RCS
11465
11466 * src/alloc.h: New file.
11467
11468 * src/LR0.c: entered into RCS
11469
11470 1993-04-18 Noah Friedman <friedman@gnu.org>
11471
11472 * src/reader.c: New file.
11473
11474 * src/version.c: *** empty log message ***
11475
11476 1993-04-18 Noah Friedman <friedman@gnu.org>
11477
11478 * Makefile.in: *** empty log message ***
11479
11480 1993-04-17 Noah Friedman <friedman@gnu.org>
11481
11482 * Makefile.in: *** empty log message ***
11483
11484 1993-04-15 Richard Stallman <rms@gnu.org>
11485
11486 * src/main.c, src/files.c:
11487 New file.
11488
11489 1993-04-15 Noah Friedman <friedman@gnu.org>
11490
11491 * configure.in: entered into RCS
11492
11493 * configure.in: *** empty log message ***
11494
11495 * configure.in: New file.
11496
11497 1993-04-14 Richard Stallman <rms@gnu.org>
11498
11499 * Makefile.in: New file.
11500
11501 1993-04-13 Richard Stallman <rms@gnu.org>
11502
11503 * src/version.c: New file.
11504
11505 1993-03-25 Richard Stallman <rms@gnu.org>
11506
11507 * src/output.c: entered into RCS
11508
11509 1992-09-25 Richard Stallman <rms@gnu.org>
11510
11511 * configure.bat: entered into RCS
11512
11513 1992-06-22 Richard Stallman <rms@gnu.org>
11514
11515 * src/vmsgetargs.c: entered into RCS
11516
11517 1992-06-22 Richard Stallman <rms@gnu.org>
11518
11519 * doc/bison.rnh: entered into RCS
11520
11521 1992-04-20 David J. MacKenzie <djm@gnu.org>
11522
11523 * README: entered into RCS
11524
11525 1992-01-22 Richard Stallman <rms@gnu.org>
11526
11527 * src/machine.h: entered into RCS
11528
11529 1991-12-21 Richard Stallman <rms@gnu.org>
11530
11531 * src/lalr.c, src/closure.c:
11532 entered into RCS
11533
11534 1991-12-20 Richard Stallman <rms@gnu.org>
11535
11536 * src/state.h: entered into RCS
11537
11538 1991-12-18 Richard Stallman <rms@gnu.org>
11539
11540 * src/print.c, src/nullable.c, src/derives.c:
11541 entered into RCS
11542
11543 1991-11-03 David J. MacKenzie <djm@gnu.org>
11544
11545 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
11546 entered into RCS
11547
11548 1988-09-09 Richard Stallman <rms@gnu.org>
11549
11550 * src/bison.hairy: entered into RCS
11551
11552 1987-12-16 Richard Stallman <rms@gnu.org>
11553
11554 * REFERENCES: entered into RCS
11555
11556 -----
11557
11558 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
11559 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
11560
11561 This file is part of Bison, the GNU Compiler Compiler.
11562
11563 Bison is free software; you can redistribute it and/or modify
11564 it under the terms of the GNU General Public License as published by
11565 the Free Software Foundation; either version 2, or (at your option)
11566 any later version.
11567
11568 Bison is distributed in the hope that it will be useful,
11569 but WITHOUT ANY WARRANTY; without even the implied warranty of
11570 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11571 GNU General Public License for more details.
11572
11573 You should have received a copy of the GNU General Public License
11574 along with Bison; see the file COPYING. If not, write to
11575 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
11576 Boston, MA 02111-1307, USA.